Documentation
¶
Index ¶
Constants ¶
View Source
const ( ScreenWidth = 160 // Game boy screen width ScreenHeight = 144 // Game boy screen height )
Variables ¶
View Source
var GrayPalette = []color.RGBA{
{
R: 0x2b,
G: 0x2b,
B: 0x26,
A: 0,
},
{
R: 0x70,
G: 0x6b,
B: 0x66,
A: 0,
},
{
R: 0xa8,
G: 0x9f,
B: 0x94,
A: 0,
},
{
R: 0xe0,
G: 0xdb,
B: 0xcd,
A: 0,
},
}
View Source
var OriginalPalette = []color.RGBA{
{
R: 0x9b,
G: 0xbc,
B: 0x0f,
},
{
R: 0x8b,
G: 0xac,
B: 0xf,
},
{
R: 0x30,
G: 0x62,
B: 0x30,
},
{
R: 0xf,
G: 0x38,
B: 0xf,
},
}
Functions ¶
This section is empty.
Types ¶
type Gameboy ¶
type Gameboy struct { // Joypad represents physycal buttons of Gameboy. Joypad *Joypad // contains filtered or unexported fields }
Gameboy represents an emulator of Gameboy console.
func (*Gameboy) GetVideoBuffer ¶
GetVideoBuffer returns ppu video buffer.
func (*Gameboy) LoadRom ¶
LoadRom loads a ROM file into the Gameboy's cartridge and returns an error if the file could not be loaded.
type Joypad ¶
type Joypad struct { Start bool Select bool B bool A bool Down bool Up bool Left bool Right bool // contains filtered or unexported fields }
Joypad represents Gameboy input controller. It holds which keys are down/up.
Click to show internal directories.
Click to hide internal directories.