#81454 - HyperHacker - Sat Apr 29, 2006 6:41 am
I'm getting errors with the latest version of chishm's FAT library... managed to fix the major ones:
The last 2 just need these two lines changed to "u8 *p=(u8*)buffer;". The first one seems to be a design flaw (u32 can't return -1) and was in old versions too.
Also I have to include all the io_xxxx.c and disc_io.c or it doesn't compile. Shouldn't this be done within the library, or made so the code needing them isn't included if they're not?
Finally, small change at the start of gba_nds_fat.h, to make it easier to use the same copy for multiple apps:
Quote: |
gba_nds_fat.c: In function 'u32 FAT_ftell(FAT_FILE*)':
gba_nds_fat.c:2480: warning: converting negative value '-0x000000001' to 'u32' io_nmmc.c: In function 'bool NMMC_WriteSectors(u32, u8, void*)': io_nmmc.c:264: error: invalid conversion from 'void*' to 'u8*' io_nmmc.c: In function 'bool NMMC_ReadSectors(u32, u8, void*)': io_nmmc.c:312: error: invalid conversion from 'void*' to 'u8*' |
The last 2 just need these two lines changed to "u8 *p=(u8*)buffer;". The first one seems to be a design flaw (u32 can't return -1) and was in old versions too.
Also I have to include all the io_xxxx.c and disc_io.c or it doesn't compile. Shouldn't this be done within the library, or made so the code needing them isn't included if they're not?
Finally, small change at the start of gba_nds_fat.h, to make it easier to use the same copy for multiple apps:
Code: |
// Maximum number of files open at once
// Increase this to open more files, decrease to save memory #ifndef MAX_FILES_OPEN #define MAX_FILES_OPEN 4 #endif // Allow file writing // Disable this to remove file writing support #ifndef NO_FILE_WRITE #define CAN_WRITE_TO_DISC #endif |