Repository navigation
Add a profile for Pokémon Mystery Dungeon: Rescue Team DX (01003D200BAA2000), with the patch that fixes its start hang on 1.0.0 and 1.0.2 - #502
Conversation
…AA2000), with the patch that fixes its start hang The game is Unity 2018.3.12f1 IL2CPP with FMOD, SDK 7.4.0, built 64-bit. The profile is provisional: packed from our own .nup (v0 dump, SDK 7.4.0), 9,817 shaders, matching the count in seedds/nxnative PR #1868 (closed, not merged); our tables were generated on this dump, not copied from that PR. The game's own build carries the start-hang race that FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition showed: Unity 2018's ThreadedStreamBuffer wakes a sleeping side with a Dekker handshake, and each side's second access is a plain ldr that AArch64 may complete before the earlier store-release is visible, so neither side wakes the other. On an AYN Thor this stopped 4 of 6 starts, 3 of 3 with DM_WATCH=30: the main thread and UnityGfxDeviceWorker waited on their own semaphores one wake-up apart, no frame, no sound, no crash. This build inlines the two checks into 91 writers and 38 readers, so patches.py carries 131 cuts (not FFCC's 8), each gated by the main.nso build ID ca19d0695861144b8a0fd0c438264a76: every site was found by shape in the decompressed main (stlr of one field, then a plain ldr of the partner field from the same base), and the rewriter checks each cut's original word before applying. Every site becomes a load-acquire (ldar). Checked 2026-11-23: test_game_profile 22 tests OK (DM_GAME=01003D200BAA2000), test_patches 16 OK, check-profiles.sh 172 titles OK, check-runtime-profile.sh 172 profiles OK, upstream-update.sh --check main passes the hunk-marker check, check-publish.sh clean, test_docs shows the 40 known broken links and none new. On the phone (AYN Thor, Adreno 740, Android 13, 14.9 GiB): the first launch on Turnip prepared 5,141 shader programs in 2.2 s and showed the game's own language-select screen at 30 FPS, GPU 2.3 ms, no crash; two trial starts and a play-test on the patched pack ran 29.9 fps with zero watchdog events, the play-test past 634 frames with 0 dropped frames. The old hang window is gone. Not checked: 20 consecutive starts (planned, not run); play beyond the language-select screen (deliberate: it writes the only save); in-game scenes beyond the intro. Known open issue, documented in the game note: on the launcher's system (Qualcomm) driver the game renders with missing texture content (the intro's Pelippers, in-game foliage draws solid green); Turnip renders both scenes correctly. The cause is in the host's Adreno-740 path, not this profile. The chain headers and dmsh_chain.lock are untouched, by design: a PR adds a game's profile tables, and the maintainer regenerates the chain; test_version_header_current is not affected by this change.
…list; its note says to build from 1.0.0 release-titles.txt and games.tsv rows; README tables, games.json, the issue forms and game-patches.md regenerated; its frame rate list pinned. Its note said it was on no list and stopped at the language-select screen: it is on 0.1.8's list and plays past the start hang, which is fixed for 1.0.0's code only (update 1.0.2 has no build row and no fix, so a build with it can hang). No em dashes in the note (review of #502).
#502: Pokémon Mystery Dungeon: Rescue Team DX, with the patch that fixes its start hang (1.0.0). #540: Engage 2.0.0 takes the SDK-wide region rules (node area and 2 MB alignment); AYN Thor, Turnip: both rules matched at their 5 sites, the address region at alias +0.06 GB, intro and attract demo at 60 fps for 5 minutes with no crash (the prologue battle and save/load not run). Held from this batch after review: #526 (LSFG pacing), #528 (add-on unmount), #530 (DRAGON BALL FIGHTERZ).
|
Landed in dev-0.1.8 for 0.1.8 (commit a5aebaa in merge 37a6a59), you as its author, and the game is on the 0.1.8 list. We fixed the note in a commit of ours (d569bab): its Status line still said the game was on no list and stopped at language-select, and it now says to build from the base game 1.0.0, since the hang fix is for 1.0.0's code only and update 1.0.2 has no build row yet. We also took out the em dashes. From the review, if you get to it: a build row (with its own cuts, or a function-matched rule) for update 1.0.2 would help most players, and the logs of the 20 starts would back the note (the landed commit message said they were planned, the note says they were run). Thanks! |
|
Good catch and apologize for the mismatching stories, the PR body is correct. I should have reviewed closer. Also, I have the update/dlc. I'll try it out after work today, looks like I just never loaded it on the dev/test app. |
…ate 1.0.2 (v131072) The start-hang fix of the profile covered only the base game 1.0.0, whose main build ID is ca19d069.... Update 1.0.2 has a new main (3ab632de...), so its starts could hang with no fix. game.tsv now has a build row for it, and patches.py a second key with the same 131 ldr to ldar cuts. They are the same sites as in 1.0.0, found again by shape in the update's main: every one is 0x40 higher than in 1.0.0. The rewriter checks each cut's original word before applying it. subsdk0 and sdk are the same build IDs. Splitting 1.0.0 and 1.0.2 together with shader_split.py gives the same 9,817 programs with the same keys as 1.0.0 alone (only the main#GLSLC@ offsets in the source column of the 180 programs in main differ when 1.0.2 is split alone), so the shader tables are unchanged and shader_versions lists v0 v131072. package says v131072. The game note keeps the wording of the maintainer's edit to the igawa6#502 note (the 0.1.8 list, no em dashes) and adds 1.0.2 on top. The game note, the row in dm/games/README.md, UPSTREAM-EDITS.md and the Found-on entry in docs/reference/threads.md name both builds; game-patches.md is regenerated. The threads.md line now carries a PEANUTS marker, which upstream-update.sh --check main asks for. Checked on an AYN Thor (Adreno 740, Android 13), 2026-11-24: pack from a .nup of the base .nsp and the update, cuts 131, 9,913 shader modules valid for spirv-val. On Turnip 27.0.0-R2, PN_BUILD_ID 3AB632DE..., 1.0.2 was played as far as the entrance of Thunderwave Cave, with fights and a save, in two sessions (logs 01003D200BAA2000-20261124-083926.log and -090219.log): 29.9 fps median in both, no watchdog line, no crash. test_game_profile 22 OK, test_patches 16 OK, check-profiles.sh 172 titles OK, check-runtime-profile.sh 172 profiles OK, upstream-update.sh --check main passes, docs_patches.py current. The game note's Status line now describes both versions as played the same way.
Alright, I updated the PR with the 1.0.2 cuts and some corrections to the notes/comments. I got a little torn on if it should be a new pr or not given you already cherry picked this to the devel branch so I ended up just closing that other PR and building off of this one. |
…list; its note says to build from 1.0.0 release-titles.txt and games.tsv rows; README tables, games.json, the issue forms and game-patches.md regenerated; its frame rate list pinned. Its note said it was on no list and stopped at the language-select screen: it is on 0.1.8's list and plays past the start hang, which is fixed for 1.0.0's code only (update 1.0.2 has no build row and no fix, so a build with it can hang). No em dashes in the note (review of #502).
shamonj03 (#502, #419, #420, #417, #418), fireworksordie (#245), nomnomab (#332, its profile), danielcamilo1 (#397), g0giberry (#521) and gerdguerrero (#540), each the author of the commits that landed on this branch. README.md, its GitHub mirror and AboutData.CONTRIBUTED together, as the About test ties them.
|
Thanks! This is part of Peanuts Native 0.1.8, released today: https://github.com/igawa6/peanuts-native/releases/tag/v0.1.8-1 Closing as released. If something is not working as it should in 0.1.8, please open an issue. |
Summary
This PR makes Pokémon Mystery Dungeon: Rescue Team DX (
01003D200BAA2000, base 1.0.0 and update 1.0.2) start and play onthe Android test app, on both GPU drivers. It adds the game's profile and a patch that closes the
Unity 2018
ThreadedStreamBufferstart-hang race on both builds. RickGamer987 asked for the title on Discord.Why 131 cut sites. Each build inlines the race's two checks into 91 writer sites and 38 reader sites.
Each cut in the profile's
patches.pyturns oneldrload intoldar, gated by themain.nsobuild ID(
ca19d0695861144b8a0fd0c438264a76for 1.0.0,3ab632dee82d59448599b2291f30994afor 1.0.2), and each checks the word it replaces.1.0.2 has the same 131 sites, each 0x40 higher, found again by shape in its own
main. The race and its handshake aredocumented for FINAL FANTASY CRYSTAL CHRONICLES Remastered in
docs/reference/threads.md.One set of shader tables. Splitting 1.0.0 and 1.0.2 together with
shader_split.pygives the same 9,817 programs and the same keys as 1.0.0 alone,so
game.tsvlistsshader_versions v0 v131072and the tables are unchanged.The measurable difference. On 1.0.0, before the patch, 4 of 6 starts on an AYN Thor hung at random points with no
frame, no audio, and no crash. After it, 20 of 20 starts render, and a five-minute session plays into the
story and saves the game.
No shader-chain change. The chain headers and
dmsh_chain.lockare untouched.Checked
All device runs on 2026-11-23 on an AYN Thor (Adreno 740, Android 13, 14.9 GiB RAM), test app
dev.nxnative.android, pack01003D200BAA2000base 1.0.0 (v0), APK md5be707905e761f8f20a13568133c0b674.test_game_profile22 OK,test_patches16 OK (both withDM_GAME=01003D200BAA2000),check-profiles.sh172 titles OK,check-publish.shclean,test_docsonly the known broken links.Also
check-runtime-profile.sh172 profiles OK andupstream-update.sh --check mainpasses.01003D200BAA2000-20261123-123914.log: 710+ frames at 29.9 fps, 0 skipped draws, nonew
[RED]lines.01003D200BAA2000-20261123-161915.log: frame 8,466, every fpswindow 29.9-30.0, no
watchdog: no progress. Play covered the title screen, Cubone select, the Eevee storyscene, combat in Tiny Woods, and a save at the base's house. Four screenshots are attached.
01003D200BAA2000-20261123-123853.log: clean start pastaudio #0 Startintofs mount PEGASUS, 65 frames at 2.5 fps during the documented lazy-compile window,clean suspend.
watchdog: no progressand zeroCRASHlines. Theeight back-to-back launch logs (
…-163059through…-163240) each pass frame 1,070. The unpatched buildhad hung in 4 of 6 starts with no frames at all.
01003D200BAA2000-20261124-083926.log(7,692 frames) and01003D200BAA2000-20261124-090219.log: started from the library with noenv.txt,PN_BUILD_ID=3AB632DEE82D5944.... We played as far as the entrance of Thunderwave Cave, fought enemies and saved the game. Both logs show a 29.9 fps median(p95 34.0 and 35.2 ms, worst long frame about 1,094 ms in the first scene), no
watchdogline and noCRASH.1,061 ms in the first scene.
Docs
dm/games/01003D200BAA2000/README.md,docs/reference/threads.mdgains its second "Found on" entry, and we randocs_symptoms.py.test_version_header_currentfails by design.
main. Two commits: the profile with its 1.0.0 cuts, and the 1.0.2 build row and cuts on top.main.patched.binhasmd5
49e2eda1917e5c6f1b55095eed4911c6and was built from this branch's tree.Not checked
solid green. It produces no log lines, does not happen on Turnip, and is not caused by this change. A
separate issue will follow.
Device test
dev.nxnative.android, pack01003D200BAA2000base 1.0.0 (v0)be707905e761f8f20a13568133c0b674. The tested pack binarymain.patched.binhasmd5
49e2eda1917e5c6f1b55095eed4911c6and was built from this branch's tree..nupof the base.nspand the update,--version 131072.cuts 131, 9,913 shader modules valid forspirv-val,main.patched.binmd5c1d1c1b04e57bfb9b10132ba0ace25f6.Adreno, driver ID 8, version 0x802a4035). Both launched from the library with no
env.txt../gradlew apk -PnxApp=peanuts -PnxAppId=peanutstest -PnxLabel="Peanuts test" -PnxGames=01003D200BAA2000 -PnxPackEngine=fake(JDK 21),peanuts/scripts/push-pack.py <pack> --dest "/sdcard/Peanut Roms/<name>",adb install -r <apk>, then a library launch on each driver.01003D200BAA2000on 2026-11-23, in the app's log folder on the device(
/sdcard/Android/data/dev.nxnative.android.peanutstest/files/logs/):…-123914.log(Turnip),…-123853.log(system),…-161915.log(the five-minute play session), and the eight sweep launches…-163059through…-163240.Attachments