github tomvita/Breeze-Beta beta129.04
Breeze Studio on PC games

pre-releaseone hour ago

Breeze beta129.04

Same gen2 fork (v0.21), HOME daemon (SwitchU 1.2.0o) and sys-ftp as beta129.03. Breeze.nro differs from beta129.03 only in its version. New: pchost (pchost_0.5.zip); changed: the PC tools (pc_app.zip) and emuhost (emuhost_0.5.zip).

pchost is emuhost's sibling for a game that runs natively on the PC: Breeze Studio works on a 64-bit Windows game the way it works on a game in an emulator. Search, Objects, Memory, Bookmarks, Cheats, the Engine tab, the Watch tab with Break and trace, and the Code tab, which now reads x86-64.

Guides: Breeze Studio (PC games) and PC Connect (pchost).


1. pchost

core/pchost/pchost.exe is Breeze's PC connect server and shared core in a program of its own, attached to the game's process: Read/WriteProcessMemory for memory (a write into code lifts the page's protection for it), VirtualQueryEx for the mappings, NtSuspendProcess for pause, XInput for the buttons key cheats wait for. The search, the map builders, the engine scan and the cheat VM are the core's, unchanged.

  • Starting it: pchost with no name lists the programs that have a window, biggest first, and takes the game's number. A name may be part of the exe's name or of the window title (pchost elliot); a program with a window wins over a windowless one of the same name, because a game's launcher can stay running under it (Elliot.exe). It waits for the game, attaches, and waits again when the game closes.

  • The game as the tools see it: main is the exe's image; heap is the whole address space, so heap+X is the address X. The title id is FC and a hash of the exe's name (the same across updates); the build id is the exe's CodeView GUID, new with every build of the exe. The README says where each differs from a Switch's.

  • The SD card is pchost_sd next to pchost.exe (--sd for another folder): the game's folder and the cheat file are where they are on a Switch, under it.

  • Cheats: Breeze's cheat VM, 12 passes a second, on atmosphere/contents/<title id>/cheats/<build id>.txt; every cheat starts off unless toggles.txt names it, and the file is read again when it changes.

Measured on The Adventures of Elliot: The Millennium Tales 1.2.0.0 (Unreal Engine 5.6, a protected exe): the engine scan named the engine and its middleware in 4.6 s; uemap found GWorld at main+99425F0 and walked 200,424 objects, then 6,575 classes in 15.3 s; Studio's Objects tab followed the engine route to the player; a first u32 search of all writable memory took 26 s; an infinite HP cheat made in the session held through damage.

2. The data watch, break and trace on a PC game

pchost serves the Watch tab's data watch (emuhost's probe data replies) and the Lichii fork's break and trace (probe held, break, step, over, cont, trace, out, setreg), so Studio's Break and trace panel and the Code tab's Break (F9), Run to, Step, Over and registers work on it.

  • It attaches as the game's debugger only while a watch or a breakpoint is on, and detaches when the last one comes off.

  • Both use the CPU's four debug registers, shared: a breakpoint is an execute breakpoint, so the game's code is never written (a protected exe may check it). The thread that reaches it is held and the others run on; step and trace use the trap flag; over and out put a breakpoint of their own on the return address.

  • A data watch fires after the instruction has run, so a row's pc is the next instruction; the code beside the row marks the one that made the access. Call chains come from the game's unwind tables.

On Elliot a watch on the player's HP caught 181 reads in 3 seconds (one a frame) with a 12-frame call chain, and a breakpoint on the reader held the game thread, traced 30 steps over calls and let it go.

Two crashes of the game (exception 0x80000004, a debug exception nobody took) were found on the way and fixed. Killing pchost with a watch on leaves the watch in the game's threads: quitting with Ctrl+C or closing its window now waits until it is out (a kill cannot be caught; the README and pchost itself say so). Detaching with a hit already queued handed that hit to the game, and rewriting the debug registers cleared the flag that said which one had fired, so a hit looked like the game's own: the queue is now drained before detaching, and a hit with no register named is taken as pchost's. A test program whose four threads run the breakpointed function non-stop crashed on the first cycle before the fix and ran 60 cycles of break, trace, clear, continue and watch after it. A trace started after the last breakpoint was cleared stood still (Windows keeps no debug registers for a thread with none enabled, so the step came without its flag); it runs now. pchost prints watch: a single step not ours for any debug exception it passes to the game.

3. Breeze Studio on x86-64

  • Code tab: on a host with x64 in caps the listing is x86-64: functions from the exe's .pdata (504,374 on Elliot, read in 1.5 s), instructions decoded from the function's start, calls and jumps named, [rip+X] shown as the address and what is there, Callers found on the PC (every call and jmp rel32 to the function: 1.5 s the first time, 0.5 s after). Elliot's exe has its sections renamed by a protector; the first executable one is taken as the game's code. Patch, Hook, the F8 instruction watch and the C pane are ARM64 tools and stay off.

  • Registers: the Code tab's pane and the Break and trace panel show rax..r15, sp, pc and eflags; the trace lists the registers each instruction changed.

  • Watch tab: the code beside a data row is decoded as x86-64, and the tab offers watch lengths of 1, 2, 4 and 8 bytes there.

4. Shared core: 64-bit values in the maps' logs

The core's map files print 64-bit values with %lX; long is 32 bits on Windows, so a host (emuhost, pchost, the Lichii fork's core) printed their low halves in ue_root_log.txt and the field map's header (UWorld=0x001E9B6730 for 0x11E9B6730). The core's fprintf and snprintf read %l as %ll on hosts now, as its logtext already did. Breeze on the Switch is not affected. emuhost 0.5 (emuhost_0.5.zip) is emuhost 0.4 built with this change and nothing else.

Tested

  • The Adventures of Elliot 1.2.0.0 (Steam, Windows 11) with pchost and Breeze Studio: everything in sections 1 to 3.

  • A test program with four threads running one function non-stop: 60 cycles of break, trace (plain and over), clear, continue, data watch and detach; Ctrl+C while a thread was held and during a 10,000-step trace left it running.

  • emuhost 0.5 builds and reports its version; it was not run against a game in this release.

Not tested

  • Another PC game: a Unity game (the IL2CPP maps), a game with anti-cheat, one run as administrator. A 32-bit game is refused.

  • The Breeze.nro of this release on a Switch (its code is beta129.03's).

Don't miss a new Breeze-Beta release

NewReleases is sending notifications on new releases.