summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/a2bus/a2scsi.cpp14
-rw-r--r--src/devices/bus/nscsi/cd.cpp531
-rw-r--r--src/devices/bus/nscsi/cd.h6
-rw-r--r--src/mame/apple/f108.cpp10
-rw-r--r--src/mame/apple/mac128.cpp16
-rw-r--r--src/mame/apple/macii.cpp8
-rw-r--r--src/mame/apple/maciici.cpp10
-rw-r--r--src/mame/apple/maciifx.cpp10
-rw-r--r--src/mame/apple/maciivx.cpp10
-rw-r--r--src/mame/apple/maclc.cpp10
-rw-r--r--src/mame/apple/maclc3.cpp18
-rw-r--r--src/mame/apple/macpdm.cpp23
-rw-r--r--src/mame/apple/macquadra605.cpp10
-rw-r--r--src/mame/apple/macquadra700.cpp10
-rw-r--r--src/mame/apple/macquadra800.cpp10
15 files changed, 572 insertions, 124 deletions
diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp
index af6af4ad3fb..cebfbd31565 100644
--- a/src/devices/bus/a2bus/a2scsi.cpp
+++ b/src/devices/bus/a2bus/a2scsi.cpp
@@ -33,7 +33,9 @@
#include "emu.h"
#include "a2scsi.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
+#include "speaker.h"
/***************************************************************************
PARAMETERS
@@ -64,9 +66,19 @@ ROM_END
void a2bus_scsi_device::device_add_mconfig(machine_config &config)
{
+ // These machines were strictly external CD-ROMs so sound didn't route back into them; the AppleCD SC had
+ // RCA jacks for connection to speakers/a stereo.
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
NSCSI_BUS(config, m_scsibus);
NSCSI_CONNECTOR(config, "scsibus:0", default_scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:1", default_scsi_devices, "aplcdsc", false);
+ NSCSI_CONNECTOR(config, "scsibus:1").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0);
+ });
NSCSI_CONNECTOR(config, "scsibus:2", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsibus:3", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsibus:4", default_scsi_devices, nullptr, false);
diff --git a/src/devices/bus/nscsi/cd.cpp b/src/devices/bus/nscsi/cd.cpp
index 4a320f1376c..7d426a7de0d 100644
--- a/src/devices/bus/nscsi/cd.cpp
+++ b/src/devices/bus/nscsi/cd.cpp
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
#include "emu.h"
+#include "coreutil.h"
#include "bus/nscsi/cd.h"
#define VERBOSE 0
@@ -70,7 +71,9 @@ nscsi_toshiba_xm5701_sun_device::nscsi_toshiba_xm5701_sun_device(const machine_c
// drive identifies as an original Apple CDSC (Sony CDU-8001 with custom firmware)
nscsi_cdrom_apple_device::nscsi_cdrom_apple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- nscsi_cdrom_device(mconfig, NSCSI_CDROM_APPLE, tag, owner, "Sony", "CD-ROM CDU-8001", "1.0", 0x00, 0x05)
+ nscsi_cdrom_device(mconfig, NSCSI_CDROM_APPLE, tag, owner, "SONY ", "CD-ROM CDU-8002 ", "1.8g", 0x00, 0x05),
+ m_stopped(true),
+ m_stop_position(0)
{
}
@@ -107,6 +110,7 @@ void nscsi_cdrom_device::device_reset()
void nscsi_cdrom_device::device_add_mconfig(machine_config &config)
{
CDROM(config, image).set_interface("cdrom");
+
CDDA(config, cdda).set_cdrom_tag(image);
}
@@ -786,14 +790,14 @@ void nscsi_cdrom_device::scsi_command()
// TODO: Index isn't accounted for at all
const uint32_t start_track = scsi_cmdbuf[4];
const uint32_t end_track = cdda_sotc ? start_track : std::min(image->get_last_track(), (int)scsi_cmdbuf[7]);
- const uint32_t m_lba = image->get_track_start(start_track - 1);
- const uint32_t m_blocks = image->get_track_start(end_track) - m_lba;
- const uint32_t track = image->get_track(m_lba);
+ const uint32_t lba = image->get_track_start(start_track - 1);
+ const uint32_t blocks = image->get_track_start(end_track) - lba;
+ const uint32_t track = image->get_track(lba);
if(image->get_track_type(track) == cdrom_file::CD_TRACK_AUDIO) {
- LOG("Playing %d blocks from track %d (lba %d)\n", m_blocks, start_track, m_lba);
+ LOG("Playing %d blocks from track %d (lba %d)\n", blocks, start_track, lba);
- cdda->start_audio(m_lba, m_blocks);
+ cdda->start_audio(lba, blocks);
scsi_status_complete(SS_GOOD);
sense(false, SK_NO_SENSE, 0x00, 0x11);
} else {
@@ -874,18 +878,29 @@ bool nscsi_cdrom_sgi_device::scsi_command_done(uint8_t command, uint8_t length)
}
}
+// Apple CDSC commands, from AppleCDSC.aii in IIgs System 6.0.1.
+// These are related to the Sony CDU-541 commands but customized by Apple.
enum apple_scsi_command_e : uint8_t {
+ APPLE_EJECT = 0xc0,
APPLE_READ_TOC = 0xc1,
APPLE_READ_SUB_CHANNEL = 0xc2,
- APPLE_READ_HEADER = 0xc3,
- APPLE_PLAYBACK_STATUS = 0xc4,
- APPLE_PAUSE = 0xc5,
- APPLE_PLAY_TRACK = 0xc6,
- APPLE_PLAY_MSF = 0xc7,
- APPLE_PLAY_AUDIO = 0xc8,
- APPLE_PLAYBACK_CONTROL = 0xc9
+ APPLE_AUDIO_PLAY = 0xc8,
+ APPLE_AUDIO_PLAY_TRACK = 0xc9,
+ APPLE_AUDIO_PAUSE = 0xca,
+ APPLE_AUDIO_STOP = 0xcb,
+ APPLE_AUDIO_STATUS = 0xcc,
+ APPLE_AUDIO_SCAN = 0xcd,
+ APPLE_AUDIO_CONTROL = 0xce
};
+void nscsi_cdrom_apple_device::device_start()
+{
+ nscsi_cdrom_device::device_start();
+
+ save_item(NAME(m_stopped));
+ save_item(NAME(m_stop_position));
+}
+
/*
The Apple II SCSI Card firmware demands that ASC on a failing TEST_UNIT_READY be either 0x28 or 0xb0.
0x28 is MEDIA_CHANGED, 0xb0 is vendor-specific. If the drive returns the normal 0x3A for disc-not-present,
@@ -894,6 +909,15 @@ enum apple_scsi_command_e : uint8_t {
*/
void nscsi_cdrom_apple_device::scsi_command()
{
+ if (scsi_cmdbuf[0] != 8 && scsi_cmdbuf[0] != 0x28 && scsi_cmdbuf[0] != 0 && scsi_cmdbuf[0] != 0x03)
+ {
+ LOG("CD command: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ scsi_cmdbuf[0], scsi_cmdbuf[1], scsi_cmdbuf[2],
+ scsi_cmdbuf[3], scsi_cmdbuf[4], scsi_cmdbuf[5],
+ scsi_cmdbuf[6], scsi_cmdbuf[7], scsi_cmdbuf[8],
+ scsi_cmdbuf[9]);
+ }
+
switch (scsi_cmdbuf[0]) {
case SC_TEST_UNIT_READY:
LOG("command TEST UNIT READY (AppleCD)\n");
@@ -908,90 +932,405 @@ void nscsi_cdrom_apple_device::scsi_command()
}
break;
- case APPLE_READ_TOC: {
- u16 size = (scsi_cmdbuf[7] << 7) | scsi_cmdbuf[8];
- bool msf = false; // TODO: LBAMSF bit from Page Code Eight parameter block
+ case SC_INQUIRY:
+ {
+ int lun = get_lun(scsi_cmdbuf[1] >> 5);
+ LOG("command INQUIRY lun=%d EVPD=%d page=%d alloc=%02x link=%02x\n",
+ lun, scsi_cmdbuf[1] & 1, scsi_cmdbuf[2], scsi_cmdbuf[4], scsi_cmdbuf[5]);
+
+ int page = scsi_cmdbuf[2];
+ int size = scsi_cmdbuf[4];
+ switch (page)
+ {
+ case 0:
+ std::fill_n(scsi_cmdbuf, size, 0);
+
+ // data taken from the ROM of an AppleCD 150
+ scsi_cmdbuf[0] = 0x05; // device is present, device is CD/DVD (MMC-3)
+ scsi_cmdbuf[1] = 0x80; // media is removable
+ scsi_cmdbuf[2] = 0x01;
+ scsi_cmdbuf[3] = 0x01;
+ scsi_cmdbuf[4] = 0x31; // additional length
+ strncpy((char *)&scsi_cmdbuf[8], "SONY ", 8);
+ strncpy((char *)&scsi_cmdbuf[16], "CD-ROM CDU-8002 ", 16);
+ strncpy((char *)&scsi_cmdbuf[32], "1.8g", 4);
+ scsi_cmdbuf[39] = 0xd0;
+ scsi_cmdbuf[40] = 0x90;
+ scsi_cmdbuf[41] = 0x27;
+ scsi_cmdbuf[42] = 0x3e;
+ scsi_cmdbuf[43] = 0x01;
+ scsi_cmdbuf[44] = 0x04;
+ scsi_cmdbuf[45] = 0x91;
+ scsi_cmdbuf[47] = 0x18;
+ scsi_cmdbuf[48] = 0x06;
+ scsi_cmdbuf[49] = 0xf0;
+ scsi_cmdbuf[50] = 0xfe;
+
+ scsi_data_in(SBUF_MAIN, size);
+ break;
+ }
+ scsi_status_complete(SS_GOOD);
+ }
+ break;
- LOG("command READ TOC (AppleCD), size=%d, msf=%d\n", size, msf);
+ case APPLE_READ_TOC:
+ {
+ if (!image->exists())
+ {
+ return_no_cd();
+ break;
+ }
- if(!image->exists()) {
+ u16 size = (scsi_cmdbuf[7] << 8) | scsi_cmdbuf[8];
+ LOG("command READ TOC (AppleCD), size=%d, track=%d, type1=%02x type2=%02x\n", size, scsi_cmdbuf[2], scsi_cmdbuf[9], scsi_cmdbuf[5]);
+
+ if (scsi_cmdbuf[9] == 0x80)
+ {
+ // get TOC info for 1 or more tracks from a specified starting track
+ assert(scsi_cmdbuf[5] > 0);
+
+ const int start_track = scsi_cmdbuf[5] - 1;
+ const int num_trks = size / 4;
+ int pos = 0;
+
+ for (int trk = 0; trk < num_trks; trk++)
+ {
+ const uint32_t start_lba = image->get_track_start(trk + start_track);
+ const uint32_t start_frame = to_msf(start_lba);
+
+ scsi_cmdbuf[pos++] = image->get_adr_control(trk + start_track);
+ scsi_cmdbuf[pos++] = dec_2_bcd(BIT(start_frame, 16, 8)); // minutes
+ scsi_cmdbuf[pos++] = dec_2_bcd(BIT(start_frame, 8, 8)); // seconds
+ scsi_cmdbuf[pos++] = dec_2_bcd(BIT(start_frame, 0, 8)); // frames
+ }
+
+ scsi_data_in(SBUF_MAIN, pos);
+ scsi_status_complete(SS_GOOD);
+ }
+ else if (scsi_cmdbuf[9] == 0x40) // get MSF of the start of the leadout
+ {
+ const int track = image->get_last_track();
+ const uint32_t frame = to_msf(image->get_track_start(track));
+ scsi_cmdbuf[0] = dec_2_bcd(BIT(frame, 16, 8)); // minutes
+ scsi_cmdbuf[1] = dec_2_bcd(BIT(frame, 8, 8)); // seconds
+ scsi_cmdbuf[2] = dec_2_bcd(BIT(frame, 0, 8)); // frames
+ scsi_cmdbuf[3] = 0;
+
+ scsi_data_in(SBUF_MAIN, 4);
+ scsi_status_complete(SS_GOOD);
+ }
+ else
+ {
+ switch (scsi_cmdbuf[5])
+ {
+ case 0x00: // get start and end track numbers
+ scsi_cmdbuf[0] = 1;
+ scsi_cmdbuf[1] = dec_2_bcd(image->get_last_track());
+ scsi_cmdbuf[2] = 0;
+ scsi_cmdbuf[3] = 0;
+
+ scsi_data_in(SBUF_MAIN, 4);
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case 0x40: // get first frame of lead-out (one past end of last track)
+ {
+ const uint32_t leadout_lba = image->get_track_start(0xaa);
+ const uint32_t leadout_frame = to_msf(leadout_lba);
+ scsi_cmdbuf[0] = dec_2_bcd(BIT(leadout_frame, 16, 8)); // minutes
+ scsi_cmdbuf[1] = dec_2_bcd(BIT(leadout_frame, 8, 8)); // seconds
+ scsi_cmdbuf[2] = dec_2_bcd(BIT(leadout_frame, 0, 8)); // frames
+ scsi_cmdbuf[3] = 0;
+
+ scsi_data_in(SBUF_MAIN, 4);
+ scsi_status_complete(SS_GOOD);
+ }
+ break;
+
+ case 0x80: // get track info
+ {
+ const uint32_t start_lba = image->get_track_start(scsi_cmdbuf[2]);
+ const uint32_t start_frame = to_msf(start_lba);
+
+ scsi_cmdbuf[0] = image->get_adr_control(scsi_cmdbuf[2]);
+ scsi_cmdbuf[1] = dec_2_bcd(BIT(start_frame, 16, 8)); // minutes
+ scsi_cmdbuf[2] = dec_2_bcd(BIT(start_frame, 8, 8)); // seconds
+ scsi_cmdbuf[3] = dec_2_bcd(BIT(start_frame, 0, 8)); // frames
+ scsi_data_in(SBUF_MAIN, 4);
+ scsi_status_complete(SS_GOOD);
+ }
+ break;
+
+ default:
+ logerror("APPLE READ TOC: Unhandled type %02x\n", scsi_cmdbuf[5]);
+ break;
+ }
+ }
+ }
+ break;
+
+ case APPLE_AUDIO_STATUS:
+ LOG("command APPLE AUDIO STATUS, type %02x, want %d bytes\n", scsi_cmdbuf[3], scsi_cmdbuf[8]);
+
+ if (!image->exists())
+ {
return_no_cd();
break;
}
- int pos = 0;
+ // Audio status codes, adapted from CDRemote.equ in GS/OS 6.0.1 (matches CDU-541 as well)
+ enum cd_status_t: u8
+ {
+ PLAYING = 0, // Audio is playing
+ PAUSED, // Audio is paused
+ PLAYING_MUTED, // Playing, but muted
+ REACHED_END, // Playback reached the end successfully
+ ERROR, // an error occured
+ VOID // really "idle"
+ };
- int start_track = scsi_cmdbuf[5];
- int end_track = image->get_last_track();
+ {
+ const int type = scsi_cmdbuf[3];
+
+ scsi_cmdbuf[2] = image->get_adr_control(image->get_track(cdda->get_audio_lba()));
+
+ const uint32_t frame = to_msf(cdda->get_audio_lba());
+ scsi_cmdbuf[3] = dec_2_bcd(BIT(frame, 16, 8)); // minute
+ scsi_cmdbuf[4] = dec_2_bcd(BIT(frame, 8, 8)); // second
+ scsi_cmdbuf[5] = dec_2_bcd(BIT(frame, 0, 8)); // frame
+
+ // TODO: When you pause, both 7.1's CD Remote and 7.6+'s more modern player still see the
+ // status as "playing" even though it's definitely returning "paused". I've tried returning
+ // every code and nothing works.
+ if (type == 0)
+ {
+ scsi_cmdbuf[1] = 0;
+ if (m_stopped)
+ {
+ scsi_cmdbuf[0] = VOID;
+ }
+ else
+ {
+ if (cdda->audio_ended())
+ {
+ scsi_cmdbuf[0] = REACHED_END;
+ }
+ else
+ {
+ if (cdda->audio_active())
+ {
+ if (cdda->audio_paused())
+ {
+ scsi_cmdbuf[0] = PAUSED;
+ }
+ else
+ {
+ scsi_cmdbuf[0] = PLAYING;
+ }
+ }
+ else
+ {
+ scsi_cmdbuf[0] = VOID;
+ }
+ }
+ }
+ }
+ else if (type == 1) // "volume status"
+ {
+ scsi_cmdbuf[0] = (u8)(cdda->output_gain(0) * 255.0f);
+ scsi_cmdbuf[1] = (u8)(cdda->output_gain(1) * 255.0f);
- int tracks;
- if(start_track == 0)
- tracks = end_track + 1;
- else if(start_track <= end_track)
- tracks = (end_track - start_track) + 2;
- else if(start_track <= 0xaa)
- tracks = 1;
- else
- tracks = 0;
-
- int len = 2 + (tracks * 8);
-
- // the returned TOC DATA LENGTH must be the full amount,
- // regardless of how much we're able to pass back due to size
- scsi_cmdbuf[pos++] = (len>>8) & 0xff;
- scsi_cmdbuf[pos++] = (len & 0xff);
- scsi_cmdbuf[pos++] = 1;
- scsi_cmdbuf[pos++] = image->get_last_track();
-
- if (start_track == 0)
- start_track = 1;
-
- for(int i = 0; i < tracks; i++) {
- int track = start_track + i;
- int cdrom_track = track - 1;
- if(i == tracks-1) {
- track = 0xaa;
- cdrom_track = 0xaa;
+ // Other 4 bytes unknown in this mode, going with the same as type 0 for now
}
+ }
+ //printf("status => %02x %02x %02x %02x %02x %02x\n", scsi_cmdbuf[0], scsi_cmdbuf[1], scsi_cmdbuf[2], scsi_cmdbuf[3], scsi_cmdbuf[4], scsi_cmdbuf[5]);
+ scsi_cmdbuf[0] = 0;
+ scsi_data_in(SBUF_MAIN, 6);
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case APPLE_READ_SUB_CHANNEL:
+ LOG("command READ SUB CHANNEL\n");
+
+ scsi_cmdbuf[0] = 0; // Control nibble
+ scsi_cmdbuf[1] = 0; // Track
+ scsi_cmdbuf[2] = 0; // Index
+ scsi_cmdbuf[3] = 0; // Relative Minute
+ scsi_cmdbuf[4] = 0; // Relative Second
+ scsi_cmdbuf[5] = 0; // Relative Frame
+ scsi_cmdbuf[6] = 0; // AMinute
+ scsi_cmdbuf[7] = 0; // ASecond
+ scsi_cmdbuf[8] = 0; // AFrame
+
+ if (cdda->audio_active())
+ {
+ int track = image->get_track(cdda->get_audio_lba());
+ scsi_cmdbuf[1] = dec_2_bcd(track+1);
+ scsi_cmdbuf[2] = 1; // Index
- scsi_cmdbuf[pos++] = track;
- scsi_cmdbuf[pos++] = image->get_adr_control(cdrom_track);
+ const uint32_t track_start = image->get_track_start(track);
+ uint32_t cur_lba = cdda->get_audio_lba();
- u32 tstart = image->get_track_start(cdrom_track);
+ if (cur_lba < track_start)
+ {
+ cur_lba = track_start;
+ }
- if(msf)
- tstart = to_msf(tstart+150);
+ const uint32_t relframe = to_msf(cur_lba - track_start);
+ scsi_cmdbuf[3] = dec_2_bcd(BIT(relframe, 16, 8)); // minute
+ scsi_cmdbuf[4] = dec_2_bcd(BIT(relframe, 8, 8)); // second
+ scsi_cmdbuf[5] = dec_2_bcd(BIT(relframe, 0, 8)); // frame
- scsi_cmdbuf[pos++] = (tstart>>24) & 0xff;
- scsi_cmdbuf[pos++] = (tstart>>16) & 0xff;
- scsi_cmdbuf[pos++] = (tstart>>8) & 0xff;
- scsi_cmdbuf[pos++] = (tstart & 0xff);
+ const uint32_t frame = to_msf(cur_lba);
+ scsi_cmdbuf[6] = dec_2_bcd(BIT(frame, 16, 8)); // minute
+ scsi_cmdbuf[7] = dec_2_bcd(BIT(frame, 8, 8)); // second
+ scsi_cmdbuf[8] = dec_2_bcd(BIT(frame, 0, 8)); // frame
}
- if(pos) {
- if(pos > size)
- pos = size;
+ scsi_data_in(SBUF_MAIN, 9);
+ scsi_status_complete(SS_GOOD);
+ break;
- scsi_data_in(0, pos);
+ case APPLE_AUDIO_PLAY:
+ case APPLE_AUDIO_PLAY_TRACK:
+ {
+ const uint8_t val = scsi_cmdbuf[5];
+ const uint8_t start_track = (((val & 0xf0) >> 4) * 10) + (val & 0x0f);
+
+ uint32_t start_lba = 0;
+
+ if (scsi_cmdbuf[0] == APPLE_AUDIO_PLAY)
+ {
+ if (scsi_cmdbuf[9] == 0x40)
+ {
+ LOG("command APPLE AUDIO PLAY MSF = %02x:%02x:%02x\n", scsi_cmdbuf[5], scsi_cmdbuf[6], scsi_cmdbuf[7]);
+ const uint32_t msf = (bcd_2_dec(scsi_cmdbuf[5]) << 16) | (bcd_2_dec(scsi_cmdbuf[6]) << 8) | bcd_2_dec(scsi_cmdbuf[7]);
+ start_lba = cdrom_file::msf_to_lba(msf);
+ }
+ else if (scsi_cmdbuf[9] == 0x80)
+ {
+ LOG("command APPLE AUDIO PLAY track = %d\n", start_track);
+ if (start_track == 0)
+ {
+ cdda->stop_audio();
+ scsi_status_complete(SS_GOOD);
+ return;
+ }
+ else
+ {
+ start_lba = image->get_track_start(start_track - 1);
+ }
+ }
+ else
+ {
+ logerror("nscsi_cdrom_apple_device: Unknown APPLE AUDIO PLAY address mode %02x\n", scsi_cmdbuf[9]);
+ }
+ }
+ else // APPLE_AUDIO_PLAY_TRACK
+ {
+ LOG("command APPLE AUDIO PLAY TRACK track = %d\n", start_track);
+
+ // The Mac version of Apple CD-ROM Explorer issues PLAY on track 0 to stop
+ if (start_track == 0)
+ {
+ cdda->stop_audio();
+ m_stopped = true;
+ scsi_status_complete(SS_GOOD);
+ return;
+ }
+ else
+ {
+ start_lba = image->get_track_start(start_track - 1);
+ m_stop_position = image->get_track_start(start_track);
+ }
+ }
+
+ m_stopped = false;
+ cdda->start_audio(start_lba, m_stop_position - start_lba);
scsi_status_complete(SS_GOOD);
- } else {
- // report unit attention condition
- scsi_status_complete(SS_CHECK_CONDITION);
- sense(false, SK_ILLEGAL_REQUEST);
- break;
}
break;
- }
- case APPLE_READ_SUB_CHANNEL:
- case APPLE_READ_HEADER:
- case APPLE_PLAYBACK_STATUS:
- case APPLE_PAUSE:
- case APPLE_PLAY_TRACK:
- case APPLE_PLAY_MSF:
- case APPLE_PLAY_AUDIO:
- case APPLE_PLAYBACK_CONTROL:
- // TODO
+ case APPLE_AUDIO_SCAN:
+ LOG("command APPLE_AUDIO_SCAN: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ scsi_cmdbuf[0], scsi_cmdbuf[1], scsi_cmdbuf[2],
+ scsi_cmdbuf[3], scsi_cmdbuf[4], scsi_cmdbuf[5],
+ scsi_cmdbuf[6], scsi_cmdbuf[7], scsi_cmdbuf[8],
+ scsi_cmdbuf[9]);
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case APPLE_AUDIO_PAUSE:
+ LOG("command APPLE AUDIO PAUSE, on/off=%02x\n", scsi_cmdbuf[1]);
+ if (scsi_cmdbuf[1] == 0x10)
+ {
+ // set pause
+ if (!cdda->audio_paused())
+ {
+ cdda->pause_audio(1);
+ }
+ }
+ else
+ {
+ // release pause
+ if (cdda->audio_paused())
+ {
+ cdda->pause_audio(0);
+ }
+ }
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case APPLE_AUDIO_STOP:
+ LOG("command APPLE AUDIO STOP\n");
+ switch (scsi_cmdbuf[9])
+ {
+ case 0x00: // stop immediately
+ m_stop_position = 0;
+ m_stopped = true;
+ cdda->stop_audio();
+ break;
+
+ case 0x40: // stop at MSF
+ {
+ const uint32_t msf = (bcd_2_dec(scsi_cmdbuf[5]) << 16) | (bcd_2_dec(scsi_cmdbuf[6]) << 8) | bcd_2_dec(scsi_cmdbuf[7]);
+ m_stop_position = cdrom_file::msf_to_lba(msf);
+ }
+ break;
+
+ case 0x80: // stop at track number
+ {
+ const uint8_t val = scsi_cmdbuf[5];
+ const uint8_t start_track = (((val & 0xf0) >> 4) * 10) + (val & 0x0f);
+ m_stop_position = image->get_track_start(start_track);
+ }
+ break;
+
+ default:
+ logerror("nscsi_cdrom_apple_device: Unknown APPLE AUDIO STOPO address mode %02x\n", scsi_cmdbuf[9]);
+ break;
+ }
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case APPLE_AUDIO_CONTROL:
+ LOG("command APPLE AUDIO CONTROL, size %d\n", scsi_cmdbuf[8]);
+
+ scsi_data_out(3, scsi_cmdbuf[8]);
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case APPLE_EJECT:
+ LOG("command APPLE EJECT\n");
+ cdda->stop_audio();
+ m_stopped = true;
+ scsi_status_complete(SS_GOOD);
+ break;
+
+ case SC_READ_6:
+ case SC_READ_10:
+ case SC_READ_12:
+ cdda->stop_audio();
[[fallthrough]];
default:
@@ -1002,19 +1341,31 @@ void nscsi_cdrom_apple_device::scsi_command()
bool nscsi_cdrom_apple_device::scsi_command_done(uint8_t command, uint8_t length)
{
- switch (command) {
- case APPLE_READ_TOC:
- //case APPLE_READ_SUB_CHANNEL:
- //case APPLE_READ_HEADER:
- //case APPLE_PLAYBACK_STATUS:
- //case APPLE_PAUSE:
- //case APPLE_PLAY_TRACK:
- //case APPLE_PLAY_MSF:
- //case APPLE_PLAY_AUDIO:
- //case APPLE_PLAYBACK_CONTROL:
- return length == 10;
+ switch (command & 0xf0)
+ {
+ case 0xc0:
+ return length == 10;
- default:
- return nscsi_full_device::scsi_command_done(command, length);
+ default:
+ return nscsi_full_device::scsi_command_done(command, length);
}
}
+
+void nscsi_cdrom_apple_device::scsi_put_data(int id, int pos, uint8_t data)
+{
+ if (id != 3)
+ {
+ nscsi_cdrom_device::scsi_put_data(id, pos, data);
+ return;
+ }
+
+ if (pos == 0)
+ {
+ cdda->set_output_gain(0, data / 255.0f);
+ }
+ else if (pos == 1)
+ {
+ cdda->set_output_gain(1, data / 255.0f);
+ }
+
+}
diff --git a/src/devices/bus/nscsi/cd.h b/src/devices/bus/nscsi/cd.h
index 23e75812e1c..274e19f9ab5 100644
--- a/src/devices/bus/nscsi/cd.h
+++ b/src/devices/bus/nscsi/cd.h
@@ -127,10 +127,16 @@ class nscsi_cdrom_apple_device : public nscsi_cdrom_device
{
public:
nscsi_cdrom_apple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ virtual void device_start() override;
protected:
virtual void scsi_command() override;
virtual bool scsi_command_done(uint8_t command, uint8_t length) override;
+ virtual void scsi_put_data(int buf, int offset, uint8_t data) override;
+
+private:
+ bool m_stopped;
+ uint32_t m_stop_position;
};
DECLARE_DEVICE_TYPE(NSCSI_CDROM, nscsi_cdrom_device)
diff --git a/src/mame/apple/f108.cpp b/src/mame/apple/f108.cpp
index fb483562f93..a7df93e9a99 100644
--- a/src/mame/apple/f108.cpp
+++ b/src/mame/apple/f108.cpp
@@ -15,6 +15,7 @@
#include "emu.h"
#include "f108.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/rs232/rs232.h"
@@ -55,8 +56,13 @@ void f108_device::device_add_mconfig(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^^primetimeii:lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^^primetimeii:rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c96", NCR53C96).clock(40_MHz_XTAL).machine_config(
diff --git a/src/mame/apple/mac128.cpp b/src/mame/apple/mac128.cpp
index 1b3dceffcb6..2eb8ab54fd5 100644
--- a/src/mame/apple/mac128.cpp
+++ b/src/mame/apple/mac128.cpp
@@ -90,6 +90,8 @@ Scanline 0 is the start of vblank.
#include "bus/mackbd/mackbd.h"
#include "bus/macpds/hyperdrive.h"
+#include "bus/nscsi/cd.h"
+#include "bus/nscsi/devices.h"
#include "cpu/m68000/m68000.h"
#include "machine/6522via.h"
#include "machine/iwm.h"
@@ -1170,12 +1172,22 @@ void mac128_state::macplus(machine_config &config)
m_mackbd->set_default_option("usp");
// SCSI bus and devices
+ // These machines were strictly external CD-ROMs so sound didn't route back into them; the AppleCD SC had
+ // RCA jacks for connection to speakers/a stereo.
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
NSCSI_BUS(config, m_scsibus);
NSCSI_CONNECTOR(config, "scsibus:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsibus:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsibus:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsibus:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsibus:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr5380", NCR5380).machine_config([this](device_t *device) {
diff --git a/src/mame/apple/macii.cpp b/src/mame/apple/macii.cpp
index 903c8594bc6..78a79e5ab2a 100644
--- a/src/mame/apple/macii.cpp
+++ b/src/mame/apple/macii.cpp
@@ -21,6 +21,7 @@
#include "macscsi.h"
#include "mactoolbox.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/macpds/macpds.h"
#include "bus/nubus/nubus.h"
@@ -1068,8 +1069,11 @@ void mac_state::macii(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config([](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0); });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device)
diff --git a/src/mame/apple/maciici.cpp b/src/mame/apple/maciici.cpp
index e691bc0221e..688a4957099 100644
--- a/src/mame/apple/maciici.cpp
+++ b/src/mame/apple/maciici.cpp
@@ -24,6 +24,7 @@
#include "mactoolbox.h"
#include "rbv.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/nubus/nubus.h"
#include "bus/nubus/cards.h"
@@ -555,8 +556,13 @@ void maciici_state::maciici(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device)
diff --git a/src/mame/apple/maciifx.cpp b/src/mame/apple/maciifx.cpp
index 127c2f4f13f..efe38cece47 100644
--- a/src/mame/apple/maciifx.cpp
+++ b/src/mame/apple/maciifx.cpp
@@ -22,6 +22,7 @@
#include "macscsi.h"
#include "mactoolbox.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/nubus/nubus.h"
#include "bus/nubus/cards.h"
@@ -523,8 +524,13 @@ void maciifx_state::maciifx(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device)
diff --git a/src/mame/apple/maciivx.cpp b/src/mame/apple/maciivx.cpp
index 1d47e7c68c6..a0b03d5d627 100644
--- a/src/mame/apple/maciivx.cpp
+++ b/src/mame/apple/maciivx.cpp
@@ -25,6 +25,7 @@
#include "mactoolbox.h"
#include "vasp.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/nubus/nubus.h"
#include "bus/nubus/cards.h"
@@ -294,8 +295,13 @@ void maciivx_state::maciiv_base(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^vasp:lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^vasp:rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device)
diff --git a/src/mame/apple/maclc.cpp b/src/mame/apple/maclc.cpp
index 9b8caf5807e..4db279cfffa 100644
--- a/src/mame/apple/maclc.cpp
+++ b/src/mame/apple/maclc.cpp
@@ -20,6 +20,7 @@
#include "mactoolbox.h"
#include "v8.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/rs232/rs232.h"
#include "cpu/m68000/m68020.h"
@@ -308,8 +309,13 @@ void maclc_state::maclc_base(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^v8:lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^v8:rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device)
diff --git a/src/mame/apple/maclc3.cpp b/src/mame/apple/maclc3.cpp
index 613c8313409..38503490a32 100644
--- a/src/mame/apple/maclc3.cpp
+++ b/src/mame/apple/maclc3.cpp
@@ -24,6 +24,7 @@
#include "mactoolbox.h"
#include "sonora.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/rs232/rs232.h"
#include "cpu/m68000/m68030.h"
@@ -241,8 +242,13 @@ void macvail_state::maclc3_base(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^sonora:lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^sonora:rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device)
@@ -353,7 +359,7 @@ ROM_END
} // anonymous namespace
-COMP(1993, maclc3, 0, 0, maclc3, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC III", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND)
-COMP(1993, maclc3p, maclc3, 0, maclc3p, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC III+", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND)
-COMP(1993, maclc520, 0, 0, maclc520, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC 520", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND)
-COMP(1994, maclc550, maclc520, 0, maclc550, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC 550", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND)
+COMP(1993, maclc3, 0, 0, maclc3, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC III", MACHINE_SUPPORTS_SAVE )
+COMP(1993, maclc3p, maclc3, 0, maclc3p, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC III+", MACHINE_SUPPORTS_SAVE )
+COMP(1993, maclc520, 0, 0, maclc520, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC 520", MACHINE_SUPPORTS_SAVE )
+COMP(1994, maclc550, maclc520, 0, maclc550, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC 550", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/apple/macpdm.cpp b/src/mame/apple/macpdm.cpp
index 4ade79b0846..2657704153a 100644
--- a/src/mame/apple/macpdm.cpp
+++ b/src/mame/apple/macpdm.cpp
@@ -6,6 +6,7 @@
#include "cuda.h"
#include "macadb.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/nubus/nubus.h"
#include "bus/rs232/rs232.h"
@@ -1101,22 +1102,30 @@ void macpdm_state::macpdm(machine_config &config)
NSCSI_CONNECTOR(config, "scsibus:0", default_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:1", default_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:2", default_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsibus:3", default_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsibus:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0);
+ });
NSCSI_CONNECTOR(config, "scsibus:4", default_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsibus:5", default_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsibus:6", default_scsi_devices, "harddisk");
- NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr53c94", NCR53C94).machine_config([this] (device_t *device) {
- auto &ctrl = downcast<ncr53c94_device &>(*device);
- ctrl.set_clock(ENET_CLOCK/2);
- ctrl.drq_handler_cb().set(*this, FUNC(macpdm_state::scsi_drq));
- ctrl.irq_handler_cb().set(*this, FUNC(macpdm_state::scsi_irq));
- });
+ NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr53c94", NCR53C94).machine_config(
+ [this] (device_t *device)
+ {
+ auto &ctrl = downcast<ncr53c94_device &>(*device);
+ ctrl.set_clock(ENET_CLOCK/2);
+ ctrl.drq_handler_cb().set(*this, FUNC(macpdm_state::scsi_drq));
+ ctrl.irq_handler_cb().set(*this, FUNC(macpdm_state::scsi_irq));
+ });
SOFTWARE_LIST(config, "flop_mac35_orig").set_original("mac_flop_orig");
SOFTWARE_LIST(config, "flop_mac35_clean").set_original("mac_flop_clcracked");
SOFTWARE_LIST(config, "flop35_list").set_original("mac_flop");
SOFTWARE_LIST(config, "flop35hd_list").set_original("mac_hdflop");
SOFTWARE_LIST(config, "hdd_list").set_original("mac_hdd");
+ SOFTWARE_LIST(config, "cd_list").set_original("mac_cdrom").set_filter("PPC601");
SWIM3(config, m_fdc, IO_CLOCK);
m_fdc->irq_cb().set(FUNC(macpdm_state::fdc_irq));
diff --git a/src/mame/apple/macquadra605.cpp b/src/mame/apple/macquadra605.cpp
index a9adfbe37c4..f753401e427 100644
--- a/src/mame/apple/macquadra605.cpp
+++ b/src/mame/apple/macquadra605.cpp
@@ -23,6 +23,7 @@
#include "macadb.h"
#include "mactoolbox.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/rs232/rs232.h"
#include "cpu/m68000/m68040.h"
@@ -183,8 +184,13 @@ void quadra605_state::macqd605(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^primetime:lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^primetime:rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c96", NCR53C96).clock(40_MHz_XTAL).machine_config(
diff --git a/src/mame/apple/macquadra700.cpp b/src/mame/apple/macquadra700.cpp
index 3045e8567af..c38b61e1b02 100644
--- a/src/mame/apple/macquadra700.cpp
+++ b/src/mame/apple/macquadra700.cpp
@@ -17,6 +17,7 @@
#include "macrtc.h"
#include "mactoolbox.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/nubus/cards.h"
#include "bus/nubus/nubus.h"
@@ -573,8 +574,13 @@ void macquadra_state::macqd700(machine_config &config)
NSCSI_CONNECTOR(config, "scsi1:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi1:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi1:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi1:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi1:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi1:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi1:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi1:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi1:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi1:7").option_set("ncr53c96", NCR53C96).clock(50_MHz_XTAL / 2).machine_config(
diff --git a/src/mame/apple/macquadra800.cpp b/src/mame/apple/macquadra800.cpp
index 60d5c690fdc..f98fe7aa6ca 100644
--- a/src/mame/apple/macquadra800.cpp
+++ b/src/mame/apple/macquadra800.cpp
@@ -25,6 +25,7 @@
#include "macadb.h"
#include "mactoolbox.h"
+#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
#include "bus/nubus/cards.h"
#include "bus/nubus/nubus.h"
@@ -177,8 +178,13 @@ void quadra800_state::macqd800(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:3", mac_scsi_devices, nullptr);
- NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, "cdrom");
+ NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config(
+ [](device_t *device)
+ {
+ device->subdevice<cdda_device>("cdda")->add_route(0, "^^iosb:lspeaker", 1.0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, "^^iosb:rspeaker", 1.0);
+ });
+ NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr);
NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk");
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c96", NCR53C96).clock(40_MHz_XTAL).machine_config(