cdrom.cpp: implemented Status(6)

This commit is contained in:
cebix 2000-10-11 17:40:07 +00:00
parent 129e9cd85d
commit b6f3185c3b
2 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,8 @@ V0.8 (snapshot) - <date>
- include/macos_util.h: defines FOURCC() macro to make MacOS-like
four-character-codes, replaced most instances of multi-character
constants in the sources by this macro to avoid compiler warnings
- cdrom.cpp: implemented Status(6) call (return format list)
[Landon Fuller]
- Imported some changes from the Windows port, most notably FPU fixes
and the 1Hz interrupt [Lauri Pesonen]
- Ported Lauri Pesonen's FPU core to GCC/i386 [Gwenole Beauchesne]

View File

@ -917,6 +917,16 @@ int16 CDROMStatus(uint32 pb, uint32 dce)
// Drive-specific codes
switch (code) {
case 6: // Return format list
if (ReadMacInt16(pb + csParam) > 0) {
uint32 adr = ReadMacInt32(pb + csParam + 2);
WriteMacInt16(pb + csParam, 1); // 1 format
WriteMacInt32(adr, SysGetFileSize(info->fh) / 512); // Number of blocks
WriteMacInt32(adr + 4, 0); // heads/track/sectors
return noErr;
} else
return paramErr;
case 8: // DriveStatus
Mac2Mac_memcpy(pb + csParam, info->status, 22);
return noErr;