Previous 199869 Revisions Next

r26428 Tuesday 26th November, 2013 at 01:46:42 UTC by Angelo Salese
Added pdir register
[src/emu/machine]tmp68301.c tmp68301.h
[src/mame/drivers]csplayh5.c niyanpai.c

trunk/src/emu/machine/tmp68301.c
r26427r26428
66    3 timers, address decoder, wait generator, interrupt controller,
77    all integrated in a single chip.
88
9   TODO:
10   - Interrupt generation: handle pending / in-service mechanisms
11   - Parallel port: handle timing latency
12   - Serial port: not done at all
13   - (and many other things)
14
915***************************************************************************/
1016
1117#include "emu.h"
r26427r26428
1925   AM_RANGE(0x098,0x099) AM_READWRITE(iisr_r,iisr_w)
2026
2127   /* Parallel Port */
28   AM_RANGE(0x100,0x101) AM_READWRITE(pdir_r,pdir_w)
2229   AM_RANGE(0x10a,0x10b) AM_READWRITE(pdr_r,pdr_w)
2330
2431   /* Serial Port */
r26427r26428
6572   m_scr &= 0xa1;
6673}
6774
68/* TODO: bit direction */
75/* Parallel direction: 1 = output, 0 = input */
76READ16_MEMBER(tmp68301_device::pdir_r)
77{
78   return m_pdir;
79}
80
81WRITE16_MEMBER(tmp68301_device::pdir_w)
82{
83   m_pdir = data;
84}
85
6986READ16_MEMBER(tmp68301_device::pdr_r)
7087{
71   return m_in_parallel_func(0);
88   return m_in_parallel_func(0) & ~m_pdir;
7289}
7390
7491WRITE16_MEMBER(tmp68301_device::pdr_w)
7592{
76   m_out_parallel_func(0,data);
93   m_out_parallel_func(0,data & m_pdir);
7794}
7895
7996
trunk/src/emu/machine/tmp68301.h
r26427r26428
5757   DECLARE_WRITE16_MEMBER(scr_w);
5858   DECLARE_READ16_MEMBER(pdr_r);
5959   DECLARE_WRITE16_MEMBER(pdr_w);
60   DECLARE_READ16_MEMBER(pdir_r);
61   DECLARE_WRITE16_MEMBER(pdir_w);
6062
6163protected:
6264   // device-level overrides
r26427r26428
8486   UINT16 m_imr;
8587   UINT16 m_iisr;
8688   UINT16 m_scr;
89   UINT16 m_pdir;
8790
8891   inline UINT16 read_word(offs_t address);
8992   inline void write_word(offs_t address, UINT16 data);
trunk/src/mame/drivers/csplayh5.c
r26427r26428
102102
103103
104104
105#define USE_H8 1
105#define USE_H8 0
106106
107107// from MSX2 driver, may be not accurate for this HW
108108#define MSX2_XBORDER_PIXELS     16
trunk/src/mame/drivers/niyanpai.c
r26427r26428
314314
315315   m_motor_on = data & 4;
316316   coin_counter_w(machine(),0,data & 1);
317   coin_lockout_w(machine(), 0,data & 0x08);
317   coin_lockout_w(machine(),0,data & 0x08);
318318}
319319
320320CUSTOM_INPUT_MEMBER(niyanpai_state::musobana_outcoin_flag_r)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team