jotego / jt12

FM sound source written in Verilog, fully compatible with YM2612, YM3438 (JT12), YM2203 (JT03) and YM2610 (JT10)
GNU General Public License v3.0
120 stars 22 forks source link

Timbal sound in SOR 1, round 4 #35

Closed jotego closed 4 years ago

jotego commented 5 years ago

Streets of Rage 1, round 4 music (selectable from options menu) Timbals sound different from real hardware (as recorded here) Timbals, drums, etc. are made with non-linear sounds so they tend to sound different unless you make everything equal. Phase generator and operator are identical to hardware. Maybe there is some little tweak that can be done to the envelope generator.

jotego commented 5 years ago

Copy this solution.

greyrogue commented 5 years ago

Regarding your note on entry points, I'm uncertain. I would think the YM2612 would only want one, because it won't get consistent phase generation if changed in between operators, especially if the algorithm is set up where one operator feeds another. I was basing the change on this: https://github.com/nukeykt/Nuked-OPN2/blob/master/ym3438.c#L1173, which only shows one entry point, but it is specifically for the YM3438, so. Maybe if it does have multiple entry points, there is something else that resets the other parts of the phases that are cycled through?

jotego commented 5 years ago

That line you pointed at actually shows four entry points at 1,6,12 and 18, which means the CSR (circular shift register) is broken in four, i.e. four instances. Sauraen had reported two CSRs here for YM2612.

I'd rather keep the bug with architecture correct. I did have Titan2 broken for a while even if I had fixes for it because the fixes didn't match the known reports about the original architecture. You just never know what's going to be the next artefact that happens because of a wrong architecture.

YM2612 is based on YM2203, that's why it makes sense to have two entry points: because YM2203 had only 12 stages for the key-on so they added a second instance after it. There are many pieces of the layout of YM2612 that are just copies from YM2203. However, YM3438 has completely new layout so it makes sense that some parts are different as microelectronic engineers are never able to just reuse something ;-)

I think it's great you have identified a solution. I'm really happy about it. Now, if it can be made to fit with the known original architecture, that would be phenomenal.