diff --git a/inc/n64_cp0.inc b/inc/n64_cp0.inc index 060acb7..ed188c5 100644 --- a/inc/n64_cp0.inc +++ b/inc/n64_cp0.inc @@ -44,6 +44,7 @@ constant CP0_STATUS_IM5($2000) // Interrupt Mask 5 (External) constant CP0_STATUS_IM6($4000) // Interrupt Mask 6 (External) constant CP0_STATUS_IM7($8000) // Interrupt Mask 7 (External) constant CP0_STATUS_IM_ALL($FF00) // all interrupt masks +constant CP0_STATUS_IM_WANTED($7F00) // FIXME: just the interrupts we can deal with // note that these are all masks. constant CP0_CAUSE_CODE($007C) // actually supposed to be called ExcCode diff --git a/inc/n64_util.inc b/inc/n64_util.inc index f82435e..e0e8630 100644 --- a/inc/n64_util.inc +++ b/inc/n64_util.inc @@ -20,7 +20,7 @@ macro SetIntMask() { sw t0, MI_INTR_MASK(a0) // careful not to touch unrelated flags here mfc0 t1, CP0_Status - lli t0, CP0_STATUS_IM_ALL + lli t0, CP0_STATUS_IM_WANTED or t1, t0 mtc0 t1, CP0_Status } diff --git a/kernel.asm b/kernel.asm index e74606f..e532a21 100644 --- a/kernel.asm +++ b/kernel.asm @@ -40,7 +40,7 @@ Start: // enable CPU interrupts. mfc0 t1, CP0_Status - ori t1, CP0_STATUS_IM_ALL | CP0_STATUS_IE + ori t1, CP0_STATUS_IM_WANTED | CP0_STATUS_IE mtc0 t1, CP0_Status // enable even more interrupts.