Tuesday, December 25, 2007

ZSNES on the XO

My three-year old brother has been interested in my laptop ever since I got it. So I got him an XO laptop for Christmas. :) He's not really old enough to make a lot of use for it, but he'll get there.

I've also got him hooked on Super Mario World. He can beat only the first two levels, but he really enjoys it. He doesn't know he can run and jump at the same time, but he has mastered the art of jumping on koopas.

Naturally, I had to set up ZSNES on the XO so he could play it. My only concern was that it wouldn't be fast enough to emulate the SNES properly. Thankfully that's not the case, it runs like a peach.

After connecting to the internet, open up a terminal. This is a regular activity, on the second page. It's a box with "$_" in it.

Download ZSNES. Good luck typing this one in on the tiny keyboard! This is all one line, the only space being between wget and 'http:
wget 'http://sourceforge.net/project/
downloading.php?groupname=zsnes
&filename=zsnes151src.tar.bz2
&use_mirror=easynews'

Then extract it:
tar jxvf zsnes151src.tar.bz2

Go into the source directory:
cd zsnes_1_51/src/

Open up a root shell to install dependencies (the XO doesn't come with sudo):
su

Install dependencies:
yum install gcc gcc-c++ make nasm zlib-devel SDL-devel

Leave the root shell:
exit

Build ZSNES. These are two separate lines:
./configure --disable-debugger --disable-opengl
make

Run it!
./zsnes

Unfortunately I haven't been able to increase the screen resolution. Larger resolutions depend on having OpenGL, which didn't work. It started up, and the display showed up for a split second, but then the screen went black and ZSNES had to be killed. You can at least center the display by going to Config -> Video and selecting "640x480 DR F".

Also, it would be nice to have zsnes in the activity bar. Any ideas?

Have fun!

4 comments:

Aaron said...

OMG!!! I've been so very curious about this!!! This would have been my only reason for buying an OLPC...

... but I won't really have enough money to buy one after I buy my Wii. :/ Dang... I wonder if there really will be an OLPC-like commercial product for public purchase...

francisco said...

Nice post! I was just thinking of doing this. However there are some typos in your yum line it should read:

yum install gcc gcc-c++ make nasm zlib-devel SDL-devel

Corvus said...

I cant seem to get yum install gcc gcc-c++ make nasm zlib-devel SDL-devel to work. My XO keeps giving a 404. If theres a way to get around this email me!

Michael said...

Sugarize is the easiest script I've found for adding a launcher to the activity bar:

http://www.archive.org/details/OlpcLibsugarize