Skip to content

Add _very initial_ support for 3.0#3

Open
cameronleger wants to merge 2 commits intojaxter184:masterfrom
cameronleger:master
Open

Add _very initial_ support for 3.0#3
cameronleger wants to merge 2 commits intojaxter184:masterfrom
cameronleger:master

Conversation

@cameronleger
Copy link
Copy Markdown

At least for bwpresets from 3.0 Alpha 1 and Beta 1 branches, those saved for The Grid Device have a different header structure.
The first tweak is that the four bytes after BtWg are "0002" and not "0001" (in character form)
The second is that the header "section" is 60 bytes long instead of 40

This is a very quick tweak to allow parsing of these Presets without failing. There's plenty more to be done to support these newer headers and perhaps any features that come with them.
Before the metadata is decoded, I made it check the 8th character, and if it's "2" (the newer value) then it will re-read the header as 60 bytes.
The rest continues as usual and there's no errors when parsing the metadata. Of the bwpresets I've found, I could still parse the contents of one of them but most would still fail

At least for bwpresets from 3.0 Alpha 1 and Beta 1 branches, those saved for The Grid Device have a different header structure.
The first tweak is that the four bytes after BtWg are "0002" and not "0001" (in character form)
The second is that the header "section" is 60 bytes long instead of 40

This is a _very quick_ tweak to allow parsing of these Presets without failing. There's plenty more to be done to support these newer headers and perhaps any features that come with them.
Before the metadata is decoded, I made it check the 8th character, and if it's "2" (the newer value) then it will re-read the header as 60 bytes.
The rest continues as usual and there's no errors when parsing the metadata. Of the bwpresets I've found, I could still parse the contents of one of them but most would still fail
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.

1 participant