aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/keyclick.s16
-rw-r--r--src/main.c10
2 files changed, 13 insertions, 13 deletions
diff --git a/src/keyclick.s b/src/keyclick.s
index bbe613c..3b4a591 100644
--- a/src/keyclick.s
+++ b/src/keyclick.s
@@ -1,5 +1,6 @@
.include "atari.inc"
.export _keyclick
+ .import _cgetc
; keyclick.s - just what you think it is.
@@ -9,16 +10,11 @@
;.ifdef REAL_KEYCLICK
.if 1
-; Copied from OS ROM source, 12 bytes of code. Because of the repeated
-; stx WSYNC, you don't want to use this if you're using DLIs.
-; Preserves A and Y, returns with X=$ff, N set, Z clear.
-_keyclick:
- ldx #$7f
-@rc1:
- stx CONSOL
- stx WSYNC
- dex
- bpl @rc1
+ ; used to my own STA WSYNC loop, but that didn't respect NOCLIK on
+ ; XL/XE machines.
+ lda #0
+ sta CH
+ jsr _cgetc
rts
.else
diff --git a/src/main.c b/src/main.c
index b62b456..ed310b6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -15,6 +15,7 @@
#include "screen.h"
#include "edbox.h"
#include "config.h"
+#include "keyclick.h"
unsigned char err; // error code of last operation.
unsigned char trip = 0; // if trip == 1, fujinet is asking us for attention.
@@ -129,7 +130,7 @@ void init_channels(void) {
}
}
-void reconnect_wait(void) {
+void reconnect(void) {
scr_display(SCR_SERVER);
scr_print_current("Press a key");
@@ -150,7 +151,10 @@ void reconnect_wait(void) {
while(OS.cdtmf3 == 0xff && OS.ch == 0xff)
/* NOP */;
- OS.ch = 0xff;
+ if(OS.ch != 0xff) {
+ keyclick();
+ OS.ch = 0xff;
+ }
}
void main(void) {
@@ -174,6 +178,6 @@ void main(void) {
irc_loop();
}
fn_disconnect();
- reconnect_wait();
+ reconnect();
}
}