diff --git a/cli/assets/beep.mp3 b/cli/assets/beep.mp3 new file mode 100644 index 0000000..cd3a3ec Binary files /dev/null and b/cli/assets/beep.mp3 differ diff --git a/cli/assets/test_opcode.png b/cli/assets/test_opcode.png new file mode 100644 index 0000000..d4d863c Binary files /dev/null and b/cli/assets/test_opcode.png differ diff --git a/cli/cli.go b/cli/cli.go new file mode 100644 index 0000000..76b535e --- /dev/null +++ b/cli/cli.go @@ -0,0 +1,22 @@ +package main + +import ( + "flag" + "log" + "os" + + "github.com/gaoliveira21/chip8/core" +) + +func main() { + rom := flag.String("rom", "", "ROM path") + flag.Parse() + + romData, err := os.ReadFile(*rom) + + if err != nil { + log.Fatal(err) + } + + core.RunChip8(romData, *rom) +} diff --git a/cli/roms/IBM.ch8 b/cli/roms/IBM.ch8 new file mode 100644 index 0000000..113338e Binary files /dev/null and b/cli/roms/IBM.ch8 differ diff --git a/cli/roms/PONG.ch8 b/cli/roms/PONG.ch8 new file mode 100644 index 0000000..65d6310 Binary files /dev/null and b/cli/roms/PONG.ch8 differ diff --git a/cli/roms/test/delay_timer_test.ch8 b/cli/roms/test/delay_timer_test.ch8 new file mode 100644 index 0000000..b987938 Binary files /dev/null and b/cli/roms/test/delay_timer_test.ch8 differ diff --git a/cli/roms/test/random_number_test.ch8 b/cli/roms/test/random_number_test.ch8 new file mode 100644 index 0000000..a6225e5 Binary files /dev/null and b/cli/roms/test/random_number_test.ch8 differ diff --git a/cli/roms/test/test_opcode.ch8 b/cli/roms/test/test_opcode.ch8 new file mode 100644 index 0000000..f540f69 Binary files /dev/null and b/cli/roms/test/test_opcode.ch8 differ