Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2019-07-14 02:40:37.021871109 -0300 -03 m=+0.024669117
Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2019-07-14 02:40:37.004851388 -0300 -03 m=+0.007649378
Index ¶
- Constants
- Variables
- type Catridge
- type Core
- func (c *Core) Continue()
- func (c *Core) GetCurrentPage() (uint16, []byte)
- func (c *Core) GetDebugData() DebugData
- func (c *Core) GetStack() (uint16, []byte)
- func (c *Core) IsPaused() bool
- func (c *Core) Pause()
- func (c *Core) Reset()
- func (c *Core) SetSpeedHack(mul float64)
- func (c *Core) Start()
- func (c *Core) Step()
- func (c *Core) Stop()
- type DebugData
- type DisasmInstruction
- type GBInstruction
- type GBKeys
- type GPU
- func (g *GPU) CGBMode() bool
- func (g *GPU) Cycle(clocks int)
- func (g *GPU) GetBGRam() *pixel.PictureData
- func (g *GPU) GetLCDBuffer() *pixel.PictureData
- func (g *GPU) GetTileBuffer() *pixel.PictureData
- func (g *GPU) GetWinRam() *pixel.PictureData
- func (g *GPU) HBlankMode() bool
- func (g *GPU) LycLy() bool
- func (g *GPU) OamMode() bool
- func (g *GPU) Read(addr uint16) byte
- func (g *GPU) Reset()
- func (g *GPU) SetCGBMode(c bool)
- func (g *GPU) SetHighlightBG(highLightBG bool)
- func (g *GPU) SetHighlightTile(x, y float64)
- func (g *GPU) UpdateOAM(addr uint16, val uint8)
- func (g *GPU) UpdateVRAM()
- func (g *GPU) VBlankMode() bool
- func (g *GPU) Write(addr uint16, val uint8)
- type Memory
- func (m *Memory) CatridgeRamSize() gameboy.RamSize
- func (m *Memory) GetVideoFrame() *pixel.PictureData
- func (m *Memory) GetVideoSprite() *pixel.Sprite
- func (m *Memory) InDoubleSpeedMode() bool
- func (m *Memory) LoadCatridgeRAMData()
- func (m *Memory) LoadRom(data []byte)
- func (m *Memory) MBCType() gameboy.MBCType
- func (m *Memory) Randomize()
- func (m *Memory) Read(addr uint16) byte
- func (m *Memory) ReadByte(addr uint16) byte
- func (m *Memory) ReadByteForPC(addr uint16) byte
- func (m *Memory) ReadBytes(addr uint16, length int) []byte
- func (m *Memory) ReadWord(addr uint16) uint16
- func (m *Memory) ReadWordForPC(addr uint16) uint16
- func (m *Memory) Reset()
- func (m *Memory) RomName() string
- func (m *Memory) RomSize() gameboy.RomSize
- func (m *Memory) SaveCatridgeRAMData()
- func (m *Memory) SetSaveFile(filename string)
- func (m *Memory) WriteByte(addr uint16, val byte)
- func (m *Memory) WriteWord(addr uint16, val uint16)
- type MemoryInterface
- type Registers
- func (r *Registers) BC() uint16
- func (r *Registers) Clone() Registers
- func (r *Registers) DE() uint16
- func (r *Registers) GetCarry() bool
- func (r *Registers) GetHalfCarry() bool
- func (r *Registers) GetRegister(reg string) byte
- func (r *Registers) GetSub() bool
- func (r *Registers) GetZero() bool
- func (r *Registers) HL() uint16
- func (r *Registers) LoadRegisters()
- func (r *Registers) Randomize()
- func (r *Registers) Reset()
- func (r *Registers) SaveRegisters()
- func (r *Registers) SetCarry(v bool)
- func (r *Registers) SetHalfCarry(v bool)
- func (r *Registers) SetRegister(reg string, v byte)
- func (r *Registers) SetSub(v bool)
- func (r *Registers) SetZero(v bool)
- type Serial
- type SoundCard
- type Timer
Constants ¶
View Source
const ( Clock = 4194304 ColorModeClock = Clock * 2 Period = time.Second / Clock ColorModePeriod = time.Second / ColorModeClock )
Timings
View Source
const ( VRamBase = 0x8000 AddrIntVblank = 0x40 AddrIntLcdstat = 0x48 AddrIntTimer = 0x50 AddrIntSerial = 0x58 AddrIntJoypad = 0x60 )
Addresses
View Source
const ( NR10 uint16 = 0xff10 NR11 = 0xff11 NR12 = 0xff12 NR13 = 0xff13 NR14 = 0xff14 NR21 = 0xff16 NR22 = 0xff17 NR23 = 0xff18 NR24 = 0xff19 NR30 = 0xff1a NR31 = 0xff1b NR32 = 0xff1c NR33 = 0xff1d NR34 = 0xff1e NR41 = 0xff20 NR42 = 0xff21 NR43 = 0xff22 NR44 = 0xff23 NR50 = 0xff24 NR51 = 0xff25 NR52 = 0xff26 )
Variables ¶
View Source
var AllRegisters = []string{
"A", "B", "C", "D", "E", "H", "L", "F",
}
View Source
var CBInstructions = []GBInstruction{}/* 256 elements not displayed */
View Source
var GBInstructions = []GBInstruction{}/* 256 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct { Registers *Registers Memory *Memory GPU *GPU Timer *Timer Keys *GBKeys SoundCard *SoundCard Serial *Serial // contains filtered or unexported fields }
func (*Core) GetCurrentPage ¶
func (*Core) GetDebugData ¶
func (*Core) SetSpeedHack ¶
type DisasmInstruction ¶
type DisasmInstruction struct { Address int Opcode uint8 Instruction string Argument []byte Cycles []int ZSHC string // contains filtered or unexported fields }
func Disasm ¶
func Disasm(offset int, data []byte) []DisasmInstruction
func (DisasmInstruction) String ¶
func (d DisasmInstruction) String() string
type GBInstruction ¶
type GBInstruction func(*Core)
type GBKeys ¶
type GBKeys struct {
// contains filtered or unexported fields
}
func MakeGBKeys ¶
func (*GBKeys) SetDirectionBit ¶
func (*GBKeys) SetKeysBit ¶
type GPU ¶
type GPU struct {
// contains filtered or unexported fields
}
func (*GPU) GetBGRam ¶
func (g *GPU) GetBGRam() *pixel.PictureData
func (*GPU) GetLCDBuffer ¶
func (g *GPU) GetLCDBuffer() *pixel.PictureData
func (*GPU) GetTileBuffer ¶
func (g *GPU) GetTileBuffer() *pixel.PictureData
func (*GPU) GetWinRam ¶
func (g *GPU) GetWinRam() *pixel.PictureData
func (*GPU) HBlankMode ¶
func (*GPU) SetCGBMode ¶
func (*GPU) SetHighlightBG ¶
func (*GPU) SetHighlightTile ¶
func (*GPU) UpdateVRAM ¶
func (g *GPU) UpdateVRAM()
func (*GPU) VBlankMode ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func MakeMemory ¶
func (*Memory) CatridgeRamSize ¶
func (*Memory) GetVideoFrame ¶
func (m *Memory) GetVideoFrame() *pixel.PictureData
func (*Memory) GetVideoSprite ¶
func (*Memory) InDoubleSpeedMode ¶
func (*Memory) LoadCatridgeRAMData ¶
func (m *Memory) LoadCatridgeRAMData()
func (*Memory) ReadByteForPC ¶
func (*Memory) ReadWordForPC ¶
func (*Memory) SaveCatridgeRAMData ¶
func (m *Memory) SaveCatridgeRAMData()
func (*Memory) SetSaveFile ¶
type MemoryInterface ¶
type Registers ¶
type Registers struct {
// Exposed Registers
A, B, C, D, E, H, L, F byte
PC, SP uint16
InterruptEnable bool
EnabledInterrupts byte
InterruptsFired byte
CycleCount int
LastClockM, LastClockT int
// contains filtered or unexported fields
}
func MakeRegisters ¶
func MakeRegisters() *Registers
func (*Registers) GetHalfCarry ¶
func (*Registers) GetRegister ¶
func (*Registers) LoadRegisters ¶
func (r *Registers) LoadRegisters()
func (*Registers) SaveRegisters ¶
func (r *Registers) SaveRegisters()
func (*Registers) SetHalfCarry ¶
func (*Registers) SetRegister ¶
type SoundCard ¶
type SoundCard struct {
// contains filtered or unexported fields
}
func MakeSoundCard ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.