trunk/src/mame/drivers/model2.c
| r29548 | r29549 | |
| 969 | 969 | return 0x00400000; |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | #if 0 |
| 972 | 973 | READ32_MEMBER(model2_state::desert_unk_r) |
| 973 | 974 | { |
| 975 | static UINT8 test; |
| 976 | |
| 977 | test ^= 8; |
| 974 | 978 | // vcop needs bit 3 clear (infinite loop otherwise) |
| 975 | 979 | // desert needs other bits set (not sure which specifically) |
| 976 | 980 | // daytona needs the MSW to return ff |
| 977 | | return 0x00ff00f7; |
| 981 | return 0x00f700ff | (test << 16); |
| 978 | 982 | } |
| 983 | #endif |
| 979 | 984 | |
| 980 | 985 | READ32_MEMBER(model2_state::model2_irq_r) |
| 981 | 986 | { |
| r29548 | r29549 | |
| 1000 | 1005 | } |
| 1001 | 1006 | |
| 1002 | 1007 | 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 | |
| 1003 | 1016 | } |
| 1004 | 1017 | |
| 1005 | 1018 | READ32_MEMBER(model2_state::model2_serial_r) |
| r29548 | r29549 | |
| 1415 | 1428 | AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004") |
| 1416 | 1429 | AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010") |
| 1417 | 1430 | 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") |
| 1419 | 1432 | AM_RANGE(0x01c00040, 0x01c00043) AM_READ(daytona_unk_r ) |
| 1420 | 1433 | AM_RANGE(0x01c00200, 0x01c002ff) AM_RAM AM_SHARE("backup2") |
| 1421 | 1434 | AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE(model2_serial_r, model2o_serial_w ) |
| r29548 | r29549 | |
| 1584 | 1597 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") |
| 1585 | 1598 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1586 | 1599 | |
| 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 | |
| 1587 | 1605 | PORT_START("IN0") |
| 1588 | 1606 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1589 | 1607 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r29548 | r29549 | |
| 1614 | 1632 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 1615 | 1633 | INPUT_PORTS_END |
| 1616 | 1634 | |
| 1635 | static 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) |
| 1684 | INPUT_PORTS_END |
| 1685 | |
| 1617 | 1686 | static INPUT_PORTS_START( daytona ) |
| 1618 | 1687 | PORT_START("1c00000") |
| 1619 | 1688 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "STEER") |
| r29548 | r29549 | |
| 1631 | 1700 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") |
| 1632 | 1701 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1633 | 1702 | |
| 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 | |
| 1634 | 1708 | PORT_START("IN0") |
| 1635 | 1709 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1636 | 1710 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r29548 | r29549 | |
| 1784 | 1858 | { |
| 1785 | 1859 | int scanline = param; |
| 1786 | 1860 | |
| 1787 | | if(scanline == 0) // 384 |
| 1861 | if(scanline == 384) // 384 |
| 1788 | 1862 | { |
| 1789 | 1863 | m_intreq |= (1<<10); |
| 1790 | 1864 | if (m_intena & (1<<10)) |
| 1791 | 1865 | m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); |
| 1792 | 1866 | } |
| 1793 | 1867 | |
| 1794 | | if(scanline == 384/2) |
| 1868 | if(scanline == 0) |
| 1795 | 1869 | { |
| 1796 | 1870 | m_intreq |= (1<<0); |
| 1797 | 1871 | if (m_intena & (1<<0)) |
| r29548 | r29549 | |
| 1962 | 2036 | |
| 1963 | 2037 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1964 | 2038 | 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 |
| 1969 | 2040 | MCFG_SCREEN_UPDATE_DRIVER(model2_state, screen_update_model2) |
| 1970 | 2041 | |
| 1971 | 2042 | MCFG_PALETTE_ADD("palette", 8192) |
| r29548 | r29549 | |
| 5483 | 5554 | GAME( 1993, daytonata, daytona, model2o, daytona, driver_device, 0, ROT0, "Sega", "Daytona USA (Japan, Turbo hack, set 2)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5484 | 5555 | GAME( 1993, daytonam, daytona, model2o, daytona, model2_state, daytonam,ROT0, "Sega", "Daytona USA (Japan, To The MAXX)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5485 | 5556 | GAME( 1994, desert, 0, model2o, desert, driver_device, 0, ROT0, "Sega / Martin Marietta", "Desert Tank", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5486 | | GAME( 1994, vcop, 0, model2o, daytona, driver_device, 0, ROT0, "Sega", "Virtua Cop (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5487 | | GAME( 1994, vcopa, 0, model2o, daytona, driver_device, 0, ROT0, "Sega", "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5557 | GAME( 1994, vcop, 0, model2o, vcop, driver_device, 0, ROT0, "Sega", "Virtua Cop (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5558 | GAME( 1994, vcopa, 0, model2o, vcop, driver_device, 0, ROT0, "Sega", "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 5488 | 5559 | |
| 5489 | 5560 | // Model 2A-CRX (TGPs, SCSP sound board) |
| 5490 | 5561 | GAME( 1995, manxtt, 0, manxttdx,model2, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - DX (Revision D)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |