diff options
| author | LLLL Colonq <llll@colonq> | 2024-05-10 15:16:34 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-05-10 15:16:34 -0400 |
| commit | b677a422d3d434a45e9dcdc189c40f8224cc8dc8 (patch) | |
| tree | 4d2d9147b33768d04f39ee1db73eeaa780946bb7 /fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs | |
| parent | 5beb06e0f9618930b17500da29cb37ecd9690ed7 (diff) | |
fig-emulator-gb: Profiling the PPU
Diffstat (limited to 'fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs')
| -rw-r--r-- | fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs b/fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs index 1c64dfd..f0c461f 100644 --- a/fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs +++ b/fig-emulator-gb/src/Fig/Emulator/GB/Bus.hs @@ -22,14 +22,14 @@ instance Pretty Addr where data Component = forall (s :: Type). Component { compState :: s , compMatches :: Addr -> Bool - , compUpdate :: s -> Int -> IO s + , compUpdate :: s -> Word16 -> IO s , compWrite :: s -> Addr -> Word8 -> IO s , compRead :: s -> Addr -> IO Word8 } newtype Bus = Bus { busComponents :: [Component] } -update :: Int -> Bus -> IO Bus +update :: Word16 -> Bus -> IO Bus update t b = Bus <$> forM (busComponents b) \Component{..} -> do s <- compUpdate compState t pure Component { compState = s, ..} |
