Skip to content

Conversation

@forkymcforkface
Copy link

@forkymcforkface forkymcforkface commented May 7, 2025

Description

This PR adds the ability to change in the UI:
Hide Rom file extensions
Hide ROM Tags
Hides Dir '/' (no setting for it)!
Hide all saves folders

Moved:
Load progress bar to UI option

Motivation and Context

Cleans up the UI for those that don't need all information

How Has This Been Tested?

Tests were run on SC64 on Original N64. small change was made to load_rom.c to catch a crash.

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.

Signed-off-by: [email protected]

Summary by CodeRabbit

  • New Features

    • Added settings to hide file extensions, ROM tags, and the saves folder in the file browser.
    • New options are available in the settings menu to toggle these visibility preferences.
    • The file browser and settings editor interfaces reflect these new customization options for improved user control.
  • Style

    • Improved formatting and clarity in the settings editor display text.

added hide options for:
extensions
rom tags
save folder

moved show loading bar option to change in ui

load_rom.c modified to catch crash
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 7, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Three new boolean settings—hide_extension, hide_rom_tags, and hide_saves_folder—were added to the settings structure and integrated throughout the menu system. These settings are loaded, saved, and exposed via the settings editor UI, affecting how files and folders are displayed in the browser, including logic to optionally hide file extensions, ROM tags, and the saves folder.

Changes

File(s) Change Summary
src/menu/settings.c, src/menu/settings.h Added three boolean fields (hide_extension, hide_rom_tags, hide_saves_folder) to the settings structure; updated logic to load and save these fields from/to the configuration file.
src/menu/views/browser.c Added helper functions to strip file extensions and ROM tags; updated directory and file rendering logic to hide extensions, ROM tags, and the saves folder based on settings.
src/menu/views/settings_editor.c Integrated new settings into the settings editor UI, including setter functions, context menus, and display text; updated logic to handle and reflect the new settings.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SettingsEditor
    participant Settings
    participant Browser

    User->>SettingsEditor: Opens settings menu
    SettingsEditor->>Settings: Loads current settings
    User->>SettingsEditor: Changes hide_extension/hide_rom_tags/hide_saves_folder
    SettingsEditor->>Settings: Updates and saves new setting
    SettingsEditor->>Browser: Triggers browser reload (if needed)
    Browser->>Settings: Reads updated settings
    Browser->>Browser: Applies hiding logic when displaying files/folders
Loading

Suggested labels

enhancement

Poem

Three new toggles, hop and hide,
Extensions gone, let tags subside.
The "saves" folder, now out of sight,
Browsing menus feels just right!
With every tweak, the view refines—
A rabbit’s joy in tidy lines.
🐇✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@networkfusion
Copy link
Collaborator

networkfusion commented May 9, 2025

Given there is no real convention for ROM Tags, I am not sure if it is a great idea (given your current implementation), so would require extensive testing. Fully support the "hide save folders" and "hide ROM extensions" though.

@networkfusion
Copy link
Collaborator

#203 #235

@forkymcforkface
Copy link
Author

Given there is no real convention for ROM Tags, I am not sure if it is a great idea (given your current implementation), so would require extensive testing. Fully support the "hide save folders" and "hide ROM extensions" though.

I was looking at the code and it can be refactored into file_list.c which will be much cleaner if you are ok with reviewing those chsnges.

I implemented this code because Hiding ROM tags is a part of many emulation front end scrapers and metadata editors.

EmulationStation
RetroPie
Batocera
LaunchBox / BigBox
Pegasus
RGB-Pi UI

@networkfusion
Copy link
Collaborator

networkfusion commented May 15, 2025

In the latest develop commits, I have wrapped the autoload functionality in ifdef flags, so you can keep the progress bar changes, but keep them in the ifdef's...

@forkymcforkface
Copy link
Author

hmm moving it back into ifdef broke it. Im just going to remove it. No time to develop this further.

@networkfusion
Copy link
Collaborator

hmm moving it back into ifdef broke it. Im just going to remove it. No time to develop this further.

Only this bit:

image

@forkymcforkface
Copy link
Author

ok, nvm figured it out.

@forkymcforkface
Copy link
Author

Thank you @networkfusion for the review. I do not have a dev background so I kinda flail at this stuff.

@networkfusion networkfusion added the enhancement New feature or request label May 30, 2025
@networkfusion networkfusion force-pushed the develop branch 6 times, most recently from 3302dc6 to 7b68b2f Compare July 7, 2025 20:01
rasky and others added 5 commits July 22, 2025 12:46
This improves emulation of cold boot, as otherwise the FPU might start
in an unexpected state.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Improved initialization procedures during system boot for enhanced
stability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
This allows the menu to boot ROMs with 1 MBit saves.

## Motivation and Context
Without this I get "Error occured during save loading" when trying to
load a ROM using this save type in the header.

## How Has This Been Tested?
From a libdragon install, run `ed64romconfig --savetype sram1m file.z64`
on any ROM to change the header byte, then try to load it in the menu.
With the patch, the ROM should load successfully. Sample using a test
ROM here:

[test_sram1m.zip](https://github.com/user-attachments/files/21261604/test_sram1m.zip)

## Screenshots
None

## Types of changes
- [ ] Improvement (non-breaking change that adds a new feature)
- [X] 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:
- [X] 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.
- [X] All new and existing tests passed.

Signed-off-by: lategator <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved compatibility for games using the 1Mbit SRAM save type,
ensuring proper save data handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Robin Jones <[email protected]>
@networkfusion networkfusion force-pushed the develop branch 13 times, most recently from 2fd7dd7 to bfb4e22 Compare October 7, 2025 21:42
@networkfusion networkfusion force-pushed the develop branch 2 times, most recently from c8e5336 to 4fb877a Compare November 10, 2025 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants