Preliminary ZSG2 support in MAME

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

Yes, I have yet to implement all the analog filters and such that go on sound chips. Unlike MAME, I actually intend to do that stuff ;)
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
dunpeal2064
Posts: 1781
Joined: Tue Nov 23, 2010 9:14 pm
Location: CA

Re: Preliminary ZSG2 support in MAME

Post by dunpeal2064 »

<3

I have hope that I may finally get to play Hacha Mecha Fighter again after all. (Or Gunnail without it sounding like hell)
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

I have a HMF/TD1 board to use for testing, and a board using the same sound MCU as Gunnail (which I already have a dumping method for, actually), so yes, they will be working at some point :lol:
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Re: Preliminary ZSG2 support in MAME

Post by Master O »

trap15 wrote:Yes, I have yet to implement all the analog filters and such that go on sound chips. Unlike MAME, I actually intend to do that stuff ;)
So can we assume you will submit it to mame when it's completely finished?

All of those samples on your youtube channel sound excellent. Please keep up what you're doing, man. Seriously, keep up the good work!
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

This is entirely separate from MAME. I do not intend to push many (if any) patches of any sort up to MAME. This Hien project is not based on MAME in any way, is written from the ground up, using some pretty unique ideas and implementations. I hope it will be a success and well-regarded when I feel the time is right to release it.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Re: Preliminary ZSG2 support in MAME

Post by Master O »

trap15 wrote:This is entirely separate from MAME. I do not intend to push many (if any) patches of any sort up to MAME. This Hien project is not based on MAME in any way, is written from the ground up, using some pretty unique ideas and implementations. I hope it will be a success and well-regarded when I feel the time is right to release it.
Still, even if you don't really like mamedev all that much, it certainly couldn't hurt anyone to point your work out to them whenever you finish it.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

Yes, I have no problem with pointing them to my work. But I won't bend over backwards or really put pretty much any effort into pushing my work over to them. I feel like MAME has outlived its lifespan and it's time to get a better product out there.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Preliminary ZSG2 support in MAME

Post by Ed Oscuro »

Analog filters, nice. (Doesn't MAME have some kind of analog filter prototype in its code? Or no? I was under the impression that they basically just generate whatever and don't filter it at all, as a matter of course.)
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

Almost all drivers just push out the individual chip's sound output, probably run through some basic default filters (maybe, haven't looked intensely). I'm intending to have each board's filters be directly specified, so it will produce identical* output to each PCB.

As BPze quoted earlier, MAME has issues connecting sound as inputs to other devices; Hien currently does not have this problem, and is structured in such a way that it has never and will never be a problem. Just wait and see ;) When my blog comes back up, I'll probably write a new post about the project, since I've made tons of progress in the 6 or so months since the last post about it.

* Within reasonable tolerance; analog circuitry and such is rarely perfect, so each PCB will differ slightly to another.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

So the endgame is for Hien to become an actual functioning emulator that people can use, rather than a M1-like audio player?

Marvelous.

Just make sure we don't need a 1.21 Jiggawatt liquid nitrogen-cooled flux capacitor 16-core CPU to run it and she'll be right mate. :D
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: Preliminary ZSG2 support in MAME

Post by Xyga »

BPzeBanshee wrote:Just make sure we don't need a 1.21 Jiggawatt liquid nitrogen-cooled flux capacitor 16-core CPU to run it and she'll be right mate. :D
Hardware acceleration ? *drool* (j/k :mrgreen: )
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

BPzeBanshee wrote:So the endgame is for Hien to become an actual functioning emulator that people can use, rather than a M1-like audio player?
That was the plan the whole time. Just starting with audio because it's a good way to get output that things work. Also M1 is awful so having a replacement for that is always good :lol:
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
BIL
Posts: 18957
Joined: Thu May 10, 2007 12:39 pm
Location: COLONY

Re: Preliminary ZSG2 support in MAME

Post by BIL »

Great to hear about the project trap, I've really enjoyed the Hien tracks on youtube!
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

The TMS57002 DASP got hooked up to the Konami GX driver. O.Galibert made it look like an easy change too, but from the response I got when I brought it up on Bannister Forums Shoutbox a few days ago it may not make much if any difference at all. Who knows at this point.
forums.bannister.org shoutbox, edited for clarity wrote: BPzeBanshee: With the DSP business in Konamigx, since it has the same TMS dsp will it soon be possible to use it to reduce the tinniness of the ZSG2 or am I on the wrong page?
R. Belmont: it will be possible to hook it up to the ZSG2. I strongly doubt it will solve the tinniness though, that's all the actual ZSG2
AWJ: the volume ramp of the k054539 will have to be looked at again now, since the current behaviour (which has extensive per-game tweaks) was derived to make gx sound right without the DSP effects
R. Belmont: that's not actually true
R. Belmont: well, I mean the part where uneducated ninnies made a hash of the GX per-game volumes is true, but :)
AWJ: well, the volume balance in e.g. sexyparo is even further off now. the voices when you get a powerup used to be barely audible, now they're completely inaudible

BPzeBanshee: @RB I thought that the reason for the tinniness in ZSG2 was the lack of the DSP adding filters etc. At least that's what I got from hap's notes. What else is there to it?
R. Belmont: my day job is game audio, and I'm saying that in my professional opinion the DSP is strongly unlikely to be the fix. if it is, I'll be insanely happy, but :)
BPzeBanshee: Hmm, I see. What else could be wrong with it if not the lack of DSP? Not something trivial I'm guessing. As it stands it sounds like its missing a channel somewhere apart from the tinniness.
BPzeBanshee: For example, XII Stag boss theme's main tune just isn't there. OST: http://www.youtube.com/watch?v=SViI6hloOJw
R. Belmont: I think it's a problem somehow with the sample decoding, because I can't believe Zuntata would use samples that sound that bad "dry".
R. Belmont: I mean, they did incredible work on even the YM2610, and this is still much more capable hardware than that
R. Belmont: (if probably a step down from the Ensoniq board, but this was at the time when Creative had bought and gutted Ensoniq)
R. Belmont: KMFCL(tm)
BPzeBanshee: I thought it was a common trick to use highly-compressed samples to save space and fake higher quality by adding bass to it like Brian Schmidt did with the Xbox startup tune, but what do I know. :P
BPzeBanshee: RayStorm seems to have all its instruments there, just tinny, but I feel all the GNET games are missing an audio channel somewhere. Separate issue perhaps?
R. Belmont: Brian Schmidt also had like 4k to make the Xbox startup tune. we have multiple megs of ROM capacity on these PCBs.
R. Belmont: SNES games crammed all the audio, including code, into 64k and still had great quality samples. the DKC series is all dry samples except in the cave levels.
BPzeBanshee: Good point. No excuse for poor samples here then. And the sample decoding stuff in MAME was done long before hap's zsg2 work post-0.152.
BPzeBanshee: If there was issues in that initial work this could be the culprit then?
R. Belmont: it's possible. I suspect we'll know more when France is awake again :)
User avatar
emphatic
Posts: 7916
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: Preliminary ZSG2 support in MAME

Post by emphatic »

You have your hands in so much cool stuff, trap15.
Image | My games - http://www.emphatic.se | (Click) I have YEN stickers for sale
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Preliminary ZSG2 support in MAME

Post by trap15 »

Not really, I don't work with MAMEdev much anymore. Haven't for many a months.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
emphatic
Posts: 7916
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: Preliminary ZSG2 support in MAME

Post by emphatic »

trap15 wrote:Not really, I don't work with MAMEdev much anymore. Haven't for many a months.
My point exactly. :twisted:
Image | My games - http://www.emphatic.se | (Click) I have YEN stickers for sale
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

Just thought to let you all know hap made a couple of slight fixes with regards to some opcodes and clock timers for the ZSG2 so Psyvariar's drum set sounds like it actually exists now as opposed to missing pieces. Still tinny as hell but a step in the right direction. I've actually have samples up of this for a while now but forgot to link it here apparently, so here's a sample of it in action (excuse the Steam sfx halfway in, obviously not part of the emulation :P).

Here's some others I recorded last year, which may or may not be current but gives you a good idea of where MAME's at:
Raystorm, which is a FX1 game and for some reason sounds better than the GNET titles in emulation atm
XIISTAG
Psyvariar's stage clear tune from last year, I think this was from before the volume fix so I had to amplify it in Audacity
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

Link removed

"make -j5 SUBTARGET=arbitaryname DRIVERS=src/mame/drivers/taitogn.c,src/mame/drivers/zn.c" has to be the best thing they've added to MAME since working Raiden II. No more handcrafting LSTs and MAKs.
Last edited by BPzeBanshee on Wed Aug 15, 2018 12:38 am, edited 1 time in total.
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

https://github.com/mamedev/mame/commit/ ... 26f813a119

Still isn't perfect yet (no DSP hookup) but superctr's changes make it a hell of a lot better than it was before, RayStorm and Psyvariar sound quite good now and games like XII Stag that made heavy use of the filter/chorus effects provided by the DSP suffer a bit but are otherwise improved as well.

EDIT: https://github.com/mamedev/mame/pull/3854
Holy crap this guy's heading straight to the finish line! DSP hookup and emulation pull request - I'm pulling and compiling a build to test it now.
Last edited by BPzeBanshee on Wed Aug 15, 2018 6:08 am, edited 1 time in total.
User avatar
Shepardus
Posts: 3505
Joined: Sat Dec 13, 2014 10:01 pm
Location: Ringing the bells of fortune

Re: Preliminary ZSG2 support in MAME

Post by Shepardus »

Neat! How does G.Darius sound? The music was by far the most glaring issue I had with the game in MAME.
Image
NTSC-J: You know STGs are in trouble when you have threads on how to introduce them to a wider audience and get more people playing followed by threads on how to get its hardcore fan base to play them, too.
1CCs | Twitch | YouTube
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

I'm not too familiar with G-Darius so I'll let you be the judge: [link removed]

In case you didn't see my edit there's now a pull request to get the DSP up and running! Still work-in-progress, everything seems to echo from the DSP now and some of Psyvariar Revision's tracks play out one speaker, but the games that make heavy use of the DSP sound close to arcade-perfect now. Great work to all involved :D
Last edited by BPzeBanshee on Sun Aug 19, 2018 1:07 pm, edited 1 time in total.
User avatar
Keade
Posts: 384
Joined: Mon Jul 16, 2007 8:44 pm

Re: Preliminary ZSG2 support in MAME

Post by Keade »

Shepardus wrote:Neat! How does G.Darius sound? The music was by far the most glaring issue I had with the game in MAME.
The music still plays at low volume, if it is what you are talking about. EDIT: fixed in latest builds, read below posts
There may be improvements but I don't know the game enough to notice (besides, the low volume would make music improvements harder to notice).

Among other things, according to ctr, Ray Crisis music now sounds identical to the actual OST (released on CD).
The difference is night and day indeed, right from the ship selection screen :)

Please note that as announced, performance decreased a lot (on a i5-4690k, Ray Crisis still runs at >100% speed, but not by much).

Anyway, that is definitely great news !
Last edited by Keade on Mon Aug 20, 2018 7:19 am, edited 3 times in total.
User avatar
BPzeBanshee
Posts: 4857
Joined: Sun Feb 08, 2009 3:59 am

Re: Preliminary ZSG2 support in MAME

Post by BPzeBanshee »

ZN/GNET only build, 19-08-18

Recordings (normalised in Audacity but otherwise straight from MAME's wavwrite):
Psyvariar Revision
XII Stag

I think it's safe to say we're at a point now where some folks with actual boards for these games should do some line recordings and compare because that's pretty damn close to arcade-perfect. ctr already has line-ins for RayStorm and RayCrisis but I'm curious about a few tracks in the other G-NET games if anyone still posting here owns an actual board for them.

Oh, and G-Darius sounds pretty good too but I'm not sure if the delay before playing every track is intended or not. Sounds close to the videos I found though!
User avatar
gameoverDude
Posts: 2269
Joined: Wed Jan 26, 2005 12:28 am
Contact:

Re: Preliminary ZSG2 support in MAME

Post by gameoverDude »

Banshee, thanks for sharing this build. ZSG2 audio has surely come a long way- I'd say it's getting close to perfect.
Chaos Heat sounds good, also. Not too far off from the real G-Net card.
Kinect? KIN NOT.
User avatar
Keade
Posts: 384
Joined: Mon Jul 16, 2007 8:44 pm

Re: Preliminary ZSG2 support in MAME

Post by Keade »

aaand...it's officially here in MAME 0.201 :)

Here is a little homemade demo of G-Darius (first shows 0.200, then 0.201). It is definitely night and day:
https://youtu.be/c-T88_LesCo

Off-topic, but I doubt there is a QSound thread, so here it is - there were changes in the QSound HLE emulation, too. Now sounds slightly different (more accurate, from what I have read, and heard from Street Fighter EX PCB recordings). Here's Progear:
https://youtu.be/YyaV4QUMar8
User avatar
soprano1
Posts: 3029
Joined: Wed Sep 18, 2013 4:44 pm
Location: Portugal

Re: Preliminary ZSG2 support in MAME

Post by soprano1 »

Keade wrote:aaand...it's officially here in MAME 0.201 :)

Here is a little homemade demo of G-Darius (first shows 0.200, then 0.201). It is definitely night and day:
https://youtu.be/c-T88_LesCo

Off-topic, but I doubt there is a QSound thread, so here it is - there were changes in the QSound HLE emulation, too. Now sounds slightly different (more accurate, from what I have read, and heard from Street Fighter EX PCB recordings). Here's Progear:
https://youtu.be/YyaV4QUMar8
Since you mentioned it, little warning for everyone missing CPS2 games on their filtered list: rename qsound to qsound_hle. That's it.
Thanks for the comparison videos.
ChurchOfSolipsism wrote:I'll make sure I'll download it illegally one day...
Post Reply