Sunday, July 12, 2015

More XQEMU Progress!

Once again, I dare not take credit for most of these (nor would I take full credit for what I did fix), but I spent my Saturday afternoon fooling around with XQEMU, and this is what I managed to do/discover.  I noticed a missing/broken feature or two in the code today, so I went in there, and fixed 'em to the best of my ability.  What happened?  I ended up getting Namco Museum ingame, and Panzer Dragoon 1 is now playable.

I took a video of these two games in action.



JayFoxRox informed me that he fixed the flipping issue that's been going on in some games like Namco Museum.  Not 100% sure what the issue with Panzer Dragoon is, but for now, just enjoy the feeling of playing this game on acid!

Also, I've got to admit, this emulator is progressing much faster than Cxbx has, and the compat list is growing rather fast.  I tested and tinkered with a handful of other games, and I'll update my compat list later because it's 4am, and I'm tired.... and yes, I tried JSRF, it doesn't work yet.

Well, that was a weekend well spent.  Good night everyone.

Shogun.

Monday, July 6, 2015

A quick guide to building XQEMU

Now, this emulator is not easy to build, especially if you don't know what you're doing!  When I first started getting my hands dirty with this one, I had a rather tough time getting it to build due to dependency hell, missing tools, and missing source files.  Now that I have another Mac with better specs in general, I wanted to go about setting it up on this machine.  This time, it's going much smoother, but I think having a more detailed guide on how to set it up would be helpful.

A word of warning: so far, XQEMU appears to work best on MacOSX, which is the OS I will be using for this guide.  JayFoxRox successfully got this built on Linux before (I haven't tried this with espes' branch); but his branch has some files exclusive to him for legal purposes.  Windows?  I hear it's tough, but doable.  If you have any expectations of playing JSRF or Conker right out of the box, chances are you'll be disappointed (but don't let that stop you from trying).  Also, if you don't know how to use a Terminal, git, or even a command-line compiler, chances are you shouldn't be attempting this or even using this wip emulator to begin with.

Now, let's get started.  First things first, always take a look at the wiki: https://github.com/espes/xqemu/wiki/Getting-Started

Well, that Wiki hasn't been updated in almost 2 years though... O_o

If you haven't already, create a folder, navigate to that folder using the terminal, then do a 'git clone' to get the source code from the git.  Once you do that, you need to check two folders within the source folder, and those are:

- dtc
- pixman

If those folders are empty, then you need to clone those sources independently.  You can do so with the following commands while in the source directory:

git clone git://git.qemu-project.org/dtc
git clone git://anongit.freedesktop.org/pixman

So, if you were missing those before, you should have them now!  And now that you have all the source files needed to build XQEMU, and if you want, go ahead and enter this terminal command:

./configure --cc=clang --enable-opengl --disable-vnc --disable-user --disable-kvm --disable-xen --with-coroutine=sigaltstack --target-list=xbox-softmmu --enable-debug

Now, if you got the same problem I had, you will likely run into an error message like this one:

ERROR: pkg-config binary 'pkg-config' not found

There's multiple ways to fix this.  You can either use macports or homebrew.  I chose macports personally.  So I downloaded MacPorts for my OS of choice, and went from there.  To install pkgconfig using MacPorts, use the following command:

sudo port install pkgconfig

There's a possibility you got this error message here:

sudo: port: command not found

If you did, then you need to setup your path correctly.  Try using this command, it worked for me:

export PATH=$PATH:/opt/local/bin

Now, try the previous command again, and it should work.  Okay, now we have that annoyance out the way.  Optionally, you can also install the XCode command line tools if you want or haven't done so already.  To do so, type this:

`xcode-select --install'

It will take a minute or two, and will have a nice GUI pop up instead of terminal text.  At this point, go ahead and try configuring XQEMU again.  If you get this following error pertaining to glib:

ERROR: glib-2.12 required to compile QEMU

That means we need to install that too.  Once again, let's use MacPorts to get this out of the way, like so:

sudo port install glib2

Okay, that'll do it.  Try configuring XQEMU one more time, and it should do so successfully.  If not, then there's some other dependency you are missing.  On Yosemite, I haven't gotten any more errors pertaining to such missing dependencies like Cairo, pixman, etc.  If you do get those in particular (I did), make sure you have the pixman source in the appropriate folder as I mentioned towards the beginning of this article.  If it's something else, feel free to ask me, but I can't promise you a direct answer/solution, especially if you aren't trying this on MacOSX Yosemite.

The next thing you want to do is type make, and xqemu should start compiling.  While compiling, I got an error regarding autoreconf that looked like this:

/bin/sh: autoreconf: command not found

If you get that, let's fire up MacPorts again, like so:

sudo port install automake autoconf libtool

Bam, fixed.  Try compiling it again.  After this, I got a linker error pertaining to pixman, telling me that _prng_state is missing, and other stuff.  Click this link (http://lists.freedesktop.org/archives/pixman/2014-November/003461.html), and it will tell you how to edit the appropriate makefile in the pixman source folder in order to get passed this annoyance.

Okay, if you followed the instructions, then you should have a working build now.  If you are getting a linker error regarding SSE4.2, like the one below:

error in backend: Cannot select: intrinsic %llvm.x86.sse42.crc32.64.64

Then you'll have to comment out the code in nv2a.c that uses it. Search for the following function:

static uint64_t fast_hash(const uint8_t *data, size_t len, unsigned int samples)

Then uncomment the macros, and change the top macro from '#ifdef __SSE42__' to '#if 0'.  Type make again, and that should fix it.  Place the appropriate BIOS files in the right places and you're good to go (of course I'm not going to tell you where to download them here!), now fire up the emu from the terminal and see what you can come up with!

These are all the issues I encountered when building XQEMU the 2nd time around.  If you have different issues, feel free to ask questions below, but remember that I'm NOT going to hold your hand and cater to you personally.  These are things that I figured out for myself simply by googling until I found a solution, all in a few hours.  No offense, but if you can't figure some things out for yourself, then you shouldn't bother.

References:
- https://github.com/espes/xqemu/wiki/Getting-Started
- http://www.fantageek.com/318/install-pkg-config-for-mac-osx/
- http://mikelev.in/2012/10/qemu-mac-os-x-success/
- http://stackoverflow.com/questions/9575989/install-autoreconf-on-osx-lion
- http://lists.freedesktop.org/archives/pixman/2014-November/003461.html

Have at it,

Shogun.

Wednesday, July 1, 2015

Xenia Progress!

Well, some new videos featuring Ashe's 360 emu, Xenia, are popping up all over reddit.  Just in case you haven't been keeping up with the progress, I'll link the videos displaying the newly generated progress.




I haven't been able to try this emu for myself because when I try to build the git repo, I get errors due to missing files.  If you want to try it for yourself, go ahead and grab the source from github.  You'll need an x64 version of Windows and a core OpenGL 4 compliant GPU.  I don't have many 360 games, primarily because I don't really like the 360 as a console (XBLA aside), nor do I have Xbox Live, so by debug Xbox just sits on top of it.  I really wouldn't mind playing Bullet Soul on PC, I'll tell you that.

And just in case you are wondering, I haven't contributed to this emulator in any way, shape or form, nor do I think it's a feasible idea to rely on this emu for a means to emulate original titles.  I'd rather have a dedicated emulator with lower system requirements.  Plus, what about Chihiro?  I don't believe the emulator on 360 can emulate that!

Just thought I'd keep you all informed on what our friend Ashe is up to!

Shogun.

Tuesday, June 30, 2015

Someone is Stealing my Identity!

Okay, this is pretty outrageous.  Who the hell would go this far as to impersonate me on reddit?  Wtf?  Yes, you heard right, someone is pretending to be me, don't be fooled...

Thanks to yun-daddy, I caught wind of this yesterday (maybe he did it, lol).  I didn't get around to reading it before because I was busy (yes, I was actually working on Cxbx for a change), so I had initially assumed someone was making a post in my honour or wanted to inquire about my past work.  Turns out that was not the case.  I should have investigated before things snowballed into what it is now.

Link: http://www.reddit.com/r/emulation/comments/3bhisz/blueshogun96_here_author_of_the_original_xbox/

For those of you who want proof that this is fake, consider these.
  1. I haven't been going to school at all.  In fact, I haven't set foot in a university since 2007.
  2. I stated that I don't have a job earlier on my blog.  Btw, for those of you who were wondering how my interview with 343 went, I didn't get the job because they wanted a more experienced C# dev.
  3. When I make announcements or just want to speak my thoughts on Cxbx, I do it here first, then link it other places.  In fact, I've never had a reddit account in my life until today (and my nickname there is "real_blueshogun96").
  4. When did I EVER claim to be the author of Cxbx or XQEMU?  Never.... Not.  Even.  Once.  These were originally written by Caustik and espes, respectively.
  5. I never even stated that I would have a definite means of working on Cxbx.  My retro gaming PC which I mentioned yesterday isn't truly ideal to work on it.  XQEMU is another story though, but I'd like to work on getting the setup working on my Mac Pro aside my Macbook.
  6. His impersonation of me is terrible.  I sign my statements as "Shogun", I never refer to my favourite console as "OG Xbox" because there's nothing "Original Gangsta" about Xbox.  Lol, I had to make some fun out of this.
 Looking on the bright side, I must really be special if someone is going out of their way to impersonate me of all emu devs.  Besides, they say it pays to advertise!  But in the mean time, I'm going to start another reddit post regarding this imposter as well as link back to this blog post as proof.

So, now that you are aware of all this, don't be fooled.

Shogun.

Got Cxbx running on my retro gaming PC

This evening, I fired up my old Dell B1000r because I needed a 32-bit machine running Windows XP for a few tasks.  Then I thought to myself "I wonder if I can run Cxbx on this old thing...".  Surprisingly, it worked!  The specs: Pentium III 1Ghz, GeForce 5200 (AGP), and 384mb Ram.  Although I didn't have much on the hard drive, I did get to play around a little bit.


That's a screenshot of the intro video of Innocent Tears (Japan only; XDK 4627).  Now, I will be honest and say that I did alter this screenshot a bit.  The intro video only runs at half the normal size when the YUV overlay is converted to RGB via software.  Using hardware accelerated YUV overlays fixes the problem, but then you can't take screenshots of it because YUV surfaces can't be screen grabbed normally on XP, so I just stretched the image.  Btw, just in case you are wondering why I never gave updates on this game before, I had reached a blocking issue when trying to get this title ingame.  Honestly, I can't remember what it was either. For those who want to see the intro video in action, I've uploaded the video on Youtube (I'm surprised no one has done this before).



I didn't have any of the games I knew were playable on this machine, so I couldn't verify by playing Turok, Smashing Drive, Whacked, Robotech BattleCry, etc.  Next time, when it's not in use, I'll hook up my old Seagate HDD that contains most of my dumped games, see if Turok runs at playable speeds, lol.  I know Robotech won't since I had a hard time getting 20fps out of that game on more advanced hardware.

Although Cxbx runs on this ancient gaming PC that once cost $2700 usd, I dunno if I could actually use it to work on updates for it.  Doesn't hurt to try, of course.  If only that thing didn't generate so much heat though.  It's summer time, and my apartment doesn't have AC either :(

Just thought I'd give you all an update since I *might* have a means to work on this again.  Not a solid guarantee, but I'll investigate later.  Until next time.

Shogun.

Thursday, June 25, 2015

Uploading my Cxbx source branch to github...

Wow, has it really been almost a year since I've updated this blog?  Well, shame on me... O_o

Where have I been?  For the past two years, I've been working on building up my career.  Things are going good now and most of my financial troubles are over (minus a few bogus debts that ended up in my name due to identity theft and a lease I shouldn't have signed).  Although I was laid off one month ago, I'm getting a steady stream of interviews from multiple companies.  In fact, I have an interview with 343 Industries tomorrow morning *cross fingers*.

Recently, me and LoveMHz have been talking about the good old days of working on Cxbx (well, tbh the good old days were 10+ years ago) and shared a few thoughts.  A day or two before that, I finally got around to taking a look at Cxbx-Reloaded's support for x64 which run without the aid of the debug console which is essential for me.  For some people, it worked just fine.  For me, however, I couldn't get a single game to run (not even Smashing Drive or Turok).  I'm running Win8.1 x64 right now, and have been using a 64-bit OS for quite some time, so I haven't touched Cxbx in quite a while because of it.

Due to the nostalgia I had, I dug up my old source branch and uploaded it to github.  I realized that I had added months worth of work that never made it to the SVN (8 months worth of updates to be exact), and it didn't seem fair to just forget about it.  Did a bit of work to get it compilable under Visual Studio 2015, and if you have a 32-bit OS, you can go ahead and have at it.  Sorry, I never did get the 64-bit update working on my branch.

Link: https://github.com/blueshogun96/Cxbx

Feel free to check out anything else I've got on github (not much, besides a few experiments and this really bulky open source game engine I started writing).  Unfortunately, you may not see many updates to Cxbx because I don't have a 32-bit OS to work on atm.  I would use VMware, but atm my CPU surprisingly does not support Intel VTx (hardware virtualization).  It's an older Mac Pro with low end Xeon 5130.  When I get a chance, I'll upgrade to an x5650 for 8 cores at 3Ghz, plus VTx.

Take care,

Shogun.

Saturday, July 26, 2014

XQEMU F.A.Q. (Updated 7/30/14)

Since I get asked the same questions over and over again, it's time I wrote a FAQ based on the most common questions (as well as the most annoying questions).  So, if you have a question, it probably has a simple answer, which I will address here. :)

1. Q: What's the status of this emulator?

A: It's still in it's early stages and is a little over a year old.  It's capable of launching the BIOS, Dashboard, XDK Launcher, and runs a few games.

2. Q: What games are playable?

A: At the time of writing, only a few games go ingame, and even fewer would I consider "playable".  Smashing Drive, being the simplest of Xbox titles, generally works okay.  This emu is largely untested, so be patient, or try it yourself.  In the mean time, watch the compatibility list.

3. Q: Does game work?

A: Probably not at this point.  Once again, check the compatibility list.  If it's not there, it's either untested or not working.

4. Q: Where can I download XQEMU?

A: The emu is in source only form.  If you want to run this emu, you'll have to build the source code yourself.  If you are not capable of doing this, then chances are you shouldn't be using an emu in it's alpha stages so casually.

5. Q: Can I play "Conker"?

A: I get a ridiculous number of requests for this game.  So far, only the demo has shown to do anything, but doesn't go ingame, and is not playable.  As far as I know, the full game hasn't been tested, and I highly doubt it works.  Also, if it did, don't you think I would have told you by now?

6. Q: Can I play "JSRF"?

A: Again, I get a RIDICULOUS number of requests for this game (even more than the previous).  It does not work.  Don't ask when it will work because I'm not psychic either.  Once again, if it did anything at all, I would have told you already.  This is one of my favourite games and I want to see it playable too.  Just be patient, please!

7. Q: Can I help?

A: If you are knowledgeable of C/C++, x86 assembly, Xbox, and emulation in general, go check out the source on github.  Be warned, this isn't a project for someone who is new to programming.  There is a steep learning curve and it's a tough project.  You are more than welcome to try.

8. Q: Can I be a beta tester?

A: Although you are welcome to test (provided you can create your own builds), but official beta testers are not what we are looking for.  The dev side is the most important right now.

9. Q: What are the system requirements?  Is my machine fast enough?

A: It's too early to tell, so that's not a question I can accurately answer right now.  Right now, only the software MMU is used; no hardware based KVM yet.  The speeds I've been getting have been moderate to somewhat slow on my Macbook Pro (2.93Ghz Core 2 Duo, GeForce 9600 GT, 4GB Ram) without hardware virtualization.  This Macbook is about 5 or 6 years old, so maybe that will give you an idea.

That's about it.  I might update this in the near future.  Now, I appreciate the enthusiasm, support and everything, but I can't answer the same questions over and over again. :)

If you want to learn more, join us on one of our IRC channels: #cxbx on efnet or #xqemu on freenode :)

Shogun.