Copyright | (c) Rose 2019 |
---|---|
License | BSD3 |
Maintainer | rose@lain.org.uk |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
This module defines IO and primitive graphics operations for Lazyboy.
Synopsis
- class Bitfield a where
- data Color
- data LCDControl = LCDControl {}
- defaultLCDControl :: LCDControl
- disableLCD :: Lazyboy ()
- setLCDControl :: LCDControl -> Lazyboy ()
- data BackgroundPalette = BackgroundPalette {}
- defaultPalette :: BackgroundPalette
- setBackgroundPalette :: BackgroundPalette -> Lazyboy ()
- byte :: Register8 -> Word8 -> Lazyboy ()
- write :: Location -> Word8 -> Lazyboy ()
- memcpy :: Location -> Location -> Word8 -> Lazyboy ()
- memset :: Location -> Word8 -> Word8 -> Lazyboy ()
- onVblank :: Lazyboy () -> Lazyboy ()
Documentation
class Bitfield a where Source #
A typeclass for packing types into Word8.
Instances
Bitfield BackgroundPalette Source # | |
Defined in Lazyboy.IO pack :: BackgroundPalette -> Word8 Source # | |
Bitfield LCDControl Source # | |
Defined in Lazyboy.IO pack :: LCDControl -> Word8 Source # | |
Bitfield Color Source # | |
A type representing the monochrome shades available on the hardware.
data LCDControl Source #
A type representing the LCD screen control state.
Instances
Bitfield LCDControl Source # | |
Defined in Lazyboy.IO pack :: LCDControl -> Word8 Source # |
defaultLCDControl :: LCDControl Source #
The default LCDControl state - all flags set to False (0). In effect, this turns the screen off.
disableLCD :: Lazyboy () Source #
A convenience function which executes setLCDControl with the defaultLCDControl state. This turns the screen off.
setLCDControl :: LCDControl -> Lazyboy () Source #
Sets the LCD control state to a given value.
data BackgroundPalette Source #
A type representing the background palette.
Instances
Bitfield BackgroundPalette Source # | |
Defined in Lazyboy.IO pack :: BackgroundPalette -> Word8 Source # |
defaultPalette :: BackgroundPalette Source #
The default monochrome background palette.
setBackgroundPalette :: BackgroundPalette -> Lazyboy () Source #
Sets the background palette to a given palette.
memcpy :: Location -> Location -> Word8 -> Lazyboy () Source #
Copy a region of memory (limit 255 bytes) to a destination.