github tomvita/Breeze-Beta beta129.03
Watch instructions on emulators

pre-releaseone hour ago

Breeze beta129.03

Same gen2 fork (v0.21), HOME daemon (SwitchU 1.2.0o) and sys-ftp as beta129.02. Breeze.nro, the PC tools (pc_app.zip) and emuhost (now emuhost_0.4.zip) changed.

Breeze Studio's instruction watch (F8) and Memory used now work on a game in a stock emulator through emuhost, and stepping over an instruction a data watch catches no longer sticks there. emuhost writes a cheat's code once a pass, which took a game with two overlapping cheats from 96 stops a second to 3. Cheats with Breeze's C4 key are shown in Studio, and code-patch cheats may be wrapped in one. Studio also makes Breeze's recipe cheats.

Guides: Breeze Studio (the Code tab, Make cheat) and PC Connect (emuhost).


1. The instruction watch on emuhost

Studio's Code tab had the instruction watch (F8: which addresses one instruction uses, how often, and a hold for one of them) on a Switch, through gen2, and on the Lichii fork, run from the PC on its probe. On emuhost the pane was not shown: a stub breakpoint stops the whole game, so taking each run from the PC would hold the game for a network round trip every time.

emuhost now runs it itself (probe regwatch, cap regwatch). It puts its own breakpoint on the instruction; at each run it works out the address from the registers (base + (index << shift) + offset, with x, w, sp, fp and lr), counts it, steps off and lets the game run on. Studio only reads the rows.

  • Hold: the game stays stopped at the line the first time it uses the picked address; Continue in the Debug row runs on.

  • Memory used catches the registers the next time the line runs, as on the Lichii fork.

  • The watch comes off by itself after 20,000 runs (probe regwatch max), and F9 on a watched line is refused while it runs.

Measured on Disney Dreamlight Valley 1.26.1 in upstream Lichii: on the store of a frame counter (M+E0010) the hits matched the counter's increase exactly (15 and +15); on UnityEngine.Object::op_Equality (stp x29, x30, [sp, #-0x40]!) 107 runs a second, each address sp - 0x40; the hold stopped the game at the chosen address; a 200-run limit came off at 200. Every run stops the game for a moment, so a line that runs thousands of times a frame slows it.

2. Step and Run over a watched access (emuhost)

In a stock emulator a finished single step wins over a data watch: when the stepped instruction touches a watched address, the emulator rewinds it unrun and reports only "step done". emuhost took that at its word, so Step stayed on the line for ever, Run from a breakpoint there hit the same breakpoint again at once, and the Watch tab never saw the access. A step that leaves the pc where it was while watches are set is now taken as a watch hit: recorded, then run with the watches off.

Testing found a second bug on that path: the breakpoint went in twice, the stub then kept its own BRK as the instruction to give back, and taking the breakpoint off left D4200000 in the game's code. It goes in once now. Also, quitting emuhost (Ctrl+C) takes its breakpoints out, not only its watches.

Checked on the same game: Step moved to the next line and recorded the write; three Runs went one frame each and counted three hits; after Stop and after quitting with a breakpoint set, the game's instruction was back.

3. One code write per pass (emuhost's cheat VM)

Each write into code goes through the emulator's stub and stops the game for a moment, so emuhost already skipped a write of bytes that were there. Two cheats that write the same instruction every pass, one patching the other's cave, defeated that: the word changed twice a pass. On Disney Dreamlight Valley, "Clear nearby weeds" and "Whole area" did that to four words, 8 writes a pass, 12 passes a second: the emulator's log showed 96 stops a second.

The VM's writes into code are now kept to the end of the pass and written once, in the order first written (a cave still goes in before the branch to it), and only where the bytes change. The same cheats: 3 stops a second.

4. C4 key cheats

Breeze's extended keypress condition (C4r00000 kkkkkkkk kkkkkkkk: a 64-bit mask; r = 1 while the keys are held, 0 once a press), which Make cheat writes, had two gaps.

  • Studio's "What it does" said "an opcode this view does not know". It now reads if keys held: R or if keys pressed (once a press): ...; the Cheats list marks the cheat ", key", and the ASM line steps over the key.

  • Code-patch cheats (the C046E5E0 block of beta129.02) were only found when an 8 key wrapped them, so a C4-keyed one did not get its originals back when turned off. The key is now its words, one or three: core/code_patch.hpp (Breeze, emuhost) and studio/code_patch.py. Breezehand and the in-game cheat VM module have the same change in their own repositories, for their next builds.

5. Breeze Studio: Make cheat

The Cheats tab has Make cheat..., Breeze's Cheats > Make cheat on the PC: pick rows of a recipe's table (make_cheat.ini in the game's folder), fill in the values it asks for and the key, and the cheat is added on, replacing one of the same name, and saved to SD. Breeze's rules: a recipe that holds addresses must name this build, and the cheat it requires must be loaded (it is turned on when off). Studio does not build a missing required hook from its script; make it in Breeze once. Names from the cheat source file's [build] section are Breeze only. Used on Disney Dreamlight Valley: Get Golden Apple made twice left one copy.

6. Breeze Studio: the instruction watch pane

  • A divider between the listing and the watch pane; its height is remembered.

  • A # column, and "N rows, M hits" in the pane's line.

  • Show as: auto, u8 to u64, s8 to s64, f32, f64 (each row reads 8 bytes).

  • A new offset applies on Refresh or Enter while the watch runs: the rows show the register plus that offset, and a hold still matches the address the instruction used.

7. emuhost 0.4

  • The instruction watch, Step and Run over a watched access, one code write per pass and C4-keyed code patches, above. Quitting with Ctrl+C takes breakpoints and watches out; killing it from the Task Manager can leave the game stopped, and the emulator then closes its stub until the game restarts (the README says so).

Don't miss a new Breeze-Beta release

NewReleases is sending notifications on new releases.