From e786d1cf4911e3c82fcf2687f5798145f2334b17 Mon Sep 17 00:00:00 2001 From: alexthissen Date: Sat, 27 Aug 2016 21:58:13 +0200 Subject: [PATCH 1/3] Update exehdr.s Fix for memory bank 1 which should be zero for almost all cartridges for emulators to work correctly. --- libsrc/lynx/exehdr.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/lynx/exehdr.s b/libsrc/lynx/exehdr.s index 4f077fb82..3be926bb3 100644 --- a/libsrc/lynx/exehdr.s +++ b/libsrc/lynx/exehdr.s @@ -12,7 +12,7 @@ .segment "EXEHDR" .byte 'L','Y','N','X' ; magic .word __BLOCKSIZE__ ; bank 0 page size - .word __BLOCKSIZE__ ; bank 1 page size + .word 0 ; bank 1 page size .word 1 ; version number .asciiz "Cart name " ; 32 bytes cart name .asciiz "Manufacturer " ; 16 bytes manufacturer From ef7e9db1165b6c46ddc3eb9c4f7caf0b4c0ead28 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Sun, 11 Sep 2016 22:26:52 +0200 Subject: [PATCH 2/3] 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 Date: Tue, 13 Sep 2016 22:02:37 +0200 Subject: [PATCH 3/3] Fixed last linefeed and notation convention errors. --- cfg/lynx-bll.cfg | 4 ++-- cfg/lynx-coll.cfg | 4 ++-- cfg/lynx-uploader.cfg | 4 ++-- cfg/lynx.cfg | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cfg/lynx-bll.cfg b/cfg/lynx-bll.cfg index fbf64e8e9..adf1e7ab6 100644 --- a/cfg/lynx-bll.cfg +++ b/cfg/lynx-bll.cfg @@ -1,8 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BANK0BLOCKSIZE__: type = weak, value = 1024; # bank 0 cart block size - __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size + __BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size __BLLHDR__: type = import; } MEMORY { diff --git a/cfg/lynx-coll.cfg b/cfg/lynx-coll.cfg index 2be172196..7c71993f8 100644 --- a/cfg/lynx-coll.cfg +++ b/cfg/lynx-coll.cfg @@ -1,8 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BANK0BLOCKSIZE__: type = weak, value = 1024; # bank 0 cart block size - __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size + __BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = $0000; # 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 ba3c13dcf..476b3c5de 100644 --- a/cfg/lynx-uploader.cfg +++ b/cfg/lynx-uploader.cfg @@ -1,8 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BANK0BLOCKSIZE__: type = weak, value = 1024; # bank 0 cart block size - __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size + __BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size __EXEHDR__: type = import; __BOOTLDR__: type = import; __DEFDIR__: type = import; diff --git a/cfg/lynx.cfg b/cfg/lynx.cfg index adcf67a98..5c42654d7 100644 --- a/cfg/lynx.cfg +++ b/cfg/lynx.cfg @@ -1,8 +1,8 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BANK0BLOCKSIZE__: type = weak, value = 512; # bank 0 cart block size - __BANK1BLOCKSIZE__: type = weak, value = 0; # bank 1 block size + __BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size + __BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size __EXEHDR__: type = import; __BOOTLDR__: type = import; __DEFDIR__: type = import; @@ -43,4 +43,4 @@ FEATURES { count = __INTERRUPTOR_COUNT__, segment = RODATA, import = __CALLIRQ__; -} \ No newline at end of file +}