Open jotego opened 3 years ago
can you provide vgm files for problematic songs?
also preferrably recordings of your core and real hardware so I could compare with my core output
People are complaining about Blanka's theme and also about Double Dragon music. I did measure all combinations of this on real hardware but I couldn't find the measurements the last time I looked for them. I will look harder for the files. I think rather than a VGM file, it is better to directly call the functions involved and get the raw phase increment values. It is much faster. I am doing that in this test bench https://github.com/jotego/jt51/tree/master/ver/jt51_pg
You would need to setup Verilator on a Linux machine to run the test, so maybe you can skip that and just inspect the code of https://github.com/jotego/jt51/blob/master/ver/jt51_pg/test.cc to figure out what I am doing.
I checked my original code output for DT1 and it was different from the App notes too (and different from yours). I think the code did match the measurements when I wrote it, but it is too long ago. I do need to find the measurements.
I found the measurements. Here they are:
https://drive.google.com/drive/folders/17Ra-kuqCgjCHayBnr8CpZbzzJb1GIXy7?usp=sharing
If you untar the file freq.tar.gz you will find binary files with 16-bit signed values of output waveforms for the different parameter settings.
I think that data is summarized in this spread sheet:
The spread sheet has some words in Spanish, as I wasn't sharing my work back then. But it isn't a big deal, fase means phase, etc.
After implementing the DT1 circuit following your code, I got several complaints about music being off-pitch. I have run your code to extract the same detune table as present in the YM2151 application notes:
The values for DT1=0/3 seem fine. The values for DT1=1 and DT1=2 are wrong. Could you please review your notes?