diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 5c171e82c4c..cb0ef2cd7fc 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -686,7 +686,6 @@ TODO: - smooncrs : fix read/writes at/to unmapped memory (when player 2, "cocktail" mode) + fix the ?#! bug with "bullets" (when player 2, "cocktail" mode) - timefgtr : missing player bullets, sprite ROM extend(see later levels), sound is too slow, some sprites missing - monsterz : galaxian_state::sprites_draw "the first three sprites match against y-1", it looks like y+1 for this game (probably also applies to sfx) -- monsterz : stars should scroll? - zigzag : full Dip Switches and Inputs - zigzag2 : full Dip Switches and Inputs - jumpbug : full Dip Switches and Inputs - missing possible discrete sounds @@ -8887,6 +8886,12 @@ void nihon_sfx_state::init_sfx() m_sfx_tilemap = true; } +void monsterz_state::init_monsterz() +{ + init_sfx(); + m_draw_background_ptr = draw_background_delegate(&galaxian_state::galaxian_draw_background, this); +} + void galaxian_state::init_atlantis() { @@ -15522,10 +15527,10 @@ GAME( 19??, scorpionmc, scorpion, scorpnmc, scorpnmc, galaxian_state, i GAME( 19??, aracnis, scorpion, scorpnmc, aracnis, galaxian_state, init_batman2, ROT90, "bootleg", "Aracnis (bootleg of Scorpion on Moon Cresta hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) // SF-X hardware; based on Scramble with extra Z80 and 8255 driving a DAC-based sample player -GAME( 1983, sfx, 0, sfx, sfx, nihon_sfx_state, init_sfx, ORIENTATION_FLIP_X, "Nihon Game (Nichibutsu license)", "SF-X", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, skelagon, sfx, sfx, sfx, nihon_sfx_state, init_sfx, ORIENTATION_FLIP_X, "Nihon Game (Nichibutsu USA license)", "Skelagon", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE) -GAME( 1982, monsterz, 0, monsterz, monsterz, monsterz_state, init_sfx, ORIENTATION_FLIP_X, "Nihon Game", "Monster Zero (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, monsterza, monsterz, monsterz, monsterz, monsterz_state, init_sfx, ORIENTATION_FLIP_X, "Nihon Game", "Monster Zero (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, sfx, 0, sfx, sfx, nihon_sfx_state, init_sfx, ORIENTATION_FLIP_X, "Nihon Game (Nichibutsu license)", "SF-X", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, skelagon, sfx, sfx, sfx, nihon_sfx_state, init_sfx, ORIENTATION_FLIP_X, "Nihon Game (Nichibutsu USA license)", "Skelagon", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE) +GAME( 1982, monsterz, 0, monsterz, monsterz, monsterz_state, init_monsterz, ORIENTATION_FLIP_X, "Nihon Game", "Monster Zero (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, monsterza, monsterz, monsterz, monsterz, monsterz_state, init_monsterz, ORIENTATION_FLIP_X, "Nihon Game", "Monster Zero (set 2)", MACHINE_SUPPORTS_SAVE ) /* diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index 24c8f181170..f78bf776ae4 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -210,6 +210,7 @@ public: void stars_update_origin(); void stars_draw_row(bitmap_rgb32 &bitmap, int maxx, int y, uint32_t star_offs, uint8_t starmask); void null_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect); + void galaxian_draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect, int maxx); void galaxian_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect); void background_draw_colorsplit(bitmap_rgb32 &bitmap, const rectangle &cliprect, rgb_t color, int split, int split_flipped); void scramble_draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect, int maxx); @@ -814,6 +815,8 @@ public: void monsterz(machine_config& config); + void init_monsterz(); + protected: virtual void machine_start() override; diff --git a/src/mame/video/galaxian.cpp b/src/mame/video/galaxian.cpp index 99fe3196f2a..6f59f183d32 100644 --- a/src/mame/video/galaxian.cpp +++ b/src/mame/video/galaxian.cpp @@ -930,12 +930,8 @@ void galaxian_state::null_draw_background(bitmap_rgb32 &bitmap, const rectangle } - -void galaxian_state::galaxian_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect) +void galaxian_state::galaxian_draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect, int maxx) { - /* erase the background to black first */ - bitmap.fill(rgb_t::black(), cliprect); - /* update the star origin to the current frame */ stars_update_origin(); @@ -948,12 +944,21 @@ void galaxian_state::galaxian_draw_background(bitmap_rgb32 &bitmap, const rectan for (y = cliprect.min_y; y <= cliprect.max_y; y++) { uint32_t star_offs = m_star_rng_origin + y * 512; - stars_draw_row(bitmap, 256, y, star_offs, 0xff); + stars_draw_row(bitmap, maxx, y, star_offs, 0xff); } } } +void galaxian_state::galaxian_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + /* erase the background to black first */ + bitmap.fill(rgb_t::black(), cliprect); + + galaxian_draw_stars(bitmap, cliprect, 256); +} + + void galaxian_state::background_draw_colorsplit(bitmap_rgb32 &bitmap, const rectangle &cliprect, rgb_t color, int split, int split_flipped) { /* horizontal bgcolor split */