From 38a187ee5b12001126592343fea5828b7e978643 Mon Sep 17 00:00:00 2001 From: Ivan Izaguirre Date: Thu, 2 Apr 2020 23:52:23 +0200 Subject: [PATCH] Opcode dump with the proper size --- core6502/execute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core6502/execute.go b/core6502/execute.go index f524d9e..a677267 100644 --- a/core6502/execute.go +++ b/core6502/execute.go @@ -77,7 +77,7 @@ func (s *State) ExecuteInstruction() { opcode.action(s, s.lineCache, opcode) s.cycles += uint64(opcode.cycles) if s.trace { - fmt.Printf("%v, [%02x]\n", s.reg, s.lineCache) + fmt.Printf("%v, [%02x]\n", s.reg, s.lineCache[0:opcode.bytes]) } }