mirror of https://github.com/stella-emu/stella.git
Added toggling of HMOVE blanks to the TIA, accessed with the Alt-m key.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1872 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
42f3052fbf
commit
616ce6039a
|
@ -1853,6 +1853,12 @@
|
|||
<td>Shift-Cmd + n</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Toggle TIA HMOVE blanks</td>
|
||||
<td>Alt + m</td>
|
||||
<td>Shift-Cmd + m</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Toggle TIA 'Fixed Debug Colors' mode</td>
|
||||
<td>Alt + Comma</td>
|
||||
|
|
|
@ -794,6 +794,15 @@ void Console::toggleTIABit(TIABit bit, const string& bitname, bool show) const
|
|||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleHMOVE() const
|
||||
{
|
||||
if(myTIA->toggleHMOVEBlank())
|
||||
myOSystem->frameBuffer().showMessage("HMOVE blanking enabled");
|
||||
else
|
||||
myOSystem->frameBuffer().showMessage("HMOVE blanking disabled");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::enableBits(bool enable) const
|
||||
{
|
||||
|
|
|
@ -262,6 +262,7 @@ class Console : public Serializable
|
|||
void toggleM1Bit() const { toggleTIABit(M1Bit, "M1"); }
|
||||
void toggleBLBit() const { toggleTIABit(BLBit, "BL"); }
|
||||
void togglePFBit() const { toggleTIABit(PFBit, "PF"); }
|
||||
void toggleHMOVE() const;
|
||||
void enableBits(bool enable) const;
|
||||
|
||||
/**
|
||||
|
|
|
@ -392,6 +392,10 @@ void EventHandler::poll(uInt64 time)
|
|||
myOSystem->console().togglePFBit();
|
||||
break;
|
||||
|
||||
case SDLK_m:
|
||||
myOSystem->console().toggleHMOVE();
|
||||
break;
|
||||
|
||||
case SDLK_COMMA:
|
||||
myOSystem->console().toggleFixedColors();
|
||||
break;
|
||||
|
|
|
@ -126,6 +126,7 @@ void TIA::reset()
|
|||
// Currently no objects are enabled or selectively disabled
|
||||
myEnabledObjects = 0;
|
||||
myDisabledObjects = 0;
|
||||
myAllowHMOVEBlanks = true;
|
||||
|
||||
// Some default values for the registers
|
||||
myColorPtr = myColor;
|
||||
|
@ -509,8 +510,8 @@ bool TIA::load(Serializer& in)
|
|||
mySound.load(in);
|
||||
|
||||
// Reset TIA bits to be on
|
||||
// TODO - should we enable this, or leave it to the user?
|
||||
// enableBits(true);
|
||||
enableBits(true);
|
||||
myAllowHMOVEBlanks = true;
|
||||
myColorPtr = myColor;
|
||||
}
|
||||
catch(const char* msg)
|
||||
|
@ -741,6 +742,13 @@ bool TIA::toggleBit(TIABit b, uInt8 mode)
|
|||
return on;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIA::toggleHMOVEBlank()
|
||||
{
|
||||
myAllowHMOVEBlanks = myAllowHMOVEBlanks ? false : true;
|
||||
return myAllowHMOVEBlanks;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIA::toggleFixedColors(uInt8 mode)
|
||||
{
|
||||
|
@ -953,9 +961,10 @@ void TIA::updateFrame(Int32 clock)
|
|||
// TODO - 08-27-2009: Simulate the weird effects of Cosmic Ark and
|
||||
// Stay Frosty. The movement itself is well understood, but there
|
||||
// also seems to be some widening and blanking occurring as well.
|
||||
// This doesn't properly emulate the effect, but it does give a
|
||||
// fair approximation. More testing is required to figure out
|
||||
// what's really going on here.
|
||||
// This doesn't properly emulate the effect at a low level; it only
|
||||
// simulates the behaviour as visually seen in the aforementioned
|
||||
// ROMs. Other ROMs may break this simulation; more testing is
|
||||
// required to figure out what's really going on here.
|
||||
if(myHMM0mmr && myPOSM0 % 4 == 3)
|
||||
{
|
||||
// Stretch this missle so it's 4 pixels wide, with the 3rd pixel
|
||||
|
@ -1026,7 +1035,7 @@ void TIA::updateFrame(Int32 clock)
|
|||
|
||||
// TODO - 01-21-99: These should be reset right after the first copy
|
||||
// of the player has passed. However, for now we'll just reset at the
|
||||
// end of the scanline since the other way would be to slow.
|
||||
// end of the scanline since the other way would be too slow.
|
||||
mySuppressP0 = mySuppressP1 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1838,11 +1847,9 @@ void TIA::poke(uInt16 addr, uInt8 value)
|
|||
int hpos = (clock - myClockWhenFrameStarted) % 228 - HBLANK;
|
||||
myCurrentHMOVEPos = hpos;
|
||||
|
||||
// Figure out what cycle we're at
|
||||
Int32 x = ((clock - myClockWhenFrameStarted) % 228) / 3;
|
||||
|
||||
// See if we need to enable the HMOVE blank bug
|
||||
myHMOVEBlankEnabled = TIATables::HMOVEBlankEnableCycles[x];
|
||||
myHMOVEBlankEnabled = myAllowHMOVEBlanks ?
|
||||
TIATables::HMOVEBlankEnableCycles[((clock - myClockWhenFrameStarted) % 228) / 3] : false;
|
||||
|
||||
#ifdef USE_MMR_LATCHES
|
||||
// Do we have to undo some of the already applied cycles from an
|
||||
|
|
|
@ -265,6 +265,13 @@ class TIA : public Device
|
|||
*/
|
||||
bool toggleBit(TIABit b, uInt8 mode = 2);
|
||||
|
||||
/**
|
||||
Toggle the display of HMOVE blanks.
|
||||
|
||||
@return Whether the HMOVE blanking was enabled or disabled
|
||||
*/
|
||||
bool toggleHMOVEBlank();
|
||||
|
||||
/**
|
||||
Enables/disable/toggle 'fixed debug colors' mode.
|
||||
|
||||
|
@ -525,6 +532,7 @@ class TIA : public Device
|
|||
Int32 myCurrentHMOVEPos;
|
||||
Int32 myPreviousHMOVEPos;
|
||||
bool myHMOVEBlankEnabled;
|
||||
bool myAllowHMOVEBlanks;
|
||||
|
||||
// Indicates if unused TIA pins are floating on a peek
|
||||
bool myFloatTIAOutputPins;
|
||||
|
|
Loading…
Reference in New Issue