Gareth is very well known in Acorn emulation circles for his work on the MAME project, as well as his other up and coming emulation projects, MESS, Retrocade and SNES9x. Oh, and also his incredible ability to avoid sleep! I suggest you make yourself a nice cup of tea/grab a beer, before you start reading (you'll be here a while).
When did you first get interested in emulation?
I guess from a user's point of view, it was quite a long time ago.. around November 1987 when I first got an A310 and played with 65Arthur in order to try and get some BBC Micro software running. From a programmer's point of view, it probably started with hacking that same emulator to try and support games to some extent.
65Arthur was a very nice piece of code considering the timescale it was written to. Acorn should make it available in sourcecode form, seeing as they're done with it.
How did you get to become a member of the MAME team?
It's not a very complicated story. I started on the ARM version of MAME in June, 1997. Conversion wasn't entirely smooth, as modifications had to be made to some of the files in order to get round problems with things such as ARM's B'zarre non word-aligned 32-bit memory loads/stores, and so on. Also, at the time, the core code of MAME was a bit hackier, and some features, like the dynamic palette support used by Williams games, was hard coded for DOS users only. It was becoming too wasteful to continue applying these patches for every version, so I contacted Mirko Buffoni, at the time the sole MAME moderator. Actually, the other reason I contacted him was to discuss the possibility of a derivative of MAME supporting a development version of my Sega Genesis emulator...
I was stunned Mirko replied within about 2 hours of my sending the mail. Suddenly I found myself part of the MAME development team.
Had any of the MAME team ever heard of an Acorn before you joined?
Actually I was surprised! I tried to give a quick overview of Acorn machines in my initial email to Mirko. His reply to that paragraph went along the lines of "Of course I've heard of Acorn! They are hard machines to get hold of over here though, so I guess I'm happy to use my P150 instead".
I'll point out now that though the guy must get a squillion (some of them probably insulting and horrible) emails a day, he has too much (in my opinion) time for everyone. He's one of the nicest people I've ever worked with, incredibly enthusiastic about everything he does.
Aside from all that, you get different responses from different people; some have heard of Acorn machines but don't know exactly what they are or what they do. Some have heard of the ARM processors, others have heard of the Psion 5 and know that has some kind of link with Acorn machines.
What sort of form was MAME in when you started to port it, obviously not the gargantuan giant we have now?
In comparison, it was very small. Very very small! And quite simple in many ways, especially if you compare it to what we have now. And that's the only real way you could ever have called it small. The whole system had only been available for around 5 months at that time.
Which was the first version of MAME you ported?
0.23, released on 3rd June, 1997. This was the first version of MAME I actually played with. I had heard about it previously, and a friend at work downloaded it and a few games. I was amazed.. it played Donkey Kong! I picked up the source code and had a look at it. Then I got sidetracked...
Anyway, I ported this, my first version, on Friday, June 6th, 1997. (because) I was pretty drunk, but was too tired that night to go out. The most time that night was spent hammering the source tree into a RISC OS compilable form, battling with dilemmas such as which compiler to use, how to organise the files, which curry house to order from etc. I think I got graphics onscreen that night, without the correct palette. keyboard control, palette and mode selection followed a little later. The rest, as they say, is history.
Are you or have you developed any of the generic MAME core, or just sticking to doing the ARM port?
My first involvement with the MAME team came as a result of needing to make changes to the MAME core, both on the ARM conversion side, and the possibility of console and computer emulation. To date I have provided fixes and changes for several core elements, provided technical support and code for the creation of some of the drivers, and have started on driver code for some of the new areas MAME will be moving in to soon... Hopefully, when I get a little more time, I'll finish work on my Barcrest Crystal Maze (featuring Ocean Zone ;-) ) driver, this following on to more current UK pub/SWP titles, and move onto the free pool of as yet unemulated board and ROM sets.
What prompted the formation of the MESS team?
The mail to Mirko as described above. I found out later that Mirko had posted this message verbatim onto the internal MAME developer's list whilst seeking Nicola Salmoria's acceptance of me onto the team. Nicola gave permission for MAME code to be incorporated into this derivative. I carried on with a development MAME-driver-based C version of my ARM coded Genesis emulator, hoping to put it to a wider audience once I was happier with it.
In late January, Brad Oliver, another MAME team member, prolific driver writer and most importantly, guy who said he owed me a beer, approached me regarding the multi console emulator idea. He had already started work on a NES driver, using the abandoned xNES project's source as a core. Brad had already added updates to xNES even before it became a MESS driver - the release of the newer version of xNES being cancelled as a result of permission being denied by one or two of the original authors to have any of their code used.
It was decided we should enhance the range of systems supported to cover computer systems as well.
The core needed to be reworked in several ways to handle a system such as MESS, for example, to support a dynamic cartridge/disc image/tape loading/detection system, instead of MAME's fixed PROM set/graphic PROM set/checksumming system. Also, a full keyboard needs to be supported for the computer emulations, and so on.
MESS was born, supporting two consoles :-)
Soon, a few other ex-xNES people joined in, as well as the guy responsible for the Unix MAME port. MAME's Mike Balfour joined and added a ColecoVision driver. For MESS 0.1, we also managed to squeeze in some TRS-80 flavours and the Colour Genie, thanks to Juergen Buchmueller.
What does MESS stand for anyway?
Multi Emulator Super System. Aren't you glad you asked? ;-)
The name sounds more like the kind of add ons you get for a NES/Famicom. Actually, thinking about it, it sounds a bit like a marital aid. Oh well, it's too late to change it now :-) It also gives us an excuse to say some of the drivers look like a MESS right now, which in the case of the Genesis driver, is certainly the case. That has fragments of at least three completely different ways of handling graphics, as I remember it. Some faster, but with a more incorrect approach to future upgradability. I'm sure I'll explain this point more fully once you all see it ;-)
Mirko had suggested MCME originally, I think.
How long has the MESS team been working on the project?
The Genesis driver has some fragments of code dating back to late September, 1997, though MESS becamse a real project in late January, 1998.
Which parts of MESS have you been working on?
The core, ARM port, Genesis driver for 0.1. I was going to maintain the DOS port, but thankfully Neil Bradley is likely to pick it up. We'll get to him a little later. There are other ideas for the future whch I will implement.
What new systems are being planned to be brought to MESS in the future?
Atari 2600, Apple IIe, BBC Micro/Master/Electron, SNES, etc. If it's a computer or a console, it's likely to be supported at some point. So essentially, insert your own answers here.
Will MESS work on older machines for the most part, ie. for NES, TRS-80, ColorGenie emulation even if not megadrive?
Let's hope so. The problem with some console machines, however, is that their strengths and weaknesses can be misleading. Man cannot judge a machine by it's CPU speed alone. Sound processors, audio processors, graphics processors all have clock speeds too, and expect to read in and spew out information with accurate timing, and in perfect harmony. Acorn machines up until the Phoebe (Smelly Cat) all have an external memory subsystem of an appallingly low 16MHz. Once you blow the L1 cache (and we have no L2), we're back to 386 PC speeds. Look at MAME, you'll find some games already need more memory bandwidth than that, even in emulation terms. This is where Acorn machines have real problems when it comes to emulation...
Even though a NES, for example, might sound quite simple in terms of processing power, the sprite/background layer system is quite complex, and to emulate many games correctly, you need to handle scanline-level interrupts with exact timing. This is like handling an Elite-style split mode effect, on every scanline. This isn't easy to emulate. This is even moreso the case with the Sega Megadrive. Thankfully MESS's core is able to handle multiple CPUs, with interleaving, very high resolution timing control, etc. Hopefully the lesser systems will run okay. We're working to try and optimise the core now that it's essentially there and appears to be working fine. If it doesn't work well now, expect things to get nicer in the future.
What is the idea behind emulating so many different consoles and computers all in one program, why not just do them separately?
Because a great deal of the components are shared, for example, the CPUs, the user interface, memory accessing subsystem, cartridge/tape/disc loading and storing.. as the system gets larger, the sharing becomes more important, and makes things easier to maintain. Imagine having almost 600 executables instead of MAME!
It's a similar situation with modular approaches to design. In reality, the game drivers are all pretty small, it's the CPU and video/sound processors which are big. The only difference made in the end, is to executable size. Unfortunately, only us Acorn-type people have a real problem with this; on other systems the unused parts of the executable get paged away by the VM system.
Having said that, if I'm to finish the Psion 5 version, it has to be split into manageable chunks. I'm considering ways of doing this at the moment.
Have you felt a bit belittled working in the MAME and MESS teams, bringing the emulators to a relatively unknown platform?
Oh yes! Who wouldn't! The initial download figures for even the preliminary information on MESS was staggering. It's definitely going to be a case of 'We're not worthy!'. I'm always quick to acknowledge true brilliance and you'll see a lot of it on the MAME, MESS and Retrocade teams. Compared to some of the primadonnas I've seen in the computer industry, it's refreshing.
Do you feel that there's a bit of a danger with projects such as MESS and MAME that they'll become overly bloated?
With what? Having two separate systems means that there's a good separation. MAME will continue to grow with Arcade related machines, MESS with consoles and computers. They won't be containing an inbuilt web-browser for a long long time...
How will dynamic recompilation help the speed of MESS and MAME?
Greatly. It's difficult to say at the moment because there are issues with running multiple CPU emulations at once (some machines use up to four, all at different speeds). The speed increase will be greater on systems which don't have their own machine-coded emulator cores (Only Macs have ASM CPU cores at the moment).
Who's doing the hard work on the dynamic recompilation?
It's in the design stage at the moment. There are various issues to consider; how back-ends are designed, the ability to design a kind of CPU-independant middle layer for handling some common considerations in a unified way, etc. Dynamic recompilation can be a disaster if it isn't tackled right.
What prompted you to take on an attempt at porting SNES9x?
You! You asked who'd pick it up, I quickly sent an email message to the appropriate address saying what I do. They said 'Okay'. That was it...
Have you had a version of SNES9x running on your Acorn yet?
No. The source is taking a while to materialise.
With MAME, MESS and now Retrocade to work on as well, when can we expect to see ARM SNES9x?
Hopefully a very short period of time after I do. Sorry to be so vague, but hopefully it should be speedy.. it is only a single core emulator after all.
How did you get to be a member of the Retrocade team?
Neil Bradley, the Retrocade moderator, is also a member of the MAME team. We got talking about Retrocade, and I became part of the team. But not before Krofft dinner! Then we went looking for treasure... Becoming a member of the Retrocade team was, in theory, a more difficult task, because to join the Retrocade team, you have to be voted in by more than 50% of the existing members, rather than having the backing of just one or two senior people.
How will you get Retrocade to work so much faster than MAME on older machines?
The cores are machine coded, as are some of the components. There are some faster block emulations due to the fact that Retrocade source code is not available to anyone outside of the team, meaning that code has been donated to Retrocade because it fits in with licensing restrictions which are otherwise not compatible with MAME's. In these cases, MAME would take a little longer to catch up. Other than that, we'll just have to see how performance goes. In the end, we have Acorn machine's memory bandwidth restrictions to consider, which in the end provide the biggest bottlenecks.
Any idea when the Retrocade team will be releasing the first version? Any time soon?
Restricted versions were sent to selected beta testers on June 1st. It's not yet known when the first public release will be.
What are they waiting for?
They want the first release to go as cleanly as possible.. they've been working on it for a long time, the relative amount of time before a public release is short. It's worth spending the extra time trying to sort the remaining problems out.
Any details of games unsupported by MAME that are supported by Retrocade?
A preliminary list is available on http://www.retrocade.com - as I write, the scales get tipped either way.. I'd just compare current betas and see!
Won't being a member of retrocade and MAME be a little conflicting since they are in effect competing emulators?
Well, Neil Bradley is a member of the MAME team and, as of very recently, the MESS team. Several of the MESS team are also Retrocade team members. In the end I'm not the only one. The politics are different, and there have been one or two minor scrapes, but in the end we're all essentially going in the same direction.. and isn't a little competition a good thing..? ;-) (the answer is yes).
Do you find it frustrating having the inside track on all the forthcoming games and developments and not being able to tell anyone about them?
Maybe.. who could say..? ;-) Yes, but it's something I've gotten used to. All aspects of everything I do careerwise involve an NDA (Non-disclosure agreement) at some stage.
Why work on emulators for the Acorn platform, when you could have so much more recognition if you did them for the PC?
I like porting things over to RISC OS, as it's the first platform I became immediately familiar with (disregarding earlier Acorn machines for now). My emulator work is largely multi-platform anyway. MESS is a worldwide, multi-targetted emulator. There's enough recognition in that alone!
Ultimately, recognition should be secondary. It will find you. Read into my software romanticism theory.
Have you had much support from the users of the emulators?
Yes, the RISC OS userbase has typically been very responsive and supportive of my work so far, which I am glad about. Support works both ways, I have to try to give as much as I can. There are many types of emulator users, the responses being more varied than with other types of computer product in my opinion, from die-hard fans to die-hard anti-emulation types, from experienced engineers in other areas of computing to software romanticists who write open letters saying how what you're doing could so easily be improved by doing this, that or the other, when they've not really thought about the problem at hand, or why it was resolved in a particular way, or actually produced anything in any case.
Have you ever thought about writing any other emulators?
In the course of my job, I've written other emulators already, but they are probably of little use to the general public. I have a lot of drivers for MAME and MESS I want to write, I'll see how far that takes me to begin with.
What sort of qualifications do you need to make a decent emulator?
Hmm... I don't think it's difficult to have a go at writing an emulator. Experience in using the right tool for the job is the way to start, and the ability to think clearly about what you want to achieve and the best way to achieve it. Emulation in itself can be a vague term, as tricks can be employed to substitute real emulation in some cases. Finding tricks later on is the key to emulating things more speedily given a specific target. If you want to go about things properly, a thorough understanding of what you're emulating is needed, which in many cases means having a little hardware knowledge at least, and the ability to be able to understand an often terse technical reference manual. In cases where documentation isn't available (as was the case with Genesis), things really get hairy. Several people, as part of the MAME team, spend hours pouring over rare schematics in order to provide the ROMs people use.
Mirko Buffoni and Nicola Salmoria haven't been on the emulator scene for a great deal of time, their enthusiasm carried them into it, and was a result of the work of other kind people, for example Allard Van Der Bas, who worked hard and provideded source code for their work. Look at the MAME/MESS source if you're interested in emulation, because that is exactly what it's there for. If you become fanatical as a result, I'm sure they'd be proud to hear about it, as would I.
The ability to logically think through and debug a process is extremely important. When you start writing an emulator, you have nothing. But in order to get anything from the emulator at all, most of it needs to work perfectly. There is no simple progression; you cannot easily see how far you've got, until you're almost right at the end of the debugging process. So you have to be prepared to slog, but the results are extremely rewarding. Oh, and if you can, share your achievements!
What do you do for a day job?
Senior Research Engineer for a company called Maygay machines based in Wolverhampton (awwroight!). It's one of Europe's largest arcade/fruit machine manufacturers. My specific role is to research and develop software/hardware, libraries, system stuff, and provide solutions for the software engineers to work with. An example is the design and deevelopment of our new video technology, which is pretty sexy with it's PCI/ISA bus, fast processor, support for PC video/3D cards, complete built-in ICE, etc, etc... One of the main advantages is that I get to work with who, in my opinion, is one of the greatest and most enthusiastic hardware designers in the computer-related industry.
I'll point out now that anyone expecting me to have a Wolverhampton accent will be surprised. I don't come from here. My accent has been dubbed as American, Australian, Welsh, South African...
I used to be known as Export Software Team Leader, heading all games machine development into Spain. That was a thankless task, and I'm glad it's over. I was young, and needed the money...
What consoles and computers do you own?
Oooh :-)
Consoles: Sony PlayStation + Development kit. Nintendo 64 + Doctor V64 (and thus development with my PC), Atari Lynx, Nintendo Game Boy, Nintendo Virtual Boy, Sega Game Gear. I do not own a Sega Megadrive. I almost bought one the other week, however. 20 quid! A serious bargain at that price, believe me :-) An impressive piece of hardware. I didn't have enough room to carry one home, though.
Computers: Risc PC, A7000+, A4, K6/233, Toshiba portable PC, Psion 5, Psion 3c, Psion 3, HP200LX, Apple Newton. HP320LX in a couple of days, because I need to complete the set.
I may have missed some out.
Do you have any favourite emulated games?
Oh yes, quite a few! I guess I've overplayed some of them now, but Invaders Revenge, Pac Man, Donkey Kong, Scramble, Galaxians, Space Invaders, Breakout, Lunar Lander, Phoenix, Asteroids and Missle Command bring back arcade memories for me. Tac-Scan is a nicely written game I discovered because of MAME. Who doesn't have a memory of playing one of these during their youth?
The Atari 2600 provides more classic games I really enjoyed playing when I had one as a child. Games like Yar's Revenge and the like were superb. I think there was a streak of originality around this era which seems to have slowly disappeared, which is a shame. Software/games design for the 2600 was difficult, trying to squeeze games into the xx cycles of processor time left between scanline fills without interrupts was a technical achievement, but I'd imagine to be extremely rewarding. Many of the original 2600 authors went on to become famous in other areas of design. Current embedded systems are relatively speaking much easier to write code for, but there's more of it, more to drive...
As an aside, Acorn machine developers also have a lot to be proud of, of course! Look at Jeremy Smith and Core Design, one of the authors of games like BBC Match Day and Stryker's Run, following on to the Wing Commander Series. David Braben and Ian Bell. Sophie Wilson, my absolute idol! Tim Dobson and Stuart Swales. Tim Browse. Cor, whatever happened to him? Oh I remember, he's supposed to be working on the BBC Emulator driver for MESS... Gary Partis! The BBC Emulator must be able to run Dr Who And The Mines Of Terror... And I need all the solutions for all versions of that!
Do you ever use any other emulators?
Of course :-) Atari 2600 emulation in particular interests me, as do good examples of dynamic recompilation. Ardi's Executor is a stunning piece of work. David McEwan's and Ian Molton's 2600 emulators are both doing very well, as is of course all their work to date.
Do you ever turn the computer off?
My PC has a standby button :-) Three of my computers live on a computer desk in my budoir, with their own private telephone line. I am thankful the computer desk has not collapsed. That would really screw a CD writing session I'd imagine.
...sleep?
I sleep with regularity, just not a great deal of contiguous hours spent doing it :-) Actually, I probably do about 20 hours of being concious a day. Sleep-cycle-wise, that seems to be the best for me so I don't really consider it to be any kind of amazing feat. I have gone for several days without sleep, but it's not to be recommended, because it builds up on you, and it's pretty bad for your skin.. I sleep more over weekends... :-)
Actually, reading through all this it may seem like I just write emulators all the time. Actually, I spend less time with it all than it appears, thankfully! I couldn't survive without regularly going out and doing something else. It wouldn't be normal, and it would do my head in big time. I am a social animal, as is anyone. The more quality you add to your breaktime, the better you can work. To use an analogy anyone can relate to, didn't absolutely any kind of procrastination feel good when you used to revise? :-) The gradient between work and play is better left steep, this results in you being able to appreciate both more. Settle the slope and you become a zombie.
Anything you'd like to say?
I've written a whole damn lot. I appear to have a very big mouth ;-) The key to evolution is the ability to regularly defeat the urge to procrastinate and reduce the gradient between what you feel is relaxation and what you feel is hard work. If you want to do something, do it! Don't spend time actually talking yourself out of it. It's easier just to start on it and get it done, or at least give it a good shot. In the end, no matter what happens, you'll have something to talk about. Oh, and watch South Park, because it is amazingly good. Profound, even.