Documentation
¶
Index ¶
- Constants
- type CPU
- type DMA
- type LCDStatIRQInfo
- type PPU
- func (p *PPU) ColorizeDMG()
- func (p *PPU) CreateSnapshot() Snapshot
- func (p *PPU) Frame() uint64
- func (p *PPU) Read(addr uint16) uint8
- func (p *PPU) Reset()
- func (p *PPU) RestoreSnapshot(snap Snapshot) bool
- func (p *PPU) Run(cycles8MHz int64)
- func (p *PPU) Screen() []color.NRGBA
- func (p *PPU) SkipBIOS()
- func (p *PPU) TriggerDMA(src uint16, m int64)
- func (p *PPU) Write(addr uint16, val uint8)
- type Snapshot
- type VRAM
Constants ¶
View Source
const CYCLE = 2
View Source
const KB = 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LCDStatIRQInfo ¶
フレームの間に起きたLCDSTAT IRQに関する情報(フレームの始まりにリセットされる)
type PPU ¶
type PPU struct { RAM VRAM DMA DMA OAM [160]uint8 Palette [(4 * 8) * 2]uint16 // 4bppの8パレットが BG と OBJ の1つずつ // For debugging StatIRQ LCDStatIRQInfo // contains filtered or unexported fields }
SoCに組み込まれているため、`/cpu`にある方が正確ではある また、コードをシンプルにしたいのでスキャンライン単位で描画を行うことにしている(スキャンライン中にSCX,SCYやWX, WYを変更するようなゲームでは正しく描画されない場合がある)
func (*PPU) CreateSnapshot ¶
func (*PPU) RestoreSnapshot ¶
func (*PPU) TriggerDMA ¶
Click to show internal directories.
Click to hide internal directories.