Skip to content

Commit b7f5d94

Browse files
committed
move mmc1 init code
1 parent ba0f426 commit b7f5d94

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

src/reset.asm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ reset: cld
3131

3232
dex ; $FF for stack pointer
3333
txs
34-
jsr changePRGBank ; 0 in accumulator
3534
jsr mapperInit
3635
jsr setVerticalMirroring
3736
lda #CHRBankSet0
@@ -51,6 +50,16 @@ not_mmc1:
5150
; MMC1
5251
.elseif INES_MAPPER = 1
5352
RESET_MMC1
53+
lda #$00
54+
sta MMC1_PRG
55+
lsr a
56+
sta MMC1_PRG
57+
lsr a
58+
sta MMC1_PRG
59+
lsr a
60+
sta MMC1_PRG
61+
lsr a
62+
sta MMC1_PRG
5463

5564
; CNROM (no init)
5665
.elseif INES_MAPPER = 3

src/util/mapper.asm

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,6 @@ changeCHRBanks:
107107
.endif
108108
rts
109109

110-
changePRGBank:
111-
.if INES_MAPPER = 0 .or INES_MAPPER = 1
112-
RESET_MMC1
113-
sta MMC1_PRG
114-
lsr a
115-
sta MMC1_PRG
116-
lsr a
117-
sta MMC1_PRG
118-
lsr a
119-
sta MMC1_PRG
120-
lsr a
121-
sta MMC1_PRG
122-
.endif
123-
rts
124110

125111
setHorizontalMirroring:
126112
; autodetect

0 commit comments

Comments
 (0)