(Topic ID: 235089)

Stern .BIN File Structure

By PatrickH

5 years ago



Topic Stats

  • 3 posts
  • 3 Pinsiders participating
  • Latest reply 2 years ago by usul27
  • Topic is favorited by 3 Pinsiders

You

Linked Games

No games have been linked to this topic.

    #1 5 years ago

    Hi everyone!

    I'm looking for some insight regarding the way Stern stores data in their .BIN game code files.

    I'm sure this information isn't necessarily publicly available, however the files themselves are (obviously) available publicly and people *have* found ways to decode and extract source data from them (see "Pinball Browser"). The issue is, since Pinball Browser is a publicly available/distributed piece of software, copyright issues prevent the creator from providing a way to export image data from these .BIN files (and this functionality has since been removed). The thing is, simply *having* this data isn't a breach of copyright (obviously, because you can download the .BIN files from Stern's site!), it's the distribution that makes it problematic (hence, the removal of this feature from Pinball Browser).

    This is where my problem lies. I would like to write a simple script for my own use that scans a Stern .BIN file, locates the image data for DMD animations (which I assume is contingent in memory?) and exports this image data for my own use. I'm not particularly interested in having it in a usable format - I just need the raw pixel data (RGB? I think they're only stored in intensity values since these DMD panels are monochromatic) so I can re-construct the images in a DMD controller application I'm writing (again - just for personal use, not for distribution).

    Obviously, this means I'll need to figure out a few things about these .BIN files:
    - What is the typical structure of one of these files? Are there contingent sections for images/sound/gamecode?
    - What format are these images stored in? Surely there's a header of some sort in front of each new image describing the dimensions
    - how is each pixel represented? ie. 2-byte "intensity, alpha" tuples? something along these lines?
    - are the pixel matrices for each image stored column or row major?
    - how big are the meta (header) data pieces between each image? does this even exist, or is this data stored in a table somewhere that references addresses?

    Fortunately, I can reverse-engineer using Pinball Browser since this allows me to at the very least manipulate BIN files. (ie. store the original, make a copy with the first and last image altered, then run a script to find the location of bytes changed... etc.). That said, this could be a very daunting task with no prior information, so I turn to YOU! If anyone has any knowledge (or even rough ideas) of how these files are structured, I'd love all the pointers I can get! I suspect these files are NOT encrypted, since others have found ways to extract data from them in the past.

    If you read this far, I really appreciate you taking the time to do so

    Thanks!

    1 year later
    #2 3 years ago

    Did you ever get further on this question?

    1 year later
    #3 2 years ago

    Looks like nobody except the author of Pinball browser ever reverse-engineered this. Really?

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/stern-bin-file-structure and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.