Project: HDMI/DVI out for STFM

General discussions or ideas about hardware.
Cyprian
Posts: 161
Joined: Fri Dec 22, 2017 9:16 am

Re: Project: HDMI/DVI out for STFM

Post by Cyprian » Wed Aug 29, 2018 9:58 am

Would be possible to connect it to the ST main ram, or add ram to FPGA, in order to provide additional extended video modes?
Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

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

Re: Project: HDMI/DVI out for STFM

Post by troed » Wed Aug 29, 2018 10:14 am

I have a prototype of this and have run it in a 520ST as well as currently trying to interface it in my accelerated doubleST. I do have issues with the latter, I'm currently delaying /DTACK but there are still some weird issues I'm figuring out atm.

The image quality is truly amazing.

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

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Wed Aug 29, 2018 10:22 am

Hi guys! :)
tuxie wrote:
Wed Aug 29, 2018 9:26 am
Is this project still in progress ?

What is working ? What is not Working ? Will this project be open ? Or closed ?
It's in progress. It would be "finished" now except that I've been unhappy that scanline tricks commonly used by demos aren't working properly. However, for the three ST video modes, it's working perfectly for me*.

Right now the design of the PCB and the HDMI video generation part of the FPGA are closed, but the Verilog shifter model (a copy of the real shifter reverse-engineered by Ijor) is an open collaboration. https://github.com/smonson78/st-shifter-verilog.

* - I do have one bug left to find: sometimes the screen is shifted right by one pixel (or half a pixel in low-res) which is only noticeable if you're running full-screen with no borders.
tuxie wrote:
Wed Aug 29, 2018 9:45 am
Some improvement planned like higher Resolutions? Acceleration ?
The only impediment to adding more video modes to the shifter is that the ST only supplies 32000 bytes of video data per frame. To implement a 320x200x256-colour mode for example, the speed of the ST would have to be doubled to 16MHz. And as we all know, that's totally impossible.

To be specific: the way this mod works is that it reads each scanline into a buffer, then at the end of that scanline it outputs it to the HDMI port (doubled for low-res and medium-res) while the next line is being read. But it CAN'T store an entire screen frame, it just doesn't have enough memory for that.
Cyprian wrote:
Wed Aug 29, 2018 9:58 am
Would be possible to connect it to the ST main ram, or add ram to FPGA, in order to provide additional extended video modes?
It's connected to the ST main RAM via the same pathway the original shifter connects. In fact it plugs into the shifter socket. It's only designed to replace the shifter with an HDMI/DVI-compatible output method.

That said, only about 8% of the FPGA is used, if there's anything useful that could be chucked in without needing more than a few extra IO pins and 5v-to-3.3v buffers. The FPGA is a Cyclone-II and has about 10KB of ram available in it.

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

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Wed Aug 29, 2018 10:43 am

BTW, this is how it's situated inside the ST.
20171107_210215-2.jpg
20171107_210215-2.jpg (231.63 KiB) Viewed 64 times
(those wires poking out the right-hand side are just my debug wires)
  • It plugs into the shifter socket, you have to remove the original shifter
  • It also needs one extra wire attached which must be connected to the VSYNC signal
I do want to start building these as soon as possible, but that's countered by wanting it to be as good as it can be.

I'm expecting them to cost about 90 EUR plus postage.

Cyprian
Posts: 161
Joined: Fri Dec 22, 2017 9:16 am

Re: Project: HDMI/DVI out for STFM

Post by Cyprian » Wed Aug 29, 2018 11:21 am

I would like to buy one.
Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

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

Re: Project: HDMI/DVI out for STFM

Post by troed » Wed Aug 29, 2018 12:23 pm

So, since I have one (thanks Smonson for letting me beta test and play around with what it can do!) there's one thing I'd like to point out though. It runs off its own 32MHz clock, which means the ST CPU is running at 8.00MHz. That's no problem - most things will work just fine.

However, a real ST runs at 8.01MHz (old STF), 8.02MHz (PAL STFM, PAL STE) or 8.05MHz (NTSC STE). Since the motherboard has a separate clock for the MFP (the "timer chip") in the ST demo coders have for a long time known that they need to compensate for the difference between the timer clock and the CPU clock. This mostly affects the opening of the lower (and maybe top) border in demos.

A CPU clock of 8.00MHz is "unknown" and some demos will simply not work perfectly. I don't want to exaggerate this as an issue, just pointing it out for purists (like myself ;))

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

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Wed Aug 29, 2018 12:26 pm

troed wrote:
Wed Aug 29, 2018 12:23 pm
So, since I have one (thanks Smonson for letting me beta test and play around with what it can do!) there's one thing I'd like to point out though. It runs off its own 32MHz clock, which means the ST CPU is running at 8.00MHz. That's no problem - most things will work just fine.

However, a real ST runs at 8.01MHz (old STF), 8.02MHz (PAL STFM, PAL STE) or 8.05MHz (NTSC STE). Since the motherboard has a separate clock for the MFP (the "timer chip") in the ST demo coders have for a long time known that they need to compensate for the difference between the timer clock and the CPU clock. This mostly affects the opening of the lower (and maybe top) border in demos.

A CPU clock of 8.00MHz is "unknown" and some demos will simply not work perfectly. I don't want to exaggerate this as an issue, just pointing it out for purists (like myself ;))
I wasn't aware of this until you mentioned it, but I've looked around on Mouser and those other clock values are easy to obtain. But what happens if you run a demo that was written for an 8.01MHz machine on an 8.05MHz one? Same problem?

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

Re: Project: HDMI/DVI out for STFM

Post by Smonson » Wed Aug 29, 2018 12:48 pm

OK, they don't have exactly the right ones after all... These are the ST MHz values I found: 32.0424, 32.04245, 32.084988 (PAL), 32.215905.

Unfortunately Mouser's closest clocks in the right size are: 32, 32.11, 32.263.

If it's slightly out, will the top and bottom border openings develop a cumulative error, or will it be a stable error? If it's stable, it may be offscreen anyway - I'm only showing 20 extra lines on the top border and 20 on the bottom, so there are still quite a few lines that are outside the display area.

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

Re: Project: HDMI/DVI out for STFM

Post by troed » Wed Aug 29, 2018 4:33 pm

Smonson wrote:
Wed Aug 29, 2018 12:26 pm
I wasn't aware of this until you mentioned it, but I've looked around on Mouser and those other clock values are easy to obtain. But what happens if you run a demo that was written for an 8.01MHz machine on an 8.05MHz one? Same problem?
Yes - and some ancient demos do have such problems. Most demo coders (European) learned to sort out 8.01 and 8.02 though, but that was done in ways that won't work with 8.00. What will happen is that the lower border (and maybe top) will either flicker or not be displayed at all. And yeah, it means the clocks you found at Mouser won't help either - too far off.

One solution would of course be to run the FPGA off the system clock - but I understand you need to rewrite all timing code for that to work. And also, I guess you would need different code in the FPGA depending on which motherboard clock it is ...

I just wanted to raise it so that no one gets caught out when their system suddenly doesn't show a particular demo correctly :)

User avatar
dhedberg
Posts: 92
Joined: Tue Sep 12, 2017 8:21 pm
Contact:

Re: Project: HDMI/DVI out for STFM

Post by dhedberg » Wed Aug 29, 2018 9:15 pm

Awesome achievement! I'd be interested in buying one if the sync issues with opening the borders can be solved (I mostly use my ST to watch demos, so would hate to not have the possibility to watch old classics without switching back to the old Shifter).

Do you have any plans on doing something similar for the Falcon? Hijacking the RGB signals and bypassing the DAC?
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo and feel the JOY.

Post Reply

Return to “HARDWARE DISCUSSIONS”