Enterprise Forever

:UK => Programming => Topic started by: Sdw on 2016.August.19. 17:43:18

Title: Detecting LPTs with wrong number of lines?
Post by: Sdw on 2016.August.19. 17:43:18
Since I am generating most of my LPTs in code, there is a slight risk that I have a bug somewhere (a loop going one iteration too much/little) and ending up with for example a 311 line or 313 line LPT.
Is there a way of detecting this easily? I guess most TVs will sync properly even if the line count isn't exactly correct (at least it worked that way when I was coding for the Atari2600/VCS) so spotting it by eye is probably a bit hard.
I didn't find anything in ep128emu that could give this info.
Title: Re: Detecting LPTs with wrong number of lines?
Post by: IstvanV on 2016.August.19. 19:07:32
I didn't find anything in ep128emu that could give this info.

It is possible to test the length of the LPT with a simple Lua script like this one:
[attachurl=1]
It runs on every interrupt (breakpoint at 0038h), and counts the total number of lines in the LPT, so it does not correctly support multi-frame or interlaced LPTs. Another, simpler version that does not use breakpoints and just prints the current number of lines in the LPT:
[attachurl=2]
Title: Re: Detecting LPTs with wrong number of lines?
Post by: Sdw on 2016.August.20. 00:26:41
Thank you, what a neat solution, I didn't know that ep128emu was scriptable with LUA.
And thanks to this I found out I had some seriously off LPTs, running 304 lines at several places!
Seems like both ep128emu and my real Enterprise128+CRT TV didn't mind 304 lines though, it seemed to work fine.
But now of course I have adjusted so that it is proper 312 lines everywhere.
Title: Re: Detecting LPTs with wrong number of lines?
Post by: Zozosoft on 2016.August.20. 08:18:42
About 25 years ago my Junosty tv (cheap russian tv, which popular used for computers in Hungary at those years) can detect wrong numbers of LPBs: screen started scrolling up or down :-)
Title: Re: Detecting LPTs with wrong number of lines?
Post by: Povi on 2016.August.21. 23:27:55
About 25 years ago my Junosty tv (cheap russian tv, which popular used for computers in Hungary at those years) can detect wrong numbers of LPBs: screen started scrolling up or down :-)
Yes, but there was a hw solution to fix the scroll: just adjust the potentiometer at the back on the Junosty