diff --git a/Changes.txt b/Changes.txt index b6c8a6f80..90170a9c8 100644 --- a/Changes.txt +++ b/Changes.txt @@ -24,6 +24,9 @@ * Fixed wrong display of HM values in debugger after 'HMCLR' has been 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, but internally the emulation is much more accurate compared to the real thing). Related to this, improved the debugger support for this diff --git a/docs/debugger.html b/docs/debugger.html index de8ec3405..cc133db49 100644 --- a/docs/debugger.html +++ b/docs/debugger.html @@ -541,12 +541,13 @@ that holds 'number of scanlines' on an actual console).

- - + + + - +
FunctionDescription
_bank Currently selected bank
_rwport Last address to attempt a read from the cart write port
_fcount Number of frames since emulation started
_cclocks Color clocks on a scanline
_fcount Number of frames since emulation started
_fcycles Number of cycles since frame started
_rwport Last address to attempt a read from the cart write port
_scan Current scanline count
_vsync Whether vertical sync is enabled (1 or 0)
_vblank Whether vertical blank is enabled (1 or 0)
_vsync Whether vertical sync is enabled (1 or 0)

_scan always contains the current scanline count. You can use diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index b5154c37e..838dc7cfd 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -96,13 +96,13 @@ static const char* const pseudo_registers[][2] = { // { "name", "help text" } { "_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" }, { "_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)" }, + { "_vsync", "Whether vertical sync is enabled (1 or 0)" }, // empty string marks end of list, do not remove { 0, 0 } diff --git a/src/yacc/YaccParser.cxx b/src/yacc/YaccParser.cxx index 23506b2aa..6f950d8d1 100644 --- a/src/yacc/YaccParser.cxx +++ b/src/yacc/YaccParser.cxx @@ -217,6 +217,8 @@ TiaMethod getTiaSpecial(char* ch) return &TIADebug::scanlines; else if(BSPF::equalsIgnoreCase(ch, "_fcount")) return &TIADebug::frameCount; + else if(BSPF::equalsIgnoreCase(ch, "_fcycles")) + return &TIADebug::frameCycles; else if(BSPF::equalsIgnoreCase(ch, "_cclocks")) return &TIADebug::clocksThisLine; else if(BSPF::equalsIgnoreCase(ch, "_vsync"))