V28I: Added an alternative ID for the Fujitsu MSP GBA Repros

Fujitsu MSP55LV128 and Fujitsu MSP55LV128N are the same flashrom but they have different ID's ...
This commit is contained in:
sanni 2017-10-07 12:19:34 +02:00 committed by GitHub
parent cc6caba9eb
commit 4bb76e01e2
3 changed files with 21 additions and 10 deletions

View File

@ -2,8 +2,8 @@
Cartridge Reader for Arduino Mega2560 Cartridge Reader for Arduino Mega2560
Author: sanni Author: sanni
Date: 2017-10-01 Date: 2017-10-07
Version: V28H Version: V28I
SD lib: https://github.com/greiman/SdFat SD lib: https://github.com/greiman/SdFat
LCD lib: https://github.com/adafruit/Adafruit_SSD1306 LCD lib: https://github.com/adafruit/Adafruit_SSD1306
@ -34,7 +34,7 @@
YamaArashi - GBA flashrom bank switch command YamaArashi - GBA flashrom bank switch command
**********************************************************************************/ **********************************************************************************/
char ver[5] = "V28H"; char ver[5] = "V28I";
/****************************************** /******************************************
Define Output Define Output

View File

@ -737,6 +737,13 @@ void writeFlash_GB() {
println_Msg(F("/128")); println_Msg(F("/128"));
display_Update(); display_Update();
} }
else if (strcmp(flashid, "01D5") == 0) {
println_Msg(F("AM29F080B"));
print_Msg(F("Banks: "));
print_Msg(romBanks);
println_Msg(F("/64"));
display_Update();
}
else { else {
print_Msg(F("Flash ID: ")); print_Msg(F("Flash ID: "));
println_Msg(flashid); println_Msg(flashid);

View File

@ -2050,7 +2050,7 @@ void idFlashrom_GBA() {
// MX29GL128E or MSP55LV128 // MX29GL128E or MSP55LV128
if (strcmp(flashid, "227E") == 0) { if (strcmp(flashid, "227E") == 0) {
// MX is 0xC2 and MSP is 0x4 // MX is 0xC2 and MSP is 0x4 or 0x1
romType = (readWord_GAB(0x0) & 0xFF); romType = (readWord_GAB(0x0) & 0xFF);
cartSize = 0x1000000; cartSize = 0x1000000;
resetMX29GL128E_GBA(); resetMX29GL128E_GBA();
@ -2472,14 +2472,14 @@ void flashRepro_GBA() {
print_Msg(F(" Size: ")); print_Msg(F(" Size: "));
print_Msg(cartSize / 0x100000); print_Msg(cartSize / 0x100000);
println_Msg(F("MB")); println_Msg(F("MB"));
// MX29GL128E or MSP55LV128 // MX29GL128E or MSP55LV128(N)
if (strcmp(flashid, "227E") == 0) { if (strcmp(flashid, "227E") == 0) {
// MX is 0xC2 and MSP is 0x4 // MX is 0xC2 and MSP55LV128 is 0x4 and MSP55LV128N 0x1
if (romType == 0xC2) { if (romType == 0xC2) {
println_Msg(F("Macronix MX29GL128E")); println_Msg(F("Macronix MX29GL128E"));
} }
else if (romType == 0x4) { else if ((romType == 0x1) || (romType == 0x4)) {
println_Msg(F("Fujitsu MSP55LV128")); println_Msg(F("Fujitsu MSP55LV128N"));
} }
else { else {
println_Msg(romType); println_Msg(romType);
@ -2543,9 +2543,11 @@ void flashRepro_GBA() {
println_Msg(F("Erasing...")); println_Msg(F("Erasing..."));
display_Update(); display_Update();
if (romType == 0xC2) { if (romType == 0xC2) {
//MX29GL128E
sectorEraseMX29GL128E_GBA(); sectorEraseMX29GL128E_GBA();
} }
else if (romType == 0x4) { else if ((romType == 0x1) || (romType == 0x4)) {
//MSP55LV128(N)
sectorEraseMSP55LV128_GBA(); sectorEraseMSP55LV128_GBA();
} }
//} //}
@ -2566,9 +2568,11 @@ void flashRepro_GBA() {
} }
else if (strcmp(flashid, "227E") == 0) { else if (strcmp(flashid, "227E") == 0) {
if (romType == 0xC2) { if (romType == 0xC2) {
//MX29GL128E
writeMX29GL128E_GBA(); writeMX29GL128E_GBA();
} }
else if (romType == 0x4) { else if ((romType == 0x1) || (romType == 0x4)) {
//MSP55LV128(N)
writeMSP55LV128_GBA(); writeMSP55LV128_GBA();
} }
} }