2014-06-29 01:10:11 -04:00
|
|
|
// rom.h
|
|
|
|
// rom tools - header inspect
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <libdragon.h>
|
2016-09-16 16:20:19 -04:00
|
|
|
#include "rom.h"
|
2014-06-29 01:10:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-22 20:10:06 -04:00
|
|
|
#if !defined(MIN)
|
|
|
|
#define MIN(a, b) ({ \
|
|
|
|
__typeof__ (a) _a = (a); \
|
|
|
|
__typeof__ (b) _b = (b); \
|
|
|
|
_a < _b ? _a : _b; \
|
|
|
|
})
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(MAX)
|
|
|
|
#define MAX(a, b) ({ \
|
|
|
|
__typeof__ (a) _a = (a); \
|
|
|
|
__typeof__ (b) _b = (b); \
|
|
|
|
_a > _b ? _a : _b; \
|
|
|
|
})
|
|
|
|
#endif
|
|
|
|
|
2014-06-29 01:10:11 -04:00
|
|
|
sprite_t *loadImage32DFS(char *fname);
|
|
|
|
sprite_t *loadImageDFS(char *fname);
|
|
|
|
sprite_t *loadImage32(u8 *tbuf, int size);
|
|
|
|
void drawImage(display_context_t dcon, sprite_t *sprite);
|
|
|
|
void _sync_bus(void);
|
|
|
|
void _data_cache_invalidate_all(void);
|
|
|
|
void printText(char *msg, int x, int y, display_context_t dcon);
|
|
|
|
|
|
|
|
// End ...
|
2016-09-16 16:20:19 -04:00
|
|
|
|
2014-06-29 01:10:11 -04:00
|
|
|
|
|
|
|
void restoreTiming(void);
|
|
|
|
|
2014-08-22 20:10:06 -04:00
|
|
|
void simulate_boot(u32 boot_cic, u8 bios_cic, u32 *cheat_list[2]);
|
2014-06-29 01:10:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
int get_cic_save(char *cartid, int *cic, int *save);
|
|
|
|
//const char* saveTypeToExtension(int type);
|
|
|
|
const char* saveTypeToExtension(int type, int etype);
|
|
|
|
int saveTypeToSize(int type);
|
|
|
|
int getSaveFromCart(int stype, uint8_t *buffer);
|
|
|
|
int pushSaveToCart(int stype, uint8_t *buffer);
|
|
|
|
|
|
|
|
int getSRAM( uint8_t *buffer,int size);
|
|
|
|
int getSRAM32( uint8_t *buffer);
|
|
|
|
int getSRAM128( uint8_t *buffer);
|
|
|
|
int getEeprom4k( uint8_t *buffer);
|
|
|
|
int getEeprom16k( uint8_t *buffer);
|
|
|
|
int getFlashRAM( uint8_t *buffer);
|
2014-08-22 20:10:06 -04:00
|
|
|
|
2014-06-29 01:10:11 -04:00
|
|
|
int setSRAM(uint8_t *buffer,int size);
|
|
|
|
int setSRAM32( uint8_t *buffer);
|
|
|
|
int setSRAM128( uint8_t *buffer);
|
|
|
|
int setEeprom4k( uint8_t *buffer);
|
|
|
|
int setEeprom16k( uint8_t *buffer);
|
|
|
|
int setFlashRAM( uint8_t *buffer);
|