Well, the decision if a line is 508 or 512 cycles is taken at the beginning of the line so that can't happen with line #199. Also, while the following is true for STE mode the code path for STE and STF is the same for the bottom border so the concern is still valid, but, on an STE it's not the switch back to 50Hz that decides whether the line becomes +2 but when the switch _to_ 60Hz happens.Steven Seagal wrote: In fact I was confused a lot for the "line +2" test, and still am.
Here's what the first screen gives in Steem, STE mode:
Normally line 200 should be +2 according to those values (056:S0002), but line 199 ends after 508 cycles, yet Steem sees the end at 512 due to its way of setting frame timings (internal issue). In consequence the switch to 50hz really happens at 52, not 56. At least that's what I think right now!Code: Select all
199 - 484:S0000 512:T0200 512:#0160 200 - 056:S0002
(And this is all Ijor/Paolo knowledge btw - I take no credit in being able to follow their reasoning, testing and documentation .. )
From the 2006 thread:
... and translation between Paolo-timings and emulator (which are the same as mine) is easiest done via the Excel-sheet posted earliera) the + 2 bytes effect
On STF, the switch back to 50Hz (second move.b of the pair) has to be done at pixel -27 or -29 depending on the wake-up state: 11 nops or 9nop+1exg after pixel -71
On STE, for wake-up state 1 (it is not clear if there is a second one on STE), the switch to 60 Hz has to be done at pixel -47: 6 nops after pixel -71
=> So a combination 47/27 or 47/29 works on both !

STF: The switch _back_ to 50Hz has to happen at cycle 54 or 56, depending on wakeup.
STE: The switch _to_ 60Hz has to happen at cycle 36.
For the top border I use wakeup and STE-detection to make sure the switches will never hit those cycles (aligning them on opposite 2-cycle boundaries), but I made no such effort for the bottom border since I never saw it fail on real hardware. However, for STE mode I'm quite sure there cannot be a +2 line since it's opened (and automatically verified within the border routine) on the previous line - nowhere near cycle 36.
Now, the interesting part I guess is on STF - whether a +2 line can be triggered when coming back from 60Hz that was initiated on the previous line. According to Paolo's Excel-sheet the answer is yes (cycle 378/380+), but it didn't show up in my testing.
/Troed
(Several hundred people have watched the LoSTE screens - but I'm curious as to how many have done it on real hardware .. hah
