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

Function DECLFW

src/input.cpp:164–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164static DECLFW(B4016)
165{
166 if(portFC.driver)
167 portFC.driver->Write(V&7);
168
169 for(int i=0;i<2;i++)
170 joyports[i].driver->Write(V&1);
171
172 if((LastStrobe&1) && (!(V&1)))
173 {
174 //old comment:
175 //This strobe code is just for convenience. If it were
176 //with the code in input / *.c, it would more accurately represent
177 //what's really going on. But who wants accuracy? ;)
178 //Seriously, though, this shouldn't be a problem.
179 //new comment:
180
181 //mbg 6/7/08 - I guess he means that the input drivers could track the strobing themselves
182 //I dont see why it is unreasonable here.
183 for(int i=0;i<2;i++)
184 joyports[i].driver->Strobe(i);
185 if(portFC.driver)
186 portFC.driver->Strobe();
187 }
188 LastStrobe=V&0x1;
189 RawReg4016 = V;
190}
191
192//a main joystick port driver representing the case where nothing is plugged in
193static INPUTC DummyJPort={0};

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.45
StrobeMethod · 0.45

Tested by

no test coverage detected