aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2010-12-27 19:31:48 +0200
committernotaz2010-12-27 19:31:48 +0200
commit80e381945ed2858b269a0fb35af9969e767ed5e4 (patch)
treee30606b30cbe9745572d1d721d56285cf373bd55
parent2cb4655298083c0c05f68941fa7e4f37b6b51ebd (diff)
downloadpcsx_rearmed-80e381945ed2858b269a0fb35af9969e767ed5e4.tar.gz
pcsx_rearmed-80e381945ed2858b269a0fb35af9969e767ed5e4.tar.bz2
pcsx_rearmed-80e381945ed2858b269a0fb35af9969e767ed5e4.zip
io asm: always write out to psxH, like C code does
-rw-r--r--libpcsxcore/new_dynarec/linkage_arm.s18
1 files changed, 17 insertions, 1 deletions
diff --git a/libpcsxcore/new_dynarec/linkage_arm.s b/libpcsxcore/new_dynarec/linkage_arm.s
index 8f1a2b2..b5922dd 100644
--- a/libpcsxcore/new_dynarec/linkage_arm.s
+++ b/libpcsxcore/new_dynarec/linkage_arm.s
@@ -1029,7 +1029,23 @@ ari_read_io32:
.endm
ari_write_io8:
- ari_write_io ldrb, strb, byte, tab_write8, 2
+ @ PCSX always writes to psxH, so do we for consistency
+ ldr r0, [fp, #address-dynarec_local]
+ ldr r3, [fp, #psxH_ptr-dynarec_local]
+ ldrb r1, [fp, #byte-dynarec_local]
+ bic r2, r0, #0x1f800000
+ ldr r12,[fp, #tab_write8-dynarec_local]
+ strb r1, [r2, r3]
+ subs r3, r2, #0x1000
+ movlo pc, lr
+@ ari_write_io_old 2
+ cmp r3, #0x880
+ movhs pc, lr
+ ldr r12,[r12, r3, lsl #2]
+ mov r0, r1
+ tst r12,r12
+ bxne r12
+ mov pc, lr
ari_write_io16:
ari_write_io ldrh, strh, hword, tab_write16, 1