summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/seibucop/seibucop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/seibucop/seibucop.cpp')
-rw-r--r--src/mame/machine/seibucop/seibucop.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mame/machine/seibucop/seibucop.cpp b/src/mame/machine/seibucop/seibucop.cpp
index d45698b4f97..96a0b8d1120 100644
--- a/src/mame/machine/seibucop/seibucop.cpp
+++ b/src/mame/machine/seibucop/seibucop.cpp
@@ -1275,15 +1275,17 @@ WRITE16_MEMBER( raiden2cop_device::cop_sprite_dma_src_lo_w)
m_cop_sprite_dma_src = (m_cop_sprite_dma_src&0xffff0000)|(data&0xffff);
}
-// guess
WRITE16_MEMBER(raiden2cop_device::cop_sprite_dma_inc_w)
{
if (data)
printf("Warning: COP RAM 0x410 used with %04x\n", data);
else
{
- /* guess */
- cop_regs[4] += 8;
+ // Don't increment if the sprite DMA is out of bounds
+ // (A3 doesn't get updated if it happens, cfr. code at $1e56)
+ // TODO: hardwired for SD Gundam, must be user controllable somehow.
+ if (m_sprite_dma_x_clip >= -160 && m_sprite_dma_x_clip < 320)
+ cop_regs[4] += 8;
m_cop_sprite_dma_src += 6;
m_cop_sprite_dma_size--;