News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Octoate

Screen compression with Exomizer

Started by Octoate, 19:42, 24 July 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Octoate

Hi,
I am currently a bit stuck while playing a bit with Exomizer. Currently I just want to compress a screen with Exomizer (the official version from Exomizer 2 website), load the compressed file and decrunch it directly into the screen memory.
The compressed screen is loaded to &4000 and this is the small program to uncrunch it:


org &8000
write direct

di
ld hl, &4000
ld de, &C000
call deexo
ei
ret

read "deexo.asm"


To compress the image screen, I just type "exomizer test.scr -o test.exo". Well, but all I get is garbage on the screen.

Do you know what I am doing wrong?
--

TFM

Does your screen have a LOAD address of &C000 (or is it &4000 like all OCP screens have). I don't know exomizer, but this can be one source of problems.

Personally I use the OCP cruncher and decrunching is no problem.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Octoate

The image is not an OCP image. For testing purpose I just saved an image with "SAVE"screen.scr",b,&C000,&4000". I am not interested in on-CPC compression, but cross-platform development and Exomizer offers the best compression.
--

fano

Quote from: Octoate on 19:42, 24 July 12To compress the image screen, I just type "exomizer test.scr -o test.exo". Well, but all I get is garbage on the screen.
I think you need to use the -raw format ( exomizer raw test.scr -o test.exo ) , afaik this is the only one supported by the Z80 code (this is the one i use for my projects)
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

Octoate

Uuups... sorry, I forgot to include the "raw" in the command line above. Of course I used the raw compression and the raw decrunchers.
--

SyX

Have you used the version uploaded by Metalbrain here? It's more update than the official version.

But if the decrunch fail again is much better idea to send the file to Metalbrain, in case there is a bug in the decruncher routine, he will glad to fix it.

Octoate

Thx SyX, I tested the version, but it seems that the official version is newer (released in march instead of january) and I also got the same result like with the official vesion :-(. I haven't used the optimised version, because I want to use it under Linux :).
--

SyX

I will take a look to the optimized version, i think works perfectly in wine, but i remember seeing the details of the optimized version a few years ago and it was nothing special (easily pythonable).

Send the file crunched and uncrunched to him, and he will confirm if it's a problem in the z80 decruncher.

TFM

@Octoate: Sorry for mentioning work on the CPC.
May you like to post a source screen (screen file) for testing purposes and tell how small you can crunch it (bytes)?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Octoate

#9
Sorry, sounded a bit harsh - it wasn't meant so, but I am currently focusing on cross-development...
I've attached the screen and the compressed screen to this posting. The compressed size of the image is 1607 bytes.

@SyX: I sended a mail to him so let's see what I am doing wrong :).
--

Grim

It seems there's an incompatibilty between the exomizer and Z80 decruncher you are using. I replaced the decruncher routine (deexo.asm) in your example with another one (found on my hdd, dunno where it comes from exactly, see the attachment below) and it works.

Octoate

#11
Thanks Grim. I will test it this evening at home. I just had a quick look at it and it seems that the version you posted here is the "older" decruncher (<= v2.0.2), which wasn't optimised by Antonio Villena (v2.0.3).

UPDATE: Ok, it works now. So it seems to be a problem with the new optimised version, which was introduced in the latest official version of Exomizer. But it is great that it works now, because I can finish a small example...
--

Metalbrain

Hi Octoate, I've seen your email, and another user also emailed me a while back with (probably) the same issue, but I didn't have much time back then and later forgot about it. From what I saw it was related with not detecting correctly the starting bit of the first byte after the initial table. If it works with the older decompression routine, it should be easy to check the differences and find the bug. As soon as I do it, I'll send the fixed version to Magnus Lind.
Quote from: Octoate on 20:39, 24 July 12

Thx SyX, I tested the version, but it seems that the official version is newer (released in march instead of january) and I also got the same result like with the official vesion :-(.
They should be the same, the official version was just released later, because Magnus takes his time to make his releases.
Quote from: Octoate on 20:39, 24 July 12I haven't used the optimised version, because I want to use it under Linux :) .
The optimized version can be used under Linux. I included the source code of the optimizator and it should be easy to compile it.

Metalbrain

#13
Bug found:

exo_getindex: inc c
call exo_getbit
jr nc,exo_getindex
ld a,c ;C=index
bit 4, c


Remove the "ld a,c ;C=index" line.
It should be left as:

exo_getindex: inc c
call exo_getbit
jr nc,exo_getindex
bit 4, c

Only happens in normal, non simple version.

PD: Already fixed here:
http://www.speccy.org/metalbrain/exo_v4.zip

Octoate

Cool, that was fast. Thanks, it now works fine!
--

Powered by SMFPacks Menu Editor Mod