summaryrefslogtreecommitdiff
path: root/gba_memory.c
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-03 01:38:09 +0100
committerDavid Guillen Fandos2021-03-16 22:58:58 +0100
commit5ffd2832e8b3fc8391a99a53d24788fb736d28c6 (patch)
tree3079050fea908fd3b7fcf26ee41a1b2af98df354 /gba_memory.c
parentb9ac4536757c4c24afaa86b6e3131ec21e407e80 (diff)
downloadpicogpsp-5ffd2832e8b3fc8391a99a53d24788fb736d28c6.tar.gz
picogpsp-5ffd2832e8b3fc8391a99a53d24788fb736d28c6.tar.bz2
picogpsp-5ffd2832e8b3fc8391a99a53d24788fb736d28c6.zip
Rewrite of the MIPS dynarec stubs
This allows us to emit the handlers directly in a more efficient manner. At the same time it allows for an easy fix to emit PIC code, which is necessary for libretro. This also enables more platform specific optimizations and variations, perhaps even run-time multiplatform support.
Diffstat (limited to 'gba_memory.c')
-rw-r--r--gba_memory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gba_memory.c b/gba_memory.c
index 0727279..a01bac5 100644
--- a/gba_memory.c
+++ b/gba_memory.c
@@ -427,7 +427,7 @@ u32 eeprom_address = 0;
s32 eeprom_counter = 0;
u8 eeprom_buffer[8];
-void function_cc write_eeprom(u32 address, u32 value)
+void function_cc write_eeprom(u32 unused_address, u32 value)
{
switch(eeprom_mode)
{
@@ -749,6 +749,7 @@ static cpu_alert_type trigger_dma(u32 dma_number, u32 value)
cpu_alert_type function_cc write_io_register8(u32 address, u32 value)
{
+ value &= 0xff;
switch(address)
{
case 0x00:
@@ -1165,6 +1166,7 @@ cpu_alert_type function_cc write_io_register8(u32 address, u32 value)
cpu_alert_type function_cc write_io_register16(u32 address, u32 value)
{
+ value &= 0xffff;
switch(address)
{
case 0x00: