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
; D000..E8C9 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; ...unused...
; E91D..FFF1 - main program code
; E912..FFF1 - main program code
; FFF2..FFF9 - API functions and global constants available for main program
; code, prelaunchers, transition effects, &c.
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)

View File

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