Documentation
¶
Index ¶
- Constants
- type AddressMode
- func (am AddressMode) Addr(cpu *CPU) uint16
- func (am AddressMode) AddrFast(cpu *CPU) uint16
- func (am AddressMode) Debug(cpu *CPU) string
- func (am AddressMode) Implied(cpu *CPU)
- func (am AddressMode) Length() int
- func (am AddressMode) Read(cpu *CPU) byte
- func (am AddressMode) Write(cpu *CPU, v byte)
- func (am AddressMode) WriteFast(cpu *CPU, v byte)
- type CPU
- func (cpu *CPU) Clock(uint64) uint64
- func (cpu *CPU) IRQ()
- func (cpu *CPU) NMI()
- func (cpu *CPU) PeekPC() uint8
- func (cpu *CPU) PeekPC16() uint16
- func (cpu *CPU) Pull() byte
- func (cpu *CPU) Pull16() uint16
- func (cpu *CPU) Push(v byte)
- func (cpu *CPU) Push16(v uint16)
- func (cpu *CPU) Read16(offt uint16) uint16
- func (cpu *CPU) Read16W(offt uint16) uint16
- func (cpu *CPU) ReadPC() uint8
- func (cpu *CPU) ReadPC16() uint16
- func (cpu *CPU) Reset()
- func (cpu *CPU) SetNMI(v byte)
- func (cpu *CPU) String() string
- func (cpu *CPU) TimeFreeze(v uint64) uint64
Constants ¶
View Source
const ( FlagCarry byte = 0x01 // C FlagZero byte = 0x02 // Z FlagInterruptDisable byte = 0x04 // I FlagDecimal byte = 0x08 // D FlagBreak byte = 0x10 // B FlagIgnored byte = 0x20 FlagOverflow byte = 0x40 // V FlagNegative byte = 0x80 // N )
Flags set in cpu.P
View Source
const ( InterruptNone = iota // 0 InterruptIRQ InterruptNMI )
View Source
const ( NMIVector = 0xfffa ResetVector = 0xfffc IRQVector = 0xfffe )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressMode ¶
type AddressMode byte
func (AddressMode) Addr ¶
func (am AddressMode) Addr(cpu *CPU) uint16
func (AddressMode) AddrFast ¶
func (am AddressMode) AddrFast(cpu *CPU) uint16
func (AddressMode) Debug ¶
func (am AddressMode) Debug(cpu *CPU) string
func (AddressMode) Implied ¶
func (am AddressMode) Implied(cpu *CPU)
func (AddressMode) Length ¶
func (am AddressMode) Length() int
func (AddressMode) Read ¶
func (am AddressMode) Read(cpu *CPU) byte
func (AddressMode) Write ¶
func (am AddressMode) Write(cpu *CPU, v byte)
func (AddressMode) WriteFast ¶
func (am AddressMode) WriteFast(cpu *CPU, v byte)
WriteFast writes without losing cycles
type CPU ¶
type CPU struct { A byte // accumulator X, Y byte // registers PC uint16 // program counter S byte // stack pointer P byte // status register Memory memory.Master Trace io.Writer // contains filtered or unexported fields }
func (*CPU) TimeFreeze ¶
TimeFreeze is used to "freeze" the CPU by a number of cycles, delaying the next operation
Click to show internal directories.
Click to hide internal directories.