Jump to content

ARJ Compression for 68k


Recommended Posts



After testing different compression tool for 68k, I finally found one (thanks ggn !) which compress really good (better than ICE, UPX & ZIP !) and is fast enough (at least not slower than PackIce for example)

It's ARJ in mode 7, the problem was that it involved a tool working only on TOS, and thus using an Atari emulator in the compression process.

But I re-made this tool for PC/Windows (source included) and also a ready to use package for compressing files :)


Here it is:



Just use the command: packarj yourfile.dat

and you will get a yourfile.arj packed file. (which is not an arj archive but the raw compressed data !)


Now use the "arjm7.s" 68k routine to unpack

a0 = destination, a1 = source, bsr unarj

d0 is no more needed because I include the original file size inside the packed data ! and added a line at the beginning of the unpack routine.

Warning: It use around 12k of stack.


If you want a faster depack, but less packed file (and no stack usage), simply replace the -m7 parameter (in the packarj.bat file) by -m4

and use the mode4 depack routine (ggn can you post this here ? thanks !)

Link to comment
Share on other sites

(ggn can you post this here ? thanks !)


Sure :). Thanks for making this more automated process and for the extraction tool!


I'd also like to take this opportunity to say that ARJ modes 4 and 7 don't exist on the normal ARJ (maybe mode 4 but I think not). They were coded by Hans Wessels AKA Mr Ni! of the TOS crew. So I think it's only fair that if any gentlemen use these 2 packing methods, kindly credit Hans for his amazing work :).


Link to comment
Share on other sites

  • 1 month later...

After one attempt here at integrating this tool into an existing program ive had no good results. Unsure why, but it seems that it crashes even when setting up the stack 12k away from the end of ram and calling it as the directions say while including the .s file.


I havnt used mode 4, just the mode 7 example.


Am i missing something?? Could always benefit from a little better compression :) allows for more stuff in programs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...