Aplib Z80/App Z80

Started by ComSoft6128, 08:43, 20 June 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Screen compression utility from 2008.

Having had second look at the Listing for "-EXAMPLE.BAS" I'd say the 1K palette file is actually associated with the original uncompressed 17K screen file. Ooops!

From CPCRulez:
"Aplib is a compression library developed by Jorgen Ibsen, which is released commercially for recent systems and platforms. For personal use, the use of the library and associated small tools is free.
Unlike other compactors, it was not developed for prehistoric computers, but for the PC world. This partly explains its relative discretion in the 8-bit world. This, until CNGSoft adapted the decompression routine on Z80 in 2006 and published it on a blog. It has since remained in the shadows with us French people while Aplib is one of the best existing compactors!
It was while reading a subject on the Spanish site Amstrad.Es that I came across it. No luck, the source made available by CNGSoft was not usable directly under Maxam, so I reformatted it to be usable directly from a CPC.
This short document explains how to use AplibZ80 on a CPC, and thus benefit from the impressive compaction rate of this software. It has the luxury of being a bit better than Exomizer, because its decompression routine is shorter and faster.
The archive contains the following files:

APLIBZ80.TXT: the text you are reading
APLIBZ80.DSK: CPC disk image with Maxam source and an example
; for compacting the screen page (Ninja Commando C64)
APLIB-0.43.ZIP: the sources of Aplib PC, so that the author is happy.
APPACK.EXE: sample compactor modified by Dadman
APPacKwin.EXE: Same thing, but with an interface
Reminder, if you distribute your works commercially (we can always dream, can't we :-), you will have to buy the right to use Aplib.

Sources on the net as of 01/18/08:
Aplilb website: http://www.ibsensoftware.com/
Source from CNGSoft: http://cngsoft.livejournal.com/268202.html

Compactors modified by Dadman / CEZ - Team:
Created from the sources of the APLIB-0.43 archive, they make it possible not to have a PC routine integrated into the compact code!


1) Prepare a working directory

Create an APLIB directory on a volume of your hard disk.
Copy the Dadman programs into the directory, it's ready.

2) Transfer the file to be compressed to a PC

The easiest way is to use ManageDsk , and export the binary file WITHOUT HEADER to the same directory as the executable

3) Compaction with APPACK

Honestly, it couldn't be simpler.

Command syntax for the BOULDER.BIN file

The program compacts and creates a BOULDER.CRU file which corresponds to the compacted code.

4) Transfer the compact file to CPC

Hop, we take ManageDsk out of the closet, and we do the reverse transfer of phase 1. We must choose the "Force Binary" option for the import.

5) Compilation of the decompression routine

The Maxam source is provided in the APLIB.DSK archive. It is enough to add at the beginning of the source the memory establishment addresses of the compact code in HL and of the code to be decompressed in DE. Compile the source, you get an APLIB.BIN file. It is installed by default in &A000 for the example chosen on the diskette (screen page C64).

Concerning the CNGSoft routine, there is a peculiarity which can be interesting. It allows code to be decompressed "bottom-up" from memory, or "from top-down" from memory, which other crunchers do not do. To do this, simply modify a variable in the source.

Unfortunately, for the moment, this option is not very exploitable, because there is no compactor circulating allowing to compact code "upside down". This is theoretically possible with the tools provided, by following this method:

reverse the contents of the file to be compacted (manage yourselves!)
compact the file with Dadman's tools
invert the contents of the compact file (same remark)
In short, it is better to harass CNGsoft which must have a program of this kind rather than to attempt the adventure by hand if this option is useful to you.

6) Creation of a small Basic or binary loader

All that remains is to load the compacted code, the decompression routine into memory, execute it, then execute the decompressed program if it is an executable.
For more explanations, I encourage you to read the notice of the PUCRUNCH unpacking routine, on http://tj.gpa.free.fr.

Good crunching!>Good crunching!"

""Aplib is a compression library developed by Jorgen IBSEN, and which is released commercially for recent systems and platforms. For personal use, the use of the library and associated small tools is free."

"Author of the compression/decompression software: Jorgen IBSEN
Adaptation on Z80 of the decompression routine in 2006: Cesar Nicolas GONZALEZ alias CNGSOFT
Source code usable directly under Maxam: Herve MONCHATRE alias Tom Et Jerry du GPA
PC compactors modified in 2008 by: David DONAIRE SANCHEZ aka DadMan"

"Unlike other compactors, it was not developed for prehistoric computers, but for the PC world. This partly explains its relative discretion in the 8-bit world."


This product uses the aPLib compression library,
Copyright © 1998-2014 Joergen Ibsen, All Rights Reserved.
For more information, please visit: http://www.ibsensoftware.com/

Not emulated - original hardware and software.
Please note that  the aspect ratio for this YouTube video is 16:9 but the CPC monitor
has an aspect ratio of 4:3 so you may wish to adjust your viewing device accordingly.


To target any platform, you may use Ap-Ultra, which is an optimal compressor for Ap-lib (it's free, it's opensource, it's supported by Rasm)

use RASM, the best assembler ever made :p

I will survive

Powered by SMFPacks Menu Editor Mod