Repository navigation
libs: sceGsSyncV waits for the next vblank (opt-in) - #160
Merged
Merged
Conversation
…nit; whole stream reads (opt-in) What Amplitude_Recomp answered in its port, generic SDK behaviour: - sceIoctl: request 1, the status a file opened with O_NOWAIT is polled with, is "done" (*arg = 0): the native sceOpen / sceRead have finished as they return. Any other request: -1. - sceSifInitCmd, sceSifSetDChain, isceSifSetDChain: nothing to set up or arm (Onimusha_Recomp answered sceSifSetDChain the same way in its port). - sceIpuInit: no IPU to reset. - CdState::wholeStreamReads (off by default): a sceCdStRead that does not wait brings all its sectors or none, as a console's drive fills the stream ring a bank at a time. Amplitude's movie player resumes its demux at buffer + 0x4000 - bytes left and skipped a sector after a short read. - texture.h: Texture::rgba carries the GS's alpha (0x80 opaque); the comment said 255. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game that paces itself on the EE's timers and then calls sceGsSyncV gets the console's wait: the EE clock goes on to the next vblank's start, and the result is that field's parity. Off (the default, the reference's), the frame ends at once, held to the frame period, with the parity of the frames ended. Amplitude's movie player waits 500 hblanks on timer 0, then sceGsSyncV: two fields a picture with the wait, three with a frame end held to a whole period. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
boubou666
force-pushed
the
amp/syncv-vblank
branch
from
November 27, 2026 09:24
9a54757 to
7678d91
Compare
This was referenced Nov 27, 2026
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.
Stacked on #150. The new commit is 7678d91; the one below it is #150's. (Rebased onto master; #156 was closed, master has the same function.)
What
Adds
Libraries::syncVWaitsForVblank, off by default. When a port turns it on,sceGsSyncVbehaves as the console's does:Off, nothing changes.
sceGsSyncVstill ends the game frame at once, held to the host's frame period, and returns the parity of the frames ended. That is the reference's behaviour (TMB's boot and match1p calls).Why
Amplitude's movie player paces itself:
sceGsSyncVuntil the parity is even.sceGsPutDispEnv.On the console the vblank wait takes the remaining 0.1 field: two fields a picture. Holding the frame end to a whole period after another frame end instead made three fields a picture. The logos' and the intro's sound ran 1.45 times too fast and ended long before the movie's last picture.
With the option on (plus the port's
sceGsPutDispEnvno longer ending a frame), the intro plays 300 pictures in 10.01 s of EE time, two vblanks each. Its sound lasts as long as its pictures.Testing
Amplitude, headless and in the window:
sceGsSyncVin Amplitude, so the game's own frames are unchanged.No other port is affected: the option defaults off.
🤖 Generated with Claude Code