![]() |
![]() |
![]() |
![]() |
![]() |
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 |
Video Action
Posted on 2011-05-21 19:09:32 |
I've mostly been busy fixing bugs in my emulator during this past month. I got Half-Life to work again, but I couldn't fix the rendering bugs even with the tool I used for Final Fantasy X. I didn't spend a lot of time looking for the problem, but my guess is that it's coming from the VIF emulation. Otherwise, it works at the same level as before... Except that I don't get stuck at the same place anymore because I changed the way the COUNTER register is incremented. It was incrementing too fast before and it was making the game run at a crazy in-game speed.
I also got Castlevania : Curse of Darkness to work again. There was a bug in the IOP BIOS emulation that was causing a deadlock to happen and was causing the loading sequence to never end. It still occurs right now, but less often. I also implemented missing instructions that were required by the game at various points. Thanks to the fixes I made for Final Fantasy X, the game looks pretty good right now. There's still a few glitches, but it's way better than before. Some of the remaining bugs are caused by the FSAND instruction that is not being emulated properly. I also saw that the game was using the VU0 in micro mode, which I don't support... So that could be another source of bugs. To show you how the games are running, I thought it would be better to make videos instead of static screen shots. So I added the functionality to record the video output of the emulator in an AVI file. It's kinda hard to make good videos because recording slows down everything to 4fps. But I hope it will give you a good idea of the current state of the emulator. Since everything is relatively stable right now, I'm thinking of releasing a new version soon. Maybe this week if I have enough time. |
Getting it right - Continued
Posted on 2011-04-06 18:48:34 |
I found out why the lighting wasn't working properly. It was simply because I wasn't blending in the vertex colors in my shader that emulates some of the odd texture wrapping modes of the PS2. After fixing that, the game looks even better:
I'm quite surprised that it fixed Cid's ship, because it was looking really bad before. I guess they use vertex colors pretty heavily in some parts of the game. I also tested Atelier Iris, just to realize that most of the 3D rendering was broken after the changes I made for FFX... But after some investigation, I saw that were was no dependency generated for the FMAC flags register. So, to get it working, I had to simulate the latency of FMAC operations in order to have the proper flag values when the microprogram issues a flag test instruction. This worked like a charm and almost everything was back to normal. The other problem was a wrong value used for the latency of the DIV instruction which was easily fixed. The one thing I'm really happy about is that these fixes allowed me to get rid of some patches I added a long time ago to make the 3D rendering work without flag emulation. This means I'm getting on the right track with all this. Coming up next, is, perhaps, Castlevania: Curse of Darkness or Half-Life. Both games were really broken before and I'm really curious to see how they are behaving right now. |
Getting it right
Posted on 2011-03-27 21:23:08 |
This past month, I completed the first version of my VU microprogram debugger that I was able to use to inspect what the FFX micro-programs does.
I've been able to find some issues with the DIV pipeline that wasn't emulated properly. I fixed those problems, but it didn't really change anything. I also saw that the micro-programs were using some MAC flags to determine if a polygon is visible or not. So, I added the appropriate MAC flags generation in some specific instructions and I was able to see that the terrain was now working properly. But it also made the rendering of other objects worse (characters and chests for example). So I investigated a bit further and I realized that I wasn't setting the sign flag properly when the result was minus 0. I'm not quite sure the sign flag should be cleared even on minus zero, but it seems to be what works best. With that, the characters were working again and after fixing a depth testing issue, I was able to get these results: It's way better than before! There's no more missing polygons. But there's still a lot of problems... First, the lighting doesn't seem to be blended in properly. I know it's computed in the VU micro-program because I've seen it in the vertex color values, but somehow, it's not being blended with the textures. Some of the textures are also wrong (as seen in the first and second screen shots), but that's probably because of another bug in my texture caching routines. There's also problems with most spell effects which seem to hide everything that's on screen, but that may be related to the general lack of stability of the game. I'm quite happy of the results and I'll try to go a bit further. I think I could make the lighting work first and see if I can something about the rest after. |
Updated Phantasy Star Portable PSF Set
Posted on 2011-03-06 20:09:57 |
Phantasy Star Portable 2 Infinity was released a couple of weeks ago, so I decided to update my PS Portable music pack with songs coming from this new version of the game. Most of them have unknown titles and are labeled as such in the pack. I will fix that if they ever release an official OST for this game. I could also be missing some songs because I was missing some songs from the original games after I extracted the soundtrack from the data files. But I haven't played this new version, so I can't really be sure.
Well, in any case, enjoy! |
PsfPlayer v0.51 and then some
Posted on 2011-02-26 17:47:13 |
Hello everyone. I've released version 0.51 of my PSF player. This version include several bug fixes, such as crashes happening with the Shadow Hearts PSF set and hang ups when seeking too fast in the play list. I also added ZIP and RAR archive support for those who like to keep their files all packed up in one big lump and also added automatic "discovery" of the song titles and lengths within a play list because it was a bit annoying to have to seek through all your files to see the titles. As always, it's available on the downloads page.
If you want to use the archive feature, I would recommend using ZIP files because seeking in a RAR file is an expansive operation. This is due to the design of the format and there's not much we can do about it. So if you can't bear the extra time it takes to load a PSF from a RAR file, simply switch to ZIPs :) On the PS2 emulator side, I've continued my work on making Final Fantasy X work again with the new JIT infrastructure. I've been able to go back to the state I was before I started this job. Next, I'd like to fix the crappy rendering I'm having in virtually all games that have 3D. I was thinking of creating a tool that would help me debug VIF command lists, because it's really hard to do so within the emulator. If I do that, I'll have to find some good test cases which will allow me to isolate the problems. A scene with only a character, like in the screen shot above, would probably be a good one. There might be some games which have simpler 3D stuff which I could use to debug my VU code. If I could get the games to display nicely with only minor glitches, I'd be really happy. |
PsfPlayer v0.50
Posted on 2010-12-05 12:04:24 |
I've released a new version of PsfPlayer which fixes a crash problem that was occurring when playing music from Parasite Eve. It was caused by a division by zero safety check that I removed while I was "porting" the PS2 emulator to the new JIT compiler engine. It's available on the downloads page.
The reason I removed that division by zero check is because it was generating a jump to a label that was exceeding 127 bytes when generating the x86 code for 64-bits MIPS emulation which is necessary for the Emotion Engine CPU. I was able to put it back in by changing the way the check was working by sign-extending the results after the division operation is completed. All was well until I encountered the problem later this week with a different MIPS code block while trying to make Final Fantasy X run again. Sounds like I'll have no choices but to handle long jumps properly... Besides that, I've made some good progress on getting the emulator back in shape. Most games can run at the same state as they were before. I'm currently busy with Final Fantasy X as I was saying before, but I found out some other games that run while I was fooling around: I can't show you more because I'm stuck at that screen, but it's nice to see new games that displays some stuff without having to do a massive investigation. I also changed the official icon because I was tired of the old one. |
Register Allocation Woes and PsfPlayer Update
Posted on 2010-10-24 20:44:58 |
While I was working on the x64 code generator, I found out that the register allocation phase in the JIT compiler was inserting register spill instructions inside function call sequences. This can cause problems on the x64 and ARM platforms because they both use registers to pass function arguments. I couldn't find an easy way to fix the register allocation algorithm, so I decided to use a 'naive' register allocator (the one I was using before) instead of the linear scan algorithm that was present. It doesn't seem to make any difference in the emulation speed, so I guess it's all good for now.
This bug was present in the x64 version of PsfPlayer and it was noticeable in some PSF sets, which would play in an strange manner. I released a new version that fixes the problem. It's available on the downloads page. Besides that, I also implemented enough of the x64 code generator to be able to play Doom and Quake. I was glad to see that both games were running faster in the x64 version of the emulator. That means that all that wasn't for nothing after all. I'm currently busy getting some of the commercial games running again. More info coming soon... |
Classics Revisited
Posted on 2010-10-12 20:39:14 |
I've been busy these past months with getting my emulator back in shape. I also wanted to test the performance of my new JIT compilation engine, so I decided to try two games that, in my opinion, have an interesting load on the CPU while using basic PS2 hardware.
Well, these choices were pretty obvious. Quake was one of the first games that I tried to support in the emulator... I also saw that there was a Doom port for the PS2, so I decided to try it out. While it didn't take too much work to make these run, I'm kinda disappointed by the performance of both games: Quake runs as fast as with the old compiler engine and Doom doesn't work very fast either. So, what I'm realizing now is that it's another case of premature optimization. I thought the generated code would be a lot faster and that it would make most games run at interesting speeds, but it's really not the case. But, on the other side, the new JIT compiler framework is a lot cleaner and generates cleaner code too. For example, I wasn't able to target the x64 processor properly beforehand, while this time, I'm able do it without any problem. That's what I'm going to work on next. I don't think there's going to be a big difference between x86 and x64, but it's worth trying. I also thought of other solutions that could make a big speed difference, but I'm still not sure if I'm going to implement them yet. |
PsfPlayer 0.48 Released
Posted on 2010-08-27 14:54:11 |
I've put the next version of PsfPlayer online 2 days ago. The major change of this version is that it's now using the new JIT compiler library I've been working on during the past few months. I hoped that it would make the player a bit faster, but it doesn't seem to give a big speed improvement, if any... But this new library allows me to target different CPU architectures more efficiently and I can now release a 64-bits version, which is also available for download.
This release of PsfPlayer means that the JIT compiler library is stable enough to be used in the PS2 emulator itself. I still need to add support for SIMD primitives, but it shouldn't be too much of a problem. I'm also working on targeting the ARM architecture to make PsfPlayer work on iPhone, but I'm not sure it will be fast enough to play songs. But it's still fun to learn about the ARM architecture and I'm sure it could come in handy someday. Well, I hope I can show you some of that soon. |
PsfPlayer Information
Posted on 2010-08-09 18:17:04 |
As I've said previously, I've released my PSF music player for everyone to see. I've been working on it for about 2 years, at the same time I was working on Play!. My idea was to use the opportunity of creating a PSF music player to have a good IOP emulation and integrate it in the PS2 emulator when it'll going good enough. Right now, I've integrated most parts of PsfPlayer's IOP emulation core in the emulator and that's what is running the IO drivers coming from the games.
The player in itself isn't that great... Highly Experimental performs better and gives better results, while PsfPlayer still have its quirks when it comes to playing some specific games music (the music coming from the Final Fantasy series for example). But it's been a great sandbox for testing various things, in particular, my new JIT compilation engine. But also, during the past 6 months, I also took the opportunity to test another idea of mine. We all know there's PSF soundtracks for the PSX and PS2 games... While playing Phantasy Star Portable on my PSP, I noticed that most songs sounded like they were synthesized. So, I decided to check if this game was using a synthesized music format and if it was the case, write something that could play them in the same way PSF's and PSF2's are played. Well, it was a success. I found out that the game was using MIDI files along with instrument banks to play its music. I wrote a mini PSP emulator, disassembled and patched the game executable so that it only tries to play music and wrapped all of that in PsfPlayer. The PSFP (PlayStation Sound Format Portable) support is available in the version I've posted last week. I'll try to make a new page that explains what are PSFP's and explain which of the PSP's system features are needed to play these files. I'll also post the Phantasy Star Portable pack, (which can be downloaded here for now) but I'd like to have more than one pack of music in there, so, I'm looking for other potential games that could have its music ripped in the same manner. Trying the PSPF player with different games will be a good test for the file format and will allow me to fix some problems that are currently present in the player (screwed up reverb emulation for example). Hopefully, I'll be able to post that info sometime this week. I'd also like to write about my new big JIT compiler project I've been working on, which is almost ready to be used in Play! and PsfPlayer. |
<< Older Log Entries | Newer Log Entries >> |