Date : Thu, 29 Sep 1994 12:41:57 +0000
From : lamcw <lamcw@...>
Subject: CRTC and ULA emulation
hi everyone,
regarding the emulation of the CRTC & ULA, i've only come across 2 programs
which use the split screen mode, namely ELITE and REVS. does anyone know of
any more?
well, these two programs change screen modes in between whole character lines
which makes life simpler. it seems to me that the only things these video
interrupts do are
a) change the value of &FE20 and therefore the 'mode' itself
b) change &FE21 a few times to redefine the colours.
i see no reason why they should modify the CRTC registers.
also at which point on the screen does the vertical sync interrupt occur?
well, this is my suggestion to deal with these interrupts:-
set up arrays TAB_FE20[32] and TAB_FE21[32,16]. (32 char lines, 16 logical
colours)
keep a counter called VIDEOCOUNT and increment after a fixed number
of opcodes (the time it takes to plot 8 scanlines).
when something tries to poke &FE20/1, we put the value into the correct
array element indexed by VIDEOCOUNT.
when VIDEOCOUNT=33, the time to 'plot' the screen has elapsed and we can do
an instantanous screen dump with reference to the two arrays.
a bit of fiddling around with the counts will hopefully get the interrupts
to poke at the right value of VIDEOCOUNT.
comments?
chris lam.