[comp.os.msdos.programmer] IBM CGA 160x100x16 "tweak" video mode

dfoster@jarthur.Claremont.EDU (Derek R. Foster) (11/02/90)

I have some questions regarding the little-known 160x100x16 colors
graphics video mode possible on an IBM CGA system.

1) How portable is it? Do you know of any systems that it for certain
   will/will not work on?
2) What is the most reliable way of invoking it? I have managed to
   invoke it using some empirically-derived numbers for the video
   board registers, (I experimented a lot), but I don't know if these
   numbers are "ideal" or not. (I had to adjust the vertical-hold
   knob on my monitor slightly to get a clear picture. Perhaps a different
   set of numbers would make this unnecessary?) Source code in C or
   assembly would be appreciated here.
3) Is it possible to invoke this mode or a functional work-alike on an
   EGA or VGA system in its native mode? How? (what values to send to
   the EGA/VGA registers?)

I have written a fairly complex game in this mode, and I am curious just
how transportable my game would be to other systems with other video
boards, etc. I can make my game run on my EGA board by telling my EGA
to simulate a CGA, but when I try to run it on my EGA in native mode,
I get either garbage or a working version confined to the upper screen.
Evidentally the video timings are different. I would have thought that
the greater amount of memory on an EGA board combined with the closer
scan lines would mean that I could get more vertical lines of pixels this
way, but I can't seem to get it to work. I would appreciate any info
that you can give me on this subject. If there is interest, I will post a
summary.

Thanks in advance!

Derek Riippa Foster