Custom Firmware on the OP-1

@wavi - I’ve done a bit of work on understanding the AIF format in the past. If you wanted to write a tool to pull out the meta data, here’s how to do it:


() Find the APPL chunk: The data in AIF files is arranged as chunks with each chunk serving a different purpose (common chunk, sound data chunk, marker chunk, etc). There’s an APPL chunk (application specific chunk) that allows applications to store their own data. This is how TE have stored meta data about the presets (stored as a JSON string containing all their proprietary parameters). The APPL chunk starts with the four characters APPL.

() Read chunkDataSize: After the name of the chunk (APPL), you’ll find four bytes (a 32 bit signed number field) describing the number of bytes in the data portion of the chunk (this count does not include the four bytes for the count itself). Let’s call this field chunkDataSize.

() Read chunkDataSize bytes from the AIF

() It’s good enough to simply print this out, since JSON is pretty human readable. But you might want to use a library to help pretty print it or extract the name value pairs out of it.

Hope that helps.

Love all the techy digging that’s going on in this thread btw :slight_smile:

By the way, for further reading around the AIFF / AIFC specs, this page contains the important links (the specs to AIFF and AIFC and lots of sample files with different levels of compliance):


http://www-mmsp.ece.mcgill.ca/documents/audioformats/aiff/aiff.html

@yoof


Thanks a lot! That’s a good general description, and good docs :slight_smile:

With the APPL chunk and it’s length I think extracting the JSON will be easy. And modifying it too. Would be nice if I figured out how to make AIFs without audio, just the JSON. I’ll see if I can create a nice tool for building presets…

I used the XY Utils on Windows when I unpacked/repacked the firmware a few years ago, and I got a byte for byte match on the repack, so I came to the conclusion TE use this when they make the original firmware files - given the VisualDSP SDK is Windows this would make sense.


http://tukaani.org/xz/ (looks like there is a OSX version too)




1 Like
I used the XY Utils on Windows when I unpacked/repacked the firmware a few years ago, and I got a byte for byte match on the repack, so I came to the conclusion TE use this when they make the original firmware files

awesome.

could be time to start a wiki…

I used the XY Utils on Windows when I unpacked/repacked the firmware a few years ago, and I got a byte for byte match on the repack, so I came to the conclusion TE use this when they make the original firmware files - given the VisualDSP SDK is Windows this would make sense.

http://tukaani.org/xz/ (looks like there is a OSX version too)




Nice! Since it’s without a gui do you by any chance know which commands you’ve used to compress/decompress the files?

Would be great so everyone can have a play around with it :wink: cheers

EDIT:

Right, so after checking out some stuff with the XZ utils it indeed
seems that they are using the default compression settings. First I removed the the 4 crc32 bytes from the Firmware file using a HEX editor… After that I renamed the .op1 extension to .lzma and I’ve executed the
lzmainfo.exe on it and this is what it says:

Dictionary size:8 MB
Literal context bits (lc):3
Literal pos bits (lp):0
Number of pos bits (pv):2

After uncompressing the firmware file using:
xz -d op1_076.lzma

and compressing it again right after that using:
xz -z --format=lzma op1_076

You at least get an almost identical file size on it… Checking the file with lzmainfo.exe results in the same compression values as the original though there is a small difference of around 20 bytes for me though.

I am not near my op-1 at the moment, but I hope to check out tonight if I can flash the ‘newly compressed’ file.

Thanks again guys!

1 Like

I’ve been mapping out all the parameter types and min and max values for all LFO’s. Next I’ll work on the FX and the then the synths. I’ll publish the results on GitHub at some point.
I’ve also made a simple script to modify the the AIF file data to create new presets.

Btw, I got the “iter” synth working too that exists only in the leaked beta.


20160704_180852_scaled
Btw, I got the "iter" synth working too that exists only in the leaked beta.

What does it sound like???

And how is it?

Btw, I got the "iter" synth working too that exists only in the leaked beta.

video or stfu :wink:


I can get stabbing bass sounds (reminds me of 303) and some smooth wind instrument type of sounds. It can doo other stuff too, seems versatile. Here's a vid, sorry for the background noises (took ages to upload since I'm on a 2G network at a cottage):

Great to see this, I wonder why the hidden items are left in? Very interesting indeed!

Yup. “Iter” is confirmed. Uploading to youtube…

btw, now that I am playing with the Beta package: The bootloader has indeed changed.
The “mainboard test” menu item is gone and when you upload a firmware, you no longer have to press “COM” when finished copying and “ejecting”, it detect the “eject” by the computer and starts unpacking itself.

Wonder what else has changed in the bootloader…

FYI https://github.com/krater/Blackfin-IDA-Pro-Plugin. Doesn’t say it supports ADSP-BF52x, but it supports ADSP-BF53x so might be a start.

@jakeokay yeah I know about that one. But I don’t have IDApro…

Will update if I have any luck.


For the record, I also just emailed TE asking if they’d consider open-sourcing their firmware and I think other interested hackers emailing them might show how much interest there is :).

here’s another “iter” Video showing some sounds:
https://www.youtube.com/watch?v=xKhRBJYep1Y

here's another "iter" Video showing some sounds:
https://www.youtube.com/watch?v=xKhRBJYep1Y

Sounds cool :slight_smile: Really hope these hacked unveilings don’t kill TE’s enthusiasm to finish this hidden stuff for inclusion in an official OS that all users can get their hands on.