summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/upd7810
diff options
context:
space:
mode:
author Ramiro Polla <ramiro.polla@gmail.com>2014-11-04 19:47:28 +0100
committer Ramiro Polla <ramiro.polla@gmail.com>2014-11-04 19:47:54 +0100
commitff2a135bd3f748aff061cc3abfda43c8bc72d784 (patch)
tree800e590e91c4ea5f0f9f1fd941c85f8aa4c2a9ef /src/emu/cpu/upd7810
parentadffc17cf5fd3887d06073480dae26c85e5202eb (diff)
upd7810: return meaningful value when PC3 is in control mode
When PC3 is in control mode, it acts as INT2 and external Timer Input. INT2 may be set by connected devices through set_input_line(), so its value can be used when reading or writing to PC3. There is currently no code to support external timer input.
Diffstat (limited to 'src/emu/cpu/upd7810')
-rw-r--r--src/emu/cpu/upd7810/upd7810.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c
index 319f08f78a6..70bdeafe766 100644
--- a/src/emu/cpu/upd7810/upd7810.c
+++ b/src/emu/cpu/upd7810/upd7810.c
@@ -567,8 +567,8 @@ UINT8 upd7810_device::RP(offs_t port)
data = (data & ~0x02) | (m_rxd & 1 ? 0x02 : 0x00);
if (m_mcc & 0x04) /* PC2 = SCK input/output */
data = (data & ~0x04) | (m_sck & 1 ? 0x04 : 0x00);
- if (m_mcc & 0x08) /* PC3 = TI input */
- data = (data & ~0x08) | (m_ti & 1 ? 0x08 : 0x00);
+ if (m_mcc & 0x08) /* PC3 = TI/INT2 input */
+ data = (data & ~0x08) | (m_int2 & 1 ? 0x08 : 0x00);
if (m_mcc & 0x10) /* PC4 = TO output */
data = (data & ~0x10) | (m_to & 1 ? 0x10 : 0x00);
if (m_mcc & 0x20) /* PC5 = CI input */
@@ -648,8 +648,8 @@ void upd7810_device::WP(offs_t port, UINT8 data)
data = (data & ~0x02) | (m_rxd & 1 ? 0x02 : 0x00);
if (m_mcc & 0x04) /* PC2 = SCK input/output */
data = (data & ~0x04) | (m_sck & 1 ? 0x04 : 0x00);
- if (m_mcc & 0x08) /* PC3 = TI input */
- data = (data & ~0x08) | (m_ti & 1 ? 0x08 : 0x00);
+ if (m_mcc & 0x08) /* PC3 = TI/INT2 input */
+ data = (data & ~0x08) | (m_int2 & 1 ? 0x08 : 0x00);
if (m_mcc & 0x10) /* PC4 = TO output */
data = (data & ~0x10) | (m_to & 1 ? 0x10 : 0x00);
if (m_mcc & 0x20) /* PC5 = CI input */