Chat

Author Topic: YM2612 registers - discrepancies between built ROM and DFM file  (Read 1101 times)

Offline BigEvilCorporation

  • Newbie
  • Posts: 6
  • Delek FTW
Hello all!

I'm working on a tool to convert DMF files to the stream+instrument formats of the Echo sound system, and I'm having some trouble with various YM2612 registers.

When exporting a ROM using Deflemask's built-in method, I get unexpected Total Level, Multiplier and Detune values for some instruments.

Here's a comparison:



On the left is the operators from the ROM built with Deflemask, and on the right is the data read from DMF file. You'll notice that the 1st operators match, but the 2nd, 3rd and 4th have different TL, M and D values. I can confirm that the DMF data matches the instrument editor in Deflemask itself. The odd thing is that the exported ROM sounds perfect with those mystery values, but my own ROM using the real exported values does not.

Can anyone shed some light on why there's a difference?

I've attached a sample tune. The instrument in question is 01: Chimes A. I've been using this doc to build my DMF reader: http://www.deflemask.com/DMF_SPECS.txt

Cheers!
« Last Edit: July 02, 2016, 05:53:27 PM by BigEvilCorporation »

Offline BigEvilCorporation

  • Newbie
  • Posts: 6
  • Delek FTW
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #1 on: July 02, 2016, 07:32:06 PM »
Ahh I found some blurb about Detune:

Quote
DT1 gives small variations from the overall frequency × MUL. The MSB of DT1 is a primitive sign bit, and the two LSB’s are magnitude bits.

http://www.smspower.org/maxim/Documents/YM2612#reg30

I'll do some further reading, perhaps I'm missing something about the other two as well.

Offline Delek

  • Salí para ver
  • Administrator
  • Hero Member
  • Posts: 1770
    • Delek's Website
    • Email
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #2 on: July 02, 2016, 07:59:55 PM »
So I have exported a simple ROM using Chimes A and the values shown by GensKMod are exactly like your image from the right and the same as in DefleMask. Also .vgm export shows the values from the right and the same as in Defle too. I don't know how you managed to get 1C in TL from ops 2 3 4 and get the same sound. Your GensKMod is buggy or maybe you have confused the roms? Why you are comparing Channel 1 vs Channel 2?
« Last Edit: July 02, 2016, 08:04:13 PM by Delek »

Offline Delek

  • Salí para ver
  • Administrator
  • Hero Member
  • Posts: 1770
    • Delek's Website
    • Email
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #3 on: July 02, 2016, 08:05:56 PM »
DUDE! The module is changing the volume of operator 2 3 4 because of setting 70 in the vol column!
« Last Edit: July 02, 2016, 08:09:06 PM by Delek »

Offline BigEvilCorporation

  • Newbie
  • Posts: 6
  • Delek FTW
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #4 on: July 02, 2016, 08:07:03 PM »
How odd. I redid the test from scratch to make sure I haven't muddled anything up, and I'm still seeing inconsistent TL values:



See the red circled values. This is with the Regen emulator by the way.

Offline BigEvilCorporation

  • Newbie
  • Posts: 6
  • Delek FTW
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #5 on: July 02, 2016, 08:08:18 PM »
DUDE! The module is changing the volume of operator 2 3 4 because of setting 70 in the vol column!

Ohhh I see! Yeah, that makes sense.  8)

Quote
Why you are comparing Channel 1 vs Channel 2?

The second image was a single note triggered manually using the exported instrument just for a quick test.
« Last Edit: July 02, 2016, 08:10:50 PM by BigEvilCorporation »

Offline Delek

  • Salí para ver
  • Administrator
  • Hero Member
  • Posts: 1770
    • Delek's Website
    • Email
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #6 on: July 02, 2016, 08:16:28 PM »
You load a instrument with some values but the pattern data will change them accordingly, so if you build a rom from a module file with lot of effects and volume changes don't expect to catch the original instrument easily!

It is like throwing a solved rubik's cube from the 15th floor hoping find it intact in the ground! :D

Offline BigEvilCorporation

  • Newbie
  • Posts: 6
  • Delek FTW
YM2612 registers - discrepancies between built ROM and DFM file
« Reply #7 on: July 02, 2016, 08:18:30 PM »
Understood :)

It's revealed some missing pieces from Echo, more importantly. No volume slider for a start :( Time to brush up on my Z80 ASM and get it added...