diff --git a/src/mame/video/galaxia.c b/src/mame/video/galaxia.c index f08ebeb0ed6..a3217d3088f 100644 --- a/src/mame/video/galaxia.c +++ b/src/mame/video/galaxia.c @@ -60,35 +60,51 @@ PALETTE_INIT( astrowar ) palette_set_color_rgb(machine, BULLET_PEN, pal1bit(1), pal1bit(1), pal1bit(0)); } -static TILE_GET_INFO( get_bg_tile_info ) +static TILE_GET_INFO( get_galaxia_bg_tile_info ) +{ + galaxia_state *state = machine.driver_data(); + UINT8 code = state->m_video_ram[tile_index] & 0x7f; // d7 unused + UINT8 color = state->m_color_ram[tile_index] & 3; // highest bits unused + + SET_TILE_INFO(0, code, color, 0); +} + +static TILE_GET_INFO( get_astrowar_bg_tile_info ) { galaxia_state *state = machine.driver_data(); UINT8 code = state->m_video_ram[tile_index]; - UINT8 color = state->m_color_ram[tile_index]; // highest bits unused + UINT8 color = state->m_color_ram[tile_index] & 7; // highest bits unused SET_TILE_INFO(0, code, color, 0); } +static void init_common( running_machine &machine ) +{ + assert((STAR_PEN & 7) == 0); + cvs_init_stars(machine); +} + VIDEO_START( galaxia ) { galaxia_state *state = machine.driver_data(); + init_common(machine); - assert((STAR_PEN & 7) == 0); - - state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); + state->m_bg_tilemap = tilemap_create(machine, get_galaxia_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); state->m_bg_tilemap->set_transparent_pen(0); state->m_bg_tilemap->set_scroll_cols(8); - cvs_init_stars(machine); } VIDEO_START( astrowar ) { - VIDEO_START_CALL(galaxia); - galaxia_state *state = machine.driver_data(); - + init_common(machine); + + state->m_bg_tilemap = tilemap_create(machine, get_astrowar_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); + state->m_bg_tilemap->set_transparent_pen(0); + state->m_bg_tilemap->set_scroll_cols(8); state->m_bg_tilemap->set_scrolldx(8, 8); + machine.primary_screen->register_screen_bitmap(state->m_temp_bitmap); }