| Copyright | (c) Rose 2019 |
|---|---|
| License | BSD3 |
| Maintainer | rose@lain.org.uk |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Lazyboy.IO
Description
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 Methods pack :: BackgroundPalette -> Word8 Source # | |
| Bitfield LCDControl Source # | |
Defined in Lazyboy.IO Methods 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.
Constructors
| LCDControl | |
Fields | |
Instances
| Bitfield LCDControl Source # | |
Defined in Lazyboy.IO Methods 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.
Constructors
| BackgroundPalette | |
Instances
| Bitfield BackgroundPalette Source # | |
Defined in Lazyboy.IO Methods 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.