This commit is contained in:
2025-07-12 15:22:23 +02:00
parent ba170f2aae
commit 2a69d37f8e
4 changed files with 32 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
// http://devernay.free.fr/hacks/chip8/C8TECH10.HTM
// TODO: buzzer
#include <raylib.h>
#include <stdint.h>
#include <stdio.h>
@@ -68,10 +67,10 @@ CHIP8 chip8_create() {
void chip8_disassemble(CHIP8 *c, size_t ins_count) {
for (size_t i = 0; i < ins_count; i++) {
READ_INS();
printf("0x%x: ", c->pc);
READ_INS();
switch ((ins >> 12) & 0xF) {
case 0x0: {
switch (nnn) {
@@ -212,6 +211,7 @@ void chip8_step(CHIP8 *c) {
}
if (c->sound_timer > 0) {
c->sound_timer--;
// TODO: buzzer
}
READ_INS();