Moved the vesa.h and vga.h headers to the private vesa driver header directory

for future use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12274 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-04-08 15:14:32 +00:00
parent 93ee21046d
commit a5ff23c727
3 changed files with 1 additions and 0 deletions
+142
View File
@@ -0,0 +1,142 @@
/*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#ifndef VESA_H
#define VESA_H
#include <SupportDefs.h>
/* VBE info block structure */
#define VESA_SIGNATURE 'ASEV'
#define VBE2_SIGNATURE '2EBV'
struct vbe_info_block {
// VBE 1.x fields
uint32 signature;
struct {
uint8 minor;
uint8 major;
} version;
uint32 oem_string;
uint32 capabilities;
uint32 mode_list;
uint16 total_memory; // in 64k blocks
// VBE 2.0+ fields only
// Note, the block is 256 bytes in size for VBE 1.x as well,
// but doesn't define these fields. VBE 3 doesn't define
// any additional fields.
uint16 oem_software_revision;
uint32 oem_vendor_name_string;
uint32 oem_product_name_string;
uint32 oem_product_revision_string;
uint8 reserved[222];
uint8 oem_data[256];
} _PACKED;
/* VBE mode info structure */
struct vbe_mode_info {
uint16 attributes;
uint8 window_a_attributes;
uint8 window_b_attributes;
uint16 window_granulatiry;
uint16 window_size;
uint16 window_a_segment;
uint16 window_b_segment;
uint32 window_function; // real mode pointer
uint16 bytes_per_row;
// VBE 1.2 and above
uint16 width;
uint16 height;
uint8 char_width;
uint8 char_height;
uint8 num_planes;
uint8 bits_per_pixel;
uint8 num_banks;
uint8 memory_model;
uint8 bank_size;
uint8 num_image_pages;
uint8 _reserved0;
// direct color fields
uint8 red_mask_size;
uint8 red_field_position;
uint8 green_mask_size;
uint8 green_field_position;
uint8 blue_mask_size;
uint8 blue_field_position;
uint8 reserved_mask_size;
uint8 reserved_field_position;
uint8 direct_color_mode_info;
// VBE 2.0 and above
uint32 physical_base;
uint32 _reserved1;
uint16 _reserved2;
// VBE 3.0 and above
uint16 linear_bytes_per_row;
uint8 banked_num_image_pages;
uint8 linear_num_image_pages;
uint8 linear_red_mask_size;
uint8 linear_red_field_position;
uint8 linear_green_mask_size;
uint8 linear_green_field_position;
uint8 linear_blue_mask_size;
uint8 linear_blue_field_position;
uint8 linear_reserved_mask_size;
uint8 linear_reserved_field_position;
uint32 max_pixel_clock; // in Hz
uint8 _reserved[189];
} _PACKED;
// definitions of mode info attributes
#define MODE_ATTR_AVAILABLE 1
#define MODE_ATTR_COLOR_MODE 8
#define MODE_ATTR_GRAPHICS_MODE 16
#define MODE_ATTR_LINEAR_BUFFER 128
// memory models
#define MODE_MEMORY_TEXT 0
#define MODE_MEMORY_PLANAR 3
#define MODE_MEMORY_PACKED_PIXEL 4
#define MODE_MEMORY_DIRECT_COLOR 6
#define MODE_MEMORY_YUV 7
// set mode flags
#define SET_MODE_MASK 0x01ff
#define SET_MODE_SPECIFY_CRTC (1 << 11)
#define SET_MODE_LINEAR_BUFFER (1 << 14)
#define SET_MODE_DONT_CLEAR_MEMORY (1 << 15)
/* VBE 3.0 protected mode interface
* The BIOS area can be scanned for the protected mode
* signature that identifies the structure below.
*/
#define VBE_PM_SIGNATURE 'DIMP'
struct vbe_protected_mode_info {
uint32 signature;
int16 entry_offset;
int16 init_offset;
uint16 data_selector;
uint16 a000_selector;
uint16 b000_selector;
uint16 b800_selector;
uint16 c000_selector;
uint8 in_protected_mode;
uint8 checksum;
} _PACKED;
#endif /* VESA_H */
+38
View File
@@ -0,0 +1,38 @@
/*
* Copyright 2005, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef VGA_H
#define VGA_H
/* VGA ports */
// misc stuff
#define VGA_INPUT_STATUS_0 0x3c2
#define VGA_INPUT_STATUS_1 0x3da
// sequencer registers
#define VGA_SEQUENCER_INDEX 0x3c4
#define VGA_SEQUENCER_DATA 0x3c5
// graphics registers
#define VGA_GRAPHICS_INDEX 0x3ce
#define VGA_GRAPHICS_DATA 0x3cf
// CRTC registers
#define VGA_CRTC_INDEX 0x3d4
#define VGA_CRTC_DATA 0x3d5
// attribute registers
#define VGA_ATTRIBUTE_READ 0x3c1
#define VGA_ATTRIBUTE_WRITE 0x3c0
// color registers
#define VGA_COLOR_STATE 0x3c7
#define VGA_COLOR_READ_MODE 0x3c7
#define VGA_COLOR_WRITE_MODE 0x3c8
#define VGA_COLOR_DATA 0x3c9
#define VGA_COLOR_MASK 0x3c6
#endif /* VGA_H */