Re: [hatari-devel] Yanartas demo doesn't work in ST mode

[ Thread Index | Date Index | More Archives ]

I've now tested on my STF (Mega ST, 8.01MHz) as well - booted in WS2. Your test programs give me the same values as you got.

Also, my test program (the one I attached earlier) worked exactly the same as on my STE. That is, the synclock resulted in the same position (since the right borders were successfully opened). Due to the STF booting in WS2 I had to move the lower border switch two cycles (from 502 to 504) which is as expected.

So, even though I'm also synclocking towards the videocounter it didn't influence my measurements. Which it shouldn't - else we'd have lots of STF demos that were 4 cycles off when trying to open left & right borders (where the right would always fail).

Looking at your code you have 40 cycles + a move.b in your switch (48 cycles in total). It's still possible for it to both open the lower border as well as creating a +2 line on STE, which would influence the values of the video counter when you later check for it. However, from your code snippet it looks like your finding the switch position "from the left" which should mean you trigger early, not late, and then it shouldn't matter. So, no new suggestions on my part for what could cause the different readings.


On Mon, Feb 9, 2015 at 11:45 PM, Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:
Le 09/02/2015 23:30, Troed Sångberg a écrit :
Your testprograms testbot/testtop.prg gives me the same values (on STE)
as you posted, but I'm still not sure about the videocounter not making
a difference. The reason I added removal of right border (which is cycle
exact) to my test was to not rely on synclock being positioned the same
on different machines (since it depends on the videocounter, back to
pre-fetch uncertainty).

Maybe that's where we don't measure the same thing.

By first synchronizing with the known point to remove border, your program self calibrate itself to be in STE mode if we can say so.
So, from there your next switches will match the STE timings.

Back to Yanartas demo, my point was more to show that the *same program* that doesn't know where the switch should be made (and that doesn't know if the machine is a STF or a STE) will self calibrate differently in STE and STF, with a 1 NOP difference, which could explain why Yanartas has stable border removal on STE, but not on STF (although I should check it on my real STF to be sure), and why I saw several demo doing the switch to close to cycle 500/504 that worked only in STE mode and not STF (or the opposite)

(Also I would be wary about a 120 cycle wide switch - on STE you'd risk
creating a +2 line already at cycle 36 while on ST you're safe up until
cycle 52. But that depends on how you do all the detection etc when
adding cycles of course)

That was a mistake in my previous mail. I read ff8209 120 cycles after switch to 60 Hz, but there're only 40 cycles between 60 and 50 Hz switch, so this should be good.
But in all cases, this test just try to remove the border, it doesn't try to remove possible glitches during the next line.
Once the position is known in a real demo, the switch would be shorter.


Mail converted by MHonArc 2.6.19+