Breeze beta129.02
Same gen2 fork (v0.21), HOME daemon (SwitchU 1.2.0o) and sys-ftp as beta129.01. Breeze.nro, the PC tools (pc_app.zip) and emuhost (now emuhost_0.3.zip) changed.
A cheat that patches the game's code in place now carries the game's own instructions with it, so Breeze can put them back when the cheat is turned off: no separate "restore" cheat, and one cheat can patch any number of places, in main or in a loaded module. Breeze Studio makes them, shows ASM cheats as ASM, and gains a Workbench that follows one address from its value to the code that changes it. emuhost puts the originals back too.
Guides: Breeze Studio (Workbench, the address menu) and PC Connect (emuhost).
1. Code-patch cheats that keep the game's instructions
Turning a code-patch cheat off stops the cheat VM writing; it never puts the game's instruction back. Breeze could already undo an ASM cheat whose first two lines write one address (the original, then the hook), but a cheat that patches several places had to ship a "restore" cheat beside it. The new form puts every original first, in a block no cheat VM runs:
[Name]
C046E5E0 if R14 != R14: never true
04000000 AAAAAAAA ORIGINAL_A the game's instruction at A
04000000 BBBBBBBB ORIGINAL_B
20000000 end of the block
04000000 AAAAAAAA HACK_A what the cheat writes
04000000 BBBBBBBB HACK_B
-
The block holds only 4-byte code stores, each address once, and every address in it is written again later in the cheat. A keypress conditional may wrap the whole cheat.
-
The marker is C046E5E0, not C046F5F0: Breeze already hands old-style ASM cheats to dmnt as
C046F5F0 | original | 20000000 | ... | hook, so a one-address cheat made with C046F5F0 would come back as the old pair. -
dmnt, Eden's VM and the in-game cheat VM all skip the block. The parser is one header,
core/code_patch.hpp, used by Breeze and emuhost; Studio has a Python copy. -
ASM cave cheats keep their layout (original, branch, cave): much of Breeze reads that pair, and dmntcht.c already runs them cave first and branch last.
2. Turning them off, making them, merging them (Breeze)
-
Three steps, as an ASM cheat: X on; X off for the cheat VM with the patches still in the game (the row turns green); X a third time writes every original back. Turn off all and Clear ASM space restore them too. An original is written only where the word in the game is the cheat's patch: a word holding anything else (another cheat's code, a wrong R1) is left alone.
-
Patch into cheat (ASM Explorer, ZL+B): type what the instruction becomes and the cheat it goes into. A new name makes a new cheat (off); the name of a code-patch cheat adds this patch to it.
-
Merge into (Cheats menu): moves a cheat's patches into another cheat. It reads the block form, the old pair, and a cheat of plain code stores with its " - restore" cheat. Naming the cheat itself converts it in place; what is merged away goes onto the clipboard (Paste puts it back). Different conditional keys, or different originals for one address (cheats made on different builds), are refused.
-
Watch ASM on such a cheat watches the first original (it took line 1, now the marker).
3. Patches in a loaded module (R1)
Some games keep their code in a module loaded at run time, reached through R1, which the master cheat sets (04010000 stores). Code-patch cheats work there too: Patch into cheat in ASM Explorer writes R1 stores when it shows that module, and Merge into and the third X handle them. With no master cheat setting R1 they are refused rather than written to the wrong place. PC connect's meta now gives r1 and r1_size.
4. For players without Breeze
-
Write Cheat to atm adds a " - restore" cheat after each code-patch cheat that has none: plain stores of the originals, for cheat tools that do not read the block. dmnt's 128-cheat limit is kept.
-
Breeze's own cheat file leaves out such a cheat when it is exactly what would be generated (it came back from the atm file), so they do not pile up. One written by hand is kept.
5. Breeze Studio: the Workbench and one address menu
Making a cheat is find the value, test it, see what code writes it, patch or hook that code. Those steps were in four tabs, with the address carried by hand.
-
Workbench (a new tab): one address followed from its value to the code that changes it. The value live (hex, integer, float) with Edit, Hold and Bookmark; who reads or writes it (the Watch tab's watch: gen2 on a Switch, the probe on the Lichii fork, emuhost) with where it was called from; the picked instruction with the code around it and Open in Code, Patch this instruction and Hook here; and the cheats that write the address or that instruction.
-
One address menu: right-click any address in Memory, Objects, Search, Bookmarks or a cheat's What it does line for the same entries: Work on this address, Open in Memory, Open in Code, Field view, Watch who reads or writes it, Find pointer chains, Copy address.
-
Measured in Lichii on Disney Dreamlight Valley: a frame counter at M+B94B138 (about 50 a second) watched to its writer,
str w10, [x8]at M+E0010, and Patch this instruction opened on it from the Workbench.
6. Breeze Studio: cheats
-
Patch this instruction (Code, right-click): suggestions worked out from the game's own instruction (subtract nothing, add instead, always true or false, always or never jump, nop), assembled with keystone. It makes one cheat in the form of section 1, or adds to an existing one; in the module R1 points at it writes R1 stores.
-
What it does shows an ASM cheat as ASM: a summary line ("ASM hook at main+5B5BE50, branching to a cave at main+9ADFD40 (107 instructions ...)"), each 8-byte cave line as its two instructions, and branch targets as main+X. A code-patch cheat gets its own summary line.
-
The list has each cheat's number (the one
cheats on 7takes) and a kind column: ASM, patch, code, pointer or value, with ", key" when a button gates it. -
Merge into..., Off and Turn off all put a code-patch cheat's originals back, Export .txt adds the restore cheats of section 4, and Load from SD reads the game's cheat file again (PC connect
cheats load). -
Hook here writes the cave as 8-byte stores, so a 100-instruction cave fits a cheat's 256 words.
7. Breeze Studio: watching, code and the window
-
Watch: rows carry the call chain from the Lichii probe; "called from" is the first frame in the game's own code. Hold at the next hit (this call path or any), step out to a frame, go to Code.
-
Code: other code modules show and go as sdk+X. One toolbar row (Back / Forward, Function up / down, Callers, Decompile, Find); Reload, Memory used, Copy, Save, the words and the font size under More; the Debug row only on a host with a debugger.
-
Search: Inc N+ adds value * (k+1) to row k, as Breeze's Inc1000, so the copy the game shows tells which one drives it.
-
Objects: Field view no longer fails; a generic instance the map does not list is laid out from its class in memory.
-
The window: the version is in the title bar; the open tab is blue; tabs leave out their own TID / BID line (the title bar names the game); a tab detaches into a window of its own (double-click it) and docks back when closed; closing Studio ends it (tool threads kept windowless Studios alive). A script can drive Studio over 127.0.0.1:6810 (
studio/studio_remote.py).
8. emuhost 0.3
-
A version number: on the start line,
emuhost --versionand the PC connect banner (0.2). This release ships 0.3 asemuhost_0.3.zip. -
It puts a code-patch cheat's originals back when the cheat goes off, in main and in an R1 module (R1 from one pass of the master cheat alone).
cheats loadreads the cheat file again. -
Tested on stock Eden (master 6647b49): emuhost_run 0 failures, code pokes in 4 per-frame methods, and
core/emuhost/codepatch_run.py9 checks, 0 failures. -
The klass scan no longer loops for ever when the heap runs past the last mapping. The same file is in Breeze.