diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-19 17:28:36 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-19 17:28:36 +0100 |
| commit | 4c8ed456d990ee99884e9dcd245f665ccb894b50 (patch) | |
| tree | 7305788a45bffa1ed291c2f65af2dea1f7b8db29 /src/assets.s | |
| parent | d38a958f446aac1a6faa79277c140ab8a0ff03f4 (diff) | |
| download | jetpac.nes-4c8ed456d990ee99884e9dcd245f665ccb894b50.tar.gz jetpac.nes-4c8ed456d990ee99884e9dcd245f665ccb894b50.zip | |
Disable the PPU between the title to main screens
During other transitions like game over and such it might also be needed
to have something similar, but for now this should cut it.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'src/assets.s')
| -rw-r--r-- | src/assets.s | 56 |
1 files changed, 50 insertions, 6 deletions
diff --git a/src/assets.s b/src/assets.s index 8e839d3..ffc6585 100644 --- a/src/assets.s +++ b/src/assets.s @@ -74,7 +74,30 @@ dex bne @upper_title_bar_loop - ;; TODO: store back palettes after game over. + ;; Update 2nd palette for background. This is redundant upon entering + ;; the game, but it makes sense after a game over. + lda #$3F + sta PPU::ADDRESS + lda #$09 + sta PPU::ADDRESS + lda #$28 + sta PPU::DATA + lda #$2C + sta PPU::DATA + lda #$16 + sta PPU::DATA + + ;; Update 1st palette for foreground. + lda #$3F + sta PPU::ADDRESS + lda #$11 + sta PPU::ADDRESS + lda #$30 + sta PPU::DATA + lda #$10 + sta PPU::DATA + lda #$30 + sta PPU::DATA rts .endproc @@ -82,11 +105,32 @@ ;; Performs all the needed tricks in order to get the second nametable as ;; expected. .proc prepare_for_main_screen - ;; TODO: second palette for background should be: - ;; .byte $0F, $14, $2C, $28 - ;; - ;; TODO: first palette for the foreground should be: - ;; .byte $0F, $16, $10, $30 + bit PPU::STATUS + + ;; Update 2nd palette for background. + lda #$3F + sta PPU::ADDRESS + lda #$09 + sta PPU::ADDRESS + lda #$14 + sta PPU::DATA + lda #$2C + sta PPU::DATA + lda #$28 + sta PPU::DATA + + ;; Update 1st palette for foreground. + lda #$3F + sta PPU::ADDRESS + lda #$11 + sta PPU::ADDRESS + lda #$16 + sta PPU::DATA + lda #$10 + sta PPU::DATA + lda #$30 + sta PPU::DATA + rts .endproc |
