Thursday, March 14, 2013

Castlevania: Curse of Darkness

This is something that I've been meaning to talk about for quite some time now, but kept forgetting to blog about it and get everyone else's viewpoint on it...

Right now, the game that's been showing the most progress on Cxbx is Castlevania: Curse of Darkness.  What does it do?  Well, for starters, it DOES go ingame, but does have two key issues with the, and they are:

- Lack of 8-bit palettized texture support
- Incomplete and buggy vertex shader conversion.

The first one has been implemented rather well in Dxbx.  I just haven't gotten around to adding it in Cxbx.  This is something that I can most definitely do, since I have a basic .tga loader which I modified to support 8-bit textures and have created a very basic mini-3rd person shooter for Xbox once, so I have a means of testing it thoroughly.  In short, I'm not too worried about this atm.

But what DOES worry me is the vertex shader problems.  Honestly, I have absolutely NO IDEA how Cxbx converts the vertex shader to a readable form, nor do I understand how the vertex or pixel shader is converted on a real Xbox.  I know it should be straight forward, but I've always had trouble grasping it.

Fixing these two things will get the game playable beyond the shadow of a doubt.  Input, background music, and everything else works fine.  Keep in mind that this game was ported from PS2 and still contains some coding architecture that is best optimized for PS2.  Replacing the VU transformation code, all of the transformations are done in the vertex shaders.  The textures are also all palettized because of the PS2's video memory limitations (only 4MB, but lots of bandwidth).

But the biggest question is, do people want this?  Honestly, that's not a very big concern for me because I care more about the emu's success and compatibility than what people want to play from an immediate perspective.

So, please let me know what you all think of this.  I'm really curious to know.

Shogun.

Thursday, February 14, 2013

My Game Development Blog

I just wanted to let you guys know that I've been putting alot of my time and energy into building my own game dev company for a while now.  Given the fact that there isn't much hiring going on in this region for those who don't have 5+ years of experience or more on the job, I'd much rather take my chances going out on my own doing what I enjoy.  This has been my plan for a few years now, but at first I wanted to get more industry experience before getting started, but that plan isn't working due to the overwhelmingly pickiness of hiring managers these days.

Although I haven't released any of my games yet, I've gotten off to a good start.  I have the equipment, hardware and software to do most things that I plan to do, made a nice little office in my apartment, and a few games that people are already looking forward to buying/playing (not just people, one 3rd party company is interested in one of my games).  Sounds great in all, but there's much more work to be done besides coding and designing levels/artwork. =)

My blog is located at: blog.shogun3d.net

This doesn't mean that I've stopped working on Cxbx at all!  It just means that I have more than one project going on (one that will hopefully pay off).  I still have time during my off days and weekends to work on Cxbx and other emulation related stuff.

So if you want, feel free to follow this blog and give your opinions on the games I'm working on.  Any feedback is welcome.  And at this point, I can use all the good advice I can get. :)

Shogun.

Friday, February 8, 2013

Dead to Rights: BSOD anyone?

I recently bought a few Xbox1 games from a used game store about 2 weeks ago, one of them was Dead to Rights.  I already own the game, but I bought another copy since my other copy of it is out of reach (in another state with most of my Xbox games).  So I dump the game, thinking "Yeah, now I can finally fix that crash I couldn't track before...".  As soon as I get ingame, what happens?  BSOD.  Wtf? Cxbx hasn't given me a BSOD since that time I tried to emulate Wolfenstein back in 2004-05ish!  The worst part is, I have no idea what's causing it. I think it's an issue with XP.  It keeps bringing up win32.sys, so it's probably kernel related...

Back when I had vista, this wasn't a problem.  I never thought I'd say it, but I actually do miss vista a little.  While I and most other users hated it, Cxbx loves it with a passion, as it's the most compatible version of Windows running it.  I tried Win7 and 8, and none of them ran Cxbx as well as Vista did.

"This game is on PC, who cares?"  I do.  This is a battle for completion, and I don't have as many games using XDK 4432 as I'd like, so...

Meh, I'm not going to worry about it too much, so I'll just have to work on some other games until I either fix what's wrong with this laptop or get a new PC altogether (the latter would be nice).  Maybe I'll just keep bashing away at Otogi or something like that.

Shogun.

Tuesday, December 25, 2012

Top Spin




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!

Shogun.

Saturday, December 8, 2012

Zapper: At least it WAS working...




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.

Shogun.

Friday, September 28, 2012

More Outrun 2 Progress






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.

Shogun

Thursday, September 27, 2012

Outrun 2 Progress





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!

Shogun.