Previous 199869 Revisions Next

r18424 Wednesday 10th October, 2012 at 18:28:46 UTC by Mariusz Wojcieszek
3X3 Puzzle update [David Haywood]
- fixed visible area
- added the 2nd button
- added the Demo Sound dip
[src/mame/drivers]3x3puzzl.c

trunk/src/mame/drivers/3x3puzzl.c
r18423r18424
2121the game back to normal version as current set on the PCB
2222has adult graphics (sets provided are 'Normal' and 'Enterprise')
2323
24
25
26todo:
27 sound banking
28 scrolling?
29 verify dips
30
2431***************************************************************************/
2532
2633
r18423r18424
6673   DECLARE_WRITE16_MEMBER(videoram3_w);
6774   TILE_GET_INFO_MEMBER(get_tile3_info);
6875
69   DECLARE_READ16_HANDLER(_600000_r);
7076   DECLARE_READ16_HANDLER(_880000_r);
7177   DECLARE_WRITE16_HANDLER(gfx_ctrl_w);
7278
7379protected:
74   // driver_device overrides
75   virtual void machine_start();
76   virtual void machine_reset();
77
7880   virtual void video_start();
79   virtual void palette_init();
8081};
8182
8283WRITE16_MEMBER(_3x3puzzle_state::videoram1_w)
r18423r18424
135136
136137   if ( BIT(data,4) )
137138   {
138      machine().primary_screen->set_visible_area(0*8, 64*8-1, 0*8, 32*8-1);
139      machine().primary_screen->set_visible_area(0*8, 64*8-1, 0*8, 30*8-1);
139140   }
140141   else
141142   {
142      machine().primary_screen->set_visible_area(0*8, 40*8-1, 0*8, 32*8-1);
143      machine().primary_screen->set_visible_area(0*8, 40*8-1, 0*8, 30*8-1);
143144   }
144145}
145146
r18423r18424
160161   return 0;
161162}
162163
163READ16_MEMBER(_3x3puzzle_state::_600000_r)
164{
165   return 0xffff; // DSW?
166}
167164
168165READ16_MEMBER(_3x3puzzle_state::_880000_r)
169166{
r18423r18424
181178   AM_RANGE(0x400000, 0x400001) AM_WRITENOP // scroll?
182179   AM_RANGE(0x480000, 0x480001) AM_WRITENOP
183180   AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1")
184   AM_RANGE(0x580000, 0x580001) AM_READ_PORT("P2")
185   AM_RANGE(0x600000, 0x600001) AM_READ(_600000_r)
181   AM_RANGE(0x580000, 0x580001) AM_READ_PORT("SYS")
182   AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW01")
186183   AM_RANGE(0x700000, 0x700001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
187184   AM_RANGE(0x800000, 0x800001) AM_WRITE(gfx_ctrl_w)
188   AM_RANGE(0x880000, 0x880001) AM_READ(_880000_r)
185   AM_RANGE(0x880000, 0x880001) AM_READ( _880000_r )
189186ADDRESS_MAP_END
190187
191188static INPUT_PORTS_START( _3x3puzzle )
r18423r18424
195192   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
196193   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
197194   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
198   PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
195   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // needed for 2nd game
196   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
197   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
199198
200   PORT_START("P2")
201   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
202   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
203   PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
199   PORT_START("SYS")
200   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
201   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
202   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) // must be active_low or coins won't work
203   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // must be active_low or coins won't work
204   PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN )
204205
205206   PORT_START("VBLANK")
206   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
207
207   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
208 
209    PORT_START("DSW01")
210    PORT_DIPNAME( 0x0001, 0x0001, "DSW0:0" )
211    PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
212    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
213    PORT_DIPNAME( 0x0002, 0x0002, "DSW0:1" )
214    PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
215    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
216    PORT_DIPNAME( 0x0004, 0x0004, "DSW0:2" )
217    PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
218    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
219    PORT_DIPNAME( 0x0008, 0x0008, "DSW0:3" )
220    PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
221    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
222    PORT_DIPNAME( 0x0010, 0x0010, "DSW0:4" )
223    PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
224    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
225    PORT_DIPNAME( 0x0020, 0x0020, "DSW0:5" )
226    PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
227    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
228    PORT_DIPNAME( 0x0040, 0x0040, "DSW0:6" )
229    PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
230    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
231    PORT_DIPNAME( 0x0080, 0x0080, "DSW0:7" )
232    PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
233    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
234    PORT_DIPNAME( 0x0100, 0x0100, "DSW1:0" ) // coinage
235    PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
236    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
237    PORT_DIPNAME( 0x0200, 0x0200, "DSW1:1" ) // coinage
238    PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
239    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
240   PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Demo_Sounds ) )
241    PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
242    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
243    PORT_DIPNAME( 0x0800, 0x0800, "DSW1:3" )
244    PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
245    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
246    PORT_DIPNAME( 0x1000, 0x1000, "DSW1:4" )
247    PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
248    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
249    PORT_DIPNAME( 0x2000, 0x2000, "DSW1:5" )
250    PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
251    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
252    PORT_DIPNAME( 0x4000, 0x4000, "DSW1:6" )
253    PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
254    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
255    PORT_DIPNAME( 0x8000, 0x8000, "DSW1:7" )
256    PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
257    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
208258INPUT_PORTS_END
209259
210260static const gfx_layout tiles16x16x8_layout =
r18423r18424
237287GFXDECODE_END
238288
239289
240void _3x3puzzle_state::machine_start()
241{
242}
243
244void _3x3puzzle_state::machine_reset()
245{
246}
247
248
249void _3x3puzzle_state::palette_init()
250{
251
252}
253
254290static MACHINE_CONFIG_START( _3x3puzzle, _3x3puzzle_state )
255291
256292   /* basic machine hardware */
r18423r18424
264300   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
265301   MCFG_SCREEN_UPDATE_DRIVER(_3x3puzzle_state, screen_update)
266302   MCFG_SCREEN_SIZE(64*8, 32*8)
267   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 32*8-1)
303   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1)
268304
269305   MCFG_GFXDECODE(_3x3puzzle)
270306
r18423r18424
338374ROM_END
339375
340376
341GAME( 199?, 3x3puzzl,  0,          _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace",      "3X3 Puzzle (Enterprise)", 0 )
342GAME( 199?, 3x3puzzla, 3x3puzzl,   _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace",      "3X3 Puzzle (Normal)", 0 )
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 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team