mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-10 21:05:12 +01:00
[Core/MCD] fixed state loading bug when SUB-CPU interrupt is pending
This commit is contained in:
parent
07677550fe
commit
aabd7f8c2b
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
@ -1448,7 +1448,7 @@ int scd_context_load(uint8 *state)
|
||||
{
|
||||
int i;
|
||||
uint16 tmp16;
|
||||
uint32 tmp32;
|
||||
uint32 tmp32, int_level;
|
||||
int bufferptr = 0;
|
||||
|
||||
/* internal harware */
|
||||
@ -1608,9 +1608,9 @@ int scd_context_load(uint8 *state)
|
||||
load_param(&tmp16, 2);
|
||||
*(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x72) = tmp16;
|
||||
|
||||
/* SUB-CPU internal state */
|
||||
/* SUB-CPU internal state (NB: IRQ level should remain reseted to prevent spurious interrupt processing when SP register is restored) */
|
||||
load_param(&s68k.cycles, sizeof(s68k.cycles));
|
||||
load_param(&s68k.int_level, sizeof(s68k.int_level));
|
||||
load_param(&int_level, sizeof(s68k.int_level));
|
||||
load_param(&s68k.stopped, sizeof(s68k.stopped));
|
||||
|
||||
/* SUB-CPU registers */
|
||||
@ -1635,6 +1635,9 @@ int scd_context_load(uint8 *state)
|
||||
load_param(&tmp32, 4); s68k_set_reg(M68K_REG_USP,tmp32);
|
||||
load_param(&tmp32, 4); s68k_set_reg(M68K_REG_ISP,tmp32);
|
||||
|
||||
/* restore IRQ level */
|
||||
s68k.int_level = int_level;
|
||||
|
||||
/* bootable MD cartridge hardware */
|
||||
if (scd.cartridge.boot)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user