Re-enable viewing TIA sound output in the debugger.

This code is only temporary, until we more properly deal with it
in the new sound core.
This commit is contained in:
Stephen Anthony 2017-03-24 21:13:31 -02:30
parent 7a0f322224
commit 90aa152f59
3 changed files with 33 additions and 26 deletions

View File

@ -344,73 +344,55 @@ bool TIADebug::collision(CollisionBit id) const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 TIADebug::audC0(int newVal)
{
#if 0 // FIXME
if(newVal > -1)
mySystem.poke(AUDC0, newVal);
return myTIA.myAUDC0;
#endif
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 TIADebug::audC1(int newVal)
{
#if 0 // FIXME
if(newVal > -1)
mySystem.poke(AUDC1, newVal);
return myTIA.myAUDC1;
#endif
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 TIADebug::audV0(int newVal)
{
#if 0 // FIXME
if(newVal > -1)
mySystem.poke(AUDV0, newVal);
return myTIA.myAUDV0;
#endif
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 TIADebug::audV1(int newVal)
{
#if 0 // FIXME
if(newVal > -1)
mySystem.poke(AUDV1, newVal);
return myTIA.myAUDV1;
#endif
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 TIADebug::audF0(int newVal)
{
#if 0 // FIXME
if(newVal > -1)
mySystem.poke(AUDF0, newVal);
return myTIA.myAUDF0;
#endif
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 TIADebug::audF1(int newVal)
{
#if 0 // FIXME
if(newVal > -1)
mySystem.poke(AUDF1, newVal);
return myTIA.myAUDF1;
#endif
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -138,15 +138,16 @@ void TIA::reset()
myFrameManager.reset();
toggleFixedColors(0); // Turn off debug colours
// FIXME - rework this when we add the new sound core
myAUDV0 = myAUDV1 = myAUDF0 = myAUDF1 = myAUDC0 = myAUDC1 = 0;
frameReset(); // Recalculate the size of the display
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::frameReset()
{
// Clear frame buffers
clearBuffers();
myAutoFrameEnabled = (mySettings.getInt("framerate") <= 0);
}
@ -215,7 +216,7 @@ bool TIA::save(Serializer& out) const
if(!myInput1.save(out)) return false;
// Save the sound sample stuff ...
mySound.save(out);
if(!mySound.save(out)) return false;
}
catch(...)
{
@ -392,14 +393,33 @@ bool TIA::poke(uInt16 address, uInt8 value)
break;
////////////////////////////////////////////////////////////
// FIXME - rework this when we add the new sound core
case AUDV0:
case AUDV1:
case AUDF0:
case AUDF1:
case AUDC0:
case AUDC1:
myAUDV0 = value & 0x0f;
mySound.set(address, value, mySystem->cycles());
break;
case AUDV1:
myAUDV1 = value & 0x0f;
mySound.set(address, value, mySystem->cycles());
break;
case AUDF0:
myAUDF0 = value & 0x1f;
mySound.set(address, value, mySystem->cycles());
break;
case AUDF1:
myAUDF1 = value & 0x1f;
mySound.set(address, value, mySystem->cycles());
break;
case AUDC0:
myAUDC0 = value & 0x0f;
mySound.set(address, value, mySystem->cycles());
break;
case AUDC1:
myAUDC1 = value & 0x0f;
mySound.set(address, value, mySystem->cycles());
break;
////////////////////////////////////////////////////////////
case HMOVE:
myDelayQueue.push(HMOVE, value, Delay::hmove);

View File

@ -462,6 +462,11 @@ class TIA : public Device
LatchedInput myInput0;
LatchedInput myInput1;
//////////////////////////////////////////////////////////////
// Audio values; only used by TIADebug
// FIXME - remove this when the new sound core is implemented
uInt8 myAUDV0, myAUDV1, myAUDC0, myAUDC1, myAUDF0, myAUDF1;
private:
TIA() = delete;
TIA(const TIA&) = delete;