Skip to content

Commit

Permalink
NES PLUGE: load palette with rendering off
Browse files Browse the repository at this point in the history
When the user closed help before all of the text had drawn, the
PLUGE loader code was running out of vblank time before it could
restore the palette.  Instead, ensure rendering is off first.
  • Loading branch information
pinobatch committed Jun 2, 2020
1 parent 24a5290 commit c70b2dc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nes/src/stills.s
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,12 @@ is_shark = test_state+2

restart:
; Load initial palette
lda #$3F
sta PPUADDR
lda #$00
sta PPUMASK
ldx #$3F
stx PPUADDR
ldx #$05
stx PPUADDR
lda #$00
sta PPUDATA
lda #$10
sta PPUDATA
Expand All @@ -538,7 +539,7 @@ restart:
ldx #$02
ldy #$00
lda #10
jsr unpb53_file
jsr unpb53_file ; shark pictogram tiles

; Draw PLUGE map on nametable 0
lda #RF_pluge
Expand Down

0 comments on commit c70b2dc

Please sign in to comment.