trunk/src/mame/video/8080bw.c
| r19571 | r19572 | |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
| 417 | | UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 417 | UINT32 _8080bw_state::screen_update_sflush(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 418 | 418 | { |
| 419 | | pen_t pens[2] = { RGB_BLACK, RGB_WHITE }; |
| 419 | pen_t pens[NUM_PENS]; |
| 420 | 420 | offs_t offs; |
| 421 | 421 | |
| 422 | sflush_get_pens(pens); |
| 423 | |
| 422 | 424 | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 423 | 425 | { |
| 424 | | int i; |
| 425 | | |
| 426 | 426 | UINT8 y = offs >> 5; |
| 427 | 427 | UINT8 x = offs << 3; |
| 428 | 428 | |
| 429 | 429 | UINT8 data = m_main_ram[offs]; |
| 430 | UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07; |
| 430 | 431 | |
| 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); |
| 436 | 433 | } |
| 437 | 434 | |
| 438 | 435 | clear_extra_columns(machine(), bitmap, pens, 0); |
| r19571 | r19572 | |
| 441 | 438 | } |
| 442 | 439 | |
| 443 | 440 | |
| 444 | | UINT32 _8080bw_state::screen_update_sflush(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 441 | UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 445 | 442 | { |
| 446 | | pen_t pens[NUM_PENS]; |
| 443 | pen_t pens[2] = { RGB_BLACK, RGB_WHITE }; |
| 447 | 444 | offs_t offs; |
| 448 | 445 | |
| 449 | | sflush_get_pens(pens); |
| 450 | | |
| 451 | 446 | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 452 | 447 | { |
| 448 | int i; |
| 449 | |
| 453 | 450 | UINT8 y = offs >> 5; |
| 454 | 451 | UINT8 x = offs << 3; |
| 455 | 452 | |
| 456 | 453 | UINT8 data = m_main_ram[offs]; |
| 457 | | UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07; |
| 458 | 454 | |
| 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 | } |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | | clear_extra_columns(machine(), bitmap, pens, 0); |
| 463 | | |
| 464 | 462 | return 0; |
| 465 | 463 | } |
| 466 | 464 | |
| 465 | |
| 467 | 466 | UINT32 _8080bw_state::screen_update_spacecom(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 468 | 467 | { |
| 469 | 468 | pen_t pens[2] = { RGB_BLACK, RGB_WHITE }; |
| 470 | 469 | offs_t offs; |
| 471 | | UINT8 x,y,data; |
| 472 | 470 | |
| 473 | 471 | for (offs = 0; offs < 0x1c00; offs++) |
| 474 | 472 | { |
| 475 | | y = offs >> 5; |
| 476 | | x = (offs << 3)+4; //((m_invaders_flip_screen) ? 8 : 4); |
| 473 | int i; |
| 477 | 474 | |
| 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; |
| 479 | 478 | |
| 480 | | if (m_invaders_flip_screen) |
| 479 | UINT8 data = m_main_ram[offs+0x400]; |
| 480 | |
| 481 | for (i = 0; i < 8; i++) |
| 481 | 482 | { |
| 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; |
| 490 | 485 | } |
| 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 | | } |
| 502 | 486 | } |
| 487 | |
| 503 | 488 | return 0; |
| 504 | 489 | } |
| 505 | 490 | |
trunk/src/mame/drivers/8080bw.c
| r19571 | r19572 | |
| 649 | 649 | /* */ |
| 650 | 650 | /* bootleg "Space Combat", 1979 */ |
| 651 | 651 | /* 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 */ |
| 653 | 653 | /* */ |
| 654 | 654 | /* Preliminary emulation. PCB was working fine, but */ |
| 655 | 655 | /* it's not certain that this is a good dump */ |
| r19571 | r19572 | |
| 703 | 703 | INPUT_PORTS_END |
| 704 | 704 | |
| 705 | 705 | |
| 706 | static 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? |
| 709 | ADDRESS_MAP_END |
| 710 | |
| 706 | 711 | static ADDRESS_MAP_START( spacecom_io_map, AS_IO, 8, _8080bw_state ) |
| 707 | 712 | AM_RANGE(0x41, 0x41) AM_READ_PORT("IN0") |
| 708 | 713 | AM_RANGE(0x42, 0x42) AM_READ_PORT("IN1") AM_WRITE(invaders_audio_1_w) |
| 709 | 714 | AM_RANGE(0x44, 0x44) AM_READ_PORT("IN2") AM_WRITE(invaders_audio_2_w) |
| 710 | 715 | ADDRESS_MAP_END |
| 711 | 716 | |
| 712 | | MACHINE_CONFIG_DERIVED_CLASS( spacecom, invaders, _8080bw_state ) |
| 717 | MACHINE_CONFIG_START( spacecom, _8080bw_state ) |
| 713 | 718 | |
| 714 | 719 | /* 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) |
| 716 | 722 | 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)) |
| 721 | 723 | |
| 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) |
| 724 | 733 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_spacecom) |
| 734 | |
| 735 | /* sound hardware */ |
| 736 | MCFG_FRAGMENT_ADD(invaders_audio) |
| 725 | 737 | MACHINE_CONFIG_END |
| 726 | 738 | |
| 727 | 739 | DRIVER_INIT_MEMBER(_8080bw_state, spacecom) |
| r19571 | r19572 | |
| 2176 | 2188 | ADDRESS_MAP_END |
| 2177 | 2189 | |
| 2178 | 2190 | |
| 2179 | | static MACHINE_CONFIG_DERIVED_CLASS( shuttlei, mw8080bw_root, _8080bw_state ) |
| 2191 | MACHINE_CONFIG_START( shuttlei, _8080bw_state ) |
| 2180 | 2192 | |
| 2181 | 2193 | /* basic machine hardware */ |
| 2182 | | MCFG_CPU_MODIFY("maincpu") |
| 2194 | MCFG_CPU_ADD("maincpu", I8080, XTAL_18MHz / 10) // divider guessed |
| 2183 | 2195 | MCFG_CPU_PROGRAM_MAP(shuttlei_map) |
| 2184 | 2196 | MCFG_CPU_IO_MAP(shuttlei_io_map) |
| 2185 | | MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) |
| 2186 | 2197 | |
| 2198 | MCFG_MACHINE_START_OVERRIDE(_8080bw_state, extra_8080bw) |
| 2199 | MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state, mw8080bw) |
| 2200 | |
| 2187 | 2201 | /* 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) |
| 2189 | 2206 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1) |
| 2190 | 2207 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_shuttlei) |
| 2191 | 2208 | |
| r19571 | r19572 | |
| 4177 | 4194 | GAMEL(1979, cosmicmo, invaders, invaders, cosmicmo, driver_device, 0, ROT270, "Taito / Universal", "Cosmic Monsters", GAME_SUPPORTS_SAVE, layout_cosmicm ) // unclassified, licensed or bootleg? |
| 4178 | 4195 | GAMEL(1979, cosmicm2, invaders, invaders, cosmicmo, driver_device, 0, ROT270, "Taito / Universal", "Cosmic Monsters 2", GAME_SUPPORTS_SAVE, layout_cosmicm ) // unclassified, licensed or bootleg? |
| 4179 | 4196 | GAMEL(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? |
| 4197 | GAMEL(1980, ultrainv, invaders, invaders, sicv, driver_device, 0, ROT270, "Taito / Konami", "Ultra Invaders", GAME_SUPPORTS_SAVE, layout_invaders ) // unclassified, licensed or bootleg? |
| 4180 | 4198 | GAMEL(1978, spaceatt, invaders, invaders, sicv, driver_device, 0, ROT270, "bootleg (Video Games GmbH)", "Space Attack (bootleg of Space Invaders)", GAME_SUPPORTS_SAVE, layout_invaders ) |
| 4181 | 4199 | GAMEL(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 |
| 4182 | 4200 | GAMEL(1979, spacecom, invaders, spacecom, spacecom, _8080bw_state, spacecom, ROT270, "bootleg", "Space Combat (bootleg of Space Invaders)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_spacecom ) |
| r19571 | r19572 | |
| 4199 | 4217 | GAMEL(1978, invader4, invaders, invaders, sicv, driver_device, 0, ROT270, "bootleg", "Space Invaders Part Four", GAME_SUPPORTS_SAVE, layout_invaders ) |
| 4200 | 4218 | GAME( 1978, darthvdr, invaders, darthvdr, darthvdr, driver_device, 0, ROT270, "bootleg", "Darth Vader (bootleg of Space Invaders)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 4201 | 4219 | GAMEL(19??, tst_invd, invaders, invaders, sicv, driver_device, 0, ROT0, "<unknown>", "Space Invaders Test ROM", GAME_SUPPORTS_SAVE, layout_invaders ) |
| 4202 | | GAMEL(1980, ultrainv, invaders, invaders, sicv, driver_device, 0, ROT270, "Konami", "Ultra Invaders", GAME_SUPPORTS_SAVE, layout_invaders ) |
| 4203 | 4220 | |
| 4204 | 4221 | // other Taito |
| 4205 | 4222 | GAME( 1979, invadpt2, 0, invadpt2, invadpt2, driver_device, 0, ROT270, "Taito", "Space Invaders Part II (Taito)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| r19571 | r19572 | |
| 4207 | 4224 | GAME( 1980, invaddlx, invadpt2, invaders, invadpt2, driver_device, 0, ROT270, "Taito (Midway license)", "Space Invaders Deluxe", GAME_SUPPORTS_SAVE ) |
| 4208 | 4225 | GAME( 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? |
| 4209 | 4226 | GAME( 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 |
| 4210 | | GAME( 1980, spclaser, 0, invadpt2, spclaser, driver_device, 0, ROT270, "Taito (Game Plan license?)", "Space Laser", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) |
| 4211 | | GAME( 1980, intruder, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "Taito (Game Plan license?)", "Intruder", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 4227 | GAME( 1980, spclaser, 0, invadpt2, spclaser, driver_device, 0, ROT270, "Taito", "Space Laser", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) |
| 4228 | GAME( 1980, intruder, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "Taito (Game Plan license)", "Intruder", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 4212 | 4229 | GAME( 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 ) |
| 4213 | 4230 | GAME( 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? |
| 4214 | 4231 | GAME( 1979, lrescue, 0, lrescue, lrescue, driver_device, 0, ROT270, "Taito", "Lunar Rescue", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |