From a17902373dc3fd2f06f0796ed2621109cb4acdd3 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 6 Apr 2026 06:08:45 -0400 Subject: Precalculate timer intervals (in config segment; client gets them preset). 6780 bytes free. --- src/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ebce0bb..318654d 100644 --- a/src/main.c +++ b/src/main.c @@ -17,6 +17,7 @@ #include "config.h" #include "kgetc.h" #include "indic8.h" +#include "timers.h" unsigned char err; // error code of last operation. unsigned char trip = 0; // if trip == 1, fujinet is asking us for attention. @@ -24,7 +25,6 @@ char old_enabled = 0; // were interrupts enabled for old vector void *old_vprced; // old PROCEED vector, restored on exit. unsigned int rxbuflen; // RX buffer length unsigned int txbuflen; // TX buffer length -char hz; /* 50 for PAL, 60 for NSTC */ char reconnect_timeout = 1; extern void ih(); // defined in intr.s @@ -150,7 +150,7 @@ void reconnect(void) { OS.cdtmf3 = OS.ch = 0xff; if(reconnect_timeout) { - OS.cdtmv3 = reconnect_timeout * hz; + OS.cdtmv3 = reconnect_timeout * timers.hz; scr_print_current(" or wait "); scr_cur_printnum(reconnect_timeout); scr_print_current(" sec"); @@ -175,8 +175,6 @@ void main(void) { OS.color3 = 0x46; /* red for highlight */ OS.noclik = config.disable_keyclick; - hz = (GTIA_READ.pal & 0x0e) ? 60 : 50; - edbox_clear(); scr_init(); init_channels(); -- cgit v1.2.3