Documentation ¶
Index ¶
- Constants
- Variables
- type CPU
- type Cartridge
- type Gameboy
- func (gb *Gameboy) GetCPUSTAT() [10]uint16
- func (gb *Gameboy) GetGameTitle() string
- func (gb *Gameboy) GetScreen() [ScreenWidth][ScreenHeight][3]int
- func (gb *Gameboy) GetVRAM() [0x2000]byte
- func (gb *Gameboy) Init(cartridgeUrl string)
- func (gb *Gameboy) KeyPressed(key int)
- func (gb *Gameboy) KeyReleased(key int)
- func (gb *Gameboy) Update()
- type PPU
- type Registers
Constants ¶
View Source
const ( INPUT_A = iota INPUT_B INPUT_SELECT INPUT_START INPUT_RIGHT INPUT_LEFT INPUT_UP INPUT_DOWN )
View Source
const ( // F value (flag) : ZF = 0x80 // Zero 0x80 -> Set if last operation produced 0 N = 0x40 // Operation 0x40 -> Set if last operation addition/subtraction H = 0x20 // Half-carry 0x20 -> Set if last operation result [lower half] overflowed 15 CY = 0x10 // Carry 0x10 -> Set if last operation produced over flow )
View Source
const ( IF = 0xFF0F IE = 0xFFFF INTVBLANK = 0x40 INTLCDSTAT = 0x48 INTTIMER = 0x50 INTJOYPAD = 0x60 )
View Source
const ( WHITE = iota LIGHT_GRAY DARK_GRAY BLACK )
View Source
const ( ScreenWidth = 160 ScreenHeight = 144 )
View Source
const ( DIVIDER = 0xFF04 TIMA = 0xFF05 TMA = 0xFF06 TMC = 0xFF07 )
View Source
const (
MAXCYCLES = 69905 // 4194304 / 60 ( cpu cycles per sec / frame rate)
)
Variables ¶
View Source
var OpcodeCBCycles = []int{} //0 1 2 3 4 5 6 7 8 9 a b c d e f /* 256 elements not displayed */
View Source
var OpcodeCycles = []int{} //0 1 2 3 4 5 6 7 8 9 a b c d e f /* 256 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type Cartridge ¶
type Cartridge struct {
// contains filtered or unexported fields
}
func CartrigdeInit ¶
type Gameboy ¶
type Gameboy struct { Debug bool // contains filtered or unexported fields }
func (*Gameboy) GetCPUSTAT ¶
func (*Gameboy) GetGameTitle ¶
func (*Gameboy) GetScreen ¶
func (gb *Gameboy) GetScreen() [ScreenWidth][ScreenHeight][3]int
func (*Gameboy) KeyPressed ¶
func (*Gameboy) KeyReleased ¶
Click to show internal directories.
Click to hide internal directories.