diff options
| author | crecher <crecher@crecher.net> | 2026-10-12 15:44:15 +0200 |
|---|---|---|
| committer | crecher <crecher@crecher.net> | 2026-10-12 15:44:15 +0200 |
| commit | 780b1e886f6676efedc732b67328f5fbdbe87dc4 (patch) | |
| tree | ed9c99db91cbee374e31cea24f6ad34848dc47af /cpu/cpu.go | |
| parent | 6c49575d1cacd5126b73506cc30430643310396b (diff) | |
| download | gones-780b1e886f6676efedc732b67328f5fbdbe87dc4.tar.gz gones-780b1e886f6676efedc732b67328f5fbdbe87dc4.zip | |
waiter waiter more comments please
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} } |