Skip to content

Commit 0b9a96e

Browse files
committed
save ~17 bytes
1 parent c02f2db commit 0b9a96e

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

src/boot.asm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
; cpx #0 ; dex sets z flag
3737
bne @loop
3838

39+
lda #1
40+
sta debugFlag
41+
3942
; default pace to A
4043
lda #$A
4144
sta paceModifier

src/gamemodestate/initbackground.asm

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -176,25 +176,8 @@ saveSlotNametablePatch:
176176
rts
177177

178178
saveStateNametableUI:
179-
; todo: replace with stripe
180-
ldx #$00
181-
@nextPpuAddress:
182-
lda savestate_nametable_patch,x
183-
inx
184-
sta PPUADDR
185-
lda savestate_nametable_patch,x
186-
inx
187-
sta PPUADDR
188-
@nextPpuData:
189-
lda savestate_nametable_patch,x
190-
inx
191-
cmp #$FE
192-
beq @nextPpuAddress
193-
cmp #$FD
194-
beq @endOfPpuPatching
195-
sta PPUDATA
196-
jmp @nextPpuData
197-
@endOfPpuPatching:
179+
jsr bulkCopyToPpu
180+
.addr savestate_nametable
198181
rts
199182

200183
statisticsNametablePatch:
@@ -261,11 +244,12 @@ seven_digit_nametable_dark:
261244
.byte $21, $5F, $41, DARK_CORNER_TILES+3
262245
.byte $FF
263246

264-
savestate_nametable_patch:
265-
.byte $22,$F7,$38,$39,$39,$39,$39,$39,$39,$3A,$FE
266-
.byte $23,$17,$3B,$1C,$15,$18,$1D,$FF,$FF,$3C,$FE
267-
.byte $23,$37,$3B,$FF,$FF,$FF,$FF,$FF,$FF,$3C,$FE
268-
.byte $23,$57,$3D,$3E,$3E,$3E,$3E,$3E,$3E,$3F,$FD
247+
savestate_nametable:
248+
.byte $22,$F7,$8,$38,$39,$39,$39,$39,$39,$39,$3A
249+
.byte $23,$17,$8,$3B,$1C,$15,$18,$1D,$FF,$FF,$3C
250+
.byte $23,$37,$8,$3B,$FF,$FF,$FF,$FF,$FF,$FF,$3C
251+
.byte $23,$57,$8,$3D,$3E,$3E,$3E,$3E,$3E,$3E,$3F
252+
.byte $FF
269253

270254
DARK_CORNER_TILES := $94
271255
DARK_CORNER_TILES2 := $90

0 commit comments

Comments
 (0)