ppu

package
v0.0.0-...-3a42d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CYCLE = 2
View Source
const KB = 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

type CPU interface {
	Read(addr uint16) uint8
	IRQ(id int)
	HBlank()
	IsCGBMode() bool // CGBモードかどうか
}

type DMA

type DMA struct {
	// contains filtered or unexported fields
}

OAM DMA

type PPU

type PPU struct {
	FrameCounter uint64

	DMA *DMA

	OAM     [160]uint8
	Palette [(4 * 8) * 2]uint16 // 4bppの8パレットが BG と OBJ の1つずつ
	// contains filtered or unexported fields
}

SoCに組み込まれているため、`/cpu`にある方が正確ではある

func New

func New(cpu CPU) *PPU

func (*PPU) ColorizeDMG

func (p *PPU) ColorizeDMG()

GBCのBIOSがやる、DMGゲームに対する色付け処理

func (*PPU) Read

func (p *PPU) Read(addr uint16) uint8

func (*PPU) Reset

func (p *PPU) Reset()

func (*PPU) Run

func (p *PPU) Run(cycles8MHz int64)

func (*PPU) Screen

func (p *PPU) Screen() []color.NRGBA

func (*PPU) SkipBIOS

func (p *PPU) SkipBIOS()

func (*PPU) TriggerDMA

func (p *PPU) TriggerDMA(src uint16, m int64)

func (*PPU) Write

func (p *PPU) Write(addr uint16, val uint8)

type VRAM

type VRAM struct {
	// contains filtered or unexported fields
}

便宜的にPPU構造体に入れているが、正確にはボード上にある

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL