Rakashazi now has a functional Android port that doesn't use any of Yong's code. This should be considered as superseding this version, as the binary can be distributed without any issues and is maintained by someone who has proven to be far more capable than me when it comes to working with Android.
Information is here: http://www.snes9x.com/phpbb2/viewtopic.php?t=4868
I got it working, complete with save-state support! If you, too, want to compile and run Yong Zhang's port of SNES9x for Android, here's what you need to do. I'll try to use relatively easy directions, but as Linux is involved, it may require some advanced knowledge. I apologize if I'm too vague for newbies or too condescending for veterans - I'm trying to get a good middle-ground. I'm going to assume you know how to navigate a shell, at least.
Pretz also informs me that you can compile the program in Windows (using Cygwin) and in OSX. Linux is what I had on hand, though, so for the time being that's what the instructions are for.
NOTE: The source code is completely lacking in copyright information for Yong himself. The Java code may still be owned by Yong. DO NOT DISTRIBUTE THE COMPILED PROGRAM TO ANYONE. Yet. I'm still doing research.
1. Get a Linux distribution with a graphical desktop. If you already have a Linux distro, good for you - knowing how to use it will make this much easier. Ubuntu will work fine, and it's easy to get and (relatively) easy to install and work with.
2. From within Linux, download the Android SDK from here: http://developer.android.com/sdk/index.html
Stick it in your home directory if you don't know where else to put it.
3. Download the Android NDK from here: http://developer.android.com/sdk/ndk/index.html
Again, if you don't know where to put it, stick it in your home directory.
4. Download Eclipse from here: http://www.eclipse.org/downloads/?osType=linux
Specifically, you want the Eclipse IDE for Java Developers. If you don't know whether or not you're running 64-bit, grab the 32-bit version.
5. Make sure you have the Java SDK installed. To do this, pop open a terminal window (xterm is fine) and type
If the version listed is less than 1.6.x then you need to upgrade. That's beyond the scope of this though.
6. Untar everything. This can be done with the command
tar -zxvf <filename>
Replace <filename> with what you want to untar.
7. Set up the Android development platform. Go into the directory created by untar'ing the Android SDK (not NDK) and run
This MUST be done within an x terminal. If you're running from a plain text terminal, this won't work.
When the window pops up, select 'Available packages' on the left, and check the 'Android Repository' box. You don't need any of the third-party add-ons. Hit 'Install Selected' and wait for it to chew through the downloading and installing. Once that's done, close the window.
8. Make sure you have git installed. This can be done like so:
If you don't have it installed, and if you have apt-get (if you are running Ubuntu, you probably do), you should be able to install it with the following command:
sudo apt-get install git
You'll need sudo permission for this. Again, if you don't, it's beyond the scope of this document. You'll have to check the interwebs.
9. Use git to get the sourcecode off of github. From whichever directory you want the folder containing the source, use the following command:
git clone git://github.com/Pretz/SNesoid.git
10. cd into the SNesoid directory that git made. Type the following commands:
git submodule init
git submodule update
This should download the common code all of Yong's emulators use.
11. Time to compile the native code! cd into the SNesoid directory inside the SNesoid directory and run the build command in the Android NDK directory. For me, the command is like this:
If you don't have the r5b version of the NDK, you'll have to replace that with the directory that the NDK was untar'd into.
If it throws an error about not finding a file ending in .o.d.org just run the ndk-build command again. This may happen up to four times. Eventually it'll finish with only warnings, and no errors.
12. Fix your .bashrc file to 'install' the Android SDK. You'll need to add the utilities directory to the path. cd into the directory you untar'd the SDK into, then go into the 'tools' directory and type 'pwd'. Copy down the result. Edit the .bashrc file by typing
Go to the very bottom of the file and add
replacing <directory> with what you copied. Write to file, yes you want to overwrite, exit.
12. Start up Eclipse. cd into the directory you unpacked Eclipse into, and just run ./eclipse from an x terminal. This should bring up the IDE. Just use the default workspace - we won't really be using it anyways.
13. Install the Android plugin for Eclipse. Under the Help menu, select 'Install software...' and put the following URL in the 'Work with:' field:
Click 'add'. Once it finds the information, check the 'Developer tools' box and hit 'next'. Blah blah once it's done hit Finish. You should have a usable Android development environment now, more or less.
14. Make a new project for SNesoid. Go to File -> New -> Project... and select Android Project. Click Next. Name the project SNesoid and hit the 'Create project from existing source' radio box. Click the 'Browse...' button and select the SNesoid directory (the one inside the SNesoid directory). Don't navigate into it - just select the directory and hit OK. You should be able to hit Next at this point. Leave the next screen alone and just click Finish.
15. Make the .apk file. Right-click on the SNesoid folder icon on the left side of the screen (in the 'Package Explorer' window) and click Android Tools -> Export Unsigned Application Package.... Save the resulting .apk wherever you want. This is your Android application. Copy it to your phone, run it with app manager, and install it. DONE!
Yes, it's ridiculous. But hey - now you have a full Android development environment and you can edit the source code, compile the changes, and copy it to your phone.
Later I'll post the .apk file for general consumption, but as mentioned above, I need to make sure I don't get my pants sued off before I do that.