Spent a little time on Cxbx today and realized I never did touch Top Spin (XDK 5558) after all this time. It appears to be a rather simply coded game with nothing too complex either, but the game uses XACT and I haven't successfully emulated that yet. Since I'm finding more and more games that actually use it, I'll eventually have to start adding support for it more.
Now, the funny thing about this game is that it has multiple .xbe files and launches a new one every time you go from intro to memu, menu to ingame, ingame to online lobby, etc. making it a bit tedious to work on. So far, it's not as complicated as Innocent Tears (that game is ridiculous; speaking of which, I should work on it more).
So yeah, I really need to work on that XACT stuff some more and stop avoiding it every time. Emulating it through DirectSound shouldn't be that hard and it should make sound playback easier to handle. We'll see about that....
Oh, and merry Christmas (to those who celebrate the world's favourite pagan holiday)! It's still Christmas where I live, so I didn't post this too late!
Finally got an opportunity to fiddle around with Cxbx on Windows 7 to verify a few things I've been curious about, thanks to my neighbour who needed me to reinstall windows for him. The results were disappointing but at least now I know what I'm dealing with. As much as I really hate to say it, Cxbx appears to be most compatible with Windows Vista and Windows 7 just appears to give me the same issues Windows XP usually does. Panzer Dragoon ORTA still hangs and not even the demo worked like it did in XP. The multithreading nightmare continues...
A bit of good news did arise though. I managed to get Zapper to get passed the intro videos. I have no idea why it didn't crash at that particular moment. It did when I was approaching ingame though. Strange. Even stranger, when I tried running it again, it crashed with the same exception again. I never could figure out what was wrong with this game let alone find out what API is causing the crash. It looks like an internal issue with Windows user mode runtime .dlls, I guess. Oh well, I was looking forward to playing this game on PC too. Too bad my debugging skills suck, otherwise maybe we wouldn't have this issue as games that use the Blitz engine have the same issue it seems like.
Okay, just a quick update on Outrun 2. I made a very basic implementation of the XFileMediaObject interface, and guess what? I've actually gotten it to the menus in just a few hours of extra fixes! So far, there doesn't appear to be any severe issues, just a few texture related bugs here and there. Sound and music works too (most of it). As far as the sound goes, it sounds a bit better in Release mode.
"Nice screens, but what's stopping it from going ingame?" Okay, what's happening is that it continuously fails to create some random index buffer. Not sure whats causing the failure, but it keeps returning D3DERR_INVALIDCALL so that could mean all sorts of things, really. I'll have to investigate this issue more later. It's really late and I just busted my butt all day for you guys! I'll sleep on it and see what I can come up with next time.
Wait, what? I haven't updated this blog in a year? Hm, I can't believe it's been this long...
Well, haven't had anything too interesting to report until now though. I'll start off by saying this once again... I've had a rather ridiculous amount of requests for Outrun 2 (XDK 5849, the very first title using it [that I know of] that does anything on Cxbx) and various other SEGA titles. It's not that I'm not interested in these games, it's just that SEGA's Xbox titles are not exactly easy to emulate! They're ALWAYS problematic in one way or another, therefore they aren't easy to emulate. Outrun 2 is no exception, but I'll get to that in a minute. Surprisingly, Outrun 2 is much easier to work with than I originally thought. It was just a matter of adding missing functionality and fixing a bug or two in the existing implementation(s), and unlike most SEGA titles, the problems are rather easy to identify this time. Keep in mind, this isn't Outrun 2 SP [DX]; I don't have that version... YET!
"So, what's stopping it from working, and when will this become playable?" Good question(s). I've determined that it's an audio related issue. Outrun 2 uses some Xbox exclusive high level code to stream audio. No one has ever implemented the XMediaFileObject interface or any of it's relatives, so unless I do it myself, it's not going to get done. There is no PC equivalent so I have to emulate everything myself. For loading and streaming .wav files (even if they use the Xbox ADPCM codec), emulating this is a piece of cake. For .wma files and other supported audio files, it may not be as easy (unless I can find some documentation on the file format). Games like Whacked and Quantum Redshift, I could just leave out the functionality and the game would work fine, but not for Outrun 2, obviously. So I'll have to take some time out to learn about audio loading/streaming with these APIs and write some test code to verify Cxbx can do it properly. Good thing I have my handy Debug Xbox sitting next to me. But Lord, where's caustik when you need him?? lol. So until this is fixed, I can't guarantee this game will be on our playable list in the future. Don't worry, I'll keep trying!
One more thing, you may have noticed the fluctuation of framerates on those screenshots above. It's because (like most Japanese titles) the game is using D3DDevice::BlockUntilVerticalBlank() to stall/synchronize threads for audio and other time sensitive threading procedures. While I support and recommend this approach personally, Cxbx's previous implementation wreaks havoc on the host's CPU usage! On the console, this is not an issue, but on Windows, this is a problem. Since DirectDraw is the only way to accurately keep track of vertical blank (via IDirectDraw7::WaitForVerticalBlank), that's what we've been using. Unfortunately, this causes us problems when used in many different threads and bogs the whole system down. So instead, I've been using Sleep(1000/60) where 60 is the theoretical refresh rate Cxbx is running at. I'll add a menu option to switch between the functionality just in case you need one over the other. But for Outrun 2, it fixed the frame rate issue and should for a few other titles using the same methods.
So, that's all I have to say about Outrun 2 at the moment. Looking forward to making more progress on this game because it's a rather high priority game for me. Thanks for reading!