Versions in this module Expand all Collapse all v1 v1.2.5 Sep 5, 2022 v1.2.0 Sep 5, 2022 Changes in this version + const MBC3RAMBanksSize + const MBC5RAMBanksSize type Cartridge + func (c *Cartridge) IsRTCPresent() bool + func (c *Cartridge) UpdateCurrentRTC() type MemoryBankController + func NewMemoryBankControllerMBC3(console *Console) MemoryBankController + func NewMemoryBankControllerMBC5(console *Console) MemoryBankController + type MemoryBankControllerMBC3 struct + func (m *MemoryBankControllerMBC3) PerformRead(addr uint16) byte + func (m *MemoryBankControllerMBC3) PerformWrite(addr uint16, value byte) + func (m *MemoryBankControllerMBC3) UpdateRTC() + type MemoryBankControllerMBC5 struct + func (m *MemoryBankControllerMBC5) PerformRead(addr uint16) byte + func (m *MemoryBankControllerMBC5) PerformWrite(addr uint16, value byte) + type RTCRegisters struct v1.0.0 Sep 4, 2022 Changes in this version + const APU_RING_BUFFER_SIZE + const APU_WAVE_FORM_NOISE + const APU_WAVE_FORM_SQUARE + const APU_WAVE_FORM_WAVE + const CARTRIDGE_MBC1 + const CARTRIDGE_MBC1_MULTI + const CARTRIDGE_MBC2 + const CARTRIDGE_MBC3 + const CARTRIDGE_MBC5 + const CARTRIDGE_NOT_SUPPORTED + const CARTRIDGE_NO_MBC + const CLOCKS_PER_SAMPLE + const CLOCKS_PER_SECONDS + const CPUFLAG_CARRY + const CPUFLAG_HALF + const CPUFLAG_NONE + const CPUFLAG_SUB + const CPUFLAG_ZERO + const GAMEBOY_HEIGHT + const GAMEBOY_WIDTH + const GBC_PIXEL_BGR555 + const GBC_PIXEL_BGR565 + const GBC_PIXEL_RGB555 + const GBC_PIXEL_RGB565 + const INTERRUPT_JOYPAD + const INTERRUPT_LCDSTAT + const INTERRUPT_NONE + const INTERRUPT_SERIAL + const INTERRUPT_TIMER + const INTERRUPT_VBLANK + const KEY_A + const KEY_B + const KEY_DOWN + const KEY_LEFT + const KEY_RIGHT + const KEY_SELECT + const KEY_START + const KEY_UP + const MBC1RAMBanksSize + const MBC2RAMBanksSize + const SAMPLES_PER_SECONDS + var InitialValuesForFFXX = [256]byte + var OPCodeAccurate = [256]byte + var OPCodeBranchMachineCycles = [256]byte + var OPCodeCBAccurate = [256]byte + var OPCodeCBMachineCycles = [256]byte + var OPCodeMachineCycles = [256]byte + func CheckBit(value byte, bit int) bool + func ClearBit(value byte, bit int) byte + func SetBit(value byte, bit int) byte + type APU struct + func NewAPU(console *Console) *APU + func (apu *APU) Read(addr uint16) byte + func (apu *APU) ReadSoundBuffer(toFill []byte) []byte + func (apu *APU) Reset() + func (apu *APU) Step(cycleCount byte) + func (apu *APU) Write(addr uint16, value byte) + type APURingBuffer struct + func NewAPURingBuffer() *APURingBuffer + func (a *APURingBuffer) Read(preSizedBuf []byte) []byte + func (a *APURingBuffer) Write(bytes []byte) (writeCount int) + type APUWave struct + func (a *APUWave) GetSample() (byte, byte) + type APUWaveType int + type CPU struct + AF *CPURegister + AccurateOpeCodeState int + BC *CPURegister + BranchTaken bool + CurrentClockCycles uint64 + DE *CPURegister + DIVCycles uint32 + HL *CPURegister + Halt bool + IME bool + IMECycles int + InterruptDelayCycles int + OpCodeCBTable [256]CPUOpCodeEntity + OpCodeTable [256]CPUOpCodeEntity + PC *CPURegister + ReadCache byte + SP *CPURegister + SerialBit int + SerialCycles int + SkipPCBug bool + SpeedMultiplier int + TIMACycles uint32 + UnhaltCycles int + func NewCPU(console *Console) *CPU + func (c *CPU) CheckFlag(flag byte) bool + func (c *CPU) ClearAllFlags() + func (c *CPU) ClearFlag(flag byte) + func (c *CPU) FlipFlag(flag byte) + func (c *CPU) Halted() bool + func (c *CPU) InterruptIsAboutToRaise() bool + func (c *CPU) InterruptPending() CPUInterrupt + func (c *CPU) KeepCarryFlag() + func (c *CPU) KeepZeroFlag() + func (c *CPU) MemoryLoad(addr uint16, value byte) + func (c *CPU) MemoryRead(addr uint16) byte + func (c *CPU) MemoryRetrieve(addr uint16) byte + func (c *CPU) MemoryWrite(addr uint16, value byte) + func (c *CPU) RequestInterrupt(interrupt CPUInterrupt) + func (c *CPU) Reset() + func (c *CPU) ResetDIVCycles() + func (c *CPU) ResetTIMACycles() + func (c *CPU) ServeInterrupt(interrupt CPUInterrupt) + func (c *CPU) SetFlag(flag byte) + func (c *CPU) SetZeroFlag(result byte) + func (c *CPU) Step(count byte) byte + func (c *CPU) UpdateSerial(clockCycles byte) + func (c *CPU) UpdateTimers(clockCycles byte) + type CPUInterrupt int + type CPUOpCodeEntity struct + type CPURegister struct + func NewCPURegister() *CPURegister + func (cr *CPURegister) Decrement() + func (cr *CPURegister) Get() uint16 + func (cr *CPURegister) GetHigh() byte + func (cr *CPURegister) GetHighPointer() *byte + func (cr *CPURegister) GetLow() byte + func (cr *CPURegister) GetLowPointer() *byte + func (cr *CPURegister) Increment() + func (cr *CPURegister) Set(value uint16) + func (cr *CPURegister) SetHigh(value byte) + func (cr *CPURegister) SetLow(value byte) + type Cartridge struct + ROM []byte + RTCPresent bool + RumblePresent bool + func NewCartridge(console *Console) *Cartridge + func (c *Cartridge) LoadFromBuffer(buffer []byte) + type CartridgeType int + type Console struct + APU *APU + CPU *CPU + Cartridge *Cartridge + Controller *Controller + Memory *Memory + PPU *PPU + func NewConsole() *Console + func (console *Console) GetLCDColor(index int) color.RGBA + func (console *Console) LoadFromBuffer(data []byte) + func (console *Console) RunToVBlank() + func (console *Console) SetButtonState(button int, pressed bool) + func (console *Console) SetPixels(pixels []byte) + func (console *Console) SetSoundBuffer(buffer []byte) + type Controller struct + func NewController(console *Console) *Controller + func (c *Controller) KeyPressed(key GameBoyKeys) + func (c *Controller) KeyReleased(key GameBoyKeys) + func (c *Controller) Read() byte + func (c *Controller) Reset() + func (c *Controller) Step(clockCycles byte) + func (c *Controller) Update() + func (c *Controller) Write(value byte) + type EnvelopeDirection bool + const ENVELOPE_DOWN + const ENVELOPE_UP + type GameBoyColorPixelFormat int + type GameBoyKeys int + type Memory struct + func NewMemory(console *Console) *Memory + func (m *Memory) CommonPerformRead(addr uint16) byte + func (m *Memory) CommonPerformWrite(addr uint16, value byte) + func (m *Memory) IORegistersPerformRead(addr uint16) byte + func (m *Memory) IORegistersPerformWrite(addr uint16, value byte) + func (m *Memory) Load(addr uint16, value byte) + func (m *Memory) PerformDMA(value byte) + func (m *Memory) Read(addr uint16) byte + func (m *Memory) Reset() + func (m *Memory) Retrieve(addr uint16) byte + func (m *Memory) SetMemoryBankController() + func (m *Memory) Write(addr uint16, value byte) + type MemoryBankController interface + PerformRead func(addr uint16) byte + PerformWrite func(addr uint16, value byte) + func NewMemoryBankControllerMBC1(console *Console) MemoryBankController + func NewMemoryBankControllerMBC2(console *Console) MemoryBankController + func NewMemoryBankControllerNoMBC(console *Console) MemoryBankController + type MemoryBankControllerMBC1 struct + func (m *MemoryBankControllerMBC1) PerformRead(addr uint16) byte + func (m *MemoryBankControllerMBC1) PerformWrite(addr uint16, value byte) + type MemoryBankControllerMBC2 struct + func (m *MemoryBankControllerMBC2) PerformRead(addr uint16) byte + func (m *MemoryBankControllerMBC2) PerformWrite(addr uint16, value byte) + type MemoryBankControllerNoMBC struct + func (m *MemoryBankControllerNoMBC) PerformRead(addr uint16) byte + func (m *MemoryBankControllerNoMBC) PerformWrite(addr uint16, value byte) + type PPU struct + ColorCacheBuffer [GAMEBOY_WIDTH * GAMEBOY_HEIGHT]byte + ColorFrameBuffer [GAMEBOY_WIDTH * GAMEBOY_HEIGHT]uint16 + FrameBuffer [GAMEBOY_WIDTH * GAMEBOY_HEIGHT]byte + GameBoyColorBackgroundPalettes [8][4][2]uint16 + GameBoyColorSpritePalettes [8][4][2]uint16 + SpriteXCacheBuffer [GAMEBOY_WIDTH * GAMEBOY_HEIGHT]int + func NewPPU(console *Console) *PPU + func (p *PPU) CompareLYToLYC() + func (p *PPU) DisableScreen() + func (p *PPU) EnableScreen() + func (p *PPU) GetCurrentStatusMode() int + func (p *PPU) GetIRQ48Signal() byte + func (p *PPU) RenderBG(line int, pixel int) + func (p *PPU) RenderSprites(line int) + func (p *PPU) RenderWindow(line int) + func (p *PPU) Reset() + func (p *PPU) ResetWindowLine() + func (p *PPU) ScanLine(line int) + func (p *PPU) SetIRQ48Signal(signal byte) + func (p *PPU) Step(clockCycles *byte) bool + func (p *PPU) UpdateStatRegister() + type SweepDirection bool + const SWEEP_DOWN + const SWEEP_UP v0 v0.0.1-rc1 Sep 4, 2022