Repository navigation
Conversation
This was referenced Nov 25, 2026
Open
davdxpx
marked this pull request as ready for review
November 25, 2026 10:45
…eded Games that read amiibo (Breath of the Wild's daily rewards, Super Mario Odyssey's costumes, Smash's fighters) now find one: a virtual stand in the host that the app places the player's amiibo on. GitHub issue igawa6#582. - dm/peanuts/peanuts_amiibo.c takes over nn::nfc and nn::nfp in the Android host in place of hle_sdk16.c's block (PN_AMIIBO, one marked pair of lines). It sits above the figures' encryption: TagInfo, ModelInfo, CommonInfo, RegisterInfo and the application areas are plain, so no amiibo keys are asked for, read or shipped. - The activate and deactivate events are signalled; mount, read, write, flush and create or recreate of an area answer as the SDK's; each game keeps an area of its own on an amiibo; a second after the game unmounts it the amiibo leaves the stand on its own. One placed in advance is found at the game's next search. - The owner is the player's Mii, the nickname the character's name. - dev.peanuts.amiibo: AmiiboAPI's table offline (MIT, peanuts/scripts/amiibo-db.py), the player's own amiibo, imports of .bin files, folders and ZIP packs (ID and UID only), pictures loaded on demand, and the adb control's game do=amiibo. Tests: test_amiibo_host.py (the stand in C, made-up IDs), test_amiibo.py (AmiiboJvmTest), test_ctl.py. Round 65.
davdxpx
force-pushed
the
amiibo-stand
branch
from
November 25, 2026 19:52
6f4f8d1 to
86f4dd8
Compare
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.
Games that read amiibo find none today. The host answers that the game is searching but never finds a tag, so Breath of the Wild's daily chests, Super Mario Odyssey's costumes and Smash's figure players stay closed. This PR gives the host a stand of its own, and the app places the player's amiibo on it. Issue #582, also asked in #647. #668 discusses a reader built on the player's own
key_retail.bin; this stand needs no keys at all.Builds directly on main 0.1.8, with nothing else under it. Part B (#712) adds the game page's amiibo area. Part C (#713) adds the quick menu's tab, the card over the game and the show.
What players get
game do=amiibo value=status|off|<id>|own:<key>.How it is built
dm/peanuts/peanuts_amiibo.ctakes overnn::nfcandnn::nfpin the Android host in place ofhle_sdk16.c's block: one marked pair of lines (#ifndef PN_AMIIBO), with the same registrations (the test compares the lists), and CMake definesPN_AMIIBOfor both host kinds.files/amiibo/own/<id>-<uid>/.Bridge.amiiboStatus,amiiboPlaceandamiiboRemove.dev.peanuts.amiiboholds the app side:AmiiboDb: the table, made bypeanuts/scripts/amiibo-db.pyfrom AmiiboAPI commit 6115745c.AmiiboStore,AmiiboImportandAmiiboBin: the player's own amiibo and the imports.AmiiboStand: places and lifts, and reads the stand's state.AmiiboPictures: pictures from AmiiboAPI's images, fetched only when a page shows them and cached.PEANUTS.md,peanuts/UPSTREAM-EDITS.md(Round 65) andpeanuts/docs/AMIIBO.mdlist the hook and the new files.upstream-update.sh --checkcounts Peanuts' own JVM tests (android/app/src/jvmtest/java/dev/peanuts/) as Peanuts-owned, as Cheats that check the game's code before they write and keep working after an update #677 does.Tested
peanuts/tests/test_amiibo_host.pyruns the stand in C with made-up IDs, under ASan and UBSan (TSan clean). It covers the game's calls as a game makes them: search, placed while searching, read, an area created and written, unmount and the lift a second later, and placed in advance.peanuts/tests/test_amiibo.py(withAmiiboJvmTest) covers the table, the store, and imports of generated .bin files, folders and ZIP packs. Also run:test_ctl.py.upstream-update.sh --check,check-publish.sh, andcheck-min-api.pyon the APK.