42bs Posted October 18, 2022 Share Posted October 18, 2022 Similar to the depacker collection in new_bjl, I started also one for the Lynx. Started with lz4. https://github.com/42Bastian/new_bll/tree/master/demos/depacker Quote Link to comment Share on other sites More sharing options...
sage Posted October 18, 2022 Share Posted October 18, 2022 you may want to check: https://github.com/bspruck/exolynx https://github.com/bspruck/pucrunch for more advanced unpacking codes for lynx. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 18, 2022 Author Share Posted October 18, 2022 Did you compare one of those with for example ZX0 (which uses also Elias coding)? Quote Link to comment Share on other sites More sharing options...
42bs Posted October 18, 2022 Author Share Posted October 18, 2022 (edited) Compared pucrunch with zx0: Original: 7381 bytes LZ4: 3959 bytes TurboPacker: 3749 bytes ZX0: 3074 bytes Pucrunch: 3460 bytes Shrinkler: 2866 bytes upkr: 2778 bytes Edited October 18, 2022 by 42bs add lz4 and tp 1 Quote Link to comment Share on other sites More sharing options...
sage Posted October 18, 2022 Share Posted October 18, 2022 (edited) I always used the one which was (a) working on the lynx (b) fast enough. And depending on use case, stream depacking vs load-and in place depack. pucrunch was easiest to use for a while and easily integrated into file-loading. now exo is my favorite. Edited October 18, 2022 by sage Quote Link to comment Share on other sites More sharing options...
42bs Posted October 18, 2022 Author Share Posted October 18, 2022 1 hour ago, sage said: I always used the one which was (a) working on the lynx (b) fast enough. And depending on use case, stream depacking vs load-and in place depack. That's why want to build a library of depackers, as none fits all. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 23, 2022 Author Share Posted October 23, 2022 On 10/18/2022 at 9:55 AM, sage said: you may want to check: https://github.com/bspruck/exolynx https://github.com/bspruck/pucrunch for more advanced unpacking codes for lynx. I tried exomizer, but the unpacked data misses the first two bytes?! As if they were not written. I "faked" it, by setting `zp_dest_lo` two bytes higher and stored the first two bytes _after_ decrunch by hand and the sprite is ok. I used the file directly from github Quote Link to comment Share on other sites More sharing options...
sage Posted October 23, 2022 Share Posted October 23, 2022 (edited) strange. i has been a while since i used it for bad apple video. maybe i added a workaround or used some special command line parameters? Maybe I just forgot. you use "level" as type? Edited October 23, 2022 by sage Quote Link to comment Share on other sites More sharing options...
42bs Posted October 23, 2022 Author Share Posted October 23, 2022 I will start over from original C code and see how this behaves. Not the fastest though: 341ms. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 23, 2022 Author Share Posted October 23, 2022 28 minutes ago, sage said: strange. i has been a while since i used it for bad apple video. maybe i added a workaround or used some special command line parameters? Maybe I just forgot. you use "level" as type? Tried both, level and raw. Quote Link to comment Share on other sites More sharing options...
sage Posted October 24, 2022 Share Posted October 24, 2022 Just checked my script, you are right. the first two bytes are not packed 😛 I added two zero bytes in front of each binary i wanted to pack. Long live the documentation :facepalm: Quote Link to comment Share on other sites More sharing options...
42bs Posted October 24, 2022 Author Share Posted October 24, 2022 22 minutes ago, sage said: Just checked my script, you are right. the first two bytes are not packed 😛 I added two zero bytes in front of each binary i wanted to pack. Long live the documentation :facepalm: Strange. There is no hint in the original sources. But good to know. Thanks for checking. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 25, 2022 Author Share Posted October 25, 2022 On 10/18/2022 at 9:55 AM, sage said: you may want to check: https://github.com/bspruck/exolynx https://github.com/bspruck/pucrunch for more advanced unpacking codes for lynx. Exo speed improved by 15%, but size also increased by 8% Quote Link to comment Share on other sites More sharing options...
42bs Posted October 26, 2022 Author Share Posted October 26, 2022 On 10/24/2022 at 8:55 PM, sage said: Just checked my script, you are right. the first two bytes are not packed 😛 I added two zero bytes in front of each binary i wanted to pack. Long live the documentation :facepalm: IIRC A8 files have the load address in the first two bytes, that's likely the reason those are skipped. Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted November 27, 2022 Share Posted November 27, 2022 (edited) On 10/23/2022 at 7:47 AM, 42bs said: I will start over from original C code and see how this behaves. Not the fastest though: 341ms. C? Why not assembly? (Just asking) Edited November 27, 2022 by Ecernosoft Quote Link to comment Share on other sites More sharing options...
42bs Posted November 27, 2022 Author Share Posted November 27, 2022 (edited) 5 hours ago, Ecernosoft said: C? Why not assembly? (Just asking) I used the C code to understand the depacker. Not assembly code someone else wrote which is already optimized and thus harder to understand. I did not compile the C code. Edited November 27, 2022 by 42bs Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted November 27, 2022 Share Posted November 27, 2022 14 hours ago, 42bs said: I used the C code to understand the depacker. Not assembly code someone else wrote which is already optimized and thus harder to understand. I did not compile the C code. That's about what I thought. What's funny is I have a hard time understanding C and it's Void and struct stuff and all. I took Computer science (The second semester we learn C++) for that reason. Yet, I can understand assembly fine, as long as it's source code and NOT a dissasembly. (That's for 6502 and it's variants, as well as some Z80) Quote Link to comment Share on other sites More sharing options...
sage Posted December 30, 2022 Share Posted December 30, 2022 Just want to mention another packer/unpacker for the lynx. This code is used in/for Lemmings: https://github.com/tobiasvl/rnc_propack 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted 9 hours ago Share Posted 9 hours ago On 10/26/2022 at 8:54 AM, 42bs said: IIRC A8 files have the load address in the first two bytes, that's likely the reason those are skipped. CBM machines a8 have 6 or 4… 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.