Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompression issues when expanding to $A000 on a C64 #4

Closed
gorlik opened this issue Sep 23, 2021 · 1 comment
Closed

Decompression issues when expanding to $A000 on a C64 #4

gorlik opened this issue Sep 23, 2021 · 1 comment

Comments

@gorlik
Copy link

gorlik commented Sep 23, 2021

I am trying to decompress data behind the basic or the kernal ROM on a commodore 64.
If you are not familiar with the C64, in the shadowed areas, reads return the ROM data, writes go to the RAM under it.
Decompressing the exact same data to regular RAM and then using memcpy to the shadowed area work perfectly.
I suspect inflatemem reads from the destination area during decompression.
I looked at the inflatemem source but I can't figure out if my theory is correct.
I would really appreciate any help/insight you could provide.

@pfusik
Copy link
Owner

pfusik commented Sep 23, 2021

Yes, DEFLATE bases on LZSS, so it copies the previously uncompressed data.
You should either enable read access for your destination memory area or uncompress to a temporary area and memcpy afterwards.

@pfusik pfusik closed this as completed Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants