feat(debug): add flag names, descriptions and multi-bank search to F8… - #166
feat(debug): add flag names, descriptions and multi-bank search to F8…#166alfonsoalvarohervas-sudo wants to merge 11 commits into
Conversation
|
The information for some flags isn't correct. I'm developing a debugging tool to get the mapping right. |
281d7db to
62cee17
Compare
|
Thanks — the F8 flag-name/search work is genuinely useful and the code is scoped and low-risk. Two things before merge:
Note: master CI was red for an unrelated reason (missing EGL/GLES dev packages on the Linux runners); that's now fixed on master, so once you rebase the checks should reflect your code. |
…Flags tab - Add optional flag notification system: when enabled, every flag set by the engine is printed to the terminal and shown as an on-screen toast. Hook lives in src/flags.c (SetLocalFlagByBank) → Port_Debug_OnFlagSet. Toggle is a session-only checkbox in the Flags tab, off by default. - Add "Show only active" checkbox to the Flags tab: filters the list to only show flags currently set to 1, compatible with the search filter.
- Added `"debug_flag_notifications"` to persistent configurations (`config.json`), defaulting to false on first launch. - Updated `Port_Config_SetDebugFlagNotifications` to write to config JSON and auto-save. - Enabled Virtual Terminal Processing (`ENABLE_VIRTUAL_TERMINAL_PROCESSING`) on Windows startup in `port_main.c` to support ANSI color escape sequences. - Updated flag change print statements in `port_debug_actions.c` to output in yellow text (`\033[33m`).
e0ad05d to
3319333
Compare
|
Thanks! I have successfully rebased the branch onto master and resolved the conflict in port/port_runtime_config.cpp (preserving both debug_flag_notifications and rando_dungeon_items, and keeping the updated kIntCfg block). Regarding the flag data, the mapping is already resolved (all flag names and descriptions should be right). Everything builds and boots clean on my end. The PR is ready for review. |
The Android build job was intermittently aborting with a 'double free or corruption (out)' error during parallel shader compilation, which is a known issue in xmake v3.0.9. Although the workflow pins the xmake version to v3.0.8, the setup-xmake action was restoring the in-use cached v3.0.9 version because the cache key remained 'android-apk'. Changing the cache keys to 'android-apk-v3' invalidates the stale cache, forcing a clean install of xmake v3.0.8.
|
This PR is now ready for review. Although there are still some undocumented flags, documenting them properly will take time as I need to figure out which ones get triggered while playing through the game. I’ll keep working on this gradually, and once I have enough documented, I’ll open a new PR. Whenever you have a moment, please take a look and let me know if anything needs to be changed. Hopefully, combined with the level editor, this feature will allow for much more freedom to explore the game and debug the port. Let me know if you need anything else! |
port/port_flag_names.cpp) that provides flag names and documentation strings.START,MACHI_SET_1).port/port_bios.cto prevent the GBA menu keyboard navigator from intercepting keystrokes when ImGui inputs are active (Port_ImGui_WantsTextInput()). This fixes an issue where pressing Backspace (to edit search text) or Escape would inadvertently trigger a menu exit/close.