mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
i82586: Add line handler for reset (nw)
This commit is contained in:
parent
cac8808471
commit
fa8d5aa902
@ -402,11 +402,7 @@ void isa16_3c505_device::acr_w(u8 data)
|
|||||||
if ((data ^ m_acr) & ACR_LED2)
|
if ((data ^ m_acr) & ACR_LED2)
|
||||||
m_led[1] = !!(data & ACR_LED2);
|
m_led[1] = !!(data & ACR_LED2);
|
||||||
|
|
||||||
if (!(m_acr & ACR_R586) && (data & ACR_R586))
|
m_net->reset_w((data & ACR_R586) ? 1 : 0);
|
||||||
{
|
|
||||||
LOGMASKED(LOG_REG, "i82586 reset\n");
|
|
||||||
m_net->reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((data ^ m_acr) & ACR_FLSH)
|
if ((data ^ m_acr) & ACR_FLSH)
|
||||||
{
|
{
|
||||||
|
@ -32,12 +32,6 @@ void np600a3_device::lcc_ca_w(u16 data)
|
|||||||
m_lcc->ca(1);
|
m_lcc->ca(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER(np600a3_device::lcc_reset_w)
|
|
||||||
{
|
|
||||||
if (!state)
|
|
||||||
m_lcc->reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
u16 np600a3_device::status_r()
|
u16 np600a3_device::status_r()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -69,7 +63,7 @@ void np600a3_device::device_add_mconfig(machine_config &config)
|
|||||||
m_npcpu->set_addrmap(AS_IO, &np600a3_device::io_map);
|
m_npcpu->set_addrmap(AS_IO, &np600a3_device::io_map);
|
||||||
|
|
||||||
ls259_device &bitlatch(LS259(config, "bitlatch")); // U28
|
ls259_device &bitlatch(LS259(config, "bitlatch")); // U28
|
||||||
bitlatch.q_out_cb<4>().set(FUNC(np600a3_device::lcc_reset_w));
|
bitlatch.q_out_cb<4>().set(m_lcc, FUNC(i82586_device::reset_w)).invert();
|
||||||
|
|
||||||
I82586(config, m_lcc, 20_MHz_XTAL);
|
I82586(config, m_lcc, 20_MHz_XTAL);
|
||||||
m_lcc->set_addrmap(0, &np600a3_device::lcc_map);
|
m_lcc->set_addrmap(0, &np600a3_device::lcc_map);
|
||||||
|
@ -28,7 +28,6 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void lcc_ca_w(u16 data);
|
void lcc_ca_w(u16 data);
|
||||||
DECLARE_WRITE_LINE_MEMBER(lcc_reset_w);
|
|
||||||
u16 status_r();
|
u16 status_r();
|
||||||
|
|
||||||
void mem_map(address_map &map);
|
void mem_map(address_map &map);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#define LOG_FILTER (1U << 2)
|
#define LOG_FILTER (1U << 2)
|
||||||
#define LOG_CONFIG (1U << 3)
|
#define LOG_CONFIG (1U << 3)
|
||||||
|
|
||||||
|
#define VERBOSE LOG_GENERAL
|
||||||
//#define VERBOSE (LOG_GENERAL | LOG_FRAMES | LOG_FILTER | LOG_CONFIG)
|
//#define VERBOSE (LOG_GENERAL | LOG_FRAMES | LOG_FILTER | LOG_CONFIG)
|
||||||
|
|
||||||
#include "logmacro.h"
|
#include "logmacro.h"
|
||||||
@ -119,6 +120,7 @@ i82586_base_device::i82586_base_device(const machine_config &mconfig, device_typ
|
|||||||
, m_cna(false)
|
, m_cna(false)
|
||||||
, m_rnr(false)
|
, m_rnr(false)
|
||||||
, m_initialised(false)
|
, m_initialised(false)
|
||||||
|
, m_reset(false)
|
||||||
, m_irq_assert(1)
|
, m_irq_assert(1)
|
||||||
, m_cu_state(CU_IDLE)
|
, m_cu_state(CU_IDLE)
|
||||||
, m_ru_state(RU_IDLE)
|
, m_ru_state(RU_IDLE)
|
||||||
@ -171,6 +173,7 @@ void i82586_base_device::device_start()
|
|||||||
save_item(NAME(m_cna));
|
save_item(NAME(m_cna));
|
||||||
save_item(NAME(m_rnr));
|
save_item(NAME(m_rnr));
|
||||||
save_item(NAME(m_initialised));
|
save_item(NAME(m_initialised));
|
||||||
|
save_item(NAME(m_reset));
|
||||||
|
|
||||||
save_item(NAME(m_cu_state));
|
save_item(NAME(m_cu_state));
|
||||||
save_item(NAME(m_ru_state));
|
save_item(NAME(m_ru_state));
|
||||||
@ -232,6 +235,17 @@ WRITE_LINE_MEMBER(i82586_base_device::ca)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WRITE_LINE_MEMBER(i82586_base_device::reset_w)
|
||||||
|
{
|
||||||
|
LOG("reset %s (%s)\n", state ? "asserted" : "cleared", machine().describe_context());
|
||||||
|
|
||||||
|
// reset is active high
|
||||||
|
if (state && !m_reset)
|
||||||
|
device_reset();
|
||||||
|
|
||||||
|
m_reset = state;
|
||||||
|
}
|
||||||
|
|
||||||
int i82586_base_device::recv_start_cb(u8 *buf, int length)
|
int i82586_base_device::recv_start_cb(u8 *buf, int length)
|
||||||
{
|
{
|
||||||
// discard external packets in loopback mode
|
// discard external packets in loopback mode
|
||||||
@ -776,6 +790,12 @@ void i82586_device::device_reset()
|
|||||||
|
|
||||||
void i82586_device::initialise()
|
void i82586_device::initialise()
|
||||||
{
|
{
|
||||||
|
if (m_reset)
|
||||||
|
{
|
||||||
|
LOG("initialise blocked by reset\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// read iscp address from scp
|
// read iscp address from scp
|
||||||
u32 iscp_address = m_space->read_dword(m_scp_address + 8);
|
u32 iscp_address = m_space->read_dword(m_scp_address + 8);
|
||||||
LOG("initialise iscp address 0x%08x\n", iscp_address);
|
LOG("initialise iscp address 0x%08x\n", iscp_address);
|
||||||
|
@ -158,6 +158,7 @@ public:
|
|||||||
auto out_irq_cb() { return m_out_irq.bind(); }
|
auto out_irq_cb() { return m_out_irq.bind(); }
|
||||||
|
|
||||||
DECLARE_WRITE_LINE_MEMBER(ca);
|
DECLARE_WRITE_LINE_MEMBER(ca);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(reset_w);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth, u8 addrwidth);
|
i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth, u8 addrwidth);
|
||||||
@ -219,6 +220,7 @@ protected:
|
|||||||
bool m_cna; // command unit became inactive
|
bool m_cna; // command unit became inactive
|
||||||
bool m_rnr; // receive unit became not ready
|
bool m_rnr; // receive unit became not ready
|
||||||
bool m_initialised;
|
bool m_initialised;
|
||||||
|
bool m_reset;
|
||||||
int m_irq_assert; // configurable interrupt polarity
|
int m_irq_assert; // configurable interrupt polarity
|
||||||
|
|
||||||
// receive/command unit state
|
// receive/command unit state
|
||||||
|
Loading…
Reference in New Issue
Block a user