home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDWARE / LEDSTUFF.ZIP / FIXLED.DOC < prev    next >
Encoding:
Text File  |  1987-03-29  |  6.1 KB  |  139 lines

  1.     Leading Edge Model D Mono Screen "color" Fixup
  2.     ----------------------------------------------
  3.     (c) 1986  Alan R. Losoff,  Milwaukee Wisconsin
  4.  
  5.     Background:
  6.     ----------
  7.         The Leading Edge Model D in monochrome emulates a Hercules
  8.     (tm) Monochrome Graphic Card.  I have noticed several programs
  9.     which display areas that are supposed to be text as various
  10.     shades of blank screen.  Many programs allow you to configure
  11.     "colors" even on a MONO screen, which solves the problem if you
  12.     can at least read enough to run the color set program.    The
  13.     public Domain AUTOMENU is one that I was able to get working
  14.     this way.  However, many programs do not allow color
  15.     configuration, or do not give enough flexiblity to get
  16.     everything visible.  Among these are Leading Edge's own Nutshell
  17.     Tutorial (how mbar- rassing for them!) and Paperback Software's
  18.     VP/Planner.
  19.  
  20.         I called Leading Edge Tech Support and found them aware of
  21.     the problem, but without a general fix.  They did send me an
  22.     upgrade to Nutshell, but could do nothing about other packages.
  23.     They suggested that perhaps the programs were getting confused
  24.     since the Model D has both color and mono circuitry.  Sounds
  25.     reasonable BUT THIS IS NOT THE CASE.
  26.  
  27.         The IBM monochrome graphics adaptor very cleverly maps some
  28.     be color combinations from the Color Graphics Adaptor (CGA) into
  29.     the "attributes" that it supports.  The Mono adaptor supports
  30.     normal (white on black), reverse (black on white), underline
  31.     (blue on black) and invisible (black on black).  It also
  32.     supports the first three with the addition of blink and or
  33.     bright for a total of 13 attributes.  The remaining possible
  34.     attributes, most of which correspond to valid CGA color combina-
  35.     tions, are UNDEFINED.  However, on a "true-blue" IBM monochrome
  36.     display adaptor the undefined codes all display as normal (with
  37.     whatever blink/bright is set).    On the Leading Edge Model D,
  38.     many of the undefined codes come out as white on white.  I do
  39.     not know if this happens on a genuine Hercules Card or if it is
  40.     unique to this one.  The documentation for all three adaptors
  41.     (IBM, Leading Edge and Hercules) DOES NOT SPECIFY what happens
  42.     if you use an undefined combination.
  43.  
  44.         So the problem is not that the programs think that the
  45.     Leading Edge is running in color (the Pheonix Rom passes all the
  46.     tests for display type), but rather that lazy programmers didn't
  47.     care.  They "knew" that the illegal combinations would show up
  48.     as normal white on black.  So here we are!
  49.  
  50.         The only "correct" fix for this problem is a hardware change
  51.     to the display adaptor to map illegal codes the same as the IBM
  52.     display does.  But I'm not willing to wait for that, so I wrote
  53.     a software solution.  It's not "clean", it takes 3-4% away from
  54.     your CPU when active, but it does work!
  55.  
  56.  
  57.     How to use FIXLED:
  58.     -----------------
  59.         I tried to make this program as easy to use as possible.
  60.     At the A> prompt (and with fixled.com on drive a:) type
  61.  
  62.         FIXLED            and press return
  63.  
  64.     it loads itself and becomes active.  To turn it off (but leave
  65.     it in memory) just type
  66.  
  67.         FIXLED            and press return
  68.  
  69.     again.    Each call to FIXLED toggles the status.  You may add it
  70.     to your autoexec.bat or the .bat for executing a program that
  71.     needs it.  For use in a .bat file, it returns an ERRORLEVEL code
  72.     of 1 if it is now active, and 0 if it isn't, so you can be sure
  73.     you didn't turn it off when you meant to turn it on.  There is a
  74.     sample batch file for VP Planner included with this program.
  75.  
  76.  
  77.     How it works:
  78.     ------------
  79.         Since most programs write directly to the screen memory
  80.     rather than calling DOS to do it's writing, there is no easy way
  81.     to intercept the writes.  Therefore I had to take an "after the
  82.     fact" approach.  FIXLED steals the timer interupt vector (in a
  83.     very clean way, so it should not interfere with anything else)
  84.     and every time it is activated (18.2 times per second) it
  85.     examines a portion of screen memory and changes any illegal
  86.     attributes it finds to the attribute a true IBM display would
  87.     show.  It is currently set up to do it 200 bytes at a time (one
  88.     tenth of the screen) which I found to be the best compromise
  89.     between speed and overhead.  Thus it will fix up any error
  90.     within 10/18 of a second.
  91.  
  92.         This is yet another one of those "load me last" programs.
  93.     It is only necessary if you want to be able to turn it on and
  94.     off.  The program can't find itself if some other program has
  95.     taken back the timer interupt.    If you don't intend to toggle
  96.     it, there should be no problem loading a program which insists
  97.     more vehemently on being loaded last.
  98.  
  99.         If the MONO TEXT MODE is not active, the interupt handler
  100.     will exit without messing up any graphics.  I've tested this
  101.     with REFLEX version 1.1, and would expect it to be alright with
  102.     any graphic program that sets the mode properly.  If you find
  103.     one of your graphics screens self-destructing, you will have to
  104.     disable FIXLED while running it.
  105.  
  106.  
  107.     Caveats:
  108.     -------
  109.         To the best of my knowledge, this program works as described
  110.     and won't mess anything else up.  However, I make no claims or
  111.     guarantees for it.  You use it at your own (minimal) risk.  If
  112.     you don't like it, what do you want for nothing?  If you do like
  113.     it, send a donation to some charity -- not to me.
  114.  
  115.         This program and supporting material are protected by
  116.     copyright.  Permission to distribute copies is granted under the
  117.     following conditions:
  118.  
  119.         1.    No commercial distribution.  This excludes computer
  120.     dealers, distributers and manufactures from giving this program
  121.     to customers.  A license for commercial distribution is
  122.     avaliable.  this also precludes charging a fee for the
  123.     distribution of this program.  Reasonable copying charges by a
  124.     non-profit users' group are ok.
  125.  
  126.         2.    No modified version may be distributed without including
  127.     the original unmodified version, including this documentation.
  128.  
  129.         3.    All copyright notices are to be preserved.
  130.  
  131.  
  132.     Author:
  133.  
  134.     Alan R. Losoff, CDP        (414) 228-7160    (Voice)
  135.     5726 N. Argyle            (414) 964-5160    (Data)
  136.     Milwaukee, WI  53209        Genie mailbox:    ALSOFT
  137.  
  138.  
  139.