blob: be15e56c83901781921eae25c359bf34adcfbb6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
module Fig.Emulator.GB.Component.Misc where
import Fig.Prelude
import Fig.Emulator.GB.Utils
import Fig.Emulator.GB.Bus
newtype MiscError = MiscError Text
deriving Show
instance Exception MiscError
instance Pretty MiscError where
pretty (MiscError b) = mconcat
[ "misc component error: "
, b
]
compMisc :: Component
compMisc = Component
{ compState = ()
, compMatches = (== 0xff4d)
, compUpdate = \s _ -> pure s
, compWrite = \s _ _ -> pure s
, compRead = \_ _ -> pure 0x00
}
|