aboutsummaryrefslogtreecommitdiffhomepage
path: root/Cart_Reader/FAIRCHILD.ino
diff options
context:
space:
mode:
authorsmesgr9000 <smesgr9000>2024-06-16 10:39:47 +0200
committersmesgr9000 <smesgr9000>2024-06-16 10:39:47 +0200
commitda8dc3d94e00b286c41d340d052f13752c8241de (patch)
tree4b30b44c2fe72624efbf475e145689e6e13162ba /Cart_Reader/FAIRCHILD.ino
parente1bd042d822c2f9c23f0a9236b7081da51bc72f5 (diff)
downloadcartreader-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.ino17
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++) {