Previous 199869 Revisions Next

r20606 Wednesday 30th January, 2013 at 00:15:49 UTC by David Haywood
new WORKING GAME
Brixian [David Haywood, Zabanitu]

(might replace the RAM dump with the protection code with a slightly cleaner one after a few tests)
[src/mame/drivers]arkanoid.c
[src/mame/includes]arkanoid.h
[src/mame/video]arkanoid.c

trunk/src/mame/includes/arkanoid.h
r20605r20606
1616   arkanoid_state(const machine_config &mconfig, device_type type, const char *tag)
1717      : driver_device(mconfig, type, tag),
1818      m_videoram(*this,"videoram"),
19      m_spriteram(*this,"spriteram") { }
19      m_spriteram(*this,"spriteram"),
20      m_protram(*this,"protram")
21   { }
2022
2123   /* memory pointers */
2224   required_shared_ptr<UINT8> m_videoram;
2325   optional_shared_ptr<UINT8> m_spriteram;
26   optional_shared_ptr<UINT8> m_protram;
2427
2528   /* video-related */
2629   tilemap_t  *m_bg_tilemap;
r20605r20606
6164   DECLARE_WRITE8_MEMBER(arkanoid_videoram_w);
6265   DECLARE_WRITE8_MEMBER(arkanoid_d008_w);
6366   DECLARE_WRITE8_MEMBER(tetrsark_d008_w);
67   DECLARE_WRITE8_MEMBER(brixian_d008_w);
6468   DECLARE_WRITE8_MEMBER(hexa_d008_w);
6569   DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_68705_input_r);
6670   DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_input_mux);
r20605r20606
7377   DECLARE_DRIVER_INIT(arkangc2);
7478   DECLARE_DRIVER_INIT(arkbloc2);
7579   DECLARE_DRIVER_INIT(arkangc);
80   DECLARE_DRIVER_INIT(brixian);
7681   TILE_GET_INFO_MEMBER(get_bg_tile_info);
7782   DECLARE_MACHINE_START(arkanoid);
7883   DECLARE_MACHINE_RESET(arkanoid);
trunk/src/mame/video/arkanoid.c
r20605r20606
7070      m_mcu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
7171}
7272
73
74WRITE8_MEMBER(arkanoid_state::brixian_d008_w)
75{
76   int bank;
77
78   /* bits 0 and 1 flip X and Y, I don't know which is which */
79   if (flip_screen_x() != (data & 0x01))
80   {
81      flip_screen_x_set(data & 0x01);
82      m_bg_tilemap->mark_all_dirty();
83   }
84
85   if (flip_screen_y() != (data & 0x02))
86   {
87      flip_screen_y_set(data & 0x02);
88      m_bg_tilemap->mark_all_dirty();
89   }
90
91   /* bit 2 selects the input paddle */
92   /*  - not relevant to brixian */
93
94   /* bit 3 is coin lockout (but not the service coin) */
95   /*  - not here, means you can only play 1 game */
96
97   /* bit 4 is unknown */
98
99   /* bits 5 and 6 control gfx bank and palette bank. They are used together */
100   /* so I don't know which is which. */
101   bank = (data & 0x20) >> 5;
102
103   if (m_gfxbank != bank)
104   {
105      m_gfxbank = bank;
106      m_bg_tilemap->mark_all_dirty();
107   }
108
109   bank = (data & 0x40) >> 6;
110
111   if (m_palettebank != bank)
112   {
113      m_palettebank = bank;
114      m_bg_tilemap->mark_all_dirty();
115   }
116
117   /* bit 7 is MCU reset on Arkanoid */
118   /*  - does it reset the Brixian MCU too? */
119}
120
121
73122/* different hook-up, everything except for bits 0-1 and 7 aren't tested afaik. */
74123WRITE8_MEMBER(arkanoid_state::tetrsark_d008_w)
75124{
trunk/src/mame/drivers/arkanoid.c
r20605r20606
597597
598598static ADDRESS_MAP_START( brixian_map, AS_PROGRAM, 8, arkanoid_state )
599599   AM_RANGE(0x0000, 0xbfff) AM_ROM
600   AM_RANGE(0xc000, 0xc7ff) AM_RAM
600   AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("protram")
601601   AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w)
602602   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. */
607604   AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(arkanoid_videoram_w) AM_SHARE("videoram")
608605   AM_RANGE(0xe800, 0xe83f) AM_RAM AM_SHARE("spriteram")
609606   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
614607ADDRESS_MAP_END
615608
616609
r20605r20606
869862INPUT_PORTS_END
870863
871864static 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 )
881874
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
902875   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" )
919893INPUT_PORTS_END
920894
921895/***************************************************************************/
r20605r20606
10921066   MCFG_DEVICE_REMOVE("mcu")
10931067MACHINE_CONFIG_END
10941068
1095// todo
1096static MACHINE_CONFIG_DERIVED( brixian, arkanoid )
10971069
1070static MACHINE_CONFIG_START( brixian, arkanoid_state )
1071
10981072   /* basic machine hardware */
1099   MCFG_CPU_MODIFY("maincpu")
1073   MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2)
11001074   MCFG_CPU_PROGRAM_MAP(brixian_map)
11011075   MCFG_CPU_VBLANK_INT_DRIVER("screen", arkanoid_state,  irq0_line_hold)
11021076
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)
11041102MACHINE_CONFIG_END
11051103
1104
1105
11061106/***************************************************************************/
11071107
11081108/* ROMs */
r20605r20606
15471547ROM_START( brixian )
15481548   ROM_REGION( 0x18000, "maincpu", 0 )
15491549   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) )
15511551
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
15521559   ROM_REGION( 0x18000, "gfx1", 0 )
15531560   ROM_LOAD( "b4.bin",      0x00000, 0x8000, CRC(34a7a693) SHA1(793fa6dd065a158bedcd0fdc494cc8fc793ae8be) )
15541561   ROM_LOAD( "c4.bin",      0x08000, 0x8000, CRC(d422eda5) SHA1(4874b57ec8a8aa29937f5ccc2a734ffeb7834d8a) )
r20605r20606
15591566   ROM_LOAD( "n82s131n.6p", 0x0200, 0x0200, CRC(d833ad33) SHA1(a7c17c96a670916e7102afc94dc2f0cb0455f0ce) )
15601567   ROM_LOAD( "n82s131n.6m", 0x0400, 0x0200, CRC(05297649) SHA1(35f99cf8dddd66e26e2110619eb46bd6ccff41df) )
15611568
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.
15641569ROM_END
15651570
15661571
r20605r20606
16811686   machine().root_device().membank("bank1")->configure_entries(0, 2, &RAM[0x10000], 0x4000);
16821687}
16831688
1689DRIVER_INIT_MEMBER(arkanoid_state,brixian)
1690{
1691   UINT8 *RAM = machine().root_device().memregion("protdata")->base();
16841692
1693   for (int i=0x000;i<0x200;i++)
1694      m_protram[i+0x600] = RAM[i];
1695
1696}
1697
16851698/* Game Drivers */
16861699
16871700GAME( 1986, arkanoid,   0,        arkanoid, arkanoid, driver_device, 0,        ROT90, "Taito Corporation Japan", "Arkanoid (World)", GAME_SUPPORTS_SAVE )
r20605r20606
17061719GAME( 1987, arkatour,   0,        arkanoid, arkanoid, driver_device, 0,        ROT90, "Taito America Corporation (Romstar license)", "Tournament Arkanoid (US)", GAME_SUPPORTS_SAVE )
17071720GAME( 19??, tetrsark,   0,        bootleg,  tetrsark, arkanoid_state, tetrsark, ROT0,  "D.R. Korea", "Tetris (D.R. Korea)", GAME_SUPPORTS_SAVE )
17081721GAME( 199?, hexa,       0,        hexa,     hexa, arkanoid_state,     hexa,     ROT0,  "D.R. Korea", "Hexa", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1709GAME( 1993, brixian,    0,        brixian,  brixian, driver_device0,        ROT0,  "Cheil Computer System", "Brixian", GAME_SUPPORTS_SAVE|GAME_NOT_WORKING )
1722GAME( 1993, brixian,    0,        brixian,  brixian, arkanoid_state,  brixian,        ROT0,  "Cheil Computer System", "Brixian", GAME_SUPPORTS_SAVE|GAME_NOT_WORKING )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team