Open bryc opened 6 years ago
I think you might wanna make a fork and add support yourself, bud. Original dev seems to be dead.
I think you might wanna make a fork and add support yourself, bud. Original dev seems to be dead.
and hopefully as promised, samples would be added as a feature
On vgmrips wiki it's stated that YM2151/OPM is going to be added to the next release, but that was four years ago! It's not that hard to implement, so sharing some notes:
The MAME source code shows how to handle the YM2151 register opcodes (the stuff VGM logs): https://github.com/mamedev/mame/blob/master/src/devices/sound/ym2151.cpp#L650
It decodes opcodes with bit masks (not unlike other supported formats in vgm2pre), so that can be adapted to parse and collect all the YM2151 opcodes in a VGM. However, the decoded value isn't necessarily compatible with VOPM format.
And for that, VOPM's source is available here: http://picopicose.com/files/vopmex_src_131110.zip
VOPM uses raw decoded values in .OPM format and shifts them all way to the LSB (e.g.
0b01100000
becomes0b00000011
)Here is a comparison of the decoding differences and similarities in MAME and VOPM. Each line shows how a specific value is extracted from a register.
Column 1: MAME decoding register for use in YM2151 emulator (e.g. add 34 to RR for some reason) Column 2: VOPM decoding register for use in YM2151 emulator (slight differences, other calculations handled elsewhere maybe) Column 3: VOPM decoding .OPM file values to produce the same registers later decoded by Column 2 method.
This covers all operator parameters, Connection, Feedback, PMS and AMS, but not LFO or Noise related parameters (was completely absent in the VGM i was targeting for this).
Cheers