N64FlashcartMenu/docs/00_index.md
XLuma c27f15ef0e
[develop] Add inital datel cheat support from filesystem (#204)
## Description
This pull request adds a file parser for cheat code support.
If a file named the same as the selected rom with the extension .cht is
found, it will attempt to parse the file for cheat codes and place them
in `menu->boot_params->cheat_list` per the cheat backend API.

Cheat files should be formatted this way:
```
# Super mario 64 infinite lives
8033B21D 0064

# 120 stars
80207723 0001
8020770B 00C7
50001101 0000
8020770C 00FF
```

The parser ignores lines that start with a '#', are under 12 characters
or over 15 characters. Every other line should be valid cheat code
inputs with the code on the left, and the value on the right separated
by a space.

## Motivation and Context
<!--- What does this sample do? What problem does it solve? -->
Adds some initial cheat support in the frontend to allow users to modify
their games more easily, and take advantage of the backend API.

## How Has This Been Tested?
Tested on real hardware with a Summercart64 and Super Mario 64.

## Screenshots
<!-- (if appropriate): -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Improvement (non-breaking change that adds a new feature)
- [ ] Bug fix (fixes an issue)
- [ ] Breaking change (breaking change)
- [x] Documentation Improvement
- [ ] Config and build (change in the configuration and build system,
has no impact on code or features)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

<!--- It would be nice if you could sign off your contribution by
replacing the name with your GitHub user name and GitHub email contact.
-->
Signed-off-by: XLuma 


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

## Summary by CodeRabbit

- **New Features**
	- Added support for loading and managing cheat codes for N64 ROMs
	- Introduced ability to enable/disable cheats for specific ROMs
	- Added file type recognition for `.cht` cheat files

- **Documentation**
- Updated documentation with details about cheat code support, including
Datel cart compatibility and supported code types

- **Bug Fixes**
	- Implemented comprehensive error handling for cheat file loading
	- Added file parsing support for cheat codes

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

---------

Co-authored-by: Robin Jones <networkfusion@users.noreply.github.com>
2025-01-22 18:51:16 +00:00

1.3 KiB