mirror of
https://github.com/mnaberez/py65.git
synced 2024-09-06 10:54:32 +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:
|
||||
# vectors
|
||||
ResetTo = 0xfffc
|
||||
IrqTo = 0xfffe
|
||||
NMITo = 0xfffa
|
||||
RESET = 0xfffc
|
||||
NMI = 0xfffa
|
||||
IRQ = 0xfffe
|
||||
|
||||
# processor flags
|
||||
NEGATIVE = 128
|
||||
OVERFLOW = 64
|
||||
UNUSED = 32
|
||||
BREAK = 16 # there is no actual BREAK flag but this indicates BREAK
|
||||
BREAK = 16
|
||||
DECIMAL = 8
|
||||
INTERRUPT = 4
|
||||
ZERO = 2
|
||||
@ -511,7 +511,7 @@ class MPU:
|
||||
self.stPush(self.p | self.BREAK | self.UNUSED)
|
||||
|
||||
self.p |= self.INTERRUPT
|
||||
self.pc = self.WordAt(self.IrqTo)
|
||||
self.pc = self.WordAt(self.IRQ)
|
||||
|
||||
@instruction(name="ORA", mode="inx", cycles=6)
|
||||
def inst_0x01(self):
|
||||
|
@ -75,7 +75,7 @@ class MPU(mpu6502.MPU):
|
||||
self.stPush(self.p | self.BREAK | self.UNUSED)
|
||||
|
||||
self.p |= self.INTERRUPT
|
||||
self.pc = self.WordAt(self.IrqTo)
|
||||
self.pc = self.WordAt(self.IRQ)
|
||||
|
||||
# 65C02 clears decimal flag, NMOS 6502 does not
|
||||
self.p &= ~self.DECIMAL
|
||||
|
Loading…
Reference in New Issue
Block a user