added ISP register to savestate: fixes savestate for games running in User mode

This commit is contained in:
ekeeke31 2012-01-16 21:09:55 +00:00
parent 09c02fd693
commit e808eaf9fa

View File

@ -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 */