From 1c406c7e14f2318205eb67091bbc81625e988a58 Mon Sep 17 00:00:00 2001 From: taxicat1 <32942550+taxicat1@users.noreply.github.com> Date: Wed, 13 May 2026 01:38:32 -0400 Subject: [PATCH 1/4] Initial Ultimate Mortal Kombat patch --- data/patchlist.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/data/patchlist.json b/data/patchlist.json index 1debdbf6..e2f05bfb 100644 --- a/data/patchlist.json +++ b/data/patchlist.json @@ -359,6 +359,35 @@ ] }, + // YUTE - Ultimate Mortal Kombat (USA) + // YUTP - Ultimate Mortal Kombat (Europe) + // + // These games have an issue where a resource load can fail, returning a null pointer, but a flag indicating + // the resource is available is still set anyway. The patch adds the necessary null pointer check. + // This issue seems to be a race condition affected by SD card speed and DMA availability. + { + "gameCode": "YUTE", // Ultimate Mortal Kombat (USA) + "gameVersion": 0, + "patches": [ + { + "type": "replace", + "address": "0200B244", + "data": "B2 26 C4 E1 B2 20 C0 E1 04 20 C0 E5 01 10 A0 E3 00 00 54 E3 02 10 C0 15", + } + ] + }, + { + "gameCode": "YUTP", // Ultimate Mortal Kombat (Europe) + "gameVersion": 0, + "patches": [ + { + "type": "replace", + "address": "0200B3B8", + "data": "B2 26 C4 E1 B6 20 C0 E1 01 10 A0 E3 00 00 54 E3 00 10 C0 15 00 20 C0 05", + } + ] + }, + // MetaFortress games below here. // // MetaFortress is an automated system that replaces the typical way DS games are built. It automatically injects From 8446a99930251f919a95c25f1e2e80fcb19d1dcd Mon Sep 17 00:00:00 2001 From: taxicat1 <32942550+taxicat1@users.noreply.github.com> Date: Mon, 18 May 2026 20:54:37 -0400 Subject: [PATCH 2/4] Fix Ultimate Mortal Kombat patch --- data/patchlist.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/patchlist.json b/data/patchlist.json index e2f05bfb..b4d34c66 100644 --- a/data/patchlist.json +++ b/data/patchlist.json @@ -362,17 +362,17 @@ // YUTE - Ultimate Mortal Kombat (USA) // YUTP - Ultimate Mortal Kombat (Europe) // - // These games have an issue where a resource load can fail, returning a null pointer, but a flag indicating - // the resource is available is still set anyway. The patch adds the necessary null pointer check. - // This issue seems to be a race condition affected by SD card speed and DMA availability. + // These games have an issue where they flag a pointer as available before actually writing the pointer into a context structure. + // If a vblank occurs during that interval, and the pointer is marked as available but is null anyway, the game will crash. + // To fix this, the flag is ignored entirely and the pointer itself is checked instead. This changes only a single load offset. { "gameCode": "YUTE", // Ultimate Mortal Kombat (USA) "gameVersion": 0, "patches": [ { "type": "replace", - "address": "0200B244", - "data": "B2 26 C4 E1 B2 20 C0 E1 04 20 C0 E5 01 10 A0 E3 00 00 54 E3 02 10 C0 15", + "address": "0203295C", + "data": "15", } ] }, @@ -382,8 +382,8 @@ "patches": [ { "type": "replace", - "address": "0200B3B8", - "data": "B2 26 C4 E1 B6 20 C0 E1 01 10 A0 E3 00 00 54 E3 00 10 C0 15 00 20 C0 05", + "address": "02032C88", + "data": "0F", } ] }, From c3960c49f9784ac4893ffbc0d777a44abffc0886 Mon Sep 17 00:00:00 2001 From: taxicat1 <32942550+taxicat1@users.noreply.github.com> Date: Mon, 18 May 2026 23:24:02 -0400 Subject: [PATCH 3/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4bc2f27..f645b82c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - DMA card read support for the M3DS platform - by @lifehackerhansol - AP patches for NRL Mascot Mania and AFL Mascot Manor - by @taxicat1 - Houkago Shounen race condition patch - by @taxicat1 +- Race condition patch for Ultimate Mortal Kombat (USA) and (Europe) - by @taxicat1 ### Fixed - DMA card read offsets for Pokemon Ranger (EU) - by @taxicat1 From 9c780b30b36d9d86cf65b228c6cdc1b7efb7731e Mon Sep 17 00:00:00 2001 From: taxicat1 <32942550+taxicat1@users.noreply.github.com> Date: Wed, 20 May 2026 21:21:52 -0400 Subject: [PATCH 4/4] More complete explanation --- data/patchlist.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/data/patchlist.json b/data/patchlist.json index b4d34c66..4c7b608f 100644 --- a/data/patchlist.json +++ b/data/patchlist.json @@ -362,9 +362,12 @@ // YUTE - Ultimate Mortal Kombat (USA) // YUTP - Ultimate Mortal Kombat (Europe) // - // These games have an issue where they flag a pointer as available before actually writing the pointer into a context structure. - // If a vblank occurs during that interval, and the pointer is marked as available but is null anyway, the game will crash. - // To fix this, the flag is ignored entirely and the pointer itself is checked instead. This changes only a single load offset. + // These games have an issue where a flag can become out of sync with its associated object due to a vblank interrupt occurring + // while running the object constructor. When this happens, the vblank interrupt handler has a failsafe to create a new object. + // However, the object constructor opens sound_data.sdat, which will softlock the game because NitroFS functions cannot + // be called when interrupts are disabled (i.e. from within the vblank interrupt handler). + // To fix this, the flag that causes the issue in the first place is ignored and the pointer itself is checked instead. + // This changes only a single load offset. { "gameCode": "YUTE", // Ultimate Mortal Kombat (USA) "gameVersion": 0,