David Haywood's Homepage
MAME work and other stuff

UME 0.150×2

October 8, 2013 Haze Categories: General News. Tags: 0.150x2, 150x2, mame, Mess, UME, UME 0.150x2, and UME 150x2. 41 Comments on UME 0.150×2

UME (logo by JackC)
UME is the complete/combined version of the MAME / MESS project.

Another unofficial update so soon? Why yes, that is what I’m announcing here. I did say I’d try and make sure people got new binaries for important bug fixes. In this case the Vector HLSL support has been fixed (by hap) over the last few days, and I consider that a worthwhile fix to put out a new build for the benefit of readers here.

Update 0.150×2, and it’s based off SVN revision 25563.

The changelog (simply a copy/paste of the SVN log) can be read here. This isn’t formatted as a whatsnew, but as usual I’ll summarize the main points below.

UME 0.150×2 Windows binaries – 32-bit, 64-bit and all tools
UME 0.150×2 sources

Points of Interest

As mentioned above the main reason I’m offering this the is fix for the vector HLSL that was made over the past few days. Other than that it’s only a minor update compared to the build put out just under a week ago; there have only been 63 SVN commits in that period.

This doesn’t fix the multi-screen problem with effects are used, but as vector HLSL is one of the recent ‘showcase’ features I feel it is still important progress on the road to getting things working. Unfortunately one of the showcase vector games, Tempest, still has emulation issues in current versions of MAME once you reach the later levels (the game resets) I suspect this is due to a flaw in the Atari Pokey emulation, possibly introduced when “Liberator” was fixed so the later levels worked there because that too uses the Pokey as a protection device and it’s possible there is some conflict in what they expect. Just a hunch, could be wrong.

Maybe the most important thing that has happened in this brief period is Couriersud returning to commit something. In this case the submission is only an optimization to the netlist emulation leading to a small performance improvement in the Pong simulation but the implications are greater. There are very few people involved with MAME who understand these old discrete logic games, I’d go as far as saying Couriersud is almost a one-man team as far as MAME work on them goes so his continued contributions are important if we’re to see progress in that area.

smf has also been tweaking the Playstation emulation a bit, fixing recent regressions in Tenkomori Shooting and Konami 80’s AC Special. Barry has continued to work on the Pinball drivers I mentioned in the 0.150×1 update.

The MESS side has also seen various misc fixes and additions, including work on the DECtalk ISA card for PC platforms and listing of some potentially useful disks etc. too. There was also a fix for loading tapes in the C64 driver thanks to a comprehensive bug report that made it relatively easy for Curt Coder to fix the issue. As always make sure to read the changelog because some of the systems / devices where changes have been made I’m simply not familiar enough with to write about.

Some CPUs were also modernized, I guess there’s a slight risk of breakage there (because any large scale refactor runs the risk of introducing some issues) For reference, the ‘NEC’ series CPUs are widely used in MAME, while the ‘Saturn’ CPU is not related to the Sega Saturn but instead a lesser known / more obscure system in MESS.

Personally I’ve been working with iq_132 on the PGM emulation, helping to improve the IGS025 / IGS022 emulation for Dragon World 3 / Dragon World 3 EX. iq_132 managed to get the games to enter gameplay with various improvements, while I implemented a missing DMA mode used to transfer some 68k code into RAM for execution as part of the copy protection. The emulation is still incomplete and the game will fail in certain situations e.g. when you continue, but it’s steady progress. I also refactored the emulation of these devices a bit to hopefully make it easier for iq_132 to hook them up in Luca’s igs017.c driver where 2 of the Mahjong game sets also use the 025/022 combo for protection.

Dragon World 3
Dragon World 3 Dragon World 3
Dragon World 3 Dragon World 3
Dragon World 3 Dragon World 3
Dragon World 3 EX
Dragon World 3 EX Dragon World 3 EX
Dragon World 3 EX Dragon World 3 EX
(iq_132 has been improving the PGM IGS025 / IGS022 protection emulation for Dragon World 3 with me providing some assistance, still not really working properly tho)

There’s also the fix I made for Thunder Dragon 2, mentioned in the a previous article here, and -mt was finally turned back off by default (although obviously if you have a config with it turned on, or turn it back on yourself you’re not going to see the benefit from it being disabled) both could be considered quite important improvements along with everything else I’ve mentioned.

Current State of MAME / MESS / UME

While current MAME & MESS builds are definitely good we’re still some way from having a perfect build. There are quite a few key MESS drivers (X68000 being a prime example) that used to work better a year or two back, although often because they relied on hacks. It’s a shame because if you want to use MESS it’s painful to go back that far because it’s only in more recent times that MESS has really started coming on leaps and bounds as a whole, even if it does have a long way to go. Likewise in MAME there are still some recent regressions that need nailing down such as the CoJag drivers not working properly. I’m not sure if these are another victim of the recent HDD changes or some modernizations. There was a fix to help with idle detection in the Jaguar DSP cores, but it doesn’t appear to improve the CoJag titles. Issues like the problems with the Mario discrete sound emulation are also starting to become worrying long-term regressions, likewise the Tempest bug I mentioned earlier. Things are however as a whole heading in the right direction.

Go to article.. »

MAME and -mt (multithread) – Public Service Announcement

October 5, 2013 Haze Categories: General News. 17 Comments on MAME and -mt (multithread) – Public Service Announcement

MAME has a -mt option to turn on some extra multithreading to give a tiny speedup by handling the final blit on a different thread. This is unrelated to drivers which have their own threading implementations for larger speedups.

For several versions now this has been the default.

However, it is not a *safe* option to use, and should really be turned off.

The problem appears to be that for games using indexed palette modes the palette / video aren’t buffered properly and end up out of sync in what MAME outputs at a frame, or even sub-frame (if single stepping) level.

This is very evident in some cases, for example in “Rapid Hero” the initial fade at the start of a level becomes a flickering mess with -mt enabled, and in games like “DoDonPachi Dai-Ou-Jou” the area surrounding the AMI logo fades at a different speed to the rest of the image creating an obvious border, in addition the ending text fades are horrible broken. Several CPS2 games including the of the intro screens of “Gigawing” exhibit similar issues with -mt enabled. In other cases it caused more severe palette glitches; I had to work around it in Casanova by converting the whole driver to use RGB32 mode.

The issues introduced can be rather system-specific, and depend on the unchecked timing of everything else in your machine, so depending on what hardware you’re using the glitches may be different for you.

While in some case such glitches occurred on real hardware, and are thus emulated, the -mt option is creating many more incorrect cases where this happens and is significantly harmful to the fidelity of our emulation. I do not know why it is turned on by default for some marginal performance gain on older systems, it seems to go against the MAME philosophy of putting correctness of emulation as the first priority.

There are already Mametesters entries associated with this bug, for example

I’ve requested that it be turned off several times, but it appears the development team are not interested in turning it off, so I feel the need to highlight this issue as a public service. If you want to guarantee MAME operates as expected without additional glitches being introduced based on the hardware configuration of your machine then you should ensure you run with -nomt or equivalent way of turning off the multithreading from your frontend.

UME builds still ship with it turned on because I wish to ship unmodified baseline sources (so this applies equally to that) but it does irritate me that I’m shipping a piece of software with options know to cause defects in the emulation turned on by default.

Go to article.. »

The Thunder Dragon 2 Theory

October 3, 2013 Haze Categories: General News. 14 Comments on The Thunder Dragon 2 Theory

I’ve highlighted what a fantastic resource MARP is in the past, especially when they provide complete 1 Credit Clear replay files for games recorded with modern MAME versions. In the case of games where I’ve worked on the emulation, or there have been recent improvements I do take the effort to watch them. (It’s a real shame some drives like DoDonPachi II don’t record properly for unknown reasons)

The reason I watch them is to make sure bugs have properly been fixed, it brings some further level of closure to the reports, and increases the level of confidence we have in our emulation. In the case of Thunder Dragon 2 there were sprite priority fixes from trap15 in 0.150 so I wanted to watch the replay to make sure there were no obvious remaining sprite issues.

Instead of seeing sprite issues I saw something else, once the game hit the level 4 boss there were background glitches, as you can see below.

Thunder Dragon 2 emulation glitch Thunder Dragon 2 emulation glitch Thunder Dragon 2 emulation glitch
(Thunder Dragon 2 surprisingly has problems with the background tilemaps in 0.150 / 0.150×1)

This came as a surprise to me because I thought I’d fixed all the background problems in the nmk16 driver a long time ago, my logic seemed sound, and from a hardware point of view made sense. Seeing these glitches didn’t really make sense tho, where were they coming from? A bit of poking around later and I found the issue, only the first tilemap bank was being marked as dirty when the tile graphic bank was changed, meaning that if the tile data was written before the graphic bank change MAME wouldn’t be updating the cache bitmaps. This is still one area you have to be careful in MAME, it’s an optimization MAME has for drawing tilemaps, but if you don’t mark things properly it can lead to glitches like this.

Thankfully it was easy to find, and easy to fix. I assume it’s been like that since I first fixed things in the driver, which means that technically the driver has never had proper video through the years, be it the sprite priority glitches, the tilemap scroll glitches before I rewrote it, or the glitches caused by this oversight.

I didn’t notice any sprite issues during the run, and with the tilemaps hopefully now fixed for good as well 0.151 will almost certainly be *the* version you should be using for Thunder Dragon 2.

Of course me being me I can’t help messing around a bit, and while the replay file on MARP was for Thunder Dragon 2 I actually played it back with the Big Bang clone, and the older Thunder Dragon 2 set as well. In both cases the game played the same way, with no desyncs and the player finished with the same score, this is kinda interesting because it means that if the difference between the revisions was a gameplay tweak or bugfix the player recording the replay didn’t encounter the issue.

I’ve recorded a video file from the replay with the fixes applied and put it on YouTube. The player is ‘edusword’ and it shows the game (running the Big Bang set) from start to finish, as you can see the emulation is looking pretty good these days! Hopefully the player doesn’t have any issue with this being uploaded, I wholeheartedly thank them for the replay!

One interesting thing about the game is that you can destroy the various messages that appear at the start of levels for extra points. You can even destroy the end credits and the points continue to rack up, although for whatever reason they don’t count in your final score!

If you’re wondering about other NMK news I’m afraid to say things have gone very, very quiet on the NMK004 dumping front, not sure what happened because it sounded like the guys looking at it were very close to the end!

Go to article.. »

UME 0.150×1

October 2, 2013 Haze Categories: General News. 2 Comments on UME 0.150×1

UME (logo by JackC)

The official MAME/MESS 0.150 release saw the concept of ‘u’ updates abolished. This I feel was long overdue, but at the same time there are points in the development cycle where clear improvements have been made over the previous release.

For this reason I’ve decided to offer my own unofficial updates here. I’m calling them ‘x’ builds, to avoid confusion with the old official ‘u’ builds. I’ll only be compiling / offering these in UME form, not MAME / MESS, and like with the MAME / MESS updates I’ll post a little synopsis with each update highlighting the more important changes.

I doubt I’ll have to do this too often, but for now the first of these updates is 0.150×1, and it’s based off SVN revision 25500.

The changelog (simply a copy/paste of the SVN log) can be read here. This isn’t formatted as a whatsnew, but as mentioned I’ll summarize the main points below.

UME 0.150×1 Windows binaries – 32-bit, 64-bit and all tools
UME 0.150×1 sources

In addition to the above I’m offering a test binary compiled with different settings and a slight source modification as described by MooglyGuy here. This includes an experimental change that could improve the N64 performance on some systems (it doesn’t seem to make a difference here) I’m only offering this in 64-bit flavor as there is little point in a 32-bit build. It requires at least a Core2Duo to run.

UME 0.150×1 experimental Windows binaries – rsp.h modification, SSE2 optimization, 64-bit only, all tools (not recommended for general use)

Points of Interest

First I should probably start by saying that the Vector HLSL and effects+multi screen game issues are NOT fixed yet, that code hasn’t been touched at all, however, there have been some significant bugfixes / regression fixes.

The beatmania series (HDD error on startup)
Several Taito G-Net games (Super Puzzle Bobble flash card read error)
Meikyuu Hunter G sound (inadvertently broken when Ghost Busters was changed to use the Deco222 a while back)
Jangou Lady (broken by CPU core rewrites requiring interrupt handling in drivers to be more correct)
Double Dragon 3 refresh rate (became a bit too low when driver was merged with WWF Wrestlefest)
Uncio driver (Zero Point 2 / Burglar X) (tile dirty marking ended up being broken 2 and a half years ago during some refactoring, nobody had reported it until now!)
Genesis VDP timing (was using PAL timing in some cases when it shouldn’t have been after a previous refactor, this was causing visual glitches in many games eg. Dashin’ Desperadoes)
Rise of the Robots (HDD loading error)
X-Men 6 Player version (missing sprites after the m_screen refactoring)
GX4000 inputs (weren’t working for many games, even if they worked on the 6128+)
Atari Flat shaded 3D games (Hard Drivin’, Stun Runner) (confirms that the 68010 doesn’t have the ‘broken’ clr.b/.w/.l opcode behavior)
Flower (had been mistakenly set to 4-way in 0.150 due to a video of the cabinet showing a 4-way stick, but clearly seems to be an 8-way game, probably a faulty kit conversion)
Crypt Killer (HDD loading error)

Regrettably some of those were regressions I introduced (DD3, Atari, Meikyuu Hunter G) even after extensive testing at the time, goes to show you can’t catch everything so we’re always thankful for testers. Many of the others are due to the ongoing IDE/HDD type changes, and some are rather embarrassing (the logic for the dirty tile marking in Uncio was flawed beyond comprehension, but did give an opportunity to redactor and clean up the driver a bit while fixing it) The fixes here came from a variety of devs which is always good to see.

The list above alone should be enough reason to favor a 0.150×1 build over plain old 0.150, but naturally there are more improvements and additions included too.

GX4000 - Pang GX4000 - Pang
GX4000 - Operation Thunderbolt GX4000 - Operation Thunderbolt
(GX4000 controls were one of the long-term regression fixes, so inputs work again for many games, including player 2 support)

Zero Point 2 Zero Point 2
(video emulation in the Unico driver was another long term casualty, last working 2.5 years ago. 0.150×1 fixes that so backgrounds are present in Zero Point 2 again)

The conflict between the ‘shark’ game set ROMs in MAME and the ‘shark’ device ROMs in MESS when compiled as UME has been resolved, it was reported to have been causing some problems for frontends and ClrMAME in the last 2 UME releases. If you notice anything like this in the future which isn’t being picked up by -validate than let me know and I’ll ensure that it gets fixed as soon as possible. Not all devs are using a combined build, and when this specific type of conflict doesn’t show up with -validate even if they are it’s very easy to slip under the radar because we don’t typically make use of ROM managers or Frontends while working on MAME/MESS.

The web server code has seen numerous improvements too, mainly thanks to external contributor ‘Firehawke’ The code as-shipped in 0.150 could only run on port 8080 due to some hardcoded values in the code (so if you changed the port it wouldn’t work properly at all) The interface has also been vastly improved and several new features like the ability to load and save states are exposed via the web page you’re presented with. Fixes have also been made to improve rendering on mobile devices at different screen orientations etc. so controlling the MAME interface features via your phone or tablet now works better than it did in 0.150. If this feature was of interest to you then 0.150×1 is a big step up from 0.150.

In terms of newly supported stuff one of the most interesting additions is a prototype clone of Taito’s ‘Growl’ found / owned by the same ‘Dsyde’ and ‘muddymusic’ combo that brought us the ‘Bubble Bobble 2’ prototype previously shown here. There is a fair bit to write about this prototype, but I want to wait until they’ve put up their own post on Jamma+ about it.

Growl Growl (prototype)
(A prototype of Growl, right, was added. I’m not going to write more about it until the owners have done their own comparisons tho)

There’s also of course ‘Dolmen’ which slotted right in a few hours after 0.150 hit, and the playable, but still marked as not-working due to potential issues ‘Carket’ added yesterday.

Dolmen Dolmen
(Dolmen, the Puzzle Bobble clone from Afega works fine)

Carket Ball Carket Ball
(Carket Ball still has issues and will continue to do so until the protection data is dumped, but still runs to a degree)

Support was also added to the cps3 driver to load the bootleg CPS3 multi-game conversions from Darksoft, there are two sets, one runs on a dead / blank cart with replaced bios (same key as 2nd Impact) and the other runs with a cart with both the bios replaced and CPU replaced with a regular SH2. Due to the difference in the way the encryption works with a dead cart (encrypted code mixed with non-encrypted data) neither bootleg has complete coverage. I know there are a number of people who don’t think MAME should be supporting things like this, or disagree with the term ‘bootleg’ but they are what they are, and as they’re being used in the wild it is up to MAME to document them, and document the ability to use a regular SH2 regardless of personal opinions.

CPS3 Multi-game bootleg from Darksoft CPS3 Multi-game bootleg from Darksoft
(the CPS3 bootleg sets run on dead carts or ones with the custom CPU replaced with a regular SH2, not all games can be flashed even if they appear in the menu)

Brian Troha was involved in adding a large number of old Player’s Edge Plus sets were also sorted out for this release, and while most are minor variations on the same themes it is good to have them better documented.

Player's Edge Plus Player's Edge Plus
(lots of new Player’s Edge Plus sets are recognized)

Some work was done by Barry Rodewald on the ‘Williams WPC (Alpha Numeric)’ driver pinball, meaning most sets in there now show some start-up strings and attempt to boot, although like all the Pinball drivers I doubt MAME will ever serve as more than the emulation core part of another piece of software like PinMAME did.

In MESS Curt Coder continued on his quest to emulate every obscure C64 peripheral you could possibly imagine, adding support for the PARTNER 64 personal organizer cartridge while also factoring out some legacy code.

Partner 64
(PARTNER 64 was a cartridge based personal organizer for the C64, screenshot taken from bannister.org thread)

R.Belmont added a missing FPU opcode to the 68k cores for the benefit of Sim City 2000 on the emulated Mac platforms.

Sim City 2000 MAC
(The Mac version of Sim City 2000 required a missing 68k FPU opcode to be implemented, screenshot taken from bannister.org thread)

A non-working driver for redemption game ‘Frantic Fred’ was added. This is another Kyle Hodgetts game and the emulation exposes a few bugs in the driver, one of which has been fixed, the other (page flipping problem) remains. The game is marked as NOT WORKING because the inputs don’t function. It should use a wheel and one button, but I’ve been unable to find where the wheel maps. It might require somebody more familiar with the TMS32010 to fix it up. I tried using a similar mapping to the other games on the hardware where a spinner was utilized but it doesn’t appear to be the same.

Frantic Fred Frantic Fred
(Frantic Fred is a Kyle Hodgetts redemption game, currently not working due to missing inputs)

Softlist additions on working platforms have been a little quiet of late because etabeta usually does a lot of that work and he’s been busy, however there was the Ultraman Saturn cartridge added to the lists (mentioned in the article below)

The PROM to the very rare Desert Dan was dumped by Zab, allowing for correct colours in that (yes, the desert is white)

Desert Dan Desert Dan
(Desert Dan with proper colours)

For less noticeable but still worthwhile changes you have things like iq_132 cleaning up the 1943 protection simulation, by returning the expected values based on the writes made rather than looking directly into a CPU register for the correct result (which is an ugly hack) Functionality should be identical tho!

Many other changes have been made, especially in the MESS side with work being done on a number of fairly obscure systems, or affecting things in ways I’m not familiar enough to provide information on. As always check the changelogs because a lot of the really hard work being done does go under-appreciated.

Go to article.. »

Sega Ultradrive

October 2, 2013 Haze Categories: General News. 8 Comments on Sega Ultradrive

Team Europe dumped the Ultraman cartridge (purchased and donated by SSJ) for the Sega Saturn. The is one of two games that used a data cartridge alongside the CD, the other one being King of Fighters ’95.

With the cartridge present it boots straight up in MESS / UME, although performance leaves a lot to be desired (the Saturn driver has been rather slow with a lot of games for a while now and could really do with some optimization) The banding on the title screen is (I think) a graphical effect *edit* indeed it is, confirmed via the video on Segagaga Domain.

Ultraman Saturn Ultraman Saturn
Ultraman Saturn Ultraman Saturn
Ultraman Saturn Ultraman Saturn
Ultraman Saturn Ultraman Saturn

The game is generally considered to be terrible like most Ultraman games, but good to see it running in MESS rather than just displaying the ‘Cartridge is Missing’ screen.

Due to the game being a Japanese only release, and the use of the cartridge this one is notoriously difficult to run on real hardware unless you own a Japanese system because the cartridges to bypass the region locks can’t be plugged in at the same time as the game cartridge the game needs.

Also note that while the game boots up in MESS it seems to hang frequently so you’re probably better off with something like Yabause for Saturn emulation (it lets you use the cart dump)

Go to article.. »

Card + Pocket = Carket

October 2, 2013 Haze Categories: General News. 7 Comments on Card + Pocket = Carket

ANY dumped one of the remaining Semicom titles, this one a pool-style game called Carket Ball

It seems to be a polished looking title with various well-drawn cutaways when you take shots and a decent set of features.

Unfortunately the board isn’t working properly, so we were unable to extract the actual MCU code so for now I’ve had to substitute it with a modified version of the code from another game until we can try the MCU on a different board. As a result the emulation isn’t really trusted and will remain marked as NOT WORKING. There are definitely issues with the sound that could be due to this.

Carket Ball Carket Ball
Carket Ball Carket Ball
Carket Ball Carket Ball
Carket Ball Carket Ball

It runs on the same hardware as Choky Choky etc. so cloned / bootleg style Tumble Pop hardware.

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.