Giter Site home page Giter Site logo

chip8's Introduction

Hello humans! I'm aCube!

Hi! I'm a brazillian programmer. I've been involved with game development since 2020, I started with Lua in a Fantasy-Computer called TIC-80. I like game development and low-level coding, my interests are C and C++, as you see on my profile. I'm not open to web development (I really hate it).

Profile Views

C C++ Lua Godot
linux git vim

aCube's Github Stats Top Languages

Do you want to reach me?


chip8's People

Contributors

acube1 avatar

Stargazers

 avatar

Watchers

 avatar

chip8's Issues

Use strlen to fetch string length

Only do memcpy until strlen of args[] do this check what is smaller the strlen result or MAX_FILEPATH_SIZE:

memcpy(config->rom_filepath, argv[context.index], MAX_FILEPATH_SIZE);

Instead of use MAX_FILEPATH_SIZE a better approach would be use strlen to set the string termination (\0) at the end of config->rom_filepath:

config->rom_filepath[MAX_FILEPATH_SIZE - 1] = '\0';

Because the strlen will return the real string length make the termination really meaningful.

Add audio

Add beep audio which is played when the sound timer is greater than 0.

Add Chip8 Instructions

  • 00E0 - CLS | Clear the display.
  • 00EE - RET | Return from a subroutine.
  • 1NNN - JMP | Jump to location NNN.
  • 2NNN - CALL | Call subroutine at NNN.
  • 3xkk - SE | Skip next instruction if Vx == kk.
  • 4xkk - SNE | Skip next instruction if Vx != kk.
  • 5xy0 - SEREG | Skip next instruction if Vx == Vy.
  • 6xkk - LDIMM | Set Vx = kk.
  • 7xkk - ADDIMM | Set Vx = Vx + kk.
  • 8xy0 - LDV | Set Vx = Vy.
  • 8xy1 - OR | Set Vx = Vx OR Vy.
  • 8xy2 - AND | Set Vx = Vx AND Vy.
  • 8xy3 - XOR | Set Vx = Vx XOR Vy.
  • 8xy4 - ADD | Set Vx = Vx + Vy, set VF = carry.
  • 8xy5 - SUB | Set Vx = Vx - Vy, set VF = NOT borrow.
  • 8xy6 - SHR | Set Vx = Vx SHR 1.
  • 8xy7 - SUBN | Set Vx = Vy - Vx, set VF = NOT borrow.
  • 8xyE - SHL | Set Vx = Vx SHL 1.
  • 9xy0 - SNEREG | Skip next instruction if Vx != Vy.
  • ANNN - LDI | Set Index Register to NNN.
  • BNNN - JMPREG | Jump to location NNN + V0.
  • Cxkk - RND | Set Vx = random byte AND kk.
  • DxyN - DRAW | Display N-byte sprite starting at memory location I at (Vx, Vy), set VF = collision.
  • Ex9E - SKEY | Skip next instruction if key with the value of Vx is pressed.
  • ExA1 - SNKEY | Skip next instruction if key with the value of Vx is not pressed.
  • Fx07 - RDELAY | Set Vx = delay timer value.
  • Fx0A - WAITKEY | Wait for a key press, store the value of the key in Vx.
  • Fx15 - WDELAY | Set delay timer = Vx.
  • Fx18 - WSOUND | Set sound timer = Vx.
  • Fx1E - ADDI | Set I = I + Vx.
  • Fx29 - LDSPRITE | Set I = location of sprite for digit Vx.
  • Fx33 - STBCD | Store BCD representation of Vx in memory locations I, I+1, and I+2.
  • Fx55 - STREG | Store registers V0 through Vx in memory starting at location I.
  • Fx65 - LDREG | Read registers V0 through Vx from memory starting at location I.

Add README file.

For now this project doesn't have any documentation.

Add documentation for:

  • Building.
  • Command-line arguments.

Add keyboard controlling.

Update cpu keystate using key maps.

Default mapping(scancode):

1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F
1 2 3 4
Q W E R
A S D F
Z X C V

Fix 8xy6 and 8xyE opcodes.

Using the test_suite rom in the roms/demos directory.
The X in the 8xy6 and 8xyE means that the opcode isn't working properly
image

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.