diff options
| author | 2025-02-17 20:57:01 +0000 | |
|---|---|---|
| committer | 2025-02-17 21:01:42 +0000 | |
| commit | 99eef83e3bd93bc7962e48753adec678395bf6a3 (patch) | |
| tree | 725275eec694913935d10ec2a8fbd3baca9a00e4 /src | |
| parent | e5609acf4bbad3c56591ef98630174f828e3c887 (diff) | |
Attempt at implementing unit attention how software needs it to be rather than any standards & removed ATAPI_FIXED_CDROM & ATAPI_FIXED_DVDROM. [smf]
Diffstat (limited to 'src')
| -rw-r--r-- | src/devices/bus/ata/atapicdr.cpp | 38 | ||||
| -rw-r--r-- | src/devices/bus/ata/atapicdr.h | 21 | ||||
| -rw-r--r-- | src/mame/konami/firebeat.cpp | 4 | ||||
| -rw-r--r-- | src/mame/konami/stingnet.cpp | 8 | ||||
| -rw-r--r-- | src/mame/merit/mtouchxl.cpp | 12 | ||||
| -rw-r--r-- | src/mame/namco/namcos12_cdxa.cpp | 6 | ||||
| -rw-r--r-- | src/mame/nichibutsu/hrdvd.cpp | 4 | ||||
| -rw-r--r-- | src/mame/sinclair/sprinter.cpp | 4 |
8 files changed, 20 insertions, 77 deletions
diff --git a/src/devices/bus/ata/atapicdr.cpp b/src/devices/bus/ata/atapicdr.cpp index 3b035b1b503..ec6dbcd5e59 100644 --- a/src/devices/bus/ata/atapicdr.cpp +++ b/src/devices/bus/ata/atapicdr.cpp @@ -10,9 +10,7 @@ // device type definition DEFINE_DEVICE_TYPE(ATAPI_CDROM, atapi_cdrom_device, "cdrom", "ATAPI CD-ROM") -DEFINE_DEVICE_TYPE(ATAPI_FIXED_CDROM, atapi_fixed_cdrom_device, "cdrom_fixed", "ATAPI fixed CD-ROM") DEFINE_DEVICE_TYPE(ATAPI_DVDROM, atapi_dvdrom_device, "dvdrom", "ATAPI CD/DVD-ROM") -DEFINE_DEVICE_TYPE(ATAPI_FIXED_DVDROM, atapi_fixed_dvdrom_device, "dvdrom_fixed", "ATAPI fixed CD/DVD-ROM") atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : atapi_cdrom_device(mconfig, ATAPI_CDROM, tag, owner, clock) @@ -26,33 +24,18 @@ atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, device_typ { } -atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : - atapi_cdrom_device(mconfig, type, tag, owner, clock) -{ -} - -atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - atapi_fixed_cdrom_device(mconfig, ATAPI_FIXED_CDROM, tag, owner, clock) -{ -} - atapi_dvdrom_device::atapi_dvdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : atapi_cdrom_device(mconfig, ATAPI_DVDROM, tag, owner, clock) { } -atapi_fixed_dvdrom_device::atapi_fixed_dvdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - atapi_cdrom_device(mconfig, ATAPI_FIXED_DVDROM, tag, owner, clock) -{ -} - //------------------------------------------------- // device_add_mconfig - add device configuration //------------------------------------------------- void atapi_cdrom_device::device_add_mconfig(machine_config &config) { - if(type() == ATAPI_DVDROM || type() == ATAPI_FIXED_DVDROM) + if(type() == ATAPI_DVDROM) DVDROM(config, "image").set_interface("cdrom"); else if(type() == ATAPI_GDROM) GDROM(config, "image").set_interface("cdrom"); @@ -115,13 +98,6 @@ void atapi_cdrom_device::device_reset() m_sequence_counter = m_image->sequence_counter(); } -void atapi_fixed_cdrom_device::device_reset() -{ - atapi_hle_device::device_reset(); - m_media_change = false; - m_sequence_counter = m_image->sequence_counter(); -} - void atapi_dvdrom_device::device_reset() { atapi_hle_device::device_reset(); @@ -129,13 +105,6 @@ void atapi_dvdrom_device::device_reset() m_sequence_counter = m_image->sequence_counter(); } -void atapi_fixed_dvdrom_device::device_reset() -{ - atapi_hle_device::device_reset(); - m_media_change = false; - m_sequence_counter = m_image->sequence_counter(); -} - void atapi_cdrom_device::process_buffer() { if( m_sequence_counter != m_image->sequence_counter() ) @@ -188,10 +157,15 @@ void atapi_cdrom_device::ExecCommand() m_sense_asc = SCSI_SENSE_ASC_NOT_READY_TO_READY_TRANSITION; m_status_code = SCSI_STATUS_CODE_CHECK_CONDITION; m_transfer_length = 0; + + if (command[0] == T10SPC_CMD_TEST_UNIT_READY || // amiga(idefix97)/firebeat/namcos12/sprinter + command[0] == T10SPC_CMD_MODE_SENSE_10) // stingnet + m_media_change = false; return; } break; case T10SPC_CMD_INQUIRY: + m_media_change = false; // mtouchxl(mitsumi) break; case T10SPC_CMD_REQUEST_SENSE: m_media_change = false; diff --git a/src/devices/bus/ata/atapicdr.h b/src/devices/bus/ata/atapicdr.h index c988b748c97..00d17a350b5 100644 --- a/src/devices/bus/ata/atapicdr.h +++ b/src/devices/bus/ata/atapicdr.h @@ -66,16 +66,6 @@ private: virtual void set_pdiag_out(int state) override { device_ata_interface::set_pdiag(state); } }; -class atapi_fixed_cdrom_device : public atapi_cdrom_device -{ -public: - atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - -protected: - atapi_fixed_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - virtual void device_reset() override ATTR_COLD; -}; - class atapi_dvdrom_device : public atapi_cdrom_device { public: @@ -85,19 +75,8 @@ protected: virtual void device_reset() override ATTR_COLD; }; -class atapi_fixed_dvdrom_device : public atapi_cdrom_device -{ -public: - atapi_fixed_dvdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - -protected: - virtual void device_reset() override ATTR_COLD; -}; - // device type definition DECLARE_DEVICE_TYPE(ATAPI_CDROM, atapi_cdrom_device) -DECLARE_DEVICE_TYPE(ATAPI_FIXED_CDROM, atapi_fixed_cdrom_device) DECLARE_DEVICE_TYPE(ATAPI_DVDROM, atapi_dvdrom_device) -DECLARE_DEVICE_TYPE(ATAPI_FIXED_DVDROM, atapi_fixed_dvdrom_device) #endif // MAME_BUS_ATA_ATAPICDR_H diff --git a/src/mame/konami/firebeat.cpp b/src/mame/konami/firebeat.cpp index 2ea788f405c..3930b129640 100644 --- a/src/mame/konami/firebeat.cpp +++ b/src/mame/konami/firebeat.cpp @@ -382,8 +382,8 @@ struct IBUTTON /*****************************************************************************/ static void firebeat_ata_devices(device_slot_interface &device) { - device.option_add("cdrom", ATAPI_FIXED_CDROM); - device.option_add("dvdrom", ATAPI_FIXED_DVDROM); + device.option_add("cdrom", ATAPI_CDROM); + device.option_add("dvdrom", ATAPI_DVDROM); device.option_add("hdd", IDE_HARDDISK); } diff --git a/src/mame/konami/stingnet.cpp b/src/mame/konami/stingnet.cpp index 932e3bd2332..37ed17f5ebc 100644 --- a/src/mame/konami/stingnet.cpp +++ b/src/mame/konami/stingnet.cpp @@ -43,11 +43,11 @@ // This must be outside of the namespace DECLARE_DEVICE_TYPE(STINGNET_ATAPI_CDROM, stingnet_cdr) -class stingnet_cdr : public atapi_fixed_cdrom_device +class stingnet_cdr : public atapi_cdrom_device { public: stingnet_cdr(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : atapi_fixed_cdrom_device(mconfig, STINGNET_ATAPI_CDROM, tag, owner, clock) + : atapi_cdrom_device(mconfig, STINGNET_ATAPI_CDROM, tag, owner, clock) { } @@ -56,7 +56,7 @@ public: m_sector_timer = timer_alloc(FUNC(stingnet_cdr::sector_tick), this); m_sector_timer->adjust(attotime::never); - atapi_fixed_cdrom_device::device_start(); + atapi_cdrom_device::device_start(); } // atapicdr has zero delay between the end of a sector and the completion of the next. @@ -75,7 +75,7 @@ public: TIMER_CALLBACK_MEMBER(sector_tick) { m_sector_timer->adjust(attotime::never); - atapi_fixed_cdrom_device::fill_buffer(); + atapi_cdrom_device::fill_buffer(); } private: diff --git a/src/mame/merit/mtouchxl.cpp b/src/mame/merit/mtouchxl.cpp index 43217b12f67..2b0775357e3 100644 --- a/src/mame/merit/mtouchxl.cpp +++ b/src/mame/merit/mtouchxl.cpp @@ -203,7 +203,7 @@ void mtxl_state::machine_reset() #ifndef REAL_PCI_CHIPSET static void mt6k_ata_devices(device_slot_interface &device) { - device.option_add("cdrom", ATAPI_FIXED_CDROM); + device.option_add("cdrom", ATAPI_CDROM); device.option_add("hdd", IDE_HARDDISK); } @@ -213,11 +213,6 @@ void mtxl_state::cdrom(device_t *device) ide0->option_reset(); mt6k_ata_devices(*ide0); ide0->set_default_option("cdrom"); - ide0->set_fixed(true); - - auto ide1 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:1")); - ide1->set_default_option("hdd"); - ide1->set_fixed(true); } void mtxl_state::hdd(device_t *device) @@ -226,11 +221,6 @@ void mtxl_state::hdd(device_t *device) ide0->option_reset(); mt6k_ata_devices(*ide0); ide0->set_default_option("hdd"); - ide0->set_fixed(true); - - auto ide1 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:1")); - ide1->set_default_option("cdrom"); - ide1->set_fixed(true); } #endif diff --git a/src/mame/namco/namcos12_cdxa.cpp b/src/mame/namco/namcos12_cdxa.cpp index 6fdd23d22f6..1ff4cf8841a 100644 --- a/src/mame/namco/namcos12_cdxa.cpp +++ b/src/mame/namco/namcos12_cdxa.cpp @@ -68,17 +68,17 @@ Notes: // Any drive as long as the ident name starts with "TOSHIB" will do, but this is the one that's used with CDXA games specifically DECLARE_DEVICE_TYPE(TOSHIBA_XM6402B_CDROM, toshiba_xm6402b_cdrom_device) -class toshiba_xm6402b_cdrom_device : public atapi_fixed_cdrom_device +class toshiba_xm6402b_cdrom_device : public atapi_cdrom_device { public: toshiba_xm6402b_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : atapi_fixed_cdrom_device(mconfig, TOSHIBA_XM6402B_CDROM, tag, owner, clock) + : atapi_cdrom_device(mconfig, TOSHIBA_XM6402B_CDROM, tag, owner, clock) { } virtual void device_start() override { - atapi_fixed_cdrom_device::device_start(); + atapi_cdrom_device::device_start(); std::fill_n(&m_identify_buffer[27], ' ', 47 - 27); diff --git a/src/mame/nichibutsu/hrdvd.cpp b/src/mame/nichibutsu/hrdvd.cpp index e06c98f887d..2670170e97f 100644 --- a/src/mame/nichibutsu/hrdvd.cpp +++ b/src/mame/nichibutsu/hrdvd.cpp @@ -468,12 +468,12 @@ void hrdvd_state::tmp68301_parallel_port_w(uint16_t data) static void atapi_devs(device_slot_interface &device) { - device.option_add("dvdrom", ATAPI_FIXED_DVDROM); + device.option_add("dvdrom", ATAPI_DVDROM); } void hrdvd_state::dvdrom_config(device_t *device) { - auto *drive = downcast<atapi_fixed_dvdrom_device *>(device); + auto *drive = downcast<atapi_dvdrom_device *>(device); drive->set_model("PIONEER DVD-A01 1.17"); // Wants firmware version between 1.14 and 1.19 } diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index 3f31ea51725..6170cbc7d5f 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -1596,8 +1596,8 @@ void sprinter_state::video_start() static void sprinter_ata_devices(device_slot_interface &device) { device.option_add("hdd", IDE_HARDDISK); - device.option_add("cdrom", ATAPI_FIXED_CDROM); // TODO must be ATAPI_CDROM - device.option_add("dvdrom", ATAPI_FIXED_DVDROM); + device.option_add("cdrom", ATAPI_CDROM); + device.option_add("dvdrom", ATAPI_DVDROM); } u8 sprinter_state::kbd_fe_r(offs_t offset) |
