Pletter with tniAsm 0.45

Page 1/2
| 2

By albs_br

Champion (321)

albs_br's picture

21-01-2021, 05:00

Hi guys, I'm having some problems trying to use the Pletter compressor with tniAsm v.0.45.

It's not working at all. I'm am compressing my data using the pletter.exe on my PC, and seems ok (from 2,84 kb to 615 bytes). But after decompression with the .asm routine inside my game, the data looks corrupted.

tniAsm versions 0.x don't have macros, so I had to repeat manually the code of the macros. No big deal here.
Also fixed some small syntax differences, as the labels without ":" char.

One thing looks strange for me: original source contains JP IX and JP IY instructions, which are missing on Z80, at least on the docs I searched. I used JP (IX) and JP (IY) instead.

Is it ok? Does someone tried to use Pletter with tniAsm before?

Login or register to post comments

By albs_br

Champion (321)

albs_br's picture

21-01-2021, 05:24

Just found the unpack routine for tinAsm on MSX lib, but also not worked for me.

Is there any way to unpack the file on PC to check if is identical to original file?

By Daemos

Paragon (1951)

Daemos's picture

21-01-2021, 06:50

Not a direct awnser but maybe helpfull.

Tniasm is good, in fact very good but the version you are using is outdated and made place for a newer version which does support macros. Its sold as donation ware. Pretty much worth the effort to buy.

Are you sure its tniasm thats causing it? Tniasm never ever failed on me and i am talking about 2 million lines of code compiled without any problems.

If you need macros in a assembler that is pretty much tni asm compatible and open source don't forget to check out sjasmplus. Recently stepped over to that and works just as well.

Jp (ix) works fine here on tniasm

By theNestruo

Champion (309)

theNestruo's picture

21-01-2021, 08:16

albs_br wrote:

Is it ok? Does someone tried to use Pletter with tniAsm before?

I did in the past (https://github.com/theNestruo/msx-msxlib/tree/master/libext/...), then I moved to ZX7.
I don't remember the exact details, but I remember having problems with the to-VRAM decoder and with the version of the packer being different (this code works with the v0.5c1 if I remember correctly).

By santiontanon

Paragon (1454)

santiontanon's picture

21-01-2021, 14:55

I use Platter regularly without any issues, but I do not use tniasm (I use Glass). One thing to have in mind is that the Pletter compressor/decompressor have an option to include or not the length of the data as the first byte. Make sure that your compressor and decompressor have that option set in the same way.

By albs_br

Champion (321)

albs_br's picture

21-01-2021, 16:07

Just made a simple test with a small "TESTING PLETTER" string and worked perfectly. I must have made some stupid mistake before. I will try again later.

By albs_br

Champion (321)

albs_br's picture

21-01-2021, 16:46

Solved. Both compressed and uncompressed data where OK. The error was to where I was setting my pointer (end instead of data start)...

"There is no debugger better than a good night of sleep".

By Chilly Willy

Resident (64)

Chilly Willy's picture

27-03-2021, 17:01

Can someone share the Z80 code for Pletter to RAM. Not Vram
HL source
DE Destination

Compilable with TNIASM

By theNestruo

Champion (309)

theNestruo's picture

27-03-2021, 20:46

Chilly Willy wrote:

Can someone share the Z80 code for Pletter to RAM. Not Vram
HL source
DE Destination

Compilable with TNIASM

Check this. It's been a while since I last used pletter in one of my projects (I moved to ZX7 then and now to ZX0)... so it's been a while since I last checked that code was ok :)

By santiontanon

Paragon (1454)

santiontanon's picture

27-03-2021, 23:10

Pletter still has its uses though! In my current project I have Pletter/APlib/ZX0 as options and each has a niche. For example, the pletter compressor is much faster (about 10x than ZX0), which means that it can be used in loops to try permutations of objects to see which permutation compresses better. Often, a permutation that compresses well in Pletter, also does in ZX0. So, you can use Pletter to find a good ordering of your objects, and then ZX0 to compress the final output Smile

By jltursan

Prophet (2537)

jltursan's picture

28-03-2021, 11:19

And what about decompression speed?, is still Pletter faster when unpacking?

Page 1/2
| 2