Reverse engineering data formats is one of the most fun and satisfying things to do in programming.
Parsing an Undocumented File Format
51–60 of 65 posts
Re: Parsing an Undocumented File Format
#52Earlier quoted context omitted.
I'm reminded of the comment in XeePhotoshopLoader.m: // At this point, I'd like to take a moment to speak to you about the Adobe PSD format. // PSD is not a good format. PSD is not even a bad format. Calling it such would be an // insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having // worked on this code for several weeks now, my hate for PSD has grown to a raging fire // that burns…
> I can only imagine that they make this process so // difficult because they are intensely ashamed of having created this abomination. They also don't want anybody building a dependency on that sh*t, which would prevent them from ever cleaning up the mess.
When I read that rant comment, I thought of "oh, so it's microservices writing to a shared byte array" in a nod to https://en.wikipedia.org/wiki/Conway%27s_law
Re: Parsing an Undocumented File Format
#53Reverse engineering data formats is one of the most fun and satisfying things to do in programming.
Where I throw stones at myself is that I have a "perfect is the enemy of good" problem in that I don't publish writeups that are incomplete, because I keep hoping that if I just spend more holidays banging on it then I'll figure out why the parser works most of the time
Re: Parsing an Undocumented File Format
#54Re: Parsing an Undocumented File Format
#55Earlier quoted context omitted.
That’s what I was gonna say. Reverse engineering was the only way in the 90’s as documentation was scarce. I had to reverse anything if I wanted to understand how it worked. Here is an extractor I wrote for Westwood PAK and Lucasarts LFD files when I was 16: https://gist.github.com/ssg/e3e9654612be916336c01e104b10ddc7
I picked apart some of the Dark Forces files myself as a kid. The GOB file was pretty obvious - I was familiar with Doom WADs, it's basically the same. I figured out the graphics formats by setting up VGA 320x200 mode with the contents of a .PAL file, and dumping the graphics file into screen memory. Then looking at the noise around the familiar patterns to figure out all the run/skip length stuff that wasn't just a…
Re: Parsing an Undocumented File Format
#56Brings back memories of a similar task I have with importing MS Access files (the MS Access file format is undocumented). I am trying to parse the MS Access files using NodeJS/Javascript. I last tried about 3 years ago and it was really tough going, so there is a lot of trial and error. I am able to parse some basic MS Access files, but need to figure out a way to get the whole database more reliably. My effort was h…
oh god, that sounds like a painful thing to try to do. there's an Access redistributable at https://www.microsoft.com/en-us/download/details.aspx?id=549... i've never attempted JS interop, so i don't know how much it sucks, but it definitely seems doable. it'll likely be an adventure on it's own, but it's gotta be 1000x less fuckery than trying to reverse the binary format of Access the saner option would probably ju…
Re: Parsing an Undocumented File Format
#57Earlier quoted context omitted.
I'm reminded of the comment in XeePhotoshopLoader.m: // At this point, I'd like to take a moment to speak to you about the Adobe PSD format. // PSD is not a good format. PSD is not even a bad format. Calling it such would be an // insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having // worked on this code for several weeks now, my hate for PSD has grown to a raging fire // that burns…
> I can only imagine that they make this process so // difficult because they are intensely ashamed of having created this abomination. They also don't want anybody building a dependency on that sh*t, which would prevent them from ever cleaning up the mess.
Re: Parsing an Undocumented File Format
#58Earlier quoted context omitted.
I'm reminded of the comment in XeePhotoshopLoader.m: // At this point, I'd like to take a moment to speak to you about the Adobe PSD format. // PSD is not a good format. PSD is not even a bad format. Calling it such would be an // insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having // worked on this code for several weeks now, my hate for PSD has grown to a raging fire // that burns…
As a side note, I really miss Xee. It was clearly a labour of love and it showed - MacPaw has been a terrible steward ever since Dag handed it over to them. No updates other than straight up SDK bumps and recompiles, broken loading of random images in recent macOS/Apple Silicon, they somehow managed to break cropping in one of the two or three updates they did, still an Intel binary. Clearly they haven't tested it mo…
Re: Parsing an Undocumented File Format
#59It's very strange to have worked on an undocumented file format parser all night before checking HN before I sleep and seeing this. In my case, I am trying to unpack MIDI files that have been packaged in a proprietary format by a company called ToonTrack. They have two product lines: expensive VST instruments and MIDI files designed to be played on those instruments. It's an open secret that you don't need the expens…