Repository navigation
PC SETTINGS in the game's Options screen: video, cheats and save states with the pad - #111
Merged
Merged
Conversation
…es with the pad A ninth line under the game's Options (after SAVE SETTINGS TO MEMORY CARD) opens pages drawn with the game's own font and steered with the pad: - Video: display mode, resolution, render scale, frame rate, anti-aliasing, texture smoothing, upscaling and its filter, texture pack, pause in background, fast forward; APPLY AND SAVE posts them to the window and writes video.ini (bozo::app::video::post). - Cheats: unlock everything, infinite health / ammo / energy (off, player 1, all players), no AI, weak enemies; at once (tmb::cheats::values / setValues, the F2 tab's switches). - Save states: the slot, LOAD, SAVE (the host's requests, the slot's picture through BozoEngine's captureStatePicture, as F5 / F7). Triangle or Circle goes back; the controls stay in F2. runtime/tmb_menu.cpp, from the game's code (uiOptions 0x1911F0): - uiGetInput's override (for the Options page's call, 0x19128C) lets the cursor (options_main_line) reach 8: every other use of the cursor is a compare, so 8 selects none of the game's lines. Cross there opens the pages instead of the game's accept-and-leave. - uiOptions' override draws the line after the game's page and, while the pages are open, draws them instead (the 3D shell stays the game's, its sliders hidden by blankSliders as the controls page does). - The game's font, sound and input functions run on a copy of the context (BozoEngine kernel.md section 3b): guest code there never leaves the override. Calling them on the thread's context let fontSpritePrint leave at a checkpoint and return later into uiMain on the pages' stack. - Only where the graphics are native (every free run); a save state's load closes the pages. BozoEngine at master 5d34d41 (#151's captureStatePicture, with the other ports' merges since f93b5af). Checked: the 11 native suites pass; the 1P (9,500) and 4P (8,500) replays match main 89d5306 on every recorded field, RAM image and sound, before and after the engine move; the pinned boot and match1p checks match (match1p 16000/16000 frames). Hidden window runs: the line, Up from DIFFICULTY onto it and Down off it, each page, render scale applied and saved, slot 0 saved (state and picture) and loaded, and 8,100 frames on the Video page without a fault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The F2 settings, except the controls, are now reachable inside the game itself. A PC SETTINGS line is added under the game's Options screen. It opens pages drawn with the game's own font and sounds, steered with the pad:
video.ini.Up and Down choose a line, Left and Right change a value, Cross opens a page or acts, and Triangle or Circle goes back. The controls stay in F2.
How it hooks the game. The Options screen is
uiOptions(0x1911F0); the details are in the header ofruntime/tmb_menu.cpp.uiGetInput's override, only for the Options page's own call, lets the cursor reach line 8.uiOptions' override draws the line after the game's page. While the pages are open, it draws them in the page's place.blankSliders, as the game's own Controls page does.kernel.md§3b), so guest code never leaves the override midway.fontSpritePrintcould then leave at a checkpoint and later return intouiMainon the pages' stack, which crashed hidden runs after about 100 frames on a page.Engine: BozoEngine moves to master 5d34d41. It brings #151's
captureStatePicture, used for the Save states picture, plus the other ports' merges since f93b5af.Checked:
video.ini;Not checked: real controller input in a shown window.
🤖 Generated with Claude Code