removed unused Interrupt.serve_interrupt

This commit is contained in:
Colby 2016-07-21 18:08:48 +10:00
parent 91f3a27fe2
commit c2357e31fd

View file

@ -17,25 +17,6 @@ module Waterfoul
$mmu.write_byte IF_REG_MEM_LOC, (if_reg | interrupt)
end
def self.serve_interrupt
if_reg = $mmu.read_byte IF_REG_MEM_LOC
interrupt = self.pending_interrupt
case interrupt
when INTERRUPT_VBLANK
$mmu.write_byte IF_REG_MEM_LOC, (if_reg & 0xFE)
when INTERRUPT_LCDSTAT
$mmu.write_byte IF_REG_MEM_LOC, (if_reg & 0xFD)
when INTERRUPT_TIMER
$mmu.write_byte IF_REG_MEM_LOC, (if_reg & 0xFB)
when INTERRUPT_SERIAL
$mmu.write_byte IF_REG_MEM_LOC, (if_reg & 0xF7)
when INTERRUPT_JOYPAD
$mmu.write_byte IF_REG_MEM_LOC, (if_reg & 0xEF)
end
interrupt
end
def self.pending_interrupt
ie_reg = $mmu.read_byte IE_REG_MEM_LOC
if_reg = $mmu.read_byte IF_REG_MEM_LOC