TASEmulators / TASEmulators/BizHawk

Save Ram flushing might be all messed up

Open
#2,157 3 comments 0 reactions 1 assignee View on GitHub

@zeromus is already working on this.

Since Jun 21, 2020.

App: EmuHawk
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

in a nutshell: CloneSaveRam() is meant to clear a dirty flag. but no user of CloneSaveRam() ever expects that to be destructive. CloneSaveRam() was intended as a promise that it would be flushed.

As one example, MelonDS internally in c++ (bizhawk shims files) clears a dirty flag when the saveram is gotten. I'm sure Suuper copied this from some other cores.

The whole API needs to be reworked, but I dont have an opinion on how.

It's possible we can smooth over some problems for now by simply removing every "is dirty" check related to automatic flushing, and mitigate some issues (see #2156; waiting for exact repro steps tho)

And don't forget, some cores can't sensibly track dirtiness at all (8bit and 16bit games too are commonly using battery save area as scratch memory too and dirtying it constantly).

Of course I would be remiss if I didn't point out, I dont like the idea of automatic flushing at all. But it should work.

see also #1466

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.