mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
32x: improve 'simple' scheduling, works for 'interesting' games
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@798 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
c987bb5c36
commit
236990cf77
4 changed files with 42 additions and 35 deletions
|
@ -1,7 +1,7 @@
|
|||
#include "../pico_int.h"
|
||||
#include "../memory.h"
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
#undef ash2_end_run
|
||||
#undef SekEndRun
|
||||
#define ash2_end_run(x)
|
||||
|
@ -159,7 +159,7 @@ static u32 p32x_reg_read16(u32 a)
|
|||
return sh2_comm_faker(a);
|
||||
#else
|
||||
if ((a & 0x30) == 0x20 && p32x_poll_detect(&m68k_poll, a, SekCyclesDoneT(), 0)) {
|
||||
SekEndRun(16);
|
||||
SekEndTimeslice(16);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -220,9 +220,11 @@ static void p32x_reg_write8(u32 a, u32 d)
|
|||
if ((a & 0x30) == 0x20) {
|
||||
u8 *r8 = (u8 *)r;
|
||||
r8[a ^ 1] = d;
|
||||
if (p32x_poll_undetect(&sh2_poll[0], 0) || p32x_poll_undetect(&sh2_poll[1], 0))
|
||||
// if some SH2 is busy waiting, it needs to see the result ASAP
|
||||
SekEndRun(16);
|
||||
p32x_poll_undetect(&sh2_poll[0], 0);
|
||||
p32x_poll_undetect(&sh2_poll[1], 0);
|
||||
// if some SH2 is busy waiting, it needs to see the result ASAP
|
||||
if (SekCyclesLeftNoMCD > 32)
|
||||
SekEndRun(32);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -265,9 +267,11 @@ static void p32x_reg_write16(u32 a, u32 d)
|
|||
// comm port
|
||||
else if ((a & 0x30) == 0x20 && r[a / 2] != d) {
|
||||
r[a / 2] = d;
|
||||
if (p32x_poll_undetect(&sh2_poll[0], 0) || p32x_poll_undetect(&sh2_poll[1], 0))
|
||||
// if some SH2 is busy waiting, it needs to see the result ASAP
|
||||
SekEndRun(16);
|
||||
p32x_poll_undetect(&sh2_poll[0], 0);
|
||||
p32x_poll_undetect(&sh2_poll[1], 0);
|
||||
// same as for w8
|
||||
if (SekCyclesLeftNoMCD > 32)
|
||||
SekEndRun(32);
|
||||
return;
|
||||
}
|
||||
// PWM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue