Page 1 of 1

Export RLE from akusprite editor

Posted: Wed Sep 21, 2022 7:26 am
by vasper
Just a quick question, if you have any tips what to look for. I am using your akusprite editor and export to rle asm an image (mode 0), but when I show it, the colours are not correct. I use only 3 colours of the available 16 on the sprite, but I get several when the decompression is done on the screen.


This is the data from the output:

Code: Select all

SpriteBull_Start:
      db 0xF,0x3C,0xF1,0x3,0xF1,0xF,0x14,0xF1,0x2,0xF2,0xF,0x13,0xF1,0x2,0xF3,0xF
      db 0x11,0xF3,0x1,0xF3,0xF,0x10,0xF3,0x2,0xF3,0xF,0x10,0xF8,0xF,0x10,0xF1,0x4
      db 0xF3,0xF,0x11,0xF2,0x3,0xF3,0xF,0xF,0x10,0x33,0xF3,0x2,0xF3,0xF,0xD,0xC3
      db 0xF9,0xC1,0xF,0x4,0xC9,0xF1,0x10,0xFC,0x1,0xF5,0x10,0xCC,0xC1,0xF,0x3,0xC7
      db 0xF7,0x1,0xF4,0x10,0xCC,0xC1,0xF,0x1,0xC3,0xFE,0x2,0xF4,0xC2,0xD,0xC3,0xFF
      db 0x8,0xC2,0x9,0xC3,0xFF,0xC,0xC2,0x7,0xFF,0x12,0x7,0xFF,0x12,0x6,0xFF,0x13
      db 0x6,0xFF,0x10,0xC2,0xF1,0x5,0xFF,0xA,0xC1,0xF4,0xC3,0x7,0xFF,0xA,0xC1,0xF4
      db 0xC1,0x9,0xFF,0xA,0xC2,0xF3,0xC1,0x8,0xC1,0xFF,0xB,0xC1,0x10,0xCC,0xC2,0x7
      db 0xC2,0xFF,0xB,0xC2,0x1,0xF1,0x8,0xC2,0xFF,0xE,0x8,0xC2,0x1,0xFF,0xE,0x7
      db 0xC2,0x2,0xFF,0xF,0x6,0xC1,0x3,0xFF,0xF,0x5,0xC2,0x3,0xFC,0xC1,0x10,0xF3
      db 0xFF,0x1,0x4,0xC3,0x2,0xFA,0xC6,0xFF,0x0,0x5,0xC2,0x3,0xF7,0xC8,0xFF,0x1
      db 0x9,0xF7,0xCA,0xF6,0xC1,0x20,0xF3,0xF3,0xF3,0xB,0xF6,0x4,0xC5,0xF1,0x10,0xFC
      db 0xC9,0xF3,0xB,0xF8,0x2,0xCD,0x4,0xF2,0xC,0xF2,0x1,0xF4,0x3,0xCC,0x10,0xC0
      db 0x1,0xF3,0xE,0xF4,0xC3,0x3,0xC9,0x1,0xC2,0xF4,0xF,0x3,0xC4,0x4,0xC6,0x2
      db 0xC2,0xF3,0xF,0x14,0xC2,0xF2,0xF,0xFF,0x5E
SpriteBull_End:
Thank you for your work. I am now starting to learn z80 assembly for the CPC and I find your lessons and tools very helpful.

Re: Export RLE from akusprite editor

Posted: Sat Sep 24, 2022 1:22 am
by akuyou
I don't really ever use 16 color mode so it's not had much testing.

If you provide the example source program, and the Akusprite file your trying to export, I can look and see what the problem is.

Re: Export RLE from akusprite editor

Posted: Sun Oct 23, 2022 3:12 pm
by vasper
Hi, I import in AkuSprite the attached png, I go to Z80 -> Amstrad CPC -> File -> RLE Asm

The code is here:
https://github.com/vaspervnp/projectKaptara
You can use this link to run it online and view the code:
http://8bitworkshop.com/redir.html?plat ... e=main.asm

Just press "S" to skip to where the rle is showing on screen

Re: Export RLE from akusprite editor

Posted: Tue Oct 25, 2022 7:58 am
by akuyou
Sorry, but I don't think that RLE encoder is going to work for you, it was coded for ChibiAkumas, and designed to work at the pixel pair level in Mode 1 (for dithered images).

It simply doesn't understand Mode 0, either from the point of view of encoding an image, or actually producing efficient results, as it's treating the mode 0 bytes as if they are mode 1.

I think you'll be better using the simpler RLE encoder I cover here, which works at the byte level, so doesn't care about screen mode - I think you'll have more luck with it, and as it's simpler, it's what I favor for my coding these days.

https://www.chibiakumas.com/z80/multipl ... #LessonM11

Re: Export RLE from akusprite editor

Posted: Thu Oct 27, 2022 2:24 pm
by vasper
Thanks Keith,
I will take a look at it and write here when I have it working