David Haywood's Homepage
MAME work and other stuff
March 31, 2016 Haze Categories: General News. 17 Comments on MAME 0.172

Somehow I didn’t actually get around to covering the MAME 0.171 release, these things happen from time to time.

0.172 was released this morning tho and it’s a significant release for a number of reasons.

First off the licensing. As a general MAME user you might not care too much about this, and actually might see more negatives from it than positives due to a handful of drivers being removed, but as far as MAME is concerned it is a big step because with the majority of the code now available under a 3-clause BSD style license we’re basically giving our work away for people to do whatever they want with. The bits that don’t have a BSD license are GPL, which is a bit more restrictive for people in certain industries, but still more of a free license than our previous one.

I guess I’ll state by stating the drivers that were removed and haven’t been rewritten.

Popper, released by Omori. This was an interesting Q-Bert style game, the hardware isn’t TOO complex, hopefully it will be back soon.

Marine Date, released by Taito. Probably the nastiest of the removed and not restored games, hardware collisions etc. Not sure it was ever 100% correctly emulated tho, and the board uses discrete sound that was never traced / emulated either. Interesting game, but maybe it can come back stronger at a later date.

Flower, released by Clarue / Komax / Sega / Alpha Denshi. This was a simple 80s style shooter, quite good fun, annoying sound hardware, slightly annoying video hardware with some zooming if I remember correctly.

In the non-arcade part of the code one of the Chess board simulation engines had to be dropped too, as well as a couple of the Chess drivers, if you like that kind of thing those will probably be missed.

Otherwise, that’s really it, out of everything there were only a handful of people we couldn’t contact. We managed to rewrite a couple of drivers during the cycle (otherwise there would have been 3-4 more entries in the above list) but yes, overall, and quite amazingly with around 20 years of history to the project we managed to contact the authors and get approval to relicense practically every piece of code in our codebase. Impressive.

I think it’s fair to say the majority look first at the list of “what runs now that didn’t before” so now that I’ve got the license talk out the way I’ll take a quick look at those for this release, starting with 2 I haven’t already covered here

Tournament Solitaire is a PC based Solitaire game, fairly self explanatory really. It doesn’t seem amazingly good, Windows has had a better built-in Solitaire game for many years which probably doomed this kind of thing as a stand-alone arcade game.


Tournament Solitaire Tournament Solitaire Tournament Solitaire

Magical Touch on the other hand is a bit more ambitious, it’s another piece of PC based hardware, but this time it’s a multi-game thing controlled with a touch screen. It too has a version of Solitaire, better than the one above, and a number of other bare-bones games. We’ve actually had a fair few requests over the years to get this one up and running so I guess it holds a place in the hearts of some people.

Magical Touch Magical Touch Magical Touch

I’ll quickly cover the ones I’ve already shown on these pages, first off Android. This is the early prototype version I covered in an earlier article, the later version was not dumped / added in time for 0.172, maybe next time. Interesting concept for a shooter, doesn’t really feel intuitive enough tho.


Android Android

Fire Ball is a bomberman clone, actually more historically significant than we realised because one of the developers was the guy who went on to become the head of ExPotato, a better known Korean developer still around today.


Fire Ball Fire Ball Fire Ball

The 3rd of the already covered games is Lock On, Philko’s attempt at doing a 16-bit shooter, ends up coming across as a bit of a Carrier Air Wing / US Navy wannabe tho.


Lock On Lock On Lock On

Merit’s Chicken Draw was also added, like most Merit games it seems to be a ‘for fun’ casino styled game. There are a lot of these, we don’t know exactly how many, so it’s nice to see them turn up from time to time.


Chicken Draw Chicken Draw Chicken Draw

While not technically a new game I did put some work into fixing up the Flash Point bootlegs, the last time these worked to a playable degree was a ridiculous amount of time ago, and even then they weren’t using the real sound roms etc. The Flash Point bootlegs are actually very interesting because they seem to be based on a different version of the game to the released version, possibly a prototype. There are also English and Japanese bootlegs, whereas for the original game it appears only a Japanese version exists. Things like the ‘Mirrorsoft’ disclaimer (used on Tetris games) appear in the bootlegs, but strangely not on the original, although the bootlegs lack a high score table.


Flash Point Flash Point Flash Point

In some cases having a layout can be an important step in making a game playable. While the Scorpion 4 hardware games do still have to operate in something of a freeplay mode the game ‘Frankie Dettori’s 7th Heaven’ was vastly improved with the addition of a basic internal layout positioning and naming all the lamps and reel symbols correctly. There’s still an odd issue with MAME layouts where using the £ symbol causes them to not show up (XML parse issue maybe) so $ signs are used for now. It’s a long road, but we’ll get there with these eventually. (the £ symbol issue has been fixed now, fix will be in the next release)



There are some new additions that are NOT WORKING but still interesting too. Big Buck Hunter 2 was added, you can watch the attract, but it doesn’t seem to be possible to calibrate the guns (and if it’s anything like the first game there might be protection issues after that)


Big Buck Hunter 2 Big Buck Hunter 2 Big Buck Hunter 2

Another NON WORKING addition is a Sega Master System / MSX based bootleg collection. This is unusual because most of the arcade mulitgames are NES / Famicom based, so seeing one with the likes of Alex Kidd and Final Bubble Bobble is rare. The dump is incomplete for the time being tho, there’s a MASK rom containing 11 of the games that hasn’t yet been dumped, hopefully that can be resolved soon and we can look into emulating it; the timer and credit system might be MCU based and require some HLE simulation tho. I think Buk Doo Gun included here is a previously unknown Korean title hack of ‘Hokuto no Ken’ which makes it kinda interesting even outside of this collection (you can extract it and run it as a standalone ROM)


Super Master System Super Game Super Master System Super Game

For the next couple you’ll need artwork from the MESS Artwork pages. Popular arcade games got many home adaptations, including numerous handheld games based on the (at the time) well known IP, often with different games based on the same original titles being released by different manufacturers. Bandai and Gakken were 2 manufacturers who got in on the act and for Bandai the featured games here are the adaptations of Data East’s Burger Time, Sega’s Zaxxon and Sega’s Pengo. For Gakken there is an adaptation of Konami’s Jungler.

Games like this are something of an acquired taste, the adaptations all manage to squeeze in certain elements of the games, but the biggest challenge of playing them is working out how the ‘rules’ of each game work, in terms of visuals you’re dealing with very infrequent updates, so an enemy that looks far away might only actually be 2 moves away from touching you etc. Either way, these are a lot of work to get going (dumping the MCUs, often visually, then having to find and correct any errors, making the artwork, testing them..) so it’s great to see them actually emulated.


Burger Time Zaxxon Jungler
Burger Time

There were others too, not based off arcade games. Castle Einstein is a ‘Simon’ clone, repeat the sequence you see. Very simple, so simple we can represent it entirely with the internal artwork.

Castle Einstein

While Conic’s Electronic Football I’m not really sure how to play, seems to be based on American Football, which I’m not really overly familiar with anyway. Again this one can be represented with the internal artwork

Conic's Electronic Football

There are a few other things in there that I don’t really know how to operate, so I’ll look over the clones and see what’s interesting. I did already cover Flash Point above, but there are some other noteworthy clones here. Topping that list I have to say is the Last Resort prototype. This is a NeoGeo game, and there are very noticeable difference in the stage design (enemy attack patterns) when compared to the final game. I made a video of it a few weeks ago when the dump was submitted to us. If you’re familiar with the game you’ll be able to see that despite my terrible play there are some obvious differences in the enemy placement, including 2 of the big metal enemies near the start rather than a wave of different ones after you beat the first.


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

I don’t think any of the other clones really give anything to show in screenshots. The Buccaneers set provide a slightly different gameplay experience by not allowing you to backtrack at all, but there’s no visible difference. The collection of bootlegs that were dumped and added from Spanish boards often have Spanish text, but otherwise look the same as the original games. The Spartan X (Kung Fu Master) bootleg is probably the most significant in terms of hardware changes, but again the end result in a screenshot isn’t too different (the bootleg hardware can’t output as many lines tho, so the bottom 16 are cut off, likewise it has inferior sprite hardware so the sprites entering the screen from the left and right are slightly glitchy in the first frame)

The Software List additions section to the whatnsew is a fairly recent addition where we list interesting things that are now listed in the Software Lists, sometimes these tie in to actual driver developments as is the case with the Apple /// list changes, where some software exposed a number of bugs in the driver, those bugs were fixed, and so we decided to document the software that was used during the process. As the Apple /// was basically a failure any software that documents what it could do is interesting, the majority of software available runs in simple text modes, so an actual game, like Atomic Defense (a Missile Command clone) can tell us a lot more about the hardware and provides a better test case than a lot of other software; fixes made in 0.172 allow it to work


Atomic Defense Atomic Defense Atomic Defense

Preliminary Software Lists were also added for the Pocket Challenge V1 and V2, the Pocket Challenge V2 is actually basically a WonderSwan at heart, so while a dedicated driver with proper input mappings does not exist yet you can actually boot the software in the WS driver. The Pocket Challenge V1 appears to be unique / different hardware, so the only thing dumped for that doesn’t do anything yet. Both are Japanese educational systems, but without proper drivers are obviously still marked as NOT WORKING even if the V2 stuff can be booted.


Pocket Challenge V2 Pocket Challenge V2
Pocket Challenge V2 Pocket Challenge V2

Another one considered ‘NOT WORKING’ is GP Race in the Gamate list, although it is somewhat playable, however sprite flicker is presumably a lot worse than the real system. Games for obscure systems like the Gamate are not well known as they weren’t popular systems compared to the Gameboy etc. so seeing them dumped and documented is important.


Gamate GP Race Gamate GP Race Gamate GP Race Gamate GP Race

Back to WORKING titles, the Pyuuta list got 2 rare additions too, Super Bike is the first, I’ve made a video of that. You can see why it’s rare, it’s not a good game, the game mechanics make little sense, it feels forced so you can rarely rely on initial instinct to know what to press, a lot like the handheld games that I mentioned earlier even if it’s on a system with full video capability.


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

The other Pyuuta game added is ‘Battle Fighter (3D)’ which is a more playable title. Essentially it’s a Xevious style shooter but with a perspective angle, there are air and ground targets, as well as air and ground attack buttons.


BattleFighter 3D BattleFighter 3D BattleFighter 3D

I talked about drivers being dropped due to relicensing earlier, and one driver that was initially dropped was the driver for the ‘SVI-328’ However, as a result of the driver being dropped it ended up being completely rewritten during the release cycle and is now back and better than ever, in fact it now runs a fancy demo doing various tricks with the hardware that the old driver fell over trying to run. Here’s a video (not my video)


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

One big piece of news for 0.172 is that the HLSL shader system has been ported to the ‘BGFX’ video mode, meaning it’s now cross platform rather than Windows specific. The way the shaders in BGFX work is also enhanced over the hardcoded HLSL of the D3D video mode, you actually specify the shader chain on the command-line and can set it up to use different shaders on different screens etc. With regular HLSL you were forced to have the same shader for all screens which looked a bit silly in cases like the Mahjong games where 2 of the ‘screens’ are LCD panels which shouldn’t have had effects applied. This looks much better now.


House Mannequin (with BGFX) House Mannequin (with BGFX)

As the shader system is now more open ended it should be possible to drop new custom shaders in more easily, so you might see ports of many of the effect files found in other MAME versions and be able to use them in the baseline MAME. The only word of warning I’ll give is that things aren’t 100% stable right now, doing things like ALT-ENTER to switch between fullscreen and a window tends to have undesirable effects and will often crash if you have the shader enabled.

HLSL itself has also been tweaked and enhanced over the course of the cycle, it’s gained ‘preset’ support, and a number of presets are shipped, including one for the ‘gameboy’ which gives a more authentic look.


Super Mario Land (GameBoy) HLSL
Super Mario Land (GameBoy) HLSL

Another ‘plugin’ system was introduced to expand MAME’s LUA scripting capabilities too, and for the first time in years the baseline version of MAME can again use hiscore.dat via these plugins. This is actually an incredibly powerful system with a lot of interesting possibilities, for example you could potentially write something like a Pacman AI in LUA and have it play the game for you, or display real-time translations of Japanese games if you write scripts to look for certain characters being displayed and then display an overlay in English using the MAME interface. Of course nobody has written those scripts yet, only the high score one, but it’s definitely an area of MAME that people could put to good use.

Hiscore Plugin

One last significant end-user visible change in 0.172 comes in the form of the multi-language interface. A lot of work was put into language files over the past month, converting our interface code to use them. What this means is that all UI strings (MAME menus etc.) can be shown in a wide variety of non-English languages. While this might not seem much it is actually important these days as the increasing complexity of MAME means that some advanced things are much easier for non-English speakers with the interface translated.


MAME Interface in Italian

There’s also been a massive effort made to improve the MAME documentation on the official site ( http://docs.mamedev.org/ )

Less user visible are all the ‘under the hood’ changes in this release, a lot of the MAME file handling code was refactored for example, this is good because it brings features like the 7-zip support entirely on-par with the regular zip support, meaning all tools (romcmp etc.) now work with the 7-zipped images, as does the file manager for selecting loose files.

Finally, and maybe of interest to less users is the news that a number of GroovyMAME features were integrated, allowing for integer only scaling etc. which should help with people wanting to use the baseline version on CRTs etc. (There was a lot of concern over the DirectDraw output mode being dropped as that was the only mode with integer scaling in the past, but as the entire DirectDraw interface is deprecated by Microsoft it couldn’t stay around forever)

Definitely a big release, and a lot of work for 1 month. I might tack on a few 0.171 highlights to the end of this to make up for the lack of coverage last time, we’ll see.

17 Comments

You can follow any responses to this entry through the RSS 2.0 feed.

Regarding the issue with the £ symbol, it sounds like an encoding issue with whatever software that is being used to create/edit the lay file.

I grabbed the lay file, made the change, saved it as UTF-8 with no BOM and sent you a link to a zip file via MAMEWorld pm.

If you unzip and look at the file I sent you in a hex editor, the £ symbol is mapped to the two-byte sequence… C2-A3 …which is correct.

If it’s being displayed in MAME like £ then there’s something wrong with the way MAME parses and decodes unicode.

Some relevant documentation on this issue…
http://unicode.org/mail-arch/unicode-ml/y2009-m06/0069.html
http://www.thesitewizard.com/html-tutorial/pound-sign-not-showing-up-correctly.shtml

the problem is when faced with the correct encoding MAME crashes, which is what happens with the file you sent..

so yeah, something is wrong in MAME, which I guess doesn’t surprise me entirely because the layout code is really bad.

As for that football game. That is the problem with many of those kinds of games. Without the sticker/docs you have little idea how to even play the game. They were a bit on the abstract side :) I had an old one of those kind of games laying around (it played redlight/greenlight). My niece had no idea how to play it as I in my younger years had torn it apart and the sticker was a victim to that. Once I showed her how to play, her reaction was ‘thats dumb’ until I beat her her at it 3 times in a row. Then she played for hours.

Many of them had a sticker up the back of the box. A few had a small book. Without them, how to play can be a challenge.

Also some of the emulation may still be a bit ‘wonky’ in that many of them would strobe the LED to tell you who you were. If the strobe is not working correcting with that football game it would be rather difficult to play. As the strobe indicates who has the ‘ball’. I think Hap has some notes in a few of the drivers talking about it. For example bankshot is kinda hard to play because that is not properly simulated yet. I think its not right yet because the code is ‘right’ (strobes at the correct frequency) but the light part does not simulate the proper decay on the LED. So in many cases it ends up either looking like it is just on or off and not blinking.

At this point I would like to thank all of you! MAME is amazing. You guys have emulated pretty much every electronic toy I owned as a child at this point, save for a small LCD pacman watch I had. I wanted the donky kong one too but decisions had to be made :)

The MAME XML parser must not handle Unicode properly. I updated the lay file to encode the £ symbol using the ASCII character encoding £ (use the same download link). Give that a try.

Why has there been no coverage of the most wanted Bally game that was just added? I would think that would be the most exciting news this release.

because it hasn’t been added, it might never actually be added, the code is there (but entirely disabled) in case it gets added.

and yeah, the MAME layout parsing is just awful, that’s the cause of the £ issue.

it reads strings like this

for (const char *s = m_string.c_str(); *s != 0; s++)
{
// get the font bitmap
rectangle chbounds;
font->get_scaled_bitmap_and_bounds(tempbitmap, bounds.height(), aspect, *s, chbounds);

which can result in negative values passed to

void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height, float aspect, unicode_char chnum, rectangle &bounds)

which in turn calls get_char

void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height, float aspect, unicode_char chnum, rectangle &bounds)
{
glyph &gl = get_char(chnum);

which looks like

inline render_font::glyph &render_font::get_char(unicode_char chnum)
{
static glyph dummy_glyph;

// grab the table; if none, return the dummy character
if (!m_glyphs[chnum / 256] && m_format == FF_OSD)
m_glyphs[chnum / 256] = new glyph[256];
if (!m_glyphs[chnum / 256])

and since you end up doing a negative index into m_glyphs (which itself is 256 long only despite unicode_char being a UINT32)

everything goes boom..

Isn’t MAME using a 3rd party XML parser? If not, why not?

yes, it is, but in this case there is still a string to process and give to the rendering system.

I’ve fixed it for the UTF8 case by using code from ui.cpp which actually generates the correct ‘unicode_char’ type for the render.cpp etc.

https://github.com/mamedev/mame/commit/27d55acdff0f6d0211b2d248092ae6a24c5cf059

I must say both the Gameboy video effect and the old 15khz monitor effect on that Mahjong game look stunning!
Very pleased to see the return of official Hi-Score support too!
Do you expect the recent license changes to make progress quicker as people submit corrections to minor oversights allowing the core team to focus on larger core and driver issues?

Haze – I think we get spoiled by these updates, but having followed MAME for nearly 2 decades, I have to say this is a beauty. I don’t remember seeing so much progress in the space of a single month before. Congratulations to all of you. Wonderful work.

Thanks a lot for this great read and all of your hard work for MAME!

BBH did a good comparison of the Last Resort prototype vs. the final version
https://www.youtube.com/watch?v=xkflWf1ozmM

Awesome release, awesome post. Thanks to everyone involved!

That Andy Hertzfeld from Atomic Defense must be the one from folklore.org

@nin: It is. Andy wrote AD before he went on to write significant portions of the original Mac system software.

Super game remind me time-limited SMS/MSX games in 1 cart.
Obviously that has “my hero” music and there’s also whole korean menu version.

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