From 5f73631f8499236187b4c8cf827d3c80f82f8a1c Mon Sep 17 00:00:00 2001 From: Zach Bacon Date: Sat, 9 Jul 2016 17:34:55 -0400 Subject: [PATCH] Eeprom is done --- src/gba/EEprom.cpp | 12 ++++++------ src/gba/EEprom.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gba/EEprom.cpp b/src/gba/EEprom.cpp index 2b2967ec..feb0983c 100644 --- a/src/gba/EEprom.cpp +++ b/src/gba/EEprom.cpp @@ -13,13 +13,13 @@ int eepromAddress = 0; #ifdef __LIBRETRO__ // Workaround for broken-by-design GBA save semantics -extern u8 libretro_save_buf[0x20000 + 0x2000]; -u8* eepromData = libretro_save_buf + 0x20000; +extern uint8_t libretro_save_buf[0x20000 + 0x2000]; +uint8_t* eepromData = libretro_save_buf + 0x20000; #else -u8 eepromData[0x2000]; +uint8_t eepromData[0x2000]; #endif -u8 eepromBuffer[16]; +uint8_t eepromBuffer[16]; bool eepromInUse = false; int eepromSize = 512; @@ -103,7 +103,7 @@ void eepromReadGameSkip(gzFile gzFile, int version) } #endif -int eepromRead(u32 /* address */) +int eepromRead(uint32_t /* address */) { switch (eepromMode) { case EEPROM_IDLE: @@ -137,7 +137,7 @@ int eepromRead(u32 /* address */) return 1; } -void eepromWrite(u32 /* address */, u8 value) +void eepromWrite(uint32_t /* address */, uint8_t value) { if (cpuDmaCount == 0) return; diff --git a/src/gba/EEprom.h b/src/gba/EEprom.h index 41c8d708..a3d25840 100644 --- a/src/gba/EEprom.h +++ b/src/gba/EEprom.h @@ -2,21 +2,21 @@ #define EEPROM_H #ifdef __LIBRETRO__ -extern void eepromSaveGame(u8*& data); -extern void eepromReadGame(const u8*& data, int version); +extern void eepromSaveGame(uint8_t*& data); +extern void eepromReadGame(const uint8_t*& data, int version); #else extern void eepromSaveGame(gzFile _gzFile); extern void eepromReadGame(gzFile _gzFile, int version); extern void eepromReadGameSkip(gzFile _gzFile, int version); #endif -extern int eepromRead(u32 address); -extern void eepromWrite(u32 address, u8 value); +extern int eepromRead(uint32_t address); +extern void eepromWrite(uint32_t address, uint8_t value); extern void eepromInit(); extern void eepromReset(); #ifdef __LIBRETRO__ -extern u8* eepromData; +extern uint8_t* eepromData; #else -extern u8 eepromData[0x2000]; +extern uint8_t eepromData[0x2000]; #endif extern bool eepromInUse; extern int eepromSize;