summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
266c6af)
+ if (sh2->delay)
+ {
+ opcode = RW(sh2->delay);
+ sh2->pc -= 2;
+ }
+ else
+ opcode = RW(sh2->pc);
sh2->delay = 0;
sh2->pc += 2;
sh2->delay = 0;
sh2->pc += 2;
int p32x_csum_faked;
#ifdef FAKE_SH2
static const u16 comm_fakevals[] = {
int p32x_csum_faked;
#ifdef FAKE_SH2
static const u16 comm_fakevals[] = {
if ((a & 0x30) == 0x20)
return sh2_comm_faker(a);
#else
if ((a & 0x30) == 0x20)
return sh2_comm_faker(a);
#else
+#ifdef FAKE_SH2
+ // fake only slave for now
+ if (a == 0x24 || a == 0x26)
+ return sh2_comm_faker(a);
+#endif
return Pico32x.regs[a / 2];
}
return Pico32x.regs[a / 2];
}
- if ((a & 0x30) == 0x20) {
+ if ((a & 0x30) == 0x20 && r[a / 2] != d) {
- poll_undetect(&msh2_poll, P32XF_MSH2POLL);
+ if (poll_undetect(&msh2_poll, P32XF_MSH2POLL))
+ // if SH2 is busy waiting, it needs to see the result ASAP
+ SekEndRun(16);
u32 pico32x_read16(u32 a)
{
u32 d = 0;
u32 pico32x_read16(u32 a)
{
u32 d = 0;
if (a < sizeof(Pico32xMem->sh2_rom_m))
return *(u16 *)(Pico32xMem->sh2_rom_m + a);
if (a < sizeof(Pico32xMem->sh2_rom_m))
return *(u16 *)(Pico32xMem->sh2_rom_m + a);