aboutsummaryrefslogtreecommitdiff
path: root/config
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
parent5ffacabaca37bfae01c07624d1e74efb7bd0680c (diff)
downloadfujinet-chat-443d77468cd97d65d2af5ebd52afca62ea44df85.tar.gz
Tweak the config, add doc/dynamic-screens.txtHEADmaster
Diffstat (limited to 'config')
-rw-r--r--config/Makefile10
-rw-r--r--config/config.c22
2 files changed, 24 insertions, 8 deletions
diff --git a/config/Makefile b/config/Makefile
index 6518ea7..15567e9 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -3,11 +3,7 @@ all: config.xex
#config.xex: config.c exetrailer.s ../src/config.h ../src/config.c
config.xex:
- cl65 -DVERSION='"$(VERSION)"' -Oris -t atari -C ../src/atari.cfg -o config.xex config.c ../src/exehdr.s exetrailer.s ../src/config.c
+ cl65 -DVERSION='"$(VERSION)"' -m config.map -Oris -t atari -C ../src/atari.cfg -o config.xex config.c os2ram.c ../src/exehdr.s exetrailer.s ../src/config.c
-test:
- cl65 -Oris -t atari -C ../src/atari.cfg -o config.xex config.c exetrailer.s ../src/config.c
- cl65 -Oris -t atari -C ../src/atari.cfg -o conftest.xex conftest.c
- cat config.xex conftest.xex > autorun.sys
- cp dos25_sd.atr test.atr
- axe -w autorun.sys test.atr
+clean:
+ rm -f config.xex
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");