mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-23 21:19:16 +01:00
UI improvements for GB, GBA, N64, SNES
This commit is contained in:
parent
ff758768df
commit
140401161b
@ -23,7 +23,7 @@ static const char gbxMenuItem5[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsGBx[] PROGMEM = {gbxMenuItem1, gbxMenuItem2, gbxMenuItem3, gbxMenuItem4, gbxMenuItem5};
|
||||
|
||||
// GB menu items
|
||||
static const char GBMenuItem1[] PROGMEM = "Read Rom";
|
||||
static const char GBMenuItem1[] PROGMEM = "Read ROM";
|
||||
static const char GBMenuItem2[] PROGMEM = "Read Save";
|
||||
static const char GBMenuItem3[] PROGMEM = "Write Save";
|
||||
static const char GBMenuItem4[] PROGMEM = "Reset";
|
||||
@ -312,7 +312,7 @@ void gbMenu() {
|
||||
readSRAM_GB();
|
||||
}
|
||||
else {
|
||||
print_Error(F("Cart has no Sram"), false);
|
||||
print_Error(F("No save or unsupported type"), false);
|
||||
}
|
||||
println_Msg(F(""));
|
||||
break;
|
||||
@ -340,7 +340,7 @@ void gbMenu() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
print_Error(F("Cart has no Sram"), false);
|
||||
print_Error(F("No save or unsupported type"), false);
|
||||
}
|
||||
println_Msg(F(""));
|
||||
break;
|
||||
@ -399,11 +399,13 @@ void setup_GB() {
|
||||
void showCartInfo_GB() {
|
||||
display_Clear();
|
||||
if (strcmp(checksumStr, "00") != 0) {
|
||||
println_Msg(F("GB Cart Info"));
|
||||
print_Msg(F("Name: "));
|
||||
print_Msg(F("Title: "));
|
||||
println_Msg(romName);
|
||||
print_Msg(F("Mapper: "));
|
||||
|
||||
print_Msg(F("Revision: "));
|
||||
println_Msg(romVersion);
|
||||
|
||||
print_Msg(F("Mapper: "));
|
||||
if ((romType == 0) || (romType == 8) || (romType == 9))
|
||||
print_Msg(F("none"));
|
||||
else if ((romType == 1) || (romType == 2) || (romType == 3))
|
||||
@ -418,10 +420,14 @@ void showCartInfo_GB() {
|
||||
print_Msg(F("MBC4"));
|
||||
else if ((romType == 25) || (romType == 26) || (romType == 27) || (romType == 28) || (romType == 29) || (romType == 309))
|
||||
print_Msg(F("MBC5"));
|
||||
else if (romType == 32)
|
||||
print_Msg(F("MBC6 (no support)"));
|
||||
else if (romType == 34)
|
||||
print_Msg(F("MBC7"));
|
||||
else if (romType == 252)
|
||||
print_Msg(F("Camera"));
|
||||
else if (romType == 253)
|
||||
print_Msg(F("TAMA5 (no support)"));
|
||||
else if (romType == 254)
|
||||
print_Msg(F("HuC-3"));
|
||||
else if (romType == 255)
|
||||
@ -429,77 +435,96 @@ void showCartInfo_GB() {
|
||||
else if (romType == 0x104)
|
||||
print_Msg(F("M161"));
|
||||
|
||||
println_Msg(F(" "));
|
||||
print_Msg(F("Rom Size: "));
|
||||
println_Msg(F(""));
|
||||
print_Msg(F("ROM Size: "));
|
||||
switch (romSize) {
|
||||
case 0:
|
||||
print_Msg(F("32KB"));
|
||||
print_Msg(F("32 KB"));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
print_Msg(F("64KB"));
|
||||
print_Msg(F("64 KB"));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
print_Msg(F("128KB"));
|
||||
print_Msg(F("128 KB"));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
print_Msg(F("256KB"));
|
||||
print_Msg(F("256 KB"));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
print_Msg(F("512KB"));
|
||||
print_Msg(F("512 KB"));
|
||||
break;
|
||||
|
||||
case 5:
|
||||
print_Msg(F("1MB"));
|
||||
print_Msg(F("1 MB"));
|
||||
break;
|
||||
|
||||
case 6:
|
||||
print_Msg(F("2MB"));
|
||||
print_Msg(F("2 MB"));
|
||||
break;
|
||||
|
||||
case 7:
|
||||
print_Msg(F("4MB"));
|
||||
print_Msg(F("4 MB"));
|
||||
break;
|
||||
|
||||
case 8:
|
||||
print_Msg(F("8MB"));
|
||||
print_Msg(F("8 MB"));
|
||||
break;
|
||||
}
|
||||
|
||||
println_Msg(F(""));
|
||||
print_Msg(F("Banks: "));
|
||||
println_Msg(romBanks);
|
||||
//print_Msg(F("Banks: "));
|
||||
//println_Msg(romBanks);
|
||||
|
||||
print_Msg(F("Sram Size: "));
|
||||
print_Msg(F("Save Size: "));
|
||||
switch (sramSize) {
|
||||
case 0:
|
||||
if (romType == 6) {
|
||||
print_Msg(F("512B"));
|
||||
print_Msg(F("512 Byte"));
|
||||
}
|
||||
else if (romType == 0x22) {
|
||||
if (strncmp(romName, "CMASTER_KCEJ", 12) == 0) {
|
||||
print_Msg(F("512 Byte"));
|
||||
}
|
||||
else {
|
||||
print_Msg(F("256 Byte"));
|
||||
}
|
||||
}
|
||||
else if (romType == 0xFD) {
|
||||
print_Msg(F("32 Byte"));
|
||||
}
|
||||
else {
|
||||
print_Msg(F("none"));
|
||||
print_Msg(F("None"));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
print_Msg(F("2KB"));
|
||||
print_Msg(F("2 KB"));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
print_Msg(F("8KB"));
|
||||
print_Msg(F("8 KB"));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
print_Msg(F("32KB"));
|
||||
if (romType == 0x20) {
|
||||
print_Msg(F("1.03 MB"));
|
||||
} else {
|
||||
print_Msg(F("32 KB"));
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
print_Msg(F("128KB"));
|
||||
print_Msg(F("128 KB"));
|
||||
break;
|
||||
|
||||
default: print_Msg(F("none"));
|
||||
case 5:
|
||||
print_Msg(F("64 KB"));
|
||||
break;
|
||||
|
||||
default: print_Msg(F("None"));
|
||||
}
|
||||
println_Msg(F(""));
|
||||
print_Msg(F("Checksum: "));
|
||||
@ -507,6 +532,7 @@ void showCartInfo_GB() {
|
||||
display_Update();
|
||||
|
||||
// Wait for user input
|
||||
println_Msg(F(""));
|
||||
println_Msg(F("Press Button..."));
|
||||
display_Update();
|
||||
wait();
|
||||
@ -838,6 +864,9 @@ void getCartInfo_GB() {
|
||||
(strncmp(romName, "RTYPE 2 SET", 11) == 0) && (sdBuffer[0x14D] == 0x32)) {
|
||||
romType = 0x0B;
|
||||
}
|
||||
|
||||
// ROM revision
|
||||
romVersion = sdBuffer[0x14C];
|
||||
}
|
||||
|
||||
/******************************************
|
||||
@ -1002,15 +1031,15 @@ void compare_checksums_GB() {
|
||||
char calcsumStr[5];
|
||||
sprintf(calcsumStr, "%04X", calc_checksum_GB(fileName, folder));
|
||||
|
||||
print_Msg(F("Checksum: "));
|
||||
print_Msg(calcsumStr);
|
||||
if (strcmp(calcsumStr, checksumStr) == 0) {
|
||||
print_Msg(F("Internal: "));
|
||||
print_Msg(calcsumStr);
|
||||
println_Msg(F(" -> OK"));
|
||||
}
|
||||
else {
|
||||
print_Msg(F("Internal: "));
|
||||
println_Msg(calcsumStr);
|
||||
print_Error(F("Checksum Error"), false);
|
||||
print_Msg(F(" != "));
|
||||
println_Msg(checksumStr);
|
||||
print_Error(F("Invalid Checksum"), false);
|
||||
}
|
||||
compareCRC("gb.txt", 0, 1, 0);
|
||||
display_Update();
|
||||
|
@ -13,7 +13,7 @@ boolean readType;
|
||||
Menu
|
||||
*****************************************/
|
||||
// GBA menu items
|
||||
static const char GBAMenuItem1[] PROGMEM = "Read Rom";
|
||||
static const char GBAMenuItem1[] PROGMEM = "Read ROM";
|
||||
static const char GBAMenuItem2[] PROGMEM = "Read Save";
|
||||
static const char GBAMenuItem3[] PROGMEM = "Write Save";
|
||||
static const char GBAMenuItem4[] PROGMEM = "Force Savetype";
|
||||
@ -22,12 +22,12 @@ static const char GBAMenuItem6[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsGBA[] PROGMEM = {GBAMenuItem1, GBAMenuItem2, GBAMenuItem3, GBAMenuItem4, GBAMenuItem5, GBAMenuItem6};
|
||||
|
||||
// Rom menu
|
||||
static const char GBARomItem1[] PROGMEM = "1MB";
|
||||
static const char GBARomItem2[] PROGMEM = "2MB";
|
||||
static const char GBARomItem3[] PROGMEM = "4MB";
|
||||
static const char GBARomItem4[] PROGMEM = "8MB";
|
||||
static const char GBARomItem5[] PROGMEM = "16MB";
|
||||
static const char GBARomItem6[] PROGMEM = "32MB";
|
||||
static const char GBARomItem1[] PROGMEM = "1 MB";
|
||||
static const char GBARomItem2[] PROGMEM = "2 MB";
|
||||
static const char GBARomItem3[] PROGMEM = "4 MB";
|
||||
static const char GBARomItem4[] PROGMEM = "8 MB";
|
||||
static const char GBARomItem5[] PROGMEM = "16 MB";
|
||||
static const char GBARomItem6[] PROGMEM = "32 MB";
|
||||
static const char* const romOptionsGBA[] PROGMEM = {GBARomItem1, GBARomItem2, GBARomItem3, GBARomItem4, GBARomItem5, GBARomItem6};
|
||||
|
||||
// Save menu
|
||||
@ -35,8 +35,8 @@ static const char GBASaveItem1[] PROGMEM = "4K EEPROM";
|
||||
static const char GBASaveItem2[] PROGMEM = "64K EEPROM";
|
||||
static const char GBASaveItem3[] PROGMEM = "256K SRAM/FRAM";
|
||||
static const char GBASaveItem4[] PROGMEM = "512K SRAM/FRAM";
|
||||
static const char GBASaveItem5[] PROGMEM = "512K FLASHROM";
|
||||
static const char GBASaveItem6[] PROGMEM = "1M FLASHROM";
|
||||
static const char GBASaveItem5[] PROGMEM = "512K FLASH";
|
||||
static const char GBASaveItem6[] PROGMEM = "1M FLASH";
|
||||
static const char* const saveOptionsGBA[] PROGMEM = {GBASaveItem1, GBASaveItem2, GBASaveItem3, GBASaveItem4, GBASaveItem5, GBASaveItem6};
|
||||
|
||||
void gbaMenu() {
|
||||
@ -175,7 +175,7 @@ void gbaMenu() {
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// 1024K FLASH
|
||||
// 1M FLASH
|
||||
saveType = 5;
|
||||
break;
|
||||
}
|
||||
@ -217,7 +217,7 @@ void gbaMenu() {
|
||||
case 5:
|
||||
display_Clear();
|
||||
sd.chdir("/");
|
||||
// 1024K FLASH (divided into two banks)
|
||||
// 1M FLASH (divided into two banks)
|
||||
switchBank_GBA(0x0);
|
||||
setROM_GBA();
|
||||
readFLASH_GBA(1, 65536, 0);
|
||||
@ -278,7 +278,7 @@ void gbaMenu() {
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// 1024K FLASH
|
||||
// 1M FLASH
|
||||
saveType = 5;
|
||||
break;
|
||||
}
|
||||
@ -351,10 +351,10 @@ void gbaMenu() {
|
||||
idFlash_GBA();
|
||||
resetFLASH_GBA();
|
||||
|
||||
print_Msg(F("Flashrom ID: "));
|
||||
print_Msg(F("FLASH ID: "));
|
||||
println_Msg(flashid);
|
||||
println_Msg(F(""));
|
||||
println_Msg(F("Flashrom Type: "));
|
||||
println_Msg(F("FLASH Type: "));
|
||||
if (strcmp(flashid, "1F3D") == 0) {
|
||||
println_Msg(F("Atmel AT29LV512"));
|
||||
}
|
||||
@ -508,7 +508,7 @@ void gbaMenu() {
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// 1024K FLASH
|
||||
// 1M FLASH
|
||||
saveType = 5;
|
||||
break;
|
||||
}
|
||||
@ -543,49 +543,49 @@ void setup_GBA() {
|
||||
display_Clear();
|
||||
|
||||
// Print start page
|
||||
print_Msg(F("Name: "));
|
||||
print_Msg(F("Title: "));
|
||||
println_Msg(romName);
|
||||
print_Msg(F("Cart ID: "));
|
||||
print_Msg(F("Code: "));
|
||||
println_Msg(cartID);
|
||||
print_Msg(F("Rom Size: "));
|
||||
print_Msg(F("Revision: "));
|
||||
println_Msg(romVersion);
|
||||
print_Msg(F("ROM Size: "));
|
||||
if (cartSize == 0)
|
||||
println_Msg(F("Unknown"));
|
||||
else {
|
||||
print_Msg(cartSize);
|
||||
println_Msg(F("MB"));
|
||||
println_Msg(F(" MB"));
|
||||
}
|
||||
print_Msg(F("Save: "));
|
||||
print_Msg(F("Save Type: "));
|
||||
switch (saveType)
|
||||
{
|
||||
case 0:
|
||||
println_Msg(F("Unknown"));
|
||||
println_Msg(F("None/Unknown"));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
println_Msg(F("4K Eeprom"));
|
||||
println_Msg(F("4K EEPROM"));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
println_Msg(F("64K Eeprom"));
|
||||
println_Msg(F("64K EEPROM"));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
println_Msg(F("256K Sram"));
|
||||
println_Msg(F("256K SRAM"));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
println_Msg(F("512K Flash"));
|
||||
println_Msg(F("512K FLASH"));
|
||||
break;
|
||||
|
||||
case 5:
|
||||
println_Msg(F("1024K Flash"));
|
||||
println_Msg(F("1M FLASH"));
|
||||
break;
|
||||
}
|
||||
|
||||
print_Msg(F("Checksum: "));
|
||||
print_Msg(F("Header Checksum: "));
|
||||
println_Msg(checksumStr);
|
||||
print_Msg(F("Version: 1."));
|
||||
println_Msg(romVersion);
|
||||
|
||||
// Wait for user input
|
||||
println_Msg("");
|
||||
@ -997,7 +997,7 @@ void readROM_GBA() {
|
||||
|
||||
// Calculate the checksum of the dumped rom
|
||||
boolean compare_checksum_GBA () {
|
||||
print_Msg(F("Internal Checksum..."));
|
||||
print_Msg(F("Checksum: "));
|
||||
display_Update();
|
||||
|
||||
strcpy(fileName, romName);
|
||||
@ -1023,17 +1023,17 @@ boolean compare_checksum_GBA () {
|
||||
|
||||
// Turn into string
|
||||
sprintf(calcChecksumStr, "%02X", calcChecksum);
|
||||
print_Msg(calcChecksumStr);
|
||||
|
||||
if (strcmp(calcChecksumStr, checksumStr) == 0) {
|
||||
println_Msg(F("OK"));
|
||||
println_Msg(F(" -> OK"));
|
||||
display_Update();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
println_Msg("");
|
||||
print_Msg(F("Result: "));
|
||||
println_Msg(calcChecksumStr);
|
||||
print_Error(F("Checksum Error"), false);
|
||||
print_Msg(F(" != "));
|
||||
println_Msg(checksumStr);
|
||||
print_Error(F("Invalid Checksum"), false);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -1799,7 +1799,7 @@ void writeEeprom_GBA(word eepSize) {
|
||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||
display_Clear();
|
||||
|
||||
print_Msg(F("Writing eeprom..."));
|
||||
print_Msg(F("Writing EEPROM..."));
|
||||
display_Update();
|
||||
|
||||
//open file on sd card
|
||||
|
@ -70,7 +70,7 @@ static const char N64ContMenuItem4[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsN64Controller[] PROGMEM = {N64ContMenuItem1, N64ContMenuItem2, N64ContMenuItem3, N64ContMenuItem4};
|
||||
|
||||
// N64 cart menu items
|
||||
static const char N64CartMenuItem1[] PROGMEM = "Read Rom";
|
||||
static const char N64CartMenuItem1[] PROGMEM = "Read ROM";
|
||||
static const char N64CartMenuItem2[] PROGMEM = "Read Save";
|
||||
static const char N64CartMenuItem3[] PROGMEM = "Write Save";
|
||||
static const char N64CartMenuItem4[] PROGMEM = "Force Savetype";
|
||||
@ -85,12 +85,12 @@ static const char N64CRCMenuItem4[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsN64CRC[] PROGMEM = {N64CRCMenuItem1, N64CRCMenuItem2, N64CRCMenuItem3, N64CRCMenuItem4};
|
||||
|
||||
// Rom menu
|
||||
static const char N64RomItem1[] PROGMEM = "4MB";
|
||||
static const char N64RomItem2[] PROGMEM = "8MB";
|
||||
static const char N64RomItem3[] PROGMEM = "12MB";
|
||||
static const char N64RomItem4[] PROGMEM = "16MB";
|
||||
static const char N64RomItem5[] PROGMEM = "32MB";
|
||||
static const char N64RomItem6[] PROGMEM = "64MB";
|
||||
static const char N64RomItem1[] PROGMEM = "4 MB";
|
||||
static const char N64RomItem2[] PROGMEM = "8 MB";
|
||||
static const char N64RomItem3[] PROGMEM = "12 MB";
|
||||
static const char N64RomItem4[] PROGMEM = "16 MB";
|
||||
static const char N64RomItem5[] PROGMEM = "32 MB";
|
||||
static const char N64RomItem6[] PROGMEM = "64 MB";
|
||||
static const char* const romOptionsN64[] PROGMEM = {N64RomItem1, N64RomItem2, N64RomItem3, N64RomItem4, N64RomItem5, N64RomItem6};
|
||||
|
||||
// Save menu
|
||||
@ -98,21 +98,21 @@ static const char N64SaveItem1[] PROGMEM = "None";
|
||||
static const char N64SaveItem2[] PROGMEM = "4K EEPROM";
|
||||
static const char N64SaveItem3[] PROGMEM = "16K EEPROM";
|
||||
static const char N64SaveItem4[] PROGMEM = "SRAM";
|
||||
static const char N64SaveItem5[] PROGMEM = "FLASHRAM";
|
||||
static const char N64SaveItem5[] PROGMEM = "FLASH";
|
||||
static const char* const saveOptionsN64[] PROGMEM = {N64SaveItem1, N64SaveItem2, N64SaveItem3, N64SaveItem4, N64SaveItem5};
|
||||
|
||||
// Repro write buffer menu
|
||||
static const char N64BufferItem1[] PROGMEM = "no buffer";
|
||||
static const char N64BufferItem1[] PROGMEM = "No buffer";
|
||||
static const char N64BufferItem2[] PROGMEM = "32 Byte";
|
||||
static const char N64BufferItem3[] PROGMEM = "64 Byte";
|
||||
static const char N64BufferItem4[] PROGMEM = "128 Byte";
|
||||
static const char* const bufferOptionsN64[] PROGMEM = {N64BufferItem1, N64BufferItem2, N64BufferItem3, N64BufferItem4};
|
||||
|
||||
// Repro sector size menu
|
||||
static const char N64SectorItem1[] PROGMEM = "8 KByte";
|
||||
static const char N64SectorItem2[] PROGMEM = "32 KByte";
|
||||
static const char N64SectorItem3[] PROGMEM = "64 KByte";
|
||||
static const char N64SectorItem4[] PROGMEM = "128 KByte";
|
||||
static const char N64SectorItem1[] PROGMEM = "8 KB";
|
||||
static const char N64SectorItem2[] PROGMEM = "32 KB";
|
||||
static const char N64SectorItem3[] PROGMEM = "64 KB";
|
||||
static const char N64SectorItem4[] PROGMEM = "128 KB";
|
||||
static const char* const sectorOptionsN64[] PROGMEM = {N64SectorItem1, N64SectorItem2, N64SectorItem3, N64SectorItem4};
|
||||
|
||||
// N64 start menu
|
||||
@ -252,18 +252,18 @@ void n64CartMenu() {
|
||||
display_Clear();
|
||||
|
||||
if (saveType == 1) {
|
||||
println_Msg(F("Reading Sram..."));
|
||||
println_Msg(F("Reading SRAM..."));
|
||||
display_Update();
|
||||
readSram(32768, 1);
|
||||
}
|
||||
else if (saveType == 4) {
|
||||
getFramType();
|
||||
println_Msg(F("Reading Flashram..."));
|
||||
println_Msg(F("Reading FLASH..."));
|
||||
display_Update();
|
||||
readFram(flashramType);
|
||||
}
|
||||
else if ((saveType == 5) || (saveType == 6)) {
|
||||
println_Msg(F("Reading Eep..."));
|
||||
println_Msg(F("Reading EEPROM..."));
|
||||
display_Update();
|
||||
#ifdef clockgen_installed
|
||||
readEeprom();
|
||||
@ -291,7 +291,7 @@ void n64CartMenu() {
|
||||
writeSram(32768);
|
||||
writeErrors = verifySram(32768, 1);
|
||||
if (writeErrors == 0) {
|
||||
println_Msg(F("Sram verified OK"));
|
||||
println_Msg(F("SRAM verified OK"));
|
||||
display_Update();
|
||||
}
|
||||
else {
|
||||
@ -336,7 +336,7 @@ void n64CartMenu() {
|
||||
#endif
|
||||
|
||||
if (writeErrors == 0) {
|
||||
println_Msg(F("Eeprom verified OK"));
|
||||
println_Msg(F("EEPROM verified OK"));
|
||||
display_Update();
|
||||
}
|
||||
else {
|
||||
@ -348,7 +348,7 @@ void n64CartMenu() {
|
||||
}
|
||||
else {
|
||||
display_Clear();
|
||||
print_Error(F("Savetype Error"), false);
|
||||
print_Error(F("Save Type Error"), false);
|
||||
}
|
||||
println_Msg(F("Press Button..."));
|
||||
display_Update();
|
||||
@ -2445,37 +2445,38 @@ void printCartInfo_N64() {
|
||||
// Print start page
|
||||
if (cartSize != 0) {
|
||||
display_Clear();
|
||||
println_Msg(F("N64 Cartridge Info"));
|
||||
println_Msg(F(""));
|
||||
print_Msg(F("Name: "));
|
||||
print_Msg(F("Title: "));
|
||||
println_Msg(romName);
|
||||
print_Msg(F("ID: "));
|
||||
print_Msg(cartID);
|
||||
print_Msg(F(" Size: "));
|
||||
print_Msg(F("Code: "));
|
||||
println_Msg(cartID);
|
||||
print_Msg(F("Revision: "));
|
||||
println_Msg(romVersion);
|
||||
print_Msg(F("ROM Size: "));
|
||||
print_Msg(cartSize);
|
||||
println_Msg(F("MB"));
|
||||
print_Msg(F("Save: "));
|
||||
println_Msg(F(" MB"));
|
||||
print_Msg(F("Save Type: "));
|
||||
switch (saveType) {
|
||||
case 1:
|
||||
println_Msg(F("Sram"));
|
||||
println_Msg(F("SRAM"));
|
||||
break;
|
||||
case 4:
|
||||
println_Msg(F("Flashram"));
|
||||
println_Msg(F("FLASH"));
|
||||
break;
|
||||
case 5:
|
||||
println_Msg(F("4K Eeprom"));
|
||||
println_Msg(F("4K EEPROM"));
|
||||
eepPages = 64;
|
||||
break;
|
||||
case 6:
|
||||
println_Msg(F("16K Eeprom"));
|
||||
println_Msg(F("16K EEPROM"));
|
||||
eepPages = 256;
|
||||
break;
|
||||
default:
|
||||
println_Msg(F("unknown"));
|
||||
println_Msg(F("None/Unknown"));
|
||||
break;
|
||||
}
|
||||
print_Msg(F("Version: 1."));
|
||||
println_Msg(romVersion);
|
||||
|
||||
print_Msg(F("CRC1: "));
|
||||
println_Msg(checksumStr);
|
||||
|
||||
// Wait for user input
|
||||
println_Msg(F(" "));
|
||||
@ -2488,9 +2489,9 @@ void printCartInfo_N64() {
|
||||
display_Clear();
|
||||
println_Msg(F("GAMEPAK ERROR"));
|
||||
println_Msg("");
|
||||
print_Msg(F("Name: "));
|
||||
print_Msg(F("Title: "));
|
||||
println_Msg(romName);
|
||||
print_Msg(F("ID: "));
|
||||
print_Msg(F("Code: "));
|
||||
println_Msg(cartID);
|
||||
print_Msg(F("CRC1: "));
|
||||
println_Msg(checksumStr);
|
||||
@ -3984,24 +3985,24 @@ void savesummary_N64(boolean checkfound, char crcStr[9], unsigned long timeElaps
|
||||
myFile.print(F("Size\t: "));
|
||||
myFile.print(cartSize);
|
||||
|
||||
myFile.println(F("MB"));
|
||||
myFile.println(F(" MB"));
|
||||
myFile.print(F("Save\t: "));
|
||||
|
||||
switch (saveType) {
|
||||
case 1:
|
||||
myFile.println(F("Sram"));
|
||||
myFile.println(F("SRAM"));
|
||||
break;
|
||||
case 4:
|
||||
myFile.println(F("Flashram"));
|
||||
myFile.println(F("FLASH"));
|
||||
break;
|
||||
case 5:
|
||||
myFile.println(F("4K Eeprom"));
|
||||
myFile.println(F("4K EEPROM"));
|
||||
break;
|
||||
case 6:
|
||||
myFile.println(F("16K Eeprom"));
|
||||
myFile.println(F("16K EEPROM"));
|
||||
break;
|
||||
default:
|
||||
myFile.println(F("unknown"));
|
||||
myFile.println(F("None/Unknown"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ static const char* const menuOptionsSNS[] PROGMEM = {snsMenuItem1, snsMenuItem2,
|
||||
#endif
|
||||
|
||||
// SNES menu items
|
||||
static const char SnesMenuItem1[] PROGMEM = "Read Rom";
|
||||
static const char SnesMenuItem1[] PROGMEM = "Read ROM";
|
||||
static const char SnesMenuItem2[] PROGMEM = "Read Save";
|
||||
static const char SnesMenuItem3[] PROGMEM = "Write Save";
|
||||
static const char SnesMenuItem4[] PROGMEM = "Test SRAM";
|
||||
@ -54,17 +54,17 @@ static const char* const menuOptionsSNES[] PROGMEM = {SnesMenuItem1, SnesMenuIte
|
||||
|
||||
// Manual config menu items
|
||||
static const char confMenuItem1[] PROGMEM = "Use header info";
|
||||
static const char confMenuItem2[] PROGMEM = "4MB LoRom 256K Sram";
|
||||
static const char confMenuItem3[] PROGMEM = "4MB HiRom 64K Sram";
|
||||
static const char confMenuItem4[] PROGMEM = "6MB ExRom 256K Sram";
|
||||
static const char confMenuItem2[] PROGMEM = "4MB LoROM 256K SRAM";
|
||||
static const char confMenuItem3[] PROGMEM = "4MB HiROM 64K SRAM";
|
||||
static const char confMenuItem4[] PROGMEM = "6MB ExROM 256K SRAM";
|
||||
static const char confMenuItem5[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsConfManual[] PROGMEM = {confMenuItem1, confMenuItem2, confMenuItem3, confMenuItem4, confMenuItem5};
|
||||
|
||||
// Repro menu items
|
||||
static const char reproMenuItem1[] PROGMEM = "LoRom (P0)";
|
||||
static const char reproMenuItem2[] PROGMEM = "HiRom (P0)";
|
||||
static const char reproMenuItem3[] PROGMEM = "ExLoRom (P1)";
|
||||
static const char reproMenuItem4[] PROGMEM = "ExHiRom (P1)";
|
||||
static const char reproMenuItem1[] PROGMEM = "LoROM (P0)";
|
||||
static const char reproMenuItem2[] PROGMEM = "HiROM (P0)";
|
||||
static const char reproMenuItem3[] PROGMEM = "ExLoROM (P1)";
|
||||
static const char reproMenuItem4[] PROGMEM = "ExHiROM (P1)";
|
||||
static const char reproMenuItem5[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsRepro[] PROGMEM = {reproMenuItem1, reproMenuItem2, reproMenuItem3, reproMenuItem4, reproMenuItem5};
|
||||
|
||||
@ -355,21 +355,21 @@ void confMenuManual() {
|
||||
romType = LO;
|
||||
numBanks = 128;
|
||||
sramSize = 256;
|
||||
strcpy(romName, "LOROM");
|
||||
strcpy(romName, "LoROM");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
romType = HI;
|
||||
numBanks = 64;
|
||||
sramSize = 64;
|
||||
strcpy(romName, "HIROM");
|
||||
strcpy(romName, "HiROM");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
romType = EX;
|
||||
numBanks = 96;
|
||||
sramSize = 256;
|
||||
strcpy(romName, "EXROM");
|
||||
strcpy(romName, "ExROM");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
@ -703,9 +703,12 @@ void getCartInfo_SNES() {
|
||||
}
|
||||
|
||||
display_Clear();
|
||||
print_Msg(F("Name: "));
|
||||
print_Msg(F("Title: "));
|
||||
println_Msg(romName);
|
||||
|
||||
print_Msg(F("Revision: "));
|
||||
println_Msg(romVersion);
|
||||
|
||||
print_Msg(F("Type: "));
|
||||
if (romType == HI)
|
||||
print_Msg(F("HiROM"));
|
||||
@ -772,20 +775,23 @@ void getCartInfo_SNES() {
|
||||
print_Msg(F("Rom Size: "));
|
||||
else
|
||||
print_Msg(F("ROM Size: "));
|
||||
print_Msg(romSize);
|
||||
println_Msg(F("Mbit"));
|
||||
|
||||
print_Msg(F("Banks: "));
|
||||
if ((romSize >> 3) < 1) {
|
||||
print_Msg(1024 * romSize >> 3);
|
||||
print_Msg(F(" KB"));
|
||||
} else {
|
||||
print_Msg(romSize >> 3);
|
||||
print_Msg(F(" MB"));
|
||||
}
|
||||
print_Msg(F(" ("));
|
||||
print_Msg(numBanks);
|
||||
print_Msg(F(" Chips: "));
|
||||
println_Msg(romChips);
|
||||
println_Msg(F(" banks)"));
|
||||
|
||||
//print_Msg(F("Chips: "));
|
||||
//println_Msg(romChips);
|
||||
|
||||
print_Msg(F("Sram Size: "));
|
||||
print_Msg(sramSize);
|
||||
println_Msg(F("Kbit"));
|
||||
|
||||
print_Msg(F("ROM Version: 1."));
|
||||
println_Msg(romVersion);
|
||||
print_Msg(F("Save Size: "));
|
||||
print_Msg(sramSize >> 3);
|
||||
println_Msg(F(" KB"));
|
||||
|
||||
print_Msg(F("Checksum: "));
|
||||
println_Msg(checksumStr);
|
||||
@ -793,8 +799,6 @@ void getCartInfo_SNES() {
|
||||
|
||||
// Wait for user input
|
||||
#if (defined(enable_LCD) || defined(enable_OLED))
|
||||
println_Msg(F(" "));
|
||||
println_Msg(F(" "));
|
||||
println_Msg(F("Press Button..."));
|
||||
display_Update();
|
||||
wait();
|
||||
@ -1236,7 +1240,7 @@ unsigned int calc_checksum (char* fileName, char* folder) {
|
||||
}
|
||||
|
||||
boolean compare_checksum() {
|
||||
print_Msg(F("Checksum..."));
|
||||
print_Msg(F("Checksum... "));
|
||||
display_Update();
|
||||
|
||||
strcpy(fileName, romName);
|
||||
@ -1248,17 +1252,17 @@ boolean compare_checksum() {
|
||||
|
||||
char calcsumStr[5];
|
||||
sprintf(calcsumStr, "%04X", calc_checksum(fileName, folder));
|
||||
|
||||
print_Msg(calcsumStr);
|
||||
|
||||
if (strcmp(calcsumStr, checksumStr) == 0) {
|
||||
println_Msg(F("OK"));
|
||||
//println_Msg(calcsumStr);
|
||||
println_Msg(F(" -> OK"));
|
||||
display_Update();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
print_Msg(F("Error "));
|
||||
print_Msg(calcsumStr);
|
||||
print_Error(F(" "), false);
|
||||
print_Msg(F(" != "));
|
||||
println_Msg(checksumStr);
|
||||
print_Error(F("Invalid Checksum"), false);
|
||||
display_Update();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user