resolve Karate a2600 crash (closes #1524)
This commit is contained in:
parent
af73f87e8f
commit
0174abde65
|
@ -1234,8 +1234,8 @@ sha1:a82aaeef44ad88de605c50d23fb4f6cec73f3ab4 Kamikaze Saucers (198x) (Syncro)
|
|||
sha1:dac53b95626b68d3686430ccfda8c1a10946bad2 Kangaroo (1983) (Atari) (PAL) [!] A26 m=F8;PAL=true
|
||||
sha1:e418fe90d1707e95c605517362b87a059c6af52a Kangaroo (1983) (Atari) (PAL) [a1][!] A26 m=F8;PAL=true
|
||||
sha1:01fd30311e028944eafb6d14bb001035f816ced7 Kangaroo (1983) (Atari) A26 m=F8;NTSC=true
|
||||
sha1:c0db7d295e2ce5e00e00b8a83075b1103688ea15 Karate (1982) (Froggo) A26 m=4K;NTSC=true
|
||||
sha1:c8cd0a04edea449151e6349db2455d48f23dc213 Karate (1982) (PAL) [p1][!] A26 m=4K;PAL=true
|
||||
sha1:c0db7d295e2ce5e00e00b8a83075b1103688ea15 Karate (1982) (Froggo) A26 SP_RESET=true;SP_SELECT=true;m=4K;NTSC=true
|
||||
sha1:c8cd0a04edea449151e6349db2455d48f23dc213 Karate (1982) (PAL) [p1][!] A26 SP_RESET=true;SP_SELECT=true;m=4K;PAL=true
|
||||
sha1:a5ad3e48b296fe2126bed394483811395daf1327 KC Munckin (29-01-2003) (J. Parlee) A26 m=4K;NTSC=true
|
||||
sha1:4dd1f09bc4ac633033554ff1f95cf848f577b459 KC Pacman (Pac-Man Hack) A26 m=4K;NTSC=true
|
||||
sha1:525e9054343916e2a7271278cf3610e0ed1efb71 Keystone Kapers (1983) (Activision) (PAL) [!] A26 m=4K;PAL=true
|
||||
|
|
|
@ -36,7 +36,9 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
|
||||
public bool SP_FRAME = false;
|
||||
public bool SP_RESET = false;
|
||||
public bool SP_SELECT = false;
|
||||
public bool unselect_reset;
|
||||
public bool unselect_select;
|
||||
|
||||
internal struct CpuLink : IMOS6502XLink
|
||||
{
|
||||
|
@ -227,10 +229,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
{
|
||||
SP_FRAME = true;
|
||||
}
|
||||
// Some games wait for reset to be unpressed before turning the screen back on, hack unset it if needed
|
||||
if (_game.GetOptions().TryGetValue("SP_RESET", out var spResetStr) && spResetStr == "true")
|
||||
{
|
||||
SP_RESET = true;
|
||||
}
|
||||
// Ditto select (ex. Karate)
|
||||
if (_game.GetOptions().TryGetValue("SP_SELECT", out var spSelectStr) && spSelectStr == "true")
|
||||
{
|
||||
SP_SELECT = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static MapperBase CreateMapper(Atari2600 core, string mapperName, int romLength)
|
||||
|
@ -377,6 +385,11 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
reset = false;
|
||||
}
|
||||
|
||||
if (unselect_select)
|
||||
{
|
||||
select = false;
|
||||
}
|
||||
|
||||
if (reset) { value &= 0xFE; }
|
||||
if (select) { value &= 0xFD; }
|
||||
if (SyncSettings.BW) { value &= 0xF7; }
|
||||
|
|
|
@ -54,7 +54,13 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
{
|
||||
unselect_reset = true;
|
||||
}
|
||||
else
|
||||
|
||||
if (SP_SELECT)
|
||||
{
|
||||
unselect_select = true;
|
||||
}
|
||||
|
||||
if (!SP_RESET && !SP_SELECT)
|
||||
{
|
||||
throw new Exception("ERROR: Unable to resolve Frame. Please Report.");
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
ser.Sync("leftDifficultySwitchHeld", ref _leftDifficultySwitchHeld);
|
||||
ser.Sync("rightDifficultySwitchHeld", ref _rightDifficultySwitchHeld);
|
||||
ser.Sync(nameof(unselect_reset), ref unselect_reset);
|
||||
ser.Sync(nameof(unselect_select), ref unselect_select);
|
||||
|
||||
_tia.SyncState(ser);
|
||||
_m6532.SyncState(ser);
|
||||
|
|
Loading…
Reference in New Issue