Previous 199869 Revisions Next

r33210 Tuesday 4th November, 2014 at 18:47:54 UTC by Ramiro Polla
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.
[src/emu/cpu/upd7810]upd7810.c

trunk/src/emu/cpu/upd7810/upd7810.c
r241721r241722
567567         data = (data & ~0x02) | (m_rxd & 1 ? 0x02 : 0x00);
568568      if (m_mcc & 0x04)   /* PC2 = SCK input/output */
569569         data = (data & ~0x04) | (m_sck & 1 ? 0x04 : 0x00);
570      if (m_mcc & 0x08)   /* PC3 = TI input */
571         data = (data & ~0x08) | (m_ti & 1 ? 0x08 : 0x00);
570      if (m_mcc & 0x08)   /* PC3 = TI/INT2 input */
571         data = (data & ~0x08) | (m_int2 & 1 ? 0x08 : 0x00);
572572      if (m_mcc & 0x10)   /* PC4 = TO output */
573573         data = (data & ~0x10) | (m_to & 1 ? 0x10 : 0x00);
574574      if (m_mcc & 0x20)   /* PC5 = CI input */
r241721r241722
648648         data = (data & ~0x02) | (m_rxd & 1 ? 0x02 : 0x00);
649649      if (m_mcc & 0x04)   /* PC2 = SCK input/output */
650650         data = (data & ~0x04) | (m_sck & 1 ? 0x04 : 0x00);
651      if (m_mcc & 0x08)   /* PC3 = TI input */
652         data = (data & ~0x08) | (m_ti & 1 ? 0x08 : 0x00);
651      if (m_mcc & 0x08)   /* PC3 = TI/INT2 input */
652         data = (data & ~0x08) | (m_int2 & 1 ? 0x08 : 0x00);
653653      if (m_mcc & 0x10)   /* PC4 = TO output */
654654         data = (data & ~0x10) | (m_to & 1 ? 0x10 : 0x00);
655655      if (m_mcc & 0x20)   /* PC5 = CI input */


Previous 199869 Revisions Next


© 1997-2024 The MAME Team