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

Function SQReload

src/sound.cpp:209–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209static void SQReload(int x, uint8 V)
210{
211 if(EnabledChannels&(1<<x))
212 lengthcount[x]=lengthtable[(V>>3)&0x1f];
213
214 /* use the low 8 bits data from pulse period
215 * instead of from the sweep period */
216 /* https://forums.nesdev.com/viewtopic.php?t=219&p=1431 */
217 curfreq[x]=(curfreq[x] & 0xff)|((V&7)<<8);
218 RectDutyCount[x]=7;
219 EnvUnits[x].reloaddec=1;
220}
221
222static DECLFW(Write_PSG)
223{

Callers 1

DECLFWFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected