File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,24 @@ reset: cld
37
37
jsr changeCHRBanks
38
38
jmp initRam
39
39
40
+ .macro setMMC1PRG
41
+ RESET_MMC1
42
+ lda #$00
43
+ sta MMC1_PRG
44
+ lsr a
45
+ sta MMC1_PRG
46
+ lsr a
47
+ sta MMC1_PRG
48
+ lsr a
49
+ sta MMC1_PRG
50
+ lsr a
51
+ sta MMC1_PRG
52
+ .endmacro
53
+
40
54
mapperInit:
41
55
; autodetect
42
56
.if INES_MAPPER = 0
57
+ setMMC1PRG ; initialize mmc1 just in case
43
58
jsr testVerticalMirroring
44
59
bne not_mmc1 ; cnrom should bail here
45
60
jsr testHorizontalMirroring ; Test again in case of cnrom miswire
@@ -49,17 +64,7 @@ not_mmc1:
49
64
50
65
; MMC1
51
66
.elseif INES_MAPPER = 1
52
- 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
67
+ setMMC1PRG
63
68
64
69
; CNROM (no init)
65
70
.elseif INES_MAPPER = 3
You can’t perform that action at this time.
0 commit comments