From 2f25e1edbd7b06282532f70e5009212b0183ef50 Mon Sep 17 00:00:00 2001 From: bmcphail Date: Tue, 4 Sep 2018 14:34:12 -0400 Subject: 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?) --- src/mame/drivers/bbusters.cpp | 18 +++++------------- src/mame/includes/bbusters.h | 2 +- src/mame/video/bbusters.cpp | 20 ++++++++++---------- 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; } -- cgit v1.2.3