Re: Why does POKE 56334,128 stop the cursor blinking in a PAL C64?

From: imruon_at_gmail.com
Date: Wed, 29 Jun 2022 23:36:43 +0300
Message-Id: <3EA39925-6F33-4C5C-B6FA-CAC66124D127_at_gmail.com>
You’re stopping the Timer A resetting the least significant bit I guess,

Nejat

> tokafondo_at_tokafondo.name şunları yazdı (29 Haz 2022 23:25):
> 
> I read the "Initializing TOD clock on all platforms" article in CIA section of codebase64, and tried the routines there to set the right value to the TOD clock in relation to the mains AC frequency.
> 
> In the last part of the routine, there is this code
> 
> [...]
>    cpy    #28        ;Did 114688 cycles or less go by?
>    bcc    :+        ;- Then we already have correct 60Hz $dc0e value
>    lda    #$80        ;Otherwise, we need to set it to 50Hz
>    sta    $dc0e
> [...]
> 
> So it could be said that with no more setup, the C64 can be booted and a POKE 56334,128 could be used to set the value to the 50Hz, couldn't it?
> 
> The problem is that once that value is set, the cursor stops blinking and the keyboard stops being scanned. The computer doesn't crash or freezes because if an emulator is used, the $DC0E can be set back to $01 and everything continues working with no reset needed.
> 
> WHy does it happen? Are the kernal routines hardcoded to a value that matches the 60Hz TOD clock, even in PAL machines with 50Hz clock?
> 
Received on 2022-06-29 23:00:51

Archive generated by hypermail 2.3.0.