summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2026-01-05 23:28:14 -0500
committer arbee <rb6502@users.noreply.github.com>2026-01-05 23:28:14 -0500
commit4b5e859c1e4144492fa9d7ccf773ad39d398cecf (patch)
treedcd4f746675514c3e90920ae592b2375de47576e
parent9df9ccb05af4212a945e732a1718e1f27bbc2dc9 (diff)
nscsi/cd.cpp: Add the external version of the AppleCDSC. (Github #14779) [R. Belmont]
-rw-r--r--src/devices/bus/a2bus/a2scsi.cpp16
-rw-r--r--src/devices/bus/nscsi/cd.cpp25
-rw-r--r--src/devices/bus/nscsi/cd.h12
3 files changed, 42 insertions, 11 deletions
diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp
index 3a8aac86b54..2085a2730c7 100644
--- a/src/devices/bus/a2bus/a2scsi.cpp
+++ b/src/devices/bus/a2bus/a2scsi.cpp
@@ -33,8 +33,11 @@
#include "emu.h"
#include "a2scsi.h"
+
#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
+
+#include "softlist_dev.h"
#include "speaker.h"
/***************************************************************************
@@ -66,18 +69,9 @@ 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, "speaker", 2).front();
-
NSCSI_BUS(config, m_scsibus);
NSCSI_CONNECTOR(config, "scsibus:0", default_scsi_devices, nullptr, 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, "^^speaker", 1.0, 0);
- device->subdevice<cdda_device>("cdda")->add_route(1, "^^speaker", 1.0, 1);
- });
+ NSCSI_CONNECTOR(config, "scsibus:1", default_scsi_devices, "aplcdsc_ext", false);
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);
@@ -86,6 +80,8 @@ void a2bus_scsi_device::device_add_mconfig(machine_config &config)
NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr5380", NCR5380).machine_config([this](device_t *device) {
downcast<ncr5380_device &>(*device).drq_handler().set(*this, FUNC(a2bus_scsi_device::drq_w));
});
+
+// SOFTWARE_LIST(config, "cd_apple_dev").set_original("apple_devcd");
}
//-------------------------------------------------
diff --git a/src/devices/bus/nscsi/cd.cpp b/src/devices/bus/nscsi/cd.cpp
index 3a96bc3ae6c..d64a4c1c312 100644
--- a/src/devices/bus/nscsi/cd.cpp
+++ b/src/devices/bus/nscsi/cd.cpp
@@ -7,6 +7,7 @@
#include "coreutil.h"
#include "multibyte.h"
+#include "speaker.h"
#define VERBOSE (0)
#include "logmacro.h"
@@ -22,6 +23,7 @@ DEFINE_DEVICE_TYPE(NSCSI_XM5401SUN, nscsi_toshiba_xm5401_sun_device, "nxm5401sun
DEFINE_DEVICE_TYPE(NSCSI_XM5701, nscsi_toshiba_xm5701_device, "nxm5701", "XM-5701B 12x CD-ROM (New)")
DEFINE_DEVICE_TYPE(NSCSI_XM5701SUN, nscsi_toshiba_xm5701_sun_device, "nxm5701sun", "XM-5701B Sun 12x CD-ROM (New)")
DEFINE_DEVICE_TYPE(NSCSI_CDROM_APPLE, nscsi_cdrom_apple_device, "scsi_cdrom_apple", "Apple SCSI CD-ROM")
+DEFINE_DEVICE_TYPE(NSCSI_CDROM_APPLE_EXT, nscsi_cdrom_apple_ext_device, "scsi_cdrom_apple_ext", "Apple SCSI CD-ROM (external)")
// ZuluSCSI/BlueSCSI toolbox commands. All are 10 bytes as of protocol version 0.
static constexpr uint8_t TOOLBOX_LIST_FILES = 0xd0;
@@ -88,12 +90,22 @@ 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-8002 ", "1.8g", 0x00, 0x05),
+ nscsi_cdrom_apple_device(mconfig, NSCSI_CDROM_APPLE, tag, owner, 0)
+{
+}
+
+nscsi_cdrom_apple_device::nscsi_cdrom_apple_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
+ nscsi_cdrom_device(mconfig, type, tag, owner, clock),
m_stopped(true),
m_stop_position(0)
{
}
+nscsi_cdrom_apple_ext_device::nscsi_cdrom_apple_ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ nscsi_cdrom_apple_device(mconfig, NSCSI_CDROM_APPLE_EXT, tag, owner, clock)
+{
+}
+
nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: nscsi_full_device(mconfig, type, tag, owner, clock)
, image(*this, "image")
@@ -1746,3 +1758,14 @@ void nscsi_cdrom_apple_device::scsi_put_data(int id, int pos, uint8_t data)
}
}
+
+void nscsi_cdrom_apple_ext_device::device_add_mconfig(machine_config &config)
+{
+ nscsi_cdrom_apple_device::device_add_mconfig(config);
+
+ SPEAKER(config, "cdrom_speaker_l").front_left();
+ SPEAKER(config, "cdrom_speaker_r").front_right();
+ const auto cdda = subdevice<cdda_device>("cdda");
+ cdda->add_route(0, "cdrom_speaker_l", 1.0, 0);
+ cdda->add_route(1, "cdrom_speaker_r", 1.0, 0);
+}
diff --git a/src/devices/bus/nscsi/cd.h b/src/devices/bus/nscsi/cd.h
index 3c4fda34862..a177bcd4a2e 100644
--- a/src/devices/bus/nscsi/cd.h
+++ b/src/devices/bus/nscsi/cd.h
@@ -143,6 +143,8 @@ public:
virtual void device_start() override ATTR_COLD;
protected:
+ nscsi_cdrom_apple_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
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;
@@ -153,6 +155,15 @@ private:
uint32_t m_stop_position;
};
+class nscsi_cdrom_apple_ext_device : public nscsi_cdrom_apple_device
+{
+public:
+ nscsi_cdrom_apple_ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+protected:
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
+};
+
DECLARE_DEVICE_TYPE(NSCSI_CDROM, nscsi_cdrom_device)
DECLARE_DEVICE_TYPE(NSCSI_CDROM_SGI, nscsi_cdrom_sgi_device)
DECLARE_DEVICE_TYPE(NSCSI_CDROM_NEWS, nscsi_cdrom_news_device)
@@ -164,5 +175,6 @@ DECLARE_DEVICE_TYPE(NSCSI_XM5401SUN, nscsi_toshiba_xm5401_sun_device)
DECLARE_DEVICE_TYPE(NSCSI_XM5701, nscsi_toshiba_xm5701_device)
DECLARE_DEVICE_TYPE(NSCSI_XM5701SUN, nscsi_toshiba_xm5701_sun_device)
DECLARE_DEVICE_TYPE(NSCSI_CDROM_APPLE, nscsi_cdrom_apple_device)
+DECLARE_DEVICE_TYPE(NSCSI_CDROM_APPLE_EXT, nscsi_cdrom_apple_ext_device)
#endif // MAME_BUS_NSCSI_CD_H