diff options
Diffstat (limited to 'cpu/cpu.go')
| -rw-r--r-- | cpu/cpu.go | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -13,6 +13,16 @@ type CPU struct { SP uint8 // stack pointer PC uint16 // program counter Status uint8 // status flags + // status flags are NV1B DIZC + // |||| |||| + // |||| |||+- Carry + // |||| ||+-- Zero + // |||| |+--- Interrupt Disable + // |||| +---- Decimal + // |||+------ (no cpu effect, check https://www.nesdev.org/wiki/Status_flags#The_B_flag for a good explanation) + // ||+------- (no cpu effect, always pushed as 1) + // |+-------- Overflow + // +--------- Negative Bus Bus Cycles uint64 @@ -21,7 +31,7 @@ type CPU struct { extraCycles int } -func NewCPU(bus Bus) *CPU { +func NewCPU(bus Bus) *CPU { // creates new cpu with bus return &CPU{Bus: bus} } |