Author Topic: Screen compression with Exomizer  (Read 3410 times)

0 Members and 1 Guest are viewing this topic.

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Screen compression with Exomizer
« on: 21:42, 24 July 12 »
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:

Code: [Select]
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?
--

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1983
  • Likes Given: 4650
Re: Screen compression with Exomizer
« Reply #1 on: 21:58, 24 July 12 »
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

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Re: Screen compression with Exomizer
« Reply #2 on: 22:08, 24 July 12 »
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.
--

Offline fano

  • Supporter
  • 6128 Plus
  • *
  • Posts: 835
  • Country: fr
  • Easter Egg Programmer
    • Easter Egg
  • Liked: 278
  • Likes Given: 614
Re: Screen compression with Exomizer
« Reply #3 on: 22:22, 24 July 12 »
To 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 !

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Re: Screen compression with Exomizer
« Reply #4 on: 22:23, 24 July 12 »
Uuups... sorry, I forgot to include the "raw" in the command line above. Of course I used the raw compression and the raw decrunchers.
--

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.137
  • Country: br
  • Liked: 1143
  • Likes Given: 1877
Re: Screen compression with Exomizer
« Reply #5 on: 22:25, 24 July 12 »
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.

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Re: Screen compression with Exomizer
« Reply #6 on: 22: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 :-(. I haven't used the optimised version, because I want to use it under Linux :).
--

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.137
  • Country: br
  • Liked: 1143
  • Likes Given: 1877
Re: Screen compression with Exomizer
« Reply #7 on: 23:31, 24 July 12 »
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.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1983
  • Likes Given: 4650
Re: Screen compression with Exomizer
« Reply #8 on: 23:56, 24 July 12 »
@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

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Re: Screen compression with Exomizer
« Reply #9 on: 00:10, 25 July 12 »
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 :).
« Last Edit: 18:52, 25 July 12 by Octoate »
--

Offline Grim

  • CPC6128
  • ****
  • Posts: 202
  • Country: gp
  • La pak ba, bèf ka pasé
    • THERE IS NO GAME
  • Liked: 134
  • Likes Given: 67
Re: Screen compression with Exomizer
« Reply #10 on: 00:52, 25 July 12 »
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.

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Re: Screen compression with Exomizer
« Reply #11 on: 11:16, 25 July 12 »
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...
« Last Edit: 18:35, 25 July 12 by Octoate »
--

Offline Metalbrain

  • CPC464
  • **
  • Posts: 22
  • Country: es
  • Z80jutsushi
  • Liked: 24
  • Likes Given: 0
Re: Screen compression with Exomizer
« Reply #12 on: 20:51, 25 July 12 »
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.

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.
I 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.

Offline Metalbrain

  • CPC464
  • **
  • Posts: 22
  • Country: es
  • Z80jutsushi
  • Liked: 24
  • Likes Given: 0
Re: Screen compression with Exomizer
« Reply #13 on: 21:34, 25 July 12 »
Bug found:
 
Code: [Select]

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:
 
Code: [Select]

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
« Last Edit: 22:21, 25 July 12 by Metalbrain »

Offline Octoate

  • CPC6128
  • ****
  • Posts: 290
  • Country: de
    • Octoate.de
  • Liked: 62
  • Likes Given: 326
Re: Screen compression with Exomizer
« Reply #14 on: 23:32, 25 July 12 »
Cool, that was fast. Thanks, it now works fine!
--