Skip to content

Commit

Permalink
Replace white with terminal green and update frontpage README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paulopacitti committed Jan 9, 2023
1 parent 24cb5d2 commit 94b0c6c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# chip-r
- A CHIP-8 emulator built with rust
- Based on https://github.com/aquova/chip8-book
- Test ROMs: https://www.zophar.net/pdroms/chip8/chip-8-games-pack.html
# chip-r 🎱
>
_"[...] maybe the games don’t have to be more complex, they need to be simple and pleasing. That’s where the sweet spot is!"_ - Allan Alcorn

![](https://raw.githubusercontent.com/paulopacitti/chip-r/main/docs/screenshot.png)

- A simple (with hidden bugs 👀) [CHIP-8](https://en.wikipedia.org/wiki/CHIP-8) emulator built with **rust**.
- Tested on `macos`, but since it uses `sdl2` it can be compiled to multiple targets.

### Usage
- Compile `core`: `cd core && cargo build`
- Compile and **run** the emulator: `cd frontend && cargo run <path-to-rom>`

### Resources
- I've built this to learn about emulation development and learn more about `rust`. Here's the guide that helped me through this journey: https://github.com/aquova/chip8-book
- `CHIP-8` op codes cheatsheet: http://devernay.free.fr/hacks/chip8/C8TECH10.HTM
- Some `CHIP-8` ROMs are available here: https://www.zophar.net/pdroms/chip8/chip-8-games-pack.html
Binary file added docs/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn draw_screen(emu: &Emulator, canvas: &mut Canvas<Window>) {
canvas.clear();

let screen_buffer = emu.get_display();
canvas.set_draw_color(Color::RGB(255, 255, 255));
canvas.set_draw_color(Color::RGB(0, 255, 0));
for (i, pixel) in screen_buffer.iter().enumerate() {
if *pixel {
// Convert our 1D array's index into a 2D (x,y) position
Expand Down

0 comments on commit 94b0c6c

Please sign in to comment.