TASEmulators / TASEmulators/BizHawk
Fix (by adding an assert and testing) cases where cores return an undeclared sysID
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
prior comment
From https://github.com/TASEmulators/BizHawk/pull/3635#discussion_r1667733459:
How about this:
RomLoadernever setsSGBon any rom (since any GB rom could be used with SGB, they should all be detected as the same, andGB/GBCis the better choice)- There is no core preference for
SGB, onlyGBand maybeGBC- Cores are perfectly honest with setting
IEmulator.SystemId(not necessarily matching the one passed in, since a sync setting can choose betweenGB/GBC/SGB)SystemIdalways matches a[CoreConstructor]—if it doesn't make sense to have that ctor, like withSGBwhichRomLoaderwill never use, it can simply beprivateand call something likethis(default)I think that would give the consistency I'm after while being simpler for regular users.
Later comment from https://github.com/TASEmulators/BizHawk/issues/3960#issuecomment-2599915071:
The value returned from IEmulator.SystemId should always match one of the [CoreConstructor]s. There should not be any case where the core "knows better" and swaps sysID based on the rom, for example—it is the frontend's responsibility to identify roms—but for the time being those hacks can remain and the core can simply add another attribute, and possibly a dummy ctor.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing IEmulator.SystemId and the [CoreConstructor] attributes across the emulator cores. Add assertions and tests for cases where a core returns an undeclared sysID; done means every returned SystemId matches a declared CoreConstructor, while documented compatibility hacks remain covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100