Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 5552

programming • Re: 6502 Compressors / Decompressors

$
0
0
...

Code:

      DATA &05,&C3,&2A,&01,&C3,&48:REM five literals      DATA &80,&FD                :REM repeat 2 bytes from here-3      DATA &02,&58,&02            :REM two literal bytes      DATA 0                      :REM end
My feeling is I've got a flaw in my translation of the C code compressor into BASIC.
I think that should decode to:

Code:

&C3,&2A,&01,&C3,&48, &01,&C3, &58,&02
but I've got COVID and my brain is mush!

My brain can't cope with the encoder, although it should be simple; writing it was!

Yesterday I wrote a TGA encoder which should have been simple but my brain struggled!
Then trying to find a bug I discovered that Paint Shop Pro only uses a max of 127 repeated pixels even though the spec and its decoder supports 128.
My bug turned out to be fputc didn't like chars outside of the range of 0-127 :( I've always used fwrite before! but at least the pelletising code worked first time and was efficient (I think).

Statistics: Posted by tricky — Mon Aug 18, 2025 5:02 pm



Viewing all articles
Browse latest Browse all 5552

Trending Articles