summaryrefslogtreecommitdiff
path: root/Source/UnitTests
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-06-13 21:46:03 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-06-14 12:22:06 -0700
commit36769017c0417138b77e2a4012dffd6add7cc2cd (patch)
tree0d6f6adf0de22df0a744b44bbb779429fa712fb2 /Source/UnitTests
parentd52528a6f0f3c06d38d31447bf861d8773f9bb1b (diff)
UnitTests: Update DSP test text for old renames
This change makes assembling DSPTestText match DSPTestBinary, though HermesText doesn't yet match HermesBinary. The test data was originally added on April 18, 2009 in e7e4ef4481d1c5dcce6463414d815843ae15b8e2. Then, set16 and set40 were swapped on April 22, 2009 89178f411cf1e8ef61b005197545618e53a0d4e8, which updated the DSPSpy version of dsp_code, but not the version in DSPTool used for testing. So, when the test was made, the assembled data matched the text, but a few days after it no longer did. Similarly, on Jul 7, 2009 in 1654c582ab9a6323a31802c4b241c0cffc9d3bca the conditional instructions were adjusted, and 0x1706 was changed from JRL to JRNC and 0x0297 was changed from JGE to JC. For what it's worth, devkitPro made the same changes on May 31, 2010 in https://github.com/devkitPro/gamecube-tools/commit/8a65c85c9b4748ed3dab3c0c85aeb0df95d58cfb and updated their version of the asnd ucode (which is this ucode) on June 11, 2011 in https://github.com/devkitpro/libogc/commit/b1b8ecab3af3745c8df0b401abd512bdf5fcc011 (though this update also includes other feature changes). Note that at the time, they didn't reassemble the ucode unless they made changes to it; the assembled was stored in the repo until https://github.com/devkitPro/libogc/compare/bfb705fe1607a3031d18b65d603975b68a1cffd4~...d20f9bdcfb43260c6c759f4fb98d724931443f93. This fixes the following failures with Hermes: !! 0015 : 8e00 vs 8f00 - set16 vs set40 !! 016f : 8e00 vs 8f00 - set16 vs set40 and with Hermes: !! 0014 : 8e00 vs 8f00 - set16 vs set40 !! 0063 : 8e00 vs 8f00 - set16 vs set40 !! 019b : 1706 vs 1701 - jrnc $AR0 vs jrl $AR0 !! 01bf : 0297 vs 0290 - jc 0x01dc vs jge 0x01dc !! 01d2 : 0297 vs 0290 - jc 0x01dc vs jge 0x01dc Hermes has the remaining failures: !! 027b : 03c0 vs 03a0 - andcf $AC1.M, #0x8000 vs andf $AC1.M, #0x8000 !! 027d : 029d vs 0294 - jlz 0x027a vs jnz 0x027a
Diffstat (limited to 'Source/UnitTests')
-rw-r--r--Source/UnitTests/Core/DSP/DSPTestText.cpp6
-rw-r--r--Source/UnitTests/Core/DSP/HermesText.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/Source/UnitTests/Core/DSP/DSPTestText.cpp b/Source/UnitTests/Core/DSP/DSPTestText.cpp
index 2e1f60a450..bc02ef1ba2 100644
--- a/Source/UnitTests/Core/DSP/DSPTestText.cpp
+++ b/Source/UnitTests/Core/DSP/DSPTestText.cpp
@@ -89,7 +89,7 @@ MEM_LO: equ 0x0f7F
CW 0x1305
CW 0x1306
- s40
+ s16
lri $r12, #0x00ff
main:
@@ -469,7 +469,7 @@ irq4:
jmp irq
irq5:
; jmp finale
- s40
+ s16
mrr $r0d, $r1c
mrr $r0d, $r1e
clr $acc0
@@ -609,7 +609,7 @@ dma_copy:
ret
-send_back_16:
+send_back_40:
cw 0x8e00
call send_back
diff --git a/Source/UnitTests/Core/DSP/HermesText.cpp b/Source/UnitTests/Core/DSP/HermesText.cpp
index 1b643a0c9b..fd59677d35 100644
--- a/Source/UnitTests/Core/DSP/HermesText.cpp
+++ b/Source/UnitTests/Core/DSP/HermesText.cpp
@@ -175,7 +175,7 @@ MEM_SND: equ data_end ; it need 2048 words (4096 bytes)
lri $CONFIG, #0xff
lri $SR,#0
- s40
+ s16
clr15
m0
@@ -256,7 +256,7 @@ sys_command:
jmp recv_cmd
run_nexttask:
- s40
+ s16
call wait_for_cpu_mail
lrs $29,@CMBL
call wait_for_cpu_mail
@@ -661,7 +661,7 @@ left_skip2:
cmp
- jrl $AR0 //get_sample or get_sample2 method
+ jrnc $AR0 //get_sample or get_sample2 method
sr @COUNTERH_SMP, $ACH1
sr @COUNTERL_SMP, $ACM1
@@ -717,7 +717,7 @@ get_sample2: // slow method
// if addr>addr end get a new buffer (if you uses double buffer)
- jge get_new_buffer
+ jc get_new_buffer
// load samples from dma, return $ar2 with the addr to get the samples and return using $ar0 to the routine to process 8-16bits Mono/Stereo
@@ -747,7 +747,7 @@ get_sample: // fast method
// compares if the current address is >= end address to change the buffer or stops
cmp
- jge get_new_buffer
+ jc get_new_buffer
// load the new sample from the buffer