From ade84dc657e24708f6ff87e86daeed90f46de616 Mon Sep 17 00:00:00 2001 From: Will Angenent Date: Sun, 27 May 2018 11:48:03 +0100 Subject: [PATCH] Added glide based dependency management --- .gitignore | 2 ++ apple2.go | 17 ++++++++--------- audio/audio.go | 4 +--- audio/ebiten.go | 3 +-- bank_switch_test.go | 11 +++++------ bell_test.go | 10 +++++----- cmd/disasm.go | 6 +++--- cpu/cpu.go | 4 ++-- cpu/cpu_test.go | 10 +++++----- cpu/debug.go | 2 +- disk/disk.go | 2 +- dos33_boot_test.go | 14 +++++++------- glide.yaml | 12 ++++++++++++ io_test.go | 11 +++++------ mmu/io.go | 8 ++++---- mmu/mmu.go | 2 +- prodos_boot_test.go | 14 +++++++------- rwts_write_test.go | 14 +++++++------- utils/utils.go | 4 ++-- video/video.go | 4 ++-- 20 files changed, 81 insertions(+), 73 deletions(-) create mode 100644 glide.yaml diff --git a/.gitignore b/.gitignore index beb724b..9e83b48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +vendor +glide.lock apple2 apple2.test apple2e.rom diff --git a/apple2.go b/apple2.go index 3075947..866411c 100644 --- a/apple2.go +++ b/apple2.go @@ -5,16 +5,15 @@ import ( "fmt" "os" + "github.com/freewilll/apple2/audio" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/disk" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/utils" + "github.com/freewilll/apple2/video" "github.com/hajimehoshi/ebiten" - - "apple2/audio" - "apple2/cpu" - "apple2/disk" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/utils" - "apple2/video" ) var showInstructions *bool diff --git a/audio/audio.go b/audio/audio.go index 92e4b31..a572018 100644 --- a/audio/audio.go +++ b/audio/audio.go @@ -1,8 +1,6 @@ package audio -import ( - "apple2/system" -) +import "github.com/freewilll/apple2/system" func Click() { ForwardToFrameCycle() diff --git a/audio/ebiten.go b/audio/ebiten.go index b318890..ac40ca2 100644 --- a/audio/ebiten.go +++ b/audio/ebiten.go @@ -3,9 +3,8 @@ package audio import ( "errors" + "github.com/freewilll/apple2/system" ebiten_audio "github.com/hajimehoshi/ebiten/audio" - - "apple2/system" ) var ( diff --git a/bank_switch_test.go b/bank_switch_test.go index 6aae555..9a9d2d4 100644 --- a/bank_switch_test.go +++ b/bank_switch_test.go @@ -3,13 +3,12 @@ package main import ( "testing" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/video" "github.com/stretchr/testify/assert" - - "apple2/cpu" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/video" ) func TestBankSwitching(t *testing.T) { diff --git a/bell_test.go b/bell_test.go index bd11736..1fbf9d6 100644 --- a/bell_test.go +++ b/bell_test.go @@ -4,11 +4,11 @@ import ( "fmt" "testing" - "apple2/cpu" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/video" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/video" ) func testBellCycles(delay int) { diff --git a/cmd/disasm.go b/cmd/disasm.go index df4063e..10fcd55 100644 --- a/cmd/disasm.go +++ b/cmd/disasm.go @@ -3,9 +3,9 @@ package main import ( "flag" - "apple2/cpu" - "apple2/mmu" - "apple2/utils" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/utils" ) func main() { diff --git a/cpu/cpu.go b/cpu/cpu.go index 6779091..9d0b3ab 100644 --- a/cpu/cpu.go +++ b/cpu/cpu.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "apple2/mmu" - "apple2/system" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" ) const ( diff --git a/cpu/cpu_test.go b/cpu/cpu_test.go index f3bb813..897208c 100644 --- a/cpu/cpu_test.go +++ b/cpu/cpu_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - "apple2/cpu" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/utils" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/utils" ) func TestCPU(t *testing.T) { diff --git a/cpu/debug.go b/cpu/debug.go index 7d6b9e9..754406b 100644 --- a/cpu/debug.go +++ b/cpu/debug.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "apple2/mmu" + "github.com/freewilll/apple2/mmu" ) func printFlag(p byte, flag uint8, code string) { diff --git a/disk/disk.go b/disk/disk.go index bb03a1f..504ba52 100644 --- a/disk/disk.go +++ b/disk/disk.go @@ -4,7 +4,7 @@ import ( "fmt" "io/ioutil" - "apple2/system" + "github.com/freewilll/apple2/system" ) const tracksPerDisk = 35 diff --git a/dos33_boot_test.go b/dos33_boot_test.go index e07e38b..b20aad5 100644 --- a/dos33_boot_test.go +++ b/dos33_boot_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" - "apple2/cpu" - "apple2/disk" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/utils" - "apple2/video" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/disk" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/utils" + "github.com/freewilll/apple2/video" ) const dosDiskImage = "dos33.dsk" diff --git a/glide.yaml b/glide.yaml new file mode 100644 index 0000000..ba9aa18 --- /dev/null +++ b/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/freewilll/apple2 +import: +- package: github.com/hajimehoshi/ebiten + version: ^1.7.0 + subpackages: + - audio + - ebitenutil +testImport: +- package: github.com/stretchr/testify + version: ^1.2.1 + subpackages: + - assert diff --git a/io_test.go b/io_test.go index b95c2cc..3518305 100644 --- a/io_test.go +++ b/io_test.go @@ -3,13 +3,12 @@ package main import ( "testing" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/video" "github.com/stretchr/testify/assert" - - "apple2/cpu" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/video" ) func TestIoBankSwitching(t *testing.T) { diff --git a/mmu/io.go b/mmu/io.go index 1a102f9..4d59120 100644 --- a/mmu/io.go +++ b/mmu/io.go @@ -3,10 +3,10 @@ package mmu import ( "fmt" - "apple2/audio" - "apple2/disk" - "apple2/keyboard" - "apple2/system" + "github.com/freewilll/apple2/audio" + "github.com/freewilll/apple2/disk" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/system" ) // Adapted from diff --git a/mmu/mmu.go b/mmu/mmu.go index 3399bd9..1aea872 100644 --- a/mmu/mmu.go +++ b/mmu/mmu.go @@ -4,7 +4,7 @@ import ( "fmt" "io/ioutil" - "apple2/system" + "github.com/freewilll/apple2/system" ) const RomPath = "apple2e.rom" diff --git a/prodos_boot_test.go b/prodos_boot_test.go index 022b6ac..3d0a756 100644 --- a/prodos_boot_test.go +++ b/prodos_boot_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" - "apple2/cpu" - "apple2/disk" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/utils" - "apple2/video" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/disk" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/utils" + "github.com/freewilll/apple2/video" ) const prodosDiskImage = "prodos.dsk" diff --git a/rwts_write_test.go b/rwts_write_test.go index a3a92a4..7470004 100644 --- a/rwts_write_test.go +++ b/rwts_write_test.go @@ -3,13 +3,13 @@ package main import ( "testing" - "apple2/cpu" - "apple2/disk" - "apple2/keyboard" - "apple2/mmu" - "apple2/system" - "apple2/utils" - "apple2/video" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/disk" + "github.com/freewilll/apple2/keyboard" + "github.com/freewilll/apple2/mmu" + "github.com/freewilll/apple2/system" + "github.com/freewilll/apple2/utils" + "github.com/freewilll/apple2/video" ) const rwtsDosDiskImage = "dos33.dsk" diff --git a/utils/utils.go b/utils/utils.go index 4ebed54..9f13423 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -8,8 +8,8 @@ import ( "os" "testing" - "apple2/cpu" - "apple2/system" + "github.com/freewilll/apple2/cpu" + "github.com/freewilll/apple2/system" ) func ReadMemoryFromGzipFile(filename string) (data []byte, err error) { diff --git a/video/video.go b/video/video.go index 2a8bfef..10d7956 100644 --- a/video/video.go +++ b/video/video.go @@ -8,7 +8,7 @@ import ( "github.com/hajimehoshi/ebiten" "github.com/hajimehoshi/ebiten/ebitenutil" - "apple2/mmu" + "github.com/freewilll/apple2/mmu" ) const ( @@ -43,7 +43,7 @@ func Init() { } // From - // https://mrob.com/pub/xapple2/colors.html + // https://mrob.com/pub/xgithub.com/freewilll/apple2/colors.html // https://archive.org/details/IIgs_2523063_Master_Color_Values alpha := uint8(0xff)