Documentation ¶
Index ¶
- type Flag
- type Mos6502
- func (cpu *Mos6502) Clock()
- func (cpu *Mos6502) ConnectBus(b *bus.Bus)
- func (cpu *Mos6502) Disassemble(addressStart uint16, addressStop uint16) map[uint16]string
- func (cpu *Mos6502) GetAccumulator() byte
- func (cpu *Mos6502) GetProgramCounter() uint16
- func (cpu *Mos6502) GetStackPointer() byte
- func (cpu *Mos6502) GetStatusFlag(f Flag) byte
- func (cpu *Mos6502) GetX() byte
- func (cpu *Mos6502) GetY() byte
- func (cpu *Mos6502) InterruptRequest()
- func (cpu *Mos6502) NonMaskableInterrupt()
- func (cpu *Mos6502) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mos6502 ¶
type Mos6502 struct {
// contains filtered or unexported fields
}
Mos6502 represents a Mos 6502 CPU.
func NewMos6502 ¶
func NewMos6502() *Mos6502
NewMos6502 constructs and returns a pointer to an instance of Mos6502.
func (*Mos6502) ConnectBus ¶
ConnectBus connects the CPU to a Bus.
func (*Mos6502) Disassemble ¶
Disassemble builds a map of assembly strings for a given range of addresses.
func (*Mos6502) GetAccumulator ¶
GetAccumulator returns the current value of the Accumulator Register.
func (*Mos6502) GetProgramCounter ¶
GetProgramCounter returns the current value of the Program Counter.
func (*Mos6502) GetStackPointer ¶
GetStackPointer returns the current value of the Stack Pointer.
func (*Mos6502) GetStatusFlag ¶
GetStatusFlag returns the current value of specific bit on CPU status register.
func (*Mos6502) InterruptRequest ¶
func (cpu *Mos6502) InterruptRequest()
InterruptRequest is the interrupt request signal. Requires the Interrupt Disable (I) flag to be set to 0 or else nothing happens. The currently running instruction is allowed to complete before the Interrupt Request does its thing.
func (*Mos6502) NonMaskableInterrupt ¶
func (cpu *Mos6502) NonMaskableInterrupt()
NonMaskableInterrupt is the non-maskable interrupt request signal, which cannot be ignored. It has the same behavior as the normal Interrupt Request but reads 0xfffa to set the program counter.