Repository navigation
Conversation
…nds that amiibo, and the game reads its identity and keeps its application area The host has no NFC reader, and every nfp tag call answered "tag not found", so no game's amiibo feature could be used. amiibo.h is a virtual tag: DM_AMIIBO is an amiibo ID (16 hex digits) or a file holding one, read again at each StartDetection so the amiibo can be swapped or taken away between scans. Detection finds it and signals the activate event; GetTagInfo gives a 7-byte NTAG215 UID made from the ID, GetModelInfo the ID, GetCommonInfo the write counter and the date, GetRegisterInfo the host's default Mii as owner (hle_mii.c dm_mii_default_charinfo) and DM_AMIIBO_NAME as nickname. The application area is created (written at once), opened by access ID, read, set and kept by Flush, and an unflushed area is dropped at Unmount and StopDetection; it is stored as <ID>.area in DM_AMIIBO_DIR, else in an amiibo folder beside DM_SAVE, made only when an amiibo is named. Device states and results follow the nfp service (Ryujinx's and yuzu's tables). With an amiibo named, nfc::IsNfcEnabled answers true, matching nfp. No dump or key is read. Without DM_AMIIBO every answer is as before. tests/t_amiibo.c checks the structures, every state and result, the stored area across scans, a second game's access ID, a damaged file and a missing folder. t_nfc.c runs a whole scan through the registered hooks, with its earlier checks unchanged; built off the Mac against a stub of HLE_FORCE, its 95 checks pass. Not run with a game: the extended application area and the amiibo settings applets still answer no tag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The rewritten Game/AmiiboSetting grew from 1,476 to 2,448 bytes (identical containers written once each) and ran the game's heap for the file out: a null allocation at main+0xe156e4, 5 s after start. The BYML writer now shares identical containers as Nintendo's does (the original rewrites byte for byte), and the overlay raises the file's resource size table entry (11672 -> 23344). The launcher's two amiibo rows are gone: amiibo-nolimit/ always loads. Mask rows named Young Link / Young Zelda (Ocarina of Time series).
nn::nfp::ModelInfo is character ID (big-endian), variant, series, numbering ID (little-endian), figure type, tag type. The raw tag bytes put the figure type where games read the series and byte-swapped the numbering ID: Ocarina of Time (main+0x326b518/+0x326b5f4) saw every amiibo as series 00, rejected Daruk and the other Zelda-series figures as unsupported, and could not match its two mask figures by numbering ID; only its character rule (Link, Zelda, Ganon) worked.
…ine archive, the recorded prewarm list
cheemu21
added a commit
that referenced
this pull request
Nov 13, 2026
…d its amiibo-nolimit folder served first The amiibo work of Tizzle2x and Atomsk (#4 and #5) came from the X line, where build_ipa.sh packed a romfs_overlay folder beside the RomFS and hle_fs.c's rom_overlay_set chose its per-mode resolution and amiibo folders. The FF line has neither (its render scale is a patch), so: - build_ipa.sh: a profile with amiibo.tsv gets a romfs_overlay folder of its own in the app: the list (the in-game Amiibo menu, GameMenu.swift) and, with amiibo_overlay on, the game's Game/AmiiboSetting with every amiibo's daily limit off and its resource size table entry, made from the player's own RomFS image by scripts/oot_amiibo_overlay.py (nothing of the game in the repository; the list alone when the script fails). The X line's resolution folders beside the RomFS are not packed. - hle_fs.c rom_overlay_expand: DM_ROMFS_OVERLAY's folders, each after its amiibo-nolimit/ subfolder where it has one; no per-mode folders on this line. Checked: t_amiibo ok, t_nfc 95 checks 0 failed, t_fs 146 checks 0 failed, the Mac host builds. Not yet on an iPhone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iDams
pushed a commit
to iDams/nxnative
that referenced
this pull request
Nov 13, 2026
…d its amiibo-nolimit folder served first The amiibo work of Tizzle2x and Atomsk (cheemu21#4 and seedds#5) came from the X line, where build_ipa.sh packed a romfs_overlay folder beside the RomFS and hle_fs.c's rom_overlay_set chose its per-mode resolution and amiibo folders. The FF line has neither (its render scale is a patch), so: - build_ipa.sh: a profile with amiibo.tsv gets a romfs_overlay folder of its own in the app: the list (the in-game Amiibo menu, GameMenu.swift) and, with amiibo_overlay on, the game's Game/AmiiboSetting with every amiibo's daily limit off and its resource size table entry, made from the player's own RomFS image by scripts/oot_amiibo_overlay.py (nothing of the game in the repository; the list alone when the script fails). The X line's resolution folders beside the RomFS are not packed. - hle_fs.c rom_overlay_expand: DM_ROMFS_OVERLAY's folders, each after its amiibo-nolimit/ subfolder where it has one; no per-mode folders on this line. Checked: t_amiibo ok, t_nfc 95 checks 0 failed, t_fs 146 checks 0 failed, the Mac host builds. Not yet on an iPhone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 20a9c0d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds virtual amiibo to Ocarina of Time, on top of
x9. Tested on an iPhone Duo (A20 Pro, iOS 27.1).What it does
Fixes found while testing
Startup crash. The game sizes the heap for
Game/AmiiboSettingfrom the resource size table. My first rewrite of that file was bigger (2,448 bytes against 1,476) and crashed at boot (null allocation at main+0xe156e4). The BYML writer now shares identical containers the way Nintendo's does, so it rewrites the original byte for byte. The overlay also raises the file's size table entry (11672 → 23344).ModelInfo layout.
nn::nfp::ModelInfois not the tag's byte order. It holds:With the raw tag bytes, the game (main+0x326b518 / +0x326b5f4) saw every amiibo as series 00. Daruk and the other series-only figures were rejected as unsupported, and the masks' numbering IDs came through byte-swapped. Only the Link/Zelda/Ganon character rule matched. This should affect other games that read the series or numbering ID too.
Testing
t_amiibopasses;t_nfcpasses 91 checks, 0 failed.The game's files are read from your own dump at build time (
scripts/oot_amiibo_overlay.py). None of them are in the repo.