Code Monkey home page Code Monkey logo

go-8's Introduction

CircleCI

go-8

A chip-8 emulator written in Go. I am trying to learn go-lang for fun and I have always been fascinated with emulators, so I decided to write one in Go. I am using the following manual as reference.

You'll need the drivers required by ebiten and you can find the relevant installation instructions here.

I wrote a blog post about this project which you can find here

Screen Shot

Test Instructions

- git clone http://github.com/h4ck3rk3y/go-8
- cd go-8
- go get -v -t -d ./...
- go test --cover

Build Instructions

You can build the program by

- git clone http://github.com/h4ck3rk3y/go-8
- cd go-8
- go get -v -t -d ./...
- go build main.go cpu.go

Run Instructions

Build the code and then

- ./main

Key Configuration

The original chip-8 consisted of a hexa decimal gamepad. I use the following mappings.

  • Your Key Board --> Chip 8
  • 1 --> 1
  • 2 --> 2
  • 3 --> 3
  • 4 --> C
  • Q --> 4
  • W --> 5
  • E --> 6
  • R --> D
  • A --> 7
  • S --> 8
  • D --> 9
  • F --> E
  • Z --> A
  • X --> 0
  • C --> B
  • V --> F

To Do

  • Make roms passable as command line arguments
  • Key board mapping in a configuration file
  • Configurable colors
  • Better unit tests for main.go. cpu.go has 98.8% coverage but overall the coverage drops significantly

go-8's People

Contributors

h4ck3rk3y avatar hajimehoshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-8's Issues

0xF00A Doesn't Really Work

I was trying the emulator with space invaders it waits for a key press on game-over but the main loop gets stuck

Error: package alsa not found

Output:
# pkg-config --cflags -- alsa Package alsa was not found in the pkg-config search path. Perhaps you should add the directory containing 'alsa.pc' to the PKG_CONFIG_PATH environment variable No package 'alsa' found pkg-config: exit status 1

Steps to reproduce :


I think it's mainly because of github.com/hajimehoshi/ebiten/audio package. Most probably it's broken now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.