mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/MCD] fixed H-INT vector handling when using Mode 1
This commit is contained in:
parent
b88f93f21e
commit
c6bcd315fb
@ -1201,8 +1201,8 @@ void scd_reset(int hard)
|
||||
scd.dmna = 0;
|
||||
|
||||
/* H-INT default vector */
|
||||
*(uint16 *)(m68k.memory_map[0].base + 0x70) = 0x00FF;
|
||||
*(uint16 *)(m68k.memory_map[0].base + 0x72) = 0xFFFF;
|
||||
*(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x70) = 0x00FF;
|
||||
*(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x72) = 0xFFFF;
|
||||
|
||||
/* Power ON initial values (MAIN-CPU side) */
|
||||
scd.regs[0x00>>1].w = 0x0002;
|
||||
@ -1405,7 +1405,7 @@ int scd_context_save(uint8 *state)
|
||||
save_param(&s68k.poll, sizeof(s68k.poll));
|
||||
|
||||
/* H-INT default vector */
|
||||
tmp16 = *(uint16 *)(m68k.memory_map[0].base + 0x72);
|
||||
tmp16 = *(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x72);
|
||||
save_param(&tmp16, 2);
|
||||
|
||||
/* SUB-CPU internal state */
|
||||
@ -1606,7 +1606,7 @@ int scd_context_load(uint8 *state)
|
||||
|
||||
/* H-INT default vector */
|
||||
load_param(&tmp16, 2);
|
||||
*(uint16 *)(m68k.memory_map[0].base + 0x72) = tmp16;
|
||||
*(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x72) = tmp16;
|
||||
|
||||
/* SUB-CPU internal state */
|
||||
load_param(&s68k.cycles, sizeof(s68k.cycles));
|
||||
|
@ -482,7 +482,7 @@ unsigned int ctrl_io_read_word(unsigned int address)
|
||||
/* H-INT vector (word access only ?) */
|
||||
if (index == 0x06)
|
||||
{
|
||||
return *(uint16 *)(m68k.memory_map[0].base + 0x72);
|
||||
return *(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x72);
|
||||
}
|
||||
|
||||
/* Stopwatch counter (word read access only ?) */
|
||||
@ -940,7 +940,7 @@ void ctrl_io_write_word(unsigned int address, unsigned int data)
|
||||
|
||||
case 0x06: /* H-INT vector (word access only ?) */
|
||||
{
|
||||
*(uint16 *)(m68k.memory_map[0].base + 0x72) = data;
|
||||
*(uint16 *)(m68k.memory_map[scd.cartridge.boot].base + 0x72) = data;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -948,7 +948,7 @@ void ctrl_io_write_word(unsigned int address, unsigned int data)
|
||||
{
|
||||
m68k_poll_sync(1<<0x0e);
|
||||
|
||||
/* D8-D15 ignored -> only MAIN-CPU flags are updated (Mortal Kombat) */
|
||||
/* D8-D15 ignored -> only MAIN-CPU flags are updated (Mortal Kombat) */
|
||||
scd.regs[0x0e>>1].byte.h = data & 0xff;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user