David Haywood's Homepage
MAME work and other stuff
June 29, 2015 Haze Categories: General News. 29 Comments on Late to the 0.163 Party

MAME 0.163 was released a couple of days ago, but I’ve been rather swamped down and haven’t had a chance to write about it (nor finish the writeup for last year, which I haven’t had time to touch in about 3 months)

0.163 is actually a rather light release, it cleans up a couple of reported issues from 0.162 including some long-existing MESS-side bugs that ended up being reported with the increased number of users after the projects were merged. Along the same lines the uimodekey commandline option was also ported over from SDLMAME which is very useful if you’re running an emulated computer and are using a keyboard that lacks a SCRLOCK key.

From the Arcade emulation point of view the most significant thing in 0.163 is probably the discrete sound emulation for Kid Niki and Horizon. The downside to this is that it has slaughtered the performance of the driver, even for some games that don’t make use of the analog drums at all to my knowledge (The Battle Road). You can expect around 250% speed at most on a 4ghz i7 with the new code (down from over 4000% without it) I’m not sure that will improve because emulation of discrete components is always going to be expensive. Speaking of The Battle Road I fixed the colours in that with the help of caius providing a PCB reference.

The Analog sound in Kid Niki and Horizon was done by Couriersud and Andrew Gardner, I’ve uploaded a video of it here (and yes the pops and crackles happen in the emulation, they’re not artefacts of the video)


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

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

The Z80 TV Game System emulation is an interesting one too, it’s basically a modern (but very simple) ‘homebrew’ console based around the Z80 CPU. As it actually exists it is eligible for emulation and so ended up being emulated in the MESS side of the project, the games however are reminiscent of the late 70s B&W games. You can see details about the hardware here. Definitely one of the submissions I found most interesting this round, and clearly demonstrates the diversity of the project.


Z80 TV Game
Z80 TV Game Z80 TV Game
Z80 TV Game Z80 TV Game
Z80 TV Game Z80 TV Game
Z80 TV Game Z80 TV Game
Z80 TV Game Z80 TV Game
Z80 TV Game Z80 TV Game

Air Rescue and F1 Exhaust Note are now set up properly as twin display games without hacks, as per the previous news post, however in addition to that SailorSat also contributed some code to simulate the link features of a number of other Sega PCBs across multiple instances of MAME; you need to know what you’re doing to use them however, it’s not exactly plug-and-play like the actual twin display ones are.

The C64 control issue I talked about in the Donkey Kong article has also been fixed, although from various information that has been supplied it sounds like a real fix might be more complex as apparently bits on one of the IO chips can apparently still function as inputs even when configured as output if the external hardware is set up in a certain way, the C64 is set up in a way that causes this to happen, the Amiga is not, so until it’s done properly there could be conflicts.

I was able to run 2 disk images of the Ocean (Europe) version of Donkey Kong successfully.
mame64 c64p -flop1 “Donkey Kong (1986)(Ocean Software)[cr New Stars].d64”
mame64 c64p -flop1 “Donkey Kong 5H NTSC FIX (Remember-Crypt-WDR).d64”
The tape image, and non-cracked version do not appear to function, I’m guessing they fail some kind of copy protection because our emulation isn’t accurate enough. (or maybe you need to disable the disk drive to run the tape one, I’ve heard of other cases where that’s true, haven’t checked)


Donkey Kong C64 Ocean
Donkey Kong C64 Ocean Donkey Kong C64 Ocean
Donkey Kong C64 Ocean Donkey Kong C64 Ocean
Donkey Kong C64 Ocean Donkey Kong C64 Ocean
Donkey Kong C64 Ocean Donkey Kong C64 Ocean

The issue I was having with the PC version of Raiden which meant I didn’t include it in the ‘What to Do in 0.162’ articles was also apparently fixed, haven’t had time to check it out yet tho.

R.Belmont documents an important fix made to the Apple II emulation regarding how we were generating raw signals based on some disk image formats, see here. It was causing at least one non-copy protected image to fail simply due to the timing being slightly off, so very good to see it improved; accurately simulating a floppy drive is much more difficult than you’d imagine.

Sometimes small discoveries are important too, the X1-010 audio fix for downtown actually implements a previously undocumented register to control the sample rate, could affect other things too.

There is also a preview of what could become the new build system, allowing ‘tiny’ builds to be made easily just by specifying the drivers you want to be included and having the build system work out the dependencies. This could eventually replace the current Arcade/MESS sub-targets as it allows much more focused builds for development.

All in all 0.163 is not a major update (I suspect major updates will be rare, there’s simply not much left that will grab people’s attention – Andreas was looking at Namco System 10 but the encryption appears to have got the better of him at the last hurdle, and my time is also more limited than ever due to Real Life too) but steady progress is good progress.

29 Comments

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

Don’t be sad little haze. Mame continue to be a wonderful project, also without improvements. Mom.

What happened to monkey magic ?

noobish question
been meaning to give mess a try for a while now
tried the qmc2 frontend and it was way too complicated
is mame ui a good choice / valid alternative ?
http://www.mameui.info/

not really, you can’t use most of the functionality with MAMEUI, infact 163 is the first version UI version where the MESS systems exist at all, and I don’t think it’s even built with the MESSUI code yet.

honestly, you’re best off persevering with QMC2, there’s a little learning curve but it’s worth it if you want to make full use of the application.

failing that I’d recommend MEWUI over MAMEUI anyway, it enhances the internal MAME interface rather than having Windows specific stuff, but is more modern code, although again you can’t use the more advanced options as far as I know.

monkey magic was purchased by the Dumping Union, including significant contributions from a member of the development team for around $5000 because the board / game was considered at serious risk of being lost and made an ultra-high priority. After the purchase was made and the board was shipped one of the Japanese devs submitted a driver and the roms for the game that he’d been sitting on for several years. As there was technically nothing wrong with the submission, and it followed standard submission procedure and rules it was included, and the author of the driver was credited.

This however made the Dumping Union and MAME developer who had paid a lot of money for it unhappy, as it would have been polite for said Japanese dev to actually inform them they already had it and that it was safe before $5000 was spent on it. It turned out that said Japanese devs had done the same thing several times in the past allowing other developers, including Aaron to waste huge sums of money on securing board that were actually already secured, and not in danger at all. Said Japanese devs were booted off the team due to complete disrespect shown towards other members and their driver was removed for ‘moral reasons’

The plan is that the driver will be rewritten, possibly with full discrete emulation instead of samples, ignoring the original contribution and crediting the people who actually spent a lot of money on it.

Personally I think the damage is done and it’s all just silly games at this point, and the driver should be included (if it’s really about preservation etc. we’re helping nobody by ignoring it) but the team decision was to simply blacklist said contributor and anything they have to contribute because of their clear refusal to work as part of a team.

There are some MAMEUIFX builds about (weirdly 0.155, possibly a version that was used for driver development/testing?) but those were also bundled with the ROMs and Samples so even ignoring the moral/political dilemma I’m not going to link to them here. Also if you restore the removed driver it works fine with those roms/samples, it is however a political minefield; if Mamesick were to restore the game to his build we couldn’t technically stop him as nothing in the license prevents the driver from being re-added, but it wouldn’t be a popular decision.

Ok, thanks for the explanation haze. Sounds to me like the right decision was made. Rom hoarders suck.

So we now have Driver Hoarding as well :)

@Haze
Wow, that is sickening to hear that this incident was not the first time Japump have done something like this, what was their excuse? I support the team’s decision to blacklist them, that kind of disrespect deserves no credit, looking forward to proper full discrete emulation from more of the better devs.

Allegedly they have some beef with Guru / Dr. Decap over the lost / ‘stolen’ chips because they sent a rare Taito MCU that ended up not being dumped or returned. It’s a weak excuse because while unfortunate it’s not like they’re the only ones to have lost out (a lot of rare chips are going to have to be re-sourced) and it wasn’t really something that could have been predicted (aside from maybe a too goo to be true deal actually turning out to be too good to be true)

However, previous offences happened before any of that, so it seems just an excuse.

Also it’s slightly ironic, because it’s the DU and members of Mamedev that have ended up out of pocket due to this, and if they are blaming the hoarding on Guru etc. it’s funny because Guru / Smitdogg (DU) hate each other so it really isn’t punishing Guru at all.

Obviously at the end of the day nothing is going to stop them doing it again if they have other rare things, but it’s a real shame because the $5000 that was spent on that board could have purchased countless others that were actually in danger of being lost / decaying, there are plenty of games still out there that are on death’s door.

Man, that uimodekey is a life saver. I’ve tried the Spectrum emulation right now and found out the hard way that this laptop lacked the Scroll Lock key.

People who don’t know about it beforehand will be still screwed when running it, though. If only it was possible to make MAME just start in “emulator keys” mode when the assigned key is not detected, so that anybody could change it inside the emu… =\

Haze, do you know if any documentation on linking the games SailorSat worked on will be released?

@ICEKnight: take a look to the “-ui_active” option. it makes exactly what you’re looking for ;)

@ICEknight: we can’t detect what keys are on the keyboard; PC hardware doesn’t have that functionality.

@Bob: The short version is that you need to form a ring with the machines. Set -comm_remotehost on each machine to the IP address of the next machine, and then on the last machine set -comm_remotehost to the IP address of the first machine.

@ICEknight, if your laptop has an [Fn]-key, it most likely will have a shortcut Scroll-Lock key, possibly something like: Fn+K, Fn+C or Fn+F5

@Arbee, thanks for the info I will have a go at this later when I’m home. The IP can this be set per instance of Mame or does it need to be for each PC. I was hoping I can run them all from one machine instead of networked machines. Thanks again

two linked machines on one pc works like this:

mame %game% -comm_localport 15112 -comm_remoteport 15113
mame %game% -comm_localport 15113 -comm_remoteport 15112

Haze, are you interested in more info about the Sega MegaTech?
I’ve found this video which shows how the test menu works.
https://youtu.be/OaCg819akHI?t=4m41s
I guess the Time Up txt is shown on the “game” screen as well. All that is need is to handle bit 7 of $6C03 and pipe the commands to the game VDP instead of the bios VDP. I tried this on my S8DS emulator and it seems to work good enough.

That should be bit 7 of $6803 of course.

@Bob: It’s like Wolf676 said, you have to put each instance on different ports instead of different IP addresses.

@FluBBa: Of course we’re interested in more info. Thanks! :)

I found partial schematics on from .
My theories so far on $6803:
;@ bit 0 = Toggled several times after coin/(credit?) inserted.
;@ bit 1 = 1 (Always ?)
;@ bit 2 = Joystick enabled? (0=yes, 1=no) (Timer running.)
;@ bit 3 = ? Set/reset depending on byte 0xD in game instruction rom.
;@ bit 4 = Reset pin on Game side? (0=set, 1=not set)
;@ bit 5 = Game/Instruction ROM mapping? (0=instruction, 1=game)
;@ bit 6 = ? Sound off for Game side?
;@ bit 7 = IO & Mem mapped to Game side? This input to IC14 pin19 (AM16L8 the adress decoder?).
Bit 7 is always reset (0) when bios is communicating with the game side, reading instruction rom/joystick, writing VDP/sms ram/sms mapper.
When in the test menu it sets bit 7 when it sounds the alarm so it probably uses the sound of its vdp to do the alarm.
Reading the joystick from the BIOS is handled just like you would on an SMS that has a Genesis controller connected.
The BIOS also writes to $C000 to fake a normal SMS bios and sets the mapper registers at $FFFC-$FFFF to good values.

I also found that Genesis games or rather their instruction roms make the bios reset bit 2 of $6804 for a little while, I don’t know if it should stay reset or if it actually controls the switch between Genesis/SMS mode.

$6C00 controls the coin chute mechanism, bit 3 is accept/inhibit and bit 0 & 1 selects which coin chute should be accepted/inhibited.

Bits 4 & 5 of $6800 are for (service?) door 1 & 2.

That should be enough to get it in a usable state (joystick locked, timer having an effect, not locking up).

Thanks Wolf\Arbee….like haze said not plug and play. Tried Outrunners with two instances of mame, same rom folder. Set the Netword IDs etc, but no joy. Going to try the other games later tonight or over a network, I should just email SailorSat and ask how to setup up on Windows 7. Thanks again for all your hard work guys.

It’s really great to hear m62 games with drums but performance will unhappy lots of people. What I can see next in line is Congo Pongo. On Your video and my PC as well I hear crackles. Since I get about 200% in game question arise – is 200% of speed enough for correctly run game or that how it works right now?

About those lost MCUs. What happened to Bonze Adventure MCU?

Hello Haze,the Demul v0.7 alpha 080715 has released,if we can use the Demul core and run the full speed Cave Sh3 driver in Mame?

The Megatech video doesn’t actually seem to show the timeout.

I’d be a bit surprised if they use the Genesis VDP PSG for the Alarm when they have one in the SMS VDP they use for the menu screen?

Maybe one of the unknown bits connects to the pin on that determines the region meaning the game cartridges dictate the region based on a byte in the instruction rom?

The Megaplay video on there is actually more interesting because it shows for sure that the SMS layer stretches over the entire width of the Genesis display, which means to mix them we’re going to have to bump the resolution 1280 wide so that we can mix the Genesis VDP and the SMS VDP with integer scaling (320×4, 256×5) if we’re to avoid ugly uneven pixels.

What I meant was that the video showed the Service menu showing on the “game” screen & the timeout is probably the same (show on game screen).
Yes the alarm is probably done on the Bios VDP (setting bit 7 to 1 means it can access its own VDP and more).
According to the MegaTech manual it has dipswitches for mono/stereo & Japan/export, not sure if these can be read by the bios or if they are hardwired to the game side.
Just found that MT Alien Syndrome (SMS) doesn’t work with a 3 button Genesis pad… not sure how that is handled.
The SMS has 342 pixel clocks total per scanline, I’m not sure how that matches the 320 wide mode of the Genesis but I guess the SMS matches the 256 wide mode of the Genesis.

@mark: none of demul can be used in mame because demul is closed-source. In fact, it’s one of the few remaining major emulation projects that ARE still closed-source. As others have pointed out many times in the past, the demul team uses code from mame and other open-source projects while giving comparatively little back to the community, in violation of the spirit so many other similar projects foster today. It’s a crazy situation and a major shame, but there’s nothing anyone can do about it besides refusing to use (and therefore test) their software.

Your best hope is that there is sharing between mame and something like reicast, though it’s going to take time for reicast to catch up to demul in terms of compatibility, and it may never support the cave SH3 games you’re looking for anyway. And since I’m not a mamedev, I have no idea whether any of its codebase is currently useful to mame to begin with.

Nice article Haze, thanks for taking the time to do it.

@etabeta: take a look to the “-ui_active” option. it makes exactly what you’re looking for ;)
I just created a computer.ini with “ui_active 1”. This setting is awesome. It activates partial keyboard emulation by default… exactly what I was looking for.
Now I don’t need to disable full keyboard emulation every time I start a computer game (MSX games specially).
And I can always enable full keyboard emulation pressing Scroll Lock key :)

Does the “ui_active” setting do anything for games that don’t use keyboard emulation ?

sorry for the late reply, Ciro.
anyway, for games with no keyboard inputs, the ui_active option is just never checked

Cool. I can leave this option enabled by default in MAME default settings without worries :)
Thanks.

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