AdPlug
Newest releases:
Core library2.3.3
AdPlug/Winamp1.8.2
AdPlay/DOS1.6a
AdPlay/UNIX1.8.1
AdPlug/XMMS1.2
libbinio1.5
Main
News
Download
Extras
Library

GitHub Project Page
GitHub Logo

AdLib file formats reference library entry:

Legend:

  • A: The file format is already (partly) supported by AdPlug.
  • D: File format documentation/specification is available.
  • E: Editor software is available.
  • P: Player software is available.
  • M: Test music files are available.
  • S: Source code is available.

Callus OPL Register Logs

.CYM
  D
Download

--------------------------------------------------------------------------
Callus can log the YM2151 register writes to a .CYM file.
Someone (not me) could possibly write a utility to convert
this data into a .MID or other music file.
The CYM format works like this:
  read a byte of data
  if zero then one frame has elapsed (1/60th of a second)
  if nonzero then this byte is the YM2151 register number and
    the following byte is the data written to that register.
  repeat until EOF
The most important YM2151 registers are 0x08 (keyon/off) and
0x28-0x37 (channel frequency).
--------------------------------------------------------------------------

In the case of Mame's OPL driver it's logging OPL registers rather than ym2151 registers. The timing is also be different (i.e. a 0 is less than a 60'th of a second). I got it to output individual samples for each channel and the correct playback rate was 41618Khz (it was a raw PCM sample, so I had to calculate it based off a 44100Khz recording of the song as output by MAME) I had the same problem with the ym2151 driver (both with samples of individual channels, and with the CYM's having different timing than those output by Callus) It seems to be related to the clock of the OPL or ym2151. i.e. once I knew the correct playback rate for one game, I could calculate it for any game based on the clock of the FM chip(Mame helpfully tells you all of this information). VGMtool can read the OPL logs, but it thinks that they're ym2151 logs.

Also, these files get very big very fast, it'd probably be a good idea to convert them using the .RAW writer.

If you want to make any of these for testing, just compile Mame with the line for logging CYM files commented back into fmopl.c. (Ikari Warriors, Heavy Barrel, Flying Shark, Twin Cobra, and Truxton all use OPL chips and have good soundtracks)

Last modified on 2024-01-11 21:07:02 +0000
Copyright © 2001 - 2015 Simon Peter