[mupen64plus-core] 247/310: dd Missing Subscreen Delay Fix for Ocarina of Time
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:58:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.
commit 14a517c107721453688be0900bbfc2a82bb07c92
Author: Sven Eckelmann <sven at narfation.org>
Date: Fri Dec 13 13:35:31 2013 +0100
dd Missing Subscreen Delay Fix for Ocarina of Time
Mupen64plus contains built-in cheats for Ocarina of Time, which activates the
essential subscreen delay fix. However, the built-in code for Master Quest
only works for the (E) version of Master Quest, and not the (U) version. The
file also does not include the (U) (GC) version of Ocarina of Time. Master
Quest and the GC versions of Ocarina of Time also need the End Credits Fix,
otherwise these games will crash when the credits are displayed.
---
debian/changelog | 3 +
debian/patches/oot_subscreen_delay_fix.patch | 110 +++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 114 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a7cfb24..456b600 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ mupen64plus-core (2.0-4) UNRELEASED; urgency=low
* Fix version number of the unicode FTBFS bug in the changelog
* Upgraded to policy 3.9.5, no changes required
+ * debian/patches:
+ - Add oot_subscreen_delay_fix.patch, Add Missing Subscreen Delay Fix for
+ Ocarina of Time
-- Sven Eckelmann <sven at narfation.org> Sat, 05 Oct 2013 22:52:30 +0200
diff --git a/debian/patches/oot_subscreen_delay_fix.patch b/debian/patches/oot_subscreen_delay_fix.patch
new file mode 100644
index 0000000..1e9d42a
--- /dev/null
+++ b/debian/patches/oot_subscreen_delay_fix.patch
@@ -0,0 +1,110 @@
+Description: Add Missing Subscreen Delay Fix for Ocarina of Time
+ Mupen64plus contains built-in cheats for Ocarina of Time, which activates the
+ essential subscreen delay fix. However, the built-in code for Master Quest
+ only works for the (E) version of Master Quest, and not the (U) version. The
+ file also does not include the (U) (GC) version of Ocarina of Time. Master
+ Quest and the GC versions of Ocarina of Time also need the End Credits Fix,
+ otherwise these games will crash when the credits are displayed.
+Author: Joel 'iLag' Hammond <iLagDoesntCheckThisEmail at gmail.com>
+
+---
+diff --git a/src/main/cheat.c b/src/main/cheat.c
+index 52551ce0a0185b4c165402b3ba0f49563e0073f0..7266762fda1d063c89f6b671ddcfeef9039c37e1 100644
+--- a/src/main/cheat.c
++++ b/src/main/cheat.c
+@@ -205,25 +205,87 @@ void cheat_apply_cheats(int entry)
+ int execute_next;
+
+ // If game is Zelda OOT, apply subscreen delay fix
+- if (strncmp((char *)ROM_HEADER.Name, "THE LEGEND OF ZELDA", 19) == 0 && entry == ENTRY_VI) {
++ if (entry == ENTRY_VI && strncmp((char *)ROM_HEADER.Name, "THE LEGEND OF ZELDA", 19) == 0) {
++ uint32_t subscreen_address = 0;
++ uint32_t credits_address[4];
++ credits_address[0] = 0;
+ if (sl(ROM_HEADER.CRC1) == 0xEC7011B7 && sl(ROM_HEADER.CRC2) == 0x7616D72B) {
+ // Legend of Zelda, The - Ocarina of Time (U) + (J) (V1.0)
+- execute_cheat(0x801DA5CB, 0x0002, NULL);
++ subscreen_address = 0x801DA5CB;
+ } else if (sl(ROM_HEADER.CRC1) == 0xD43DA81F && sl(ROM_HEADER.CRC2) == 0x021E1E19) {
+ // Legend of Zelda, The - Ocarina of Time (U) + (J) (V1.1)
+- execute_cheat(0x801DA78B, 0x0002, NULL);
++ subscreen_address = 0x801DA78B;
+ } else if (sl(ROM_HEADER.CRC1) == 0x693BA2AE && sl(ROM_HEADER.CRC2) == 0xB7F14E9F) {
+ // Legend of Zelda, The - Ocarina of Time (U) + (J) (V1.2)
+- execute_cheat(0x801DAE8B, 0x0002, NULL);
++ subscreen_address = 0x801DAE8B;
+ } else if (sl(ROM_HEADER.CRC1) == 0xB044B569 && sl(ROM_HEADER.CRC2) == 0x373C1985) {
+ // Legend of Zelda, The - Ocarina of Time (E) (V1.0)
+- execute_cheat(0x801D860B, 0x0002, NULL);
++ subscreen_address = 0x801D860B;
+ } else if (sl(ROM_HEADER.CRC1) == 0xB2055FBD && sl(ROM_HEADER.CRC2) == 0x0BAB4E0C) {
+ // Legend of Zelda, The - Ocarina of Time (E) (V1.1)
+- execute_cheat(0x801D864B, 0x0002, NULL);
++ subscreen_address = 0x801D864B;
++ // GC Versions such as Master Quest also require the End Credits Fix.
++ } else if (sl(ROM_HEADER.CRC1) == 0x1D4136F3 && sl(ROM_HEADER.CRC2) == 0xAF63EEA9) {
++ // Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC Version)
++ subscreen_address = 0x801D8F4B;
++ credits_address[0] = 0xD109A8C4;
++ credits_address[1] = 0x8109A8C4;
++ credits_address[2] = 0xD109A8C6;
++ credits_address[3] = 0x8109A8C6;
++ } else if (sl(ROM_HEADER.CRC1) == 0x09465AC3 && sl(ROM_HEADER.CRC2) == 0xF8CB501B) {
++ // Legend of Zelda, The - Ocarina of Time (E) (GC Version)
++ subscreen_address = 0x801D8F8B;
++ credits_address[0] = 0xD109A8E4;
++ credits_address[1] = 0x8109A8E4;
++ credits_address[2] = 0xD109A8E6;
++ credits_address[3] = 0x8109A8E6;
++ } else if (sl(ROM_HEADER.CRC1) == 0xF3DD35BA && sl(ROM_HEADER.CRC2) == 0x4152E075) {
++ // Legend of Zelda, The - Ocarina of Time (U) (GC Version)
++ subscreen_address = 0x801DB78B;
++ credits_address[0] = 0xD109A814;
++ credits_address[1] = 0x8109A814;
++ credits_address[2] = 0xD109A816;
++ credits_address[3] = 0x8109A816;
++ } else if (sl(ROM_HEADER.CRC1) == 0xF034001A && sl(ROM_HEADER.CRC2) == 0xAE47ED06) {
++ // Legend of Zelda, The - Ocarina of Time - Master Quest (U) (GC Version)
++ subscreen_address = 0x801DB74B;
++ credits_address[0] = 0xD109A7F4;
++ credits_address[1] = 0x8109A7F4;
++ credits_address[2] = 0xD109A7F6;
++ credits_address[3] = 0x8109A7F6;
++ } else if (sl(ROM_HEADER.CRC1) == 0xF7F52DB8 && sl(ROM_HEADER.CRC2) == 0x2195E636) {
++ // Zelda no Densetsu - Toki no Ocarina - Zelda Collection Version (J) (GC Version)
++ subscreen_address = 0x801DB78B;
++ credits_address[0] = 0xD109A814;
++ credits_address[1] = 0x8109A814;
++ credits_address[2] = 0xD109A816;
++ credits_address[3] = 0x8109A816;
++ } else if (sl(ROM_HEADER.CRC1) == 0xF611F4BA && sl(ROM_HEADER.CRC2) == 0xC584135C) {
++ // Zelda no Densetsu - Toki no Ocarina GC (J) (GC Version)
++ subscreen_address = 0x801DB78B;
++ credits_address[0] = 0xD109A834;
++ credits_address[1] = 0x8109A834;
++ credits_address[2] = 0xD109A836;
++ credits_address[3] = 0x8109A836;
++ } else if (sl(ROM_HEADER.CRC1) == 0xF43B45BA && sl(ROM_HEADER.CRC2) == 0x2F0E9B6F) {
++ // Zelda no Densetsu - Toki no Ocarina GC Ura (J) (GC Version)
++ subscreen_address = 0x801DB78B;
++ credits_address[0] = 0xD109A814;
++ credits_address[1] = 0x8109A814;
++ credits_address[2] = 0xD109A816;
++ credits_address[3] = 0x8109A816;
+ } else {
+- // Legend of Zelda, The - Ocarina of Time Master Quest
+- execute_cheat(0x801D8F4B, 0x0002, NULL);
++ // UNKNOWN VERSION
++ DebugMessage(M64MSG_WARNING, "Warning: Ocarina of Time version could not be determined. No fixes applied.");
++ }
++ if (subscreen_address) {
++ execute_cheat(subscreen_address, 0x0002, NULL);
++ if (credits_address[0]){
++ if (execute_cheat(credits_address[0], 0x0320, NULL));
++ execute_cheat(credits_address[1], 0x0000, NULL);
++ if (execute_cheat(credits_address[2], 0xF809, NULL));
++ execute_cheat(credits_address[3], 0x0000, NULL);
++ }
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index fb1a7bb..4738675 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ multiple_main.patch
n64_cic_nus_6105_reset.patch
sdl2_select_saveslot.patch
sdl2_no_unicode.patch
+oot_subscreen_delay_fix.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git
More information about the Pkg-games-commits
mailing list