diff options
| author | LLLL Colonq <llll@colonq> | 2025-06-01 19:07:25 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-06-01 19:07:25 -0400 |
| commit | 4bc8bd58e6f9a6ca509d4e6869ba10c65145775d (patch) | |
| tree | 5bc97cc01e737f9cacba1f7c13570ce7846acf36 /fig-emulator-gb/src/Fig/Emulator/GB/Component/Interrupt.hs | |
| parent | f95d9bbde51ee26468177b2d34c669d9689fbea4 (diff) | |
Remove fig-emulator-gb
Diffstat (limited to 'fig-emulator-gb/src/Fig/Emulator/GB/Component/Interrupt.hs')
| -rw-r--r-- | fig-emulator-gb/src/Fig/Emulator/GB/Component/Interrupt.hs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/fig-emulator-gb/src/Fig/Emulator/GB/Component/Interrupt.hs b/fig-emulator-gb/src/Fig/Emulator/GB/Component/Interrupt.hs deleted file mode 100644 index f6ea420..0000000 --- a/fig-emulator-gb/src/Fig/Emulator/GB/Component/Interrupt.hs +++ /dev/null @@ -1,33 +0,0 @@ -module Fig.Emulator.GB.Component.Interrupt where - -import Fig.Prelude - -import Fig.Emulator.GB.Utils -import Fig.Emulator.GB.Bus - -newtype InterruptError = InterruptError Text - deriving Show -instance Exception InterruptError -instance Pretty InterruptError where - pretty (InterruptError b) = mconcat - [ "interrupt error: " - , b - ] - -compInterrupt :: Component -compInterrupt = Component - { compState = () - , compMatches = \a -> a == 0xff0f || a == 0xffff - , compUpdate = \s _ -> pure s - , compWrite = \s (Addr a) v -> do - case a of - 0xff0f -> do - -- log $ "set IF:" <> show8 v - pure () - 0xffff -> do - -- log $ "set IE:" <> show8 v - pure () - _ -> throwM . InterruptError $ "write to invalid address: " <> pretty (Addr a) - pure s - , compRead = \_ _ -> pure 0x00 - } |
