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
488 stars 59 forks source link

Sound too late in Custom Mode #83

Closed fsk25 closed 4 years ago

fsk25 commented 4 years ago

Hi,

I made an Custom Configuration for my 4:3 DVI/VGA Monitor:

[C64/NTSC/HDMI/1024x768@60Hz] disable_overscan=1 hdmi_cvt=1024 768 60 1 0 0 0 sdtv_mode=18 hdmi_group=2 hdmi_mode=87 machine_timing=ntsc-custom cycles_per_second=1024303

I made the HDMI Timing Test in the VIDEO Menu and put the cycles per second in the machine.txt file.

Now my Sound comes 1-2 seconds after the picture. I tried different resolutions and cycles_per_second. It seems the System ignore the setting.

Tested on Pi Zero and Pi 3B.

In Information Menu of the Monitor I see the defined resolution and frequency. Frequency match with the result from the HDMI Timing Test.

What's the problem?

randyrossi commented 4 years ago

What version are you running?

On Wed, Nov 13, 2019 at 12:19 PM fsk25 notifications@github.com wrote:

Hi,

I made an Custom Configuration for my 4:3 DVI/VGA Monitor:

[C64/NTSC/HDMI/1024x768@60Hz] disable_overscan=1 hdmi_cvt=1024 768 60 1 0 0 0 sdtv_mode=18 hdmi_group=2 hdmi_mode=87 machine_timing=ntsc-custom cycles_per_second=1024303

I made the HDMI Timing Test in the VIDEO Menu and put the cycles per second in the machine.txt file.

Now my Sound comes 1-2 seconds after the picture. I tried different resolutions and cycles_per_second. It seems the System ignore the setting.

Tested on Pi Zero and Pi 3B.

In Information Menu of the Monitor I see the defined resolution and frequency. Frequency match with the result from the HDMI Timing Test.

What's the problem?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/83?email_source=notifications&email_token=AAI3HKDL3QDBMB6WAMRU6DLQTQZJJA5CNFSM4JM6T7WKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZCTIJQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKFUHKQNYT2TSKDZR63QTQZJJANCNFSM4JM6T7WA .

-- Randy Rossi

C:(+1)416-605-5112 (Canada)

fsk25 commented 4 years ago

bmc64-3.0.img

randyrossi commented 4 years ago

Ah, I've discovered the problem. The machine is actually setting itself to PAL timing incorrectly due to a missing condition in the ntsc timing option check. Oops.

This condition is missing MACHINE_TIMIING_NTSC_CUSTOM check : https://github.com/randyrossi/bmc64/blob/master/viceapp.cpp#L319

Not many people use NTSC I think so this has gone undiscovered till now. Thanks for reporting this. I applied the fix and seems sound is in sync on this custom ntsc mode again.

Next release will have this fixed. In the meantime, just use one of the standard lower res (not custom) for now.

fsk25 commented 4 years ago

My old Monitors don’t support frequencies of 50 frames. So I have to use NTSC with 60 frames.

Thank you for your fast support. I keep my eyes open for the Update!

randyrossi commented 4 years ago

Fixed in 3.1