diff options
Diffstat (limited to 'src/devices/bus/pofo/hpc104.cpp')
-rw-r--r-- | src/devices/bus/pofo/hpc104.cpp | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/src/devices/bus/pofo/hpc104.cpp b/src/devices/bus/pofo/hpc104.cpp index 050fdc2bb6c..7c22c9b6625 100644 --- a/src/devices/bus/pofo/hpc104.cpp +++ b/src/devices/bus/pofo/hpc104.cpp @@ -23,8 +23,8 @@ // DEVICE DEFINITIONS //************************************************************************** -const device_type HPC104 = device_creator<hpc104_t>; -const device_type HPC104_2 = device_creator<hpc104_2_t>; +DEFINE_DEVICE_TYPE(POFO_HPC104, pofo_hpc104_device, "pofo_hpc104", "Atari Portfolio HPC-104") +DEFINE_DEVICE_TYPE(POFO_HPC104_2, pofo_hpc104_2_device, "pofo_hpc104_2", "Atari Portfolio HPC-104 (Unit 2)") //------------------------------------------------- @@ -35,9 +35,9 @@ static MACHINE_CONFIG_FRAGMENT( hpc104 ) MCFG_PORTFOLIO_MEMORY_CARD_SLOT_ADD(PORTFOLIO_MEMORY_CARD_SLOT_B_TAG, portfolio_memory_cards, nullptr) MCFG_PORTFOLIO_EXPANSION_SLOT_ADD(PORTFOLIO_EXPANSION_SLOT_TAG, XTAL_4_9152MHz, portfolio_expansion_cards, nullptr) - MCFG_PORTFOLIO_EXPANSION_SLOT_EINT_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, eint_w)) - MCFG_PORTFOLIO_EXPANSION_SLOT_NMIO_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, nmio_w)) - MCFG_PORTFOLIO_EXPANSION_SLOT_WAKE_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, wake_w)) + MCFG_PORTFOLIO_EXPANSION_SLOT_EINT_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_device, eint_w)) + MCFG_PORTFOLIO_EXPANSION_SLOT_NMIO_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_device, nmio_w)) + MCFG_PORTFOLIO_EXPANSION_SLOT_WAKE_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_device, wake_w)) MACHINE_CONFIG_END @@ -46,7 +46,7 @@ MACHINE_CONFIG_END // machine configurations //------------------------------------------------- -machine_config_constructor hpc104_t::device_mconfig_additions() const +machine_config_constructor pofo_hpc104_device::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( hpc104 ); } @@ -68,7 +68,7 @@ INPUT_PORTS_END // input_ports - device-specific input ports //------------------------------------------------- -ioport_constructor hpc104_t::device_input_ports() const +ioport_constructor pofo_hpc104_device::device_input_ports() const { return INPUT_PORTS_NAME( hpc104 ); } @@ -90,7 +90,7 @@ INPUT_PORTS_END // input_ports - device-specific input ports //------------------------------------------------- -ioport_constructor hpc104_2_t::device_input_ports() const +ioport_constructor pofo_hpc104_2_device::device_input_ports() const { return INPUT_PORTS_NAME( hpc104_2 ); } @@ -102,11 +102,11 @@ ioport_constructor hpc104_2_t::device_input_ports() const //************************************************************************** //------------------------------------------------- -// hpc104_t - constructor +// pofo_hpc104_device - constructor //------------------------------------------------- -hpc104_t::hpc104_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : - device_t(mconfig, type, name, tag, owner, clock, shortname, source), +pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, type, tag, owner, clock), device_portfolio_expansion_slot_interface(mconfig, *this), device_nvram_interface(mconfig, *this), m_ccm(*this, PORTFOLIO_MEMORY_CARD_SLOT_B_TAG), @@ -116,31 +116,27 @@ hpc104_t::hpc104_t(const machine_config &mconfig, device_type type, const char * { } -hpc104_t::hpc104_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, HPC104, "Atari Portfolio HPC-104", tag, owner, clock, "hpc104", __FILE__), - device_portfolio_expansion_slot_interface(mconfig, *this), - device_nvram_interface(mconfig, *this), - m_ccm(*this, PORTFOLIO_MEMORY_CARD_SLOT_B_TAG), - m_exp(*this, PORTFOLIO_EXPANSION_SLOT_TAG), - m_nvram(*this, "nvram"), - m_io_sw1(*this, "SW1") +pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + pofo_hpc104_device(mconfig, POFO_HPC104, tag, owner, clock) { } //------------------------------------------------- -// hpc104_2_t - constructor +// pofo_hpc104_2_device - constructor //------------------------------------------------- -hpc104_2_t::hpc104_2_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - hpc104_t(mconfig, HPC104_2, "Atari Portfolio HPC-104 (Unit 2)", tag, owner, clock, "hpc104_2", __FILE__) { } +pofo_hpc104_2_device::pofo_hpc104_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + pofo_hpc104_device(mconfig, POFO_HPC104_2, tag, owner, clock) +{ +} //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -void hpc104_t::device_start() +void pofo_hpc104_device::device_start() { // allocate memory m_nvram.allocate(0x40000); @@ -151,7 +147,7 @@ void hpc104_t::device_start() // device_reset - device-specific reset //------------------------------------------------- -void hpc104_t::device_reset() +void pofo_hpc104_device::device_reset() { m_sw1 = BIT(m_io_sw1->read(), 0); } @@ -161,7 +157,7 @@ void hpc104_t::device_reset() // nrdi_r - read //------------------------------------------------- -uint8_t hpc104_t::nrdi_r(address_space &space, offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) +uint8_t pofo_hpc104_device::nrdi_r(address_space &space, offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) { data = m_exp->nrdi_r(space, offset, data, iom, bcom, m_ncc1_out || ncc1); @@ -198,7 +194,7 @@ uint8_t hpc104_t::nrdi_r(address_space &space, offs_t offset, uint8_t data, bool // nwri_w - write //------------------------------------------------- -void hpc104_t::nwri_w(address_space &space, offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) +void pofo_hpc104_device::nwri_w(address_space &space, offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) { m_exp->nwri_w(space, offset, data, iom, bcom, m_ncc1_out || ncc1); |