This commit is contained in:
Michael Smith
2025-08-13 15:54:10 +02:00
parent 3cb7e3a5c9
commit 69db4fa67c
5 changed files with 110 additions and 6 deletions

25
main.go
View File

@@ -1,9 +1,15 @@
package main
import (
"gb-player/ui"
"fmt"
"log"
// "gb-player/ui"
"gb-player/gb"
)
var running = true
func main() {
// FIXME(m): Allow specifying rom file on command line
// if len(os.Args) != 2 {
@@ -12,5 +18,20 @@ func main() {
// romPath := os.Args[1]
romPath := "./roms/dmg-acid2.gb"
ui.Run(romPath)
// ui.Run(romPath)
console, err := gb.NewConsole(romPath)
if err != nil {
log.Fatal(err)
}
running := true
for running {
if !console.CPU.Step() {
fmt.Println("CPU stopped")
running = false
} else {
fmt.Println("CPU step")
}
}
}