aboutsummaryrefslogtreecommitdiff
path: root/config/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config/config.c')
-rw-r--r--config/config.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/config/config.c b/config/config.c
index ae3b110..0fb2fab 100644
--- a/config/config.c
+++ b/config/config.c
@@ -10,6 +10,7 @@
#include <peekpoke.h>
#include "../src/config.h"
+#include "../src/timers.h"
#include "os2ram.h"
#ifndef VERSION
@@ -51,11 +52,19 @@ char use_xl_ram = 1;
unsigned int *bonus_addrs = (unsigned int *)0xd4; /* aka FR0 */
+void setup_timers_and_exit(void) {
+ timers.hz = (GTIA_READ.pal & 0x0e) ? 60 : 50;
+ timers.one_tenth_sec = timers.hz / 10;
+ timers.one_sec = timers.hz * 60;
+ timers.net_ind_time = (timers.hz / 10) * 37;
+ exit(0);
+}
+
char lcgetc(void) {
char c;
c = cgetc();
- if(c == 0x03) exit(0);
+ if(c == 0x03) setup_timers_and_exit();
return c;
}
@@ -619,4 +628,6 @@ void main(void) {
Clearing the screen here band-aids it: a byte of the client's screen
memory is getting zeroed out, but it's a byte that was already zero... */
print("\x7d");
+
+ setup_timers_and_exit();
}