David Haywood's Homepage
MAME work and other stuff

Ultimate MAME 0.144

November 15, 2011 Haze Categories: General News. 37 Comments on Ultimate MAME 0.144

MESS is MAME, I’ve made this point before.

The functionality found in MESS, the ability to run console / computer based software can easily be added to MAME.

There has been talk of doing this officially for a while now, but every attempt is met by too many opinions, too many people trying to overcomplicate the process, and too much focus on offering LESS functionality to the end user and requiring MORE code to get there.

As a result nothing ever actually happens.

There are some devs saying they’ll quit the scene if it ever happens, contribute nothing more, there are people who really don’t seem to want to allow this functionality in MAME, even if there is no cost at all to having it, and a huge number of benefits in terms of testing, unified development and a cleaner source tree.

The most elegant solution to this problem is also the simplest one, and that is to wipe from your mind any concept that a system having a coin slot is a valid criteria for division, and simply treat the source trees as if that were the case.

The current MAME source structure has 2 main emulation sub-folders
emu – all common off-the-shelf, non system specific components go here
mame – all custom chips and system emulations go here

Inside each of these is currently a tree structure of drivers, video implementations, machine implementations, audio system implementations etc.

By default the mess project adds a further folder, ‘mess’ for non-arcade systems. On the surface that might seem like sound logic, but in reality it just creates uncertainty over where to look for files. By logic you’d probably expect to see video/n64.c in the /mess folder. N64 was a home console, but in reality it exists in the /mame folder, because it’s a custom component emulation which is also used by arcade games.

Proposals have been put forward to maybe create a 4th folder when merging the projects ‘shared’ but all that would achieve is bumping having 2 places to look for files right up to 4, and you’d still need prior knowledge that a system was shared between arcade / home use to even think about looking there.

Essentially the existing structure MAME already has is still the best, 2 places, making it obvious where to look. The most logical way to merge things would be to just move the MESS files into those folders, which, if you’re saying the coin / no-coin criteria doesn’t matter also makes the most sense.

The other argument people keep putting forward is that whatever system is created it should still allow the creation of MAME and MESS executables with ‘combined’ simply being another build target. This just seems to be avoiding the benefits of merging altogether. One of the big benefits of combining the projects is that in a default build every file gets built. When you’re dealing with a large number of cross-project shared files this makes the most sense, right now it’s very easy to break the MAME compile with changes in MESS (or vice versa) simply by not knowing that code was used in both. If all the dependencies are being built by default that simply can’t happen, in addition, you’re more likely to know where things are used for better testing of the actual emulation effects of any changes you do make. Creating an additional build target is again just more work, and ultimately offers less benefits, tiny builds of mame/mess specific stuff will always be possible with tiny.mak, but beyond that are unnecessary. Unsurprisingly, the easiest way to merge is to just keep the existing MAME target and integrate the MESS stuff into it, which again gives you the most benefits for the least amount of work.

So what’s the problem? Others have claimed that the work will take a significant amount of time, needs to be carefully planned, but again this just seems like stalling. Due to the size of the change and rapid daily changes which occur in both projects, it’s not really something you can take a significant amount of time over, it’s something which needs to be done in one swift action, and worked further on from there in order to keep everybody in sync.

In reality, it’s not a change which takes long to implement, at least not if you keep it simple. It takes about 2 hours if doing it from scratch, working out the modifications you need to make, working out where the conflicts between the project are and other such bits and pieces.

The other issues put forward against doing it the simple way are things like breakage of Save States due to MESS using a different signature, but that’s to be expected, and the signature issue could be resolved easily anyway. Given how often states break anyway I doubt many people keep them around.

More action, less talk is apparently the message coming from MAMEdev these days, and despite writing a lot that’s something I believe in, the whole concept of ‘if you want something doing, do it yourself’ is what has kept a lot of MAME development going over the years. With that in mind I’ve created a guide to creating an Ultimate MAME Build, one with MAME and MESS combined.

With this setup you can run anything from MESS in MAME, it ‘just works’, it’s wonderful. I can launch Megatech, or, if I don’t want the timer crippling the software, I can launch the standard Genesis versions. SNES, NES, PCE, Neogeo AES, NeoGeoPocket, you name it, it’s there, in MAME, working with the support from MESS. Want to see what state the PSX and Saturn are in? You can do that too, it sheds plenty of light on the work needed on those MAME drivers which you otherwise don’t see. I know not everybody is going to want to follow that guide.. so.. introducing

—- ULTIMATE MAME 0.144 —-

Source
32-bit Binary
64-bit Binary

The only real difference with the MESS stuff compared to what you’re used to with MAME is the launch syntax, as the majority of MESS systems use Software Lists instead of the internal Database, but as discussed in the previous post here, such support is needed for MAME and Multislot support anyway, so those on the ball won’t find it to be anything new.

“MAME genesis sonic” (or “MAME genesis -cart sonic”) will launch Sonic for the Genesis / Megadrive

some systems are a bit more complex, for example PCECD

“MAME pce -cart scdsys -cdrom draculax” would launch Dracula X for the PCE-CD. The syntax is more complex because that’s just how the system works.

for regular MAME stuff everything works just as it did before

“MAME pacman” will still launch pacman

There is absolutely no loss in functionality.

All in all it’s very easy to use, and having that functionality and code within the same project as MAME is invaluable for developemnt and testing alike. I just hope something like this is integrated officially sooner rather than later, because it will make working on heavily shared systems a lot easier and no doubt lead to many more bugs in MAME being quashed as the MESS drivers expose them.

I will give on word of warning. The ClrMAME support for the Software Lists is a bit flaky at the moment for users of that, they can still be imported however, and there is talk of integrating the lists into the -listXML output too. Some MAME frontends may struggle, but QMC should work because it’s been developed to the higher MESS standards already.

Anyway, in conclusion, I’ve always tried to push for progress, always put my money where my mouth is when it comes to such things, that’s exactly what this is here. I just hope that people do eventually start to see that this solution, which is by far the easiest solution, is also in many ways the most logical solution with the least complications and most benefits. This isn’t something that needs months and months of debate which ultimately end up nowhere, it’s just something which initially needs doing in one single operation, as soon as possible, with a level of commitment which means people will accept it and move forwards and work on any issues which arise from there otherwise it simply won’t get done as the last few years have shown.

Go to article.. »

Fruit Roll

September 23, 2011 Haze Categories: General News. 16 Comments on Fruit Roll

Just a brief update on the Fruit Emulation stuff.

I’ve spent the majority of my MAME time since the last updated (several hundred hours at least) just trying to sort and categorize the various sets that are around, figuring out the hardware, splitting things into appropriate clones, identifying cases where there are missing roms etc.

This has proven to be an incredibly time consuming task, not least because of the sheer volume of sets and variations on sets which exist. You’ll have seen in the last couple of updates there have been a lot of fruit machine romsets added, then renamed, split out, and reshuffled in cases where things were just completely misidentified before they were looked at for MAME.

It’s not really what you’d call a glamorous job, but it’s one that needed doing, as proper set support underpins any further work done in MAME, so despite no real visible progress in the emulation simply doing this is a huge step forwards towards eventually seeing the machines supported properly in MAME.

I know some people cited the monumental nature of this task as one of the reasons why FME would never happen in MAME, saying you’d need an army of people to compile such a database, I guess the reality is you either needed an army, or just one person severely lacking in sanity. Thankfully MAME had me ;-)

The majority of sets have been added now, so the number of *new* fruit machine roms added from this point in any single update should be rather small, although there is a lot of sorting and splitting to be done, which may give the illusion that a lot more is changing than really is. To begin with there was in the region of 5-6GB of sets to look at, I’m now down to around 50MB of stuff which isn’t identified by the latest MAME at all.

The good news is that even if I get hit by a bus tomorrow nobody is going to have to repeat this part of the work.

Go to article.. »

I see today with a newsprint fray, My night is colored headache grey

July 25, 2011 Haze Categories: General News. 78 Comments on I see today with a newsprint fray, My night is colored headache grey

MAME has been doing a good job of emulating several video based slot machines for a while now, for the most part they’re easy enough tech to get going and if anything the more simple ones can be a pretty good starting point for understanding how to write a MAME driver. They have a few idiosyncrasies associated with them such as the need to simulate payout hopper hardware which doesn’t apply to most arcade games, but for the most part they’re just like anything else.

One area that’s lacked attention in recent years however is the non-video based gamblers, which have been prominent in UK arcades since the 80s, and are in many ways just as iconic as any other classic video game. The 80s and early 90s machines especially had memorable melodies, and art, attractive patterns of flashing lights and were clearly developed by people who were interested in creating an experience that was not only about winning money, but also having fun, something which really set them apart from the majority of gamblers produced outside the UK, and the very methodical design of most video based ones.

There’s no technical reason MAME can’t emulate these, and emulate them well, there are a couple of potential problems I’ll talk about later, but essentially they’re just a bunch of off-the-shelf components stuck together. The machines are in part mechanical, but really things like the fruit machine reels can’t truly be considered any more mechanical than the various input devices MAME supports, they spin under the control of the program, and their position can be read back.

As a matter of fact, MAME is so adept to emulating these things that the basic codebase (CPU cores etc.) of one of the more popular existing emulators was ripped straight from an older version of MAME, as shown by a source leak. Source leak? Well yes, the emulator is ‘closed source’ in complete violation of the MAME license, although people had suspected it stole MAME cores for a long time even before the code was leaked. The MAME license is very clear, and always has been, that if you derive something from the MAME code then the source must be available. A fair number of people have come down like a ton of bricks on the author for not abiding by this, and deservedly so, based on what’s been said the team would be well within their rights to take legal action over it, especially as if reported by some, it was also previously sold.

My take on this is quite simple, as long as the author agrees to release sources to any future versions as per the license agreement I don’t mind too much about the past, finding the old source trees at this point would no doubt be rather tricky. I do applaud whoever leaked the previous code to prove it wasn’t entirely an original piece of work however.

I’d also say that just because code was stolen doesn’t detract from the work put in to actually emulating the machines. Sure, without the MAME cores the project may never have come about, and sure, any findings should have been shared back by keeping the project open, but there is still real work involved in emulating the systems. If everything automatically fell into place MAME would automatically emulate systems be emulated as soon as there was a CPU core, which simply isn’t true. Furthermore work would have still been needed on some of the cores because the fruit machines in several cases used variants which weren’t supported in the cores (although again, such fixes should have been shared back via the project being open)

Anyway, with that said, it is about time MAME started paying more attention to these things, with, or without others co-operating. In MAME terms all these things are simple systems, and there is very little reason they shouldn’t be emulated. One of the most complex parts of emulating a system is usually the video hardware, and these have none, their video is 100-200 lights which illuminate actual artwork on the cabs (you could picture the lights as the video hardware if you wanted, but the actual workings are rather different)

The only game that really runs in current versions of MAME is ‘Dr Who’ You can see an example of this being rendered in MAME with external artwork, using the artwork system at http://maws.mameworld.info/maws/romset/m_bdrwho (Click ‘artwork’ next to Mr. Do)

MAME’s artwork system, as you can see, is perfectly capable of rendering such a display, and without the artwork you get a fallback to the internal layout (which in the case of these is a grid representing the lights, handy for debugging) Some work is probably needed to make the reels scroll more smoothly (they’re rather hacked in at the moment) and a layout editor would be handy (done by hand at the moment) but in reality there are no real showstoppers in being able to represent the display, in fact it might even become feasible to write a program that converts the already extensive collection of layouts created for other emulators to work with MAME (I haven’t studied their formats and requirements yet)

The only other real caveat I can think of in terms of MAME is the timer system, I’ve noticed with the existing drivers that some set incredibly high frequency timers, especially when playing samples, this unfortunately can cause MAME to run like a dog due to some pretty severe flaws in the design when it comes to this use case. Not everything is affected, but some are.

In terms of emulation the games can be incredibly finicky, testing the hardware extensively, and outright refusing to run if they detect a fault. Naturally this comes from the requirement of the original machine to be reliable, and often secure ways to deal with regulated payout amounts etc. As long as things get emulated properly this isn’t a real problem though, just extra work.

In terms of what’s dumped, it’s a mess. You can find dat files documenting fruit machine ROMs, but for the most part things are poorly sorted, give no indication of hardware, have multiple hardware revisions within the same sets, and even have things which are completely misnamed. Furthermore, even beyond that many sets are just plain incomplete. I was looking at the Epoch hardware stuff and out of ~150 games only in the region of 4 actually have sound ROMs dumped, and for other systems the only complete sets are in many cases non English versions. We’ve already seen this problem even with a large number of the video based games in MAME, missing question ROMs and such.

To make matters worse the community built up around the existing emulators seems to have a philosophy of ‘find a set that works and stick with it’ yet in many cases these fruit machines have multiple clones, for different payouts, different regions, in addition to bug fixes. One game I counted has in excess of 100 clone sets and the majority of these are completely untested, and some have been obviously hacked just to add insults towards people in. People seem to have attempted to make up for missing sound ROMs by substituting them with others from games which usable, but still wrong sound, and in some cases it appears where only sound ROMs were dumped, substituting missing program ROMs from games with similar gameplay. Sorting them out is going to be a complete nightmare. To make matters worse some of the emulators appear to have adopted a console ROM like format for some of the MPU5 hardware games, requiring correctly split ROMs to be merged into a single file before they work, creating further confusion.

From a documentation point of view it’s a tower of neglect. It’s going to take years to sort out, and while I *greatly* appreciate the efforts of the people who have attempted to make dats for these things (I’m sure plenty has been saved from being lost as a result and it has saved me an enormous amount of time) there is still a ton of work to do. To a degree it’s understandable, it’s hard to categorize things which don’t work, if you’re lucky the games contain the title in plaintext somewhere in the ROMs, but many of the earlier ones don’t. Without being able to run the code it’s not always obvious what hardware things are, although there are usually hints based on code / data structure and that kind of thing.

Where is this leading? Well, I’m not a huge fan of these games myself, but part of being involved in emulation development is keeping a level of impartiality, if as a developer you only work on drivers for games you like then you end up being rather limited in what you can do, so, I’m putting into action a plan to at least try to sort some of this out.

As a first step I’ve created skeleton drivers for the common platforms, these really don’t do much yet, but they act as placeholders.

Secondly, I’ve started trying to identify each and every set I can identify, and move it to the appropriate skeleton driver. For the initial pass I’m lumping all the clones in the same set (they’re too unwieldy to sort at this point) but splitting out anything which is obviously mixed in with wrong set, and adding precursory comments where things appear to be missing or bad, to mark in the correct way later.
Obviously some games are on unique hardware, like anything else, and with no hardware information these will be tricker, but I’ll come back to them at a later date. Some of them are clearly things like CD jukebox ROMs and even one for a VHS player anyway, so are more likely to be put in MESS at some point if anything.

Identifying the ROMs is as much about looking for common structure at the moment, obviously for already emulated stuff there is a guide, if something is running in an emulator already, it becomes rather obvious what hardware it is. 68k and H8 code can be identified by a large quantity of certain hex values in the code, which is good for splitting Impact and Epoch apart. MPU5 stuff tends to all have a similar vector table, 68xx stuff (usually MPU3/4) has vectors at the end. Maygay M1AB hardware always has a MayGay copyright string just before 0x10000. Bellfruit stuff has very specific encryption patterns. The 3rd party stuff is often hardware, especially on the earlier systems as it’s quite obvious some of it was developed by reverse engineering the hardware from scratch, and thus doesn’t conform to the same standards.

After nearly a week of having myself locked in this room and doing nothing else this is where we stand right now anyway. I’m going through this process, and several of the main systems have comprehensive preliminary lists. At this point many things are probably named incorrectly, there will be duplicates, there will be bad dumps, there will probably even be things I’ve misidentified, but it’s going to be a long hard slog. A few things do actually boot, especially MPU4 games, but most fail on the characterizer (game specific PAL), or reel errors, because of variations in the hardware attached. For the more complex systems there is extra hardware still to be emulated before they even start to do anything so the skeleton drivers really are just that (eg. MPU5 uses a variation of the 68020 called the 68340, which has extra timers and DMA)

Once things have been sorted, and the majority of valid looking sets placed somewhere, then a more focused effort on emulating the hardware can take place. No particular rhyme or reason exists for this stage yet, it’s going to depend on what seems the most viable, what can be broken down into smaller chunks and tackled most easily. I imagine this stage is likely to be when sets start getting split out into clones better, as the differing requirements in terms of extra hardware of each of the sets will become more clear as emulation processes (many expect data recording devices, some variations expect jackpot / percentage keys attached, while others work with dipswitches etc.)

Progress will also depend on exactly what degree of burnout is being felt over these things at that point. As things stand I’m doing this pretty much on my own, just bouncing a few questions off people to clarify one or two things. Many of these systems are ones where external contributors could become involved, as I’ve said near the start of the article, they’re all just combinations of off-the-shelf hardware, so emulating them shouldn’t be too difficult, but rather require a good understanding of how the components should work.

In the end, if MAME can do a good enough job on these things hopefully we’ll see many benefits. First off, the petty arguments which seem to dominate the Fruit Emu scene would be done away with, for all the problems with MAME none sink quite that low. You’re guaranteed the source, and guaranteed a complete knowledge dump of everything the developers involved know, no holding back of information and such. Hopefully all the nonsense with the other emulator and stolen source will become irrelevant as MAME obsoletes it anyway.

Secondly, these things will hopefully end up being properly documented, that’s going to take a long time, but the framework exists, the MAME database is a great place to make a permanent record of what’s what. Right now there is no central point of knowledge for these, neither in terms of the hardware, or software, even Googling the names of many of the machines turns up nothing which is worrying when you consider a key part of all these machines was what they looked like!

Thirdly the emulation of many of the components used will improve, as I’ve said earlier, these things can be very fussy over the hardware working correctly, and will provide some excellent test cases.

Forth, it could lead to improvements to the MAME artwork system, more flexible custom elements for things like the reels. I know one day I’d still like to see full 3D cabinet support in there and these would be a perfect showcase for something like that if it ever happens.

Fifth, MAME is the ideal platform for emulating the one-off obscure boards, the majority of components you need to work with are there already, you don’t have to write (or steal!) CPU cores and sound cores just to quickly test what hardware something is, you have things at your fingertips for testing, so hopefully it will lead to many of the more obscure machines being emulated in some form too, even if finding the artwork for them will be another challenge entirely.

Sixth, MAME is a platform anybody can contribute to, the compile tools are always freely available, and getting it to build it literally a one-stop process. Nothing fancy is required, if *you* want to contribute to fruit machine emulation MAME allows you to.

On closing I should stress that none of this is magically going to happen overnight, the underlying message here is that there is a lot of work involved. I’ve been up all night, and asleep half the day, every day for the past week just trying to make headway into this, yet I know as soon as the next MAME update is out somebody is going to slag off the addition of these sets, because either they don’t care about them, or because nothing actually works yet without even considering the work that has gone into it so far.

Go to article.. »

I said: “We went to the moon and now we’re watching these buffoons?”

July 7, 2011 Haze Categories: General News. 26 Comments on I said: “We went to the moon and now we’re watching these buffoons?”

MAME has emulated a Korean bootleg of Sega’s Fantasy Zone 2 remake for a while now. Given the title of ‘FZ2006 II’ and released as part of a Korean multi-game bootleg by ‘ISG’ it appears to make use of the data files from the Sega Ages Fantazy Zone collection, released for the PS2 in 2008, with various hacks applied (different memory maps + their own protection and such)

Anyway, this bugged me a bit, so I’ve come up with a tiny build of MAME which can run the same game but using the original data files from the PS2 disc, to use this you must simply get your PS2 disc, copy the ‘BIN.PAK’ file from it, and place it in a zip called fantzn2x.zip and run the custom version of MAME linked below using that. I’ve done the same for Bloxeed, because it looks like their bootleg of that was also sourced from one of the PS2 versions.

These obviously aren’t going to make their way into the official version of MAME in this form, but it’s less annoying than having to use a bootleg with hacked title screen and copyrights etc.


Original Sega Version – left ||| FZ 2006 bootleg supported in MAME – right

Fantasy Zone 2 (System 16C) original version FZ2006 bootleg

Fantasy Zone 2 (System 16C) original version FZ2006 bootleg

Quite why the bootleggers called it FZ2006 and used a 2006 copyright when it appears to be based off a 2008 PS2 release I don’t know, but Sega were no better really, stamping a 1987 copyright display in the attract mode.

This is based on the latest MAME sources (0.143+), but with most stuff stripped out. Download Here

Article title associated YouTube Video (The Eisenhowers – 1969, nothing to do with the actual update, I just happen to like it)

Content not available.
Please allow cookies by clicking Accept on the banner

Go to article.. »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close