PPC Linux and Sega Megadrive/Genesis emulation
February 26th, 2011
This time exceptionally in English – I thought this might benefit some fellow PPC users abroad, too. It seems by all accounts that Megadrive/Genesis emulation under PPC Linux is a hopeless attempt: Dgen just crashes, Xmess doesn’t do any better, and up-to-date emulators, such as Gens/GS, don’t support the PPC platform (a generic Z80 core is apparently under construction). I was looking into compiling the excellent PicoDrive, but its sources seem to be here and there and no generic Linux version exists. So, no Megadrive for us, right?
Luckily I came across Generator, which has been ported to Linux/SDL a few years ago. After the usual configure/make fiddling the emulator actually ran games, but with distorted sound. A quick peek at the sources revealed a tiny endian problem, which was quickly fixed. While I was at it, I added an example config file, a PPC Linux binary, options to force the video overlay off (in case it doesn’t work for you), set the fullscreen resolution and to turn CPU saving off. I didn’t like the fact that the emulator wouldn’t start the games right away, so I turned autostart on, too. There are still some grave issues with sound: for example the music in Sonic 2 doesn’t play correctly, but that’s something out of my scope right now. At some point something has been broken – probably with GCC – since when I tried to compile the emulator on x86 Linux it simply crashed after a while. Not much of an issue, though, since there are other alternatives out there.
Download here (source and binary included): generator-0.35-cbiere-marq-r1.tar.gz
If you wish to compile it yourself, just run ./configure –with-sdl –with-cmz80 ; make in the src directory. For running games: ./generator-sdl-ppc romname (and optionally -c generator.config.example). Tested under Ubuntu 10.04 only, so let me know if it works for you. Alternative solutions to Megadrive emulation are most welcome as well.
edit: Apparently the good folks behind Mednafen are working on Sega support too. Here’s hoping 🙂
4 Comments Add your own
1. Antti | February 26th, 2011 at 3:36 pm
With my Ubuntu 10.04 on an iBook, Sonic 1 works pretty fluently. Sonic 2 has a sound problem: it would seem that the size of the sound buffer “fluctuates” (sometimes the sound is too “slow”, sometimes normal).
I could also run the binary directly, with no need to recompile.
Thanks for this!
2. marq | February 26th, 2011 at 8:56 pm
Compiling Mednafen from the latest sources was victorious! Too bad .smd files won’t work, but .bin roms do. The speed is great and the sound seems to be good too. Good work and thank you guys!
3. Antti | February 26th, 2011 at 11:59 pm
Good to know, I’ll try to compile it as well.
I’ve had this file format limitation with AtBlaze’s SD-card-reading portable Megadrive emulator (namely, it also only runs bin files). Found a while ago from an emulation site a program called Grom by Bart Trzynadlowski. It converts from smd to bin files. The program is public domain and comes with source code. Here is a recompile by me for Power PC Linux.
http://asilvast.kapsi.fi/grom_ppc.zip
I’ve included the source if someone wants to compile it on another platform. See readme.txt for more instructions on this.
4. marq | February 28th, 2011 at 2:08 pm
My fix for the SMD cartridges:
http://www.kameli.net/~marq/cart.cpp
(mednafen/src/md/cart/cart.cpp)
Kommentin kirjoitus
You must be logged in to post a comment.
RSS feed for comments on this post.