mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
32x: start reworking sheduling
This commit is contained in:
parent
9b5713af95
commit
ed4402a7df
17 changed files with 180 additions and 163 deletions
|
@ -2978,13 +2978,12 @@ void sh2_drc_wcheck_da(unsigned int a, int val, int cpuid)
|
|||
1 + cpuid, SH2_DRCBLK_DA_SHIFT, 0xfff);
|
||||
}
|
||||
|
||||
void sh2_execute(SH2 *sh2c, int cycles)
|
||||
int sh2_execute(SH2 *sh2c, int cycles)
|
||||
{
|
||||
int ret_cycles;
|
||||
sh2 = sh2c; // XXX
|
||||
|
||||
sh2c->cycles_aim += cycles;
|
||||
cycles = sh2c->cycles_aim - sh2c->cycles_done;
|
||||
sh2c->cycles_timeslice = cycles;
|
||||
|
||||
// cycles are kept in SHR_SR unused bits (upper 20)
|
||||
// bit19 contains T saved for delay slot
|
||||
|
@ -2998,7 +2997,7 @@ void sh2_execute(SH2 *sh2c, int cycles)
|
|||
if (ret_cycles > 0)
|
||||
dbg(1, "warning: drc returned with cycles: %d", ret_cycles);
|
||||
|
||||
sh2c->cycles_done += cycles - ret_cycles;
|
||||
return sh2c->cycles_timeslice - ret_cycles;
|
||||
}
|
||||
|
||||
#if (DRC_DEBUG & 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue