[rescue] SS20/cg14 custom resolutions

der Mouse mouse at Rodents-Montreal.ORG
Fri Aug 8 03:20:13 CDT 2008


Thanks to a good deal of experimentation and some very helpful email
correspondence (thank you - you know who you are), I've now got my
SS20's cg14 running at custom resolutions - that is, resolutions other
than the ones Sun provided for in their ROM code for the cg14.

I expect this is neither here nor there for most of you.  But I posted
asking about it some months back (I _think_ I posted here), and I want
to get this data into the archives so it can, maybe, be found by the
next poor sod who wants custom resolutions out of a cg14.  (I wanted
them so I could use stock 1600x1200 flatpanels; the provided resolution
close to that is 1600x1280, and those extra 80 lines are annoying.)

The resolution-setting words for the cg14 just push ten numbers on the
stack (in contrast to, say, the cg6, where they are strings).  For
example, r1600x1280x66 is defined as

: r1600x1280x66
   640 500 42 bebc200 100 a 180 2c 0 0
;

Here's the list of provided settings from one of my SS20s:

: r1920x1080x72  780 438 48 cdfe600  d8 2 178 56 30 3 ;
: r1024x768x70   400 300 46 46cf710  88 6  88 20 10 2 ;
: r1280x1024x66  500 400 42 70a71c8  40 8 118 29 18 2 ;
: r1600x1280x66  640 500 42 bebc200 100 a 180 2c  0 0 ;
: r1024x768x66   400 200 42 4323800  7c 5  a0 27  4 1 ;
: r1152x900x76   480 384 4c 66ff300  40 8 104 21 1c 2 ;
: r1152x900x66   480 384 42 5a1f4a0  40 8 110 1b 28 2 ;
: r1280x1024x76m 500 400 4c 80befc0  40 8 120 20 20 2 ;
: r1600x1280x76m 640 500 4c cdfe600  48 8 1b8 32  8 2 ;
: r1024x768x60   400 300 3c 3d27848  80 6  a0 1d 10 2 ;

These numbers (given in hex, here, since that seems to be the default
if you're poking at them with "see") appear to be, in order,

Horizontal resolution, in pixels
Vertical resolution, in lines
Vertical retrace frequency, in Hz
Dot clock, in Hz
Horizontal sync pulse width, in pixel times
Vertical sync pulse width, in line times
Horizontal back porch width, in pixel times
Vertical back porch width, in line times
Horizontal front porch width, in pixel times
Vertical front porch width, in line times

(I'm not sure why the vertical retrace frequency is given, since it can
be calculated from the other values.)

If you want to use a custom set of values, first you need to work out
the values.  For example, I managed to get 1600x1200 with

640 4b0 42 bebc200 100 5a 180 2c 0 0

and the monitor I've been testing with happily synced to the resulting
signal.  Once you have your values, how do you use them?  I struggled
with this for hours, but finally found a fairly clean way to do it.
Include something like this in your nvramrc:

probe-all
" /obio/cgfourteen at 2,0" find-device
: r1600x1200x66 640 4b0 42 bebc200 100 5a 180 2c 0 0 ;
install-console
banner

Then you can set output-device to "screen:r1600x1200x66" to use those
values.  (The naming convention is purely for humans; I've had it work
with the word named "fnord" and output-device set to "screen:fnord".)

Since nothing in the nvramrc settings above is device-specific except
the details of the resolution-spec word, I conjecture (and conjecture
is what it is) that you could use similar constructs, with the
appropriate device-specific stuff in the custom word, to use custom
resolutions with other framebuffers.

One delightful little surprise the cg14 has waiting for the unwary is
that the X resolution apparently must be a multiple of 32 pixels.  I
tried to get 1680x1050 (a multiple of 16 but not of 32) and got a
bizarrely mangled display; I then tried to get 1601x1280 and it wedged
so hard I couldn't even blind-type "reset" (the 1680x1050 attempt did
let me blind-type "setenv use-nvramrc? false" and "reset" to recover).
I found that (to switch to hex) 640, 660, and 680 worked but 670 and
690 gave mangled video.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse at rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



More information about the rescue mailing list