mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
tube: Implemented parasite reset PRST line, and added to all co-processors.
This commit is contained in:
parent
f3328f2255
commit
6abfd7c097
@ -136,6 +136,7 @@ void bbc_tube_32016_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
|
||||
m_ula->pirq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_32016_device::prst_w));
|
||||
|
||||
RAM(config, m_ram).set_default_size("1M").set_extra_options("256K").set_default_value(0);
|
||||
|
||||
@ -267,6 +268,13 @@ void bbc_tube_32016_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_32016_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_32016_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -60,6 +60,8 @@ protected:
|
||||
memory_passthrough_handler m_rom_shadow_tap;
|
||||
|
||||
void tube_32016_mem(address_map &map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -87,8 +87,10 @@ ROM_START( tube_6502 )
|
||||
ROM_DEFAULT_BIOS("110")
|
||||
ROM_SYSTEM_BIOS(0, "110", "Tube 1.10")
|
||||
ROMX_LOAD("6502tube_110.rom", 0x0000, 0x1000, CRC(98b5fe42) SHA1(338269d03cf6bfa28e09d1651c273ea53394323b), ROM_BIOS(0))
|
||||
ROM_SYSTEM_BIOS(1, "121", "Tube 1.21 (ReCo6502)")
|
||||
ROMX_LOAD("reco6502tube.rom", 0x0000, 0x1000, CRC(75b2a466) SHA1(9ecef24de58a48c3fbe01b12888c3f6a5d24f57f), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS(1, "120", "Tube 1.20") // built from source, not an actual dump
|
||||
ROMX_LOAD("6502tube_120.rom", 0x0000, 0x1000, CRC(50c36da5) SHA1(80e5f1c03a00cf728917242522befc17b264413f), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS(2, "121", "Tube 1.21 (ReCo6502)")
|
||||
ROMX_LOAD("reco6502tube.rom", 0x0000, 0x1000, CRC(75b2a466) SHA1(9ecef24de58a48c3fbe01b12888c3f6a5d24f57f), ROM_BIOS(2))
|
||||
ROM_END
|
||||
|
||||
ROM_START( tube_6502p )
|
||||
@ -133,6 +135,7 @@ void bbc_tube_6502_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_maincpu, M65C02_NMI_LINE);
|
||||
m_ula->pirq_handler().set_inputline(m_maincpu, M65C02_IRQ_LINE);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_6502_device::prst_w));
|
||||
|
||||
RAM(config, m_ram).set_default_size("64K").set_default_value(0);
|
||||
|
||||
@ -260,6 +263,13 @@ void bbc_tube_6502_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_6502_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_6502_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -59,6 +59,8 @@ protected:
|
||||
required_device<tube_device> m_ula;
|
||||
required_device<ram_device> m_ram;
|
||||
required_memory_region m_rom;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -75,6 +75,7 @@ void bbc_tube_80186_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula, 0);
|
||||
m_ula->pirq_handler().set(m_i80186, FUNC(i80186_cpu_device::int0_w));
|
||||
m_ula->drq_handler().set(m_i80186, FUNC(i80186_cpu_device::drq0_w));
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_80186_device::prst_w));
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram).set_default_size("512K");
|
||||
@ -168,6 +169,13 @@ void bbc_tube_pcplus_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_80186_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_i80186->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_80186_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -52,6 +52,8 @@ protected:
|
||||
|
||||
void tube_80186_io(address_map &map);
|
||||
void tube_80186_mem(address_map &map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -67,6 +67,7 @@ void bbc_tube_80286_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_i80286, INPUT_LINE_NMI);
|
||||
m_ula->pirq_handler().set_inputline(m_i80286, INPUT_LINE_INT0);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_80286_device::prst_w));
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram).set_default_size("1M");
|
||||
@ -128,6 +129,13 @@ void bbc_tube_80286_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_80286_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_i80286->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_80286_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -54,6 +54,8 @@ private:
|
||||
|
||||
void tube_80286_io(address_map &map);
|
||||
void tube_80286_mem(address_map &map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -69,6 +69,7 @@ void bbc_tube_a500_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set(m_fiqs, FUNC(input_merger_device::in_w<0>));
|
||||
m_ula->pirq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>));
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_a500_device::prst_w));
|
||||
|
||||
ACORN_MEMC(config, m_memc, 24_MHz_XTAL / 3, m_vidc);
|
||||
m_memc->set_addrmap(0, &bbc_tube_a500_device::a500_map);
|
||||
@ -139,6 +140,11 @@ void bbc_tube_a500_device::device_start()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_a500_device::prst_w)
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_a500_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -60,6 +60,8 @@ private:
|
||||
|
||||
void arm_mem(address_map &map);
|
||||
void a500_map(address_map &map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -59,6 +59,7 @@ void bbc_tube_arm_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_maincpu, ARM_FIRQ_LINE);
|
||||
m_ula->pirq_handler().set_inputline(m_maincpu, ARM_IRQ_LINE);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_arm_device::prst_w));
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram).set_default_size("4M").set_default_value(0);
|
||||
@ -133,6 +134,13 @@ void bbc_tube_arm_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_arm_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_arm_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -50,6 +50,8 @@ private:
|
||||
memory_passthrough_handler m_rom_shadow_tap;
|
||||
|
||||
void tube_arm_mem(address_map &map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -63,6 +63,7 @@ void bbc_tube_arm7_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set(FUNC(bbc_tube_arm7_device::efiq_w));
|
||||
m_ula->pirq_handler().set(FUNC(bbc_tube_arm7_device::exint3_w));
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_arm7_device::prst_w));
|
||||
|
||||
RAM(config, m_ram).set_default_size("32M").set_extra_options("16M,64M");
|
||||
}
|
||||
@ -131,6 +132,13 @@ void bbc_tube_arm7_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_arm7_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_arm7_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -67,6 +67,8 @@ private:
|
||||
|
||||
void arm7_map(address_map& map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
|
||||
uint32_t oki_reg_r(offs_t offset);
|
||||
void oki_reg_w(offs_t offset, uint32_t data);
|
||||
|
||||
|
@ -137,6 +137,7 @@ void bbc_tube_rc6502_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_maincpu, M65C02_NMI_LINE);
|
||||
m_ula->pirq_handler().set_inputline(m_maincpu, M65C02_IRQ_LINE);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_rc6502_device::prst_w));
|
||||
}
|
||||
|
||||
void bbc_tube_rc65816_device::device_add_mconfig(machine_config &config)
|
||||
@ -149,6 +150,7 @@ void bbc_tube_rc65816_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_maincpu, G65816_LINE_NMI);
|
||||
m_ula->pirq_handler().set_inputline(m_maincpu, G65816_LINE_IRQ);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_rc65816_device::prst_w));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -232,6 +234,13 @@ void bbc_tube_rc6502_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_rc6502_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_rc6502_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -63,6 +63,8 @@ protected:
|
||||
required_device<ram_device> m_ram;
|
||||
required_ioport m_config;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
|
||||
private:
|
||||
void tube_rc6502_mem(address_map &map);
|
||||
|
||||
|
@ -100,6 +100,7 @@ void bbc_tube_x25_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_z80[0], INPUT_LINE_NMI);
|
||||
m_ula->pirq_handler().set_inputline(m_z80[0], INPUT_LINE_IRQ0);
|
||||
m_ula->prst_handler().set_inputline(m_z80[0], INPUT_LINE_RESET);
|
||||
|
||||
Z80(config, m_z80[1], 12_MHz_XTAL / 4);
|
||||
m_z80[1]->set_addrmap(AS_PROGRAM, &bbc_tube_x25_device::secondary_mem);
|
||||
|
@ -80,6 +80,7 @@ void bbc_tube_z80_device::device_add_mconfig(machine_config &config)
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set_inputline(m_z80, INPUT_LINE_NMI);
|
||||
m_ula->pirq_handler().set_inputline(m_z80, INPUT_LINE_IRQ0);
|
||||
m_ula->prst_handler().set(FUNC(bbc_tube_z80_device::prst_w));
|
||||
|
||||
/* software lists */
|
||||
SOFTWARE_LIST(config, "flop_ls_z80").set_original("bbc_flop_z80");
|
||||
@ -154,6 +155,13 @@ void bbc_tube_z80_device::device_reset()
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_tube_z80_device::prst_w)
|
||||
{
|
||||
device_reset();
|
||||
|
||||
m_z80->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
uint8_t bbc_tube_z80_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
|
@ -62,6 +62,8 @@ private:
|
||||
void tube_z80_fetch(address_map &map);
|
||||
void tube_z80_io(address_map &map);
|
||||
void tube_z80_mem(address_map &map);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(prst_w);
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,6 +34,7 @@ tube_device::tube_device(const machine_config &mconfig, const char *tag, device_
|
||||
, m_hirq_handler(*this)
|
||||
, m_pnmi_handler(*this)
|
||||
, m_pirq_handler(*this)
|
||||
, m_prst_handler(*this)
|
||||
, m_drq_handler(*this)
|
||||
{
|
||||
}
|
||||
@ -49,6 +50,7 @@ void tube_device::device_start()
|
||||
m_hirq_handler.resolve_safe();
|
||||
m_pnmi_handler.resolve_safe();
|
||||
m_pirq_handler.resolve_safe();
|
||||
m_prst_handler.resolve_safe();
|
||||
m_drq_handler.resolve_safe();
|
||||
|
||||
// register for state saving
|
||||
@ -74,10 +76,15 @@ void tube_device::device_start()
|
||||
//-------------------------------------------------
|
||||
|
||||
void tube_device::device_reset()
|
||||
{
|
||||
m_r1stat = 0;
|
||||
soft_reset();
|
||||
}
|
||||
|
||||
void tube_device::soft_reset()
|
||||
{
|
||||
m_ph1pos = m_hp3pos = 0;
|
||||
m_ph3pos = 1;
|
||||
m_r1stat = 0;
|
||||
m_hstat[0] = m_hstat[1] = m_hstat[3] = 0x40;
|
||||
m_hstat[2] = 0xc0;
|
||||
m_pstat[0] = m_pstat[1] = m_pstat[2] = m_pstat[3] = 0x40;
|
||||
@ -167,11 +174,23 @@ void tube_device::host_w(offs_t offset, uint8_t data)
|
||||
switch (offset & 0x07)
|
||||
{
|
||||
case 0: /* Status flags */
|
||||
if (BIT(data, 7))
|
||||
m_r1stat |= (data & 0x3f);
|
||||
else
|
||||
m_r1stat &= ~(data & 0x3f);
|
||||
m_hstat[0] = (m_hstat[0] & 0xc0) | (data & 0x3f);
|
||||
if (BIT(data, 7))
|
||||
{
|
||||
m_r1stat |= (data & 0x3f);
|
||||
if (BIT(data, 6))
|
||||
{
|
||||
soft_reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_r1stat &= ~(data & 0x3f);
|
||||
}
|
||||
if (BIT(data, 5))
|
||||
{
|
||||
m_prst_handler(BIT(data, 7) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: /* Register 1 (1 byte write only) */
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
auto hirq_handler() { return m_hirq_handler.bind(); }
|
||||
auto pnmi_handler() { return m_pnmi_handler.bind(); }
|
||||
auto pirq_handler() { return m_pirq_handler.bind(); }
|
||||
auto prst_handler() { return m_prst_handler.bind(); }
|
||||
auto drq_handler() { return m_drq_handler.bind(); }
|
||||
|
||||
uint8_t host_r(offs_t offset);
|
||||
@ -58,11 +59,13 @@ private:
|
||||
int m_ph3pos;
|
||||
int m_hp3pos;
|
||||
|
||||
void soft_reset();
|
||||
void update_interrupts();
|
||||
|
||||
devcb_write_line m_hirq_handler;
|
||||
devcb_write_line m_pnmi_handler;
|
||||
devcb_write_line m_pirq_handler;
|
||||
devcb_write_line m_prst_handler;
|
||||
devcb_write_line m_drq_handler;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user