Pletter with tniAsm 0.45

By albs_br

Master (199)

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

Master (199)

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 (1793)

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 (267)

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 (1205)

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

Master (199)

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

Master (199)

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