Thursday, May 7, 2009

Emulators without Front Ends

One of the things that pains me about Linux in general is that lots of the emulators available don't have a front end. Don't get me wrong, I'm more than comfortable using the command line, but it's nice sometimes just to be presented with a list of games to pick from rather than have to type it in full (I know, I can use auto-complete in the terminal).
Anyway, a bit of googling around and I came across a script that I was able to modify to do exactly what I needed for O2EM.

cd "$ROMDIR"
while /bin/true;
ROM=$(zenity --title "Select a game" --file-selection)
#O2EM just wants the ROM name, so remove the path
if [ -n "$ROM" ]; then
cd "$EMUDIR"
~/Apps/o2em/o2em "$ROM" -fullscreen -scanlines -s1=3 -s2=3 ;
else exit

Wednesday, May 6, 2009

Ubuntu Upgrade - Complete!

For a couple of days now I've been considering upgrading my desktop version of Ubuntu 8.10 to 9.04. I've held off because I know that the last 2 have been a right royal PITA because of the PulseAudio configuration. Most of the time the PA stuff just did what I wanted, but I have an emulator (XRoar) that uses OSS for it's sound, and whilst PA is supposed to be able to cope with it it's always behaved really badly, to the point that when I finally got it working I was content to just leave it be. Coincidentally, for the last couple of days I've been trying to install the O2EM emulator, and that's not been much fun either.
O2EM uses the Allegro libraries, and lo and behold they have a problem with ALSA/PulseAudio combinations. I'd hoped that the upgrade from 8.10 to 9.04 would solve this, but it didn't.
The whole process of the upgrade took me just over 90 mins from start to finish. I opted to go for a download of the install cd and trash the existing Ubuntu partition rather than perform a real upgrade. This method allowed me to start from scratch, which can be a big problem if you've not got a current back up of your home folder. Fortunately a couple of releases ago I separated out the home folder to it's own partition, just for this eventuality, so I was able to do a clean install without worrying about data.
I've also documented the entire process, complete with all the apps that I normally use, so next time (October) it should be even slicker.
To get back to the point of the post, I'm now back up and running and everything seems to be fine - apart from printing, which according to Google is broken when you're trying to use Samba - which I am. I don't do a lot of printing, so it's not a great issue for me at the moment, so I'll wait for a fix.
On the emulator front the upgrade has worked really well. XRoar now works better than ever, and I don't need to force it to use ALSA, the PA setup flawlessly detects it's using OSS and routes it through the correct sound channels - in fact it's better than previously as the stuttering effect is totally gone.
O2EM took me a bit longer, but I finally cracked it by forcing the sound system to use ESD. There's a not very well documented method for doing Allegro configuration using a rc file in your home folder, which when you plug the right values in specifies how the Allegro libs are supposed to work. Setting the sound to use ESD allows PulseAudio to get on and do it's thing of managing the sound system, and now I can play all my Videopac games without having to mess about setting up the console. Now if I can only configure it to use a joystick I'll be in heaven.

Update: I've just figured out the joystick thing. It totally rocks!
Update2: Printing works now - I upgraded the other pc and published the printer