From b6f3185c3b79079a9b29b4255a57621b6bbda6fe Mon Sep 17 00:00:00 2001 From: cebix <> Date: Wed, 11 Oct 2000 17:40:07 +0000 Subject: [PATCH] cdrom.cpp: implemented Status(6) --- BasiliskII/ChangeLog | 2 ++ BasiliskII/src/cdrom.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/BasiliskII/ChangeLog b/BasiliskII/ChangeLog index cb2f19ab..83c93648 100644 --- a/BasiliskII/ChangeLog +++ b/BasiliskII/ChangeLog @@ -22,6 +22,8 @@ V0.8 (snapshot) - - 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] diff --git a/BasiliskII/src/cdrom.cpp b/BasiliskII/src/cdrom.cpp index 71ca0525..0b68e4fb 100644 --- a/BasiliskII/src/cdrom.cpp +++ b/BasiliskII/src/cdrom.cpp @@ -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;