Implement timer, some IO operations and more CPU instructions

This commit is contained in:
Michael Smith
2025-09-05 11:15:41 +02:00
parent 7678fda9e7
commit b860999dc8
8 changed files with 243 additions and 37 deletions

View File

@@ -9,10 +9,7 @@ import (
"gb-player/gb"
)
var running = true
func main() {
// FIXME(m): Allow specifying rom file on command line
if len(os.Args) != 2 {
log.Fatalln("No rom file specified")
}
@@ -26,9 +23,8 @@ func main() {
}
fmt.Println("Executing instructions")
running := true
for running {
for !console.CPU.Halted {
console.CPU.Step()
running = !console.CPU.Halted
}
}