mirror of https://github.com/stella-emu/stella.git
added _cyclesLo and _cyclesHi to debugger prompt
This commit is contained in:
parent
aed2945a56
commit
ba764fdc06
|
@ -99,6 +99,8 @@ static const char* const pseudo_registers[][2] = {
|
||||||
{ "_cclocks", "Color clocks on current scanline" },
|
{ "_cclocks", "Color clocks on current scanline" },
|
||||||
{ "_fcount", "Number of frames since emulation started" },
|
{ "_fcount", "Number of frames since emulation started" },
|
||||||
{ "_fcycles", "Number of cycles since frame started" },
|
{ "_fcycles", "Number of cycles since frame started" },
|
||||||
|
{ "_cyclesLo", "Lower 32 bits of number of cycles since emulation started"},
|
||||||
|
{ "_cyclesHi", "Higher 32 bits of number of cycles since emulation started"},
|
||||||
{ "_rwport", "Address at which a read from a write port occurred" },
|
{ "_rwport", "Address at which a read from a write port occurred" },
|
||||||
{ "_scan", "Current scanline count" },
|
{ "_scan", "Current scanline count" },
|
||||||
{ "_vblank", "Whether vertical blank is enabled (1 or 0)" },
|
{ "_vblank", "Whether vertical blank is enabled (1 or 0)" },
|
||||||
|
|
|
@ -700,6 +700,18 @@ int TIADebug::frameCycles() const
|
||||||
return myTIA.frameCycles();
|
return myTIA.frameCycles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
int TIADebug::cyclesLo() const
|
||||||
|
{
|
||||||
|
return (int)myTIA.cycles();
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
int TIADebug::cyclesHi() const
|
||||||
|
{
|
||||||
|
return (int)(myTIA.cycles() >> 32);
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int TIADebug::scanlines() const
|
int TIADebug::scanlines() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -160,6 +160,8 @@ class TIADebug : public DebuggerSystem
|
||||||
int scanlinesLastFrame() const;
|
int scanlinesLastFrame() const;
|
||||||
int frameCount() const;
|
int frameCount() const;
|
||||||
int frameCycles() const;
|
int frameCycles() const;
|
||||||
|
int cyclesLo() const;
|
||||||
|
int cyclesHi() const;
|
||||||
int clocksThisLine() const;
|
int clocksThisLine() const;
|
||||||
bool vsync() const;
|
bool vsync() const;
|
||||||
bool vblank() const;
|
bool vblank() const;
|
||||||
|
|
|
@ -819,6 +819,12 @@ uInt32 TIA::frameCycles() const
|
||||||
return uInt32(mySystem->cycles() - myCyclesAtFrameStart);
|
return uInt32(mySystem->cycles() - myCyclesAtFrameStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
uInt64 TIA::cycles() const
|
||||||
|
{
|
||||||
|
return uInt64(mySystem->cycles());
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool TIA::electronBeamPos(uInt32& x, uInt32& y) const
|
bool TIA::electronBeamPos(uInt32& x, uInt32& y) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -263,6 +263,11 @@ class TIA : public Device
|
||||||
*/
|
*/
|
||||||
uInt32 frameCycles() const;
|
uInt32 frameCycles() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Answers the total system cycles from the start of the current ROM's emulation.
|
||||||
|
*/
|
||||||
|
uInt64 cycles() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Answers whether the TIA is currently in being rendered
|
Answers whether the TIA is currently in being rendered
|
||||||
(we're in between the start and end of drawing a frame).
|
(we're in between the start and end of drawing a frame).
|
||||||
|
|
|
@ -219,6 +219,10 @@ TiaMethod getTiaSpecial(char* ch)
|
||||||
return &TIADebug::frameCount;
|
return &TIADebug::frameCount;
|
||||||
else if(BSPF::equalsIgnoreCase(ch, "_fcycles"))
|
else if(BSPF::equalsIgnoreCase(ch, "_fcycles"))
|
||||||
return &TIADebug::frameCycles;
|
return &TIADebug::frameCycles;
|
||||||
|
else if(BSPF::equalsIgnoreCase(ch, "_cyclesLo"))
|
||||||
|
return &TIADebug::cyclesLo;
|
||||||
|
else if(BSPF::equalsIgnoreCase(ch, "_cyclesHi"))
|
||||||
|
return &TIADebug::cyclesHi;
|
||||||
else if(BSPF::equalsIgnoreCase(ch, "_cclocks"))
|
else if(BSPF::equalsIgnoreCase(ch, "_cclocks"))
|
||||||
return &TIADebug::clocksThisLine;
|
return &TIADebug::clocksThisLine;
|
||||||
else if(BSPF::equalsIgnoreCase(ch, "_vsync"))
|
else if(BSPF::equalsIgnoreCase(ch, "_vsync"))
|
||||||
|
|
Loading…
Reference in New Issue