A multi-platform CHIP-8 emulator written in Kotlin. Supports Android, iOS, Desktop and Web.
Chip8 is an interpreted programming language that was initially designed for the COSMAC VIP computer. Kate allows you to run and play games or applications originally created for the Chip8 platform on your modern system.
Kate leverages Kotlin multiplatform to separate out the core
emulation logic in the common
module. All the target platforms then consume the common
module to render the
emulation output.
As of now, the frontend for android
, desktop
and web
is written
in Compose.
ios
frontend is written in SwiftUI.
This is fully extensible though, and you can contribute to add more frontends.
To get started with Kate, follow these steps:
-
Clone the Repository:
git clone https://github.com/ashishekka97/k8.git cd k8
-
Build Kate:
Open the project in IntelliJ IDEA to trigger the build process through
gradle
. Oncegradle
build is successful, you should automatically get run configurations forandorid
,desktop
andweb
.In order to build for
ios
, you must have a Mac setup with XCode installed. Open theios
module in XCode to automatically trigger the build process.You must build the project through
gradle
in the Intellij IDEA first before jumping to XCode, as IntelliJ will run the correspondinggradle
build files to producepods
and other dependencies forios
. -
Download Chip8 ROMs:
You'll need Chip8 ROMs to run with the emulator. These ROMs contain the programs and games you want to emulate. You can find a variety of Chip8 ROMs on the internet. Place them in a directory accessible to the emulator.
android
comes with a bunch of inbuilt rom files. -
Run Kate:
Select the run configuration from
android
,desktop
andweb
in IntelliJ and click Run. Forios
, just click run from XCode.
The usage of Kate is straightforward. You load a Chip8 ROM file using the inbuilt file picker, and the emulator provides a virtual environment in which the ROM can run. Use the controls mentioned below to interact with the emulator.
- Chip8 Compatibility: The emulator is designed to be compatible with most Chip8 programs and games.
- Keyboard and Sound Support: It emulates the original Chip8 input and sound system.
- Themes: There are a couple of retro inspired monochrome color schemes to change the display color.
The original Chip8 had a 16-key keypad. K8 for desktop
and web
maps these keys to your computer keyboard.
The mapping typically looks like this:
Original Chip8 Keypad Your Keyboard
1 2 3 C 1 2 3 4
4 5 6 D Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
On android
and ios
, there's a virtual keyboard rendered in the app.
Contributions from the open-source community are welcome. Feel free to submit bug reports, feature requests, or pull requests to help improve the emulator.
k8 (Kate) is licensed under the MIT License, which means you are free to use, modify, and distribute the software as long as you provide the appropriate attribution and include the license file.