~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/mame/drivers/redalert.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        * Game is NOT_WORKING due to missing graphics layer
66
66
        * Everything needs to be verified on real PCB or schematics
67
67
 
 
68
    Known issues/to-do's Panther:
 
69
        * Sound comms doesn't work
 
70
        * No title screen?
 
71
 
68
72
    ********************************************************************
69
73
    IREM 'WW III' 1981
70
74
 
122
126
}
123
127
 
124
128
 
 
129
 
125
130
static WRITE8_HANDLER( redalert_interrupt_clear_w )
126
131
{
127
132
        redalert_interrupt_clear_r(space, 0);
128
133
}
129
134
 
130
 
 
 
135
static READ8_HANDLER( panther_interrupt_clear_r )
 
136
{
 
137
        cputag_set_input_line(space->machine, "maincpu", M6502_IRQ_LINE, CLEAR_LINE);
 
138
 
 
139
        return input_port_read(space->machine, "STICK0");
 
140
}
 
141
 
 
142
static READ8_HANDLER( panther_unk_r )
 
143
{
 
144
        return ((mame_rand(space->machine) & 0x01) | (input_port_read(space->machine, "C020") & 0xfe));
 
145
}
131
146
 
132
147
/*************************************
133
148
 *
166
181
        AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("maincpu", 0x8000)
167
182
ADDRESS_MAP_END
168
183
 
 
184
static ADDRESS_MAP_START( panther_main_map, ADDRESS_SPACE_PROGRAM, 8 )
 
185
        AM_RANGE(0x0000, 0x1fff) AM_RAM
 
186
        AM_RANGE(0x2000, 0x3fff) AM_RAM_WRITE(redalert_bitmap_videoram_w) AM_BASE(&redalert_bitmap_videoram)
 
187
        AM_RANGE(0x4000, 0x4fff) AM_RAM AM_BASE(&redalert_charmap_videoram)
 
188
        AM_RANGE(0x5000, 0xbfff) AM_ROM
 
189
        AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0f8f) AM_READ_PORT("C000") AM_WRITENOP
 
190
        AM_RANGE(0xc010, 0xc010) AM_MIRROR(0x0f8f) AM_READ_PORT("C010") AM_WRITENOP
 
191
        AM_RANGE(0xc020, 0xc020) AM_MIRROR(0x0f8f) AM_READ(panther_unk_r) /* vblank? */
 
192
        AM_RANGE(0xc030, 0xc030) AM_MIRROR(0x0f8f) AM_READWRITE(SMH_NOP, redalert_audio_command_w)
 
193
        AM_RANGE(0xc040, 0xc040) AM_MIRROR(0x0f8f) AM_READWRITE(SMH_NOP, SMH_RAM) AM_BASE(&redalert_video_control)
 
194
        AM_RANGE(0xc050, 0xc050) AM_MIRROR(0x0f8f) AM_READWRITE(SMH_NOP, SMH_RAM) AM_BASE(&redalert_bitmap_color)
 
195
        AM_RANGE(0xc070, 0xc070) AM_MIRROR(0x0f8f) AM_READWRITE(panther_interrupt_clear_r, redalert_interrupt_clear_w)
 
196
        AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("maincpu", 0x8000)
 
197
ADDRESS_MAP_END
169
198
 
170
199
static ADDRESS_MAP_START( demoneye_main_map, ADDRESS_SPACE_PROGRAM, 8 )
171
200
        AM_RANGE(0x0000, 0x1fff) AM_RAM
243
272
        PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
244
273
INPUT_PORTS_END
245
274
 
 
275
static INPUT_PORTS_START( panther )
 
276
        PORT_START("C000")
 
277
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:1,2")
 
278
        PORT_DIPSETTING(    0x00, "3" )
 
279
        PORT_DIPSETTING(    0x01, "4" )
 
280
        PORT_DIPSETTING(    0x02, "5" )
 
281
        PORT_DIPSETTING(    0x03, "6" )
 
282
        PORT_DIPNAME( 0x04, 0x00, "Cabinet in Service Mode" ) PORT_DIPLOCATION("SW:3")
 
283
        PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 
284
        PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
 
285
        PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:4")
 
286
        PORT_DIPSETTING(    0x00, "5000" )
 
287
        PORT_DIPSETTING(    0x08, "7000" )
 
288
        PORT_DIPNAME( 0x30, 0x10, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:5,6")
 
289
        PORT_DIPSETTING(    0x30, DEF_STR( 2C_1C ) )
 
290
        PORT_DIPSETTING(    0x10, DEF_STR( 1C_1C ) )
 
291
        PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
 
292
        PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
 
293
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:7")
 
294
        PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
 
295
        PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
 
296
        PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "SW:8" )
 
297
 
 
298
        PORT_START("C010")
 
299
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
 
300
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
 
301
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
 
302
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) /* pin 35 - N.C. */
 
303
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) /* pin 36 - N.C. */
 
304
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
 
305
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
 
306
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) /* Meter */
 
307
 
 
308
        PORT_START("C020")
 
309
        PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
 
310
        PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Meter */
 
311
        PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
 
312
        PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
 
313
        PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
 
314
        PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
 
315
        PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
 
316
        PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Meter */
 
317
 
 
318
        PORT_START("COIN")
 
319
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
 
320
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
 
321
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_IMPULSE(1)
 
322
        PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
 
323
 
 
324
        PORT_START("STICK0")
 
325
        PORT_BIT( 0xff, 0x80, IPT_POSITIONAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(3) PORT_CENTERDELTA(0)
 
326
INPUT_PORTS_END
246
327
 
247
328
static INPUT_PORTS_START( demoneye )
248
329
        PORT_START("C000")
332
413
        MDRV_IMPORT_FROM(ww3_audio)
333
414
MACHINE_DRIVER_END
334
415
 
 
416
static MACHINE_DRIVER_START( panther )
 
417
 
 
418
        /* basic machine hardware */
 
419
        MDRV_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK)
 
420
        MDRV_CPU_PROGRAM_MAP(panther_main_map)
 
421
        MDRV_CPU_VBLANK_INT("screen", redalert_vblank_interrupt)
 
422
 
 
423
        /* video hardware */
 
424
        MDRV_IMPORT_FROM(panther_video)
 
425
 
 
426
        /* audio hardware */
 
427
        MDRV_IMPORT_FROM(ww3_audio)
 
428
MACHINE_DRIVER_END
 
429
 
335
430
static MACHINE_DRIVER_START( demoneye )
336
431
 
337
432
        /* basic machine hardware */
354
449
 *
355
450
 *************************************/
356
451
 
 
452
ROM_START( panther )
 
453
        ROM_REGION( 0x10000, "maincpu", 0 )
 
454
        ROM_LOAD( "qr-1.bin",      0x8000, 0x0800, CRC(406dc606) SHA1(c12b91145aa579813b7b0e8eb7933bf35e4a5b97) )
 
455
        ROM_LOAD( "qr-2.bin",      0x8800, 0x0800, CRC(e7e64b11) SHA1(0fcfbce552b22edce9051b6fad0974f81ab44973) )
 
456
        ROM_LOAD( "qr-3.bin",      0x9000, 0x0800, CRC(dfec33f2) SHA1(4e631a3a8c7873e8f51a81e8b73704729269ee01) )
 
457
        ROM_LOAD( "qr-4.bin",      0x9800, 0x0800, CRC(60571aa0) SHA1(257474383ad7cb90e9e4f9236b3f865a991d688a) )
 
458
        ROM_LOAD( "qr-5.bin",      0xa000, 0x0800, CRC(2ac19b54) SHA1(613a800179f9705df03967889eb23ef71baed493) )
 
459
        ROM_LOAD( "qr-6.bin",      0xa800, 0x0800, CRC(02fbd9d9) SHA1(65b5875c78886b51c9bdfc75e730b9f67ce72cfc) )
 
460
        ROM_LOAD( "qr-7.bin",      0xb000, 0x0800, CRC(b3e2d6cc) SHA1(7bb18f17d635196e617e8f68bf8d866134c362d1) )
 
461
 
 
462
        ROM_REGION( 0x10000, "audiocpu", 0 )
 
463
        ROM_LOAD( "q7a.bin",       0x7000, 0x0800, CRC(febd1674) SHA1(e122d0855ab6a352d741f9013c20ec31e0068248) )
 
464
 
 
465
        ROM_REGION( 0x0200, "proms", 0 ) /* color PROM */
 
466
        ROM_LOAD( "6349-1j-8026.1a",      0x0000, 0x0200, CRC(ea9c2ada) SHA1(cb720c0d77b24f995e0750b3fa42a68962c7a977) ) /* 512*8 74S472 or compatible BPROM like a 82s147 */
 
467
ROM_END
 
468
 
 
469
 
357
470
ROM_START( ww3 )
358
471
        ROM_REGION( 0x10000, "maincpu", 0 )
359
472
        ROM_LOAD( "w3i5.3f",      0x5000, 0x1000, CRC(9fc24ad3) SHA1(697ab22555ff5aae09f50051ccda545c17a0ac8a) )
423
536
 *
424
537
 *************************************/
425
538
 
 
539
GAME( 1981, panther,  0, panther,  panther,  0, ROT270, "Irem",       "Panther",    GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
426
540
GAME( 1981, redalert, 0, redalert, redalert, 0, ROT270, "Irem + GDI", "Red Alert",  GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
427
541
GAME( 1981, ww3,      0, ww3,      redalert, 0, ROT270, "Irem",       "WW III",     GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
428
542
GAME( 1981, demoneye, 0, demoneye, demoneye, 0, ROT270, "Irem",       "Demoneye-X", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )