From cb09c70bcb82d0309c83aeb45bdab2dcdc198240 Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 4 Sep 2023 01:01:11 +0900 Subject: [PATCH] igs/pgm_v.cpp: Hard-code sprite zoom table entry 0x0f to 1. (#11524) ddp3 has zero in this entry, but expects it to behave like 1. --- src/mame/igs/pgm_v.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mame/igs/pgm_v.cpp b/src/mame/igs/pgm_v.cpp index 8b73553a6c8..ca4113b51b4 100644 --- a/src/mame/igs/pgm_v.cpp +++ b/src/mame/igs/pgm_v.cpp @@ -548,8 +548,10 @@ void pgm_state::get_sprites() yzom = 0x10 - yzom; } - m_sprite_ptr_pre->xzoom = (sprite_zoomtable[xzom * 2] << 16) | sprite_zoomtable[xzom * 2 + 1]; - m_sprite_ptr_pre->yzoom = (sprite_zoomtable[yzom * 2] << 16) | sprite_zoomtable[yzom * 2 + 1]; + // some games (e.g. ddp3) have zero in last zoom table entry but expect 1 + // is the last entry hard-coded to 1, or does zero have the same effect as 1? + m_sprite_ptr_pre->xzoom = (xzom == 0xf) ? 1 : ((u32(sprite_zoomtable[xzom * 2]) << 16) | sprite_zoomtable[xzom * 2 + 1]); + m_sprite_ptr_pre->yzoom = (yzom == 0xf) ? 1 : ((u32(sprite_zoomtable[yzom * 2]) << 16) | sprite_zoomtable[yzom * 2 + 1]); m_sprite_ptr_pre->xgrow = xgrow; m_sprite_ptr_pre->ygrow = ygrow; m_sprite_ptr_pre++;