cdu415: Add skeleton

This commit is contained in:
Olivier Galibert 2021-04-14 09:33:59 +02:00
parent 619559516f
commit 6cbee7f176
5 changed files with 118 additions and 4 deletions

View File

@ -2505,6 +2505,8 @@ if (BUSES["NSCSI"]~=null) then
MAME_DIR .. "src/devices/bus/nscsi/cdrn820s.h",
MAME_DIR .. "src/devices/bus/nscsi/cdu75s.cpp",
MAME_DIR .. "src/devices/bus/nscsi/cdu75s.h",
MAME_DIR .. "src/devices/bus/nscsi/cdu415.cpp",
MAME_DIR .. "src/devices/bus/nscsi/cdu415.h",
MAME_DIR .. "src/devices/bus/nscsi/cw7501.cpp",
MAME_DIR .. "src/devices/bus/nscsi/cw7501.h",
MAME_DIR .. "src/devices/bus/nscsi/devices.cpp",

View File

@ -0,0 +1,72 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
/*******************************************************************************
Skeleton device for Sony CDU415 cdrom reader
*******************************************************************************/
// Chips:
// - IC201: H8/3032 - main mcu, 64k internal rom
// - IC202: CXD1804AR - cdrom decoder and scsi interface
// - IC203: V53C16126HK40 - DRAM 128k*16
// - IC205: BU6243K - ?
// - IC207: AM28F512 - Firmware
#include "emu.h"
#include "cdu415.h"
DEFINE_DEVICE_TYPE(CDU415, cdu415_device, "cdu415", "Sony CDU415 CD-R")
cdu415_device::cdu415_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, CDU415, tag, owner, clock)
, nscsi_slot_card_interface(mconfig, *this, "cxd1804ar")
, m_mcu(*this, "mcu")
, m_scsi(*this, "cxd1804ar")
, m_rom(*this, "mcu")
{
}
void cdu415_device::device_start()
{
// The reset vector is the only obvious one there.
m_rom[0] = m_rom[0x8000];
m_rom[1] = m_rom[0x8001];
}
void cdu415_device::mem_map(address_map &map)
{
map(0x00000, 0x0ffff).rom().region("mcu", 0);
map(0x20000, 0x2ffff).rom().region("mcu", 0x10000);
}
void cdu415_device::io_map(address_map &map)
{
}
void cdu415_device::device_add_mconfig(machine_config &config)
{
H83032(config, m_mcu, 10000000);
m_mcu->set_addrmap(AS_PROGRAM, &cdu415_device::mem_map);
m_mcu->set_addrmap(AS_IO, &cdu415_device::io_map);
NCR53C94(config, m_scsi, 25'000'000); // Temporary placeholder
}
ROM_START(cdu415)
ROM_REGION(0x20000, "mcu", 0)
ROM_FILL(0x00000, 0x10000, 0x00) // Internal rom not yet dumped
ROM_LOAD("cdu415.bin", 0x10000, 0x10000, CRC(9873b898) SHA1(72d0b192efc32f7c8985dd96df3e346c57a236e7))
ROM_END
const tiny_rom_entry *cdu415_device::device_rom_region() const
{
return ROM_NAME(cdu415);
}
u8 cdu415_device::jumpers_r()
{
u32 jumpers_id = strtol(owner()->basetag(), nullptr, 16);
return (jumpers_id ^ 7) << 1;
}

View File

@ -0,0 +1,38 @@
// license:BSD-3-Clause
// copyright-holders:O. Galibert
#ifndef MAME_BUS_NSCSI_CDU415_H
#define MAME_BUS_NSCSI_CDU415_H
#pragma once
#include "machine/nscsi_bus.h"
#include "cpu/h8/h83032.h"
#include "machine/ncr5390.h"
class cdu415_device : public device_t, public nscsi_slot_card_interface
{
public:
cdu415_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
static constexpr feature_type unemulated_features() { return feature::DISK; }
protected:
virtual void device_start() override;
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
private:
void mem_map(address_map &map);
void io_map(address_map &map);
required_device<h83032_device> m_mcu;
required_device<ncr53c94_device> m_scsi;
required_region_ptr<u16> m_rom;
u8 jumpers_r();
};
DECLARE_DEVICE_TYPE(CDU415, cdu415_device)
#endif // MAME_BUS_NSCSI_CDU415_H

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:AJR
// copyright-holders:Olivier Galibert
/*******************************************************************************
Skeleton device for Sony/Apple CDU75S 2x cdrom reader
@ -7,7 +7,7 @@
*******************************************************************************/
// Chips:
// - IC101: CXA1841Q - ? probably something related to audio
// - IC101: CXA1841Q - RF signal analog amplifier
// - IC102: CXA1182Q-Z - servo control
// - IC103: CXD2510Q - CD DSP
// - IC105: BU4053BCF - analog mux/demux
@ -22,7 +22,7 @@
#include "emu.h"
#include "cdu75s.h"
DEFINE_DEVICE_TYPE(CDU75S, cdu75s_device, "cdu75s", "Philips CDU75S CD-R")
DEFINE_DEVICE_TYPE(CDU75S, cdu75s_device, "cdu75s", "Sony/Apple CDU75S CD-R")
cdu75s_device::cdu75s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, CDU75S, tag, owner, clock)
@ -64,7 +64,7 @@ void cdu75s_device::mem_map(address_map &map)
map(0x00000, 0x1ffff).rom().region("mcu", 0);
map(0x40000, 0x4000f).m(m_scsi, FUNC(ncr53c94_device::map));
map(0x60000, 0x60007); // General i/o?
map(0x60000, 0x60007); // CXD8532Q
map(0x60005, 0x60005).r(FUNC(cdu75s_device::jumpers_r));
map(0xc0000, 0xc003f); // CXD1808AQ

View File

@ -8,6 +8,7 @@
#include "bus/nscsi/cdd2000.h"
#include "bus/nscsi/cdrn820s.h"
#include "bus/nscsi/cdu75s.h"
#include "bus/nscsi/cdu415.h"
#include "bus/nscsi/cw7501.h"
#include "bus/nscsi/hd.h"
#include "bus/nscsi/s1410.h"
@ -23,6 +24,7 @@ void default_scsi_devices(device_slot_interface &device)
device.option_add("cdrn820s", CDRN820S);
device.option_add("cdd2000", CDD2000);
device.option_add("cdu75s", CDU75S);
device.option_add("cdu415", CDU415);
device.option_add("smoc501", SMOC501);
device.option_add("aplcd150", APPLECD150);
};