Jump to content
IGNORED

LZ4 Depacker


42bs
 Share

Recommended Posts

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 by sage
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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 by 42bs
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...