Implementation of Notch's dcpu-16 CPU in Haskell.
- Basic infrastructure of the emulator
- Command line interface
- Test suite
- Assembler
- Debugger interface (tui, breakpoints, inspect/change memory and registers, disassemble, etc)
- Peripherals (video, keyboard, serial interface, etc)
- Cycle accurate simulation?
stack build
There's no user interface yet, so fire up GHCi...
stack repl
...and load the example:
ghci> import qualified Data.ByteString as B
ghci> import Control.Monad.Trans
ghci> import Control.Monad
ghci> readProgram = lift . B.readFile $ "examples/32-bit-add.hex"
ghci> runIOComputer (readProgram >>= loadProgram >> replicateM_ 5 execInstruction >> dumpMachine >>= lift . putStr) newIOComputer