mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
la120: Write noninverted clock first; make ER1400 address decoding more efficient (nw)
This commit is contained in:
parent
7c2220e8ca
commit
1ed7fe1518
@ -115,10 +115,12 @@ void er1400_device::read_data()
|
||||
int selected = 0;
|
||||
m_data_register = 0;
|
||||
for (int tens = 10; tens < 20; tens++)
|
||||
{
|
||||
if (BIT(m_address_register, tens))
|
||||
{
|
||||
for (int units = 0; units < 10; units++)
|
||||
{
|
||||
if (BIT(m_address_register, tens) && BIT(m_address_register, units))
|
||||
if (BIT(m_address_register, units))
|
||||
{
|
||||
offs_t offset = 10 * (tens - 10) + units;
|
||||
logerror("Reading data at %d (%04X) into register\n", offset, m_data_array[offset]);
|
||||
@ -127,6 +129,7 @@ void er1400_device::read_data()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selected != 1)
|
||||
logerror("%d addresses selected for read operation\n", selected);
|
||||
@ -142,10 +145,12 @@ void er1400_device::write_data()
|
||||
{
|
||||
int selected = 0;
|
||||
for (int tens = 10; tens < 20; tens++)
|
||||
{
|
||||
if (BIT(m_address_register, tens))
|
||||
{
|
||||
for (int units = 0; units < 10; units++)
|
||||
{
|
||||
if (BIT(m_address_register, tens) && BIT(m_address_register, units))
|
||||
if (BIT(m_address_register, units))
|
||||
{
|
||||
offs_t offset = 10 * (tens - 10) + units;
|
||||
if ((m_data_array[offset] & ~m_data_register) != 0)
|
||||
@ -157,6 +162,7 @@ void er1400_device::write_data()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selected != 1)
|
||||
logerror("%d addresses selected for write operation\n", selected);
|
||||
@ -172,10 +178,12 @@ void er1400_device::erase_data()
|
||||
{
|
||||
int selected = 0;
|
||||
for (int tens = 10; tens < 20; tens++)
|
||||
{
|
||||
if (BIT(m_address_register, tens))
|
||||
{
|
||||
for (int units = 0; units < 10; units++)
|
||||
{
|
||||
if (BIT(m_address_register, tens) && BIT(m_address_register, units))
|
||||
if (BIT(m_address_register, units))
|
||||
{
|
||||
offs_t offset = 10 * (tens - 10) + units;
|
||||
if (m_data_array[offset] != 0x3fff)
|
||||
@ -187,6 +195,7 @@ void er1400_device::erase_data()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selected != 1)
|
||||
logerror("%d addresses selected for erase operation\n", selected);
|
||||
|
@ -151,14 +151,13 @@ WRITE8_MEMBER( decwriter_state::la120_NVR_w )
|
||||
m_maincpu->adjust_icount(-1);
|
||||
|
||||
// ER1400 has negative logic, but 7406 inverters are used
|
||||
m_nvm->clock_w(BIT(offset, 0));
|
||||
m_nvm->c3_w(BIT(offset, 10));
|
||||
m_nvm->c2_w(BIT(offset, 9));
|
||||
m_nvm->c1_w(BIT(offset, 8));
|
||||
|
||||
// C2 is used to disable pullup on data line
|
||||
m_nvm->data_w(!BIT(offset, 9) ? 0 : !BIT(data, 7));
|
||||
|
||||
m_nvm->clock_w(!BIT(offset, 0));
|
||||
}
|
||||
|
||||
/* todo: fully reverse engineer DC305 ASIC */
|
||||
|
Loading…
Reference in New Issue
Block a user