TASEmulators / TASEmulators/BizHawk

Mechanism for movies to include initram state

Open
#2,929 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Just riffing here: If there was something like

public interface IInitRAMControllable : IEmulatorService // maybe extend IMemoryDomains?
{
	ReadOnlySpan<byte> GetInitRAM();
	void SetInitRAM(ReadOnlySpan<byte> state);
	// could cut down movie size by storing a single repetition e.g. `[0x12, 0x34]` instead of the whole state -- but movies are already orders of magnitude larger, so this is probably unnecessary
	byte[]? GetInitRAMPattern();
	void SetInitRAMFromPattern(ReadOnlySpan<byte> unit);
}

it could be used to start a core with an older (less accurate, presumably) RAM pattern that the movie was made with, possibly allowing it to sync on subsequent releases for longer. Just call GetInitRAM() when making a new movie, saving it either in the header file or its own, and add an else if (movie.InitRAMState is not null && emulator is IInitRAMControllable initramCore) to this method:
https://github.com/TASEmulators/BizHawk/blob/fc0ebf372f57d1cfe959dd4aca63b2d4f5d31555/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs#L273-L293

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 referenced method in src/BizHawk.Client.Common/movie/interfaces/IMovie.cs at lines 273-293 and trace how movie state is represented and loaded. Determine the needed scope for capturing and applying init RAM across emulator services; done should include a decided design and coverage for movie compatibility and synchronization.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.