free football betting tips oddslot professional soccer betting picks uk
The Site for Views on Emulators





MAME Drivers gallore, Bryan McPhail - October 16,1998 by SpectorX
If you have played MAME, you have had to have seen thename Bryan McPhail in one of those credit screens. Manypeople find the name familiar, however this MAME driverauthor has not received the deserved publicity. Albeit hisshyness maybe, he has contributed numerous drivers to theMAME collection, mainly in the Data East arena. Games likeLast 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 publichad an opportunity to get to know MAME's Data East main man,Bryan McPhail.

1. Can you introduce yourself, and tell us how you got into theemulationworld as a programmer?

Well... I'm Bryan McPhail (aka Mish), age 21 (22 this month), 4th yearComputer Science student at University in Glasgow, Scotland.
My first emulation was long before the 'scene' started... In fact longbefore most of the people reading this were even on the internet! It wasmaybe as much as 6 years ago when I found a BBC B emulator for the AtariST. It included source code (in 68000 asm) and didn't really do much! Itwasn't able to play any games, in fact there were no games available backthen. I expanded the emulator a bit and with a bizarre wiring setupmanaged to transfer some BBC tape files to my ST, eventually I got theemulator good enough to run some text adventures. The ST was far to slowto 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 whatI think was called Node 99, one of the biggest sites in the 'early days'.I downloaded the early SNES & Megadrive emulators (none of them workedthen! ;) and then found the arcade stuff which was great as I could playold favourites like Mr Do, Ghosts N Goblins, Black Tiger, etc.
I did, of course, find Mame and download the source code to examine howit worked... I'd always known 'roughly' how arcade games worked but itwas a big learning experience. I started messing about and when the Mameteam released what I think was v0.30 which had an integrated debugger Ireally made progress and actually got some emulations to run! Soon afterthey kindly asked me to join the team (actually they didn't ask, they putme on the mailing list without telling me ;) and I've been writing driversever since :)

2. What sort of skill sets people interested in becoming an emu authorshould have?

Well people talk about needing to be good at C and Intel asm in order toprogram your emulator. That's not necessarily true. It also helps tohave good knowledge of computer science theories and techniques, likedirty buffering of graphics, page flipping, hash tables for finding memoryarrays 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 isreverse-engineering. To put it straight - you are taking a bunch of filesfilled with apparently random numbers, from those numbers you will need toidentify the program, what is sound data, what is graphic data, what aretile 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 theprogram to run, then you see all of the inputs and outputs the programdoes. You need to turn another set of numbers into graphics and sound!
Really the most time-consuming part will be reverse-engineering thegraphics, you have to figure out how sprites work, where the playfieldsare, how the tile maps are drawn... And if you are doing a title fromperhaps 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 giantpuzzle 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 ASMcode of the processor you are emulating!

3. Did you have all this before starting writing drivers? Did you expectit 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 Devpacdisassembler/assembler system. That also gave me some reverse-engineeringskills as I had no books on how the Atari hardware worked, I managed tofigure out most of it just from examing routines in games & demos.

4. How would you rate writing emulators in difficulty as compared towriting 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 hardwareconfigurations, etc. It also takes a long time to make a good game. Andlike the games business most emulators are now programmed by teams (Mame,Retrocade, PSX, Snes, etc). Guess what? It also takes a long time tobuild a good business application, so really I have to say they are ashard as each other. (Of course, it takes no time to build a BAD businessapplication 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 theMame core, or any other emulator for that matter. I started with the DataEast 16 bit games, eventually moved onto Data East 8 bits games, then amixture of what else interested me - Xenophobe, The Main Event, Last Duel,etc.

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 onmy hard disk for a long time before working too, that game has somethinglike 300 protection checks, all of which lead to an instant crash if theyfail. Of course some games I have worked on still don't work properlyso I guess they could be called difficult! The protection on games likeChelnov and Hippodrome is very strange and hard to figure out.
The graphics hardware in POW was very hard to figure out, in fact my firsttwo or three attempts at implementing it were totally wrong...

7. When you decide a driver to work on, do you look for a challenge, ordo 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 EastEmu News' page :) Which chartered my early progress into emulation as Ibasically learned how to do it! (I didn't have time to keep the updatesgoing, 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 usuallyreally hard ;) I probably wouldn't try to implement a new cpu core to playa 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 ago 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 thingsthat people will like, but I'm not giving away the news ;) For news thatpeople already know I think Mortal Kombat is a long awaited game and thatwill be a major addition in my opinion. One day we will haveStreetfighter 2 as well, many Mac people are waiting for that!

9. In your experience, what have been the most CPU intensive tasks foremulators (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 CPUemulation 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 fromgame to game. FM sound, eg, YM2151 emulation, can take a _lot_ of timewhich really slows games down. FM sound takes masses of calculations justfor one channel and advanced chips like YM2151 have lots of channels!
Colours are often overlooked when it comes to speed, but for a hi-colourgame (say 4096 colours) running in 256 colours (on DOS) it can take maybe15% 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 goodfor what it does. There are speedups to come... (Stay tuned ;)

11. Assuming you could change anything to MAME in a snap to make itbetter, something possible but that hasnt happened, what would youchange to it?

I really have no idea! Let me think... A plug in PCI card that hadseveral _real_ YM2151, YM2203, YM2610, YM3812 chips plus selectable clockfrequencies - that way you could get perfect sound on most games with noloss of speed! (As a side point, someone in Japan was considering makinga board like that... and the price was unbelievable! It was somethinglike 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 thinkthat just about every game from the 70s, 80s and early 90s will beemulated! I think the cut-off point will be the '3d' games that startedin the 90s, using RISC processors and lots of 3d custom hardware. It maybe a while before stuff like that appears, if ever.
I think the SNES and Megadrive and other consoles like that will beemulated perfectly very soon. Full credit go to the team that gotMarioKart running - one of my favourite games of all time!
Hopefully someone will release a Saturn emulator that works just byputting a saturn cd in your PC cd-rom drive.

13. Any special words for fans, or anything in particular?

Nope :)

We thanked Bryan for histime taken to answer the questionaire as this was done afew days ago. MAME players can already taste what he meantsby improvements to the MAME Core as the M68000 ASM core was included yesterday in MAME accelerating it noticeably. Manythanks for his arduous work in MAME and we hope him the bestin getting many more games to work.

One Article Up: A Couple of News Items
One Article Down: The Big If...

Add Your Comments

Name: Moose 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: Email:

[Post a reply]

Name: Posted: Thursday, January 27, 2000 - (13:11)

[Post a reply]

Name: Posted: Thursday, January 27, 2000 - (13:13)
Subject: Re:


[Post a reply]

Post Some NEW Comments on this topic...

© 2002 EmuViews