From 8eaae4128bb25898fff454ab4d754662abbc24a2 Mon Sep 17 00:00:00 2001 From: Zellyn Hunter Date: Fri, 9 May 2014 17:58:46 -0700 Subject: [PATCH] use bare function as ticker --- goapple2.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/goapple2.go b/goapple2.go index fb0303f..e4285da 100644 --- a/goapple2.go +++ b/goapple2.go @@ -56,16 +56,16 @@ type Apple2 struct { } func NewApple2(p videoscan.Plotter, rom []byte, charRom [2048]byte) *Apple2 { - a2 := Apple2{ + a2 := &Apple2{ // BUG(zellyn): this is not how the apple2 keyboard actually works keys: make(chan byte, 16), pcActions: make(map[uint16][]*PCAction), } copy(a2.mem[len(a2.mem)-len(rom):len(a2.mem)], rom) - a2.scanner = videoscan.NewScanner(&a2, p, charRom) - a2.cpu = cpu.NewCPU(&a2, &a2, cpu.VERSION_6502) + a2.scanner = videoscan.NewScanner(a2, p, charRom) + a2.cpu = cpu.NewCPU(a2, a2.Tick, cpu.VERSION_6502) a2.cpu.Reset() - return &a2 + return a2 } func (a2 *Apple2) AddCard(card cards.Card) error {