Thursday, February 10, 2011

PSP Genesis Competition & MinPSPW on Arch Linux

So I haven't programmed for the PSP in over four years, which is quite a significant amount of time considering the PSP hasn't been around for much longer than that. But this latest competition has me dusting off the old PSP dev skills. The PSP Genesis Competition is a new contest put on by a number of sponsors, a couple of which were well-known even back when I was active.

A lot of things have changed since then, too. I have long since moved on from PSP development and no longer have the toolchain installed. As a matter of fact, the laptop on which I did all of my PSP development has moved on to the Great Laptop Scrap Heap In The Sky. So after a bit of digging I find that building the toolchain on my laptop with Arch Linux is largely unchanged. However, a little more digging reveals that most people are using something else these days: MinPSPW.

Now, back in my day we used to scoff at these pre-built toolchains, but by all accounts this is quite useful because it comes with a number of helpful libraries all set up for you. I had already git pull'd ooPo's psptoolchain repo, but I figured I'd give this newfangled pre-built toolchain a shot too. But what's this: the only x86_64 package is .deb, and I'm on Arch! No matter:

How to use a .deb file on Arch Linux

This .deb file, it turns out, is simply an "ar" archive with three files: debian-binary, control.tar.gz, and data.tar.gz. The first is simply an ASCII text file containing the deb format version, which is 2.0 for recent versions. The second also contains three files: control (a text file with the package's meta-information), preinst and postrm (scripts presumably run pre-install and post-removal). The last contains the real meat of the deb package; the data we want to install.

So just extract data.tar.gz (or omit that and extract everything if you'd like):

$ ar x minpspw_0.10.0-1ubuntu0_amd64.deb data.tar.gz

Now you can just extract this package and go off to the races. It's not perfect because pacman doesn't know about it, but personally I don't really mind. The proper way to handle it from here is to figure out dependencies and write a PKGBUILD, then run makepkg. This process is very nicely described on the Arch wiki and shouldn't take very long, if you cared to do it.

No comments:

Post a Comment