vbagx/source/vba/gba/EEprom.h

31 lines
809 B
C
Raw Normal View History

2009-01-10 03:41:39 +01:00
#ifndef EEPROM_H
#define EEPROM_H
2008-09-23 01:00:10 +02:00
#ifdef __LIBRETRO__
extern void eepromSaveGame(u8* &data);
extern void eepromReadGame(const u8 *&data, int version);
#else
2008-09-23 01:00:10 +02:00
extern void eepromSaveGame(gzFile _gzFile);
extern void eepromReadGame(gzFile _gzFile, int version);
#endif
2008-09-23 01:00:10 +02:00
extern void eepromReadGameSkip(gzFile _gzFile, int version);
extern int eepromRead(u32 address);
extern void eepromWrite(u32 address, u8 value);
extern void eepromInit();
extern void eepromReset();
#ifdef __LIBRETRO__
extern u8 *eepromData;
#else
2008-09-23 01:00:10 +02:00
extern u8 eepromData[0x2000];
#endif
2008-09-23 01:00:10 +02:00
extern bool eepromInUse;
extern int eepromSize;
#define EEPROM_IDLE 0
#define EEPROM_READADDRESS 1
#define EEPROM_READDATA 2
#define EEPROM_READDATA2 3
#define EEPROM_WRITEDATA 4
2009-01-10 03:41:39 +01:00
#endif // EEPROM_H