Skip to content

Commit

Permalink
Update PCE.ino
Browse files Browse the repository at this point in the history
Various changes
- restore Reset option in PCE menu
- fix wrong file creation location when reading multiple games in a row
- simplified crc search
  • Loading branch information
PsyK0p4T authored Jul 24, 2024
1 parent 7bdf3e6 commit 23fcb5c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Cart_Reader/PCE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ uint8_t tennokoe_bank_index = 0;
Menu
*****************************************/
// PCE start menu
static const char pceMenuItem1[] PROGMEM = "HuCARD (swapped)";
static const char pceMenuItem1[] PROGMEM = "HuCARD(swapped)";
static const char pceMenuItem2[] PROGMEM = "HuCARD(not swapped)";
static const char pceMenuItem3[] PROGMEM = "Turbochip";
static const char pceMenuItem4[] PROGMEM = "HuCARD Flash Repro";
static const char pceMenuItem4[] PROGMEM = "Flash Repro HuCARD";
static const char *const menuOptionspce[] PROGMEM = { pceMenuItem1, pceMenuItem2, pceMenuItem3, pceMenuItem4, FSTRING_RESET };

// PCE card menu items
Expand All @@ -79,8 +79,8 @@ static const char *const menuOptionspceFlash[] PROGMEM = { flashMenuItemWrite, F
// PCE start menu, first a device type is selected and set in pce_internal_mode
void pcsMenu(void) {
unsigned char pceDev;
convertPgm(menuOptionspce, 4);
pceDev = question_box(F("Select device"), menuOptions, 4, 0);
convertPgm(menuOptionspce, 5);
pceDev = question_box(F("Select device"), menuOptions, 5, 0);

switch (pceDev) {
case 0:
Expand Down Expand Up @@ -761,6 +761,7 @@ void read_rom_PCE(void) {

//clear the screen
display_Clear();

rom_size = detect_rom_size_PCE();
if (pce_force_rom_size > 0) {
rom_size = pce_force_rom_size;
Expand All @@ -772,8 +773,8 @@ void read_rom_PCE(void) {
println_Msg(F("KB"));

// Get name, add extension and convert to char array for sd lib
sd.chdir("/");
createFolder("PCE", "ROM", "PCEROM", "pce");

printAndIncrementFolder();

//open file on sd card
Expand Down Expand Up @@ -821,7 +822,7 @@ void read_rom_PCE(void) {
myFile.close();

//CRC search and rename ROM
crc_search(fileName, folder, rom_size, crc);
compareCRC("pce.txt", 0, 1, 0);

println_Msg(FS(FSTRING_EMPTY));
print_STR(press_button_STR, true);
Expand Down

0 comments on commit 23fcb5c

Please sign in to comment.