Pletter Output Z80 Code?

Por Chilly Willy

Resident (40)

imagem de Chilly Willy

05-04-2021, 03:19

I have yet to start playing with compressors other than reading up on all these old programs.

I would like to know if someone can point me to a program that will take z80 code of at least 768 bytes and compress it to z80 assembly data.

Output in decimal preferably such as this format.
db 012,014,000,012,012,012,012,014
db 012,012,012,060,040,040,008,012
db 000,000,000,000,000,000,000,000
db 000,000,000,000,000,000,000,000

I am compressing 768 byte vram screen data and NOT a file or image.

pletter 5c1 format

TIA

Entrar ou registrar-se para comentar

Por pgimeno

Champion (287)

imagem de pgimeno

05-04-2021, 13:19

I'm not sure what you mean. The Pletter compressor is a C program designed to work with files. If you have stuff in memory, you have to save it to file first before it can be compressed. If you use BSAVE, you'll need to strip the BSAVE header before compressing.

The output of Pletter is another binary file. If you want that file in assembler form, you can make a converter that suits your needs, but note that many assemblers have an INCBIN or INCLUDEBIN directive, maybe yours does too.

Por ro

Scribe (4371)

imagem de ro

05-04-2021, 15:42

In this case, you might want to SAVE your VRAM data to a file. Then compress it to another file. Then you either include it as data in your source (dunno what assembler you use), or you convert the file to a DB file and include that. I'm sure there would be File to DB converts out there.. else, just write one yourself. Not that hard, right?

Por Chilly Willy

Resident (40)

imagem de Chilly Willy

05-04-2021, 19:47

Well I have the pletter DECOMPRESSION code in assembly which will take code which is pointed to by HL and decompresses it to DE.

What I need is the code that COMPRESSES the code that I can put in HL.

Por thegeps

Paladin (748)

imagem de thegeps

05-04-2021, 19:58

Oh, so you want to put packed assembly code, so you will unpack it and execute after decompression?
But why do you need to compress it? You need it to be dynamic? Else, if you simply need that code already compressed to put it in your source...
Simply write your code, assemble it with your favorite assembler as ROM (without rom header!)
It will be a bin file without msx bin header
Compress it with pletter on your pc
Include obtained file in your source (put a label to point by hl before the include directive)

Por Chilly Willy

Resident (40)

imagem de Chilly Willy

05-04-2021, 20:38

Thank you for all the alternatives but I am so far into this project I really can not change things.

If there are really no programs out there this will just be something new I have to learn and write.
but I am sincerely grateful for all of the input.

Por santiontanon

Paragon (1362)

imagem de santiontanon

05-04-2021, 20:59

Perhaps it exists, but I am not familiar with a "compression" routine that runs directly on the Z80 for pletter. Usually, as thegeps explains, you compress the data on PC, and only need to "decompress" on the Z80. The reason is that compression is much slower than decompression. So, a compression routine directly running on the Z80 might be extremely slow... That being said, maybe some routine exists, I don't know.

Por sjoerd

Hero (599)

imagem de sjoerd

05-04-2021, 21:18

So if I understand it correctly you are looking for a compressor on the Z80? I don't know any ready made ones. Easiest is probably just a RLE scheme.

Por pgimeno

Champion (287)

imagem de pgimeno

05-04-2021, 21:49

Maybe you can compile the Pletter compressor with an MSX C compiler?