Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06977 Sound Major Always 7 days ago 6 days ago
Tester wuemura View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows 10 (64-bit)
Status [?] Acknowledged Driver vgmplay.cpp
Version 0.197 Fixed in Version Build 64-bit
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
Flags
Regression Version
Affected Sets / Systems vgmplay
Attached Files
zip file icon YM2203.zip (323 bytes) 7 days ago Uploaded by wuemura
YM2203 sound sample
zip file icon YM2203-wav.zip (11,622 bytes) 7 days ago Uploaded by wuemura
zip file icon YM2203-patched.zip (336 bytes) 6 days ago Uploaded by wuemura
Cannibalized version, software compatible, hardware incompatible
Relationships
There are no relationsihp linked to this issue.
Notes
7
User avatar
No.15028
Tafoid
Administrator
7 days ago
I am curious where you obtained the file you provide above. Was it self-created? If not, please link.
User avatar
No.15031
wuemura
Tester
7 days ago
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
Tester
7 days ago
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
7 days ago
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
7 days ago
edited on: 7 days ago
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
Tester
7 days ago
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
Tester
6 days ago
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.