Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#360 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
95/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Empieza en ps2xRuntime/src/lib/Kernel/Stubs/CD.cpp, en sceCdStatus, y compara el valor devuelto en el estado inicializado con sceCdSync y ps2xIOP/src/emulator/imports/iop_cdvd.cpp. Ejecuta ICO y verifica que el estado del CD pase a ser SCECdStatPause (0x0A), que el bucle de arranque termine, que se carguen los seis módulos IOP y que no persista ningún problema posterior con el estado del CD.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
C++
Estrellas
3.3k
Forks
149
Merge medio
5 d 10 h
PR fusionados (30 d)
4

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ran-j/PS2Recomp

Todos los issues de ran-j/PS2Recomp

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.