MCPcopy
hub / github.com/fogleman/nes / backgroundPixel

Method backgroundPixel

nes/ppu.go:508–514  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

506}
507
508func (ppu *PPU) backgroundPixel() byte {
509 if ppu.flagShowBackground == 0 {
510 return 0
511 }
512 data := ppu.fetchTileData() >> ((7 - ppu.x) * 4)
513 return byte(data & 0x0F)
514}
515
516func (ppu *PPU) spritePixel() (byte, byte) {
517 if ppu.flagShowSprites == 0 {

Callers 1

renderPixelMethod · 0.95

Calls 1

fetchTileDataMethod · 0.95

Tested by

no test coverage detected