1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-03-27 18:35:06 +00:00

notes on IIc VBL

This commit is contained in:
Peter Ferrie 2019-12-31 13:19:42 -08:00
parent 81ad97e0bd
commit 8b0a35e453

View File

@ -494,7 +494,7 @@ asm _dgrFillTile
RTS
end
//
// Wait for VLB - Shouldn't work on //c, but seems to.
// Wait for VLB - Only IIe/IIGS.
//
asm vlbWait#0
- LDA $C019
@ -503,6 +503,30 @@ asm vlbWait#0
BPL -
RTS
end
// Wait for VBL on IIc is entirely different from others.
// Setup, one-time *only* if polling will be used exclusively.
// Otherwise requires restoring the mode on exit,
// and setting up per-use instead.
// [php]
// sei ; otherwise interrupt is still raised
// sta $C07F ; enable access to VBL register
// sta $C05B ; enable VBL polling
// sta $C07E ; disable access to VBL register
//
// wait for VBL:
// - bit $C019
// bpl -
// lda $C070 ; $c019 bit 7 is sticky, reset it
//
// To allow other methods of VBL, restore access:
// - bit $C019
// bpl -
// lda $C070 ; $c019 bit 7 is sticky, reset it
// sta $C07F ; enable access to VBL register
// sta $C05A ; disable VBL polling
// sta $C07E ; disable access to VBL register
// [plp]
//
// Clear the buffer
//