MCPcopy
hub / github.com/fogleman/nes / CPU

Struct CPU

nes/cpu.go:154–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154type CPU struct {
155 Memory // memory interface
156 Cycles uint64 // number of cycles
157 PC uint16 // program counter
158 SP byte // stack pointer
159 A byte // accumulator
160 X byte // x register
161 Y byte // y register
162 C byte // carry flag
163 Z byte // zero flag
164 I byte // interrupt disable flag
165 D byte // decimal mode flag
166 B byte // break command flag
167 U byte // unused flag
168 V byte // overflow flag
169 N byte // negative flag
170 interrupt byte // interrupt type to perform
171 stall int // number of cycles to stall
172 table [256]func(*stepInfo)
173}
174
175func NewCPU(console *Console) *CPU {
176 cpu := CPU{Memory: NewCPUMemory(console)}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected