---
name: "svgalib.et4000"
section: "7"
platform: "linux"
package: "libsvga1"
version: "1:1.4.3-33"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/svgalib.et4000"
---

# svgalib.et4000(7)

Information for Tseng ET4000 users

## NAME

svgalib.et4000, libvga.et4000 - Information for Tseng ET4000 users

## TABLE OF CONTENTS

**NOTE: The ET4000 register layout changed stepping from** **svgalib 0.98 to 0.99. See 8. Problems below first**

**1.** Basics of ET4000 cards\
 **2.** How to configure [**svgalib**(7)](/svgalib/7.md)\
 **3.** Creating card dependent register values\
 **4.** Defining new modes\
 **5.** Redefining standard modes\
 **6.** Available examples\
 **7.** ET4000/W32 support\
 **8.** Problems\
 **9.** Using dynamic loading with other cards

## 1. BASICS OF ET4000 CARDS

Basically all ET4000 cards are equal, some are even more equal ...

The Chipset is well documented (by Tseng Labs and eg. the vgadoc2.zip) and all graphics functions can be used the same way on different cards (including the ET4000/W32 based ones). There are three important points to be kept in mind:

- **a.)**

  amount of available, the organisation and timing of video memory

- **b.)**

  type and capabilities of the DAC

- **c.)**

  available oscillator frequencies

[**svgalib**(7)](/svgalib/7.md) will check the available video memory during startup. This should work on all DRAM cards. If there are any problems concerning VRAM equipped cards, please tell us about.

By now we found is no reliable way to detect the memory organisation/ timing and the DAC type/capabilities. Most modern card use a frequency synthesizer and provide the following pixel frequencies (in MHz):

**50.350 56.644 65.0 72.0 80.0 89.8 63.0 75.0**

Checking older ET4000 cards we found a wide spread range of available frequencies. Since the video timing is based on the pixel frequency, the required register values are card dependent.

## 2. HOW TO CONFIGURE SVGALIB

[**svgalib**(7)](/svgalib/7.md) has a somewhat 'standard' registers set that may work with modern ET4000 cards. If [**svgalib**(7)](/svgalib/7.md) fails on your machine or you have a HiColor dac, you need to configure your [**svgalib**(7)](/svgalib/7.md).

The [**svgalib**(7)](/svgalib/7.md) may use hard linked or dynamical linked register values. If you use hard linked values, the binary will be smaller and start up faster but might fail on other machines.

Compiling the [**svgalib**(7)](/svgalib/7.md) with DYNAMIC defined (see *Makefile.cfg*) will set up dynamic register loading. Otherwise the value from  *svgalib/et4000.regs* will be hard linked.

The dynamic configuration will be read from  */etc/vga/libvga.et4000* which is an ASCII file (see *Makefile.cfg* for exact naming). If you have a working et4000.regs for your system just copy this file to */etc/vga/libvga.et4000* or link */etc/vga/libvga.et4000* to your *svgalib/et4000.regs* file.

The actual scanner/parser will handle the following entries:

- **#define DAC\_TYPE \<integer\>**

  Overwrite the DAC detection

- **#define \<MODE1\> \<MODE2\>**

  Enable MODE1 using MODE2 registers, eg. 64K modes like 32K modes

- **#define \<MODE\> DISABLE\_MODE**

  do not use MODE (eg. from vgadrv)

- **char \<MODE\>\<strg\>\[..\] = {\<integer\>, \<integer\>, ... };**

  register definition

with

**\<MODE\>    ::= 'g'\<decimal\>x\<decimal\>x\<color\>\<ignored\>**\
 **\<integer\> ::= \<decimal\>\|\<hex\>**\
 **\<hex\>     ::= '0x'\<hexdigit\>{\<hexdigit\>}**\
 **\<decimal\> ::= \['+'\|'-'\]\<digit\>{\<digit\>}**\
 **\<hexdigit\>::= \<digit\>\|'a..f'\|'A..F'**\
 **\<digit\>   ::= '0..9'**\
 **\<color\>   ::= '2'\|'16'\|'256'\|'32k'\|'32K'\|'64k'\|'64K'\|'16M'**\
 **\<strg\>    ::= \<empty\>\|\[(\<alpha\>\|'\_'){\<digit\>\|\<alpha\>\|'\_'}\]**\
 **\<alpha\>   ::= 'a..z'\|'A..Z'**

C style comments will be skipped. See the *et4000/* subdirectory of the svgalib distribution for examples.

## 3. CREATING CARD DEPENDENT REGISTER VALUES

You may create a *et4000.regs on your own with the* *tseng3.exe* program. This DOS program and its source is included in the svgalib distribution.

Just boot MS-DOS and start

**tseng3 et4000.reg**

The *tseng3.exe* will measure the video timing for each available mode. Check the *et4000.regs* file against your monitor documentation and disable all non conformant modes, eg.

**#define g1024x768x256\_regs DISABLE\_MODE**\
 **/\***\
 **static unsigned char g1024x768x256\_regs\[71\] = {**\
 **...**\
 **};**\
 **\*/**

will disable the 1024x768x256 mode. You **mustn't** disable the 640x480x256 mode!

Your *et4000.regs* *must define the following symbols (register values* or **#define ... DISABLE\_MODE**) for hard linking:

**g320x200x32K\_regs**, **g640x400x256\_regs**, **g640x480x256\_regs**,  **g640x480x32K\_regs**, **g640x480x16M\_regs**, **g800x600x16\_regs**,  **g800x600x256\_regs**, **g800x600x32K\_regs**, **g1024x768x16\_regs**,  **g1024x768x256\_regs**, and **g1280x1024x16\_regs**.

and all 64K modes handled like 32K modes by the driver:

**#define g320x200x64K\_regs g320x200x32K\_regs**\
 **#define g640x480x64K\_regs g640x480x32K\_regs**\
 **#define g800x600x64K\_regs g800x600x32K\_regs**

You may omit every unusable mode in  */usr/lib/libvga.et4000*.

## 4. DEFINING NEW MODES

All standard [**svgalib**(7)](/svgalib/7.md) modes may be selected by the mode constants  defined in **#include\<vga.h\>** (eg. **G320x200x16**). You may define new modes on your own. Just use dynamic register loading and add the register definition of the new mode. Your program may determine the related  modenumber by checking the vga\_getmodeinfo(1..vga\_lastmodenumber()).

Most ET4000 cards provide 640x350 and 640x400 graphics modes. The *tseng3.exe* generates the related register sets. You may also use [**dumpreg**(1)](/dumpreg/1.md) from an X window to grab you favourite X graphics mode. The X mode normally isn't usable directly. See *cardex.w32* for an example and *et4000.c* for a brief description of et4000 registers (both files are included in the svgalib distribution).

## 5. REDEFINING STANDARD MODES

Using dynamic register loading you may redefine any standard VGA  mode except of TEXT and 640x480x16. Just add the ET4000 specific register set to */etc/vga/et4000.regs*.

## 6. AVAILABLE EXAMPLES

In the *et4000/* subdir of the svgalib distribution you'll find some sample register sets:

- **cardex.w32**

  Cardex ET4000/W32 card, Music TrueColor DAC

- **speedstar+**

  SpeedSTAR PLUS card, Normal DAC

- **orchid.pdII**

  Orchid Prodesigner II

## 7. ET4000/W32 SUPPORT

The actual driver seems to be ET4000/W32 compatible. Tell us about any problems (and solutions). If you've got any information about the ET4000/W32 blitter, we would be pleased to receive it.

## 8. PROBLEMS

As mentioned before, the DAC detection isn't very reliable. **vgatest**(6) should print equal screens in 256 color and HiColor/TrueColor modes. You may have to edit your *libvga.et4000* register file by hand to setup the correct DAC.

The *tseng3.exe* may fail due to incompatible mode numbering. You might use a VESA driver (eg. tlivesa.com from VPIC 6.0) or edit and recompile the *tseng3.exe*.

Newer ET4000 chipsets (eg. W32 and W32i) allow up to 32 clock  frequencies. Two additional register values were added just before the old extended register value. The new registers are CRTC/30h and CRTC/31h. The old register set had 71 values, the new has grown to 73. You may update your old register set by hand:

- \-

  run the dumpreg program, remember the first two values from last data line.

- \-

  edit your libvga:

  for each mode

  change the number of register values from 71 to 73\
   add the values from dumpreg output at front of last data line

- \-

  run .BR vgatest (6) to check the new register set

## 9. USING DYNAMIC LOADING WITH OTHER CARDS

The dynamical register loading may be used in other drivers. Since hard linked register values work fine for Cirrus and Trident cards, we didn't include this feature.

## FILES

*/etc/vga/libvga.config*\
 */etc/vga/libvga.et4000*

## SEE ALSO

[**svgalib**(7)](/svgalib/7.md), [**libvga.config**(5)](/libvga.config/5.md).

## AUTHOR

This documentation for the ET4000 registers was provided by Hartmut Schirmer. However, it was slightly reformatted by Michael Weller \<eowmob@exp-math.uni-essen.de\>.
