Added '_fcycles' debugger pseudo-op (gives cycles since frame started).

This commit is contained in:
Stephen Anthony 2017-09-08 17:59:33 -02:30
parent ebb8725126
commit b6907d0d8a
4 changed files with 13 additions and 7 deletions

View File

@ -24,6 +24,9 @@
* Fixed wrong display of HM values in debugger after 'HMCLR' has been * Fixed wrong display of HM values in debugger after 'HMCLR' has been
executed. executed.
* Added debugger pseudo-register '_fcycles', which gives the number of
CPU cycles that have occurred since the frame started.
* Improved emulation of 'FE' bankswitch scheme (no user-visible changes, * Improved emulation of 'FE' bankswitch scheme (no user-visible changes,
but internally the emulation is much more accurate compared to the but internally the emulation is much more accurate compared to the
real thing). Related to this, improved the debugger support for this real thing). Related to this, improved the debugger support for this

View File

@ -541,12 +541,13 @@ that holds 'number of scanlines' on an actual console).</p>
<table border="1" cellpadding="3"> <table border="1" cellpadding="3">
<tr><th>Function</th><th>Description</th></tr> <tr><th>Function</th><th>Description</th></tr>
<tr><td> _bank</td><td> Currently selected bank</td></tr> <tr><td> _bank</td><td> Currently selected bank</td></tr>
<tr><td> _rwport</td><td> Last address to attempt a read from the cart write port</td></tr>
<tr><td> _fcount</td><td> Number of frames since emulation started</td></tr>
<tr><td> _cclocks</td><td> Color clocks on a scanline</td></tr> <tr><td> _cclocks</td><td> Color clocks on a scanline</td></tr>
<tr><td> _fcount</td><td> Number of frames since emulation started</td></tr>
<tr><td> _fcycles</td><td> Number of cycles since frame started</td></tr>
<tr><td> _rwport</td><td> Last address to attempt a read from the cart write port</td></tr>
<tr><td> _scan</td><td> Current scanline count</td></tr> <tr><td> _scan</td><td> Current scanline count</td></tr>
<tr><td> _vsync</td><td> Whether vertical sync is enabled (1 or 0)</td></tr>
<tr><td> _vblank</td><td> Whether vertical blank is enabled (1 or 0)</td></tr> <tr><td> _vblank</td><td> Whether vertical blank is enabled (1 or 0)</td></tr>
<tr><td> _vsync</td><td> Whether vertical sync is enabled (1 or 0)</td></tr>
</table> </table>
<p><b>_scan</b> always contains the current scanline count. You can use <p><b>_scan</b> always contains the current scanline count. You can use

View File

@ -96,13 +96,13 @@ static const char* const pseudo_registers[][2] = {
// { "name", "help text" } // { "name", "help text" }
{ "_bank", "Currently selected bank" }, { "_bank", "Currently selected bank" },
{ "_cclocks", "Color clocks on current scanline" },
{ "_fcount", "Number of frames since emulation started" },
{ "_fcycles", "Number of cycles since frame 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" },
{ "_fcount", "Number of frames since emulation started" },
//FIXME { "_fcycles", "Number of cycles since frame started" },
{ "_cclocks", "Color clocks on current scanline" },
{ "_vsync", "Whether vertical sync is enabled (1 or 0)" },
{ "_vblank", "Whether vertical blank is enabled (1 or 0)" }, { "_vblank", "Whether vertical blank is enabled (1 or 0)" },
{ "_vsync", "Whether vertical sync is enabled (1 or 0)" },
// empty string marks end of list, do not remove // empty string marks end of list, do not remove
{ 0, 0 } { 0, 0 }

View File

@ -217,6 +217,8 @@ TiaMethod getTiaSpecial(char* ch)
return &TIADebug::scanlines; return &TIADebug::scanlines;
else if(BSPF::equalsIgnoreCase(ch, "_fcount")) else if(BSPF::equalsIgnoreCase(ch, "_fcount"))
return &TIADebug::frameCount; return &TIADebug::frameCount;
else if(BSPF::equalsIgnoreCase(ch, "_fcycles"))
return &TIADebug::frameCycles;
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"))