MiSTer-devel / TurboGrafx16_MiSTer

TurboGrafx-16 CD / PC Engine CD for MiSTer
94 stars 56 forks source link

Bad music in Lady Sword intro #186

Closed pa-august closed 1 year ago

pa-august commented 1 year ago

The intro to Lady Sword music starts with notes that are occasionally held too long, but becomes progressively worse and more garbled as the intro progresses.

Youtube Video (see 1:11)

This issue also occurs in Retroarch Beetle cores.

dshadoff confirmed this does not happen on real hardware.

crc32 of rom used:

c6f764ec

dshadoff commented 1 year ago

Confirmed that: a) this is a good rip b) The issue doesn't happen on real hardware c) The issue does happen on MiSTer, and ALSO happens on Mednafen, so it is an issue with our fundamental understanding of some part of the hardware (most likely interrupts and either TIMER or VSYNC, or how these interact).

dshadoff commented 1 year ago

Yes, the music sequencer is definitely driven by the TIMER, so perhaps one of the following is occuring:

a) Perhaps video (or other) interrupt service routine runs too long, and the TIMER interrupt signal de-asserts before the system is ready to service the next interrupt. This is not the case on real systems, so if this is the case, a better latching mechanism may be required. OR b) TIMER interrupt may be acknowledged/disabled/reset by other code before it invokes the TIMER service function. Since this doesn't happen on real hardware, this case would be related to how interrupt reset/acknowledgement works.

dshadoff commented 1 year ago

This was corrected in release 20230224, and can be closed.