From 157789acac77cea680f259694ebc05d337b8b3cd Mon Sep 17 00:00:00 2001 From: Enik Land Date: Mon, 8 Apr 2019 18:54:34 -0300 Subject: sms.cpp: Init SP reg to allow Ecco (GG) to run without BIOS (fix MT07255) --- src/mame/machine/sms.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp index 6f433f7145e..359422796dd 100644 --- a/src/mame/machine/sms.cpp +++ b/src/mame/machine/sms.cpp @@ -2,6 +2,7 @@ // copyright-holders:Wilbert Pol, Charles MacDonald,Mathis Rosenhauer,Brad Oliver,Michael Luong,Fabio Priuli,Enik Land #include "emu.h" #include "crsshair.h" +#include "cpu/z80/z80.h" #include "video/315_5124.h" #include "sound/ym2413.h" #include "includes/sms.h" @@ -1081,6 +1082,11 @@ void sms_state::machine_start() if (m_is_gamegear) { save_item(NAME(m_gg_sio)); + // The game Ecco requires SP to be initialized, so, to run on a BIOS-less Game + // Gear, probably a custom chip like the 315-5378 does the initialization, as + // done by the 315-5342 chip on the Power Base Converter for Sega Genesis/MD. + // Reference: http://www.smspower.org/forums/14084-PowerBaseConverterInfo + m_maincpu->set_state_int(Z80_SP, 0xdff0); } if (m_cartslot) -- cgit v1.2.3