Re: BASIC for the CBM-II/8088

From: Mia Magnusson <mia_at_plea.se>
Date: Sun, 15 Jul 2018 00:06:09 +0200
Message-ID: <20180715000609.00005c98@plea.se>
Den Sat, 14 Jul 2018 23:17:13 +0200 skrev Michał Pleban
<lists@michau.name>:
> Mia Magnusson wrote:
> 
> > Btw, as implementing ram at the CGA/MDA addresses anyway require a
> > hardware modification, it might be a good idea to add something that
> > detects writes to that area. Each interrupt could then check if a
> > write has occurred and (depending on when the last refresh has been
> > done - it might be a good idea to wait a while if it has been
> > refreshed recently) refresh the screen.
> 
> Yes, it would be nice to have a latch that is set when the video
> memory is written and reset when it is refreshed.
> 
> Even nicer would be to divide the video memory into parts (for
> example, 8 parts of 256 bytes each) and have the hardware set a bit
> in the latch indicating which part has been written. This way it
> would be possible to narrow down the area that needs to be refreshed.

That would probably be easiest, or rather the most pcb space efficient,
to implement using programmable logic.

Otherwise something like 74LS279 contain four set/reset flip flops. A
74LS138 could detect which 1/8 part of video ram is written, and it's
output could go to the set inputs of two of theese. It would also
require some three state thing to read this, and some logic to reset it
after being read. So there would be a number of 74xx circuits to detect
separate parts of video memory.

http://www.skot9000.com/ttl/datasheets/279.pdf 

Btw how fast is the 8088 at comparing two memory blocks, compared to
how fast the 6509 is at copying the same size of memory? Would there be
any benefit using the 8088 to search for what has been changed since
last time the video memory were examined, and build a list for single
bytes (or smaller blocks) for the 6509 to copy?

I recall a discussion about the REP instructions of the 8088, but can't
remember exactly what we were discussing. Probably video ram :)

> > Btw we need to check how the cursor is handled in PC software. I'm
> > not sure if it's done via the 6845 or with attributes. If it's done
> > with the 6845 we need to check if it's usually done by writing
> > directly to the hardware or using the bios. Some kind of trap in a
> > pc emulator should be able to check how some poular software does
> > it.
> 
> Well, there is INT 10,01 (set cursor shape) which could be
> implemented, and INT 10,02 (set cursor position) which is already
> implemented. It remains to be tested how many programs actually use
> them.

Using BIOS means that there is one place less where the program has do
do things different with monochrome v.s. color display, so it might had
made sense to use those INT's even for programs using the video memory
directly.

> > I'm not sure what kind of software that could be interesting to run
> > on the 8088 board, but it might be nice to be able to use for
> > example Norton Commander or the clone Volkov Commander. (IIRC the
> > source code to VC is available, so another option might be to
> > modify that to use bios calls for all screen access).
> 
> Norton Commander is high on my list. Generally if we get the video
> memory emulation right, I suspect a lot of programs from DOS 3 era
> could be run.

Agree

> > Btw Turbo Pascal 3 might be able to run as the PC emulation is
> > today. I'm not sure how much of the code base is similar between
> > MS-DOS and CP/M, but the general appearance is iirc about the same
> > for both, so it's likely that both uses the OS and not hardware
> > access to write to the screen and read the keyboard.
> 
> I tried it already; in fact, I used it as a testbed of my 18Hz timer
> interrupt emulation (as it contains a calibration loop based on this
> interrupt). The startup menu is displayed using INT 10 so it works,
> but the text editor used direct video memory access.

Interesting.


-- 
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.
Received on 2018-07-15 01:00:04

Archive generated by hypermail 2.2.0.