mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-23 21:19:16 +01:00
[NES] Fixed mapper 228
[NES] Fixed mapper 228
This commit is contained in:
parent
4c2a42de86
commit
7f40da5595
@ -3593,13 +3593,14 @@ void readPRG(bool readrom) {
|
|||||||
|
|
||||||
case 228:
|
case 228:
|
||||||
banks = int_pow(2, prgsize);
|
banks = int_pow(2, prgsize);
|
||||||
|
write_prg_byte(0x8000, 0);
|
||||||
for (int i = 0; i < banks; i += 2) { // up to 1024k PRG
|
for (int i = 0; i < banks; i += 2) { // up to 1024k PRG
|
||||||
write_prg_byte(0x8000 + ((i & 0x3F) << 6), 0);
|
write_prg_byte(0x8000 + ((i & 0x3F) << 6), 0);
|
||||||
for (word address = 0x0; address < 0x8000; address += 512) {
|
for (word address = 0x0; address < 0x8000; address += 512) {
|
||||||
dumpPRG(base, address);
|
dumpPRG(base, address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (prgsize > 6) { // reading the 3rd 512k PRG chip (Action 52)
|
if (prgsize > 5) { // reading the 3rd 512k PRG chip (Action 52)
|
||||||
for (int i = 0; i < 32; i += 2) {
|
for (int i = 0; i < 32; i += 2) {
|
||||||
write_prg_byte(0x9800 + ((i & 0x1F) << 6), 0);
|
write_prg_byte(0x9800 + ((i & 0x1F) << 6), 0);
|
||||||
for (word address = 0x0; address < 0x8000; address += 512) {
|
for (word address = 0x0; address < 0x8000; address += 512) {
|
||||||
@ -4665,8 +4666,9 @@ void readCHR(bool readrom) {
|
|||||||
|
|
||||||
case 228:
|
case 228:
|
||||||
banks = int_pow(2, chrsize) / 2;
|
banks = int_pow(2, chrsize) / 2;
|
||||||
|
write_prg_byte(0x8000, 0);
|
||||||
for (int i = 0; i < banks; i++) {
|
for (int i = 0; i < banks; i++) {
|
||||||
write_prg_byte((0x8000 + (i & 0x3C)) >> 2, (i & 0x03));
|
write_prg_byte(0x8000 + ((i & 0x3C) >> 2), i & 0x03);
|
||||||
for (word address = 0x0; address < 0x2000; address += 512) {
|
for (word address = 0x0; address < 0x2000; address += 512) {
|
||||||
dumpCHR(address);
|
dumpCHR(address);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user