aboutsummaryrefslogtreecommitdiff
path: root/config/config.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-27 22:58:45 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-27 22:58:45 -0400
commit443d77468cd97d65d2af5ebd52afca62ea44df85 (patch)
treed005a852db81b0ab8860f227b4a8036cfd3eed3f /config/config.c
parent5ffacabaca37bfae01c07624d1e74efb7bd0680c (diff)
downloadfujinet-chat-443d77468cd97d65d2af5ebd52afca62ea44df85.tar.gz
Tweak the config, add doc/dynamic-screens.txtHEADmaster
Diffstat (limited to 'config/config.c')
-rw-r--r--config/config.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/config/config.c b/config/config.c
index bd9c1a6..9c97d43 100644
--- a/config/config.c
+++ b/config/config.c
@@ -10,6 +10,7 @@
#include <peekpoke.h>
#include "../src/config.h"
+#include "os2ram.h"
#ifndef VERSION
#define VERSION "?????"
@@ -44,8 +45,9 @@ char buf[128];
char numbuf[4];
char server[101];
char port[6];
+char use_xl_ram = 1;
-unsigned int *bonus_addrs = 0xf0;
+unsigned int *bonus_addrs = (unsigned int *)0xd4; /* aka FR0 */
char lcgetc(void) {
char c;
@@ -81,6 +83,19 @@ void detect_dos(void) {
if(h || d) have_dos = 1;
}
+void detect_xl(void) {
+ if(!is_xl()) {
+ print("400/800 detected, no extra RAM\n");
+ use_xl_ram = 0;
+ return;
+ }
+
+ yn("XL/XE detected, use extra RAM", use_xl_ram);
+ if(!use_xl_ram) return;
+
+ os_to_ram();
+}
+
void print(const char *text) {
fputs(text, stdout);
}
@@ -536,6 +551,9 @@ void main(void) {
/* loading1.xex left the original DL address at $fe */
if(PEEKW(0xfe)) POKEW(0x0230, PEEKW(0xfe));
+ /* clear the bonus screen addresses in case something left junk there */
+ memset(bonus_addrs, 0, 14);
+
set_default_config();
OS.color2 = conf->colors[0];
@@ -546,6 +564,8 @@ void main(void) {
print("Version " VERSION "\n\n");
detect_dos();
+ detect_xl();
+
if(!load(0))
print("Using built-in default config.\n");