Jump to content
IGNORED

Mystery of the ST's weird clock oscillator frequency choices.


Recommended Posts

The NTSC ST/STF/STFM and MEGA ST computers use a 32.0424 or 32.04245 MHz clock oscillator to drive the SHIFTER and derive other clock rates from in the system.
The PAL region counterparts use 32.084988 MHz and same for PAL STe (NTSC STe uses 32.215905 MHz, which is simply NTSC Colorburst (Chroma) x9, or rather exactly 3.579545 x9, though 32.215909 would be more correct, true NTSC chroma value is 3.57954545454545... or exactly exactly 315/88).

The NTSC STe clock is no mystery, but the other two have baffled me for a long time and come up various places in discussion where no one seems to know why other than perhaps Atari got those specific values for cheap in bulk and they were close enough to get the proper TV sync rates.

However, I think I've found the real reason:
Atari engineers (presumably Shiraz Shivji specifically) wanted pixel clock (dot clock), chroma clock rates, and h-sync rates matched up so that an integer number of clock cycles for both Chroma and dot clock to avoid dot crawl or moire or other video artifacting as well as jitter or zig-zag spacing of pixels between lines and still have a compatible sync rate on top of all that for 263 and 313 line NTSC and PAL TVs and monitors.
On top of all that, he wanted to get as close as possible to 8 MHz to make the most of the 8 MHz rated 68000.
(side note: some people claim the 32.04245 MHz version was only in the MEGA ST models, but I've seen it inside STM and STFM boards)

So if you look at it that way:
For NTSC:
32.04245 MHz
H-sync is this /4 (8 MHz GLUE clock) then /508 (GLUE clocks per scanline) = 15.76892 kHz then /263 (lines per frame) = 59.95788 Hz
The 15.76892 kHz line rate is what's important here.
NTSC Colorburst = 3.579545 MHz /15.76892 kHz = 227 color clocks per scanline.
Or without any intermediate rounding:
32.04245 /4 /508 x227 = 3.579545349 MHz or rounded to the source clock's 7 significant figures = 3.579545 MHz
or
32.0424 /4 /508 x227 = 3.579539764 MHz or rounded to 6 figures = 3.57954 MHz
So in 320x200 16 color mode with an 8 MHz dot clock, you have exactly 508 pixels and 227 colorburst clocks per scanline, so every single line of the screen will stay in phase (or retain the same phase offset from left to right)

Also, while normal NTSC broacast used roughly 15.73 kHz line rate and 59.94 Hz, the older black and white standard used exactly 15.75 kHz and 60.0 Hz, and all color sets had to be compatible with that. It's also analog hardware and needs to have an acceptably wide range of operation and margin for error to be reliable. (15.69 to 15.79 kHz would probably be generally acceptable, possibly with more preference towards the lower side of that; Chroma/228 = 15.69976 kHz is quite common among several game consoles and home computers using 262 line screens: the SMS and Mega Drive use it, and I think the NES, SNES, and Atari 7800 use that, and I think the VCS, Atari 8-bit, and Amiga all use the Colorburst/227 = 15.7689 kHz 263 lines, ignoring Amiga Interlace modes which effectively switch between 262 and 263 lines on even/odd fields per 525 line interlaced frame)

And for PAL:
32.084988 MHz ST clock rate
4.43361875 MHz MHz PAL Colorburst clock
sync rate=
32.084988 /4 /512 = 15.666498 kHz /313 = 50.052709 Hz
4.43361875 /283 = 15.66649735 kHz
or
32.084988 /4 /512 x283 = 4.433618947 MHz or rounded to 8 figures = 4.4336189 MHz


That said, the actual implementation of composite video color encoding in STM/FM units seems to often (if not always) use a discrete colorburst crystal (inside the SHIFTER's sheet metal shielded box, right next to the 32 MHz crystal).
So apparently that was cheaper or easier and worked well enough to not bother with synthesizing the colorburst clock from the 32 MHz crystal source. Maybe they'd originally intended to have the GLUE chip synthesize it along with sync signals, but didn't have time or chip space to implement the x227 or x283 clock multipler PLL circuit inside it. (or indended to feed external PLL logic with the H-sync output from the GLU)

Apparently they also decided it wasn't important to even have an integer number of colorburst clocks per line when it came to the STe, as the 32.215905 MHz source clock as it uses:
512 pixel clocks per line at 8.05397625 MHz = 15.730422363 kHz /263 = 59.811491876 Hz (I've seen mixed info on whether it's 263 or 262, 262 would give 60.03978 Hz).

This gives 512 pixel clocks per line at 8.05397625 MHz, but you end up with 2048/9 = 227.555555556 3.579545 MHz colorburst clocks each scanline, which would mean the phase-alignment between pixel clock and color clock will shift slightly for each line and then repeat/loop that shifting pattern every 9 scanlines, so you could end up with moire and/or dot crawl patterns on areas of high contrast. The severity of that will depend on the RGB video encoder used and they may have improved enough by 1989 to not have so much of a problem, though the Mega Drive has very noticeable "rainbow banding" moire artifacts on fine, high contrast stipple/dither pattern areas or column/strip dithering. (checkerboard mesh results in diagonal bands of colors and vertical strips result in vertical bands, both of which shift and shimmer during smooth scrolling)

Had they wanted to retain the exact screen timing of the previous NTSC ST models, but switch to the same 512 8 MHz clock ticks per line that PAL units used, then they'd have used: 32.29475 MHz to achieve this and derived colorburst from the h-sync output.













  • Like 2
Link to comment
Share on other sites

short of finding the design and meeting notes for the ste and beyond we may never know the thinking processes going on. Normally you dont fix things , or make any changes at all, if 'it aint broken' What were the complaints coming in from the field? short of that we only have the well thought out and defined posits above , and the few and far between ruminations scattered throughout the threads.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...