Skip to content

Commit 784adb3

Browse files
committed
Set mirroring once
1 parent b7f5d94 commit 784adb3

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

src/gamemode/gametypemenu/menu.asm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ gameMode_gameTypeMenu:
1010
sta menuScrollY
1111
lda #0
1212
sta displayNextPiece
13-
jsr setHorizontalMirroring
1413
lda #$1
1514
sta renderMode
1615
jsr updateAudioWaitForNmiAndDisablePpuRendering
@@ -50,7 +49,6 @@ gameTypeLoopCheckStart:
5049
lda practiseType
5150
cmp #MODE_KILLX2
5251
bne @checkSpeedTest
53-
jsr setVerticalMirroring
5452
lda #29
5553
sta startLevel
5654
sta levelNumber

src/gamemode/levelmenu.asm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
gameMode_levelMenu:
2-
jsr setVerticalMirroring
32
lda currentPpuCtrl
43
and #NMIEnable
54
sta currentPpuCtrl

src/gamemodestate/initbackground.asm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ gameModeState_initGameBackground:
4141
lda #NMIEnable
4242
sta PPUCTRL
4343
sta currentPpuCtrl
44-
jsr setVerticalMirroring
4544
jsr resetScroll
4645
jsr waitForVBlankAndEnableNmi
4746
jsr updateAudioWaitForNmiAndResetOamStaging

src/highscores/entry_screen.asm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ copyHighscore:
109109
rts
110110

111111
highScoreEntryScreen:
112-
jsr setVerticalMirroring
113112
lda #$09
114113
jsr setMusicTrack
115114
lda #$02

src/reset.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ reset: cld
3232
dex ; $FF for stack pointer
3333
txs
3434
jsr mapperInit
35-
jsr setVerticalMirroring
35+
jsr setHorizontalMirroring
3636
lda #CHRBankSet0
3737
jsr changeCHRBanks
3838
jmp initRam
3939

4040
mapperInit:
4141
; autodetect
4242
.if INES_MAPPER = 0
43-
jsr testHorizontalMirroring
44-
bne not_mmc1
4543
jsr testVerticalMirroring
44+
bne not_mmc1 ; cnrom should bail here
45+
jsr testHorizontalMirroring ; Test again in case of cnrom miswire
4646
bne not_mmc1
4747
inc mapperId ; 1 for MMC1, otherwise 0 for CNROM
4848
not_mmc1:

src/util/mapper.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ setHorizontalMirroring:
138138
rts
139139

140140
setVerticalMirroring:
141+
; Unused except during mapper detect for INES_MAPPER 0
142+
141143
; autodetect
142144
.if INES_MAPPER = 0
143145
lda mapperId

0 commit comments

Comments
 (0)