Saturday, July 17, 2010

Random update(s)





Well, I'd feel really bad if I didn't update this blog with something! =) So I thought I'd at least do a few quick things for Cxbx. Since it's on my resume, keeping it updated would help.

Even though the above screens aren't all to impressive, those two games have been driving me crazy as of late and getting it to do something is better than what it was doing before. Which leads me to another thing I wanted to bring up. Patrickvl and defiance have been talking about fixing how we emulate Critical Sections in Cxbx. So far, it appears to be a rather big problem for this emulator. Patrickvl did manage to fix a few things with Enter/LeaveCriticalSection() (hence the reason Dxbx does a better job of emulating Rayman Arena right now) and if I can get in touch with him and discuss how he fixed it, then we will see a lot more games working on Cxbx. Since I'm a noob to how critical sections work (I've never used that feature before), I'll have to further educate myself on the subject just in case I have to figure this out on my own. After taking a look myself, the big thing is that it just appears that the main problem is that the structures differ from the Xbox to the PC version. This is bad, but either way, it should be emulated correctly. For now, I guess I could just keep track of each critical section created (just like how Cxbx keeps track of every IDirectSoundBuffer* pointer created) and just save the valid params for each critical section. If this works, then it should solve problems with various games such as Blood Wake, Rayman Arena, Taz: Wanted and Zapper and possibly more. I'm assuming this will work, until I try it tonight, we'll see.

As of late, I've noticed that we've had some rather "problematic" kernel functions preventing numerous games from working correctly. One of the most notorious of those functions is NtQueryFileAttributes. Instead of dealing with that pain-in-the-ass-to-emulate function, instead I created a signature and emulated it on a higher level using the native GetFileAttributesA() function. I did this when working games such as Dues Ex and Hunter the Reckoning and it worked like a charm.

"Why haven't you updated the SVN yet if you've done all this and more?" Good question. That's because I have a bit of bad news. First of all, I was tracking down some bad DirectSound signatures for XDK 3911 when working on Blood Wake. I commented those out and was planning on fixing them later (not really a problem to fix actually), but upon doing that, I broke Halo. I assume most of you don't care about that, but it does get worse. My latest build broke Turok! Why? I don't know yet. All I know is that there's NULL surface causing the crash. I can add sanity checks to get around that, but not sure if it's a major problem. My debugging skills really suck, and so far I've been relying on other team members to help me debug stuff. That needs to change, and fast!

One more thing, I know that you guys want to play games like Conker, Midtown Madness 3, Unreal Championship II, and other games using the D3D8LTCG library. Well, I have some more bad news for you. When I was working on adding further support for this library, I did get some of the XDK samples built under the LTCG release to work, however, the code inside these functions are dynamic, NOT static like with normal D3D8 library builds. What does this mean? It means that even though one signature might work for one app/game, it's not guaranteed to work for the next as the code and signature would change per game. Furthermore, there is no standard way to dissassemble the library in IDA or use our automated tools to locate the functions. So with that being said, Cxbx CANNOT emulate these games using the method it uses now. The only way to do so is to actually create an HLE datasheet that manually specifies the location of each function similar to how Xeon works. This is really a lot of work to do since most games require many functions to be HLEd and finding them all manually can take months (unless we had a dedicated team to search them out). Now I see what Nisse was talking about =/

So, that's all I wanted to share tonight. In the mean time, I can still add a few updates here and there. Just know that I'm not completely off of this project for any reason! =)

Shogun.

Friday, July 9, 2010

Laid off

Yup, that's right. As of today, I am officially laid off. Of course, the bad news is self explanatory, but just so you all know, what little time I was allocating for Cxbx is now gone again! Damn you economy! Oh well, I'm too old to throw a tantrum over it and quite frankly, not only am I used to this, but I saw it coming anyway. Now it's time to go back to my old job... and that is looking for one (which I sincerely f@#%ing hate with a passion because it's painfully hard).

"Is Cxbx dead, then?" No! And STOP f@#%ing asking me that!!!! If I've said it once, I've said it a million times... it's NOT over until I say it is! *sigh*, sorry, I just get tired of n00bs asking this everytime I go for at least 1 month without updating Cxbx.

But while I'm at it, I want to ask you all a favour. Please tell me what games are giving you the following error "EmuD3DDeferredRender/TextureState was not found!", okay? I can pop in here and there and see if I can fix games that give us this error (as long as the game doesn't use the D3D8LTCG library (check your Xbe dump); I'm not interested in those games atm). That being said, you now officially have a reason to bug me :)

So, that's all for now. In the future, I'll see what else I can do from time to time.

Shogun.

Monday, June 21, 2010

Cxbx svn r163

Yup, just in case you haven't seen it already, it's there! I just wanted to make a breif update about yet another breif update I made to the SVN. Many of you noticed that Panzer stopped working with r162. Well, I fixed that last week and now you can all fool around with Panzer again if you feel like it.

"Speaking of Panzer, how's that going?" Better than before actually. There's another contributor who managed to fix some issues with it a while ago. So far, there's still more to fix, but it's leading up to some very interesting bug fixes. With the right hack, speed will be closer to that of playable, and when we fix the problem with EmuIDirect3DDevice8_SetRenderTarget, it should work properly. The problem is that Cxbx likes to resize textures and render targets to it's liking and if the sizes are not compatible with the screen resolution, SetRenderTarget fails. Sounds easy to fix, but we'll look into it. If it works, then no more fullscreen quad overlapping the 3D scene because everything will be rendered on top of that! If _SF_ (Xeon) can do this, so can we!

Just thought I'd do a quick update. I'm still rather busy and trying to move into a new place closer to my job. Once that happens, I'll have more time for Cxbx. Until then....

Shogun.

Thursday, May 13, 2010

Going to be busy for a while.

Okay, before I start getting numerous messages about my inactivity, I'll spare you the suspense of wondering what's going on. First of all, I finally have a new job. Blueshogun now works at Microsoft (the enemy, lol). After all this time applying, I finally got it. It's a rather rewarding career (although the project management isn't 100% stable) and I really take pride in what I am doing here. So in short, I won't really have time for Cxbx for quite a while.

"What are you going to be doing at Microsoft?" Quite frankly, that is classified information, so I can't spread that information around, plus I don't want everyone nagging me with silly requests anyway. Yes, it's Xbox 360 related, but that's more than enough information given there. If you're aware of what's going on in the Xbox 360's new line up of new features, chances are you know what I'm doing.

"So, how come you won't have time for Cxbx? Is Microsoft working you overtime?" No, that's not it. My biggest issue is my commute. Since I'm really far away from Microsoft's location and I don't own a vehicle, I have to use public transportation. After traveling over 40 miles and transferring from 3 buses a day for both ways, my daily commute to and from work is 3 hours! So working 8 hours a day, plus 6 hours of commuting time, that's 14 hours a day I'm out of the house! I work only on weekdays, but I need to dedicate those available weekends to take care of important business IRL. "Why don't you move closer to your job?" That's the plan, but I have to find an affordable and suitable place to move into first. The Seattle area in general is not a cheap place to live, and when you think you find a good deal on apartments, you have to really look into it because sometimes it will come back and bite you in the @$$. Having said that, even more of my time is spent looking for a new place to live. Trust me, I didn't choose to live where I am now, and I don't plan on making the same mistake twice. Catch my drift?

So yeah, that's what's going on right now. I have lots of work ahead of me and I don't know when I'll be readily available to work on Cxbx again. Right now, I have to worry about my financial future and get that straight before I can worry about things like this right now. Hopefully, you understand. Thanks for supporting me all these years!

Shogun.

Monday, May 3, 2010

The race for 64-bit support is on!

Over in the NGemu forums (here) we have a new dev named tabai working on 64-bit support! So far, it's looking pretty good, but clearly, there is one bug to be fixed. Since I never did understand how FS and LDT worked on Cxbx, I'm sure that I could learn a thing or two from his work.

I attempted to fix the 64-bit issue myself, but I never could figure it out. The work that is being done is originally based off of the original fix from Robert Yates. I won't say too much about him as I'd prefer to keep his career details and contact information confidential, but tabai has been continuing to add on to his work so that both Debug and Release builds are supported. I don't have a 64-bit machine available to test this on (my 64-bit OS desktop is still in Indiana unfortunately) so I'll just have to take his word for it. He has posted his changes in EmuFS.cpp/h and I do plan to add that to my SVN once everything is sorted out. Hopefully we can have this fix working for both 32-bit and 64-bit OSes.

Just keeping everyone up-to-date on what's going on with this issue as more and more users are complaining about it :)

Shogun.

Sunday, April 25, 2010

Kabuki Warriors







Okay, before I go any further, I'd like to apologize to everyone who feels that I have been unnecessarily angry as of late. I've just been under a lot of stress lately IRL and it's been driving me crazy! Getting a job in the US these days is really hard (be it IT or even McDonalds), especially when you're still in the entry level stages. I've been without a full time job since September of last year and getting a job at this point (anything) is very important. So if I offended anyone, I'm sorry :(

As you can see, the game Kabuki Warriors (XDK 3911) is reaching menus so far(ingame is not confirmed yet, and I'll explain that shortly). I had a very positive feeling that this game would have some level of compatibility with Cxbx for some reason (lately, my emulation instincts have proven quite accurate). It looks like all my work on XDK 3911 is paying off, big time! Still have lots of work to do on this particular XDK by fixing the ordering of Deferred Render/Texture States, but that will be an easy fix once I get around to it. TBH, so far, I didn't add anything in particular to get this game showing stuff. All the stuff I added for Azurik and Halo must have been enough to get it this far.

"So, what's the problem?" Truth is, I don't really know what's causing problems. Upon trying to go ingame, conflicts with my display adapter on a driver level occur. I'm assuming that a certain Direct3D function is causing this. What sucks is that DirectX 8.1 is greatly depreciated and it's not easy to debug. I'm convinced that if we were using at least Direct3D9 or OpenGL, this would not really be an issue. The best thing I can think of is to find out if any functions are returning a specific error code (D3DERR_DRIVERINTERNALERROR). It would be nice if I had my other machines to test this on, but sadly my laptop is the only available computer capable of running Cxbx in this household. However, I do hear some background music and voices upon trying to get ingame. Right now, I can't actively work on finding this problem, and tomorrow I have another interview. Hopefully I get this job because it will really help me and my sister through these tough times (and maybe a lucky/unsuspecting British lady; and no, she's not my girlfriend ^^).

"Okay Shogun. What's the deal with emulating all these crappy games?? I want to play DOA3, JSRF, Ninja Gaiden and Otogi!" Okay, calm down! Don't you think I work on those games too? Let's look at it this way. It's rather common to have an easier time emulating a crappy game then a top notch game. Not saying Turok, Futurama, Smashing Drive and Robotech: Battlecry are bad games (well, some of you might not like them), it all depends on how the game was programmed. Crappier games tend to use more generic and uniform coding methods than the more popular ones. Not saying the programmers of these games didn't do a good job of programming these games though, but sometimes programmers will try to take shortcuts by using code already contained in the XDK samples. Emulating XDK samples with Cxbx has been the most effective method of improving it, so a game like Petit Copter (which is almost totally based off of the TechCertDemo in the XDK) will naturally be easier to emulate. That's just the way it is. But look on the bright side, getting crappy games like Kabuki Warriors working will increase your chances of playing a better game such as DOA3 (which is still bugging the hell out of me with it's multi-threading issues).

Side note: I own this game, but never actually got around to playing it for myself. I heard that this game got some really bad reviews and some claimed it to be one of the worst Xbox games out there, but I won't make that kind of judgement until I play it. I won't discourage anyone for trying this game themselves, but get a load of this quote below:

"I literally won a match just bashing the controller against my ass. I wish I was joking, but the score is seriously Kabuki Warriors zero, my ass one." - Andy McNamara (Game Informer)

I'd really like to say more, but I need to get ready for tomorrow. So thanks for checking out my blog and wishing me well on this project.

Shogun.

Sunday, April 18, 2010

Cxbx compat list is over 30 now!



Wow, the progress just keeps on coming! If you look at the compatibility list, you'll see that the games list is now over 30! That's been my target for quite some time now.

Thanks to some "unofficial" beta testing done by BlackDaemon, two more games are proven to show some stuff. None of which are playable or in-game, but since I never had a chance to try these for myself, now I know that there's a chance for fixing these games for the future. I do have Blade II (XDK 4627) but I don't have Burnout (XDK 4361). Since I have those XDKs, fixing the two doesn't sound hard initially, but like I always say... No guarantees! Don't have much to say right now (busy), just keeping you all updated :)

Shogun.