summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-10-25 11:33:51 +0200
committer hap <happppp@users.noreply.github.com>2021-10-25 11:34:02 +0200
commit8f3fddc96a750b6839c5497bcfa6497b744008dd (patch)
treee7b9127f35458365fa2dc15b7a66efbe56b8429e /src/mame
parent3026bb4bba89f623c0beb19b68862684b74bf550 (diff)
sfx/monsterz: add kludge for sprite y offset issue [smf]
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/galaxian.cpp3
-rw-r--r--src/mame/includes/galaxian.h4
-rw-r--r--src/mame/video/galaxian.cpp11
3 files changed, 10 insertions, 8 deletions
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index cb0ef2cd7fc..2adeb4562eb 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -685,7 +685,6 @@ TODO:
- streakng/ghostmun: $4800-4bff
- 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)
- zigzag : full Dip Switches and Inputs
- zigzag2 : full Dip Switches and Inputs
- jumpbug : full Dip Switches and Inputs - missing possible discrete sounds
@@ -8883,7 +8882,7 @@ void nihon_sfx_state::init_sfx()
common_init(nullptr, nullptr, &galaxian_state::upper_extend_tile_info, nullptr);
m_draw_background_ptr = draw_background_delegate(&nihon_sfx_state::sfx_draw_background, this);
m_draw_bullet_ptr = draw_bullet_delegate(&nihon_sfx_state::sfx_draw_bullet, this);
- m_sfx_tilemap = true;
+ m_sfx_adjust = true;
}
void monsterz_state::init_monsterz()
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index f78bf776ae4..f36a5b62b6c 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -413,10 +413,10 @@ protected:
uint8_t m_konami_sound_control;
uint8_t m_irq_enabled;
int m_irq_line = INPUT_LINE_NMI;
- uint8_t m_frogger_adjust = false;
+ bool m_frogger_adjust = false;
uint8_t m_x_scale = GALAXIAN_XSCALE;
uint8_t m_h0_start = GALAXIAN_H0START;
- uint8_t m_sfx_tilemap = false;
+ bool m_sfx_adjust = false;
extend_tile_info_delegate m_extend_tile_info_ptr;
extend_sprite_info_delegate m_extend_sprite_info_ptr;
diff --git a/src/mame/video/galaxian.cpp b/src/mame/video/galaxian.cpp
index 6f59f183d32..03eed46f894 100644
--- a/src/mame/video/galaxian.cpp
+++ b/src/mame/video/galaxian.cpp
@@ -387,7 +387,7 @@ void galaxian_state::eagle_palette(palette_device &palette)
void galaxian_state::video_start()
{
/* create a tilemap for the background */
- if (!m_sfx_tilemap)
+ if (!m_sfx_adjust)
{
/* normal galaxian hardware is row-based and individually scrolling columns */
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(galaxian_state::bg_get_tile_info)), TILEMAP_SCAN_ROWS, m_x_scale*8,8, 32,32);
@@ -518,7 +518,7 @@ void galaxian_state::galaxian_objram_w(offs_t offset, uint8_t data)
/* Frogger: top and bottom 4 bits swapped entering the adder */
if (m_frogger_adjust)
data = (data >> 4) | (data << 4);
- if (!m_sfx_tilemap)
+ if (!m_sfx_adjust)
m_bg_tilemap->set_scrolly(offset >> 1, data);
else
m_bg_tilemap->set_scrollx(offset >> 1, m_x_scale*data);
@@ -561,10 +561,13 @@ void galaxian_state::sprites_draw(bitmap_rgb32 &bitmap, const rectangle &cliprec
for (sprnum = 7; sprnum >= 0; sprnum--)
{
const uint8_t *base = &spritebase[sprnum * 4];
+
/* Frogger: top and bottom 4 bits swapped entering the adder */
uint8_t base0 = m_frogger_adjust ? ((base[0] >> 4) | (base[0] << 4)) : base[0];
- /* the first three sprites match against y-1 */
- uint8_t sy = 240 - (base0 - (sprnum < 3));
+
+ /* the first three sprites match against y-1 (seems other way around for sfx/monsterz) */
+ uint8_t sy = 240 - (base0 - (m_sfx_adjust ? (sprnum >= 3) : (sprnum < 3)));
+
uint16_t code = base[1] & 0x3f;
uint8_t flipx = base[1] & 0x40;
uint8_t flipy = base[1] & 0x80;