MMC6 Mapper #602
Replies: 2 comments 4 replies
-
The MMC6 mapper is very similar to MMC3 apart from its 1K of PRG RAM and a couple different registers, so most of the existing code for MMC3 should work. There is code for detecting whether a cart is MMC6 (checking 0x3E00A for "STAR" in ASCII, present on both Startropics and Zoda's Revenge) and code for dealing with those different registers in order to read/write the 1K of PRG RAM when MMC6 is detected. By all means, it should work. However, I'm unsure whether it's been tested. From Detecting MMC6: // MMC6 Detection
// Mapper 4 includes both MMC3 AND MMC6
// RAM is mapped differently between MMC3 and MMC6
void checkMMC6() { // Detect MMC6 Carts - read PRG 0x3E00A ("STARTROPICS")
write_prg_byte(0x8000, 6); // PRG Bank 0 ($8000-$9FFF)
write_prg_byte(0x8001, 0x1F); // 0x3E000
prgchk0 = read_prg_byte(0x800A);
prgchk1 = read_prg_byte(0x800B);
prgchk2 = read_prg_byte(0x800C);
prgchk3 = read_prg_byte(0x800D);
if ((prgchk0 == 0x53) && (prgchk1 == 0x54) && (prgchk2 == 0x41) && (prgchk3 == 0x52))
mmc6 = true; // MMC6 Cart
} Reading RAM: if (mmc6) { // MMC6 1K
write_prg_byte(0x8000, 0x20); // PRG RAM ENABLE
write_prg_byte(0xA001, 0x20); // PRG RAM PROTECT - Enable reading RAM at $7000-$71FF
for (word address = 0x1000; address < 0x1200; address += 512) { // 512B
dumpMMC5RAM(base, address);
}
write_prg_byte(0x8000, 0x20); // PRG RAM ENABLE
write_prg_byte(0xA001, 0x80); // PRG RAM PROTECT - Enable reading RAM at $7200-$73FF
for (word address = 0x1200; address < 0x1400; address += 512) { // 512B
dumpMMC5RAM(base, address);
}
write_prg_byte(0x8000, 6); // PRG RAM DISABLE
} Writing RAM: if (mmc6) { // MMC6 1K
write_prg_byte(0x8000, 0x20); // PRG RAM ENABLE
write_prg_byte(0xA001, 0x30); // PRG RAM PROTECT - Enable reading/writing to RAM at $7000-$71FF
for (word address = 0x1000; address < 0x1200; address += 512) { // 512B
myFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++) {
write_wram_byte(base + address + x, sdBuffer[x]);
}
}
write_prg_byte(0x8000, 0x20); // PRG RAM ENABLE
write_prg_byte(0xA001, 0xC0); // PRG RAM PROTECT - Enable reading/writing to RAM at $7200-$73FF
for (word address = 0x1200; address < 0x1400; address += 512) { // 512B
myFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++) {
write_wram_byte(base + address + x, sdBuffer[x]);
}
}
write_prg_byte(0x8000, 0x6); // PRG RAM DISABLE
} Sidenote: Is there any particular reason for setting |
Beta Was this translation helpful? Give feedback.
-
Working under the assumption that the savethehero adaptor maps to the same pins that the 6slot uses, I can verify both startropics, and startropics2 dump correctly. There was a quirk on 9.5 where it did not see sram, But if I set the mapper information and sram manually, the saves dumped correctly as well. this may have been fixed already in 10.2, I have not tested it. |
Beta Was this translation helpful? Give feedback.
-
I am simply here to ask if anyone tested the compatibility of whether or not the Save The Hero device's NES Adapter is compatible with MMC6.
As MMC6 was made exclusively for Startropics and Zoda's Revenge.
Beta Was this translation helpful? Give feedback.
All reactions