TASEmulators / TASEmulators/BizHawk

Stop hardcoding core SaveRAM metadata into frontend, use a service

Open
#4,242 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What does this disparate group of cores have in common? As far as the code is concerned, nothing. This screams to be refactored.
https://github.com/TASEmulators/BizHawk/blob/f6538289dc7adb9c76862bd426c17a57c1ed4dab/src/BizHawk.Client.EmuHawk/MainForm.cs#L2000-L2005
I suggest an empty (marker) interface ISaveRAMSizeAPriori, so the above becomes simply if (Emulator is not ISaveRAMSizeAPriori) /*...*/ else /*...*/.

see also #2344 re: savestates

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.

Research direction

Start with the hardcoded SaveRAM metadata logic in src/BizHawk.Client.EmuHawk/MainForm.cs around lines 2000-2005, then inspect how the relevant emulator cores expose their metadata. Evaluate the proposed ISaveRAMSizeAPriori marker interface and the related savestate context in issue #2344. Done means the frontend no longer maintains a core-specific list while preserving the existing SaveRAM behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.