28 |
|
* Technote FL 36: "Apple Extensions to ISO 9660" |
29 |
|
*/ |
30 |
|
|
31 |
+ |
#include "sysdeps.h" |
32 |
+ |
|
33 |
|
#include <string.h> |
34 |
|
#include <vector> |
35 |
|
|
37 |
|
using std::vector; |
38 |
|
#endif |
39 |
|
|
38 |
– |
#include "sysdeps.h" |
40 |
|
#include "cpu_emulation.h" |
41 |
|
#include "main.h" |
42 |
|
#include "macos_util.h" |
133 |
|
void *fh; // File handle |
134 |
|
int block_size; // CD-ROM block size |
135 |
|
int twok_offset; // Offset of beginning of 2K block to last Prime position |
136 |
< |
uint32 start_byte; // Start of HFS partition on disk |
136 |
> |
loff_t start_byte; // Start of HFS partition on disk |
137 |
|
bool to_be_mounted; // Flag: drive must be mounted in accRun |
138 |
|
bool mount_non_hfs; // Flag: Issue disk-inserted events for non-HFS disks |
139 |
|
|
665 |
|
return offLinErr; |
666 |
|
|
667 |
|
uint8 start_m, start_s, start_f; |
668 |
< |
if (!position2msf(info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), false, start_m, start_s, start_f)) |
668 |
> |
if (!position2msf(*info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), false, start_m, start_s, start_f)) |
669 |
|
return paramErr; |
670 |
|
info->play_mode = ReadMacInt8(pb + csParam + 9) & 0x0f; |
671 |
|
if (!SysCDPlay(info->fh, start_m, start_s, start_f, info->stop_at[0], info->stop_at[1], info->stop_at[2])) |
682 |
|
|
683 |
|
if (ReadMacInt16(pb + csParam + 6)) { |
684 |
|
// Given stopping address |
685 |
< |
if (!position2msf(info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), true, info->stop_at[0], info->stop_at[1], info->stop_at[2])) |
685 |
> |
if (!position2msf(*info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), true, info->stop_at[0], info->stop_at[1], info->stop_at[2])) |
686 |
|
return paramErr; |
687 |
|
} else { |
688 |
|
// Given starting address |
689 |
|
uint8 start_m, start_s, start_f; |
690 |
< |
if (!position2msf(info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), false, start_m, start_s, start_f)) |
690 |
> |
if (!position2msf(*info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), false, start_m, start_s, start_f)) |
691 |
|
return paramErr; |
692 |
|
info->play_mode = ReadMacInt8(pb + csParam + 9) & 0x0f; |
693 |
|
if (!SysCDPlay(info->fh, start_m, start_s, start_f, info->stop_at[0], info->stop_at[1], info->stop_at[2])) |
724 |
|
return paramErr; |
725 |
|
} else { |
726 |
|
// Given stopping address |
727 |
< |
if (!position2msf(info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), true, info->stop_at[0], info->stop_at[1], info->stop_at[2])) |
727 |
> |
if (!position2msf(*info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), true, info->stop_at[0], info->stop_at[1], info->stop_at[2])) |
728 |
|
return paramErr; |
729 |
|
} |
730 |
|
return noErr; |
769 |
|
return offLinErr; |
770 |
|
|
771 |
|
uint8 start_m, start_s, start_f; |
772 |
< |
if (!position2msf(info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), false, start_m, start_s, start_f)) |
772 |
> |
if (!position2msf(*info, ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), false, start_m, start_s, start_f)) |
773 |
|
return paramErr; |
774 |
|
|
775 |
|
if (!SysCDScan(info->fh, start_m, start_s, start_f, ReadMacInt16(pb + csParam + 6))) |