Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
48e7ee6
Add Flashram non-compliant
networkfusion Jan 14, 2025
d9ac352
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Jan 15, 2025
10262d7
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Jan 22, 2025
de0f108
Make GB emulator saves non compliant
networkfusion Jan 22, 2025
0a5e974
Update cart_load.c
networkfusion Jan 22, 2025
2682799
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Mar 12, 2025
e43525b
Update rom_info.h
networkfusion Mar 12, 2025
fcead6c
Update flashcart.h
networkfusion Mar 12, 2025
89e6326
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Mar 20, 2025
905bdcf
Add implementation for SC64
networkfusion Mar 20, 2025
d691b16
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Mar 21, 2025
343bf71
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Mar 31, 2025
6c61d11
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Mar 31, 2025
99be1ec
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion May 30, 2025
ebdf223
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Jun 11, 2025
de5b938
Align naming and add FAKE def
networkfusion Jun 11, 2025
f5113b1
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Jun 15, 2025
8b6f02b
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Jul 7, 2025
9c0cc0b
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Jul 9, 2025
cb4b6ae
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Sep 2, 2025
4cd1db7
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Sep 9, 2025
0fe1f5c
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Sep 9, 2025
7a85cb1
Merge branch 'develop' into flashram-saves-noncompliant
networkfusion Oct 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/flashcart/64drive/64drive.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ static flashcart_err_t d64_set_save_type (flashcart_save_type_t save_type) {
case FLASHCART_SAVE_TYPE_FLASHRAM_PKST2:
type = (device_variant == DEVICE_VARIANT_A) ? SAVE_TYPE_FLASHRAM_PKST2 : SAVE_TYPE_FLASHRAM_1MBIT;
break;
case FLASHCART_SAVE_TYPE_FLASHRAM_FAKE:
// NOTE: 64drive doesn't support the non-compliant FlashRam save type, Just thow an error.
return FLASHCART_ERR_ARGS;
default:
return FLASHCART_ERR_ARGS;
}
Expand Down
1 change: 1 addition & 0 deletions src/flashcart/flashcart.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ typedef enum {
FLASHCART_SAVE_TYPE_SRAM_1MBIT, /**< SRAM 1Mbit */
FLASHCART_SAVE_TYPE_FLASHRAM_1MBIT, /**< FlashRAM 1Mbit */
FLASHCART_SAVE_TYPE_FLASHRAM_PKST2, /**< FlashRAM PKST2 */
FLASHCART_SAVE_TYPE_FLASHRAM_FAKE, /**< Fake FlashRAM 1Mbit */
__FLASHCART_SAVE_TYPE_END /**< End of save types */
} flashcart_save_type_t;

Expand Down
4 changes: 4 additions & 0 deletions src/flashcart/sc64/sc64.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ static flashcart_err_t sc64_load_save (char *save_path) {
case SAVE_TYPE_FLASHRAM_1MBIT:
case SAVE_TYPE_SRAM_BANKED:
case SAVE_TYPE_SRAM_1MBIT:
case SAVE_TYPE_FLASHRAM_FAKE:
address = (void *) (SRAM_FLASHRAM_ADDRESS);
break;
case SAVE_TYPE_NONE:
Expand Down Expand Up @@ -640,6 +641,9 @@ static flashcart_err_t sc64_set_save_type (flashcart_save_type_t save_type) {
case FLASHCART_SAVE_TYPE_FLASHRAM_PKST2:
type = SAVE_TYPE_FLASHRAM_1MBIT;
break;
case FLASHCART_SAVE_TYPE_FLASHRAM_FAKE:
type = SAVE_TYPE_FLASHRAM_FAKE;
break;
default:
return FLASHCART_ERR_ARGS;
}
Expand Down
3 changes: 2 additions & 1 deletion src/flashcart/sc64/sc64_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ typedef enum {
SAVE_TYPE_SRAM_256KBIT, /**< SRAM 256Kbit */
SAVE_TYPE_FLASHRAM_1MBIT, /**< FlashRAM 1Mbit */
SAVE_TYPE_SRAM_BANKED, /**< SRAM Banked */
SAVE_TYPE_SRAM_1MBIT /**< SRAM 1Mbit */
SAVE_TYPE_SRAM_1MBIT, /**< SRAM 1Mbit */
SAVE_TYPE_FLASHRAM_FAKE /**< FlashRAM 1Mbit Non Compliant */
} sc64_save_type_t;

/** @brief The SC64 CIC Seed Enumeration. */
Expand Down
7 changes: 3 additions & 4 deletions src/menu/cart_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ static flashcart_save_type_t convert_save_type (rom_save_type_t save_type) {
case SAVE_TYPE_SRAM_1MBIT: return FLASHCART_SAVE_TYPE_SRAM_1MBIT;
case SAVE_TYPE_FLASHRAM_1MBIT: return FLASHCART_SAVE_TYPE_FLASHRAM_1MBIT;
case SAVE_TYPE_FLASHRAM_PKST2: return FLASHCART_SAVE_TYPE_FLASHRAM_PKST2;
case SAVE_TYPE_FLASHRAM_FAKE: return FLASHCART_SAVE_TYPE_FLASHRAM_FAKE;
default: return FLASHCART_SAVE_TYPE_NONE;
}
}
Expand Down Expand Up @@ -233,13 +234,11 @@ cart_load_err_t cart_load_emulator (menu_t *menu, cart_load_emu_type_t emu_type,
break;
case CART_LOAD_EMU_TYPE_GAMEBOY:
path_push(path, "gb.v64");
// TODO: Saves might be less problematic by using the FAKE type.
save_type = FLASHCART_SAVE_TYPE_FLASHRAM_1MBIT; //FLASHCART_SAVE_TYPE_FLASHRAM_FAKE;
save_type = FLASHCART_SAVE_TYPE_FLASHRAM_FAKE;
break;
case CART_LOAD_EMU_TYPE_GAMEBOY_COLOR:
path_push(path, "gbc.v64");
// TODO: Saves might be less problematic by using the FAKE type.
save_type = FLASHCART_SAVE_TYPE_FLASHRAM_1MBIT; //FLASHCART_SAVE_TYPE_FLASHRAM_FAKE;
save_type = FLASHCART_SAVE_TYPE_FLASHRAM_FAKE;
break;
case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT:
path_push(path, "smsPlus64.z64");
Expand Down
20 changes: 11 additions & 9 deletions src/menu/rom_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,17 @@ typedef enum {

/** @brief ROM save type enumeration. */
typedef enum {
SAVE_TYPE_NONE = 0, /**< No expected save type */
SAVE_TYPE_EEPROM_4KBIT = 1, /**< EEPROM 4Kbit */
SAVE_TYPE_EEPROM_16KBIT = 2, /**< EEPROM 16Kbit */
SAVE_TYPE_SRAM_256KBIT = 3, /**< SRAM 256Kbit */
SAVE_TYPE_SRAM_BANKED = 4, /**< SRAM Banked */
SAVE_TYPE_SRAM_1MBIT = 5, /**< SRAM 1Mbit */
SAVE_TYPE_FLASHRAM_1MBIT = 6, /**< FlashRAM 1Mbit */
SAVE_TYPE_FLASHRAM_PKST2 = 7, /**< FlashRAM PKST2 */
SAVE_TYPE_AUTOMATIC = -1, /**< Automatic save type detection */
/** @brief There is no expected save type. */
SAVE_TYPE_NONE = 0, /**< No expected save type */
SAVE_TYPE_EEPROM_4KBIT = 1, /**< EEPROM 4Kbit */
SAVE_TYPE_EEPROM_16KBIT = 2, /**< EEPROM 16Kbit */
SAVE_TYPE_SRAM_256KBIT = 3, /**< SRAM 256Kbit */
SAVE_TYPE_SRAM_BANKED = 4, /**< SRAM Banked */
SAVE_TYPE_SRAM_1MBIT = 5, /**< SRAM 1Mbit - Not a real save type, but used for some ROMs due to ED64 support. */
SAVE_TYPE_FLASHRAM_1MBIT = 6, /**< FlashRAM 1Mbit */
SAVE_TYPE_FLASHRAM_PKST2 = 7, /**< FlashRAM PKST2 */
SAVE_TYPE_FLASHRAM_FAKE = 8, /**< Fake FlashRAM 1Mbit - Not a real save type, but used for some ROMs due to ED64 support. */
SAVE_TYPE_AUTOMATIC = -1, /**< Automatic save type detection */
} rom_save_type_t;

/** @brief ROM TV type enumeration. */
Expand Down
2 changes: 2 additions & 0 deletions src/menu/views/load_rom.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static const char *format_rom_save_type (rom_save_type_t save_type, bool support
case SAVE_TYPE_SRAM_1MBIT: return supports_cpak ? "SRAM 1Mbit | Controller PAK" : "SRAM 1Mbit";
case SAVE_TYPE_FLASHRAM_1MBIT: return supports_cpak ? "FlashRAM 1Mbit | Controller PAK" : "FlashRAM 1Mbit";
case SAVE_TYPE_FLASHRAM_PKST2: return supports_cpak ? "FlashRAM (Pokemon Stadium 2) | Controller PAK" : "FlashRAM (Pokemon Stadium 2)";
case SAVE_TYPE_FLASHRAM_FAKE: return supports_cpak ? "FlashRAM (Wrongly implemented) | Controller PAK" : "FlashRAM (Wrongly implemented)";
default: return "Unknown";
}
}
Expand Down Expand Up @@ -231,6 +232,7 @@ static component_context_menu_t set_save_type_context_menu = { .list = {
{ .text = "SRAM 768kbit / 3 banks", .action = set_save_type, .arg = (void *) (SAVE_TYPE_SRAM_BANKED) },
{ .text = "SRAM 1Mbit", .action = set_save_type, .arg = (void *) (SAVE_TYPE_SRAM_1MBIT) },
{ .text = "FlashRAM 1Mbit", .action = set_save_type, .arg = (void *) (SAVE_TYPE_FLASHRAM_1MBIT) },
{ .text = "FlashRAM Non-compliant", .action = set_save_type, .arg = (void *) (SAVE_TYPE_FLASHRAM_FAKE) },
COMPONENT_CONTEXT_MENU_LIST_END,
}};

Expand Down