randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
479 stars 56 forks source link

Corrupted sound for Dual SID via analog output #162

Open LukaszKaluzny opened 3 years ago

LukaszKaluzny commented 3 years ago

After enabling second SID sound is totally corrupted even after selecting correct address of 2nd SID or 0xd400 for pseudo stereo effect.

After further investigation it seems that when sound is played via HDMI then Dual Sid works correctly. But when I'm using analog output, then after switching to Dual Sid sound is corrupted, despite that I'm using the same address config, which works correctly via HDMI - for example 0xd420 (which is the same set in game) or 0xd400 for pseudo stereo effect.

The same issue is present on both PAL and NTSC C64 profile.

Issue noticed in BMC64 3.6 on Raspberry Pi 3a+ (unfortunately I don't have any other to recheck except Pi Zero).

I've attached short video file for reference.

https://user-images.githubusercontent.com/26844869/108602580-efccba80-73a2-11eb-81e6-e83b7f8fb697.mp4

randyrossi commented 3 years ago

It looks like this is some sort of issue with switching from either single to dual or from dual to single when using composite. But there's a workaround. If you save your settings (with dual sid set) and reboot, then the sound corruption doesn't happen. But then if you try to switch back to single, you get the corruption again.

I'm not sure why this only happens on composite though. I'll try to find out but in the meantime, you'll have to save the settings and reboot to get a clean initialization. Let me know if that works for you.

LukaszKaluzny commented 3 years ago

Hi Randy, Thanks for response and for advice. I will check it when I will be in home and let you know.

Best Regards, Lukasz

niedz., 21.02.2021, 23:11 użytkownik randyrossi notifications@github.com napisał:

It looks like this is some sort of issue with switching from either single to dual or from dual to single when using composite. But there's a workaround. If you save your settings (with dual sid set) and reboot, then the sound corruption doesn't happen. But then if you try to switch back to single, you get the corruption again.

I'm not sure why this only happens on composite though. I'll try to find out but in the meantime, you'll have to save the settings and reboot to get a clean initialization. Let me know if that works for you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/162#issuecomment-782936572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMZ5RLGSZ5S3KUWET6OWOLTAGAJXANCNFSM4X6A7LIA .

LukaszKaluzny commented 3 years ago

Hi Randy, Thanks for advice. Your workaround works exactly as you described. And yes

Best Regards, Lukasz

pon., 22.02.2021, 07:41 użytkownik Łukasz Kałużny veiner87@gmail.com napisał:

Hi Randy, Thanks for response and for advice. I will check it when I will be in home and let you know.

Best Regards, Lukasz

niedz., 21.02.2021, 23:11 użytkownik randyrossi notifications@github.com napisał:

It looks like this is some sort of issue with switching from either single to dual or from dual to single when using composite. But there's a workaround. If you save your settings (with dual sid set) and reboot, then the sound corruption doesn't happen. But then if you try to switch back to single, you get the corruption again.

I'm not sure why this only happens on composite though. I'll try to find out but in the meantime, you'll have to save the settings and reboot to get a clean initialization. Let me know if that works for you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/162#issuecomment-782936572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMZ5RLGSZ5S3KUWET6OWOLTAGAJXANCNFSM4X6A7LIA .