Sunday, April 17, 2005

Developer Spotlight: Graham Toal

A while after writing a review for the little-known game, Tailgunner, the Author has made himself known to me and provided some background on his developments. Here is some behind the scenes info on developer Graham Toal, which I think makes for an interesting read, from a very friendly fellow.

I'd done the work on tailgunner before I ever had a GP32; I originally
ported it to learn about binary translation (actually I reinvented the
technique without knowing it had been done before or even at the time
that it had a name!), but sometime after that project I thought it would
be fun to put it on my Palm. This was back in the days of 68000 Palms
and of course it ran like a brick. Later I bought a GBA and it *almost*
ran on that, but finally I discovered the GP32 and had a platform where
tailgunner would run at full speed. I'm fairly sure that the GP32 is
at that magic borderline of speed where a regular emulator just doesn't
quite cut it.

So, I learned enough to poke pixels on the screen and port the game
to the GP32, and it is pretty much complete - it's sometimes mentioned
as a demo, but that means it's a demo of *static binary translation*, not
a demo of tailgunner. The only thing missing at the time was that no-one
had ever samples the sounds from the game, so I couldn't add them. (and
believe me for several years I had been asking people who had access to
the cabinets to do the sampling but no-one ever did). Well, eventually
someone did, and I got a copy and shortly after so did MAME.

I didn't have the enthusiasm to add sound to the GP32 port, though I'ld
love if someone else did - the hooks are all there, basically all that is
needed is to kick off the appropriate sound in the appropriate procedure
which is currently a skeleton.

Since the core of the game was in very simple C, it just took a trivial
edit to convert it into Java, then Norbert Kehrer added graphics in
Java, and we put the game on the web:

In the year or so since then, I first did a write-up of binary translation,
then I worked on a couple more translators (6502 then z80) as proof of
concept - unfortunately I had way too much 'real' work to be able to spend
the time I needed to finish those off, so they sat there with code generation
about 99% complete but no test harness to run games in since I'm not
really much of a GUI/video guy.

Anyway, the next development was that Neil Bradley (emulator guru) picked
up on the static binary translation stuff and wanted to write one himself.
I've been working with him for over a year now - his project is to write
a suite of translators (much in the way that MAME is a suite of emulators)
for multiple CPUs, and to use compiler-like technology to generate a
common back-end which will do optimisations and generate code that is
as close to optimial as it might be if the game had been written directly
for the target platform. A pretty ambitious project but we've had
impressive results so far, with frame rates like 50,000 frames per
second (not including the actual graphics; just the game play) for games
which when emulated might have been below 1000 fps with the same

Our current test program is Ms Pacman, and one of the things I want to
do for the GP32 is a MsPac with the display rotated sideways and scaled
to fit the full screen exactly. (The gp32 plays well sideways for
games that only use the joystick and don't need buttons as well). This
will probably be for personal use only as MsPac is still a commercial
property and the owners are likely to get upset if a high quality port
were made available. (Whereas with tailgunner, I've even spoken to the
original author about my work and he never raised any objections; in fact
he was quite interested in what we were doing)

Neil's optimised translations ought to also be fast enough that
some of the games will also run on the GBA which simply could not
go fast enough before - even with my earlier somewhat less optimised

Lookout for Graham's projects in future, and don't forget to visit his Homepage. If you want some meaty info on writing emulators or compiling, don't miss this essential link:


Blogger BobBorakovitz said...

very interesting read!

Mon Apr 18, 04:40:00 PM EDT  

Post a Comment

<< Home