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

Function LogDPCM

src/sound.cpp:176–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void LogDPCM(int romaddress, int dpcmsize){
177 int i = GetPRGAddress(romaddress);
178
179 if(i == -1)return;
180
181 for (int dpcmstart = i; dpcmstart < (i + dpcmsize); dpcmstart++) {
182 if(!(cdloggerdata[dpcmstart] & 0x40)) {
183 cdloggerdata[dpcmstart] |= 0x40;
184 cdloggerdata[dpcmstart] |= (romaddress >> 11) & 0x0c;
185
186 if(!(cdloggerdata[dpcmstart] & 2)){
187 datacount++;
188 cdloggerdata[dpcmstart] |= 2;
189 if(!(cdloggerdata[dpcmstart] & 1))undefinedcount--;
190 }
191 }
192 }
193}
194
195/* Instantaneous? Maybe the new freq value is being calculated all of the time... */
196

Callers 1

PrepDPCMFunction · 0.85

Calls 1

GetPRGAddressFunction · 0.85

Tested by

no test coverage detected