From 18a73004c488d977085adacefa568bf593ea5861 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sat, 14 Oct 2023 19:40:09 -0700 Subject: [PATCH] The Cricket!: Fix SSC reset for Laser 128EX The change in b182a53d made resetting/detecting The Cricket! fail on my Laser 128EX, likely due to startup config of the SSC not being the same as on an Apple //c. This should be a superset of the change, but compat testing will be needed. --- clocks/cricket/cricket.system.s | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/clocks/cricket/cricket.system.s b/clocks/cricket/cricket.system.s index 491487d..40f7423 100644 --- a/clocks/cricket/cricket.system.s +++ b/clocks/cricket/cricket.system.s @@ -83,17 +83,8 @@ init_ssc: sta saved_control ;; Reset the Cricket (stops any playing notes & ensures Cricket is listening) - jsr restore_cmd_ctl ; have to change registers for this to work jsr reset_cricket - jsr restore_cmd_ctl jsr reset_cricket ; does it twice in original Cricket driver - jsr restore_cmd_ctl - - ;; Configure SSC - lda #%00001011 ; no parity/echo/interrupts, RTS low, DTR low - sta COMMAND - lda #%10011110 ; 9600 baud, 8 data bits, 2 stop bits - sta CONTROL ;; Read Cricket ID code: 00 ($00) lda #0 @@ -144,6 +135,12 @@ not_found: rts reset_cricket: + ;; Reset SSC + lda #0 + sta COMMAND ; hardware reset all Port 2 ACIA registers + sta CONTROL + + ;; Configure SSC lda #%00001011 ; no parity/echo/interrupts, RTS low, DTR low sta COMMAND lda #%10011110 ; 9600 baud, 8 data bits, 2 stop bits