Add UTF-8 scripts support, fix corrupt slotinfo handling and add support for Epsilon 24.2.1+ #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix corrupt slotinfo handling:
With an old Upsilon bootloader (prior to 1.0.13), slotInfo magic was getting corrupted after suspending the calculator on Epsilon. In #9, I added a workaround for people who didn't upgrade, but it was broken (and nobody reported it until today). This pull request fix it.
Add UTF-8 scripts support:
Upsilon.js mostly supported writing UTF-8 scripts (the files just had to be NFKD encoded by the library user manually), but not reading them. I added automatic NFKD encoding on write and changed script reading to handle UTF-8 correctly. UTF-8 characters are automatically stripped on write as the OS isn't supporting it (I had corruption on Epsilon 24, but it's maybe also a bug in my testing implementation) and Upsilon.js won't parse the filename correctly if it's UTF-8-encoded
I tested this change on both Epsilon 24.1.0 N0110 with Upsilon bootloader 1.1.0 - RECOVER and Upsilon e971681.
This PR also fix Epsilon 24.2.1 and 24.3.0. In the previous state, we never set the alternate setting, and Epsilon 24.2.1 started enforcing correct alternate usage. By default, we were using
bAlternateSetting=0, which is the Flash. Older Epsilon version didn't check weather the alternate setting was correct.