// 20100620 AB initial

Build instructions for blackout:
--------------------------------
This documente describes how to build the special versions for ATI X300, ATI
X550 and AMD/National GEODE chips. Instructions from the original package are in
blackout_readme.

Preface:
--------
Today I can only build black.exe with OpenWatcom. Though blackout.exe and
blackdll.dll are build well but may not work as desired. As the chip specific
code is in black.c at this thime it is not important for me to sort out the
problems. You can combine black.exe built with OpenWatcom and the original
blackout.dll and blackout.exe from Staffan. That's what I did for v1.04.

Currently beside VESA blanking, black.exe supports ATI X300, ATI X550 and
AMD/National GEODE chips. Chip has to be selected by the #define at the top of
black.c. Sorry no automatic chip detection. Have I mentioned before the whole
thing is a quick and dirty hack? It works with my X300 since years now and I
never thought I've to touch the sources again as Doodles by far more superior
screen saver package should support every graphic card now. We've discussed the
X300 issues back in 2008 and I was optimistic he will add support for this ATI
chips soon. So no need for another antique sreen saver package. The only reason
why I touched this sources again is cause Paul Smedley now uses a X550 because
his X300 died and he told me, that Doodles screen saver still don't support the
X550.

Unfortunately I do not remember exactly anymore the details what I've done back
in 2008 when I release version 103. So some details maybe missing. I've build
BlackOut.exe, Black.exe and BlackDLL.DLL with OpenWatcom. Back in 2008 probably
it was v1.3. Today I use v1.8. There is a BlackOut.wpj Watcom Project file. But
maybe the original makefile from Staffan Ulfberg maybe the better way to go if
you want to build the whole thing. Staffan used gcc/emx09b and gnumake. See
blackout_readme for details.

Add support for another chip:
-----------------------------
As said, chip specific information is in build.exe. Building black.exe works
fine with OpenWatcom1.8. Fireing up the OpenWatcom IDE with the BlackOut.wpj
project file and compile the Black.exe target. Or start VisualSlickEdit with the
BlackOut.vpj project file and press F5. Be sure NOT to use the newly build
blackout.exe and blackdll.dll but the original versions instead! Only use
the new black.exe.

If you want to add support for the ATI X850 f.e. do the following -
copy test_X550.cmd to test_X850.cmd. Search in the output from pci.exe for
primary and secondary video adapter information. With ATI vendor ID is 1002 and
with X550 chip ID is 5B63 hex for primary and 5B73 for secondary video adapter.
Though, both are on the same graphic card and needs to be programmed. Which
is primary and secondary depends on your monitor setup. At least my X300
switches primary and secondary on power up depending on which connector a
monitor is found. Edit test_X850.cmd and change all occurences of 5B63 and 5B73
to the IDs of the X850. Start test_X850.cmd AND wait about 20 seconds without
interrupting the script. Your monitor should go black and switch on again after
about 20 seconds. This procedure will only work with chips from the X300 range.
It's unlikely that other chips use the same register #54 as the X300/X550 do.

If the above test_xxxx.cmd do not work for your card it makes absolutely no
sense to read further. Find the approbiate registers for your card with the
above procedure! It will save you a lot of reboots and frustration.

If the test_xxxx.cmd works then add at the top of black.c f.e. #define
__ATI_X850__. Search for all occurences of __ATI_X550__. Copy these sections,
enclose with your #define label, change to your card ID and you're done.

If you uncomment //#define  __PMPRINTF__ black.exe will send trace messages to
pmprintf. I've included debug (pmprintf) and release builds for the currently
supported adapters.

