diff --git a/README.md b/README.md index 90a5ce2..dc88b60 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ iplboot will attempt to load DOLs from the following locations in order: - USB Gecko in Card Slot A - SD Gecko in Card Slot A - SD2SP2 +- GC Loader You can use button shortcuts to keep alternate software on quick access. When loading from an SD card, iplboot will look for and load different filenames depending on what buttons are being held: diff --git a/source/fatfs/ff.h b/source/fatfs/ff.h index 5cf76c9..e7a9f5b 100644 --- a/source/fatfs/ff.h +++ b/source/fatfs/ff.h @@ -172,7 +172,7 @@ typedef struct { LBA_t bitbase; /* Allocation bitmap base sector */ #endif LBA_t winsect; /* Current sector appearing in the win[] */ - BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */ + BYTE __attribute__((aligned (32))) win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg), must be 32-bit aligned for __io_gcode */ } FATFS; diff --git a/source/main.c b/source/main.c index e7f350b..fd90b60 100644 --- a/source/main.c +++ b/source/main.c @@ -68,7 +68,7 @@ void load_parse_cli(char *path) path[path_length - 1] = 'i'; kprintf("Reading %s\n", path); - FIL file; + FIL file ATTRIBUTE_ALIGN (32); FRESULT result = f_open(&file, path, FA_READ); if (result != FR_OK) { @@ -173,7 +173,7 @@ int load_fat(const char *slot_name, const DISC_INTERFACE *iface_, char **paths, { char *path = paths[i]; kprintf("Reading %s\n", path); - FIL file; + FIL file ATTRIBUTE_ALIGN (32); FRESULT open_result = f_open(&file, path, FA_READ); if (open_result != FR_OK) { @@ -394,6 +394,8 @@ int main() if (load_fat("sd2", &__io_gcsd2, paths, num_paths)) goto load; + if (load_fat("gcl", &__io_gcode, paths, num_paths)) goto load; + load: if (!dol) {