diff --git a/README.md b/README.md index c7af2267..184f1c82 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Save it to the root folder on your SD card. `4` = SRAM_BANKED `5` = SRAM_128K `6` = FLASHRAM +~~`15` = CART_HEADER~~ ### ED64 diff --git a/src/menu/rom_database.c b/src/menu/rom_database.c index 8fe5b676..2fc71c1e 100644 --- a/src/menu/rom_database.c +++ b/src/menu/rom_database.c @@ -33,11 +33,16 @@ uint8_t rom_db_match_save_type(uint16_t id, uint32_t crc) { // SRAM "AL", "AY", "A2", "DA", "FZ", "GP", "G6", "K4", "KG", "MF", "OB", "RE", "RI", "TE", "VB", "VP", "WI", "W2", "WX", "WZ", "YW", "ZL", + // SRAM_BANKED + "DZ", + // SRAM_128K + // FLASHRAM "AF", "CC", "CK", "DL", "DP", "JD", "JF", "KJ", "M6", "MQ", "P2", "P3", "PF", "PH", "PN", "PO", "PS", "RH", "SI", "SQ", "T9", "W4", "ZS", - // SRAM_BANKED - "DZ" + // Last entry + "!!" + }; static int save_types[] = { // EEP4K @@ -54,11 +59,13 @@ uint8_t rom_db_match_save_type(uint16_t id, uint32_t crc) { // SRAM 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - // FLASHRAM - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // SRAM_BANKED - 0x05, + 0x04, + // SRAM_128K + + // FLASHRAM + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, // Last entry. 0xff }; @@ -70,8 +77,10 @@ uint8_t rom_db_match_save_type(uint16_t id, uint32_t crc) { // i = i == 1 ? DB_SAVE_TYPE_EEPROM_4K : // i == 2 ? DB_SAVE_TYPE_EEPROM_16K : // i == 3 ? DB_SAVE_TYPE_SRAM : - // i == 4 ? DB_SAVE_TYPE_FLASHRAM : - // i == 5 ? DB_SAVE_TYPE_SRAM_BANKED : + // i == 4 ? DB_SAVE_TYPE_SRAM_BANKED : + // i == 5 ? DB_SAVE_TYPE_SRAM_128K : + // i == 6 ? DB_SAVE_TYPE_FLASHRAM : + // // i == 15 ? DB_SAVE_TYPE_CART_SPECIFIED : // DB_SAVE_TYPE_NONE; return i; } diff --git a/src/menu/rom_database.h b/src/menu/rom_database.h index 006f00e8..2194b6c3 100644 --- a/src/menu/rom_database.h +++ b/src/menu/rom_database.h @@ -1,12 +1,14 @@ #include // NOTE: these values are independent of flashcart / OS +// But by default align to SC64. #define DB_SAVE_TYPE_NONE 0x00 #define DB_SAVE_TYPE_EEPROM_4K 0x01 #define DB_SAVE_TYPE_EEPROM_16K 0x02 #define DB_SAVE_TYPE_SRAM 0x03 -#define DB_SAVE_TYPE_FLASHRAM 0x04 -#define DB_SAVE_TYPE_SRAM_BANKED 0x05 +#define DB_SAVE_TYPE_SRAM_BANKED 0x04 +#define DB_SAVE_TYPE_SRAM_128K 0x05 +#define DB_SAVE_TYPE_FLASHRAM 0x06 #define DB_SAVE_TYPE_CART_SPECIFIED 0x0f uint8_t rom_db_match_save_type(uint16_t id, uint32_t crc);