Posted on March 9th, 2008 in Axel Night, Technology by Axel Night
I began writing a forum response on this, but figured others may have the same questions, so here we go, a full-article on how to get your XO running a Sega Genesis emulator. I’m not doing a huge bit of hand holding. I’m assuming whoever is reading this has some knowledge of the Linux command line, because I’m being lazy.
The most important thing is that you’re looking for the SDL version of DGen. The base version won’t do. That’s something to keep in mind for all XO-related software. You want SDL for screen stretching. OpenGL will not work, or will work way too slowly to function.
The RPM you’d look for is dgen-sdl-1.23-1.i386.rpm. Google does seem to fail me in finding this rare little gem, so I’ll do a favor and host it here for ya.
Download: dgen-sdl-1.23-1.i386.rpm
If you try to straight rpm -vi it, it won’t work. It wants some extra libraries. So, su to root, get online, and use yum to get what you need:
yum install SDL mesa-libGL compat-libstdc++-296
This gets us the right files, but it expects libstdc++-libc6.1-1.so.2. We have libstdc++-3-libc6.2-2-2.10.0.so, which does the job, so we make a link to it:
cd /usr/lib ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2
Even after this effort, the RPM still doesn’t think we have everything, but that shows what it knows. Just tell it to ignore its ignorance and run the install:
rpm -vi --nodeps dgen-sdl-1.23-1.i386.rpm
The program should end up as /usr/bin/dgen.
Happy XO Tweaks
If you run from here, you’ll find that you get a tiny window in the corner, not really large enough to play on. So, a few tweaks are in order.
Move to your home directory and ls -al. There should be a directory .dgen. If so, cd into it, else make it and do so. Inside that directory, we want a file dgenrc. Again, make on if need be. Here is the options I use:
int_scale = 3 key_pad1_up = kp_8 key_pad1_right = kp_6 key_pad1_down = kp_2 key_pad1_left = kp_4 key_pad1_start = kp_9 key_pad1_a = kp_7 key_pad1_b = kp_3 key_pad1_c = kp_1 key_cpu_toggle = c
The first line scales the screen mostly to the borders. The OLPC uses an unwavering 1200×900 resolution screen, and any resolution smaller than that just shows up smaller on the screen. I find 3 to be the best, as 4 just barely doesn’t fit (being 1280 x 960). The next several lines map the controls to the gamepad on the monitor. For those who don’t know, the gamepad buttons actually map to what would be the number pad keys on a normal keyboard. By my settings, A, B, and C map to square, X, and check, respectively, while Start maps to O.
The last line moves the CPU toggle key down from a volume button to the keyboard’s C key. This is sometimes needed on games that hang. For example, Sonic 2 can’t make it past the screen just before the title screen. But, if you toggle the CPU at this screen, it’ll get past, and you can then toggle it back. The alternate CPU doesn’t run very well on the XO, so you should only use it on these little hang-ups.
Finally, you want to run it. At the command-line, here’s how I run Sonic 2:
/usr/bin/dgen -f sonic2.bin
The -f tells it Fullscreen, which combines with the int_scale = 3 in my dgenrc to center the screen, so I get a nice black border. I found that telling the dgenrc to use fullscreen doesn’t work the same way.
And there you go, 16-bit Sega goodness on your XO. Now you can tell all of your friends that not only does your XO support children in third world nations, but it has Blast Processing! Hope this is helpful, and thanks to iluvpandas4 for the question. As always, questions are welcome in the forums.
- As an added note, make sure you are not running as root when you start DGen. All of those fancy options in dgenrc are in your home directory. If you are on as root, it checks the root’s home directory. You could, of course, just copy the .dgen folder into root’s home directory as well.





