Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-04 00:00:00
I think I found what was causing the data production problem.

The program allocates a buffer of 0x50000 bytes at the beginning and always fills it with 0x10000 bytes (32 sectors) worth of data from the PSS file at each iteration of the movie playing loop. A pointer to this buffer is then handed to a library function that has the task of parsing the MPEG system stream. When this library finds video or sound data in the buffer, it calls user-provided functions that has the responsability to store the data in other buffers.

The problem lies on the sound side of things. It seems that the sound buffer isn't drained properly and this keeps the MPEG system stream parsing function from continuing properly. So no more data can be read from the DVD because the DVD read buffer is full and the video decoder thread doesn't have any data to play with.

I'll be looking into the sound playing functions to see if I can make it drain the buffer properly tomorrow. I'll probably need to add a stub for the LIBSD IOP module to achieve this.