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

Thunder Force IV #23

Closed jotego closed 6 years ago

jotego commented 7 years ago

ingame music stalls until the player's ship fires. Then music seems to be playing at the shooting pace.

jotego commented 6 years ago

This is confirmed to happen on MiSTer too with corrected CPU interface (no synchronizers)

sorgelig commented 6 years ago

I would correct it: it plays music only when FX sounds played. You don't need to press the fire. If there some crashing or exploring sound, then music will also play. Just to be clear: it's not related to input events.

jotego commented 6 years ago

Corrected with sorgelig timer fix. The problem was that "LOAD" signal need be clear after each MMR write cycle. That is why it is common to see software clearing the flag and loading the timer in the same instruction. Changes are still not applied to the master branch.

sorgelig commented 6 years ago

While debugging the app (vdpdoc.bin) i discovered it sends 0x1F to timer flag regs every time timer_A overflows and at the same time wait for timer_B overflow. And with old behavior timer_B would never overflow as timer_A has shorter time and 1F reloads both timers.

jotego commented 6 years ago

So the problem is that the load operation should not re-start the counter then?

sorgelig commented 6 years ago

right. So now it's constantly reloading when load=0, and when load switch to 1, timer counter already has last loaded value.