mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 18:05:06 +01:00
added ISP register to savestate: fixes savestate for games running in User mode
This commit is contained in:
parent
09c02fd693
commit
e808eaf9fa
@ -149,6 +149,12 @@ int state_load(unsigned char *state)
|
||||
load_param(&tmp32, 4); m68k_set_reg(M68K_REG_PC, tmp32);
|
||||
load_param(&tmp16, 2); m68k_set_reg(M68K_REG_SR, tmp16);
|
||||
load_param(&tmp32, 4); m68k_set_reg(M68K_REG_USP,tmp32);
|
||||
|
||||
/* 1.6.1 specific (keep support for previous state format) */
|
||||
if ((version[11] == 0x31) && (version[13] == 0x36) && (version[15] == 0x31))
|
||||
{
|
||||
load_param(&tmp32, 4); m68k_set_reg(M68K_REG_ISP,tmp32);
|
||||
}
|
||||
}
|
||||
|
||||
/* Z80 */
|
||||
@ -242,6 +248,7 @@ int state_save(unsigned char *state)
|
||||
tmp32 = m68k_get_reg(M68K_REG_PC); save_param(&tmp32, 4);
|
||||
tmp16 = m68k_get_reg(M68K_REG_SR); save_param(&tmp16, 2);
|
||||
tmp32 = m68k_get_reg(M68K_REG_USP); save_param(&tmp32, 4);
|
||||
tmp32 = m68k_get_reg(M68K_REG_ISP); save_param(&tmp32, 4);
|
||||
}
|
||||
|
||||
/* Z80 */
|
||||
|
Loading…
Reference in New Issue
Block a user