apple2: fixed IIe/IIc self-test regression, fixed IIe LC reset state. [R. Belmont]

This commit is contained in:
arbee 2017-02-28 21:34:48 -05:00
parent 6febbaeb68
commit 80f55bbd0d
2 changed files with 12 additions and 5 deletions

View File

@ -69,7 +69,6 @@ void a2bus_ramcard_device::do_io(int offset, bool write)
{ {
int old_inh_state = m_inh_state; int old_inh_state = m_inh_state;
m_inh_state = INH_NONE;
m_dxxx_bank = 0; m_dxxx_bank = 0;
switch (offset) switch (offset)
@ -88,10 +87,12 @@ void a2bus_ramcard_device::do_io(int offset, bool write)
{ {
m_writecnt++; m_writecnt++;
} }
m_inh_state &= ~INH_READ;
break; break;
case 0x2: case 0xa: case 0x6: case 0xe: case 0x2: case 0xa: case 0x6: case 0xe:
m_writecnt = 0; m_writecnt = 0;
m_inh_state = INH_NONE;
break; break;
case 0x3: case 0xb: case 0x7: case 0xf: case 0x3: case 0xb: case 0x7: case 0xf:
@ -103,13 +104,14 @@ void a2bus_ramcard_device::do_io(int offset, bool write)
{ {
m_writecnt++; m_writecnt++;
} }
m_inh_state = INH_READ; m_inh_state |= INH_READ;
break; break;
} }
if (m_writecnt >= 2) if (m_writecnt >= 2)
{ {
m_inh_state |= INH_WRITE; m_inh_state |= INH_WRITE;
m_writecnt = 2;
} }
if (!(offset & 8)) if (!(offset & 8))

View File

@ -757,7 +757,9 @@ void apple2e_state::machine_reset()
m_lcram = false; m_lcram = false;
m_lcram2 = true; m_lcram2 = true;
m_lcwriteenable = true; m_lcwriteenable = true;
m_wrtcount = 0; m_wrtcount = 2;
// set bank device to read ROM, write enabled
m_lcbank->set_bank(0);
m_exp_bankhior = 0xf0; m_exp_bankhior = 0xf0;
@ -1013,12 +1015,12 @@ void apple2e_state::lc_update(int offset, bool write)
m_lcram = false; m_lcram = false;
m_lcram2 = false; m_lcram2 = false;
m_lcwriteenable = false;
switch (offset) switch (offset)
{ {
case 0x0: case 0x8: case 0x4: case 0xc: case 0x0: case 0x8: case 0x4: case 0xc:
m_wrtcount = 0; m_wrtcount = 0;
m_lcwriteenable = false;
m_lcram = true; m_lcram = true;
break; break;
@ -1035,6 +1037,7 @@ void apple2e_state::lc_update(int offset, bool write)
case 0x2: case 0xa: case 0x6: case 0xe: case 0x2: case 0xa: case 0x6: case 0xe:
m_wrtcount = 0; m_wrtcount = 0;
m_lcwriteenable = false;
break; break;
case 0x3: case 0xb: case 0x7: case 0xf: case 0x3: case 0xb: case 0x7: case 0xf:
@ -1053,6 +1056,7 @@ void apple2e_state::lc_update(int offset, bool write)
if (m_wrtcount >= 2) if (m_wrtcount >= 2)
{ {
m_lcwriteenable = true; m_lcwriteenable = true;
m_wrtcount = 2;
} }
if (!(offset & 8)) if (!(offset & 8))
@ -1080,9 +1084,10 @@ void apple2e_state::lc_update(int offset, bool write)
} }
#if 0 #if 0
printf("LC: new state %c%c dxxx=%04x altzp=%d\n", printf("LC: new state %c%c (%d) dxxx=%04x altzp=%d\n",
m_lcram ? 'R' : 'x', m_lcram ? 'R' : 'x',
m_lcwriteenable ? 'W' : 'x', m_lcwriteenable ? 'W' : 'x',
m_wrtcount,
m_lcram2 ? 0x1000 : 0x0000, m_lcram2 ? 0x1000 : 0x0000,
m_altzp); m_altzp);
#endif #endif