ATI Graphics Card
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
ATI Graphics Card
Hi Community,
I found an old graphics card from ati. It is a ATI mach64 VT with the ati-264vt2 chip.
Now I wanted to play a little bit with it, may be develope a driver, but I found nothing about that chip. Are there some technical documents which explains the registers?
If not is there an other way to get informations about the registers?
Cheers Christian
I found an old graphics card from ati. It is a ATI mach64 VT with the ati-264vt2 chip.
Now I wanted to play a little bit with it, may be develope a driver, but I found nothing about that chip. Are there some technical documents which explains the registers?
If not is there an other way to get informations about the registers?
Cheers Christian
42
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: ATI Graphics Card
The mach64 chip is described in the VGADOC project. You can also check the X.org drivers. Much of the details are unfortunately hard to come by
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
Thanks for the link. But there are just two other questions:
Does Windows support VBE/AF Drivers?
So if I write a driver with this specification (VBE/AF), could it be used under windows?
Cheers Christian
*EDIT*
An additional question.
In this dead project http://www.talula.demon.co.uk/freebe/ the author mentioned "VBE/AF 2.0". I have searched for a while now, but I found nothing. The only specification I found was for VBE/AF 1.0! I took a look at the vbe header stored in vbeaf.h ans it is completely different to the specification from Vesa. So do you know something about a Version 2.0? Do you know where i can get a specification of this Version?
Does Windows support VBE/AF Drivers?
So if I write a driver with this specification (VBE/AF), could it be used under windows?
Cheers Christian
*EDIT*
An additional question.
In this dead project http://www.talula.demon.co.uk/freebe/ the author mentioned "VBE/AF 2.0". I have searched for a while now, but I found nothing. The only specification I found was for VBE/AF 1.0! I took a look at the vbe header stored in vbeaf.h ans it is completely different to the specification from Vesa. So do you know something about a Version 2.0? Do you know where i can get a specification of this Version?
42
-
- Member
- Posts: 134
- Joined: Thu Aug 18, 2005 11:00 pm
- Location: Sol. Earth. Europe. Romania. Bucuresti
- Contact:
Re: ATI Graphics Card
Short answer: No to all questions.
Long answer: VBE/AF is not supported so you are waisting your time with it... Besides the standard requires that you pay a relative big amount of money and there is NO leak on the internet because of strong NDA. Hence IF you use it then either you have an invoice or you are stealing it and this is very easy to prove .
You have to write your own drivers for each video card.
VESA is a temporary short cut that is relatively well supported today but it is not going to give you great performance since it is designed for old DOS games and for BIOS startup. Besides VESA might get removed in the future and some boards do not support version 2.0 (only 1.2 or a buggy semi 2.0 ).
Advice: Use VESA for a start and once you are advanced write your own video drivers.
Long answer: VBE/AF is not supported so you are waisting your time with it... Besides the standard requires that you pay a relative big amount of money and there is NO leak on the internet because of strong NDA. Hence IF you use it then either you have an invoice or you are stealing it and this is very easy to prove .
You have to write your own drivers for each video card.
VESA is a temporary short cut that is relatively well supported today but it is not going to give you great performance since it is designed for old DOS games and for BIOS startup. Besides VESA might get removed in the future and some boards do not support version 2.0 (only 1.2 or a buggy semi 2.0 ).
Advice: Use VESA for a start and once you are advanced write your own video drivers.
Ambition is a lame excuse for the ones not brave enough to be lazy; Solar_OS http://www.oby.ro/os/
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
Hello,
I know that I have to write a driver for each Graphics Card and I want to write a driver for the ATI Mach64 VT.
I am just looking for an Standard which I could use for this driver, because I want that this driver could be used by other Hobby Operating Systems too.
Thats all what I want.
Cheers Christian
I know that I have to write a driver for each Graphics Card and I want to write a driver for the ATI Mach64 VT.
I am just looking for an Standard which I could use for this driver, because I want that this driver could be used by other Hobby Operating Systems too.
Thats all what I want.
Cheers Christian
42
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
I will have a look on it.Stevo14 wrote:If your looking for a standard driver interface (between the driver and the OS), then how about EDI.
Are there any drivers using this Driver Interface?
42
Re: ATI Graphics Card
None that I know of right now. However, I get the feeling that there are several kernels (including mine) that plan on using it when they get around to supporting drivers.
~[Fluidium]~
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
Okay.
The EDI is just a little bit too complicated. Sure, I have written Programs in C++ but at the moment my knowledge of C++ isn't very good, because I am using C for a long time now.
I wrote a little graphics driver interface, which looks like this:
So in the driver there is an Function called "InitialiseGraphicsCard" it could be the function main too. This function calls the function in the pointer DP_InitialiseDriver to initialise the driver and sets up the handling for IPC Requests.
What do you think of this short structur? I wrote it down in 5 Minutes and it is only an idea.
Cheers Christian
The EDI is just a little bit too complicated. Sure, I have written Programs in C++ but at the moment my knowledge of C++ isn't very good, because I am using C for a long time now.
Is there no example implementation? I found only headers.Stevo14 wrote:None that I know of right now. However, I get the feeling that there are several kernels (including mine) that plan on using it when they get around to supporting drivers.
I wrote a little graphics driver interface, which looks like this:
Code: Select all
typedef struct
{
/**************************************************************************************************/
unsigned int current_scr_x; /* The currently used width. */
unsigned int current_scr_y; /* The currently used height. */
unsigned int current_bpp; /* The currently used bits per pixel */
/**************************************************************************************************/
// Function initialises the driver.
void (*DP_InitialiseDriver);
// I think the Names describe the pointer to the functions
void (*DP_SetResolution)(int width_x, int width_y, int bpp);
void (*DP_GetResolution);
void (*DP_DrawPixel)(int x, int y);
void (*DP_DrawLine)(int start_x, int start_y, int end_x, int end_y);
void (*DP_DrawSquare)(int x1, int y1, int x2, int y2);
void (*DP_DrawTriangle)(int x, int y, int z);
} DP_Interface;
/* A set of standard resolutions */
enum DP_Standard_Resolutions
{
RES_300x200,
RES_640x480,
RES_800x600,
RES_1024x768,
RES_1280x1024
};
What do you think of this short structur? I wrote it down in 5 Minutes and it is only an idea.
Cheers Christian
42
Re: ATI Graphics Card
Currently the drivers in our kernel use the kernel's native C++ functions, but I'm planning on implementing an EDI compatibility module - I'll start that when I'm not desperately breaking and rebuilding the kernel to add needed functionality! (Shared libraries)
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
Okay.
So I will wait and try to understand the code in the header-Files.
When I think I understood it, I will write a driver.
What I am going to do too is to create a simple Graphic Card Driver Interface, like the structure I have posted before. But for this I want to know your opinion what is needed in the interface?
I wrote down the following:
What do you think of that points in the list?
Cheers Christian
*EDIT*
The font will be stored in the driver.
So I will wait and try to understand the code in the header-Files.
When I think I understood it, I will write a driver.
What I am going to do too is to create a simple Graphic Card Driver Interface, like the structure I have posted before. But for this I want to know your opinion what is needed in the interface?
I wrote down the following:
- Set a Resoultion
- Get Current Resolution
- Draw a pixel
- Draw a line
- Draw a square
- Draw a triangle
- Draw a cyrcle ( for round Windows )
- set a font
- get the current font
- write some text with the current
What do you think of that points in the list?
Cheers Christian
*EDIT*
The font will be stored in the driver.
Last edited by ChristianF on Thu Oct 16, 2008 5:44 am, edited 1 time in total.
42
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: ATI Graphics Card
IMO:
#include "much/much/more.h"
#include "much/much/more.h"
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
Yes that is right. If I want to implement the Open Graphics Library I need a little bit more.Combuster wrote:IMO:
#include "much/much/more.h"
But all I want is to provide some simple 2D Graphic Card Drivers and not writing a 3D Driver for each possible card. The 2D driver could be used for the GUI or for games, because vesa VBE is a little bit slow.
*EDIT*
Okay I just thought a bit and come to this:
Code: Select all
/* The driver interface */
typedef struct
{
/**************************************************************************************************/
unsigned int current_scr_x; /* The currently used width. */
unsigned int current_scr_y; /* The currently used height. */
unsigned int current_bpp; /* The currently used bits per pixel */
/**************************************************************************************************/
/* The Video-RAM have to be mapped to the applications address space too. */
unsigned short *graphics_memory_pointer; /* Pointer to the start of the graphics address */
unsigned short *graphics_offset_pointer; /* Pointer Array to the offset(s) address(es) */
/**************************************************************************************************/
void (*DP_InitialiseDriver);
void (*DP_SetResolution)(unsigned int width_x, unsigned int width_y, unsigned int bpp);
void (*DP_GetResolution);
/* Pointer to a Function that draws a single pixel */
void (*DP_DrawPixel)(unsigned int x, unsigned int y);
/* Pointer to a Function that draws a simple line */
void (*DP_DrawLine)(unsigned int start_x, unsigned int start_y, unsigned int end_x, unsigned int end_y);
/* Pointer to a Function that draws a square */
void (*DP_DrawSquare)(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2);
/* Pointer to a Function that draws a Triangle */
void (*DP_DrawTriangle)(unsigned int x, unsigned int y, unsigned int z);
/* Pointer to a Function that draws a Circle */
void (*DP_DrawCircle)(unsigned int start_x, unsigned int start_y, unsigned int end_x, unsigned int end_y);
/* Pointer to a Function that flips the offset and the memory pointer */
void (*DP_FlipToOffset);
/* Pointer to a Function that refresh the screen */
void (*DP_RefreshScreen);
/* Pointer to a Function that adds n more Buffers to offset, so tripple Buffering could be used */
void (*DP_ExpandBuffer)(unsigned int n);
/* Pointer to a Function that changes the new font */
void (*DP_SetFont)(unsigned int font);
/* Pointer to a Function that returns the current font */
unsigned int (*DP_GetCurrentFont);
/* Pointer to a Function that writes some text at position xy */
void (*DP_WriteText)(unsigned int x, unsigned int y, const char *txt);
} DP_Interface;
42
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: ATI Graphics Card
Even for 2D I'd have at least some bitblit and floodfill functions
-
- Member
- Posts: 79
- Joined: Sun Jun 10, 2007 11:36 am
Re: ATI Graphics Card
Humm...
I have to read some books about 2D Game Programming, it is to long ago.
Then I will post again the new Interface.
But I have added to new pointers.
The Parameters for BitBlit will be added after reading a book about 2D Game Programming.
IIRC in "Black Art of 3D Game Programming" is something about 2D Game Programming too. Because of this book use DOS many functions have to be written there
Cheers Christian
*EDIT*
An additional question: Is it possible to save a font as a big array of hexadecimal values?
Then what do you think have to be in the Interface and isn't there right now?
I have to read some books about 2D Game Programming, it is to long ago.
Then I will post again the new Interface.
But I have added to new pointers.
Code: Select all
void (*DP_BitBlit);
void (*DP_FloodFill)(unsigned int start,unsigned int search_color,unsigned int fill_color);
IIRC in "Black Art of 3D Game Programming" is something about 2D Game Programming too. Because of this book use DOS many functions have to be written there
Cheers Christian
*EDIT*
An additional question: Is it possible to save a font as a big array of hexadecimal values?
Then what do you think have to be in the Interface and isn't there right now?
42