Skip to content

Commit

Permalink
Don't flash save the default theme, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
epbarger committed Mar 5, 2023
1 parent 6df688e commit 7135dd8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,19 @@
- Counts number of button inputs per button
- Warns if your d-pad produces invalid input (more than two directions pressed at once)
- Produces pleasant tones
- 16 different color themes
- Tastes and smells better than the competition

## Color Themes

To customize your color theme...

1. Enter the "Secret Menu" by inputing the Konami Code - `Up Up Down Down Left Right Left Right B A`.
1. Scroll through the different color themes with the left and right directional buttons.
1. Press a non directional button to exit the menu and save your selection.

### Notes On Saving

Better Button Test saves your theme selection using your cartridge's save memory. If your cartridge does not have save memory, your theme selection will not persist. However, Better Button Test _does_ support battery-less saving on cartridges using SST39SF010 flash memory, a relatively popular chip for simple homemade cartridges. This is accomplished by using flash programming commands to alter the rom stored in the flash memory.

If your cartridge does not have save memory, and your flash chip is not a SST39SF010 series chip, you have the option to customize the theme by altering the rom file prior to flashing. To select your theme, change the byte at location `0x7FFF` from `0xFF` to a number between `0x00` and `0x0F` that correlates to the index of the theme you'd like to use.
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ void wipeFlash() {
void saveSettings() {
*ramId = RAM_ID;
*ramTheme = themeIndex;
if (*ramId != RAM_ID) saveFlashViaMem();
if (*ramId != RAM_ID && (usingFlashSave || themeIndex > 0)) {
saveFlashViaMem();
}
}

void loadSettings() {
Expand Down

0 comments on commit 7135dd8

Please sign in to comment.