Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06977 Sound Major Always May 18, 2018, 12:13 Aug 28, 2022, 04:57
Tester wuemura View Status Public Platform MAME (Official Binary)
Assigned To Resolution Fixed OS Windows 10 (64-bit)
Status [?] Resolved Driver
Version 0.197 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 06977: vgmplay: Huge slowdown while trying to play a file
Description This simple sample makes MAME play sound in a slow motion like and lags seconds to respond to a stop command (ESQ).
Steps To Reproduce
mame vgmplay -bitb YM2203.vgm
Additional Information WAV generated with vgmplay
https://github.com/vgmrips/vgmplay
Github Commit
Flags
Regression Version
Affected Sets / Systems vgmplay
Attached Files
zip file icon YM2203.zip (323 bytes) May 18, 2018, 12:13 Uploaded by wuemura
YM2203 sound sample
zip file icon YM2203-wav.zip (11,622 bytes) May 18, 2018, 12:15 Uploaded by wuemura
zip file icon YM2203-patched.zip (336 bytes) May 18, 2018, 21:54 Uploaded by wuemura
Cannibalized version, software compatible, hardware incompatible
Relationships
There are no relationship linked to this issue.
Notes
8
User avatar
No.15028
Tafoid
Administrator
May 18, 2018, 16:31
I am curious where you obtained the file you provide above. Was it self-created? If not, please link.
User avatar
No.15031
wuemura
Viewer
May 18, 2018, 18:17
This is a PMD Music Macro Language, it came with the YM2203 shield.
http://delmunsoft.com/PMD%20Programming.html
http://www.vgmpf.com/Wiki/index.php/Music_Macro_Language

The instruction is:
'@ M 110
   AR DR SR RR SL TL KS ML DT AM SSG-EG
'@ 031,000,000,000,000,033,000,004,007,001,000
'@ 018,015,009,007,003,009,000,004,007,001,000
'@ 031,000,000,000,000,024,000,002,003,001,000
'@ 031,015,009,007,003,000,000,002,003,001,000
'@ 004,007

'N9 T160
'N9 v15o4l8[cdefgab>c<]

It send a command to YM2203 chip to play "cdefgab>c<"
User avatar
No.15032
wuemura
Viewer
May 18, 2018, 18:24
This source code has the MML parser and the YM2203 sound chip parameters, tables, etc, etc.
http://licheng.sakura.ne.jp/fm_shield/FM_Shield_src_20140216.zip
User avatar
No.15033
Tafoid
Administrator
May 18, 2018, 19:14
While this seems to play on/ vgm winamp plugin, there is a good chance you are missing header data in the file itself that isn't sending a clock speed or the header is being misread by vgmplay.

Current .vgm specifictions: http://vgmrips.net/wiki/VGM_Specification
You have music data starting at 0xb0, when it should be starting at 0x100 for best compatibility. I think the way that things are read right now, vgmplay is forcing clock speeds for chips you are not even using which includes the two most processor intensive ones (Pokey and Qsound) which is causing many sound chip setup to do nothing but spin and eat up CPU.

I'll acknowledge until someone with more knowledge of the driver and look it over.
User avatar
No.15034
Tafoid
Administrator
May 18, 2018, 19:29
edited on: May 18, 2018, 19:33
I ran with -log and I see this being logged:
[:] File version 1.61
[:] Header size according to version is c0, header size according to header is b0
It may not be vgmplay misreporting but your header may be created incorrectly and your data offset at 0x34 in the header is actually incorrect. Please check.
User avatar
No.15035
wuemura
Viewer
May 18, 2018, 20:02
The clock is set to 192 in the settings.
Even if you pad the data over 0x100 and fix the header manually, mame still can't play the file.
User avatar
No.15036
wuemura
Viewer
May 18, 2018, 21:53
I've cannibalize the VGM file to make it run on mame, now the YM2203 hardware doesn't run it.
[:] File version 1.60
[:] Header size according to version is 80, header size according to header is 80
In either case, I'll leave to developers to decide what to do, maybe we need something to avoid the driver to choke like that or like the other VGM players, just play the thing.
User avatar
No.20490
Fujix
Administrator
Aug 28, 2022, 04:57
This problem is no longer confirmed.