punesemu / puNES

Qt-based Nintendo Entertaiment System emulator and NSF/NSF2/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)
GNU General Public License v2.0
597 stars 40 forks source link

New NSFe Player: Some files don't play audio unless "Initial RAM value" set to 0x00 #380

Closed nelsonhef closed 4 months ago

nelsonhef commented 4 months ago

Hi!

During my tests, i found a couple of files that don't produce any sound in puNES 0.111 and later WIPs. They play fine in puNES 0.110.

noaudio.zip

punesemu commented 4 months ago

Hi @nelsonhef, can you try the last WIP?

nelsonhef commented 4 months ago

Hi @punesemu, i tested WIP 4df298d and the initialization and region setting were fixed (Super Turrican plays fine), but F-1 Sensation still has problems. It starts to play but as soon as the second song ends, the third one, instead of the actual song plays a part of the second. Also, when on the first song, the player's "Next" button doesn't go to the next song but rather to other parts of the first song.

punesemu commented 4 months ago

Thx @nelsonhef, as soon as I finish implementing the 562 mapper I will dedicate myself to solving this bug. Thank you very much for your reports, they are very detailed and this makes my debugging sessions much easier.

punesemu commented 4 months ago

@nelsonhef can you try the last WIP? With the commit 8bf7379 I fixed 2 bugs, one of which could be the cause of the strange behavior of F-1 Sensation.

nelsonhef commented 4 months ago

Hi @punesemu, i tested with the latest WIP 8bf7379 and unfortunately it didn't solve the issue. But i noticed something. If I disable the playlist, the songs play correctly at least until the end of the track list and then when it loops back to track 1 it starts playing wrong again. Another thing i hadn't noticed before was the track time/remaining time not updating correctly. I made two examples ilustrating the problem with the playlist on and off. Thank you for your efforts to fix these bugs and your kind words.

https://github.com/punesemu/puNES/assets/87081197/480905b2-6ad1-4052-a766-7e0ab23f260e

https://github.com/punesemu/puNES/assets/87081197/3fb80bce-31a5-4248-95a9-0eef162aa380

punesemu commented 4 months ago

Really strange, I can't reproduce the timer problem.

nelsonhef commented 4 months ago

@punesemu, i was able to find the condition that triggers the timers issue. To reproduce it, load the NSFE, hit the Stop or Pause button and then "Turn off/Hard Reset/Soft Reset" the emulator. The timers will stop working.

Update: This timer issue occurs with any file, not just F1-Sensation and occurs even in puNES 0.110.

punesemu commented 4 months ago

Regarding the F-1 Sensation issue, can you try with the new WIP?

punesemu commented 4 months ago

And now I have also fixed the timers problem.

nelsonhef commented 4 months ago

Both issues were fixed in the latest WIP, thank you. Maybe i noticed another minor UI glitch. When you load a NSF file the "Fadeout" checkbox is selected and painted gray but if you Turn Off or Hard Reset the emulator it turns white.

punesemu commented 4 months ago

Thank you for your very thorough test, I will take a look at this issue as well.

punesemu commented 4 months ago

And with 74252de we should be done. :pray:

nelsonhef commented 4 months ago

Fixed. Thank you!