clear the bottom bits of IF properly

This commit is contained in:
Matthew Berry 2021-05-14 23:41:49 -07:00
parent a8ed1e7f6b
commit 8ccb8cb31b

View file

@ -41,7 +41,7 @@ module GBA
case io_addr
when 0x200 then @reg_ie.value = (@reg_ie.value & 0xFF00) | value
when 0x201 then @reg_ie.value = (@reg_ie.value & 0x00FF) | value.to_u16 << 8
when 0x202 then @reg_if.value &= ~value
when 0x202 then @reg_if.value &= ~value.to_u16
when 0x203 then @reg_if.value &= ~(value.to_u16 << 8)
when 0x208 then @ime = bit?(value, 0)
when 0x209 # ignored