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