mirror of
https://github.com/freewilll/apple2-go.git
synced 2025-04-01 03:32:36 +00:00
Rearranged files and resurrected CPU test
This commit is contained in:
parent
55e0b6b664
commit
de7299a5ab
@ -1,4 +1,4 @@
|
||||
package main
|
||||
package cpu_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
@ -8,9 +8,10 @@ import (
|
||||
"mos6502go/mmu"
|
||||
"mos6502go/system"
|
||||
"mos6502go/utils"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
func TestCPU(t *testing.T) {
|
||||
showInstructions := flag.Bool("show-instructions", false, "Show instructions code while running")
|
||||
skipTest0 := flag.Bool("skip-functional-test", false, "Skip functional test")
|
||||
skipTest1 := flag.Bool("skip-interrupt-test", false, "Skip interrupt test")
|
@ -1,4 +1,4 @@
|
||||
package main_test
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@ -33,11 +33,8 @@ func TestDOS33Boot(t *testing.T) {
|
||||
t0 := time.Now()
|
||||
cpu.Run(showInstructions, &breakAddress, disableFirmwareWait, system.CpuFrequency*1000)
|
||||
|
||||
// audio.ForwardToFrameCycle()
|
||||
|
||||
elapsed := float64(time.Since(t0) / time.Millisecond)
|
||||
fmt.Printf("CPU Cycles: %d\n", system.FrameCycles)
|
||||
// fmt.Printf("Sound samples: %d\n", len(system.AudioChannel))
|
||||
fmt.Printf("Time elapsed: %0.2f ms\n", elapsed)
|
||||
fmt.Printf("Speed: %0.2f cycles/ms\n", float64(system.FrameCycles)/elapsed)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user