mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
mn1400: add 28-pin mn1400 device
This commit is contained in:
parent
9f5d36fefa
commit
a0eb81633d
@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
|
|
||||||
// device definitions
|
// device definitions
|
||||||
DEFINE_DEVICE_TYPE(MN1400, mn1400_cpu_device, "mn1400", "Matsushita MN1400")
|
DEFINE_DEVICE_TYPE(MN1400_40PINS, mn1400_cpu_device, "mn1400", "Matsushita MN1400 (40 pins)")
|
||||||
|
DEFINE_DEVICE_TYPE(MN1400_28PINS, mn1400_reduced_cpu_device, "mn1400_reduced", "Matsushita MN1400 (28 pins)")
|
||||||
DEFINE_DEVICE_TYPE(MN1405, mn1405_cpu_device, "mn1405", "Matsushita MN1405")
|
DEFINE_DEVICE_TYPE(MN1405, mn1405_cpu_device, "mn1405", "Matsushita MN1405")
|
||||||
|
|
||||||
|
|
||||||
@ -23,9 +24,17 @@ mn1400_cpu_device::mn1400_cpu_device(const machine_config &mconfig, device_type
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
mn1400_cpu_device::mn1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
mn1400_cpu_device::mn1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||||
mn1400_cpu_device(mconfig, MN1400, tag, owner, clock, 2 /* stack levels */, 10 /* rom bits */, address_map_constructor(FUNC(mn1400_cpu_device::program_1kx8), this), 6 /* ram bits */, address_map_constructor(FUNC(mn1400_cpu_device::data_64x4), this))
|
mn1400_cpu_device(mconfig, MN1400_40PINS, tag, owner, clock, 2 /* stack levels */, 10 /* rom bits */, address_map_constructor(FUNC(mn1400_cpu_device::program_1kx8), this), 6 /* ram bits */, address_map_constructor(FUNC(mn1400_cpu_device::data_64x4), this))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
mn1400_reduced_cpu_device::mn1400_reduced_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||||
|
mn1400_cpu_device(mconfig, MN1400_28PINS, tag, owner, clock, 2, 10, address_map_constructor(FUNC(mn1400_reduced_cpu_device::program_1kx8), this), 6, address_map_constructor(FUNC(mn1400_reduced_cpu_device::data_64x4), this))
|
||||||
|
{
|
||||||
|
// CO5-CO9, DO0-DO3 (scrambled)
|
||||||
|
set_c_mask(0x3e0);
|
||||||
|
set_d_mask(0xf, 0x5321);
|
||||||
|
}
|
||||||
|
|
||||||
mn1405_cpu_device::mn1405_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
mn1405_cpu_device::mn1405_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||||
mn1400_cpu_device(mconfig, MN1405, tag, owner, clock, 2, 11, address_map_constructor(FUNC(mn1405_cpu_device::program_2kx8), this), 7, address_map_constructor(FUNC(mn1405_cpu_device::data_128x4), this))
|
mn1400_cpu_device(mconfig, MN1405, tag, owner, clock, 2, 11, address_map_constructor(FUNC(mn1405_cpu_device::program_2kx8), this), 7, address_map_constructor(FUNC(mn1405_cpu_device::data_128x4), this))
|
||||||
{ }
|
{ }
|
||||||
|
@ -125,6 +125,14 @@ protected:
|
|||||||
void op_dc();
|
void op_dc();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class mn1400_reduced_cpu_device : public mn1400_cpu_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
mn1400_reduced_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class mn1405_cpu_device : public mn1400_cpu_device
|
class mn1405_cpu_device : public mn1400_cpu_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -132,7 +140,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
DECLARE_DEVICE_TYPE(MN1400, mn1400_cpu_device)
|
DECLARE_DEVICE_TYPE(MN1400_40PINS, mn1400_cpu_device)
|
||||||
|
DECLARE_DEVICE_TYPE(MN1400_28PINS, mn1400_reduced_cpu_device)
|
||||||
DECLARE_DEVICE_TYPE(MN1405, mn1405_cpu_device)
|
DECLARE_DEVICE_TYPE(MN1405, mn1405_cpu_device)
|
||||||
|
|
||||||
#endif // MAME_CPU_MN1400_MN1400_H
|
#endif // MAME_CPU_MN1400_MN1400_H
|
||||||
|
@ -210,11 +210,9 @@ INPUT_PORTS_END
|
|||||||
void compperf_state::compperf(machine_config &config)
|
void compperf_state::compperf(machine_config &config)
|
||||||
{
|
{
|
||||||
// basic machine hardware
|
// basic machine hardware
|
||||||
MN1400(config, m_maincpu, 300000); // approximation - RC osc. R=18K, C=100pF
|
MN1400_28PINS(config, m_maincpu, 300000); // approximation - RC osc. R=18K, C=100pF
|
||||||
m_maincpu->write_c().set(FUNC(compperf_state::write_c));
|
m_maincpu->write_c().set(FUNC(compperf_state::write_c));
|
||||||
m_maincpu->set_c_mask(0x3e0);
|
|
||||||
m_maincpu->write_d().set(FUNC(compperf_state::write_d));
|
m_maincpu->write_d().set(FUNC(compperf_state::write_d));
|
||||||
m_maincpu->set_d_mask(0xf, 0x5321);
|
|
||||||
m_maincpu->write_e().set(FUNC(compperf_state::write_e));
|
m_maincpu->write_e().set(FUNC(compperf_state::write_e));
|
||||||
m_maincpu->read_a().set_ioport("IN.0");
|
m_maincpu->read_a().set_ioport("IN.0");
|
||||||
m_maincpu->read_b().set_ioport("IN.1");
|
m_maincpu->read_b().set_ioport("IN.1");
|
||||||
@ -516,11 +514,10 @@ INPUT_PORTS_END
|
|||||||
void tmbaskb_state::tmbaskb(machine_config &config)
|
void tmbaskb_state::tmbaskb(machine_config &config)
|
||||||
{
|
{
|
||||||
// basic machine hardware
|
// basic machine hardware
|
||||||
MN1400(config, m_maincpu, 300000); // approximation - RC osc. R=18K, C=100pF
|
MN1400_28PINS(config, m_maincpu, 300000); // approximation - RC osc. R=18K, C=100pF
|
||||||
m_maincpu->write_c().set(FUNC(tmbaskb_state::write_c));
|
m_maincpu->write_c().set(FUNC(tmbaskb_state::write_c));
|
||||||
m_maincpu->set_c_mask(0x3ef);
|
m_maincpu->set_c_mask(0x3ef);
|
||||||
m_maincpu->write_d().set(FUNC(tmbaskb_state::write_d));
|
m_maincpu->write_d().set(FUNC(tmbaskb_state::write_d));
|
||||||
m_maincpu->set_d_mask(0xf, 0x5321);
|
|
||||||
m_maincpu->write_e().set(FUNC(tmbaskb_state::write_e));
|
m_maincpu->write_e().set(FUNC(tmbaskb_state::write_e));
|
||||||
m_maincpu->read_b().set(FUNC(tmbaskb_state::read_b));
|
m_maincpu->read_b().set(FUNC(tmbaskb_state::read_b));
|
||||||
m_maincpu->read_sns().set_ioport("IN.3");
|
m_maincpu->read_sns().set_ioport("IN.3");
|
||||||
|
Loading…
Reference in New Issue
Block a user