1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
$NetBSD: patch-ab,v 1.2 2003/09/01 10:17:37 cjep Exp $
--- bchunk.c.orig 2001-08-07 21:18:29.000000000 +1000
+++ bchunk.c 2003-07-18 23:56:09.000000000 +1000
@@ -25,10 +25,11 @@
#include <unistd.h>
#define VERSION "1.1.1"
-#define USAGE "Usage: bchunk [-v] [-p (PSX)] [-w (wav)] [-s (swabaudio)]\n" \
+#define USAGE "Usage: bchunk [-v] [-r] [-p (PSX)] [-w (wav)] [-s (swabaudio)]\n" \
" <image.bin> <image.cue> <basename>\n" \
"Example: bchunk foo.bin foo.cue foo\n" \
" -v Verbose mode\n" \
+ " -r Raw mode\n" \
" -p PSX mode: truncate MODE2/2352 to 2336 bytes instead of normal 2048\n" \
" -w Output audio files in WAV format\n" \
" -s swabaudio: swap byte order in audio tracks\n"
@@ -88,6 +89,7 @@
char *cuefile = NULL;
int verbose = 0;
int psxtruncate = 0;
+int raw = 0;
int swabaudio = 0;
int towav = 0;
@@ -99,8 +101,11 @@
{
int s;
- while ((s = getopt(argc, argv, "swvp?h")) != -1) {
+ while ((s = getopt(argc, argv, "swvp?hr")) != -1) {
switch (s) {
+ case 'r':
+ raw = 1;
+ break;
case 'v':
verbose = 1;
break;
@@ -190,7 +195,11 @@
} else if (!strcasecmp(modes, "MODE2/2352")) {
track->extension = ext_iso;
- if (psxtruncate) {
+ if (raw) {
+ /* Raw MODE2/2352 */
+ track->bstart = 0;
+ track->bsize = 2352;
+ } else if (psxtruncate) {
/* PSX: truncate from 2352 to 2336 byte tracks */
track->bstart = 0;
track->bsize = 2336;
|