GithubHelp home page GithubHelp logo

chip8-emulator-ncurses's Introduction

Chip-8 Emulator in Terminal

参考 https://austinmorlan.com/posts/chip8_emulator/ 实现的 Chip-8 模拟器。

主要不同点:

  • 在 terminal 中运行(使用 ncurses 库)
  • 增加了 ROM 的选择页,并自带了一些 ROM 文件
  • (可能)更详细的注释

ROM 来自于 corax89/chip8-test-romdmatlack/chip8,版权归原作者。

Build and Run

编译需要用到 ncurses 库和支持 c++17 的 g++

Tested on Linux 20.04:

$ sudo apt install g++ libncurses5-dev
$ make run

make help 查看帮助菜单

Usage

  1. 运行时可以指定每个 cycle 的时延(即模拟器速度),默认为 3ms,然而实际上速度也受限于终端打印字符的速度
$ ./chip8_emulator [delay_in_ms]
  or
$ make run t=[delay_in_ms]
  1. 终端至少需要 H64 * W32 的大小,为了更好的显示效果,可以适当减小行间距
  2. 运行中任何时候都可以按 ESC 退出
  3. 在 ROM 选择界面用上下键选择、 ENTER 确认
  4. 按键映射沿用了所参考网页的配置,如下:
 Chip-8       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|

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.