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

extapi: Add memory_decompress_from_func #380

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

adiee5
Copy link
Contributor

@adiee5 adiee5 commented Jan 5, 2025

This exposes a functionality that already was available to the internal kernal code. This function works in a similar manner to memory_decompress, but instead of taking an address of compressed data in r0, it takes, in r4, an address of a function that streams LZSA2 data byte by byte each call.

Rationale:

This was already available in the kernal and such a function might be useful in many scenarios, such as:

  • decompressing data incoming from a serial connection on the fly
  • decompressing stuff stored on a cartridge (usage attested in the kernal itself)
  • decompressing data from the banked ram (and automatically handle the bank switching, obviously)

I'll write the proper documentation of the function once it gets greenlit.

Copy link
Collaborator

@mooinglemur mooinglemur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thanks. Seems like we should ultimately rename the function in the kernal too

@mooinglemur mooinglemur merged commit f55f953 into X16Community:master Jan 13, 2025
1 check passed
@adiee5
Copy link
Contributor Author

adiee5 commented Jan 13, 2025

i'll write the docs after thursday

@adiee5
Copy link
Contributor Author

adiee5 commented Jan 22, 2025

it's written btw X16Community/x16-docs#242

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

Successfully merging this pull request may close these issues.

2 participants