1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-06-18 08:29:32 +00:00

Fix extracycles bug reported by David Turnbull.

This commit is contained in:
Mike Naberezny 2008-07-03 00:45:11 +00:00
parent 276d5fc4f0
commit c307b4858d

6
mpu.py
View File

@ -87,7 +87,7 @@ class MPU:
a1 = self.WordAt(self.ByteAt(self.pc))
a2 = (a1+self.y)&0xffff
if ((a1&0xff00) != (a2&0xff00)):
self.extracyles += 1
self.extracycles += 1
return a2
else:
return (self.WordAt(self.ByteAt(self.pc))+self.y)&0xffff
@ -100,7 +100,7 @@ class MPU:
a1 = self.WordAt(self.pc)
a2 = (a1+self.x)&0xffff
if ((a1&0xff00)!=(a2&0xff00)):
self.extracyles += 1;
self.extracycles += 1
return a2
else:
return (self.WordAt(self.pc)+self.x)&0xffff
@ -110,7 +110,7 @@ class MPU:
a1 = self.WordAt(self.pc)
a2=(a1+self.y)&0xffff
if ((a1&0xff00)!=(a2&0xff00)):
self.extracyles += 1;
self.extracycles += 1
return a2
else:
return (self.WordAt(self.pc)+self.y)&0xffff