ST HDMI Out

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Sun Mar 10, 2013 6:49 pm

Yeah, you're looking at 20 pixels left and right border. Which I think is probably quite similar to running a monitor rather than a TV. So good for playing normal ST games without overscan, but not quite so good for demos!

There is also the option to use 1080p and get an effective 4:3 resolution of 480x270, which would give 80 pixels border each side, which is far more than the maximum visible 448ish pixels on a TV. However that would need a faster fpga than the cheap Cyclone II I am using.

Or of course if you don't use whole pixel multiples and do some interpolation, you could scale the screen as you like.

I'm sure it's something I'll spend ages tuning and possibly something that could be tuneable from the ST, as I could use the STe microwire interface on the shifter to communicate with the fpga without too much more work...

User avatar
Scarlettkitten
Captain Atari
Captain Atari
Posts: 260
Joined: Thu Mar 19, 2009 11:42 am
Location: Northamptonshire, UK

Re: ST HDMI Out

Postby Scarlettkitten » Sun Mar 10, 2013 8:04 pm

Love the progress on this, well done 8)
Music gear
Falcon 030 14MB, Cubase Audio, Soundpool FA8,FDI, MAudio 88 keystation, Roland S750, Yamaha A5000, Roland JV1080, Yamaha MG10, 1040STE, ZX Spectrum 128k.

https://soundcloud.com/softkitty123

User avatar
Nikolas
Captain Atari
Captain Atari
Posts: 347
Joined: Tue Dec 23, 2008 12:03 am
Location: Slovenia
Contact:

Re: ST HDMI Out

Postby Nikolas » Tue Mar 12, 2013 6:34 am

you can try with st dvi

then use this adapter, hope it helps

http://en.dogeno.us/wp-content/uploads/ ... ter-lg.jpg
If you guys expirience hardware problems.
1. Always remove chips if possible before soldering.
2. Resolder your hardware, check cables too.
3. If problem continue THEN must be faulty software.

I got 2 Atari ST
Main is stfm, with blitter, with 4 meg of ram, with 16mhz cpu + s-video and audio input to videobox, vdi out
P.S.
My english may not be correct

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Tue Mar 12, 2013 9:26 am

Nikolas wrote:you can try with st dvi

then use this adapter, hope it helps

http://en.dogeno.us/wp-content/uploads/ ... ter-lg.jpg


I'm not sure how DVI copes if you have additional HDMI information in the stream -- DVI is a subset of HDMI just dealing with video (no audio). But if there is an issue, it will be easy to fix as it just means stripping out additional information from the video stream.

Poobah
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 116
Joined: Wed Aug 03, 2005 11:45 am
Location: Ohio, USA

Re: ST HDMI Out

Postby Poobah » Fri Mar 22, 2013 3:53 pm

SainT wrote:
Poobah wrote:Sounds interesting.
How are you handling 50/60 Hz and the various overscan tricks?


I'm currently just doing 50hz at the moment and overscan tricks are fine as they just change when the display enable is active.

This is where I found some issues. Some of the overscan tricks do "bad things' to HSync.

Unfortunately hdmi doesn't have a standard video mode using a 32mhz pixel clock at 50hz, I have to use 720x576p which is a 27mhz pixel clock. This works out well, but means the ST image is actually larger on the screen due to there only being 864 cycles per line.
I am sampling the full 1024 pixels per line, then using the centre 720 pixels to map onto the active pixels of the hdmi output. This gives pixel perfect output.

How are you syncing your sampling to the ST pixel clock? Are you deriving the sample clock from the ST shifter clock, and then pushing the data through an async fifo or some dual port memory? I've found the shifter clocks can be very fiddly and actually differ slightly amongst the various STs littering my house.

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Fri Mar 22, 2013 4:15 pm

Poobah wrote:This is where I found some issues. Some of the overscan tricks do "bad things' to HSync.


To be honest once the clock is locked, hsync doesn't matter. In fact I blew the hsync driver on my shifter by not noticing I'd shorted out the vsync and hsync lines, and I can still get a perfectly stable picture (although currently not correctly positioned based on v/hsync).

Poobah wrote:How are you syncing your sampling to the ST pixel clock? Are you deriving the sample clock from the ST shifter clock, and then pushing the data through an async fifo or some dual port memory? I've found the shifter clocks can be very fiddly and actually differ slightly amongst the various STs littering my house.


Yeah, the main clock will differ a bit on every ST as its derived from a PLL driven by the hsync line and the colour carrier clock (in a PAL machine anyway). I'm using the shifter clock to clock in the RGB data into a circular buffer which is two scanlines in size. As the next scanline is being read, I scan out the current line twice at ~27mhz to give the data required by the HDMI out.

The ~27Mhz clock is derived from a PLL on the FPGA using a 32/27 ratio from the ST clock and then another PLL is daisychained from this 27Mhz clock (no internal links between PLL's on the Cyclone II) using a 1/5 ratio to give the 135Mhz clock used to drive the DDR output for the HDMI lines (HDMI requiring 10x pixel clock).

It does all seem to work, and sync signals don't actually come into it once the clock is locked, as I just deal with a whole 313*2048 cycles per frame.

Progress is a bit slow at the moment as I'm very busy converting over one of our games to another platform. Although a few weeks back I did finally move over to modelsim, and it is a fair bit quicker than the old internal qsim. Now to write a converter so I can view the output in the HDMI debugger and get the packet output working! :)

Oh how I wish I had more time....

User avatar
DarkLord
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4329
Joined: Mon Aug 16, 2004 12:06 pm
Location: Prestonsburg, KY - USA
Contact:

Re: ST HDMI Out

Postby DarkLord » Fri Mar 22, 2013 5:14 pm

SainT wrote:Oh how I wish I had more time....


Me too! :lol:
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 793
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: ST HDMI Out

Postby mfro » Fri Mar 22, 2013 5:26 pm

SainT wrote:Yeah, the main clock will differ a bit on every ST as its derived from a PLL driven by the hsync line and the colour carrier clock (in a PAL machine anyway). I'm using the shifter clock to clock in the RGB data into a circular buffer which is two scanlines in size. As the next scanline is being read, I scan out the current line twice at ~27mhz to give the data required by the HDMI out.


Not to be understood as criticism (I really appreciate your work and seriously hope there will be an orderable product once you are finished) but I just need to mention how crazy times have gotten: you're probably using several orders of magnitude of computing power of the original ST just to get its video output on a screen 8O

:cheers:

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Fri Mar 22, 2013 7:46 pm

mfro wrote:Not to be understood as criticism (I really appreciate your work and seriously hope there will be an orderable product once you are finished) but I just need to mention how crazy times have gotten: you're probably using several orders of magnitude of computing power of the original ST just to get its video output on a screen 8O

:cheers:


Hah, no it is crazy! I was thinking that looking at some C64 disk drive emulators on eBay which run from a SD card. There's far more processing power in the drive emulator than the C64.

But there's something nice about old hardware (I'm just getting to that age I guess!) that makes you want to give it all the mod-cons. :D

Poobah
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 116
Joined: Wed Aug 03, 2005 11:45 am
Location: Ohio, USA

Re: ST HDMI Out

Postby Poobah » Sat Mar 23, 2013 1:39 pm

SainT wrote:To be honest once the clock is locked, hsync doesn't matter. In fact I blew the hsync driver on my shifter by not noticing I'd shorted out the vsync and hsync lines, and I can still get a perfectly stable picture (although currently not correctly positioned based on v/hsync).

You'll still need to make some sort of "frame start" signal out of Hsync and Vsync. If you don't, you'll be misaligned, and even if you do get aligned, it will drift.

i was using Hsync to count lines, and just ran my output 2 scanlines behind the ST. (tho the overscan Hysnc oddities caused issues)

Oh how I wish I had more time....

Amen! I've worked on this problem quite a bit (Xilinx Spartan fpga), got bogged down trying to cover all the possible ST output scenarios (50/60 Hz, overscan, etc)

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Sun Mar 24, 2013 9:39 am

Poobah wrote:You'll still need to make some sort of "frame start" signal out of Hsync and Vsync. If you don't, you'll be misaligned, and even if you do get aligned, it will drift.

i was using Hsync to count lines, and just ran my output 2 scanlines behind the ST. (tho the overscan Hysnc oddities caused issues)


Yeah, indeed, you need to sync the hdmi out using h and vsync. But once this has been done, then you don't get drift, because the number of clocks per frame is invariant on the ST (at least as far as I am aware!). However I've not tested things extensively yet, so I may just be in for a load of fun later. :D

Were you using the st clock to read the digital rgb data directly from the shifter lines? And did you derive the pixel clock from the st clock?

The other thing is, I'm generating the hdmi sync entirely in the fpga and not using any sync info from the st at all. So the video data is inlayed into an existing stable sync frame.

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Tue Mar 26, 2013 9:47 pm

Well, I've made a bit more progress tonight. I have the packet encoder generating the CRC for the AVIInfoFrame packet once per frame, which is then output in the HDMI stream. So my monitor now recognises the signal as a proper HDMI input (not DVI) with correct preamble, guardband and everything now being generated. Marvellous.

The packet encoding architecture is pretty generic, so next up is to generate a nice 260-odd hertz square wave and feed that into the audio encoder (which I have yet to write) and get some audio packets out.

Once I've got the audio packets sorted, I'm ready to start on the next hardware prototype.

Ahhh, progress.

:cheers:

User avatar
Scarlettkitten
Captain Atari
Captain Atari
Posts: 260
Joined: Thu Mar 19, 2009 11:42 am
Location: Northamptonshire, UK

Re: ST HDMI Out

Postby Scarlettkitten » Tue Mar 26, 2013 11:59 pm

Superb, nice to hear it's progressing. :cheers:
Music gear
Falcon 030 14MB, Cubase Audio, Soundpool FA8,FDI, MAudio 88 keystation, Roland S750, Yamaha A5000, Roland JV1080, Yamaha MG10, 1040STE, ZX Spectrum 128k.

https://soundcloud.com/softkitty123

User avatar
atari_mark
Captain Atari
Captain Atari
Posts: 182
Joined: Thu Oct 10, 2002 12:30 pm
Location: Wigan, England
Contact:

Re: ST HDMI Out

Postby atari_mark » Thu Mar 28, 2013 11:23 am

This is spooky, I had a thought about my Atari ST and a HDMI converter then saw this thread.
Mac Sys Data/Persistence Of Vision

Instructions said to install Windows 2000 or better so I installed Fedora.

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2726
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: ST HDMI Out

Postby alexh » Thu Mar 28, 2013 12:05 pm

I dunno if you'd care but there is a NES HDMI hardware project being developed. It uses a Cyclone II FPGA too.

http://www.nintendoage.com/forum/messag ... adid=92557

If their hardware is cheap enough, and has the usable I/O / form factor. It might be an alternative to developing your own PCB?

Guest

Re: ST HDMI Out

Postby Guest » Fri Mar 29, 2013 1:00 am

i just use a sky2 box

scart in {DVD IN mode} hdmi out or rgb or carrier or scart out

you find blocked boxes all day long on ebay for less than a 10r
perfect as converters

you can always use a 60hz psu and change there firmware
they are used all over the us with just a few changes ,,,

the only way to make this convert work and saint your are one

ive bleated about it for not 9 years
is to use a pic 18F4550 as the shifter and hi speed usb video transfer {also file as a sub set connect}

and replace the shifter totally
so ... st and mega only on a riser dil to card and sockets
usb and video in one
shifter outputs can transfer the fastest in atari it make perfect sense to me to use it with a pic 18F4550 both as function interface and control but also as a usb chip placement the driver is easy to write
purely graphic

but your project will benefit because there will be more people onboard to develop the top end sources

the top end can be used for ste stuff and mega ste as only they really!!!
benefit from having post shifter encoding to hdmi past using a ready made sky etc ,,, box ive done it and it works

your idea is great for hdmi from ste and mega ste because of the gst shifter affair

Poobah
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 116
Joined: Wed Aug 03, 2005 11:45 am
Location: Ohio, USA

Re: ST HDMI Out

Postby Poobah » Fri Mar 29, 2013 4:22 am

SainT wrote:
Poobah wrote:You'll still need to make some sort of "frame start" signal out of Hsync and Vsync. If you don't, you'll be misaligned, and even if you do get aligned, it will drift.

i was using Hsync to count lines, and just ran my output 2 scanlines behind the ST. (tho the overscan Hysnc oddities caused issues)


Yeah, indeed, you need to sync the hdmi out using h and vsync. But once this has been done, then you don't get drift, because the number of clocks per frame is invariant on the ST (at least as far as I am aware!). However I've not tested things extensively yet, so I may just be in for a load of fun later. :D

Were you using the st clock to read the digital rgb data directly from the shifter lines? And did you derive the pixel clock from the st clock?

The other thing is, I'm generating the hdmi sync entirely in the fpga and not using any sync info from the st at all. So the video data is inlayed into an existing stable sync frame.

I picked the 32 MHz clock and the RGB lines directly off the shifter. I've tried using a DCM to derive the VGA clock from the ST, or generating VGA from the FPGA clock. Either way, I ran into sync issues. Hopefully you will have better luck.

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Fri Mar 29, 2013 10:02 am

alexh wrote:I dunno if you'd care but there is a NES HDMI hardware project being developed. It uses a Cyclone II FPGA too.

http://www.nintendoage.com/forum/messag ... adid=92557

If their hardware is cheap enough, and has the usable I/O / form factor. It might be an alternative to developing your own PCB?


To be quite honest the whole point of this project is just to educate myself in the ways of hardware magic! And it's certainly doing that. I've learned a lot about HDL from the HDMI encoder and quite a lot about PCB's from tying to get he signal out of the ST. All good fun! :)

Same goes for using a sky box. That would sort of do the same job, however in a different (worse) way.

The upgrade path for me on this is then adding hdmi out to my tt, which requires an adc for the rgb and an ecl to lvds converter for tt hi. And you could then drive an LCD panel from the lvds out, if you wanted, so that's a colour stacy.

Lots of potential.

But most of all I just want to learn stuff. :D

The same was true of SainT - I started that just because I was curious about emulators. Don't know if you remeber mr. H, but I started on a playstation emulator before getting stuck into SainT. Got as far as starting writing a CPU emulator / monitor and that was about it... :lol:

User avatar
DarkLord
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4329
Joined: Mon Aug 16, 2004 12:06 pm
Location: Prestonsburg, KY - USA
Contact:

Re: ST HDMI Out

Postby DarkLord » Fri Mar 29, 2013 1:31 pm

SainT wrote:And you could then drive an LCD panel from the lvds out, if you wanted, so that's a colour stacy.


AND that's one of the reasons this thread has my attention. :lol:
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Tue Apr 09, 2013 12:41 pm

I found a bit of time to work on the HDMI side of things again last night and got the audio encoder working. So now I have a test pattern on screen and an annoying buzzing sound. Result! :D This all takes up about 25% of the logic elements in the little FPGA I have, so a fair bit of room for the scan doubler and any other stuff.

The audio and video clocks can be entirely de-coupled with HDMI, which is very handy as I have no idea what the ST clock is going to be with any accuracy, and the audio clock needs to be fairly accurate. So I have my on-board 50Mhz clock as a reference to derive the 48Khz audio clock, then count the number of pixel clocks per 48 sample frame packet and then use that for the audio clock regeneration packet.

So it's all entirely de-coupled, and ready for hooking up to the ST video and audio.

Now all that stuff is working, I'm ready to layout the next prototype board...

User avatar
AnakiMana
Atari freak
Atari freak
Posts: 53
Joined: Fri Mar 15, 2013 7:56 am
Location: Richland, WA, USA

Re: ST HDMI Out

Postby AnakiMana » Wed Apr 10, 2013 7:45 am

Sounds like good progress! Thanks for keeping us posted!

Guest

Re: ST HDMI Out

Postby Guest » Wed Apr 10, 2013 7:31 pm

best i think you add some buffers and double the scan rate outside the ic
this will baud well with the structs inside the fpgs
i would just for an st change the shifter totally
##but your working with the tricky ste mega ste etc
so its not easy,,, other than smd work to replace it
its just not worth doubling scan etc for a games machine like the ste
it was made for games only
all you extend is adding fpga the latency of the whole system
really!!! just like ANY addin unit other than svideo to svga
it seems to work well because its serial in component
anything else like midi etc lives in other ways a far better life on st or TT/falcon etc
so its back to fpga from st extended platform only
as the st is better served with a pull shifter and riser from socket
and to be honest i looked at this very thing about 8 years ago
although there is a market for add in boards


keep up the good work
st riser would service many more machines than ste level
as there is far more st's around {40 pin dil shifter}

User avatar
SainT
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 142
Joined: Tue Dec 04, 2007 3:33 pm
Location: Gloucestershire

Re: ST HDMI Out

Postby SainT » Fri Apr 12, 2013 9:11 am

Here's a shot of the test pattern I am using (sorry about the poor picture, it's from an iPhone!) :

TestPattern.jpg


Shows how the usable screen area (blue) maps to the 16:9 monitor, and the placement of the normal 320x200 ST screen within the usable area. The pixels are pretty square and overall it looks like it should work quite nicely.

Using a 1080p display (which the monitor in the picture is), horizontally an ST pixel maps to 4 native pixels exactly (720x576 image at 4:3 on 1920x1080 is 1440x1080) and lines are bilinearly scaled at 1.875x, so 16 lines map to 30 native.

This would of course accommodate ST high as well, although there is the issue of 72hz refresh which isn't a standard for HDMI which only defines 50-60hz modes. Although given a monitor which accepts HDMI, it should do normal VGA modes over HDMI no bother, so I could use a native 640x400x72Hz mode and get a nice fullscreen 4:3 image for high res.
You do not have the required permissions to view the files attached to this post.

User avatar
Scarlettkitten
Captain Atari
Captain Atari
Posts: 260
Joined: Thu Mar 19, 2009 11:42 am
Location: Northamptonshire, UK

Re: ST HDMI Out

Postby Scarlettkitten » Fri Apr 12, 2013 2:05 pm

Fantastic, seeing an output like that must be rewarding for you. Great work. 8)
Music gear
Falcon 030 14MB, Cubase Audio, Soundpool FA8,FDI, MAudio 88 keystation, Roland S750, Yamaha A5000, Roland JV1080, Yamaha MG10, 1040STE, ZX Spectrum 128k.

https://soundcloud.com/softkitty123

User avatar
BoNuS
Atari Super Hero
Atari Super Hero
Posts: 761
Joined: Mon Jan 19, 2009 12:45 pm
Location: The Netherlands
Contact:

Re: ST HDMI Out

Postby BoNuS » Fri Apr 12, 2013 7:27 pm

Can't wait until this is finished and ready to be (re) produced. Then I can finally get all this tubes out of my room :)
Looks really nice !! Keep up the good work !
http://bonus.home.xs4all.nl/
( I have just to much Atari stuff)


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 6 guests