Previous 199869 Revisions Next

r19780 Monday 24th December, 2012 at 21:31:05 UTC by Angelo Salese
Fixed Space Panic and Excite Mahjong inputs, -2 left ...
[src/mess/drivers]pv1000.c

trunk/src/mess/drivers/pv1000.c
r19779r19780
145145   break;
146146
147147   case 0x05:
148      m_fd_data = 1;
148      m_fd_data = 0xf;
149149      break;
150150//   case 0x06 VRAM + PCG location, always fixed at 0xb8xx
151151   case 0x07:
r19779r19780
170170   case 0x04:
171171      /* Bit 1 = 1 => Data is available in port FD */
172172      /* Bit 0 = 1 => Buffer at port FD is empty */
173      data = 0;
173174      data = ( m_screen->vpos() >= 212 && m_screen->vpos() <= 220 ) ? 1 : 0;
174175      data |= m_fd_data ? 2 : 0;
175176      break;
176177   case 0x05:
178      static const char *const joynames[] = { "IN0", "IN1", "IN2", "IN3" };
179      int i;
180
177181      data = 0;
178      if ( m_io_regs[5] & 0x08 )
182
183      for(i=0;i<4;i++)
179184      {
180         data = ioport( "IN3" )->read();
185         if(m_io_regs[5] & 1 << i)
186         {
187            data |= ioport(joynames[i])->read();
188            m_fd_data &= ~(1 << i);
189         }
181190      }
182      if ( m_io_regs[5] & 0x04 )
183      {
184         data = ioport( "IN2" )->read();
185      }
186      if ( m_io_regs[5] & 0x02 )
187      {
188         data = ioport( "IN1" )->read();
189      }
190      if ( m_io_regs[5] & 0x01 )
191      {
192         data = ioport( "IN0" )->read();
193      }
194      m_fd_data = 0;
191
192      //m_fd_data = 0;
195193      break;
196194   }
197195

Previous 199869 Revisions Next


© 1997-2024 The MAME Team