Project: HDMI/DVI out for STFM

General discussions or ideas about hardware.
User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Sun Jan 07, 2018 11:27 am

exxos wrote:
Sun Jan 07, 2018 11:01 am
Also, for those who are not keeping up (me mostly) are you saying during a normal video low output the shifter switches into high res.. Or is that just a trick demos do for some reason ?
It's not during a normal screen mode, it's done by this program to avoid the end of the scanline, because the point where the scanline ends is much earlier in mono mode. It (the GLUE I think?) is waiting to hit a specific cycle number to end the line, so by changing that number to one that it already passed, you can skip over that point and make it continue outputting more pixels.

troed
Posts: 224
Joined: Mon Aug 21, 2017 10:27 pm

Re: Project: HDMI/DVI out for STFM

Post by troed » Sun Jan 07, 2018 11:51 am

exxos wrote:
Sun Jan 07, 2018 11:01 am
Could you please post you scope shots in a thread maybe in member blog section :)

Also, for those who are not keeping up (me mostly) are you saying during a normal video low output the shifter switches into high res.. Or is that just a trick demos do for some reason ?
Currently I'm dumping traces to the A-F thread simply because I want to get input on what to capture. Once I have good and relevant captures I'll reformat those with analysis and likely post to my own blog - that I can then link here also of course :)

When doing fullscreens there are two tricks used. GLUE checks when to start and stop lines (and screen) depending on the resolution, so by carefully switching frequency or resolution at specific points the GLUE either starts lines or end lines at "wrong" (fullscreen!) positions. Additionally, extra words left behind in the Shifter that can screw up alignment on the next line can be "cleared" by going into high or medium resolution and then back to low at the very end of the line. That "stabilizer" is what Smonson and I discussed now :)
Smonson wrote:
Sun Jan 07, 2018 11:22 am
Whoa, so that 1st picture is actually correct? After the switch the mono and back, the output from the shifter is all garbled.
Yeah you should display black when mono is set on an otherwise color line, and you can ignore what happens after the stabilizer has run. Actually, in detail, the stabilizer skips BLANK start and the line is then displayed for a few more pixels until HSYNC kicks in which again means nothing should be displayed from there until BLANK is deasserted on the next line ;)

(The stabilizer is not used to "open" the right border - that's done via a 60/50Hz switch at cycle 376 and is not visible to the Shifter at all)

User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Mon Jan 08, 2018 9:45 am

troed wrote:
Sun Jan 07, 2018 11:51 am
Yeah you should display black when mono is set on an otherwise color line, and you can ignore what happens after the stabilizer has run. Actually, in detail, the stabilizer skips BLANK start and the line is then displayed for a few more pixels until HSYNC kicks in which again means nothing should be displayed from there until BLANK is deasserted on the next line ;)

(The stabilizer is not used to "open" the right border - that's done via a 60/50Hz switch at cycle 376 and is not visible to the Shifter at all)
Wow, that's quite surprising actually. So, let me get this straight, if it wasn't for the stabiliser then the total number of LOADs on the line wouldn't be a multiple of 4, and I guess the length added by the stabiliser is the shortest available one that satisfies that requirement?

It also switches to 71Hz near the beginning of the line, presumably for the same reason, but since there are no LOADs in the shifter already, it displays black by default.

It's really useful that you told me that the switch happens exactly at cycle 444, because I've been guessing where to align the physical screen with the Atari's scanline cycle number. Now I can get it exact :D

troed
Posts: 224
Joined: Mon Aug 21, 2017 10:27 pm

Re: Project: HDMI/DVI out for STFM

Post by troed » Mon Jan 08, 2018 11:14 am

Smonson wrote:
Mon Jan 08, 2018 9:45 am
Wow, that's quite surprising actually. So, let me get this straight, if it wasn't for the stabiliser then the total number of LOADs on the line wouldn't be a multiple of 4, and I guess the length added by the stabiliser is the shortest available one that satisfies that requirement?

It also switches to 71Hz near the beginning of the line, presumably for the same reason, but since there are no LOADs in the shifter already, it displays black by default.

It's really useful that you told me that the switch happens exactly at cycle 444, because I've been guessing where to align the physical screen with the Atari's scanline cycle number. Now I can get it exact :D
The "stabilizer" clears the extra words that would otherwise be left in the Shifter for next scanline, yes.

At the beginning of the scanline the switch to HI is done to make the GLUE start the line earlier than it would've otherwise :) That's how you "open" the left border.

For more information on the exact cycles, please see my "state machine" for the GLUE (ST, STE is slightly different):

Color:

Code: Select all

4    IF(71) H = TRUE
24    IF(60) BLANK = FALSE
28    IF(50) BLANK = FALSE
52    IF(60) H = TRUE
54    LINE = 508/512(/224)
56    IF(50) H = TRUE
164    IF(71) H = FALSE
184    IF(71) BLANK = TRUE
372    IF(60) H = FALSE
376    IF(50) H = FALSE
450    IF(!71) BLANK = TRUE
LINE-50    IF(!71) HSYNC = TRUE && H = FALSE
LINE-10    IF(!71) HSYNC = FALSE
Mono:

Code: Select all

4:        IF(71) H = TRUE
164:    IF(71) H = FALSE
184:    IF(71) BLANK = TRUE
188:    IF(71) HSYNC = TRUE
212:    IF(71) HSYNC = FALSE
In reality this is not how it's implemented in GLUE, but it's a simpler explanation on how to get to the accurate cycles. H is combined with V (separate vertical state machine) to form DE.

So, for the left border, even if the decision to start the line is taken at cycle 4, BLANK is still active and thus no graphics is displayed until cycle 24 or 28 depending on frequency.

Also, for the stabilizer, as you can see by going to 71 at cycle 444 and back at 456 it means the IF(!71) BLANK = TRUE doesn't happen. Additional pixels will thus be displayed until 512-50=462 (for a 50Hz line) when HSYNC kicks in which will enable BLANK and nothing should be displayed for the rest of the line.

I have much more on this written up on the Atari-Wiki but it's currently down and the only way to read it is through "view source" on the wiki pages ... http://www.atari-wiki.com/index.php?tit ... ction=edit

User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Thu Jan 11, 2018 2:13 am

troed wrote:
Mon Jan 08, 2018 11:14 am
The "stabilizer" clears the extra words that would otherwise be left in the Shifter for next scanline, yes.

At the beginning of the scanline the switch to HI is done to make the GLUE start the line earlier than it would've otherwise :) That's how you "open" the left border.

For more information on the exact cycles, please see my "state machine" for the GLUE (ST, STE is slightly different):
Thanks for that, you told me before about this info and I did check it, but I'm measuring the frame timing from VSYNC now, and I couldn't see precisely when that's generated from those tables.
I have much more on this written up on the Atari-Wiki but it's currently down and the only way to read it is through "view source" on the wiki pages ... http://www.atari-wiki.com/index.php?tit ... ction=edit
Maybe we need to move on from that wiki, it's been down for years. I've found quite a few text files and useful posts here and there, but when you need to know something it'd be good if there was a single location to check, rather than hundreds of pages of old forum posts. I often miss stuff while searching.

troed
Posts: 224
Joined: Mon Aug 21, 2017 10:27 pm

Re: Project: HDMI/DVI out for STFM

Post by troed » Thu Jan 11, 2018 8:57 am

Smonson wrote:
Thu Jan 11, 2018 2:13 am
Thanks for that, you told me before about this info and I did check it, but I'm measuring the frame timing from VSYNC now, and I couldn't see precisely when that's generated from those tables.
Yes I need to package the information better.

This is the vertical state machine. All these checks are at CPU/GLUE line cycle 502 (wakestate dependent):

Code: Select all

16: 60Hz BLANK = false; 
25: 50Hz BLANK = false;
34: !50Hz V = true (60Hz and mono screen start)
47/63: 50Hz V = true (short/regular top border GLUE)
234: 60Hz V = false
247/263: 50Hz V = false
260: 60Hz VSYNC = true
258: 60Hz BLANK = true
308: 50Hz BLANK = true
311: 50Hz VSYNC = true (happens at around cycle 30 or so, so very early)
434: 71Hz V = false;
500: mono VSYNC (not sure I verified this, calculated from VSYNC length being one scanline and total # of scanlines is 501)
The line where VSYNC happens is counted down to from when the frequency of the next frame was selected within VSYNC for the current. So a vsync cannot be "skipped" by changing frequency/resolution.

I uploaded a new LA trace for full frames at 32MHz resolution to A-F. You should be able to get most timings you need from that - just let me know what else you need :)

User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Wed Mar 21, 2018 12:48 am

No *new* news, but just so you know I'm still alive, I've done a new run of prototype boards with a connection for vsync, and that's working fine.

User avatar
rpineau
Posts: 275
Joined: Thu Aug 17, 2017 6:08 pm
Location: USA
Contact:

Re: Project: HDMI/DVI out for STFM

Post by rpineau » Wed Mar 21, 2018 2:29 am

Thanks for the update :)

User avatar
rubber_jonnie
Posts: 343
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: Project: HDMI/DVI out for STFM

Post by rubber_jonnie » Wed Mar 21, 2018 12:41 pm

Nice Job :)
Collector of old Atari things:
800XL + Ape Warp mod, 2x 1010 cassette, 1050 + Happy mod, 65XE (128k) & XC12, SIO2SD, 2600jr, 7800 and Lynx II
Atari 520ST (1Meg) + Gotek, 1040STFM + Vortex ATOnce + Gotek, 1040STF long button floppy, 4160 STE with Gotek and ROM switcher, 4160STE with 32Mhz booster, ROM switcher and CosmosEx, not to mention various bare ST boards for testing including a PAK 68/2 :)
Plus the rest..
Amiga stuff, Mac stuff, Sinclair stuff etc...
www.electronicnothingness.co.uk

User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Fri Jun 22, 2018 10:11 am

I'm not quite done with the unavoidable side-project that is keeping me from working on this (80% through it), but I had enough time recently to add static electricity protection for the DVI socket and get a run of prototypes made. Just tested that new board tonight and it works fine.

Post Reply