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

Function Sync

src/boards/253.cpp:44–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42};
43
44static void Sync(void) {
45 uint8 i;
46 setprg8r(0x10, 0x6000, 0);
47 setprg8(0x8000, prg[0]);
48 setprg8(0xa000, prg[1]);
49 setprg8(0xc000, ~1);
50 setprg8(0xe000, ~0);
51 for (i = 0; i < 8; i++) {
52 uint32 chr = chrlo[i] | (chrhi[i] << 8);
53 if (((chrlo[i] == 4) || (chrlo[i] == 5)) && !vlock)
54 setchr1r(0x10, i << 10, chr & 1);
55 else
56 setchr1(i << 10, chr);
57 }
58 switch (mirr) {
59 case 0: setmirror(MI_V); break;
60 case 1: setmirror(MI_H); break;
61 case 2: setmirror(MI_0); break;
62 case 3: setmirror(MI_1); break;
63 }
64}
65
66static DECLFW(M253Write) {
67 if ((A >= 0xB000) && (A <= 0xE00C)) {

Callers 3

DECLFWFunction · 0.70
M253PowerFunction · 0.70
StateRestoreFunction · 0.70

Calls 5

setprg8rFunction · 0.85
setprg8Function · 0.85
setchr1rFunction · 0.85
setchr1Function · 0.85
setmirrorFunction · 0.85

Tested by

no test coverage detected