Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soupi/chip-8
A CHIP-8 Emulator written in Haskell
https://github.com/soupi/chip-8
chip-8 emulation emulator functional haskell sdl2
Last synced: about 1 month ago
JSON representation
A CHIP-8 Emulator written in Haskell
- Host: GitHub
- URL: https://github.com/soupi/chip-8
- Owner: soupi
- License: bsd-3-clause
- Created: 2015-08-09T18:33:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-05T11:57:27.000Z (about 7 years ago)
- Last Synced: 2024-04-24T02:56:04.500Z (8 months ago)
- Topics: chip-8, emulation, emulator, functional, haskell, sdl2
- Language: Haskell
- Homepage:
- Size: 1.03 MB
- Stars: 36
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HIP-8
=====A purely functional toy emulator for the CHIP-8 system written in Haskell
![](chip8.gif)
### Videos
> - [Playing Pong on Youtube](https://www.youtube.com/watch?v=8gVS-433w8g)
> - [Playing Tetris on Youtube](https://www.youtube.com/watch?v=WzFXH5XzN7A)### Controls:
The key mapping for the chip-8 is a bit... different. the key mapping is represented in the following code:
```hs
keyMapping :: [(Int, SDL.Scancode)]
keyMapping =
[(0x1, SDL.Scancode1)
,(0x2, SDL.Scancode2)
,(0x3, SDL.Scancode3)
,(0x4, SDL.ScancodeQ)
,(0x5, SDL.ScancodeW)
,(0x6, SDL.ScancodeE)
,(0x7, SDL.ScancodeA)
,(0x8, SDL.ScancodeS)
,(0x9, SDL.ScancodeD)
,(0x0, SDL.ScancodeX),(0xa, SDL.ScancodeZ)
,(0xb, SDL.ScancodeC)
,(0xc, SDL.Scancode4)
,(0xd, SDL.ScancodeR)
,(0xe, SDL.ScancodeF)
,(0xf, SDL.ScancodeV)
]
```