Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartInfo ¶
type CartInfo struct { // Title is the game title (11 or 16 chars) Title string // ManufacturerCode is a mysterious optional 4-char code ManufacturerCode string // CGBFlag describes if it's CGB, DMG, or both-supported CGBFlag byte // NewLicenseeCode is used to indicate the publisher NewLicenseeCode string // SGBFlag indicates SGB support SGBFlag byte // CartridgeType indicates MBC-type, accessories, etc CartridgeType byte // ROMSizeCode indicates the size of the ROM ROMSizeCode byte // RAMSizeCode indicates the size of the RAM RAMSizeCode byte // DestinationCode shows if the game is meant for Japan or not DestinationCode byte // OldLicenseeCode is the pre-SGB way to indicate the publisher. // 0x33 indicates the NewLicenseeCode is used instead. // SGB will not function if the old code is not 0x33. OldLicenseeCode byte // MaskRomVersion is the version of the game cart. Usually 0x00. MaskRomVersion byte // HeaderChecksum is a checksum of the header which must be correct for the game to run HeaderChecksum byte }
CartInfo represents a dmg cart header
func ParseCartInfo ¶
ParseCartInfo parses a dmg cart header
func (*CartInfo) GetRAMSize ¶
GetRAMSize decodes the ram size code into an actual size
func (*CartInfo) GetROMSize ¶
GetROMSize decodes the ROM size code into an actual size
type Emulator ¶
type Emulator interface { Step() Framebuffer() []byte FlipRequested() bool UpdateInput(input Input) ReadSoundBuffer([]byte) []byte GetSoundBufferInfo() SoundBufferInfo GetCartRAM() []byte SetCartRAM([]byte) error MakeSnapshot() []byte LoadSnapshot([]byte) (Emulator, error) InDevMode() bool SetDevMode(b bool) UpdateDbgKeyState([]bool) DbgStep() }
Emulator exposes the public facing fns for an emulation session
func NewEmulator ¶
NewEmulator creates an emulation session
func NewGbsPlayer ¶
NewGbsPlayer creates an gbsPlayer session
type Joypad ¶
type Joypad struct { Sel bool Start bool Up bool Down bool Left bool Right bool A bool B bool // contains filtered or unexported fields }
Joypad represents the buttons on a gameboy
type SoundBufferInfo ¶
SoundBufferInfo gives info about the sound buffer. IsValid is used to handle Emulator impls that don't have sound, e.g. errEmu
Source Files ¶
Click to show internal directories.
Click to hide internal directories.