From Wikipedia: "CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker made on his 1802 Microprocessor. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for these computers. The simplicity of CHIP-8, and its long history and popularity, has ensured that CHIP-8 emulators and programs are still being made to this day."
This is an attempt to write a full emulator able to run in Emacs.
Install the stable version using straight from MELPA
(straight-use-package chip8)
Install the development version using straight
(straight-use-package
'(chip8 :type git :host github :repo "gabrielelana/chip8.el"))
Manually
- Clone this repository
git clone https://github.com/gabrielelana/chip8.el
- Inside of Emacs open
chip8.el
file, evaluate buffer with M-x eval-buffer or better, if you have native compilation available, M-x emacs-lisp-native-compile-and-load
- Emacs >= 28.1
- Emacs running in a graphical environment (not in a terminal).
- Emacs with native compilation support.
- You need to have installed on your system Kreative Square SM font.
To play games you need ROMs, you can find some of them in this repository
After chip8.el
is loaded (see How to
install)
you run M-x chip8 then Emacs will ask you the file of the ROM to run.
Chip-8 has many extensions and quirks mode, if the ROM doesn't run correctly, then you can choose to run a specific version of the emulator with the following commands.
- M-x chip8-original
- M-x chip8-modern
- M-x chip8-superchip
- M-x chip8-xo-chip
Because Emacs can do anything, so why not.
I've experimented for a while on how to do retro graphic in Emacs to implement simple games, this led to a library capable to implement 2D retro games with decent frame rate and resolution.
Since the library is not ready to be released, I've vendored only the necessary code in the emulator.
In the future, when (if?) the library will be release I will remove the code and have the library as requirement for the emulator.
Need to implement some XO-Chip features