hades-emu / Hades

🔥 A Nintendo Game Boy Advance Emulator
https://hades-emu.org
GNU General Public License v2.0
198 stars 8 forks source link

[AYW] Yu-Gi-Oh! Worldwide Edition - Stairway to the Destined Duel - Broken PSG Sound #70

Closed ITotalJustice closed 5 months ago

ITotalJustice commented 5 months ago

this is from my emulator

https://github.com/hades-emu/Hades/assets/47043333/d08e32d7-e325-4b2d-8a4c-483d941ec834

this is from hades

https://github.com/hades-emu/Hades/assets/47043333/560ee9fa-d7b7-4c3a-94df-8929f124a25b

Arignir commented 5 months ago

Interesting, thank you very much!

Arignir commented 5 months ago

Should be fixed with 371c5dbaaf2592a53d502713aef5431d01f4f8bd.

Can you confirm everything is good on your end?

ITotalJustice commented 5 months ago

Can't test it just yet, but looking at https://github.com/hades-emu/Hades/commit/371c5dbaaf2592a53d502713aef5431d01f4f8bd#diff-b543aa299b1476676332774bac0ab8473d9fb1a7e638dbd45bf69bf576831510R488 doesn't look correct. Writes to Freq do not effect the shadow frequency. They do effect the current frequency, but that value is overwritten as soon as the sweep is clocked

ITotalJustice commented 5 months ago

https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware#Frequency_Sweep

Square 1's frequency can be modified via NR13 and NR14 while sweep is active, but the shadow frequency won't be affected so the next time the sweep updates the channel's frequency this modification will be lost.

Arignir commented 5 months ago

Oh! I missed that quote when re-reading the article earlier 😅 I'm fixing this rn, thank you very much!

EDIT: Fixed with https://github.com/hades-emu/Hades/commit/03d2d7037e63c3b49569c7c45a9beaea57d69fc4.

Arignir commented 5 months ago

I'm closing this since I believe the issue to be solved. Feel free to re-open it if it's not the case~