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

Already on GitHub? Sign in to your account

SRAM saves are incorrect size. #883

Closed
cheatfreak47 opened this Issue Sep 23, 2017 · 9 comments

Comments

Projects
None yet
3 participants

SRAM / FRAM saves should be 32KB in size, fixing this would not break compatibility with VBA save either I don't think, as those simply pad out the extra 32KB with FF bytes, to fix that, simply accept 64KB saves for SRAM and when outputting a new save, overwrite it with 32KB.

This shouldn't matter really but I figured it was worth mentioning anyway.

Owner

endrift commented Sep 23, 2017

...wait what

cheatfreak47 commented Sep 23, 2017 edited

Yep, that's how it is, the Static RAM chip or Ferroelectric RAM chips used in GBA games are only ever have 32kb of actual storage, If games need 64KB of storage, they use FLASH512kbit (64KB) chips.

Owner

endrift commented Sep 23, 2017

how did I never know that

cheatfreak47 commented Sep 23, 2017 edited

¯\(º_o)/¯
I think VBA-M is still doing this wrong too actually, I should make an issue on their tracker
but I like mGBA more ^_^

the 3DS AGBFIRM mode gets this right since it's effectively a real GBA, it's files are only 32kb.

@endrift endrift closed this in 5dfa036 Sep 23, 2017

Owner

endrift commented Sep 23, 2017

I dug through a bunch of my SRAM saves and verified. I'm not sure how OOB works yet so I'm not gonna backport this to 0.6.1 until I do.

@endrift http://problemkaputt.de/gbatek.htm#gbacartbackupsramfram there's some really good data on this page if you want to read up sometime.

Owner

endrift commented Sep 23, 2017

You say that as though I don't have that as a pinned tab and have for years ;)

Contributor

sergiobenrocha2 commented Sep 30, 2017

Qt frontend is not changing from 64 to 32 kB automatically. You get 32 kB only with new saves.

Owner

endrift commented Sep 30, 2017

Yeah, the frontend will never shrink files. It's not really a big deal I don't think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment