aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsanni <[email protected]>2023-01-31 09:45:16 +0100
committerGitHub <[email protected]>2023-01-31 09:45:16 +0100
commit8bdef4f85b694d99a25c363008318ad72b701161 (patch)
tree69d651291635f0122ae773e71c4344727a2115db
parentb453bf85a88c3345f3b2904e474fa6ef31b8c235 (diff)
parenta2c94b72150978f55d45c7d5b278969d5a53c67b (diff)
downloadcartreader-8bdef4f85b694d99a25c363008318ad72b701161.tar.gz
cartreader-8bdef4f85b694d99a25c363008318ad72b701161.zip
Merge pull request #694 from PsyK0p4T/master
Add support for Beggar Prince rev.1
-rw-r--r--Cart_Reader/MD.ino10
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
+//******************************************