Skip to content

Conversation

@SuuperW
Copy link
Contributor

@SuuperW SuuperW commented Dec 21, 2025

See issue #4591.

Invisible emulation also needed significant changes after Lua's client.seekframe was deprecated.
The goal of invisible emulation, as is currently used, is to enable rendering a future frame as if it were the current one. To this end, all rendering, throttling, and FPS calculations are disabled during invisible emulation. Since we need the actual current frame to not render but do want to use throttling and FPS calculations, setting invisible emulation only really activates it once it is time to emulate the next fame. Conversely, we want to render the final Lua-seeked frame but not throttle or do FPS calculations for it. InvisibleEmulation becomes InvisibleEmulateNextFrame, but I have not changed the name of the Lua function. EDIT: Changed the name back, since it needs to be more complicated than that name suggests.

@YoshiRulz YoshiRulz linked an issue Dec 22, 2025 that may be closed by this pull request
@SuuperW
Copy link
Contributor Author

SuuperW commented Dec 24, 2025

Ready for merge.

@YoshiRulz YoshiRulz added re: Lua API/scripting Relating to EmuHawk's Lua API (not the Lua Console) re: APIHawk Relating to EmuHawk's public .NET API or to the creation of external tools labels Dec 24, 2025
@SuuperW SuuperW changed the title Lua unpause Lua unpause and invisible seek support Dec 26, 2025
@SuuperW
Copy link
Contributor Author

SuuperW commented Dec 28, 2025

Now with better TAStudio support.

This whole invisible emulation thing seems like a big convoluted hack, and just to avoid capturing dirty states in rewind history + savestates. Idk, maybe that's important for Sonic Advance but still it feels icky.

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

Labels

re: APIHawk Relating to EmuHawk's public .NET API or to the creation of external tools re: Lua API/scripting Relating to EmuHawk's Lua API (not the Lua Console)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lua cannot unpause when user presses frame advance key

3 participants