What is Play! ?
Play! is a PlayStation2 emulator for Windows, macOS, UNIX, Android, iOS & web browser platforms. For more information about this project please visit the "About" section of this site.

Compatibility Status
Fetching compatibility status...

Development Log

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-11 00:00:00
Documentation was right about the FDEC command: FB bits must be skipped before reading the 32-bits value. The library keeps the last result of FDEC and returns it when a request to execute this command is issued, rather than returning the result of the current command.

Now it is able to go through the bits of the MPEG-2 sequence header structure and save the values it needs. Then it comes to checking the "load intra quantization matrix" bit, which is set to 0 in the case of this movie, and does a bit of gymnastic to be able to load the default matrix once again...

- Since the FIFO already has some data in it, the library can't just write the matrix in the FIFO because it would be stored at the end of the buffer. So what it does is call one of those custom handlers to save the state of the IPU DMA channels and of IPU_CTRL and IPU_BP.

- Once that's done, the FIFO buffer is reset and the library DMAs (using normal mode) the matrix and sends the SETIQ command.

- Another custom handler is called that restores the state of the IPU saved previously and processing continues "normally".

But this process doesn't work properly yet. I've added the normal mode for DMA channel 4, added reading for the missing registers for this channel. Tomorrow I'll be checking on making the values present in IPU_BP accurate to make the library routine able to restore its state properly.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-10 00:00:00
Rigged up something so that the DMA enabler function gets called. My solution was to raise the BUSY bit of registers IPU_CMD and IPU_CTRL when a FDEC command is issued when no data is present in the FIFO so that a waiting loop gets executed and that the DMA enabler function get called. Once some data get sent through DMA, the FDEC command is executed again returning the wanted result and clearing the BUSY bits.

Now that this seems to work, I need to figure out what FDEC does really. What I'm sure about is that it returns the first 32-bits present in the FIFO, but I'm not quite sure what the BP parameter should do:

- The FDEC command is executed the first time to find out if an MPEG marker is present at the current position. The values for BP provided for this is 0 for the first time and 8 otherwise.
- Then the actual marker is fetched and a value of 32 is provided for BP.

What I'm not sure about is if the FIFO bit stream pointer should be incremented after or before... The documentation says before, but it wouldn't work good with the second use of FDEC. I'll be studying this more in details tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-09 00:00:00
Potentially found how DMA transfers can be started. Apparently, you must supply to the MPEG decoding library 4 (or 5?) functions to handle several exception cases. There's one to display an error message and others to cope with the lack of data in the IPU FIFO. Well, that's what I think at least, since the function pointers provided to the MPEG decoding library/function are those that set the STR bit of the 4th channel.

But I'm not quite sure how to get them called though, because the library will still go ahead and issue an FDEC (get fixed length code) command. It probably has something to do with a triggering an error in the IPU... More about this tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-08 00:00:00
Continued to search for the IPU data producer/DMA problem, but found nothing that could solve this yet.

But while looking through the movie player code, I was able to find something that checks the status of a button to skip the movie scene. I patched the executable so that it always skips the movies and that enabled the program to go further.


Screenshot #000065 Screenshot #000066
Screenshot #000067 Screenshot #000068


We are able to play the game with this patch, even though it's a bit limited : it crashes as soon as we hit an enemy, and there's also a couple of problems with the GS handler. Also note that to be able to see that much of the game, a little hack in the GS handler was required to force an alpha blending formulae. There's multiple layers of rectangle areas that have transparent area to let the underneath layer show something. I think there's one for the status text, one for fancy the border with Feena and Reah and one for the game. The reason everything looks translucent is also because of this hack. There's also a little bug with the character sprites that make them show an extra frame when moving around (certainly due to a CPU problem).

But I don't really want to concentrate on this for the moment... I'd like to have the IPU done at a decent level before fixing any problems with the game. So I'll be continuing my search for the solution tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-07 00:00:00
Implemented IPU commands SETVQ (load VQ CLUT) and SETTH (load threshold values for dither).

Implemented system calls DisableIntc and RemoveIntcHandler.

I added the code to handle the DMA channel 4 (toIPU) thinking that the channel would be enabled, but none set the STR bit of the CHCR to 1. The data (MPEG2 data from the disk) and DMAtags to be sent are prepared properly, but it isn't sent for some reason. I checked around for code that sets the STR bit and found something involving some mechanic using semaphores. I'll be checking this more in details tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-06 00:00:00
Started the work on the IPU emulation class. Stream data is now accumulated from writes to the IPU_IN_FIFO register. Implemented commands BCLR (in-FIFO reset) and SETIQ (load quantization matrix). The matrices loaded don't come from the movie file though... They come from the data segment of the executable. This is probably done to reset the IPU properly.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-05 00:00:00
Integrated the new scheduler into the threading stuff. Fixed a problem with "WakeupThread" and implemented "RotateThreadReadyQueue".

Now, I should be able to concentrate on getting the IPU work... I've been reading some documentation on the subject and I should be able to start implementing some stuff tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-04 00:00:00
Nothing much today... Wrote a linked list class that will be used to schedule the threads using the "round-robin with priority" technique. I will introduce this class into the threading stuff tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-03 00:00:00
After further investigation, it seems that the game won't use the FILEIO functions to access the movies as I first thought. What it does instead is seeking to a sector position associated with the movie file on the disk to be able to read the data afterward. So, all seems to be good on this side.

But it still can't go further because there's some problems with the thread scheduling stuff. When the game is in "movie playback" mode, the main game loop isn't used anymore and a totally independent and different loop is used instead. Instead of relying on "WaitSema" and "SignalSema", it uses "RotateThreadReadyQueue" to allow other threads to be executed, but this system call isn't implemented. The implementation of this will probably require a rewrite of the thread scheduling method.

Fixed a problem with SIF registers not being loaded/saved from/into virtual machine saved states.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-02 00:00:00
Unified the interfaces of PADMAN and DBCMAN for reporting button states.

Implemented some Deci2Call stuff on which the game seemed to wait on when outputing a string on a TTY device.

The movie playing library seems to be started now, but there seem to be a problem with constructing the path to the movie file on the disk. Instead of using the 'cdrom0' device it uses 'host0' with a path probably used during the development step. More about that tomorrow.

<< Older Log Entries Newer Log Entries >>