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
116 stars 18 forks source link

clock_enable version has worse sound in some games #27

Closed sorgelig closed 5 years ago

sorgelig commented 5 years ago

Listen the "Street of Rage 2" title song. In old jt12 version that percussion sound is perfect. In new version it's has high "hiss" instead of and lost its original a-la cymbals sound.

sorgelig commented 5 years ago

it turned out this famous phinc_VI

reg [19:0] phinc_VI; // expanded to 20-bit widht, as per @ElectronAsh's advice

if i change it to 16, then it start to sound as before. So, i'm confusing by this. 20 bits look correct but 17bits sounds better.

jotego commented 5 years ago

I don't hear a difference with 16/20 bits change. Maybe the culprit is different.

sorgelig commented 5 years ago

In messenger you told opposite. So do you hear or not?

jotego commented 5 years ago

Now that we have fixed the timers (and other things) do you still hear problems related to phinc_VI? Note that is is sized as [19:0] in the #28 commit.

gyurco commented 5 years ago

Just tried with the latest version: https://github.com/jotego/jt12/commit/4741953a0b27b1f89a82c0be057839ba3effdda7 Golden Axe, Afterburner are very bad. Music is recognizable, but with very strange instruments. Percussion is just some hissing noise.

This is the jt12 instantiation in the fpgagen version I'm using: https://github.com/gyurco/fpgagen/blob/90391948dc2df65fe7bf401fe329cf7f1400a04d/src/virtual_toplevel.vhd#L784

Strange, after loading something which has proper music, then loading e.g. Golden Axe again, it has better music (but still with some wrong instruments).

gyurco commented 5 years ago

Load Lemmings, start the game, allow the music to start, then load Golden Axe, and it is much better then :) But still sounds worse than the old.

gyurco commented 5 years ago

The version from MiSTer with the FIFO is ok however. Seems an SCFIFO would be enough there.

jotego commented 5 years ago

I don't want to add the FIFO to the code because it deviates from original hardware in a fundamental level. FIFO is required because of different system-level timing of FPGAgen with respect to real Megadrive. @sorgelig is it easy to move the FIFO out of JT12?

sorgelig commented 5 years ago

Yes, it's possible. I plan to do this later.

gyurco commented 5 years ago

I've implemented an external FIFO, but didn't solve the problem. Then I checked other changes in MiSTer Alexey's repo (hehe), and found out that the opram initialization is guilty. So using ram[x] = { ~7'd0, 37'd0 }; solves the bad sounds in MiST, too. Unfortunatlely I don't know how to implement it correctly for Xilinx. The app note says use ISE 13.2 or 18k RAM type.

sorgelig commented 5 years ago

FIFO is moved out of jt12

jotego commented 5 years ago

clock_enable branch is now better than master. Merged in release 0.4