diff options
author | smesgr9000 <smesgr9000> | 2024-06-16 10:39:47 +0200 |
---|---|---|
committer | smesgr9000 <smesgr9000> | 2024-06-16 10:39:47 +0200 |
commit | da8dc3d94e00b286c41d340d052f13752c8241de (patch) | |
tree | 4b30b44c2fe72624efbf475e145689e6e13162ba /Cart_Reader/FAIRCHILD.ino | |
parent | e1bd042d822c2f9c23f0a9236b7081da51bc72f5 (diff) | |
download | cartreader-da8dc3d94e00b286c41d340d052f13752c8241de.tar.gz cartreader-da8dc3d94e00b286c41d340d052f13752c8241de.zip |
replace duplicate code with common folder creation function
Diffstat (limited to 'Cart_Reader/FAIRCHILD.ino')
-rw-r--r-- | Cart_Reader/FAIRCHILD.ino | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/Cart_Reader/FAIRCHILD.ino b/Cart_Reader/FAIRCHILD.ino index ca1fe73..03b7111 100644 --- a/Cart_Reader/FAIRCHILD.ino +++ b/Cart_Reader/FAIRCHILD.ino @@ -458,22 +458,7 @@ void readROM_FAIRCHILD() { } void read16K_FAIRCHILD() { // Read 16K Bytes - createFolder("FAIRCHILD", "ROM", romName, "bin"); - - display_Clear(); - print_STR(saving_to_STR, 0); - print_Msg(folder); - println_Msg(F("/...")); - display_Update(); - - // open file on sdcard - if (!myFile.open(fileName, O_RDWR | O_CREAT)) { - print_FatalError(create_file_STR); - } - - // write new folder number back to EEPROM - foldern++; - EEPROM_writeAnything(0, foldern); + createFolderAndOpenFile("FAIRCHILD", "ROM", romName, "bin"); unsigned long cartsize = FAIRCHILD[fairchildsize] * 0x400; for (uint16_t y = 0; y < 0x20; y++) { |