mirror of https://github.com/stella-emu/stella.git
Made TIA auto-frame detection kick in every 32 frames instead of 64.
Further tweaking to the RIOT timer values. I reverted to the z26 '0x40000' number, even though I'm not entirely clear why it's being used. Without it, several PAL ROMs fail in an infinite loop of reading from INTIM and checking for zero. I really hope that's the last of the RIOT stuff, since I've been looking at it for the past two months (the AVox and SaveKey issues started there as well). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1531 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
8d4d5b4563
commit
37c1f354dd
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: M6532.cxx,v 1.26 2008-05-19 02:53:57 stephena Exp $
|
||||
// $Id: M6532.cxx,v 1.27 2008-05-22 17:54:54 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -171,9 +171,14 @@ uInt8 M6532::peek(uInt16 addr)
|
|||
myInterruptTriggered = false;
|
||||
Int32 timer = timerClocks();
|
||||
|
||||
if(timer >= 0)
|
||||
// See if the timer has expired yet?
|
||||
// Note that this constant comes from z26, and corresponds to
|
||||
// 256 intervals of T1024T (ie, the maximum that the timer should hold)
|
||||
// I'm not sure why this is required, but quite a few PAL ROMs fail
|
||||
// if we just check >= 0.
|
||||
if(!(timer & 0x40000))
|
||||
{
|
||||
return (uInt8)(timer >> myIntervalShift);
|
||||
return (timer >> myIntervalShift) & 0xff;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -183,8 +188,8 @@ uInt8 M6532::peek(uInt16 addr)
|
|||
// According to the M6532 documentation, the timer continues to count
|
||||
// down to -255 timer clocks after wraparound. However, it isn't
|
||||
// entirely clear what happens *after* if reaches -255.
|
||||
// For now, we'll set it to 0.
|
||||
return (uInt8)(timer >= -255 ? timer : 0);
|
||||
// For now, we'll let it continuously wrap around.
|
||||
return timer & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TIA.cxx,v 1.93 2008-05-21 14:01:30 stephena Exp $
|
||||
// $Id: TIA.cxx,v 1.94 2008-05-22 17:54:54 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
//#define DEBUG_HMOVE
|
||||
|
@ -597,7 +597,7 @@ inline void TIA::endFrame()
|
|||
myFrameCounter++;
|
||||
|
||||
// Recalculate framerate. attempting to auto-correct for scanline 'jumps'
|
||||
if(myFrameCounter % 64 == 0 && myAutoFrameEnabled)
|
||||
if(myFrameCounter % 32 == 0 && myAutoFrameEnabled)
|
||||
{
|
||||
float framerate =
|
||||
(myScanlineCountForLastFrame > 285 ? 15600.0 : 15720.0) /
|
||||
|
|
Loading…
Reference in New Issue