mirror of https://github.com/stella-emu/stella.git
Frame greying seems to be working correctly now, except for Ms. Pac-Man
is still messed up. It's something odd the ROM is doing: I think it hits VSYNC twice per frame... which no 2600 ROM should do, I thought...? git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@823 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
eeb5f66848
commit
c0f1ab9cc7
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TIA.cxx,v 1.62 2005-10-09 17:31:47 stephena Exp $
|
// $Id: TIA.cxx,v 1.63 2005-10-11 03:22:43 urchlay Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -137,11 +137,12 @@ void TIA::reset()
|
||||||
// Reset pixel pointer and drawing flag
|
// Reset pixel pointer and drawing flag
|
||||||
myFramePointer = myCurrentFrameBuffer;
|
myFramePointer = myCurrentFrameBuffer;
|
||||||
|
|
||||||
|
myYStart = atoi(myConsole.properties().get("Display.YStart").c_str());
|
||||||
|
myHeight = atoi(myConsole.properties().get("Display.Height").c_str());
|
||||||
|
|
||||||
// Calculate color clock offsets for starting and stoping frame drawing
|
// Calculate color clock offsets for starting and stoping frame drawing
|
||||||
myStartDisplayOffset = 228 *
|
myStartDisplayOffset = 228 * myYStart;
|
||||||
atoi(myConsole.properties().get("Display.YStart").c_str());
|
myStopDisplayOffset = myStartDisplayOffset + 228 * myHeight;
|
||||||
myStopDisplayOffset = myStartDisplayOffset + 228 *
|
|
||||||
atoi(myConsole.properties().get("Display.Height").c_str());
|
|
||||||
|
|
||||||
// Reasonable values to start and stop the current frame drawing
|
// Reasonable values to start and stop the current frame drawing
|
||||||
myClockWhenFrameStarted = mySystem->cycles() * 3;
|
myClockWhenFrameStarted = mySystem->cycles() * 3;
|
||||||
|
@ -1892,16 +1893,14 @@ inline void TIA::waitHorizontalSync()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TIA::greyOutFrame()
|
void TIA::greyOutFrame()
|
||||||
{
|
{
|
||||||
/*
|
unsigned int c = scanlines();
|
||||||
for(int s = scanlines() + 1; s < 300; s++)
|
if(c < myYStart) c = myYStart;
|
||||||
for(int i = 0; i < 160; i++)
|
|
||||||
myCurrentFrameBuffer[s * 160 + i] = 0;
|
for(unsigned int s = c; s < (myHeight + myYStart); s++)
|
||||||
*/
|
for(unsigned int i = 0; i < 160; i++) {
|
||||||
for(int s = scanlines(); s < 300; s++)
|
uInt8 tmp = myCurrentFrameBuffer[ (s - myYStart) * 160 + i] & 0x0f;
|
||||||
for(int i = 0; i < 160; i++) {
|
|
||||||
uInt8 tmp = myCurrentFrameBuffer[s * 160 + i] & 0x0f;
|
|
||||||
tmp >>= 1;
|
tmp >>= 1;
|
||||||
myCurrentFrameBuffer[s * 160 + i] = tmp;
|
myCurrentFrameBuffer[ (s - myYStart) * 160 + i] = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TIA.hxx,v 1.31 2005-07-21 04:10:16 urchlay Exp $
|
// $Id: TIA.hxx,v 1.32 2005-10-11 03:22:43 urchlay Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef TIA_HXX
|
#ifndef TIA_HXX
|
||||||
|
@ -42,7 +42,7 @@ class Settings;
|
||||||
be displayed on screen.
|
be displayed on screen.
|
||||||
|
|
||||||
@author Bradford W. Mott
|
@author Bradford W. Mott
|
||||||
@version $Id: TIA.hxx,v 1.31 2005-07-21 04:10:16 urchlay Exp $
|
@version $Id: TIA.hxx,v 1.32 2005-10-11 03:22:43 urchlay Exp $
|
||||||
*/
|
*/
|
||||||
class TIA : public Device , public MediaSource
|
class TIA : public Device , public MediaSource
|
||||||
{
|
{
|
||||||
|
@ -311,6 +311,13 @@ class TIA : public Device , public MediaSource
|
||||||
uInt32 myFrameHeight;
|
uInt32 myFrameHeight;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// Indicates offset in scanlines when display should begin
|
||||||
|
// (aka the Display.YStart property)
|
||||||
|
uInt32 myYStart;
|
||||||
|
|
||||||
|
// Height of display (aka Display.Height)
|
||||||
|
uInt32 myHeight;
|
||||||
|
|
||||||
// Indicates offset in color clocks when display should begin
|
// Indicates offset in color clocks when display should begin
|
||||||
uInt32 myStartDisplayOffset;
|
uInt32 myStartDisplayOffset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue