MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / read

Method read

extlibs/soloud/src/audiosource/tedsid/sid.cpp:249–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249unsigned char SIDsound::read(unsigned int adr)
250{
251 switch(adr) {
252 case 0x19:
253 case 0x1A:
254 // POTX/POTY paddle AD converters (unemulated)
255 lastByteWritten = 0;
256 return 0xFF;
257
258 // Voice 3 (only) oscillator readout
259 case 0x1B:
260 lastByteWritten = 0;
261 return (unsigned char)(getWaveSample(voice[2])>>0); // 4?
262
263 // Voice 3 EG readout
264 case 0x1C:
265 return (unsigned char)(voice[2].envCurrLevel);
266
267 case 0x1E: // Digiblaster DAC readout
268 if (enableDigiBlaster && model_ == SID8580)
269 {
270 return (unsigned char) (dcDigiBlaster >> DIGIBLASTER_MULT);
271 }
272 return lastByteWritten;
273
274 default:
275 // Write-only registers return the last value written
276 return lastByteWritten;
277 }
278}
279
280void SIDsound::write(unsigned int adr, unsigned char value)
281{

Callers 6

drflac_read_funcFunction · 0.45
drmp3_read_funcFunction · 0.45
drwav_read_funcFunction · 0.45
loadFileMethod · 0.45
loadParamsFileMethod · 0.45
loadFileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected