Commit | Line | Data |
---|---|---|
cf76e892 JPM |
1 | // |
2 | // FILE.H | |
3 | // | |
4 | // File support | |
5 | // | |
6 | // JPM = Jean-Paul Mari <djipi.mari@gmail.com> | |
7 | // | |
8 | // Who When What | |
9 | // --- ---------- ----------------------------------------------------------- | |
10 | // JPM 06/15/2016 ELF format support | |
11 | // JPM 06/19/2016 Soft debugger support | |
12 | // | |
13 | ||
14 | #ifndef __FILE_H__ | |
15 | #define __FILE_H__ | |
16 | ||
17 | #include <stdint.h> | |
18 | ||
19 | #ifdef __cplusplus | |
20 | extern "C" { | |
21 | #endif | |
22 | ||
23 | enum FileType { FT_SOFTWARE=0, FT_EEPROM, FT_LABEL, FT_BOXART, FT_OVERLAY }; | |
24 | // JST = Jaguar Software Type | |
25 | enum { JST_NONE = 0, JST_ROM, JST_ALPINE, JST_ABS_TYPE1, JST_ABS_TYPE2, JST_JAGSERVER, JST_WTFOMGBBQ, JST_ELF32 }; | |
26 | ||
27 | uint32_t JaguarLoadROM(uint8_t * &rom, char * path); | |
28 | bool JaguarLoadFile(char * path); | |
29 | bool AlpineLoadFile(char * path); | |
30 | bool DebuggerLoadFile(char * path); | |
31 | uint32_t GetFileFromZIP(const char * zipFile, FileType type, uint8_t * &buffer); | |
32 | uint32_t GetFileDBIdentityFromZIP(const char * zipFile); | |
33 | bool FindFileInZIPWithCRC32(const char * zipFile, uint32_t crc); | |
34 | uint32_t ParseFileType(uint8_t * buffer, uint32_t size); | |
35 | bool HasUniversalHeader(uint8_t * rom, uint32_t romSize); | |
36 | ||
37 | #ifdef __cplusplus | |
38 | } | |
39 | #endif | |
40 | ||
41 | #endif // __FILE_H__ |