mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-14 08:55:06 +01:00
Add support for GB MBC5 8 MiB cartridges
This commit is contained in:
parent
8713b49706
commit
ff758768df
@ -40,7 +40,7 @@
|
|||||||
And a special Thank You to all coders and contributors on Github and the Arduino forum:
|
And a special Thank You to all coders and contributors on Github and the Arduino forum:
|
||||||
jiyunomegami, splash5, Kreeblah, ramapcsx2, PsyK0p4T, Dakkaron, majorpbx, Pickle, sdhizumi,
|
jiyunomegami, splash5, Kreeblah, ramapcsx2, PsyK0p4T, Dakkaron, majorpbx, Pickle, sdhizumi,
|
||||||
Uzlopak, sakman55, Tombo89, scrap-a, borti4938, vogelfreiheit, CaitSith2, Modman,
|
Uzlopak, sakman55, Tombo89, scrap-a, borti4938, vogelfreiheit, CaitSith2, Modman,
|
||||||
philenotfound, karimhadjsalem, nsx0r, ducky92, niklasweber, lesserkuma
|
philenotfound, karimhadjsalem, nsx0r, ducky92, niklasweber, Lesserkuma
|
||||||
|
|
||||||
And to nocash for figuring out the secrets of the SFC Nintendo Power cartridge.
|
And to nocash for figuring out the secrets of the SFC Nintendo Power cartridge.
|
||||||
|
|
||||||
|
@ -463,6 +463,10 @@ void showCartInfo_GB() {
|
|||||||
case 7:
|
case 7:
|
||||||
print_Msg(F("4MB"));
|
print_Msg(F("4MB"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
print_Msg(F("8MB"));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
@ -751,6 +755,9 @@ void getCartInfo_GB() {
|
|||||||
case 0x07:
|
case 0x07:
|
||||||
romBanks = 256;
|
romBanks = 256;
|
||||||
break;
|
break;
|
||||||
|
case 0x08:
|
||||||
|
romBanks = 512;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
romBanks = 2;
|
romBanks = 2;
|
||||||
}
|
}
|
||||||
@ -919,7 +926,10 @@ void readROM_GB() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
writeByte_GB(0x2100, currBank);
|
if ((romType >= 0x19 && romType <= 0x1E) && (currBank == 0 || currBank == 256)) {
|
||||||
|
writeByte_GB(0x3000, (currBank >> 8) & 0xFF);
|
||||||
|
}
|
||||||
|
writeByte_GB(0x2100, currBank & 0xFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Set ROM bank for MBC1
|
// Set ROM bank for MBC1
|
||||||
|
Loading…
Reference in New Issue
Block a user