Skip to content

Improve diagnostics modal - #480

Open
networkfusion wants to merge 7 commits into
n64brew:mainfrom
networkfusion:improve-diagnostics-modal
Open

networkfusion wants to merge 7 commits into
n64brew:mainfrom
networkfusion:improve-diagnostics-modal

Conversation

@networkfusion

@networkfusion networkfusion commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Improve the flashcart diagnostic modal to make it more compatible with other flashcarts.

Motivation and Context

It will be needed to better support new ones, as the original implementation was too specific to the SC64.

How Has This Been Tested?

Tested on an SC64.

Screenshots

Types of changes

  • Improvement (non-breaking change that adds a new feature)
  • Bug fix (fixes an issue)
  • Breaking change (breaking change)
  • Documentation Improvement
  • Config and build (change in the configuration and build system, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

You agree with the license terms and that other license types may be granted with permission of the original N64FlashcartMenu project license holders.

  • I agree.
  • AI helped me.

Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>

Summary by CodeRabbit

  • New Features
    • Flashcart Information now indicates whether diagnostics are supported and shows available diagnostic readings, including input voltage and temperature.
    • Button status is shown as supported or unavailable, with the current pressed or released state when available.
    • SC64 information includes instructions for starting hardware diagnostics.
  • Bug Fixes
    • The startup warning now checks input voltage and reports when it is below the supported threshold.
  • Documentation
    • Clarified that the diagnostic-screen instructions apply to flashcarts that support menu diagnostics.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 28516f96-d6e2-4842-8e7b-910004a0627e
Commits

Reviewing files that changed from the base of the PR and between b7407c4 and 3d8eca1.

Files selected for processing: 10

  • CHANGELOG.md
  • docs/35_menu_information.md
  • src/flashcart/64drive/64drive.c
  • src/flashcart/ed64/ed64_vseries.c
  • src/flashcart/ed64/ed64_xseries.c
  • src/flashcart/flashcart.c
  • src/flashcart/flashcart.h
  • src/flashcart/sc64/sc64.c
  • src/menu/views/flashcart_info.c
  • src/menu/views/startup.c

No actionable comments were generated in the recent review.

Walkthrough

The flashcart interface replaces the combined voltage-and-temperature query with separate input-voltage and diagnostics queries. SC64 provides diagnostic readings. The menu displays button state and diagnostic entries, and startup checks input voltage.

Changes: Flashcart diagnostics

Layer / File(s) Summary
Diagnostics API and wrappers
src/flashcart/flashcart.h, src/flashcart/flashcart.c
The public interface adds labeled diagnostic records and separate input-voltage and diagnostics callbacks. Generic wrappers validate queries, report unsupported callbacks, and bound returned diagnostic data.
Flashcart callbacks and startup voltage
src/flashcart/sc64/sc64.c, src/flashcart/64drive/64drive.c, src/flashcart/ed64/ed64_vseries.c, src/flashcart/ed64/ed64_xseries.c, src/menu/views/startup.c
SC64 provides input-voltage and diagnostic callbacks. The other listed flashcart initializers set input-voltage callbacks to NULL. Startup uses the input-voltage query for its low-voltage check.
Menu diagnostics display
src/menu/views/flashcart_info.c, docs/35_menu_information.md, CHANGELOG.md
The menu displays button state and diagnostic label/value pairs, including empty-result and retrieval-failure messages. The documentation and changelog describe diagnostic support and SC64 hardware-diagnostics instructions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant flashcart_info
  participant flashcart.c
  participant SC64
  flashcart_info->>flashcart.c: Check diagnostic support
  flashcart_info->>flashcart.c: Request diagnostic entries
  flashcart.c->>SC64: Invoke diagnostics callback
  SC64-->>flashcart.c: Return labeled readings
  flashcart.c-->>flashcart_info: Return validated entries
Loading

Suggested labels: enhancement

Merge Risk: Minimal · previous review b7407

The change separates input-voltage and diagnostics queries and adds a diagnostics display for the flashcart information screen. Inspection found no concrete defects. Testing is reported only on SC64, so behavior on other flashcarts has not been verified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Improve diagnostics modal" matches the main change. The PR replaces the voltage/temperature readout in the flashcart information view with a generic, label-based diagnostics query (flashcar…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Improve diagnostics modal" matches the main change. The PR replaces the voltage/temperature readout in the flashcart information view with a generic, label-based diagnostics query (flashcart_has_diagnostics / flashcart_get_diagnostics) and updates the flashcart backends accordingly. The title is short and specific, though it does not mention the API generalization. The PR objectives describe the goal as making the diagnostic modal more compatible with flashcarts beyond the SC64, which the title reflects in general terms.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Simplify code

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0d8886a-32f1-48c8-b4aa-dc86c9878c8b
Commits

Reviewing files that changed from the base of the PR and between f5b27e9 and b7407c4.

Files selected for processing: 1

  • src/menu/views/flashcart_info.c
Files skipped from review as they are similar to previous changes: 1

  • src/menu/views/flashcart_info.c

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Improve menu LF
@networkfusion
networkfusion marked this pull request as ready for review November 19, 2026 23:05

This branch has not been deployed

No deployments
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.

1 participant