fix all of the things

This commit is contained in:
Peter Ferrie 2020-05-23 15:47:16 -07:00
parent 931d257de3
commit 52b334581a
6 changed files with 26 additions and 12 deletions

View File

@ -172,7 +172,7 @@ COPYSRC = *
!source "src/hw.accel.lc2.a" !source "src/hw.accel.lc2.a"
STACKBASE = * STACKBASE = *
LCRAM2_END = STACKBASE + 15 LCRAM2_END = STACKBASE + 15
!if LCRAM2_END > DisableAccelerator { !if LCRAM2_END >= DisableAccelerator {
!error "code is too large: ends at ", LCRAM2_END !error "code is too large: ends at ", LCRAM2_END
} }
FONTDST = (LCRAM2_END + 255) and -256 FONTDST = (LCRAM2_END + 255) and -256
@ -191,7 +191,7 @@ EvenLasterMover
!set PASS2=1 !set PASS2=1
!warn "ProRWTS ends at ", hdddataend - 1 !warn "ProRWTS ends at ", hdddataend - 1
!warn "STACK at ", STACKBASE !warn "STACK at ", STACKBASE
!warn "LCRAM2 ends at ", LCRAM2_END - 1 !warn "LCRAM2 ends at ", LCRAM2_END
!warn "RELBASE = ", $10000 - (LastMover - FirstMover) !warn "RELBASE = ", $10000 - (LastMover - FirstMover)
} }
} }

View File

@ -6,9 +6,9 @@
; YE OLDE GRAND UNIFIED MEMORY MAP ; YE OLDE GRAND UNIFIED MEMORY MAP
; ;
; LC RAM BANK 1 ; LC RAM BANK 1
; D000..E7E3 - persistent data structures (gGlobalPrefsStore, gGamesListStore) ; D000..E7F9 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; ...unused... ; ...unused...
; E92B..FFF1 - main program code ; E91E..FFF1 - main program code
; FFF2..FFF9 - API functions and global constants available for main program ; FFF2..FFF9 - API functions and global constants available for main program
; code, prelaunchers, transition effects, &c. ; code, prelaunchers, transition effects, &c.
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus) ; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
@ -17,9 +17,9 @@
; LC RAM BANK 2 ; LC RAM BANK 2
; D000..D3FF - ProRWTS data ; D000..D3FF - ProRWTS data
; D400..D66F - ProRWTS code ; D400..D66F - ProRWTS code
; D670..DB9B - HGR font code & ProRWTS glue code ; D670..DBA2 - HGR font code & ProRWTS glue code
; DB9C..DBAA - backup of stack (during gameplay and self-running demos) ; DBA3..DBB2 - backup of stack (during gameplay and self-running demos)
; ...unused... ; ...unused... yes, just one byte to spare
; DBB4..DBFF - (de)acceleration function ; DBB4..DBFF - (de)acceleration function
; DC00..DFFF - HGR font data ; DC00..DFFF - HGR font data
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -141,3 +141,7 @@ IS_IIGS = %00100000 ; /!\ do not use this to gate SHR, use SUPP
HAS_VIDHD = %00010000 HAS_VIDHD = %00010000
SUPPORTS_SHR = %00110000 SUPPORTS_SHR = %00110000
CHEATS_ENABLED = %00001000 CHEATS_ENABLED = %00001000
; hacks
LoadFileDirect = $DAFB
launchpatch = $D613

View File

@ -253,4 +253,9 @@ PlayGame
; execution falls through here ; execution falls through here
Launch Launch
jsr SwitchToBank2 jsr SwitchToBank2
lda #$BD
sta launchpatch
jsr saveslot ; set proper slot information
lda #$9D
sta launchpatch
jmp LaunchInternal jmp LaunchInternal

View File

@ -15,8 +15,8 @@ LoadFileAuxInternal
!if RELBASE != $2000 { !if RELBASE != $2000 {
!ifdef PASS2 { !ifdef PASS2 {
} else { ;PASS2 } else { ;PASS2
!if * != $DAFD { !if * != LoadFileDirect {
!error "LoadFileDirect=",*, ", adjust !if and fix Berzap" !error "LoadFileDirect=",*, ", fix constants.a"
} }
} }
} }

View File

@ -36,7 +36,7 @@ callback2
pha pha
lda #<berzap_mb lda #<berzap_mb
ldy #>berzap_mb ldy #>berzap_mb
jsr $DAFD ; ahem, LoadFileDirect jsr LoadFileDirect
pla pla
sta $D403 sta $D403
pla pla

View File

@ -2747,8 +2747,6 @@ encbufpatch1
} ;allow_subdir = 1 } ;allow_subdir = 1
!if allow_aux = 0 { !if allow_aux = 0 {
rts rts
} else { ;allow_aux = 1
beq hddrdwrdone
} ;allow_aux = 0 } ;allow_aux = 0
} ;one_shot = 0 } ;one_shot = 0
} else { ;aligned_read = 1 } else { ;aligned_read = 1
@ -3264,6 +3262,13 @@ saveslot
lda scrn_array, x lda scrn_array, x
initpatch lda ($48), y initpatch lda ($48), y
pla pla
!ifdef PASS2 {
} else { ;PASS2
!if * != launchpatch {
!error "launchpatch=",*, ", fix constants.a"
}
}
sta scrn_array, x sta scrn_array, x
inx inx
tya tya