Documentation
¶
Overview ¶
Package cpu provides general CPU related type support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressingInfo ¶
AddressingInfo contains the opcode and timing info for an instruction addressing mode.
type Instruction ¶
type Instruction struct {
Name string
Unofficial bool
// instruction has no parameters
NoParamFunc func()
// instruction has parameters
ParamFunc func(params ...any)
// maps addressing mode to cpu cycles
Addressing map[Mode]AddressingInfo
}
Instruction contains information about a NES CPU instruction.
func (Instruction) HasAddressing ¶
func (ins Instruction) HasAddressing(flags ...Mode) bool
HasAddressing returns whether the instruction has any of the passed addressing modes.
type Opcode ¶
type Opcode struct {
Instruction *Instruction
Addressing Mode
Timing byte
PageCrossCycle bool
}
Opcode is a NES CPU opcode that contains the instruction info and used addressing mode.
func (Opcode) ReadWritesMemory ¶
ReadWritesMemory returns whether the instruction accesses memory reading and writing.
func (Opcode) ReadsMemory ¶
ReadsMemory returns whether the instruction accesses memory reading.
func (Opcode) WritesMemory ¶
WritesMemory returns whether the instruction accesses memory writing.
Click to show internal directories.
Click to hide internal directories.