diff --git a/xmas_2018/Makefile b/xmas_2018/Makefile index 85215c41..6ce0c275 100644 --- a/xmas_2018/Makefile +++ b/xmas_2018/Makefile @@ -7,10 +7,10 @@ PNG_TO_RLE = ../gr-utils/png2rle all: xmas2018.dsk -xmas2018.dsk: HELLO XMAS2018 wreath.img.lz4 ball.img.lz4 merry.img.lz4 MUSIC.lz4 +xmas2018.dsk: HELLO XMAS2018 wreath.img.lz4t ball.img.lz4 merry.img.lz4 MUSIC.lz4 $(DOS33) -y xmas2018.dsk SAVE A HELLO $(DOS33) -y xmas2018.dsk BSAVE -a 0x1000 XMAS2018 - $(DOS33) -y xmas2018.dsk BSAVE -a 0xa000 wreath.img.lz4 WREATH.LZ4 + $(DOS33) -y xmas2018.dsk BSAVE -a 0xa000 wreath.img.lz4t WREATH.LZ4 $(DOS33) -y xmas2018.dsk BSAVE -a 0xa000 ball.img.lz4 BALL.LZ4 $(DOS33) -y xmas2018.dsk BSAVE -a 0xa000 merry.img.lz4 MERRY.LZ4 $(DOS33) -y xmas2018.dsk BSAVE -a 0x6000 MUSIC.lz4 MUSIC.LZ4 @@ -57,6 +57,10 @@ merry.img: merry_christmas.png #### +wreath.img.lz4t: wreath.img.lz4 + dd if=wreath.img.lz4 of=wreath.img.lz4t bs=1 skip=11 + truncate wreath.img.lz4t -s -8 + wreath.img.lz4: wreath.img lz4 -f -16 wreath.img diff --git a/xmas_2018/rts.s b/xmas_2018/rts.s index 19c73a43..5c1c31b4 100644 --- a/xmas_2018/rts.s +++ b/xmas_2018/rts.s @@ -4,6 +4,8 @@ ; modified to assembled with ca64 -- vmw ; added code to patch it to run from current disk slot -- vmw +; also stores filesize in ldsizel:ldsizeh + dirbuf = $900 ; note, don't put this immediately below ; the value being read as destaddr-4 @@ -232,12 +234,15 @@ L5: ; increase load size by 4, to account for offst and length lda filbuf+2 + sta ldsizel ; store out raw size + adc #3 sta sizelo sta secsize - sta ldsizel lda filbuf+3 + sta ldsizeh ; store out raw size + adc #0 sta sizehi sta ldsizeh diff --git a/xmas_2018/xmas2018.s b/xmas_2018/xmas2018.s index 5ca05c08..7c53f058 100644 --- a/xmas_2018/xmas2018.s +++ b/xmas_2018/xmas2018.s @@ -48,19 +48,24 @@ apple_iie: ; decompress to $2000 ; decompress from $a000 - ; size in ??? + ; size in ldsizeh:ldsizel (f1/f0) - - lda #<($a000+11) + clc + lda #<($a000) sta LZ4_SRC - lda #>($a000+11) - sta LZ4_SRC+1 - - lda #<($a000+4103-8) ; skip checksum at end + adc ldsizel sta LZ4_END - lda #>($a000+4103-8) ; skip checksum at end + + lda #>($a000) + sta LZ4_SRC+1 + adc ldsizeh sta LZ4_END+1 +; lda #<($a000+4103-8) ; skip checksum at end +; sta LZ4_END +; lda #>($a000+4103-8) ; skip checksum at end +; sta LZ4_END+1 + lda #<$2000 sta LZ4_DST lda #>$2000