Vectrex works better outside America due to mains frequency
Oct 16, 2022 15:20:55 GMT -5
Malban and Peer like this
Post by D-Type on Oct 16, 2022 15:20:55 GMT -5
Holiday time is over, kids back to school tomorrow!
What a fantastic bit of research, guys, top-draw and proves there's always new stuff to discover, even 40 years after! Now we know that the Vectrex with a 60Hz supply only has a non-wobbly image at 60Hz, it's clear and obvious that it's a mains frequency interference effect.
Let's revisit my original statements/questions regarding wobble:
"...Vectrex runs at 50Hz, which I presume is arbitrary and not tied to the mains frequency as that isn't 50Hz worldwide."
50Hz is arbitrary, but my presumption that wobble was the same running on 50Hz and 60Hz was incorrect. This difference in wobble has sat there for 40 years and no-one realised, can you believe that?! I wonder if the designers considered it at the time?
"...but is it possible to develop a game with a deliberate non-50Hz refresh rate and still get a good display performance?"
Absolutely Yes, but only if it's the same as the mains frequency
"...if you set the frame timer (or interrupt) to say 60Hz, would it work OK, or is there something odd intrinsic to the Vectrex that makes it only work properly at 50Hz?"
Yes, but see above. What's intrinsic is the mains frequency interference.
So what does this mean?
We have the same 50Hz/60Hz difference that old raster displays had, if you want you game to have no display wobble, you need to make two versions and one will play faster than the other. And your lowest common denominator is the number of cycles, which is reduced to 25,000 instead of 30,000. Oh no, how to decide! 50Hz is way more common than 60Hz, but it might be closer when you consider where the Vectrex was sold. (I guess the Americans will just have to put up with a slightly wobbly screen then - sorry.)
If you want to get really anal, you could calibrate your Vectrex against the mains frequency in your location. Many countries around Europe state their mains supply will be +/- 0.2Hz, which would work out as +/-120 cycles (I think?, 30,000/50*.2 = 120).
You can view the Swiss real-time grid frequency trend here. (Anyone remember in early 2018 that all the European mains frequency-sync'd clocks slowed down by 6 minutes?)
With my experiments of handling the display update with interrupts (which is what promped this thread in the first place), if my code took too long to check what caused the interrupt, it would wobble a tiny bit. With our new knowledge, I can fix this by reducing the duration of the timer by the number of cycles it takes to reset it when the interrupt happens.
The interference you'll see on the screen can be explained in audio terms with "acoustic beat", this wiki page gives a good overview and I reckon all the formulae would be the same for the 50/60Hz mixing on the Vectrex. Here's a 90s second YouTube demo with some oscillators and scope. I used to love playing with beating frequencies on my C64, they make a cool sound effect!
Lastly, in the early 80's when I was a kid, my Dad had an electronic synth album that sounded like nothing I'd ever heard before. The intro has the most amazing kinda "acoustic beat" tone that has stuck in my mind ever since, starts here on YouTube at 43 seconds.
What a fantastic bit of research, guys, top-draw and proves there's always new stuff to discover, even 40 years after! Now we know that the Vectrex with a 60Hz supply only has a non-wobbly image at 60Hz, it's clear and obvious that it's a mains frequency interference effect.
Let's revisit my original statements/questions regarding wobble:
"...Vectrex runs at 50Hz, which I presume is arbitrary and not tied to the mains frequency as that isn't 50Hz worldwide."
50Hz is arbitrary, but my presumption that wobble was the same running on 50Hz and 60Hz was incorrect. This difference in wobble has sat there for 40 years and no-one realised, can you believe that?! I wonder if the designers considered it at the time?
"...but is it possible to develop a game with a deliberate non-50Hz refresh rate and still get a good display performance?"
Absolutely Yes, but only if it's the same as the mains frequency
"...if you set the frame timer (or interrupt) to say 60Hz, would it work OK, or is there something odd intrinsic to the Vectrex that makes it only work properly at 50Hz?"
Yes, but see above. What's intrinsic is the mains frequency interference.
So what does this mean?
We have the same 50Hz/60Hz difference that old raster displays had, if you want you game to have no display wobble, you need to make two versions and one will play faster than the other. And your lowest common denominator is the number of cycles, which is reduced to 25,000 instead of 30,000. Oh no, how to decide! 50Hz is way more common than 60Hz, but it might be closer when you consider where the Vectrex was sold. (I guess the Americans will just have to put up with a slightly wobbly screen then - sorry.)
If you want to get really anal, you could calibrate your Vectrex against the mains frequency in your location. Many countries around Europe state their mains supply will be +/- 0.2Hz, which would work out as +/-120 cycles (I think?, 30,000/50*.2 = 120).
You can view the Swiss real-time grid frequency trend here. (Anyone remember in early 2018 that all the European mains frequency-sync'd clocks slowed down by 6 minutes?)
With my experiments of handling the display update with interrupts (which is what promped this thread in the first place), if my code took too long to check what caused the interrupt, it would wobble a tiny bit. With our new knowledge, I can fix this by reducing the duration of the timer by the number of cycles it takes to reset it when the interrupt happens.
The interference you'll see on the screen can be explained in audio terms with "acoustic beat", this wiki page gives a good overview and I reckon all the formulae would be the same for the 50/60Hz mixing on the Vectrex. Here's a 90s second YouTube demo with some oscillators and scope. I used to love playing with beating frequencies on my C64, they make a cool sound effect!
Lastly, in the early 80's when I was a kid, my Dad had an electronic synth album that sounded like nothing I'd ever heard before. The intro has the most amazing kinda "acoustic beat" tone that has stuck in my mind ever since, starts here on YouTube at 43 seconds.