Repository navigation
0400486024DEC000, tools: add PlayStation and Xbox RomFS controller overlays for Ocarina of Time - #2774
0400486024DEC000, tools: add PlayStation and Xbox RomFS controller overlays for Ocarina of Time#2774zondy1i wants to merge 1 commit into
Conversation
04eee24 to
06ece95
Compare
…ution mode - nvn: retire idle cache-only shared textures above 75% resident (seedds#2745) - nvn: finalized pools drop serial entries naming their textures (seedds#2775) - mac: PlayStation/Xbox controller overlays (seedds#2774) with DM_PAD_LAYOUT - launcher: resolution overlay picks docked/handheld via DM_OPMODE; pad overlay first - overlays: position-based button mapping (host remaps non-Nintendo pads by position)
|
Some OoT findings from an Xbox/PlayStation prompt mod for the Mac app. They may help this PR cover the remaining Switch prompts. Prompts this PR doesn't touch yet (all in
A "western" option. Many players who switch to Xbox/PlayStation prompts also want confirm on the bottom button. In OoT the A/B swap alone is enough on the input side. For icons, the "Western" files of DualSense & Xbox Button Prompts (Makine Çeviri, made for this game) already cover the font, the HUD diamond, the ocarina notes and the Controls screen. A small mod that does the A/B swap in |
|
Hi! This branch is based on a To pick up the fix, merge the current git fetch origin
git merge origin/main
git pushIf the merge has conflicts, ask here if you want help with them. |
06ece95 to
87fd329
Compare
|
Thanks @Scvairy and @gnavarro24!
|
|
Thanks, zondy1i, for rebasing and clarifying what the overlay covers. Ocarina’s own HUD and ocarina prompts use game assets, so the shared font changes in #2773 and the input mapping in #3018 leave this piece open. The PR is mergeable today. I’m leaving it open while the shared controller layout in #2773 is decided. |
…erlays for Ocarina of Time
87fd329 to
122e224
Compare
What and why
Companion to #2773 (
DM_PAD_LAYOUT).The Legend of Zelda: Ocarina of Time (
0400486024DEC000, Switch 2 SDK 22.2.8) does not use the system extended shared font (nintendo_ext.ttf) for its in-game button icons. Instead, it draws button glyphs, ocarina notes, and controller diagrams from two RomFS archives:Font2/Scalable/External.Nin_Ounce_NVN2.bfotf.zs— an XOR-obfuscated (0xA6018502) OpenType CFF font containing the Nintendo Switch PUA button glyphs.UI/Layout2Archive/Common.Product.*.Nin_Ounce_NVN2.bntx.zs— a BNTX texture container with the 35 controller/prompt textures patched here:ActionGuidePlus_00KeyTexFontA_00,KeyTexFontB_00,KeyTexFontX_00,KeyTexFontY_00(64×64 BC4 letter textures)OcarinaButtonA_00,OcarinaButtonB_00,OcarinaButtonX_00,OcarinaButtonY_00,OcarinaButtonL_00,OcarinaButtonR_00(93×93 ASTC 4×4 sRGB melody note textures)Controller_{Pro,Grip,Console},Controller_{Pro,Grip,Console}1,ControllerSh_{Pro,Grip,Console}1, andControllerGuide_{Pro,Grip,Console}_{00..04}(pause-menu controller diagrams and callout overlays)This PR adds a build-time RomFS overlay generator (
scripts/oot_pad_overlay.py+dm/tools/oot_pad_overlay.m) that reads the player's own RomFS (image or folder) and generatesoverlay_playstation/andoverlay_xbox/during Mac and iOS packaging (scripts/build_ipa_from_nsp.py,dm/mac/pack_app.py,dm/ios/tools/build_ipa.sh):scripts/oot_pad_overlay.py): decryptsFont2/Scalable/External.Nin_Ounce_NVN2.bfotf.zs, replaces the CFF charstrings with PlayStation (Cross,Circle,Square,Triangle,L1,R1,L2,R2,Options,Create) or Xbox (A,B,X,Y,LB,RB,LT,RT,Menu,View) vector outlines, and re-encrypts/compresses with the game's zstd dictionary (Pack/ZsDic.pack.zs).dm/tools/oot_pad_overlay.m): decodes the 35 target textures inCommon.Product.*.bntx.zs, renders PlayStation/Xbox symbols intoActionGuidePlus_00,KeyTexFont*, andOcarinaButton*, composites the contributor-created DualSense (dm/games/0400486024DEC000/controller_dualsense.png) and Xbox Series (dm/games/0400486024DEC000/controller_xbox.png) controller illustrations, redraws theControllerGuide_*callout lines/highlights for each controller, and re-encodes the BNTX in-place.How it was tested
0400486024DEC000(v131072) on macOS acrossDM_PAD_LAYOUT=switch,DM_PAD_LAYOUT=playstation, andDM_PAD_LAYOUT=xbox(HUD action prompts, dialogue prompts, ocarina prompts, and pause-menu Controller screen).scripts/oot_pad_overlay.pyoutput against all 35 textures and both.bfotf.zsfonts.DM_GAME=010015100B514000 python3 -m unittest -v dm/tools/tests/test_docs.py dm/tools/tests/test_usage.py dm/tools/tests/test_pr_areas.py dm/tools/tests/test_nsp_mac_app.py(105 tests, OK)