Skip to content

libs: sceIoctl's status poll, sceSifInitCmd, sceSifSetDChain, sceIpuInit; whole stream reads (opt-in) - #150

Merged
boubou666 merged 1 commit into
masterfrom
amp/sdk-answers
Nov 27, 2026
Merged

boubou666 merged 1 commit into
masterfrom
amp/sdk-answers

Conversation

@boubou666

Copy link
Copy Markdown
Contributor

What Amplitude_Recomp answered in its port, as generic SDK behaviour in the engine:

  • 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 (its sound packet lost, the samples after it a byte off: white noise).
  • texture.h: Texture::rgba carries the GS's alpha (0x80 opaque; the renderer scales it). The comment said 255, and Amplitude's and Dark Cloud's decoders doubled translucent texels because of it.

Tested with Amplitude_Recomp (its overrides removed, the option on): the intro's sound identical, the menus and a song as before.

🤖 Generated with Claude Code

…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>
@boubou666
boubou666 merged commit c05b9c4 into master Nov 27, 2026
4 checks passed
@boubou666
boubou666 deleted the amp/sdk-answers branch November 27, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant