Documentation ¶
Index ¶
- Constants
- type AddressModeMethod
- type CPUMemory
- func (cm *CPUMemory) DisableDMWaiting()
- func (cm *CPUMemory) GetDMAAddress() byte
- func (cm *CPUMemory) GetDMAPage() byte
- func (cm *CPUMemory) GetDMAReadBuffer() byte
- func (cm *CPUMemory) IncrementDMAAddress()
- func (cm *CPUMemory) IsDMATransfer() bool
- func (cm *CPUMemory) IsDMAWaiting() bool
- func (cm *CPUMemory) Peek(address types.Address) byte
- func (cm *CPUMemory) Read(address types.Address) byte
- func (cm *CPUMemory) ResetDMA()
- func (cm *CPUMemory) SetDMAReadBuffer(value byte)
- func (cm *CPUMemory) Write(address types.Address, value byte)
- type ControllerState
- type Cpu6502
- func (cpu6502 *Cpu6502) Complete() bool
- func (cpu6502 *Cpu6502) Disassemble(start types.Address, end types.Address) (map[types.Address]string, []utils.ASM)
- func (cpu6502 *Cpu6502) GetOperation(operation byte) cpu.Instruction
- func (cpu6502 *Cpu6502) Init()
- func (cpu6502 *Cpu6502) ProgramCounter() types.Address
- func (cpu6502 *Cpu6502) Registers() *cpu.Registers
- func (cpu6502 *Cpu6502) Reset()
- func (cpu6502 *Cpu6502) ResetToAddress(programCounter types.Address)
- func (cpu6502 *Cpu6502) Stop()
- func (cpu6502 *Cpu6502) Tick() (byte, cpu.CpuState)
- type Debugger
- func (debugger *Debugger) ARegister() byte
- func (debugger *Debugger) AddBreakPoint(address types.Address)
- func (debugger *Debugger) B() bool
- func (debugger *Debugger) C() bool
- func (debugger *Debugger) D() bool
- func (debugger *Debugger) Disassembled() map[types.Address]string
- func (debugger *Debugger) GetPaletteColorFromPaletteRam(paletteIndex byte, colorIndex byte) byte
- func (debugger *Debugger) GetPaletteFromRam(paletteIndex uint8) [4]color.Color
- func (debugger *Debugger) I() bool
- func (debugger *Debugger) N() bool
- func (debugger *Debugger) O() bool
- func (debugger *Debugger) OAM(index byte) []byte
- func (debugger *Debugger) PatternTable(patternTable byte, palette uint8) image.RGBA
- func (debugger *Debugger) ProgramCounter() types.Address
- func (debugger *Debugger) RemoveBreakPoint(address types.Address)
- func (debugger *Debugger) RunOneCPUOperationAndPause()
- func (debugger *Debugger) SortedDisassembled() []utils.ASM
- func (debugger *Debugger) XRegister() byte
- func (debugger *Debugger) YRegister() byte
- func (debugger *Debugger) Z() bool
- type Memory
- type Nes
- func (nes *Nes) Debugger() *Debugger
- func (nes *Nes) Finished() bool
- func (nes *Nes) Frame() *image.RGBA
- func (nes *Nes) FramePattern() []byte
- func (nes *Nes) PPU() *ppu.P2c02
- func (nes *Nes) Pause()
- func (nes *Nes) Paused() bool
- func (nes *Nes) PausedTick()
- func (nes *Nes) Start()
- func (nes *Nes) StartAt(address types.Address)
- func (nes *Nes) Stop()
- func (nes *Nes) SystemClockCounter() uint64
- func (nes *Nes) Tick() (byte, bool)
- func (nes *Nes) TickForTime(seconds float64)
- func (nes *Nes) TickTillFrameComplete()
- func (nes *Nes) UpdateController(controllerNumber int, state ControllerState)
Constants ¶
View Source
const CONTROLLER_1_ADDRESS = 0x4016
View Source
const CONTROLLER_2_ADDRESS = 0x4017
View Source
const CONTROLLER_A byte = 0x80
View Source
const CONTROLLER_ARROW_DOWN byte = 0x04
View Source
const CONTROLLER_ARROW_LEFT byte = 0x02
View Source
const CONTROLLER_ARROW_RIGHT byte = 0x01
View Source
const CONTROLLER_ARROW_UP byte = 0x08
View Source
const CONTROLLER_B byte = 0x40
View Source
const CONTROLLER_SELECT byte = 0x20
View Source
const CONTROLLER_START byte = 0x10
View Source
const RAM_HIGHER_ADDRESS = types.Address(0x1FFF)
View Source
const RAM_LAST_REAL_ADDRESS = types.Address(0x07FF)
View Source
const RAM_LOWER_ADDRESS = types.Address(0x0000)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressModeMethod ¶
type CPUMemory ¶
type CPUMemory struct { DmaTransfer bool DmaPage byte DmaWaiting bool DmaAddress byte DmaReadBuffer byte // contains filtered or unexported fields }
func (*CPUMemory) DisableDMWaiting ¶
func (cm *CPUMemory) DisableDMWaiting()
func (*CPUMemory) GetDMAAddress ¶
func (*CPUMemory) GetDMAPage ¶
func (*CPUMemory) GetDMAReadBuffer ¶
func (*CPUMemory) IncrementDMAAddress ¶
func (cm *CPUMemory) IncrementDMAAddress()
func (*CPUMemory) IsDMATransfer ¶
func (*CPUMemory) IsDMAWaiting ¶
func (*CPUMemory) SetDMAReadBuffer ¶
type ControllerState ¶
type Cpu6502 ¶
type Cpu6502 struct {
// contains filtered or unexported fields
}
Cpu6502 Represents a CPU 6502
func (*Cpu6502) Disassemble ¶
func (*Cpu6502) GetOperation ¶
func (cpu6502 *Cpu6502) GetOperation(operation byte) cpu.Instruction
func (*Cpu6502) ProgramCounter ¶
func (*Cpu6502) ResetToAddress ¶
type Debugger ¶
type Debugger struct { DebugPPU bool // contains filtered or unexported fields }
Debugger offers an api to interact externally with NES components
func CreateNesDebugger ¶
func (*Debugger) AddBreakPoint ¶
func (*Debugger) GetPaletteColorFromPaletteRam ¶
func (*Debugger) GetPaletteFromRam ¶
func (*Debugger) PatternTable ¶
PPU Related
func (*Debugger) ProgramCounter ¶
func (*Debugger) RemoveBreakPoint ¶
func (*Debugger) RunOneCPUOperationAndPause ¶
func (debugger *Debugger) RunOneCPUOperationAndPause()
RunOneCPUOperationAndPause executed when user wants to just run one single cycle after having emulation paused.
func (*Debugger) SortedDisassembled ¶
type Memory ¶
type Memory interface { // Peek Reads without side effects. Useful for debugging Peek(types.Address) byte Read(types.Address) byte Write(types.Address, byte) IsDMAWaiting() bool IsDMATransfer() bool DisableDMWaiting() GetDMAPage() byte GetDMAAddress() byte GetDMAReadBuffer() byte SetDMAReadBuffer(value byte) IncrementDMAAddress() ResetDMA() }
type Nes ¶
type Nes struct { Cpu *Cpu6502 // contains filtered or unexported fields }
func (*Nes) FramePattern ¶
func (*Nes) PausedTick ¶
func (nes *Nes) PausedTick()
func (*Nes) SystemClockCounter ¶
func (*Nes) TickForTime ¶
func (*Nes) TickTillFrameComplete ¶
func (nes *Nes) TickTillFrameComplete()
func (*Nes) UpdateController ¶
func (nes *Nes) UpdateController(controllerNumber int, state ControllerState)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.