GithubHelp home page GithubHelp logo

cyclonmaster / mega8-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyclonmaster-zz/mega8

0.0 1.0 0.0 1.52 MB

Mega/S/HiRes/Chip-8 Emulator in C/C++, OpenGL, SDL, wxWidgets

Home Page: http://www.ready4next.be/section-26/folder-3/27-08-2014-Let-s-talk-about-Emulation/

mega8-1's Introduction

Mega8

Mega/Super/HiRes/Chip-8 Emulator in C/C++, OpenGL, SDL, wxWidgets. I made it just to see if I was capable of doing an emulator and to learn how OpenGL/wxWidgets works. You can use the source as you want, but if you use the source, it would be kind to add a reference to me somewhere in your project ;-). It has been coded with Code::Blocks 13.12, gcc 4.8.1 on Linux Mint 16, it should compile as well on other systems, be aware that you must have:

- Code::Blocks, since it has a .cbp project file, but you can choose
  the IDE you like;
- wxWidgets 3.0.1 development files;
- OpenGL Support in wxWidget (wxGLCanvas);
- SDL2 and SDL_Mixer;
- C++11 std support(I use Chrono from std, not from libboost)

HOW TO USE

COMPILE

After adding the required libs to your system, you can compile with Code::Block or simply type in your shell

./configure
make
cd bin/Release
./Mega8

Makefile created by cbp2mak & autotools.

KEYBOARD

Keyboard is binded like this :

Original CHIP-8 Keypad              PC Numpad

1 | 2 | 3 | C                7  | 8 |   9   | DEL
--+---+---+--               ----+---+-------+--
4 | 5 | 6 | D                4  | 5 |   6   | ADD
--+---+---+--               ----+---+-------+--
7 | 8 | 9 | E                1  | 2 |   3   | SUB
--+---+---+--               ----+---+-------+--
A | 0 | B | F               MUL | 0 | ENTER | DIV

This can't be changed right now, that can make some games horrible to play, because some games don't use the same keys to move... Some uses 4-8-6-2 (Astrododge), others 1-5-3-2, ... You can check the keyboard at anytime by pressing 'K'.

GRAPHICS

It uses OpenGL for rendering, it's quite fast. You can use texture filtering to make it look less like 'Minecraft' by pressing 'L' ;-). You can change the display size freely or you can make it x1, x2,... of the original resolution. To ENTER fullscreen mode, just press 'F'. To display some informations, just type 'H' (the HUD can make a huge drop down to the actual FPS... at least on my old system).

SPEED

Since all documents I've found are unclear about the real frequency of the chip, I'm basing on the clock speed from the COSMAC VIP, about 1.76 Khz. But you can press CTRL+/- to change the speed from 44 Hz to 1.8 Mhz (from 1/20x up to 1024x). When you change the frequency, the base clock stays still @60Hz (Delay and sound), but you can make it follow the actual frequency you've set by pressing 'S'.

SOUND

Chip-8/SChip-8: SDL_Mixer is used to play a simple beep at 440Hz MChip8: Full support for sound, check Twister Demo ;-)

NOTES

This emulator is still in development because I want to add some more features to it, like:

- ~~Mega-Chip support~~ Done !
- Mega-Chip small modifications I have in mind;
- CDP1802 opcodes;
- Support for hybrid Chip-8 roms;
- Input configuration;
- ~~Better sound support (actually a wav file is played for beep)~~ Done !
- Internationalization support;
- Load/Save State;
- Screenshot or video.

NOTES 2

Sorry for the french comments in source files ! I'll change them if I have time. For more credits check the About menu !

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.