mirror of
https://github.com/holub/mame
synced 2025-06-11 07:14:07 +03:00
Some Ap2000 fixes and UPD7810 analog fixes (#7075)
* Upd7810 analog conversion fixes (conversion registers, scan mode) * Epson Ap2000 fixes for controls (remap controls to keypad)
This commit is contained in:
parent
39a6166160
commit
5dcef206e2
@ -172,13 +172,13 @@ static INPUT_PORTS_START( epson_lx810l )
|
|||||||
|
|
||||||
/* Buttons on printer */
|
/* Buttons on printer */
|
||||||
PORT_START("ONLINE")
|
PORT_START("ONLINE")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("On Line") PORT_CODE(KEYCODE_O) PORT_CHANGED_MEMBER(DEVICE_SELF, epson_lx810l_device, online_sw, 0)
|
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("On Line") PORT_CODE(KEYCODE_0_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, epson_lx810l_device, online_sw, 0)
|
||||||
PORT_START("FORMFEED")
|
PORT_START("FORMFEED")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Form Feed") PORT_CODE(KEYCODE_F) PORT_TOGGLE
|
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Form Feed") PORT_CODE(KEYCODE_7_PAD)
|
||||||
PORT_START("LINEFEED")
|
PORT_START("LINEFEED")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line Feed") PORT_CODE(KEYCODE_L) PORT_TOGGLE
|
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line Feed") PORT_CODE(KEYCODE_9_PAD)
|
||||||
PORT_START("LOADEJECT")
|
PORT_START("LOADEJECT")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load/Eject") PORT_CODE(KEYCODE_E)
|
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load/Eject") PORT_CODE(KEYCODE_1_PAD)
|
||||||
|
|
||||||
/* DIPSW1 */
|
/* DIPSW1 */
|
||||||
PORT_START("DIPSW1")
|
PORT_START("DIPSW1")
|
||||||
|
@ -1511,10 +1511,10 @@ void upd7810_device::handle_timers(int cycles)
|
|||||||
switch (m_adout)
|
switch (m_adout)
|
||||||
{
|
{
|
||||||
// volfied code checks bit 0x80, old code set bit 0x01, TODO: verify which bits are set on real hw
|
// volfied code checks bit 0x80, old code set bit 0x01, TODO: verify which bits are set on real hw
|
||||||
case 0: CR0 = m_tmpcr ? 0xff:0x00; break;
|
case 0: CR0 = m_tmpcr; break;
|
||||||
case 1: CR1 = m_tmpcr ? 0xff:0x00; break;
|
case 1: CR1 = m_tmpcr; break;
|
||||||
case 2: CR2 = m_tmpcr ? 0xff:0x00; break;
|
case 2: CR2 = m_tmpcr; break;
|
||||||
case 3: CR3 = m_tmpcr ? 0xff:0x00; break;
|
case 3: CR3 = m_tmpcr; break;
|
||||||
}
|
}
|
||||||
m_adout = (m_adout + 1) & 0x03;
|
m_adout = (m_adout + 1) & 0x03;
|
||||||
if (m_adout == 0)
|
if (m_adout == 0)
|
||||||
@ -1545,16 +1545,17 @@ void upd7810_device::handle_timers(int cycles)
|
|||||||
m_adcnt -= m_adtot;
|
m_adcnt -= m_adtot;
|
||||||
switch (m_adout)
|
switch (m_adout)
|
||||||
{
|
{
|
||||||
case 0: CR0 = m_tmpcr ? 0xff:0x00; break;
|
case 0: CR0 = m_tmpcr; break;
|
||||||
case 1: CR1 = m_tmpcr ? 0xff:0x00; break;
|
case 1: CR1 = m_tmpcr; break;
|
||||||
case 2: CR2 = m_tmpcr ? 0xff:0x00; break;
|
case 2: CR2 = m_tmpcr; break;
|
||||||
case 3: CR3 = m_tmpcr ? 0xff:0x00; break;
|
case 3: CR3 = m_tmpcr; break;
|
||||||
}
|
}
|
||||||
m_adin = (m_adin + 1) & 0x07;
|
m_adin = (m_adin + 1) & 0x03; // should loop from 0 to 3 for AN0-AN3 or AN4-AN7
|
||||||
m_adout = (m_adout + 1) & 0x03;
|
m_adout = (m_adout + 1) & 0x03;
|
||||||
if (m_adout == 0)
|
if (m_adout == 0)
|
||||||
IRR |= INTFAD;
|
IRR |= INTFAD;
|
||||||
m_shdone = 0;
|
m_shdone = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user