aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/addrs.c63
-rw-r--r--src/addrs.h6
-rw-r--r--src/atari.cfg21
-rw-r--r--src/exehdr.s4
-rw-r--r--src/page20.s5
-rw-r--r--src/rxtxbuf.h4
-rw-r--r--src/txbuf.s2
7 files changed, 57 insertions, 48 deletions
diff --git a/src/addrs.c b/src/addrs.c
index c7af1f2..fd3c8a4 100644
--- a/src/addrs.c
+++ b/src/addrs.c
@@ -3,57 +3,54 @@
u8 *dlist_top = u8p(DLIST_TOP_ADDR);
u8 *dlist_bot = u8p(DLIST_BOT_ADDR);
-u16 *dlist_top_lms = u16p(0xbfa4);
-u16 *dlist_bot_lms = u16p(0xbfd4);
-u16 *dlist_status_lms = u16p(0xbfee);
-u8 *dlist_last_line = u8p(0xbff0);
+u16 *dlist_top_lms = u16p(0x7fa4);
+u16 *dlist_bot_lms = u16p(0x7fd4);
+u16 *dlist_status_lms = u16p(0x7fee);
+u8 *dlist_last_line = u8p(0x7ff0);
-u8 *edbox_only_dlist = u8p(0x8fb8);
-// u8 *rx_buf = u8p(0xa000); /* 512 bytes */
-// u8 *tx_buf = u8p(0xa200); /* 512 bytes */
+u8 *edbox_only_dlist = u8p(0x4bb8);
/* 1000 bytes (25 40-char lines) apiece. */
u8 *screen_top_addrs[7] = {
- u8p(0x8400),
- u8p(0x87e8),
- u8p(0x8bd0),
- u8p(0x9000),
- u8p(0x93e8),
- u8p(0x97d0),
- u8p(0x9bb8)
+ u8p(0x4000),
+ u8p(0x43e8),
+ u8p(0x47d0),
+ u8p(0x5000),
+ u8p(0x53e8),
+ u8p(0x57d0),
+ u8p(0x5bb8)
};
/* 1000 bytes (25 40-char lines) apiece. */
u8 *screen_bot_addrs[7] = {
- u8p(0xa400),
- u8p(0xa7e8),
- u8p(0xabd0),
- u8p(0xb000),
- u8p(0xb3e8),
- u8p(0xb7d0),
- u8p(0xbbb8)
+ u8p(0x6000),
+ u8p(0x63e8),
+ u8p(0x67d0),
+ u8p(0x7000),
+ u8p(0x73e8),
+ u8p(0x77d0),
+ u8p(0x7bb8)
};
/* 40 bytes (1 line), third from the bottom of each _bot_addr */
u8 *screen_lastlines[7] = {
- u8p(0xa770),
- u8p(0xab58),
- u8p(0xaf40),
- u8p(0xb370),
- u8p(0xb758),
- u8p(0xbb40),
- u8p(0xbf28)
+ u8p(0x6370),
+ u8p(0x6758),
+ u8p(0x6b40),
+ u8p(0x7370),
+ u8p(0x7758),
+ u8p(0x7b40),
+ u8p(0x7f28)
};
/* 60 bytes, 1 GR.0 line and 1 GR.1 line. also 20 more bytes filler.
this is the bottom 2 lines of screen 0.
screens 1-6 actually have 80 bytes of free RAM
- at the bottom (2 unused lines), for now at least. addresses:
- 0xab80 0xaf68 0xb398 0xb780 0xbb68 0xbf50 */
-u8 *status_box = (u8 *)0xa798;
+ at the bottom (2 unused lines), for now at least. */
+u8 *status_box = (u8 *)0x6398;
/* 1 byte, leftmost column of GR.1 line at bottom */
-u8 *ind_net_status = (u8 *)0xa7c0;
+u8 *ind_net_status = (u8 *)0x63c0;
/* 1 byte, 2nd column of GR.1 line at bottom */
-u8 *ind_act_status = (u8 *)0xa7c1;
+u8 *ind_act_status = (u8 *)0x63c1;
diff --git a/src/addrs.h b/src/addrs.h
index 4099765..a7b6755 100644
--- a/src/addrs.h
+++ b/src/addrs.h
@@ -1,6 +1,6 @@
-#define FONT_ADDR_HI 0x80
-#define DLIST_TOP_ADDR 0xbfa0
-#define DLIST_BOT_ADDR 0xbfd0
+#define FONT_ADDR_HI 0x34
+#define DLIST_TOP_ADDR 0x7fa0
+#define DLIST_BOT_ADDR 0x7fd0
#define EDBOX_ADDR 0x0600
#define u8 unsigned char
diff --git a/src/atari.cfg b/src/atari.cfg
index ea3e0eb..4e0859d 100644
--- a/src/atari.cfg
+++ b/src/atari.cfg
@@ -1,9 +1,11 @@
# This is a hacked-up modified config, DO NOT USE for the config segment.
# The ONCE segment and the CONDES stuff are removed (don't need).
# The STARTUP segment now loads to page 6.
+# CODE loads high ($8000) and everything else loads low ($2000), to leave
+# an 8K hole for the banking window at $4000-$7FFF.
FEATURES {
- STARTADDRESS: default = $2000;
+ STARTADDRESS: default = $8000;
}
SYMBOLS {
__EXEHDR__: type = import;
@@ -22,9 +24,13 @@ MEMORY {
P6HDR: file = %O, start = $0000, size = $0004;
PAGE6: file = %O, define = yes, start = $0600, size = $00ff;
+# $2000 for everything but STARTUP and CODE
+ P20HDR: file = %O, start = $0000, size = $0004;
+ PAGE20: file = %O, define = yes, start = $2000, size = $1360;
+
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
- MAIN: file = %O, define = yes, start = %S, size = $8000 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
+ MAIN: file = %O, define = yes, start = %S, size = $4000 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006;
}
SEGMENTS {
@@ -34,12 +40,13 @@ SEGMENTS {
P6HDR: load = P6HDR, type = ro;
STARTUP: load = PAGE6, type = ro, define = yes;
MAINHDR: load = MAINHDR, type = ro;
- LOWBSS: load = MAIN, type = rw, optional = yes; # not zero initialized
- LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
+ P20HDR: load = P20HDR, type = ro;
+ LOWBSS: load = PAGE20, type = rw, optional = yes; # not zero initialized
+ RODATA: load = PAGE20, type = ro;
+ DATA: load = PAGE20, type = rw;
+ LOWCODE: load = PAGE20, type = ro, define = yes, optional = yes;
+ BSS: load = PAGE20, type = bss, define = yes;
CODE: load = MAIN, type = ro, define = yes;
- RODATA: load = MAIN, type = ro;
- DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
- BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}
diff --git a/src/exehdr.s b/src/exehdr.s
index 7abb7c1..941e286 100644
--- a/src/exehdr.s
+++ b/src/exehdr.s
@@ -1,11 +1,11 @@
; This file defines the EXE header and main chunk load header for Atari executables
.export __EXEHDR__: absolute = 1
- .import __MAIN_START__, __BSS_LOAD__
+ .import __MAIN_START__, __CODE_SIZE__
.segment "EXEHDR"
.word $FFFF
.segment "MAINHDR"
.word __MAIN_START__
- .word __BSS_LOAD__ - 1
+ .word __MAIN_START__ + __CODE_SIZE__ - 1
diff --git a/src/page20.s b/src/page20.s
new file mode 100644
index 0000000..75fda20
--- /dev/null
+++ b/src/page20.s
@@ -0,0 +1,5 @@
+
+ .import __BSS_LOAD__
+ .segment "P20HDR"
+ .word $2000
+ .word __BSS_LOAD__ - 1
diff --git a/src/rxtxbuf.h b/src/rxtxbuf.h
index 888092a..622f0a0 100644
--- a/src/rxtxbuf.h
+++ b/src/rxtxbuf.h
@@ -1,5 +1,5 @@
typedef char buf512_t[512];
-#define RXBUF_ADDR 0xa000
-#define TXBUF_ADDR 0xa200
+#define RXBUF_ADDR 0x3800
+#define TXBUF_ADDR 0x3a00
#define rx_buf (*(buf512_t *)RXBUF_ADDR)
#define tx_buf (*(buf512_t *)TXBUF_ADDR)
diff --git a/src/txbuf.s b/src/txbuf.s
index 6f7b55d..beb4fef 100644
--- a/src/txbuf.s
+++ b/src/txbuf.s
@@ -4,7 +4,7 @@
; compiles to 45 bytes. routine below is 29 bytes (~33% smaller)
- tx_buf = $a200 ; MUST agree with src/rxtxbuf.h!
+ tx_buf = $3a00 ; MUST agree with src/rxtxbuf.h!
.import _txbuflen, _txbuf_send
.export _txbuf_append_chr, _txbuf_append_str