Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PuCrunch not working as intended #9

Closed
El-Virus opened this issue Jul 23, 2020 · 4 comments
Closed

PuCrunch not working as intended #9

El-Virus opened this issue Jul 23, 2020 · 4 comments

Comments

@El-Virus
Copy link

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.

@polluks
Copy link

polluks commented Dec 21, 2020

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)

@El-Virus
Copy link
Author

@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)

@ytmytm
Copy link
Contributor

ytmytm commented May 20, 2021

@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)

El-Virus added a commit to El-Virus/geos that referenced this issue May 22, 2021
Fixed the PuCrunch bug described in mist64#9 as @ytmytm suggested.
@El-Virus
Copy link
Author

Thanks Maciej! I've committed the pull request #13 applying the suggested fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants