mach64_id.bas

Some Mach64-related constants

Author

Marcel Sondaar

License

Public Domain

Summary
mach64_id.basSome Mach64-related constants
Mach64_devidsLists the PCI Device IDs that are based on the mach64 core.
Mach64_regsA list of the Mach64 registers Note: some registers may not be present on all controllers, and some may be missing altogether.
Constants
CRTC_H_TOTAL_DISP32-bit register holding the horizontal counter settings
CRTC_H_SYNC_STRT_WID32-bit register holding the hsync pulse settings
CRTC_V_TOTAL_DISP32-bit register holding the vertical counter settings
CRTC_V_SYNC_STRT_WID32-bit register holding the vsync pulse settings
CRTC_VLINE_CRNT_VLINE32-bit register holding the current vertical counter and reference counter.
CRTC_OFF_PITCH32-bit register holding the screen offset and virtual width
CRTC_GEN_CNTL32-bit register for general CRTC configuration.
DSP_CONFIG32-bit register for the DSP (undocumented)
DSP_ON_OFF32-bit register for the DSP (undocumented)
OVR_WID_LEFT_RIGHT32-bit register holding the size of the horizontal overscan area
OVR_WID_TOP_BOTTOM32-bit register holding the size of the vertical overscan area
CLOCK_CNTL8-bit register for external clock control.
CLOCK_CNTL_ADDR8-bit register for addressing a register of the integrated clock generator (undocumented)
CLOCK_CNTL_DATA8-bit register for accessing a register of the integrated clock generator (undocumented)
BUS_CNTL32-bit register for configuring the internal and external buses
EXT_MEM_CNTL32-bit register for memory configuration
MEM_CNTL32-bit register for memory configuration
DAC_W_INDEX8-bit register for selecting the DAC entry to write to.
DAC_DATA8-bit register for reading/writing the contents of the DAC
DAC_MASK8-bit register containing the mask to be applied to color indices prior to lookup in the DAC
DAC_R_INDEX8-bit register for selecting the DAC entry to read from.
DAC_CNTL32-bit register for general DAC configuration
GEN_TEST_CNTL32-bit register for general engine and test settings.
Mach64_crtc_gen_cntlLists the fields in the Mach64_regs.CRTC_GEN_CNTL register
Constants
CRTC_EXT_DISP_ENallows the programmer to switch between the VGA and native CRTC
CRTC_ENenables the CRTC when set, resets the CRTC when clear.
Mach64_clock_regsLists the registers of the integrated clock
Mach64_gen_test_cntlLists the fields of the Mach64_regs.GEN_TEST_CNTL register
Mach64_bus_cntlLists the fields of the Mach64_regs.BUS_CNTL register

Mach64_devids

Lists the PCI Device IDs that are based on the mach64 core.

Currently this list is short because there are minor differences between ‘64s that can break drivers, and the code hasn’t been tested thoroughly

Mach64_regs

A list of the Mach64 registers Note: some registers may not be present on all controllers, and some may be missing altogether.

Summary
Constants
CRTC_H_TOTAL_DISP32-bit register holding the horizontal counter settings
CRTC_H_SYNC_STRT_WID32-bit register holding the hsync pulse settings
CRTC_V_TOTAL_DISP32-bit register holding the vertical counter settings
CRTC_V_SYNC_STRT_WID32-bit register holding the vsync pulse settings
CRTC_VLINE_CRNT_VLINE32-bit register holding the current vertical counter and reference counter.
CRTC_OFF_PITCH32-bit register holding the screen offset and virtual width
CRTC_GEN_CNTL32-bit register for general CRTC configuration.
DSP_CONFIG32-bit register for the DSP (undocumented)
DSP_ON_OFF32-bit register for the DSP (undocumented)
OVR_WID_LEFT_RIGHT32-bit register holding the size of the horizontal overscan area
OVR_WID_TOP_BOTTOM32-bit register holding the size of the vertical overscan area
CLOCK_CNTL8-bit register for external clock control.
CLOCK_CNTL_ADDR8-bit register for addressing a register of the integrated clock generator (undocumented)
CLOCK_CNTL_DATA8-bit register for accessing a register of the integrated clock generator (undocumented)
BUS_CNTL32-bit register for configuring the internal and external buses
EXT_MEM_CNTL32-bit register for memory configuration
MEM_CNTL32-bit register for memory configuration
DAC_W_INDEX8-bit register for selecting the DAC entry to write to.
DAC_DATA8-bit register for reading/writing the contents of the DAC
DAC_MASK8-bit register containing the mask to be applied to color indices prior to lookup in the DAC
DAC_R_INDEX8-bit register for selecting the DAC entry to read from.
DAC_CNTL32-bit register for general DAC configuration
GEN_TEST_CNTL32-bit register for general engine and test settings.

Constants

CRTC_H_TOTAL_DISP

32-bit register holding the horizontal counter settings

documented in vgadoc

CRTC_H_SYNC_STRT_WID

32-bit register holding the hsync pulse settings

documented in vgadoc

CRTC_V_TOTAL_DISP

32-bit register holding the vertical counter settings

documented in vgadoc

CRTC_V_SYNC_STRT_WID

32-bit register holding the vsync pulse settings

documented in vgadoc

CRTC_VLINE_CRNT_VLINE

32-bit register holding the current vertical counter and reference counter.

documented in vgadoc

CRTC_OFF_PITCH

32-bit register holding the screen offset and virtual width

documented in vgadoc

CRTC_GEN_CNTL

32-bit register for general CRTC configuration.

documented in vgadoc.  See Mach64_crtc_gen_cntl

DSP_CONFIG

32-bit register for the DSP (undocumented)

bits 00-15dsp_xclks
bits 16-19dsp_loop_latency
bits 20-31dsp_precision

DSP_ON_OFF

32-bit register for the DSP (undocumented)

bits 00-15dsp_off
bits 16-32dsp_on

OVR_WID_LEFT_RIGHT

32-bit register holding the size of the horizontal overscan area

documented in vgadoc

OVR_WID_TOP_BOTTOM

32-bit register holding the size of the vertical overscan area

documented in vgadoc

CLOCK_CNTL

8-bit register for external clock control.

VGADOC disagrees and labels it 32 bit which is technically wrong.  It will probably work happily on a 88800GX though

more info on this register as found in 88800s is in VGADOC

it seems that on integrated versions this is used for selecting the CRTC clock

CLOCK_CNTL_ADDR

8-bit register for addressing a register of the integrated clock generator (undocumented)

bit 0Undefined
bit 1Start write cycle.  Set this bit prior to write, write the data to CLOCK_CNTL_DATA, then reload this register with the bit cleared again.
bit 2-7Clock register index.  See Mach64_clock_regs

CLOCK_CNTL_DATA

8-bit register for accessing a register of the integrated clock generator (undocumented)

bit 0-7data bits

BUS_CNTL

32-bit register for configuring the internal and external buses

documented in vgadoc

EXT_MEM_CNTL

32-bit register for memory configuration

not documented, set by linux for all later Mach64s.  Only written with magic values.

MEM_CNTL

32-bit register for memory configuration

partially documented in vgadoc, partially undocumented.

DAC_W_INDEX

8-bit register for selecting the DAC entry to write to.

Mirrors the corresponding VGA register.

DAC_DATA

8-bit register for reading/writing the contents of the DAC

Mirrors the corresponding VGA register.

DAC_MASK

8-bit register containing the mask to be applied to color indices prior to lookup in the DAC

Mirrors the corresponding VGA register.

DAC_R_INDEX

8-bit register for selecting the DAC entry to read from.

Mirrors the corresponding VGA register.

DAC_CNTL

32-bit register for general DAC configuration

partially documented in vgadoc, partially undocumented.

GEN_TEST_CNTL

32-bit register for general engine and test settings.

Mach64_crtc_gen_cntl

Lists the fields in the Mach64_regs.CRTC_GEN_CNTL register

Summary
Constants
CRTC_EXT_DISP_ENallows the programmer to switch between the VGA and native CRTC
CRTC_ENenables the CRTC when set, resets the CRTC when clear.

Constants

CRTC_EXT_DISP_EN

allows the programmer to switch between the VGA and native CRTC

set to enable the accelerated CRTC

CRTC_EN

enables the CRTC when set, resets the CRTC when clear.

Mach64_clock_regs

Lists the registers of the integrated clock

the register is to be shifted left by 2 then filled in Mach64_regs.CLOCK_CNTL_ADDR

Mach64_gen_test_cntl

Lists the fields of the Mach64_regs.GEN_TEST_CNTL register

Mach64_bus_cntl

Lists the fields of the Mach64_regs.BUS_CNTL register

32-bit register for general CRTC configuration.
32-bit register for general engine and test settings.
32-bit register for configuring the internal and external buses
Lists the fields in the Mach64_regs.CRTC_GEN_CNTL register
8-bit register for accessing a register of the integrated clock generator (undocumented)
Lists the registers of the integrated clock
8-bit register for addressing a register of the integrated clock generator (undocumented)