From 5ffd2832e8b3fc8391a99a53d24788fb736d28c6 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 3 Mar 2021 01:38:09 +0100 Subject: 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. --- gba_memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gba_memory.c') 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: -- cgit v1.2.3