Documentation ¶
Index ¶
Constants ¶
View Source
const ( VBLANK_INTERRUPT = 0 LCDC_INTERRUPT = 1 LCDC = 0xFF40 // LCD Control STAT = 0xFF41 // LCD Status/Mode SCY = 0xFF42 // Scroll Y SCX = 0xFF43 // Scroll X LY = 0xFF44 // Scanline LYC = 0xFF45 // Scanline Comparison DMA = 0xFF46 BGP = 0xFF47 // Background Palette OBP0 = 0xFF48 // Object/Sprite Background Palette 0 OBP1 = 0xFF49 // Object/Sprite Background Palette 1 WY = 0xFF4A // Window Y WX = 0xFF4B // Window X // Color-related Addresses VRAMBank = 0xFF4F // VRAM Bank BGPI = 0xFF68 // Background Palette Index BGPD = 0xFF69 // Background Palette Data OBPI = 0xFF6A // Sprite Palette Index OBPD = 0xFF6B // Sprite Palette Data HDMA1 = 0xFF51 // New DMA Source, High HDMA3 = 0xFF53 // New DMA Destination, High HDMA2 = 0xFF52 // New DMA Source, Low HDMA4 = 0xFF54 // New DMA Destination, Low HDMA5 = 0xFF55 // New DMA Length/Mode/Start )
View Source
const ( MODE0 = 0x00 // HBlank MODE1 = 0x01 // VBlank MODE2 = 0x02 // OAM Access MODE3 = 0x03 // VRAM Acess )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PPU ¶
type PPU struct { FrameBuffer *image.RGBA VRAM [16384]byte OAM []*Sprite VisibleSprites []*Sprite STAT *stat // LCD Status/Mode SCY byte // Scroll Y SCX byte // Scroll X LY byte // Scanline LYC byte DMA byte BGP byte OBP0 byte OBP1 byte WY byte // Window Y WX byte // Window X // Color-related Addresses VRAMBank byte // VRAM Bank HDMA1 byte // New DMA Source, High HDMA3 byte // New DMA Destination, High HDMA2 byte // New DMA Source, Low HDMA4 byte // New DMA Destination, Low HDMA5 byte // New DMA Length/Mode/Start // LCD Control byte LCDC byte Cycles int // Number of cycles since the last LCD Status Mode Change // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.