Question: how to use the depacker (fw) to depack at a given address?
shazz opened this issue · comments
Salut Emmanuel,
I tried to use the 6502 depackers so I think I don't use it well.
I need the depacked data to be at a given address ($1000) so I have setup up:
apl_srcptr: end address of the packed data
apl_dstptr: start address of the given location I need the depacked data
the packed code is at $3000 and the destination address is $1000. Here is how I call the routine:
lda #$00
sta $fc
lda #$30
sta $fd
lda #$00
sta $fe
lda #$10
sta $ff
jsr apl_decompress
But after decompressing, the result at $1000 doesn't look like the original data. What's my mistake?
Thanks!
Ah I found out finally, the good depacked data is located 126 bytes after the destination buffer address, so I set the destination buffer to $1000-126.
Is it always 126 bytes?
Ah silly bug on my side. Sorry/