mirror of https://github.com/stella-emu/stella.git
First pass to get debugger stuff working for TIA display.
This commit is contained in:
parent
c0aa5c83f5
commit
42122c3465
|
@ -665,10 +665,9 @@ void TIA::enableColorLoss(bool enabled)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// TODO: stub
|
||||
uInt32 TIA::clocksThisLine() const
|
||||
{
|
||||
return 0;
|
||||
return myHctr + myXDelta;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -684,11 +683,31 @@ bool TIA::partialFrame() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// TODO: stub
|
||||
bool TIA::scanlinePos(uInt16& x, uInt16& y) const
|
||||
{
|
||||
if(partialFrame())
|
||||
{
|
||||
// We only care about the scanline position when it's in the viewable area
|
||||
if(1)//myFramePointerClocks >= myFramePointerOffset)
|
||||
{
|
||||
x = clocksThisLine();//(myFramePointerClocks - myFramePointerOffset) % 160;
|
||||
y = scanlines();//(myFramePointerClocks - myFramePointerOffset) / 160;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x = width();
|
||||
y = height();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIA::toggleBit(TIABit b, uInt8 mode)
|
||||
|
@ -822,78 +841,34 @@ void TIA::setJitterRecoveryFactor(Int32 f)
|
|||
{
|
||||
}
|
||||
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::updateScanline()
|
||||
{
|
||||
#if 0 // FIXME
|
||||
// Start a new frame if the old one was finished
|
||||
if(!myPartialFrameFlag)
|
||||
startFrame();
|
||||
|
||||
myPartialFrameFlag = true; // true either way
|
||||
|
||||
#if 0
|
||||
int totalClocks = (mySystem->cycles() * 3) - myClockWhenFrameStarted;
|
||||
int endClock = ((totalClocks + 228) / 228) * 228;
|
||||
|
||||
int clock;
|
||||
do {
|
||||
mySystem->m6502().execute(1);
|
||||
clock = mySystem->cycles() * 3;
|
||||
updateFrame(clock);
|
||||
} while(clock < endClock);
|
||||
|
||||
// if we finished the frame, get ready for the next one
|
||||
if(!myPartialFrameFlag)
|
||||
endFrame();
|
||||
updateScanlineByStep();
|
||||
} while((mySystem->cycles() * 3) < endClock);
|
||||
#endif
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::updateScanlineByStep()
|
||||
{
|
||||
#if 0 // FIXME
|
||||
// Start a new frame if the old one was finished
|
||||
if(!myPartialFrameFlag)
|
||||
startFrame();
|
||||
|
||||
// true either way:
|
||||
myPartialFrameFlag = true;
|
||||
|
||||
// Update frame by one CPU instruction/color clock
|
||||
mySystem->m6502().execute(1);
|
||||
updateFrame(mySystem->cycles() * 3);
|
||||
|
||||
// if we finished the frame, get ready for the next one
|
||||
if(!myPartialFrameFlag)
|
||||
endFrame();
|
||||
#endif
|
||||
updateEmulation();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::updateScanlineByTrace(int target)
|
||||
{
|
||||
#if 0 // FIXME
|
||||
// Start a new frame if the old one was finished
|
||||
if(!myPartialFrameFlag)
|
||||
startFrame();
|
||||
|
||||
// true either way:
|
||||
myPartialFrameFlag = true;
|
||||
|
||||
while(mySystem->m6502().getPC() != target)
|
||||
{
|
||||
mySystem->m6502().execute(1);
|
||||
updateFrame(mySystem->cycles() * 3);
|
||||
updateScanlineByStep();
|
||||
}
|
||||
|
||||
// if we finished the frame, get ready for the next one
|
||||
if(!myPartialFrameFlag)
|
||||
endFrame();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::updateEmulation()
|
||||
{
|
||||
|
|
|
@ -285,7 +285,6 @@ class TIA : public Device
|
|||
// Clear both internal TIA buffers to black (palette color 0)
|
||||
void clearBuffers();
|
||||
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
/**
|
||||
This method should be called to update the TIA with a new scanline.
|
||||
*/
|
||||
|
@ -302,7 +301,6 @@ class TIA : public Device
|
|||
scanline by tracing to target address.
|
||||
*/
|
||||
void updateScanlineByTrace(int target);
|
||||
#endif
|
||||
|
||||
/**
|
||||
Save the current state of this device to the given Serializer.
|
||||
|
|
Loading…
Reference in New Issue