make IIc VBL consistent with IIe

This commit is contained in:
Peter Ferrie 2020-06-18 09:47:13 -07:00
parent 2272f77789
commit ba033a5ea8
2 changed files with 8 additions and 6 deletions

View File

@ -13,21 +13,22 @@ WaitForVBL_iie ; IIe/IIgs have a relatively sane VBL
; but it's reversed between the two
; so we default to IIe, and patch in
; the reverse case if it's a IIGS.
- bit $C019
patch_VBL_iigs1
bpl -
patch_VBL_iic1
- lda $C019 ; $c019 bit 7 is sticky, reset it (SMC->#$70 for IIc)
patch_VBL_iigs1
patch_VBL_iic2
bpl -
- bit $C019
patch_VBL_iic3
patch_VBL_iigs2
bmi -
WaitForVBL_nop ; II/II+ have no easy VBL
rts
iUnwaitForVBL
lda $C070 ; $c019 bit 7 is sticky, reset it
- 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

View File

@ -28,10 +28,11 @@ BuildVBLFunction
@NotGS
rts
@build_iic
sta patch_VBL_iic2+1
lda #$70
sta patch_VBL_iic1+1
lda #$60
sta patch_VBL_iic2
lda #$10
sta patch_VBL_iic3
lda #<iWaitForVBL
sta WaitForVBL+1
lda #>iWaitForVBL