[Core/MS/GG] fixed SP register initialization on power-on (Ace of Aces, Shadow Dancer, Ecco the Dolphin, Evander Holyfield Real Deal Boxing)

This commit is contained in:
EkeEke 2014-11-23 20:25:55 +01:00
parent 9f5dd11e93
commit 4946d73a47

View File

@ -349,11 +349,15 @@ void gen_reset(int hard_reset)
Z80.r = 4; Z80.r = 4;
} }
/* Master System specific (when BIOS is disabled) */ /* Master System & Game Gear specific */
else if ((system_hw & SYSTEM_SMS) && (!(config.bios & 1) || !(system_bios & SYSTEM_SMS))) else if (system_hw & (SYSTEM_SMS | SYSTEM_GG))
{ {
/* usually done by BIOS & required by some SMS games that don't initialize SP */ /* check if BIOS is not being used */
Z80.sp.w.l = 0xDFFF; if ((!(config.bios & 1) || !(system_bios & (SYSTEM_SMS | SYSTEM_GG))))
{
/* a few Master System (Ace of Aces, Shadow Dancer) & Game Gear (Ecco the Dolphin, Evander Holyfield Real Deal Boxing) games crash if SP is not properly initialized */
Z80.sp.w.l = 0xDFF0;
}
} }
} }
} }