diff --git a/gba_memory.c b/gba_memory.c index a09d008..ad2025e 100644 --- a/gba_memory.c +++ b/gba_memory.c @@ -1910,14 +1910,14 @@ void function_cc write_rtc(u32 address, u32 value) break; \ } \ -u8 function_cc read_memory8(u32 address) +u32 function_cc read_memory8(u32 address) { u8 value; read_memory(8); return value; } -u32 read_memory8s(u32 address) { +u32 function_cc read_memory8s(u32 address) { return (u32)((s8)read_memory8(address)); } @@ -1933,7 +1933,7 @@ u16 function_cc read_memory16_signed(u32 address) return value; } -u32 read_memory16s(u32 address) { +u32 function_cc read_memory16s(u32 address) { return (u32)((s16)read_memory16_signed(address)); } diff --git a/gba_memory.h b/gba_memory.h index 3fc4435..6e26260 100644 --- a/gba_memory.h +++ b/gba_memory.h @@ -167,11 +167,11 @@ typedef enum #define FLASH_MANUFACTURER_PANASONIC 0x32 #define FLASH_MANUFACTURER_SST 0xBF -u8 function_cc read_memory8(u32 address); -u32 read_memory8s(u32 address); +u32 function_cc read_memory8(u32 address); +u32 function_cc read_memory8s(u32 address); u32 function_cc read_memory16(u32 address); u16 function_cc read_memory16_signed(u32 address); -u32 read_memory16s(u32 address); +u32 function_cc read_memory16s(u32 address); u32 function_cc read_memory32(u32 address); cpu_alert_type function_cc write_memory8(u32 address, u8 value); cpu_alert_type function_cc write_memory16(u32 address, u16 value);