Documentation ¶
Index ¶
- Constants
- Variables
- type ANROM
- func (anrom *ANROM) Fetch(address uint16) (value uint8)
- func (anrom *ANROM) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (anrom *ANROM) Reset()
- func (anrom *ANROM) Store(address uint16, value uint8) (oldValue uint8)
- func (anrom *ANROM) String() string
- func (anrom *ANROM) Tables() (t0, t1, t2, t3 int)
- type ANROMRegisters
- type Audio
- type AudioRecordEvent
- type AudioRecorder
- type AudioStopEvent
- type Azul3DAudio
- type Azul3DVideo
- type Button
- type CNROM
- type CNROMRegisters
- type CPUDecodeEvent
- type ControlFlag
- type Controller
- type ControllerEvent
- type Controllers
- func (ctrls *Controllers) Fetch(address uint16) (value uint8)
- func (ctrls *Controllers) KeyDown(controller int, btn Button)
- func (ctrls *Controllers) KeyIsDown(controller int, btn Button) bool
- func (ctrls *Controllers) KeyUp(controller int, btn Button)
- func (ctrls *Controllers) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (ctrls *Controllers) Reset()
- func (ctrls *Controllers) Store(address uint16, value uint8) (oldValue uint8)
- func (ctrls *Controllers) ValidKeyDown(controller int, btn Button) (valid bool)
- type Event
- type FPS
- type FPS100Event
- type FPS25Event
- type FPS50Event
- type FPS75Event
- type FastForwardEvent
- type FrameEvent
- type FrameStepEvent
- type GIFRecorder
- type JPEGRecorder
- type LoadStateEvent
- type MMC1
- func (mmc1 *MMC1) Fetch(address uint16) (value uint8)
- func (mmc1 *MMC1) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (mmc1 *MMC1) Reset()
- func (mmc1 *MMC1) Store(address uint16, value uint8) (oldValue uint8)
- func (mmc1 *MMC1) String() string
- func (mmc1 *MMC1) Tables() (t0, t1, t2, t3 int)
- type MMC1Mirroring
- type MMC1Registers
- type MMC2
- func (mmc2 *MMC2) Fetch(address uint16) (value uint8)
- func (mmc2 *MMC2) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (mmc2 *MMC2) Reset()
- func (mmc2 *MMC2) Store(address uint16, value uint8) (oldValue uint8)
- func (mmc2 *MMC2) String() string
- func (mmc2 *MMC2) Tables() (t0, t1, t2, t3 int)
- type MMC2Registers
- type MMC3
- func (mmc3 *MMC3) Fetch(address uint16) (value uint8)
- func (mmc3 *MMC3) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (mmc3 *MMC3) Reset()
- func (mmc3 *MMC3) Store(address uint16, value uint8) (oldValue uint8)
- func (mmc3 *MMC3) String() string
- func (mmc3 *MMC3) Tables() (t0, t1, t2, t3 int)
- type MMC3BankSelectFlag
- type MMC3Registers
- type MuteEvent
- type MuteNoiseEvent
- type MutePulse1Event
- type MutePulse2Event
- type MuteTriangleEvent
- type NES
- type NROM
- type Options
- type PPUDecodeEvent
- type PRGBankFlag
- type PauseEvent
- type QuitEvent
- type ROM
- type ROMFile
- type RecordEvent
- type Recorder
- type Region
- type ResetEvent
- type RunState
- type SampleEvent
- type SavePatternTablesEvent
- type SaveStateEvent
- type ShowBackgroundEvent
- type ShowSpritesEvent
- type StepState
- type StopEvent
- type UNROM
- type UNROMRegisters
- type Video
- type WAVRecorder
Constants ¶
View Source
const DEFAULT_FPS float64 = 60.0988
Variables ¶
View Source
var RGBAPalette []color.Color = []color.Color{ color.RGBA{0x66, 0x66, 0x66, 0xff}, color.RGBA{0x00, 0x2A, 0x88, 0xff}, color.RGBA{0x14, 0x12, 0xA7, 0xff}, color.RGBA{0x3B, 0x00, 0xA4, 0xff}, color.RGBA{0x5C, 0x00, 0x7E, 0xff}, color.RGBA{0x6E, 0x00, 0x40, 0xff}, color.RGBA{0x6C, 0x06, 0x00, 0xff}, color.RGBA{0x56, 0x1D, 0x00, 0xff}, color.RGBA{0x33, 0x35, 0x00, 0xff}, color.RGBA{0x0B, 0x48, 0x00, 0xff}, color.RGBA{0x00, 0x52, 0x00, 0xff}, color.RGBA{0x00, 0x4F, 0x08, 0xff}, color.RGBA{0x00, 0x40, 0x4D, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0xAD, 0xAD, 0xAD, 0xff}, color.RGBA{0x15, 0x5F, 0xD9, 0xff}, color.RGBA{0x42, 0x40, 0xFF, 0xff}, color.RGBA{0x75, 0x27, 0xFE, 0xff}, color.RGBA{0xA0, 0x1A, 0xCC, 0xff}, color.RGBA{0xB7, 0x1E, 0x7B, 0xff}, color.RGBA{0xB5, 0x31, 0x20, 0xff}, color.RGBA{0x99, 0x4E, 0x00, 0xff}, color.RGBA{0x6B, 0x6D, 0x00, 0xff}, color.RGBA{0x38, 0x87, 0x00, 0xff}, color.RGBA{0x0C, 0x93, 0x00, 0xff}, color.RGBA{0x00, 0x8F, 0x32, 0xff}, color.RGBA{0x00, 0x7C, 0x8D, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0xFF, 0xFE, 0xFF, 0xff}, color.RGBA{0x64, 0xB0, 0xFF, 0xff}, color.RGBA{0x92, 0x90, 0xFF, 0xff}, color.RGBA{0xC6, 0x76, 0xFF, 0xff}, color.RGBA{0xF3, 0x6A, 0xFF, 0xff}, color.RGBA{0xFE, 0x6E, 0xCC, 0xff}, color.RGBA{0xFE, 0x81, 0x70, 0xff}, color.RGBA{0xEA, 0x9E, 0x22, 0xff}, color.RGBA{0xBC, 0xBE, 0x00, 0xff}, color.RGBA{0x88, 0xD8, 0x00, 0xff}, color.RGBA{0x5C, 0xE4, 0x30, 0xff}, color.RGBA{0x45, 0xE0, 0x82, 0xff}, color.RGBA{0x48, 0xCD, 0xDE, 0xff}, color.RGBA{0x4F, 0x4F, 0x4F, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0xFF, 0xFE, 0xFF, 0xff}, color.RGBA{0xC0, 0xDF, 0xFF, 0xff}, color.RGBA{0xD3, 0xD2, 0xFF, 0xff}, color.RGBA{0xE8, 0xC8, 0xFF, 0xff}, color.RGBA{0xFB, 0xC2, 0xFF, 0xff}, color.RGBA{0xFE, 0xC4, 0xEA, 0xff}, color.RGBA{0xFE, 0xCC, 0xC5, 0xff}, color.RGBA{0xF7, 0xD8, 0xA5, 0xff}, color.RGBA{0xE4, 0xE5, 0x94, 0xff}, color.RGBA{0xCF, 0xEF, 0x96, 0xff}, color.RGBA{0xBD, 0xF4, 0xAB, 0xff}, color.RGBA{0xB3, 0xF3, 0xCC, 0xff}, color.RGBA{0xB5, 0xEB, 0xF2, 0xff}, color.RGBA{0xB8, 0xB8, 0xB8, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, }
Functions ¶
This section is empty.
Types ¶
type ANROM ¶
type ANROM struct { *ROMFile `json:"-"` Registers ANROMRegisters }
type ANROMRegisters ¶
type ANROMRegisters struct {
BankSelect uint8
}
func (*ANROMRegisters) Reset ¶
func (reg *ANROMRegisters) Reset()
type AudioRecordEvent ¶
type AudioRecordEvent struct{}
func (*AudioRecordEvent) Process ¶
func (e *AudioRecordEvent) Process(nes *NES)
func (*AudioRecordEvent) String ¶
func (e *AudioRecordEvent) String() string
type AudioRecorder ¶
type AudioRecorder interface { Input() chan int16 Record() Stop() Quit() Run() }
type AudioStopEvent ¶
type AudioStopEvent struct{}
func (*AudioStopEvent) Process ¶
func (e *AudioStopEvent) Process(nes *NES)
func (*AudioStopEvent) String ¶
func (e *AudioStopEvent) String() string
type Azul3DAudio ¶
type Azul3DAudio struct {
// contains filtered or unexported fields
}
func (*Azul3DAudio) Close ¶
func (audio *Azul3DAudio) Close()
func (*Azul3DAudio) Input ¶
func (audio *Azul3DAudio) Input() chan int16
func (*Azul3DAudio) Run ¶
func (audio *Azul3DAudio) Run()
func (*Azul3DAudio) TogglePaused ¶
func (audio *Azul3DAudio) TogglePaused()
type Azul3DVideo ¶
type Azul3DVideo struct {
// contains filtered or unexported fields
}
func (*Azul3DVideo) Events ¶
func (video *Azul3DVideo) Events() chan Event
func (*Azul3DVideo) Input ¶
func (video *Azul3DVideo) Input() chan []uint8
func (*Azul3DVideo) Run ¶
func (video *Azul3DVideo) Run()
type CNROM ¶
type CNROM struct { *ROMFile `json:"-"` Registers CNROMRegisters }
type CNROMRegisters ¶
type CNROMRegisters struct {
BankSelect uint8
}
func (*CNROMRegisters) Reset ¶
func (reg *CNROMRegisters) Reset()
type CPUDecodeEvent ¶
type CPUDecodeEvent struct{}
func (*CPUDecodeEvent) Process ¶
func (e *CPUDecodeEvent) Process(nes *NES)
func (*CPUDecodeEvent) String ¶
func (e *CPUDecodeEvent) String() string
type ControlFlag ¶
type ControlFlag uint8
const ( Mirroring ControlFlag = 1 << iota PRGRomBankMode CHRRomBankMode )
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
type ControllerEvent ¶
type ControllerEvent struct {
// contains filtered or unexported fields
}
func (*ControllerEvent) Process ¶
func (e *ControllerEvent) Process(nes *NES)
func (*ControllerEvent) String ¶
func (e *ControllerEvent) String() string
type Controllers ¶
type Controllers struct {
// contains filtered or unexported fields
}
func NewControllers ¶
func NewControllers() *Controllers
func (*Controllers) Fetch ¶
func (ctrls *Controllers) Fetch(address uint16) (value uint8)
func (*Controllers) KeyDown ¶
func (ctrls *Controllers) KeyDown(controller int, btn Button)
func (*Controllers) KeyIsDown ¶
func (ctrls *Controllers) KeyIsDown(controller int, btn Button) bool
func (*Controllers) KeyUp ¶
func (ctrls *Controllers) KeyUp(controller int, btn Button)
func (*Controllers) Mappings ¶
func (ctrls *Controllers) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
func (*Controllers) Reset ¶
func (ctrls *Controllers) Reset()
func (*Controllers) Store ¶
func (ctrls *Controllers) Store(address uint16, value uint8) (oldValue uint8)
func (*Controllers) ValidKeyDown ¶
func (ctrls *Controllers) ValidKeyDown(controller int, btn Button) (valid bool)
type FPS100Event ¶
type FPS100Event struct{}
func (*FPS100Event) Process ¶
func (e *FPS100Event) Process(nes *NES)
func (*FPS100Event) String ¶
func (e *FPS100Event) String() string
type FPS25Event ¶
type FPS25Event struct{}
func (*FPS25Event) Process ¶
func (e *FPS25Event) Process(nes *NES)
func (*FPS25Event) String ¶
func (e *FPS25Event) String() string
type FPS50Event ¶
type FPS50Event struct{}
func (*FPS50Event) Process ¶
func (e *FPS50Event) Process(nes *NES)
func (*FPS50Event) String ¶
func (e *FPS50Event) String() string
type FPS75Event ¶
type FPS75Event struct{}
func (*FPS75Event) Process ¶
func (e *FPS75Event) Process(nes *NES)
func (*FPS75Event) String ¶
func (e *FPS75Event) String() string
type FastForwardEvent ¶
type FastForwardEvent struct{}
func (*FastForwardEvent) Process ¶
func (e *FastForwardEvent) Process(nes *NES)
func (*FastForwardEvent) String ¶
func (e *FastForwardEvent) String() string
type FrameEvent ¶
type FrameEvent struct {
// contains filtered or unexported fields
}
func (*FrameEvent) Process ¶
func (e *FrameEvent) Process(nes *NES)
func (*FrameEvent) String ¶
func (e *FrameEvent) String() string
type FrameStepEvent ¶
type FrameStepEvent struct{}
func (*FrameStepEvent) Process ¶
func (e *FrameStepEvent) Process(nes *NES)
func (*FrameStepEvent) String ¶
func (e *FrameStepEvent) String() string
type GIFRecorder ¶
type GIFRecorder struct {
// contains filtered or unexported fields
}
func NewGIFRecorder ¶
func NewGIFRecorder() (video *GIFRecorder, err error)
func (*GIFRecorder) Input ¶
func (video *GIFRecorder) Input() chan []uint8
func (*GIFRecorder) Quit ¶
func (video *GIFRecorder) Quit()
func (*GIFRecorder) Record ¶
func (video *GIFRecorder) Record()
func (*GIFRecorder) Run ¶
func (video *GIFRecorder) Run()
func (*GIFRecorder) Stop ¶
func (video *GIFRecorder) Stop()
type JPEGRecorder ¶
type JPEGRecorder struct {
// contains filtered or unexported fields
}
func NewJPEGRecorder ¶
func NewJPEGRecorder() (video *JPEGRecorder, err error)
func (*JPEGRecorder) Input ¶
func (video *JPEGRecorder) Input() chan []uint8
func (*JPEGRecorder) Quit ¶
func (video *JPEGRecorder) Quit()
func (*JPEGRecorder) Record ¶
func (video *JPEGRecorder) Record()
func (*JPEGRecorder) Run ¶
func (video *JPEGRecorder) Run()
func (*JPEGRecorder) Stop ¶
func (video *JPEGRecorder) Stop()
type LoadStateEvent ¶
type LoadStateEvent struct{}
func (*LoadStateEvent) Process ¶
func (e *LoadStateEvent) Process(nes *NES)
func (*LoadStateEvent) String ¶
func (e *LoadStateEvent) String() string
type MMC1 ¶
type MMC1 struct { *ROMFile `json:"-"` Registers MMC1Registers }
type MMC1Mirroring ¶
type MMC1Mirroring uint8
const ( OneScreenLowerBank MMC1Mirroring = iota OneScreenUpperBank Vertical Horizontal )
type MMC1Registers ¶
type MMC1Registers struct { Load uint8 Control uint8 CHRBank0 uint8 CHRBank1 uint8 PRGBank uint8 Shift uint8 ShiftCount uint8 }
func (*MMC1Registers) Reset ¶
func (reg *MMC1Registers) Reset()
type MMC2 ¶
type MMC2 struct { *ROMFile `json:"-"` Registers MMC2Registers }
type MMC2Registers ¶
type MMC2Registers struct { PRGBank uint8 CHRBank0 uint8 CHRBank1 uint8 CHRBank2 uint8 CHRBank3 uint8 Mirroring uint8 Latch0 uint8 Latch1 uint8 }
func (*MMC2Registers) Reset ¶
func (reg *MMC2Registers) Reset()
type MMC3 ¶
type MMC3 struct { *ROMFile `json:"-"` Registers MMC3Registers }
type MMC3BankSelectFlag ¶
type MMC3BankSelectFlag uint8
const ( BankRegister MMC3BankSelectFlag = 1 << iota PRGROMBankMode CHRA12Inversion )
type MMC3Registers ¶
type MMC3Registers struct { BankSelect uint8 BankData uint8 Mirroring uint8 PRGRAMProtect uint8 IRQLatch uint8 IRQReload bool IRQEnable bool IRQCounter uint8 CHRBank1 uint8 CHRBank2 uint8 CHRBank3 uint8 CHRBank4 uint8 CHRBank5 uint8 CHRBank6 uint8 PRGBankLow uint8 PRGBankHigh uint8 }
func (*MMC3Registers) Reset ¶
func (reg *MMC3Registers) Reset()
type MuteNoiseEvent ¶
type MuteNoiseEvent struct{}
func (*MuteNoiseEvent) Process ¶
func (e *MuteNoiseEvent) Process(nes *NES)
func (*MuteNoiseEvent) String ¶
func (e *MuteNoiseEvent) String() string
type MutePulse1Event ¶
type MutePulse1Event struct{}
func (*MutePulse1Event) Process ¶
func (e *MutePulse1Event) Process(nes *NES)
func (*MutePulse1Event) String ¶
func (e *MutePulse1Event) String() string
type MutePulse2Event ¶
type MutePulse2Event struct{}
func (*MutePulse2Event) Process ¶
func (e *MutePulse2Event) Process(nes *NES)
func (*MutePulse2Event) String ¶
func (e *MutePulse2Event) String() string
type MuteTriangleEvent ¶
type MuteTriangleEvent struct{}
func (*MuteTriangleEvent) Process ¶
func (e *MuteTriangleEvent) Process(nes *NES)
func (*MuteTriangleEvent) String ¶
func (e *MuteTriangleEvent) String() string
type NES ¶
type PPUDecodeEvent ¶
type PPUDecodeEvent struct{}
func (*PPUDecodeEvent) Process ¶
func (e *PPUDecodeEvent) Process(nes *NES)
func (*PPUDecodeEvent) String ¶
func (e *PPUDecodeEvent) String() string
type PRGBankFlag ¶
type PRGBankFlag uint8
const ( PRGBankSelect PRGBankFlag = 1 << iota PRGRAMChipEnable )
type PauseEvent ¶
type PauseEvent struct{}
func (*PauseEvent) Process ¶
func (e *PauseEvent) Process(nes *NES)
func (*PauseEvent) String ¶
func (e *PauseEvent) String() string
type ROM ¶
type ROMFile ¶
type ROMFile struct {
// contains filtered or unexported fields
}
func NewROMFile ¶
func (*ROMFile) LoadBattery ¶
func (romf *ROMFile) LoadBattery()
func (*ROMFile) SaveBattery ¶
type RecordEvent ¶
type RecordEvent struct{}
func (*RecordEvent) Process ¶
func (e *RecordEvent) Process(nes *NES)
func (*RecordEvent) String ¶
func (e *RecordEvent) String() string
type ResetEvent ¶
type ResetEvent struct{}
func (*ResetEvent) Process ¶
func (e *ResetEvent) Process(nes *NES)
func (*ResetEvent) String ¶
func (e *ResetEvent) String() string
type SampleEvent ¶
type SampleEvent struct {
// contains filtered or unexported fields
}
func (*SampleEvent) Process ¶
func (e *SampleEvent) Process(nes *NES)
func (*SampleEvent) String ¶
func (e *SampleEvent) String() string
type SavePatternTablesEvent ¶
type SavePatternTablesEvent struct{}
func (*SavePatternTablesEvent) Process ¶
func (e *SavePatternTablesEvent) Process(nes *NES)
func (*SavePatternTablesEvent) String ¶
func (e *SavePatternTablesEvent) String() string
type SaveStateEvent ¶
type SaveStateEvent struct{}
func (*SaveStateEvent) Process ¶
func (e *SaveStateEvent) Process(nes *NES)
func (*SaveStateEvent) String ¶
func (e *SaveStateEvent) String() string
type ShowBackgroundEvent ¶
type ShowBackgroundEvent struct{}
func (*ShowBackgroundEvent) Process ¶
func (e *ShowBackgroundEvent) Process(nes *NES)
func (*ShowBackgroundEvent) String ¶
func (e *ShowBackgroundEvent) String() string
type ShowSpritesEvent ¶
type ShowSpritesEvent struct{}
func (*ShowSpritesEvent) Process ¶
func (e *ShowSpritesEvent) Process(nes *NES)
func (*ShowSpritesEvent) String ¶
func (e *ShowSpritesEvent) String() string
type UNROM ¶
type UNROM struct { *ROMFile `json:"-"` Registers UNROMRegisters }
type UNROMRegisters ¶
type UNROMRegisters struct {
BankSelect uint8
}
func (*UNROMRegisters) Reset ¶
func (reg *UNROMRegisters) Reset()
type WAVRecorder ¶
type WAVRecorder struct {
// contains filtered or unexported fields
}
func NewWAVRecorder ¶
func NewWAVRecorder() (wr *WAVRecorder, err error)
func (*WAVRecorder) Input ¶
func (wr *WAVRecorder) Input() chan int16
func (*WAVRecorder) Quit ¶
func (wr *WAVRecorder) Quit()
func (*WAVRecorder) Record ¶
func (wr *WAVRecorder) Record()
func (*WAVRecorder) Run ¶
func (wr *WAVRecorder) Run()
func (*WAVRecorder) Stop ¶
func (wr *WAVRecorder) Stop()
Click to show internal directories.
Click to hide internal directories.