trunk/src/mame/drivers/arkanoid.c
| r20605 | r20606 | |
| 597 | 597 | |
| 598 | 598 | static ADDRESS_MAP_START( brixian_map, AS_PROGRAM, 8, arkanoid_state ) |
| 599 | 599 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 600 | | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 600 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("protram") |
| 601 | 601 | AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) |
| 602 | 602 | AM_RANGE(0xd001, 0xd001) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) |
| 603 | | AM_RANGE(0xd008, 0xd008) AM_WRITE(arkanoid_d008_w) /* gfx bank, flip screen etc. */ |
| 604 | | AM_RANGE(0xd00c, 0xd00c) AM_READ_PORT("SYSTEM") |
| 605 | | AM_RANGE(0xd010, 0xd010) AM_READ_PORT("BUTTONS") AM_WRITE(watchdog_reset_w) |
| 606 | | AM_RANGE(0xd018, 0xd018) AM_READ_PORT("MUX") AM_WRITENOP |
| 603 | AM_RANGE(0xd008, 0xd008) AM_WRITE(brixian_d008_w) /* gfx bank, flip screen etc. */ |
| 607 | 604 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(arkanoid_videoram_w) AM_SHARE("videoram") |
| 608 | 605 | AM_RANGE(0xe800, 0xe83f) AM_RAM AM_SHARE("spriteram") |
| 609 | 606 | AM_RANGE(0xe840, 0xefff) AM_RAM |
| 610 | | AM_RANGE(0xf000, 0xffff) AM_READNOP /* fixes instant death in final level */ |
| 611 | | // Interesting locations: |
| 612 | | // c105=0a @ title displays each piece |
| 613 | | // c110=01 - Title, 02 - Start Game, 04 - Select Stage |
| 614 | 607 | ADDRESS_MAP_END |
| 615 | 608 | |
| 616 | 609 | |
| r20605 | r20606 | |
| 869 | 862 | INPUT_PORTS_END |
| 870 | 863 | |
| 871 | 864 | static INPUT_PORTS_START( brixian ) |
| 872 | | PORT_START("SYSTEM") |
| 873 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 874 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 875 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 876 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 877 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 878 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 879 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 880 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 865 | PORT_START("INPUTS") |
| 866 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 867 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 868 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 869 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 870 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 871 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 872 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 873 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 881 | 874 | |
| 882 | | PORT_START("BUTTONS") |
| 883 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 884 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 885 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 886 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 887 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 888 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 889 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 890 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 891 | | |
| 892 | | PORT_START("MUX") |
| 893 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) |
| 894 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) |
| 895 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) |
| 896 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) |
| 897 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) |
| 898 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 899 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 900 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 901 | | |
| 902 | 875 | PORT_START("DSW") |
| 903 | | PORT_DIPNAME( 0x0f, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2,3,4") |
| 904 | | PORT_DIPSETTING( 0x00, "2" ) |
| 905 | | PORT_DIPSETTING( 0x01, "3" ) |
| 906 | | PORT_DIPSETTING( 0x03, "4" ) |
| 907 | | PORT_DIPSETTING( 0x07, "5" ) |
| 908 | | PORT_DIPSETTING( 0x0f, "6" ) |
| 909 | | PORT_DIPNAME( 0x30, 0x00, "Speed of Elevator" ) PORT_DIPLOCATION("SW1:5,6") |
| 910 | | PORT_DIPSETTING( 0x00, "Slow" ) |
| 911 | | PORT_DIPSETTING( 0x30, "Fast" ) |
| 912 | | PORT_DIPNAME( 0xc0, 0x40, "Time Left" ) PORT_DIPLOCATION("SW1:7,8") |
| 913 | | PORT_DIPSETTING( 0x00, "Half" ) |
| 914 | | PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) |
| 915 | | PORT_DIPSETTING( 0xc0, "Double" ) |
| 916 | | |
| 917 | | PORT_START("UNUSED") |
| 918 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 876 | PORT_DIPNAME( 0x03, 0x02, "Time Left" ) PORT_DIPLOCATION("SW1:1,2") |
| 877 | PORT_DIPSETTING( 0x00, "More" ) |
| 878 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 879 | PORT_DIPSETTING( 0x02, "Normal (dupe)" ) |
| 880 | PORT_DIPSETTING( 0x03, "Less" ) |
| 881 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") |
| 882 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 883 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 884 | PORT_DIPNAME( 0x08, 0x08, "Speed of Elevator" ) PORT_DIPLOCATION("SW1:4") |
| 885 | PORT_DIPSETTING( 0x00, "Fast" ) |
| 886 | PORT_DIPSETTING( 0x08, "Slow" ) |
| 887 | PORT_DIPNAME( 0xf0, 0x10, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:5,6,7,8") |
| 888 | PORT_DIPSETTING( 0xf0, "2" ) |
| 889 | PORT_DIPSETTING( 0x70, "3" ) |
| 890 | PORT_DIPSETTING( 0x30, "4" ) |
| 891 | PORT_DIPSETTING( 0x10, "5" ) |
| 892 | PORT_DIPSETTING( 0x00, "6" ) |
| 919 | 893 | INPUT_PORTS_END |
| 920 | 894 | |
| 921 | 895 | /***************************************************************************/ |
| r20605 | r20606 | |
| 1092 | 1066 | MCFG_DEVICE_REMOVE("mcu") |
| 1093 | 1067 | MACHINE_CONFIG_END |
| 1094 | 1068 | |
| 1095 | | // todo |
| 1096 | | static MACHINE_CONFIG_DERIVED( brixian, arkanoid ) |
| 1097 | 1069 | |
| 1070 | static MACHINE_CONFIG_START( brixian, arkanoid_state ) |
| 1071 | |
| 1098 | 1072 | /* basic machine hardware */ |
| 1099 | | MCFG_CPU_MODIFY("maincpu") |
| 1073 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) |
| 1100 | 1074 | MCFG_CPU_PROGRAM_MAP(brixian_map) |
| 1101 | 1075 | MCFG_CPU_VBLANK_INT_DRIVER("screen", arkanoid_state, irq0_line_hold) |
| 1102 | 1076 | |
| 1103 | | MCFG_DEVICE_REMOVE("mcu") |
| 1077 | /* there is a 68705 but it's only role appears to be to copy data to RAM at startup */ |
| 1078 | /* the RAM is also battery backed, making the 68705 almost reundant as long as the battery doesn't die(!) */ |
| 1079 | |
| 1080 | MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid) |
| 1081 | MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid) |
| 1082 | |
| 1083 | /* video hardware */ |
| 1084 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1085 | MCFG_SCREEN_REFRESH_RATE(60) |
| 1086 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 1087 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 1088 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 1089 | MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_hexa) |
| 1090 | |
| 1091 | MCFG_GFXDECODE(arkanoid) |
| 1092 | MCFG_PALETTE_LENGTH(512) |
| 1093 | |
| 1094 | MCFG_PALETTE_INIT(RRRR_GGGG_BBBB) |
| 1095 | MCFG_VIDEO_START_OVERRIDE(arkanoid_state,arkanoid) |
| 1096 | |
| 1097 | /* sound hardware */ |
| 1098 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1099 | MCFG_SOUND_ADD("aysnd", AY8910, XTAL_12MHz/4/2) /* Imported from arkanoid - correct? */ |
| 1100 | MCFG_SOUND_CONFIG(hexa_ay8910_config) |
| 1101 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1104 | 1102 | MACHINE_CONFIG_END |
| 1105 | 1103 | |
| 1104 | |
| 1105 | |
| 1106 | 1106 | /***************************************************************************/ |
| 1107 | 1107 | |
| 1108 | 1108 | /* ROMs */ |
| r20605 | r20606 | |
| 1547 | 1547 | ROM_START( brixian ) |
| 1548 | 1548 | ROM_REGION( 0x18000, "maincpu", 0 ) |
| 1549 | 1549 | ROM_LOAD( "b1.bin", 0x00000, 0x8000, CRC(3d167d09) SHA1(1d5bd098b655b8d2f956cfcb718213915bee3e41) ) |
| 1550 | | ROM_LOAD( "e7.bin", 0x08000, 0x2000, CRC(9e3707ab) SHA1(a04fb4824239f8ed1ef1de2f3c0f9d749320b2ba) ) // this is near a 6116 RAM bank, unknown purpose |
| 1550 | ROM_LOAD( "e7.bin", 0x08000, 0x2000, CRC(9e3707ab) SHA1(a04fb4824239f8ed1ef1de2f3c0f9d749320b2ba) ) |
| 1551 | 1551 | |
| 1552 | ROM_REGION( 0x0800, "mcu", 0 ) |
| 1553 | ROM_LOAD( "68705p5", 0x0000, 0x0800, NO_DUMP ) // this just provides the 0x200 bytes of code we load in the protdata region by coping it to 0xc600 on startup |
| 1554 | |
| 1555 | ROM_REGION( 0x200, "protdata", 0 ) |
| 1556 | ROM_LOAD( "protdata.bin", 0x00000, 0x200, CRC(60c04cae) SHA1(bb20ce34898e47ff072abce5d7b9994b48f4087e) ) /* z80 code changes the last couple of bytes while this is running, todo: get a 'clean' dump */ |
| 1557 | |
| 1558 | |
| 1552 | 1559 | ROM_REGION( 0x18000, "gfx1", 0 ) |
| 1553 | 1560 | ROM_LOAD( "b4.bin", 0x00000, 0x8000, CRC(34a7a693) SHA1(793fa6dd065a158bedcd0fdc494cc8fc793ae8be) ) |
| 1554 | 1561 | ROM_LOAD( "c4.bin", 0x08000, 0x8000, CRC(d422eda5) SHA1(4874b57ec8a8aa29937f5ccc2a734ffeb7834d8a) ) |
| r20605 | r20606 | |
| 1559 | 1566 | ROM_LOAD( "n82s131n.6p", 0x0200, 0x0200, CRC(d833ad33) SHA1(a7c17c96a670916e7102afc94dc2f0cb0455f0ce) ) |
| 1560 | 1567 | ROM_LOAD( "n82s131n.6m", 0x0400, 0x0200, CRC(05297649) SHA1(35f99cf8dddd66e26e2110619eb46bd6ccff41df) ) |
| 1561 | 1568 | |
| 1562 | | ROM_REGION( 0x0800, "mcu", 0 ) |
| 1563 | | ROM_LOAD( "68705p5", 0x0000, 0x0800, NO_DUMP ) // this appears to be providing ~0x200 bytes of code at c600, like most semicom games. |
| 1564 | 1569 | ROM_END |
| 1565 | 1570 | |
| 1566 | 1571 | |
| r20605 | r20606 | |
| 1681 | 1686 | machine().root_device().membank("bank1")->configure_entries(0, 2, &RAM[0x10000], 0x4000); |
| 1682 | 1687 | } |
| 1683 | 1688 | |
| 1689 | DRIVER_INIT_MEMBER(arkanoid_state,brixian) |
| 1690 | { |
| 1691 | UINT8 *RAM = machine().root_device().memregion("protdata")->base(); |
| 1684 | 1692 | |
| 1693 | for (int i=0x000;i<0x200;i++) |
| 1694 | m_protram[i+0x600] = RAM[i]; |
| 1695 | |
| 1696 | } |
| 1697 | |
| 1685 | 1698 | /* Game Drivers */ |
| 1686 | 1699 | |
| 1687 | 1700 | GAME( 1986, arkanoid, 0, arkanoid, arkanoid, driver_device, 0, ROT90, "Taito Corporation Japan", "Arkanoid (World)", GAME_SUPPORTS_SAVE ) |
| r20605 | r20606 | |
| 1706 | 1719 | GAME( 1987, arkatour, 0, arkanoid, arkanoid, driver_device, 0, ROT90, "Taito America Corporation (Romstar license)", "Tournament Arkanoid (US)", GAME_SUPPORTS_SAVE ) |
| 1707 | 1720 | GAME( 19??, tetrsark, 0, bootleg, tetrsark, arkanoid_state, tetrsark, ROT0, "D.R. Korea", "Tetris (D.R. Korea)", GAME_SUPPORTS_SAVE ) |
| 1708 | 1721 | GAME( 199?, hexa, 0, hexa, hexa, arkanoid_state, hexa, ROT0, "D.R. Korea", "Hexa", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1709 | | GAME( 1993, brixian, 0, brixian, brixian, driver_device, 0, ROT0, "Cheil Computer System", "Brixian", GAME_SUPPORTS_SAVE|GAME_NOT_WORKING ) |
| 1722 | GAME( 1993, brixian, 0, brixian, brixian, arkanoid_state, brixian, ROT0, "Cheil Computer System", "Brixian", GAME_SUPPORTS_SAVE|GAME_NOT_WORKING ) |