Reverted INTIM handling to version 3.7.2, which fixes hangs in Mr. Roboto.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2584 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-01-26 21:17:38 +00:00
parent b727c1b48d
commit b7df9deeb6
2 changed files with 9 additions and 1 deletions

View File

@ -29,6 +29,9 @@
* Tweaked bankswitch autodetection for the 0840, F8 and FE schemes;
several homebrews that didn't run before now work correctly.
* Fixed regression in M6532 INTIM reads; at least one known ROM
(Mr. Roboto Berzerk hack) wasn't working properly.
-Have fun!

View File

@ -180,7 +180,12 @@ uInt8 M6532::peek(uInt16 addr)
// Get number of clocks since timer was set
Int32 timer = timerClocks();
if(timer >= 0)
// 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 ROMs fail
// if we just check >= 0.
if(!(timer & 0x40000))
{
// Return at 'divide by TIMxT' interval rate
return (timer >> myIntervalShift) & 0xff;