Re: [hatari-devel] TT mono mode Timer-C problem |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Am Sat, 17 Dec 2011 14:03:27 -0500
schrieb "Roger Burrows" <rfburrows@xxxxxxxxx>:
> On 17 Dec 2011 at 18:53, Nicolas Pomarède wrote:
> >
> > Hmm, I replied too quickly. Hatari will always emulate an 8 MHz cpu
> > clock, cpu freq is simulted by dividing cpu cycles by 2 or 4.
> >
> > So the MFP timers are always good when you change cpu speed (you
> > can check this with tos 1.04, your program runs fine in color or
> > mono, with 8/16/32 cpu freq).
> >
> > It seems emutos computes $4ba in a different way in mono mode,
> > maybe it doesn't use the same 200 Hz timer as in color ?
> >
> As I pointed out, the problem also occurs on TOS 3.06 on Hatari. It
> desn't occur on TOS 3.06 on a real TT (in case anyone wondered :-)).
>
> I don't think any of the theories so far explain this. So I still
> believe it's a Hatari problem. Of course, I understand that it's
> probably not the most important thing to fix, I just want people to
> realise that there is an unexplained bug there. And my experience
> with unexplained small bugs is that they often indicate the presence
> of other larger bugs ...
I now spent some hours to have a closer look at this problem, and I
think I found and fixed it: The VBL timings were accidentially wrong in
TT highres (monochrome) mode. Hatari calculates the VBL refresh rate by
multiplying nScanlinesPerFrame * nCyclesPerLine and the first value had
been taken from monochrome ST mode and the second from color ST mode,
resulting in a total wrong value in the end (we do not support real TT
mode timings yet, that's why ST mode timings are used internally).
I've fixed it now so that TT monochrome mode now works with the same
timings as ST monochrome mode. Mouse double clicks should be working
fine now, too.
Cheers,
Thomas