You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In mGBA 0.9.0, the LDM rbase, {}^ instruction does not reload CPSR. Hardware interprets an empty rlist as "transfer r15" (which is correctly implemented in mGBA); however, this also applies to LDMS, so hardware ends up reloading CPSR.
; switch to Abort mode, set up SPSR
mov r0, 0x17
msr cpsr_csxf, r0
orr r0, 0xF0000000
msr spsr, r0
adr r1, .Pool_Main
dw 0xE8D10000 ; ldmia r1, {}^
.Main_PrintResult:
; save new CPSR value, switch back to System mode
mrs r0, cpsr ; F0000017h on hardware, 00000017h in mGBA
msr cpsr_csxf, 0x1F
mov r1, 8
bl .PrintHex
.Loop_Endless:
b .Loop_Endless
.Pool_Main:
dw MEM_ROM0 + .Main_PrintResult
In mGBA 0.9.0, the
LDM rbase, {}^
instruction does not reload CPSR. Hardware interprets an empty rlist as "transfer r15" (which is correctly implemented in mGBA); however, this also applies toLDMS
, so hardware ends up reloading CPSR.ldmia_empty_cpsr.zip
The text was updated successfully, but these errors were encountered: