Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
04567 Sound Trivial Always Dec 15, 2011, 20:01 May 30, 2023, 21:07
Tester Fujix View Status Public Platform
Assigned To galibert Resolution Fixed OS
Status [?] Resolved Driver
Version 0.144u3 Fixed in Version 0.255 Build
Fixed in Git Commit ebe7cb8 Github Pull Request # #11127
Summary 04567: flstory: MSM5232 tone duration is longer in MAME.
Description MSM5232 tones decay less than the real PCB, which result undamped sounds.
Recordings of the real PCB attached.
Steps To Reproduce
Additional Information
Github Commit
Flags Verified with Original
Regression Version
Affected Sets / Systems flstory
Attached Files
mp3 file icon 01.MP3 (87,387 bytes) Dec 15, 2011, 20:02 Uploaded by Fujix
PCB recording
mp3 file icon 02.MP3 (849,546 bytes) Dec 15, 2011, 20:02 Uploaded by Fujix
mp3 file icon 03.MP3 (601,487 bytes) Dec 15, 2011, 20:02 Uploaded by Fujix
mp3 file icon 04.MP3 (35,773 bytes) Dec 15, 2011, 20:02 Uploaded by Fujix
mp3 file icon 05.MP3 (17,387 bytes) Dec 15, 2011, 20:03 Uploaded by Fujix
mp3 file icon 06.MP3 (51,864 bytes) Dec 15, 2011, 20:03 Uploaded by Fujix
mp3 file icon 07.MP3 (1,361 bytes) Dec 15, 2011, 20:03 Uploaded by Fujix
mp3 file icon 08.MP3 (39,748 bytes) Dec 15, 2011, 20:03 Uploaded by Fujix
jpg file icon e434089828.3_mod.jpg (244,784 bytes) Oct 24, 2020, 05:57 Uploaded by eito
eito
png file icon omote-4_mod.png (677,067 bytes) Oct 24, 2020, 05:57 Uploaded by eito
eito
jpg file icon poly800_msm5232_capacitors.jpg (1,158,567 bytes) Oct 25, 2020, 15:27 Uploaded by eito
KORG Poly-800
jpg file icon PXL_20230324_173359648-min.jpg (1,399,036 bytes) Mar 24, 2023, 17:41 Uploaded by TremiRodomi
jpg file icon PXL_20230324_173121524-min.jpg (887,150 bytes) Mar 24, 2023, 17:42 Uploaded by TremiRodomi
jpg file icon PXL_20230324_172826448-min.jpg (890,344 bytes) Mar 24, 2023, 17:42 Uploaded by TremiRodomi
jpg file icon PXL_20230324_172335877-min.jpg (937,248 bytes) Mar 24, 2023, 17:42 Uploaded by TremiRodomi
jpg file icon PXL_20230324_172259025-min.jpg (836,550 bytes) Mar 24, 2023, 17:43 Uploaded by TremiRodomi
png file icon flstory_0x06.png (35,762 bytes) Apr 1, 2023, 17:39 Uploaded by eito
waveform comparison
eito
txt file icon flstory_0x06.txt (43,906 bytes) Apr 1, 2023, 17:47 Uploaded by eito
msm5232_latch_0x06
[Show Content]
Relationships
There are no relationship linked to this issue.
Notes
25
User avatar
No.18078
eito
Tester
Oct 24, 2020, 05:57
Hello,
I have noticed this problem also and am willing to fix it.

To fix this issue, further information of real PCB needed.
Would you please take high resolution pictures of a specific part of real PCB ?

The information required is, the capacitance of capacitors placed near the MSM5232.
Please take a look of images attached. There is 8 of same capacitors placed there.
They should have some numbers/letters on their surface that indicates the capacitance of them.
We need some images with high enough resolution of them to confirm the content of the fix.
User avatar
No.18087
eito
Tester
Oct 25, 2020, 15:29
For reference, I took a picture of a KORG Poly-800 PCB which uses a MSM5232.
We can see that there are 8 of 1.0μF capacitors around the MSM5232 chip.

MSM5232 uses the capacitance of these capacitors for envelope generation.
The amount of decaying depends mainly on it.

The current implementation of MAME specifies a value 1.0μF for flstory, and there is a comment that says this value is based on a real PCB.
However, with this value, the playback doesn't match with real PCB.

Other titles that use MSM5232 in MAME 0.225 use 0.39μF or 0.65μF for this value.
The value 0.39μF is, a value indicated on datasheet of MSM5232.
I can't found the source of the value 0.65μF. A comment written on msisaac(which uses 0.65μF) says that 'the value matches the sample, but it's not verified'.
If the value 0.65μF specified for flstory, the playback sounds similar with your recordings.

If the capacitors on real PCB indicates that they have capacitance of 0.65μF(or another value), then it can be proposable to use the value for flstory.
User avatar
No.21040
TremiRodomi
Tester
Jan 25, 2023, 21:36
edited on: Jan 25, 2023, 23:40
Coming in here to also confirm that the sound emulation is off compared to a real PCB. Playthrough of the game from a real PCB below. In addition, I also notice that what appears to be low-pass filtering on the AY sound effects, aren't present here.

LEGEND OF GAME MUSIC 2 PLATINUM BOX also has PCB recordings of the entire soundtrack if you want a clearer isolated recording of the music as it should sound, which I sourced my own YT upload of the OST from (other than looping and some audio cleanup, it's the same as it is on the CD):
https://www.youtube.com/playlist?list=PLqPqqf1AIs9R7DaB2eyZpBP-lAGiCdPJ7
User avatar
No.21182
TremiRodomi
Tester
Mar 19, 2023, 21:40
Good news - I am about to acquire a PCB of the game. Once I get it, I should be able to get a better picture of the sound board to confirm the 0.65μF capacitor value for real hopefully.
User avatar
No.21183
eito
Tester
Mar 20, 2023, 00:09
It will surely bring peace to the kingdom again!
User avatar
No.21185
Fujix
Administrator
Mar 20, 2023, 05:06
Cool.
User avatar
No.21207
TremiRodomi
Tester
Mar 24, 2023, 17:44
edited on: Mar 24, 2023, 23:08
Got it today, and tried my best to take pics of the important areas. Pics are the new files uploaded above. If you need another pic lemme know, but I think this should do it. My cap value reading skills are a little rusty without a chart at hand, but I'd imagine those driver notes were wrong.
User avatar
No.21208
eito
Tester
Mar 25, 2023, 05:57
Received the images!
I'll check the current implementation and the corrected sound output.
User avatar
No.21218
TremiRodomi
Tester
Mar 26, 2023, 01:33
Excellent! I await to hear how it sounds now.
User avatar
No.21247
TremiRodomi
Tester
Apr 1, 2023, 06:42
Any updates?
User avatar
No.21255
eito
Tester
Apr 1, 2023, 17:39
Sorry to keep you waiting!
I got correct-ish audio output based on the image you gave us.
There seems to be a problem with constant values that the sound chip driver (msm5232) has.
I still have some concerns and am trying to corroborate.
User avatar
No.21256
TremiRodomi
Tester
Apr 1, 2023, 19:10
Ah, some of it was deeper than it seemed, it seems.

Glad I was able to help though, can't wait to see how it'll be in MAME after all of this!
User avatar
No.21291
TremiRodomi
Tester
Apr 7, 2023, 18:07
I wonder if the upcoming changes can also be applied to Typhoon Gal, Rumba Lumber, and Victorious Nine. I raised a similar issue about Typhoon Gal with 08553, and I'm pretty sure that game and the rest of the games on this driver use the exact same sound board. We'll see for sure though.
User avatar
No.21306
eito
Tester
Apr 12, 2023, 16:00
Dear TremiRodomi & Fujix,
Thank you for your patience, I just have submitted a fix that works for the sound chip (msm5232).
https://github.com/mamedev/mame/pull/11098
If this is approved, I will then submit a patch for Fairyland Story to set the proper values in the soundchip to make the decay decent.

There is also a more minor issue with the sound chip that affects the decay. I will provide a fix for this as well.
User avatar
No.21307
eito
Tester
Apr 12, 2023, 16:05
This commit leaves the behavior unchanged for other titles that use msm5232. I can't confirm the correctness of the fix or check the sound outputs.
For TAITO titles with similar issues, it should be possible to fix them in the same way as the Fairyland Story implementation.
User avatar
No.21308
eito
Tester
Apr 12, 2023, 16:43
oh, Tremi you are right,
Similar problems with the three titles you mentioned (onna34ro, rumba, victnine) will be fixed together with the fixes to The Fairyland Story.
They share the same driver codes.
User avatar
No.21309
TremiRodomi
Tester
Apr 12, 2023, 16:47
edited on: Apr 12, 2023, 23:03
That's some damn good stuff right there, thanks a bunch!!

With this fix MAME will also emulate the game better than the official Arcade Archives port of the game, which also has note decay issues (at least after its day one patch).
User avatar
No.21312
Fujix
Administrator
Apr 13, 2023, 09:18
Thank you! So cool.
User avatar
No.21341
TremiRodomi
Tester
Apr 23, 2023, 20:44
edited on: Apr 23, 2023, 20:58
https://github.com/mamedev/mame/commit/ebe7cb8150742756f1b430767d5576e01c1582e6

Fixed with commit ebe7cb8 by galibert, and will be fixed further with an upcoming PR by eito.
User avatar
No.21343
Robbbert
Senior Tester
Apr 24, 2023, 00:07
edited on: Apr 24, 2023, 00:12
Looks like it's missed the cutoff for 0.254, so let's leave it open until that other PR gets done.
User avatar
No.21344
eito
Tester
Apr 24, 2023, 00:45
ebe7cb8 seems to have been merged that way intentionally to avoid the risk of the change causing problems.
I will let you know here when my PR is merged.
User avatar
No.21352
eito
Tester
Apr 25, 2023, 15:53
PR posted (not yet reviewed or merged):
https://github.com/mamedev/mame/pull/11153
User avatar
No.21356
eito
Tester
Apr 26, 2023, 15:44
edited on: Apr 26, 2023, 15:45
The pull request I listed above has been merged.
Thanks to an earlier commit by galibert,
https://github.com/mamedev/mame/commit/ebe7cb8150742756f1b430767d5576e01c1582e6
the three titles mentioned by TremiRodomi (onna34ro, rumba, victnine),
Buggy Challenge (buggychl), and Wyvern F0 (wyvernf0) have also had their sounds improved.
The next step could be the emulation of TA7630 tone control.

Thank you Leland, was fun!
User avatar
No.21368
Chuky
Tester
Apr 29, 2023, 11:52
Wow that is awesome!!! Keep up the good work. Will it be very difficult to emulate the TA7630? There are several games that make use of it, isn't it?
User avatar
No.21374
eito
Tester
Apr 30, 2023, 15:07
Yes, it is also used in Namco's SYSTEM I and SYSTEM II.
I also hope to hear the PC010SA, a similar IC used by TAITO's DARIUS and others.
I don't want to discourage someone who got motivated, so I won't say too much about it here, but it shouldn't be terribly difficult.