Skip to content

Commit d1dd528

Browse files
committed
Exclude nrom from bank switching routine
1 parent c73f9d0 commit d1dd528

File tree

8 files changed

+15
-3
lines changed

8 files changed

+15
-3
lines changed

src/gamemode/gametypemenu/menu.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ gameMode_gameTypeMenu:
2222
sta tmp3
2323
jsr copyRleNametableToPpuOffset
2424
.addr game_type_menu_nametable_extra
25+
.if INES_MAPPER <> 0
2526
lda #CHRBankSet0
2627
jsr changeCHRBanks
28+
.endif
2729
lda #NMIEnable
2830
sta currentPpuCtrl
2931
jsr waitForVBlankAndEnableNmi

src/gamemode/levelmenu.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ gameMode_levelMenu:
77
sta renderMode
88
jsr updateAudioWaitForNmiAndDisablePpuRendering
99
jsr disableNmi
10+
.if INES_MAPPER <> 0
1011
lda #CHRBankSet0
1112
jsr changeCHRBanks
13+
.endif
1214
jsr bulkCopyToPpu
1315
.addr menu_palette
1416
jsr copyRleNametableToPpu

src/gamemode/speedtest.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ gameMode_speedTest:
2323
sta PPUDATA
2424
lda #NMIEnable|BGPattern1|SpritePattern1
2525
sta currentPpuCtrl
26+
.if INES_MAPPER <> 0
2627
lda #CHRBankSet0
2728
jsr changeCHRBanks
29+
.endif
2830

2931
jsr waitForVBlankAndEnableNmi
3032
jsr updateAudioWaitForNmiAndResetOamStaging

src/gamemode/waitscreen.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ waitScreenLoad:
1313
; and will instead use the title/menu chrset letters. This won't be noticeable
1414
; unless a graphic is added
1515
lda #CHRBankSet1
16-
.endif
1716
jsr changeCHRBanks
17+
.endif
1818
jsr bulkCopyToPpu
1919
.addr wait_palette
2020
jsr copyRleNametableToPpu

src/gamemodestate/initbackground.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
gameModeState_initGameBackground:
22
jsr updateAudioWaitForNmiAndDisablePpuRendering
33
jsr disableNmi
4+
.if INES_MAPPER <> 0
45
lda #CHRBankSet0
56
jsr changeCHRBanks
7+
.endif
68
jsr bulkCopyToPpu
79
.addr game_palette
810
jsr copyRleNametableToPpu

src/highscores/entry_screen.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ highScoreEntryScreen:
115115
sta renderMode
116116
jsr updateAudioWaitForNmiAndDisablePpuRendering
117117
jsr disableNmi
118+
.if INES_MAPPER <> 0
118119
lda #CHRBankSet0
119120
jsr changeCHRBanks
121+
.endif
120122
lda #NMIEnable
121123
sta PPUCTRL
122124
sta currentPpuCtrl

src/playstate/gameover_rocket.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ endingAnimation: ; rocket_screen
7979
.if INES_MAPPER <> 0
8080
; NROM will use a smaller ufo in the game tileset
8181
lda #CHRBankSet1
82-
.endif
8382
jsr changeCHRBanks
83+
.endif
8484
lda #NMIEnable
8585
sta currentPpuCtrl
8686
jsr copyRleNametableToPpu
@@ -237,7 +237,7 @@ handleRocket:
237237
lda #>spriteCathedralFire0
238238
sta $1
239239
lda frameCounter
240-
.if INES_MAPPER = 0
240+
.if INES_MAPPER = 0
241241
and #8 ; Every 8 frames for ufo
242242
.else
243243
and #1 ; Every other frame for cathedral

src/reset.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ reset: cld
3333
txs
3434
jsr mapperInit
3535
jsr setHorizontalMirroring
36+
.if INES_MAPPER <> 0
3637
lda #CHRBankSet0
3738
jsr changeCHRBanks
39+
.endif
3840
jmp initRam
3941

4042
.macro setMMC1PRG

0 commit comments

Comments
 (0)