Breeze beta128.00
Same gen2 fork (v0.20). Nothing in the fork changed, so there is no need to reinstall it. The HOME daemon in this package is SwitchU 1.2.0o: install it from Settings (HOME daemon) for section 2.
When a game is updated, its cheats no longer stop working until someone ports them. Breeze now keeps a copy of each build's code, and when it attaches to a new build that has no cheat file, it moves the old build's cheats across by itself and writes the new cheat file. On Well Dweller's update from 3C16607B927ECAE3 to 9800A62AB3E6716B, all 28 cheats moved in 2.8 seconds, and the ones tried in the game worked. The release also brings Breeze up as the overlay as soon as it starts over a game, adds a key to pause or run the game under the overlay, and adds sys-ftp commands for driving the console from the PC.
Guides: HOME toggle and overlay, PC connect.
1. Cheats follow a game update
Why a copy is needed. After an update the old build's code is gone from the console, and porting a cheat means comparing the code around each address in the two builds. So the old code has to be saved while that build is still the one installed.
Code dump. At attach, a game that has a cheat file (<BID>.txt or <TitleID>.ini), or a dump of an earlier build, gets its build saved in the game folder's codedump/: main's code and read-only data (main_<BID>.bin.gz), main's .data/.bss (data_<BID>.bin.gz), each loadable module's code, and on GameMaker the engine's names (gm_<BID>.txt: the global object's slot, every global's slot, every variable id's name). It runs once per build on a background thread and the game keeps running. FFRS: 104 MB of code into a 46.5 MB file in 12 s. Well Dweller: the new build's code in 6.2 s, its data (12.4 MB) into 548 KB in 0.4 s, 1,236 globals and 5,068 variable names in 1.6 s. Game information shows how far it got. The last two builds are kept: [code dump] keep in config.ini (and enable = 0 turns it off).
Cheat update. When the running build has no cheat file and an earlier dumped build has one, Breeze moves that build's cheats and writes <BID>.txt; the Cheats screen then loads it as it loads any cheat file.
- A code patch: the old code around it is found in the new build with the fields that change when code moves left out (branch and page offsets, stack frame offsets); the smallest stretch that matches once wins. A word that was the game's own becomes the new build's word there; a branch is re-encoded to reach what it reached before.
- A code cave (code written where the old build had free space): placed in free space of the new build by the cave planner, every PC-relative instruction in it re-encoded, ADRP together with the instruction that completes it.
- Breeze's data area at the end of main moves with the end of main.
- Other static addresses: through the code that loads them, matched like code; all the answers must agree.
- GameMaker: the global object's slot, the global slots in a pointer chain from it, and variable ids in a cave's data, matched by name between the two builds. The update renamed 13 of the 15 player variables and moved 19 of the 22 globals the cheats use, which no code match could have found.
Cheats already loaded in dmnt have written into the game's code, and dmnt never puts the game's words back. Those words count as unknown when matching, and the game's own word comes from the new build's dump.
A cheat with anything left unresolved is not written. cheat_update.txt in the game folder says, cheat by cheat, what moved and how, and what did not: the starting point for porting the rest by hand or with an AI over PC connect. PC connect cheatupdate does the same on demand; when the build already has a cheat file, the result goes to <BID>_updated.txt.
Checked in the game on the new build: the hook of Player pointers ran and its cave stored all 15 player variable pointers, each equal to the address Breeze's GameMaker view gives; Speed x2 doubled the walk and run speed; Infinite HP put health set to 8 back to 15. The file Breeze wrote by itself at attach was byte for byte the one cheatupdate wrote.
2. Overlay mode: over the game from the start
With the Home toggle on Overlay, Breeze started over a running game came up full screen, over the suspended game; it took HOME to the game and HOME back to get the overlay. Now Breeze asks the HOME daemon for the overlay once its start-up work for the game is done (code dump, cheat update), and the daemon makes it the overlay at once. It waits for that work on purpose: during it Breeze does not read the daemon's messages, and a command sent then would time out.
This needs the HOME daemon of SwitchU 1.2.0o (interface 6), which is in this package. With an older daemon nothing changes. Checked on the console: Breeze started by HOME over Well Dweller went from full screen to the overlay in about a second, and so did Restart Breeze; HOME then hid and showed it as before.
3. Toggle overlay pause (ZR+Y)
Focused Actions (L+ZR) has a new button, Toggle overlay pause on ZR+Y. It switches the Settings entry Overlay pauses game, and while the overlay is shown it pauses or resumes the game at once, so the choice also holds for the next HOME. The Settings entry now takes effect at once too. Checked with two of Well Dweller's timers: they stopped and ran again with each press, and the next HOME followed the setting.
4. Driving the console from the PC: sys-ftp and PC connect
The sys-ftp in this package has new FTP commands:
HOMEpresses HOME through a virtual controller. After a game is started or restarted, Breeze is not running until HOME is pressed; this starts it from the PC. Checked after sleep and after a game restart.MEMlists each memory pool (used, total, free) and the processes using the most memory. Read it when Breeze or the menu will not start, before a reboot clears the cause: once, after a long sleep, every applet start failed out of memory.KEY <buttons>presses buttons in turn,+for buttons held together:KEY A,KEY DOWN DOWN A,KEY ZL+ZR. A game that asks for a user stops at the user picker;KEY Aanswers it. Checked on Well Dweller's picker.
PC connect ftp <command> runs one sys-ftp command and returns its reply. The PC app has a System... window with buttons for Memory, Running title, Account, HOME, Terminate, Reboot and Shut down, and a box for any other command. The window talks to sys-ftp directly, so it works when Breeze is not running.
Found on the way: REBT can fail with spsmInitialize() 0x615 while Breeze runs; exit Breeze first.
Not tested on the console
- The cheat update of a game with loadable modules, or on Unity / Unreal: there only code matching and the static-address step apply; the engine-name step is GameMaker only.
- Dropping the oldest dump when a third build comes (
keep). - A game with no cheats getting no dump.
Generated Files
codedump/in the game folder:main_<BID>.bin.gz,data_<BID>.bin.gz,<module>_<BID>.bin.gz,gm_<BID>.txt(GameMaker), and the indexcodedump.txt.cheat_update.txtin the game folder: what the last cheat update did, cheat by cheat.<BID>.txtwritten by the cheat update, or<BID>_updated.txtfrom PC connectcheatupdate.