Repository navigation
Conversation
This was referenced Nov 25, 2026
davdxpx
marked this pull request as ready for review
November 25, 2026 12:34
Written by .github/workflows/catalog.yml after 4ae5c26.
Upstream's one in-game panel with five text tabs becomes two menus, as on a console: everything about this session at the left, everything that tunes the running game at the right. The game keeps running behind both. - The game menu: the game's cover, name, version and this session's time; Back to the game, Pause the game, Quick menu, Back up the save (copied while the game runs, checked before and after the copy), Button mapping, Share log, and Stop the game set apart at the bottom, asked once inline. - The quick menu: the panel's tabs on a rail of solid icons at the left (Performance, Display, Cheats, Mods, Controls, the menu's own settings at the bottom). Cheats and Mods are two tabs now. A header with Back and the tab's name, section heads in capitals, a slider's value at its right. - Home pressed, - and + held, Back and a swipe in from the left edge open the game menu; Home held opens the quick menu, as do a swipe in from the right edge and a long press on the on-screen controls' button. - Calm motion: in 240 ms decelerating, out 180 ms, on hardware layers.
…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.
…s yours A game that uses amiibo now has an amiibo area on its page, so a player sees which figures do something in it before playing, brings in their own and resets what a game saved on one. - The tile (after Controls) only for games AmiiboAPI lists or that were seen looking for an amiibo; its line counts yours and all that fit. - The area: your own that fit first (the last placed first), then every amiibo that fits the game, as square pictures with names; a search over all of them; Import of .bin files, ZIP packs or a folder. - An amiibo's page: picture, series, type, what it does in this game, the game's data on it with Reset game data (that game only), where it came from, the other games that use it, Remove from yours. - Pictures load when the area shows them; Peanuts' own card (the new stand icon, pi_amiibo) stands in offline. B goes back to the pictures. Tests: test_amiibo.py (Page), test_game_page.py (the ten areas).
…also when Home's list fills again meanwhile
# Conflicts: # peanuts/UPSTREAM-EDITS.md
A game that looks for an amiibo now gets one from the player in two presses, without a menu in the way, and the moment it lands has a small show of its own: "Peanuts Native x amiibo". - The quick menu's amiibo tab (between Mods and Controls, a new solid icon): the stand's state, a search, your own that fit, every one that fits, and "When a game looks for an amiibo" (Suggest one of mine by default, Only light up this tab, Place my last one at once). With a controller the tab starts on the first amiibo, so the keyboard opens only at the search; X Take off clears the stand. - While the game looks, the tab's rail item lights up with a slowly breathing ring. - After 0.4 s of looking, once per search, a small card slides in over the game: one of yours (or the last placed here) with A Place and B Not now, a short row when several fit, or Choose an amiibo, which opens the tab. The quick menu never opens unasked; B closes the card and the game goes on looking. - The show (about 2.3 s, any button skips it): the game dims softly, the stand's ring pulses, the About peanut drops onto it, one firm haptic tick, it cracks and the amiibo rises out of the kernel, its base on the ring's centre, and stands there with its name for a good second; the figure goes first, then the dim lifts. The game gets the tag at the crack. - One picked from the list becomes your own copy, with its data for each game. Placed while the game does not look, it is ready for its next search. Tests: test_amiibo.py (InGame).
… what the design means The Mods tab test checked that Controls follows Mods; the amiibo tab now sits between them, as chosen. Three comments pointed at the design boards instead of saying what they show.
davdxpx
force-pushed
the
amiibo-in-game
branch
from
November 25, 2026 19:53
a4d8f58 to
f148565
Compare
Owner
|
Thanks. This one sits on both series: in-game menus Part C (#680, and so Parts A and B) and amiibo Part B (#712, and so Part A). It waits for both. Its own part is about 1,270 lines on top of them. For when it comes to it:
|
…mmit beside the copy fails it The game menu's Back up the save ran SaveStore's recovery on the save first. The game's start recovered that save already, so while the game runs a marker beside it is the host's own swap at a Commit, still being written: the recovery could run a second swap beside the host's and delete from the save what the host's stage 2 had just moved into it. The running game's save is now copied without the recovery (SaveStore.backupRunning), and the copy is refused while a marker is beside the save, before it and after its second scan; the game menu tries again. InGameBackupJvmTest: each state of a Commit as the copy starts (the marker written, stage 1 part way, .pend2, stage 2 part way, the device save's, an empty marker) leaves the save, the host's .new and its markers exactly as they were; a host committing again and again beside backups gets every swap through, and every finished backup holds one whole version.
…s › Controls sets it up The app's start asked for a quick menu button while none was set, after the layout's question. That made up to three questions at the first start after an update. It now asks nothing: the row in Settings › Controls › Controller sets the button up, and the game menu's Quick menu row names it once one is set. The Never preference went with the question.
…n the run of the first start's setup Later (or closing the question) asked again at every start. It now asks once more at the next start and then keeps the two menus; the menu's own settings still change the layout. A new player is asked at the start after the one that ran the first start's setup, so each start has one question at most. Nothing waits on the question any more (the quick menu button is no longer asked about at the start), so it takes no then.
igawa6's review of igawa6#711: amiibo comes in as an opt-in, not as a replacement of nfc and nfp for every game, and a new outside host only by the player's choice. - Settings › Controls › amiibo (off by default) turns it on for every game; a game's own amiibo switch under its Controls (for a game AmiiboAPI lists, or one seen opening nfp) comes first. From the game's next start. - A game it is on for starts with PN_AMIIBO=1. The loader's force_lookup asks peanuts_amiibo_force first (one marked block in dm/host/loader.c under PN_AMIIBO); the stand's take-overs sit in a table of their own (section pnamiibo), so hle_sdk16.c is unchanged again and every other game gets its nfc and nfp block as before. No helper thread, no reads or writes, the launcher's amiibo answers refuse (enabled=0). - PN_AMIIBO is read at the loader's first lookup, once main.c has set the game's environment. The app's calls before that are refused and decide nothing (on the AYN Thor the game screen's first call came 0.25 s before the variable was set). - The adb control's game do=amiibo is taken now: Request's list of the game's actions comes from GameLive.ACTIONS (amiibo was missing, found on the Thor). - Pictures from AmiiboAPI's images only once the player turns them on (AmiiboSwitch.pictures, off by default; Part B has the row). Off, AmiiboPictures answers at once with none: nothing is fetched and Peanuts' own card stands in. NOTICE says so. - peanuts_amiibo.c is stored with LF line ends (it had CR LF). - Tests: the stand in C off and on (the loader's lookup finds nothing without PN_AMIIBO=1 and every take-over with it), hle_sdk16.c's block whole, the loader hook first, PN_AMIIBO only through AmiiboSwitch, pictures only when turned on. - Settings search: "mii" finds the amiibo row as well (it has the letters).
…er turns it on, pictures too)
… only when the player turns them on On Part A's rework (amiibo only where the player turns it on), as igawa6 asked on igawa6#711 and igawa6#712: - The amiibo area starts with the game's amiibo switch, the same setting as the one under its Controls; the tile says "Off for this game" while it is off. - Settings › Controls › amiibo pictures (off by default) names the host: each amiibo's picture from AmiiboAPI's images on raw.githubusercontent.com, fetched when a page shows it and kept. Until it is on, offline, or for one without a picture, Peanuts' own card (the stand icon) shows, and the area's note says where to turn the pictures on. - Tests: the switch comes first and the tile says off; the pictures' row (off, the host named); pictures only from the pages; Settings search finds both amiibo rows for "mii".
…he player turns it on, pictures too) # Conflicts: # android/app/src/main/java/dev/peanuts/ui/LibrarySettings.java # android/app/src/main/java/dev/peanuts/ui/SettingsSections.java # peanuts/UPSTREAM-EDITS.md # peanuts/tests/test_amiibo.py
… and a show without a title beside amiibo igawa6's review of igawa6#713, on Parts A and B's rework: - The watcher starts nothing in a game amiibo is off for. In one it is on for, a thread sleeps in the host until nfp's Initialize or Finalize (nxhost_peanuts_amiibo_wait_lib, Bridge.amiiboWaitLib, 30 s at most; -2 while the game's modules are not loaded yet), and the 150 ms reads of the stand run only while the library is open and the game is in front. The amiibo tab shows only where amiibo is on. - The show has no "Peanuts Native x amiibo" title any more: the peanut cracks, the amiibo rises, and it stands with the line "On the stand" and its name, so nothing reads like a joint product. - The card, the tab and the show keep the amiibo's picture once the player has turned the pictures on (Part B's row); until then Peanuts' own card. - Tests: the wait in C (off, before the modules load, open, closed, its time), the watch only while the library is open, no title beside amiibo. - On the AYN Thor: Mario Kart 8 Deluxe looked for an amiibo on its Mii racing suits screen, the card came, Choose opened the tab, 8-Bit Mario Classic Color placed from it played the show, and the game gave the Mario racing suit.
Quick menu and Button mapping asked Icons for "chevron-right", which has no drawable, so their rows showed an empty space at the end and their values ended short of the others. They take the launcher's own chevron now, as the settings rows do.
…'s choices have the question's names Side by side, each card took the height of its own picture and name, so the bottom screen's card (two screens, a name on two lines) stood taller than the others. The cards are now as tall as the tallest, and every picture sits in a box of one height, so the names line up. In one menu, Game's rows that open a page show the launcher's chevron (there is no "chevron-right" icon), and the menu's Layout choices have the question's names; the line under them says what each does.
…ions, not Controls Controls keeps what the controller and touch do. amiibo belongs to the player like their Miis: Settings › Users › amiibo turns it on for every game, and the game's own switch sits in its Game options, above Mods & Cheats. Texts, docs and the adb control's refusal name the new places; the wiring test checks them.
# Conflicts: # android/app/src/main/java/dev/peanuts/ui/SettingsHelp.java # android/app/src/main/java/dev/peanuts/ui/SettingsSections.java
The pictures row joins Part A's amiibo switch in the Users section's amiibo group, both with the stand icon; the game's switch in its Game options gets the icon too. The area's note, the docs and the tests name the new place.
# Conflicts: # android/app/src/main/java/dev/peanuts/ui/LibrarySettings.java # android/app/src/main/java/dev/peanuts/ui/SettingsSections.java
…rd's name fits one line In the layout question the long name wrapped to two lines, so its card's line sat lower than the other two. Menu settings › Layout uses the same name.
Merges upstream dev-0.1.9 (54eacc9), where the next releases are made, so the stand merges there without conflicts. - peanuts/UPSTREAM-EDITS.md and PEANUTS.md: dev-0.1.9's new sections and lines first, the amiibo round and hooks after them. - GameAreas and GameHelp: dev-0.1.9 dropped the Xbox button label swap, so its row and help line stay out; the game's amiibo row stays after Time of day. - The game catalog (README.md, README.github.md, games.json, games.tsv, peanuts_games.json) is dev-0.1.9's. The branch only had main's catalog update of 2026-11-25 there, none of its own changes.
Part A on dev-0.1.9 brought in. GameAreas: the game's amiibo row keeps Part B's stand icon, and the Controls line is dev-0.1.9's (no Xbox label swap).
Parts A and B on dev-0.1.9 brought in. peanuts/UPSTREAM-EDITS.md: dev-0.1.9's new sections first, then the in-game menus' rounds and the amiibo rounds; peanuts/upstream-unmarked.txt: dev-0.1.9's new lines, then ModsPanel's. InGamePanel.keys: dev-0.1.9 dropped the Xbox button label swap (Prefs.xboxButtons), so the panel's confirm and back come from the game's Button mapping alone, as GameActivity's do there.
The Users section is a page of its own (UsersPage: the users as cards, Who's playing? and the Miis), and SettingsPage returned right after it, so the amiibo group SettingsSections places there was never drawn. Found on the AYN Thor: Settings › Users showed the users and the Miis, no amiibo switch. SettingsPage now draws the section's other groups (all but Users and Miis, which the users' part draws itself) into a column of their own and hands it to UsersPage, which puts it back at its end each time it draws anew (after a rename, a picture, the editor). The other sections draw their groups as before, through the same helper.
fill(a, col, wide, null) matched both the Sink and the View overload.
Its title names the game ("amiibo in Mario Kart 8 Deluxe"), so GameAreas'
icon by title never reached it and its tile stayed empty (AYN Thor).
…review) into amiibo-in-game-main The amiibo series sat on igawa6#680 as it was before the review (ef21e02), so its builds still asked the layout and the quick-button questions at the start. peanuts/UPSTREAM-EDITS.md: igawa6#680's Peanuts-owned line for the Quick menu button, then the amiibo rounds.
dev-0.1.9 now has igawa6#827 (the Mods tab switch under Settings › App), Android 12 (minSdk 31) and new games. Users keeps its amiibo group beside App's new line, and UPSTREAM-EDITS has dev-0.1.9's new sections first, then the amiibo rounds.
Part A on dev-0.1.9 again (igawa6#827, Android 12). Users' amiibo group keeps Part B's pictures row beside App's new line.
Parts A and B on dev-0.1.9 again (igawa6#827 landed: the Mods tab switch under Settings › App). igawa6#680's halves of the Mods tab stay, their comment names App; Controls keeps igawa6#680's Quick menu button without the Mods tab row. UPSTREAM-EDITS: dev-0.1.9's new sections, then igawa6#680's, then the amiibo rounds.
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.
A game that looks for an amiibo today waits for a figure that never comes. With this PR, in a game the player turned amiibo on for, Peanuts notices the search and offers the player's own amiibo in a small card over the game: A places it. The moment it lands gets a short show: the peanut cracks on the stand and the amiibo's card rises. The quick menu gets an amiibo tab for everything else.
Builds on the in-game menus' Part C (#680, the quick menu and its tabs) and on Part B (#712, the game page's amiibo area, which builds on Part A #711, the stand), on dev-0.1.9.
Fixes #582.
Since the review: the show has no title beside amiibo any more, and the stand is read only while the game has amiibo open (and never in a game amiibo is off for). Pictures show once the player has turned them on (Part B's row under Settings › Users); until then Peanuts' own card.
What players get
On the AYN Thor
Mario Kart 8 Deluxe 4.0.1 on its Mii racing suits screen, amiibo on, the pictures off. The amiibo signs on the game's screen are the game's own; the card, the tab and the show are Peanuts' (its stand icon, plain text).
The same on the system driver, with the pictures turned on:
Pictures
From before the review (emulator, a made-up game screen, the stand made up for the emulator). The video of the show is gone: it still had the title beside amiibo.
How it is built
dev.peanuts.amiibo.AmiiboWatchdecides on the card, the lit tab or placing at once.AmiiboSwitch). A thread of its own waits in the host (Bridge.amiiboWaitLib,peanuts_amiibo.c's condition variable, whichnfp::InitializeandFinalizewake), and the 150 ms reads run only while the game has nfp open and is in front.AmiiboCardand the tab isAmiiboTab, shown in a game amiibo is on for that uses amiibo or has the library open.dev.peanuts.ui.AmiiboShow, drawn with the About peanut (PeanutArt): "On the stand" and the amiibo's name.InGamePanelattaches the watch and hands it the controller first while the card or the show is up.ModsPanelgets the tab: four marked lines and a helper, one of them inpadKeyfor the controller's X.Rail.litlights the tab's icon.PeanutsPrefs.amiiboWhenkeeps the setting in the game's own prefs file.pis_amiibofollows the in-game set's style.PEANUTS.mdandpeanuts/UPSTREAM-EDITS.mdlist the hooks.Tested
peanuts/tests/test_amiibo_host.py: the wait in C (off, before the modules load, open, closed, its time).peanuts/tests/test_amiibo.py(InGame): the watch only while the library is open, no title beside amiibo.upstream-update.sh --check,check-publish.sh, andcheck-min-api.pyon the APK.