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

Add _very initial_ support for 3.0 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cameronleger
Copy link

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