Page 10 of 24

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 9:57 am
by Smonson
New things today and yesterday:
  • Added ESD protection to the DVI port
  • Added connections for switches/jumpers to the PCB
  • Added selectable aspect ratio (switch 1) - toggles between 640x400 and 720x400 with 40-pixel left/right borders (for widescreen TV)
  • Added selectable borders on/off (switch 2) - changes to resolution 720x480 with 40-pixel border on all sides, or 800x480 with 80-pixel border on left/right and 40px on top/bottom (depending on aspect ratio setting)
Most things work including Spectrum 512 (except for some odd black pixels in the 512-colour palette) and most overscan/palette tricks, like in menu disks.

One thing that's bugging me is that the position of the screen randomly moves left or right by a couple of pixels between power-cycles. I suspect this is the "wake-up states" everyone's always talking about. Reset doesn't affect it. It's annoying because it makes it harder to implement the fullscreen no-borders mode at 640x400. I'm gonna have to make something that detects where the edge of the screen is and adjusts the position - but it won't work if there's some overscan on the left.

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 10:32 am
by exxos
Great stuff! :cheers:

If the pixel shift only happens between power ups, does it matter really ? I think most would opt to put up with it rather than lose the left border totally.

There is still the option to tap into Vsync and Hsync on the system, if that would help ?

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 10:45 am
by troed
On ST the physical placement of pixels on the screen indeed shifts with 0-3 pixels depending on wakestate, with regular TV/composite/RGB output. All is good if your HDMI solution does the same ;)

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 10:56 am
by Smonson
Yep, the position shift matters if you want to use fullscreen no-borders mode, because it'll move the image slightly off the screen.

It's relative to vsync now, but I think hsync and vsync are both generated from the same counters, so if I understand correctly the image is also moving around relative to hsync. It'll be down to the timing that the MMU is generating the DE/LOAD/etc signals.
troed wrote:
Sat Jun 23, 2018 10:45 am
On ST the physical placement of pixels on the screen indeed shifts with 0-3 pixels depending on wakestate, with regular TV/composite/RGB output. All is good if your HDMI solution does the same ;)
Can the wakestate be determined from the signal timing of LOAD, DE, etc? Right now I'm basically just zooming in on the centre of the screen.

It looks fantastic in 720x400 mode though (more close to a square pixel aspect ratio on a widescreen TV), and you've got 40 pixels of overscan on each side there so a couple of pixels can't be noticed.

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 11:07 am
by Methanoid
Does this work for STE? other STs? If so would be great if someone could change the thread title to stop idiots like me asking what may well be obvious to others?

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 11:50 am
by IngoQ
Methanoid wrote:
Sat Jun 23, 2018 11:07 am
Does this work for STE? other STs? If so would be great if someone could change the thread title to stop idiots like me asking what may well be obvious to others?
Actually this has been asked before, here ist the answer:
Smonson wrote:
Fri Nov 10, 2017 10:08 pm
It's only possible to do this when he ST has a separate, external shifter. The STE shifter is integrated into a great big chip that handles lots of other things as well, so although it seems possible to do the same thing in principle (replace the entire chip by an FPGA), I don't have what I would need to attempt it, such as an STE for starters.

Sorry about that!

Re: Project: HDMI/DVI out for STFM

Posted: Sat Jun 23, 2018 4:16 pm
by troed
Smonson wrote:
Sat Jun 23, 2018 10:56 am
Can the wakestate be determined from the signal timing of LOAD, DE, etc? Right now I'm basically just zooming in on the centre of the screen.
Yeah if you have cycle accuracy detection of DE and LOAD then you can. The cause of the pixel offset is that the wakestates have different DE-to-LOAD delays. 3,4,5 and 6 cycles respectively for WS2, WS4, WS3 and WS1.

Re: Project: HDMI/DVI out for STFM

Posted: Mon Jun 25, 2018 2:48 pm
by Smonson
troed wrote:
Sat Jun 23, 2018 4:16 pm
Yeah if you have cycle accuracy detection of DE and LOAD then you can. The cause of the pixel offset is that the wakestates have different DE-to-LOAD delays. 3,4,5 and 6 cycles respectively for WS2, WS4, WS3 and WS1.
I experimented with this and found a correlation. Measuring the latency from DE to LOAD, I observed the following four permutations:

Code: Select all

4 cycles delay => no shift
5 cycles delay => 1 pixel shift
6 cycles delay => 2 pixels shift
7 cycles delay => 3 pixels shift
It's one off from your measurements, so I reckon you're measuring the falling edge of LOAD while I'm measuring the rising edge. Anyway, that seems to have solved the problem! Thanks again Troed!

Re: Project: HDMI/DVI out for STFM

Posted: Wed Aug 29, 2018 9:26 am
by tuxie
Is this project still in progress ?

What is working ? What is not Working ? Will this project be open ? Or closed ?

Thank you

Btw. i followed this thread ;)

Re: Project: HDMI/DVI out for STFM

Posted: Wed Aug 29, 2018 9:40 am
by exxos
tuxie wrote:
Wed Aug 29, 2018 9:26 am
Is this project still in progress ?
Yes, I got my test board about a week ago, hes waiting on me to test it out.. swamped with multiple stuff at the moment.. will really try and hook it up over the next couple of days...