Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions PEANUTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Banana Native ships several releases a day, so this fork is kept as a **thin ove
- `android/app/src/main/java/dev/peanuts/` — launcher side: the `Presentation` on the second display, its view, the JNI bridge.
- `dm/peanuts/` — host side: companion package loader, guest readers, tick, input injection (plain C).
- `peanuts/` — companion packages, docs, tests, `scripts/`.
- `android/app/src/main/java/io/github/davdxpx/mistel/` — Mistel's MIT library for `.mncf` cheat files (`io.github.davdxpx.mistel.mncf`), a copy of
Mistel's `format/lib/java` that is never edited here: `peanuts/scripts/mncf-vendor.sh` copies it with its LICENSE and `MISTEL.sha256` (the commit and
every file's hash), and `peanuts/tests/test_mncf_vendor.py` fails on any change to the copy. Fixes go to Mistel first.
2. **Hooks into upstream files are one-liners, each tagged `PEANUTS`.** A hook is a call-out to Peanuts code, never logic.
Allowed hook sites (keep this list current):
- `android/app/src/main/java/dev/nxnative/android/GameActivity.java` — create/destroy the companion `Presentation`; (2026-11-13) one line in
Expand Down Expand Up @@ -119,6 +122,18 @@ Banana Native ships several releases a day, so this fork is kept as a **thin ove
`build`'s first line hands the page to `GamePagePort.build` on a window 600 dp wide or more; its `wide` and sections lines build the narrow column with every section while the port
takes upstream's rows off its tabs (`GamePagePort.harvesting`); `stepTab` asks `GamePagePort.step` after Mods & Cheats' own line; `openOn` (Round 61's
line) tells the port the tab, so Settings › Users opens the area Saves. `GamePagePort.java` is Peanuts' own file in upstream's package.
- `android/app/src/main/java/dev/nxnative/android/SidePanel.java`, `GameActivity.java`, `SaveStore.java` — (2026-11-24, the in-game menus, `InGamePanel`,
`dev.peanuts.ingame`) the one side panel becomes two menus. SidePanel is the quick menu: `TAB_CONTROLS` not final (Cheats and Mods come before it);
its constructor hands its sheet to `InGamePanel.frame` (a rail of the tabs at the left, a header with Back and the tab's name); `tabBar`'s first line
`InGamePanel.rail`; `showTab` keeps the focus on the rail (`InGamePanel.railFocused`); `open` and `close` slide through `InGamePanel.slideIn`/`slideOut`;
`padKey`'s back key is `InGamePanel.panelBack`; `look` ends with `InGamePanel.laid` (what moved to the game menu). GameActivity: `attach` in `onCreate`
(the game menu, a swipe in from the left edge), the combination through `InGamePanel.key` (Home held: the quick menu) and `InGamePanel.toggle` (Home
pressed, − and + held: the game menu), the controller's own Back through `InGamePanel.backKey` (pressed the game menu, held the quick menu: the
Thor's Home is Android's), `menuKey` and `menuMotion` (the game menu has the controller), Back through `InGamePanel.back`, and `runSave()`
(the save the game runs on). SaveStore: `backupLocked` not private (the game menu's Back up the save, under the running game's own lock).
(2026-11-24, one menu: Layout) SidePanel: `rows()` gives the panel's rows to a second panel, the one menu at the right or on the bottom screen
(`InGamePanel.openRight`, `openBottom`); `open()` starts with `InGamePanel.instead` (one menu at the right: the swipe and the controls' button open it).
`peanuts/UPSTREAM-EDITS.md` "In-game menus".
3. **Settings go through upstream's own mechanisms**: `env.txt` keys named `PN_*`, `settings.tsv` rows, `DM_CTL` lines. No new settings UI inside upstream classes.
4. **Never reformat or "fix" upstream files.** A general fix belongs upstream as a PR to Banana Native (its AGENTS.md prefers general changes), then it arrives by rebase.
5. **Branches:** `upstream/android` is Banana Native; `peanuts` is this overlay, always a linear set of commits on top of a Banana Native tag. History is rewritten on every update (rebase, never merge).
Expand Down
5 changes: 5 additions & 0 deletions android/NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ atomics in `AstOptimizer.cs`, of else-ifs for SPIR-V and of TMML's negative LOD,

The six default Miis (`mii_defs` in `dm/host/hle_mii.c`, `MiiStore.DEFAULTS` in the launcher's Mii editor) are the console's default Mii parameters as [Ryujinx](https://github.com/Ryubing/Ryujinx) (MIT, Copyright (c) Ryujinx Team and Contributors) and [Eden](https://git.eden-emu.dev/eden-emu/eden) (`src/core/hle/service/mii/types/raw_data.cpp`, GPL-3.0-or-later) hold them, converted to CharInfo values; the MIT permission notice is in [dm/third_party/ryujinx/LICENSE.txt](../dm/third_party/ryujinx/LICENSE.txt). Thanks to them. <!-- PEANUTS -->

The launcher reads, checks and writes cheat files in the Mistel Native Cheat Format (`.mncf`, packs `.mncp`) with the Java library of
[Mistel](https://github.com/davdxpx/mistel)'s `format/` folder by davdxpx and the Mistel contributors (MIT: "Copyright (c) 2026 davdxpx and the Mistel contributors"),
copied unchanged into `android/app/src/main/java/io/github/davdxpx/mistel/` with its permission notice there (`LICENSE`) and the commit it came from (`MISTEL.sha256`).
Only that folder of Mistel is MIT; nothing of its GPL parts is in this repository. <!-- PEANUTS -->

The launcher draws the Miis (`android/app/src/main/java/dev/peanuts/mii/`) with the colour tables and the face's layout of [vee](https://github.com/j0lol/vee) by Jo Null (MIT or Apache-2.0, used here under MIT: "Copyright (c) Jo Null"), which took them from the decompilation of the Wii U's face library (FFL), and `MiiPixels.java` ports the BC4, BC5 and BC7 decoders of [bcdec](https://github.com/iOrange/bcdec) by Sergii Kudlai (MIT: "Copyright (c) 2022 Sergii Kudlai"); the MIT permission notice is in [LICENSE](../LICENSE). The Mii parts themselves are read from the player's own firmware at run time and are no part of this code. Thanks to them. <!-- PEANUTS -->

Animal Crossing: New Horizons' 60 fps choice (Game settings, Frame rate cap) uses ["ACNH 60 FPS + SpeedFix"](https://github.com/tmouh/acnh-60fps) v1.4.5 by tmouh, under the Creative Commons Attribution-NonCommercial 4.0 International licence ([CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)): its main code patch for 3.0.3, converted to the rewriter's cut rows, and its four changed game files, converted to rows of changed bytes that the app applies to the player's own files (no game file is shipped). The mod's content is unchanged; `dm/games/01006F8002326000/speedfix60/NOTICE.md` says what was converted and how. The NonCommercial term applies to that data. Thanks to tmouh. <!-- PEANUTS -->
Expand Down
Loading
Loading