Previous 199869 Revisions Next

r41754 Tuesday 17th November, 2015 at 17:16:33 UTC by Osso
arkanoid.cpp: zero-fill and save some hexaa specific member variables. Also removed OVERRIDE macros since start and reset functions are common for all the machines in the driver. No functional change expected. (nw)
[src/mame/drivers]arkanoid.cpp
[src/mame/includes]arkanoid.h
[src/mame/video]arkanoid.cpp

trunk/src/mame/drivers/arkanoid.cpp
r250265r250266
811811
812812READ8_MEMBER(arkanoid_state::hexaa_f000_r)
813813{
814//  return hexaa_from_sub;
814//  return m_hexaa_from_sub;
815815   return rand();
816816}
817817
818818WRITE8_MEMBER(arkanoid_state::hexaa_f000_w)
819819{
820   hexaa_from_main = data;
820   m_hexaa_from_main = data;
821821}
822822
823823static ADDRESS_MAP_START( hexaa_map, AS_PROGRAM, 8, arkanoid_state )
r250265r250266
840840
841841WRITE8_MEMBER(arkanoid_state::hexaa_sub_80_w)
842842{
843   hexaa_from_sub = data;
843   m_hexaa_from_sub = data;
844844}
845845
846846READ8_MEMBER(arkanoid_state::hexaa_sub_90_r)
847847{
848   return hexaa_from_main;
848   return m_hexaa_from_main;
849849//  return rand();
850850}
851851
r250265r250266
11831183
11841184/* Machine Drivers */
11851185
1186MACHINE_START_MEMBER(arkanoid_state,arkanoid)
1186void arkanoid_state::machine_start()
11871187{
11881188   save_item(NAME(m_bootleg_cmd));
11891189
r250265r250266
12041204   save_item(NAME(m_palettebank));
12051205}
12061206
1207MACHINE_RESET_MEMBER(arkanoid_state,arkanoid)
1207void arkanoid_state::machine_reset()
12081208{
12091209   m_port_a_in = 0;
12101210   m_port_a_out = 0;
r250265r250266
12451245
12461246   MCFG_QUANTUM_TIME(attotime::from_hz(6000))                  // 100 CPU slices per second to synchronize between the MCU and the main CPU
12471247
1248   MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid)
1249   MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid)
1250
12511248   /* video hardware */
12521249   MCFG_SCREEN_ADD("screen", RASTER)
12531250//  MCFG_SCREEN_REFRESH_RATE(60)
r250265r250266
12601257
12611258   MCFG_GFXDECODE_ADD("gfxdecode", "palette", arkanoid)
12621259   MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 512)
1263   MCFG_VIDEO_START_OVERRIDE(arkanoid_state,arkanoid)
12641260
12651261   /* sound hardware */
12661262   MCFG_SPEAKER_STANDARD_MONO("mono")
r250265r250266
12791275   MCFG_CPU_PROGRAM_MAP(hexa_map)
12801276   MCFG_CPU_VBLANK_INT_DRIVER("screen", arkanoid_state,  irq0_line_hold)
12811277
1282   MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid)
1283   MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid)
1284
12851278   /* video hardware */
12861279   MCFG_SCREEN_ADD("screen", RASTER)
12871280//  MCFG_SCREEN_REFRESH_RATE(60)
r250265r250266
12941287
12951288   MCFG_GFXDECODE_ADD("gfxdecode", "palette", hexa)
12961289   MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 256)
1297   MCFG_VIDEO_START_OVERRIDE(arkanoid_state,arkanoid)
12981290
12991291   /* sound hardware */
13001292   MCFG_SPEAKER_STANDARD_MONO("mono")
r250265r250266
13351327   /* there is a 68705 but it's only role appears to be to copy data to RAM at startup */
13361328   /* the RAM is also battery backed, making the 68705 almost reundant as long as the battery doesn't die(!) */
13371329
1338   MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid)
1339   MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid)
1340
13411330   /* video hardware */
13421331   MCFG_SCREEN_ADD("screen", RASTER)
13431332//  MCFG_SCREEN_REFRESH_RATE(60)
r250265r250266
13501339
13511340   MCFG_GFXDECODE_ADD("gfxdecode", "palette", arkanoid)
13521341   MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 512)
1353   MCFG_VIDEO_START_OVERRIDE(arkanoid_state,arkanoid)
13541342
13551343   /* sound hardware */
13561344   MCFG_SPEAKER_STANDARD_MONO("mono")
r250265r250266
20372025   membank("bank1")->configure_entries(0, 2, &RAM[0x10000], 0x4000);
20382026}
20392027
2028DRIVER_INIT_MEMBER(arkanoid_state,hexaa)
2029{
2030   DRIVER_INIT_CALL(hexa);
2031   
2032   m_hexaa_from_main = 0;
2033   m_hexaa_from_sub = 0;
2034   
2035   save_item(NAME(m_hexaa_from_main));
2036   save_item(NAME(m_hexaa_from_sub));
2037}
2038
20402039DRIVER_INIT_MEMBER(arkanoid_state,brixian)
20412040{
20422041   UINT8 *RAM = memregion("protdata")->base();
r250265r250266
20762075GAME( 19??, tetrsark,   0,        bootleg,  tetrsark, arkanoid_state, tetrsark, ROT0,  "D.R. Korea", "Tetris (D.R. Korea)", MACHINE_SUPPORTS_SAVE )
20772076
20782077GAME( 199?, hexa,       0,        hexa,     hexa, arkanoid_state,     hexa,     ROT0,  "D.R. Korea", "Hexa", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
2079GAME( 199?, hexaa,      hexa,     hexaa,    hexa, arkanoid_state,     hexa,     ROT0,  "D.R. Korea", "Hexa (with 2xZ80, protected)", MACHINE_NOT_WORKING )
2078GAME( 199?, hexaa,      hexa,     hexaa,    hexa, arkanoid_state,     hexaa,     ROT0,  "D.R. Korea", "Hexa (with 2xZ80, protected)", MACHINE_NOT_WORKING )
20802079
20812080GAME( 1993, brixian,    0,        brixian,  brixian, arkanoid_state,  brixian,        ROT0,  "Cheil Computer System", "Brixian", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/includes/arkanoid.h
r250265r250266
2020      m_videoram(*this,"videoram"),
2121      m_spriteram(*this,"spriteram"),
2222      m_protram(*this,"protram"),
23      m_maincpu(*this, "maincpu"),
2324      m_mcu(*this, "mcu"),
24      m_maincpu(*this, "maincpu"),
2525      m_gfxdecode(*this, "gfxdecode"),
2626      m_palette(*this, "palette") { }
2727
r250265r250266
5252   UINT8    m_bootleg_cmd;
5353
5454   /* hexaa */
55   UINT8 hexaa_from_main;
56   UINT8 hexaa_from_sub;
55   UINT8 m_hexaa_from_main;
56   UINT8 m_hexaa_from_sub;
5757
5858   /* devices */
59   required_device<cpu_device> m_maincpu;
5960   optional_device<cpu_device> m_mcu;
61   required_device<gfxdecode_device> m_gfxdecode;
62   required_device<palette_device> m_palette;
63
6064   DECLARE_READ8_MEMBER(arkanoid_Z80_mcu_r);
6165   DECLARE_WRITE8_MEMBER(arkanoid_Z80_mcu_w);
6266   DECLARE_READ8_MEMBER(arkanoid_68705_port_a_r);
r250265r250266
8488   DECLARE_DRIVER_INIT(block2);
8589   DECLARE_DRIVER_INIT(arkblock);
8690   DECLARE_DRIVER_INIT(hexa);
91   DECLARE_DRIVER_INIT(hexaa);
8792   DECLARE_DRIVER_INIT(paddle2);
8893   DECLARE_DRIVER_INIT(tetrsark);
8994   DECLARE_DRIVER_INIT(arkgcbl);
r250265r250266
9297   DECLARE_DRIVER_INIT(arkangc);
9398   DECLARE_DRIVER_INIT(brixian);
9499   TILE_GET_INFO_MEMBER(get_bg_tile_info);
95   DECLARE_MACHINE_START(arkanoid);
96   DECLARE_MACHINE_RESET(arkanoid);
97   DECLARE_VIDEO_START(arkanoid);
100   virtual void machine_start();
101   virtual void machine_reset();
102   virtual void video_start();
98103   UINT32 screen_update_arkanoid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
99104   UINT32 screen_update_hexa(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
100105   TIMER_CALLBACK_MEMBER(test);
101106   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
102107   void arkanoid_bootleg_init(  );
103   required_device<cpu_device> m_maincpu;
104   required_device<gfxdecode_device> m_gfxdecode;
105   required_device<palette_device> m_palette;
106108};
trunk/src/mame/video/arkanoid.cpp
r250265r250266
171171   SET_TILE_INFO_MEMBER(0, code, color, 0);
172172}
173173
174VIDEO_START_MEMBER(arkanoid_state,arkanoid)
174void arkanoid_state::video_start()
175175{
176176   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(arkanoid_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
177177}


Previous 199869 Revisions Next


© 1997-2024 The MAME Team