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

Method incrementX

nes/ppu.go:386–398  ·  view source on GitHub ↗

NTSC Timing Helper Functions

()

Source from the content-addressed store, hash-verified

384// NTSC Timing Helper Functions
385
386func (ppu *PPU) incrementX() {
387 // increment hori(v)
388 // if coarse X == 31
389 if ppu.v&0x001F == 31 {
390 // coarse X = 0
391 ppu.v &= 0xFFE0
392 // switch horizontal nametable
393 ppu.v ^= 0x0400
394 } else {
395 // increment coarse X
396 ppu.v++
397 }
398}
399
400func (ppu *PPU) incrementY() {
401 // increment vert(v)

Callers 1

StepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected