make VBL addresses permanent

This commit is contained in:
Peter Ferrie 2020-03-18 19:53:50 -07:00
parent 51da039f0b
commit 93cf397134
4 changed files with 20 additions and 20 deletions

View File

@ -137,6 +137,13 @@ SwitchToBank2
rts
!source "src/prodos.path.a" ; paths end up on the same page
; WaitForVBL
jmp WaitForVBL_iie ; SMC to RTS on a II+
; UnwaitForVBL
rts ; SMC to JMP on a IIc
!word iUnwaitForVBL
; MockingboardStuff (label is in constants.a so prelaunchers can use it)
; slot number where Mockingboard was detected and type of board
; #$00 if no Mockingboard detected
@ -190,10 +197,4 @@ EvenLasterMover
!warn "LCRAM2 ends at ", LCRAM2_END - 1
!warn "RELBASE = ", $10000 - (LastMover - FirstMover)
}
} else {
!if (iWaitForVBL != WaitForVBL) or (iUnwaitForVBL != UnwaitForVBL) {
!warn "constants.a needs updating"
!error "WaitForVBL is at ", iWaitForVBL
!error "UnwaitForVBL is at ", iUnwaitForVBL
}
}

View File

@ -8,7 +8,7 @@
; LC RAM BANK 1
; D000..E297 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; ...unused...
; EAA7..FFF9 - main program code
; EAA7..FFF8 - main program code
; FFFA..FFFF - NMI, reset, IRQ vectors
;
; LC RAM BANK 2
@ -108,6 +108,9 @@ gValLen = $1F80
gVal = $1F81
; LC RAM 1
WaitForVBL = $FFF2
UnwaitForVBL = $FFF5
MockingboardStuff = $FFF8 ; bit 7 = 1 if speech chip present (Mockingboard "C")
; bit 6 = 1 if Mockingboard "B" (stereo) found (else Mockingboard "A")
; bit 4-5 unused
@ -134,6 +137,3 @@ HAS_VIDHD = %00010000
SUPPORTS_SHR = %00110000
CHEATS_ENABLED = %00001000
; VBL functions
WaitForVBL = $FCB0
UnwaitForVBL = $FCC5

View File

@ -25,7 +25,6 @@ WaitForVBL_nop ; II/II+ have no easy VBL
rts
iUnwaitForVBL
rts ; SMC on IIc
- bit $C019
bpl -
lda $C070 ; $c019 bit 7 is sticky, reset it

View File

@ -13,7 +13,6 @@ romid_ec = $FBC0
idroutine = $FE1F ; SEC, JSR $FE1F, BCS notgs
BuildVBLFunction
lda #$60
ldx romid
cpx #ROMID_IIECOMPAT
bne @build_none ; not a //e
@ -27,19 +26,20 @@ BuildVBLFunction
lda #$10
sta patch_VBL_iigs2
@NotGS
lda #<WaitForVBL_iie
sta WaitForVBL+1
lda #>WaitForVBL_iie
sta WaitForVBL+2
lda #$4C
@build_none
sta WaitForVBL
rts
@build_iic
lda #$70
sta patch_VBL_iic1+1
lda #$60
sta patch_VBL_iic2
lda #$EA
lda #<iWaitForVBL
sta WaitForVBL+1
lda #>iWaitForVBL
sta WaitForVBL+2
lda #$4C
sta UnwaitForVBL
rts
@build_none
lda #$60
sta WaitForVBL
rts