1/* 2 Haiku S3 Trio64 driver adapted from the X.org S3 driver. 3 4 Copyright 2001 Ani Joshi <ajoshi@unixbox.com> 5 6 Copyright 2008 Haiku, Inc. All rights reserved. 7 Distributed under the terms of the MIT license. 8 9 Authors: 10 Gerald Zajac 2008 11*/ 12 13 14#ifndef __TRIO64_H__ 15#define __TRIO64_H__ 16 17 18// Note that the cursor normally needs only 1024 bytes; however, if 1024 bytes 19// are used, some of the Trio64 chips draw a short white horizontal line below 20// and to the right of the cursor. Setting the number of bytes to 2048 solves 21// the problem. 22 23#define CURSOR_BYTES 2048 // see comment above 24 25 26// Command Registers. 27#define ADVFUNC_CNTL 0x4ae8 28#define SUBSYS_STAT 0x42e8 29#define SUBSYS_CNTL 0x42e8 30#define CUR_Y 0x82e8 31#define CUR_X 0x86e8 32#define DESTY_AXSTP 0x8ae8 33#define DESTX_DIASTP 0x8ee8 34#define CUR_WIDTH 0x96e8 35#define CMD 0x9ae8 36#define GP_STAT 0x9ae8 37#define FRGD_COLOR 0xa6e8 38#define WRT_MASK 0xaae8 39#define FRGD_MIX 0xbae8 40#define MULTIFUNC_CNTL 0xbee8 41 42// Command register bits. 43#define CMD_RECT 0x4000 44#define CMD_BITBLT 0xc000 45#define INC_Y 0x0080 46#define INC_X 0x0020 47#define DRAW 0x0010 48#define WRTDATA 0x0001 49 50// Foreground mix register. 51#define FSS_FRGDCOL 0x0020 52#define FSS_BITBLT 0x0060 53 54#define GP_BUSY 0x0200 55 56#define SCISSORS_T 0x1000 57#define SCISSORS_L 0x2000 58#define SCISSORS_B 0x3000 59#define SCISSORS_R 0x4000 60 61 62#endif // __TRIO64_H__ 63