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

Function Sync

src/boards/51.cpp:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29};
30
31static void Sync(void) {
32 if (mode & 2) {
33 setprg8(0x6000, ((bank & 7) << 2) | 0x23);
34 setprg16(0x8000, (bank << 1) | 0);
35 setprg16(0xC000, (bank << 1) | 1);
36 } else {
37 setprg8(0x6000, ((bank & 4) << 2) | 0x2F);
38 setprg16(0x8000, (bank << 1) | (mode >> 4));
39 setprg16(0xC000, ((bank & 0xC) << 1) | 7);
40 }
41 if (mode == 0x12)
42 setmirror(MI_H);
43 else
44 setmirror(MI_V);
45 setchr8(0);
46}
47
48static DECLFW(M51WriteMode) {
49 mode = V & 0x12;

Callers 4

DECLFWFunction · 0.70
M51PowerFunction · 0.70
M51ResetFunction · 0.70
StateRestoreFunction · 0.70

Calls 4

setprg8Function · 0.85
setprg16Function · 0.85
setmirrorFunction · 0.85
setchr8Function · 0.85

Tested by

no test coverage detected