-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | DCPU-16 Emulator & Assembler -- -- DCPU-16 Emulator & Assembler @package dcpu16 @version 0.1.0.2 module Dcpu16.Cpu screenWidth :: Int screenHeight :: Int screenScale :: Int gfxStart :: Int spritesStart :: Int spriteCount :: Int inputStart :: Int inputMaxCount :: Int memorySize :: Int data Reg RegA :: Reg RegB :: Reg RegC :: Reg RegX :: Reg RegY :: Reg RegZ :: Reg RegI :: Reg RegJ :: Reg RegPC :: Reg RegSP :: Reg RegEx :: Reg data CpuState CpuState :: IOVector Word16 -> IOVector Word16 -> CpuState [memory] :: CpuState -> IOVector Word16 [regs] :: CpuState -> IOVector Word16 data Instr Set :: Instr Add :: Instr Sub :: Instr Mul :: Instr Div :: Instr Mod :: Instr Shl :: Instr Shr :: Instr And :: Instr Bor :: Instr Xor :: Instr Ife :: Instr Ifn :: Instr Ifg :: Instr Ifb :: Instr Jsr :: Instr Dat :: Instr data Value ValueReg :: Reg -> Value ValueAddrReg :: Reg -> Value ValueAddrRegPlus :: Reg -> Word16 -> Value ValuePop :: Value ValuePeek :: Value ValuePush :: Value ValueSP :: Value ValuePC :: Value ValueO :: Value ValueAddr :: Word16 -> Value ValueLit :: Word16 -> Value ValueSymLit :: Word16 -> Value type InstrItem = (Instr, Value, Value) regCount :: Int newCpu :: IO CpuState readMemory :: CpuState -> Int -> IO Word16 writeMemory :: CpuState -> Int -> Word16 -> IO () readRegister :: CpuState -> Reg -> IO Word16 writeRegister :: CpuState -> Reg -> Word16 -> IO () incPC :: CpuState -> IO Word16 parseInstrParts :: Word16 -> (Word16, Word16, Word16) withNextWord :: CpuState -> (Word16 -> a) -> IO a readValue :: CpuState -> Word16 -> IO Value readInstr :: CpuState -> IO InstrItem getValue :: CpuState -> Value -> IO Word16 setValue :: CpuState -> Value -> Word16 -> IO () evalInstr :: CpuState -> InstrItem -> IO () evalArithInstr :: CpuState -> Value -> Value -> (Int -> Int -> (Int, Int)) -> IO () evalIfInstr :: CpuState -> Value -> Value -> (Word16 -> Word16 -> Bool) -> IO () writeMemoryData :: CpuState -> Vector Word16 -> IO () runNextInstruction :: CpuState -> IO () instance GHC.Show.Show Dcpu16.Cpu.Value instance GHC.Enum.Enum Dcpu16.Cpu.Instr instance GHC.Show.Show Dcpu16.Cpu.Instr instance GHC.Enum.Enum Dcpu16.Cpu.Reg instance GHC.Enum.Bounded Dcpu16.Cpu.Reg instance GHC.Show.Show Dcpu16.Cpu.Reg module Dcpu16.Dumper dump :: CpuState -> IO () module Dcpu16.Video data SpriteMode SpriteMode :: Int -> Int -> Int -> SpriteMode [width] :: SpriteMode -> Int [height] :: SpriteMode -> Int [bitsPerPixel] :: SpriteMode -> Int spriteModes :: [SpriteMode] pallete :: Vector Word32 writeTexturePixel :: IOVector Word32 -> Int -> Int -> Word16 -> IO () drawBgPixel :: CpuState -> IOVector Word32 -> Int -> Int -> IO () drawBg :: CpuState -> IOVector Word32 -> IO () drawSprites :: CpuState -> IOVector Word32 -> IO () drawSprite :: CpuState -> IOVector Word32 -> Int -> IO () updateScreen :: CpuState -> IOVector Word32 -> IO () module Dcpu16.Assembler.Syntax data AValue AValue :: Value -> AValue AValueSym :: String -> AValue AValueSymAddr :: String -> AValue AValueSymAddrPlusLit :: String -> Word16 -> AValue AValueSymAddrPlusReg :: String -> Reg -> AValue data AInstr AInstr :: Instr -> AValue -> AValue -> AInstr AInstrDat :: [Word16] -> AInstr AInstrLabel :: String -> AInstr valueSize :: Value -> Int asmValueSize :: AValue -> Int asmInstrSize :: AInstr -> Int instance GHC.Show.Show Dcpu16.Assembler.Syntax.AInstr instance GHC.Show.Show Dcpu16.Assembler.Syntax.AValue module Dcpu16.Assembler.Parser parseString :: String -> [AInstr] parseFile :: FilePath -> IO [AInstr] module Dcpu16.Assembler compileFile :: FilePath -> FilePath -> IO () compileFileToVec :: FilePath -> IO (Vector Word16) compileInstructions :: [AInstr] -> IO (Vector Word16) module Dcpu16.Emulator newEmulator :: IO Emulator loadBinaryProgram :: Emulator -> FilePath -> IO () loadAsmProgram :: Emulator -> FilePath -> IO () runEmulatorLoop :: Emulator -> IO () module Dcpu16