PuCrunch not working as intended
Closed this issue · 4 comments
I've compiled all the tools required to make the build and when make runs:
pucrunch -f -c64 -x0x5000 build/bsw/kernal_combined.prg build/bsw/kernal_compressed.prg 2> /dev/null
it fails with the output:
make: *** [Makefile:330: build/bsw/kernal_compressed.prg] Error 1
running the command:
pucrunch -f -c64 -x0x5000 build/bsw/kernal_combined.prg build/bsw/kernal_compressed.prg 2
gives the following error:
Only two filenames wanted!
and running the command:
pucrunch -f -c64 -x0x5000 build/bsw/kernal_combined.prg build/bsw/kernal_compressed.prg
gives the following error:
Only programs from 0x0258 to 0xffff can be compressed (the input file is from 0x785c to 0x1285b)
Any ideas on how to fix it?
Thanks.
0x1285b-0x785c=45055 so the length is ok, but the offset is strange.
Please compare
> pucrunch -f -c64 -x0x5000 build/bsw/kernal_combined.prg build/bsw/kernal_compressed.prg
Load address 0x5000=20480, Last byte 0xfff9=65529
Exec address 0x5000=20480
New load address 0x0801=2049
Interrupts enabled and memory config set to $37 after decompression
Runnable on Commodore 64
Checked: 45050
Selecting the number of escape bits.. Selected 2-bit escapes
Optimizing LZ77 and RLE lengths...
Selecting LZPOS LO length.. Selected 8-bit LZPOS LO part
In: 45050, out: 16194, ratio: 35.95% (2.88[2.83] b/B), gained: 64.06%
Gained RLE: 24566 (S+L:375+24191), LZ: 5039, Esc: -421, Decompressor: -326
Times RLE: 133 (130+3), LZ: 3271, Esc: 674 (normal: 9068), 2 escape bits
Saving C64 wrap
build/bsw/kernal_compressed.prg uses the memory $2d/$2e, $4b-$4d, $f7-$1b6, $200-$23b, and $0802-$ffff.
Compressed 45050 bytes in 0.04 seconds (1099.85 kB/sec)
@polluks Using the same command as you the output is the following:
Only programs from 0x0258 to 0xffff can be compressed (the input file is from 0x785c to 0x1285b)
@El-Virus The message from pucrunch about loadaddress 0x785c
shows first two bytes of assembled file instead of loadadress 0x5000
.
Check what is your shell. I had /bin/sh linked to /bin/dash (Ubuntu 18.04) and the part in Makefile that saves loadaddress failed for me. Please see this comment #11 (comment)