MCPcopy Create free account
hub / github.com/TASEmulators/fceux / ppu_getScroll

Function ppu_getScroll

src/ppu.cpp:561–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559int newppu = 0;
560
561void ppu_getScroll(int &xpos, int &ypos) {
562 if (newppu) {
563 ypos = ppur._vt * 8 + ppur._fv + ppur._v * 256;
564 xpos = ppur._ht * 8 + ppur.fh + ppur._h * 256;
565 } else {
566 xpos = ((RefreshAddr & 0x400) >> 2) | ((RefreshAddr & 0x1F) << 3) | XOffset;
567
568 ypos = ((RefreshAddr & 0x3E0) >> 2) | ((RefreshAddr & 0x7000) >> 12);
569 if (RefreshAddr & 0x800) ypos += 240;
570 }
571}
572//---------------
573
574static DECLFR(A2002) {

Callers 3

FCEUD_UpdateNTViewFunction · 0.85
updateRegisterViewMethod · 0.85
FCEUD_UpdateNTViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected