Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

EE sceCdStatus stub always reports READ (6), hanging games that wait for PAUSE

Aperta Adatta ai principianti
#360 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
95/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Inizia in ps2xRuntime/src/lib/Kernel/Stubs/CD.cpp, in corrispondenza di sceCdStatus, e confronta il valore restituito nello stato inizializzato con sceCdSync e ps2xIOP/src/emulator/imports/iop_cdvd.cpp. Avvia ICO e verifica che lo stato del CD diventi SCECdStatPause (0x0A), che il ciclo di avvio termini, che vengano caricati tutti e sei i moduli IOP e che non rimangano problemi successivi relativi allo stato del CD.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

EE sceCdStatus stub always reports READ (6), hanging games that wait for PAUSE

Game: ICO (PAL, SCES_507.60)
Found on: c5a9d02, still present on eb8688b (latest main as of 2026-10-18).

The bug

In ps2xRuntime/src/lib/Kernel/Stubs/CD.cpp, sceCdStatus returns a fixed value:

setReturnS32(ctx, g_cdInitialized ? 6 : 0);

6 is SCECdStatRead (a read in progress). sceCdInit sets g_cdInitialized, so from then on the drive reports a read in progress forever, even though the HLE reads are synchronous and nothing is ever pending. This does not match the current synchronous model, which sceCdSync already follows by returning 0 ("completed / not busy").

For ICO's current synchronous HLE path, returning SCECdStatPause (0x0A) after initialization allows the boot loop to proceed.

The IOP-side emulation already does this: in ps2xIOP/src/emulator/imports/iop_cdvd.cpp, sceCdStatus returns kCdvdStatusPause (0x0A). Only the EE stub returns 6.

Effect in ICO

ICO's boot code (0x10ECA8) waits for the paused state before rebooting the IOP and before loading each IOP module:

0x10ED00  addiu  $s0, $zero, 0xa
...
0x10ED48  jal    sceCdStatus
0x10ED50  bne    $v0, $s0, 0x10ED48

With the status stuck at 6, the main thread loops there forever: black screen, no IOP module loaded.

With sceCdStatus returning 0x0A after sceCdInit (0 before), the main thread leaves the loop, the IOP reboot runs and all six modules load (SIO2MAN, PADMAN, MCMAN, MCSERV, LIBSD, SNDN2DRV). No other change was needed for this step. The later problems in our port are unrelated to the CD status.

Notes
  • I have been running my ICO port with this fix for about two months. I am sharing it because the same stub is used for any game whose libcdvd the analyzer recognizes, so it may affect other games. I have only tested ICO.
  • 0x0A is the right answer for the current synchronous HLE model, not in general. If the CD HLE ever becomes asynchronous, the status should report 6 only while a read is actually pending.
  • A game that waits with while (sceCdStatus() == SCECdStatRead) would hang the same way.
Lingua principale
C++
Stelle
3.3k
Fork
149
Merge medio
5g 10h
PR unite (30g)
4

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ran-j/PS2Recomp

Tutte le issue di ran-j/PS2Recomp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.