| 247 | } |
| 248 | |
| 249 | unsigned 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 | |
| 280 | void SIDsound::write(unsigned int adr, unsigned char value) |
| 281 | { |
no outgoing calls
no test coverage detected