To be honest, the only "real life example" demo I have that changes vblank is Fullast Vinner, so most of the timings in Hatari are adjusted to match this demo as it's known to work on real HW.
Troed, when you say for example :
Code: Select all
if vvid_counter == 15 && 60 then vBLANK = false;
if vvid_counter == 307 && 50 then vBLANK = true // 50Hz
Then I understand that the check is made at cycle 502 according to you, so it would be the following code in hatari :
Code: Select all
if vvid_counter == 14 && pos == 502 && 60 then VBLANK=false
or
if vvid_counter == 306 && pos == 502 && 50 then vBLANK = true
Is that so ?
Also for this line (remove top border) :
Code: Select all
if vvid_counter == 33 && !50 then vDE = true // 60Hz and mono
Do you mean "if vvid_counter==33 and pos==502" or ""if vvid_counter==32 and pos==502" ? Because on my side under Hatari the first line visible will be the one with HBL=34 ; Hatari sets VDE=ON on start of line 34, but your table tells "if vvid_counter == 33". I have the feeling we sometime have a +/- 1 difference in our line counting. Maybe you should add the "&& pos==502" in your table to make sure it's explicit ?
In Fullast Vinner, I see you do a 60/50Hz on every line to have freq = 60 on cycle 502. And this switch is made first on pos 502 hbl 14 (I assumed this turned vblank off at 60 Hz) and last on pos 502 hbl 307 (I assumed this prevented vblank from turning on at 50 Hz)
This is why in Hatari I have VBlank_Off_60_CheckLine=14 and VBlank_On_50_CheckLine=307.
So maybe Fullast Vinner does an extra/unneeded 60/50 Hz switch at 502@14 or 502@307 and this is what mislead me to a wrong value in Hatari ?