mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-02-26 16:23:35 +00:00
Rename c64files to idx_files
This commit is contained in:
2
Makefile
2
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
data_io_add_processor(&idx_file);
|
||||
}
|
||||
@@ -15,9 +15,9 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
||||
4
main.c
4
main.c
@@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#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();
|
||||
|
||||
Reference in New Issue
Block a user