Skip to content

Instantly share code, notes, and snippets.

@druu
Created May 30, 2013 00:36
Show Gist options
  • Save druu/5675007 to your computer and use it in GitHub Desktop.
Save druu/5675007 to your computer and use it in GitHub Desktop.
BIN2ISO Conversion
//**** PREQUISITES
//** bchunk
// > MacOS:
// $ brew install bchunk
// > Good Linux Distros:
// $ sudo apt-get install bchunk
//**** The script:
// $ nano ~/biniso
//** Paste this into the script file
echo FILE "$1.bin" BINARY >> $1.cue
echo TRACK 01 MODE1/2352 >> $1.cue
echo INDEX 01 00:00:00 >> $1.cue
bchunk $1.bin $1.cue $1_
rm $1.cue
//** Save & Quit
//** Make it executable & globally available
// $ chmod a+x ~/biniso && ln -s ~/biniso /usr/local/bin
//** Usage if .CUE file is available
// $ bchunk image.bin image.cue image.iso
//** Usage if .CUE file is NOT available
// $ biniso image
@requeijaum
Copy link

requeijaum commented Apr 23, 2019

ihack-de-rafael:CD requeijaum$ ~/bin2iso.sh Sega\ Ages\ Vol\ 11.bin
binchunker for Unix, version 1.2.2 by Heikki Hannikainen <hessu@hes.iki.fi>
	Created with the kind help of Bob Marietta <marietrg@SLU.EDU>,
	partly based on his Pascal (Delphi) implementation.
	Support for MODE2/2352 ISO tracks thanks to input from
	Godmar Back <gback@cs.utah.edu>, Colas Nahaboo <Colas@Nahaboo.com>
	and Matthew Green <mrg@eterna.com.au>.
	Released under the GNU GPL, version 2 or later (at your option).

Reading the CUE file:

Track  1: MODE1/2352    01 00:00:00

Writing tracks:

 1: Sega Ages Vol 11.bin_01.iso  512/512  MB  [********************] 100 %
#!/bin/bash
echo FILE "$1.bin" BINARY >> "$1.cue"
echo TRACK 01 MODE1/2352 >> "$1.cue"
echo INDEX 01 00:00:00 >> "$1.cue"
bchunk "$1" "$1.cue" "$1_"
rm "$1.cue"

@artnos
Copy link

artnos commented May 10, 2020

how can you explained what you just added? i'm trying to mount bin cue files to burn cd for Sega games. But when i make the iso i get generated .cdr files and the game doesn't have audio, does your post fix this?

@requeijaum
Copy link

requeijaum commented Mar 17, 2022

I just put some double quotes to get the script working with the file's basename.
The generated ISO will only have the DATA track, though.
That may be why your converted games doesn't have AUDIO tracks - they're declared inside the CUE sheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment