use other shift mode instead of generating clk pulse

This commit is contained in:
matthias@arch 2024-01-09 02:28:54 +01:00
parent 326b2f6247
commit e61871ed0f

View File

@ -293,18 +293,20 @@ scancode_handler: .res 2 ; pointer to a function that handles new scancod
_DisableClock _DisableClock
; set shift register to output ; set shift register to output
; shift out the startbit = data low
; set SR to shift out with PHI2 and shift out zeros
lda ps2kb::VIA + IO::ACR lda ps2kb::VIA + IO::ACR
and #<~IO::ACR_MASK::SR and #<~IO::ACR_MASK::SR
ora #IO::ACR::SR_SOUT_PHIE ora #IO::ACR::SR_SOUT_PHI2
sta ps2kb::VIA + IO::ACR sta ps2kb::VIA + IO::ACR
stz ps2kb::VIA + IO::SR stz ps2kb::VIA + IO::SR
; shift out the startbit = data low
_EnableClock
_DisableClock
; reset shift register to start the count at 0 again ; reset shift register to start the count at 0 again
lda #IO::ACR::SR_SOUT_PHIE and #<~IO::ACR_MASK::SR
trb ps2kb::VIA + IO::ACR sta ps2kb::VIA + IO::ACR
tsb ps2kb::VIA + IO::ACR ; set SR to shift out with external clock
ora #IO::ACR::SR_SOUT_PHIE
sta ps2kb::VIA + IO::ACR
; setup the low timer byte ; setup the low timer byte
lda #<ps2kb::TIMER_SEND lda #<ps2kb::TIMER_SEND