summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-06-12 13:01:34 +0200
committer hap <happppp@users.noreply.github.com>2020-06-12 13:01:48 +0200
commit089aa0b143a5f849c12795653bbb59eaac6d8f91 (patch)
treea53adf2c270509e87918d0dbef387e4595f55c9a
parenta9f41ad0d1862927df40e9587b2614566e4d28f8 (diff)
bosco: fix tilemap offset problem (nw)
-rw-r--r--src/mame/drivers/galaga.cpp17
-rw-r--r--src/mame/video/bosco.cpp35
2 files changed, 34 insertions, 18 deletions
diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp
index e9b9f9bb531..1e4e1321529 100644
--- a/src/mame/drivers/galaga.cpp
+++ b/src/mame/drivers/galaga.cpp
@@ -673,13 +673,6 @@ Notes:
TODO:
----
-- bosco: is the scrolling tilemap placement correct? It is currently aligned so that
- the test grid shown on startup is correct, but this way an unerased grey strip
- remains on the left of the screen during the title sequence. Alignment of the
- bullets/radar blips is also mysterious. Currently the radar blips are perfectly
- aligned with the radar, but the alignment of the player bullets with the player
- ship differs by one horizontal pixel when the screen is flipped.
-
- gallag/gatsbee: explosions are not emulated since the bootleg board doesn't have
the 54XX custom. Should probably use samples like Battles?
@@ -3493,11 +3486,11 @@ void battles_state::driver_init()
/* Original Namco hardware, with Namco Customs */
// YEAR, NAME, PARENT, MACHINE, INPUT, STATE, INIT, MONITOR,COMPANY,FULLNAME,FLAGS
-GAME( 1981, bosco, 0, bosco, bosco, bosco_state, empty_init, ROT0, "Namco", "Bosconian (new version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1981, boscoo, bosco, bosco, bosco, bosco_state, empty_init, ROT0, "Namco", "Bosconian (old version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1981, boscoo2, bosco, bosco, bosco, bosco_state, empty_init, ROT0, "Namco", "Bosconian (older version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1981, boscomd, bosco, bosco, boscomd, bosco_state, empty_init, ROT0, "Namco (Midway license)", "Bosconian (Midway, new version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1981, boscomdo, bosco, bosco, boscomd, bosco_state, empty_init, ROT0, "Namco (Midway license)", "Bosconian (Midway, old version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1981, bosco, 0, bosco, bosco, bosco_state, empty_init, ROT0, "Namco", "Bosconian (new version)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, boscoo, bosco, bosco, bosco, bosco_state, empty_init, ROT0, "Namco", "Bosconian (old version)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, boscoo2, bosco, bosco, bosco, bosco_state, empty_init, ROT0, "Namco", "Bosconian (older version)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, boscomd, bosco, bosco, boscomd, bosco_state, empty_init, ROT0, "Namco (Midway license)", "Bosconian (Midway, new version)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, boscomdo, bosco, bosco, boscomd, bosco_state, empty_init, ROT0, "Namco (Midway license)", "Bosconian (Midway, old version)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, galaga, 0, galaga, galaga, galaga_state, init_galaga, ROT90, "Namco", "Galaga (Namco rev. B)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, galagao, galaga, galaga, galaga, galaga_state, init_galaga, ROT90, "Namco", "Galaga (Namco)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/video/bosco.cpp b/src/mame/video/bosco.cpp
index d8eca509011..c86e76ed1a9 100644
--- a/src/mame/video/bosco.cpp
+++ b/src/mame/video/bosco.cpp
@@ -123,8 +123,6 @@ VIDEO_START_MEMBER(bosco_state,bosco)
m_bg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0x1f);
m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0x1f);
- m_bg_tilemap->set_scrolldx(3,3);
-
m_spriteram = m_videoram + 0x03d4;
m_spriteram_size = 0x0c;
m_spriteram2 = m_spriteram + 0x0800;
@@ -185,13 +183,13 @@ void bosco_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect,
for (offs = 0;offs < m_spriteram_size;offs += 2)
{
- int sx = spriteram[offs + 1] - 1;
+ int sx = spriteram[offs + 1] - 2;
int sy = 240 - spriteram_2[offs];
int flipx = spriteram[offs] & 1;
int flipy = spriteram[offs] & 2;
int color = spriteram_2[offs + 1] & 0x3f;
- if (flip) sx += 32-2;
+ if (flip) sx += 32-1;
m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
(spriteram[offs] & 0xfc) >> 2,
@@ -246,13 +244,16 @@ uint32_t bosco_state::screen_update_bosco(screen_device &screen, bitmap_ind16 &b
fg_clip.min_x = 28*8;
}
+ bg_clip &= cliprect;
+ fg_clip &= cliprect;
+
bitmap.fill(m_palette->black_pen(), cliprect);
- m_starfield->draw_starfield(bitmap,cliprect,flip);
+ m_starfield->draw_starfield(bitmap,bg_clip,flip);
m_bg_tilemap->draw(screen, bitmap, bg_clip, 0,0);
m_fg_tilemap->draw(screen, bitmap, fg_clip, 0,0);
- draw_sprites(bitmap,cliprect,flip);
+ draw_sprites(bitmap,bg_clip,flip);
/* draw the high priority characters */
m_bg_tilemap->draw(screen, bitmap, bg_clip, 1,0);
@@ -260,6 +261,28 @@ uint32_t bosco_state::screen_update_bosco(screen_device &screen, bitmap_ind16 &b
draw_bullets(bitmap,cliprect,flip);
+ /* It looks like H offsets 221-223 are skipped over, moving the radar tilemap
+ (including the 'bullets' on it) 3 pixels to the left */
+ for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
+ {
+ if (flip)
+ {
+ for (int x = 63; x >= 0; x--)
+ {
+ bitmap.pix16(y, x + 3) = bitmap.pix16(y, x);
+ bitmap.pix16(y, x) = m_palette->black_pen();
+ }
+ }
+ else
+ {
+ for (int x = 224; x < 288; x++)
+ {
+ bitmap.pix16(y, x - 3) = bitmap.pix16(y, x);
+ bitmap.pix16(y, x) = m_palette->black_pen();
+ }
+ }
+ }
+
return 0;
}