Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03539 Sound Minor Always Nov 19, 2009, 04:32 Aug 7, 2014, 23:03
Tester Ace View Status Public Platform
Assigned To Resolution Open OS
Status [?] Confirmed Driver
Version 0.135 Fixed in Version Build
Fixed in Git Commit Github Pull Request #
Summary 03539: nemesis, gradius, nemesisuk: Sound reproduction issues.
Description There are some issues in Gradius/Nemesis sounds.

1) Volume proportion is imperfect.
2) Lack echo/delay effect and/or filtering
3) Music speed is slightly faster in MAME
4) Per chip/channel output level control is not implemented?

Movies of the original Gradius on working Bubble System:






Steps To Reproduce
Additional Information Report cleaned up by Fujix.
Github Commit
Flags
Regression Version
Affected Sets / Systems nemesis, gradius, nemesisuk
Attached Files
ogg file icon Beginning of the History.ogg (749,578 bytes) Mar 5, 2010, 00:35
ogg file icon Challenger 1985.ogg (1,420,266 bytes) Mar 5, 2010, 00:35
Relationships
parent of 06434Confirmed  twinbee, nemesis, gwarrior: Better sound proportion 
Not all the children of this issue are yet resolved or closed.
Notes
15
User avatar
No.05175
Canim
Senior Tester
Nov 19, 2009, 13:37
I just played with the sliders and putting the first 3 with 0.7 to 1.0 let's you hear your shooting way better like the video of the original one.
Putting the slider "konami" from 0.35 to 0.7 gives the music a better touch.
It's not perfect cause I'm missing a little bass but that will be the arcade and the recording.
User avatar
No.05176
Fujix
Administrator
Nov 19, 2009, 17:09
edited on: Dec 2, 2009, 17:19
It is very difficult to find out the best value for each channel, but one of my answers is

AY-3-8910A 'ay1' Ch.0: 0.50
AY-3-8910A 'ay1' Ch.1: 0.50
AY-3-8910A 'ay1 Ch.2: 0.50
AY-3-8910A 'ay2' Ch.0: 0.80
AY-3-8910A 'ay2' Ch.1: 0.80
AY-3-8910A 'ay2' Ch.2: 0.80
K005289: 0.40
VLM5030: 1.00
The first three play SFX. If you set them too high values, they cause heavy clipping in some SFX. We should reduce them for Gradius.

Although the crucial difference between mame and the video is filtering.
Music and sound in the video is definitely filtered and/or delay effect is added.
It produces 'deep' echo modulation and strong bass.
Do you think it is from the original?
User avatar
No.05178
Ace
Tester
Nov 19, 2009, 17:49
edited on: Nov 19, 2009, 17:50
This is from the original Bubble System cabinet. The same user, kwns, posted a video of the Bubble System countdown, which is MUCH slower than the one in MAME and looks VASTLY different when starting up, on top of being unstable(countdown isn't consistent, music cuts out when the countdown is at 78). Have a look:


The Warming Up Now screen is another example of bad volume balance. The notes played by the AY-3-8910A "AY1" are WAY too silent, so all you hear

Also, listen to the song playing in Stage 1, Challenger 1985, taken from Gradius Deluxe Pack on the PlayStation. It also sounds different from MAME, but so does the Gradius Deluxe Pack version, even though it sounds quite similar to the original Bubble System cabinet:
User avatar
No.05179
Fujix
Administrator
Nov 19, 2009, 18:11
edited on: Nov 19, 2009, 18:38
First off, we should not pursue the subject on the port versions like PlayStation, no matter how it looks like the original, it is not the original.

IIRC, the boot sequence speed difference is because MAME uses the ROM version of Gradius. Proper Bubble ROM loader is not emulated in MAME yet.

The boot screen music uses AY1 chip, but if we adjust it for SFX, the boot music becomes out of shape. We need increase them to about 1.20.
That is a longstanding mystery for me.


Here's the nemesis schematic just for your info:
http://arcarc.xmission.com/PDF_Arcade_Manuals_and_Schematics/Nemesis%20Schematics.pdf
User avatar
No.05180
Fujix
Administrator
Nov 19, 2009, 18:29
Tafoid found it. Please check 02243.
The bubble system loading speed issue has already been concluded.
User avatar
No.05182
Ace
Tester
Nov 19, 2009, 19:52
I saw that the Bubble System loading issue is concluded, but my issue is with the sound itself. Now while I know that ports don't necessarily replicate everything 100%, the PlayStation port is almost a direct emulation of the Bubble System board, but then again, there may always be a flaw in anything emulated. I only included the Bubble System countdown as proof that the videos I linked when I initially reported the sound flaws were actually from a real Gradius Bubble System cabinet(it wouldn't make a difference in the sound if the Nemesis ROM chip re-release was recorded). I knew beforehand that Nemesis is what's emulated, and I'm assuming that the Bubble System Gradius original was made to function as if it were on a GX400 board rather than the Bubble System. The sound fix would apply to both the Bubble System original and the Nemesis ROM chip re-release on the GX400.

Now, I have kept some old versions of MAMEUI down to v0.128, and I remember that those builds actually had the sound balance between the different sound effects and the Bubble System's Warming Up Now screen AY1 sound being much better(but the volume balance between the sounds and music is WAY off, with the music being too loud. Also, the Laser and Double sounds ALWAYS come out too silent, no matter what version of MAME I use), but the sound on any and all arcade boards that use PSG-based sound chips comes out VERY echoey, with Gradius and Nemesis being affected(the AY1 and AY2 chips are echoey(not at all like the videos posted), but the Konami K005289 and the VLM chip sound normal). I'm not on my computer where I keep MAMEUI, but once I get there, I'll record Gradius playing in MAMEUI v0.128.
User avatar
No.05184
Fujix
Administrator
Nov 20, 2009, 09:16
I suspect the PlayStation port is just a "simulation" and mimic of the original. It could (must) not have emulated chips and run the original programs on it. MAME doesn't emulate the port version of the game, should always based on the original. That's why we introduced this rule.

To sum up the problems:

1) Sound volumes in gradius games are out of proportion.
2) If we adjust them based on the game play, the loading music is not reproduced properly, vice versa.
3) Some sort of effects and/or filtering is added to the original sound.
4) Bubble System and GX400 could control hardware sound chip volume by program? Or MAME is missing something like an internal mixer?


JFYI, when I was seeking out the good volume balance for GX400 and Bubble System games for M1 lists, I found they are vastly different for each game.
And as long as I saw the manuals, Bubble System doesn't have any potentiometer for chip output. I support the theory that the game could control sound chip/ channel volumes. But this is not backed up technically yet.
User avatar
No.05185
Ace
Tester
Nov 20, 2009, 17:23
edited on: Nov 20, 2009, 17:30
Well in that case, I've got a sound clip of Challenger 1985 from the Gradius OST you could use for comparison. It does not sound like MAME, but it seems like it has less modulation going on than in the video. I've also got a sound clip of a run through Stage 1 from Gradius Suite Fantasia on what appears to be the original Bubble System/GX400 board, since the fadeout sounds a little weird. This one also seems to have less modulation, but the music seems to play slower than in MAME(this is the file named 11_challenger_1985.mp3).

By the way, I tried the volume setup you suggested, but while the balance between the sounds and music is better, the music itself sounds way wrong.
User avatar
No.05186
Fujix
Administrator
Nov 20, 2009, 18:17
There released a lot of Gradius OSTs. Each of them has different taste (recording condition, mastering, effect, source etc.)

http://homepage3.nifty.com/foruser/gradius/gradius_b.html
http://homepage3.nifty.com/foruser/gradius/gradius_a.html

Usually we accept OST for reference, but in this case we should respect the movies of the original if you pursue the quality so much they are clearly different from the original. Didn't you notice differences between OSTs and the original video?

If you mean the original is more detuned sound than MAME, I think it's just because lack of filtering. Also as seen in 03043, there are some unimplemented functions in AY-3-8910. Any slight difference may cause imperfect detune effect.

So, the sound issue is not from single cause like volume balance. We have to consider the driver and chip statuses. It is easy to say "it sounds different", at the same time we should collect technical backups to help development.

Well, I'd like to sum up the report..
User avatar
No.05187
Fujix
Administrator
Nov 20, 2009, 18:30
Cleaned up the report for points.
User avatar
No.05516
R. Belmont
Developer
Jan 16, 2010, 23:36
Konami OSTs frequently have additional "sweetening" on them (reverb, filter/EQ, etc) that isn't present on real PCBs, so you want to be careful with those as well.
User avatar
No.05554
Ace
Tester
Jan 22, 2010, 01:00
edited on: May 31, 2012, 05:07
Don't forget that the reverb is also present on the original hardware in Gradius' case. Those videos I provided come from an original Bubble System Gradius board.

And here's even further proof of the fact that MAME is missing reverb in the sound:


As the player reaches the Final Stage, the game screws up, which is undeniable proof that this was recorded off a real Gradius Bubble System board.

EDIT: From what I can tell, it seems like only the "ay2" AY-3-8910 has some kind of sound filter. After having looked at the schematics of Nemesis a little more closely, I noticed that one of the AY-3-8910s has a different sound circuit than the other. It could be that one of those circuits is what causes the filtering in Gradius/Nemesis. I'm going to attach a closeup of the Nemesis schematic right around the AY-3-8910s. Compare the sound amps in the red boxes.

UPDATE: After a bit of tinkering with the MAME source code, I figured out what causes the modulation effect. It's not an unemulated feature of the AY-3-8910, but rather the AY-3-8910 having a different sound pitch than the K005289. This means that the AY-3-8910 and K005289 run at a different frequency on a Gradius/Nemesis board. Unfortunately, I have no access to a Gradius or Nemesis board, so someone else will have to confirm that for me.
User avatar
No.05828
Ace
Tester
Mar 5, 2010, 00:34
edited on: Mar 5, 2010, 00:36
After numerous tests modifying MAME's source code, it would seem like overclocking the K005289 up to 1.8MHz gives a modulation effect in Gradius' music that's very close to the original arcade cabinet. I've provided a recording of Gradius on my self-compiled MAMEUI v0.136 to demonstrate the modulation. The volume settings of the different sound channels is as follows in the recording:

AY-3-8910A 'ay1' Ch.0: 0.46
AY-3-8910A 'ay1' Ch.1: 0.46
AY-3-8910A 'ay1' Ch.2: 0.46
AY-3-8910A 'ay2' Ch.0: 1.00
AY-3-8910A 'ay2' Ch.1: 1.00
AY-3-8910A 'ay2' Ch.2: 1.00
K005289: 0.22
VLM5030: 0.70

The Z80 has also been underclocked to 3.524MHz to slow down the music.

Note: the sound pitch may not be right, as this was estimated with the Gradius videos linked in the original post.
User avatar
No.10903
Ace
Tester
Aug 7, 2014, 16:26
edited on: Aug 7, 2014, 16:28
May I make a new suggestion here to fix the demodulated music? I'm not sure if I'm doing this right, but I managed to get correctly modulated music by modifying this segment of the K005289 code:

WRITE8_MEMBER( k005289_device::ld1_w )
{
m_freq_latch[0] = 0x1000 - offset;
}


WRITE8_MEMBER( k005289_device::ld2_w )
{
m_freq_latch[1] = 0x1000 - offset;
}

It seems simply setting the frequency latches to 0x1000 - offset is not quite right with the K005289. By doing this:

WRITE8_MEMBER( k005289_device::ld1_w )
{
m_freq_latch[0] = 0x1000 - (offset + 1);
}


WRITE8_MEMBER( k005289_device::ld2_w )
{
m_freq_latch[1] = 0x1000 - (offset + 1);
}

I can properly replicate the modulated sound in Nemesis and Gradius. Would somebody please validate this as a proper fix? If need be, I have a Nemesis board on which I can grab samples straight from the K005289.

The only problem now is the notes from 'ay2' (now in RC filters 'filter2,' 'filter3,' and 'filter4') are too short, which is a load issue as described in 05438 where neither AY-3-8910 has an external load. If this "fix" for the demodulated audio is invalid, though... it's back to square one.
User avatar
No.10905
AWJ
Developer
Aug 7, 2014, 23:03
Seems plausible enough to me; I've committed it. Thanks.