module Nes.Interrupt (
InterruptStatus (..),
IRQSource (..),
) where
data IRQSource = BRK | DMC | FrameCounter deriving (IRQSource -> IRQSource -> Bool
(IRQSource -> IRQSource -> Bool)
-> (IRQSource -> IRQSource -> Bool) -> Eq IRQSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IRQSource -> IRQSource -> Bool
== :: IRQSource -> IRQSource -> Bool
$c/= :: IRQSource -> IRQSource -> Bool
/= :: IRQSource -> IRQSource -> Bool
Eq, Int -> IRQSource -> ShowS
[IRQSource] -> ShowS
IRQSource -> String
(Int -> IRQSource -> ShowS)
-> (IRQSource -> String)
-> ([IRQSource] -> ShowS)
-> Show IRQSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IRQSource -> ShowS
showsPrec :: Int -> IRQSource -> ShowS
$cshow :: IRQSource -> String
show :: IRQSource -> String
$cshowList :: [IRQSource] -> ShowS
showList :: [IRQSource] -> ShowS
Show)
data InterruptStatus = MkIS
{ InterruptStatus -> Maybe IRQSource
irq :: {-# UNPACK #-} !(Maybe IRQSource)
, InterruptStatus -> Bool
nmi :: {-# UNPACK #-} !Bool
}