Date : Tue, 30 Jan 1996 12:15:24 GMT
From : David Alan Gilbert <gilbertd@...>
Subject: Re: Vertical blank interrupt
> Robin.Watts@... Mon Jan 29 14:10 GMT 1996 wrote:
>
> ;If I read this right, you actually emulate the changing of the palette
> ;at a point partway down the screen by doing it.
>
> ;We cheat and have "patches" for the specific modes.
>
> ;How do you know when to trigger the interrupt? I'd love to know so we
> ;can think about improving 6502Em.
>
>
> That's right, I store PALETTE values in a table as execution progresses per
> frame. I also store some video ULA numbers. The trick is to 'align' the
> table with the screen. For that you need to know something about when
> the VBI takes places.
Hmm - I go the whole hog and simulate the scanout process; every 64us
(or whatever
is programmed into the CRTC) of simulated time I read a scanline of data
from the
beebs memory and display it. At the same time I read palette registers
and the like.
(Actually I read the data every 8 scanlines I think for convenience).
This could explain why my emulator is so damn slow :-)
The latest version (not released yet..- waiting for the sound to go into
the Windows
version) avoids doing some of the processing if the RAM hasn't changed
recently and the
CRTC and ULA registers haven't changed since last time. This does mean
that it doesn't
help Elite because the registers change on every frame.
However it speeds some programs up a heck of a lot.
Dave