Previous 199869 Revisions Next

r19572 Saturday 15th December, 2012 at 17:08:06 UTC by hap
give shuttlei and spacecom their own machine config
[src/mame/drivers]8080bw.c
[src/mame/layout]spacecom.lay
[src/mame/video]8080bw.c

trunk/src/mame/video/8080bw.c
r19571r19572
414414}
415415
416416
417UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
417UINT32 _8080bw_state::screen_update_sflush(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
418418{
419   pen_t pens[2] = { RGB_BLACK, RGB_WHITE };
419   pen_t pens[NUM_PENS];
420420   offs_t offs;
421421
422   sflush_get_pens(pens);
423
422424   for (offs = 0; offs < m_main_ram.bytes(); offs++)
423425   {
424      int i;
425
426426      UINT8 y = offs >> 5;
427427      UINT8 x = offs << 3;
428428
429429      UINT8 data = m_main_ram[offs];
430      UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07;
430431
431      for (i = 0; i < 8; i++)
432      {
433         bitmap.pix32(y, x|i) = pens[BIT(data, 7)];
434         data <<= 1;
435      }
432      set_8_pixels(machine(), bitmap, y, x, data, pens, fore_color, 0);
436433   }
437434
438435   clear_extra_columns(machine(), bitmap, pens, 0);
r19571r19572
441438}
442439
443440
444UINT32 _8080bw_state::screen_update_sflush(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
441UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
445442{
446   pen_t pens[NUM_PENS];
443   pen_t pens[2] = { RGB_BLACK, RGB_WHITE };
447444   offs_t offs;
448445
449   sflush_get_pens(pens);
450
451446   for (offs = 0; offs < m_main_ram.bytes(); offs++)
452447   {
448      int i;
449
453450      UINT8 y = offs >> 5;
454451      UINT8 x = offs << 3;
455452
456453      UINT8 data = m_main_ram[offs];
457      UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07;
458454
459      set_8_pixels(machine(), bitmap, y, x, data, pens, fore_color, 0);
455      for (i = 0; i < 8; i++)
456      {
457         bitmap.pix32(y, x|i) = pens[BIT(data, 7)];
458         data <<= 1;
459      }
460460   }
461461
462   clear_extra_columns(machine(), bitmap, pens, 0);
463
464462   return 0;
465463}
466464
465
467466UINT32 _8080bw_state::screen_update_spacecom(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
468467{
469468   pen_t pens[2] = { RGB_BLACK, RGB_WHITE };
470469   offs_t offs;
471   UINT8 x,y,data;
472470
473471   for (offs = 0; offs < 0x1c00; offs++)
474472   {
475      y = offs >> 5;
476      x = (offs << 3)+4; //((m_invaders_flip_screen) ? 8 : 4);
473      int i;
477474
478      data = m_main_ram[offs+0x400];
475      UINT8 y = offs >> 5;
476      UINT8 x = offs << 3;
477      UINT8 flipx = m_invaders_flip_screen ? 7 : 0;
479478
480      if (m_invaders_flip_screen)
479      UINT8 data = m_main_ram[offs+0x400];
480
481      for (i = 0; i < 8; i++)
481482      {
482         bitmap.pix32(y, x++) = pens[BIT(data, 7)];
483         bitmap.pix32(y, x++) = pens[BIT(data, 6)];
484         bitmap.pix32(y, x++) = pens[BIT(data, 5)];
485         bitmap.pix32(y, x++) = pens[BIT(data, 4)];
486         bitmap.pix32(y, x++) = pens[BIT(data, 3)];
487         bitmap.pix32(y, x++) = pens[BIT(data, 2)];
488         bitmap.pix32(y, x++) = pens[BIT(data, 1)];
489         bitmap.pix32(y, x++) = pens[BIT(data, 0)];
483         bitmap.pix32(y, x | (i^flipx)) = pens[data & 1];
484         data >>= 1;
490485      }
491      else
492      {
493         bitmap.pix32(y, x++) = pens[BIT(data, 0)];
494         bitmap.pix32(y, x++) = pens[BIT(data, 1)];
495         bitmap.pix32(y, x++) = pens[BIT(data, 2)];
496         bitmap.pix32(y, x++) = pens[BIT(data, 3)];
497         bitmap.pix32(y, x++) = pens[BIT(data, 4)];
498         bitmap.pix32(y, x++) = pens[BIT(data, 5)];
499         bitmap.pix32(y, x++) = pens[BIT(data, 6)];
500         bitmap.pix32(y, x++) = pens[BIT(data, 7)];
501      }
502486   }
487
503488   return 0;
504489}
505490
trunk/src/mame/layout/spacecom.lay
r19571r19572
22<mamelayout version="2">
33   <element name="overlay">
44      <rect>
5         <bounds left="0" top="0" right="224" bottom="260" />
5         <bounds left="0" top="0" right="224" bottom="256" />
66         <color red="0.1" green="1" blue="0.2" />
77      </rect>
88      <rect>
trunk/src/mame/drivers/8080bw.c
r19571r19572
649649/*                                                     */
650650/* bootleg "Space Combat", 1979                        */
651651/*  8080A + 18MHz XTAL, SN76477, 10MHz XTAL            */
652/*  8*2KB RAM(!), 8*1KB ROM, maybe some PROMs          */
652/*  8*8116 2KB RAM(!), 8*1KB ROM, maybe some PROMs     */
653653/*                                                     */
654654/*  Preliminary emulation. PCB was working fine, but   */
655655/*  it's not certain that this is a good dump          */
r19571r19572
703703INPUT_PORTS_END
704704
705705
706static ADDRESS_MAP_START( spacecom_map, AS_PROGRAM, 8, _8080bw_state )
707   AM_RANGE(0x0000, 0x1fff) AM_ROM
708   AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") // other RAM not hooked up?
709ADDRESS_MAP_END
710
706711static ADDRESS_MAP_START( spacecom_io_map, AS_IO, 8, _8080bw_state )
707712   AM_RANGE(0x41, 0x41) AM_READ_PORT("IN0")
708713   AM_RANGE(0x42, 0x42) AM_READ_PORT("IN1") AM_WRITE(invaders_audio_1_w)
709714   AM_RANGE(0x44, 0x44) AM_READ_PORT("IN2") AM_WRITE(invaders_audio_2_w)
710715ADDRESS_MAP_END
711716
712MACHINE_CONFIG_DERIVED_CLASS( spacecom, invaders, _8080bw_state )
717MACHINE_CONFIG_START( spacecom, _8080bw_state )
713718
714719   /* basic machine hardware */
715   MCFG_CPU_MODIFY("maincpu")
720   MCFG_CPU_ADD("maincpu", I8080A, XTAL_18MHz / 10) // divider guessed
721   MCFG_CPU_PROGRAM_MAP(spacecom_map)
716722   MCFG_CPU_IO_MAP(spacecom_io_map)
717   
718   // assume there is no watchdog
719   MCFG_WATCHDOG_VBLANK_INIT(0)
720   MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(0))
721723
722   // video
723   MCFG_SCREEN_MODIFY("screen")
724   MCFG_MACHINE_START_OVERRIDE(mw8080bw_state, mw8080bw)
725   MCFG_MACHINE_RESET_OVERRIDE(mw8080bw_state, mw8080bw)
726
727   /* video hardware */
728   MCFG_SCREEN_ADD("screen", RASTER)
729   MCFG_SCREEN_REFRESH_RATE(60)
730   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
731   MCFG_SCREEN_SIZE(32*8, 32*8)
732   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
724733   MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_spacecom)
734
735   /* sound hardware */
736   MCFG_FRAGMENT_ADD(invaders_audio)
725737MACHINE_CONFIG_END
726738
727739DRIVER_INIT_MEMBER(_8080bw_state, spacecom)
r19571r19572
21762188ADDRESS_MAP_END
21772189
21782190
2179static MACHINE_CONFIG_DERIVED_CLASS( shuttlei, mw8080bw_root, _8080bw_state )
2191MACHINE_CONFIG_START( shuttlei, _8080bw_state )
21802192
21812193   /* basic machine hardware */
2182   MCFG_CPU_MODIFY("maincpu")
2194   MCFG_CPU_ADD("maincpu", I8080, XTAL_18MHz / 10) // divider guessed
21832195   MCFG_CPU_PROGRAM_MAP(shuttlei_map)
21842196   MCFG_CPU_IO_MAP(shuttlei_io_map)
2185   MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
21862197
2198   MCFG_MACHINE_START_OVERRIDE(_8080bw_state, extra_8080bw)
2199   MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state, mw8080bw)
2200
21872201   /* video hardware */
2188   MCFG_SCREEN_MODIFY("screen")
2202   MCFG_SCREEN_ADD("screen", RASTER)
2203   MCFG_SCREEN_REFRESH_RATE(60)
2204   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
2205   MCFG_SCREEN_SIZE(32*8, 32*8)
21892206   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1)
21902207   MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_shuttlei)
21912208
r19571r19572
41774194GAMEL(1979, cosmicmo,   invaders, invaders,  cosmicmo,  driver_device, 0, ROT270, "Taito / Universal", "Cosmic Monsters", GAME_SUPPORTS_SAVE, layout_cosmicm ) // unclassified, licensed or bootleg?
41784195GAMEL(1979, cosmicm2,   invaders, invaders,  cosmicmo,  driver_device, 0, ROT270, "Taito / Universal", "Cosmic Monsters 2", GAME_SUPPORTS_SAVE, layout_cosmicm ) // unclassified, licensed or bootleg?
41794196GAMEL(1980?,sinvzen,    invaders, invaders,  spaceatt,  driver_device, 0, ROT270, "Taito / Zenitone-Microsec Ltd.", "Super Invaders (Zenitone-Microsec)", GAME_SUPPORTS_SAVE, layout_invaders ) // unclassified, licensed or bootleg?
4197GAMEL(1980, ultrainv,   invaders, invaders,  sicv,      driver_device, 0, ROT270, "Taito / Konami", "Ultra Invaders", GAME_SUPPORTS_SAVE, layout_invaders ) // unclassified, licensed or bootleg?
41804198GAMEL(1978, spaceatt,   invaders, invaders,  sicv,      driver_device, 0, ROT270, "bootleg (Video Games GmbH)", "Space Attack (bootleg of Space Invaders)", GAME_SUPPORTS_SAVE, layout_invaders )
41814199GAMEL(1980, spaceat2,   invaders, invaders,  spaceatt,  driver_device, 0, ROT270, "bootleg (Video Games UK)", "Space Attack II (bootleg of Super Invaders)", GAME_SUPPORTS_SAVE, layout_invaders ) // bootleg of Zenitone-Microsec Super Invaders
41824200GAMEL(1979, spacecom,   invaders, spacecom,  spacecom,  _8080bw_state, spacecom, ROT270, "bootleg", "Space Combat (bootleg of Space Invaders)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_spacecom )
r19571r19572
41994217GAMEL(1978, invader4,   invaders, invaders,  sicv,      driver_device, 0, ROT270, "bootleg", "Space Invaders Part Four", GAME_SUPPORTS_SAVE, layout_invaders )
42004218GAME( 1978, darthvdr,   invaders, darthvdr,  darthvdr,  driver_device, 0, ROT270, "bootleg", "Darth Vader (bootleg of Space Invaders)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
42014219GAMEL(19??, tst_invd,   invaders, invaders,  sicv,      driver_device, 0, ROT0,   "<unknown>", "Space Invaders Test ROM", GAME_SUPPORTS_SAVE, layout_invaders )
4202GAMEL(1980, ultrainv,   invaders, invaders,  sicv,      driver_device, 0, ROT270, "Konami", "Ultra Invaders", GAME_SUPPORTS_SAVE, layout_invaders )
42034220
42044221// other Taito
42054222GAME( 1979, invadpt2,   0,        invadpt2,  invadpt2,  driver_device, 0, ROT270, "Taito", "Space Invaders Part II (Taito)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
r19571r19572
42074224GAME( 1980, invaddlx,   invadpt2, invaders,  invadpt2,  driver_device, 0, ROT270, "Taito (Midway license)", "Space Invaders Deluxe", GAME_SUPPORTS_SAVE )
42084225GAME( 1979, moonbase,   invadpt2, invadpt2,  invadpt2,  driver_device, 0, ROT270, "Taito / Nichibutsu", "Moon Base (set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) // this has a 'Taito Corp' string hidden away in the rom - how do you get it to display?
42094226GAME( 1979, moonbasea,  invadpt2, invadpt2,  invadpt2,  driver_device, 0, ROT270, "Taito / Nichibutsu", "Moon Base (set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) // this has the same string replaced with Nichibutsu, no other differences
4210GAME( 1980, spclaser,   0,        invadpt2,  spclaser,  driver_device, 0, ROT270, "Taito (Game Plan license?)", "Space Laser", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
4211GAME( 1980, intruder,   spclaser, invadpt2,  spclaser,  driver_device, 0, ROT270, "Taito (Game Plan license?)", "Intruder", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
4227GAME( 1980, spclaser,   0,        invadpt2,  spclaser,  driver_device, 0, ROT270, "Taito", "Space Laser", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
4228GAME( 1980, intruder,   spclaser, invadpt2,  spclaser,  driver_device, 0, ROT270, "Taito (Game Plan license)", "Intruder", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
42124229GAME( 1980, laser,      spclaser, invadpt2,  spclaser,  driver_device, 0, ROT270, "bootleg (Leisure Time Electronics Inc.)", "Astro Laser (bootleg of Space Laser)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
42134230GAME( 1979, spcewarl,   spclaser, invadpt2,  spclaser,  driver_device, 0, ROT270, "Leijac Corporation", "Space War (Leijac Corporation)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) // Taito's version is actually a spin-off of this?
42144231GAME( 1979, lrescue,    0,        lrescue,   lrescue,   driver_device, 0, ROT270, "Taito", "Lunar Rescue", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team