Previous 199869 Revisions Next

r18427 Wednesday 10th October, 2012 at 19:14:57 UTC by Mariusz Wojcieszek
Fixed sound banking in 3X3 Puzzle [Mariusz Wojcieszek]
[src/mame/drivers]3x3puzzl.c

trunk/src/mame/drivers/3x3puzzl.c
r18426r18427
2424
2525
2626todo:
27 sound banking
2827 scrolling?
2928 verify dips
3029
r18426r18427
7372   DECLARE_WRITE16_MEMBER(videoram3_w);
7473   TILE_GET_INFO_MEMBER(get_tile3_info);
7574
75   int       m_oki_bank;
76
7677   DECLARE_READ16_HANDLER(_880000_r);
7778   DECLARE_WRITE16_HANDLER(gfx_ctrl_w);
7879
7980protected:
8081   virtual void video_start();
82   virtual void machine_start();
83   virtual void machine_reset();
8184};
8285
8386WRITE16_MEMBER(_3x3puzzle_state::videoram1_w)
r18426r18427
133136   // bit 5 (0x20) cleared when palette is written
134137   // bit 4 (0x10) screen width - 1: 512 pixels, 0: 320 pixels
135138   // bit 3 (0x08) is set when 0x400000/0x480000 is written
139   // bit 1 (0x02) OKI banking
136140
137141   if ( BIT(data,4) )
138142   {
r18426r18427
142146   {
143147      machine().primary_screen->set_visible_area(0*8, 40*8-1, 0*8, 30*8-1);
144148   }
149
150   if ( BIT(data, 1) != m_oki_bank )
151   {
152      m_oki_bank = BIT(data,1);
153      m_oki->set_bank_base(m_oki_bank * 0x40000);
154   }
145155}
146156
147157void _3x3puzzle_state::video_start()
r18426r18427
286296   GFXDECODE_ENTRY( "gfx3", 0, tiles8x8_layout,     0, 3 )
287297GFXDECODE_END
288298
299void _3x3puzzle_state::machine_start()
300{
301   save_item(NAME(m_oki_bank));
302}
289303
304void _3x3puzzle_state::machine_reset()
305{
306   m_oki_bank = 0;
307}
308
309
290310static MACHINE_CONFIG_START( _3x3puzzle, _3x3puzzle_state )
291311
292312   /* basic machine hardware */
r18426r18427
374394ROM_END
375395
376396
377GAME( 199?, 3x3puzzl,  0,          _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace",      "3X3 Puzzle (Enterprise)", GAME_IMPERFECT_SOUND )
378GAME( 199?, 3x3puzzla, 3x3puzzl,   _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace",      "3X3 Puzzle (Normal)", GAME_IMPERFECT_SOUND )
397GAME( 199?, 3x3puzzl,  0,          _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace",      "3X3 Puzzle (Enterprise)", 0 )
398GAME( 199?, 3x3puzzla, 3x3puzzl,   _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace",      "3X3 Puzzle (Normal)", 0 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team