Repository navigation
Conversation
STEINS;GATE 0 (Steam) ships its movies as Bink 2 (.bk2). The overlay port builds FFmpeg 7.1.2 with the binkvideo2 decoder from SharpEmu's FFmpeg fork (github.com/sharpemu/ffmpeg-core at 3b502d4, LGPL-2.1-or-later), plus a fix that normalises the alpha flag to a boolean: the raw flag value (0x100000) made the decoder walk past the fourth plane and crash on alpha movies.
The DDS decoder keeps its state in file-global variables while spritesheets are loaded concurrently, so two loads could interleave and corrupt each other.
AddMessage placed the new entry under the previous one using Glyphs.back(), which is undefined for an entry with no text. STEINS;GATE 0 adds such lines with SetRevMes and crashed intermittently (SIGBUS) in SG0_01_04. Use the entry's bounds when it has no glyphs.
Bink 2 movies decode to full-range YUV (AVCOL_RANGE_JPEG) and, with an alpha plane, to YUVA420P. The video shader converts limited-range YUV and reads alpha from the bottom half of the frame, so full-range movies showed crushed blacks and clipped whites and alpha movies did not display at all. Repack such frames on upload: scale full-range values to video range and lay the alpha plane out as luma below the picture.
Adds the sg0 profile and an SG0 instruction set: CC's opcode table with the slots corrected against SG0's scripts (all 178 scripts decode without desyncs), plus the game-specific instructions and UI the game needs to be played through. - Profile: Steam USRDIR mounts, Bink 2 movie order, the 64x125 font atlas (font_a/font_b stacked) with per-glyph advances and bearings, CCLCC charset and save layout with SG0's script message table and CG album, TIPS through the CCLCC tips system, keyboard bindings from the game's own help page. - Phone (PhoneSG0): the slide, sessions, call/power-off/RINE triggers that decide the routes, and RINE threads with reply menus run as branch threads. - Screens: save/load/quick load, system message boxes, the system menu ring, backlog, TIPS, config, help, title menu, the EXTRA library (CG viewer, sound player, movie list) and the clear list. - Engine: SG0 paths for rendering, capture, save checks and ClickOnJump; cut-ins (SetCutin); movies on priorities above the scene layers; the title movie keeps looping while the title is shown; the title menu ignores input while another screen has focus. Tested on macOS (arm64) with the Steam version: all six endings are reached with the phone decisions that select them, and the menus and EXTRA screens work.
owenisas
marked this pull request as ready for review
October 23, 2026 04:43
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Contributor
|
Nobody gonna read that vibe slop buddy |
Author
Member
|
You misunderstand. We don't accept vibe-coded PRs |
Author
Ok, got it. Although it's tested and played, but the agent probably didn't consider human maintainablilty and edge cases. Thanks for letting me know though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for STEINS;GATE 0 (Steam) as a new
sg0profile, plus a few engine fixes it needed. Opened as a draft: it is large, and I am happy to split it (for example the Bink 2 port on its own) if that is easier to review.Commits
binkvideo2decoder from SharpEmu's FFmpeg fork (sharpemu/ffmpeg-core@3b502d4, LGPL-2.1-or-later). It also normalises the alpha flag to a boolean: the raw value (0x100000) made the decoder walk past the fourth plane and crash on alpha movies.AddMessageusedGlyphs.back()on the previous entry. SG0 adds empty lines throughSetRevMes, which crashed intermittently.PhoneSG0): the triggers that select the routes, and RINE threads with replies.SetCutin);Testing
On macOS arm64 with the Steam version:
Known gaps
IMV006's first frame uses a frame flag the decoder does not handle, so each loop starts one frame late.