mirror of
https://github.com/colby-swandale/waterfoul
synced 2025-01-27 19:58:31 +01:00
fix incorrect interrupt time and serving the correct interrupt
This commit is contained in:
parent
f7887b745e
commit
94984f5db4
1 changed files with 2 additions and 2 deletions
|
@ -131,13 +131,13 @@ module Waterfoul
|
||||||
end
|
end
|
||||||
|
|
||||||
def serve_interrupt
|
def serve_interrupt
|
||||||
interrupt = Interrupt.serve_interrupt
|
interrupt = Interrupt.pending_interrupt
|
||||||
# skip if there is no interrupt to serve
|
# skip if there is no interrupt to serve
|
||||||
return if interrupt == Interrupt::INTERRUPT_NONE
|
return if interrupt == Interrupt::INTERRUPT_NONE
|
||||||
# master disable interrupts
|
# master disable interrupts
|
||||||
@ime = false
|
@ime = false
|
||||||
push_onto_stack @pc
|
push_onto_stack @pc
|
||||||
@m = 10
|
@m = 20
|
||||||
# point to instruction which handles appropiate interrupt
|
# point to instruction which handles appropiate interrupt
|
||||||
case interrupt
|
case interrupt
|
||||||
when Interrupt::INTERRUPT_VBLANK
|
when Interrupt::INTERRUPT_VBLANK
|
||||||
|
|
Loading…
Add table
Reference in a new issue