Skip to content

Commit

Permalink
Revert "Add support for optionally tracing execution"
Browse files Browse the repository at this point in the history
This reverts commit 5e7ade9.
  • Loading branch information
KrisKennaway committed Aug 20, 2019
1 parent 430fec1 commit fab1174
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions py65/devices/mpu6502.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from py65.utils.conversions import itoa
from py65.utils.devices import make_instruction_decorator
from py65 import disassembler


class MPU:
# vectors
Expand Down Expand Up @@ -41,8 +41,6 @@ def __init__(self, memory=None, pc=0x0000):
self.memory = memory
self.start_pc = pc

self.disassembler = disassembler.Disassembler(self)

# init
self.reset()

Expand All @@ -57,11 +55,8 @@ def __repr__(self):
return self.reprformat() % (indent, self.name, self.pc, self.a,
self.x, self.y, self.sp, flags)

def step(self, trace=False):
def step(self):
instructCode = self.memory[self.pc]
if trace:
print self, "$%04X: %s" % (
self.pc, self.disassembler.instruction_at(self.pc)[1])
self.pc = (self.pc + 1) & self.addrMask
self.excycles = 0
self.addcycles = self.extracycles[instructCode]
Expand Down
4 changes: 2 additions & 2 deletions py65/devices/mpu65c02.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ def __init__(self, *args, **kwargs):
self.name = '65C02'
self.waiting = False

def step(self, trace=False):
def step(self):
if self.waiting:
self.processorCycles += 1
else:
mpu6502.MPU.step(self, trace)
mpu6502.MPU.step(self)
return self

# Make copies of the lists
Expand Down

0 comments on commit fab1174

Please sign in to comment.