Repository navigation
Handle source-protected AOIs - #69
Draft
santiagolgzz wants to merge 5 commits into
Draft
santiagolgzz wants to merge 5 commits into
santiagolgzz wants to merge 5 commits into
Conversation
Fallbacks that skip or guess something now record a short plain-English note as well as logging a warning: a controller tag left out, a produced/consumed tag exported as Base, a guessed Region Map offset, an unrecovered Region Map rung, and a routine with no readable type exported as RLL. The notes are available as project.conversion_notes and written as one XML comment at the top of the L5X; a fallback that hits many objects gets one line naming the first few and a count. With no notes, the output is unchanged.
When no unclaimed rung fits the gap, no rung is missing and nothing was skipped or guessed, so it is logged but no longer noted.
Source protection replaces a record's attribute block with an encrypted envelope (marker 0x0AAA96AA where the attribute count would be). Such a record now raises ValueError instead of being misparsed, unless the caller passes allow_protected=True; then it parses to its readable header and main record, with `protected` set.
Encrypted (source-protected) routines, e.g. inside a vendor's protected Add-On Instruction, have an unreadable extended-attribute area, so parsing failed and the routine was exported with Type="". The 60-byte main record is intact; read the type from it (issue hutcheb#38). Detects protection with RxGeneric.from_bytes(allow_protected=True), and logs a warning naming the routine.
Source protection replaces an AOI record's attribute block with an encrypted envelope (marker 0x0AAA96AA where the attribute count would be). The revision, vendor, dates, help text and parameter usage live in that block, so the old reader printed ciphertext as the Vendor and listed every parameter as a local tag. Detect the envelope and export such an AOI with only what is stored readably: its name, its description (from the backing data type's comments) and its routine names and types. Everything else is left out, and one warning per AOI says so. Detects protection with RxGeneric.from_bytes(allow_protected=True).
santiagolgzz
force-pushed
the
up/protected-routines-notes
branch
from
November 4, 2026 21:32
bafc99c to
be05880
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #38. Depends on #67.
As found in #38, the routines that come out with no type are inside source-protected AOIs. Their contents are encrypted, and the converter read them as if they weren't. Besides the missing types, those AOIs got scrambled bytes as their vendor, revision and dates, plus a long list of fake local tags.
Now the converter recognises protected AOIs and keeps only what is stored readably: name, description, and routine names and types. A conversion note says what was left out. On the two of my 20 projects with protected AOIs, 68 routines get their real type and about 340 fake tags disappear.