If you have played MAME, you have had to have seen the
name Bryan McPhail in one of those credit screens. Many
people find the name familiar, however this MAME driver
author has not received the deserved publicity. Albeit his
shyness maybe, he has contributed numerous drivers to the
MAME collection, mainly in the Data East arena. Games like
Last Duel, Midnight Resistance, Sly Spy, Xenophobe, Robocop,
Bad Dudes and many many others are playable thanks to him.
We decided to send him a couple of Questions, so the public
had an opportunity to get to know MAME's Data East main man,
|MAME Drivers gallore, Bryan McPhail - October 16, '98 by SpectorX
1. Can you introduce yourself, and tell us how you got into the
world as a programmer?
Well... I'm Bryan McPhail (aka Mish), age 21 (22 this month), 4th year
Computer Science student at University in Glasgow, Scotland.
My first emulation was long before the 'scene' started... In fact long
before most of the people reading this were even on the internet! It was
maybe as much as 6 years ago when I found a BBC B emulator for the Atari
ST. It included source code (in 68000 asm) and didn't really do much! It
wasn't able to play any games, in fact there were no games available back
then. I expanded the emulator a bit and with a bizarre wiring setup
managed to transfer some BBC tape files to my ST, eventually I got the
emulator good enough to run some text adventures. The ST was far to slow
to do any more though, emulating graphic games weren't really an option,
and I had virtually no documentation.
Some years later, I had a PC and was on the internet and came across what
I think was called Node 99, one of the biggest sites in the 'early days'.
I downloaded the early SNES & Megadrive emulators (none of them worked
then! ;) and then found the arcade stuff which was great as I could play
old favourites like Mr Do, Ghosts N Goblins, Black Tiger, etc.
I did, of course, find Mame and download the source code to examine how
it worked... I'd always known 'roughly' how arcade games worked but it
was a big learning experience. I started messing about and when the Mame
team released what I think was v0.30 which had an integrated debugger I
really made progress and actually got some emulations to run! Soon after
they kindly asked me to join the team (actually they didn't ask, they put
me on the mailing list without telling me ;) and I've been writing drivers
ever since :)
2. What sort of skill sets people interested in becoming an emu author
Well people talk about needing to be good at C and Intel asm in order to
program your emulator. That's not necessarily true. It also helps to
have good knowledge of computer science theories and techniques, like
dirty buffering of graphics, page flipping, hash tables for finding memory
arrays and so on. But all that stuff is about making your emulator work
_well_! You still have to make it _work_! The number 1 skill you need is
reverse-engineering. To put it straight - you are taking a bunch of files
filled with apparently random numbers, from those numbers you will need to
identify the program, what is sound data, what is graphic data, what are
tile maps to levels, what is the palette, how are the graphics stored,
what order do the program roms fit together in. Stage 1 is to get the
program to run, then you see all of the inputs and outputs the program
does. You need to turn another set of numbers into graphics and sound!
Really the most time-consuming part will be reverse-engineering the
graphics, you have to figure out how sprites work, where the playfields
are, how the tile maps are drawn... And if you are doing a title from
perhaps about 1988 onwards, they will be no schematics to work from.
Around that time manufacturers just stopped supplying them.
But that of course, is the fun of writing emulators! It's like a giant
puzzle you can solve piece by piece (get it to run, get the sprites going,
add the playfields, fix the colours...)
Oh, and apart from reverse-engineering, you also have to understand ASM
code of the processor you are emulating!
3. Did you have all this before starting writing drivers? Did you expect
it to be like it is?
I learned 68000 on the Atari ST, I taught myself it by examining 'demos'
and 'intros' by the cracker crews using the (then) famous Devpac
disassembler/assembler system. That also gave me some reverse-engineering
skills as I had no books on how the Atari hardware worked, I managed to
figure out most of it just from examing routines in games & demos.
4. How would you rate writing emulators in difficulty as compared to
writing games, business applications, or any other regular stuff?
That's a hard question... It takes a long time to make a good emulator,
that is, one that is accurate, stable, works on all hardware
configurations, etc. It also takes a long time to make a good game. And
like the games business most emulators are now programmed by teams (Mame,
Retrocade, PSX, Snes, etc). Guess what? It also takes a long time to
build a good business application, so really I have to say they are as
hard as each other. (Of course, it takes no time to build a BAD business
application using Visual C++ or something!)
5. What projects have you been involved in since you first started?
Mainly just game drivers, I haven't done much, if anything I think, to the
Mame core, or any other emulator for that matter. I started with the Data
East 16 bit games, eventually moved onto Data East 8 bits games, then a
mixture of what else interested me - Xenophobe, The Main Event, Last Duel,
6. Which ones have you considered the most challenging, or difficult?
It took a while to crack the encryption on Dark Seal (Gate Of Doom),
though in retrospect it was quite simple! The Caveman Ninja romset sat on
my hard disk for a long time before working too, that game has something
like 300 protection checks, all of which lead to an instant crash if they
fail. Of course some games I have worked on still don't work properly
so I guess they could be called difficult! The protection on games like
Chelnov and Hippodrome is very strange and hard to figure out.
The graphics hardware in POW was very hard to figure out, in fact my first
two or three attempts at implementing it were totally wrong...
7. When you decide a driver to work on, do you look for a challenge, or
do you simply want to get the game working and find the next victim?
I go by manufacturer first of all, many people will remember my 'Data East
Emu News' page :) Which chartered my early progress into emulation as I
basically learned how to do it! (I didn't have time to keep the updates
going, but the page shall return in some form some day ;)
So if someone finds a new Data East rom-set, I'll do a driver for that,
because they are usually similar to existing Data East games.
I don't really look for a 'challenge' because challenges are usually
really hard ;) I probably wouldn't try to implement a new cpu core to play
a game (takes a _lot_ of time), but I would try to crack a protected game.
I've also just taken pot luck from the list of unemulated games and had a
go at them :) (Mad Gear, Super Stingray, Last Duel, etc).
8. What do you think will be the next major additions to MAME?
I have really no idea! I know some people are working on some nice things
that people will like, but I'm not giving away the news ;) For news that
people already know I think Mortal Kombat is a long awaited game and that
will be a major addition in my opinion. One day we will have
Streetfighter 2 as well, many Mac people are waiting for that!
9. In your experience, what have been the most CPU intensive tasks for
emulators (graphics, sound, colors)?
The most recent Dos Mame beta included a profiler so you can see (_very_
roughly for now), where the cpu time is going. Typically the CPU
emulation will take maybe a 5th of the emulation time (for a 68000 game),
and the video emulation about the same. Of course it varies a lot from
game to game. FM sound, eg, YM2151 emulation, can take a _lot_ of time
which really slows games down. FM sound takes masses of calculations just
for one channel and advanced chips like YM2151 have lots of channels!
Colours are often overlooked when it comes to speed, but for a hi-colour
game (say 4096 colours) running in 256 colours (on DOS) it can take maybe
15% of the video time each frame to compress the palette.
10. Do you think MAME is a very optimized system in terms of speed?
A lot of people complain about Mame's speed but I think it's pretty good
for what it does. There are speedups to come... (Stay tuned ;)
11. Assuming you could change anything to MAME in a snap to make it
better, something possible but that hasnt happened, what would you
change to it?
I really have no idea! Let me think... A plug in PCI card that had
several _real_ YM2151, YM2203, YM2610, YM3812 chips plus selectable clock
frequencies - that way you could get perfect sound on most games with no
loss of speed! (As a side point, someone in Japan was considering making
a board like that... and the price was unbelievable! It was something
like 600 USD!)
12. In your words, what is the future of Emulation?
I think Mame will continue to grow and along with other emulators I think
that just about every game from the 70s, 80s and early 90s will be
emulated! I think the cut-off point will be the '3d' games that started
in the 90s, using RISC processors and lots of 3d custom hardware. It may
be a while before stuff like that appears, if ever.
I think the SNES and Megadrive and other consoles like that will be
emulated perfectly very soon. Full credit go to the team that got
MarioKart running - one of my favourite games of all time!
Hopefully someone will release a Saturn emulator that works just by
putting a saturn cd in your PC cd-rom drive.
13. Any special words for fans, or anything in particular?
We thanked Bryan for his
time taken to answer the questionaire as this was done a
few days ago. MAME players can already taste what he meants
by improvements to the MAME Core as the M68000 ASM core was included yesterday in MAME accelerating it noticeably. Many
thanks for his arduous work in MAME and we hope him the best
in getting many more games to work.
One Article Up: A Couple of News Items
One Article Down: The Big If...
Add Your Comments
||Posted: Tuesday, October 7, 2003 - (22:43)
|Subject: Great reading this again !!|
I've just re-read this review after being reminded of it recently on Mame World. Brought back memories ... Hope all is going well for you still Bryan ... :)
Mike "Moose" O'Malley
Moose's Software Valley - Established July, 1996.
WEB: http://move.to/moose Email: email@example.com
[Post a reply]
||Posted: Thursday, January 27, 2000 - (13:11)
[Post a reply]
||Posted: Thursday, January 27, 2000 - (13:13)
|Subject: Re: |
[Post a reply]
Post Some NEW Comments on this topic...|