Previous 199869 Revisions Next

r29549 Saturday 12th April, 2014 at 01:15:29 UTC by Angelo Salese
Added vblank bit in Model 2 Old Revision, fixes Virtua Cop booting [Angelo Salese]

(Has it ever booted?)
[src/mame/drivers]model2.c

trunk/src/mame/drivers/model2.c
r29548r29549
969969   return 0x00400000;
970970}
971971
972#if 0
972973READ32_MEMBER(model2_state::desert_unk_r)
973974{
975   static UINT8 test;
976
977   test ^= 8;
974978   // vcop needs bit 3 clear (infinite loop otherwise)
975979   // desert needs other bits set (not sure which specifically)
976980   // daytona needs the MSW to return ff
977   return 0x00ff00f7;
981   return 0x00f700ff | (test << 16);
978982}
983#endif
979984
980985READ32_MEMBER(model2_state::model2_irq_r)
981986{
r29548r29549
10001005   }
10011006
10021007   m_intreq &= data;
1008   UINT32 irq_ack = data ^ 0xffffffff;
1009
1010   if(irq_ack & 1<<0)
1011      m_maincpu->set_input_line(I960_IRQ0, CLEAR_LINE);
1012
1013   if(irq_ack & 1<<10)
1014      m_maincpu->set_input_line(I960_IRQ3, CLEAR_LINE);
1015
10031016}
10041017
10051018READ32_MEMBER(model2_state::model2_serial_r)
r29548r29549
14151428   AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004")
14161429   AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010")
14171430   AM_RANGE(0x01c00014, 0x01c00017) AM_READ_PORT("1c00014")
1418   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ(desert_unk_r )
1431   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ_PORT("1c0001c")
14191432   AM_RANGE(0x01c00040, 0x01c00043) AM_READ(daytona_unk_r )
14201433   AM_RANGE(0x01c00200, 0x01c002ff) AM_RAM AM_SHARE("backup2")
14211434   AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE(model2_serial_r, model2o_serial_w )
r29548r29549
15841597   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
15851598   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
15861599
1600   PORT_START("1c0001c")
1601   PORT_BIT( 0xfff7ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1602   PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1603
1604
15871605   PORT_START("IN0")
15881606   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
15891607   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r29548r29549
16141632   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
16151633INPUT_PORTS_END
16161634
1635static INPUT_PORTS_START( vcop )
1636   PORT_START("1c00000")
1637   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "STEER")
1638   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "ACCEL")
1639
1640   PORT_START("1c00004")
1641   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "BRAKE")
1642   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1643
1644   PORT_START("1c00010")
1645   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0")
1646   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1")
1647
1648   PORT_START("1c00014")
1649   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
1650   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1651
1652   PORT_START("1c0001c")
1653   PORT_BIT( 0xfff7ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1654   PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1655
1656   PORT_START("IN0")
1657   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
1658   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
1659   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
1660   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
1661   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 )
1662   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // VR 1 (Blue)
1663   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) // VR 2 (Green)
1664   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) // VR 3 (Red)
1665
1666   PORT_START("IN1")
1667   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // shift
1668   PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNUSED )
1669   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)  // machine gun
1670   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)  // cannon
1671   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
1672
1673   PORT_START("IN2")
1674   MODEL2_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
1675
1676   PORT_START("STEER")
1677   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
1678
1679   PORT_START("ACCEL")
1680   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
1681
1682   PORT_START("BRAKE")
1683   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
1684INPUT_PORTS_END
1685
16171686static INPUT_PORTS_START( daytona )
16181687   PORT_START("1c00000")
16191688   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "STEER")
r29548r29549
16311700   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
16321701   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
16331702
1703   PORT_START("1c0001c")
1704   PORT_BIT( 0xfff7ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1705   PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1706
1707
16341708   PORT_START("IN0")
16351709   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
16361710   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r29548r29549
17841858{
17851859   int scanline = param;
17861860
1787   if(scanline == 0) // 384
1861   if(scanline == 384) // 384
17881862   {
17891863      m_intreq |= (1<<10);
17901864      if (m_intena & (1<<10))
17911865         m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE);
17921866   }
17931867
1794   if(scanline == 384/2)
1868   if(scanline == 0)
17951869   {
17961870      m_intreq |= (1<<0);
17971871      if (m_intena & (1<<0))
r29548r29549
19622036
19632037   MCFG_SCREEN_ADD("screen", RASTER)
19642038   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK )
1965   MCFG_SCREEN_REFRESH_RATE(60)
1966   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1967   MCFG_SCREEN_SIZE(62*8, 48*8)
1968   MCFG_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
2039   MCFG_SCREEN_RAW_PARAMS(25000000/2, 496+16, 0, 496, 384+16, 0, 384) // not accurate
19692040   MCFG_SCREEN_UPDATE_DRIVER(model2_state, screen_update_model2)
19702041
19712042   MCFG_PALETTE_ADD("palette", 8192)
r29548r29549
54835554GAME( 1993, daytonata, daytona, model2o, daytona, driver_device, 0,       ROT0, "Sega",   "Daytona USA (Japan, Turbo hack, set 2)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
54845555GAME( 1993, daytonam,  daytona, model2o, daytona, model2_state,  daytonam,ROT0, "Sega",   "Daytona USA (Japan, To The MAXX)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
54855556GAME( 1994, desert,          0, model2o, desert,  driver_device, 0,       ROT0, "Sega / Martin Marietta", "Desert Tank", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5486GAME( 1994, vcop,            0, model2o, daytona, driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5487GAME( 1994, vcopa,           0, model2o, daytona, driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5557GAME( 1994, vcop,            0, model2o, vcop,    driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5558GAME( 1994, vcopa,           0, model2o, vcop,    driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
54885559
54895560// Model 2A-CRX (TGPs, SCSP sound board)
54905561GAME( 1995, manxtt, 0, manxttdx,model2, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - DX (Revision D)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team