The Cricket!: Reset Cricket before probing

Finds the Cricket every single time this way. Occasionally the driver would miss finding it due to it being in a wait state. Sending a reset first fixes that.
This commit is contained in:
frankmilliron 2023-07-17 07:30:44 -07:00 committed by GitHub
parent 5295338d36
commit d20b3dd72c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -82,6 +82,13 @@ init_ssc:
lda CONTROL
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
@ -114,11 +121,6 @@ digit: cmp #HI('0') ; < '0' ?
bcc :-
cricket_found:
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
plp
jmp install_driver