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

Function Sync

src/boards/ffe.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41};
42
43static void Sync(void) {
44 setprg8r(0x10, 0x6000, 0);
45 if (ffemode) {
46 int i;
47 for (i = 0; i < 8; i++) setchr1(i << 10, creg[i]);
48 setprg8(0x8000, preg[0]);
49 setprg8(0xA000, preg[1]);
50 setprg8(0xC000, preg[2]);
51 setprg8(0xE000, preg[3]);
52 } else {
53 setchr8(latch & 3);
54 setprg16(0x8000, (latch >> 2) & 0x3F);
55 setprg16(0xc000, 0x7);
56 }
57 switch (mirr) {
58 case 0: setmirror(MI_0); break;
59 case 1: setmirror(MI_1); break;
60 case 2: setmirror(MI_V); break;
61 case 3: setmirror(MI_H); break;
62 }
63}
64
65static DECLFW(FFEWriteMirr) {
66 mirr = ((A << 1) & 2) | ((V >> 4) & 1);

Callers 3

DECLFWFunction · 0.70
FFEPowerFunction · 0.70
StateRestoreFunction · 0.70

Calls 6

setprg8rFunction · 0.85
setchr1Function · 0.85
setprg8Function · 0.85
setchr8Function · 0.85
setprg16Function · 0.85
setmirrorFunction · 0.85

Tested by

no test coverage detected