VOGONS


First post, by Rekrul

User metadata
Rank Member
Rank
Member

Information on the exact format of BIN files seems to be pretty scarce. When I search, pretty much all I find are pages talking about the format of the CUE file, or ones telling me how to use the files with some other piece of software. The authors of that other software understood how to read and parse the file, so the information must exist somewhere.

Why don't I want to use virtual drive software? Because I was hoping to do this from a script so that multiple BIN/CUE sets could be processed. And while PortableWinCDEmu-4.0.exe can be used from the command line, there doesn't seem to be any way to suppress its messages, there's a delay after mounting the image, and mounting/unmounting an image causes Windows to play the new hardware inserted/removed sound.

I was really hoping to find a way to just reliably pull the filenames out of the BIN file. Maybe if I knew the exact layout of BIN files, I could jump right to where the filenames are stored, and get the names that way.

Reply 1 of 7, by aqrit

User metadata
Rank Member
Rank
Member

Terms to start would be "red book", "yellow book", "orange book", etc.

From scratch try ecma-119 and ecma-130.
(Disclaimer: I don't know anything about this subject 😛)

Reply 2 of 7, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

Yes. Look up cdmage.

I dont think it's scriptable though.

Reply 3 of 7, by mr.cat

User metadata
Rank Member
Rank
Member

BinChunk (bchunk) is another one to consider.
It can (sometimes? YMMV) convert .CUE to .ISO and at that point it's possible to use 7z to list the contents.
The conversion step is probably a bit too much, but maybe some of the code can be useful.

Reply 4 of 7, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

A BIN file is just a straight dump and doesn't have an exact format. You'd have to detect whether it has a standard file system (eg. ISO9660 or UDF) and then parse that yourself.

GBAJAM 2024 submission on itch: https://90soft90.itch.io/wreckage

Reply 5 of 7, by eddman

User metadata
Rank Oldbie
Rank
Oldbie

Just do a quick search and you'd see there are programs that deal with CD images without mounting them. The issue is finding one that can work from the command line in silent mode (without invoking its UI). I know that IsoBuster supports commands but is not silent.

Take note that in case of multi-track data images and/or multi-session, loading the bin alone would show only the content of the first track; you'd have to load from the cue to get the full content. These are rare though and your images probably are none of these.

Reply 6 of 7, by Yoghoo

User metadata
Rank Member
Rank
Member

Don't know what OS you want to use but PowerISO can do that easily:

piso.exe list filename.cue /

Or if you want do a recursivelylist add the -r option. All command line options are listed here: https://www.poweriso.com/tutorials/command-line-argus.htm

It's not free software for Windows but maybe the trial version works as well. For Linux there is a free command line version which does the same.

Reply 7 of 7, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie
bakemono wrote on Yesterday, 15:08:

A BIN file is just a straight dump and doesn't have an exact format. You'd have to detect whether it has a standard file system (eg. ISO9660 or UDF) and then parse that yourself.

That's what the .CUE file supplies.

The track's start location in seconds, the data sector type, and the FS type (optional).

It's a kind of tracklist for the raw .BIN

Reading a .BIN without a .CUE forces the program to have to 'try' a bunch of possible interpretations, looking for 'sane' outputs. Not a fun thing at all.