Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gsamokovarov/chip8.c
Simple CHIP-8 interpreter.
https://github.com/gsamokovarov/chip8.c
Last synced: about 2 months ago
JSON representation
Simple CHIP-8 interpreter.
- Host: GitHub
- URL: https://github.com/gsamokovarov/chip8.c
- Owner: gsamokovarov
- License: mit
- Created: 2013-04-06T08:06:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-12T12:25:23.000Z (almost 11 years ago)
- Last Synced: 2024-01-29T05:02:34.988Z (5 months ago)
- Language: C
- Homepage:
- Size: 1.19 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
- License: LICENSE
Lists
- AwesomeInterpreter - chip8.c
README
!http://f.cl.ly/items/2U2t3t1o2v361g001H1F/c8-logo.png!
bq. CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker. Initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s, it allowed video games to be easily programmable.
!https://raw.github.com/gsamokovarov/chip8.c/master/.chip8.png!
h2. Build
The project uses CMake as a build system and has the following dependencies:
* SDL (required, version >= 1.2.0)
* SDL_mixer (required, version >= 1.2.0)
* ncurses (optional)To build the project, be sure to have CMake installed and run:
cmake .
makeHowever, running @cmake .@ at the project root directory will result in a lot of cruft files needed by the CMake build process. If you plan to hack on the project, a better idea is to run:
cd build
cmake ..
makeThat will keep the CMake specific files in a convenient location, so they can be easily pruned. Once @make@ has been run, use @sudo make install@ to install it.
h2. Install
Installing source packages with @make install@ is not always a great idea. If you are running some Unix flavour you may want to utilize your system packaging tools. An utility named "CheckInstall":http://asic-linux.com.mx/~izto/checkinstall/ is pretty convenient in those situations. You can use it to generate and install a package, that is suitable for you. This package will be named @chip8.c@ and will be easily uninstallable through your package system.
I'm going to guide you through the process of installing "CheckInstall":http://asic-linux.com.mx/~izto/checkinstall/ on Ubuntu Linux. The process will be similar for other Linux distributions or your favorite Unix-like operating system.
h3. CheckInstall
On Ubuntu Linux "CheckInstall":http://asic-linux.com.mx/~izto/checkinstall/ is not installed by the default and you can install it with:
sudo apt-get install checkinstallAsuming that you have already built the project in the @build@ directory, run:
sudo checkinstall --pkgname=chip8.cJust follow the instructions and if everything went successful, you should see a message like the following:
**********************************************************************Done. The new package has been installed and saved to
/home/user/chip8.c/build/chip8.c_20130428-1_amd64.deb
You can remove it from your system anytime using:
dpkg -r chip8.c
**********************************************************************
h2. Usage
Usage: chip8 [OPTION...] FILE...Options:
-s, --sdl use SDL for input and output (default)
-t, --terminal use the terminal for output (experimental)
-n, --ncurses use ncurses for output (experimental)h3. sdl
SDL is the default backend, you don't need to explicitly specify it. It uses the "SDL":http://www.libsdl.org library to display the CHIP-8 graphics and feed it with input from the keyboard.
The CHIP-8 uses a hexadecimal keyboard, which maps rather well to the layout of the current generation keyboard numeric pad.
|| C | D | E |
| 1 | 2 | 3 |/2. F |
| 4 | 5 | 6 |
| 7 | 8 | 9 |/2. B |
|\2. A | 0 |Use following keys to reset or quit the emulator.
|_. Key |_. Action |
| Backspace | Reset |
| Escape | Quit |This is the only backend that supports input.
h3. terminal
The terminal backend uses escape symbols to render dynamic content straight to the terminal. It requires a terminal that is at least 64x32 to render the content correctly.
h3. ncurses
The ncurses backend uses the ncurses library to display dynamic content to the terminal. It is faster than the @--terminal@ backend, but requires the use of an external (ncurses) library.
h2. Games
The following games are distributed with the interpreter:
* 15PUZZLE
* BLINKY
* BLITZ
* BRIX
* CAVE
* CONNECT4
* GUESS
* HIDDEN
* INVADERS
* KALEID
* MAZE
* MERLIN
* MISSILE
* PONG
* PONG2
* PUZZLE
* SYZYGY
* TANK
* TETRIS
* TICTAC
* UFO
* VBRIX
* VERS
* WALL
* WIPEOFFYou can find them in the @roms@ folder.
h2. License
The code is available under the MIT license.