Previous 199869 Revisions Next

r17414 Thursday 23rd August, 2012 at 02:47:53 UTC by Angelo Salese
Fixed Pad latch
[/trunk]makefile
[src/mess/drivers]pcfx.c

trunk/src/mess/drivers/pcfx.c
r17413r17414
9090   {
9191      // received data
9292      //printf("RX %d\n",port_type);
93      res = m_pad.latch[port_type] >> ((offset<<1) & 2) ? 16 : 0;
93      res = m_pad.latch[port_type] >> (((offset<<1) & 2) ? 16 : 0);
9494
9595      if(((offset<<1) & 0x02) == 0)
96      {
9697         m_pad.status[port_type] &= ~8; // clear latch on LSB read according to docs
98         //set_irq_line(11, 0);
99      }
97100   }
98101
99102   return res;
r17413r17414
108111   state->m_pad.status[param] |= 8;
109112   state->m_pad.ctrl[param] &= ~1; // ack TX line
110113   // TODO: pad IRQ
114//   state->set_irq_line(11, 1);
111115}
112116
113117WRITE16_MEMBER( pcfx_state::pad_w )
r17413r17414
158162   xxxx ---- ---- ---- ID (0xf = 6 button pad, 0xe = tap, 0xd = ?)
159163   */
160164   PORT_START("P1")
161   PORT_BIT( 0xf0000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
162   PORT_BIT( 0x0fffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
165   PORT_BIT( 0xf0000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ID
166   PORT_DIPNAME( 0x01000000, 0x01000000, "1" )
167   PORT_DIPSETTING(    0x01000000, DEF_STR( Off ) )
168   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
169   PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
170   PORT_DIPSETTING(    0x02000000, DEF_STR( Off ) )
171   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
172   PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
173   PORT_DIPSETTING(    0x04000000, DEF_STR( Off ) )
174   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
175   PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
176   PORT_DIPSETTING(    0x08000000, DEF_STR( Off ) )
177   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
178   PORT_DIPNAME( 0x010000, 0x010000, "2" )
179   PORT_DIPSETTING(    0x010000, DEF_STR( Off ) )
180   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
181   PORT_DIPNAME( 0x020000, 0x020000, DEF_STR( Unknown ) )
182   PORT_DIPSETTING(    0x020000, DEF_STR( Off ) )
183   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
184   PORT_DIPNAME( 0x040000, 0x040000, DEF_STR( Unknown ) )
185   PORT_DIPSETTING(    0x040000, DEF_STR( Off ) )
186   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
187   PORT_DIPNAME( 0x080000, 0x080000, DEF_STR( Unknown ) )
188   PORT_DIPSETTING(    0x080000, DEF_STR( Off ) )
189   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
190   PORT_DIPNAME( 0x100000, 0x100000, DEF_STR( Unknown ) )
191   PORT_DIPSETTING(    0x100000, DEF_STR( Off ) )
192   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
193   PORT_DIPNAME( 0x200000, 0x200000, DEF_STR( Unknown ) )
194   PORT_DIPSETTING(    0x200000, DEF_STR( Off ) )
195   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
196   PORT_DIPNAME( 0x400000, 0x400000, DEF_STR( Unknown ) )
197   PORT_DIPSETTING(    0x400000, DEF_STR( Off ) )
198   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
199   PORT_DIPNAME( 0x800000, 0x800000, DEF_STR( Unknown ) )
200   PORT_DIPSETTING(    0x800000, DEF_STR( Off ) )
201   PORT_DIPSETTING(    0x000000, DEF_STR( On ) )
202   PORT_DIPNAME( 0x0100, 0x0100, "3" )
203   PORT_DIPSETTING(    0x0100, DEF_STR( Off ) )
204   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
205   PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) // *
206   PORT_DIPSETTING(    0x0200, DEF_STR( Off ) )
207   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
208   PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) // *
209   PORT_DIPSETTING(    0x0400, DEF_STR( Off ) )
210   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
211   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
212   PORT_DIPSETTING(    0x0800, DEF_STR( Off ) )
213   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
214   PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
215   PORT_DIPSETTING(    0x1000, DEF_STR( Off ) )
216   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
217   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
218   PORT_DIPSETTING(    0x2000, DEF_STR( Off ) )
219   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
220   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
221   PORT_DIPSETTING(    0x4000, DEF_STR( Off ) )
222   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
223   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
224   PORT_DIPSETTING(    0x8000, DEF_STR( Off ) )
225   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
226   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1) PORT_NAME("RUN button")
227   PORT_DIPNAME( 0x01, 0x01, "4" )
228   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
229   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
230   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
231   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
232   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
233   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
234   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
235   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
236   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
237   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
238   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
239   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
240   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
241   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
242   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
243   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
244   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
245   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
246   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
247   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
163248
164249   PORT_START("P2")
165250   PORT_BIT( 0xf0000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
r17413r17414
284369{
285370   if ( state )
286371   {
287printf("Setting irq line %d\n", line);
372//printf("Setting irq line %d\n", line);
288373      m_irq_pending |= ( 1 << ( 15 - line ) );
289374   }
290375   else
291376   {
292printf("Clearing irq line %d\n", line);
377//printf("Clearing irq line %d\n", line);
293378      m_irq_pending &= ~( 1 << ( 15 - line ) );
294379   }
295380   check_irqs();
trunk/makefile
r17413r17414
222222BUILD_JPEGLIB = 1
223223
224224# uncomment next line to include the symbols
225# SYMBOLS = 1
225SYMBOLS = 1
226226
227227# specify symbols level or leave commented to use the default
228228# (default is SYMLEVEL = 2 normally; use 1 if you only need backtrace)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team