mirror of https://github.com/stella-emu/stella.git
pseudo-op "_scycles" (cycles into current scanline) added
This commit is contained in:
parent
3045a0ddf7
commit
53d4745479
|
@ -732,6 +732,7 @@ Debugger::PseudoRegister Debugger::ourPseudoRegisters[NUM_PSEUDO_REGS] = {
|
|||
{ "_cyclesHi", "Higher 32 bits of number of cycles since emulation started"},
|
||||
{ "_rwport", "Address at which a read from a write port occurred" },
|
||||
{ "_scan", "Current scanline count" },
|
||||
{ "_scycles", "Number of cycles in current scanline" },
|
||||
{ "_vblank", "Whether vertical blank is enabled (1 or 0)" },
|
||||
{ "_vsync", "Whether vertical sync is enabled (1 or 0)" }
|
||||
// CPU address access functions:
|
||||
|
|
|
@ -322,7 +322,7 @@ class Debugger : public DialogContainer
|
|||
string name, help;
|
||||
};
|
||||
static const uInt32 NUM_BUILTIN_FUNCS = 18;
|
||||
static const uInt32 NUM_PSEUDO_REGS = 10;
|
||||
static const uInt32 NUM_PSEUDO_REGS = 11;
|
||||
static BuiltinFunction ourBuiltinFunctions[NUM_BUILTIN_FUNCS];
|
||||
static PseudoRegister ourPseudoRegisters[NUM_PSEUDO_REGS];
|
||||
|
||||
|
|
|
@ -730,6 +730,12 @@ int TIADebug::clocksThisLine() const
|
|||
return myTIA.clocksThisLine();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int TIADebug::cyclesThisLine() const
|
||||
{
|
||||
return myTIA.clocksThisLine()/3;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIADebug::vsync() const
|
||||
{
|
||||
|
|
|
@ -163,6 +163,7 @@ class TIADebug : public DebuggerSystem
|
|||
int cyclesLo() const;
|
||||
int cyclesHi() const;
|
||||
int clocksThisLine() const;
|
||||
int cyclesThisLine() const;
|
||||
bool vsync() const;
|
||||
bool vblank() const;
|
||||
int vsyncAsInt() const { return int(vsync()); } // so we can use _vsync pseudo-register
|
||||
|
|
|
@ -229,6 +229,8 @@ TiaMethod getTiaSpecial(char* ch)
|
|||
{
|
||||
if(BSPF::equalsIgnoreCase(ch, "_scan"))
|
||||
return &TIADebug::scanlines;
|
||||
if(BSPF::equalsIgnoreCase(ch, "_scycles"))
|
||||
return &TIADebug::cyclesThisLine;
|
||||
else if(BSPF::equalsIgnoreCase(ch, "_fcount"))
|
||||
return &TIADebug::frameCount;
|
||||
else if(BSPF::equalsIgnoreCase(ch, "_fcycles"))
|
||||
|
|
Loading…
Reference in New Issue