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-02-19 00:00:00
Made some more research to find the source of the problem, but I wasn't able to fix it today. I found out that there is some bounds checking done somewhere, but it is unfortunately done before the angle value is incremented to the fatidic value and before it goes in the routine that's supposed to process this angle.

I'm pretty sure this is related to the particle system renderer, because if I force the bounds check to happen, there won't be any particles when hitting an enemy and we'll be able to proceed with the game normally.

In the program, a particle system object seems to be created with a constant maximum number of steps which often a peculiar number (37.058823 for example). This is the value on which the angle is tested against in the bounds checking code. The program crashes when the angle value exceeds this maximum. I'm not sure whether the wierdness of the number is the cause of this or not... If the number was 37, the bounds checking would be able to work properly... It could be the rounding mode too, but I don't think this is changeable on the EE FPU... I don't really know what it could be, but I'll keep investigating tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-18 00:00:00
Had another power outage this night, so I wasn't able to reproduce the movie playing problem... Instead, I've checked the problem that makes the game hang when hitting an enemy.

The problem seems to be happening in a certain routine that calculates a sine value of an angle, computes a ratio of a number out of it and then uses this new value as a counter for a loop. The problem arises when the angle exceeds the value of Pi and when the sine value of the angle gives a negative value. This becomes equivalent to do a loop of (MAXINT - 1) which can last a very long time...

There doesn't seem to be any checks at all for negative values in the routine. I also checked how the angle value was computed and how it could change and there wasn't any limits checking in there either.

I'll keep on investigating tomorrow... My feeling is that there should be some limits checking in the routine, but it doesn't get called somehow or I can't figure out what it is for now...

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-17 00:00:00
Added saving of DBCMAN and CDVDFSV modules state in saved states. It should be now possible to keep playing the game after saving and loading the state in a new instance of the application.

Fixed the dialog color issues when using a Windows XP style.

I also added the virtual machine reset functionality when booting from a disk or loading an ELF executable. Now, the cdrom0 disk image can be changed using the configuration dialogs and the application doesn't need to be restarted anymore for the changes to take effect.

I was thinking about adding a function in the virtual machine menu to reset the virtual machine only but this isn't possible right now with the same "Reset" function I've made because it clears all the RAM and it will also clear the loaded executable at the same time. What I really needed for this development anyways was the "reset on loading" bit. I might add the reset menu item in a later development...

I also checked the bug that causes the game to hang after hitting an enemy and this seems to be related to a bug in the FPU since it remains stuck in FPU intensive routines.

I was able to reproduce the crashing problem that was happening randomly while the movie was playing. It's not related to the thread thing like I was thinking. It crashes because it's jumping to address 0 using a register whose value is 0. I wasn't able to analyse the state much since I didn't have much time to do it, and also because I lost it when I was about to start working on it because of a power outage. I'll re-run the simulation this night and hopefully come with a fix for this tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-15 00:00:00
I let the movie play during the night, but nothing special seems to have happened... It actually seems to have finished playing correctly. I'll make another try this night with a different v-sync timing and see if I can catch the problem.

Added a Windows assembly manifest into the executable to allow Windows XP styles into the user interface. The UI is still a bit ugly when using them though, but it's not really important for the moment. I'll work on that when preparing the v0.20 release.

Added preliminary support for saved states in the main interface. There's still some more data to include into the saved state files before it becomes useful (IOP modules states), but I'm waiting till tomorrow to add them because I still need that state where the intro movie starts playing for tonight.

There's also some changes I'd need to do in the communication method between the virtual machine thread and the UI thread to allow the VM functions to return a value when being called... Knowing if a certain function has failed (ie.: "SaveState" or "LoadState") would probably be interesting to know and would be something important to report to the user. This will also go in the TODO list of the v0.20 release development.

Fixed alpha blending issues with the game. I always had in mind that I would need to use some fancy OpenGL function to be able to support the 2 formulae this game was using, but actually, they were really easy to do. One of them was already implemented and the FIX parameter was just fooling me into thinking it was different. The other one was easily implemented using the GL_ONE and GL_ZERO parameters to glBlendFunc. I also had to add some code to fix the alpha value of the colors in the CLUT.

This is what it gives:


Screenshot #000085 Screenshot #000086


There's not too much left to fix now... There's the movie playing bug that I'll hopefully catch this night, saved states, the crashing bug when hitting an enemy in-game, the screwed sprite animation if it's not too hard to find and finally adding the reset functionality.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-14 00:00:00
Completed the class wrappers for the partial DMAC rewrite I started yesterday. This oddly seems to have created another instability while playing the first movie, which was caused by a lack of available data to be transfered. I tweaked a bit the "risky" condition of executing a BDEC command to check the amount of quadwords remaining to transfer. This fixed the problem.

I implemented the "ExitThread" system call and added some code that calls this system call in the BIOS area which is called when a thread procedure returns. This fixes the crashing problem when the first movie was done playing and when the decoder thread needed to terminate itself.

But it didn't fix the random crashes in the intro movie. I'll try leaving the movie running in a debug build this night to see if I can trap the crash and hopefully fix it tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-13 00:00:00
While doing some debugging to fix the problem I wanted to work on today, I found out that the first movie couldn't play properly because of the DMAC fix I made yesterday (which wasn't really something reliable anyways). So, I figured I'd need to change some things about the mecanics that control the source chain mode. I found out a solution that accomodates both movies and made the appropriate changes. I haven't finished completing the new classes wrappers for this new solution though, so I'll be completing this tomorrow.

As for the problem I was supposed to fix today, I think it's caused by a thread returning from its root function. Since I set RA to zero when I create new threads, it's most likely that the PC would be set to zero too when the thread complete its execution hence causing the problem I was having. Fixing this should be a matter of making RA point to an address memory in the BIOS address space that will contain some code to terminate the thread and re-schedule. This shouldn't be hard to do, and I should have this completed tomorrow too.

I don't know why this could happen during the middle of a movie though... It seems to be quite random too as I've been able to see a bit more of the movie today while testing:


Screenshot #000082 Screenshot #000083 Screenshot #000084


This event doesn't seem to be related to the new DMAC fix since I was able to make it hang at the same place as yesterday. Well, we'll see what fixing the thread thing will do and we'll probably be able to gain better insight at that time...

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-12 00:00:00
After some more debugging, I was able to find out what was causing the problem.

A DMA transfer in source chain mode wouldn't stop properly if it was started with a current DMA tag that is a terminal tag. So, what was happening is that a DMA transfer would be started with a REFE tag in CHCR, wouldn't stop right after and would keep going beyond the REFE tag in memory, which, of course, messed up MADR and TADR and would affect the values of BlockPos0 and BlockPos1 ultimately.

I made a quick fix, which seems to take care of the problem and the movie is allowed to go further:


Screenshot #000080 Screenshot #000081


There's still a problem though that makes the virtual machine hang after playing the movie for a while. I think it's a CPU bug, but I haven't been able to reproduce the problem in a debug build, so I don't know what it really is... I think I've seen something similar happen with the DigiCube logo movie, so I'll check if I can do something about this tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-11 00:00:00
I made some debugging today and gained a better understanding of the problem that makes the movie playing unstable. The program maintains 2 block positions which are used to compute the position of data writing in the buffer using this formula:

Position = ((BlockPos0 + BlockPos1) * 0x800 + DataStored) % 0x80000

So, at one time, the system stream parser call the user-defined handler to dump the video data into the video buffer, and writes it at the position computed using the formula. Then the next time this handler is called, the variables BlockPos0 and BlockPos1 have totally different values which causes the position not to be adjacent to the end of the previously written data but rather at a completely different place.

I checked out what was changing these values and it seems that the user-defined handler used to resume the data transfer to the in-FIFO when it was previously aborted (used when transfering the default quantisation matrix for example) is causing the problem. It also only occurs on a very specific condition which would probably explain why it was kinda random.

I don't really understand the formulae behind the change of the BlockPos0 and BlockPos1 values, so I have no clue if the change is meaningful. In any case, I'll be working on fixing this tomorrow.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-10 00:00:00
Fixed a copy and paste error in MTSAB that was causing some more of the garbage in the decoded pictures.

Fixed a bug with first coefficient decoding in non-intra blocks that was causing the remaining of the corrupted blocks that would appear sometimes.

The decoded images are now near perfection. So, I shouldn't have to touch anything more inside the IPU processing functions.


Screenshot #000076 Screenshot #000077


The movie playback is still unstable though, and I'm currently looking into fixing this. Hopefully, I'll have screenshots that show more interesting stuff tomorrow.

Fixed a little bug with the "kputs" function of the "Deci2Call" system call.

Added the processing of the "PRIM" and "PRE" fields in the GIF tags. Those were used to render the "Team-Digi" logo and the main title screen. This addition fixed them.


Screenshot #000078 Screenshot #000079


There isn't much more to fix now. After the movie playback has been fixed, I'll need to work on fixing the alpha blending formulae, and then, fix the ingame crash. Once all of this is done and once the game becomes playable, I'll add the reset functionality discussed at the beginning of this development.

Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-08 00:00:00
Found out what was causing the columns to be swapped. It was PPACB that was giving a reversed result, so I fixed it.


Screenshot #000074 Screenshot #000075


Now everything is fine for intra macroblocks, but some frames remain screwy when they're using predicted macroblocks. For example, the frame with the DigiCube logo which comes from an I-picture looks as it's supposed to look, while previous ones have some visible artifacts due to bad predictions. Some artifacts are visible too in the second picture above.

I think the problem lies in the dequantisation of these blocks. I haven't really tested them in my experimental MPEG-2 decoder, so I'll be checking if everything is alright on this side tomorrow. If it's not caused by problems from the MPEG-2 decoding functions in the IPU, then it's probably related to the newly implemented MMI instructions.

Also made some minor changes:
- Isolated the computation of the lookup table for the Cr and Cb indices, used in the CSC command, in a function and made it so it's called only one time and not each time a CSC command is executed.
- Added some Y position compensation in the GS handler when using an interlaced mode (fixes jumpy screen). But I'm not sure this is the appropriate way to do this though...

<< Older Log Entries Newer Log Entries >>