diff options
author | PsyK0p4T <[email protected]> | 2023-01-31 00:57:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-01-31 00:57:19 +0100 |
commit | a2c94b72150978f55d45c7d5b278969d5a53c67b (patch) | |
tree | 69d651291635f0122ae773e71c4344727a2115db | |
parent | b453bf85a88c3345f3b2904e474fa6ef31b8c235 (diff) | |
download | cartreader-a2c94b72150978f55d45c7d5b278969d5a53c67b.tar.gz cartreader-a2c94b72150978f55d45c7d5b278969d5a53c67b.zip |
Add support for Beggar Prince rev.1
Fixes cart size, rom header provides wrong values
-rw-r--r-- | Cart_Reader/MD.ino | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Cart_Reader/MD.ino b/Cart_Reader/MD.ino index aa534af..ae89b73 100644 --- a/Cart_Reader/MD.ino +++ b/Cart_Reader/MD.ino @@ -732,6 +732,11 @@ void getCartInfo_MD() { }
}
+ // Beggar Prince rev.1 Check
+ if ((cartSize == 0x4ED02021) && (chksum == 0x3E08)) {
+ cartSize = 0x400000;
+ }
+
// Sonic & Knuckles Check
SnKmode = 0;
if (chksum == 0xDFB3) {
@@ -853,8 +858,7 @@ void getCartInfo_MD() { // 4 = 128KB (2045 Blocks) Sega CD Backup RAM Cart
// 6 = 512KB (8189 Blocks) Ultra CD Backup RAM Cart (Aftermarket)
word bramCheck = readWord_MD(0x00);
- if ((((bramCheck & 0xFF) == 0x04) && ((chksum & 0xFF) == 0x04))
- || (((bramCheck & 0xFF) == 0x06) && ((chksum & 0xFF) == 0x06))) {
+ if ((((bramCheck & 0xFF) == 0x04) && ((chksum & 0xFF) == 0x04)) || (((bramCheck & 0xFF) == 0x06) && ((chksum & 0xFF) == 0x06))) {
unsigned long p = 1 << (bramCheck & 0xFF);
bramSize = p * 0x2000L;
}
@@ -2674,4 +2678,4 @@ void readRealtec_MD() { //******************************************
// End of File
-//******************************************
\ No newline at end of file +//******************************************
|