From b38b7c9dffefbe2d1779b3c23e2e8d9c1dae4731 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 25 Apr 2018 02:47:36 +0200 Subject: [PATCH] legionna.cpp: kludge a few weird Godzilla collision checks [Angelo Salese] --- src/mame/drivers/legionna.cpp | 14 ++++++++++++-- src/mame/includes/legionna.h | 1 + src/mame/machine/seibucop/seibucop.cpp | 8 ++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/legionna.cpp b/src/mame/drivers/legionna.cpp index 456ad6ce03b..81ea917f9d8 100644 --- a/src/mame/drivers/legionna.cpp +++ b/src/mame/drivers/legionna.cpp @@ -2641,7 +2641,17 @@ DRIVER_INIT_MEMBER(legionna_state,legiongfx) descramble_legionnaire_gfx(memregion("gfx5")->base() ); } - +DRIVER_INIT_MEMBER(legionna_state,godzilla) +{ + uint16_t *ROM = (uint16_t *)memregion("maincpu")->base(); + // TODO: some game elements doesn't collide properly, @see seibucop.cpp + ROM[(0xbe0e + 0x0a)/2] = 0xb000; + ROM[(0xbe0e + 0x1a)/2] = 0xb800; + ROM[(0xbb0a + 0x0a)/2] = 0xb000; + ROM[(0xbb0a + 0x1a)/2] = 0xb800; + // patch ROM checksum + ROM[0x3fffe/2] = 0x61ba; +} GAME( 1992, legionna, 0, legionna, legionna, legionna_state, legiongfx, ROT0, "TAD Corporation", "Legionnaire (World)", 0 ) GAME( 1992, legionnau,legionna, legionna, legionna, legionna_state, legiongfx, ROT0, "TAD Corporation (Fabtek license)", "Legionnaire (US)", 0 ) @@ -2653,7 +2663,7 @@ GAME( 1992, heatbrlo, heatbrl, heatbrl, heatbrl, legionna_state, 0, R GAME( 1992, heatbrlu, heatbrl, heatbrl, heatbrl, legionna_state, 0, ROT0, "TAD Corporation", "Heated Barrel (US)", 0 ) GAME( 1992, heatbrle, heatbrl, heatbrl, heatbrl, legionna_state, 0, ROT0, "TAD Corporation (Electronic Devices license)", "Heated Barrel (Electronic Devices license)", 0 ) -GAME( 1993, godzilla, 0, godzilla, godzilla, legionna_state, 0, ROT0, "Banpresto", "Godzilla (Japan)", 0 ) +GAME( 1993, godzilla, 0, godzilla, godzilla, legionna_state, godzilla, ROT0, "Banpresto", "Godzilla (Japan)", 0 ) GAME( 1993, grainbow, 0, grainbow, grainbow, legionna_state, 0, ROT0, "Banpresto", "SD Gundam Sangokushi Rainbow Tairiku Senki (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) GAME( 1993, grainbowk,grainbow, grainbow, grainbow, legionna_state, 0, ROT0, "Banpresto", "SD Gundam Sangokushi Rainbow Tairiku Senki (Korea)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) GAME( 1993, denjinmk, 0, denjinmk, denjinmk, legionna_state, 0, ROT0, "Winkysoft (Banpresto license)", "Denjin Makai", 0 ) diff --git a/src/mame/includes/legionna.h b/src/mame/includes/legionna.h index 4f3c9c01e59..123f67f1218 100644 --- a/src/mame/includes/legionna.h +++ b/src/mame/includes/legionna.h @@ -70,6 +70,7 @@ public: DECLARE_WRITE16_MEMBER(palette_swap_w); DECLARE_DRIVER_INIT(legiongfx); + DECLARE_DRIVER_INIT(godzilla); DECLARE_DRIVER_INIT(cupsoc_debug); DECLARE_DRIVER_INIT(cupsoc); DECLARE_DRIVER_INIT(cupsocs); diff --git a/src/mame/machine/seibucop/seibucop.cpp b/src/mame/machine/seibucop/seibucop.cpp index 28c1a2c8d2f..4a14df89e37 100644 --- a/src/mame/machine/seibucop/seibucop.cpp +++ b/src/mame/machine/seibucop/seibucop.cpp @@ -45,6 +45,10 @@ - (fixed) level 3+ boss movements looks wrong; - stage 3 "homing" missiles doesn't seem to like our 6200 hookup here, except it's NOT 6200!? - (fixed) barrels seen in later levels seems to fail an axis aligned bounding box, not unlike Legionnaire. + Godzilla + - few elements doesn't collide properly (i.e. Super X missiles, Tokyo's tower in stage 1), + Z axis check makes no sense whatsoever. + Kludged to work in per-game driver_init. SD Gundam - stage 3 mid-boss still has the sprite garbage bug; - stage 4: has sprite stuck on bottom-left of screen; @@ -530,6 +534,10 @@ int raiden2cop_device::find_trigger_match(uint16_t triggerval, uint16_t mask) if (triggerval == 0xa180 || triggerval == 0xa980 || triggerval == 0xb100 || triggerval == 0xb900) /* collisions */ otherlog = 0; + + // TODO: disable Z axis in driver code. + if (triggerval == 0xb000 || triggerval == 0xb800) + otherlog = 0; } else if (!strcmp(machine().system().name, "grainbow")) {