fix Swashbuckler highscore saving

This commit is contained in:
Peter Ferrie 2020-06-06 12:50:12 -07:00
parent a435053a9d
commit 07c274820a
3 changed files with 16 additions and 14 deletions

View File

@ -8,7 +8,7 @@
; LC RAM BANK 1 ; LC RAM BANK 1
; D000..E8C9 - persistent data structures (gGlobalPrefsStore, gGamesListStore) ; D000..E8C9 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; ...unused... ; ...unused...
; E91D..FFF1 - main program code ; E912..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)

View File

@ -280,20 +280,12 @@ resetval=$f0
jsr @set_rdwrbuff jsr @set_rdwrbuff
plp plp
bcc @skip_align bcc @skip_align
lda sizelo ldx #sizelo
adc #$fe jsr @round
lda sizehi
adc #1
and #$fe
sta sizehi
lda bleftlo
adc #$ff
lda #0 lda #0
sta bleftlo sta sizelo
lda blefthi ldx #bleftlo
adc #1 jsr @round
and #$fe
sta blefthi
@skip_align @skip_align
jsr hddrdwrpart jsr hddrdwrpart
@ -371,6 +363,16 @@ resetval=$f0
iny iny
rts rts
@round
clc
lda $0,x
adc #$ff
lda $1,x
adc #1
and #$fe
sta $1,x
rts
@swap_zp @swap_zp
ldx #last_zp-first_zp ldx #last_zp-first_zp
@save_zp @save_zp