![]() |
![]() |
![]() |
![]() |
![]() |
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 "Slave of the VU" work.
Posted on 2006-02-25 00:00:00 |
Implemented instructions VOPMULA, VOPMSUB, VMUL, VADDbc, VRSQRT, VMULq and VADD.
After setting some basic stuff using the VU0 in COP mode, the program starts sending some VIF packets to the VIF1 through DMA. I added the necessary code to store the DMA register writes, process the DMA transfer and delegate the transfer to the VIF class. Tomorrow, I'll start working on the VIF codes processing. |
Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-24 00:00:00 |
I haven't been able to make any progress on trying to fix the problem that's been plaguing me for the past week. There's no point continuing now, since I don't have any ideas on what the problem could be.
So, I decided to implement a quick patching system that takes its definitions from a file present in the same directory as the emulator executable. I added a patch to prevent the crashing problem when hitting an enemy with the drawback that no particles are visible when colliding with them. But it allows the game to be played, which is the goal of this development. I also decided to forget about the movie crashing bug for the moment. I'll try to come back and fix these two problems once I'll be preparing the v0.20 release though. I also added support for another alpha blending formula in the GS handler which seemed to be only used to blend the clouds when hitting an enemy. I didn't see any difference when playing, so I don't really know if it was useful or not. This log entry will conclude this development. I think I've been able to achieve my goal which was to make the game playable. I didn't know it would have taken that much time... But I think it was worth it. |
Make "Slave of the VU" work.
Posted on 2006-02-24 00:00:00 |
Making this demo work should be a nice start towards getting a basic VU0/VU1 emulation. This demo makes use of both units by using the VU0 in coprocessor mode and the VU1 with the VIF. A screen shot of this demo running is available at this place. Symbolic information was left in the executable which should make debugging easier.
First of all, I fixed a little problem with the decoding of the fields of the BITBLTBUF GS register. Oddly, this program is using an invalid buffer address probably also thinking the field was 16-bits instead of 14-bits. So, I'm not quite sure if my fix is valid for now. The demo doesn't waste too much time and is already using some VU instructions in COP mode. The ones that I know I'm lacking right now are VOPMULA and VOPMSUB. These two instructions together are used to compute the cross product of 2 vectors. I only added them in the reflection tables for now, but I'll have them implemented tomorrow. I also added an history navigation feature in the disassembly window of the debugger that I was planning to add for quite a while now. |
Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-22 00:00:00 |
Implemented another missing alpha blending formula. The implementation of this one required the use an OpenGL extension (glBlendColorEXT and associated constants) since it is a formula that forces an alpha ratio in the formula itself and make the rasterizer ignore the source or destination alpha values completely. To be more precise:
(FIX / 0x80) * SrcColor + (1 - FIX / 0x80) * DstColor This is used for some transparent effects on the playfield like the clouds (visible on the second screenshot) and also on the lens-flare effect at the beginning of the game. I searched a bit more about the crashing problem too, but I didn't find anything more. My theory is that the objects are being rendered one more time while they shouldn't be. By objects, I don't mean only the particles, but also the character sprites because they seem to suffer a similar problem (they're being rendered one more time over the bounds of thier animations). So, I'm thinking it's probably more related to the main loop than the specifics of the object. I'll keep looking tomorrow. |
Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-21 00:00:00 |
Couldn't find anything of interest today either... My idea is that there's a bounds check that isn't done for some reason:
I'm pretty sure we can exclude the hypothesis that says that the increment value for the angle is incorrect because this number is not in function of the total step count, so it would probably make the angle value overflow whichever its value is. I also thought it could be number with which the angle value is multiplied by to convert the angle value to a [0, 4096] range, but this couldn't be the case since the step value is 1 and the counter would keep going over the limit value anyways. So, I'll keep investigating on this tomorrow. |
Make 'Ys I & II Eternal Story' playable.
Posted on 2006-02-20 00:00:00 |
Tried to see how the number used to increase the angle value was computed. There's some wierd tidbits to the process, but I haven't studied it thoroughly. I'll continue the investigation tomorrow. |
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: 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. |
<< Older Log Entries | Newer Log Entries >> |