summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/newbrain
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/newbrain')
-rw-r--r--src/devices/bus/newbrain/eim.cpp74
-rw-r--r--src/devices/bus/newbrain/eim.h20
-rw-r--r--src/devices/bus/newbrain/exp.cpp22
-rw-r--r--src/devices/bus/newbrain/exp.h34
-rw-r--r--src/devices/bus/newbrain/fdc.cpp40
-rw-r--r--src/devices/bus/newbrain/fdc.h21
6 files changed, 102 insertions, 109 deletions
diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp
index 906b8d4d144..e1a70e6f682 100644
--- a/src/devices/bus/newbrain/eim.cpp
+++ b/src/devices/bus/newbrain/eim.cpp
@@ -37,7 +37,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type NEWBRAIN_EIM = device_creator<newbrain_eim_t>;
+DEFINE_DEVICE_TYPE(NEWBRAIN_EIM, newbrain_eim_device, "newbrain_eim", "NewBrain EIM")
//-------------------------------------------------
@@ -57,7 +57,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *newbrain_eim_t::device_rom_region() const
+const tiny_rom_entry *newbrain_eim_device::device_rom_region() const
{
return ROM_NAME( newbrain_eim );
}
@@ -72,24 +72,24 @@ static MACHINE_CONFIG_FRAGMENT( newbrain_eim )
MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, XTAL_16MHz/8)
MCFG_Z80CTC_ZC0_CB(DEVWRITELINE(MC6850_TAG, acia6850_device, write_rxc))
MCFG_Z80CTC_ZC1_CB(DEVWRITELINE(MC6850_TAG, acia6850_device, write_txc))
- MCFG_Z80CTC_ZC2_CB(WRITELINE(newbrain_eim_t, ctc_z2_w))
+ MCFG_Z80CTC_ZC2_CB(WRITELINE(newbrain_eim_device, ctc_z2_w))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("z80ctc_c2", newbrain_eim_t, ctc_c2_tick, attotime::from_hz(XTAL_16MHz/4/13))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("z80ctc_c2", newbrain_eim_device, ctc_c2_tick, attotime::from_hz(XTAL_16MHz/4/13))
MCFG_DEVICE_ADD(ADC0809_TAG, ADC0808, 500000)
- MCFG_ADC0808_OUT_EOC_CB(WRITELINE(newbrain_eim_t, adc_eoc_w))
- MCFG_ADC0808_IN_VREF_POS_CB(newbrain_eim_t, adc_vref_pos_r)
- MCFG_ADC0808_IN_VREF_NEG_CB(newbrain_eim_t, adc_vref_neg_r)
- MCFG_ADC0808_IN_IN_0_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_1_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_2_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_3_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_4_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_5_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_6_CB(newbrain_eim_t, adc_input_r)
- MCFG_ADC0808_IN_IN_7_CB(newbrain_eim_t, adc_input_r)
+ MCFG_ADC0808_OUT_EOC_CB(WRITELINE(newbrain_eim_device, adc_eoc_w))
+ MCFG_ADC0808_IN_VREF_POS_CB(newbrain_eim_device, adc_vref_pos_r)
+ MCFG_ADC0808_IN_VREF_NEG_CB(newbrain_eim_device, adc_vref_neg_r)
+ MCFG_ADC0808_IN_IN_0_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_1_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_2_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_3_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_4_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_5_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_6_CB(newbrain_eim_device, adc_input_r)
+ MCFG_ADC0808_IN_IN_7_CB(newbrain_eim_device, adc_input_r)
MCFG_DEVICE_ADD(MC6850_TAG, ACIA6850, 0)
- MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(newbrain_eim_t, acia_interrupt))
+ MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(newbrain_eim_device, acia_interrupt))
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_NEWBRAIN_EXPANSION_SLOT_ADD(NEWBRAIN_EXPANSION_SLOT_TAG, XTAL_16MHz/8, newbrain_expansion_cards, "fdc")
@@ -105,7 +105,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor newbrain_eim_t::device_mconfig_additions() const
+machine_config_constructor newbrain_eim_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( newbrain_eim );
}
@@ -117,11 +117,11 @@ machine_config_constructor newbrain_eim_t::device_mconfig_additions() const
//**************************************************************************
//-------------------------------------------------
-// newbrain_eim_t - constructor
+// newbrain_eim_device - constructor
//-------------------------------------------------
-newbrain_eim_t::newbrain_eim_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, NEWBRAIN_EIM, "Newbrain EIM", tag, owner, clock, "newbrain_eim", __FILE__),
+newbrain_eim_device::newbrain_eim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, NEWBRAIN_EIM, tag, owner, clock),
device_newbrain_expansion_slot_interface(mconfig, *this),
m_ctc(*this, Z80CTC_TAG),
m_acia(*this, MC6850_TAG),
@@ -136,7 +136,7 @@ newbrain_eim_t::newbrain_eim_t(const machine_config &mconfig, const char *tag, d
// device_start - device-specific startup
//-------------------------------------------------
-void newbrain_eim_t::device_start()
+void newbrain_eim_device::device_start()
{
// state saving
save_item(NAME(m_aciaint));
@@ -148,7 +148,7 @@ void newbrain_eim_t::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void newbrain_eim_t::device_reset()
+void newbrain_eim_device::device_reset()
{
}
@@ -157,7 +157,7 @@ void newbrain_eim_t::device_reset()
// mreq_r - memory request read
//-------------------------------------------------
-uint8_t newbrain_eim_t::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+uint8_t newbrain_eim_device::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
return m_exp->mreq_r(space, offset, data, romov, exrm, raminh);
}
@@ -167,7 +167,7 @@ uint8_t newbrain_eim_t::mreq_r(address_space &space, offs_t offset, uint8_t data
// mreq_w - memory request write
//-------------------------------------------------
-void newbrain_eim_t::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+void newbrain_eim_device::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
m_exp->mreq_w(space, offset, data, romov, exrm, raminh);
}
@@ -177,7 +177,7 @@ void newbrain_eim_t::mreq_w(address_space &space, offs_t offset, uint8_t data, b
// iorq_r - I/O request read
//-------------------------------------------------
-uint8_t newbrain_eim_t::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+uint8_t newbrain_eim_device::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
{
return m_exp->iorq_r(space, offset, data, prtov);
}
@@ -187,7 +187,7 @@ uint8_t newbrain_eim_t::iorq_r(address_space &space, offs_t offset, uint8_t data
// iorq_w - I/O request write
//-------------------------------------------------
-void newbrain_eim_t::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+void newbrain_eim_device::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
{
m_exp->iorq_w(space, offset, data, prtov);
}
@@ -197,7 +197,7 @@ void newbrain_eim_t::iorq_w(address_space &space, offs_t offset, uint8_t data, b
// anout_r -
//-------------------------------------------------
-READ8_MEMBER( newbrain_eim_t::anout_r )
+READ8_MEMBER( newbrain_eim_device::anout_r )
{
return 0xff;
}
@@ -207,7 +207,7 @@ READ8_MEMBER( newbrain_eim_t::anout_r )
// anout_w -
//-------------------------------------------------
-WRITE8_MEMBER( newbrain_eim_t::anout_w )
+WRITE8_MEMBER( newbrain_eim_device::anout_w )
{
}
@@ -216,7 +216,7 @@ WRITE8_MEMBER( newbrain_eim_t::anout_w )
// anin_r -
//-------------------------------------------------
-READ8_MEMBER( newbrain_eim_t::anin_r )
+READ8_MEMBER( newbrain_eim_device::anin_r )
{
return 0;
}
@@ -226,7 +226,7 @@ READ8_MEMBER( newbrain_eim_t::anin_r )
// anio_w -
//-------------------------------------------------
-WRITE8_MEMBER( newbrain_eim_t::anio_w )
+WRITE8_MEMBER( newbrain_eim_device::anio_w )
{
}
@@ -235,7 +235,7 @@ WRITE8_MEMBER( newbrain_eim_t::anio_w )
// adc_eoc_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( newbrain_eim_t::adc_eoc_w )
+WRITE_LINE_MEMBER( newbrain_eim_device::adc_eoc_w )
{
m_anint = state;
}
@@ -245,7 +245,7 @@ WRITE_LINE_MEMBER( newbrain_eim_t::adc_eoc_w )
// adc_vref_pos_r -
//-------------------------------------------------
-ADC0808_ANALOG_READ_CB( newbrain_eim_t::adc_vref_pos_r )
+ADC0808_ANALOG_READ_CB( newbrain_eim_device::adc_vref_pos_r )
{
return 5.0;
}
@@ -255,7 +255,7 @@ ADC0808_ANALOG_READ_CB( newbrain_eim_t::adc_vref_pos_r )
// adc_vref_neg_r -
//-------------------------------------------------
-ADC0808_ANALOG_READ_CB( newbrain_eim_t::adc_vref_neg_r )
+ADC0808_ANALOG_READ_CB( newbrain_eim_device::adc_vref_neg_r )
{
return 0.0;
}
@@ -265,7 +265,7 @@ ADC0808_ANALOG_READ_CB( newbrain_eim_t::adc_vref_neg_r )
// adc_input_r -
//-------------------------------------------------
-ADC0808_ANALOG_READ_CB( newbrain_eim_t::adc_input_r )
+ADC0808_ANALOG_READ_CB( newbrain_eim_device::adc_input_r )
{
return 0.0;
}
@@ -275,7 +275,7 @@ ADC0808_ANALOG_READ_CB( newbrain_eim_t::adc_input_r )
// acia_interrupt -
//-------------------------------------------------
-WRITE_LINE_MEMBER( newbrain_eim_t::acia_interrupt )
+WRITE_LINE_MEMBER( newbrain_eim_device::acia_interrupt )
{
m_aciaint = state;
}
@@ -285,7 +285,7 @@ WRITE_LINE_MEMBER( newbrain_eim_t::acia_interrupt )
// ctc_z2_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( newbrain_eim_t::ctc_z2_w )
+WRITE_LINE_MEMBER( newbrain_eim_device::ctc_z2_w )
{
// connected to CTC channel 0/1 clock inputs
m_ctc->trg0(state);
@@ -297,7 +297,7 @@ WRITE_LINE_MEMBER( newbrain_eim_t::ctc_z2_w )
// adc_input_r -
//-------------------------------------------------
-TIMER_DEVICE_CALLBACK_MEMBER(newbrain_eim_t::ctc_c2_tick)
+TIMER_DEVICE_CALLBACK_MEMBER(newbrain_eim_device::ctc_c2_tick)
{
m_ctc->trg2(1);
m_ctc->trg2(0);
diff --git a/src/devices/bus/newbrain/eim.h b/src/devices/bus/newbrain/eim.h
index 58024f60cf4..a2406303d9c 100644
--- a/src/devices/bus/newbrain/eim.h
+++ b/src/devices/bus/newbrain/eim.h
@@ -6,10 +6,10 @@
**********************************************************************/
-#pragma once
+#ifndef MAME_BUS_NEWBRAIN_EIM_H
+#define MAME_BUS_NEWBRAIN_EIM_H
-#ifndef __NEWBRAIN_EIM__
-#define __NEWBRAIN_EIM__
+#pragma once
#include "exp.h"
#include "bus/rs232/rs232.h"
@@ -24,14 +24,13 @@
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> newbrain_eim_t
+// ======================> newbrain_eim_device
-class newbrain_eim_t : public device_t,
- public device_newbrain_expansion_slot_interface
+class newbrain_eim_device : public device_t, public device_newbrain_expansion_slot_interface
{
public:
// construction/destruction
- newbrain_eim_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ newbrain_eim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
@@ -65,7 +64,7 @@ protected:
private:
required_device<z80ctc_device> m_ctc;
required_device<acia6850_device> m_acia;
- required_device<newbrain_expansion_slot_t> m_exp;
+ required_device<newbrain_expansion_slot_device> m_exp;
required_memory_region m_rom;
optional_shared_ptr<uint8_t> m_ram;
@@ -76,7 +75,6 @@ private:
// device type definition
extern const device_type NEWBRAIN_EIM;
+DECLARE_DEVICE_TYPE(NEWBRAIN_EIM, newbrain_eim_device)
-
-
-#endif
+#endif // MAME_BUS_NEWBRAIN_EIM_H
diff --git a/src/devices/bus/newbrain/exp.cpp b/src/devices/bus/newbrain/exp.cpp
index 9e8c989e982..7a27758764a 100644
--- a/src/devices/bus/newbrain/exp.cpp
+++ b/src/devices/bus/newbrain/exp.cpp
@@ -15,7 +15,7 @@
// GLOBAL VARIABLES
//**************************************************************************
-const device_type NEWBRAIN_EXPANSION_SLOT = device_creator<newbrain_expansion_slot_t>;
+DEFINE_DEVICE_TYPE(NEWBRAIN_EXPANSION_SLOT, newbrain_expansion_slot_device, "newbrain_expansion_slot", "NewBrain expansion port")
@@ -30,7 +30,7 @@ const device_type NEWBRAIN_EXPANSION_SLOT = device_creator<newbrain_expansion_sl
device_newbrain_expansion_slot_interface::device_newbrain_expansion_slot_interface(const machine_config &mconfig, device_t &device) :
device_slot_card_interface(mconfig,device)
{
- m_slot = dynamic_cast<newbrain_expansion_slot_t *>(device.owner());
+ m_slot = dynamic_cast<newbrain_expansion_slot_device *>(device.owner());
}
@@ -40,11 +40,11 @@ device_newbrain_expansion_slot_interface::device_newbrain_expansion_slot_interfa
//**************************************************************************
//-------------------------------------------------
-// newbrain_expansion_slot_t - constructor
+// newbrain_expansion_slot_device - constructor
//-------------------------------------------------
-newbrain_expansion_slot_t::newbrain_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, NEWBRAIN_EXPANSION_SLOT, "NewBrain expansion port", tag, owner, clock, "newbrain_expansion_slot", __FILE__),
+newbrain_expansion_slot_device::newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, NEWBRAIN_EXPANSION_SLOT, tag, owner, clock),
device_slot_interface(mconfig, *this), m_card(nullptr)
{
}
@@ -54,7 +54,7 @@ newbrain_expansion_slot_t::newbrain_expansion_slot_t(const machine_config &mconf
// device_start - device-specific startup
//-------------------------------------------------
-void newbrain_expansion_slot_t::device_start()
+void newbrain_expansion_slot_device::device_start()
{
m_card = dynamic_cast<device_newbrain_expansion_slot_interface *>(get_card_device());
}
@@ -64,7 +64,7 @@ void newbrain_expansion_slot_t::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void newbrain_expansion_slot_t::device_reset()
+void newbrain_expansion_slot_device::device_reset()
{
if (m_card != nullptr)
{
@@ -77,7 +77,7 @@ void newbrain_expansion_slot_t::device_reset()
// mreq_r - memory request read
//-------------------------------------------------
-uint8_t newbrain_expansion_slot_t::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+uint8_t newbrain_expansion_slot_device::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
if (m_card != nullptr)
{
@@ -92,7 +92,7 @@ uint8_t newbrain_expansion_slot_t::mreq_r(address_space &space, offs_t offset, u
// mreq_w - memory request write
//-------------------------------------------------
-void newbrain_expansion_slot_t::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+void newbrain_expansion_slot_device::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
if (m_card != nullptr)
{
@@ -105,7 +105,7 @@ void newbrain_expansion_slot_t::mreq_w(address_space &space, offs_t offset, uint
// iorq_r - I/O request read
//-------------------------------------------------
-uint8_t newbrain_expansion_slot_t::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+uint8_t newbrain_expansion_slot_device::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
{
if (m_card != nullptr)
{
@@ -120,7 +120,7 @@ uint8_t newbrain_expansion_slot_t::iorq_r(address_space &space, offs_t offset, u
// iorq_w - I/O request write
//-------------------------------------------------
-void newbrain_expansion_slot_t::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+void newbrain_expansion_slot_device::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
{
if (m_card != nullptr)
{
diff --git a/src/devices/bus/newbrain/exp.h b/src/devices/bus/newbrain/exp.h
index 0c07190bdf0..219c819d575 100644
--- a/src/devices/bus/newbrain/exp.h
+++ b/src/devices/bus/newbrain/exp.h
@@ -34,10 +34,10 @@
**********************************************************************/
-#pragma once
+#ifndef MAME_BUS_NEWBRAIN_EXP_H
+#define MAME_BUS_NEWBRAIN_EXP_H
-#ifndef __NEWBRAIN_EXPANSION_SLOT__
-#define __NEWBRAIN_EXPANSION_SLOT__
+#pragma once
@@ -64,17 +64,16 @@
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> newbrain_expansion_slot_t
+// ======================> newbrain_expansion_slot_device
class device_newbrain_expansion_slot_interface;
-class newbrain_expansion_slot_t : public device_t,
+class newbrain_expansion_slot_device : public device_t,
public device_slot_interface
{
public:
// construction/destruction
- newbrain_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual ~newbrain_expansion_slot_t() { }
+ newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// computer interface
uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh);
@@ -98,29 +97,28 @@ protected:
class device_newbrain_expansion_slot_interface : public device_slot_card_interface
{
public:
- // construction/destruction
- device_newbrain_expansion_slot_interface(const machine_config &mconfig, device_t &device);
- virtual ~device_newbrain_expansion_slot_interface() { }
-
// memory access
- virtual uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { return data; };
- virtual void mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { };
+ virtual uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { return data; }
+ virtual void mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { }
// I/O access
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov) { return data; };
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov) { };
+ virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov) { return data; }
+ virtual void iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov) { }
protected:
- newbrain_expansion_slot_t *m_slot;
+ // construction/destruction
+ device_newbrain_expansion_slot_interface(const machine_config &mconfig, device_t &device);
+
+ newbrain_expansion_slot_device *m_slot;
};
// device type definition
-extern const device_type NEWBRAIN_EXPANSION_SLOT;
+DECLARE_DEVICE_TYPE(NEWBRAIN_EXPANSION_SLOT, newbrain_expansion_slot_device)
SLOT_INTERFACE_EXTERN( newbrain_expansion_cards );
-#endif
+#endif // MAME_BUS_NEWBRAIN_EXP_H
diff --git a/src/devices/bus/newbrain/fdc.cpp b/src/devices/bus/newbrain/fdc.cpp
index b63d7ddffa8..4618588353a 100644
--- a/src/devices/bus/newbrain/fdc.cpp
+++ b/src/devices/bus/newbrain/fdc.cpp
@@ -35,7 +35,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type NEWBRAIN_FDC = device_creator<newbrain_fdc_t>;
+DEFINE_DEVICE_TYPE(NEWBRAIN_FDC, newbrain_fdc_device, "newbrain_fdc", "NewBrain FDC")
//-------------------------------------------------
@@ -59,7 +59,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *newbrain_fdc_t::device_rom_region() const
+const tiny_rom_entry *newbrain_fdc_device::device_rom_region() const
{
return ROM_NAME( newbrain_fdc );
}
@@ -69,7 +69,7 @@ const tiny_rom_entry *newbrain_fdc_t::device_rom_region() const
// ADDRESS_MAP( newbrain_fdc_mem )
//-------------------------------------------------
-static ADDRESS_MAP_START( newbrain_fdc_mem, AS_PROGRAM, 8, newbrain_fdc_t )
+static ADDRESS_MAP_START( newbrain_fdc_mem, AS_PROGRAM, 8, newbrain_fdc_device )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x1fff) AM_ROM
ADDRESS_MAP_END
@@ -79,7 +79,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( newbrain_fdc_io )
//-------------------------------------------------
-static ADDRESS_MAP_START( newbrain_fdc_io, AS_IO, 8, newbrain_fdc_t )
+static ADDRESS_MAP_START( newbrain_fdc_io, AS_IO, 8, newbrain_fdc_device )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0x71)
AM_RANGE(0x00, 0x01) AM_MIRROR(0x10) AM_DEVICE(UPD765_TAG, upd765a_device, map)
@@ -107,7 +107,7 @@ static MACHINE_CONFIG_FRAGMENT( newbrain_fdc )
MCFG_CPU_IO_MAP(newbrain_fdc_io)
MCFG_UPD765A_ADD(UPD765_TAG, false, true)
- MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(newbrain_fdc_t, fdc_int_w))
+ MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(newbrain_fdc_device, fdc_int_w))
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", newbrain_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", newbrain_floppies, "525dd", floppy_image_device::default_floppy_formats)
@@ -123,7 +123,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor newbrain_fdc_t::device_mconfig_additions() const
+machine_config_constructor newbrain_fdc_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( newbrain_fdc );
}
@@ -134,11 +134,11 @@ machine_config_constructor newbrain_fdc_t::device_mconfig_additions() const
//**************************************************************************
//-------------------------------------------------
-// newbrain_fdc_t - constructor
+// newbrain_fdc_device - constructor
//-------------------------------------------------
-newbrain_fdc_t::newbrain_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, NEWBRAIN_FDC, "NewBrain FDC", tag, owner, clock, "newbrain_fdc", __FILE__),
+newbrain_fdc_device::newbrain_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, NEWBRAIN_FDC, tag, owner, clock),
device_newbrain_expansion_slot_interface(mconfig, *this),
m_maincpu(*this, Z80_TAG),
m_fdc(*this, UPD765_TAG),
@@ -155,7 +155,7 @@ newbrain_fdc_t::newbrain_fdc_t(const machine_config &mconfig, const char *tag, d
// device_start - device-specific startup
//-------------------------------------------------
-void newbrain_fdc_t::device_start()
+void newbrain_fdc_device::device_start()
{
save_item(NAME(m_paging));
save_item(NAME(m_ma16));
@@ -170,7 +170,7 @@ void newbrain_fdc_t::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void newbrain_fdc_t::device_reset()
+void newbrain_fdc_device::device_reset()
{
m_maincpu->reset();
@@ -184,7 +184,7 @@ void newbrain_fdc_t::device_reset()
// mreq_r - memory request read
//-------------------------------------------------
-uint8_t newbrain_fdc_t::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+uint8_t newbrain_fdc_device::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
return m_exp->mreq_r(space, offset, data, romov, exrm, raminh);
}
@@ -194,7 +194,7 @@ uint8_t newbrain_fdc_t::mreq_r(address_space &space, offs_t offset, uint8_t data
// mreq_w - memory request write
//-------------------------------------------------
-void newbrain_fdc_t::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+void newbrain_fdc_device::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
m_exp->mreq_w(space, offset, data, romov, exrm, raminh);
}
@@ -204,7 +204,7 @@ void newbrain_fdc_t::mreq_w(address_space &space, offs_t offset, uint8_t data, b
// iorq_r - I/O request read
//-------------------------------------------------
-uint8_t newbrain_fdc_t::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+uint8_t newbrain_fdc_device::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
{
return m_exp->iorq_r(space, offset, data, prtov);
}
@@ -214,7 +214,7 @@ uint8_t newbrain_fdc_t::iorq_r(address_space &space, offs_t offset, uint8_t data
// iorq_w - I/O request write
//-------------------------------------------------
-void newbrain_fdc_t::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+void newbrain_fdc_device::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
{
m_exp->iorq_w(space, offset, data, prtov);
@@ -229,7 +229,7 @@ void newbrain_fdc_t::iorq_w(address_space &space, offs_t offset, uint8_t data, b
// moton - floppy motor on
//-------------------------------------------------
-void newbrain_fdc_t::moton(int state)
+void newbrain_fdc_device::moton(int state)
{
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(!state);
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(!state);
@@ -242,7 +242,7 @@ void newbrain_fdc_t::moton(int state)
// fdc_int_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( newbrain_fdc_t::fdc_int_w )
+WRITE_LINE_MEMBER( newbrain_fdc_device::fdc_int_w )
{
m_fdc_int = state;
}
@@ -252,7 +252,7 @@ WRITE_LINE_MEMBER( newbrain_fdc_t::fdc_int_w )
// fdc_auxiliary_w -
//-------------------------------------------------
-WRITE8_MEMBER( newbrain_fdc_t::fdc_auxiliary_w )
+WRITE8_MEMBER( newbrain_fdc_device::fdc_auxiliary_w )
{
/*
@@ -286,7 +286,7 @@ WRITE8_MEMBER( newbrain_fdc_t::fdc_auxiliary_w )
// fdc_control_r -
//-------------------------------------------------
-READ8_MEMBER( newbrain_fdc_t::fdc_control_r )
+READ8_MEMBER( newbrain_fdc_device::fdc_control_r )
{
/*
@@ -311,7 +311,7 @@ READ8_MEMBER( newbrain_fdc_t::fdc_control_r )
// io_dec_w - 0x20f
//-------------------------------------------------
-WRITE8_MEMBER( newbrain_fdc_t::io_dec_w )
+WRITE8_MEMBER( newbrain_fdc_device::io_dec_w )
{
/*
diff --git a/src/devices/bus/newbrain/fdc.h b/src/devices/bus/newbrain/fdc.h
index b34e88441ee..c429d8ea447 100644
--- a/src/devices/bus/newbrain/fdc.h
+++ b/src/devices/bus/newbrain/fdc.h
@@ -6,10 +6,10 @@
**********************************************************************/
-#pragma once
+#ifndef MAME_BUS_NEWBRAIN_FDC_H
+#define MAME_BUS_NEWBRAIN_FDC_H
-#ifndef __NEWBRAIN_FDC__
-#define __NEWBRAIN_FDC__
+#pragma once
#include "exp.h"
#include "cpu/z80/z80.h"
@@ -21,14 +21,13 @@
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> newbrain_fdc_t
+// ======================> newbrain_fdc_device
-class newbrain_fdc_t : public device_t,
- public device_newbrain_expansion_slot_interface
+class newbrain_fdc_device : public device_t, public device_newbrain_expansion_slot_interface
{
public:
// construction/destruction
- newbrain_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ newbrain_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
@@ -57,7 +56,7 @@ private:
required_device<floppy_connector> m_floppy1;
required_device<floppy_connector> m_floppy2;
required_device<floppy_connector> m_floppy3;
- required_device<newbrain_expansion_slot_t> m_exp;
+ required_device<newbrain_expansion_slot_device> m_exp;
void moton(int state);
@@ -71,8 +70,6 @@ private:
// device type definition
-extern const device_type NEWBRAIN_FDC;
-
-
+DECLARE_DEVICE_TYPE(NEWBRAIN_FDC, newbrain_fdc_device)
-#endif
+#endif // MAME_BUS_NEWBRAIN_FDC_H