From 2e19619dd461148dc5b8ff4b60c0331484f06f9c Mon Sep 17 00:00:00 2001 From: Maverick-Shark Date: Mon, 16 Feb 2026 20:02:44 +0100 Subject: [PATCH] Rename c64files to idx_files --- Makefile | 2 +- Makefile.SAMV71 | 2 +- c64files.c => idx_files.c | 38 +++++++++++++++++++------------------- c64files.h => idx_files.h | 8 ++++---- main.c | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) rename c64files.c => idx_files.c (82%) rename c64files.h => idx_files.h (88%) diff --git a/Makefile b/Makefile index 7d578be..a8534f9 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ TODAY = `date +"%m/%d/%y"` PRJ = firmware SRC = hw/AT91SAM/Cstartup_SAM7.c hw/AT91SAM/hardware.c hw/AT91SAM/spi.c hw/AT91SAM/mmc.c hw/AT91SAM/at91sam_usb.c hw/AT91SAM/usbdev.c -SRC += fdd.c firmware.c fpga.c hdd.c main.c menu.c menu-minimig.c menu-8bit.c menu_info.c osd.c state.c syscalls.c user_io.c settings.c data_io.c boot.c idxfile.c config.c tos.c ikbd.c xmodem.c ini_parser.c cue_parser.c mist_cfg.c archie.c pcecd.c neocd.c snes.c zx_col.c arc_file.c c64files.c font.c utils.c serial_sink.c +SRC += fdd.c firmware.c fpga.c hdd.c main.c menu.c menu-minimig.c menu-8bit.c menu_info.c osd.c state.c syscalls.c user_io.c settings.c data_io.c boot.c idxfile.c config.c tos.c ikbd.c xmodem.c ini_parser.c cue_parser.c mist_cfg.c archie.c pcecd.c neocd.c snes.c zx_col.c arc_file.c idx_files.c font.c utils.c serial_sink.c SRC += usb/usb.c usb/max3421e.c usb/usb-max3421e.c usb/usbdebug.c usb/hub.c usb/hid.c usb/hidparser.c usb/xboxusb.c usb/timer.c usb/asix.c usb/pl2303.c usb/storage.c usb/joymapping.c usb/joystick.c SRC += usb/rtc.c usb/rtc/i2c-tiny.c usb/rtc/i2c-mcp2221.c usb/rtc/pcf85263.c usb/rtc/ds3231.c SRC += fat_compat.c diff --git a/Makefile.SAMV71 b/Makefile.SAMV71 index dfece4a..fe95673 100644 --- a/Makefile.SAMV71 +++ b/Makefile.SAMV71 @@ -12,7 +12,7 @@ TODAY = `date +"%m/%d/%y"` PRJ = firmware SRC = hw/ATSAMV71/cstartup.c hw/ATSAMV71/hardware.c hw/ATSAMV71/spi.c hw/ATSAMV71/qspi.c hw/ATSAMV71/mmc.c hw/ATSAMV71/usbdev.c hw/ATSAMV71/eth.c hw/ATSAMV71/irq/nvic.c SRC += hw/ATSAMV71/network/intmath.c hw/ATSAMV71/network/gmac.c hw/ATSAMV71/network/gmacd.c hw/ATSAMV71/network/phy.c hw/ATSAMV71/network/ethd.c -SRC += fdd.c firmware.c fpga.c hdd.c main.c menu.c menu-minimig.c menu-8bit.c menu_info.c osd.c state.c syscalls.c user_io.c settings.c data_io.c boot.c idxfile.c config.c tos.c ikbd.c xmodem.c ini_parser.c cue_parser.c mist_cfg.c archie.c pcecd.c neocd.c psx.c snes.c zx_col.c arc_file.c c64files.c font.c utils.c serial_sink.c +SRC += fdd.c firmware.c fpga.c hdd.c main.c menu.c menu-minimig.c menu-8bit.c menu_info.c osd.c state.c syscalls.c user_io.c settings.c data_io.c boot.c idxfile.c config.c tos.c ikbd.c xmodem.c ini_parser.c cue_parser.c mist_cfg.c archie.c pcecd.c neocd.c psx.c snes.c zx_col.c arc_file.c idx_files.c font.c utils.c serial_sink.c SRC += sxmlc/sxmlc.c SRC += it6613/HDMI_TX.c it6613/it6613_drv.c it6613/it6613_sys.c it6613/EDID.c it6613/hdmitx_mist.c SRC += usb/usbdebug.c usb/hub.c usb/xboxusb.c usb/hid.c usb/hidparser.c usb/timer.c usb/asix.c usb/pl2303.c usb/joymapping.c usb/joystick.c usb/storage.c diff --git a/c64files.c b/idx_files.c similarity index 82% rename from c64files.c rename to idx_files.c index 214aaf0..a377005 100644 --- a/c64files.c +++ b/idx_files.c @@ -18,7 +18,7 @@ #include #include -#include "c64files.h" +#include "idx_files.h" #include "fat_compat.h" #include "data_io.h" #include "menu.h" @@ -40,7 +40,7 @@ static int lastidx = -1; static char idxline[IDX_LINE_SIZE]; static int f_index; -static char c64_idx_getch() +static char idx_getch() { UINT br; @@ -54,7 +54,7 @@ static char c64_idx_getch() else return sector_buffer[(idx_pt++)&0x1ff]; } -static int c64_idx_getline(char* line, int *offset) +static int idx_getline(char* line, int *offset) { char c; char ignore=0; @@ -64,7 +64,7 @@ static int c64_idx_getline(char* line, int *offset) *offset = 0; while(1) { - c = c64_idx_getch(); + c = idx_getch(); if ((!c) || CHAR_IS_LINEEND(c)) break; if (!CHAR_IS_SPACE(c) && *offset) leadingspace = 0; if (CHAR_IS_QUOTE(c) && !ignore) literal ^= 1; @@ -81,7 +81,7 @@ static int c64_idx_getline(char* line, int *offset) return c==0 ? IDX_EOT : literal ? 1 : 0; } -static char *c64_idxitem(int idx, int *offset) +static char *idxitem(int idx, int *offset) { if (idx <= lastidx) { idx_pt = 0; @@ -89,14 +89,14 @@ static char *c64_idxitem(int idx, int *offset) lastidx = -1; } while (1) { - int r = c64_idx_getline(idxline, offset); + int r = idx_getline(idxline, offset); if (idxline[0]) lastidx++; if (r == IDX_EOT || idx == lastidx) break; } return idxline; } -static char c64_idx_getmenupage(uint8_t idx, char action, menu_page_t *page) +static char idx_getmenupage(uint8_t idx, char action, menu_page_t *page) { if (action == MENU_PAGE_EXIT) { f_close(&idxfile); @@ -104,25 +104,25 @@ static char c64_idx_getmenupage(uint8_t idx, char action, menu_page_t *page) return 0; } - page->title = "C64IDX"; + page->title = "IDX"; page->flags = 0; page->timer = 0; page->stdexit = MENU_STD_EXIT; return 0; } -static char c64_idx_getmenuitem(uint8_t idx, char action, menu_item_t *item) +static char idx_getmenuitem(uint8_t idx, char action, menu_item_t *item) { int offset; char *str; if (action == MENU_ACT_GET) { - str = c64_idxitem(idx, &offset); + str = idxitem(idx, &offset); item->item = str; item->active = (str[0] != 0); return (str[0] != 0); } else if (action == MENU_ACT_SEL) { - str = c64_idxitem(idx, &offset); - iprintf("C64: load TAP segment \"%s\" at offset %08x\n", str, offset); + str = idxitem(idx, &offset); + iprintf("IDX: load TAP segment \"%s\" at offset %08x\n", str, offset); f_close(&idxfile); UINT br; @@ -166,9 +166,9 @@ static char c64_idx_getmenuitem(uint8_t idx, char action, menu_item_t *item) return 0; } -static void c64_handleidx(FIL *file, int index, const char *name, const char *ext) +static void handleidx(FIL *file, int index, const char *name, const char *ext) { - iprintf("C64: open IDX %s\n", name); + iprintf("IDX: open IDX %s\n", name); f_rewind(file); idxfile = *file; @@ -194,17 +194,17 @@ static void c64_handleidx(FIL *file, int index, const char *name, const char *ex ErrorMessage("Unable to open the\ncorresponding TAP file!", 0); return; } - SetupMenu(&c64_idx_getmenupage, &c64_idx_getmenuitem, NULL); + SetupMenu(&idx_getmenupage, &idx_getmenuitem, NULL); } else { f_close(&idxfile); CloseMenu(); } } -static data_io_processor_t c64_idxfile = {"IDX", &c64_handleidx}; +static data_io_processor_t idx_file = {"IDX", &handleidx}; -void c64files_init() +void idx_files_init() { - data_io_add_processor(&c64_idxfile); -} \ No newline at end of file + data_io_add_processor(&idx_file); +} diff --git a/c64files.h b/idx_files.h similarity index 88% rename from c64files.h rename to idx_files.h index e655984..06dd70c 100644 --- a/c64files.h +++ b/idx_files.h @@ -15,9 +15,9 @@ along with this program. If not, see . */ -#ifndef C64_FILES_H -#define C64_FILES_H +#ifndef IDX_FILES_H +#define IDX_FILES_H -void c64files_init(); +void idx_files_init(); -#endif // C64_FILES_H +#endif // IDX_FILES_H diff --git a/main.c b/main.c index 6974375..8364101 100644 --- a/main.c +++ b/main.c @@ -51,7 +51,7 @@ along with this program. If not, see . #include "menu.h" #include "user_io.h" #include "data_io.h" -#include "c64files.h" +#include "idx_files.h" #include "snes.h" #include "zx_col.h" #include "arc_file.h" @@ -148,7 +148,7 @@ int main(void) data_io_init(); page_plugin_init(); - c64files_init(); + idx_files_init(); snes_init(); zx_init(); serial_sink_init();