Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GBA default RTC hardware #3069

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

felixjones
Copy link
Contributor

And also perform the Everdrive save type detection

If ROM isn't exists in bram-db then first char of ROM ID can be used as save memory selector:
1 - EEPROM
2 - SRAM
3 - FLASH-64
4 - FLASH-128
Number should be stored as char, eg 1 equal to 0x31 in hex format


Rationale

For developing homebrew with ELF binaries on mGBA: there is no mechanism for overriding the RTC other than forcing the game code to something like a Pokemon game.

Not all toolchains provide the ability for setting a game code for an ELF file (devkitArm and gba-toolchain, for example), so users are out of luck by default.

Modern flashcarts and other emulators assume the RTC is present.

As for the Everdrive stuff, the community settled on that standard, so it was a "might as well while I'm here" kind of thing. Willing to drop that commit.

@endrift
Copy link
Member

endrift commented Dec 12, 2023

I can't merge the RTC on by default for a handful of reasons, but the biggest one being that I would need to make sure the RTC is lazily initialized so it doesn't write the additional footer at the end of every save file. This could also effect games that do buggy writes to that area, so it'd ideally only be for hacked games, but that's hard without all of no-intro being imported. Further, if we're gonna do this for RTC, we'd want to do it for rumble too.

I'm thinking ideally it might be an option to add to the settings screen for "include cartridge hardware in all games" or something similar.

I'd be willing to merge the other commit as-is though.

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