Put back the file.cpp
[clinton/Virtual-Jaguar-Rx.git] / src / file.h
CommitLineData
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
20extern "C" {
21#endif
22
23enum FileType { FT_SOFTWARE=0, FT_EEPROM, FT_LABEL, FT_BOXART, FT_OVERLAY };
24// JST = Jaguar Software Type
25enum { JST_NONE = 0, JST_ROM, JST_ALPINE, JST_ABS_TYPE1, JST_ABS_TYPE2, JST_JAGSERVER, JST_WTFOMGBBQ, JST_ELF32 };
26
27uint32_t JaguarLoadROM(uint8_t * &rom, char * path);
28bool JaguarLoadFile(char * path);
29bool AlpineLoadFile(char * path);
30bool DebuggerLoadFile(char * path);
31uint32_t GetFileFromZIP(const char * zipFile, FileType type, uint8_t * &buffer);
32uint32_t GetFileDBIdentityFromZIP(const char * zipFile);
33bool FindFileInZIPWithCRC32(const char * zipFile, uint32_t crc);
34uint32_t ParseFileType(uint8_t * buffer, uint32_t size);
35bool HasUniversalHeader(uint8_t * rom, uint32_t romSize);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif // __FILE_H__