From d906748691d31dc8ec1dfd95d1314bec11a149a1 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Thu, 18 Jan 2024 17:37:09 +0100 Subject: [PATCH 1/6] Fix uploader implementation to reset IRQ bit for timer 4 (serial) interrupt --- libsrc/lynx/uploader.s | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsrc/lynx/uploader.s b/libsrc/lynx/uploader.s index f16a1721a..df3e5df40 100644 --- a/libsrc/lynx/uploader.s +++ b/libsrc/lynx/uploader.s @@ -33,7 +33,7 @@ loop1: cont1: jsr read_byte sta (load_ptr2),y - sta PALETTE ; feedback ;-) + sta PALETTE + 1 ; feedback ;-) iny bne loop1 inc load_ptr2+1 @@ -69,6 +69,8 @@ again: ; last action : clear interrupt ; exit: + lda #$10 + sta INTRST clc rts From 93f9cb6e489e248a2f92c0b103d330b9e78ee220 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Thu, 18 Jan 2024 18:06:10 +0100 Subject: [PATCH 2/6] Adjusted uploader configuration. Split into two MEMORY areas, so it can be just below video memory. --- cfg/lynx-uploader.cfg | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cfg/lynx-uploader.cfg b/cfg/lynx-uploader.cfg index 476b3c5de..ea217626c 100644 --- a/cfg/lynx-uploader.cfg +++ b/cfg/lynx-uploader.cfg @@ -5,16 +5,17 @@ SYMBOLS { __BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size __EXEHDR__: type = import; __BOOTLDR__: type = import; - __DEFDIR__: type = import; __UPLOADER__: type = import; + __UPLOADERSIZE__: type = export, value = $61; + __HEADERSIZE__: type = export, value = 64; } MEMORY { ZP: file = "", define = yes, start = $0000, size = $0100; - HEADER: file = %O, start = $0000, size = $0040; + HEADER: file = %O, start = $0000, size = __HEADERSIZE__; BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; - DIR: file = %O, start = $0000, size = 8; - MAIN: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__; - UPLDR: file = %O, define = yes, start = $BFDC, size = $005C; + DIR: file = %O, start = $0000, size = 16; + MAIN: file = %O, define = yes, start = $0200, size = $C038 - __UPLOADERSIZE__ - $200 - __STACKSIZE__; + UPLOAD: file = %O, define = yes, start = $C038 - __UPLOADERSIZE__, size = $0061; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -30,8 +31,8 @@ SEGMENTS { RODATA: load = MAIN, type = ro, define = yes; DATA: load = MAIN, type = rw, define = yes; BSS: load = MAIN, type = bss, define = yes; - UPCODE: load = UPLDR, type = ro, define = yes; - UPDATA: load = UPLDR, type = rw, define = yes; + UPCODE: load = UPLOAD, type = ro, define = yes; + UPDATA: load = UPLOAD, type = rw, define = yes; } FEATURES { CONDES: type = constructor, From acce24fedcfa4d37dc5a28bf18129b68cb2194f9 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Thu, 18 Jan 2024 18:13:02 +0100 Subject: [PATCH 3/6] Switched to __BANK0BLOCKSIZE__ instead of __BLOCKSIZE__ to make current lynx config files work --- libsrc/lynx/lynx-cart.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/lynx/lynx-cart.s b/libsrc/lynx/lynx-cart.s index 94edff677..f9417aed3 100644 --- a/libsrc/lynx/lynx-cart.s +++ b/libsrc/lynx/lynx-cart.s @@ -88,7 +88,7 @@ lynxblock: lda __iodat sta IODAT stz _FileBlockByte - lda #<($100-(>__BLOCKSIZE__)) + lda #<($100-(>__BANK0BLOCKSIZE__)) sta _FileBlockByte+1 ply plx From 2e56dcc52196a8fdd65416adcc46c7e834db4615 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Thu, 18 Jan 2024 18:13:39 +0100 Subject: [PATCH 4/6] Fix for mising import --- libsrc/lynx/lynx-cart.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/lynx/lynx-cart.s b/libsrc/lynx/lynx-cart.s index f9417aed3..d1f3e33eb 100644 --- a/libsrc/lynx/lynx-cart.s +++ b/libsrc/lynx/lynx-cart.s @@ -17,7 +17,7 @@ .include "extzp.inc" .export lynxskip0, lynxread0 .export lynxblock - .import __BLOCKSIZE__ + .import __BANK0BLOCKSIZE__ .code From ad90a3a421776d9c13756de5e5cdb53fa7b5a469 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Thu, 18 Jan 2024 18:57:57 +0000 Subject: [PATCH 5/6] Replaced references to __BLOCKSIZE__ with __BANK0BLOCKSIZE__ --- libsrc/lynx/lseek.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsrc/lynx/lseek.s b/libsrc/lynx/lseek.s index 4b4f94d7c..04d816945 100644 --- a/libsrc/lynx/lseek.s +++ b/libsrc/lynx/lseek.s @@ -18,7 +18,7 @@ .import ldeaxysp, decsp2, pushax, incsp8 .import tosandeax,decax1,tosdiveax,axlong,ldaxysp .import lynxskip0, lynxblock,tosasreax - .import __BLOCKSIZE__ + .import __BANK0BLOCKSIZE__ .importzp _FileCurrBlock .segment "CODE" @@ -32,15 +32,15 @@ jsr ldeaxysp jsr pusheax ldx #$00 - lda #<(__BLOCKSIZE__/1024 + 9) + lda #<(__BANK0BLOCKSIZE__/1024 + 9) jsr tosasreax sta _FileCurrBlock jsr lynxblock ldy #$05 jsr ldeaxysp jsr pusheax - lda #<(__BLOCKSIZE__-1) - ldx #>(__BLOCKSIZE__-1) + lda #<(__BANK0BLOCKSIZE__-1) + ldx #>(__BANK0BLOCKSIZE__-1) jsr axlong jsr tosandeax eor #$FF From 83691f30c1442aacb769d9eb3841802d2817beb8 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Fri, 19 Jan 2024 10:52:42 +0000 Subject: [PATCH 6/6] Missed a tab in config --- cfg/lynx-uploader.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/lynx-uploader.cfg b/cfg/lynx-uploader.cfg index ea217626c..62269de90 100644 --- a/cfg/lynx-uploader.cfg +++ b/cfg/lynx-uploader.cfg @@ -15,7 +15,7 @@ MEMORY { BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; DIR: file = %O, start = $0000, size = 16; MAIN: file = %O, define = yes, start = $0200, size = $C038 - __UPLOADERSIZE__ - $200 - __STACKSIZE__; - UPLOAD: file = %O, define = yes, start = $C038 - __UPLOADERSIZE__, size = $0061; + UPLOAD: file = %O, define = yes, start = $C038 - __UPLOADERSIZE__, size = $0061; } SEGMENTS { ZEROPAGE: load = ZP, type = zp;