APPENDIX ONE
VBLANK Processes
The VBLANK routines are all documented in the OS listings, pages 35
to 38. In the "A" ROMs, they are processed in locations 59345 to 59665
($E7D1 to $E911). In the "B" ROMs, they are processed at 59310 to
59628 ($E7AE to $E8EC). See also De Re Atari for more explanation.
Stage 1 VBLANK:
Performed every VBI:
1) Increment the realtime clock at 18 - 20 ($12-$14)
2) Process the attract mode variables (location 77; $4D)
3) Decrement system timer one at 536 ($218) and if zero JSR through
550 ($226).
Stage 2 VBLANK:
Performed every VBI which does not interrupt critical sections:
1) Update the hardware registers from the shadows as follows:
Shadow: Hardware: Update reason:
SDLISTL/H DLISTL/H DISPLAY LIST END
SDMCTL DMACTL
CHBAS CHBASE
CHACT CHACTL
GPRIOR PRIOR
COLOR0-4 COLPF0-4,BAK ATTRACT MODE
PCOL0-3 COLPM0-3
LPCNV/H PENV/H LIGHT PEN
STICK0-1 PORTA JOYSTICKS
PTRIG0-3 PORTA PADDLE TRIGGERS
STICK2-3 PORTB
PTRIG4-7 PORTB
PADDL0-7 POT0-7 PADDLES
STRIG0-3 TRIG0-3 JOYSTICK TRIGGERS
.... CONSOL CONSOLE SPEAKER OFF
2) System timers two to five (locations 540,542,544; $21C,$21E,$220)
are decremented and if the value is zero, the corresponding flags
are set. A JSR is made through 552 ($228) if timer two equals zero.
3) A character is read from POKEY keyboard register at 53769
($D209) and read into CH at 764 ($2FC) if the auto-repeat is active.
4) The keyboard debounce counter is decremented by one if it is not
zero and if no key is being pressed.
5) Keyboard auto-repeat logic is processed.
6) Exit the VBLANK routine through 58466 ($E462).
Return to Table of Contents
| Previous Chapter
| Next Chapter