summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author bmcphail <bmcphail@vcmame.net>2018-09-04 14:34:12 -0400
committer bmcphail <bmcphail@vcmame.net>2018-09-04 14:34:12 -0400
commit2f25e1edbd7b06282532f70e5009212b0183ef50 (patch)
tree13a6ee050a3615ef7fa365540cf06aebc228dc86
parent82bfdc9b4f9591da9b5d5eef6c04d644c584d77a (diff)
Beast Busters - fix sprite priority
Credit to Daniel Filner for information. Palettes 0xc-0xf on 2nd sprite chip behind the tilemap - confirmed on level 2 and matches real hardware video. Removed imperfect_graphics flags as no open bugs. (question - why is this marked as imperfect audio when there are no notes in the driver or open mametesters bugs?)
-rw-r--r--src/mame/drivers/bbusters.cpp18
-rw-r--r--src/mame/includes/bbusters.h2
-rw-r--r--src/mame/video/bbusters.cpp20
3 files changed, 16 insertions, 24 deletions
diff --git a/src/mame/drivers/bbusters.cpp b/src/mame/drivers/bbusters.cpp
index 9af40a81467..e3a59fbc9cf 100644
--- a/src/mame/drivers/bbusters.cpp
+++ b/src/mame/drivers/bbusters.cpp
@@ -184,14 +184,6 @@ If you calibrate the guns correctly the game runs as expected:
2) Using P2 controls fire at the indicated spots.
3) Using P3 controls fire at the indicated spots.
----
-
-Beast Busters notes (from Brian Hargrove)
-
-1. Stage 2 for example, has background sprites and enemies that float on the
-foreground and not behind the moving elevator layer.
-
-
***************************************************************************/
#include "emu.h"
@@ -1143,11 +1135,11 @@ ROM_END
/******************************************************************************/
// as soon as you calibrate the guns in test mode the game refuses to boot
-GAME( 1989, bbusters, 0, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, bbustersu, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (US, Version 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, bbustersua, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (US, Version 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, bbustersj, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (Japan, Version 2, 3 Player)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, bbustersja, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (Japan, Version 2, 2 Player)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbusters, 0, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (World)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbustersu, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (US, Version 3)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbustersua, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (US, Version 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbustersj, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (Japan, Version 2, 3 Player)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbustersja, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (Japan, Version 2, 2 Player)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1989, mechatt, 0, mechatt, mechatt, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, mechattj, mechatt, mechatt, mechattj, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/bbusters.h b/src/mame/includes/bbusters.h
index 955182ccee6..2f1db3fce21 100644
--- a/src/mame/includes/bbusters.h
+++ b/src/mame/includes/bbusters.h
@@ -59,7 +59,7 @@ protected:
inline const uint8_t *get_source_ptr(gfx_element *gfx, uint32_t sprite, int dx, int dy, int block);
void draw_block(bitmap_ind16 &dest,int x,int y,int size,int flipx,int flipy,uint32_t sprite,int color,int bank,int block);
- void draw_sprites(bitmap_ind16 &bitmap, const uint16_t *source, int bank, int colval, int colmask);
+ void draw_sprites(bitmap_ind16 &bitmap, const uint16_t *source, int bank, int pass);
void sound_map(address_map &map);
private:
diff --git a/src/mame/video/bbusters.cpp b/src/mame/video/bbusters.cpp
index e032f1a521c..827ba79b051 100644
--- a/src/mame/video/bbusters.cpp
+++ b/src/mame/video/bbusters.cpp
@@ -18,9 +18,6 @@
than just ram. Beast Busters has 4 sprite chips as it has two sprite
banks.
- Todo: Sprite priority looks to be wrong on level 2 (some sprites should
- be behind the playfield).
-
***************************************************************************/
#include "emu.h"
@@ -176,7 +173,7 @@ void bbusters_state::draw_block(bitmap_ind16 &dest,int x,int y,int size,int flip
}
}
-void bbusters_state::draw_sprites(bitmap_ind16 &bitmap, const uint16_t *source, int bank, int colval, int colmask)
+void bbusters_state::draw_sprites(bitmap_ind16 &bitmap, const uint16_t *source, int bank, int pass)
{
int offs;
@@ -218,9 +215,12 @@ void bbusters_state::draw_sprites(bitmap_ind16 &bitmap, const uint16_t *source,
fx=source[offs+0]&0x800;
sprite=sprite&0x3fff;
- if ((colour&colmask)!=colval)
+ // Palettes 0xc-0xf confirmed to be behind tilemap on Beast Busters
+ if (pass==1 && (colour&0xc)!=0xc)
continue;
-
+ if (pass==0 && (colour&0xc)==0xc)
+ continue;
+
switch ((source[offs+0]>>8)&0x3) {
case 0:
scale=source[offs+0]&0x7;
@@ -260,10 +260,10 @@ uint32_t bbusters_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
m_pf_tilemap[1]->set_scrolly(0, m_pf_scroll_data[1][1]);
m_pf_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0);
- //draw_sprites(bitmap, m_spriteram[1]->buffer(), 2, 0x8, 0x8);
+ draw_sprites(bitmap, m_spriteram[1]->buffer(), 2, 1);
m_pf_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0);
- draw_sprites(bitmap, m_spriteram[1]->buffer(), 2, 0, 0);
- draw_sprites(bitmap, m_spriteram[0]->buffer(), 1, 0, 0);
+ draw_sprites(bitmap, m_spriteram[1]->buffer(), 2, 0);
+ draw_sprites(bitmap, m_spriteram[0]->buffer(), 1, -1);
m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
@@ -277,7 +277,7 @@ uint32_t mechatt_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
m_pf_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0);
m_pf_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0);
- draw_sprites(bitmap, m_spriteram[0]->buffer(), 1, 0, 0);
+ draw_sprites(bitmap, m_spriteram[0]->buffer(), 1, -1);
m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}