test_ati.bas

Testing module for ATI graphics stuff

Author

Marcel Sondaar

License

Educational Purposes

Summary
test_ati.basTesting module for ATI graphics stuff
VREGSRegisters common to all Verite-based boards
Constants
VERITE_MEMENDIANThis register controls the byteswapping performed when writing to the linear framebuffer.
VERITE_GPUCTLThis register controls the state of the RISC processor It holds several bitflags: 01h - reset chip 02h - hold risc 04h - single step 08h - divide by 2 disable 10h - VGA reset 20h - assert XReset output to ext devices
VERITE_MODEThis register allows one to select between CRTC modes.
VERITE_CRTCCTLCRTC Control register.
VERITE_CRTCHHorizontal timing register
VERITE_CRTCVVertical timing register
Functions
TestVeriteruns the test suite for the Verite graphics card

VREGS

Registers common to all Verite-based boards

Summary
Constants
VERITE_MEMENDIANThis register controls the byteswapping performed when writing to the linear framebuffer.
VERITE_GPUCTLThis register controls the state of the RISC processor It holds several bitflags: 01h - reset chip 02h - hold risc 04h - single step 08h - divide by 2 disable 10h - VGA reset 20h - assert XReset output to ext devices
VERITE_MODEThis register allows one to select between CRTC modes.
VERITE_CRTCCTLCRTC Control register.
VERITE_CRTCHHorizontal timing register
VERITE_CRTCVVertical timing register
Functions
TestVeriteruns the test suite for the Verite graphics card

Constants

VERITE_MEMENDIAN

This register controls the byteswapping performed when writing to the linear framebuffer.

valid register values

0no byteswapping
132-bit byteswapping
216-bit byteswapping
3swap halfwords

VERITE_GPUCTL

This register controls the state of the RISC processor It holds several bitflags: 01h - reset chip 02h - hold risc 04h - single step 08h - divide by 2 disable 10h - VGA reset 20h - assert XReset output to ext devices

VERITE_MODE

This register allows one to select between CRTC modes.  One can choose between VGA, VESA and Native mode by encoding the proper bits

Bitflags

01hDecode 0xA0000.
02hOperate in VGA Mode.  This will enable A0000-BFFFF indepent of bit 1
04h32-bit VGA

VERITE_CRTCCTL

CRTC Control register.  32-bits in size, contains several flags and pixel formats

Bitflags

0000000Fcolor format
00000010CRTCCTL_VIDEOFIFOSIZE128
00000020CRTCCTL_ENABLEDDC
00000040CRTCCTL_DDCOUTPUT
00000080CRTCCTL_DDCDATA
00000100CRTCCTL_VSYNCHI
00000200CRTCCTL_HSYNCHI
00000400CRTCCTL_VSYNCENABLE
00000800CRTCCTL_HSYNCENABLE
00001000CRTCCTL_VIDEOENABLE
00002000CRTCCTL_STEREOSCOPIC
00004000CRTCCTL_FRAMEDISPLAYED
00008000CRTCCTL_FRAMEBUFFERBGR
00010000CRTCCTL_EVENFRAME
00020000CRTCCTL_LINEDOUBLE
00040000CRTCCTL_FRAMESWITCHED

Color formats

416 bpp (R5-G6-B5)
516 bpp (R4-G4-B4-X4)
1232 bpp (R8-G8-B8-X8)

VERITE_CRTCH

Horizontal timing register

VERITE_CRTCV

Vertical timing register

Functions

TestVerite

Sub TestVerite(board_model As Long,
board_version As Long,
lfb As Long,
portbase As Long)

runs the test suite for the Verite graphics card

Parameters

board_modelthe board type.  1 for a V1k, 2 for a V2k
board_versionthe board rating.  1 for a V2100, 2 for a V2200, 0 if unknown
lfbaddress of the framebuffer in memory
portbasethe base I/O port for the Verite registers
Sub TestVerite(board_model As Long,
board_version As Long,
lfb As Long,
portbase As Long)
runs the test suite for the Verite graphics card