[Core/MCD] fixed H-INT vector handling when using Mode 1

This commit is contained in:
EkeEke 2013-12-17 17:06:13 +01:00
parent b88f93f21e
commit c6bcd315fb
2 changed files with 7 additions and 7 deletions

View File

@ -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));

View File

@ -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;
}