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
--END EDIT--
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
Code: Select all
java -version
Code: Select all
javac -version
6. Untar everything. This can be done with the command
Code: Select all
tar -zxvf <filename>
7. Set up the Android development platform. Go into the directory created by untar'ing the Android SDK (not NDK) and run
Code: Select all
tools/android
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:
Code: Select all
git --version
Code: Select all
sudo apt-get install git
9. Use git to get the sourcecode off of github. From whichever directory you want the folder containing the source, use the following command:
Code: Select all
git clone git://github.com/Pretz/SNesoid.git
Code: Select all
git submodule init
git submodule update
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:
Code: Select all
~/android-ndk-r5b/ndk-build
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
Code: Select all
nano ~/.bashrc
Code: Select all
export PATH=${PATH}:<directory>
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:
Code: Select all
http://dl-ssl.google.com/android/eclipse/
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.