From 77bee91892ea0884b4c1953bcd9dcd99bc323e43 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 8 Jan 2025 12:10:27 +0100 Subject: xexex: remove empty init function (for invincibility just use -cheat) --- src/mame/konami/xexex.cpp | 50 +++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/src/mame/konami/xexex.cpp b/src/mame/konami/xexex.cpp index 76d1d78e043..61ba829fcdd 100644 --- a/src/mame/konami/xexex.cpp +++ b/src/mame/konami/xexex.cpp @@ -196,8 +196,6 @@ public: void xexex(machine_config &config); - void init_xexex(); - private: /* memory pointers */ required_shared_ptr m_workram; @@ -213,8 +211,7 @@ private: int m_cur_alpha = 0; /* misc */ - uint16_t m_cur_control2 = 0; - int32_t m_strip_0x1a = 0; + uint16_t m_cur_control2 = 0; int m_suspension_active = 0; int m_resume_trigger = 0; emu_timer *m_dmadelay_timer = nullptr; @@ -325,7 +322,7 @@ uint32_t xexex_state::screen_update_xexex(screen_device &screen, bitmap_rgb32 &b if (m_layer_colorbase[plane] != new_colorbase) { m_layer_colorbase[plane] = new_colorbase; - m_k056832->mark_plane_dirty( plane); + m_k056832->mark_plane_dirty(plane); } } @@ -361,7 +358,7 @@ uint32_t xexex_state::screen_update_xexex(screen_device &screen, bitmap_rgb32 &b } } - m_k053246->k053247_sprites_draw( bitmap, cliprect); + m_k053246->k053247_sprites_draw(bitmap, cliprect); if (m_cur_alpha) { @@ -407,7 +404,7 @@ void xexex_state::k053247_scattered_word_w(offs_t offset, uint16_t data, uint16_ #endif -void xexex_state::xexex_objdma( int limiter ) +void xexex_state::xexex_objdma(int limiter) { int counter, num_inactive; uint16_t *src, *dst; @@ -417,7 +414,7 @@ void xexex_state::xexex_objdma( int limiter ) if (limiter && counter == m_frame) return; // make sure we only do DMA transfer once per frame - m_k053246->k053247_get_ram( &dst); + m_k053246->k053247_get_ram(&dst); counter = m_k053246->k053247_get_dy(); src = m_spriteram; num_inactive = counter = 256; @@ -462,7 +459,7 @@ uint16_t xexex_state::xexex_waitskip_r() } -void xexex_state::parse_control2( ) +void xexex_state::parse_control2() { /* bit 0 is data */ /* bit 1 is cs (active low) */ @@ -473,7 +470,7 @@ void xexex_state::parse_control2( ) ioport("EEPROMOUT")->write(m_cur_control2, 0xff); /* bit 8 = enable sprite ROM reading */ - m_k053246->k053246_set_objcha_line( (m_cur_control2 & 0x0100) ? ASSERT_LINE : CLEAR_LINE); + m_k053246->k053246_set_objcha_line((m_cur_control2 & 0x0100) ? ASSERT_LINE : CLEAR_LINE); /* bit 9 = disable alpha channel on K054157 plane 0 (under investigation) */ m_cur_alpha = !(m_cur_control2 & 0x200); @@ -536,15 +533,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(xexex_state::xexex_interrupt) machine().scheduler().trigger(m_resume_trigger); } - if(scanline == 0) + if (scanline == 0) { // IRQ 6 is for test mode only - if (m_cur_control2 & 0x0020) - m_maincpu->set_input_line(6, HOLD_LINE); + if (m_cur_control2 & 0x0020) + m_maincpu->set_input_line(6, HOLD_LINE); } /* TODO: vblank is at 256! (enable CCU then have fun in fixing offsetted layers) */ - if(scanline == 128) + if (scanline == 128) { if (m_k053246->k053246_is_irq_enabled()) { @@ -679,9 +676,7 @@ void xexex_state::machine_start() void xexex_state::machine_reset() { - int i; - - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { m_layerpri[i] = 0; m_layer_colorbase[i] = 0; @@ -892,22 +887,9 @@ ROM_START( xexexj ) /* Japan, Version AA */ ROM_END -void xexex_state::init_xexex() -{ - m_strip_0x1a = 0; - - if (!strcmp(machine().system().name, "xexex")) - { - // Invulnerability -// *(uint16_t *)(memregion("maincpu")->base() + 0x648d4) = 0x4a79; -// *(uint16_t *)(memregion("maincpu")->base() + 0x00008) = 0x5500; - m_strip_0x1a = 1; - } -} - } // anonymous namespace -GAME( 1991, xexex, 0, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Xexex (ver EAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1991, orius, xexex, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Orius (ver UAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1991, xexexa, xexex, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Xexex (ver AAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1991, xexexj, xexex, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Xexex (ver JAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, xexex, 0, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Xexex (ver EAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, orius, xexex, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Orius (ver UAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, xexexa, xexex, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Xexex (ver AAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, xexexj, xexex, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Xexex (ver JAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3