Memory Map



APPENDIX TEN

STAGE TWO VBLANK

At location VVBLKI (546,547), we discussed the various stages of VBLANK and I promised a list of things that were done during stage two. This is that list.

The following hardware registers are updated with the values in their shadow registers (listed in the order they are updated):

Shadow Hardware
LPENV PENV
LPENH PENH
SDLSTH DLISTH
SDLSTL DLISTL
SDMCTL DMACTL
GPRIOR PRIOR
PCOLR0-3 COLPM0-3 (Colors are first adjusted for the
COLOR0-3 COLPF0-3 attract mode.)
COLOR4 COLBK
CHBAS CHBASE
CHACT CHACTL
STRIG0-3 TRIG0-3
PADDL0-7 POT0-7


The following shadow registers are updated with the values in the corresponding hardware registers:

Shadow Hardware
STICK0,1 PORTA
STICK2,3 PORTB
PTRIG0-3 PORTA
PTRIG4-7 PORTB

In addition to all this, the following timers are decremented, and the appropriate actions taken if they reach zero:

CDTMV2-5
KEYDEL
SRTIMR

Note that the last two timers deal with the keyboard debounce and repeat, respectively, and are only decremented if necessary. CDTMV1 is taken care of in stage one.

Finally, the last thing stage two does is jump through VVBLKD (548,549).


Return to Table of Contents | Previous Chapter | Next Chapter