Eeprom is done
This commit is contained in:
parent
590dd281dd
commit
5f73631f84
|
@ -13,13 +13,13 @@ int eepromAddress = 0;
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
// Workaround for broken-by-design GBA save semantics
|
// Workaround for broken-by-design GBA save semantics
|
||||||
extern u8 libretro_save_buf[0x20000 + 0x2000];
|
extern uint8_t libretro_save_buf[0x20000 + 0x2000];
|
||||||
u8* eepromData = libretro_save_buf + 0x20000;
|
uint8_t* eepromData = libretro_save_buf + 0x20000;
|
||||||
#else
|
#else
|
||||||
u8 eepromData[0x2000];
|
uint8_t eepromData[0x2000];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u8 eepromBuffer[16];
|
uint8_t eepromBuffer[16];
|
||||||
bool eepromInUse = false;
|
bool eepromInUse = false;
|
||||||
int eepromSize = 512;
|
int eepromSize = 512;
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ void eepromReadGameSkip(gzFile gzFile, int version)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int eepromRead(u32 /* address */)
|
int eepromRead(uint32_t /* address */)
|
||||||
{
|
{
|
||||||
switch (eepromMode) {
|
switch (eepromMode) {
|
||||||
case EEPROM_IDLE:
|
case EEPROM_IDLE:
|
||||||
|
@ -137,7 +137,7 @@ int eepromRead(u32 /* address */)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void eepromWrite(u32 /* address */, u8 value)
|
void eepromWrite(uint32_t /* address */, uint8_t value)
|
||||||
{
|
{
|
||||||
if (cpuDmaCount == 0)
|
if (cpuDmaCount == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
#define EEPROM_H
|
#define EEPROM_H
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
extern void eepromSaveGame(u8*& data);
|
extern void eepromSaveGame(uint8_t*& data);
|
||||||
extern void eepromReadGame(const u8*& data, int version);
|
extern void eepromReadGame(const uint8_t*& data, int version);
|
||||||
#else
|
#else
|
||||||
extern void eepromSaveGame(gzFile _gzFile);
|
extern void eepromSaveGame(gzFile _gzFile);
|
||||||
extern void eepromReadGame(gzFile _gzFile, int version);
|
extern void eepromReadGame(gzFile _gzFile, int version);
|
||||||
extern void eepromReadGameSkip(gzFile _gzFile, int version);
|
extern void eepromReadGameSkip(gzFile _gzFile, int version);
|
||||||
#endif
|
#endif
|
||||||
extern int eepromRead(u32 address);
|
extern int eepromRead(uint32_t address);
|
||||||
extern void eepromWrite(u32 address, u8 value);
|
extern void eepromWrite(uint32_t address, uint8_t value);
|
||||||
extern void eepromInit();
|
extern void eepromInit();
|
||||||
extern void eepromReset();
|
extern void eepromReset();
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
extern u8* eepromData;
|
extern uint8_t* eepromData;
|
||||||
#else
|
#else
|
||||||
extern u8 eepromData[0x2000];
|
extern uint8_t eepromData[0x2000];
|
||||||
#endif
|
#endif
|
||||||
extern bool eepromInUse;
|
extern bool eepromInUse;
|
||||||
extern int eepromSize;
|
extern int eepromSize;
|
||||||
|
|
Loading…
Reference in New Issue