Re: BASIC for the CBM-II/8088

From: Mia Magnusson <mia_at_plea.se>
Date: Sat, 14 Jul 2018 20:31:45 +0200
Message-ID: <20180714203145.000044e2@plea.se>
Den Sat, 14 Jul 2018 00:19:45 +0200 skrev Michał Pleban
<lists@michau.name>:
> Mia Magnusson wrote:
> 
> > How about inside the 18Hz 8088 interrupt (if that is emulated)?
> 
> There is a 50Hz interrupt on the 8088 side, which is used to emulate
> the 18Hz PC interrupt.
> 
> HOWEVER.
> 
> An optimistic estimate shows that copying the whole screen from 8088
> to 6509 would take about 30-35 ms, with highly optimized code. So
> theroretically you can do it 30 times per second. But doing it
> requires stopping the 8088 (it must relinquish memory access to the
> 6509 so that it can do its job). So, for example, if you decide to
> refresh the screen 10 times per second, you will slow down the 8088
> by 30%, because it will spend 300 ms out of every second waiting for
> the 6509 to refresh the screen.
> 
> So I would like to get a little bit smarter about it, and invent some
> heuristics to decide when to refresh the screen and when not. For
> example, when the software is sitting in a tight loop waiting for a
> key to be pressed, there is probably nothing being written to the
> screen at the same time, so we might want to refresh it once a second
> just to be sure. Wheread after the key is pressed, is is quite likely
> that the application is going to write something to the screen, and
> it's likely that the screen will then need refreshing. And so on.

Agree.

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.

But I'm not sure if there are programs that write already written data
to the screen.

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.

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).

P.S. a kind of perverted way to use the 8088 board would be to somehow
run the Datatronic/Handic software Calc Result and Word Result in their
PC versions :) (They are already available as native CBM-II programs,
therefore I consider it a bit perverse to run the PC versions :) ).

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.

-- 
(\_/) 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-14 21:00:07

Archive generated by hypermail 2.2.0.