Documentation ¶
Index ¶
Constants ¶
View Source
const ( NoIRQ = iota VBlankIRQ LCDCIRQ TimerIRQ SerialIRQ JoypadIRQ )
View Source
const ( JOYPIO byte = 0x00 SBIO byte = 0x01 SCIO byte = 0x02 DIVIO byte = 0x04 TIMAIO byte = 0x05 TMAIO byte = 0x06 TACIO byte = 0x07 IFIO byte = 0x0f LCDCIO byte = 0x40 LCDSTATIO byte = 0x41 SCYIO byte = 0x42 SCXIO byte = 0x43 LYIO byte = 0x44 LYCIO byte = 0x45 DMAIO byte = 0x46 BGPIO byte = 0x47 OBP0IO byte = 0x48 OBP1IO byte = 0x49 WYIO byte = 0x4a WXIO byte = 0x4b KEY0IO byte = 0x4c KEY1IO byte = 0x4d VBKIO byte = 0x4f BANKIO byte = 0x50 HDMA1IO byte = 0x51 HDMA2IO byte = 0x52 HDMA3IO byte = 0x53 HDMA4IO byte = 0x54 HDMA5IO byte = 0x55 BCPSIO byte = 0x68 BCPDIO byte = 0x69 OCPSIO byte = 0x6a OCPDIO byte = 0x6b SVBKIO byte = 0x70 IEIO byte = 0xff )
View Source
const ( INS_ADC = iota INS_AND INS_ADD INS_CP INS_DEC INS_INC INS_OR INS_SBC INS_SUB INS_XOR INS_BIT INS_RES INS_SET INS_SWAP INS_RL INS_RLA INS_RLC INS_RLCA INS_RR INS_RRA INS_RRC INS_RRCA INS_SLA INS_SRA INS_SRL INS_LD INS_CALL INS_JP INS_JR INS_RET INS_RETI INS_RST INS_POP INS_PUSH INS_CCF INS_CPL INS_DAA INS_DI INS_EI INS_HALT INS_NOP INS_SCF INS_STOP INS_PREFIX INS_NONE INS_LDH )
View Source
const ( OP_NONE = iota OP_BC OP_d16 OP_BC_PAREN OP_A OP_AF OP_B OP_d8 OP_a16_PAREN OP_SP OP_SP_PLUS_r8 OP_HL OP_C OP_C_PAREN OP_DE OP_DE_PAREN OP_D OP_r8 OP_a8_PAREN OP_a16 OP_E OP_NZ OP_NC OP_H OP_L OP_Z OP_HLPLUS_PAREN OP_HLMINUS_PAREN OP_HL_PAREN )
View Source
const ( A = iota B C D E H L F )
View Source
const ( AF = iota BC DE HL HLI HLD SP PC )
View Source
const (
GB_DMG_DIV_PERIOD = 16 // this is INTERNAL div interval, 16cycle or 8cycles
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GBC ¶
type GBC struct { Reg Register Inst CurInst // memory ROM ROM RAM RAM WRAM WRAM IO [0x100]byte // 0xff00-0xffff Cartridge *cart.Cartridge Halt bool Sound *apu.APU Video *video.Video RTC *rtc.RTC DoubleSpeed bool // plugins Callbacks []*util.Callback // contains filtered or unexported fields }
GBC core structure
func (*GBC) PanicHandler ¶
func (*GBC) TransferROM ¶
TransferROM Transfer ROM from cartridge to Memory
type RAM ¶
type RAM struct { Buffer [16][0x2000]byte // num of banks changes depending on ROM // contains filtered or unexported fields }
RAM - 0xa000-0xbfff
type ROM ¶
type ROM struct {
// contains filtered or unexported fields
}
ROM
0x0000-0x3fff: bank0
0x4000-0x7fff: bank1-256
Source Files ¶
Click to show internal directories.
Click to hide internal directories.