feat: initial version

This commit is contained in:
Zoëy Noort 2025-05-05 18:50:56 +02:00
parent 0a67fb21d1
commit ee790e99d6
12 changed files with 798 additions and 0 deletions

25
srcs/main.c Normal file
View file

@ -0,0 +1,25 @@
#include <stdio.h>
#include "../hdrs/chip8.h"
int main(int argc, char **argv)
{
if (argc != 2)
{
fprintf(stderr, "Usage: %s <rom.ch8>\n", argv[0]);
return (1);
}
t_chip8 emu;
chip8_init(&emu);
if (chip8_load_rom(&emu, argv[1]) == 1)
{
fprintf(stderr, "Failed to load rom: %s\n", argv[1]);
return (1);
}
chip8_run(&emu);
return (0);
}