Previous 199869 Revisions Next

r20092 Saturday 5th January, 2013 at 22:22:39 UTC by Oliver Stöneberg
fixed NRG reading for good (accidentally removed some non-debug code before commit) (nw)
[src/lib/util]chdcd.c

trunk/src/lib/util/chdcd.c
r20091r20092
377377         offset = 0;
378378         for (track = start; track <= end; track++)
379379         {
380            UINT32 size, mode;
380            UINT32 size, mode, unknown;
381381            UINT64 index0, index1, track_end;
382382
383383            fseek(infile, 12, SEEK_CUR);   // skip ISRC code
384384            size = read_uint16(infile);
385            mode = read_uint32(infile);
385            mode = read_uint16(infile);
386            unknown = read_uint16(infile);
386387            index0 = read_uint64(infile);
387388            index1 = read_uint64(infile);
388389            track_end = read_uint64(infile);
r20091r20092
393394            outinfo.track[track-1].idx0offs = 0;
394395            outinfo.track[track-1].idx1offs = 0;
395396
396            switch (mode>>24)
397            switch (mode)
397398            {
398399               case 0x0000:   // 2048 byte data
399400                  outtoc.tracks[track-1].trktype = CD_TRACK_MODE1;
r20091r20092
410411                  fclose(infile);
411412                  return CHDERR_NOT_SUPPORTED;
412413
413               case 0x06:   // 2352 byte mode 2 raw
414               case 0x0600:   // 2352 byte mode 2 raw
414415                  outtoc.tracks[track-1].trktype = CD_TRACK_MODE2_RAW;
415416                  outinfo.track[track-1].swap = false;
416417                  break;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team