mirror of
https://github.com/mnaberez/py65.git
synced 2024-10-15 10:24:03 +00:00
Use a consistent naming style for constants
This commit is contained in:
parent
2dde6bdafe
commit
816bb3c713
@ -4,15 +4,15 @@ from py65.utils.devices import make_instruction_decorator
|
|||||||
|
|
||||||
class MPU:
|
class MPU:
|
||||||
# vectors
|
# vectors
|
||||||
ResetTo = 0xfffc
|
RESET = 0xfffc
|
||||||
IrqTo = 0xfffe
|
NMI = 0xfffa
|
||||||
NMITo = 0xfffa
|
IRQ = 0xfffe
|
||||||
|
|
||||||
# processor flags
|
# processor flags
|
||||||
NEGATIVE = 128
|
NEGATIVE = 128
|
||||||
OVERFLOW = 64
|
OVERFLOW = 64
|
||||||
UNUSED = 32
|
UNUSED = 32
|
||||||
BREAK = 16 # there is no actual BREAK flag but this indicates BREAK
|
BREAK = 16
|
||||||
DECIMAL = 8
|
DECIMAL = 8
|
||||||
INTERRUPT = 4
|
INTERRUPT = 4
|
||||||
ZERO = 2
|
ZERO = 2
|
||||||
@ -511,7 +511,7 @@ class MPU:
|
|||||||
self.stPush(self.p | self.BREAK | self.UNUSED)
|
self.stPush(self.p | self.BREAK | self.UNUSED)
|
||||||
|
|
||||||
self.p |= self.INTERRUPT
|
self.p |= self.INTERRUPT
|
||||||
self.pc = self.WordAt(self.IrqTo)
|
self.pc = self.WordAt(self.IRQ)
|
||||||
|
|
||||||
@instruction(name="ORA", mode="inx", cycles=6)
|
@instruction(name="ORA", mode="inx", cycles=6)
|
||||||
def inst_0x01(self):
|
def inst_0x01(self):
|
||||||
|
@ -75,7 +75,7 @@ class MPU(mpu6502.MPU):
|
|||||||
self.stPush(self.p | self.BREAK | self.UNUSED)
|
self.stPush(self.p | self.BREAK | self.UNUSED)
|
||||||
|
|
||||||
self.p |= self.INTERRUPT
|
self.p |= self.INTERRUPT
|
||||||
self.pc = self.WordAt(self.IrqTo)
|
self.pc = self.WordAt(self.IRQ)
|
||||||
|
|
||||||
# 65C02 clears decimal flag, NMOS 6502 does not
|
# 65C02 clears decimal flag, NMOS 6502 does not
|
||||||
self.p &= ~self.DECIMAL
|
self.p &= ~self.DECIMAL
|
||||||
|
Loading…
Reference in New Issue
Block a user