Skip to content

Commit

Permalink
The Cricket!: Fix SSC reset for Laser 128EX
Browse files Browse the repository at this point in the history
The change in b182a53 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.
  • Loading branch information
inexorabletash committed Oct 15, 2023
1 parent ed2fa6e commit 18a7300
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions clocks/cricket/cricket.system.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 18a7300

Please sign in to comment.