mooz
Deep Blooper
Posts: 29
|
Post by mooz on Nov 3, 2019 23:20:43 GMT
|
|
|
Post by DarkKobold on Dec 3, 2019 20:09:36 GMT
I'm guessing any utility or HuC compatible compression is dead?
|
|
|
Post by turboxray on Dec 3, 2019 21:54:47 GMT
I don't think it's dead. I mean I have pucrunch working for HuC. It's just not embedded into it (it's external and data has to be included as binaries). I can work with you on getting that type of setup for HuC if you're interested? Directly embedding it into HuC is lower priority for me right now though.
|
|
|
Post by DarkKobold on Dec 3, 2019 22:34:36 GMT
That seems super simple, if it's just something like - #incbin(whatever,"whatever.bin") #include "pucrunch.c"
void main(){ pu_uncrunch_vram(0x5000, whatever, 0x500); }
|
|
|
Post by turboxray on Dec 4, 2019 14:27:58 GMT
That seems super simple, if it's just something like - #incbin(whatever,"whatever.bin") #include "pucrunch.c"
void main(){ pu_uncrunch_vram(0x5000, whatever, 0x500); }
Do you know how much system ram you have free?
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Dec 4, 2019 15:47:57 GMT
yeah, seems even better than LZ4 .
|
|
|
Post by DarkKobold on Dec 4, 2019 22:15:30 GMT
That seems super simple, if it's just something like - #incbin(whatever,"whatever.bin") #include "pucrunch.c"
void main(){ pu_uncrunch_vram(0x5000, whatever, 0x500); }
Do you know how much system ram you have free? Quickly tested - I was able to compile with four 1024 byte arrays, but it wouldn't compile on the 5th. I'm not sure how HuC handles local variables, but the game played OK testing with the 4. Probably best not to use all that space, however.
|
|
|
Post by turboxray on Dec 5, 2019 0:21:39 GMT
DarkKobold Okay, so you have about 4k+ free. I don't need that much haha. 1k is more than enough, but I'd like to use the memory alignment declarative if possible. And what version of HuC are you using?
|
|
|
Post by gredler on Dec 5, 2019 1:21:09 GMT
We are on Elmer's 3.99 HuC. Thanks for looking into this!
|
|
|
Post by elmer on Dec 11, 2019 22:32:56 GMT
Yes ... and since his code is open-source, it could be built into HuC/pceas, which is very nice. Even more interesting from my POV is that he's now written an aPLib-compatible compressor. That should work nicely with my optimized aPLib decompressor, and it also opens up the possibility of tweaking a couple of things in the aPLib format to get a tiny bit more decompression speed out of the encoding. github.com/emmanuel-marty/apultra
|
|
|
Post by elmer on Dec 18, 2019 22:33:15 GMT
yeah, seems even better than LZ4 . Yes, LZSA seems to get better results than LZ4. Here's an example of a 40KB program/data that is being written for the Atari ... Size File =========================== 40,164 popcore.bin
28,227 popcore.bin.lz4ultra 28,225 popcore.bin.smallz4
26,345 popcore.bin.lzsa1
24,366 popcore.bin.pucrunch
23,929 popcore.bin.lzsa2 23,280 popcore.bin.aplib 23,012 popcore.bin.deflate
22,926 popcore.bin.apultra
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Dec 19, 2019 8:56:08 GMT
Huc needs IMO, two décompressors, a very fast one like LZ4/LZSA and one slower but with a good compression ratio like pucrunch/APLIB .
|
|
|
Post by turboxray on Dec 19, 2019 22:41:44 GMT
Huc needs IMO, two décompressors, a very fast one like LZ4/LZSA and one slower but with a good compression ratio like pucrunch/APLIB . Agreed. elmer do you have numbers on for decompression on the target side (how fast)?
|
|
|
Post by elmer on Dec 20, 2019 3:36:54 GMT
elmer do you have numbers on for decompression on the target side (how fast)? Probably the best comparison would be for everyone to test their favorite compressor using the same file. Using the easily findable gpl-3.0.txt file (35147 bytes long) as a example ... apdstr (Peter Ferrie's 65C02 code from aPLib) take 6,551,627 cycles to decompress it. My aplib 6502 code takes 2,668,144 cycles to decompress it (running on a PCE). My aplib 6280 code takes 2,202,548 cycles to decompress it (using TII, and locking out interrupts). I haven't (yet) written a 6280 version that doesn't use a TII for copying. How fast your favorite LZ4 or pucrunch decompressor runs will depend up how well it is written, and whether it is designed to use a ring-buffer so that you can decompress directly to VRAM. apultra/aplib doesn't currently offer a window-size option, and so it's not suitable for using with a ring-buffer. So, Tom, how many cycles does you pucrunch decompressor take on that file (with and without ring-buffer)? Touko, how does your LZ4 decompressor do on that test? Have you posted the source for it anywhere?
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Dec 20, 2019 15:54:00 GMT
I have no idea for now how it takes,it works but it's unfinished .
|
|