Project: HDMI/DVI out for STFM

Progress on our FPGA cores.
troed
Moderator
Moderator
Posts: 908
Joined: Mon Aug 21, 2017 10:27 pm

Re: Project: HDMI/DVI out for STFM

Post by troed »

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: 708
Joined: Sat Oct 28, 2017 10:21 am
Location: Canberra, Australia
Contact:

Re: Project: HDMI/DVI out for STFM

Post by Smonson »

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: 708
Joined: Sat Oct 28, 2017 10:21 am
Location: Canberra, Australia
Contact:

Re: Project: HDMI/DVI out for STFM

Post by Smonson »

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: 908
Joined: Mon Aug 21, 2017 10:27 pm

Re: Project: HDMI/DVI out for STFM

Post by troed »

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: 105
Joined: Tue Sep 12, 2017 8:21 pm
Contact:

Re: Project: HDMI/DVI out for STFM

Post by dhedberg »

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 It's that time of the year again, or click here to feel the JOY.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Project: HDMI/DVI out for STFM

Post by exxos »

I can donate a osc if needs be, not sure what they are, but got stacks of MB for breakers..
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
troed
Moderator
Moderator
Posts: 908
Joined: Mon Aug 21, 2017 10:27 pm

Re: Project: HDMI/DVI out for STFM

Post by troed »

I will discuss my interfacing of this into my doubleST here: https://www.exxosforum.co.uk/forum/viewt ... 8998#p8998
User avatar
Smonson
Posts: 708
Joined: Sat Oct 28, 2017 10:21 am
Location: Canberra, Australia
Contact:

Re: Project: HDMI/DVI out for STFM

Post by Smonson »

troed wrote: Wed Aug 29, 2018 4:33 pm 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 ...
exxos wrote: Wed Aug 29, 2018 9:39 pm I can donate a osc if needs be, not sure what they are, but got stacks of MB for breakers..
The problem is the FPGA needs a full digital clock signal, and the ST's board (mine, at least) only has the crystal, with part of the clock circuit completed inside the ST shifter. Maybe it's possible to add a clock generator circuit to the little PCB that plugs into the shifter socket. But it sounds like a bit of a pain.
dhedberg wrote: 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).
Right now most demos don't run properly because the shifter model doesn't behave exactly like the ST shifter that most machines had. I think it does behave like a real ST shifter - but an early, uncommon version (the one that Ijor reverse-engineered). Changing the model is no problem, but I need a demo coder's help to find out where the difference lies.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Project: HDMI/DVI out for STFM

Post by exxos »

Smonson wrote: Thu Aug 30, 2018 12:23 am The problem is the FPGA needs a full digital clock signal, and the ST's board (mine, at least) only has the crystal, with part of the clock circuit completed inside the ST shifter. Maybe it's possible to add a clock generator circuit to the little PCB that plugs into the shifter socket. But it sounds like a bit of a pain.
The ST generates 32Mhz signal, can't you use that then ? All the shifter does is convert that to 16mhz for the MMU.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
Smonson
Posts: 708
Joined: Sat Oct 28, 2017 10:21 am
Location: Canberra, Australia
Contact:

Re: Project: HDMI/DVI out for STFM

Post by Smonson »

exxos wrote: Thu Aug 30, 2018 8:15 am The ST generates 32Mhz signal, can't you use that then ? All the shifter does is convert that to 16mhz for the MMU.
On mine it doesn't, the crystal connects to 2 pins on the shifter to create the resonant circuit, the clean digital signal is only inside the shifter. If you measure one of the pins off the crystal, you get a low-voltage sinewave.
Post Reply

Return to “FPGA DEVELOPMENT”