From ef7e9db1165b6c46ddc3eb9c4f7caf0b4c0ead28 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Sun, 11 Sep 2016 22:26:52 +0200 Subject: [PATCH] Changed __BLOCKSIZE__ to __BANK0BLOCKSIZE__. Added __BANK1BLOCKSIZE__ which defaults to 0. --- cfg/lynx-bll.cfg | 3 ++- cfg/lynx-coll.cfg | 3 ++- cfg/lynx-uploader.cfg | 3 ++- cfg/lynx.cfg | 5 +++-- libsrc/lynx/bootldr.s | 4 ++-- libsrc/lynx/defdir.s | 8 ++++---- libsrc/lynx/exehdr.s | 7 ++++--- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cfg/lynx-bll.cfg b/cfg/lynx-bll.cfg index a1687b423..fbf64e8e9 100644 --- a/cfg/lynx-bll.cfg +++ b/cfg/lynx-bll.cfg @@ -1,7 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = $0400; # cart block size + __BANK0BLOCKSIZE__: type = weak, value = 1024; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size __BLLHDR__: type = import; } MEMORY { diff --git a/cfg/lynx-coll.cfg b/cfg/lynx-coll.cfg index 9467c3c92..2be172196 100644 --- a/cfg/lynx-coll.cfg +++ b/cfg/lynx-coll.cfg @@ -1,7 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = $0400; # cart block size + __BANK0BLOCKSIZE__: type = weak, value = 1024; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size __EXEHDR__: type = import; __BOOTLDR__: type = import; __DEFDIR__: type = import; diff --git a/cfg/lynx-uploader.cfg b/cfg/lynx-uploader.cfg index c32e3583f..ba3c13dcf 100644 --- a/cfg/lynx-uploader.cfg +++ b/cfg/lynx-uploader.cfg @@ -1,7 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = $0400; # cart block size + __BANK0BLOCKSIZE__: type = weak, value = 1024; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size __EXEHDR__: type = import; __BOOTLDR__: type = import; __DEFDIR__: type = import; diff --git a/cfg/lynx.cfg b/cfg/lynx.cfg index 5140b342f..adcf67a98 100644 --- a/cfg/lynx.cfg +++ b/cfg/lynx.cfg @@ -1,7 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = 1024; # cart block size + __BANK0BLOCKSIZE__: type = weak, value = 512; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size __EXEHDR__: type = import; __BOOTLDR__: type = import; __DEFDIR__: type = import; @@ -42,4 +43,4 @@ FEATURES { count = __INTERRUPTOR_COUNT__, segment = RODATA, import = __CALLIRQ__; -} +} \ No newline at end of file diff --git a/libsrc/lynx/bootldr.s b/libsrc/lynx/bootldr.s index a62d6155c..64569e6ee 100644 --- a/libsrc/lynx/bootldr.s +++ b/libsrc/lynx/bootldr.s @@ -5,7 +5,7 @@ ; .include "lynx.inc" .include "extzp.inc" - .import __BLOCKSIZE__ + .import __BANK0BLOCKSIZE__ .export __BOOTLDR__: absolute = 1 @@ -167,7 +167,7 @@ seclynxblock: lda __iodat sta IODAT stz _FileBlockByte - lda #<($100-(>__BLOCKSIZE__)) + lda #<($100-(>__BANK0BLOCKSIZE__)) sta _FileBlockByte+1 ply plx diff --git a/libsrc/lynx/defdir.s b/libsrc/lynx/defdir.s index 2930edf4b..c0fe19f4d 100644 --- a/libsrc/lynx/defdir.s +++ b/libsrc/lynx/defdir.s @@ -8,7 +8,7 @@ .import __MAIN_START__ .import __CODE_SIZE__, __DATA_SIZE__, __RODATA_SIZE__ .import __STARTUP_SIZE__, __ONCE_SIZE__, __LOWCODE_SIZE__ - .import __BLOCKSIZE__ + .import __BANK0BLOCKSIZE__ .export __DEFDIR__: absolute = 1 @@ -18,12 +18,12 @@ __DIRECTORY_START__: off0 = __STARTOFDIRECTORY__ + (__DIRECTORY_END__ - __DIRECTORY_START__) -blocka = off0 / __BLOCKSIZE__ +blocka = off0 / __BANK0BLOCKSIZE__ ; Entry 0 - first executable -block0 = off0 / __BLOCKSIZE__ +block0 = off0 / __BANK0BLOCKSIZE__ len0 = __STARTUP_SIZE__ + __ONCE_SIZE__ + __CODE_SIZE__ + __DATA_SIZE__ + __RODATA_SIZE__ + __LOWCODE_SIZE__ .byte