Friday, December 4, 2009

More on Unreal Championship

If you've read my last update on Unreal Championship, you'll have a good understanding by now what the situation is. If not, you might want to read that first :)

So, now what's going on? So far, this is the most interesting situation I've come across when working on this emulator. The solution to it might be even more interesting (or annoying). I'm not really sure which would be the best way to go from here, but I do have two ideas for this scenario (to handle the problem with the xbe trying to re-launch itself). When XLaunchNewImage is called (and when the .xbe being called is itself) and the LaunchData parameter is saved, we can either:

1. Trigger some sort of "restart" process inside the CxbxKrnl so everything except the necessary things are in the initial state at which the game was started. Then jump right back to the game's main entry point and continue as normal. Optionally "Persist" the display until D3DDevice::Present is called.

2. Save the contents of pLaunchData to a file in the same directory of the game (it's size will always be 3KB). Then load the file and restore certain states the next time Cxbx is running the same game. This will require you to restart Cxbx each time you want to go in-game.

Remember, I said I'm looking for the "best" way to handle this, not the most "ideal". I know everyone would rather have me do number 1, but so far I've only had time to try number 2. This is what happened...

Rats! To a certain extent, #2 does work, but it does have one small problem. The controller needs to be re-initialized so that the game will recognize that it's still there. This will require a bit of hacking. So far, it appears that everything else worked fine. All the files required to load the map, etc. were loaded without problems. But so far, it looks like #1 is harder to implement and #2 requires more extensive hacking. Maybe a simple jump could fix everything (for #1)! Since I'll be busy tonight and all day tomorrow, there's no telling when I can actually try it. Hopefully Caustik can jump back in sometime and give a few suggestions, but unfortunately, it appears that I'm the only one on the Cxbx team that has this game.

I'd really like to get more in-depth on this, but atm I have much work to do IRL so just stay tuned and I'll see what I can do. There's a lot that can be done with this game (once it works), but you'll just have to see if/when that happens :)



  1. nice blues, take a break friend and care your eyes ..hehe the computer is very strong for the eyes...merry my country we say: feliz navidad hehe...

    well rests with a good large bed pillow and air conditioning, you've done too much for these days..


  2. Actually, I'm in the Northwest part of the US, so we have to turn on the heat instead :)

    Gracias, y feliz navidad amigo!

  3. Nice spanish shogun.

    Feliz navidad, mis mejores deseos :)

  4. ..hi blues..i got something rare ..i change something for mashes like smashing drive does..with eip and i use the xdk in some definition that i don´t rebnember ,,,well now the game "mashed desn´t gives any error but there are only a black screen, the krnl debug info got a big size and i can´t to see the info..well i think that this game mashed is easy to fixe only weight 645mb something like this hehe..i´m surprised because now you added key games xdk funtions..
    for other part i´ll wish that some dolphin dev can gives a help in opengl funtions and graphics,,,,i was reading about opengl-sdkgl0 and more and very hard all this..