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

Function FDSInit

src/fds.cpp:137–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135static void RenderSoundHQ(void);
136
137static void FDSInit(void) {
138 memset(FDSRegs, 0, sizeof(FDSRegs));
139 writeskip = DiskPtr = DiskSeekIRQ = 0;
140
141 setmirror(1);
142 setprg8(0xE000, 0); // BIOS
143 setprg32r(1, 0x6000, 0); // 32KB RAM
144 setchr8(0); // 8KB CHR RAM
145
146 MapIRQHook = FDSFix;
147 GameStateRestore = FDSStateRestore;
148
149 SetReadHandler(0x4030, 0x4030, FDSRead4030);
150 SetReadHandler(0x4031, 0x4031, FDSRead4031);
151 SetReadHandler(0x4032, 0x4032, FDSRead4032);
152 SetReadHandler(0x4033, 0x4033, FDSRead4033);
153
154 SetWriteHandler(0x4020, 0x4025, FDSWrite);
155
156 SetWriteHandler(0x6000, 0xDFFF, CartBW);
157 SetReadHandler(0x6000, 0xFFFF, CartBR);
158
159 IRQCount = IRQLatch = IRQa = 0;
160
161 FDSSoundReset();
162 InDisk = 0;
163 SelectDisk = 0;
164
165 mapperFDS_control = 0;
166 mapperFDS_filesize = 0;
167 mapperFDS_block = 0;
168 mapperFDS_blockstart = 0;
169 mapperFDS_blocklen = 0;
170 mapperFDS_diskaddr = 0;
171 mapperFDS_diskaccess = 0;
172}
173
174void FCEU_FDSInsert(void)
175{

Callers 1

FDSGIFunction · 0.85

Calls 7

setmirrorFunction · 0.85
setprg8Function · 0.85
setprg32rFunction · 0.85
setchr8Function · 0.85
SetReadHandlerFunction · 0.85
SetWriteHandlerFunction · 0.85
FDSSoundResetFunction · 0.85

Tested by

no test coverage detected