Fixed reading of VBLANK register in debugger.

This commit is contained in:
Stephen Anthony 2017-02-20 20:42:33 -03:30
parent c99cb33cda
commit 30e1996d5b
4 changed files with 6 additions and 5 deletions

View File

@ -151,14 +151,13 @@ uInt8 RiotDebug::inpt(int x)
bool RiotDebug::vblank(int bit)
{
if(bit == 6) // latches
return 0;//FIXME mySystem.tia().myVBLANK & 0x40;
return myConsole.tia().myInput0.vblankLatched();
else if(bit == 7) // dump to ground
return 0;//FIXME mySystem.tia().myDumpEnabled;
return myConsole.tia().myPaddleReaders[0].vblankDumped();
else
return true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 RiotDebug::tim1T(int newVal)
{

View File

@ -30,6 +30,7 @@ class LatchedInput
void reset();
void vblank(uInt8 value);
bool vblankLatched() const { return myModeLatched; }
uInt8 inpt(bool pinState);

View File

@ -32,6 +32,7 @@ class PaddleReader
void reset(double timestamp);
void vblank(uInt8 value, double timestamp);
bool vblankDumped() const { return myIsDumped; }
uInt8 inpt(double timestamp);

View File

@ -221,8 +221,8 @@ class TIA : public Device
bool isRendering() const { return myFrameManager.isRendering(); }
/**
Answers the current position of the virtual 'electron beam' used to
draw the TIA image.
Answers the current position of the virtual 'electron beam' used
when drawing the TIA image in debugger mode.
@return The x/y coordinates of the scanline electron beam, and whether
it is in the visible/viewable area of the screen