diff options
Diffstat (limited to 'config/config.c')
| -rw-r--r-- | config/config.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/config/config.c b/config/config.c index bd9c1a6..8d09e8e 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; @@ -522,6 +524,20 @@ void prompt_server() { } } +void detect_xl(void) { + if(!is_xl()) { + print("400/800 detected, no extra RAM\n"); + use_xl_ram = 0; + return; + } + + use_xl_ram = yn("XL/XE detected, use extra RAM", use_xl_ram); + if(!use_xl_ram) return; + + os_to_ram(); +} + + void set_default_config(void) { memcpy(conf, &defaults, sizeof(conf_t)); } @@ -536,6 +552,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 +565,8 @@ void main(void) { print("Version " VERSION "\n\n"); detect_dos(); + // detect_xl(); // not yet + if(!load(0)) print("Using built-in default config.\n"); |
