The first operations performed by the driver are in BitBlt. Edit EDDHBBLT.ASM,
modifying it to work with your hardware. The following are guidelines you
can use:
- The very first BitBlt processed in the driver
is a pattern blt performed by eddh_PatDestBlt (in EDDHBBLT.ASM). This paints
the gray background screen in 8-bit-per-pel mode. (The seemingly solid
gray is a 2x2 dither.) Consequently, eddh_PatDestBlt is the first part
of the driver to modify.
- Modify TransferShadowRegisters in HWACCESS.ASM.
This routine sets the color, raster operation, and other operation-specific
parameters. If you do not want to perform this operation, you can temporarily
get the color, pattern, and other information needed to complete the blt
from the Shadow8514Regs, and the AIxfer parameter block, and put code in-line
in eddh_PatDestBlt to set these parameters. Eventually, return and make
TransferShadowRegisters work correctly.
- When eddh_PatDestBlt is working, modify eddh_SrcDestBlt
and eddh_DestOnlyBlt, in that order. eddh_SrcDestBlt consists of several
cases. The easiest portion to modify is the part that deals with VRAM-to-VRAM
blts. Bring up the portion which copies color bit maps in system memory
to the display. (This is used early in the construction of the desktop.)
- Modify CopyMemoryToVRAM in HWACCESS.ASM at this
time using the aperture-to-VRAM on your video device. For the most part,
the S3 driver uses the drawing engine to copy system-memory bit maps to
VRAM. This option may not be available on your device. (Or, it may be
more efficient on your device to use the aperture.)
- Edit EDDHLINE.ASM and EDDHSCAN.ASM, and ifdef
out any code that draws anything with the S3 hardware. This will allow
these functions to be called without hanging the driver. Likewise, ifdef
out the code in EDDHGCHS.ASM. This will temporarily disable text. (If
this is performed carefully, mark the places where you need to insert code
for your device.)
- When eddh_PatDestBlt, eddh_SrcDestBlt, and eddh_DestOnlyBlt
are working, the presentation desktop (with no text) appears.
- If caching either monochrome or color bit maps
is undesirable during the development of eddh_SrcDestBlt, you can disable
one or both of them in PIXBLT.C. (See BitBlt
for further information.)
[Back: Initializing the Accelerator]
[Next: The Cursor]