March 22, 2006

ATI driver update

I've just updated the binary version of my ATI driver. It draws all lines properly now (the clipping routine was broken) and does display all colors properly. You may download it from here.

Have fun.

March 21, 2006

Download ATI driver


After long and stressful fight with ATI driver and it's porely documented XFree86 sources, I have managed to make accelerated version of it. It supports accelerated line drawing, rectangles, filled rectangles and polygons. Additionally, it uses accelerated blitting between all bitmaps which reside in Video memory of Radeon card, if only they are in the same resolution (dunno, whether accelerated blitting mixed with color-depth scaling is feasible on Radeons, it was on NVIDIA though).

Comparing to the NVIDIA hidd, the only unaccelerated method is monochrome text drawing. It will be implemented soon. Later, I will finally implement routines for monitor detecting. Like in case of I2C bus, it might happen that the DDC2 will be implemented as a separate class.

If you want to give my driver a try, get it from here, and save it into SYS:Devs/Drivers directory of your native AROS. Additionally, you need the I2C classes in the same directory. You may get binary of I2C from here.

In order to make the driver work, you have to pass the following options to the kernel (from GRUB loader):

lib=DRIVERS:i2c.hidd lib=DRIVERS:radeon.hidd gfx=RadeonDriver

Have fun :)

March 11, 2006

I2C bus

I like software developing! Few days ago I have found out, that my ATI driver may works incorrectly with TFT monitors. Due to lack of I2C bus the driver was unable to fetch the DDC2 data from monitor, and therefore could not even guess the type of device connected to the ATI card. I had two options - to implement I2C bus in ATI driver itself, or to provide a general solution. The former would be easier, the later would bie nicer.

The new directory: arch/common/hidd.i2c showed up in AROS source tree. It is a general implementation of the I2C bus for AROS. It will be definitely used in the ATI driver, but it is not the only purpouse of it. The hidd consists of two OOP classes:

1. The I2C bus class which is used by devices and abstracts every hardware bus into well known API. Using it as a superclass and overloading only two of its methods, one creates hardware specific bus driver.

2. The I2C device class which is used by software to communicate with devices over the bus. Using it as a superclass let's one to define new types of protocols, like SMBus for example, which use the I2C as a transport medium.

The specific driver class which uses the genmodule app from Staf Verhaegen (our talented AROS developer) may be as small as few hundred bytes in source, and less than two kilobytes in binary.

The ATI driver is one example of potential use. The I2C bus might be used aswell to communicate with hardware sensors, with TV cards (access the tuner through I2C bus) or even through parallel port (see this link for more details:
to talk with thousands of different IC's which provide the I2C interface.

Have fun with it. I will :-)

March 7, 2006

News on ATI driver

Hello. Finally I do have some good news for all of you who are interested in using their ATI cards with AROS. The ATI driver works properly now, however it is still unaccelerated. That means, that at this time it is even slower than the legacy Vesa driver. But finally it works.

The code looks pretty ugly now - it is a mixture of AROS typical code and the XFree86 code (modified BSD licence). Since there are many workarounds needed and the chip initialisation is not trivial, I have just reused the XFree86 code here. Since there are some differences between AROS and XFree86 (in AROS, all bitmaps are stored in VRAM if available, and blits between them are done by 2D accel engine of the card), the rest of the code will be much more cleaner and logical. The driver cannot detect type of connected monitors at the moment and it assumes that they all are CRT's. It does work with my TFT connected through analog DB15. In order to change that, we need i2c bus implementation and support for ddc/ddc2.

I will commit the source into AROS as soon as I clean the code up (it's matter of two days in the worst case) and binary driver will show up somewhere here, including instructions how to use it with already installed AROS.

Stay tuned :-)