mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
51c26d82a5
This makes the point where execution starts more obvious compared to a start_of_test label at the end of the include, and allows putting other functions at the start of the file. This change also modifies the existing tests to build with this change.
43 lines
699 B
Plaintext
43 lines
699 B
Plaintext
; This test tries to figure out a couple of unknown opcodes.
|
|
incdir "tests"
|
|
include "dsp_base.inc"
|
|
|
|
// 0x02ca is an unknown opcode found in Zelda ucodes.
|
|
|
|
// 0x02ca logically shifts (not rotates) the whole ACC0 right by signed 16-bit value AC1.M
|
|
// (So, if AC1.M is negative, it shifts left).
|
|
// We'll call it lsrn, no arguments.
|
|
// 0x02cb is the same opcode, but arithmetic.
|
|
// We'll call it asrn, no arguments.
|
|
|
|
test_main:
|
|
clr $ACC0
|
|
clr $ACC1
|
|
lri $AC0.H, #0
|
|
lri $AC0.M, #256
|
|
//neg $ACC0
|
|
lri $AC0.L, #1
|
|
lri $AC1.H, #0xFF
|
|
lri $AC1.M, #1
|
|
lri $AC1.L, #0xFF
|
|
|
|
call send_back
|
|
|
|
cw 0x02ca
|
|
|
|
call send_back
|
|
|
|
cw 0x02ca
|
|
|
|
call send_back
|
|
|
|
cw 0x02ca
|
|
|
|
call send_back
|
|
|
|
cw 0x02ca
|
|
|
|
call send_back
|
|
|
|
jmp end_of_test
|