Previous 199869 Revisions Next

r31429 Saturday 26th July, 2014 at 03:33:39 UTC by Roberto Fresca
Unknown Pac-Man gambling game: Added proper sound support.
Rearranged some inputs and hooked extra port. Found some
DIP switches. Added technical notes and instructions.
Cleaned up the whole driver. [Roberto Fresca]
[src/mame/drivers]4enraya.c

trunk/src/mame/drivers/4enraya.c
r31428r31429
11/***************************************************************************
22
3    IDSA 4 En Raya
3  IDSA 4 En Raya.
44
5    Driver by Tomasz Slanina
5  Driver by Tomasz Slanina.
6  Additional work by Roberto Fresca.
67
7    TODO:
8    - video and irq timings;
9    - there's a waitstate penalty on the VRAM apparently?
10    - unknown Pac-Man gambling game (whats the real title?) sound issues
118
9  Supported games:
10
11  4 En Raya (set 1),             1990, IDSA.
12  4 En Raya (set 2),             1990, IDSA.
13  unknown Pac-Man gambling game, 1990, Unknown.
14
15
16  TODO:
17  - Video and IRQ timings;
18  - Is there a waitstate penalty on the VRAM, apparently?
19
20
1221***************************************************************************
1322
14RAM :
15    1 x GM76c28-10 (6116) RAM
16    3 x 2114  - VRAM (only 10 bits are used )
23  RAM :
24  1 x GM76c28-10 (6116) RAM
25  3 x 2114  - VRAM (only 10 bits are used )
1726
18ROM:
27  ROM:
1928  27256 + 27128 for code/data
2029  3x2764 for gfx
2130
22PROM:
23 82S123 32x8
24 Used for system control
25    (d0 - connected to ROM5 /CS , d1 - ROM4 /CS, d2 - RAM /CS , d3 - to some logic(gfx control), and Z80 WAIT )
31  PROM:
32  82S123 32x8
33  Used for system control
34  (d0 - connected to ROM5 /CS , d1 - ROM4 /CS, d2 - RAM /CS , d3 - to some logic(gfx control), and Z80 WAIT )
2635
27Memory Map :
36  Memory Map :
2837  0x0000 - 0xbfff - ROM
2938  0xc000 - 0xcfff - RAM
3039  0xd000 - 0xdfff - VRAM mirrored write,
r31428r31429
3342  0xe000 - 0xefff - VRAM mirror
3443  0xf000 - 0xffff - (unconnected)
3544
36Video :
37    No scrolling , no sprites.
38    32x32 Tilemap stored in VRAM (10 bits/tile (tile numebr 0-1023))
45  Video :
46  No scrolling , no sprites.
47  32x32 Tilemap stored in VRAM (10 bits/tile (tile numebr 0-1023))
3948
40    3 gfx ROMS
41    ROM1 - R component (ROM ->(parallel in) shift register 74166 (serial out) -> jamma output
42    ROM2 - G component
43    ROM3 - B component
49  3 gfx ROMS
50  ROM1 - R component (ROM ->(parallel in) shift register 74166 (serial out) -> jamma output
51  ROM2 - G component
52  ROM3 - B component
4453
45Sound :
46 AY 3 8910
54  Sound :
55  AY 3 8910
4756
48 sound_control :
57  sound_control :
4958
5059  bit 0 - BC1
5160  bit 1 - BC2
r31428r31429
5766
5867  Unknown Pac-Man gambling game.
5968 
60  How to play...
69  It's a basic Pac-Man front game, that has a gambling game hidden inside.
70  The purpose of this "stealth" game, is just to be a "camouflage" for the
71  real gambling game, for locations where the gambling games are forbidden.
6172
73
74  How to play the Pac-Man front game:
75
76  Just Coin using Coin A or B, Start the game with START button, and use
77  the arrow keys to control the Pac-Man.
78
79
80  How to play the Pac-Man gambling game:
81
6282  Just coin up using Gambling Coin In (key 7). All ghosts will be placed
63  around the center. (each ghost represent a number/card).
83  around the center. (each ghost represent a number).
6484
65  Bet using START, and once done, press UP, to allow the pacman eat all ghosts,
66  revealing the five numbers (like italian poker games without cards).
85  Bet using START, and once done, press UP (deal), to allow the pacman eat all
86  ghosts, revealing the five numbers (like italian poker games without cards).
6787
6888  Now you have an arrow as cursor. Place it under the each number you want to
6989  discard and press START to eliminate the number and place the representative
70  ghost again around.
90  ghost again in the original place outside the center.
7191
72  Once done, just press UP again, and pacman will re-eat the new placed
92  Once done, just press UP (deal) again, and pacman will re-eat the new placed
7393  ghosts, revealing the new numbers (as a new deal).
7494
75  If you have a winning hand, you can press DOWN to get a Double-Up.
76  Choose left or right for Big and Small. If you win, you'll double the bet
77  amount. If you lose, your pacman will die.
95  If you have a winning hand, you can press DOWN (double-up) to get a Double-Up,
96  or UP (deal/take) to collect the winnings.
7897
98  If you're playing the Double-Up, choose left or right for Big and Small.
99  If you win, you'll get the bet amount x2. If you lose, your pacman will die.
100
79101  Coin with A or B to exit the gambling game and play the ultra-adictive
80102  pacman front game again!...
81103
104***************************************************************************
82105
106  Unknown Pac-Man gambling game technical notes...
107
108  The program checks the port 01h, bit7, for the sound hardware type.
109
110  - Type 1: AY-3-8910 mapped at 17h, 27h, 37h.
111  - Type 2: Unknown device mapped at 20h, 30h.
112
113  I strongly think is selectable through a switch, so I hooked one till we
114  have evidence of the contrary.
115
116
83117***************************************************************************/
84118
85119#include "emu.h"
r31428r31429
90124#define MAIN_CLOCK XTAL_8MHz
91125
92126
127/***********************************
128*         Custom Handlers          *
129***********************************/
130
93131WRITE8_MEMBER(_4enraya_state::sound_data_w)
94132{
95133   m_soundlatch = data;
r31428r31429
172210   }
173211}
174212
213
214/***********************************
215*      Memory Map Information      *
216***********************************/
217
175218static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, _4enraya_state )
176219   AM_RANGE(0x0000, 0xffff) AM_READWRITE(fenraya_custom_map_r, fenraya_custom_map_w)
177220ADDRESS_MAP_END
r31428r31429
185228   AM_RANGE(0x33, 0x33) AM_WRITE(sound_control_w)
186229ADDRESS_MAP_END
187230
231
188232static ADDRESS_MAP_START( unkpacg_main_map, AS_PROGRAM, 8, _4enraya_state )
189233   AM_RANGE(0x0000, 0x1fff) AM_ROM
190234   AM_RANGE(0x6000, 0x67ff) AM_RAM AM_SHARE("nvram")
r31428r31429
197241   AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW1")
198242   AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
199243   AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2")
200   AM_RANGE(0x20, 0x20) AM_WRITE(sound_data_w)
201   AM_RANGE(0x30, 0x30) AM_WRITE(sound_control_w)
244//   AM_RANGE(0x03, 0x03) AM_WRITE("out_w")   // to investigate...
245   AM_RANGE(0x17, 0x17) AM_DEVWRITE("aysnd", ay8910_device, data_w)
246   AM_RANGE(0x27, 0x27) AM_DEVREAD("aysnd", ay8910_device, data_r)
247   AM_RANGE(0x37, 0x37) AM_DEVWRITE("aysnd", ay8910_device, address_w)
202248ADDRESS_MAP_END
203249
204250
205/***************************************************************************
251/***********************************
252*           Input Ports            *
253***********************************/
206254
207  Inputs
208
209***************************************************************************/
210
211255static INPUT_PORTS_START( 4enraya )
212256   PORT_START("DSW")
213257   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW1:1")
r31428r31429
255299INPUT_PORTS_END
256300
257301static INPUT_PORTS_START( unkpacg )
302   PORT_START("IN1")
303   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Front Game Coin A")      //  1 credits / initiate minigame
304   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Gambling Game Coin In")   //  5 credits / initiate gambling
305   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Front Game Coin B")      // 10 credits
306   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
307   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
308   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
309   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
310
311   PORT_DIPNAME( 0x80, 0x00, "Sound Hardware")
312   PORT_DIPSETTING(    0x00, "Type 1 (AY-3-8910 mapped at 17h, 27h, 37h)" )
313   PORT_DIPSETTING(    0x80, "Type 2 (Unknown device mapped at 20h, 30h)" )
314
315   PORT_START("IN2")
316   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Start / Bet / Discard")
317   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_NAME("Up / Deal / Take")
318   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_NAME("Left / Small")
319   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right / Big")
320   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
321   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_NAME("Down / Double-Up")
322   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
323   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
324
258325   PORT_START("DSW1")
259   PORT_DIPNAME( 0x01, 0x00, "0-0")
326   PORT_DIPNAME( 0x01, 0x00, "DSW1-1")
260327   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
261328   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
262
263   PORT_DIPNAME( 0x02, 0x00, "0-1")
329   PORT_DIPNAME( 0x02, 0x00, "DSW1-2")
264330   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
265331   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
266
267   PORT_DIPNAME( 0x04, 0x00, "0-2")
332   PORT_DIPNAME( 0x04, 0x00, "DSW1-3")
268333   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
269334   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
270
271   PORT_DIPNAME( 0x08, 0x00, "0-3")
335   PORT_DIPNAME( 0x08, 0x00, "DSW1-4")
272336   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
273337   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
274
275   PORT_DIPNAME( 0x10, 0x00, "0-4")
338   PORT_DIPNAME( 0x10, 0x00, "DSW1-5")
276339   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
277340   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
278
279   PORT_DIPNAME( 0x20, 0x00, "0-5")
341   PORT_DIPNAME( 0x20, 0x00, "DSW1-6")
280342   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
281343   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
282
283   PORT_DIPNAME( 0x40, 0x00, "0-6")
344   PORT_DIPNAME( 0x40, 0x00, "DSW1-7")
284345   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
285346   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
286
287   PORT_DIPNAME( 0x80, 0x00, "0-7")
347   PORT_DIPNAME( 0x80, 0x00, "DSW1-8")
288348   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
289349   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
290350
291   PORT_START("IN1")
292   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Front Game Coin A")      //  1 credits / initiate minigame
293   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Gambling Game Coin In")   //  5 credits / initiate gambling
294   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Front Game Coin B")      // 10 credits
295   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
296   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
297   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
298   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
299
300   PORT_DIPNAME( 0x80, 0x80, "DIP8")
351   PORT_START("DSW2")
352   PORT_DIPNAME( 0x01, 0x00, "DSW2-1")
301353   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
354   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
355   PORT_DIPNAME( 0x02, 0x00, "Gambling Game")
356   PORT_DIPSETTING(    0x02, DEF_STR( No ) )
357   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
358   PORT_DIPNAME( 0x04, 0x00, "DSW2-3")
359   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
360   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
361   PORT_DIPNAME( 0x08, 0x00, "DSW2-4")
362   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
363   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
364   PORT_DIPNAME( 0x10, 0x00, "DSW2-5")
365   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
366   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
367   PORT_DIPNAME( 0x20, 0x00, "DSW2-6")
368   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
369   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
370   PORT_DIPNAME( 0x40, 0x00, "Gambling Game Credits Value")
371   PORT_DIPSETTING(    0x40, "1 Credit/Point = 100" )
372   PORT_DIPSETTING(    0x00, "1 Credit/Point = 500" )
373   PORT_DIPNAME( 0x80, 0x00, "Clear NVRAM (On, reset, Off, reset)")
374   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
302375   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
303376
304   PORT_START("IN2")
305   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Start / Discard")
306   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_NAME("UP / Deal")
307   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_NAME("Left / Small")
308   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right / Big")
309   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
310   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_NAME("Down / Double-Up")
311   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
312   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
313377INPUT_PORTS_END
314378
315379
380/***********************************
381*     GFX Layouts & GFX decode     *
382***********************************/
383
316384static const gfx_layout charlayout =
317385{
318386   8,8,
r31428r31429
328396   GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1 )
329397GFXDECODE_END
330398
399
400/***********************************
401*      Machine Start & Reset       *
402***********************************/
403
331404void _4enraya_state::machine_start()
332405{
333406   save_item(NAME(m_videoram));
r31428r31429
343416   m_soundlatch = 0;
344417}
345418
419
420/***********************************
421*         Machine Drivers          *
422***********************************/
423
346424static MACHINE_CONFIG_START( 4enraya, _4enraya_state )
347425
348426   /* basic machine hardware */
r31428r31429
368446   /* sound hardware */
369447   MCFG_SPEAKER_STANDARD_MONO("mono")
370448   MCFG_SOUND_ADD("aysnd", AY8910, MAIN_CLOCK/4) /* guess */
371   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
449   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.3)
372450MACHINE_CONFIG_END
373451
452
374453static MACHINE_CONFIG_DERIVED( unkpacg, 4enraya )
375454
376455   /* basic machine hardware */
r31428r31429
378457   MCFG_CPU_PROGRAM_MAP(unkpacg_main_map)
379458   MCFG_CPU_IO_MAP(unkpacg_main_portmap)
380459   MCFG_NVRAM_ADD_0FILL("nvram")
460
461   /* sound hardware */
462//   MCFG_SPEAKER_STANDARD_MONO("mono")
463   MCFG_SOUND_REPLACE("aysnd", AY8910, MAIN_CLOCK/4) /* guess */
464   MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
465   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
381466MACHINE_CONFIG_END
382467
383468
384/***************************************************************************
469/***********************************
470*             Rom Load             *
471***********************************/
385472
386  Game driver(s)
387
388***************************************************************************/
389
390473ROM_START( 4enraya )
391474   ROM_REGION( 0x10000, "maincpu", 0 )
392475   ROM_LOAD( "5.bin",   0x0000, 0x8000, CRC(cf1cd151) SHA1(3920b0a6ed5798859158871b578b01ec742b0d13) )
r31428r31429
428511ROM_END
429512
430513
514/***********************************
515*          Driver Init             *
516***********************************/
517
431518DRIVER_INIT_MEMBER(_4enraya_state, unkpacg)
432519{
433520   // descramble rom
r31428r31429
437524}
438525
439526
440GAME( 1990, 4enraya,  0,       4enraya,  4enraya, driver_device,  0,       ROT0, "IDSA",      "4 En Raya (set 1)", GAME_SUPPORTS_SAVE )
441GAME( 1990, 4enrayaa, 4enraya, 4enraya,  4enraya, driver_device,  0,       ROT0, "IDSA",      "4 En Raya (set 2)", GAME_SUPPORTS_SAVE )
442GAME( 199?, unkpacg,  0,       unkpacg,  unkpacg, _4enraya_state, unkpacg, ROT0, "<unknown>", "unknown Pac-Man gambling game", GAME_IMPERFECT_SOUND )
527/***********************************
528*           Game Drivers           *
529***********************************/
530
531/*    YEAR  NAME      PARENT   MACHINE   INPUT    STATE           INIT     ROT    COMPANY      FULLNAME                        FLAGS  */
532GAME( 1990, 4enraya,  0,       4enraya,  4enraya, driver_device,  0,       ROT0, "IDSA",      "4 En Raya (set 1)",             GAME_SUPPORTS_SAVE )
533GAME( 1990, 4enrayaa, 4enraya, 4enraya,  4enraya, driver_device,  0,       ROT0, "IDSA",      "4 En Raya (set 2)",             GAME_SUPPORTS_SAVE )
534GAME( 199?, unkpacg,  0,       unkpacg,  unkpacg, _4enraya_state, unkpacg, ROT0, "<unknown>", "unknown Pac-Man gambling game", GAME_SUPPORTS_SAVE )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team