summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-08-16 22:15:19 -0700
committerPokechu22 <Pokechu022@gmail.com>2021-08-22 10:49:46 -0700
commita5e2a0d97307ef146879a6f46a86d728a3ac2e97 (patch)
tree4035ce151316df0a27551a4ad346ff5155b79f0e
parentc881f4db22e963941bcaabcae9b1ce005e24c49c (diff)
dsp_rom: Remove illegal use of AX with SRS
-rw-r--r--Data/Sys/GC/dsp_rom.binbin8192 -> 8192 bytes
-rw-r--r--Source/Core/Core/DSP/DSPCore.cpp39
-rw-r--r--docs/DSP/free_dsp_rom/dsp_rom.ds18
-rw-r--r--docs/DSP/free_dsp_rom/dsp_rom_readme.txt10
4 files changed, 41 insertions, 26 deletions
diff --git a/Data/Sys/GC/dsp_rom.bin b/Data/Sys/GC/dsp_rom.bin
index 34a454df85..a4895bd176 100644
--- a/Data/Sys/GC/dsp_rom.bin
+++ b/Data/Sys/GC/dsp_rom.bin
Binary files differ
diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp
index 48cc0256c8..cbbd7afb76 100644
--- a/Source/Core/Core/DSP/DSPCore.cpp
+++ b/Source/Core/Core/DSP/DSPCore.cpp
@@ -33,7 +33,7 @@ static bool VerifyRoms(const SDSP& dsp)
u32 hash_drom; // dsp_coef.bin
};
- static const std::array<DspRomHashes, 6> known_roms = {{
+ static const std::array<DspRomHashes, 7> known_roms = {{
// Official Nintendo ROM
{0x66f334fe, 0xf3b93527},
@@ -52,6 +52,9 @@ static bool VerifyRoms(const SDSP& dsp)
// above with fix to skip bootucode_ax when running from ROM entrypoint
{0x128ea7a2, 0xa4a575f5},
+
+ // above with fixes for invalid use of SRS instruction
+ {0xe789b5a5, 0xa4a575f5},
}};
const u32 hash_irom =
@@ -69,28 +72,30 @@ static bool VerifyRoms(const SDSP& dsp)
if (rom_idx < 0)
{
- if (AskYesNoFmtT("Your DSP ROMs have incorrect hashes.\n"
+ if (AskYesNoFmtT("Your DSP ROMs have incorrect hashes.\n\n"
+ "Delete the dsp_rom.bin and dsp_coef.bin files in the GC folder in the Global "
+ "User Directory to use the free DSP ROM, or replace them with good dumps from "
+ "a real GameCube/Wii.\n\n"
"Would you like to stop now to fix the problem?\n"
"If you select \"No\", audio might be garbled."))
+ {
return false;
+ }
}
- if (rom_idx == 1)
- {
- Host::OSD_AddMessage("You are using an old free DSP ROM made by the Dolphin Team.", 6000);
- Host::OSD_AddMessage("Only games using the Zelda UCode will work correctly.", 6000);
- }
- else if (rom_idx == 2 || rom_idx == 3)
+ if (rom_idx >= 1 && rom_idx <= 5)
{
- Host::OSD_AddMessage("You are using a free DSP ROM made by the Dolphin Team.", 8000);
- Host::OSD_AddMessage("All Wii games will work correctly, and most GameCube games", 8000);
- Host::OSD_AddMessage("should also work fine, but the GBA/CARD UCodes will not work.", 8000);
- }
- else if (rom_idx == 4)
- {
- Host::OSD_AddMessage("You are using a free DSP ROM made by the Dolphin Team.", 8000);
- Host::OSD_AddMessage("All Wii games will work correctly, and most GameCube games", 8000);
- Host::OSD_AddMessage("should also work fine, but the CARD UCode will not work.", 8000);
+ if (AskYesNoFmtT(
+ "You are using an old free DSP ROM made by the Dolphin Team.\n"
+ "Due to emulation accuracy improvements, this ROM no longer works correctly.\n\n"
+ "Delete the dsp_rom.bin and dsp_coef.bin files in the GC folder in the Global "
+ "User Directory to use the most recent free DSP ROM, or replace them with "
+ "good dumps from a real GameCube/Wii.\n\n"
+ "Would you like to stop now to fix the problem?\n"
+ "If you select \"No\", audio might be garbled."))
+ {
+ return false;
+ }
}
return true;
diff --git a/docs/DSP/free_dsp_rom/dsp_rom.ds b/docs/DSP/free_dsp_rom/dsp_rom.ds
index 5106836658..7ee9b5c5d8 100644
--- a/docs/DSP/free_dsp_rom/dsp_rom.ds
+++ b/docs/DSP/free_dsp_rom/dsp_rom.ds
@@ -86,11 +86,11 @@ WARNPC 0x8b
ORG 0x8b
; called by GBA ucode
dram_to_cpu:
- srs @DSMAH, $AX0.H
- srs @DSMAL, $AX0.L
+ sr @DSMAH, $AX0.H
+ sr @DSMAL, $AX0.L
si @DSCR, #0x1
- srs @DSPA, $AX1.H
- srs @DSBL, $AX1.L
+ sr @DSPA, $AX1.H
+ sr @DSBL, $AX1.L
call wait_dma+#IROM_BASE
ret
@@ -108,11 +108,11 @@ ORG 0xbc
; called by GBA ucode
bootucode_ax:
lris $AC0.M, #0
- srs @DSCR, $AC0.M
- srs @DSMAH, $AX0.H
- srs @DSMAL, $AX0.L
- srs @DSPA, $AX1.H
- srs @DSBL, $AX1.L
+ srs @DSCR, $AC0.M
+ sr @DSMAH, $AX0.H
+ sr @DSMAL, $AX0.L
+ sr @DSPA, $AX1.H
+ sr @DSBL, $AX1.L
call wait_dma+#IROM_BASE
bootucode_ix:
diff --git a/docs/DSP/free_dsp_rom/dsp_rom_readme.txt b/docs/DSP/free_dsp_rom/dsp_rom_readme.txt
index e43fa4084f..65eb69b274 100644
--- a/docs/DSP/free_dsp_rom/dsp_rom_readme.txt
+++ b/docs/DSP/free_dsp_rom/dsp_rom_readme.txt
@@ -1,3 +1,13 @@
+Legal GC/WII DSP IROM replacement (v0.4)
+-------------------------------------------------------
+
+- irom: Minor accuracy and documentation improvements
+- irom: Remove use of SRS instruction with AX registers, as those instructions
+ do not actually exist
+
+Tilka, Pokechu22
+17/aug/2021
+
Legal GC/WII DSP IROM replacement (v0.3.1)
-------------------------------------------------------