- .size write_nomemd_new, .-write_nomemd_new
- .align 2
- .global tlb_exception
- .type tlb_exception, %function
-tlb_exception:
- /* r1 = cause */
- /* r2 = address */
- /* r3 = instr addr/flags */
- ldr r4, [fp, #reg_cop0+48-dynarec_local] /* Status */
- add r5, fp, #memory_map-dynarec_local
- lsr r6, r3, #12
- orr r1, r1, r3, lsl #31
- orr r4, r4, #2
- ldr r7, [r5, r6, lsl #2]
- bic r8, r3, #3
- str r4, [fp, #reg_cop0+48-dynarec_local] /* Status */
- mov r6, #0x6000000
- str r1, [fp, #reg_cop0+52-dynarec_local] /* Cause */
- orr r6, r6, #0x22
- ldr r0, [r8, r7, lsl #2]
- add r4, r8, r1, asr #29
- add r5, fp, #reg-dynarec_local
- str r4, [fp, #reg_cop0+56-dynarec_local] /* EPC */
- mov r7, #0xf8
- ldr r8, [fp, #reg_cop0+16-dynarec_local] /* Context */
- lsl r1, r0, #16
- lsr r4, r0, #26
- and r7, r7, r0, lsr #18
- mvn r9, #0xF000000F
- sub r2, r2, r1, asr #16
- bic r9, r9, #0x0F800000
- rors r6, r6, r4
- mov r0, #0x80000000
- ldrcs r2, [r5, r7]
- bic r8, r8, r9
- tst r3, #2
- str r2, [r5, r7]
- add r4, r2, r1, asr #16
- add r6, fp, #reg+4-dynarec_local
- asr r3, r2, #31
- str r4, [fp, #reg_cop0+32-dynarec_local] /* BadVAddr */
- add r0, r0, #0x180
- and r4, r9, r4, lsr #9
- strne r3, [r6, r7]
- orr r8, r8, r4
- str r8, [fp, #reg_cop0+16-dynarec_local] /* Context */
- bl get_addr_ht
- ldr r1, [fp, #next_interupt-dynarec_local]
- ldr r10, [fp, #reg_cop0+36-dynarec_local] /* Count */
- str r1, [fp, #last_count-dynarec_local]
- sub r10, r10, r1
- mov pc, r0
- .size tlb_exception, .-tlb_exception
- .align 2
- .global breakpoint
- .type breakpoint, %function
-breakpoint:
- /* Set breakpoint here for debugging */
+1:
+.if \tab_shift == 1 @ write16
+ cmp r2, #0x1c00
+ blo 0b
+ cmp r2, #0x1e00
+ ldrlo pc, [fp, #spu_writef-dynarec_local]
+ nop
+.endif
+ b 0b
+.endm
+
+ari_write_io8:
+ @ 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