diff --git a/cmd/test-apple-iie-boot.go b/appleiie.go similarity index 100% rename from cmd/test-apple-iie-boot.go rename to appleiie.go diff --git a/6502_functional_test.a65 b/cpu/6502_functional_test.a65 similarity index 100% rename from 6502_functional_test.a65 rename to cpu/6502_functional_test.a65 diff --git a/6502_functional_test.bin.gz b/cpu/6502_functional_test.bin.gz similarity index 100% rename from 6502_functional_test.bin.gz rename to cpu/6502_functional_test.bin.gz diff --git a/6502_interrupt_test.a65 b/cpu/6502_interrupt_test.a65 similarity index 100% rename from 6502_interrupt_test.a65 rename to cpu/6502_interrupt_test.a65 diff --git a/6502_interrupt_test.bin.gz b/cpu/6502_interrupt_test.bin.gz similarity index 100% rename from 6502_interrupt_test.bin.gz rename to cpu/6502_interrupt_test.bin.gz diff --git a/6502_interrupt_test.lst b/cpu/6502_interrupt_test.lst similarity index 100% rename from 6502_interrupt_test.lst rename to cpu/6502_interrupt_test.lst diff --git a/cmd/test-cpu.go b/cpu/cpu_test.go similarity index 96% rename from cmd/test-cpu.go rename to cpu/cpu_test.go index 50ef73f..1d6a454 100644 --- a/cmd/test-cpu.go +++ b/cpu/cpu_test.go @@ -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") diff --git a/dos33_boot_test.go b/dos33_boot_test.go index 7b95844..b52106c 100644 --- a/dos33_boot_test.go +++ b/dos33_boot_test.go @@ -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) }