what's the best way to go about reverse engineering a binary file format if i roughly know a file's contents, just not the structure?

I have a bin file containing 64 wavetables for one of my synths and I would really like to modify it to write my own custom wavetables to it

@tom if you're lucky, you can binwalk the file and it will tell you its contents

if it's custom though? you're gonna need to look for the way each part of the file can be "skipped"

basically, most formats don't like scanning the whole file for the parts they are interested in, and usually either have an index, or have headers, followed by numbers, and lots of data--each number being the size of the section

if you can split the sections, you can try to dissect these smaller pieces easier

@tom if binwalk can't pick out the type of data you're looking at, but you find out how to skip each section, you can possibly cut those parts of the file out of the original binary and run file on them, since it can recognize significantly more types of formats--though you might need to see if you can find out how much data before the actual stuff you're interested in is padded

if you do this, you can even detect compressed data, and have a chance of extracting it

@thingywott I've already figured out how the file is split into 64 so that's a good start I suppose - I'm gonna try using binwalk but I highly expect this to be completely custom. tysm though!

@tom ooh! nice

i guess from there, is there a blank track? that can give some big hints about where the data you are looking for is located

maybe even try running pieces of it through ffplay or something else that can recognize audio formats in case you think you have one of your waveforms, since it could be just be a raw waveform instead of any particular custom format--in which case it will actually sound like something

it's also worth keeping notes about addresses and the sizes of data

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!