mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
32x: drc: inline dispatcher and irq handling; do write-caused irqs
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@849 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
efd100fc0a
commit
e05b81fc5b
10 changed files with 535 additions and 246 deletions
|
@ -4,10 +4,19 @@
|
|||
struct Pico32x Pico32x;
|
||||
SH2 sh2s[2];
|
||||
|
||||
static void sh2_irq_cb(int id, int level)
|
||||
static int REGPARM(2) sh2_irq_cb(SH2 *sh2, int level)
|
||||
{
|
||||
// diagnostic for now
|
||||
elprintf(EL_32X, "%csh2 ack %d @ %08x", id ? 's' : 'm', level, sh2_pc(id));
|
||||
if (sh2->pending_irl > sh2->pending_int_irq) {
|
||||
elprintf(EL_32X, "%csh2 ack/irl %d @ %08x",
|
||||
sh2->is_slave ? 's' : 'm', level, sh2->pc);
|
||||
return 64 + sh2->pending_irl / 2;
|
||||
} else {
|
||||
elprintf(EL_32X, "%csh2 ack/int %d/%d @ %08x",
|
||||
sh2->is_slave ? 's' : 'm', level, sh2->pending_int_vector, sh2->pc);
|
||||
sh2->pending_int_irq = 0; // auto-clear
|
||||
sh2->pending_level = sh2->pending_irl;
|
||||
return sh2->pending_int_vector;
|
||||
}
|
||||
}
|
||||
|
||||
void p32x_update_irls(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue