Skip to content

feat(frontend): Debug -> ROM Info panel (v1.20.0)#116

Merged
doublegate merged 2 commits into
mainfrom
feat/v1.20.0-rom-info-panel
Jul 15, 2026
Merged

feat(frontend): Debug -> ROM Info panel (v1.20.0)#116
doublegate merged 2 commits into
mainfrom
feat/v1.20.0-rom-info-panel

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Summary

  • New Debug -> ROM Info panel: read-only CRC32/SHA-256/header decode of the loaded cart (crates/rustysnes-frontend/src/debugger/rom_info_panel.rs), following the existing debugger/*.rs panel module pattern.
  • RomInfo is captured once per ROM load/close (native OpenRom/CloseRom and the wasm32 file-picker path), not recomputed every frame like DebugSnapshot -- a loaded ROM's identity/header never changes while it stays loaded.
  • rustysnes_cart::header::Header gains a decoded title: String field -- Header::parse already had the raw 21-byte title bytes in hand for its own coprocessor-disambiguation title match, this just surfaces them for display.
  • Closes the "small catch-up" item named in the 2026-07-15 lockstep-check entry (RustySNES had no ROM Info panel; RustyNES does).

Part of the Phase A UI/UX-parity ladder (see #113/#114/#115 for the sibling wasm-demo/peripheral-input/overscan fixes).

Test plan

  • cargo test --workspace --exclude rustysnes-android (475 passed)
  • cargo clippy --workspace --exclude rustysnes-android --all-targets -- -D warnings (clean)
  • cargo clippy -p rustysnes-frontend --all-targets --features full -- -D warnings (clean)
  • Per-feature clippy: debug-hooks, scripting, cheats, netplay, retroachievements, emu-thread (all clean)
  • cargo clippy --target wasm32-unknown-unknown -p rustysnes-frontend --no-default-features --features wasm-winit,cheats,debug-hooks -- -D warnings (clean except the confirmed pre-existing save_states.rs::base_dir finding, unrelated to this change)
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --exclude rustysnes-android --no-deps (clean)
  • cargo fmt --all --check (clean)
  • New unit tests: rustysnes-cart header title decode/trim (2 tests), rom_info_panel::hex_sha256 formatting (1 test)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 15, 2026 05:35

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new read-only "ROM Info" panel to the debugger, displaying key cartridge metadata such as CRC32, SHA-256, board name, map mode, speed, region, coprocessor, ROM/SRAM sizes, and header offsets. The metadata is captured once per ROM load or close to avoid redundant frame-by-frame computations. To support this, the rustysnes_cart::header::Header struct has been updated with a decoded title field, which utilizes a new best-effort ASCII decoding helper. The crc32fast crate has also been added as a dependency to calculate the ROM's CRC32 hash. As there are no review comments provided, I have no additional feedback to offer.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Debugger overlay panel to display ROM identity (CRC32/SHA-256) and decoded SNES cart header information, with ROM metadata captured on ROM load/close instead of recomputed each frame. Also surfaces the SNES internal title from the cart header for display and documents the new UI.

Changes:

  • Add Debug → ROM Info panel UI and wiring (RomInfo snapshot + panel rendering).
  • Capture/store ROM identity/header once per ROM load/close (native + wasm load paths).
  • Extend rustysnes_cart::header::Header with a decoded title: String and add unit tests.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/frontend.md Documents the new ROM Info panel behavior and data sources.
crates/rustysnes-frontend/src/ui_shell.rs Threads rom_info through shell rendering into the debugger overlay.
crates/rustysnes-frontend/src/debugger/rom_info_panel.rs New ROM Info panel implementation (field grid + SHA formatting test).
crates/rustysnes-frontend/src/debugger/mod.rs Registers the new panel and routes rendering based on selected tab.
crates/rustysnes-frontend/src/app.rs Stores/captures RomInfo on ROM load/close and passes it to the UI.
crates/rustysnes-frontend/Cargo.toml Adds crc32fast dependency for ROM CRC32 hashing.
crates/rustysnes-cart/src/header.rs Adds decoded title field to Header and tests for title decode/trim.
CHANGELOG.md Notes the new ROM Info panel and header title field under Unreleased.
Cargo.lock Records the added direct dependency linkage for crc32fast.

Comment thread crates/rustysnes-frontend/src/app.rs
Comment thread crates/rustysnes-frontend/src/app.rs
Comment thread crates/rustysnes-frontend/src/app.rs Outdated
Comment thread crates/rustysnes-frontend/src/app.rs Outdated
@doublegate
doublegate force-pushed the feat/v1.20.0-rom-info-panel branch from 74201ed to fc27015 Compare July 15, 2026 05:44
doublegate and others added 2 commits July 15, 2026 02:39
A read-only CRC32/SHA-256/header decode of the loaded cart, following
the existing debugger/*.rs panel pattern. RomInfo is captured once per
ROM load/close (not recomputed every frame like DebugSnapshot) since a
loaded ROM's identity and header never change while it stays loaded.

rustysnes_cart::header::Header gains a decoded title: String field --
Header::parse already had the raw 21-byte title bytes in hand for its
own coprocessor-disambiguation match, this just surfaces them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…g-hooks

Four real findings from review: a stale refresh_rom_info doc reference
(no such function exists), and RomInfo::capture (a full-ROM CRC32 +
SHA-256 hash) running unconditionally on every load attempt -- even
when debug-hooks is off (the only build where the panel is reachable)
and even on a failed load (which leaves the previous ROM running
untouched, making the recapture pure waste). Gated all three capture
call sites accordingly, reusing the existing "Loaded " status-prefix
success check the RetroAchievements block already established for the
native OpenRom path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@doublegate
doublegate force-pushed the feat/v1.20.0-rom-info-panel branch from 55985f4 to b7b98ef Compare July 15, 2026 06:40
@doublegate
doublegate merged commit 180c9c3 into main Jul 15, 2026
26 checks passed
@doublegate
doublegate deleted the feat/v1.20.0-rom-info-panel branch July 15, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants