clang-format
This commit is contained in:
parent
5d73ccc77a
commit
047fe62905
|
@ -0,0 +1,30 @@
|
|||
ColumnLimit: 80
|
||||
IndentWidth: 4
|
||||
UseTab: ForIndentation
|
||||
TabWidth: 4
|
||||
SpacesBeforeTrailingComments: 1
|
||||
NamespaceIndentation: None
|
||||
AlignConsecutiveAssignments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
DerivePointerAlignment: true
|
||||
IndentCaseLabels: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
PointerAlignment: Right
|
||||
ContinuationIndentWidth: 4
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
SpacesInAngles: false
|
||||
SpaceInEmptyParentheses: true
|
||||
IndentPPDirectives: None
|
||||
IncludeBlocks: Preserve
|
||||
Cpp11BracedListStyle: false
|
||||
Standard: Cpp11
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"vbeaf.h": "c"
|
||||
}
|
||||
}
|
286
ati/driver.c
286
ati/driver.c
|
@ -14,16 +14,12 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
// #define NO_HWPTR
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* chipset information */
|
||||
#define ATI_18800 1
|
||||
#define ATI_18800_1 2
|
||||
|
@ -35,14 +31,13 @@ int ati_type;
|
|||
|
||||
int ati_port = 0x1CE;
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void SetBank32();
|
||||
void SetBank32End();
|
||||
int ExtStub();
|
||||
void SetBank32( );
|
||||
void SetBank32End( );
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -50,16 +45,13 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
void SetBank(AF_DRIVER *af, long bank);
|
||||
|
||||
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -70,51 +62,35 @@ int af_scroll_x;
|
|||
int af_scroll_y;
|
||||
int af_bank;
|
||||
|
||||
|
||||
|
||||
/* FreeBE/AF extension allowing farptr access to video memory */
|
||||
FAF_HWPTR_DATA hwptr;
|
||||
|
||||
|
||||
|
||||
/* list of available video modes */
|
||||
typedef struct VIDEO_MODE
|
||||
{
|
||||
typedef struct VIDEO_MODE {
|
||||
int w, h;
|
||||
int bpp;
|
||||
int num;
|
||||
} VIDEO_MODE;
|
||||
|
||||
VIDEO_MODE mode_list[] = { { 640, 400, 8, 0x61 }, { 640, 480, 8, 0x62 } };
|
||||
|
||||
VIDEO_MODE mode_list[] =
|
||||
{
|
||||
{ 640, 400, 8, 0x61 },
|
||||
{ 640, 480, 8, 0x62 }
|
||||
};
|
||||
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list)/sizeof(VIDEO_MODE))
|
||||
|
||||
|
||||
short available_modes[NUM_MODES+1] = { 1, 2, -1 };
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list) / sizeof(VIDEO_MODE))
|
||||
|
||||
short available_modes[NUM_MODES + 1] = { 1, 2, -1 };
|
||||
|
||||
/* detect:
|
||||
* Detects the presence of an ATI card.
|
||||
*/
|
||||
char *detect()
|
||||
{
|
||||
char *detect( ) {
|
||||
char *name = NULL;
|
||||
char buf[16];
|
||||
int sel, i;
|
||||
|
||||
sel = allocate_selector(0, 1024*1024);
|
||||
if (sel < 0)
|
||||
return NULL;
|
||||
sel = allocate_selector(0, 1024 * 1024);
|
||||
if (sel < 0) return NULL;
|
||||
|
||||
for (i=0; i<9; i++) /* check ID string */
|
||||
buf[i] = _farpeekb(sel, 0xC0031+i);
|
||||
for (i = 0; i < 9; i++) /* check ID string */
|
||||
buf[i] = _farpeekb(sel, 0xC0031 + i);
|
||||
|
||||
if (memcmp(buf, "761295520", 9) != 0) {
|
||||
free_selector(sel);
|
||||
|
@ -122,8 +98,7 @@ char *detect()
|
|||
}
|
||||
|
||||
ati_port = _farpeekw(sel, 0xC0010); /* read port address */
|
||||
if (!ati_port)
|
||||
ati_port = 0x1CE;
|
||||
if (!ati_port) ati_port = 0x1CE;
|
||||
|
||||
switch (_farpeekb(sel, 0xC0043)) { /* check ATI type */
|
||||
|
||||
|
@ -163,44 +138,37 @@ char *detect()
|
|||
return name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* Fills in our driver header block.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
char *name;
|
||||
int vram_size;
|
||||
int i;
|
||||
|
||||
name = detect();
|
||||
name = detect( );
|
||||
|
||||
if (!name)
|
||||
return 1;
|
||||
if (!name) return 1;
|
||||
|
||||
i = 0;
|
||||
while (af->OemVendorName[i])
|
||||
i++;
|
||||
while (af->OemVendorName[i]) i++;
|
||||
|
||||
af->OemVendorName[i++] = ',';
|
||||
af->OemVendorName[i++] = ' ';
|
||||
|
||||
while (*name)
|
||||
af->OemVendorName[i++] = *(name++);
|
||||
while (*name) af->OemVendorName[i++] = *(name++);
|
||||
|
||||
af->OemVendorName[i] = 0;
|
||||
|
||||
if (get_vesa_info(&vram_size, NULL, NULL) != 0)
|
||||
af->TotalMemory = 512;
|
||||
else
|
||||
af->TotalMemory = MIN(vram_size/1024, 512);
|
||||
af->TotalMemory = MIN(vram_size / 1024, 512);
|
||||
|
||||
af->AvailableModes = available_modes;
|
||||
|
||||
af->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
af->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
af->BankSize = 64;
|
||||
af->BankedBasePtr = 0xA0000;
|
||||
|
@ -225,14 +193,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
hwptr_init(hwptr.IOMemMaps[0], af->IOMemMaps[0]);
|
||||
hwptr_init(hwptr.IOMemMaps[1], af->IOMemMaps[1]);
|
||||
hwptr_init(hwptr.IOMemMaps[2], af->IOMemMaps[2]);
|
||||
|
@ -243,78 +208,63 @@ int InitDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
#ifndef NO_HWPTR
|
||||
#ifndef NO_HWPTR
|
||||
|
||||
case FAFEXT_HWPTR:
|
||||
/* allow farptr access to video memory */
|
||||
return &hwptr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
VIDEO_MODE *info;
|
||||
int i;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
for (i=0; i<(int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
modeInfo->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
modeInfo->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
modeInfo->XResolution = info->w;
|
||||
modeInfo->YResolution = info->h;
|
||||
modeInfo->BitsPerPixel = info->bpp;
|
||||
|
||||
modeInfo->MaxBuffers = (af->TotalMemory*1024) /
|
||||
(info->w*info->h*BYTES_PER_PIXEL(info->bpp));
|
||||
modeInfo->MaxBuffers = (af->TotalMemory * 1024) /
|
||||
(info->w * info->h * BYTES_PER_PIXEL(info->bpp));
|
||||
|
||||
if (info->w > 1024) {
|
||||
modeInfo->MaxBytesPerScanLine = 2048*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine = 2048 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 2048;
|
||||
}
|
||||
else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024*BYTES_PER_PIXEL(info->bpp);
|
||||
} else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
}
|
||||
|
||||
modeInfo->BytesPerScanLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BytesPerScanLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
modeInfo->MaxPixelClock = 135000000;
|
||||
|
@ -322,13 +272,11 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
int width;
|
||||
|
@ -336,15 +284,13 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
RM_REGS r;
|
||||
|
||||
/* reject anything with hardware stereo, linear framebuffer, or noclear */
|
||||
if (mode & 0xC400)
|
||||
return -1;
|
||||
if (mode & 0xC400) return -1;
|
||||
|
||||
mode &= 0x3FF;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
/* call BIOS to set the mode */
|
||||
r.x.ax = info->num;
|
||||
|
@ -352,16 +298,16 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
/* adjust the virtual width for widescreen modes */
|
||||
if (virtualX > info->w) {
|
||||
if (virtualX > 1024)
|
||||
return -1;
|
||||
if (virtualX > 1024) return -1;
|
||||
|
||||
*bytesPerLine = ((virtualX*BYTES_PER_PIXEL(info->bpp))+15)&0xFFF0;
|
||||
*bytesPerLine = ((virtualX * BYTES_PER_PIXEL(info->bpp)) + 15) & 0xFFF0;
|
||||
|
||||
width = read_vga_register(0x3D4, 0x13);
|
||||
write_vga_register(0x3D4, 0x13, (width * (*bytesPerLine)) / (info->w*BYTES_PER_PIXEL(info->bpp)));
|
||||
}
|
||||
else
|
||||
*bytesPerLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
write_vga_register(0x3D4, 0x13,
|
||||
(width * (*bytesPerLine)) /
|
||||
(info->w * BYTES_PER_PIXEL(info->bpp)));
|
||||
} else
|
||||
*bytesPerLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* set up some hardware registers */
|
||||
if (ati_type >= ATI_28800_4) /* allow display past 512k */
|
||||
|
@ -380,22 +326,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
af_scroll_y = 0;
|
||||
af_bank = -1;
|
||||
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
available_vram = af->TotalMemory*1024 ;
|
||||
available_vram = af->TotalMemory * 1024;
|
||||
|
||||
if (used_vram > available_vram)
|
||||
return -1;
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
}
|
||||
else {
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
af->OffscreenEndY = 0;
|
||||
|
@ -404,43 +348,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -448,117 +381,97 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
if (waitVRT >= 0) {
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) + ((y + af_visible_page*af_height) * af_width);
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) +
|
||||
((y + af_visible_page * af_height) * af_width);
|
||||
|
||||
asm volatile ("cli");
|
||||
asm volatile("cli");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* write high bits to ATI-specific registers */
|
||||
if (ati_type < ATI_28800_2) {
|
||||
alter_vga_register(ati_port, 0xB0, 0xC0, a>>12);
|
||||
}
|
||||
else {
|
||||
alter_vga_register(ati_port, 0xB0, 0x40, a>>12);
|
||||
alter_vga_register(ati_port, 0xA3, 0x10, a>>15);
|
||||
alter_vga_register(ati_port, 0xB0, 0xC0, a >> 12);
|
||||
} else {
|
||||
alter_vga_register(ati_port, 0xB0, 0x40, a >> 12);
|
||||
alter_vga_register(ati_port, 0xA3, 0x10, a >> 15);
|
||||
}
|
||||
|
||||
/* write to normal VGA address registers */
|
||||
write_vga_register(0x3D4, 0x0D, (a>>2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a>>10) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0D, (a >> 2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a >> 10) & 0xFF);
|
||||
|
||||
asm volatile ("sti");
|
||||
asm volatile("sti");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
}
|
||||
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetBank32:
|
||||
* Relocatable bank switch function, called with a bank number in %edx.
|
||||
*/
|
||||
|
@ -607,14 +520,7 @@ asm ("
|
|||
*/
|
||||
void SetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _SetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _SetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
391
avance/driver.c
391
avance/driver.c
|
@ -12,19 +12,17 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void SetBank32();
|
||||
void SetBank32End();
|
||||
int ExtStub();
|
||||
void SetBank32( );
|
||||
void SetBank32End( );
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -32,12 +30,12 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
void SetBank(AF_DRIVER *af, long bank);
|
||||
void WaitTillIdle(AF_DRIVER *af);
|
||||
void SetMix(AF_DRIVER *af, long foreMix, long backMix);
|
||||
|
||||
|
||||
/* if you need some video memory for internal use by the accelerator
|
||||
* code (for example storing pattern data), you can define this value to
|
||||
* reserve room for yourself at the very end of the memory space, that
|
||||
|
@ -45,12 +43,9 @@ void SetMix(AF_DRIVER *af, long foreMix, long backMix);
|
|||
*/
|
||||
#define RESERVED_VRAM 0
|
||||
|
||||
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -65,7 +60,6 @@ int af_fore_mix;
|
|||
int af_back_mix;
|
||||
int af_lines_per_bank;
|
||||
|
||||
|
||||
/* note about VBE/AF multiple page modes: the API supports any number of
|
||||
* video memory pages, one of which is "active" (being drawn onto), while
|
||||
* the other is visible on your monitor. Allegro doesn't actually use
|
||||
|
@ -84,8 +78,6 @@ int af_lines_per_bank;
|
|||
* drawing funcs, and multiple page modes should work correctly.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#define ALG_NONE 0
|
||||
#define ALG_2101 1
|
||||
#define ALG_2201 2
|
||||
|
@ -100,22 +92,23 @@ int port_grc = 0x3ce;
|
|||
|
||||
int alg_version = ALG_NONE, alg_vidmem = 0;
|
||||
|
||||
char *alg_name[6] = {
|
||||
"none", "ALG-2101", "ALG-2201", "ALG-2228", "ALG-2301", "unknown"
|
||||
};
|
||||
char *alg_name[6] = { "none", "ALG-2101", "ALG-2201",
|
||||
"ALG-2228", "ALG-2301", "unknown" };
|
||||
|
||||
int alg_caps[6] = {
|
||||
0,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer | afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer | afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer | afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer | afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
0
|
||||
};
|
||||
int alg_caps[6] = { 0,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer |
|
||||
afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer |
|
||||
afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer |
|
||||
afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
afHaveMultiBuffer | afHaveBankedBuffer |
|
||||
afHaveVirtualScroll /*| afHaveDualBuffers */,
|
||||
0 };
|
||||
|
||||
struct mode_t {
|
||||
int mode;
|
||||
int w,h;
|
||||
int w, h;
|
||||
int bpp;
|
||||
};
|
||||
|
||||
|
@ -123,117 +116,95 @@ struct mode_t {
|
|||
|
||||
struct mode_t mode_list[] = {
|
||||
/* mode width height bpp */
|
||||
{ 0x28, 512, 512, 8 },
|
||||
{ 0x29, 640, 400, 8 },
|
||||
{ 0x2a, 640, 480, 8 },
|
||||
{ 0x2c, 800, 600, 8 },
|
||||
{ 0x2e, 768, 1024, 8 },
|
||||
{ 0x31, 1024, 768, 8 },
|
||||
{ 0x33, 1024, 1024, 8 },
|
||||
{ 0x37, 1280, 1024, 8 },
|
||||
{ 0x28, 512, 512, 8 }, { 0x29, 640, 400, 8 }, { 0x2a, 640, 480, 8 },
|
||||
{ 0x2c, 800, 600, 8 }, { 0x2e, 768, 1024, 8 }, { 0x31, 1024, 768, 8 },
|
||||
{ 0x33, 1024, 1024, 8 }, { 0x37, 1280, 1024, 8 },
|
||||
|
||||
{ 0x40, 320, 200, 16 },
|
||||
{ 0x41, 512, 512, 16 },
|
||||
{ 0x42, 640, 400, 16 },
|
||||
{ 0x43, 640, 480, 16 },
|
||||
{ 0x44, 800, 600, 16 },
|
||||
{ 0x45, 1024, 768, 16 },
|
||||
{ 0x40, 320, 200, 16 }, { 0x41, 512, 512, 16 }, { 0x42, 640, 400, 16 },
|
||||
{ 0x43, 640, 480, 16 }, { 0x44, 800, 600, 16 }, { 0x45, 1024, 768, 16 },
|
||||
|
||||
{ 0x48, 640, 480, 24 },
|
||||
{ 0x49, 800, 600, 24 },
|
||||
{ 0x48, 640, 480, 24 }, { 0x49, 800, 600, 24 },
|
||||
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
short available_modes[MAX_MODES] = { -1 };
|
||||
|
||||
|
||||
static inline void clrinx (int pt, int inx, int val)
|
||||
{
|
||||
write_vga_register (pt, inx, read_vga_register (pt, inx) & ~val);
|
||||
static inline void clrinx(int pt, int inx, int val) {
|
||||
write_vga_register(pt, inx, read_vga_register(pt, inx) & ~val);
|
||||
}
|
||||
|
||||
static inline void setinx (int pt, int inx, int val)
|
||||
{
|
||||
write_vga_register (pt, inx, read_vga_register (pt, inx) | val);
|
||||
static inline void setinx(int pt, int inx, int val) {
|
||||
write_vga_register(pt, inx, read_vga_register(pt, inx) | val);
|
||||
}
|
||||
|
||||
static inline void modinx (int pt, int inx, int mask, int nwv)
|
||||
{
|
||||
write_vga_register (pt, inx, (read_vga_register (pt, inx) & ~mask) | (nwv & mask));
|
||||
static inline void modinx(int pt, int inx, int mask, int nwv) {
|
||||
write_vga_register(pt, inx,
|
||||
(read_vga_register(pt, inx) & ~mask) | (nwv & mask));
|
||||
}
|
||||
|
||||
|
||||
/* detect_alg:
|
||||
* Sees whether or not an Avance Logic graphics card is present,
|
||||
* and if one is it attempts to identify it.
|
||||
*/
|
||||
int detect_alg()
|
||||
{
|
||||
int detect_alg( ) {
|
||||
int old;
|
||||
|
||||
alg_version = ALG_NONE;
|
||||
alg_vidmem = 0;
|
||||
|
||||
old = read_vga_register (port_crtc, 0x1a);
|
||||
clrinx (port_crtc, 0x1a, 0x10);
|
||||
if (!test_vga_register (port_crtc, 0x19, 0xcf)) {
|
||||
setinx (port_crtc, 0x1a, 0x10);
|
||||
if (test_vga_register (port_crtc, 0x19, 0xcf) && test_vga_register (port_crtc, 0x1a, 0x3f)) {
|
||||
int tmp = read_vga_register (port_crtc, 0x1a) >> 6;
|
||||
old = read_vga_register(port_crtc, 0x1a);
|
||||
clrinx(port_crtc, 0x1a, 0x10);
|
||||
if (!test_vga_register(port_crtc, 0x19, 0xcf)) {
|
||||
setinx(port_crtc, 0x1a, 0x10);
|
||||
if (test_vga_register(port_crtc, 0x19, 0xcf) &&
|
||||
test_vga_register(port_crtc, 0x1a, 0x3f)) {
|
||||
int tmp = read_vga_register(port_crtc, 0x1a) >> 6;
|
||||
switch (tmp) {
|
||||
case 3:
|
||||
alg_version = ALG_2101;
|
||||
break;
|
||||
case 3: alg_version = ALG_2101; break;
|
||||
case 2:
|
||||
if (read_vga_register (port_crtc, 0x1b) & 4)
|
||||
if (read_vga_register(port_crtc, 0x1b) & 4)
|
||||
alg_version = ALG_2228;
|
||||
else
|
||||
alg_version = ALG_2301;
|
||||
break;
|
||||
case 1:
|
||||
alg_version = ALG_2201;
|
||||
default:
|
||||
alg_version = ALG_UNKNOWN;
|
||||
case 1: alg_version = ALG_2201;
|
||||
default: alg_version = ALG_UNKNOWN;
|
||||
}
|
||||
alg_vidmem = 256 << (read_vga_register (port_crtc, 0x1e) & 3);
|
||||
alg_vidmem = 256 << (read_vga_register(port_crtc, 0x1e) & 3);
|
||||
}
|
||||
}
|
||||
write_vga_register (port_crtc, 0x1a, old);
|
||||
write_vga_register(port_crtc, 0x1a, old);
|
||||
return alg_version;
|
||||
}
|
||||
|
||||
|
||||
/* create_available_mode_list:
|
||||
* Scans the mode list checking memory requirements. Modes
|
||||
* which pass the test go into the available_modes list.
|
||||
*/
|
||||
void create_available_mode_list()
|
||||
{
|
||||
void create_available_mode_list( ) {
|
||||
struct mode_t *mode;
|
||||
short *current_mode_in_list = available_modes;
|
||||
|
||||
for (mode = mode_list; mode->mode; mode++)
|
||||
if (mode->w * mode->h * BYTES_PER_PIXEL (mode->bpp) < alg_vidmem * 1024)
|
||||
if (mode->w * mode->h * BYTES_PER_PIXEL(mode->bpp) < alg_vidmem * 1024)
|
||||
*current_mode_in_list++ = mode->mode;
|
||||
|
||||
*current_mode_in_list = -1;
|
||||
}
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* The first thing ever to be called after our code has been relocated.
|
||||
* This is in charge of filling in the driver header with all the required
|
||||
* information and function pointers. We do not yet have access to the
|
||||
* video memory, so we can't talk directly to the card.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
int i;
|
||||
|
||||
if (!detect_alg()) return -1;
|
||||
if (!detect_alg( )) return -1;
|
||||
|
||||
create_available_mode_list();
|
||||
create_available_mode_list( );
|
||||
|
||||
/* pointer to a list of the available mode numbers, ended by -1 */
|
||||
af->AvailableModes = available_modes;
|
||||
|
@ -244,10 +215,10 @@ int SetupDriver(AF_DRIVER *af)
|
|||
/* driver attributes (see definitions in vbeaf.h) */
|
||||
af->Attributes = alg_caps[alg_version];
|
||||
|
||||
#if 0
|
||||
#if 0
|
||||
if (linear_addr)
|
||||
af->Attributes |= afHaveLinearBuffer;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* banked memory size and location: zero if not supported */
|
||||
af->BankSize = 64;
|
||||
|
@ -261,7 +232,7 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->IOPortsTable = ports_table;
|
||||
|
||||
/* list physical memory regions that we need to access (zero for none) */
|
||||
for (i=0; i<4; i++) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
af->IOMemoryBase[i] = 0;
|
||||
af->IOMemoryLen[i] = 0;
|
||||
}
|
||||
|
@ -410,117 +381,102 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
* This is in charge of finding the card, returning 0 on success or
|
||||
* -1 to abort.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* findmode:
|
||||
* Finds the given mode's entry in the mode list.
|
||||
*/
|
||||
struct mode_t *findmode (int mode)
|
||||
{
|
||||
struct mode_t *findmode(int mode) {
|
||||
struct mode_t *ret;
|
||||
for (ret = mode_list; ret->mode; ret++)
|
||||
if (ret->mode == mode) return ret;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* get_field_data:
|
||||
* Fills in the mask size and position of each part of a pixel
|
||||
* for the given colour depth.
|
||||
*/
|
||||
void get_field_data (int bpp, char *rm, char *rp, char *gm, char *gp, char *bm, char *bp, char *xm, char *xp)
|
||||
{
|
||||
void get_field_data(int bpp, char *rm, char *rp, char *gm, char *gp, char *bm,
|
||||
char *bp, char *xm, char *xp) {
|
||||
int pos = 0;
|
||||
|
||||
#define FIELD(xxx,size) *xxx##p = pos; pos += (*xxx##m = size)
|
||||
#define FIELD(xxx, size) \
|
||||
*xxx##p = pos; \
|
||||
pos += (*xxx##m = size)
|
||||
|
||||
switch (bpp) {
|
||||
case 15:
|
||||
FIELD (b, 5);
|
||||
FIELD (g, 5);
|
||||
FIELD (r, 5);
|
||||
FIELD (x, 1);
|
||||
FIELD(b, 5);
|
||||
FIELD(g, 5);
|
||||
FIELD(r, 5);
|
||||
FIELD(x, 1);
|
||||
break;
|
||||
case 16:
|
||||
FIELD (b, 5);
|
||||
FIELD (g, 6);
|
||||
FIELD (r, 5);
|
||||
FIELD (x, 0);
|
||||
FIELD(b, 5);
|
||||
FIELD(g, 6);
|
||||
FIELD(r, 5);
|
||||
FIELD(x, 0);
|
||||
break;
|
||||
case 24:
|
||||
FIELD (b, 8);
|
||||
FIELD (g, 8);
|
||||
FIELD (r, 8);
|
||||
FIELD (x, 0);
|
||||
FIELD(b, 8);
|
||||
FIELD(g, 8);
|
||||
FIELD(r, 8);
|
||||
FIELD(x, 0);
|
||||
break;
|
||||
case 32:
|
||||
FIELD (b, 8);
|
||||
FIELD (g, 8);
|
||||
FIELD (r, 8);
|
||||
FIELD (x, 8);
|
||||
FIELD(b, 8);
|
||||
FIELD(g, 8);
|
||||
FIELD(r, 8);
|
||||
FIELD(x, 8);
|
||||
break;
|
||||
default:
|
||||
FIELD (b, 0);
|
||||
FIELD (g, 0);
|
||||
FIELD (r, 0);
|
||||
FIELD (x, 0);
|
||||
FIELD(b, 0);
|
||||
FIELD(g, 0);
|
||||
FIELD(r, 0);
|
||||
FIELD(x, 0);
|
||||
}
|
||||
|
||||
#undef FIELD
|
||||
#undef FIELD
|
||||
}
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
int i;
|
||||
int bytes_per_scanline;
|
||||
struct mode_t *info = findmode (mode);
|
||||
struct mode_t *info = findmode(mode);
|
||||
|
||||
if (!info) return -1;
|
||||
|
||||
/* clear the structure to zero */
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
/* copy data across from our stored list of mode attributes */
|
||||
modeInfo->Attributes = alg_caps[alg_version];
|
||||
|
@ -532,8 +488,8 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
bytes_per_scanline = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* available pages of video memory */
|
||||
modeInfo->MaxBuffers = (alg_vidmem * 1024 - RESERVED_VRAM) /
|
||||
(bytes_per_scanline * info->h);
|
||||
modeInfo->MaxBuffers =
|
||||
(alg_vidmem * 1024 - RESERVED_VRAM) / (bytes_per_scanline * info->h);
|
||||
|
||||
/* maximum virtual scanline length in both bytes and pixels. How wide
|
||||
* this can go will very much depend on the card: 1024 is pretty safe
|
||||
|
@ -541,19 +497,18 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
* is capable of them.
|
||||
*/
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
modeInfo->MaxBytesPerScanLine = modeInfo->MaxScanLineWidth*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine =
|
||||
modeInfo->MaxScanLineWidth * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* for banked video modes, fill in these variables: */
|
||||
modeInfo->BytesPerScanLine = bytes_per_scanline;
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
get_field_data (
|
||||
info->bpp,
|
||||
&modeInfo->RedMaskSize, &modeInfo->RedFieldPosition,
|
||||
&modeInfo->GreenMaskSize, &modeInfo->GreenFieldPosition,
|
||||
&modeInfo->BlueMaskSize, &modeInfo->BlueFieldPosition,
|
||||
&modeInfo->RsvdMaskSize, &modeInfo->RsvdFieldPosition
|
||||
);
|
||||
get_field_data(info->bpp, &modeInfo->RedMaskSize,
|
||||
&modeInfo->RedFieldPosition, &modeInfo->GreenMaskSize,
|
||||
&modeInfo->GreenFieldPosition, &modeInfo->BlueMaskSize,
|
||||
&modeInfo->BlueFieldPosition, &modeInfo->RsvdMaskSize,
|
||||
&modeInfo->RsvdFieldPosition);
|
||||
|
||||
/* for linear video modes, fill in these variables: */
|
||||
modeInfo->LinBytesPerScanLine = bytes_per_scanline;
|
||||
|
@ -578,16 +533,14 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* setvstart:
|
||||
* Sets the display start address.
|
||||
*/
|
||||
void setvstart (int x, int y)
|
||||
{
|
||||
int addr = af_width * y + x * BYTES_PER_PIXEL (af_bpp);
|
||||
void setvstart(int x, int y) {
|
||||
int addr = af_width * y + x * BYTES_PER_PIXEL(af_bpp);
|
||||
int display, pixels;
|
||||
|
||||
if (read_vga_register (port_grc, 0x0c) & 0x10) {
|
||||
if (read_vga_register(port_grc, 0x0c) & 0x10) {
|
||||
display = addr >> 3;
|
||||
pixels = addr & 7;
|
||||
} else {
|
||||
|
@ -595,12 +548,11 @@ void setvstart (int x, int y)
|
|||
pixels = addr & 3;
|
||||
}
|
||||
|
||||
write_vga_register (port_crtc, 0x20, (display >> 16) & 0x07);
|
||||
write_vga_register (port_crtc, 0x0c, (display >> 8) & 0xff);
|
||||
write_vga_register (port_crtc, 0x0d, display & 0xff);
|
||||
write_vga_register(port_crtc, 0x20, (display >> 16) & 0x07);
|
||||
write_vga_register(port_crtc, 0x0c, (display >> 8) & 0xff);
|
||||
write_vga_register(port_crtc, 0x0d, display & 0xff);
|
||||
}
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*
|
||||
|
@ -613,8 +565,8 @@ void setvstart (int x, int y)
|
|||
* 0x0800 = use refresh rate control
|
||||
* 0x0400 = use hardware stereo
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
int linear = ((mode & 0x4000) != 0);
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
|
@ -623,13 +575,12 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
int interlaced, word_mode, double_word_mode, _8maps, shift;
|
||||
|
||||
/* reject anything with hardware stereo */
|
||||
if (mode & 0x400)
|
||||
return -1;
|
||||
if (mode & 0x400) return -1;
|
||||
|
||||
/* mask off the other flag bits */
|
||||
mode &= 0x3FF;
|
||||
|
||||
info = findmode (mode);
|
||||
info = findmode(mode);
|
||||
if (!info) return -1;
|
||||
|
||||
/* reject the linear flag if the mode doesn't support it */
|
||||
|
@ -637,20 +588,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
/* set the mode */
|
||||
r.x.ax = info->mode;
|
||||
rm_int (0x10, &r);
|
||||
rm_int(0x10, &r);
|
||||
if (r.h.ah) return -1;
|
||||
|
||||
setinx (port_crtc, 0x1A, 0x10); /* enable extensions */
|
||||
setinx (port_crtc, 0x19, 0x02); /* enable >256k */
|
||||
setinx (port_grc, 0x0F, 0x04); /* enable separate R/W banks */
|
||||
setinx(port_crtc, 0x1A, 0x10); /* enable extensions */
|
||||
setinx(port_crtc, 0x19, 0x02); /* enable >256k */
|
||||
setinx(port_grc, 0x0F, 0x04); /* enable separate R/W banks */
|
||||
|
||||
af_bpp = info->bpp;
|
||||
|
||||
/* get some information about the mode */
|
||||
interlaced = read_vga_register (port_crtc, 0x19) & 1;
|
||||
double_word_mode = !!(read_vga_register (port_crtc, 0x14) & 0x40);
|
||||
word_mode = !(read_vga_register (port_crtc, 0x17) & 0x40);
|
||||
_8maps = !!(read_vga_register (0x3ce, 0x0c) & 0x10);
|
||||
interlaced = read_vga_register(port_crtc, 0x19) & 1;
|
||||
double_word_mode = !!(read_vga_register(port_crtc, 0x14) & 0x40);
|
||||
word_mode = !(read_vga_register(port_crtc, 0x17) & 0x40);
|
||||
_8maps = !!(read_vga_register(0x3ce, 0x0c) & 0x10);
|
||||
|
||||
/* calculate the shift factor for the scanline byte width */
|
||||
shift = 0;
|
||||
|
@ -664,7 +615,7 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
if (interlaced) shift--;
|
||||
|
||||
/* sort out the virtaul screen size */
|
||||
af_width = MAX (info->w, virtualX) * BYTES_PER_PIXEL (af_bpp);
|
||||
af_width = MAX(info->w, virtualX) * BYTES_PER_PIXEL(af_bpp);
|
||||
af_width = (((af_width - 1) >> shift) + 1) << shift;
|
||||
|
||||
/* test: force it to be power of two */
|
||||
|
@ -675,10 +626,10 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
}
|
||||
|
||||
/* Set scanline width */
|
||||
write_vga_register (port_crtc, 0x13, af_width >> shift);
|
||||
write_vga_register(port_crtc, 0x13, af_width >> shift);
|
||||
/* could also write bit 8 to port_crtc:0x28 bit 8 */
|
||||
|
||||
af_height = MAX (info->h, virtualY);
|
||||
af_height = MAX(info->h, virtualY);
|
||||
|
||||
af_linear = linear;
|
||||
af_lines_per_bank = af->BankSize * 1024 / af_width;
|
||||
|
@ -687,13 +638,13 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
af_scroll_x = 0;
|
||||
af_scroll_y = 0;
|
||||
setvstart (af_scroll_x, af_scroll_y);
|
||||
setvstart(af_scroll_x, af_scroll_y);
|
||||
|
||||
af_bank = 0;
|
||||
|
||||
/* return framebuffer dimensions to the application */
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
|
@ -701,10 +652,10 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
|
@ -717,40 +668,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -758,88 +701,77 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
if (waitVRT >= 0) setvstart (x, y);
|
||||
if (waitVRT >= 0) setvstart(x, y);
|
||||
if (waitVRT == 1) {
|
||||
while (inportb (0x3da) & 8);
|
||||
while (!(inportb (0x3da) & 8));
|
||||
while (inportb(0x3da) & 8)
|
||||
;
|
||||
while (!(inportb(0x3da) & 8))
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* SetBank32:
|
||||
* Relocatable bank switch function. This is called with a bank number in
|
||||
* %edx. I'm not sure what registers it is allowed to clobber, so it is
|
||||
|
@ -860,7 +792,7 @@ void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long w
|
|||
* applications if you don't provide it.
|
||||
*/
|
||||
asm ("
|
||||
#
|
||||
#
|
||||
.globl _SetBank32, _SetBank32End
|
||||
|
||||
.align 4
|
||||
|
@ -881,7 +813,7 @@ asm ("
|
|||
ret
|
||||
|
||||
_SetBank32End:
|
||||
#
|
||||
#
|
||||
");
|
||||
|
||||
|
||||
|
@ -894,11 +826,7 @@ asm ("
|
|||
*/
|
||||
void SetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _SetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _SetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
@ -910,11 +838,13 @@ void SetBank(AF_DRIVER *af, long bank)
|
|||
*/
|
||||
void WaitTillIdle(AF_DRIVER *af)
|
||||
{
|
||||
#ifndef USE_ALTERNATIVE_IDLE_CHECK
|
||||
while (inportb (0x82aa) & 0x0f);
|
||||
#else
|
||||
while (inportb (0x82ba) & 0x80);
|
||||
#endif
|
||||
#ifndef USE_ALTERNATIVE_IDLE_CHECK
|
||||
while (inportb(0x82aa) & 0x0f)
|
||||
;
|
||||
#else
|
||||
while (inportb(0x82ba) & 0x80)
|
||||
;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -945,4 +875,3 @@ void SetMix(AF_DRIVER *af, long foreMix, long backMix)
|
|||
else
|
||||
af_back_mix = backMix;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
|
@ -4,28 +4,28 @@
|
|||
#include <pc.h>
|
||||
|
||||
typedef enum {
|
||||
CLGD5426, //1
|
||||
CLGD5428, //1
|
||||
CLGD5429, //2
|
||||
CLGD5430, //3
|
||||
CLGD5434, //4
|
||||
CLGD5434E, //5
|
||||
CLGD5436, //6
|
||||
CLGD5440, //7
|
||||
CLGD5446, //8
|
||||
CLGD5480, //9
|
||||
CLGD7541, //10
|
||||
CLGD7542, //11
|
||||
CLGD7543, //10
|
||||
CLGD7548, //12
|
||||
CLGD7555, //13
|
||||
CLGD7556 //13
|
||||
CLGD5426, // 1
|
||||
CLGD5428, // 1
|
||||
CLGD5429, // 2
|
||||
CLGD5430, // 3
|
||||
CLGD5434, // 4
|
||||
CLGD5434E, // 5
|
||||
CLGD5436, // 6
|
||||
CLGD5440, // 7
|
||||
CLGD5446, // 8
|
||||
CLGD5480, // 9
|
||||
CLGD7541, // 10
|
||||
CLGD7542, // 11
|
||||
CLGD7543, // 10
|
||||
CLGD7548, // 12
|
||||
CLGD7555, // 13
|
||||
CLGD7556 // 13
|
||||
} cirrus_types;
|
||||
|
||||
#define KNOWN_CARDS 16
|
||||
|
||||
//54m30
|
||||
//54m40 - triple buffer, transparent color register
|
||||
// 54m30
|
||||
// 54m40 - triple buffer, transparent color register
|
||||
/*
|
||||
1 - the oldest BitBLT capable chips, !!for color-expand with transparency
|
||||
transparent color is used !!, maxwidth 2047, maxpitch 4095, maxheight 1023,
|
||||
|
@ -33,39 +33,32 @@ all BitBLT registers except src&dstaddr are preserved, allow at most 7 bits
|
|||
to be discarded with color expansion at the end of each scanline, color
|
||||
expansion and hw cursor in 8 and 15/16bpp supported
|
||||
2 - supports MMIO at b8000 or at the end of linear address space (2mb-256),
|
||||
!!for color-expand with transparency 0 bits are just skipped!!, maxpitch 8191, color expansion
|
||||
with left edge clipping&pattern vertical preset, supports color expanded
|
||||
pattern polygon fills
|
||||
3 - like 2, ? need srcaddr to be written for color expansion system to
|
||||
screen ?, hw cursor also at 24/32bpp
|
||||
4 - like 3, but 64 bit, maxwidth 8191, doesn't support clipping&vertical
|
||||
preset and polygon fills, color expansion in 32bpp supported, for color
|
||||
expansion with transparency all 4 bytes of fg color has to be written and 4
|
||||
bytes of color has to be filled with not fg color, has bug in system to
|
||||
display memory transfers, hw cursor also at 24/32bpp,
|
||||
5 - the bug is corrected
|
||||
6 - like 2, but 64 bit, maxwidth 8191, maxheight 2047,supports solid fill,
|
||||
color expansion in 24 and 32bpp, for 24bpp color expansion transparency must
|
||||
be enabled, but can invert the meaning of input data, so normal color
|
||||
expansion can de done in two passes, has auto-start capability, hw cursor
|
||||
also at 24/32bpp, triple buffer ?
|
||||
7 - like 3 with video features
|
||||
8 - like 9, no clipping, no X-Y pos.
|
||||
9 - like 6, has clip rectangle, X-Y positioning, command list with possible
|
||||
interrupt on completion, left edge clipping more complex, can probably triple
|
||||
buffer, color expand with uses transparent color, no transparent mask
|
||||
10 - (7541,7543) like 1, height is _not_ preserved
|
||||
11 - (7542) don't know anything
|
||||
12 - (7548) like 1 with MMIO, autostart, height is _not_ preserved
|
||||
13 - (7555-6) like 6, MMIO in PCI 0x14 or offset 0x3fff00, triple buffer
|
||||
GR16-17, no 32bpp color expansion, autostart
|
||||
if banked GR6[3:2]=01,SR17[6]=0,SR17[7:4]=0
|
||||
else SR17[6]=1,SR17[7:4]!=0
|
||||
!!for color-expand with transparency 0 bits are just skipped!!, maxpitch 8191,
|
||||
color expansion with left edge clipping&pattern vertical preset, supports color
|
||||
expanded pattern polygon fills 3 - like 2, ? need srcaddr to be written for
|
||||
color expansion system to screen ?, hw cursor also at 24/32bpp 4 - like 3, but
|
||||
64 bit, maxwidth 8191, doesn't support clipping&vertical preset and polygon
|
||||
fills, color expansion in 32bpp supported, for color expansion with transparency
|
||||
all 4 bytes of fg color has to be written and 4 bytes of color has to be filled
|
||||
with not fg color, has bug in system to display memory transfers, hw cursor also
|
||||
at 24/32bpp, 5 - the bug is corrected 6 - like 2, but 64 bit, maxwidth 8191,
|
||||
maxheight 2047,supports solid fill, color expansion in 24 and 32bpp, for 24bpp
|
||||
color expansion transparency must be enabled, but can invert the meaning of
|
||||
input data, so normal color expansion can de done in two passes, has auto-start
|
||||
capability, hw cursor also at 24/32bpp, triple buffer ? 7 - like 3 with video
|
||||
features 8 - like 9, no clipping, no X-Y pos. 9 - like 6, has clip rectangle,
|
||||
X-Y positioning, command list with possible interrupt on completion, left edge
|
||||
clipping more complex, can probably triple buffer, color expand with uses
|
||||
transparent color, no transparent mask 10 - (7541,7543) like 1, height is _not_
|
||||
preserved 11 - (7542) don't know anything 12 - (7548) like 1 with MMIO,
|
||||
autostart, height is _not_ preserved 13 - (7555-6) like 6, MMIO in PCI 0x14 or
|
||||
offset 0x3fff00, triple buffer GR16-17, no 32bpp color expansion, autostart if
|
||||
banked GR6[3:2]=01,SR17[6]=0,SR17[7:4]=0 else SR17[6]=1,SR17[7:4]!=0
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
cirrus_types model;
|
||||
int biosnum,pcinum;
|
||||
int biosnum, pcinum;
|
||||
char *desc;
|
||||
int family;
|
||||
} CIRRUS_DETECT;
|
||||
|
@ -75,37 +68,25 @@ extern unsigned long af_mmio;
|
|||
#define GRX 0x3ce
|
||||
#define _crtc 0x3d4
|
||||
|
||||
__inline__ void _vsync_out_h()
|
||||
{
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
__inline__ void _vsync_out_h( ) {
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* _vsync_out_v:
|
||||
* Waits until the VGA is not in a vertical retrace.
|
||||
*/
|
||||
__inline__ void _vsync_out_v()
|
||||
{
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
}
|
||||
|
||||
__inline__ void _vsync_out_v( ) {
|
||||
do { } while (inportb(0x3DA) & 8); }
|
||||
|
||||
/* _vsync_in:
|
||||
* Waits until the VGA is in the vertical retrace period.
|
||||
*/
|
||||
__inline__ void _vsync_in()
|
||||
{
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
|
||||
__inline__ void _vsync_in( ) {
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
/* _write_hpp:
|
||||
* Writes to the VGA pelpan register.
|
||||
*/
|
||||
__inline__ void _write_hpp(int value)
|
||||
{
|
||||
__inline__ void _write_hpp(int value) {
|
||||
write_vga_register(0x3C0, 0x33, value);
|
||||
}
|
||||
|
||||
|
@ -114,108 +95,115 @@ __inline__ void _write_hpp(int value)
|
|||
#define outm4(index, value) *(volatile long *)(af_mmio + index) = (value)
|
||||
#define inmb(index) *(volatile char *)(af_mmio + index)
|
||||
|
||||
__inline__ void outp1(unsigned short port,unsigned char index,unsigned char value)
|
||||
{
|
||||
__inline__ void outp1(unsigned short port, unsigned char index,
|
||||
unsigned char value) {
|
||||
unsigned short w;
|
||||
|
||||
w=index;
|
||||
w|=value<<8;
|
||||
outportw(port,w);
|
||||
w = index;
|
||||
w |= value << 8;
|
||||
outportw(port, w);
|
||||
}
|
||||
|
||||
__inline__ void outp2(unsigned short port,unsigned char index,unsigned short value)
|
||||
{
|
||||
__inline__ void outp2(unsigned short port, unsigned char index,
|
||||
unsigned short value) {
|
||||
unsigned short w;
|
||||
|
||||
w=index;
|
||||
w|=((value&0xff)<<8);
|
||||
outportw(port,w);
|
||||
w=index+1;
|
||||
w|=(value&0xff00);
|
||||
outportw(port,w);
|
||||
w = index;
|
||||
w |= ((value & 0xff) << 8);
|
||||
outportw(port, w);
|
||||
w = index + 1;
|
||||
w |= (value & 0xff00);
|
||||
outportw(port, w);
|
||||
}
|
||||
|
||||
__inline__ void outp3(unsigned short port,unsigned char index,unsigned long value)
|
||||
{
|
||||
__inline__ void outp3(unsigned short port, unsigned char index,
|
||||
unsigned long value) {
|
||||
unsigned short w;
|
||||
|
||||
w=index;
|
||||
w|=(value&0xff)<<8;
|
||||
outportw(port,w);
|
||||
w=index+1;
|
||||
w|=(value&0xff00);
|
||||
outportw(port,w);
|
||||
w=index+2;
|
||||
w|=(value>>8)&0xff00;
|
||||
outportw(port,w);
|
||||
w = index;
|
||||
w |= (value & 0xff) << 8;
|
||||
outportw(port, w);
|
||||
w = index + 1;
|
||||
w |= (value & 0xff00);
|
||||
outportw(port, w);
|
||||
w = index + 2;
|
||||
w |= (value >> 8) & 0xff00;
|
||||
outportw(port, w);
|
||||
}
|
||||
|
||||
#define DISABLE() asm volatile ("cli");
|
||||
#define ENABLE() asm volatile ("sti");
|
||||
#define DISABLE( ) asm volatile("cli");
|
||||
#define ENABLE( ) asm volatile("sti");
|
||||
|
||||
#define CIR_FORG8(color) outp1(GRX,0x01,(color))
|
||||
#define CIR_FORG8(color) outp1(GRX, 0x01, (color))
|
||||
|
||||
#define CIR_FORG16(color) outp1(GRX,0x01,(color) & 0xff); \
|
||||
outp1(GRX,0x11,((color)>>8) & 0xff)
|
||||
#define CIR_FORG24(color) outp1(GRX,0x01,(color) & 0xff); \
|
||||
outp1(GRX,0x11,((color)>>8) & 0xff); \
|
||||
outp1(GRX,0x13,((color)>>16) & 0xff)
|
||||
#define CIR_FORG32(color) outp1(GRX,0x01,(color) & 0xff); \
|
||||
outp1(GRX,0x11,((color)>>8) & 0xff); \
|
||||
outp1(GRX,0x13,((color)>>16) & 0xff); \
|
||||
outp1(GRX,0x15,((color)>>24) & 0xff)
|
||||
#define CIR_FORG16(color) \
|
||||
outp1(GRX, 0x01, (color)&0xff); \
|
||||
outp1(GRX, 0x11, ((color) >> 8) & 0xff)
|
||||
#define CIR_FORG24(color) \
|
||||
outp1(GRX, 0x01, (color)&0xff); \
|
||||
outp1(GRX, 0x11, ((color) >> 8) & 0xff); \
|
||||
outp1(GRX, 0x13, ((color) >> 16) & 0xff)
|
||||
#define CIR_FORG32(color) \
|
||||
outp1(GRX, 0x01, (color)&0xff); \
|
||||
outp1(GRX, 0x11, ((color) >> 8) & 0xff); \
|
||||
outp1(GRX, 0x13, ((color) >> 16) & 0xff); \
|
||||
outp1(GRX, 0x15, ((color) >> 24) & 0xff)
|
||||
|
||||
#define CIR_BACKG8(color) outp1(GRX,0x00,(color))
|
||||
#define CIR_BACKG16(color) outp1(GRX,0x00,(color) & 0xff); \
|
||||
outp1(GRX,0x10,((color)>>8) & 0xff)
|
||||
#define CIR_BACKG24(color) outp1(GRX,0x00,(color) & 0xff); \
|
||||
outp1(GRX,0x10,((color)>>8) & 0xff); \
|
||||
outp1(GRX,0x12,((color)>>16) & 0xff)
|
||||
#define CIR_BACKG32(color) outp1(GRX,0x00,(color) & 0xff); \
|
||||
outp1(GRX,0x10,((color)>>8) & 0xff); \
|
||||
outp1(GRX,0x12,((color)>>16) & 0xff); \
|
||||
outp1(GRX,0x14,((color)>>24) & 0xff)
|
||||
#define CIR_BACKG8(color) outp1(GRX, 0x00, (color))
|
||||
#define CIR_BACKG16(color) \
|
||||
outp1(GRX, 0x00, (color)&0xff); \
|
||||
outp1(GRX, 0x10, ((color) >> 8) & 0xff)
|
||||
#define CIR_BACKG24(color) \
|
||||
outp1(GRX, 0x00, (color)&0xff); \
|
||||
outp1(GRX, 0x10, ((color) >> 8) & 0xff); \
|
||||
outp1(GRX, 0x12, ((color) >> 16) & 0xff)
|
||||
#define CIR_BACKG32(color) \
|
||||
outp1(GRX, 0x00, (color)&0xff); \
|
||||
outp1(GRX, 0x10, ((color) >> 8) & 0xff); \
|
||||
outp1(GRX, 0x12, ((color) >> 16) & 0xff); \
|
||||
outp1(GRX, 0x14, ((color) >> 24) & 0xff)
|
||||
|
||||
#define CIR_FORG8MMIO(color) outm1(0x04,(color))
|
||||
#define CIR_FORG16MMIO(color) outm2(0x04,(color))
|
||||
#define CIR_FORG24MMIO(color) outm4(0x04,(color))
|
||||
#define CIR_FORG32MMIO(color) outm4(0x04,(color))
|
||||
#define CIR_FORG8MMIO(color) outm1(0x04, (color))
|
||||
#define CIR_FORG16MMIO(color) outm2(0x04, (color))
|
||||
#define CIR_FORG24MMIO(color) outm4(0x04, (color))
|
||||
#define CIR_FORG32MMIO(color) outm4(0x04, (color))
|
||||
|
||||
#define CIR_BACKG8MMIO(color) outm1(0x00,(color))
|
||||
#define CIR_BACKG16MMIO(color) outm2(0x00,(color))
|
||||
#define CIR_BACKG24MMIO(color) outm4(0x00,(color))
|
||||
#define CIR_BACKG32MMIO(color) outm4(0x00,(color))
|
||||
#define CIR_BACKG8MMIO(color) outm1(0x00, (color))
|
||||
#define CIR_BACKG16MMIO(color) outm2(0x00, (color))
|
||||
#define CIR_BACKG24MMIO(color) outm4(0x00, (color))
|
||||
#define CIR_BACKG32MMIO(color) outm4(0x00, (color))
|
||||
|
||||
#define SET_WIDTH_HEIGHTMMIO(width,height) outm4(0x08,(width)|(((height)<<16)))
|
||||
#define SET_WIDTH_HEIGHTMMIO(width, height) \
|
||||
outm4(0x08, (width) | (((height) << 16)))
|
||||
|
||||
#define SET_PITCHESMMIO(src,dst) outm4(0x0c,(dst)|((src)<<16)
|
||||
#define SET_PITCHESMMIO(src, dst) outm4(0x0c,(dst)|((src)<<16)
|
||||
|
||||
#define SET_DSTADDRMMIO(address) outm4(0x10,address)
|
||||
#define SET_DSTADDRMMIO(address) outm4(0x10, address)
|
||||
|
||||
/* in last byte of is left edge clipping - to be added */
|
||||
#define SET_SRCADDRMMIO(address) outm4(0x14,address)
|
||||
#define SET_SRCADDRMMIO(address) outm4(0x14, address)
|
||||
|
||||
#define CIR_ROP_MODEMMIO(rop,mode) outm4(0x18,(mode)|((rop)<<16))
|
||||
#define CIR_ROP_MODEMMIO(rop, mode) outm4(0x18, (mode) | ((rop) << 16))
|
||||
|
||||
#define CIR_BLTROPMMIO(rop) outm1(0x1a,rop)
|
||||
#define CIR_BLTMODEMMIO(mode) outm1(0x18,mode)
|
||||
#define CIR_BLTROPMMIO(rop) outm1(0x1a, rop)
|
||||
#define CIR_BLTMODEMMIO(mode) outm1(0x18, mode)
|
||||
|
||||
#define CIR_WIDTH(width) outp2(GRX,0x20,width)
|
||||
#define CIR_HEIGHT(height) outp2(GRX,0x22,height)
|
||||
#define CIR_DSTPITCH(pitch) outp2(GRX,0x24,pitch)
|
||||
#define CIR_SRCPITCH(pitch) outp2(GRX,0x26,pitch)
|
||||
#define SET_DSTADDR(address) outp3(GRX,0x28,address)
|
||||
#define SET_SRCADDR(address) outp3(GRX,0x2c,address)
|
||||
#define CIR_BLTMODE(mode) outp1(GRX,0x30,mode)
|
||||
#define CIR_BLTROP(rop) outp1(GRX,0x32,rop)
|
||||
#define CIR_TRANS(color) outp2(GRX,0x34,(color)); \
|
||||
outp2(GRX,0x38,0);
|
||||
#define CIR_TRANSMMIO(color) outm2(0x34,(color))
|
||||
#define CIR_WIDTH(width) outp2(GRX, 0x20, width)
|
||||
#define CIR_HEIGHT(height) outp2(GRX, 0x22, height)
|
||||
#define CIR_DSTPITCH(pitch) outp2(GRX, 0x24, pitch)
|
||||
#define CIR_SRCPITCH(pitch) outp2(GRX, 0x26, pitch)
|
||||
#define SET_DSTADDR(address) outp3(GRX, 0x28, address)
|
||||
#define SET_SRCADDR(address) outp3(GRX, 0x2c, address)
|
||||
#define CIR_BLTMODE(mode) outp1(GRX, 0x30, mode)
|
||||
#define CIR_BLTROP(rop) outp1(GRX, 0x32, rop)
|
||||
#define CIR_TRANS(color) \
|
||||
outp2(GRX, 0x34, (color)); \
|
||||
outp2(GRX, 0x38, 0);
|
||||
#define CIR_TRANSMMIO(color) outm2(0x34, (color))
|
||||
|
||||
#define CIR_CMD(cmd) outp1(GRX,0x31,cmd)
|
||||
#define CIR_CMD(cmd) outp1(GRX, 0x31, cmd)
|
||||
|
||||
|
||||
#define CIR_CMDMMIO(cmd) outm1(0x40,cmd)
|
||||
#define CIR_CMDMMIO(cmd) outm1(0x40, cmd)
|
||||
|
||||
#define CIR_BLT_PIX8 0
|
||||
#define CIR_BLT_PIX15 16
|
||||
|
@ -237,7 +225,8 @@ __inline__ void outp3(unsigned short port,unsigned char index,unsigned long valu
|
|||
#define CIR_BLT_MEM 0x04
|
||||
#define CIR_BLT_COLEXP 0x80
|
||||
|
||||
#define my_int(num,regs) asm("\
|
||||
#define my_int(num, regs) \
|
||||
asm("\
|
||||
pushal; \
|
||||
pushl %%esi; \
|
||||
movl (%%esi),%%edi; \
|
||||
|
@ -258,7 +247,7 @@ movl %%ebp,8(%%esi); \
|
|||
movl %%edi,(%%esi); \
|
||||
popl %%eax; \
|
||||
movl %%eax,4(%%esi); \
|
||||
popal" \
|
||||
::"S" (regs), "i" (num))
|
||||
popal" ::"S"(regs), \
|
||||
"i"(num))
|
||||
|
||||
#endif
|
||||
|
|
1397
cirrus54/driver.c
1397
cirrus54/driver.c
File diff suppressed because it is too large
Load Diff
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
135
drvgen.c
135
drvgen.c
|
@ -5,21 +5,19 @@
|
|||
This software may be freely distributed with above copyright, no warranty.
|
||||
Based on code by DJ Delorie, it's really his, enhanced, bugs fixed. */
|
||||
|
||||
#include "vbeaf.h"
|
||||
#include <coff.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <coff.h>
|
||||
#include "vbeaf.h"
|
||||
|
||||
extern AF_DRIVER drvhdr;
|
||||
|
||||
void exit_cleanup(void)
|
||||
{
|
||||
void exit_cleanup(void) {
|
||||
remove("drv__tmp.o");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int main(int argc, char **argv) {
|
||||
int errors = 0;
|
||||
unsigned bss_start = 0;
|
||||
FILHDR fh;
|
||||
|
@ -29,44 +27,41 @@ int main(int argc, char **argv)
|
|||
SYMENT *sym;
|
||||
RELOC *relocs;
|
||||
int strsz, i;
|
||||
long init1_offset,init2_offset,init3_offset,element_size,nrelocs,vbe_size;
|
||||
long init1_offset, init2_offset, init3_offset, element_size, nrelocs,
|
||||
vbe_size;
|
||||
|
||||
if (argc < 6)
|
||||
{
|
||||
printf("Usage: drvgen output.drv oemext pnpinit initdrv input.o [input2.o ... -lgcc -lc]\n");
|
||||
if (argc < 6) {
|
||||
printf("Usage: drvgen output.drv oemext pnpinit initdrv input.o "
|
||||
"[input2.o ... -lgcc -lc]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
input_f = fopen(argv[5], "rb");
|
||||
if (!input_f)
|
||||
{
|
||||
if (!input_f) {
|
||||
perror(argv[5]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fread(&fh, 1, FILHSZ, input_f);
|
||||
if (fh.f_nscns != 1 || argc > 5)
|
||||
{
|
||||
if (fh.f_nscns != 1 || argc > 5) {
|
||||
char command[1024];
|
||||
fclose(input_f);
|
||||
|
||||
strcpy(command,"ld -X -S -r -o drv__tmp.o -L");
|
||||
strcat(command,getenv("DJDIR"));
|
||||
strcat(command,"/lib ");
|
||||
for(i=5;argv[i];i++) {
|
||||
strcat(command,argv[i]);
|
||||
strcat(command," ");
|
||||
strcpy(command, "ld -X -S -r -o drv__tmp.o -L");
|
||||
strcat(command, getenv("DJDIR"));
|
||||
strcat(command, "/lib ");
|
||||
for (i = 5; argv[i]; i++) {
|
||||
strcat(command, argv[i]);
|
||||
strcat(command, " ");
|
||||
}
|
||||
strcat(command,"-T ../drv.ld");
|
||||
strcat(command, "-T ../drv.ld");
|
||||
|
||||
printf("%s\n",command);
|
||||
printf("%s\n", command);
|
||||
i = system(command);
|
||||
if(i)
|
||||
return i;
|
||||
if (i) return i;
|
||||
|
||||
input_f = fopen("drv__tmp.o", "rb");
|
||||
if (!input_f)
|
||||
{
|
||||
if (!input_f) {
|
||||
perror(argv[5]);
|
||||
return 1;
|
||||
} else
|
||||
|
@ -74,7 +69,8 @@ int main(int argc, char **argv)
|
|||
|
||||
fread(&fh, 1, FILHSZ, input_f);
|
||||
if (fh.f_nscns != 1) {
|
||||
printf("Error: input file has more than one section; use -M for map\n");
|
||||
printf("Error: input file has more than one section; use -M for "
|
||||
"map\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -92,23 +88,20 @@ int main(int argc, char **argv)
|
|||
fseek(input_f, sc.s_scnptr, 0);
|
||||
fread(data, 1, sc.s_size, input_f);
|
||||
|
||||
sym = malloc(sizeof(SYMENT)*fh.f_nsyms);
|
||||
sym = malloc(sizeof(SYMENT) * fh.f_nsyms);
|
||||
fseek(input_f, fh.f_symptr, 0);
|
||||
fread(sym, fh.f_nsyms, SYMESZ, input_f);
|
||||
fread(&strsz, 1, 4, input_f);
|
||||
strings = malloc(strsz);
|
||||
fread(strings+4, 1, strsz-4, input_f);
|
||||
fread(strings + 4, 1, strsz - 4, input_f);
|
||||
strings[0] = 0;
|
||||
for (i=0; i<(int)fh.f_nsyms; i++)
|
||||
{
|
||||
for (i = 0; i < (int)fh.f_nsyms; i++) {
|
||||
char tmp[9], *name;
|
||||
if (sym[i].e.e.e_zeroes)
|
||||
{
|
||||
if (sym[i].e.e.e_zeroes) {
|
||||
memcpy(tmp, sym[i].e.e_name, 8);
|
||||
tmp[8] = 0;
|
||||
name = tmp;
|
||||
}
|
||||
else
|
||||
} else
|
||||
name = strings + sym[i].e.e.e_offset;
|
||||
#if 0
|
||||
printf("[%3d] 0x%08x 0x%04x 0x%04x %d %s\n",
|
||||
|
@ -120,62 +113,56 @@ int main(int argc, char **argv)
|
|||
name
|
||||
);
|
||||
#endif
|
||||
if (sym[i].e_scnum == 0)
|
||||
{
|
||||
printf("Error: object contains unresolved external symbols (%s)\n", name);
|
||||
errors ++;
|
||||
if (sym[i].e_scnum == 0) {
|
||||
printf("Error: object contains unresolved external symbols (%s)\n",
|
||||
name);
|
||||
errors++;
|
||||
}
|
||||
if (strncmp(name, argv[2], strlen(argv[2])) == 0)
|
||||
{
|
||||
if (init1_offset != -1)
|
||||
{
|
||||
printf("Error: multiple symbols that start with %s (%s)!\n", argv[2], name);
|
||||
if (strncmp(name, argv[2], strlen(argv[2])) == 0) {
|
||||
if (init1_offset != -1) {
|
||||
printf("Error: multiple symbols that start with %s (%s)!\n",
|
||||
argv[2], name);
|
||||
errors++;
|
||||
}
|
||||
init1_offset = sym[i].e_value;
|
||||
} else if (strncmp(name, argv[3], strlen(argv[3])) == 0)
|
||||
{
|
||||
if (init2_offset != -1)
|
||||
{
|
||||
printf("Error: multiple symbols that start with %s (%s)!\n", argv[3], name);
|
||||
} else if (strncmp(name, argv[3], strlen(argv[3])) == 0) {
|
||||
if (init2_offset != -1) {
|
||||
printf("Error: multiple symbols that start with %s (%s)!\n",
|
||||
argv[3], name);
|
||||
errors++;
|
||||
}
|
||||
init2_offset = sym[i].e_value;
|
||||
} else if (strncmp(name, argv[4], strlen(argv[4])) == 0)
|
||||
{
|
||||
if (init3_offset != -1)
|
||||
{
|
||||
printf("Error: multiple symbols that start with %s (%s)!\n", argv[4], name);
|
||||
} else if (strncmp(name, argv[4], strlen(argv[4])) == 0) {
|
||||
if (init3_offset != -1) {
|
||||
printf("Error: multiple symbols that start with %s (%s)!\n",
|
||||
argv[4], name);
|
||||
errors++;
|
||||
}
|
||||
init3_offset = sym[i].e_value;
|
||||
} else if (strcmp(name, ".bss") == 0 && !bss_start) {
|
||||
bss_start = sym[i].e_value;
|
||||
/* printf("bss_start 0x%x\n",bss_start); */
|
||||
memset(data+bss_start, 0, sc.s_size - bss_start);
|
||||
/* printf("bss_start 0x%x\n",bss_start); */
|
||||
memset(data + bss_start, 0, sc.s_size - bss_start);
|
||||
}
|
||||
i += sym[i].e_numaux;
|
||||
}
|
||||
|
||||
if (init1_offset == -1)
|
||||
{
|
||||
if (init1_offset == -1) {
|
||||
printf("Error: symbol %s not found!\n", argv[2]);
|
||||
errors++;
|
||||
}
|
||||
|
||||
if (init2_offset == -1)
|
||||
{
|
||||
if (init2_offset == -1) {
|
||||
printf("Error: symbol %s not found!\n", argv[3]);
|
||||
errors++;
|
||||
}
|
||||
|
||||
if (init3_offset == -1)
|
||||
{
|
||||
if (init3_offset == -1) {
|
||||
printf("Error: symbol %s not found!\n", argv[4]);
|
||||
errors++;
|
||||
}
|
||||
|
||||
relocs = malloc(sizeof(RELOC)*sc.s_nreloc);
|
||||
relocs = malloc(sizeof(RELOC) * sc.s_nreloc);
|
||||
fseek(input_f, sc.s_relptr, 0);
|
||||
fread(relocs, sc.s_nreloc, RELSZ, input_f);
|
||||
#if 0
|
||||
|
@ -189,29 +176,27 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
fclose(input_f);
|
||||
if (errors)
|
||||
return errors;
|
||||
if (errors) return errors;
|
||||
|
||||
output_f = fopen(argv[1], "wb");
|
||||
if (!output_f)
|
||||
{
|
||||
if (!output_f) {
|
||||
perror(argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i=0; i<sc.s_nreloc; i++)
|
||||
if(relocs[i].r_type == 0x14) /* Don't do these, they are relative */
|
||||
for (i = 0; i < sc.s_nreloc; i++)
|
||||
if (relocs[i].r_type == 0x14) /* Don't do these, they are relative */
|
||||
nrelocs--;
|
||||
|
||||
vbe_size=sizeof(drvhdr) + (1+nrelocs)*sizeof(long);
|
||||
drvhdr.OemExt=(void*)(vbe_size+init1_offset);
|
||||
drvhdr.PlugAndPlayInit=(void*)(vbe_size+init2_offset);
|
||||
drvhdr.InitDriver=(void*)(vbe_size+init3_offset);
|
||||
vbe_size = sizeof(drvhdr) + (1 + nrelocs) * sizeof(long);
|
||||
drvhdr.OemExt = (void *)(vbe_size + init1_offset);
|
||||
drvhdr.PlugAndPlayInit = (void *)(vbe_size + init2_offset);
|
||||
drvhdr.InitDriver = (void *)(vbe_size + init3_offset);
|
||||
|
||||
fwrite(&drvhdr, 1, sizeof(drvhdr), output_f);
|
||||
fwrite(&nrelocs, 1, sizeof(nrelocs), output_f);
|
||||
for (i=0; i<sc.s_nreloc; i++)
|
||||
if(relocs[i].r_type != 0x14) /* Don't do these, they are relative */
|
||||
for (i = 0; i < sc.s_nreloc; i++)
|
||||
if (relocs[i].r_type != 0x14) /* Don't do these, they are relative */
|
||||
fwrite(&(relocs[i].r_vaddr), 1, sizeof(long), output_f);
|
||||
fwrite(data, 1, sc.s_size, output_f);
|
||||
|
||||
|
|
417
helper.c
417
helper.c
|
@ -17,48 +17,30 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <sys/farptr.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* trace_putc:
|
||||
* Debugging trace function
|
||||
*/
|
||||
void trace_putc(char c)
|
||||
{
|
||||
asm (
|
||||
" int $0x21 "
|
||||
void trace_putc(char c) {
|
||||
asm(" int $0x21 "
|
||||
|
||||
:
|
||||
|
||||
: "a" (0x200),
|
||||
"d" (c)
|
||||
: "a"(0x200), "d"(c)
|
||||
|
||||
: "%eax",
|
||||
"%ebx",
|
||||
"%ecx",
|
||||
"%edx",
|
||||
"%esi",
|
||||
"%edi"
|
||||
);
|
||||
: "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* trace_printf:
|
||||
* Debugging trace function: supports %c, %s, %d, and %x
|
||||
*/
|
||||
void trace_printf(char *msg, ...)
|
||||
{
|
||||
static char hex_digit[] =
|
||||
{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
|
||||
};
|
||||
void trace_printf(char *msg, ...) {
|
||||
static char hex_digit[] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||
|
||||
unsigned long l;
|
||||
char *s;
|
||||
|
@ -73,10 +55,7 @@ void trace_printf(char *msg, ...)
|
|||
msg++;
|
||||
|
||||
switch (*msg) {
|
||||
|
||||
case '%':
|
||||
trace_putc('%');
|
||||
break;
|
||||
case '%': trace_putc('%'); break;
|
||||
|
||||
case 'c':
|
||||
c = va_arg(ap, char);
|
||||
|
@ -86,8 +65,7 @@ void trace_printf(char *msg, ...)
|
|||
case 's':
|
||||
s = va_arg(ap, char *);
|
||||
while (*s) {
|
||||
if (*s == '\n')
|
||||
trace_putc('\r');
|
||||
if (*s == '\n') trace_putc('\r');
|
||||
trace_putc(*s);
|
||||
s++;
|
||||
}
|
||||
|
@ -100,10 +78,9 @@ void trace_printf(char *msg, ...)
|
|||
c = -c;
|
||||
}
|
||||
i = 1;
|
||||
while (i*10 <= c)
|
||||
i *= 10;
|
||||
while (i * 10 <= c) i *= 10;
|
||||
while (i) {
|
||||
trace_putc('0'+c/i);
|
||||
trace_putc('0' + c / i);
|
||||
c %= i;
|
||||
i /= 10;
|
||||
}
|
||||
|
@ -111,18 +88,15 @@ void trace_printf(char *msg, ...)
|
|||
|
||||
case 'x':
|
||||
l = va_arg(ap, unsigned long);
|
||||
for (i=7; i>=0; i--)
|
||||
trace_putc(hex_digit[(l>>(i*4))&0xF]);
|
||||
for (i = 7; i >= 0; i--)
|
||||
trace_putc(hex_digit[(l >> (i * 4)) & 0xF]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (*msg)
|
||||
msg++;
|
||||
}
|
||||
else {
|
||||
if (*msg) msg++;
|
||||
} else {
|
||||
/* output normal character */
|
||||
if (*msg == '\n')
|
||||
trace_putc('\r');
|
||||
if (*msg == '\n') trace_putc('\r');
|
||||
trace_putc(*msg);
|
||||
msg++;
|
||||
}
|
||||
|
@ -131,50 +105,33 @@ void trace_printf(char *msg, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* rm_int:
|
||||
* Calls a real mode interrupt: basically the same thing as __dpmi_int().
|
||||
*/
|
||||
void rm_int(int num, RM_REGS *regs)
|
||||
{
|
||||
void rm_int(int num, RM_REGS *regs) {
|
||||
regs->x.flags = 0;
|
||||
regs->x.sp = 0;
|
||||
regs->x.ss = 0;
|
||||
|
||||
asm (
|
||||
" int $0x31 "
|
||||
asm(" int $0x31 "
|
||||
:
|
||||
|
||||
: "a" (0x300),
|
||||
"b" (num),
|
||||
"c" (0),
|
||||
"D" (regs)
|
||||
: "a"(0x300), "b"(num), "c"(0), "D"(regs)
|
||||
|
||||
: "%eax",
|
||||
"%ebx",
|
||||
"%ecx",
|
||||
"%edx",
|
||||
"%esi",
|
||||
"%edi"
|
||||
);
|
||||
: "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* allocate_dos_memory:
|
||||
* Allocates a block of conventional memory, returning a real mode segment
|
||||
* address, and filling in the protected mode selector for accessing it.
|
||||
* Returns -1 on error.
|
||||
*/
|
||||
int allocate_dos_memory(int size, int *sel)
|
||||
{
|
||||
int allocate_dos_memory(int size, int *sel) {
|
||||
int rm_seg;
|
||||
int pm_sel;
|
||||
int ok;
|
||||
|
||||
asm (
|
||||
" int $0x31 ; "
|
||||
asm(" int $0x31 ; "
|
||||
" jc 0f ; "
|
||||
" movl $1, %2 ; "
|
||||
" jmp 1f ; "
|
||||
|
@ -182,65 +139,40 @@ int allocate_dos_memory(int size, int *sel)
|
|||
" movl $0, %2 ; "
|
||||
" 1: "
|
||||
|
||||
: "=a" (rm_seg),
|
||||
"=d" (pm_sel),
|
||||
"=m" (ok)
|
||||
: "=a"(rm_seg), "=d"(pm_sel), "=m"(ok)
|
||||
|
||||
: "a" (0x100),
|
||||
"b" ((size+15)/16)
|
||||
: "a"(0x100), "b"((size + 15) / 16)
|
||||
|
||||
: "%eax",
|
||||
"%ebx",
|
||||
"%ecx",
|
||||
"%edx",
|
||||
"%esi",
|
||||
"%edi"
|
||||
);
|
||||
: "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
|
||||
|
||||
if (!ok)
|
||||
return -1;
|
||||
if (!ok) return -1;
|
||||
|
||||
*sel = pm_sel;
|
||||
return rm_seg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* free_dos_memory:
|
||||
* Frees a block of conventional memory, given a selector previously
|
||||
* returned by a call allocate_dos_memory().
|
||||
*/
|
||||
void free_dos_memory(int sel)
|
||||
{
|
||||
asm (
|
||||
" int $0x31 "
|
||||
void free_dos_memory(int sel) {
|
||||
asm(" int $0x31 "
|
||||
:
|
||||
|
||||
: "a" (0x101),
|
||||
"d" (sel)
|
||||
: "a"(0x101), "d"(sel)
|
||||
|
||||
: "%eax",
|
||||
"%ebx",
|
||||
"%ecx",
|
||||
"%edx",
|
||||
"%esi",
|
||||
"%edi"
|
||||
);
|
||||
: "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* allocate_selector:
|
||||
* Creates a selector for accessing the specified linear memory region,
|
||||
* returning a selector value or -1 on error.
|
||||
*/
|
||||
int allocate_selector(int addr, int size)
|
||||
{
|
||||
int allocate_selector(int addr, int size) {
|
||||
int sel;
|
||||
int ok;
|
||||
|
||||
asm (
|
||||
" int $0x31 ; "
|
||||
asm(" int $0x31 ; "
|
||||
" jc 0f ; "
|
||||
|
||||
" movl %%eax, %%ebx ; "
|
||||
|
@ -263,155 +195,123 @@ int allocate_selector(int addr, int size)
|
|||
" movl $1, %1 ; "
|
||||
" 1: "
|
||||
|
||||
: "=b" (sel),
|
||||
"=D" (ok)
|
||||
: "=b"(sel), "=D"(ok)
|
||||
|
||||
: "a" (0),
|
||||
"c" (1),
|
||||
"m" (addr>>16),
|
||||
"m" (addr&0xFFFF),
|
||||
"m" ((size-1)>>16),
|
||||
"m" ((size-1)&0xFFFF)
|
||||
: "a"(0), "c"(1), "m"(addr >> 16), "m"(addr & 0xFFFF),
|
||||
"m"((size - 1) >> 16), "m"((size - 1) & 0xFFFF)
|
||||
|
||||
: "%eax",
|
||||
"%ebx",
|
||||
"%ecx",
|
||||
"%edx",
|
||||
"%esi",
|
||||
"%edi"
|
||||
);
|
||||
: "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
|
||||
|
||||
if (!ok)
|
||||
return -1;
|
||||
if (!ok) return -1;
|
||||
|
||||
return sel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* free_selector:
|
||||
* Destroys a selector that was previously created with the
|
||||
* allocate_selector() function.
|
||||
*/
|
||||
void free_selector(int sel)
|
||||
{
|
||||
asm (
|
||||
" int $0x31 "
|
||||
void free_selector(int sel) {
|
||||
asm(" int $0x31 "
|
||||
:
|
||||
|
||||
: "a" (1),
|
||||
"b" (sel)
|
||||
: "a"(1), "b"(sel)
|
||||
|
||||
: "%eax",
|
||||
"%ebx",
|
||||
"%ecx",
|
||||
"%edx",
|
||||
"%esi",
|
||||
"%edi"
|
||||
);
|
||||
: "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Helper routines for accessing the underlying VESA interface.
|
||||
*/
|
||||
|
||||
|
||||
#define MASK_LINEAR(addr) (addr & 0x000FFFFF)
|
||||
#define RM_TO_LINEAR(addr) (((addr & 0xFFFF0000) >> 12) + (addr & 0xFFFF))
|
||||
#define RM_OFFSET(addr) (addr & 0xF)
|
||||
#define RM_SEGMENT(addr) ((addr >> 4) & 0xFFFF)
|
||||
|
||||
|
||||
|
||||
typedef struct VESA_INFO /* VESA information block structure */
|
||||
{
|
||||
unsigned char VESASignature[4] __attribute__ ((packed));
|
||||
unsigned short VESAVersion __attribute__ ((packed));
|
||||
unsigned long OEMStringPtr __attribute__ ((packed));
|
||||
unsigned char Capabilities[4] __attribute__ ((packed));
|
||||
unsigned long VideoModePtr __attribute__ ((packed));
|
||||
unsigned short TotalMemory __attribute__ ((packed));
|
||||
unsigned short OemSoftwareRev __attribute__ ((packed));
|
||||
unsigned long OemVendorNamePtr __attribute__ ((packed));
|
||||
unsigned long OemProductNamePtr __attribute__ ((packed));
|
||||
unsigned long OemProductRevPtr __attribute__ ((packed));
|
||||
unsigned char Reserved[222] __attribute__ ((packed));
|
||||
unsigned char OemData[256] __attribute__ ((packed));
|
||||
unsigned char VESASignature[4] __attribute__((packed));
|
||||
unsigned short VESAVersion __attribute__((packed));
|
||||
unsigned long OEMStringPtr __attribute__((packed));
|
||||
unsigned char Capabilities[4] __attribute__((packed));
|
||||
unsigned long VideoModePtr __attribute__((packed));
|
||||
unsigned short TotalMemory __attribute__((packed));
|
||||
unsigned short OemSoftwareRev __attribute__((packed));
|
||||
unsigned long OemVendorNamePtr __attribute__((packed));
|
||||
unsigned long OemProductNamePtr __attribute__((packed));
|
||||
unsigned long OemProductRevPtr __attribute__((packed));
|
||||
unsigned char Reserved[222] __attribute__((packed));
|
||||
unsigned char OemData[256] __attribute__((packed));
|
||||
} VESA_INFO;
|
||||
|
||||
|
||||
|
||||
typedef struct VESA_MODE_INFO /* VESA information for a specific mode */
|
||||
{
|
||||
unsigned short ModeAttributes __attribute__ ((packed));
|
||||
unsigned char WinAAttributes __attribute__ ((packed));
|
||||
unsigned char WinBAttributes __attribute__ ((packed));
|
||||
unsigned short WinGranularity __attribute__ ((packed));
|
||||
unsigned short WinSize __attribute__ ((packed));
|
||||
unsigned short WinASegment __attribute__ ((packed));
|
||||
unsigned short WinBSegment __attribute__ ((packed));
|
||||
unsigned long WinFuncPtr __attribute__ ((packed));
|
||||
unsigned short BytesPerScanLine __attribute__ ((packed));
|
||||
unsigned short XResolution __attribute__ ((packed));
|
||||
unsigned short YResolution __attribute__ ((packed));
|
||||
unsigned char XCharSize __attribute__ ((packed));
|
||||
unsigned char YCharSize __attribute__ ((packed));
|
||||
unsigned char NumberOfPlanes __attribute__ ((packed));
|
||||
unsigned char BitsPerPixel __attribute__ ((packed));
|
||||
unsigned char NumberOfBanks __attribute__ ((packed));
|
||||
unsigned char MemoryModel __attribute__ ((packed));
|
||||
unsigned char BankSize __attribute__ ((packed));
|
||||
unsigned char NumberOfImagePages __attribute__ ((packed));
|
||||
unsigned char Reserved_page __attribute__ ((packed));
|
||||
unsigned char RedMaskSize __attribute__ ((packed));
|
||||
unsigned char RedMaskPos __attribute__ ((packed));
|
||||
unsigned char GreenMaskSize __attribute__ ((packed));
|
||||
unsigned char GreenMaskPos __attribute__ ((packed));
|
||||
unsigned char BlueMaskSize __attribute__ ((packed));
|
||||
unsigned char BlueMaskPos __attribute__ ((packed));
|
||||
unsigned char ReservedMaskSize __attribute__ ((packed));
|
||||
unsigned char ReservedMaskPos __attribute__ ((packed));
|
||||
unsigned char DirectColorModeInfo __attribute__ ((packed));
|
||||
unsigned short ModeAttributes __attribute__((packed));
|
||||
unsigned char WinAAttributes __attribute__((packed));
|
||||
unsigned char WinBAttributes __attribute__((packed));
|
||||
unsigned short WinGranularity __attribute__((packed));
|
||||
unsigned short WinSize __attribute__((packed));
|
||||
unsigned short WinASegment __attribute__((packed));
|
||||
unsigned short WinBSegment __attribute__((packed));
|
||||
unsigned long WinFuncPtr __attribute__((packed));
|
||||
unsigned short BytesPerScanLine __attribute__((packed));
|
||||
unsigned short XResolution __attribute__((packed));
|
||||
unsigned short YResolution __attribute__((packed));
|
||||
unsigned char XCharSize __attribute__((packed));
|
||||
unsigned char YCharSize __attribute__((packed));
|
||||
unsigned char NumberOfPlanes __attribute__((packed));
|
||||
unsigned char BitsPerPixel __attribute__((packed));
|
||||
unsigned char NumberOfBanks __attribute__((packed));
|
||||
unsigned char MemoryModel __attribute__((packed));
|
||||
unsigned char BankSize __attribute__((packed));
|
||||
unsigned char NumberOfImagePages __attribute__((packed));
|
||||
unsigned char Reserved_page __attribute__((packed));
|
||||
unsigned char RedMaskSize __attribute__((packed));
|
||||
unsigned char RedMaskPos __attribute__((packed));
|
||||
unsigned char GreenMaskSize __attribute__((packed));
|
||||
unsigned char GreenMaskPos __attribute__((packed));
|
||||
unsigned char BlueMaskSize __attribute__((packed));
|
||||
unsigned char BlueMaskPos __attribute__((packed));
|
||||
unsigned char ReservedMaskSize __attribute__((packed));
|
||||
unsigned char ReservedMaskPos __attribute__((packed));
|
||||
unsigned char DirectColorModeInfo __attribute__((packed));
|
||||
|
||||
/* VBE 2.0 extensions */
|
||||
unsigned long PhysBasePtr __attribute__ ((packed));
|
||||
unsigned long OffScreenMemOffset __attribute__ ((packed));
|
||||
unsigned short OffScreenMemSize __attribute__ ((packed));
|
||||
unsigned long PhysBasePtr __attribute__((packed));
|
||||
unsigned long OffScreenMemOffset __attribute__((packed));
|
||||
unsigned short OffScreenMemSize __attribute__((packed));
|
||||
|
||||
/* VBE 3.0 extensions */
|
||||
unsigned short LinBytesPerScanLine __attribute__ ((packed));
|
||||
unsigned char BnkNumberOfPages __attribute__ ((packed));
|
||||
unsigned char LinNumberOfPages __attribute__ ((packed));
|
||||
unsigned char LinRedMaskSize __attribute__ ((packed));
|
||||
unsigned char LinRedFieldPos __attribute__ ((packed));
|
||||
unsigned char LinGreenMaskSize __attribute__ ((packed));
|
||||
unsigned char LinGreenFieldPos __attribute__ ((packed));
|
||||
unsigned char LinBlueMaskSize __attribute__ ((packed));
|
||||
unsigned char LinBlueFieldPos __attribute__ ((packed));
|
||||
unsigned char LinRsvdMaskSize __attribute__ ((packed));
|
||||
unsigned char LinRsvdFieldPos __attribute__ ((packed));
|
||||
unsigned long MaxPixelClock __attribute__ ((packed));
|
||||
unsigned short LinBytesPerScanLine __attribute__((packed));
|
||||
unsigned char BnkNumberOfPages __attribute__((packed));
|
||||
unsigned char LinNumberOfPages __attribute__((packed));
|
||||
unsigned char LinRedMaskSize __attribute__((packed));
|
||||
unsigned char LinRedFieldPos __attribute__((packed));
|
||||
unsigned char LinGreenMaskSize __attribute__((packed));
|
||||
unsigned char LinGreenFieldPos __attribute__((packed));
|
||||
unsigned char LinBlueMaskSize __attribute__((packed));
|
||||
unsigned char LinBlueFieldPos __attribute__((packed));
|
||||
unsigned char LinRsvdMaskSize __attribute__((packed));
|
||||
unsigned char LinRsvdFieldPos __attribute__((packed));
|
||||
unsigned long MaxPixelClock __attribute__((packed));
|
||||
|
||||
unsigned char Reserved[190] __attribute__ ((packed));
|
||||
unsigned char Reserved[190] __attribute__((packed));
|
||||
} VESA_MODE_INFO;
|
||||
|
||||
|
||||
|
||||
#define MAX_VESA_MODES 256
|
||||
|
||||
|
||||
|
||||
#define SAFETY_BUFFER 4096
|
||||
|
||||
|
||||
|
||||
/* get_vesa_info:
|
||||
* Retrieves data from the VESA info block structure and mode list,
|
||||
* returning 0 for success.
|
||||
*/
|
||||
int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(int vesa_num, int linear, int w, int h, int bpp, int bytes_per_scanline, int redsize, int redpos, int greensize, int greenpos, int bluesize, int bluepos, int rsvdsize, int rsvdpos))
|
||||
{
|
||||
int get_vesa_info(int *vram_size, unsigned long *linear_addr,
|
||||
void (*callback)(int vesa_num, int linear, int w, int h,
|
||||
int bpp, int bytes_per_scanline, int redsize,
|
||||
int redpos, int greensize, int greenpos,
|
||||
int bluesize, int bluepos, int rsvdsize,
|
||||
int rsvdpos)) {
|
||||
VESA_INFO vesa_info;
|
||||
VESA_MODE_INFO mode_info;
|
||||
RM_REGS r;
|
||||
|
@ -422,12 +322,10 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
int c, i;
|
||||
|
||||
/* fetch the VESA info block */
|
||||
seg = allocate_dos_memory(sizeof(VESA_INFO)+SAFETY_BUFFER, &sel);
|
||||
if (seg < 0)
|
||||
return -1;
|
||||
seg = allocate_dos_memory(sizeof(VESA_INFO) + SAFETY_BUFFER, &sel);
|
||||
if (seg < 0) return -1;
|
||||
|
||||
for (c=0; c<(int)sizeof(VESA_INFO); c++)
|
||||
_farpokeb(sel, c, 0);
|
||||
for (c = 0; c < (int)sizeof(VESA_INFO); c++) _farpokeb(sel, c, 0);
|
||||
|
||||
_farpokeb(sel, 0, 'V');
|
||||
_farpokeb(sel, 1, 'B');
|
||||
|
@ -443,7 +341,7 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
return -1;
|
||||
}
|
||||
|
||||
for (c=0; c<(int)sizeof(VESA_INFO); c++)
|
||||
for (c = 0; c < (int)sizeof(VESA_INFO); c++)
|
||||
((char *)&vesa_info)[c] = _farpeekb(sel, c);
|
||||
|
||||
free_dos_memory(sel);
|
||||
|
@ -456,12 +354,10 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
|
||||
*vram_size = vesa_info.TotalMemory << 16;
|
||||
|
||||
if (linear_addr)
|
||||
*linear_addr = 0;
|
||||
if (linear_addr) *linear_addr = 0;
|
||||
|
||||
sel = allocate_selector(0, 1024*1024);
|
||||
if (sel < 0)
|
||||
return -1;
|
||||
sel = allocate_selector(0, 1024 * 1024);
|
||||
if (sel < 0) return -1;
|
||||
|
||||
/* read the mode list */
|
||||
mode_ptr = RM_TO_LINEAR(vesa_info.VideoModePtr);
|
||||
|
@ -470,20 +366,17 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
while ((mode_list[num_modes] = _farpeekw(sel, mode_ptr)) != 0xFFFF) {
|
||||
num_modes++;
|
||||
mode_ptr += 2;
|
||||
if (num_modes >= MAX_VESA_MODES)
|
||||
break;
|
||||
if (num_modes >= MAX_VESA_MODES) break;
|
||||
}
|
||||
|
||||
free_selector(sel);
|
||||
|
||||
seg = allocate_dos_memory(sizeof(VESA_MODE_INFO)+SAFETY_BUFFER, &sel);
|
||||
if (seg < 0)
|
||||
return -1;
|
||||
seg = allocate_dos_memory(sizeof(VESA_MODE_INFO) + SAFETY_BUFFER, &sel);
|
||||
if (seg < 0) return -1;
|
||||
|
||||
/* fetch info about each supported mode */
|
||||
for (c=0; c<num_modes; c++) {
|
||||
for (i=0; i<(int)sizeof(VESA_MODE_INFO); i++)
|
||||
_farpokeb(sel, i, 0);
|
||||
for (c = 0; c < num_modes; c++) {
|
||||
for (i = 0; i < (int)sizeof(VESA_MODE_INFO); i++) _farpokeb(sel, i, 0);
|
||||
|
||||
r.x.ax = 0x4F01;
|
||||
r.x.di = 0;
|
||||
|
@ -492,52 +385,58 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
rm_int(0x10, &r);
|
||||
|
||||
if (r.h.ah == 0) {
|
||||
for (i=0; i<(int)sizeof(VESA_MODE_INFO); i++)
|
||||
for (i = 0; i < (int)sizeof(VESA_MODE_INFO); i++)
|
||||
((char *)&mode_info)[i] = _farpeekb(sel, i);
|
||||
|
||||
if ((mode_info.ModeAttributes & 25) == 25) {
|
||||
/* bodge for VESA drivers that report wrong values */
|
||||
if ((mode_info.BitsPerPixel == 16) && (mode_info.ReservedMaskSize == 1))
|
||||
if ((mode_info.BitsPerPixel == 16) &&
|
||||
(mode_info.ReservedMaskSize == 1))
|
||||
mode_info.BitsPerPixel = 15;
|
||||
|
||||
if (mode_info.ModeAttributes & 128) {
|
||||
/* linear framebuffer mode */
|
||||
if (linear_addr)
|
||||
*linear_addr = mode_info.PhysBasePtr;
|
||||
if (linear_addr) *linear_addr = mode_info.PhysBasePtr;
|
||||
|
||||
if (vesa_info.VESAVersion >= 0x300) {
|
||||
if (callback) {
|
||||
callback(mode_list[c], TRUE,
|
||||
mode_info.XResolution, mode_info.YResolution,
|
||||
mode_info.BitsPerPixel, mode_info.LinBytesPerScanLine,
|
||||
mode_info.LinRedMaskSize, mode_info.LinRedFieldPos,
|
||||
mode_info.LinGreenMaskSize, mode_info.LinGreenFieldPos,
|
||||
mode_info.LinBlueMaskSize, mode_info.LinBlueFieldPos,
|
||||
mode_info.LinRsvdMaskSize, mode_info.LinRsvdFieldPos);
|
||||
callback(mode_list[c], TRUE, mode_info.XResolution,
|
||||
mode_info.YResolution,
|
||||
mode_info.BitsPerPixel,
|
||||
mode_info.LinBytesPerScanLine,
|
||||
mode_info.LinRedMaskSize,
|
||||
mode_info.LinRedFieldPos,
|
||||
mode_info.LinGreenMaskSize,
|
||||
mode_info.LinGreenFieldPos,
|
||||
mode_info.LinBlueMaskSize,
|
||||
mode_info.LinBlueFieldPos,
|
||||
mode_info.LinRsvdMaskSize,
|
||||
mode_info.LinRsvdFieldPos);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (callback) {
|
||||
callback(mode_list[c], TRUE,
|
||||
mode_info.XResolution, mode_info.YResolution,
|
||||
mode_info.BitsPerPixel, mode_info.BytesPerScanLine,
|
||||
callback(
|
||||
mode_list[c], TRUE, mode_info.XResolution,
|
||||
mode_info.YResolution, mode_info.BitsPerPixel,
|
||||
mode_info.BytesPerScanLine,
|
||||
mode_info.RedMaskSize, mode_info.RedMaskPos,
|
||||
mode_info.GreenMaskSize, mode_info.GreenMaskPos,
|
||||
mode_info.BlueMaskSize, mode_info.BlueMaskPos,
|
||||
mode_info.ReservedMaskSize, mode_info.ReservedMaskPos);
|
||||
mode_info.ReservedMaskSize,
|
||||
mode_info.ReservedMaskPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
/* banked mode */
|
||||
if (callback) {
|
||||
callback(mode_list[c], FALSE,
|
||||
mode_info.XResolution, mode_info.YResolution,
|
||||
mode_info.BitsPerPixel, mode_info.BytesPerScanLine,
|
||||
mode_info.RedMaskSize, mode_info.RedMaskPos,
|
||||
mode_info.GreenMaskSize, mode_info.GreenMaskPos,
|
||||
mode_info.BlueMaskSize, mode_info.BlueMaskPos,
|
||||
mode_info.ReservedMaskSize, mode_info.ReservedMaskPos);
|
||||
callback(
|
||||
mode_list[c], FALSE, mode_info.XResolution,
|
||||
mode_info.YResolution, mode_info.BitsPerPixel,
|
||||
mode_info.BytesPerScanLine, mode_info.RedMaskSize,
|
||||
mode_info.RedMaskPos, mode_info.GreenMaskSize,
|
||||
mode_info.GreenMaskPos, mode_info.BlueMaskSize,
|
||||
mode_info.BlueMaskPos, mode_info.ReservedMaskSize,
|
||||
mode_info.ReservedMaskPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -549,8 +448,6 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FindPCIDevice:
|
||||
* Replacement for the INT 1A - PCI BIOS v2.0c+ - FIND PCI DEVICE, AX = B102h
|
||||
*
|
||||
|
@ -563,18 +460,16 @@ int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(i
|
|||
*
|
||||
* Return: 1 if found 0 if not found.
|
||||
*/
|
||||
int FindPCIDevice(int deviceID, int vendorID, int deviceIndex, int *handle)
|
||||
{
|
||||
int FindPCIDevice(int deviceID, int vendorID, int deviceIndex, int *handle) {
|
||||
int model, vendor, card, device;
|
||||
unsigned value, full_id, bus, busMax;
|
||||
|
||||
deviceIndex <<= 8;
|
||||
|
||||
/* for each PCI bus */
|
||||
for (bus=0, busMax=0x10000; bus<busMax; bus+=0x10000) {
|
||||
|
||||
for (bus = 0, busMax = 0x10000; bus < busMax; bus += 0x10000) {
|
||||
/* for each hardware device */
|
||||
for (device=0, card=0; card<32; card++, device+=0x800) {
|
||||
for (device = 0, card = 0; card < 32; card++, device += 0x800) {
|
||||
value = PCIEnable | bus | deviceIndex | device;
|
||||
outportl(PCIConfigurationAddress, value);
|
||||
full_id = inportl(PCIConfigurationData);
|
||||
|
@ -593,7 +488,8 @@ int FindPCIDevice(int deviceID, int vendorID, int deviceIndex, int *handle)
|
|||
/* is it a bridge to a secondary bus? */
|
||||
outportl(PCIConfigurationAddress, value | 8);
|
||||
|
||||
if (((inportl(PCIConfigurationData) >> 16) == 0x0600) || (full_id==0x00011011))
|
||||
if (((inportl(PCIConfigurationData) >> 16) == 0x0600) ||
|
||||
(full_id == 0x00011011))
|
||||
busMax += 0x10000;
|
||||
}
|
||||
}
|
||||
|
@ -602,14 +498,11 @@ int FindPCIDevice(int deviceID, int vendorID, int deviceIndex, int *handle)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* fixup_feature_list:
|
||||
* Helper for the FAF_CFG_FEATURES extension, for blanking out any
|
||||
* accelerated drawing routines that the install program has disabled.
|
||||
*/
|
||||
void fixup_feature_list(AF_DRIVER *af, unsigned long flags)
|
||||
{
|
||||
void fixup_feature_list(AF_DRIVER *af, unsigned long flags) {
|
||||
if (!(flags & fafHWCursor)) {
|
||||
af->Attributes &= ~afHaveHWCursor;
|
||||
|
||||
|
@ -645,5 +538,3 @@ void fixup_feature_list(AF_DRIVER *af, unsigned long flags)
|
|||
if (!(flags & fafSrcTransBltLin)) af->SrcTransBltLin = NULL;
|
||||
if (!(flags & fafSrcTransBltBM)) af->SrcTransBltBM = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
602
mach64/driver.c
602
mach64/driver.c
File diff suppressed because it is too large
Load Diff
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
5
makefile
5
makefile
|
@ -31,7 +31,7 @@ CFLAGS = -O3 -m486 -fomit-frame-pointer -Wall -Werror
|
|||
endif
|
||||
endif
|
||||
|
||||
.PHONY: dummy drivers install all docs clean
|
||||
.PHONY: dummy drivers install all docs clean format
|
||||
|
||||
.PRECIOUS: %.o drvgen.exe
|
||||
|
||||
|
@ -93,6 +93,9 @@ freebe.txt: freebe._tx
|
|||
readme.txt: freebe._tx
|
||||
makedoc -part -ascii readme.txt freebe._tx
|
||||
|
||||
format:
|
||||
find . \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i -style=file
|
||||
|
||||
clean:
|
||||
-rm -rv *.o */*.o *.d */*.d *.exe */*.exe *.dat */*.drv freebe.html freebe.txt readme.txt
|
||||
|
||||
|
|
1070
matrox/driver.c
1070
matrox/driver.c
File diff suppressed because it is too large
Load Diff
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
1134
nvidia/driver.c
1134
nvidia/driver.c
File diff suppressed because it is too large
Load Diff
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
830
nvidia/font.h
830
nvidia/font.h
|
@ -11,361 +11,481 @@
|
|||
* so I guess the copyright isn't a problem. I'm just using your data to
|
||||
* save me the bother of having to grab my own. */
|
||||
|
||||
unsigned char VGA8x16Font[256*16]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7E,0x81,0xA5,0x81,0x81,0xBD,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7E,0xFF,0xDB,0xFF,0xFF,0xC3,0xE7,0xFF,0xFF,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x6C,0xFE,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x3C,0x3C,0xE7,0xE7,0xE7,0x99,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x3C,0x7E,0xFF,0xFF,0x7E,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00,0x00,0x00,0x00,0x00,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0x00,0x00,0x1E,0x0E,0x1A,0x32,0x78,0xCC,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3F,0x33,0x3F,0x30,0x30,0x30,0x30,0x70,0xF0,0xE0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7F,0x63,0x7F,0x63,0x63,0x63,0x63,0x67,0xE7,0xE6,0xC0,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x18,0xDB,0x3C,0xE7,0x3C,0xDB,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFE,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,
|
||||
0x00,0x02,0x06,0x0E,0x1E,0x3E,0xFE,0x3E,0x1E,0x0E,0x06,0x02,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7F,0xDB,0xDB,0xDB,0x7B,0x1B,0x1B,0x1B,0x1B,0x1B,0x00,0x00,0x00,0x00,
|
||||
0x00,0x7C,0xC6,0x60,0x38,0x6C,0xC6,0xC6,0x6C,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0xFE,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x7E,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0xFE,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xFE,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xFF,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x63,0x63,0x63,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0xFF,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xD6,0xD6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x0E,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xE6,0x66,0x6C,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC3,0xE7,0xFF,0xDB,0xDB,0xC3,0xC3,0xC3,0xC3,0xC3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,0x00,
|
||||
0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFF,0xDB,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x6C,0x6C,0x38,0x38,0x6C,0x6C,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFF,0xC3,0x83,0x06,0x0C,0x18,0x30,0x61,0xC3,0xFF,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3E,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x3E,0x00,0x00,0x00,0x00,
|
||||
0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,
|
||||
0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0xDC,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,0x00,
|
||||
0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00,
|
||||
0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xE6,0xFF,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x62,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x0C,0x06,0x7C,0x00,0x00,
|
||||
0x00,0x00,0xCC,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0C,0x18,0x30,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6C,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xCC,0xCC,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x38,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x0C,0x06,0x3C,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x3C,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0xC6,0xC6,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x38,0x6C,0x38,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x18,0x30,0x60,0x00,0xFE,0x66,0x60,0x7C,0x60,0x60,0x66,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x6E,0x3B,0x1B,0x7E,0xD8,0xDC,0x77,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3E,0x6C,0xCC,0xCC,0xFE,0xCC,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x30,0x78,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00,
|
||||
0x00,0xC6,0xC6,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0xC6,0xC6,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x18,0x3C,0x66,0x60,0x60,0x60,0x66,0x3C,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xE6,0xFC,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC3,0x66,0x3C,0x18,0x7E,0x18,0x7E,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0xFC,0x66,0x66,0x7C,0x62,0x66,0x6F,0x66,0x66,0x66,0xF3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0E,0x1B,0x18,0x18,0x18,0x7E,0x18,0x18,0x18,0x18,0x18,0xD8,0x70,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0C,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x76,0xDC,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x76,0xDC,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x3C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xC0,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x60,0xCE,0x93,0x06,0x0C,0x1F,0x00,0x00,
|
||||
0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x66,0xCE,0x9A,0x3F,0x06,0x0F,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3C,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x33,0x66,0xCC,0x66,0x33,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xCC,0x66,0x33,0x66,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,
|
||||
0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,
|
||||
0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x3F,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
|
||||
0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0xD8,0xD8,0xD8,0xDC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xDC,0xC6,0xC3,0xC3,0xC3,0xCE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0xC6,0xC6,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x80,0xFE,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0xFE,0xC6,0x60,0x30,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7E,0xD8,0xD8,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xC0,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x76,0xDC,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7E,0x18,0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x6C,0x6C,0x6C,0xEE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1E,0x30,0x18,0x0C,0x3E,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7E,0xDB,0xDB,0xDB,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x03,0x06,0x7E,0xCF,0xDB,0xF3,0x7E,0x60,0xC0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1C,0x30,0x60,0x60,0x7C,0x60,0x60,0x60,0x30,0x1C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0xFF,0x18,0x18,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0xFF,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0xEC,0x6C,0x6C,0x3C,0x1C,0x00,0x00,0x00,0x00,
|
||||
0x00,0xD8,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x70,0x98,0x30,0x60,0xC8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
unsigned char VGA8x16Font[256 * 16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81, 0x81, 0xBD,
|
||||
0x99, 0x81, 0x81, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF,
|
||||
0xDB, 0xFF, 0xFF, 0xC3, 0xE7, 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x6C, 0xFE, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7C, 0xFE,
|
||||
0x7C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
||||
0x3C, 0x3C, 0xE7, 0xE7, 0xE7, 0x99, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x7E, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C,
|
||||
0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x99, 0xBD,
|
||||
0xBD, 0x99, 0xC3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x1E, 0x0E,
|
||||
0x1A, 0x32, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x30,
|
||||
0x30, 0x70, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x63,
|
||||
0x7F, 0x63, 0x63, 0x63, 0x63, 0x67, 0xE7, 0xE6, 0xC0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x18, 0x18, 0xDB, 0x3C, 0xE7, 0x3C, 0xDB, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFE, 0xF8,
|
||||
0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0E,
|
||||
0x1E, 0x3E, 0xFE, 0x3E, 0x1E, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
|
||||
0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xDB,
|
||||
0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7C, 0xC6, 0x60, 0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x38, 0x0C, 0xC6,
|
||||
0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C,
|
||||
0x7E, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7C, 0x7C, 0xFE, 0xFE, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x7C, 0x7C,
|
||||
0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x63, 0x63, 0x22, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C,
|
||||
0x6C, 0xFE, 0x6C, 0x6C, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x18, 0x7C, 0xC6, 0xC2, 0xC0, 0x7C, 0x06, 0x86, 0xC6, 0x7C, 0x18,
|
||||
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xC6, 0x0C, 0x18,
|
||||
0x30, 0x60, 0xC6, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C,
|
||||
0x6C, 0x38, 0x76, 0xDC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xFF,
|
||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x02, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xD6, 0xD6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6,
|
||||
0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0x06, 0x06, 0x3C, 0x06, 0x06, 0x06, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x1C, 0x3C, 0x6C, 0xCC, 0xFE,
|
||||
0x0C, 0x0C, 0x0C, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC0,
|
||||
0xC0, 0xC0, 0xFC, 0x0E, 0x06, 0x06, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x60, 0xC0, 0xC0, 0xFC, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC6, 0x06, 0x06, 0x0C, 0x18,
|
||||
0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6,
|
||||
0xC6, 0xC6, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x06, 0x06, 0x0C, 0x78,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
|
||||
0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00,
|
||||
0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
|
||||
0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0x0C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xDE, 0xDE,
|
||||
0xDE, 0xDC, 0xC0, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38,
|
||||
0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x66, 0x66, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC2, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x6C,
|
||||
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68,
|
||||
0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66,
|
||||
0xC2, 0xC0, 0xC0, 0xDE, 0xC6, 0xC6, 0x66, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0C,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xE6, 0x66, 0x6C, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0x66, 0xE6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x60, 0x62, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0xE7,
|
||||
0xFF, 0xDB, 0xDB, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x66,
|
||||
0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xDE, 0x7C,
|
||||
0x0C, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x6C,
|
||||
0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6,
|
||||
0xC6, 0x60, 0x38, 0x0C, 0x06, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xDB, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xDB, 0xDB, 0xFF, 0x66, 0x66,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x6C, 0x6C, 0x38, 0x38,
|
||||
0x6C, 0x6C, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66,
|
||||
0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xC3, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x61, 0xC3, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x30, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x3E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00,
|
||||
0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x60,
|
||||
0x60, 0x78, 0x6C, 0x66, 0x66, 0x66, 0x66, 0xDC, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC0, 0xC0, 0xC0, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x0C, 0x0C, 0x3C, 0x6C, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xF0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xCC, 0x78, 0x00, 0x00, 0x00, 0xE0, 0x60,
|
||||
0x60, 0x6C, 0x76, 0x66, 0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0E, 0x06, 0x06,
|
||||
0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0xE0, 0x60,
|
||||
0x60, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0xDB,
|
||||
0xDB, 0xDB, 0xDB, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x66, 0x66,
|
||||
0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x76, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0x0C, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x76, 0x62, 0x60, 0x60, 0x60, 0xF0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0x60,
|
||||
0x38, 0x0C, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30,
|
||||
0x30, 0xFC, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66,
|
||||
0x66, 0x66, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC3, 0xC3, 0xC3, 0xDB, 0xDB, 0xFF, 0x66, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0x6C, 0x38, 0x38, 0x38, 0x6C, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFE, 0xCC, 0x18, 0x30, 0x60, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0E, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18,
|
||||
0x18, 0x18, 0x0E, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6,
|
||||
0xC6, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66,
|
||||
0xC2, 0xC0, 0xC0, 0xC0, 0xC2, 0x66, 0x3C, 0x0C, 0x06, 0x7C, 0x00, 0x00,
|
||||
0x00, 0x00, 0xCC, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x00, 0x7C, 0xC6, 0xFE,
|
||||
0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C,
|
||||
0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xCC, 0xCC, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x38,
|
||||
0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x60, 0x66, 0x3C, 0x0C, 0x06,
|
||||
0x3C, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xFE,
|
||||
0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6,
|
||||
0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x60, 0x30, 0x18, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x66,
|
||||
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x10, 0x38, 0x6C, 0xC6, 0xC6,
|
||||
0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x38, 0x00,
|
||||
0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x30, 0x60, 0x00, 0xFE, 0x66, 0x60, 0x7C, 0x60, 0x60, 0x66, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x3B, 0x1B,
|
||||
0x7E, 0xD8, 0xDC, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x6C,
|
||||
0xCC, 0xCC, 0xFE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x00, 0x7C, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18,
|
||||
0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x78, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xCC, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6,
|
||||
0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0x78, 0x00,
|
||||
0x00, 0xC6, 0xC6, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0xC6, 0x6C, 0x38,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x00, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C,
|
||||
0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xE6, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x66, 0x3C, 0x18, 0x7E, 0x18,
|
||||
0x7E, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x66, 0x66,
|
||||
0x7C, 0x62, 0x66, 0x6F, 0x66, 0x66, 0x66, 0xF3, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0E, 0x1B, 0x18, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0xD8, 0x70, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30,
|
||||
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x30, 0x60, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xCC, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC,
|
||||
0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00,
|
||||
0x76, 0xDC, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x6C,
|
||||
0x38, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xC0, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFE, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30, 0x60, 0xCE, 0x93, 0x06,
|
||||
0x0C, 0x1F, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30,
|
||||
0x66, 0xCE, 0x9A, 0x3F, 0x06, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
|
||||
0x00, 0x18, 0x18, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x66, 0x33,
|
||||
0x66, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x44, 0x11, 0x44,
|
||||
0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44,
|
||||
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA,
|
||||
0x55, 0xAA, 0x55, 0xAA, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77,
|
||||
0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0xF8,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x06, 0xF6,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x76, 0xDC, 0xD8, 0xD8, 0xD8, 0xDC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xDC, 0xC6, 0xC3, 0xC3, 0xC3, 0xCE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC6, 0xC6, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFE, 0xC6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xC6, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xD8, 0xD8,
|
||||
0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x66, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xC0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x18, 0x3C, 0x66, 0x66,
|
||||
0x66, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x6C, 0x6C, 0x6C, 0xEE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x30, 0x18, 0x0C, 0x3E, 0x66,
|
||||
0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7E, 0xDB, 0xDB, 0xDB, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x06, 0x7E, 0xCF, 0xDB, 0xF3, 0x7E, 0x60, 0xC0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x30, 0x60, 0x60, 0x7C, 0x60,
|
||||
0x60, 0x60, 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C,
|
||||
0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xFF, 0x18,
|
||||
0x18, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
|
||||
0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, 0x7E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0xFF, 0x00, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x00,
|
||||
0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x6C,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0C, 0x0C,
|
||||
0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x6C, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xD8, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x98, 0x30, 0x60, 0xC8, 0xF8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
unsigned char DefaultTXTPalette[768]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x2A,0x00,0x2A,0x00,0x00,0x2A,0x2A,0x2A,0x00,0x00,0x2A,
|
||||
0x00,0x2A,0x2A,0x2A,0x00,0x2A,0x2A,0x2A,0x00,0x00,0x15,0x00,0x00,0x3F,0x00,0x2A,
|
||||
0x15,0x00,0x2A,0x3F,0x2A,0x00,0x15,0x2A,0x00,0x3F,0x2A,0x2A,0x15,0x2A,0x2A,0x3F,
|
||||
0x00,0x15,0x00,0x00,0x15,0x2A,0x00,0x3F,0x00,0x00,0x3F,0x2A,0x2A,0x15,0x00,0x2A,
|
||||
0x15,0x2A,0x2A,0x3F,0x00,0x2A,0x3F,0x2A,0x00,0x15,0x15,0x00,0x15,0x3F,0x00,0x3F,
|
||||
0x15,0x00,0x3F,0x3F,0x2A,0x15,0x15,0x2A,0x15,0x3F,0x2A,0x3F,0x15,0x2A,0x3F,0x3F,
|
||||
0x15,0x00,0x00,0x15,0x00,0x2A,0x15,0x2A,0x00,0x15,0x2A,0x2A,0x3F,0x00,0x00,0x3F,
|
||||
0x00,0x2A,0x3F,0x2A,0x00,0x3F,0x2A,0x2A,0x15,0x00,0x15,0x15,0x00,0x3F,0x15,0x2A,
|
||||
0x15,0x15,0x2A,0x3F,0x3F,0x00,0x15,0x3F,0x00,0x3F,0x3F,0x2A,0x15,0x3F,0x2A,0x3F,
|
||||
0x15,0x15,0x00,0x15,0x15,0x2A,0x15,0x3F,0x00,0x15,0x3F,0x2A,0x3F,0x15,0x00,0x3F,
|
||||
0x15,0x2A,0x3F,0x3F,0x00,0x3F,0x3F,0x2A,0x15,0x15,0x15,0x15,0x15,0x3F,0x15,0x3F,
|
||||
0x15,0x15,0x3F,0x3F,0x3F,0x15,0x15,0x3F,0x15,0x3F,0x3F,0x3F,0x15,0x3F,0x3F,0x3F,
|
||||
0x3F,0x1F,0x1F,0x3F,0x27,0x1F,0x3F,0x2F,0x1F,0x3F,0x37,0x1F,0x3F,0x3F,0x1F,0x37,
|
||||
0x3F,0x1F,0x2F,0x3F,0x1F,0x27,0x3F,0x1F,0x1F,0x3F,0x1F,0x1F,0x3F,0x27,0x1F,0x3F,
|
||||
0x2F,0x1F,0x3F,0x37,0x1F,0x3F,0x3F,0x1F,0x37,0x3F,0x1F,0x2F,0x3F,0x1F,0x27,0x3F,
|
||||
0x2D,0x2D,0x3F,0x31,0x2D,0x3F,0x36,0x2D,0x3F,0x3A,0x2D,0x3F,0x3F,0x2D,0x3F,0x3F,
|
||||
0x2D,0x3A,0x3F,0x2D,0x36,0x3F,0x2D,0x31,0x3F,0x2D,0x2D,0x3F,0x31,0x2D,0x3F,0x36,
|
||||
0x2D,0x3F,0x3A,0x2D,0x3F,0x3F,0x2D,0x3A,0x3F,0x2D,0x36,0x3F,0x2D,0x31,0x3F,0x2D,
|
||||
0x2D,0x3F,0x2D,0x2D,0x3F,0x31,0x2D,0x3F,0x36,0x2D,0x3F,0x3A,0x2D,0x3F,0x3F,0x2D,
|
||||
0x3A,0x3F,0x2D,0x36,0x3F,0x2D,0x31,0x3F,0x00,0x00,0x1C,0x07,0x00,0x1C,0x0E,0x00,
|
||||
0x1C,0x15,0x00,0x1C,0x1C,0x00,0x1C,0x1C,0x00,0x15,0x1C,0x00,0x0E,0x1C,0x00,0x07,
|
||||
0x1C,0x00,0x00,0x1C,0x07,0x00,0x1C,0x0E,0x00,0x1C,0x15,0x00,0x1C,0x1C,0x00,0x15,
|
||||
0x1C,0x00,0x0E,0x1C,0x00,0x07,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x07,0x00,0x1C,
|
||||
0x0E,0x00,0x1C,0x15,0x00,0x1C,0x1C,0x00,0x15,0x1C,0x00,0x0E,0x1C,0x00,0x07,0x1C,
|
||||
0x0E,0x0E,0x1C,0x11,0x0E,0x1C,0x15,0x0E,0x1C,0x18,0x0E,0x1C,0x1C,0x0E,0x1C,0x1C,
|
||||
0x0E,0x18,0x1C,0x0E,0x15,0x1C,0x0E,0x11,0x1C,0x0E,0x0E,0x1C,0x11,0x0E,0x1C,0x15,
|
||||
0x0E,0x1C,0x18,0x0E,0x1C,0x1C,0x0E,0x18,0x1C,0x0E,0x15,0x1C,0x0E,0x11,0x1C,0x0E,
|
||||
0x0E,0x1C,0x0E,0x0E,0x1C,0x11,0x0E,0x1C,0x15,0x0E,0x1C,0x18,0x0E,0x1C,0x1C,0x0E,
|
||||
0x18,0x1C,0x0E,0x15,0x1C,0x0E,0x11,0x1C,0x14,0x14,0x1C,0x16,0x14,0x1C,0x18,0x14,
|
||||
0x1C,0x1A,0x14,0x1C,0x1C,0x14,0x1C,0x1C,0x14,0x1A,0x1C,0x14,0x18,0x1C,0x14,0x16,
|
||||
0x1C,0x14,0x14,0x1C,0x16,0x14,0x1C,0x18,0x14,0x1C,0x1A,0x14,0x1C,0x1C,0x14,0x1A,
|
||||
0x1C,0x14,0x18,0x1C,0x14,0x16,0x1C,0x14,0x14,0x1C,0x14,0x14,0x1C,0x16,0x14,0x1C,
|
||||
0x18,0x14,0x1C,0x1A,0x14,0x1C,0x1C,0x14,0x1A,0x1C,0x14,0x18,0x1C,0x14,0x16,0x1C,
|
||||
0x00,0x00,0x10,0x04,0x00,0x10,0x08,0x00,0x10,0x0C,0x00,0x10,0x10,0x00,0x10,0x10,
|
||||
0x00,0x0C,0x10,0x00,0x08,0x10,0x00,0x04,0x10,0x00,0x00,0x10,0x04,0x00,0x10,0x08,
|
||||
0x00,0x10,0x0C,0x00,0x10,0x10,0x00,0x0C,0x10,0x00,0x08,0x10,0x00,0x04,0x10,0x00,
|
||||
0x00,0x10,0x00,0x00,0x10,0x04,0x00,0x10,0x08,0x00,0x10,0x0C,0x00,0x10,0x10,0x00,
|
||||
0x0C,0x10,0x00,0x08,0x10,0x00,0x04,0x10,0x08,0x08,0x10,0x0A,0x08,0x10,0x0C,0x08,
|
||||
0x10,0x0E,0x08,0x10,0x10,0x08,0x10,0x10,0x08,0x0E,0x10,0x08,0x0C,0x10,0x08,0x0A,
|
||||
0x10,0x08,0x08,0x10,0x0A,0x08,0x10,0x0C,0x08,0x10,0x0E,0x08,0x10,0x10,0x08,0x0E,
|
||||
0x10,0x08,0x0C,0x10,0x08,0x0A,0x10,0x08,0x08,0x10,0x08,0x08,0x10,0x0A,0x08,0x10,
|
||||
0x0C,0x08,0x10,0x0E,0x08,0x10,0x10,0x08,0x0E,0x10,0x08,0x0C,0x10,0x08,0x0A,0x10,
|
||||
0x0B,0x0B,0x10,0x0C,0x0B,0x10,0x0D,0x0B,0x10,0x0F,0x0B,0x10,0x10,0x0B,0x10,0x10,
|
||||
0x0B,0x0F,0x10,0x0B,0x0D,0x10,0x0B,0x0C,0x10,0x0B,0x0B,0x10,0x0C,0x0B,0x10,0x0D,
|
||||
0x0B,0x10,0x0F,0x0B,0x10,0x10,0x0B,0x0F,0x10,0x0B,0x0D,0x10,0x0B,0x0C,0x10,0x0B,
|
||||
0x0B,0x10,0x0B,0x0B,0x10,0x0C,0x0B,0x10,0x0D,0x0B,0x10,0x0F,0x0B,0x10,0x10,0x0B,
|
||||
0x0F,0x10,0x0B,0x0D,0x10,0x0B,0x0C,0x10,0x03,0x00,0x0F,0x02,0x00,0x0C,0x02,0x00,
|
||||
0x09,0x01,0x00,0x07,0x01,0x00,0x04,0x00,0x00,0x02,0x00,0x00,0x00,0x3F,0x3F,0x3F};
|
||||
unsigned char DefaultTXTPalette[768] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x00, 0x00, 0x2A, 0x2A,
|
||||
0x2A, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x2A, 0x2A, 0x00, 0x2A, 0x2A, 0x2A,
|
||||
0x00, 0x00, 0x15, 0x00, 0x00, 0x3F, 0x00, 0x2A, 0x15, 0x00, 0x2A, 0x3F,
|
||||
0x2A, 0x00, 0x15, 0x2A, 0x00, 0x3F, 0x2A, 0x2A, 0x15, 0x2A, 0x2A, 0x3F,
|
||||
0x00, 0x15, 0x00, 0x00, 0x15, 0x2A, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x2A,
|
||||
0x2A, 0x15, 0x00, 0x2A, 0x15, 0x2A, 0x2A, 0x3F, 0x00, 0x2A, 0x3F, 0x2A,
|
||||
0x00, 0x15, 0x15, 0x00, 0x15, 0x3F, 0x00, 0x3F, 0x15, 0x00, 0x3F, 0x3F,
|
||||
0x2A, 0x15, 0x15, 0x2A, 0x15, 0x3F, 0x2A, 0x3F, 0x15, 0x2A, 0x3F, 0x3F,
|
||||
0x15, 0x00, 0x00, 0x15, 0x00, 0x2A, 0x15, 0x2A, 0x00, 0x15, 0x2A, 0x2A,
|
||||
0x3F, 0x00, 0x00, 0x3F, 0x00, 0x2A, 0x3F, 0x2A, 0x00, 0x3F, 0x2A, 0x2A,
|
||||
0x15, 0x00, 0x15, 0x15, 0x00, 0x3F, 0x15, 0x2A, 0x15, 0x15, 0x2A, 0x3F,
|
||||
0x3F, 0x00, 0x15, 0x3F, 0x00, 0x3F, 0x3F, 0x2A, 0x15, 0x3F, 0x2A, 0x3F,
|
||||
0x15, 0x15, 0x00, 0x15, 0x15, 0x2A, 0x15, 0x3F, 0x00, 0x15, 0x3F, 0x2A,
|
||||
0x3F, 0x15, 0x00, 0x3F, 0x15, 0x2A, 0x3F, 0x3F, 0x00, 0x3F, 0x3F, 0x2A,
|
||||
0x15, 0x15, 0x15, 0x15, 0x15, 0x3F, 0x15, 0x3F, 0x15, 0x15, 0x3F, 0x3F,
|
||||
0x3F, 0x15, 0x15, 0x3F, 0x15, 0x3F, 0x3F, 0x3F, 0x15, 0x3F, 0x3F, 0x3F,
|
||||
0x3F, 0x1F, 0x1F, 0x3F, 0x27, 0x1F, 0x3F, 0x2F, 0x1F, 0x3F, 0x37, 0x1F,
|
||||
0x3F, 0x3F, 0x1F, 0x37, 0x3F, 0x1F, 0x2F, 0x3F, 0x1F, 0x27, 0x3F, 0x1F,
|
||||
0x1F, 0x3F, 0x1F, 0x1F, 0x3F, 0x27, 0x1F, 0x3F, 0x2F, 0x1F, 0x3F, 0x37,
|
||||
0x1F, 0x3F, 0x3F, 0x1F, 0x37, 0x3F, 0x1F, 0x2F, 0x3F, 0x1F, 0x27, 0x3F,
|
||||
0x2D, 0x2D, 0x3F, 0x31, 0x2D, 0x3F, 0x36, 0x2D, 0x3F, 0x3A, 0x2D, 0x3F,
|
||||
0x3F, 0x2D, 0x3F, 0x3F, 0x2D, 0x3A, 0x3F, 0x2D, 0x36, 0x3F, 0x2D, 0x31,
|
||||
0x3F, 0x2D, 0x2D, 0x3F, 0x31, 0x2D, 0x3F, 0x36, 0x2D, 0x3F, 0x3A, 0x2D,
|
||||
0x3F, 0x3F, 0x2D, 0x3A, 0x3F, 0x2D, 0x36, 0x3F, 0x2D, 0x31, 0x3F, 0x2D,
|
||||
0x2D, 0x3F, 0x2D, 0x2D, 0x3F, 0x31, 0x2D, 0x3F, 0x36, 0x2D, 0x3F, 0x3A,
|
||||
0x2D, 0x3F, 0x3F, 0x2D, 0x3A, 0x3F, 0x2D, 0x36, 0x3F, 0x2D, 0x31, 0x3F,
|
||||
0x00, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x0E, 0x00, 0x1C, 0x15, 0x00, 0x1C,
|
||||
0x1C, 0x00, 0x1C, 0x1C, 0x00, 0x15, 0x1C, 0x00, 0x0E, 0x1C, 0x00, 0x07,
|
||||
0x1C, 0x00, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x0E, 0x00, 0x1C, 0x15, 0x00,
|
||||
0x1C, 0x1C, 0x00, 0x15, 0x1C, 0x00, 0x0E, 0x1C, 0x00, 0x07, 0x1C, 0x00,
|
||||
0x00, 0x1C, 0x00, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x0E, 0x00, 0x1C, 0x15,
|
||||
0x00, 0x1C, 0x1C, 0x00, 0x15, 0x1C, 0x00, 0x0E, 0x1C, 0x00, 0x07, 0x1C,
|
||||
0x0E, 0x0E, 0x1C, 0x11, 0x0E, 0x1C, 0x15, 0x0E, 0x1C, 0x18, 0x0E, 0x1C,
|
||||
0x1C, 0x0E, 0x1C, 0x1C, 0x0E, 0x18, 0x1C, 0x0E, 0x15, 0x1C, 0x0E, 0x11,
|
||||
0x1C, 0x0E, 0x0E, 0x1C, 0x11, 0x0E, 0x1C, 0x15, 0x0E, 0x1C, 0x18, 0x0E,
|
||||
0x1C, 0x1C, 0x0E, 0x18, 0x1C, 0x0E, 0x15, 0x1C, 0x0E, 0x11, 0x1C, 0x0E,
|
||||
0x0E, 0x1C, 0x0E, 0x0E, 0x1C, 0x11, 0x0E, 0x1C, 0x15, 0x0E, 0x1C, 0x18,
|
||||
0x0E, 0x1C, 0x1C, 0x0E, 0x18, 0x1C, 0x0E, 0x15, 0x1C, 0x0E, 0x11, 0x1C,
|
||||
0x14, 0x14, 0x1C, 0x16, 0x14, 0x1C, 0x18, 0x14, 0x1C, 0x1A, 0x14, 0x1C,
|
||||
0x1C, 0x14, 0x1C, 0x1C, 0x14, 0x1A, 0x1C, 0x14, 0x18, 0x1C, 0x14, 0x16,
|
||||
0x1C, 0x14, 0x14, 0x1C, 0x16, 0x14, 0x1C, 0x18, 0x14, 0x1C, 0x1A, 0x14,
|
||||
0x1C, 0x1C, 0x14, 0x1A, 0x1C, 0x14, 0x18, 0x1C, 0x14, 0x16, 0x1C, 0x14,
|
||||
0x14, 0x1C, 0x14, 0x14, 0x1C, 0x16, 0x14, 0x1C, 0x18, 0x14, 0x1C, 0x1A,
|
||||
0x14, 0x1C, 0x1C, 0x14, 0x1A, 0x1C, 0x14, 0x18, 0x1C, 0x14, 0x16, 0x1C,
|
||||
0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x08, 0x00, 0x10, 0x0C, 0x00, 0x10,
|
||||
0x10, 0x00, 0x10, 0x10, 0x00, 0x0C, 0x10, 0x00, 0x08, 0x10, 0x00, 0x04,
|
||||
0x10, 0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x08, 0x00, 0x10, 0x0C, 0x00,
|
||||
0x10, 0x10, 0x00, 0x0C, 0x10, 0x00, 0x08, 0x10, 0x00, 0x04, 0x10, 0x00,
|
||||
0x00, 0x10, 0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x08, 0x00, 0x10, 0x0C,
|
||||
0x00, 0x10, 0x10, 0x00, 0x0C, 0x10, 0x00, 0x08, 0x10, 0x00, 0x04, 0x10,
|
||||
0x08, 0x08, 0x10, 0x0A, 0x08, 0x10, 0x0C, 0x08, 0x10, 0x0E, 0x08, 0x10,
|
||||
0x10, 0x08, 0x10, 0x10, 0x08, 0x0E, 0x10, 0x08, 0x0C, 0x10, 0x08, 0x0A,
|
||||
0x10, 0x08, 0x08, 0x10, 0x0A, 0x08, 0x10, 0x0C, 0x08, 0x10, 0x0E, 0x08,
|
||||
0x10, 0x10, 0x08, 0x0E, 0x10, 0x08, 0x0C, 0x10, 0x08, 0x0A, 0x10, 0x08,
|
||||
0x08, 0x10, 0x08, 0x08, 0x10, 0x0A, 0x08, 0x10, 0x0C, 0x08, 0x10, 0x0E,
|
||||
0x08, 0x10, 0x10, 0x08, 0x0E, 0x10, 0x08, 0x0C, 0x10, 0x08, 0x0A, 0x10,
|
||||
0x0B, 0x0B, 0x10, 0x0C, 0x0B, 0x10, 0x0D, 0x0B, 0x10, 0x0F, 0x0B, 0x10,
|
||||
0x10, 0x0B, 0x10, 0x10, 0x0B, 0x0F, 0x10, 0x0B, 0x0D, 0x10, 0x0B, 0x0C,
|
||||
0x10, 0x0B, 0x0B, 0x10, 0x0C, 0x0B, 0x10, 0x0D, 0x0B, 0x10, 0x0F, 0x0B,
|
||||
0x10, 0x10, 0x0B, 0x0F, 0x10, 0x0B, 0x0D, 0x10, 0x0B, 0x0C, 0x10, 0x0B,
|
||||
0x0B, 0x10, 0x0B, 0x0B, 0x10, 0x0C, 0x0B, 0x10, 0x0D, 0x0B, 0x10, 0x0F,
|
||||
0x0B, 0x10, 0x10, 0x0B, 0x0F, 0x10, 0x0B, 0x0D, 0x10, 0x0B, 0x0C, 0x10,
|
||||
0x03, 0x00, 0x0F, 0x02, 0x00, 0x0C, 0x02, 0x00, 0x09, 0x01, 0x00, 0x07,
|
||||
0x01, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3F
|
||||
};
|
||||
|
||||
unsigned char DefaultVGAPalette[768]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x2A,0x00,0x2A,0x00,0x00,0x2A,0x2A,0x2A,0x00,0x00,0x2A,
|
||||
0x00,0x2A,0x2A,0x15,0x00,0x2A,0x2A,0x2A,0x15,0x15,0x15,0x15,0x15,0x3F,0x15,0x3F,
|
||||
0x15,0x15,0x3F,0x3F,0x3F,0x15,0x15,0x3F,0x15,0x3F,0x3F,0x3F,0x15,0x3F,0x3F,0x3F,
|
||||
0x00,0x00,0x00,0x05,0x05,0x05,0x08,0x08,0x08,0x0B,0x0B,0x0B,0x0E,0x0E,0x0E,0x11,
|
||||
0x11,0x11,0x14,0x14,0x14,0x18,0x18,0x18,0x1C,0x1C,0x1C,0x20,0x20,0x20,0x24,0x24,
|
||||
0x24,0x28,0x28,0x28,0x2D,0x2D,0x2D,0x32,0x32,0x32,0x38,0x38,0x38,0x3F,0x3F,0x3F,
|
||||
0x00,0x00,0x3F,0x10,0x00,0x3F,0x1F,0x00,0x3F,0x2F,0x00,0x3F,0x3F,0x00,0x3F,0x3F,
|
||||
0x00,0x2F,0x3F,0x00,0x1F,0x3F,0x00,0x10,0x3F,0x00,0x00,0x3F,0x10,0x00,0x3F,0x1F,
|
||||
0x00,0x3F,0x2F,0x00,0x3F,0x3F,0x00,0x2F,0x3F,0x00,0x1F,0x3F,0x00,0x10,0x3F,0x00,
|
||||
0x00,0x3F,0x00,0x00,0x3F,0x10,0x00,0x3F,0x1F,0x00,0x3F,0x2F,0x00,0x3F,0x3F,0x00,
|
||||
0x2F,0x3F,0x00,0x1F,0x3F,0x00,0x10,0x3F,0x1F,0x1F,0x3F,0x27,0x1F,0x3F,0x2F,0x1F,
|
||||
0x3F,0x37,0x1F,0x3F,0x3F,0x1F,0x3F,0x3F,0x1F,0x37,0x3F,0x1F,0x2F,0x3F,0x1F,0x27,
|
||||
0x3F,0x1F,0x1F,0x3F,0x27,0x1F,0x3F,0x2F,0x1F,0x3F,0x37,0x1F,0x3F,0x3F,0x1F,0x37,
|
||||
0x3F,0x1F,0x2F,0x3F,0x1F,0x27,0x3F,0x1F,0x1F,0x3F,0x1F,0x1F,0x3F,0x27,0x1F,0x3F,
|
||||
0x2F,0x1F,0x3F,0x37,0x1F,0x3F,0x3F,0x1F,0x37,0x3F,0x1F,0x2F,0x3F,0x1F,0x27,0x3F,
|
||||
0x2D,0x2D,0x3F,0x31,0x2D,0x3F,0x36,0x2D,0x3F,0x3A,0x2D,0x3F,0x3F,0x2D,0x3F,0x3F,
|
||||
0x2D,0x3A,0x3F,0x2D,0x36,0x3F,0x2D,0x31,0x3F,0x2D,0x2D,0x3F,0x31,0x2D,0x3F,0x36,
|
||||
0x2D,0x3F,0x3A,0x2D,0x3F,0x3F,0x2D,0x3A,0x3F,0x2D,0x36,0x3F,0x2D,0x31,0x3F,0x2D,
|
||||
0x2D,0x3F,0x2D,0x2D,0x3F,0x31,0x2D,0x3F,0x36,0x2D,0x3F,0x3A,0x2D,0x3F,0x3F,0x2D,
|
||||
0x3A,0x3F,0x2D,0x36,0x3F,0x2D,0x31,0x3F,0x00,0x00,0x1C,0x07,0x00,0x1C,0x0E,0x00,
|
||||
0x1C,0x15,0x00,0x1C,0x1C,0x00,0x1C,0x1C,0x00,0x15,0x1C,0x00,0x0E,0x1C,0x00,0x07,
|
||||
0x1C,0x00,0x00,0x1C,0x07,0x00,0x1C,0x0E,0x00,0x1C,0x15,0x00,0x1C,0x1C,0x00,0x15,
|
||||
0x1C,0x00,0x0E,0x1C,0x00,0x07,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x07,0x00,0x1C,
|
||||
0x0E,0x00,0x1C,0x15,0x00,0x1C,0x1C,0x00,0x15,0x1C,0x00,0x0E,0x1C,0x00,0x07,0x1C,
|
||||
0x0E,0x0E,0x1C,0x11,0x0E,0x1C,0x15,0x0E,0x1C,0x18,0x0E,0x1C,0x1C,0x0E,0x1C,0x1C,
|
||||
0x0E,0x18,0x1C,0x0E,0x15,0x1C,0x0E,0x11,0x1C,0x0E,0x0E,0x1C,0x11,0x0E,0x1C,0x15,
|
||||
0x0E,0x1C,0x18,0x0E,0x1C,0x1C,0x0E,0x18,0x1C,0x0E,0x15,0x1C,0x0E,0x11,0x1C,0x0E,
|
||||
0x0E,0x1C,0x0E,0x0E,0x1C,0x11,0x0E,0x1C,0x15,0x0E,0x1C,0x18,0x0E,0x1C,0x1C,0x0E,
|
||||
0x18,0x1C,0x0E,0x15,0x1C,0x0E,0x11,0x1C,0x14,0x14,0x1C,0x16,0x14,0x1C,0x18,0x14,
|
||||
0x1C,0x1A,0x14,0x1C,0x1C,0x14,0x1C,0x1C,0x14,0x1A,0x1C,0x14,0x18,0x1C,0x14,0x16,
|
||||
0x1C,0x14,0x14,0x1C,0x16,0x14,0x1C,0x18,0x14,0x1C,0x1A,0x14,0x1C,0x1C,0x14,0x1A,
|
||||
0x1C,0x14,0x18,0x1C,0x14,0x16,0x1C,0x14,0x14,0x1C,0x14,0x14,0x1C,0x16,0x14,0x1C,
|
||||
0x18,0x14,0x1C,0x1A,0x14,0x1C,0x1C,0x14,0x1A,0x1C,0x14,0x18,0x1C,0x14,0x16,0x1C,
|
||||
0x00,0x00,0x10,0x04,0x00,0x10,0x08,0x00,0x10,0x0C,0x00,0x10,0x10,0x00,0x10,0x10,
|
||||
0x00,0x0C,0x10,0x00,0x08,0x10,0x00,0x04,0x10,0x00,0x00,0x10,0x04,0x00,0x10,0x08,
|
||||
0x00,0x10,0x0C,0x00,0x10,0x10,0x00,0x0C,0x10,0x00,0x08,0x10,0x00,0x04,0x10,0x00,
|
||||
0x00,0x10,0x00,0x00,0x10,0x04,0x00,0x10,0x08,0x00,0x10,0x0C,0x00,0x10,0x10,0x00,
|
||||
0x0C,0x10,0x00,0x08,0x10,0x00,0x04,0x10,0x08,0x08,0x10,0x0A,0x08,0x10,0x0C,0x08,
|
||||
0x10,0x0E,0x08,0x10,0x10,0x08,0x10,0x10,0x08,0x0E,0x10,0x08,0x0C,0x10,0x08,0x0A,
|
||||
0x10,0x08,0x08,0x10,0x0A,0x08,0x10,0x0C,0x08,0x10,0x0E,0x08,0x10,0x10,0x08,0x0E,
|
||||
0x10,0x08,0x0C,0x10,0x08,0x0A,0x10,0x08,0x08,0x10,0x08,0x08,0x10,0x0A,0x08,0x10,
|
||||
0x0C,0x08,0x10,0x0E,0x08,0x10,0x10,0x08,0x0E,0x10,0x08,0x0C,0x10,0x08,0x0A,0x10,
|
||||
0x0B,0x0B,0x10,0x0C,0x0B,0x10,0x0D,0x0B,0x10,0x0F,0x0B,0x10,0x10,0x0B,0x10,0x10,
|
||||
0x0B,0x0F,0x10,0x0B,0x0D,0x10,0x0B,0x0C,0x10,0x0B,0x0B,0x10,0x0C,0x0B,0x10,0x0D,
|
||||
0x0B,0x10,0x0F,0x0B,0x10,0x10,0x0B,0x0F,0x10,0x0B,0x0D,0x10,0x0B,0x0C,0x10,0x0B,
|
||||
0x0B,0x10,0x0B,0x0B,0x10,0x0C,0x0B,0x10,0x0D,0x0B,0x10,0x0F,0x0B,0x10,0x10,0x0B,
|
||||
0x0F,0x10,0x0B,0x0D,0x10,0x0B,0x0C,0x10,0x03,0x00,0x0F,0x02,0x00,0x0C,0x02,0x00,
|
||||
0x09,0x01,0x00,0x07,0x01,0x00,0x04,0x00,0x00,0x02,0x00,0x00,0x00,0x3F,0x3F,0x3F};
|
||||
unsigned char DefaultVGAPalette[768] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x00, 0x00, 0x2A, 0x2A,
|
||||
0x2A, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x2A, 0x15, 0x00, 0x2A, 0x2A, 0x2A,
|
||||
0x15, 0x15, 0x15, 0x15, 0x15, 0x3F, 0x15, 0x3F, 0x15, 0x15, 0x3F, 0x3F,
|
||||
0x3F, 0x15, 0x15, 0x3F, 0x15, 0x3F, 0x3F, 0x3F, 0x15, 0x3F, 0x3F, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x08, 0x08, 0x08, 0x0B, 0x0B, 0x0B,
|
||||
0x0E, 0x0E, 0x0E, 0x11, 0x11, 0x11, 0x14, 0x14, 0x14, 0x18, 0x18, 0x18,
|
||||
0x1C, 0x1C, 0x1C, 0x20, 0x20, 0x20, 0x24, 0x24, 0x24, 0x28, 0x28, 0x28,
|
||||
0x2D, 0x2D, 0x2D, 0x32, 0x32, 0x32, 0x38, 0x38, 0x38, 0x3F, 0x3F, 0x3F,
|
||||
0x00, 0x00, 0x3F, 0x10, 0x00, 0x3F, 0x1F, 0x00, 0x3F, 0x2F, 0x00, 0x3F,
|
||||
0x3F, 0x00, 0x3F, 0x3F, 0x00, 0x2F, 0x3F, 0x00, 0x1F, 0x3F, 0x00, 0x10,
|
||||
0x3F, 0x00, 0x00, 0x3F, 0x10, 0x00, 0x3F, 0x1F, 0x00, 0x3F, 0x2F, 0x00,
|
||||
0x3F, 0x3F, 0x00, 0x2F, 0x3F, 0x00, 0x1F, 0x3F, 0x00, 0x10, 0x3F, 0x00,
|
||||
0x00, 0x3F, 0x00, 0x00, 0x3F, 0x10, 0x00, 0x3F, 0x1F, 0x00, 0x3F, 0x2F,
|
||||
0x00, 0x3F, 0x3F, 0x00, 0x2F, 0x3F, 0x00, 0x1F, 0x3F, 0x00, 0x10, 0x3F,
|
||||
0x1F, 0x1F, 0x3F, 0x27, 0x1F, 0x3F, 0x2F, 0x1F, 0x3F, 0x37, 0x1F, 0x3F,
|
||||
0x3F, 0x1F, 0x3F, 0x3F, 0x1F, 0x37, 0x3F, 0x1F, 0x2F, 0x3F, 0x1F, 0x27,
|
||||
0x3F, 0x1F, 0x1F, 0x3F, 0x27, 0x1F, 0x3F, 0x2F, 0x1F, 0x3F, 0x37, 0x1F,
|
||||
0x3F, 0x3F, 0x1F, 0x37, 0x3F, 0x1F, 0x2F, 0x3F, 0x1F, 0x27, 0x3F, 0x1F,
|
||||
0x1F, 0x3F, 0x1F, 0x1F, 0x3F, 0x27, 0x1F, 0x3F, 0x2F, 0x1F, 0x3F, 0x37,
|
||||
0x1F, 0x3F, 0x3F, 0x1F, 0x37, 0x3F, 0x1F, 0x2F, 0x3F, 0x1F, 0x27, 0x3F,
|
||||
0x2D, 0x2D, 0x3F, 0x31, 0x2D, 0x3F, 0x36, 0x2D, 0x3F, 0x3A, 0x2D, 0x3F,
|
||||
0x3F, 0x2D, 0x3F, 0x3F, 0x2D, 0x3A, 0x3F, 0x2D, 0x36, 0x3F, 0x2D, 0x31,
|
||||
0x3F, 0x2D, 0x2D, 0x3F, 0x31, 0x2D, 0x3F, 0x36, 0x2D, 0x3F, 0x3A, 0x2D,
|
||||
0x3F, 0x3F, 0x2D, 0x3A, 0x3F, 0x2D, 0x36, 0x3F, 0x2D, 0x31, 0x3F, 0x2D,
|
||||
0x2D, 0x3F, 0x2D, 0x2D, 0x3F, 0x31, 0x2D, 0x3F, 0x36, 0x2D, 0x3F, 0x3A,
|
||||
0x2D, 0x3F, 0x3F, 0x2D, 0x3A, 0x3F, 0x2D, 0x36, 0x3F, 0x2D, 0x31, 0x3F,
|
||||
0x00, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x0E, 0x00, 0x1C, 0x15, 0x00, 0x1C,
|
||||
0x1C, 0x00, 0x1C, 0x1C, 0x00, 0x15, 0x1C, 0x00, 0x0E, 0x1C, 0x00, 0x07,
|
||||
0x1C, 0x00, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x0E, 0x00, 0x1C, 0x15, 0x00,
|
||||
0x1C, 0x1C, 0x00, 0x15, 0x1C, 0x00, 0x0E, 0x1C, 0x00, 0x07, 0x1C, 0x00,
|
||||
0x00, 0x1C, 0x00, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x0E, 0x00, 0x1C, 0x15,
|
||||
0x00, 0x1C, 0x1C, 0x00, 0x15, 0x1C, 0x00, 0x0E, 0x1C, 0x00, 0x07, 0x1C,
|
||||
0x0E, 0x0E, 0x1C, 0x11, 0x0E, 0x1C, 0x15, 0x0E, 0x1C, 0x18, 0x0E, 0x1C,
|
||||
0x1C, 0x0E, 0x1C, 0x1C, 0x0E, 0x18, 0x1C, 0x0E, 0x15, 0x1C, 0x0E, 0x11,
|
||||
0x1C, 0x0E, 0x0E, 0x1C, 0x11, 0x0E, 0x1C, 0x15, 0x0E, 0x1C, 0x18, 0x0E,
|
||||
0x1C, 0x1C, 0x0E, 0x18, 0x1C, 0x0E, 0x15, 0x1C, 0x0E, 0x11, 0x1C, 0x0E,
|
||||
0x0E, 0x1C, 0x0E, 0x0E, 0x1C, 0x11, 0x0E, 0x1C, 0x15, 0x0E, 0x1C, 0x18,
|
||||
0x0E, 0x1C, 0x1C, 0x0E, 0x18, 0x1C, 0x0E, 0x15, 0x1C, 0x0E, 0x11, 0x1C,
|
||||
0x14, 0x14, 0x1C, 0x16, 0x14, 0x1C, 0x18, 0x14, 0x1C, 0x1A, 0x14, 0x1C,
|
||||
0x1C, 0x14, 0x1C, 0x1C, 0x14, 0x1A, 0x1C, 0x14, 0x18, 0x1C, 0x14, 0x16,
|
||||
0x1C, 0x14, 0x14, 0x1C, 0x16, 0x14, 0x1C, 0x18, 0x14, 0x1C, 0x1A, 0x14,
|
||||
0x1C, 0x1C, 0x14, 0x1A, 0x1C, 0x14, 0x18, 0x1C, 0x14, 0x16, 0x1C, 0x14,
|
||||
0x14, 0x1C, 0x14, 0x14, 0x1C, 0x16, 0x14, 0x1C, 0x18, 0x14, 0x1C, 0x1A,
|
||||
0x14, 0x1C, 0x1C, 0x14, 0x1A, 0x1C, 0x14, 0x18, 0x1C, 0x14, 0x16, 0x1C,
|
||||
0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x08, 0x00, 0x10, 0x0C, 0x00, 0x10,
|
||||
0x10, 0x00, 0x10, 0x10, 0x00, 0x0C, 0x10, 0x00, 0x08, 0x10, 0x00, 0x04,
|
||||
0x10, 0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x08, 0x00, 0x10, 0x0C, 0x00,
|
||||
0x10, 0x10, 0x00, 0x0C, 0x10, 0x00, 0x08, 0x10, 0x00, 0x04, 0x10, 0x00,
|
||||
0x00, 0x10, 0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x08, 0x00, 0x10, 0x0C,
|
||||
0x00, 0x10, 0x10, 0x00, 0x0C, 0x10, 0x00, 0x08, 0x10, 0x00, 0x04, 0x10,
|
||||
0x08, 0x08, 0x10, 0x0A, 0x08, 0x10, 0x0C, 0x08, 0x10, 0x0E, 0x08, 0x10,
|
||||
0x10, 0x08, 0x10, 0x10, 0x08, 0x0E, 0x10, 0x08, 0x0C, 0x10, 0x08, 0x0A,
|
||||
0x10, 0x08, 0x08, 0x10, 0x0A, 0x08, 0x10, 0x0C, 0x08, 0x10, 0x0E, 0x08,
|
||||
0x10, 0x10, 0x08, 0x0E, 0x10, 0x08, 0x0C, 0x10, 0x08, 0x0A, 0x10, 0x08,
|
||||
0x08, 0x10, 0x08, 0x08, 0x10, 0x0A, 0x08, 0x10, 0x0C, 0x08, 0x10, 0x0E,
|
||||
0x08, 0x10, 0x10, 0x08, 0x0E, 0x10, 0x08, 0x0C, 0x10, 0x08, 0x0A, 0x10,
|
||||
0x0B, 0x0B, 0x10, 0x0C, 0x0B, 0x10, 0x0D, 0x0B, 0x10, 0x0F, 0x0B, 0x10,
|
||||
0x10, 0x0B, 0x10, 0x10, 0x0B, 0x0F, 0x10, 0x0B, 0x0D, 0x10, 0x0B, 0x0C,
|
||||
0x10, 0x0B, 0x0B, 0x10, 0x0C, 0x0B, 0x10, 0x0D, 0x0B, 0x10, 0x0F, 0x0B,
|
||||
0x10, 0x10, 0x0B, 0x0F, 0x10, 0x0B, 0x0D, 0x10, 0x0B, 0x0C, 0x10, 0x0B,
|
||||
0x0B, 0x10, 0x0B, 0x0B, 0x10, 0x0C, 0x0B, 0x10, 0x0D, 0x0B, 0x10, 0x0F,
|
||||
0x0B, 0x10, 0x10, 0x0B, 0x0F, 0x10, 0x0B, 0x0D, 0x10, 0x0B, 0x0C, 0x10,
|
||||
0x03, 0x00, 0x0F, 0x02, 0x00, 0x0C, 0x02, 0x00, 0x09, 0x01, 0x00, 0x07,
|
||||
0x01, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3F
|
||||
};
|
||||
|
|
1115
nvidia/riva_hw.c
1115
nvidia/riva_hw.c
File diff suppressed because it is too large
Load Diff
|
@ -36,7 +36,9 @@
|
|||
|* those rights set forth herein. *|
|
||||
|* *|
|
||||
\***************************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/riva_hw.h,v 1.1.2.2 1998/12/22 16:33:19 hohndel Exp $ */
|
||||
/* $XFree86:
|
||||
* xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/riva_hw.h,v 1.1.2.2
|
||||
* 1998/12/22 16:33:19 hohndel Exp $ */
|
||||
#ifndef __RIVA_HW_H__
|
||||
#define __RIVA_HW_H__
|
||||
#define RIVA_SW_VERSION 0x00010000
|
||||
|
@ -50,8 +52,7 @@
|
|||
/*
|
||||
* Raster OPeration. Windows style ROP3.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop;
|
||||
|
@ -61,8 +62,7 @@ typedef volatile struct
|
|||
/*
|
||||
* 8X8 Monochrome pattern.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop;
|
||||
|
@ -76,8 +76,7 @@ typedef volatile struct
|
|||
/*
|
||||
* Scissor clip rectangle.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop;
|
||||
|
@ -88,8 +87,7 @@ typedef volatile struct
|
|||
/*
|
||||
* 2D filled rectangle.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop[1];
|
||||
|
@ -102,8 +100,7 @@ typedef volatile struct
|
|||
/*
|
||||
* 2D screen-screen BLT.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop;
|
||||
|
@ -115,8 +112,7 @@ typedef volatile struct
|
|||
/*
|
||||
* 2D pixel BLT.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop[1];
|
||||
|
@ -130,34 +126,29 @@ typedef volatile struct
|
|||
/*
|
||||
* Filled rectangle combined with monochrome expand. Useful for glyphs.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop;
|
||||
unsigned reserved01[0x0BB];
|
||||
unsigned reserved03[(0x040)-1];
|
||||
unsigned reserved03[(0x040) - 1];
|
||||
unsigned Color1A;
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
unsigned TopLeft;
|
||||
unsigned WidthHeight;
|
||||
} UnclippedRectangle[64];
|
||||
unsigned reserved04[(0x080)-3];
|
||||
struct
|
||||
{
|
||||
unsigned reserved04[(0x080) - 3];
|
||||
struct {
|
||||
unsigned TopLeft;
|
||||
unsigned BottomRight;
|
||||
} ClipB;
|
||||
unsigned Color1B;
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
unsigned TopLeft;
|
||||
unsigned BottomRight;
|
||||
} ClippedRectangle[64];
|
||||
unsigned reserved05[(0x080)-5];
|
||||
struct
|
||||
{
|
||||
unsigned reserved05[(0x080) - 5];
|
||||
struct {
|
||||
unsigned TopLeft;
|
||||
unsigned BottomRight;
|
||||
} ClipC;
|
||||
|
@ -165,9 +156,8 @@ typedef volatile struct
|
|||
unsigned WidthHeightC;
|
||||
unsigned PointC;
|
||||
unsigned MonochromeData1C;
|
||||
unsigned reserved06[(0x080)+121];
|
||||
struct
|
||||
{
|
||||
unsigned reserved06[(0x080) + 121];
|
||||
struct {
|
||||
unsigned TopLeft;
|
||||
unsigned BottomRight;
|
||||
} ClipD;
|
||||
|
@ -176,9 +166,8 @@ typedef volatile struct
|
|||
unsigned WidthHeightOutD;
|
||||
unsigned PointD;
|
||||
unsigned MonochromeData1D;
|
||||
unsigned reserved07[(0x080)+120];
|
||||
struct
|
||||
{
|
||||
unsigned reserved07[(0x080) + 120];
|
||||
struct {
|
||||
unsigned TopLeft;
|
||||
unsigned BottomRight;
|
||||
} ClipE;
|
||||
|
@ -192,8 +181,7 @@ typedef volatile struct
|
|||
/*
|
||||
* 3D textured, Z buffered triangle.
|
||||
*/
|
||||
typedef volatile struct
|
||||
{
|
||||
typedef volatile struct {
|
||||
unsigned reserved00[4];
|
||||
unsigned short FifoFree;
|
||||
unsigned short Nop;
|
||||
|
@ -226,8 +214,7 @@ struct _riva_hw_state;
|
|||
/*
|
||||
* Virtialized chip interface. Makes RIVA 128 and TNT look alike.
|
||||
*/
|
||||
typedef struct _riva_hw_inst
|
||||
{
|
||||
typedef struct _riva_hw_inst {
|
||||
/*
|
||||
* Chip specific settings.
|
||||
*/
|
||||
|
@ -264,13 +251,16 @@ typedef struct _riva_hw_inst
|
|||
* Common chip functions.
|
||||
*/
|
||||
int (*Busy)(struct _riva_hw_inst *);
|
||||
void (*CalcStateExt)(struct _riva_hw_inst *,struct _riva_hw_state *,int,int,int,int,int,int,int,int,int,int,int,int,int);
|
||||
void (*LoadStateExt)(struct _riva_hw_inst *,struct _riva_hw_state *, int all);
|
||||
void (*UnloadStateExt)(struct _riva_hw_inst *,struct _riva_hw_state *);
|
||||
void (*SetStartAddress)(struct _riva_hw_inst *,unsigned);
|
||||
void (*SetSurfaces2D)(struct _riva_hw_inst *,unsigned,unsigned);
|
||||
void (*SetSurfaces3D)(struct _riva_hw_inst *,unsigned,unsigned);
|
||||
int (*ShowHideCursor)(struct _riva_hw_inst *,int);
|
||||
void (*CalcStateExt)(struct _riva_hw_inst *, struct _riva_hw_state *, int,
|
||||
int, int, int, int, int, int, int, int, int, int, int,
|
||||
int);
|
||||
void (*LoadStateExt)(struct _riva_hw_inst *, struct _riva_hw_state *,
|
||||
int all);
|
||||
void (*UnloadStateExt)(struct _riva_hw_inst *, struct _riva_hw_state *);
|
||||
void (*SetStartAddress)(struct _riva_hw_inst *, unsigned);
|
||||
void (*SetSurfaces2D)(struct _riva_hw_inst *, unsigned, unsigned);
|
||||
void (*SetSurfaces3D)(struct _riva_hw_inst *, unsigned, unsigned);
|
||||
int (*ShowHideCursor)(struct _riva_hw_inst *, int);
|
||||
/*
|
||||
* Current extended mode settings.
|
||||
*/
|
||||
|
@ -289,8 +279,7 @@ typedef struct _riva_hw_inst
|
|||
/*
|
||||
* Extended mode state information.
|
||||
*/
|
||||
typedef struct _riva_hw_state
|
||||
{
|
||||
typedef struct _riva_hw_state {
|
||||
unsigned bpp;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
|
@ -324,13 +313,11 @@ int RivaGetConfig(RIVA_HW_INST *);
|
|||
/*
|
||||
* FIFO Free Count. Should attempt to yield processor if RIVA is busy.
|
||||
*/
|
||||
#define RIVA_FIFO_FREE(hwinst,hwptr,cnt) \
|
||||
{ \
|
||||
while ((hwinst).FifoFreeCount < (cnt)) \
|
||||
{ \
|
||||
#define RIVA_FIFO_FREE(hwinst, hwptr, cnt) \
|
||||
{ \
|
||||
while ((hwinst).FifoFreeCount < (cnt)) { \
|
||||
(hwinst).FifoFreeCount = (hwinst).hwptr->FifoFree >> 2; \
|
||||
} \
|
||||
(hwinst).FifoFreeCount -= (cnt); \
|
||||
}
|
||||
} \
|
||||
(hwinst).FifoFreeCount -= (cnt); \
|
||||
}
|
||||
#endif /* __RIVA_HW_H__ */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/***************************************************************************\
|
||||
/***************************************************************************\
|
||||
|* *|
|
||||
|* Copyright 1993-1998 NVIDIA, Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|
@ -35,361 +35,196 @@
|
|||
|* all U.S. Government End Users acquire the source code with only *|
|
||||
|* those rights set forth herein. *|
|
||||
|* *|
|
||||
\***************************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/riva_tbl.h,v 1.1.2.2 1998/12/22 16:33:20 hohndel Exp $ */
|
||||
\***************************************************************************/
|
||||
/* $XFree86:
|
||||
* xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/riva_tbl.h,v 1.1.2.2
|
||||
* 1998/12/22 16:33:20 hohndel Exp $ */
|
||||
/*
|
||||
* RIVA Fixed Functionality Init Tables.
|
||||
*/
|
||||
static unsigned RivaTablePMC[][2] =
|
||||
{
|
||||
{0x00000050, 0x00000000},
|
||||
{0x00000080, 0xFFFF00FF},
|
||||
{0x00000080, 0xFFFFFFFF}
|
||||
static unsigned RivaTablePMC[][2] = { { 0x00000050, 0x00000000 },
|
||||
{ 0x00000080, 0xFFFF00FF },
|
||||
{ 0x00000080, 0xFFFFFFFF } };
|
||||
static unsigned RivaTablePTIMER[][2] = { { 0x00000080, 0x00000008 },
|
||||
{ 0x00000084, 0x00000003 },
|
||||
{ 0x00000050, 0x00000000 },
|
||||
{ 0x00000040, 0xFFFFFFFF } };
|
||||
static unsigned RivaTableFIFO[][2] = {
|
||||
{ 0x00000000, 0x80000000 }, { 0x00000800, 0x80000001 },
|
||||
{ 0x00001000, 0x80000002 }, { 0x00001800, 0x80000010 },
|
||||
{ 0x00002000, 0x80000011 }, { 0x00002800, 0x80000012 },
|
||||
{ 0x00003800, 0x80000013 }
|
||||
};
|
||||
static unsigned RivaTablePTIMER[][2] =
|
||||
{
|
||||
{0x00000080, 0x00000008},
|
||||
{0x00000084, 0x00000003},
|
||||
{0x00000050, 0x00000000},
|
||||
{0x00000040, 0xFFFFFFFF}
|
||||
static unsigned nv3TablePFIFO[][2] = {
|
||||
{ 0x00000140, 0x00000000 }, { 0x00000480, 0x00000000 },
|
||||
{ 0x00000490, 0x00000000 }, { 0x00000494, 0x00000000 },
|
||||
{ 0x00000481, 0x00000000 }, { 0x00000084, 0x00000000 },
|
||||
{ 0x00000086, 0x00002000 }, { 0x00000085, 0x00002200 },
|
||||
{ 0x00000484, 0x00000000 }, { 0x0000049C, 0x00000000 },
|
||||
{ 0x00000104, 0x00000000 }, { 0x00000108, 0x00000000 },
|
||||
{ 0x00000100, 0x00000000 }, { 0x000004A0, 0x00000000 },
|
||||
{ 0x000004A4, 0x00000000 }, { 0x000004A8, 0x00000000 },
|
||||
{ 0x000004AC, 0x00000000 }, { 0x000004B0, 0x00000000 },
|
||||
{ 0x000004B4, 0x00000000 }, { 0x000004B8, 0x00000000 },
|
||||
{ 0x000004BC, 0x00000000 }, { 0x00000050, 0x00000000 },
|
||||
{ 0x00000040, 0xFFFFFFFF }, { 0x00000480, 0x00000001 },
|
||||
{ 0x00000490, 0x00000001 }, { 0x00000140, 0x00000001 }
|
||||
};
|
||||
static unsigned RivaTableFIFO[][2] =
|
||||
{
|
||||
{0x00000000, 0x80000000},
|
||||
{0x00000800, 0x80000001},
|
||||
{0x00001000, 0x80000002},
|
||||
{0x00001800, 0x80000010},
|
||||
{0x00002000, 0x80000011},
|
||||
{0x00002800, 0x80000012},
|
||||
{0x00003800, 0x80000013}
|
||||
static unsigned nv3TablePGRAPH[][2] = {
|
||||
{ 0x00000020, 0x1230001F }, { 0x00000021, 0x10113000 },
|
||||
{ 0x00000022, 0x1131F101 }, { 0x00000023, 0x0100F531 },
|
||||
{ 0x00000060, 0x00000000 }, { 0x00000065, 0x00000000 },
|
||||
{ 0x00000068, 0x00000000 }, { 0x00000069, 0x00000000 },
|
||||
{ 0x0000006A, 0x00000000 }, { 0x0000006B, 0x00000000 },
|
||||
{ 0x0000006C, 0x00000000 }, { 0x0000006D, 0x00000000 },
|
||||
{ 0x0000006E, 0x00000000 }, { 0x0000006F, 0x00000000 },
|
||||
{ 0x000001A8, 0x00000000 }, { 0x00000440, 0xFFFFFFFF },
|
||||
{ 0x00000480, 0x00000001 }, { 0x000001A0, 0x00000000 },
|
||||
{ 0x000001A2, 0x00000000 }, { 0x0000018A, 0xFFFFFFFF },
|
||||
{ 0x00000190, 0x00000000 }, { 0x00000142, 0x00000000 },
|
||||
{ 0x00000154, 0x00000000 }, { 0x00000155, 0xFFFFFFFF },
|
||||
{ 0x00000156, 0x00000000 }, { 0x00000157, 0xFFFFFFFF },
|
||||
{ 0x00000064, 0x10010002 }, { 0x00000050, 0x00000000 },
|
||||
{ 0x00000051, 0x00000000 }, { 0x00000040, 0xFFFFFFFF },
|
||||
{ 0x00000041, 0xFFFFFFFF }, { 0x00000440, 0xFFFFFFFF },
|
||||
{ 0x000001A9, 0x00000001 }
|
||||
};
|
||||
static unsigned nv3TablePFIFO[][2] =
|
||||
{
|
||||
{0x00000140, 0x00000000},
|
||||
{0x00000480, 0x00000000},
|
||||
{0x00000490, 0x00000000},
|
||||
{0x00000494, 0x00000000},
|
||||
{0x00000481, 0x00000000},
|
||||
{0x00000084, 0x00000000},
|
||||
{0x00000086, 0x00002000},
|
||||
{0x00000085, 0x00002200},
|
||||
{0x00000484, 0x00000000},
|
||||
{0x0000049C, 0x00000000},
|
||||
{0x00000104, 0x00000000},
|
||||
{0x00000108, 0x00000000},
|
||||
{0x00000100, 0x00000000},
|
||||
{0x000004A0, 0x00000000},
|
||||
{0x000004A4, 0x00000000},
|
||||
{0x000004A8, 0x00000000},
|
||||
{0x000004AC, 0x00000000},
|
||||
{0x000004B0, 0x00000000},
|
||||
{0x000004B4, 0x00000000},
|
||||
{0x000004B8, 0x00000000},
|
||||
{0x000004BC, 0x00000000},
|
||||
{0x00000050, 0x00000000},
|
||||
{0x00000040, 0xFFFFFFFF},
|
||||
{0x00000480, 0x00000001},
|
||||
{0x00000490, 0x00000001},
|
||||
{0x00000140, 0x00000001}
|
||||
static unsigned nv3TablePGRAPH_8BPP[][2] = { { 0x000001AA, 0x00001111 } };
|
||||
static unsigned nv3TablePGRAPH_15BPP[][2] = { { 0x000001AA, 0x00002222 } };
|
||||
static unsigned nv3TablePGRAPH_32BPP[][2] = { { 0x000001AA, 0x00003333 } };
|
||||
static unsigned nv3TablePRAMIN[][2] = {
|
||||
{ 0x00000500, 0x00010000 }, { 0x00000501, 0x007FFFFF },
|
||||
{ 0x00000200, 0x80000000 }, { 0x00000201, 0x00C20341 },
|
||||
{ 0x00000204, 0x80000001 }, { 0x00000205, 0x00C50342 },
|
||||
{ 0x00000208, 0x80000002 }, { 0x00000209, 0x00C60343 },
|
||||
{ 0x00000240, 0x80000010 }, { 0x00000241, 0x00D10344 },
|
||||
{ 0x00000244, 0x80000011 }, { 0x00000245, 0x00D00345 },
|
||||
{ 0x00000248, 0x80000012 }, { 0x00000249, 0x00CC0346 },
|
||||
{ 0x0000024C, 0x80000013 }, { 0x0000024D, 0x00D70347 },
|
||||
{ 0x00000D05, 0x00000000 }, { 0x00000D06, 0x00000000 },
|
||||
{ 0x00000D07, 0x00000000 }, { 0x00000D09, 0x00000000 },
|
||||
{ 0x00000D0A, 0x00000000 }, { 0x00000D0B, 0x00000000 },
|
||||
{ 0x00000D0D, 0x00000000 }, { 0x00000D0E, 0x00000000 },
|
||||
{ 0x00000D0F, 0x00000000 }, { 0x00000D11, 0x00000000 },
|
||||
{ 0x00000D12, 0x00000000 }, { 0x00000D13, 0x00000000 },
|
||||
{ 0x00000D15, 0x00000000 }, { 0x00000D16, 0x00000000 },
|
||||
{ 0x00000D17, 0x00000000 }, { 0x00000D19, 0x00000000 },
|
||||
{ 0x00000D1A, 0x00000000 }, { 0x00000D1B, 0x00000000 },
|
||||
{ 0x00000D1D, 0x00000140 }, { 0x00000D1E, 0x00000000 },
|
||||
{ 0x00000D1F, 0x00000000 }
|
||||
};
|
||||
static unsigned nv3TablePGRAPH[][2] =
|
||||
{
|
||||
{0x00000020, 0x1230001F},
|
||||
{0x00000021, 0x10113000},
|
||||
{0x00000022, 0x1131F101},
|
||||
{0x00000023, 0x0100F531},
|
||||
{0x00000060, 0x00000000},
|
||||
{0x00000065, 0x00000000},
|
||||
{0x00000068, 0x00000000},
|
||||
{0x00000069, 0x00000000},
|
||||
{0x0000006A, 0x00000000},
|
||||
{0x0000006B, 0x00000000},
|
||||
{0x0000006C, 0x00000000},
|
||||
{0x0000006D, 0x00000000},
|
||||
{0x0000006E, 0x00000000},
|
||||
{0x0000006F, 0x00000000},
|
||||
{0x000001A8, 0x00000000},
|
||||
{0x00000440, 0xFFFFFFFF},
|
||||
{0x00000480, 0x00000001},
|
||||
{0x000001A0, 0x00000000},
|
||||
{0x000001A2, 0x00000000},
|
||||
{0x0000018A, 0xFFFFFFFF},
|
||||
{0x00000190, 0x00000000},
|
||||
{0x00000142, 0x00000000},
|
||||
{0x00000154, 0x00000000},
|
||||
{0x00000155, 0xFFFFFFFF},
|
||||
{0x00000156, 0x00000000},
|
||||
{0x00000157, 0xFFFFFFFF},
|
||||
{0x00000064, 0x10010002},
|
||||
{0x00000050, 0x00000000},
|
||||
{0x00000051, 0x00000000},
|
||||
{0x00000040, 0xFFFFFFFF},
|
||||
{0x00000041, 0xFFFFFFFF},
|
||||
{0x00000440, 0xFFFFFFFF},
|
||||
{0x000001A9, 0x00000001}
|
||||
static unsigned nv3TablePRAMIN_8BPP[][2] = {
|
||||
{ 0x00000D04, 0x10110203 }, { 0x00000D08, 0x10110203 },
|
||||
{ 0x00000D0C, 0x10110203 }, { 0x00000D10, 0x10118203 },
|
||||
{ 0x00000D14, 0x10110203 }, { 0x00000D18, 0x10110203 },
|
||||
{ 0x00000D1C, 0x10419208 }
|
||||
};
|
||||
static unsigned nv3TablePGRAPH_8BPP[][2] =
|
||||
{
|
||||
{0x000001AA, 0x00001111}
|
||||
static unsigned nv3TablePRAMIN_15BPP[][2] = {
|
||||
{ 0x00000D04, 0x10110200 }, { 0x00000D08, 0x10110200 },
|
||||
{ 0x00000D0C, 0x10110200 }, { 0x00000D10, 0x10118200 },
|
||||
{ 0x00000D14, 0x10110200 }, { 0x00000D18, 0x10110200 },
|
||||
{ 0x00000D1C, 0x10419208 }
|
||||
};
|
||||
static unsigned nv3TablePGRAPH_15BPP[][2] =
|
||||
{
|
||||
{0x000001AA, 0x00002222}
|
||||
static unsigned nv3TablePRAMIN_32BPP[][2] = {
|
||||
{ 0x00000D04, 0x10110201 }, { 0x00000D08, 0x10110201 },
|
||||
{ 0x00000D0C, 0x10110201 }, { 0x00000D10, 0x10118201 },
|
||||
{ 0x00000D14, 0x10110201 }, { 0x00000D18, 0x10110201 },
|
||||
{ 0x00000D1C, 0x10419208 }
|
||||
};
|
||||
static unsigned nv3TablePGRAPH_32BPP[][2] =
|
||||
{
|
||||
{0x000001AA, 0x00003333}
|
||||
static unsigned nv4TablePFIFO[][2] = {
|
||||
{ 0x00000140, 0x00000000 }, { 0x00000480, 0x00000000 },
|
||||
{ 0x00000494, 0x00000000 }, { 0x00000400, 0x00000000 },
|
||||
{ 0x00000414, 0x00000000 }, { 0x00000084, 0x03000100 },
|
||||
{ 0x00000085, 0x00000110 }, { 0x00000086, 0x00000112 },
|
||||
{ 0x00000143, 0x0000FFFF }, { 0x00000496, 0x0000FFFF },
|
||||
{ 0x00000050, 0x00000000 }, { 0x00000040, 0xFFFFFFFF },
|
||||
{ 0x00000415, 0x00000001 }, { 0x00000480, 0x00000001 },
|
||||
{ 0x00000494, 0x00000001 }, { 0x00000495, 0x00000001 },
|
||||
{ 0x00000140, 0x00000001 }
|
||||
};
|
||||
static unsigned nv3TablePRAMIN[][2] =
|
||||
{
|
||||
{0x00000500, 0x00010000},
|
||||
{0x00000501, 0x007FFFFF},
|
||||
{0x00000200, 0x80000000},
|
||||
{0x00000201, 0x00C20341},
|
||||
{0x00000204, 0x80000001},
|
||||
{0x00000205, 0x00C50342},
|
||||
{0x00000208, 0x80000002},
|
||||
{0x00000209, 0x00C60343},
|
||||
{0x00000240, 0x80000010},
|
||||
{0x00000241, 0x00D10344},
|
||||
{0x00000244, 0x80000011},
|
||||
{0x00000245, 0x00D00345},
|
||||
{0x00000248, 0x80000012},
|
||||
{0x00000249, 0x00CC0346},
|
||||
{0x0000024C, 0x80000013},
|
||||
{0x0000024D, 0x00D70347},
|
||||
{0x00000D05, 0x00000000},
|
||||
{0x00000D06, 0x00000000},
|
||||
{0x00000D07, 0x00000000},
|
||||
{0x00000D09, 0x00000000},
|
||||
{0x00000D0A, 0x00000000},
|
||||
{0x00000D0B, 0x00000000},
|
||||
{0x00000D0D, 0x00000000},
|
||||
{0x00000D0E, 0x00000000},
|
||||
{0x00000D0F, 0x00000000},
|
||||
{0x00000D11, 0x00000000},
|
||||
{0x00000D12, 0x00000000},
|
||||
{0x00000D13, 0x00000000},
|
||||
{0x00000D15, 0x00000000},
|
||||
{0x00000D16, 0x00000000},
|
||||
{0x00000D17, 0x00000000},
|
||||
{0x00000D19, 0x00000000},
|
||||
{0x00000D1A, 0x00000000},
|
||||
{0x00000D1B, 0x00000000},
|
||||
{0x00000D1D, 0x00000140},
|
||||
{0x00000D1E, 0x00000000},
|
||||
{0x00000D1F, 0x00000000}
|
||||
static unsigned nv4TablePGRAPH[][2] = {
|
||||
{ 0x00000020, 0x1231C001 }, { 0x00000021, 0x72111101 },
|
||||
{ 0x00000022, 0x11D5F071 }, { 0x00000023, 0x10D4FF31 },
|
||||
{ 0x00000060, 0x00000000 }, { 0x00000068, 0x00000000 },
|
||||
{ 0x00000070, 0x00000000 }, { 0x00000078, 0x00000000 },
|
||||
{ 0x00000061, 0x00000000 }, { 0x00000069, 0x00000000 },
|
||||
{ 0x00000071, 0x00000000 }, { 0x00000079, 0x00000000 },
|
||||
{ 0x00000062, 0x00000000 }, { 0x0000006A, 0x00000000 },
|
||||
{ 0x00000072, 0x00000000 }, { 0x0000007A, 0x00000000 },
|
||||
{ 0x00000063, 0x00000000 }, { 0x0000006B, 0x00000000 },
|
||||
{ 0x00000073, 0x00000000 }, { 0x0000007B, 0x00000000 },
|
||||
{ 0x00000064, 0x00000000 }, { 0x0000006C, 0x00000000 },
|
||||
{ 0x00000074, 0x00000000 }, { 0x0000007C, 0x00000000 },
|
||||
{ 0x00000065, 0x00000000 }, { 0x0000006D, 0x00000000 },
|
||||
{ 0x00000075, 0x00000000 }, { 0x0000007D, 0x00000000 },
|
||||
{ 0x00000066, 0x00000000 }, { 0x0000006E, 0x00000000 },
|
||||
{ 0x00000076, 0x00000000 }, { 0x0000007E, 0x00000000 },
|
||||
{ 0x00000067, 0x00000000 }, { 0x0000006F, 0x00000000 },
|
||||
{ 0x00000077, 0x00000000 }, { 0x0000007F, 0x00000000 },
|
||||
{ 0x00000058, 0x00000000 }, { 0x00000059, 0x00000000 },
|
||||
{ 0x0000005A, 0x00000000 }, { 0x0000005B, 0x00000000 },
|
||||
{ 0x00000196, 0x00000000 }, { 0x000001A1, 0x00FFFFFF },
|
||||
{ 0x00000197, 0x00000000 }, { 0x000001A2, 0x00FFFFFF },
|
||||
{ 0x00000198, 0x00000000 }, { 0x000001A3, 0x00FFFFFF },
|
||||
{ 0x00000199, 0x00000000 }, { 0x000001A4, 0x00FFFFFF },
|
||||
{ 0x00000050, 0x00000000 }, { 0x00000040, 0xFFFFFFFF },
|
||||
{ 0x0000005C, 0x10010100 }, { 0x000001C8, 0x00000001 }
|
||||
};
|
||||
static unsigned nv3TablePRAMIN_8BPP[][2] =
|
||||
{
|
||||
{0x00000D04, 0x10110203},
|
||||
{0x00000D08, 0x10110203},
|
||||
{0x00000D0C, 0x10110203},
|
||||
{0x00000D10, 0x10118203},
|
||||
{0x00000D14, 0x10110203},
|
||||
{0x00000D18, 0x10110203},
|
||||
{0x00000D1C, 0x10419208}
|
||||
static unsigned nv4TablePGRAPH_8BPP[][2] = { { 0x000001C4, 0xFFFFFFFF },
|
||||
{ 0x000001C9, 0x00111111 },
|
||||
{ 0x00000186, 0x00001010 },
|
||||
{ 0x0000020C, 0x01010101 } };
|
||||
static unsigned nv4TablePGRAPH_15BPP[][2] = { { 0x000001C4, 0xFFFFFFFF },
|
||||
{ 0x000001C9, 0x00226222 },
|
||||
{ 0x00000186, 0x00002071 },
|
||||
{ 0x0000020C, 0x09090909 } };
|
||||
static unsigned nv4TablePGRAPH_16BPP[][2] = { { 0x000001C4, 0xFFFFFFFF },
|
||||
{ 0x000001C9, 0x00556555 },
|
||||
{ 0x00000186, 0x000050C2 },
|
||||
{ 0x0000020C, 0x0C0C0C0C } };
|
||||
static unsigned nv4TablePGRAPH_32BPP[][2] = { { 0x000001C4, 0xFFFFFFFF },
|
||||
{ 0x000001C9, 0x0077D777 },
|
||||
{ 0x00000186, 0x000070E5 },
|
||||
{ 0x0000020C, 0x07070707 } };
|
||||
static unsigned nv4TablePRAMIN[][2] = {
|
||||
{ 0x00000000, 0x80000010 }, { 0x00000001, 0x80011145 },
|
||||
{ 0x00000002, 0x80000011 }, { 0x00000003, 0x80011146 },
|
||||
{ 0x00000004, 0x80000012 }, { 0x00000005, 0x80011147 },
|
||||
{ 0x00000006, 0x80000013 }, { 0x00000007, 0x80011148 },
|
||||
{ 0x00000020, 0x80000000 }, { 0x00000021, 0x80011142 },
|
||||
{ 0x00000022, 0x80000001 }, { 0x00000023, 0x80011143 },
|
||||
{ 0x00000024, 0x80000002 }, { 0x00000025, 0x80011144 },
|
||||
{ 0x00000500, 0x00003000 }, { 0x00000501, 0x02FFFFFF },
|
||||
{ 0x00000502, 0x00000002 }, { 0x00000503, 0x00000002 },
|
||||
{ 0x00000508, 0x01008043 }, { 0x0000050A, 0x00000000 },
|
||||
{ 0x0000050B, 0x00000000 }, { 0x0000050C, 0x01008019 },
|
||||
{ 0x0000050E, 0x00000000 }, { 0x0000050F, 0x00000000 },
|
||||
{ 0x00000510, 0x01008018 }, { 0x00000512, 0x00000000 },
|
||||
{ 0x00000513, 0x00000000 }, { 0x00000514, 0x0100A033 },
|
||||
{ 0x00000516, 0x00000000 }, { 0x00000517, 0x00000000 },
|
||||
{ 0x00000518, 0x0100805F }, { 0x0000051A, 0x00000000 },
|
||||
{ 0x0000051B, 0x00000000 }, { 0x0000051C, 0x0100804B },
|
||||
{ 0x0000051E, 0x00000000 }, { 0x0000051F, 0x00000000 },
|
||||
{ 0x00000520, 0x0100A048 }, { 0x00000521, 0x00000D01 },
|
||||
{ 0x00000522, 0x11401140 }, { 0x00000523, 0x00000000 }
|
||||
};
|
||||
static unsigned nv3TablePRAMIN_15BPP[][2] =
|
||||
{
|
||||
{0x00000D04, 0x10110200},
|
||||
{0x00000D08, 0x10110200},
|
||||
{0x00000D0C, 0x10110200},
|
||||
{0x00000D10, 0x10118200},
|
||||
{0x00000D14, 0x10110200},
|
||||
{0x00000D18, 0x10110200},
|
||||
{0x00000D1C, 0x10419208}
|
||||
static unsigned nv4TablePRAMIN_8BPP[][2] = {
|
||||
{ 0x00000509, 0x00000301 }, { 0x0000050D, 0x00000301 },
|
||||
{ 0x00000511, 0x00000301 }, { 0x00000515, 0x00000301 },
|
||||
{ 0x00000519, 0x00000301 }, { 0x0000051D, 0x00000301 }
|
||||
};
|
||||
static unsigned nv3TablePRAMIN_32BPP[][2] =
|
||||
{
|
||||
{0x00000D04, 0x10110201},
|
||||
{0x00000D08, 0x10110201},
|
||||
{0x00000D0C, 0x10110201},
|
||||
{0x00000D10, 0x10118201},
|
||||
{0x00000D14, 0x10110201},
|
||||
{0x00000D18, 0x10110201},
|
||||
{0x00000D1C, 0x10419208}
|
||||
static unsigned nv4TablePRAMIN_15BPP[][2] = {
|
||||
{ 0x00000509, 0x00000901 }, { 0x0000050D, 0x00000901 },
|
||||
{ 0x00000511, 0x00000901 }, { 0x00000515, 0x00000901 },
|
||||
{ 0x00000519, 0x00000901 }, { 0x0000051D, 0x00000901 }
|
||||
};
|
||||
static unsigned nv4TablePFIFO[][2] =
|
||||
{
|
||||
{0x00000140, 0x00000000},
|
||||
{0x00000480, 0x00000000},
|
||||
{0x00000494, 0x00000000},
|
||||
{0x00000400, 0x00000000},
|
||||
{0x00000414, 0x00000000},
|
||||
{0x00000084, 0x03000100},
|
||||
{0x00000085, 0x00000110},
|
||||
{0x00000086, 0x00000112},
|
||||
{0x00000143, 0x0000FFFF},
|
||||
{0x00000496, 0x0000FFFF},
|
||||
{0x00000050, 0x00000000},
|
||||
{0x00000040, 0xFFFFFFFF},
|
||||
{0x00000415, 0x00000001},
|
||||
{0x00000480, 0x00000001},
|
||||
{0x00000494, 0x00000001},
|
||||
{0x00000495, 0x00000001},
|
||||
{0x00000140, 0x00000001}
|
||||
static unsigned nv4TablePRAMIN_16BPP[][2] = {
|
||||
{ 0x00000509, 0x00000C01 }, { 0x0000050D, 0x00000C01 },
|
||||
{ 0x00000511, 0x00000C01 }, { 0x00000515, 0x00000C01 },
|
||||
{ 0x00000519, 0x00000C01 }, { 0x0000051D, 0x00000C01 }
|
||||
};
|
||||
static unsigned nv4TablePGRAPH[][2] =
|
||||
{
|
||||
{0x00000020, 0x1231C001},
|
||||
{0x00000021, 0x72111101},
|
||||
{0x00000022, 0x11D5F071},
|
||||
{0x00000023, 0x10D4FF31},
|
||||
{0x00000060, 0x00000000},
|
||||
{0x00000068, 0x00000000},
|
||||
{0x00000070, 0x00000000},
|
||||
{0x00000078, 0x00000000},
|
||||
{0x00000061, 0x00000000},
|
||||
{0x00000069, 0x00000000},
|
||||
{0x00000071, 0x00000000},
|
||||
{0x00000079, 0x00000000},
|
||||
{0x00000062, 0x00000000},
|
||||
{0x0000006A, 0x00000000},
|
||||
{0x00000072, 0x00000000},
|
||||
{0x0000007A, 0x00000000},
|
||||
{0x00000063, 0x00000000},
|
||||
{0x0000006B, 0x00000000},
|
||||
{0x00000073, 0x00000000},
|
||||
{0x0000007B, 0x00000000},
|
||||
{0x00000064, 0x00000000},
|
||||
{0x0000006C, 0x00000000},
|
||||
{0x00000074, 0x00000000},
|
||||
{0x0000007C, 0x00000000},
|
||||
{0x00000065, 0x00000000},
|
||||
{0x0000006D, 0x00000000},
|
||||
{0x00000075, 0x00000000},
|
||||
{0x0000007D, 0x00000000},
|
||||
{0x00000066, 0x00000000},
|
||||
{0x0000006E, 0x00000000},
|
||||
{0x00000076, 0x00000000},
|
||||
{0x0000007E, 0x00000000},
|
||||
{0x00000067, 0x00000000},
|
||||
{0x0000006F, 0x00000000},
|
||||
{0x00000077, 0x00000000},
|
||||
{0x0000007F, 0x00000000},
|
||||
{0x00000058, 0x00000000},
|
||||
{0x00000059, 0x00000000},
|
||||
{0x0000005A, 0x00000000},
|
||||
{0x0000005B, 0x00000000},
|
||||
{0x00000196, 0x00000000},
|
||||
{0x000001A1, 0x00FFFFFF},
|
||||
{0x00000197, 0x00000000},
|
||||
{0x000001A2, 0x00FFFFFF},
|
||||
{0x00000198, 0x00000000},
|
||||
{0x000001A3, 0x00FFFFFF},
|
||||
{0x00000199, 0x00000000},
|
||||
{0x000001A4, 0x00FFFFFF},
|
||||
{0x00000050, 0x00000000},
|
||||
{0x00000040, 0xFFFFFFFF},
|
||||
{0x0000005C, 0x10010100},
|
||||
{0x000001C8, 0x00000001}
|
||||
static unsigned nv4TablePRAMIN_32BPP[][2] = {
|
||||
{ 0x00000509, 0x00000E01 }, { 0x0000050D, 0x00000E01 },
|
||||
{ 0x00000511, 0x00000E01 }, { 0x00000515, 0x00000E01 },
|
||||
{ 0x00000519, 0x00000E01 }, { 0x0000051D, 0x00000E01 }
|
||||
};
|
||||
static unsigned nv4TablePGRAPH_8BPP[][2] =
|
||||
{
|
||||
{0x000001C4, 0xFFFFFFFF},
|
||||
{0x000001C9, 0x00111111},
|
||||
{0x00000186, 0x00001010},
|
||||
{0x0000020C, 0x01010101}
|
||||
};
|
||||
static unsigned nv4TablePGRAPH_15BPP[][2] =
|
||||
{
|
||||
{0x000001C4, 0xFFFFFFFF},
|
||||
{0x000001C9, 0x00226222},
|
||||
{0x00000186, 0x00002071},
|
||||
{0x0000020C, 0x09090909}
|
||||
};
|
||||
static unsigned nv4TablePGRAPH_16BPP[][2] =
|
||||
{
|
||||
{0x000001C4, 0xFFFFFFFF},
|
||||
{0x000001C9, 0x00556555},
|
||||
{0x00000186, 0x000050C2},
|
||||
{0x0000020C, 0x0C0C0C0C}
|
||||
};
|
||||
static unsigned nv4TablePGRAPH_32BPP[][2] =
|
||||
{
|
||||
{0x000001C4, 0xFFFFFFFF},
|
||||
{0x000001C9, 0x0077D777},
|
||||
{0x00000186, 0x000070E5},
|
||||
{0x0000020C, 0x07070707}
|
||||
};
|
||||
static unsigned nv4TablePRAMIN[][2] =
|
||||
{
|
||||
{0x00000000, 0x80000010},
|
||||
{0x00000001, 0x80011145},
|
||||
{0x00000002, 0x80000011},
|
||||
{0x00000003, 0x80011146},
|
||||
{0x00000004, 0x80000012},
|
||||
{0x00000005, 0x80011147},
|
||||
{0x00000006, 0x80000013},
|
||||
{0x00000007, 0x80011148},
|
||||
{0x00000020, 0x80000000},
|
||||
{0x00000021, 0x80011142},
|
||||
{0x00000022, 0x80000001},
|
||||
{0x00000023, 0x80011143},
|
||||
{0x00000024, 0x80000002},
|
||||
{0x00000025, 0x80011144},
|
||||
{0x00000500, 0x00003000},
|
||||
{0x00000501, 0x02FFFFFF},
|
||||
{0x00000502, 0x00000002},
|
||||
{0x00000503, 0x00000002},
|
||||
{0x00000508, 0x01008043},
|
||||
{0x0000050A, 0x00000000},
|
||||
{0x0000050B, 0x00000000},
|
||||
{0x0000050C, 0x01008019},
|
||||
{0x0000050E, 0x00000000},
|
||||
{0x0000050F, 0x00000000},
|
||||
{0x00000510, 0x01008018},
|
||||
{0x00000512, 0x00000000},
|
||||
{0x00000513, 0x00000000},
|
||||
{0x00000514, 0x0100A033},
|
||||
{0x00000516, 0x00000000},
|
||||
{0x00000517, 0x00000000},
|
||||
{0x00000518, 0x0100805F},
|
||||
{0x0000051A, 0x00000000},
|
||||
{0x0000051B, 0x00000000},
|
||||
{0x0000051C, 0x0100804B},
|
||||
{0x0000051E, 0x00000000},
|
||||
{0x0000051F, 0x00000000},
|
||||
{0x00000520, 0x0100A048},
|
||||
{0x00000521, 0x00000D01},
|
||||
{0x00000522, 0x11401140},
|
||||
{0x00000523, 0x00000000}
|
||||
};
|
||||
static unsigned nv4TablePRAMIN_8BPP[][2] =
|
||||
{
|
||||
{0x00000509, 0x00000301},
|
||||
{0x0000050D, 0x00000301},
|
||||
{0x00000511, 0x00000301},
|
||||
{0x00000515, 0x00000301},
|
||||
{0x00000519, 0x00000301},
|
||||
{0x0000051D, 0x00000301}
|
||||
};
|
||||
static unsigned nv4TablePRAMIN_15BPP[][2] =
|
||||
{
|
||||
{0x00000509, 0x00000901},
|
||||
{0x0000050D, 0x00000901},
|
||||
{0x00000511, 0x00000901},
|
||||
{0x00000515, 0x00000901},
|
||||
{0x00000519, 0x00000901},
|
||||
{0x0000051D, 0x00000901}
|
||||
};
|
||||
static unsigned nv4TablePRAMIN_16BPP[][2] =
|
||||
{
|
||||
{0x00000509, 0x00000C01},
|
||||
{0x0000050D, 0x00000C01},
|
||||
{0x00000511, 0x00000C01},
|
||||
{0x00000515, 0x00000C01},
|
||||
{0x00000519, 0x00000C01},
|
||||
{0x0000051D, 0x00000C01}
|
||||
};
|
||||
static unsigned nv4TablePRAMIN_32BPP[][2] =
|
||||
{
|
||||
{0x00000509, 0x00000E01},
|
||||
{0x0000050D, 0x00000E01},
|
||||
{0x00000511, 0x00000E01},
|
||||
{0x00000515, 0x00000E01},
|
||||
{0x00000519, 0x00000E01},
|
||||
{0x0000051D, 0x00000E01}
|
||||
};
|
||||
|
||||
|
|
|
@ -14,34 +14,29 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
// #define NO_HWPTR
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* chipset information */
|
||||
#define PVGA1 1
|
||||
#define WD90C 2
|
||||
|
||||
int paradise_type = 0;
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void CirrusSetBank32();
|
||||
void CirrusSetBank32End();
|
||||
void CirrusSetBank32( );
|
||||
void CirrusSetBank32End( );
|
||||
void CirrusSetBank(AF_DRIVER *af, long bank);
|
||||
void ParadiseSetBank32();
|
||||
void ParadiseSetBank32End();
|
||||
void ParadiseSetBank32( );
|
||||
void ParadiseSetBank32End( );
|
||||
void ParadiseSetBank(AF_DRIVER *af, long bank);
|
||||
int ExtStub();
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -49,15 +44,12 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
|
||||
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -68,42 +60,28 @@ int af_scroll_x;
|
|||
int af_scroll_y;
|
||||
int af_bank;
|
||||
|
||||
|
||||
|
||||
/* FreeBE/AF extension allowing farptr access to video memory */
|
||||
FAF_HWPTR_DATA hwptr;
|
||||
|
||||
|
||||
|
||||
/* list of available video modes */
|
||||
typedef struct VIDEO_MODE
|
||||
{
|
||||
typedef struct VIDEO_MODE {
|
||||
int w, h;
|
||||
int bpp;
|
||||
int num;
|
||||
} VIDEO_MODE;
|
||||
|
||||
|
||||
VIDEO_MODE mode_list[] =
|
||||
{
|
||||
{ 640, 400, 8, 0x5E },
|
||||
VIDEO_MODE mode_list[] = { { 640, 400, 8, 0x5E },
|
||||
{ 640, 480, 8, 0x5F },
|
||||
{ 800, 600, 8, 0x5C }
|
||||
};
|
||||
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list)/sizeof(VIDEO_MODE))
|
||||
|
||||
|
||||
short available_modes[NUM_MODES+1] = { 1, 2, 3, -1 };
|
||||
{ 800, 600, 8, 0x5C } };
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list) / sizeof(VIDEO_MODE))
|
||||
|
||||
short available_modes[NUM_MODES + 1] = { 1, 2, 3, -1 };
|
||||
|
||||
/* detect:
|
||||
* Detects the presence of a Paradise card.
|
||||
*/
|
||||
char *detect(unsigned long *vidmem)
|
||||
{
|
||||
char *detect(unsigned long *vidmem) {
|
||||
char *name = NULL;
|
||||
RM_REGS r;
|
||||
int old, old2;
|
||||
|
@ -152,7 +130,7 @@ char *detect(unsigned long *vidmem)
|
|||
paradise_type = WD90C;
|
||||
name = "WD90C1x or 24+";
|
||||
|
||||
end:
|
||||
end:
|
||||
|
||||
write_vga_register(0x3D4, 0x29, old2);
|
||||
write_vga_register(0x3CE, 0xF, old);
|
||||
|
@ -165,38 +143,31 @@ char *detect(unsigned long *vidmem)
|
|||
return name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* Fills in our driver header block.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
char *name;
|
||||
int i;
|
||||
|
||||
name = detect(&af->TotalMemory);
|
||||
|
||||
if (!name)
|
||||
return 1;
|
||||
if (!name) return 1;
|
||||
|
||||
i = 0;
|
||||
while (af->OemVendorName[i])
|
||||
i++;
|
||||
while (af->OemVendorName[i]) i++;
|
||||
|
||||
af->OemVendorName[i++] = ',';
|
||||
af->OemVendorName[i++] = ' ';
|
||||
|
||||
while (*name)
|
||||
af->OemVendorName[i++] = *(name++);
|
||||
while (*name) af->OemVendorName[i++] = *(name++);
|
||||
|
||||
af->OemVendorName[i] = 0;
|
||||
|
||||
af->AvailableModes = available_modes;
|
||||
|
||||
af->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
af->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
af->BankSize = 64;
|
||||
af->BankedBasePtr = 0xA0000;
|
||||
|
@ -207,8 +178,7 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->SetBank32 = CirrusSetBank32;
|
||||
af->SetBank32Len = (long)CirrusSetBank32End - (long)CirrusSetBank32;
|
||||
af->SetBank = CirrusSetBank;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
af->SetBank32 = ParadiseSetBank32;
|
||||
af->SetBank32Len = (long)ParadiseSetBank32End - (long)ParadiseSetBank32;
|
||||
af->SetBank = ParadiseSetBank;
|
||||
|
@ -229,14 +199,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
hwptr_init(hwptr.IOMemMaps[0], af->IOMemMaps[0]);
|
||||
hwptr_init(hwptr.IOMemMaps[1], af->IOMemMaps[1]);
|
||||
hwptr_init(hwptr.IOMemMaps[2], af->IOMemMaps[2]);
|
||||
|
@ -247,78 +214,63 @@ int InitDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
#ifndef NO_HWPTR
|
||||
#ifndef NO_HWPTR
|
||||
|
||||
case FAFEXT_HWPTR:
|
||||
/* allow farptr access to video memory */
|
||||
return &hwptr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
VIDEO_MODE *info;
|
||||
int i;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
for (i=0; i<(int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
modeInfo->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
modeInfo->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
modeInfo->XResolution = info->w;
|
||||
modeInfo->YResolution = info->h;
|
||||
modeInfo->BitsPerPixel = info->bpp;
|
||||
|
||||
modeInfo->MaxBuffers = (af->TotalMemory*1024) /
|
||||
(info->w*info->h*BYTES_PER_PIXEL(info->bpp));
|
||||
modeInfo->MaxBuffers = (af->TotalMemory * 1024) /
|
||||
(info->w * info->h * BYTES_PER_PIXEL(info->bpp));
|
||||
|
||||
if (info->w > 1024) {
|
||||
modeInfo->MaxBytesPerScanLine = 2048*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine = 2048 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 2048;
|
||||
}
|
||||
else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024*BYTES_PER_PIXEL(info->bpp);
|
||||
} else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
}
|
||||
|
||||
modeInfo->BytesPerScanLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BytesPerScanLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
modeInfo->MaxPixelClock = 135000000;
|
||||
|
@ -326,13 +278,11 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
int width;
|
||||
|
@ -340,15 +290,13 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
RM_REGS r;
|
||||
|
||||
/* reject anything with hardware stereo, linear framebuffer, or noclear */
|
||||
if (mode & 0xC400)
|
||||
return -1;
|
||||
if (mode & 0xC400) return -1;
|
||||
|
||||
mode &= 0x3FF;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
/* call BIOS to set the mode */
|
||||
r.x.ax = info->num;
|
||||
|
@ -356,16 +304,16 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
/* adjust the virtual width for widescreen modes */
|
||||
if (virtualX > info->w) {
|
||||
if (virtualX > 1024)
|
||||
return -1;
|
||||
if (virtualX > 1024) return -1;
|
||||
|
||||
*bytesPerLine = ((virtualX*BYTES_PER_PIXEL(info->bpp))+15)&0xFFF0;
|
||||
*bytesPerLine = ((virtualX * BYTES_PER_PIXEL(info->bpp)) + 15) & 0xFFF0;
|
||||
|
||||
width = read_vga_register(0x3D4, 0x13);
|
||||
write_vga_register(0x3D4, 0x13, (width * (*bytesPerLine)) / (info->w*BYTES_PER_PIXEL(info->bpp)));
|
||||
}
|
||||
else
|
||||
*bytesPerLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
write_vga_register(0x3D4, 0x13,
|
||||
(width * (*bytesPerLine)) /
|
||||
(info->w * BYTES_PER_PIXEL(info->bpp)));
|
||||
} else
|
||||
*bytesPerLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* set up some hardware registers */
|
||||
if (paradise_type != PVGA1) {
|
||||
|
@ -387,22 +335,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
af_scroll_y = 0;
|
||||
af_bank = -1;
|
||||
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
available_vram = af->TotalMemory*1024 ;
|
||||
available_vram = af->TotalMemory * 1024;
|
||||
|
||||
if (used_vram > available_vram)
|
||||
return -1;
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
}
|
||||
else {
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
af->OffscreenEndY = 0;
|
||||
|
@ -411,43 +357,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -455,111 +390,92 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
if (waitVRT >= 0) {
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) + ((y + af_visible_page*af_height) * af_width);
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) +
|
||||
((y + af_visible_page * af_height) * af_width);
|
||||
|
||||
asm volatile ("cli");
|
||||
asm volatile("cli");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* write high bits to Paradise register 3CE indx 0xD, bits 3-4 */
|
||||
alter_vga_register(0x3CE, 0x0D, 0x18, a>>15);
|
||||
alter_vga_register(0x3CE, 0x0D, 0x18, a >> 15);
|
||||
|
||||
/* write to normal VGA address registers */
|
||||
write_vga_register(0x3D4, 0x0D, (a>>2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a>>10) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0D, (a >> 2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a >> 10) & 0xFF);
|
||||
|
||||
asm volatile ("sti");
|
||||
asm volatile("sti");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
}
|
||||
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* CirrusSetBank32:
|
||||
* Relocatable bank switch function, called with a bank number in %edx.
|
||||
*/
|
||||
|
@ -599,11 +515,7 @@ asm ("
|
|||
*/
|
||||
void CirrusSetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _CirrusSetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _CirrusSetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
@ -660,14 +572,7 @@ asm ("
|
|||
*/
|
||||
void ParadiseSetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _ParadiseSetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _ParadiseSetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
388
s3/driver.c
388
s3/driver.c
|
@ -16,22 +16,19 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
// #define NO_HWPTR
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "../vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void SetBank32();
|
||||
void SetBank32End();
|
||||
int ExtStub();
|
||||
void SetBank32( );
|
||||
void SetBank32End( );
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -39,22 +36,21 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
void SetBank(AF_DRIVER *af, long bank);
|
||||
void BitBlt(AF_DRIVER *af, long left, long top, long width, long height, long dstLeft, long dstTop, long op);
|
||||
void BitBltSys(AF_DRIVER *af, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op);
|
||||
void BitBlt(AF_DRIVER *af, long left, long top, long width, long height,
|
||||
long dstLeft, long dstTop, long op);
|
||||
void BitBltSys(AF_DRIVER *af, void *srcAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft, long dstTop,
|
||||
long op);
|
||||
void WaitTillIdle(AF_DRIVER *af);
|
||||
|
||||
|
||||
|
||||
#define S86c911A 0x82
|
||||
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -66,15 +62,11 @@ int af_scroll_y;
|
|||
int af_bank;
|
||||
int af_chipid;
|
||||
|
||||
|
||||
/* FreeBE/AF extension allowing farptr access to video memory */
|
||||
FAF_HWPTR_DATA hwptr;
|
||||
|
||||
|
||||
|
||||
/* list of available video modes */
|
||||
typedef struct VIDEO_MODE
|
||||
{
|
||||
typedef struct VIDEO_MODE {
|
||||
int w, h;
|
||||
int bpp;
|
||||
int num;
|
||||
|
@ -89,56 +81,46 @@ typedef struct VIDEO_MODE
|
|||
int rsvdpos;
|
||||
} VIDEO_MODE;
|
||||
|
||||
|
||||
VIDEO_MODE mode_list[] =
|
||||
{
|
||||
VIDEO_MODE mode_list[] = {
|
||||
{ 640, 400, 8, 0x100, 640 },
|
||||
{ 640, 480, 8, 0x101, 640 },
|
||||
{ 800, 600, 8, 0x103, 800 },
|
||||
{ 1024, 768, 8, 0x105, 1024 },
|
||||
{ 1280, 1024, 8, 0x107, 1280 },
|
||||
{ 640, 480, 15, 0x110, 1280,5,10,5,5,5,0,0,0},
|
||||
{ 800, 600, 15, 0x113, 1600,5,10,5,5,5,0,0,0},
|
||||
{ 1024, 768, 15, 0x116, 2048,5,10,5,5,5,0,0,0},
|
||||
{ 1280, 1024, 15, 0x119, 2560,5,10,5,5,5,0,0,0},
|
||||
{ 640, 480, 16, 0x111, 1024,5,11,6,5,5,0,0,0},
|
||||
{ 800, 600, 16, 0x114, 1600,5,11,6,5,5,0,0,0},
|
||||
{ 1024, 768, 16, 0x117, 2048,5,11,6,5,5,0,0,0},
|
||||
{ 1280, 1024, 16, 0x11A, 2560,5,11,6,5,5,0,0,0},
|
||||
{ 640, 480, 32, 0x112, 2048,8,16,8,8,8,0,0,0},
|
||||
{ 800, 600, 32, 0x115, 3200,8,16,8,8,8,0,0,0},
|
||||
{ 1024, 768, 32, 0x118, 4096,8,16,8,8,8,0,0,0}
|
||||
{ 640, 480, 15, 0x110, 1280, 5, 10, 5, 5, 5, 0, 0, 0 },
|
||||
{ 800, 600, 15, 0x113, 1600, 5, 10, 5, 5, 5, 0, 0, 0 },
|
||||
{ 1024, 768, 15, 0x116, 2048, 5, 10, 5, 5, 5, 0, 0, 0 },
|
||||
{ 1280, 1024, 15, 0x119, 2560, 5, 10, 5, 5, 5, 0, 0, 0 },
|
||||
{ 640, 480, 16, 0x111, 1024, 5, 11, 6, 5, 5, 0, 0, 0 },
|
||||
{ 800, 600, 16, 0x114, 1600, 5, 11, 6, 5, 5, 0, 0, 0 },
|
||||
{ 1024, 768, 16, 0x117, 2048, 5, 11, 6, 5, 5, 0, 0, 0 },
|
||||
{ 1280, 1024, 16, 0x11A, 2560, 5, 11, 6, 5, 5, 0, 0, 0 },
|
||||
{ 640, 480, 32, 0x112, 2048, 8, 16, 8, 8, 8, 0, 0, 0 },
|
||||
{ 800, 600, 32, 0x115, 3200, 8, 16, 8, 8, 8, 0, 0, 0 },
|
||||
{ 1024, 768, 32, 0x118, 4096, 8, 16, 8, 8, 8, 0, 0, 0 }
|
||||
};
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list) / sizeof(VIDEO_MODE))
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list)/sizeof(VIDEO_MODE))
|
||||
short available_modes[NUM_MODES + 1] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, -1 };
|
||||
|
||||
|
||||
short available_modes[NUM_MODES+1] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
13, 14, 15, 16, -1 };
|
||||
|
||||
|
||||
|
||||
void mod_vga_register_bits ( int reg, int m, int mask, int nwv )
|
||||
{
|
||||
int temp = (read_vga_register(reg,m) & (!mask))+(nwv & mask);
|
||||
void mod_vga_register_bits(int reg, int m, int mask, int nwv) {
|
||||
int temp = (read_vga_register(reg, m) & (!mask)) + (nwv & mask);
|
||||
write_vga_register(reg, m, temp);
|
||||
};
|
||||
|
||||
void set_vga_register_bits ( int reg, int m, int b )
|
||||
{
|
||||
int x = read_vga_register(reg,m);
|
||||
void set_vga_register_bits(int reg, int m, int b) {
|
||||
int x = read_vga_register(reg, m);
|
||||
write_vga_register(reg, m, x | b);
|
||||
};
|
||||
|
||||
void clear_vga_register_bits ( int reg, int m, int b )
|
||||
{
|
||||
int x = read_vga_register(reg,m);
|
||||
void clear_vga_register_bits(int reg, int m, int b) {
|
||||
int x = read_vga_register(reg, m);
|
||||
write_vga_register(reg, m, x & (!b));
|
||||
};
|
||||
|
||||
void accelIT ( void )
|
||||
{
|
||||
void accelIT(void) {
|
||||
write_vga_register(0x3D4, 0x38, 0x48);
|
||||
write_vga_register(0x3D4, 0x39, 0xA5);
|
||||
clear_vga_register_bits(0x3D4, 0x58, 0x14);
|
||||
|
@ -148,34 +130,31 @@ void accelIT ( void )
|
|||
outportw(0xBEE8, 0xE000);
|
||||
outportw(0xAAE8, 0xFFFF);
|
||||
outportw(0xAEE8, 0xFFFF);
|
||||
if ( af_bpp >= 24 ) {
|
||||
if (af_bpp >= 24) {
|
||||
outportw(0xBEE8, 0xE010);
|
||||
outportw(0xAAE8, 0xFFFF);
|
||||
outportw(0xAEE8, 0xFFFF);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
void unaccelIT ( void )
|
||||
{
|
||||
void unaccelIT(void) {
|
||||
write_vga_register(0x3D4, 0x38, 0x48); /* unlock cr38 */
|
||||
write_vga_register(0x3D4, 0x39, 0xA5); /* unlock cr39 */
|
||||
if ( read_vga_register(0x3D4, 0x40) )
|
||||
do ; while ( inportw(0x9AE8) & 0x200 ); /* if graph. procesor is busy (9bit)*/
|
||||
if (read_vga_register(0x3D4, 0x40)) do
|
||||
;
|
||||
while (inportw(0x9AE8) & 0x200); /* if graph. procesor is busy (9bit)*/
|
||||
clear_vga_register_bits(0x3D4, 0x40, 1); /* not enhanced reg access */
|
||||
set_vga_register_bits(0x3D4, 0x40, 8); /* enable fast write buffer (3bit) */
|
||||
};
|
||||
|
||||
int readchipid ( void )
|
||||
{
|
||||
int readchipid(void) {
|
||||
return read_vga_register(0x3d4, 0x30);
|
||||
};
|
||||
|
||||
/* detect:
|
||||
* Detects the presence of a S3 card.
|
||||
*/
|
||||
int detect()
|
||||
{
|
||||
int detect( ) {
|
||||
int old;
|
||||
int result = FALSE;
|
||||
|
||||
|
@ -185,7 +164,7 @@ int detect()
|
|||
write_vga_register(0x3D4, 0x38, 0x48); /* enable ext. */
|
||||
if (test_vga_register(0x3D4, 0x35, 0xF)) /* test again */
|
||||
result = TRUE; /* found it */
|
||||
af_chipid = readchipid();
|
||||
af_chipid = readchipid( );
|
||||
}
|
||||
|
||||
write_vga_register(0x3D4, 0x38, old);
|
||||
|
@ -193,28 +172,21 @@ int detect()
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* Fills in our driver header block.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
int vram_size;
|
||||
|
||||
if (!detect())
|
||||
return 1;
|
||||
if (!detect( )) return 1;
|
||||
|
||||
if (get_vesa_info(&vram_size, NULL, NULL) != 0)
|
||||
return -1;
|
||||
if (get_vesa_info(&vram_size, NULL, NULL) != 0) return -1;
|
||||
|
||||
af->AvailableModes = available_modes;
|
||||
|
||||
af->TotalMemory = vram_size/1024;
|
||||
af->TotalMemory = vram_size / 1024;
|
||||
|
||||
af->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveAccel2D |
|
||||
af->Attributes = (afHaveMultiBuffer | afHaveVirtualScroll | afHaveAccel2D |
|
||||
afHaveBankedBuffer);
|
||||
|
||||
af->BankSize = 64;
|
||||
|
@ -237,7 +209,7 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->SetPaletteData = SetPaletteData;
|
||||
af->SetBank = SetBank;
|
||||
|
||||
// af->WaitTillIdle = WaitTillIdle;
|
||||
// af->WaitTillIdle = WaitTillIdle;
|
||||
af->Set8x8MonoPattern = NULL;
|
||||
af->DrawScan = NULL;
|
||||
af->DrawPattScan = NULL;
|
||||
|
@ -252,14 +224,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
hwptr_init(hwptr.IOMemMaps[0], af->IOMemMaps[0]);
|
||||
hwptr_init(hwptr.IOMemMaps[1], af->IOMemMaps[1]);
|
||||
hwptr_init(hwptr.IOMemMaps[2], af->IOMemMaps[2]);
|
||||
|
@ -270,78 +239,63 @@ int InitDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
#ifndef NO_HWPTR
|
||||
#ifndef NO_HWPTR
|
||||
|
||||
case FAFEXT_HWPTR:
|
||||
/* allow farptr access to video memory */
|
||||
return &hwptr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
VIDEO_MODE *info;
|
||||
int i;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
for (i=0; i<(int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
modeInfo->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
modeInfo->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
modeInfo->XResolution = info->w;
|
||||
modeInfo->YResolution = info->h;
|
||||
modeInfo->BitsPerPixel = info->bpp;
|
||||
|
||||
modeInfo->MaxBuffers = (af->TotalMemory*1024) /
|
||||
(info->w*info->h*BYTES_PER_PIXEL(info->bpp));
|
||||
modeInfo->MaxBuffers = (af->TotalMemory * 1024) /
|
||||
(info->w * info->h * BYTES_PER_PIXEL(info->bpp));
|
||||
|
||||
if (info->w > 1024) {
|
||||
modeInfo->MaxBytesPerScanLine = 2048*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine = 2048 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 2048;
|
||||
}
|
||||
else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024*BYTES_PER_PIXEL(info->bpp);
|
||||
} else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
}
|
||||
|
||||
modeInfo->BytesPerScanLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BytesPerScanLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
modeInfo->RedMaskSize = info->redsize;
|
||||
|
@ -370,13 +324,11 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
int noclear = ((mode & 0x8000) != 0);
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
|
@ -385,55 +337,48 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
RM_REGS r;
|
||||
|
||||
/* reject anything with hardware stereo or linear framebuffer */
|
||||
if (mode & 0x4400)
|
||||
return -1;
|
||||
if (mode & 0x4400) return -1;
|
||||
|
||||
mode &= 0x3FF;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
/* call VESA to set the mode */
|
||||
r.x.ax = 0x4F02;
|
||||
r.x.bx = info->num;
|
||||
if (noclear)
|
||||
r.x.bx |= 0x8000;
|
||||
if (noclear) r.x.bx |= 0x8000;
|
||||
rm_int(0x10, &r);
|
||||
if (r.h.ah)
|
||||
return -1;
|
||||
if (r.h.ah) return -1;
|
||||
|
||||
|
||||
if (virtualX*BYTES_PER_PIXEL(info->bpp) > info->bpl) {
|
||||
if (virtualX * BYTES_PER_PIXEL(info->bpp) > info->bpl) {
|
||||
r.x.ax = 0x4F06;
|
||||
r.x.bx = 0;
|
||||
r.x.cx = virtualX;
|
||||
rm_int(0x10, &r);
|
||||
if (r.h.ah)
|
||||
return -1;
|
||||
if (r.h.ah) return -1;
|
||||
*bytesPerLine = r.x.bx;
|
||||
}
|
||||
else
|
||||
} else
|
||||
*bytesPerLine = info->bpl;
|
||||
|
||||
pitch = ((*bytesPerLine)*8)/info->bpp;
|
||||
/* write_vga_register(0x3D4, 0x13, pitch);*/
|
||||
pitch = ((*bytesPerLine) * 8) / info->bpp;
|
||||
/* write_vga_register(0x3D4, 0x13, pitch);*/
|
||||
clear_vga_register_bits(0x3D4, 0x50, 193);
|
||||
clear_vga_register_bits(0x3d4, 0x50, 48);
|
||||
|
||||
switch ( info->bpp ) {
|
||||
case 16 : set_vga_register_bits(0x3D4, 0x50, 16); break;
|
||||
case 24 : set_vga_register_bits(0x3D4, 0x50, 32); break;
|
||||
case 32 : set_vga_register_bits(0x3D4, 0x50, 48); break;
|
||||
switch (info->bpp) {
|
||||
case 16: set_vga_register_bits(0x3D4, 0x50, 16); break;
|
||||
case 24: set_vga_register_bits(0x3D4, 0x50, 32); break;
|
||||
case 32: set_vga_register_bits(0x3D4, 0x50, 48); break;
|
||||
};
|
||||
|
||||
switch ( pitch ) {
|
||||
case 640 : set_vga_register_bits(0x3D4, 0x50, 64); break;
|
||||
case 800 : set_vga_register_bits(0x3D4, 0x50, 128); break;
|
||||
case 1152 : set_vga_register_bits(0x3D4, 0x50, 1); break;
|
||||
case 1280 : set_vga_register_bits(0x3D4, 0x50, 129); break;
|
||||
case 1600 : set_vga_register_bits(0x3D4, 0x50, 192); break;
|
||||
switch (pitch) {
|
||||
case 640: set_vga_register_bits(0x3D4, 0x50, 64); break;
|
||||
case 800: set_vga_register_bits(0x3D4, 0x50, 128); break;
|
||||
case 1152: set_vga_register_bits(0x3D4, 0x50, 1); break;
|
||||
case 1280: set_vga_register_bits(0x3D4, 0x50, 129); break;
|
||||
case 1600: set_vga_register_bits(0x3D4, 0x50, 192); break;
|
||||
};
|
||||
|
||||
/* adjust the virtual width for widescreen modes */
|
||||
|
@ -448,22 +393,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
af_scroll_y = 0;
|
||||
af_bank = -1;
|
||||
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
available_vram = af->TotalMemory*1024 ;
|
||||
available_vram = af->TotalMemory * 1024;
|
||||
|
||||
if (used_vram > available_vram)
|
||||
return -1;
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
}
|
||||
else {
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
af->OffscreenEndY = 0;
|
||||
|
@ -472,43 +415,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -516,114 +448,95 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
if (waitVRT >= 0) {
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) + ((y + af_visible_page*af_height) * af_width);
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) +
|
||||
((y + af_visible_page * af_height) * af_width);
|
||||
|
||||
asm volatile ("cli");
|
||||
asm volatile("cli");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* write high bits to S3-specific registers */
|
||||
write_vga_register(0x3D4, 0x38, 0x48);
|
||||
alter_vga_register(0x3D4, 0x31, 0x30, a>>14);
|
||||
alter_vga_register(0x3D4, 0x51, 0x03, a>>20);
|
||||
alter_vga_register(0x3D4, 0x31, 0x30, a >> 14);
|
||||
alter_vga_register(0x3D4, 0x51, 0x03, a >> 20);
|
||||
write_vga_register(0x3D4, 0x38, 0);
|
||||
|
||||
/* write to normal VGA address registers */
|
||||
write_vga_register(0x3D4, 0x0D, (a>>2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a>>10) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0D, (a >> 2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a >> 10) & 0xFF);
|
||||
|
||||
asm volatile ("sti");
|
||||
asm volatile("sti");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
}
|
||||
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetBank32:
|
||||
* Relocatable bank switch function, called with a bank number in %edx.
|
||||
*/
|
||||
|
@ -718,17 +631,13 @@ asm ("
|
|||
*/
|
||||
void SetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _SetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _SetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
||||
void WaitTillIdle(AF_DRIVER *af) {
|
||||
unaccelIT();
|
||||
unaccelIT( );
|
||||
};
|
||||
|
||||
|
||||
|
@ -739,7 +648,9 @@ void WaitTillIdle(AF_DRIVER *af) {
|
|||
*/
|
||||
void blitvram ( int srcx, int srcy, int dstx, int dsty, int dx, int dy, int dir )
|
||||
{
|
||||
do ; while ( inportb(0x9AE8) & 0xFF );
|
||||
do
|
||||
;
|
||||
while (inportb(0x9AE8) & 0xFF);
|
||||
outportw(0xBAE8, 0x67);
|
||||
outportw(0xBEE8, 0xA000);
|
||||
outportw(0x86E8, srcx);
|
||||
|
@ -747,35 +658,38 @@ void blitvram ( int srcx, int srcy, int dstx, int dsty, int dx, int dy, int dir
|
|||
outportw(0x8EE8, dstx);
|
||||
outportw(0x8AE8, dsty);
|
||||
|
||||
outportw(0x96E8, dx-1);
|
||||
outportw(0xBEE8, dy-1);
|
||||
do ; while ( inportb(0x9AE8) & 0xFF ); /* 0xc013 = 14,15,7,0,2 bits set */
|
||||
if ( dir ) outportw(0x9AE8, 0xC013); else outportw(0x9AE8, 0xC0F3);
|
||||
outportw(0x96E8, dx - 1);
|
||||
outportw(0xBEE8, dy - 1);
|
||||
do
|
||||
;
|
||||
while (inportb(0x9AE8) & 0xFF); /* 0xc013 = 14,15,7,0,2 bits set */
|
||||
if (dir)
|
||||
outportw(0x9AE8, 0xC013);
|
||||
else
|
||||
outportw(0x9AE8, 0xC0F3);
|
||||
/* 0xc0f3 = 14,15,8,5,1,0 bits set */
|
||||
};
|
||||
|
||||
void copyvram ( int srcx, int srcy, int dstx, int dsty, int dx, int dy )
|
||||
{
|
||||
int dir = 0;
|
||||
if ( dsty < srcy || ( srcy == dsty && dstx < srcx )) dir = 0;
|
||||
if (dsty < srcy || (srcy == dsty && dstx < srcx))
|
||||
dir = 0;
|
||||
else {
|
||||
dir = 1;
|
||||
srcx += dx-1;
|
||||
srcy += dy-1;
|
||||
dstx += dx-1;
|
||||
dsty += dy-1;
|
||||
srcx += dx - 1;
|
||||
srcy += dy - 1;
|
||||
dstx += dx - 1;
|
||||
dsty += dy - 1;
|
||||
};
|
||||
accelIT();
|
||||
accelIT( );
|
||||
blitvram(srcx, srcy, dstx, dsty, dx, dy, dir);
|
||||
if ( af_bpp > 8 && af_chipid <= S86c911A )
|
||||
blitvram(srcx+1024, srcy, dstx+1024, dsty, dx, dy, dir);
|
||||
unaccelIT();
|
||||
if (af_bpp > 8 && af_chipid <= S86c911A)
|
||||
blitvram(srcx + 1024, srcy, dstx + 1024, dsty, dx, dy, dir);
|
||||
unaccelIT( );
|
||||
};
|
||||
|
||||
void BitBlt(AF_DRIVER *af, long left, long top, long width, long height, long dstLeft, long dstTop, long op)
|
||||
{
|
||||
copyvram(left, top, dstLeft, dstTop, width, height);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
672
stub/driver.c
672
stub/driver.c
File diff suppressed because it is too large
Load Diff
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
1867
tgui/driver.c
1867
tgui/driver.c
File diff suppressed because it is too large
Load Diff
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0x100, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
0xFFFF, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
600
tgui/font.h
600
tgui/font.h
|
@ -6,261 +6,347 @@ terms and conditions of the FreeBE/AF project. */
|
|||
But don't use it for other driver without having clear if you can do it.
|
||||
*/
|
||||
|
||||
uchar VGA8x16Font[256*16]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7E,0x81,0xA5,0x81,0x81,0xBD,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7E,0xFF,0xDB,0xFF,0xFF,0xC3,0xE7,0xFF,0xFF,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x6C,0xFE,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x3C,0x3C,0xE7,0xE7,0xE7,0x99,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x3C,0x7E,0xFF,0xFF,0x7E,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00,0x00,0x00,0x00,0x00,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0x00,0x00,0x1E,0x0E,0x1A,0x32,0x78,0xCC,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3F,0x33,0x3F,0x30,0x30,0x30,0x30,0x70,0xF0,0xE0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7F,0x63,0x7F,0x63,0x63,0x63,0x63,0x67,0xE7,0xE6,0xC0,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x18,0xDB,0x3C,0xE7,0x3C,0xDB,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFE,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,
|
||||
0x00,0x02,0x06,0x0E,0x1E,0x3E,0xFE,0x3E,0x1E,0x0E,0x06,0x02,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7F,0xDB,0xDB,0xDB,0x7B,0x1B,0x1B,0x1B,0x1B,0x1B,0x00,0x00,0x00,0x00,
|
||||
0x00,0x7C,0xC6,0x60,0x38,0x6C,0xC6,0xC6,0x6C,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0xFE,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x7E,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0xFE,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xFE,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xFF,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x63,0x63,0x63,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0xFF,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xD6,0xD6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x0E,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xE6,0x66,0x6C,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC3,0xE7,0xFF,0xDB,0xDB,0xC3,0xC3,0xC3,0xC3,0xC3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,0x00,
|
||||
0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFF,0xDB,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x6C,0x6C,0x38,0x38,0x6C,0x6C,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFF,0xC3,0x83,0x06,0x0C,0x18,0x30,0x61,0xC3,0xFF,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3E,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x3E,0x00,0x00,0x00,0x00,
|
||||
0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,
|
||||
0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0xDC,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,0x00,
|
||||
0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00,
|
||||
0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xE6,0xFF,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x62,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x0C,0x06,0x7C,0x00,0x00,
|
||||
0x00,0x00,0xCC,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0C,0x18,0x30,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6C,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xCC,0xCC,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x38,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x0C,0x06,0x3C,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x3C,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0xC6,0xC6,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x38,0x6C,0x38,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x18,0x30,0x60,0x00,0xFE,0x66,0x60,0x7C,0x60,0x60,0x66,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x6E,0x3B,0x1B,0x7E,0xD8,0xDC,0x77,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3E,0x6C,0xCC,0xCC,0xFE,0xCC,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x30,0x78,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC6,0xC6,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00,
|
||||
0x00,0xC6,0xC6,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0xC6,0xC6,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x18,0x3C,0x66,0x60,0x60,0x60,0x66,0x3C,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xE6,0xFC,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xC3,0x66,0x3C,0x18,0x7E,0x18,0x7E,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0xFC,0x66,0x66,0x7C,0x62,0x66,0x6F,0x66,0x66,0x66,0xF3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0E,0x1B,0x18,0x18,0x18,0x7E,0x18,0x18,0x18,0x18,0x18,0xD8,0x70,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0C,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x76,0xDC,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x76,0xDC,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x3C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xC0,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x60,0xCE,0x93,0x06,0x0C,0x1F,0x00,0x00,
|
||||
0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x66,0xCE,0x9A,0x3F,0x06,0x0F,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3C,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x33,0x66,0xCC,0x66,0x33,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xCC,0x66,0x33,0x66,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,
|
||||
0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,
|
||||
0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x3F,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
|
||||
0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0xD8,0xD8,0xD8,0xDC,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xDC,0xC6,0xC3,0xC3,0xC3,0xCE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xFE,0xC6,0xC6,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x80,0xFE,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0xFE,0xC6,0x60,0x30,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7E,0xD8,0xD8,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xC0,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x76,0xDC,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7E,0x18,0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x6C,0x6C,0x6C,0xEE,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1E,0x30,0x18,0x0C,0x3E,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7E,0xDB,0xDB,0xDB,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x03,0x06,0x7E,0xCF,0xDB,0xF3,0x7E,0x60,0xC0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1C,0x30,0x60,0x60,0x7C,0x60,0x60,0x60,0x30,0x1C,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0xFF,0x18,0x18,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00,0x7E,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0xFF,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0xEC,0x6C,0x6C,0x3C,0x1C,0x00,0x00,0x00,0x00,
|
||||
0x00,0xD8,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x70,0x98,0x30,0x60,0xC8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
uchar VGA8x16Font[256 * 16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81, 0x81, 0xBD,
|
||||
0x99, 0x81, 0x81, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF,
|
||||
0xDB, 0xFF, 0xFF, 0xC3, 0xE7, 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x6C, 0xFE, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7C, 0xFE,
|
||||
0x7C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
||||
0x3C, 0x3C, 0xE7, 0xE7, 0xE7, 0x99, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x7E, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C,
|
||||
0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x99, 0xBD,
|
||||
0xBD, 0x99, 0xC3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x1E, 0x0E,
|
||||
0x1A, 0x32, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x30,
|
||||
0x30, 0x70, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x63,
|
||||
0x7F, 0x63, 0x63, 0x63, 0x63, 0x67, 0xE7, 0xE6, 0xC0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x18, 0x18, 0xDB, 0x3C, 0xE7, 0x3C, 0xDB, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFE, 0xF8,
|
||||
0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0E,
|
||||
0x1E, 0x3E, 0xFE, 0x3E, 0x1E, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
|
||||
0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xDB,
|
||||
0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7C, 0xC6, 0x60, 0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x38, 0x0C, 0xC6,
|
||||
0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C,
|
||||
0x7E, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7C, 0x7C, 0xFE, 0xFE, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x7C, 0x7C,
|
||||
0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x63, 0x63, 0x22, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C,
|
||||
0x6C, 0xFE, 0x6C, 0x6C, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x18, 0x7C, 0xC6, 0xC2, 0xC0, 0x7C, 0x06, 0x86, 0xC6, 0x7C, 0x18,
|
||||
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xC6, 0x0C, 0x18,
|
||||
0x30, 0x60, 0xC6, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C,
|
||||
0x6C, 0x38, 0x76, 0xDC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xFF,
|
||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x02, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xD6, 0xD6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6,
|
||||
0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0x06, 0x06, 0x3C, 0x06, 0x06, 0x06, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x1C, 0x3C, 0x6C, 0xCC, 0xFE,
|
||||
0x0C, 0x0C, 0x0C, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC0,
|
||||
0xC0, 0xC0, 0xFC, 0x0E, 0x06, 0x06, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x60, 0xC0, 0xC0, 0xFC, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC6, 0x06, 0x06, 0x0C, 0x18,
|
||||
0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6,
|
||||
0xC6, 0xC6, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x06, 0x06, 0x0C, 0x78,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
|
||||
0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00,
|
||||
0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
|
||||
0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0x0C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xDE, 0xDE,
|
||||
0xDE, 0xDC, 0xC0, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38,
|
||||
0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x66, 0x66, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC2, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x6C,
|
||||
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68,
|
||||
0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66,
|
||||
0xC2, 0xC0, 0xC0, 0xDE, 0xC6, 0xC6, 0x66, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0C,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xE6, 0x66, 0x6C, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0x66, 0xE6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x60, 0x62, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0xE7,
|
||||
0xFF, 0xDB, 0xDB, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x66,
|
||||
0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xDE, 0x7C,
|
||||
0x0C, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x6C,
|
||||
0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6,
|
||||
0xC6, 0x60, 0x38, 0x0C, 0x06, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xDB, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xDB, 0xDB, 0xFF, 0x66, 0x66,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x6C, 0x6C, 0x38, 0x38,
|
||||
0x6C, 0x6C, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66,
|
||||
0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xC3, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x61, 0xC3, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x30, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x3E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00,
|
||||
0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x60,
|
||||
0x60, 0x78, 0x6C, 0x66, 0x66, 0x66, 0x66, 0xDC, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC0, 0xC0, 0xC0, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x0C, 0x0C, 0x3C, 0x6C, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xF0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xCC, 0x78, 0x00, 0x00, 0x00, 0xE0, 0x60,
|
||||
0x60, 0x6C, 0x76, 0x66, 0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0E, 0x06, 0x06,
|
||||
0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0xE0, 0x60,
|
||||
0x60, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0xDB,
|
||||
0xDB, 0xDB, 0xDB, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x66, 0x66,
|
||||
0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x76, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0x0C, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x76, 0x62, 0x60, 0x60, 0x60, 0xF0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0x60,
|
||||
0x38, 0x0C, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30,
|
||||
0x30, 0xFC, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66,
|
||||
0x66, 0x66, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC3, 0xC3, 0xC3, 0xDB, 0xDB, 0xFF, 0x66, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0x6C, 0x38, 0x38, 0x38, 0x6C, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFE, 0xCC, 0x18, 0x30, 0x60, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0E, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18,
|
||||
0x18, 0x18, 0x0E, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6,
|
||||
0xC6, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66,
|
||||
0xC2, 0xC0, 0xC0, 0xC0, 0xC2, 0x66, 0x3C, 0x0C, 0x06, 0x7C, 0x00, 0x00,
|
||||
0x00, 0x00, 0xCC, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x00, 0x7C, 0xC6, 0xFE,
|
||||
0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C,
|
||||
0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xCC, 0xCC, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x38,
|
||||
0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x60, 0x66, 0x3C, 0x0C, 0x06,
|
||||
0x3C, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xFE,
|
||||
0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6,
|
||||
0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x60, 0x30, 0x18, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x66,
|
||||
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x10, 0x38, 0x6C, 0xC6, 0xC6,
|
||||
0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x38, 0x00,
|
||||
0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x30, 0x60, 0x00, 0xFE, 0x66, 0x60, 0x7C, 0x60, 0x60, 0x66, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x3B, 0x1B,
|
||||
0x7E, 0xD8, 0xDC, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x6C,
|
||||
0xCC, 0xCC, 0xFE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x00, 0x7C, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18,
|
||||
0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x78, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xCC, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6,
|
||||
0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0x78, 0x00,
|
||||
0x00, 0xC6, 0xC6, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0xC6, 0x6C, 0x38,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0x00, 0xC6, 0xC6, 0xC6, 0xC6,
|
||||
0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C,
|
||||
0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xE6, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x66, 0x3C, 0x18, 0x7E, 0x18,
|
||||
0x7E, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x66, 0x66,
|
||||
0x7C, 0x62, 0x66, 0x6F, 0x66, 0x66, 0x66, 0xF3, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0E, 0x1B, 0x18, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0xD8, 0x70, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30,
|
||||
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x30, 0x60, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xCC, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC,
|
||||
0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00,
|
||||
0x76, 0xDC, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x6C,
|
||||
0x38, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xC0, 0xC6, 0xC6, 0x7C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFE, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30, 0x60, 0xCE, 0x93, 0x06,
|
||||
0x0C, 0x1F, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30,
|
||||
0x66, 0xCE, 0x9A, 0x3F, 0x06, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
|
||||
0x00, 0x18, 0x18, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x66, 0x33,
|
||||
0x66, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x44, 0x11, 0x44,
|
||||
0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44,
|
||||
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA,
|
||||
0x55, 0xAA, 0x55, 0xAA, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77,
|
||||
0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0xF8,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x06, 0xF6,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x76, 0xDC, 0xD8, 0xD8, 0xD8, 0xDC, 0x76, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xDC, 0xC6, 0xC3, 0xC3, 0xC3, 0xCE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC6, 0xC6, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFE, 0xC6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xC6, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xD8, 0xD8,
|
||||
0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x66, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xC0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x18, 0x3C, 0x66, 0x66,
|
||||
0x66, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x6C, 0x6C, 0x6C, 0xEE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x30, 0x18, 0x0C, 0x3E, 0x66,
|
||||
0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7E, 0xDB, 0xDB, 0xDB, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x06, 0x7E, 0xCF, 0xDB, 0xF3, 0x7E, 0x60, 0xC0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x30, 0x60, 0x60, 0x7C, 0x60,
|
||||
0x60, 0x60, 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C,
|
||||
0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xFF, 0x18,
|
||||
0x18, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
|
||||
0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, 0x7E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0xFF, 0x00, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x00,
|
||||
0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0x6C,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0C, 0x0C,
|
||||
0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x6C, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xD8, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x98, 0x30, 0x60, 0xC8, 0xF8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
|
150
tgui/regs.h
150
tgui/regs.h
|
@ -20,125 +20,123 @@ terms and conditions of the FreeBE/AF project. */
|
|||
/* ATT Attribute Controller Registers
|
||||
They control some attributes like 16 colors palette, overscan color, etc.
|
||||
0x00 to 0x14 */
|
||||
#define ATTbase (CRTbase+CRTcant)
|
||||
#define ATTbase (CRTbase + CRTcant)
|
||||
#define ATTcant 21
|
||||
/* GRA Graphics Controller Registers
|
||||
They control the read/write mode to the video memory.
|
||||
0x00 to 0x08 */
|
||||
#define GRAbase (ATTbase+ATTcant)
|
||||
#define GRAbase (ATTbase + ATTcant)
|
||||
#define GRAcant 9
|
||||
/* SEQ Sequence Registers
|
||||
They control how the memory is scanned.
|
||||
0x00 to 0x04 */
|
||||
#define SEQbase (GRAbase+GRAcant)
|
||||
#define SEQbase (GRAbase + GRAcant)
|
||||
#define SEQcant 5
|
||||
/* MOR Miscellaneous Output Register
|
||||
1 register */
|
||||
#define MORbase (SEQbase+SEQcant)
|
||||
#define MORbase (SEQbase + SEQcant)
|
||||
#define MORcant 1
|
||||
|
||||
#define VGARegsCant (MORbase+MORcant)
|
||||
#define VGARegsCant (MORbase + MORcant)
|
||||
|
||||
/* Status values: Here I store special status values that doesn't
|
||||
correspond to a physical register but to an operation plus some
|
||||
special registers */
|
||||
#define SPbase 0
|
||||
#define SPcant 12
|
||||
#define OldNewStatus SPbase+0
|
||||
#define ALT_BNK_WRITE SPbase+1
|
||||
#define ALT_BNK_READ SPbase+2
|
||||
#define ALT_CLK SPbase+3
|
||||
#define DAC_3C6 SPbase+4
|
||||
#define DAC_3C6_4th SPbase+5
|
||||
#define DAC_WR_ADD SPbase+6
|
||||
#define MCLKLOW SPbase+7
|
||||
#define MCLKHIG SPbase+8
|
||||
#define VCLKLOW SPbase+9
|
||||
#define VCLKHIG SPbase+10
|
||||
#define DAC_INDEX SPbase+11
|
||||
#define OldNewStatus SPbase + 0
|
||||
#define ALT_BNK_WRITE SPbase + 1
|
||||
#define ALT_BNK_READ SPbase + 2
|
||||
#define ALT_CLK SPbase + 3
|
||||
#define DAC_3C6 SPbase + 4
|
||||
#define DAC_3C6_4th SPbase + 5
|
||||
#define DAC_WR_ADD SPbase + 6
|
||||
#define MCLKLOW SPbase + 7
|
||||
#define MCLKHIG SPbase + 8
|
||||
#define VCLKLOW SPbase + 9
|
||||
#define VCLKHIG SPbase + 10
|
||||
#define DAC_INDEX SPbase + 11
|
||||
/* ESEQ Extra Sequence Registers
|
||||
0x08 to 0x0F (They have some tricks) */
|
||||
#define ESEQbase (SPbase+SPcant)
|
||||
#define ESEQbase (SPbase + SPcant)
|
||||
#define ESEQcant 5
|
||||
#define ESEQ_0D_old ESEQbase+0
|
||||
#define ESEQ_0E_old ESEQbase+1
|
||||
#define ESEQ_0D_new ESEQbase+2
|
||||
#define ESEQ_0E_new ESEQbase+3
|
||||
#define ESEQ_0F ESEQbase+4
|
||||
#define ESEQ_0D_old ESEQbase + 0
|
||||
#define ESEQ_0E_old ESEQbase + 1
|
||||
#define ESEQ_0D_new ESEQbase + 2
|
||||
#define ESEQ_0E_new ESEQbase + 3
|
||||
#define ESEQ_0F ESEQbase + 4
|
||||
/* ECRT Extra CRT Registers
|
||||
0x19 to 0x50 */
|
||||
#define ECRTbase (ESEQbase+ESEQcant)
|
||||
#define ECRTbase (ESEQbase + ESEQcant)
|
||||
#define ECRTcant 33
|
||||
#define ECRT_19 ECRTbase
|
||||
#define ECRT_1E ECRTbase+1
|
||||
#define ECRT_1F ECRTbase+2
|
||||
#define ECRT_20 ECRTbase+3
|
||||
#define ECRT_21 ECRTbase+4
|
||||
#define ECRT_22 ECRTbase+5
|
||||
#define ECRT_23 ECRTbase+6
|
||||
#define ECRT_24 ECRTbase+7
|
||||
#define ECRT_25 ECRTbase+8
|
||||
#define ECRT_26 ECRTbase+9
|
||||
#define ECRT_27 ECRTbase+10
|
||||
#define ECRT_28 ECRTbase+11
|
||||
#define ECRT_29 ECRTbase+12
|
||||
#define ECRT_2A ECRTbase+13
|
||||
#define ECRT_2C ECRTbase+14
|
||||
#define ECRT_2F ECRTbase+15
|
||||
#define ECRT_30 ECRTbase+16
|
||||
#define ECRT_33 ECRTbase+17
|
||||
#define ECRT_34 ECRTbase+18
|
||||
#define ECRT_35 ECRTbase+19
|
||||
#define ECRT_36 ECRTbase+20
|
||||
#define ECRT_37 ECRTbase+21
|
||||
#define ECRT_38 ECRTbase+22
|
||||
#define ECRT_39 ECRTbase+23
|
||||
#define ECRT_40 ECRTbase+24
|
||||
#define ECRT_41 ECRTbase+25
|
||||
#define ECRT_42 ECRTbase+26
|
||||
#define ECRT_43 ECRTbase+27
|
||||
#define ECRT_44 ECRTbase+28
|
||||
#define ECRT_45 ECRTbase+29
|
||||
#define ECRT_46 ECRTbase+30
|
||||
#define ECRT_47 ECRTbase+31
|
||||
#define ECRT_50 ECRTbase+32
|
||||
#define ECRT_1E ECRTbase + 1
|
||||
#define ECRT_1F ECRTbase + 2
|
||||
#define ECRT_20 ECRTbase + 3
|
||||
#define ECRT_21 ECRTbase + 4
|
||||
#define ECRT_22 ECRTbase + 5
|
||||
#define ECRT_23 ECRTbase + 6
|
||||
#define ECRT_24 ECRTbase + 7
|
||||
#define ECRT_25 ECRTbase + 8
|
||||
#define ECRT_26 ECRTbase + 9
|
||||
#define ECRT_27 ECRTbase + 10
|
||||
#define ECRT_28 ECRTbase + 11
|
||||
#define ECRT_29 ECRTbase + 12
|
||||
#define ECRT_2A ECRTbase + 13
|
||||
#define ECRT_2C ECRTbase + 14
|
||||
#define ECRT_2F ECRTbase + 15
|
||||
#define ECRT_30 ECRTbase + 16
|
||||
#define ECRT_33 ECRTbase + 17
|
||||
#define ECRT_34 ECRTbase + 18
|
||||
#define ECRT_35 ECRTbase + 19
|
||||
#define ECRT_36 ECRTbase + 20
|
||||
#define ECRT_37 ECRTbase + 21
|
||||
#define ECRT_38 ECRTbase + 22
|
||||
#define ECRT_39 ECRTbase + 23
|
||||
#define ECRT_40 ECRTbase + 24
|
||||
#define ECRT_41 ECRTbase + 25
|
||||
#define ECRT_42 ECRTbase + 26
|
||||
#define ECRT_43 ECRTbase + 27
|
||||
#define ECRT_44 ECRTbase + 28
|
||||
#define ECRT_45 ECRTbase + 29
|
||||
#define ECRT_46 ECRTbase + 30
|
||||
#define ECRT_47 ECRTbase + 31
|
||||
#define ECRT_50 ECRTbase + 32
|
||||
/* EGRA Extra Graphics Controller Registers
|
||||
0x0E, 0x0F, 0x23 and 0x2F */
|
||||
#define EGRAbase (ECRTbase+ECRTcant)
|
||||
#define EGRAbase (ECRTbase + ECRTcant)
|
||||
#define EGRAcant 4
|
||||
#define EGRA_0E_old EGRAbase
|
||||
#define EGRA_0F EGRAbase+1
|
||||
#define EGRA_23 EGRAbase+2
|
||||
#define EGRA_2F EGRAbase+3
|
||||
#define EGRA_0F EGRAbase + 1
|
||||
#define EGRA_23 EGRAbase + 2
|
||||
#define EGRA_2F EGRAbase + 3
|
||||
/* EDAC Extra DAC/Clk */
|
||||
#define EDACbase (EGRAbase+EGRAcant)
|
||||
#define EDACbase (EGRAbase + EGRAcant)
|
||||
#define EDACcant 4
|
||||
#define EDAC_00 EDACbase+0
|
||||
#define EDAC_01 EDACbase+1
|
||||
#define EDAC_02 EDACbase+2
|
||||
#define EDAC_03 EDACbase+3
|
||||
#define EDAC_00 EDACbase + 0
|
||||
#define EDAC_01 EDACbase + 1
|
||||
#define EDAC_02 EDACbase + 2
|
||||
#define EDAC_03 EDACbase + 3
|
||||
/* GER Graphics Engine Register. Only the relevant stuff */
|
||||
/* 0x22 and 0x23 */
|
||||
#define GERbase (EDACbase+EDACcant)
|
||||
#define GERbase (EDACbase + EDACcant)
|
||||
#define GERcant 6
|
||||
#define GER_22 GERbase+0
|
||||
#define GER_23 GERbase+1
|
||||
#define GER_44 GERbase+2
|
||||
#define GER_45 GERbase+3
|
||||
#define GER_46 GERbase+4
|
||||
#define GER_47 GERbase+5
|
||||
#define GER_22 GERbase + 0
|
||||
#define GER_23 GERbase + 1
|
||||
#define GER_44 GERbase + 2
|
||||
#define GER_45 GERbase + 3
|
||||
#define GER_46 GERbase + 4
|
||||
#define GER_47 GERbase + 5
|
||||
|
||||
#define SVGARegsCant (GERbase+GERcant)
|
||||
#define SVGARegsCant (GERbase + GERcant)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int VGASaveRegs(uchar *regs, uchar *Sregs);
|
||||
void VGALoadRegs(const uchar *regs,const uchar *Sregs);
|
||||
void VGALoadRegs(const uchar *regs, const uchar *Sregs);
|
||||
void TGUI9440SaveRegs(uchar *regs);
|
||||
void TGUI9440LoadRegs(const uchar *regs);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
343
tgui/rw_regs.c
343
tgui/rw_regs.c
|
@ -7,11 +7,11 @@ terms and conditions of the FreeBE/AF project. */
|
|||
|
||||
*****************************************************************************/
|
||||
|
||||
#include <pc.h>
|
||||
#include "mytypes.h"
|
||||
#include "regs.h"
|
||||
#include "vga.h"
|
||||
#include "tgui.h"
|
||||
#include "vga.h"
|
||||
#include <pc.h>
|
||||
|
||||
//#include <stdio.h>
|
||||
|
||||
|
@ -24,96 +24,88 @@ are not needed to store.
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
void TGUI9440SaveRegs(uchar *regs)
|
||||
{
|
||||
void TGUI9440SaveRegs(uchar *regs) {
|
||||
int Old_New;
|
||||
int i,Protect,DACaccess,DACaddress;
|
||||
int i, Protect, DACaccess, DACaddress;
|
||||
|
||||
/* Extended Sequencer */
|
||||
/* 8 is an status (old/new mode, field under scaning, FIFO in use) */
|
||||
Old_New=ReadSEQ(8);
|
||||
regs[OldNewStatus]=Old_New;
|
||||
Old_New = ReadSEQ(8);
|
||||
regs[OldNewStatus] = Old_New;
|
||||
/* 9 is the revision code, A reserved, B chip ID */
|
||||
/* Enter in old mode */
|
||||
WriteSEQ(0xB,0);
|
||||
regs[ESEQ_0D_old]=ReadSEQ(0xD);
|
||||
regs[ESEQ_0E_old]=ReadSEQ(0xE);
|
||||
regs[EGRA_0E_old]=ReadGRA(0xE);
|
||||
WriteSEQ(0xB, 0);
|
||||
regs[ESEQ_0D_old] = ReadSEQ(0xD);
|
||||
regs[ESEQ_0E_old] = ReadSEQ(0xE);
|
||||
regs[EGRA_0E_old] = ReadGRA(0xE);
|
||||
/* Enter in new mode */
|
||||
ReadSEQ(0xB);
|
||||
regs[ESEQ_0D_new]=ReadSEQ(0xD);
|
||||
//fprintf(stderr,"Lectura: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
Protect=
|
||||
regs[ESEQ_0E_new]=ReadSEQ(0xE);
|
||||
regs[ESEQ_0F] =ReadSEQ(0xF);
|
||||
regs[ESEQ_0D_new] = ReadSEQ(0xD);
|
||||
// fprintf(stderr,"Lectura: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
Protect = regs[ESEQ_0E_new] = ReadSEQ(0xE);
|
||||
regs[ESEQ_0F] = ReadSEQ(0xF);
|
||||
/* Unprotect the registers */
|
||||
WriteSEQ(0xE,Protect | 0x80);
|
||||
WriteSEQ(0xE, Protect | 0x80);
|
||||
|
||||
DACaccess=
|
||||
regs[EGRA_0F]=ReadGRA(0xF);
|
||||
regs[EGRA_23]=ReadGRA(0x23);
|
||||
regs[EGRA_2F]=ReadGRA(0x2F);
|
||||
DACaccess = regs[EGRA_0F] = ReadGRA(0xF);
|
||||
regs[EGRA_23] = ReadGRA(0x23);
|
||||
regs[EGRA_2F] = ReadGRA(0x2F);
|
||||
/* Enable access to the DAC */
|
||||
WriteGRA(0xF,DACaccess | 4);
|
||||
WriteGRA(0xF, DACaccess | 4);
|
||||
|
||||
/* These are alternative registers so I don't know if I really need to
|
||||
store your content */
|
||||
regs[ALT_BNK_WRITE]=inportb(0x3D8);
|
||||
regs[ALT_BNK_READ] =inportb(0x3D9);
|
||||
regs[ALT_CLK] =inportb(0x3DB);
|
||||
|
||||
regs[ALT_BNK_WRITE] = inportb(0x3D8);
|
||||
regs[ALT_BNK_READ] = inportb(0x3D9);
|
||||
regs[ALT_CLK] = inportb(0x3DB);
|
||||
|
||||
/* These extended register are located in the CRT space but they aren't
|
||||
contiguous */
|
||||
regs[ECRTbase]=ReadCRT(0x19); // 0 (0x19)
|
||||
for (i=1; i<14; i++)
|
||||
regs[ECRTbase+i]=ReadCRT(0x1D+i); // 1-13 (0x1D-0x2A)
|
||||
regs[ECRTbase+i]=ReadCRT(0x2C); // 14
|
||||
regs[ECRTbase] = ReadCRT(0x19); // 0 (0x19)
|
||||
for (i = 1; i < 14; i++)
|
||||
regs[ECRTbase + i] = ReadCRT(0x1D + i); // 1-13 (0x1D-0x2A)
|
||||
regs[ECRTbase + i] = ReadCRT(0x2C); // 14
|
||||
i++;
|
||||
regs[ECRTbase+i]=ReadCRT(0x2F); // 15
|
||||
regs[ECRTbase + i] = ReadCRT(0x2F); // 15
|
||||
i++;
|
||||
regs[ECRTbase+i]=ReadCRT(0x30); // 16
|
||||
for (i++; i<24; i++)
|
||||
regs[ECRTbase+i]=ReadCRT(0x22+i); // 17-23
|
||||
for (; i<32; i++)
|
||||
regs[ECRTbase+i]=ReadCRT(0x28+i); // 24-31
|
||||
regs[ECRTbase+i]=ReadCRT(0x50); // 32
|
||||
regs[ECRTbase + i] = ReadCRT(0x30); // 16
|
||||
for (i++; i < 24; i++) regs[ECRTbase + i] = ReadCRT(0x22 + i); // 17-23
|
||||
for (; i < 32; i++) regs[ECRTbase + i] = ReadCRT(0x28 + i); // 24-31
|
||||
regs[ECRTbase + i] = ReadCRT(0x50); // 32
|
||||
|
||||
/* Map the DAC safetly (0x3C6 so doesn't overlap others) */
|
||||
DACaddress=ReadCRT(0x29);
|
||||
WriteCRT(0x29,DACaddress & 0xFC);
|
||||
regs[DAC_3C6] =inportb(0x3C6);
|
||||
inportb(0x3C6); inportb(0x3C6); inportb(0x3C6);
|
||||
regs[DAC_3C6_4th]=inportb(0x3C6);
|
||||
regs[DAC_WR_ADD] =inportb(0x3C8);
|
||||
regs[MCLKLOW] =inportb(0x43C6);
|
||||
regs[MCLKHIG] =inportb(0x43C7);
|
||||
regs[VCLKLOW] =inportb(0x43C8);
|
||||
regs[VCLKHIG] =inportb(0x43C9);
|
||||
regs[DAC_INDEX] =inportb(0x83C8);
|
||||
DACaddress = ReadCRT(0x29);
|
||||
WriteCRT(0x29, DACaddress & 0xFC);
|
||||
regs[DAC_3C6] = inportb(0x3C6);
|
||||
inportb(0x3C6);
|
||||
inportb(0x3C6);
|
||||
inportb(0x3C6);
|
||||
regs[DAC_3C6_4th] = inportb(0x3C6);
|
||||
regs[DAC_WR_ADD] = inportb(0x3C8);
|
||||
regs[MCLKLOW] = inportb(0x43C6);
|
||||
regs[MCLKHIG] = inportb(0x43C7);
|
||||
regs[VCLKLOW] = inportb(0x43C8);
|
||||
regs[VCLKHIG] = inportb(0x43C9);
|
||||
regs[DAC_INDEX] = inportb(0x83C8);
|
||||
|
||||
for (i=0; i<EDACcant; i++)
|
||||
regs[EDACbase+i]=ReadEDAC(i);
|
||||
for (i = 0; i < EDACcant; i++) regs[EDACbase + i] = ReadEDAC(i);
|
||||
|
||||
/* The GER */
|
||||
/* Enable it and map in memory */
|
||||
WriteCRT(0x36,MODEINIT);
|
||||
regs[GER_22]=Getb(0x22);
|
||||
regs[GER_23]=Getb(0x23);
|
||||
*((unsigned *)®s[GER_44])=Getl(0x44);
|
||||
WriteCRT(0x36,regs[ECRT_36]);
|
||||
WriteCRT(0x36, MODEINIT);
|
||||
regs[GER_22] = Getb(0x22);
|
||||
regs[GER_23] = Getb(0x23);
|
||||
*((unsigned *)®s[GER_44]) = Getl(0x44);
|
||||
WriteCRT(0x36, regs[ECRT_36]);
|
||||
|
||||
/* Restore the DAC mapping */
|
||||
WriteCRT(0x29,DACaddress);
|
||||
WriteCRT(0x29, DACaddress);
|
||||
/* Restore the DAC access */
|
||||
if ((DACaccess & 4)==0)
|
||||
WriteGRA(0xF,DACaccess);
|
||||
if ((DACaccess & 4) == 0) WriteGRA(0xF, DACaccess);
|
||||
/* Restore the protection */
|
||||
if ((Protect & 0x80)==0)
|
||||
WriteSEQ(0xE,Protect);
|
||||
if ((Protect & 0x80) == 0) WriteSEQ(0xE, Protect);
|
||||
/* Restore the old/new mode */
|
||||
if ((Old_New & 0x80)==0)
|
||||
WriteSEQ(0xB,0);
|
||||
if ((Old_New & 0x80) == 0) WriteSEQ(0xB, 0);
|
||||
}
|
||||
|
||||
/**[txh]********************************************************************
|
||||
|
@ -125,8 +117,7 @@ are stored.
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
int VGASaveRegs(uchar *regs, uchar *Sregs)
|
||||
{
|
||||
int VGASaveRegs(uchar *regs, uchar *Sregs) {
|
||||
int i;
|
||||
uchar MORval;
|
||||
|
||||
|
@ -134,9 +125,9 @@ int VGASaveRegs(uchar *regs, uchar *Sregs)
|
|||
without loosing performance.
|
||||
So I ever put the VGA chip in the color mode (ports=0x3Dx) but I
|
||||
store the real state */
|
||||
MORval=ReadMOR();
|
||||
MORval = ReadMOR( );
|
||||
WriteMOR(MORval | 1);
|
||||
regs[MORbase]=MORval;
|
||||
regs[MORbase] = MORval;
|
||||
|
||||
/* I think the best place to put a call to save the chipset specific
|
||||
registers is here because TGUI9440 can save some interesting things
|
||||
|
@ -145,21 +136,17 @@ int VGASaveRegs(uchar *regs, uchar *Sregs)
|
|||
impossible to know in a VGA card. */
|
||||
TGUI9440SaveRegs(Sregs);
|
||||
|
||||
for (i=0; i<CRTcant; i++)
|
||||
regs[CRTbase+i]=ReadCRT(i);
|
||||
for (i = 0; i < CRTcant; i++) regs[CRTbase + i] = ReadCRT(i);
|
||||
|
||||
/******* The Attribute Registers are worst that a pain in the ass I think
|
||||
the @#*$ people from the Giant Blue tried to make it hard to
|
||||
understand on purpose ********/
|
||||
for (i=0; i<ATTcant; i++)
|
||||
regs[ATTbase+i]=ReadATT(i);
|
||||
ATTEndReads();
|
||||
for (i = 0; i < ATTcant; i++) regs[ATTbase + i] = ReadATT(i);
|
||||
ATTEndReads( );
|
||||
|
||||
for (i=0; i<GRAcant; i++)
|
||||
regs[GRAbase+i]=ReadGRA(i);
|
||||
for (i = 0; i < GRAcant; i++) regs[GRAbase + i] = ReadGRA(i);
|
||||
|
||||
for (i=0; i<SEQcant; i++)
|
||||
regs[SEQbase+i]=ReadSEQ(i);
|
||||
for (i = 0; i < SEQcant; i++) regs[SEQbase + i] = ReadSEQ(i);
|
||||
|
||||
WriteMOR(MORval);
|
||||
|
||||
|
@ -173,95 +160,90 @@ int VGASaveRegs(uchar *regs, uchar *Sregs)
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
void TGUI9440LoadRegs(const uchar *regs)
|
||||
{
|
||||
int i,Protect,DACaccess,DACaddress;
|
||||
void TGUI9440LoadRegs(const uchar *regs) {
|
||||
int i, Protect, DACaccess, DACaddress;
|
||||
|
||||
/* Enter in old mode */
|
||||
WriteSEQ(0xB,0);
|
||||
WriteSEQ(0xD,regs[ESEQbase]);
|
||||
WriteSEQ(0xE,regs[ESEQbase+1]);
|
||||
WriteGRA(0xE,regs[EGRAbase]);
|
||||
WriteSEQ(0xB, 0);
|
||||
WriteSEQ(0xD, regs[ESEQbase]);
|
||||
WriteSEQ(0xE, regs[ESEQbase + 1]);
|
||||
WriteGRA(0xE, regs[EGRAbase]);
|
||||
/* Enter in new mode */
|
||||
ReadSEQ(0xB);
|
||||
WriteSEQ(0xD,regs[ESEQ_0D_new]);
|
||||
//fprintf(stderr,"Escritura: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
WriteSEQ(0xD, regs[ESEQ_0D_new]);
|
||||
// fprintf(stderr,"Escritura: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
/* Unprotect the registers */
|
||||
Protect=regs[ESEQbase+3];
|
||||
WriteSEQ(0xE,Protect | 0x80);
|
||||
WriteSEQ(0xF,regs[ESEQbase+4]);
|
||||
Protect = regs[ESEQbase + 3];
|
||||
WriteSEQ(0xE, Protect | 0x80);
|
||||
WriteSEQ(0xF, regs[ESEQbase + 4]);
|
||||
|
||||
/* Enable access to the DAC */
|
||||
DACaccess=regs[EGRAbase+1];
|
||||
WriteGRA(0x0F,DACaccess | 4);
|
||||
WriteGRA(0x23,regs[EGRAbase+2]);
|
||||
WriteGRA(0x2F,regs[EGRAbase+3]);
|
||||
DACaccess = regs[EGRAbase + 1];
|
||||
WriteGRA(0x0F, DACaccess | 4);
|
||||
WriteGRA(0x23, regs[EGRAbase + 2]);
|
||||
WriteGRA(0x2F, regs[EGRAbase + 3]);
|
||||
|
||||
/* These are alternative registers so I don't know if I really need to
|
||||
store your content */
|
||||
outportb(0x3D8,regs[SPbase+1]);
|
||||
outportb(0x3D9,regs[SPbase+2]);
|
||||
//fprintf(stderr,"Escritura antes 3DB: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
outportb(0x3DB,regs[SPbase+3]);
|
||||
//fprintf(stderr,"Escritura dopo: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
|
||||
outportb(0x3D8, regs[SPbase + 1]);
|
||||
outportb(0x3D9, regs[SPbase + 2]);
|
||||
// fprintf(stderr,"Escritura antes 3DB: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
outportb(0x3DB, regs[SPbase + 3]);
|
||||
// fprintf(stderr,"Escritura dopo: %X %X\n",ReadSEQ(0x8),ReadSEQ(0xD));
|
||||
|
||||
/* These extended register are located in the CRT space but they aren't
|
||||
contiguous */
|
||||
WriteCRT(0x19,regs[ECRTbase]); // 0 (0x19)
|
||||
for (i=1; i<14; i++)
|
||||
WriteCRT(0x1D+i,regs[ECRTbase+i]); // 1-13 (0x1D-0x2A)
|
||||
WriteCRT(0x2C,regs[ECRTbase+i]); // 14
|
||||
WriteCRT(0x19, regs[ECRTbase]); // 0 (0x19)
|
||||
for (i = 1; i < 14; i++)
|
||||
WriteCRT(0x1D + i, regs[ECRTbase + i]); // 1-13 (0x1D-0x2A)
|
||||
WriteCRT(0x2C, regs[ECRTbase + i]); // 14
|
||||
i++;
|
||||
WriteCRT(0x2F,regs[ECRTbase+i]); // 15
|
||||
WriteCRT(0x2F, regs[ECRTbase + i]); // 15
|
||||
i++;
|
||||
WriteCRT(0x30,regs[ECRTbase+i]); // 16
|
||||
for (i++; i<24; i++)
|
||||
WriteCRT(0x22+i,regs[ECRTbase+i]); // 17-23
|
||||
for (; i<32; i++)
|
||||
WriteCRT(0x28+i,regs[ECRTbase+i]); // 24-31
|
||||
WriteCRT(0x50,regs[ECRTbase+i]); // 32
|
||||
WriteCRT(0x30, regs[ECRTbase + i]); // 16
|
||||
for (i++; i < 24; i++) WriteCRT(0x22 + i, regs[ECRTbase + i]); // 17-23
|
||||
for (; i < 32; i++) WriteCRT(0x28 + i, regs[ECRTbase + i]); // 24-31
|
||||
WriteCRT(0x50, regs[ECRTbase + i]); // 32
|
||||
|
||||
/* Map the DAC safetly (0x3C6 so doesn't overlap others) */
|
||||
DACaddress=regs[ECRT_29];
|
||||
WriteCRT(0x29,DACaddress & 0xFC);
|
||||
DACaddress = regs[ECRT_29];
|
||||
WriteCRT(0x29, DACaddress & 0xFC);
|
||||
|
||||
inportb(0x3C8);
|
||||
outportb(0x3C6,regs[DAC_3C6]);
|
||||
outportb(0x3C6, regs[DAC_3C6]);
|
||||
|
||||
inportb(0x3C8);
|
||||
inportb(0x3C6); inportb(0x3C6); inportb(0x3C6); inportb(0x3C6);
|
||||
outportb(0x3C6,regs[DAC_3C6_4th]);
|
||||
inportb(0x3C6);
|
||||
inportb(0x3C6);
|
||||
inportb(0x3C6);
|
||||
inportb(0x3C6);
|
||||
outportb(0x3C6, regs[DAC_3C6_4th]);
|
||||
|
||||
outportb(0x3C8,regs[SPbase+6]);
|
||||
outportb(0x43C6,regs[SPbase+7]);
|
||||
outportb(0x43C7,regs[SPbase+8]);
|
||||
outportb(0x43C8,regs[SPbase+9]);
|
||||
outportb(0x43C9,regs[SPbase+10]);
|
||||
outportb(0x83C8,regs[SPbase+11]);
|
||||
outportb(0x3C8, regs[SPbase + 6]);
|
||||
outportb(0x43C6, regs[SPbase + 7]);
|
||||
outportb(0x43C7, regs[SPbase + 8]);
|
||||
outportb(0x43C8, regs[SPbase + 9]);
|
||||
outportb(0x43C9, regs[SPbase + 10]);
|
||||
outportb(0x83C8, regs[SPbase + 11]);
|
||||
|
||||
for (i=0; i<EDACcant; i++)
|
||||
WriteEDAC(i,regs[EDACbase+i]);
|
||||
for (i = 0; i < EDACcant; i++) WriteEDAC(i, regs[EDACbase + i]);
|
||||
|
||||
/* The GER */
|
||||
/* Enable it and map in memory */
|
||||
WriteCRT(0x36,MODEINIT);
|
||||
Putb(0x22,regs[GER_22]);
|
||||
Putb(0x23,regs[GER_23]);
|
||||
Putl(0x44,*((unsigned *)®s[GER_44]));
|
||||
WriteCRT(0x36,regs[ECRT_36]);
|
||||
WriteCRT(0x36, MODEINIT);
|
||||
Putb(0x22, regs[GER_22]);
|
||||
Putb(0x23, regs[GER_23]);
|
||||
Putl(0x44, *((unsigned *)®s[GER_44]));
|
||||
WriteCRT(0x36, regs[ECRT_36]);
|
||||
|
||||
/* Restore the DAC mapping */
|
||||
WriteCRT(0x29,DACaddress);
|
||||
WriteCRT(0x29, DACaddress);
|
||||
/* Restore the DAC access */
|
||||
if ((DACaccess & 4)==0)
|
||||
WriteGRA(0xF,DACaccess);
|
||||
if ((DACaccess & 4) == 0) WriteGRA(0xF, DACaccess);
|
||||
/* Restore the protection */
|
||||
if ((Protect & 0x80)==0)
|
||||
WriteSEQ(0xE,Protect);
|
||||
if ((Protect & 0x80) == 0) WriteSEQ(0xE, Protect);
|
||||
/* Restore the old/new mode */
|
||||
if ((regs[OldNewStatus] & 0x80)==0)
|
||||
WriteSEQ(0xB,0);
|
||||
if ((regs[OldNewStatus] & 0x80) == 0) WriteSEQ(0xB, 0);
|
||||
}
|
||||
|
||||
/**[txh]********************************************************************
|
||||
|
@ -271,49 +253,47 @@ void TGUI9440LoadRegs(const uchar *regs)
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
void VGALoadRegs(const uchar *regs,const uchar *Sregs)
|
||||
{
|
||||
void VGALoadRegs(const uchar *regs, const uchar *Sregs) {
|
||||
int i;
|
||||
uchar CRT11,MORval;
|
||||
uchar CRT11, MORval;
|
||||
|
||||
MORval=ReadMOR();
|
||||
MORval = ReadMOR( );
|
||||
/* Ensure we are in the color mode or the ports could be moved to 0x3Bx */
|
||||
WriteMOR(MORval | 1);
|
||||
/* Wait a full retrace to avoid extra noise in screen */
|
||||
while (inportb(0x3DA) & 8);
|
||||
while (!(inportb(0x3DA) & 8));
|
||||
while (inportb(0x3DA) & 8)
|
||||
;
|
||||
while (!(inportb(0x3DA) & 8))
|
||||
;
|
||||
|
||||
/* Screen Off to avoid funny things displayed */
|
||||
WriteSEQ(0x01,regs[SEQbase+1] | 0x20);
|
||||
WriteSEQ(0x01, regs[SEQbase + 1] | 0x20);
|
||||
|
||||
/* Synchronous reset ON, we must do it or we could lose video RAM contents */
|
||||
WriteSEQ(0x00,1);
|
||||
for (i=2; i<SEQcant; i++)
|
||||
WriteSEQ(i,regs[SEQbase+i]);
|
||||
/* Synchronous reset ON, we must do it or we could lose video RAM contents
|
||||
*/
|
||||
WriteSEQ(0x00, 1);
|
||||
for (i = 2; i < SEQcant; i++) WriteSEQ(i, regs[SEQbase + i]);
|
||||
/* Synchronous reset restored */
|
||||
WriteSEQ(0x00,regs[SEQbase]);
|
||||
WriteSEQ(0x00, regs[SEQbase]);
|
||||
|
||||
/* Deprotect CRT registers 0-7 */
|
||||
CRT11=regs[CRTbase+0x11];
|
||||
WriteCRT(0x11,CRT11 & 0x7F);
|
||||
CRT11 = regs[CRTbase + 0x11];
|
||||
WriteCRT(0x11, CRT11 & 0x7F);
|
||||
/* write CRT registers */
|
||||
for (i=0; i<CRTcant; i++)
|
||||
if (i!=0x11)
|
||||
WriteCRT(i,regs[CRTbase+i]);
|
||||
for (i = 0; i < CRTcant; i++)
|
||||
if (i != 0x11) WriteCRT(i, regs[CRTbase + i]);
|
||||
/* Restore the protection state */
|
||||
WriteCRT(0x11,CRT11);
|
||||
WriteCRT(0x11, CRT11);
|
||||
|
||||
for (i=0; i<GRAcant; i++)
|
||||
WriteGRA(i,regs[GRAbase+i]);
|
||||
for (i = 0; i < GRAcant; i++) WriteGRA(i, regs[GRAbase + i]);
|
||||
|
||||
/******* The Attribute Registers are worst that a pain in the ass I think
|
||||
the @#*$ people from the Giant Blue tried to make it hard to
|
||||
understand on purpose ********/
|
||||
/* Ensure we will write to the index */
|
||||
inportb(ATTdir);
|
||||
for (; i<ATTcant; i++)
|
||||
WriteATT(i,regs[ATTbase+i]);
|
||||
ATTEndReads();
|
||||
for (; i < ATTcant; i++) WriteATT(i, regs[ATTbase + i]);
|
||||
ATTEndReads( );
|
||||
|
||||
TGUI9440LoadRegs(Sregs);
|
||||
|
||||
|
@ -321,7 +301,7 @@ void VGALoadRegs(const uchar *regs,const uchar *Sregs)
|
|||
WriteMOR(regs[MORbase]);
|
||||
|
||||
/* Restore Screen On/Off status */
|
||||
WriteSEQ(0x01,regs[SEQbase+1]);
|
||||
WriteSEQ(0x01, regs[SEQbase + 1]);
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_OLD_INERTIA_STUFF
|
||||
|
@ -333,23 +313,21 @@ think that's a very strange stuff.
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
void ReadVSync(int *start, int *end)
|
||||
{
|
||||
int s,e,aux;
|
||||
void ReadVSync(int *start, int *end) {
|
||||
int s, e, aux;
|
||||
|
||||
s=ReadCRT(0x10);
|
||||
aux=ReadCRT(0x7);
|
||||
s|=((aux & 0x04)<<6); /* b8 */
|
||||
s|=((aux & 0x80)<<2); /* b9 */
|
||||
aux=ReadCRT(0x27);
|
||||
s|=((aux & 0x40)<<4); /* b10 */
|
||||
*start=s;
|
||||
s = ReadCRT(0x10);
|
||||
aux = ReadCRT(0x7);
|
||||
s |= ((aux & 0x04) << 6); /* b8 */
|
||||
s |= ((aux & 0x80) << 2); /* b9 */
|
||||
aux = ReadCRT(0x27);
|
||||
s |= ((aux & 0x40) << 4); /* b10 */
|
||||
*start = s;
|
||||
/* Only 4 bits are available: */
|
||||
e=(s & 0xFFF0) | (ReadCRT(0x11) & 0xF);
|
||||
e = (s & 0xFFF0) | (ReadCRT(0x11) & 0xF);
|
||||
/* Adjust it */
|
||||
if (e<s)
|
||||
e+=0x10;
|
||||
*end=e;
|
||||
if (e < s) e += 0x10;
|
||||
*end = e;
|
||||
}
|
||||
|
||||
/**[txh]********************************************************************
|
||||
|
@ -360,19 +338,18 @@ think that's a very strange stuff.
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
void SetVSync(int start, int end)
|
||||
{
|
||||
void SetVSync(int start, int end) {
|
||||
int a;
|
||||
|
||||
WriteCRT(0x10,start);
|
||||
a=ReadCRT(0x7) & 0x7B;
|
||||
a|=((start & 0x100)>>6); /* b8 */
|
||||
a|=((start & 0x200)>>2); /* b9 */
|
||||
WriteCRT(0x7,a);
|
||||
a=ReadCRT(0x27) & 0xBF;
|
||||
a|=((start & 0x400)>>4); /* b10 */
|
||||
WriteCRT(0x27,a);
|
||||
WriteCRT(0x11,0x80 | (end & 0x0F));
|
||||
WriteCRT(0x10, start);
|
||||
a = ReadCRT(0x7) & 0x7B;
|
||||
a |= ((start & 0x100) >> 6); /* b8 */
|
||||
a |= ((start & 0x200) >> 2); /* b9 */
|
||||
WriteCRT(0x7, a);
|
||||
a = ReadCRT(0x27) & 0xBF;
|
||||
a |= ((start & 0x400) >> 4); /* b10 */
|
||||
WriteCRT(0x27, a);
|
||||
WriteCRT(0x11, 0x80 | (end & 0x0F));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -459,5 +436,3 @@ void SetVSync(int start, int end)
|
|||
The rest of the GER can change in any way because I set all the values from
|
||||
call to call.
|
||||
*/
|
||||
|
||||
|
||||
|
|
961
tgui/setmode.c
961
tgui/setmode.c
File diff suppressed because it is too large
Load Diff
|
@ -23,21 +23,20 @@ terms and conditions of the FreeBE/AF project. */
|
|||
/* This mask erase all the flags passed in the CRTC structure */
|
||||
#define InternalMask 0xFFFFFF70
|
||||
|
||||
#define ExtractBPP(a) ((a & 0x70)>>4)
|
||||
#define ExtractBPP(a) ((a & 0x70) >> 4)
|
||||
#define is8BPP 0
|
||||
#define is15BPP 1
|
||||
#define is16BPP 2
|
||||
#define is24BPP 3
|
||||
|
||||
/**** Video mode structure ****/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
int flags;
|
||||
ushort hDisplay,hSyncStart,hSyncEnd,hTotal;
|
||||
ushort vDisplay,vSyncStart,vSyncEnd,vTotal;
|
||||
ushort hDisplay, hSyncStart, hSyncEnd, hTotal;
|
||||
ushort vDisplay, vSyncStart, vSyncEnd, vTotal;
|
||||
ushort minBytesPerScan;
|
||||
uchar ClockType;
|
||||
uchar ClockValHigh,ClockValLow;
|
||||
uchar ClockValHigh, ClockValLow;
|
||||
} VideoModeStr;
|
||||
|
||||
extern VideoModeStr *SupportedVideoModes[];
|
||||
|
@ -57,4 +56,3 @@ void SetVSync(int start, int end);
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
181
tgui/tgui.h
181
tgui/tgui.h
|
@ -6,7 +6,6 @@ terms and conditions of the FreeBE/AF project. */
|
|||
#define DestinationSegmentAddress 0x3D8
|
||||
#define SourceSegmentAddress 0x3D9
|
||||
|
||||
|
||||
#define INLINE extern inline
|
||||
|
||||
//#define IOMAPPED
|
||||
|
@ -18,12 +17,24 @@ terms and conditions of the FreeBE/AF project. */
|
|||
|
||||
#ifdef IOMAPPED
|
||||
#define MODEINIT 0x80
|
||||
INLINE void Putb(unsigned pos, uchar val) { outportb(0x2100+pos,val); }
|
||||
INLINE void Putw(unsigned pos, ushort val) { outportw(0x2100+pos,val); }
|
||||
INLINE void Putl(unsigned pos, unsigned val) { outportl(0x2100+pos,val); }
|
||||
INLINE uchar Getb(unsigned pos) { return inportb(0x2100+pos); }
|
||||
INLINE ushort Getw(unsigned pos) { return inportw(0x2100+pos); }
|
||||
INLINE unsigned Getl(unsigned pos) { return inportl(0x2100+pos); }
|
||||
INLINE void Putb(unsigned pos, uchar val) {
|
||||
outportb(0x2100 + pos, val);
|
||||
}
|
||||
INLINE void Putw(unsigned pos, ushort val) {
|
||||
outportw(0x2100 + pos, val);
|
||||
}
|
||||
INLINE void Putl(unsigned pos, unsigned val) {
|
||||
outportl(0x2100 + pos, val);
|
||||
}
|
||||
INLINE uchar Getb(unsigned pos) {
|
||||
return inportb(0x2100 + pos);
|
||||
}
|
||||
INLINE ushort Getw(unsigned pos) {
|
||||
return inportw(0x2100 + pos);
|
||||
}
|
||||
INLINE unsigned Getl(unsigned pos) {
|
||||
return inportl(0x2100 + pos);
|
||||
}
|
||||
#else
|
||||
// Memory mapped
|
||||
#define MODEINIT 0x81
|
||||
|
@ -31,12 +42,24 @@ INLINE unsigned Getl(unsigned pos) { return inportl(0x2100+pos); }
|
|||
#define MMIOBASE 0xB7F00
|
||||
//#define MMIOBASE 0xBFF00
|
||||
//#define MODEINIT 0x82
|
||||
INLINE void Putb(unsigned pos, uchar val) { _farnspokeb(MMIOBASE+pos,val); }
|
||||
INLINE void Putw(unsigned pos, ushort val) { _farnspokew(MMIOBASE+pos,val); }
|
||||
INLINE void Putl(unsigned pos, unsigned val) { _farnspokel(MMIOBASE+pos,val); }
|
||||
INLINE uchar Getb(unsigned pos) { return _farnspeekb(MMIOBASE+pos); }
|
||||
INLINE ushort Getw(unsigned pos) { return _farnspeekw(MMIOBASE+pos); }
|
||||
INLINE unsigned Getl(unsigned pos) { return _farnspeekl(MMIOBASE+pos); }
|
||||
INLINE void Putb(unsigned pos, uchar val) {
|
||||
_farnspokeb(MMIOBASE + pos, val);
|
||||
}
|
||||
INLINE void Putw(unsigned pos, ushort val) {
|
||||
_farnspokew(MMIOBASE + pos, val);
|
||||
}
|
||||
INLINE void Putl(unsigned pos, unsigned val) {
|
||||
_farnspokel(MMIOBASE + pos, val);
|
||||
}
|
||||
INLINE uchar Getb(unsigned pos) {
|
||||
return _farnspeekb(MMIOBASE + pos);
|
||||
}
|
||||
INLINE ushort Getw(unsigned pos) {
|
||||
return _farnspeekw(MMIOBASE + pos);
|
||||
}
|
||||
INLINE unsigned Getl(unsigned pos) {
|
||||
return _farnspeekl(MMIOBASE + pos);
|
||||
}
|
||||
#else
|
||||
extern unsigned MMIOBASE;
|
||||
/*
|
||||
|
@ -53,12 +76,24 @@ that's normal in the "unoptimizer" module of gcc ;-)
|
|||
Memory mapped I/O generates much compact code and I guess faster too, I
|
||||
must test it.
|
||||
*/
|
||||
INLINE void Putb(unsigned pos, uchar val) { *((volatile uchar *)(MMIOBASE+pos))=val; }
|
||||
INLINE void Putw(unsigned pos, ushort val) { *((volatile ushort *)(MMIOBASE+pos))=val; }
|
||||
INLINE void Putl(unsigned pos, unsigned val) { *((volatile unsigned *)(MMIOBASE+pos))=val; }
|
||||
INLINE uchar Getb(unsigned pos) { return *((volatile uchar *)(MMIOBASE+pos)); }
|
||||
INLINE ushort Getw(unsigned pos) { return *((volatile ushort *)(MMIOBASE+pos)); }
|
||||
INLINE unsigned Getl(unsigned pos) { return *((volatile unsigned *)(MMIOBASE+pos)); }
|
||||
INLINE void Putb(unsigned pos, uchar val) {
|
||||
*((volatile uchar *)(MMIOBASE + pos)) = val;
|
||||
}
|
||||
INLINE void Putw(unsigned pos, ushort val) {
|
||||
*((volatile ushort *)(MMIOBASE + pos)) = val;
|
||||
}
|
||||
INLINE void Putl(unsigned pos, unsigned val) {
|
||||
*((volatile unsigned *)(MMIOBASE + pos)) = val;
|
||||
}
|
||||
INLINE uchar Getb(unsigned pos) {
|
||||
return *((volatile uchar *)(MMIOBASE + pos));
|
||||
}
|
||||
INLINE ushort Getw(unsigned pos) {
|
||||
return *((volatile ushort *)(MMIOBASE + pos));
|
||||
}
|
||||
INLINE unsigned Getl(unsigned pos) {
|
||||
return *((volatile unsigned *)(MMIOBASE + pos));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -157,61 +192,53 @@ extern unsigned long linearAddress;
|
|||
#define Screenw ((ushort *)linearAddress)
|
||||
#define Screenl ((unsigned *)linearAddress)
|
||||
|
||||
#define SetXLocation(a) Putw(DXL0,a)
|
||||
#define SetYLocation(a) Putw(DYL0,a)
|
||||
#define SetXYLocation(a,b) Putl(DXL0,(a) | ((b)<<16))
|
||||
#define SetXYSource(a,b) Putl(SXL0,(a) | ((b)<<16))
|
||||
#define SetForeground(a) Putw(FCR0,a)
|
||||
#define SetBackground(a) Putw(BCR0,a)
|
||||
#define SetForegroundMix(a) Putb(FMR,a)
|
||||
#define SetPenStyleMask(a) Putw(PSMR0,a)
|
||||
#define SetStyleMaskRepeatCount(a) Putb(SMRC,a)
|
||||
#define SetXLocation(a) Putw(DXL0, a)
|
||||
#define SetYLocation(a) Putw(DYL0, a)
|
||||
#define SetXYLocation(a, b) Putl(DXL0, (a) | ((b) << 16))
|
||||
#define SetXYSource(a, b) Putl(SXL0, (a) | ((b) << 16))
|
||||
#define SetForeground(a) Putw(FCR0, a)
|
||||
#define SetBackground(a) Putw(BCR0, a)
|
||||
#define SetForegroundMix(a) Putb(FMR, a)
|
||||
#define SetPenStyleMask(a) Putw(PSMR0, a)
|
||||
#define SetStyleMaskRepeatCount(a) Putb(SMRC, a)
|
||||
|
||||
//#define SAFE_IO
|
||||
|
||||
INLINE
|
||||
void SetLineSteps(int deltaY, int deltaX)
|
||||
{
|
||||
void SetLineSteps(int deltaY, int deltaX) {
|
||||
// Diagonal step is dY-dX, Axial step is dY both 16 bits signed
|
||||
Putl(SXL0,((deltaY-deltaX) & 0xFFFF) | (deltaY<<16));
|
||||
Putl(SXL0, ((deltaY - deltaX) & 0xFFFF) | (deltaY << 16));
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetErrAndLen(int deltaY, int deltaX)
|
||||
{
|
||||
void SetErrAndLen(int deltaY, int deltaX) {
|
||||
// Initial error is 2*dY-dX (signed), Length is ABS(dX) (unsigned)
|
||||
Putl(ODXL0,((2*deltaY-deltaX) & 0xFFFF) | (deltaX<<16));
|
||||
}
|
||||
|
||||
|
||||
INLINE
|
||||
void SetDimensions(int width, int height)
|
||||
{
|
||||
Putl(ODXL0,width | (height<<16));
|
||||
Putl(ODXL0, ((2 * deltaY - deltaX) & 0xFFFF) | (deltaX << 16));
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetWidth_1(int width)
|
||||
{
|
||||
Putw(ODXL0,width-1);
|
||||
void SetDimensions(int width, int height) {
|
||||
Putl(ODXL0, width | (height << 16));
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetWidth(int width)
|
||||
{
|
||||
Putw(ODXL0,width);
|
||||
void SetWidth_1(int width) {
|
||||
Putw(ODXL0, width - 1);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetDrawFlags(int dir)
|
||||
{
|
||||
Putl(GEDFR0,dir);
|
||||
void SetWidth(int width) {
|
||||
Putw(ODXL0, width);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetPatternLocation(unsigned offset)
|
||||
{
|
||||
Putw(PLR0,offset);
|
||||
void SetDrawFlags(int dir) {
|
||||
Putl(GEDFR0, dir);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetPatternLocation(unsigned offset) {
|
||||
Putw(PLR0, offset);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -225,9 +252,9 @@ so we can have a queue of command in memory and transfer it to the TGUI
|
|||
when the GER is ready.
|
||||
*/
|
||||
INLINE
|
||||
void WaitGE(void)
|
||||
{
|
||||
while (Getb(GESR) & 0x80);
|
||||
void WaitGE(void) {
|
||||
while (Getb(GESR) & 0x80)
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -235,9 +262,9 @@ void WaitGE(void)
|
|||
command will use the new settings ;-)
|
||||
*/
|
||||
INLINE
|
||||
void WaitGEfifo(void)
|
||||
{
|
||||
while (Getb(GESR) & 0x20);
|
||||
void WaitGEfifo(void) {
|
||||
while (Getb(GESR) & 0x20)
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -247,42 +274,36 @@ during the Blit the CPU can't access the VRAM.
|
|||
that's not the FreeBE/AF case.
|
||||
*/
|
||||
INLINE
|
||||
void DoBlit(void)
|
||||
{
|
||||
Putb(GECoR,BitBLT);
|
||||
#ifdef WAITTILLIDLE_NOT_NEEDED
|
||||
WaitGE();
|
||||
#endif
|
||||
void DoBlit(void) {
|
||||
Putb(GECoR, BitBLT);
|
||||
#ifdef WAITTILLIDLE_NOT_NEEDED
|
||||
WaitGE( );
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE
|
||||
void DoBlitDontWait(void)
|
||||
{
|
||||
Putb(GECoR,BitBLT);
|
||||
void DoBlitDontWait(void) {
|
||||
Putb(GECoR, BitBLT);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void DoBresenhamLine(void)
|
||||
{
|
||||
Putb(GECoR,BLine);
|
||||
void DoBresenhamLine(void) {
|
||||
Putb(GECoR, BLine);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void DoScan(void)
|
||||
{
|
||||
Putb(GECoR,ScanLine);
|
||||
void DoScan(void) {
|
||||
Putb(GECoR, ScanLine);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetNewMode(void)
|
||||
{
|
||||
void SetNewMode(void) {
|
||||
ReadSEQ(0xB);
|
||||
}
|
||||
|
||||
INLINE
|
||||
void SetOldMode(void)
|
||||
{
|
||||
WriteSEQ(0xB,0);
|
||||
void SetOldMode(void) {
|
||||
WriteSEQ(0xB, 0);
|
||||
}
|
||||
|
||||
/**************************** RASTER OPERATIONS ****************************/
|
||||
|
@ -326,5 +347,3 @@ void SetOldMode(void)
|
|||
#define VClockDiv4 0x40
|
||||
#define VClockDiv1_5 0x60
|
||||
#define DClockDiv2 0x80
|
||||
|
||||
|
||||
|
|
155
tgui/vga.h
155
tgui/vga.h
|
@ -37,54 +37,41 @@ terms and conditions of the FreeBE/AF project. */
|
|||
#ifdef SAFE_IO
|
||||
/* C approach, safier than my assembler ;-) */
|
||||
|
||||
extern inline
|
||||
uchar ReadCRT(uchar index)
|
||||
{
|
||||
outportb(CRTControllerIndex,index);
|
||||
extern inline uchar ReadCRT(uchar index) {
|
||||
outportb(CRTControllerIndex, index);
|
||||
return inportb(CRTControllerData);
|
||||
}
|
||||
|
||||
extern inline
|
||||
uchar ReadGRA(uchar index)
|
||||
{
|
||||
outportb(GraphicsControllerIndex,index);
|
||||
extern inline uchar ReadGRA(uchar index) {
|
||||
outportb(GraphicsControllerIndex, index);
|
||||
return inportb(GraphicsControllerData);
|
||||
}
|
||||
|
||||
extern inline
|
||||
uchar ReadSEQ(uchar index)
|
||||
{
|
||||
outportb(SequencerIndex,index);
|
||||
extern inline uchar ReadSEQ(uchar index) {
|
||||
outportb(SequencerIndex, index);
|
||||
return inportb(SequencerData);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteCRT(uchar index, uchar value)
|
||||
{
|
||||
outportb(CRTControllerIndex,index);
|
||||
outportb(CRTControllerData,value);
|
||||
extern inline void WriteCRT(uchar index, uchar value) {
|
||||
outportb(CRTControllerIndex, index);
|
||||
outportb(CRTControllerData, value);
|
||||
}
|
||||
|
||||
|
||||
extern inline
|
||||
void WriteGRA(uchar index, uchar value)
|
||||
{
|
||||
outportb(GraphicsControllerIndex,index);
|
||||
outportb(GraphicsControllerData,value);
|
||||
extern inline void WriteGRA(uchar index, uchar value) {
|
||||
outportb(GraphicsControllerIndex, index);
|
||||
outportb(GraphicsControllerData, value);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteSEQ(uchar index, uchar value)
|
||||
{
|
||||
outportb(SequencerIndex,index);
|
||||
outportb(SequencerData,value);
|
||||
extern inline void WriteSEQ(uchar index, uchar value) {
|
||||
outportb(SequencerIndex, index);
|
||||
outportb(SequencerData, value);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WaitVRT()
|
||||
{
|
||||
while (inportb(InputStatusRegister1) & 8);
|
||||
while (!(inportb(InputStatusRegister1) & 8));
|
||||
extern inline void WaitVRT( ) {
|
||||
while (inportb(InputStatusRegister1) & 8)
|
||||
;
|
||||
while (!(inportb(InputStatusRegister1) & 8))
|
||||
;
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -94,11 +81,9 @@ void WaitVRT()
|
|||
They save 524 bytes in the driver (1.89%).
|
||||
*/
|
||||
|
||||
extern inline
|
||||
uchar ReadCRT(uchar index)
|
||||
{
|
||||
extern inline uchar ReadCRT(uchar index) {
|
||||
uchar a asm("%eax");
|
||||
a=index;
|
||||
a = index;
|
||||
asm volatile ("
|
||||
outb %%al,%%dx
|
||||
incl %%edx
|
||||
|
@ -107,12 +92,9 @@ uchar ReadCRT(uchar index)
|
|||
return a;
|
||||
}
|
||||
|
||||
|
||||
extern inline
|
||||
uchar ReadGRA(uchar index)
|
||||
{
|
||||
extern inline uchar ReadGRA(uchar index) {
|
||||
uchar a asm("%eax");
|
||||
a=index;
|
||||
a = index;
|
||||
asm volatile ("
|
||||
outb %%al,%%dx
|
||||
incl %%edx
|
||||
|
@ -121,11 +103,9 @@ uchar ReadGRA(uchar index)
|
|||
return a;
|
||||
}
|
||||
|
||||
extern inline
|
||||
uchar ReadSEQ(uchar index)
|
||||
{
|
||||
extern inline uchar ReadSEQ(uchar index) {
|
||||
uchar a asm("%eax");
|
||||
a=index;
|
||||
a = index;
|
||||
asm volatile ("
|
||||
outb %%al,%%dx
|
||||
incl %%edx
|
||||
|
@ -134,37 +114,28 @@ uchar ReadSEQ(uchar index)
|
|||
return a;
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteCRT(uchar index, uchar value)
|
||||
{
|
||||
extern inline void WriteCRT(uchar index, uchar value) {
|
||||
asm volatile ("
|
||||
movb %0,%%ah
|
||||
outw %%ax,%%dx
|
||||
" : : "qi" (value), "a" (index), "d" (CRTController) : "%eax");
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteGRA(uchar index, uchar value)
|
||||
{
|
||||
extern inline void WriteGRA(uchar index, uchar value) {
|
||||
asm volatile ("
|
||||
movb %0,%%ah
|
||||
outw %%ax,%%dx
|
||||
" : : "qi" (value), "a" (index), "d" (GraphicsController) : "%eax");
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteSEQ(uchar index, uchar value)
|
||||
{
|
||||
extern inline void WriteSEQ(uchar index, uchar value) {
|
||||
asm volatile ("
|
||||
movb %0,%%ah
|
||||
outw %%ax,%%dx
|
||||
" : : "qi" (value), "a" (index), "d" (Sequencer) : "%eax");
|
||||
}
|
||||
|
||||
|
||||
extern inline
|
||||
void WaitVRT()
|
||||
{
|
||||
extern inline void WaitVRT( ) {
|
||||
asm("
|
||||
1:
|
||||
inb %%dx,%%al
|
||||
|
@ -180,69 +151,51 @@ void WaitVRT()
|
|||
|
||||
#endif
|
||||
|
||||
extern inline
|
||||
uchar ReadATT(int index)
|
||||
{
|
||||
extern inline uchar ReadATT(int index) {
|
||||
/* Ensure we will write to the index */
|
||||
inportb(ATTdir);
|
||||
/* Set the index and disable the screen or we will read nothing */
|
||||
outportb(ATTindex,index);
|
||||
outportb(ATTindex, index);
|
||||
return inportb(ATTdataR);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void ATTEndReads(void)
|
||||
{
|
||||
extern inline void ATTEndReads(void) {
|
||||
/* Ensure we will write to the index */
|
||||
inportb(ATTdir);
|
||||
/* Enable the screen */
|
||||
outportb(ATTindex,0x20);
|
||||
outportb(ATTindex, 0x20);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteATT(int index, int val)
|
||||
{
|
||||
outportb(ATTindex,index);
|
||||
outportb(ATTdataW,val);
|
||||
extern inline void WriteATT(int index, int val) {
|
||||
outportb(ATTindex, index);
|
||||
outportb(ATTdataW, val);
|
||||
}
|
||||
|
||||
extern inline
|
||||
uchar ReadMOR(void)
|
||||
{
|
||||
extern inline uchar ReadMOR(void) {
|
||||
return inportb(MORdataR);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteMOR(int val)
|
||||
{
|
||||
outportb(MORdataW,val);
|
||||
extern inline void WriteMOR(int val) {
|
||||
outportb(MORdataW, val);
|
||||
}
|
||||
|
||||
extern inline
|
||||
uchar ReadEDAC(int index)
|
||||
{
|
||||
outportb(EDACindex,index);
|
||||
extern inline uchar ReadEDAC(int index) {
|
||||
outportb(EDACindex, index);
|
||||
return inportb(EDACdata);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void WriteEDAC(int index, int val)
|
||||
{
|
||||
outportb(EDACindex,index);
|
||||
outportb(EDACdata,val);
|
||||
extern inline void WriteEDAC(int index, int val) {
|
||||
outportb(EDACindex, index);
|
||||
outportb(EDACdata, val);
|
||||
}
|
||||
|
||||
extern inline
|
||||
void RPF_SetPalRange(unsigned char *_pal_ptr, int color, int cant)
|
||||
{
|
||||
__asm__("
|
||||
outb %%al,%%dx
|
||||
incl %%edx
|
||||
cli
|
||||
rep
|
||||
outsb
|
||||
sti"
|
||||
: : "c" (cant*3), "S" (_pal_ptr), "a" (color), "d" (0x3C8)
|
||||
: "%eax", "%ecx", "%edx", "%esi");
|
||||
extern inline void RPF_SetPalRange(unsigned char *_pal_ptr, int color,
|
||||
int cant) {
|
||||
__asm__("
|
||||
outb %
|
||||
% al,
|
||||
% % dx incl % % edx cli rep outsb sti "
|
||||
:
|
||||
: "c"(cant * 3), "S"(_pal_ptr), "a"(color), "d"(0x3C8)
|
||||
: "%eax", "%ecx", "%edx", "%esi");
|
||||
}
|
||||
|
||||
|
|
301
trident/driver.c
301
trident/driver.c
|
@ -14,43 +14,34 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
// #define NO_HWPTR
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* chipset information */
|
||||
int chip_id = 0;
|
||||
|
||||
|
||||
char *descriptions[] =
|
||||
{
|
||||
"TVGA 8900CL/D", "TVGA 9000i", "TVGA 9200CXr",
|
||||
"TVGA LCD9100B", "TVGA GUI9420", "TVGA LX8200", "TVGA 9400CXi",
|
||||
"TVGA LCD9320", "Unknown", "TVGA GUI9420", "TVGA GUI9660",
|
||||
"TVGA GUI9440", "TVGA GUI9430", "TVGA 9000C"
|
||||
};
|
||||
|
||||
char *descriptions[] = { "TVGA 8900CL/D", "TVGA 9000i", "TVGA 9200CXr",
|
||||
"TVGA LCD9100B", "TVGA GUI9420", "TVGA LX8200",
|
||||
"TVGA 9400CXi", "TVGA LCD9320", "Unknown",
|
||||
"TVGA GUI9420", "TVGA GUI9660", "TVGA GUI9440",
|
||||
"TVGA GUI9430", "TVGA 9000C" };
|
||||
|
||||
#define TV_LAST 13
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void DualSetBank32();
|
||||
void DualSetBank32End();
|
||||
void DualSetBank32( );
|
||||
void DualSetBank32End( );
|
||||
void DualSetBank(AF_DRIVER *af, long bank);
|
||||
void SingleSetBank32();
|
||||
void SingleSetBank32End();
|
||||
void SingleSetBank32( );
|
||||
void SingleSetBank32End( );
|
||||
void SingleSetBank(AF_DRIVER *af, long bank);
|
||||
int ExtStub();
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -58,15 +49,12 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
|
||||
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -77,43 +65,29 @@ int af_scroll_x;
|
|||
int af_scroll_y;
|
||||
int af_bank;
|
||||
|
||||
|
||||
|
||||
/* FreeBE/AF extension allowing farptr access to video memory */
|
||||
FAF_HWPTR_DATA hwptr;
|
||||
|
||||
|
||||
|
||||
/* list of available video modes */
|
||||
typedef struct VIDEO_MODE
|
||||
{
|
||||
typedef struct VIDEO_MODE {
|
||||
int w, h;
|
||||
int bpp;
|
||||
int num;
|
||||
} VIDEO_MODE;
|
||||
|
||||
|
||||
VIDEO_MODE mode_list[] =
|
||||
{
|
||||
{ 640, 400, 8, 0x5C },
|
||||
VIDEO_MODE mode_list[] = { { 640, 400, 8, 0x5C },
|
||||
{ 640, 480, 8, 0x5D },
|
||||
{ 800, 600, 8, 0x5E },
|
||||
{ 1024, 768, 8, 0x62 }
|
||||
};
|
||||
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list)/sizeof(VIDEO_MODE))
|
||||
|
||||
|
||||
short available_modes[NUM_MODES+1] = { 1, 2, 3, 4, -1 };
|
||||
{ 1024, 768, 8, 0x62 } };
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list) / sizeof(VIDEO_MODE))
|
||||
|
||||
short available_modes[NUM_MODES + 1] = { 1, 2, 3, 4, -1 };
|
||||
|
||||
/* detect:
|
||||
* Detects the presence of a Trident card.
|
||||
*/
|
||||
char *detect(unsigned long *vidmem)
|
||||
{
|
||||
char *detect(unsigned long *vidmem) {
|
||||
int old1, old2, val;
|
||||
char *name = NULL;
|
||||
|
||||
|
@ -122,12 +96,12 @@ char *detect(unsigned long *vidmem)
|
|||
chip_id = inportb(0x3C5); /* now we have the ID */
|
||||
|
||||
old2 = read_vga_register(0x3C4, 0x0E);
|
||||
outportb(0x3C4+1, old2^0x55);
|
||||
outportb(0x3C4 + 1, old2 ^ 0x55);
|
||||
val = inportb(0x3C5);
|
||||
outportb(0x3C5, old2);
|
||||
|
||||
if (((val^old2) & 0x0F) == 7) { /* if bit 2 is inverted... */
|
||||
outportb(0x3C5, old2^2); /* we're dealing with Trident */
|
||||
if (((val ^ old2) & 0x0F) == 7) { /* if bit 2 is inverted... */
|
||||
outportb(0x3C5, old2 ^ 2); /* we're dealing with Trident */
|
||||
|
||||
if (chip_id <= 2) /* don't like 8800 chips */
|
||||
return FALSE;
|
||||
|
@ -137,7 +111,8 @@ char *detect(unsigned long *vidmem)
|
|||
case 0: *vidmem = 256; break;
|
||||
case 1: *vidmem = 512; break;
|
||||
case 2: *vidmem = 768; break;
|
||||
case 3: if ((chip_id >= 0x33) && (val & 4))
|
||||
case 3:
|
||||
if ((chip_id >= 0x33) && (val & 4))
|
||||
*vidmem = 2048;
|
||||
else
|
||||
*vidmem = 1024;
|
||||
|
@ -167,38 +142,31 @@ char *detect(unsigned long *vidmem)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* Fills in our driver header block.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
char *name;
|
||||
int i;
|
||||
|
||||
name = detect(&af->TotalMemory);
|
||||
|
||||
if (!name)
|
||||
return 1;
|
||||
if (!name) return 1;
|
||||
|
||||
i = 0;
|
||||
while (af->OemVendorName[i])
|
||||
i++;
|
||||
while (af->OemVendorName[i]) i++;
|
||||
|
||||
af->OemVendorName[i++] = ',';
|
||||
af->OemVendorName[i++] = ' ';
|
||||
|
||||
while (*name)
|
||||
af->OemVendorName[i++] = *(name++);
|
||||
while (*name) af->OemVendorName[i++] = *(name++);
|
||||
|
||||
af->OemVendorName[i] = 0;
|
||||
|
||||
af->AvailableModes = available_modes;
|
||||
|
||||
af->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
af->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
af->BankSize = 64;
|
||||
af->BankedBasePtr = 0xA0000;
|
||||
|
@ -209,8 +177,7 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->SetBank = DualSetBank;
|
||||
af->SetBank32 = DualSetBank32;
|
||||
af->SetBank32Len = (long)DualSetBank32End - (long)DualSetBank32;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
af->SetBank = SingleSetBank;
|
||||
af->SetBank32 = SingleSetBank32;
|
||||
af->SetBank32Len = (long)SingleSetBank32End - (long)SingleSetBank32;
|
||||
|
@ -231,14 +198,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
hwptr_init(hwptr.IOMemMaps[0], af->IOMemMaps[0]);
|
||||
hwptr_init(hwptr.IOMemMaps[1], af->IOMemMaps[1]);
|
||||
hwptr_init(hwptr.IOMemMaps[2], af->IOMemMaps[2]);
|
||||
|
@ -249,78 +213,63 @@ int InitDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
#ifndef NO_HWPTR
|
||||
#ifndef NO_HWPTR
|
||||
|
||||
case FAFEXT_HWPTR:
|
||||
/* allow farptr access to video memory */
|
||||
return &hwptr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
VIDEO_MODE *info;
|
||||
int i;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
for (i=0; i<(int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
modeInfo->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
modeInfo->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
modeInfo->XResolution = info->w;
|
||||
modeInfo->YResolution = info->h;
|
||||
modeInfo->BitsPerPixel = info->bpp;
|
||||
|
||||
modeInfo->MaxBuffers = (af->TotalMemory*1024) /
|
||||
(info->w*info->h*BYTES_PER_PIXEL(info->bpp));
|
||||
modeInfo->MaxBuffers = (af->TotalMemory * 1024) /
|
||||
(info->w * info->h * BYTES_PER_PIXEL(info->bpp));
|
||||
|
||||
if (info->w > 1024) {
|
||||
modeInfo->MaxBytesPerScanLine = 2048*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine = 2048 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 2048;
|
||||
}
|
||||
else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024*BYTES_PER_PIXEL(info->bpp);
|
||||
} else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
}
|
||||
|
||||
modeInfo->BytesPerScanLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BytesPerScanLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
modeInfo->MaxPixelClock = 135000000;
|
||||
|
@ -328,13 +277,11 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
int width;
|
||||
|
@ -342,15 +289,13 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
RM_REGS r;
|
||||
|
||||
/* reject anything with hardware stereo, linear framebuffer, or noclear */
|
||||
if (mode & 0xC400)
|
||||
return -1;
|
||||
if (mode & 0xC400) return -1;
|
||||
|
||||
mode &= 0x3FF;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
/* call BIOS to set the mode */
|
||||
r.x.ax = info->num;
|
||||
|
@ -358,16 +303,16 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
/* adjust the virtual width for widescreen modes */
|
||||
if (virtualX > info->w) {
|
||||
if (virtualX > 1024)
|
||||
return -1;
|
||||
if (virtualX > 1024) return -1;
|
||||
|
||||
*bytesPerLine = ((virtualX*BYTES_PER_PIXEL(info->bpp))+15)&0xFFF0;
|
||||
*bytesPerLine = ((virtualX * BYTES_PER_PIXEL(info->bpp)) + 15) & 0xFFF0;
|
||||
|
||||
width = read_vga_register(0x3D4, 0x13);
|
||||
write_vga_register(0x3D4, 0x13, (width * (*bytesPerLine)) / (info->w*BYTES_PER_PIXEL(info->bpp)));
|
||||
}
|
||||
else
|
||||
*bytesPerLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
write_vga_register(0x3D4, 0x13,
|
||||
(width * (*bytesPerLine)) /
|
||||
(info->w * BYTES_PER_PIXEL(info->bpp)));
|
||||
} else
|
||||
*bytesPerLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* set up some hardware registers */
|
||||
if (chip_id >= 0x33)
|
||||
|
@ -385,22 +330,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
af_scroll_y = 0;
|
||||
af_bank = -1;
|
||||
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
available_vram = af->TotalMemory*1024 ;
|
||||
available_vram = af->TotalMemory * 1024;
|
||||
|
||||
if (used_vram > available_vram)
|
||||
return -1;
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
}
|
||||
else {
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
af->OffscreenEndY = 0;
|
||||
|
@ -409,43 +352,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -453,17 +385,16 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
if (waitVRT >= 0) {
|
||||
long a = ((x * BYTES_PER_PIXEL(af_bpp)) + ((y + af_visible_page*af_height) * af_width)) >> 2;
|
||||
long a = ((x * BYTES_PER_PIXEL(af_bpp)) +
|
||||
((y + af_visible_page * af_height) * af_width)) >>
|
||||
2;
|
||||
|
||||
asm volatile ("cli");
|
||||
asm volatile("cli");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* first set the standard CRT Start registers */
|
||||
outportw(0x3D4, (a & 0xFF00) | 0x0C);
|
||||
|
@ -471,101 +402,84 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
|||
|
||||
/* set bit 16 of the screen start address */
|
||||
outportb(0x3D4, 0x1E);
|
||||
outportb(0x3D5, (inportb(0x3D5) & 0xDF) | ((a & 0x10000) >> 11) );
|
||||
outportb(0x3D5, (inportb(0x3D5) & 0xDF) | ((a & 0x10000) >> 11));
|
||||
|
||||
/* bits 17-19 of the start address: uses the 8900CL/D+ register */
|
||||
outportb(0x3D4, 0x27);
|
||||
outportb(0x3D5, (inportb(0x3D5) & 0xF8) | ((a & 0xE0000) >> 17) );
|
||||
outportb(0x3D5, (inportb(0x3D5) & 0xF8) | ((a & 0xE0000) >> 17));
|
||||
|
||||
/* set pel register */
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
write_vga_register(0x3C0, 0x33, x&3);
|
||||
write_vga_register(0x3C0, 0x33, x & 3);
|
||||
|
||||
asm volatile ("sti");
|
||||
asm volatile("sti");
|
||||
}
|
||||
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* DualSetBank32:
|
||||
* Relocatable bank switch function, called with a bank number in %edx.
|
||||
*/
|
||||
|
@ -602,11 +516,7 @@ asm ("
|
|||
*/
|
||||
void DualSetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _DualSetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _DualSetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
@ -660,14 +570,7 @@ asm ("
|
|||
*/
|
||||
void SingleSetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _SingleSetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _SingleSetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
356
tseng/driver.c
356
tseng/driver.c
|
@ -14,16 +14,12 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
// #define NO_HWPTR
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* chipset information */
|
||||
#define ET_NONE 0
|
||||
#define ET_3000 1
|
||||
|
@ -32,18 +28,17 @@
|
|||
|
||||
int tseng_type = ET_NONE;
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void ET3000SetBank32();
|
||||
void ET3000SetBank32End();
|
||||
void ET3000SetBank32( );
|
||||
void ET3000SetBank32End( );
|
||||
void ET3000SetBank(AF_DRIVER *af, long bank);
|
||||
void ET4000SetBank32();
|
||||
void ET4000SetBank32End();
|
||||
void ET4000SetBank32( );
|
||||
void ET4000SetBank32End( );
|
||||
void ET4000SetBank(AF_DRIVER *af, long bank);
|
||||
int ExtStub();
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -51,15 +46,12 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
|
||||
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -70,72 +62,51 @@ int af_scroll_x;
|
|||
int af_scroll_y;
|
||||
int af_bank;
|
||||
|
||||
|
||||
|
||||
/* FreeBE/AF extension allowing farptr access to video memory */
|
||||
FAF_HWPTR_DATA hwptr;
|
||||
|
||||
|
||||
|
||||
/* list of available video modes */
|
||||
typedef struct VIDEO_MODE
|
||||
{
|
||||
typedef struct VIDEO_MODE {
|
||||
int w, h;
|
||||
int bpp;
|
||||
int num;
|
||||
int bios;
|
||||
} VIDEO_MODE;
|
||||
|
||||
|
||||
VIDEO_MODE et3000_mode_list[] =
|
||||
{
|
||||
{ 640, 350, 8, 0x2D, 0 },
|
||||
VIDEO_MODE et3000_mode_list[] = { { 640, 350, 8, 0x2D, 0 },
|
||||
{ 640, 480, 8, 0x2E, 0 },
|
||||
{ 800, 600, 8, 0x30, 0 }
|
||||
};
|
||||
{ 800, 600, 8, 0x30, 0 } };
|
||||
|
||||
|
||||
VIDEO_MODE et4000_mode_list[] =
|
||||
{
|
||||
{ 640, 350, 8, 0x2D, 0 },
|
||||
{ 640, 480, 8, 0x2E, 0 },
|
||||
{ 640, 400, 8, 0x2F, 0 },
|
||||
{ 800, 600, 8, 0x30, 0 },
|
||||
{ 1024, 768, 8, 0x38, 0 },
|
||||
{ 320, 200, 15, 0x13, 0x10F0 },
|
||||
{ 640, 350, 15, 0x2D, 0x10F0 },
|
||||
{ 640, 480, 15, 0x2E, 0x10F0 },
|
||||
{ 640, 400, 15, 0x2F, 0x10F0 },
|
||||
{ 800, 600, 15, 0x30, 0x10F0 },
|
||||
{ 1024, 768, 15, 0x38, 0x10F0 },
|
||||
{ 640, 350, 24, 0x2DFF, 0x10F0 },
|
||||
{ 640, 480, 24, 0x2EFF, 0x10F0 },
|
||||
{ 640, 400, 24, 0x2FFF, 0x10F0 },
|
||||
VIDEO_MODE et4000_mode_list[] = {
|
||||
{ 640, 350, 8, 0x2D, 0 }, { 640, 480, 8, 0x2E, 0 },
|
||||
{ 640, 400, 8, 0x2F, 0 }, { 800, 600, 8, 0x30, 0 },
|
||||
{ 1024, 768, 8, 0x38, 0 }, { 320, 200, 15, 0x13, 0x10F0 },
|
||||
{ 640, 350, 15, 0x2D, 0x10F0 }, { 640, 480, 15, 0x2E, 0x10F0 },
|
||||
{ 640, 400, 15, 0x2F, 0x10F0 }, { 800, 600, 15, 0x30, 0x10F0 },
|
||||
{ 1024, 768, 15, 0x38, 0x10F0 }, { 640, 350, 24, 0x2DFF, 0x10F0 },
|
||||
{ 640, 480, 24, 0x2EFF, 0x10F0 }, { 640, 400, 24, 0x2FFF, 0x10F0 },
|
||||
{ 800, 600, 24, 0x30FF, 0x10F0 }
|
||||
};
|
||||
|
||||
#define NUM_ET3000_MODES (int)(sizeof(et3000_mode_list) / sizeof(VIDEO_MODE))
|
||||
#define NUM_ET4000_MODES (int)(sizeof(et4000_mode_list) / sizeof(VIDEO_MODE))
|
||||
|
||||
#define NUM_ET3000_MODES (int)(sizeof(et3000_mode_list)/sizeof(VIDEO_MODE))
|
||||
#define NUM_ET4000_MODES (int)(sizeof(et4000_mode_list)/sizeof(VIDEO_MODE))
|
||||
|
||||
|
||||
short available_et3000_modes[NUM_ET3000_MODES+1] = { 1, 2, 3, -1 };
|
||||
short available_et4000_modes[NUM_ET4000_MODES+1] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1 };
|
||||
|
||||
|
||||
short available_et3000_modes[NUM_ET3000_MODES + 1] = { 1, 2, 3, -1 };
|
||||
short available_et4000_modes[NUM_ET4000_MODES + 1] = { 1, 2, 3, 4, 5, 6,
|
||||
7, 8, 9, 10, 11, 12,
|
||||
13, 14, 15, -1 };
|
||||
|
||||
/* detect:
|
||||
* Detects the presence of a Tseng card.
|
||||
*/
|
||||
int detect()
|
||||
{
|
||||
int detect( ) {
|
||||
int old1, old2, subver;
|
||||
|
||||
old1 = inportb(0x3BF);
|
||||
old2 = inportb(0x3D4+4);
|
||||
old2 = inportb(0x3D4 + 4);
|
||||
|
||||
outportb(0x3BF, 3);
|
||||
outportb(0x3D4+4, 0xA0);
|
||||
outportb(0x3D4 + 4, 0xA0);
|
||||
|
||||
if (test_register(0x3CD, 0x3F)) {
|
||||
if (test_vga_register(0x3D4, 0x33, 0x0F)) {
|
||||
|
@ -146,60 +117,45 @@ int detect()
|
|||
else if (subver == 15)
|
||||
return ET_6000;
|
||||
/* else unknown Tseng */
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ET_4000;
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ET_3000;
|
||||
}
|
||||
|
||||
outportb(0x3BF, old1);
|
||||
outportb(0x3D4+4, old2);
|
||||
outportb(0x3D4 + 4, old2);
|
||||
|
||||
return ET_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* Fills in our driver header block.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
char *name = NULL;
|
||||
int vram_size;
|
||||
int i;
|
||||
|
||||
tseng_type = detect();
|
||||
tseng_type = detect( );
|
||||
|
||||
switch (tseng_type) {
|
||||
case ET_3000: name = "ET3000"; break;
|
||||
|
||||
case ET_3000:
|
||||
name = "ET3000";
|
||||
break;
|
||||
case ET_4000: name = "ET4000"; break;
|
||||
|
||||
case ET_4000:
|
||||
name = "ET4000";
|
||||
break;
|
||||
case ET_6000: name = "ET6000"; break;
|
||||
|
||||
case ET_6000:
|
||||
name = "ET6000";
|
||||
break;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
default: return 1;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (af->OemVendorName[i])
|
||||
i++;
|
||||
while (af->OemVendorName[i]) i++;
|
||||
|
||||
af->OemVendorName[i++] = ',';
|
||||
af->OemVendorName[i++] = ' ';
|
||||
|
||||
while (*name)
|
||||
af->OemVendorName[i++] = *(name++);
|
||||
while (*name) af->OemVendorName[i++] = *(name++);
|
||||
|
||||
af->OemVendorName[i] = 0;
|
||||
|
||||
|
@ -208,12 +164,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->TotalMemory = 512;
|
||||
else
|
||||
af->TotalMemory = 1024;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (tseng_type == ET_3000)
|
||||
af->TotalMemory = MIN(vram_size/1024, 512);
|
||||
af->TotalMemory = MIN(vram_size / 1024, 512);
|
||||
else
|
||||
af->TotalMemory = MIN(vram_size/1024, 1024);
|
||||
af->TotalMemory = MIN(vram_size / 1024, 1024);
|
||||
}
|
||||
|
||||
if (tseng_type == ET_3000) {
|
||||
|
@ -222,8 +177,7 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->SetBank32 = ET3000SetBank32;
|
||||
af->SetBank32Len = (long)ET3000SetBank32End - (long)ET3000SetBank32;
|
||||
af->SetBank = ET3000SetBank;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
af->AvailableModes = available_et4000_modes;
|
||||
|
||||
af->SetBank32 = ET4000SetBank32;
|
||||
|
@ -231,9 +185,8 @@ int SetupDriver(AF_DRIVER *af)
|
|||
af->SetBank = ET4000SetBank;
|
||||
}
|
||||
|
||||
af->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
af->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
af->BankSize = 64;
|
||||
af->BankedBasePtr = 0xA0000;
|
||||
|
@ -255,14 +208,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
hwptr_init(hwptr.IOMemMaps[0], af->IOMemMaps[0]);
|
||||
hwptr_init(hwptr.IOMemMaps[1], af->IOMemMaps[1]);
|
||||
hwptr_init(hwptr.IOMemMaps[2], af->IOMemMaps[2]);
|
||||
|
@ -273,81 +223,68 @@ int InitDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
#ifndef NO_HWPTR
|
||||
#ifndef NO_HWPTR
|
||||
|
||||
case FAFEXT_HWPTR:
|
||||
/* allow farptr access to video memory */
|
||||
return &hwptr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
VIDEO_MODE *info;
|
||||
int i;
|
||||
|
||||
if ((mode <= 0) || (mode > ((tseng_type == ET_3000) ? NUM_ET3000_MODES : NUM_ET4000_MODES)))
|
||||
if ((mode <= 0) || (mode > ((tseng_type == ET_3000) ? NUM_ET3000_MODES
|
||||
: NUM_ET4000_MODES)))
|
||||
return -1;
|
||||
|
||||
if (tseng_type == ET_3000)
|
||||
info = &et3000_mode_list[mode-1];
|
||||
info = &et3000_mode_list[mode - 1];
|
||||
else
|
||||
info = &et4000_mode_list[mode-1];
|
||||
info = &et4000_mode_list[mode - 1];
|
||||
|
||||
for (i=0; i<(int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
modeInfo->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
modeInfo->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
modeInfo->XResolution = info->w;
|
||||
modeInfo->YResolution = info->h;
|
||||
modeInfo->BitsPerPixel = info->bpp;
|
||||
|
||||
modeInfo->MaxBuffers = (af->TotalMemory*1024) /
|
||||
(info->w*info->h*BYTES_PER_PIXEL(info->bpp));
|
||||
modeInfo->MaxBuffers = (af->TotalMemory * 1024) /
|
||||
(info->w * info->h * BYTES_PER_PIXEL(info->bpp));
|
||||
|
||||
if (info->w > 1024) {
|
||||
modeInfo->MaxBytesPerScanLine = 2048*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine = 2048 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 2048;
|
||||
}
|
||||
else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024*BYTES_PER_PIXEL(info->bpp);
|
||||
} else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
}
|
||||
|
||||
modeInfo->BytesPerScanLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BytesPerScanLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
modeInfo->MaxPixelClock = 135000000;
|
||||
|
@ -355,13 +292,11 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
int width;
|
||||
|
@ -369,41 +304,40 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
RM_REGS r;
|
||||
|
||||
/* reject anything with hardware stereo, linear framebuffer, or noclear */
|
||||
if (mode & 0xC400)
|
||||
return -1;
|
||||
if (mode & 0xC400) return -1;
|
||||
|
||||
mode &= 0x3FF;
|
||||
|
||||
if ((mode <= 0) || (mode > ((tseng_type == ET_3000) ? NUM_ET3000_MODES : NUM_ET4000_MODES)))
|
||||
if ((mode <= 0) || (mode > ((tseng_type == ET_3000) ? NUM_ET3000_MODES
|
||||
: NUM_ET4000_MODES)))
|
||||
return -1;
|
||||
|
||||
if (tseng_type == ET_3000)
|
||||
info = &et3000_mode_list[mode-1];
|
||||
info = &et3000_mode_list[mode - 1];
|
||||
else
|
||||
info = &et4000_mode_list[mode-1];
|
||||
info = &et4000_mode_list[mode - 1];
|
||||
|
||||
/* call BIOS to set the mode */
|
||||
if (info->bios) {
|
||||
r.x.ax = info->bios;
|
||||
r.x.bx = info->num;
|
||||
}
|
||||
else
|
||||
} else
|
||||
r.x.ax = info->num;
|
||||
|
||||
rm_int(0x10, &r);
|
||||
|
||||
/* adjust the virtual width for widescreen modes */
|
||||
if (virtualX > info->w) {
|
||||
if (virtualX > 1024)
|
||||
return -1;
|
||||
if (virtualX > 1024) return -1;
|
||||
|
||||
*bytesPerLine = ((virtualX*BYTES_PER_PIXEL(info->bpp))+15)&0xFFF0;
|
||||
*bytesPerLine = ((virtualX * BYTES_PER_PIXEL(info->bpp)) + 15) & 0xFFF0;
|
||||
|
||||
width = read_vga_register(0x3D4, 0x13);
|
||||
write_vga_register(0x3D4, 0x13, (width * (*bytesPerLine)) / (info->w*BYTES_PER_PIXEL(info->bpp)));
|
||||
}
|
||||
else
|
||||
*bytesPerLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
write_vga_register(0x3D4, 0x13,
|
||||
(width * (*bytesPerLine)) /
|
||||
(info->w * BYTES_PER_PIXEL(info->bpp)));
|
||||
} else
|
||||
*bytesPerLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* store info about the current mode */
|
||||
af_bpp = info->bpp;
|
||||
|
@ -415,22 +349,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
af_scroll_y = 0;
|
||||
af_bank = -1;
|
||||
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
available_vram = af->TotalMemory*1024 ;
|
||||
available_vram = af->TotalMemory * 1024;
|
||||
|
||||
if (used_vram > available_vram)
|
||||
return -1;
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
}
|
||||
else {
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
af->OffscreenEndY = 0;
|
||||
|
@ -439,43 +371,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -483,120 +404,100 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
if (waitVRT >= 0) {
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) + ((y + af_visible_page*af_height) * af_width);
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) +
|
||||
((y + af_visible_page * af_height) * af_width);
|
||||
|
||||
asm volatile ("cli");
|
||||
asm volatile("cli");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* write high bit(s) to Tseng-specific registers */
|
||||
if (tseng_type == ET_3000)
|
||||
alter_vga_register(0x3D4, 0x23, 2, a>>17);
|
||||
alter_vga_register(0x3D4, 0x23, 2, a >> 17);
|
||||
else if (tseng_type == ET_4000)
|
||||
alter_vga_register(0x3D4, 0x33, 3, a>>18);
|
||||
alter_vga_register(0x3D4, 0x33, 3, a >> 18);
|
||||
else if (tseng_type == ET_6000)
|
||||
alter_vga_register(0x3D4, 0x33, 3, a>>17);
|
||||
alter_vga_register(0x3D4, 0x33, 3, a >> 17);
|
||||
|
||||
/* write to normal VGA address registers */
|
||||
write_vga_register(0x3D4, 0x0D, (a>>2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a>>10) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0D, (a >> 2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a >> 10) & 0xFF);
|
||||
|
||||
asm volatile ("sti");
|
||||
asm volatile("sti");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
/* write low 2 bits to VGA horizontal pan register */
|
||||
if (af_bpp == 8)
|
||||
write_vga_register(0x3C0, 0x33, a&3);
|
||||
if (af_bpp == 8) write_vga_register(0x3C0, 0x33, a & 3);
|
||||
}
|
||||
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ET3000SetBank32:
|
||||
* Relocatable bank switch function, called with a bank number in %edx.
|
||||
*/
|
||||
|
@ -634,11 +535,7 @@ asm ("
|
|||
*/
|
||||
void ET3000SetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _ET3000SetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _ET3000SetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
@ -681,14 +578,7 @@ asm ("
|
|||
*/
|
||||
void ET4000SetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _ET4000SetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _ET4000SetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
672
vbeaf.h
672
vbeaf.h
|
@ -12,24 +12,20 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#define FREEBE_VERSION "v1.2"
|
||||
|
||||
|
||||
#ifndef ALLEGRO_H
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
|
||||
#define NULL 0
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
|
||||
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
|
||||
#define MID(x,y,z) MAX((x), MIN((y), (z)))
|
||||
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
#define MID(x, y, z) MAX((x), MIN((y), (z)))
|
||||
|
||||
#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
|
||||
|
||||
|
@ -37,11 +33,8 @@
|
|||
|
||||
typedef long fixed;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* mode attribute flags */
|
||||
#define afHaveMultiBuffer 0x0001 /* multiple buffers */
|
||||
#define afHaveVirtualScroll 0x0002 /* virtual scrolling */
|
||||
|
@ -60,11 +53,8 @@ typedef long fixed;
|
|||
#define afHaveHWStereoSync 0x4000 /* hardware stereo signalling */
|
||||
#define afHaveEVCStereoSync 0x8000 /* HW stereo sync via EVC connector */
|
||||
|
||||
|
||||
|
||||
/* drawing modes */
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
AF_FORE_MIX = 0, /* background pixels use the foreground mix */
|
||||
AF_REPLACE_MIX = 0, /* solid drawing mode */
|
||||
AF_AND_MIX, /* bitwise AND mode */
|
||||
|
@ -91,20 +81,14 @@ typedef enum
|
|||
AF_R2_WHITE,
|
||||
} AF_mixModes;
|
||||
|
||||
|
||||
|
||||
/* fixed point coordinate pair */
|
||||
typedef struct AF_FIX_POINT
|
||||
{
|
||||
typedef struct AF_FIX_POINT {
|
||||
fixed x;
|
||||
fixed y;
|
||||
} AF_FIX_POINT;
|
||||
|
||||
|
||||
|
||||
/* trapezium information block */
|
||||
typedef struct AF_TRAP
|
||||
{
|
||||
typedef struct AF_TRAP {
|
||||
unsigned long y;
|
||||
unsigned long count;
|
||||
fixed x1;
|
||||
|
@ -113,179 +97,169 @@ typedef struct AF_TRAP
|
|||
fixed slope2;
|
||||
} AF_TRAP;
|
||||
|
||||
|
||||
|
||||
/* hardware cursor description */
|
||||
typedef struct AF_CURSOR
|
||||
{
|
||||
typedef struct AF_CURSOR {
|
||||
unsigned long xorMask[32];
|
||||
unsigned long andMask[32];
|
||||
unsigned long hotx;
|
||||
unsigned long hoty;
|
||||
} AF_CURSOR;
|
||||
|
||||
|
||||
|
||||
/* color value */
|
||||
typedef struct AF_PALETTE
|
||||
{
|
||||
typedef struct AF_PALETTE {
|
||||
unsigned char blue;
|
||||
unsigned char green;
|
||||
unsigned char red;
|
||||
unsigned char alpha;
|
||||
} AF_PALETTE;
|
||||
|
||||
|
||||
|
||||
/* CRTC information block for refresh rate control */
|
||||
typedef struct AF_CRTCInfo
|
||||
{
|
||||
unsigned short HorizontalTotal __attribute__ ((packed)); /* horizontal total (pixels) */
|
||||
unsigned short HorizontalSyncStart __attribute__ ((packed)); /* horizontal sync start position */
|
||||
unsigned short HorizontalSyncEnd __attribute__ ((packed)); /* horizontal sync end position */
|
||||
unsigned short VerticalTotal __attribute__ ((packed)); /* vertical total (lines) */
|
||||
unsigned short VerticalSyncStart __attribute__ ((packed)); /* vertical sync start position */
|
||||
unsigned short VerticalSyncEnd __attribute__ ((packed)); /* vertical sync end position */
|
||||
unsigned char Flags __attribute__ ((packed)); /* initialisation flags for mode */
|
||||
unsigned int PixelClock __attribute__ ((packed)); /* pixel clock in units of Hz */
|
||||
unsigned short RefreshRate __attribute__ ((packed)); /* expected refresh rate in .01Hz */
|
||||
unsigned short NumBuffers __attribute__ ((packed)); /* number of display buffers */
|
||||
typedef struct AF_CRTCInfo {
|
||||
unsigned short HorizontalTotal
|
||||
__attribute__((packed)); /* horizontal total (pixels) */
|
||||
unsigned short HorizontalSyncStart
|
||||
__attribute__((packed)); /* horizontal sync start position */
|
||||
unsigned short HorizontalSyncEnd
|
||||
__attribute__((packed)); /* horizontal sync end position */
|
||||
unsigned short VerticalTotal
|
||||
__attribute__((packed)); /* vertical total (lines) */
|
||||
unsigned short VerticalSyncStart
|
||||
__attribute__((packed)); /* vertical sync start position */
|
||||
unsigned short VerticalSyncEnd
|
||||
__attribute__((packed)); /* vertical sync end position */
|
||||
unsigned char Flags
|
||||
__attribute__((packed)); /* initialisation flags for mode */
|
||||
unsigned int PixelClock
|
||||
__attribute__((packed)); /* pixel clock in units of Hz */
|
||||
unsigned short RefreshRate
|
||||
__attribute__((packed)); /* expected refresh rate in .01Hz */
|
||||
unsigned short NumBuffers
|
||||
__attribute__((packed)); /* number of display buffers */
|
||||
} AF_CRTCInfo;
|
||||
|
||||
|
||||
|
||||
/* definitions for CRTC information block flags */
|
||||
#define afDoubleScan 0x0001 /* enable double scanned mode */
|
||||
#define afInterlaced 0x0002 /* enable interlaced mode */
|
||||
#define afHSyncNeg 0x0004 /* horizontal sync is negative */
|
||||
#define afVSyncNeg 0x0008 /* vertical sync is negative */
|
||||
|
||||
|
||||
|
||||
typedef unsigned char AF_PATTERN; /* pattern array elements */
|
||||
typedef unsigned AF_STIPPLE; /* 16 bit line stipple pattern */
|
||||
typedef unsigned AF_COLOR; /* packed color values */
|
||||
|
||||
|
||||
|
||||
/* mode information structure */
|
||||
typedef struct AF_MODE_INFO
|
||||
{
|
||||
unsigned short Attributes __attribute__ ((packed));
|
||||
unsigned short XResolution __attribute__ ((packed));
|
||||
unsigned short YResolution __attribute__ ((packed));
|
||||
unsigned short BytesPerScanLine __attribute__ ((packed));
|
||||
unsigned short BitsPerPixel __attribute__ ((packed));
|
||||
unsigned short MaxBuffers __attribute__ ((packed));
|
||||
unsigned char RedMaskSize __attribute__ ((packed));
|
||||
unsigned char RedFieldPosition __attribute__ ((packed));
|
||||
unsigned char GreenMaskSize __attribute__ ((packed));
|
||||
unsigned char GreenFieldPosition __attribute__ ((packed));
|
||||
unsigned char BlueMaskSize __attribute__ ((packed));
|
||||
unsigned char BlueFieldPosition __attribute__ ((packed));
|
||||
unsigned char RsvdMaskSize __attribute__ ((packed));
|
||||
unsigned char RsvdFieldPosition __attribute__ ((packed));
|
||||
unsigned short MaxBytesPerScanLine __attribute__ ((packed));
|
||||
unsigned short MaxScanLineWidth __attribute__ ((packed));
|
||||
typedef struct AF_MODE_INFO {
|
||||
unsigned short Attributes __attribute__((packed));
|
||||
unsigned short XResolution __attribute__((packed));
|
||||
unsigned short YResolution __attribute__((packed));
|
||||
unsigned short BytesPerScanLine __attribute__((packed));
|
||||
unsigned short BitsPerPixel __attribute__((packed));
|
||||
unsigned short MaxBuffers __attribute__((packed));
|
||||
unsigned char RedMaskSize __attribute__((packed));
|
||||
unsigned char RedFieldPosition __attribute__((packed));
|
||||
unsigned char GreenMaskSize __attribute__((packed));
|
||||
unsigned char GreenFieldPosition __attribute__((packed));
|
||||
unsigned char BlueMaskSize __attribute__((packed));
|
||||
unsigned char BlueFieldPosition __attribute__((packed));
|
||||
unsigned char RsvdMaskSize __attribute__((packed));
|
||||
unsigned char RsvdFieldPosition __attribute__((packed));
|
||||
unsigned short MaxBytesPerScanLine __attribute__((packed));
|
||||
unsigned short MaxScanLineWidth __attribute__((packed));
|
||||
|
||||
/* VBE/AF 2.0 extensions */
|
||||
unsigned short LinBytesPerScanLine __attribute__ ((packed));
|
||||
unsigned char BnkMaxBuffers __attribute__ ((packed));
|
||||
unsigned char LinMaxBuffers __attribute__ ((packed));
|
||||
unsigned char LinRedMaskSize __attribute__ ((packed));
|
||||
unsigned char LinRedFieldPosition __attribute__ ((packed));
|
||||
unsigned char LinGreenMaskSize __attribute__ ((packed));
|
||||
unsigned char LinGreenFieldPosition __attribute__ ((packed));
|
||||
unsigned char LinBlueMaskSize __attribute__ ((packed));
|
||||
unsigned char LinBlueFieldPosition __attribute__ ((packed));
|
||||
unsigned char LinRsvdMaskSize __attribute__ ((packed));
|
||||
unsigned char LinRsvdFieldPosition __attribute__ ((packed));
|
||||
unsigned long MaxPixelClock __attribute__ ((packed));
|
||||
unsigned long VideoCapabilities __attribute__ ((packed));
|
||||
unsigned short VideoMinXScale __attribute__ ((packed));
|
||||
unsigned short VideoMinYScale __attribute__ ((packed));
|
||||
unsigned short VideoMaxXScale __attribute__ ((packed));
|
||||
unsigned short VideoMaxYScale __attribute__ ((packed));
|
||||
unsigned short LinBytesPerScanLine __attribute__((packed));
|
||||
unsigned char BnkMaxBuffers __attribute__((packed));
|
||||
unsigned char LinMaxBuffers __attribute__((packed));
|
||||
unsigned char LinRedMaskSize __attribute__((packed));
|
||||
unsigned char LinRedFieldPosition __attribute__((packed));
|
||||
unsigned char LinGreenMaskSize __attribute__((packed));
|
||||
unsigned char LinGreenFieldPosition __attribute__((packed));
|
||||
unsigned char LinBlueMaskSize __attribute__((packed));
|
||||
unsigned char LinBlueFieldPosition __attribute__((packed));
|
||||
unsigned char LinRsvdMaskSize __attribute__((packed));
|
||||
unsigned char LinRsvdFieldPosition __attribute__((packed));
|
||||
unsigned long MaxPixelClock __attribute__((packed));
|
||||
unsigned long VideoCapabilities __attribute__((packed));
|
||||
unsigned short VideoMinXScale __attribute__((packed));
|
||||
unsigned short VideoMinYScale __attribute__((packed));
|
||||
unsigned short VideoMaxXScale __attribute__((packed));
|
||||
unsigned short VideoMaxYScale __attribute__((packed));
|
||||
|
||||
unsigned char reserved[76] __attribute__ ((packed));
|
||||
unsigned char reserved[76] __attribute__((packed));
|
||||
|
||||
} AF_MODE_INFO;
|
||||
|
||||
|
||||
|
||||
#define DC struct AF_DRIVER *dc
|
||||
|
||||
|
||||
|
||||
/* main VBE/AF driver structure */
|
||||
typedef struct AF_DRIVER
|
||||
{
|
||||
typedef struct AF_DRIVER {
|
||||
/* header */
|
||||
char Signature[12] __attribute__ ((packed));
|
||||
unsigned long Version __attribute__ ((packed));
|
||||
unsigned long DriverRev __attribute__ ((packed));
|
||||
char OemVendorName[80] __attribute__ ((packed));
|
||||
char OemCopyright[80] __attribute__ ((packed));
|
||||
short *AvailableModes __attribute__ ((packed));
|
||||
unsigned long TotalMemory __attribute__ ((packed));
|
||||
unsigned long Attributes __attribute__ ((packed));
|
||||
unsigned long BankSize __attribute__ ((packed));
|
||||
unsigned long BankedBasePtr __attribute__ ((packed));
|
||||
unsigned long LinearSize __attribute__ ((packed));
|
||||
unsigned long LinearBasePtr __attribute__ ((packed));
|
||||
unsigned long LinearGranularity __attribute__ ((packed));
|
||||
unsigned short *IOPortsTable __attribute__ ((packed));
|
||||
unsigned long IOMemoryBase[4] __attribute__ ((packed));
|
||||
unsigned long IOMemoryLen[4] __attribute__ ((packed));
|
||||
unsigned long LinearStridePad __attribute__ ((packed));
|
||||
unsigned short PCIVendorID __attribute__ ((packed));
|
||||
unsigned short PCIDeviceID __attribute__ ((packed));
|
||||
unsigned short PCISubSysVendorID __attribute__ ((packed));
|
||||
unsigned short PCISubSysID __attribute__ ((packed));
|
||||
unsigned long Checksum __attribute__ ((packed));
|
||||
unsigned long res2[6] __attribute__ ((packed));
|
||||
char Signature[12] __attribute__((packed));
|
||||
unsigned long Version __attribute__((packed));
|
||||
unsigned long DriverRev __attribute__((packed));
|
||||
char OemVendorName[80] __attribute__((packed));
|
||||
char OemCopyright[80] __attribute__((packed));
|
||||
short *AvailableModes __attribute__((packed));
|
||||
unsigned long TotalMemory __attribute__((packed));
|
||||
unsigned long Attributes __attribute__((packed));
|
||||
unsigned long BankSize __attribute__((packed));
|
||||
unsigned long BankedBasePtr __attribute__((packed));
|
||||
unsigned long LinearSize __attribute__((packed));
|
||||
unsigned long LinearBasePtr __attribute__((packed));
|
||||
unsigned long LinearGranularity __attribute__((packed));
|
||||
unsigned short *IOPortsTable __attribute__((packed));
|
||||
unsigned long IOMemoryBase[4] __attribute__((packed));
|
||||
unsigned long IOMemoryLen[4] __attribute__((packed));
|
||||
unsigned long LinearStridePad __attribute__((packed));
|
||||
unsigned short PCIVendorID __attribute__((packed));
|
||||
unsigned short PCIDeviceID __attribute__((packed));
|
||||
unsigned short PCISubSysVendorID __attribute__((packed));
|
||||
unsigned short PCISubSysID __attribute__((packed));
|
||||
unsigned long Checksum __attribute__((packed));
|
||||
unsigned long res2[6] __attribute__((packed));
|
||||
|
||||
/* near pointers mapped by the application */
|
||||
void *IOMemMaps[4] __attribute__ ((packed));
|
||||
void *BankedMem __attribute__ ((packed));
|
||||
void *LinearMem __attribute__ ((packed));
|
||||
unsigned long res3[5] __attribute__ ((packed));
|
||||
void *IOMemMaps[4] __attribute__((packed));
|
||||
void *BankedMem __attribute__((packed));
|
||||
void *LinearMem __attribute__((packed));
|
||||
unsigned long res3[5] __attribute__((packed));
|
||||
|
||||
/* driver state variables */
|
||||
unsigned long BufferEndX __attribute__ ((packed));
|
||||
unsigned long BufferEndY __attribute__ ((packed));
|
||||
unsigned long OriginOffset __attribute__ ((packed));
|
||||
unsigned long OffscreenOffset __attribute__ ((packed));
|
||||
unsigned long OffscreenStartY __attribute__ ((packed));
|
||||
unsigned long OffscreenEndY __attribute__ ((packed));
|
||||
unsigned long res4[10] __attribute__ ((packed));
|
||||
unsigned long BufferEndX __attribute__((packed));
|
||||
unsigned long BufferEndY __attribute__((packed));
|
||||
unsigned long OriginOffset __attribute__((packed));
|
||||
unsigned long OffscreenOffset __attribute__((packed));
|
||||
unsigned long OffscreenStartY __attribute__((packed));
|
||||
unsigned long OffscreenEndY __attribute__((packed));
|
||||
unsigned long res4[10] __attribute__((packed));
|
||||
|
||||
/* relocatable 32 bit bank switch routine, for Windows (ugh!) */
|
||||
unsigned long SetBank32Len __attribute__ ((packed));
|
||||
void *SetBank32 __attribute__ ((packed));
|
||||
unsigned long SetBank32Len __attribute__((packed));
|
||||
void *SetBank32 __attribute__((packed));
|
||||
|
||||
/* callback functions provided by the application */
|
||||
void *Int86 __attribute__ ((packed));
|
||||
void *CallRealMode __attribute__ ((packed));
|
||||
void *Int86 __attribute__((packed));
|
||||
void *CallRealMode __attribute__((packed));
|
||||
|
||||
/* main driver setup routine */
|
||||
void *InitDriver __attribute__ ((packed));
|
||||
void *InitDriver __attribute__((packed));
|
||||
|
||||
/* VBE/AF 1.0 asm interface (obsolete and not supported by Allegro) */
|
||||
void *af10Funcs[40] __attribute__ ((packed));
|
||||
void *af10Funcs[40] __attribute__((packed));
|
||||
|
||||
/* VBE/AF 2.0 extensions */
|
||||
void *PlugAndPlayInit __attribute__ ((packed));
|
||||
void *PlugAndPlayInit __attribute__((packed));
|
||||
|
||||
/* extension query function, specific to FreeBE/AF */
|
||||
void *(*OemExt)(DC, unsigned long id);
|
||||
|
||||
/* extension hook for implementing additional VESA interfaces */
|
||||
void *SupplementalExt __attribute__ ((packed));
|
||||
void *SupplementalExt __attribute__((packed));
|
||||
|
||||
/* device driver functions */
|
||||
long (*GetVideoModeInfo)(DC, short mode, AF_MODE_INFO *modeInfo);
|
||||
long (*SetVideoMode)(DC, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long (*SetVideoMode)(DC, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void (*RestoreTextMode)(DC);
|
||||
long (*GetClosestPixelClock)(DC, short mode, unsigned long pixelClock);
|
||||
void (*SaveRestoreState)(DC, int subfunc, void *saveBuf);
|
||||
|
@ -294,14 +268,16 @@ typedef struct AF_DRIVER
|
|||
void (*SetVisibleBuffer)(DC, long index, long waitVRT);
|
||||
int (*GetDisplayStartStatus)(DC);
|
||||
void (*EnableStereoMode)(DC, int enable);
|
||||
void (*SetPaletteData)(DC, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
void (*SetPaletteData)(DC, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
void (*SetGammaCorrectData)(DC, AF_PALETTE *pal, long num, long index);
|
||||
void (*SetBank)(DC, long bank);
|
||||
|
||||
/* hardware cursor functions */
|
||||
void (*SetCursor)(DC, AF_CURSOR *cursor);
|
||||
void (*SetCursorPos)(DC, long x, long y);
|
||||
void (*SetCursorColor)(DC, unsigned char red, unsigned char green, unsigned char blue);
|
||||
void (*SetCursorColor)(DC, unsigned char red, unsigned char green,
|
||||
unsigned char blue);
|
||||
void (*ShowCursor)(DC, long visible);
|
||||
|
||||
/* 2D rendering functions */
|
||||
|
@ -316,46 +292,128 @@ typedef struct AF_DRIVER
|
|||
void (*SetLineStippleCount)(DC, unsigned long count);
|
||||
void (*SetClipRect)(DC, long minx, long miny, long maxx, long maxy);
|
||||
void (*DrawScan)(DC, long color, long y, long x1, long x2);
|
||||
void (*DrawPattScan)(DC, long foreColor, long backColor, long y, long x1, long x2);
|
||||
void (*DrawPattScan)(DC, long foreColor, long backColor, long y, long x1,
|
||||
long x2);
|
||||
void (*DrawColorPattScan)(DC, long y, long x1, long x2);
|
||||
void (*DrawScanList)(DC, unsigned long color, long y, long length, short *scans);
|
||||
void (*DrawPattScanList)(DC, unsigned long foreColor, unsigned long backColor, long y, long length, short *scans);
|
||||
void (*DrawScanList)(DC, unsigned long color, long y, long length,
|
||||
short *scans);
|
||||
void (*DrawPattScanList)(DC, unsigned long foreColor,
|
||||
unsigned long backColor, long y, long length,
|
||||
short *scans);
|
||||
void (*DrawColorPattScanList)(DC, long y, long length, short *scans);
|
||||
void (*DrawRect)(DC, unsigned long color, long left, long top, long width, long height);
|
||||
void (*DrawPattRect)(DC, unsigned long foreColor, unsigned long backColor, long left, long top, long width, long height);
|
||||
void (*DrawRect)(DC, unsigned long color, long left, long top, long width,
|
||||
long height);
|
||||
void (*DrawPattRect)(DC, unsigned long foreColor, unsigned long backColor,
|
||||
long left, long top, long width, long height);
|
||||
void (*DrawColorPattRect)(DC, long left, long top, long width, long height);
|
||||
void (*DrawLine)(DC, unsigned long color, fixed x1, fixed y1, fixed x2, fixed y2);
|
||||
void (*DrawStippleLine)(DC, unsigned long foreColor, unsigned long backColor, fixed x1, fixed y1, fixed x2, fixed y2);
|
||||
void (*DrawLine)(DC, unsigned long color, fixed x1, fixed y1, fixed x2,
|
||||
fixed y2);
|
||||
void (*DrawStippleLine)(DC, unsigned long foreColor,
|
||||
unsigned long backColor, fixed x1, fixed y1,
|
||||
fixed x2, fixed y2);
|
||||
void (*DrawTrap)(DC, unsigned long color, AF_TRAP *trap);
|
||||
void (*DrawTri)(DC, unsigned long color, AF_FIX_POINT *v1, AF_FIX_POINT *v2, AF_FIX_POINT *v3, fixed xOffset, fixed yOffset);
|
||||
void (*DrawQuad)(DC, unsigned long color, AF_FIX_POINT *v1, AF_FIX_POINT *v2, AF_FIX_POINT *v3, AF_FIX_POINT *v4, fixed xOffset, fixed yOffset);
|
||||
void (*PutMonoImage)(DC, long foreColor, long backColor, long dstX, long dstY, long byteWidth, long srcX, long srcY, long width, long height, unsigned char *image);
|
||||
void (*PutMonoImageLin)(DC, long foreColor, long backColor, long dstX, long dstY, long byteWidth, long srcX, long srcY, long width, long height, long imageOfs);
|
||||
void (*PutMonoImageBM)(DC, long foreColor, long backColor, long dstX, long dstY, long byteWidth, long srcX, long srcY, long width, long height, long imagePhysAddr);
|
||||
void (*BitBlt)(DC, long left, long top, long width, long height, long dstLeft, long dstTop, long op);
|
||||
void (*BitBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op);
|
||||
void (*BitBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op);
|
||||
void (*BitBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op);
|
||||
void (*SrcTransBlt)(DC, long left, long top, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*SrcTransBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*SrcTransBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*SrcTransBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBlt)(DC, long left, long top, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft, long srcTop, long width, long height, long dstLeft, long dstTop, long op, unsigned long transparent);
|
||||
void (*StretchBlt)(DC, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op);
|
||||
void (*StretchBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op);
|
||||
void (*StretchBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op);
|
||||
void (*StretchBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op);
|
||||
void (*SrcTransStretchBlt)(DC, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*SrcTransStretchBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*SrcTransStretchBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*SrcTransStretchBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*DstTransStretchBlt)(DC, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*DstTransStretchBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*DstTransStretchBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*DstTransStretchBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft, long srcTop, long srcWidth, long srcHeight, long dstLeft, long dstTop, long dstWidth, long dstHeight, long flags, long op, unsigned long transparent);
|
||||
void (*DrawTri)(DC, unsigned long color, AF_FIX_POINT *v1, AF_FIX_POINT *v2,
|
||||
AF_FIX_POINT *v3, fixed xOffset, fixed yOffset);
|
||||
void (*DrawQuad)(DC, unsigned long color, AF_FIX_POINT *v1,
|
||||
AF_FIX_POINT *v2, AF_FIX_POINT *v3, AF_FIX_POINT *v4,
|
||||
fixed xOffset, fixed yOffset);
|
||||
void (*PutMonoImage)(DC, long foreColor, long backColor, long dstX,
|
||||
long dstY, long byteWidth, long srcX, long srcY,
|
||||
long width, long height, unsigned char *image);
|
||||
void (*PutMonoImageLin)(DC, long foreColor, long backColor, long dstX,
|
||||
long dstY, long byteWidth, long srcX, long srcY,
|
||||
long width, long height, long imageOfs);
|
||||
void (*PutMonoImageBM)(DC, long foreColor, long backColor, long dstX,
|
||||
long dstY, long byteWidth, long srcX, long srcY,
|
||||
long width, long height, long imagePhysAddr);
|
||||
void (*BitBlt)(DC, long left, long top, long width, long height,
|
||||
long dstLeft, long dstTop, long op);
|
||||
void (*BitBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op);
|
||||
void (*BitBltLin)(DC, long srcOfs, long srcPitch, long srcLeft, long srcTop,
|
||||
long width, long height, long dstLeft, long dstTop,
|
||||
long op);
|
||||
void (*BitBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op);
|
||||
void (*SrcTransBlt)(DC, long left, long top, long width, long height,
|
||||
long dstLeft, long dstTop, long op,
|
||||
unsigned long transparent);
|
||||
void (*SrcTransBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op, unsigned long transparent);
|
||||
void (*SrcTransBltLin)(DC, long srcOfs, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op, unsigned long transparent);
|
||||
void (*SrcTransBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBlt)(DC, long left, long top, long width, long height,
|
||||
long dstLeft, long dstTop, long op,
|
||||
unsigned long transparent);
|
||||
void (*DstTransBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBltLin)(DC, long srcOfs, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op, unsigned long transparent);
|
||||
void (*DstTransBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long width, long height, long dstLeft,
|
||||
long dstTop, long op, unsigned long transparent);
|
||||
void (*StretchBlt)(DC, long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop, long dstWidth,
|
||||
long dstHeight, long flags, long op);
|
||||
void (*StretchBltSys)(DC, void *srcAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long srcWidth, long srcHeight,
|
||||
long dstLeft, long dstTop, long dstWidth,
|
||||
long dstHeight, long flags, long op);
|
||||
void (*StretchBltLin)(DC, long srcOfs, long srcPitch, long srcLeft,
|
||||
long srcTop, long srcWidth, long srcHeight,
|
||||
long dstLeft, long dstTop, long dstWidth,
|
||||
long dstHeight, long flags, long op);
|
||||
void (*StretchBltBM)(DC, long srcPhysAddr, long srcPitch, long srcLeft,
|
||||
long srcTop, long srcWidth, long srcHeight,
|
||||
long dstLeft, long dstTop, long dstWidth,
|
||||
long dstHeight, long flags, long op);
|
||||
void (*SrcTransStretchBlt)(DC, long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop,
|
||||
long dstWidth, long dstHeight, long flags,
|
||||
long op, unsigned long transparent);
|
||||
void (*SrcTransStretchBltSys)(DC, void *srcAddr, long srcPitch,
|
||||
long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop,
|
||||
long dstWidth, long dstHeight, long flags,
|
||||
long op, unsigned long transparent);
|
||||
void (*SrcTransStretchBltLin)(DC, long srcOfs, long srcPitch, long srcLeft,
|
||||
long srcTop, long srcWidth, long srcHeight,
|
||||
long dstLeft, long dstTop, long dstWidth,
|
||||
long dstHeight, long flags, long op,
|
||||
unsigned long transparent);
|
||||
void (*SrcTransStretchBltBM)(DC, long srcPhysAddr, long srcPitch,
|
||||
long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop,
|
||||
long dstWidth, long dstHeight, long flags,
|
||||
long op, unsigned long transparent);
|
||||
void (*DstTransStretchBlt)(DC, long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop,
|
||||
long dstWidth, long dstHeight, long flags,
|
||||
long op, unsigned long transparent);
|
||||
void (*DstTransStretchBltSys)(DC, void *srcAddr, long srcPitch,
|
||||
long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop,
|
||||
long dstWidth, long dstHeight, long flags,
|
||||
long op, unsigned long transparent);
|
||||
void (*DstTransStretchBltLin)(DC, long srcOfs, long srcPitch, long srcLeft,
|
||||
long srcTop, long srcWidth, long srcHeight,
|
||||
long dstLeft, long dstTop, long dstWidth,
|
||||
long dstHeight, long flags, long op,
|
||||
unsigned long transparent);
|
||||
void (*DstTransStretchBltBM)(DC, long srcPhysAddr, long srcPitch,
|
||||
long srcLeft, long srcTop, long srcWidth,
|
||||
long srcHeight, long dstLeft, long dstTop,
|
||||
long dstWidth, long dstHeight, long flags,
|
||||
long op, unsigned long transparent);
|
||||
|
||||
/* hardware video functions */
|
||||
void (*SetVideoInput)(DC, long width, long height, long format);
|
||||
|
@ -365,15 +423,10 @@ typedef struct AF_DRIVER
|
|||
|
||||
} AF_DRIVER;
|
||||
|
||||
|
||||
|
||||
#undef DC
|
||||
|
||||
|
||||
|
||||
/* register data for calling real mode interrupts (DPMI format) */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
struct {
|
||||
unsigned long edi;
|
||||
unsigned long esi;
|
||||
|
@ -415,30 +468,21 @@ typedef union
|
|||
} h;
|
||||
} RM_REGS;
|
||||
|
||||
|
||||
|
||||
/* our API extensions use 32 bit magic numbers */
|
||||
#define FAF_ID(a,b,c,d) ((a<<24) | (b<<16) | (c<<8) | d)
|
||||
|
||||
|
||||
#define FAF_ID(a, b, c, d) ((a << 24) | (b << 16) | (c << 8) | d)
|
||||
|
||||
/* ID code and magic return value for initialising the extensions */
|
||||
#define FAFEXT_INIT FAF_ID('I','N','I','T')
|
||||
#define FAFEXT_MAGIC FAF_ID('E','X', 0, 0)
|
||||
#define FAFEXT_MAGIC1 FAF_ID('E','X','0','1')
|
||||
|
||||
|
||||
#define FAFEXT_INIT FAF_ID('I', 'N', 'I', 'T')
|
||||
#define FAFEXT_MAGIC FAF_ID('E', 'X', 0, 0)
|
||||
#define FAFEXT_MAGIC1 FAF_ID('E', 'X', '0', '1')
|
||||
|
||||
/* extension providing a hardware-specific way to access video memory */
|
||||
#define FAFEXT_HWPTR FAF_ID('H','P','T','R')
|
||||
|
||||
#define FAFEXT_HWPTR FAF_ID('H', 'P', 'T', 'R')
|
||||
|
||||
#if (defined __i386__) && (!defined NO_HWPTR)
|
||||
|
||||
|
||||
/* use seg+offset far pointers on i386 */
|
||||
typedef struct FAF_HWPTR
|
||||
{
|
||||
typedef struct FAF_HWPTR {
|
||||
int sel;
|
||||
unsigned long offset;
|
||||
} FAF_HWPTR;
|
||||
|
@ -448,89 +492,84 @@ typedef struct FAF_HWPTR
|
|||
|
||||
#define hwptr_init(ptr, addr) \
|
||||
if ((addr) && (!(ptr).sel)) { \
|
||||
(ptr).sel = _my_ds(); \
|
||||
(ptr).sel = _my_ds( ); \
|
||||
(ptr).offset = (unsigned long)(addr); \
|
||||
}
|
||||
|
||||
#define hwptr_pokeb(ptr, off, val) _farpokeb((ptr).sel, (ptr).offset+(off), (val))
|
||||
#define hwptr_pokew(ptr, off, val) _farpokew((ptr).sel, (ptr).offset+(off), (val))
|
||||
#define hwptr_pokel(ptr, off, val) _farpokel((ptr).sel, (ptr).offset+(off), (val))
|
||||
#define hwptr_pokeb(ptr, off, val) \
|
||||
_farpokeb((ptr).sel, (ptr).offset + (off), (val))
|
||||
#define hwptr_pokew(ptr, off, val) \
|
||||
_farpokew((ptr).sel, (ptr).offset + (off), (val))
|
||||
#define hwptr_pokel(ptr, off, val) \
|
||||
_farpokel((ptr).sel, (ptr).offset + (off), (val))
|
||||
|
||||
#define hwptr_peekb(ptr, off) _farpeekb((ptr).sel, (ptr).offset+(off))
|
||||
#define hwptr_peekw(ptr, off) _farpeekw((ptr).sel, (ptr).offset+(off))
|
||||
#define hwptr_peekl(ptr, off) _farpeekl((ptr).sel, (ptr).offset+(off))
|
||||
#define hwptr_peekb(ptr, off) _farpeekb((ptr).sel, (ptr).offset + (off))
|
||||
#define hwptr_peekw(ptr, off) _farpeekw((ptr).sel, (ptr).offset + (off))
|
||||
#define hwptr_peekl(ptr, off) _farpeekl((ptr).sel, (ptr).offset + (off))
|
||||
|
||||
#define hwptr_select(ptr) _farsetsel((ptr).sel)
|
||||
#define hwptr_unselect(ptr) (ptr).sel = _fargetsel()
|
||||
#define hwptr_unselect(ptr) (ptr).sel = _fargetsel( )
|
||||
|
||||
#define hwptr_nspokeb(ptr, off, val) _farnspokeb((ptr).offset+(off), (val))
|
||||
#define hwptr_nspokew(ptr, off, val) _farnspokew((ptr).offset+(off), (val))
|
||||
#define hwptr_nspokel(ptr, off, val) _farnspokel((ptr).offset+(off), (val))
|
||||
|
||||
#define hwptr_nspeekb(ptr, off) _farnspeekb((ptr).offset+(off))
|
||||
#define hwptr_nspeekw(ptr, off) _farnspeekw((ptr).offset+(off))
|
||||
#define hwptr_nspeekl(ptr, off) _farnspeekl((ptr).offset+(off))
|
||||
#define hwptr_nspokeb(ptr, off, val) _farnspokeb((ptr).offset + (off), (val))
|
||||
#define hwptr_nspokew(ptr, off, val) _farnspokew((ptr).offset + (off), (val))
|
||||
#define hwptr_nspokel(ptr, off, val) _farnspokel((ptr).offset + (off), (val))
|
||||
|
||||
#define hwptr_nspeekb(ptr, off) _farnspeekb((ptr).offset + (off))
|
||||
#define hwptr_nspeekw(ptr, off) _farnspeekw((ptr).offset + (off))
|
||||
#define hwptr_nspeekl(ptr, off) _farnspeekl((ptr).offset + (off))
|
||||
|
||||
#else
|
||||
|
||||
|
||||
/* use regular C pointers on other platforms or if hwptr is disabled */
|
||||
typedef void *FAF_HWPTR;
|
||||
|
||||
#define hwptr_init(ptr, addr) ptr = (FAF_HWPTR)(addr)
|
||||
|
||||
#define hwptr_pokeb(ptr, off, val) *((volatile unsigned char *)((ptr)+(off))) = (val)
|
||||
#define hwptr_pokew(ptr, off, val) *((volatile unsigned short *)((ptr)+(off))) = (val)
|
||||
#define hwptr_pokel(ptr, off, val) *((volatile unsigned long *)((ptr)+(off))) = (val)
|
||||
#define hwptr_pokeb(ptr, off, val) \
|
||||
*((volatile unsigned char *)((ptr) + (off))) = (val)
|
||||
#define hwptr_pokew(ptr, off, val) \
|
||||
*((volatile unsigned short *)((ptr) + (off))) = (val)
|
||||
#define hwptr_pokel(ptr, off, val) \
|
||||
*((volatile unsigned long *)((ptr) + (off))) = (val)
|
||||
|
||||
#define hwptr_peekb(ptr, off) (*((volatile unsigned char *)((ptr)+(off))))
|
||||
#define hwptr_peekw(ptr, off) (*((volatile unsigned short *)((ptr)+(off))))
|
||||
#define hwptr_peekl(ptr, off) (*((volatile unsigned long *)((ptr)+(off))))
|
||||
#define hwptr_peekb(ptr, off) (*((volatile unsigned char *)((ptr) + (off))))
|
||||
#define hwptr_peekw(ptr, off) (*((volatile unsigned short *)((ptr) + (off))))
|
||||
#define hwptr_peekl(ptr, off) (*((volatile unsigned long *)((ptr) + (off))))
|
||||
|
||||
#define hwptr_select(ptr)
|
||||
#define hwptr_unselect(ptr) (ptr) = NULL
|
||||
|
||||
#define hwptr_nspokeb(ptr, off, val) *((volatile unsigned char *)((ptr)+(off))) = (val)
|
||||
#define hwptr_nspokew(ptr, off, val) *((volatile unsigned short *)((ptr)+(off))) = (val)
|
||||
#define hwptr_nspokel(ptr, off, val) *((volatile unsigned long *)((ptr)+(off))) = (val)
|
||||
|
||||
#define hwptr_nspeekb(ptr, off) (*((volatile unsigned char *)((ptr)+(off))))
|
||||
#define hwptr_nspeekw(ptr, off) (*((volatile unsigned short *)((ptr)+(off))))
|
||||
#define hwptr_nspeekl(ptr, off) (*((volatile unsigned long *)((ptr)+(off))))
|
||||
#define hwptr_nspokeb(ptr, off, val) \
|
||||
*((volatile unsigned char *)((ptr) + (off))) = (val)
|
||||
#define hwptr_nspokew(ptr, off, val) \
|
||||
*((volatile unsigned short *)((ptr) + (off))) = (val)
|
||||
#define hwptr_nspokel(ptr, off, val) \
|
||||
*((volatile unsigned long *)((ptr) + (off))) = (val)
|
||||
|
||||
#define hwptr_nspeekb(ptr, off) (*((volatile unsigned char *)((ptr) + (off))))
|
||||
#define hwptr_nspeekw(ptr, off) (*((volatile unsigned short *)((ptr) + (off))))
|
||||
#define hwptr_nspeekl(ptr, off) (*((volatile unsigned long *)((ptr) + (off))))
|
||||
|
||||
#endif /* hwptr structure definitions */
|
||||
|
||||
|
||||
/* interface structure containing hardware pointer data */
|
||||
typedef struct FAF_HWPTR_DATA
|
||||
{
|
||||
typedef struct FAF_HWPTR_DATA {
|
||||
FAF_HWPTR IOMemMaps[4];
|
||||
FAF_HWPTR BankedMem;
|
||||
FAF_HWPTR LinearMem;
|
||||
} FAF_HWPTR_DATA;
|
||||
|
||||
|
||||
|
||||
/* extension providing a way for the config program to set driver variables */
|
||||
#define FAFEXT_CONFIG FAF_ID('C','O','N','F')
|
||||
|
||||
|
||||
#define FAFEXT_CONFIG FAF_ID('C', 'O', 'N', 'F')
|
||||
|
||||
/* config variable, so the install program can communicate with the driver */
|
||||
typedef struct FAF_CONFIG_DATA
|
||||
{
|
||||
typedef struct FAF_CONFIG_DATA {
|
||||
unsigned long id;
|
||||
unsigned long value;
|
||||
} FAF_CONFIG_DATA;
|
||||
|
||||
|
||||
|
||||
/* config variable ID used to enable/disable specific hardware functions */
|
||||
#define FAF_CFG_FEATURES FAF_ID('F','E','A','T')
|
||||
|
||||
|
||||
#define FAF_CFG_FEATURES FAF_ID('F', 'E', 'A', 'T')
|
||||
|
||||
/* bitfield values for the FAF_CFG_FEATURES variable */
|
||||
#define fafLinear 0x00000001
|
||||
|
@ -562,21 +601,15 @@ typedef struct FAF_CONFIG_DATA
|
|||
#define fafSrcTransBltLin 0x04000000
|
||||
#define fafSrcTransBltBM 0x08000000
|
||||
|
||||
|
||||
|
||||
/* helper function for enabling/disabling driver routines */
|
||||
void fixup_feature_list(AF_DRIVER *af, unsigned long flags);
|
||||
|
||||
|
||||
|
||||
/* extension providing libc exports (needed for Nucleus compatibility) */
|
||||
#define FAFEXT_LIBC FAF_ID('L','I','B','C')
|
||||
#define FAFEXT_LIBC FAF_ID('L', 'I', 'B', 'C')
|
||||
|
||||
|
||||
typedef struct FAF_LIBC_DATA
|
||||
{
|
||||
typedef struct FAF_LIBC_DATA {
|
||||
long size;
|
||||
void (*abort)();
|
||||
void (*abort)( );
|
||||
void *(*calloc)(unsigned long num_elements, unsigned long size);
|
||||
void (*exit)(int status);
|
||||
void (*free)(void *ptr);
|
||||
|
@ -597,15 +630,11 @@ typedef struct FAF_LIBC_DATA
|
|||
int (*rename)(const char *oldname, const char *newname);
|
||||
unsigned int (*time)(unsigned int *t);
|
||||
void (*setfileattr)(const char *filename, unsigned attrib);
|
||||
unsigned long (*getcurrentdate)();
|
||||
unsigned long (*getcurrentdate)( );
|
||||
} FAF_LIBC_DATA;
|
||||
|
||||
|
||||
|
||||
/* extension providing pmode exports (needed for Nucleus compatibility) */
|
||||
#define FAFEXT_PMODE FAF_ID('P','M','O','D')
|
||||
|
||||
|
||||
#define FAFEXT_PMODE FAF_ID('P', 'M', 'O', 'D')
|
||||
|
||||
/* It has to be said, having this many exported functions is truly insane.
|
||||
* How on earth can SciTech need this much crap just to write a simple
|
||||
|
@ -613,8 +642,7 @@ typedef struct FAF_LIBC_DATA
|
|||
* support their Nucleus drivers...
|
||||
*/
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
struct {
|
||||
unsigned long eax, ebx, ecx, edx, esi, edi, cflag;
|
||||
} e;
|
||||
|
@ -628,66 +656,70 @@ typedef union
|
|||
unsigned short cflag, cflag_hi;
|
||||
} x;
|
||||
struct {
|
||||
unsigned char al, ah; unsigned short ax_hi;
|
||||
unsigned char bl, bh; unsigned short bx_hi;
|
||||
unsigned char cl, ch; unsigned short cx_hi;
|
||||
unsigned char dl, dh; unsigned short dx_hi;
|
||||
unsigned char al, ah;
|
||||
unsigned short ax_hi;
|
||||
unsigned char bl, bh;
|
||||
unsigned short bx_hi;
|
||||
unsigned char cl, ch;
|
||||
unsigned short cx_hi;
|
||||
unsigned char dl, dh;
|
||||
unsigned short dx_hi;
|
||||
} h;
|
||||
} SILLY_SCITECH_REGS;
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
unsigned short es, cs, ss, ds, fs, gs;
|
||||
} SILLY_SCITECH_SREGS;
|
||||
|
||||
|
||||
|
||||
typedef struct FAF_PMODE_DATA
|
||||
{
|
||||
typedef struct FAF_PMODE_DATA {
|
||||
long size;
|
||||
int (*getModeType)();
|
||||
void *(*getBIOSPointer)();
|
||||
void *(*getA0000Pointer)();
|
||||
int (*getModeType)( );
|
||||
void *(*getBIOSPointer)( );
|
||||
void *(*getA0000Pointer)( );
|
||||
void *(*mapPhysicalAddr)(unsigned long base, unsigned long limit);
|
||||
void *(*mallocShared)(long size);
|
||||
int (*mapShared)(void *ptr);
|
||||
void (*freeShared)(void *ptr);
|
||||
void *(*mapToProcess)(void *linear, unsigned long limit);
|
||||
void (*loadDS)();
|
||||
void (*saveDS)();
|
||||
void (*loadDS)( );
|
||||
void (*saveDS)( );
|
||||
void *(*mapRealPointer)(unsigned int r_seg, unsigned int r_off);
|
||||
void *(*allocRealSeg)(unsigned int size, unsigned int *r_seg, unsigned int *r_off);
|
||||
void *(*allocRealSeg)(unsigned int size, unsigned int *r_seg,
|
||||
unsigned int *r_off);
|
||||
void (*freeRealSeg)(void *mem);
|
||||
void *(*allocLockedMem)(unsigned int size, unsigned long *physAddr);
|
||||
void (*freeLockedMem)(void *p);
|
||||
void (*callRealMode)(unsigned int seg, unsigned int off, SILLY_SCITECH_REGS *regs, SILLY_SCITECH_SREGS *sregs);
|
||||
void (*callRealMode)(unsigned int seg, unsigned int off,
|
||||
SILLY_SCITECH_REGS *regs, SILLY_SCITECH_SREGS *sregs);
|
||||
int (*int86)(int intno, SILLY_SCITECH_REGS *in, SILLY_SCITECH_REGS *out);
|
||||
int (*int86x)(int intno, SILLY_SCITECH_REGS *in, SILLY_SCITECH_REGS *out, SILLY_SCITECH_SREGS *sregs);
|
||||
int (*int86x)(int intno, SILLY_SCITECH_REGS *in, SILLY_SCITECH_REGS *out,
|
||||
SILLY_SCITECH_SREGS *sregs);
|
||||
void (*DPMI_int86)(int intno, RM_REGS *regs);
|
||||
void (*segread)(SILLY_SCITECH_SREGS *sregs);
|
||||
int (*int386)(int intno, SILLY_SCITECH_REGS *in, SILLY_SCITECH_REGS *out);
|
||||
int (*int386x)(int intno, SILLY_SCITECH_REGS *in, SILLY_SCITECH_REGS *out, SILLY_SCITECH_SREGS *sregs);
|
||||
int (*int386x)(int intno, SILLY_SCITECH_REGS *in, SILLY_SCITECH_REGS *out,
|
||||
SILLY_SCITECH_SREGS *sregs);
|
||||
void (*availableMemory)(unsigned long *physical, unsigned long *total);
|
||||
void *(*getVESABuf)(unsigned int *len, unsigned int *rseg, unsigned int *roff);
|
||||
long (*getOSType)();
|
||||
void *(*getVESABuf)(unsigned int *len, unsigned int *rseg,
|
||||
unsigned int *roff);
|
||||
long (*getOSType)( );
|
||||
void (*fatalError)(const char *msg);
|
||||
void (*setBankA)(int bank);
|
||||
void (*setBankAB)(int bank);
|
||||
const char *(*getCurrentPath)();
|
||||
const char *(*getVBEAFPath)();
|
||||
const char *(*getNucleusPath)();
|
||||
const char *(*getNucleusConfigPath)();
|
||||
const char *(*getUniqueID)();
|
||||
const char *(*getMachineName)();
|
||||
int (*VF_available)();
|
||||
void *(*VF_init)(unsigned long baseAddr, int bankSize, int codeLen, void *bankFunc);
|
||||
void (*VF_exit)();
|
||||
int (*kbhit)();
|
||||
int (*getch)();
|
||||
int (*openConsole)();
|
||||
int (*getConsoleStateSize)();
|
||||
const char *(*getCurrentPath)( );
|
||||
const char *(*getVBEAFPath)( );
|
||||
const char *(*getNucleusPath)( );
|
||||
const char *(*getNucleusConfigPath)( );
|
||||
const char *(*getUniqueID)( );
|
||||
const char *(*getMachineName)( );
|
||||
int (*VF_available)( );
|
||||
void *(*VF_init)(unsigned long baseAddr, int bankSize, int codeLen,
|
||||
void *bankFunc);
|
||||
void (*VF_exit)( );
|
||||
int (*kbhit)( );
|
||||
int (*getch)( );
|
||||
int (*openConsole)( );
|
||||
int (*getConsoleStateSize)( );
|
||||
void (*saveConsoleState)(void *stateBuf, int console_id);
|
||||
void (*restoreConsoleState)(const void *stateBuf, int console_id);
|
||||
void (*closeConsole)(int console_id);
|
||||
|
@ -697,8 +729,6 @@ typedef struct FAF_PMODE_DATA
|
|||
void (*backslash)(char *filename);
|
||||
} FAF_PMODE_DATA;
|
||||
|
||||
|
||||
|
||||
/* assorted helper functions */
|
||||
void trace_putc(char c);
|
||||
void trace_printf(char *msg, ...);
|
||||
|
@ -711,47 +741,41 @@ void free_dos_memory(int sel);
|
|||
int allocate_selector(int addr, int size);
|
||||
void free_selector(int sel);
|
||||
|
||||
int get_vesa_info(int *vram_size, unsigned long *linear_addr, void (*callback)(int vesa_num, int linear, int w, int h, int bpp, int bytes_per_scanline, int redsize, int redpos, int greensize, int greenpos, int bluesize, int bluepos, int rsvdsize, int rsvdpos));
|
||||
|
||||
|
||||
int get_vesa_info(int *vram_size, unsigned long *linear_addr,
|
||||
void (*callback)(int vesa_num, int linear, int w, int h,
|
||||
int bpp, int bytes_per_scanline, int redsize,
|
||||
int redpos, int greensize, int greenpos,
|
||||
int bluesize, int bluepos, int rsvdsize,
|
||||
int rsvdpos));
|
||||
|
||||
/* read_vga_register:
|
||||
* Reads the contents of a VGA hardware register.
|
||||
*/
|
||||
extern inline int read_vga_register(int port, int index)
|
||||
{
|
||||
if (port==0x3C0)
|
||||
inportb(0x3DA);
|
||||
extern inline int read_vga_register(int port, int index) {
|
||||
if (port == 0x3C0) inportb(0x3DA);
|
||||
|
||||
outportb(port, index);
|
||||
return inportb(port+1);
|
||||
return inportb(port + 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* write_vga_register:
|
||||
* Writes a byte to a VGA hardware register.
|
||||
*/
|
||||
extern inline void write_vga_register(int port, int index, int v)
|
||||
{
|
||||
if (port==0x3C0) {
|
||||
extern inline void write_vga_register(int port, int index, int v) {
|
||||
if (port == 0x3C0) {
|
||||
inportb(0x3DA);
|
||||
outportb(port, index);
|
||||
outportb(port, v);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
outportb(port, index);
|
||||
outportb(port+1, v);
|
||||
outportb(port + 1, v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* alter_vga_register:
|
||||
* Alters specific bits of a VGA hardware register.
|
||||
*/
|
||||
extern inline void alter_vga_register(int port, int index, int mask, int v)
|
||||
{
|
||||
extern inline void alter_vga_register(int port, int index, int mask, int v) {
|
||||
int temp;
|
||||
temp = read_vga_register(port, index);
|
||||
temp &= (~mask);
|
||||
|
@ -759,13 +783,10 @@ extern inline void alter_vga_register(int port, int index, int mask, int v)
|
|||
write_vga_register(port, index, temp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* test_vga_register:
|
||||
* Tests whether specific bits of a VGA hardware register can be changed.
|
||||
*/
|
||||
extern inline int test_vga_register(int port, int index, int mask)
|
||||
{
|
||||
extern inline int test_vga_register(int port, int index, int mask) {
|
||||
int old, nw1, nw2;
|
||||
|
||||
old = read_vga_register(port, index);
|
||||
|
@ -775,16 +796,13 @@ extern inline int test_vga_register(int port, int index, int mask)
|
|||
nw2 = read_vga_register(port, index) & mask;
|
||||
write_vga_register(port, index, old);
|
||||
|
||||
return ((nw1==0) && (nw2==mask));
|
||||
return ((nw1 == 0) && (nw2 == mask));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* test_register:
|
||||
* Tests whether specific bits of a hardware register can be changed.
|
||||
*/
|
||||
extern inline int test_register(int port, int mask)
|
||||
{
|
||||
extern inline int test_register(int port, int mask) {
|
||||
int old, nw1, nw2;
|
||||
|
||||
old = inportb(port);
|
||||
|
@ -794,20 +812,18 @@ extern inline int test_register(int port, int mask)
|
|||
nw2 = inportb(port) & mask;
|
||||
outportb(port, old);
|
||||
|
||||
return ((nw1==0) && (nw2==mask));
|
||||
return ((nw1 == 0) && (nw2 == mask));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* PCI routines added by SET */
|
||||
#define PCIConfigurationAddress 0xCF8
|
||||
#define PCIConfigurationData 0xCFC
|
||||
#define PCIEnable 0x80000000
|
||||
|
||||
extern int FindPCIDevice(int deviceID, int vendorID, int deviceIndex, int *handle);
|
||||
extern int FindPCIDevice(int deviceID, int vendorID, int deviceIndex,
|
||||
int *handle);
|
||||
|
||||
extern inline unsigned PCIReadLong(int handle, int index)
|
||||
{
|
||||
extern inline unsigned PCIReadLong(int handle, int index) {
|
||||
outportl(PCIConfigurationAddress, PCIEnable | handle | index);
|
||||
return inportl(PCIConfigurationData);
|
||||
}
|
||||
|
|
272
video7/driver.c
272
video7/driver.c
|
@ -14,22 +14,19 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
// #define NO_HWPTR
|
||||
|
||||
|
||||
#include <pc.h>
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
/* driver function prototypes */
|
||||
void SetBank32();
|
||||
void SetBank32End();
|
||||
int ExtStub();
|
||||
void SetBank32( );
|
||||
void SetBank32End( );
|
||||
int ExtStub( );
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc);
|
||||
void RestoreTextMode(AF_DRIVER *af);
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock);
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf);
|
||||
|
@ -37,16 +34,13 @@ void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT);
|
|||
void SetActiveBuffer(AF_DRIVER *af, long index);
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT);
|
||||
int GetDisplayStartStatus(AF_DRIVER *af);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT);
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT);
|
||||
void SetBank(AF_DRIVER *af, long bank);
|
||||
|
||||
|
||||
|
||||
/* list which ports we are going to access (only needed under Linux) */
|
||||
unsigned short ports_table[] = { 0xFFFF };
|
||||
|
||||
|
||||
|
||||
/* internal driver state variables */
|
||||
int af_bpp;
|
||||
int af_width;
|
||||
|
@ -57,44 +51,30 @@ int af_scroll_x;
|
|||
int af_scroll_y;
|
||||
int af_bank;
|
||||
|
||||
|
||||
|
||||
/* FreeBE/AF extension allowing farptr access to video memory */
|
||||
FAF_HWPTR_DATA hwptr;
|
||||
|
||||
|
||||
|
||||
/* list of available video modes */
|
||||
typedef struct VIDEO_MODE
|
||||
{
|
||||
typedef struct VIDEO_MODE {
|
||||
int w, h;
|
||||
int bpp;
|
||||
int num;
|
||||
} VIDEO_MODE;
|
||||
|
||||
|
||||
VIDEO_MODE mode_list[] =
|
||||
{
|
||||
{ 640, 400, 8, 0x66 },
|
||||
VIDEO_MODE mode_list[] = { { 640, 400, 8, 0x66 },
|
||||
{ 640, 480, 8, 0x67 },
|
||||
{ 720, 540, 8, 0x68 },
|
||||
{ 800, 600, 8, 0x69 },
|
||||
{ 1024, 768, 8, 0x6A }
|
||||
};
|
||||
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list)/sizeof(VIDEO_MODE))
|
||||
|
||||
|
||||
short available_modes[NUM_MODES+1] = { 1, 2, 3, 4, 5, -1 };
|
||||
{ 1024, 768, 8, 0x6A } };
|
||||
|
||||
#define NUM_MODES (int)(sizeof(mode_list) / sizeof(VIDEO_MODE))
|
||||
|
||||
short available_modes[NUM_MODES + 1] = { 1, 2, 3, 4, 5, -1 };
|
||||
|
||||
/* detect:
|
||||
* Detects the presence of a Video-7 card.
|
||||
*/
|
||||
char *detect(unsigned long *vidmem)
|
||||
{
|
||||
char *detect(unsigned long *vidmem) {
|
||||
RM_REGS r;
|
||||
unsigned v;
|
||||
int old;
|
||||
|
@ -119,11 +99,10 @@ char *detect(unsigned long *vidmem)
|
|||
|
||||
*vidmem = (r.h.ah & 0x7F) * 256;
|
||||
|
||||
v = (read_vga_register(0x3C4, 0x8F)<<8) + read_vga_register(0x3C4, 0x8E);
|
||||
v = (read_vga_register(0x3C4, 0x8F) << 8) + read_vga_register(0x3C4, 0x8E);
|
||||
|
||||
switch (v) {
|
||||
case 0x7140 ...
|
||||
0x714F: return "V7 208A";
|
||||
case 0x7140 ... 0x714F: return "V7 208A";
|
||||
case 0x7151: return "V7 208B";
|
||||
case 0x7152: return "V7 208CD";
|
||||
case 0x7760: return "V7 216BC";
|
||||
|
@ -131,43 +110,35 @@ char *detect(unsigned long *vidmem)
|
|||
case 0x7764: return "V7 216E";
|
||||
case 0x7765: return "V7 216F";
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetupDriver:
|
||||
* Fills in our driver header block.
|
||||
*/
|
||||
int SetupDriver(AF_DRIVER *af)
|
||||
{
|
||||
int SetupDriver(AF_DRIVER *af) {
|
||||
char *name;
|
||||
int i;
|
||||
|
||||
name = detect(&af->TotalMemory);
|
||||
|
||||
if (!name)
|
||||
return 1;
|
||||
if (!name) return 1;
|
||||
|
||||
i = 0;
|
||||
while (af->OemVendorName[i])
|
||||
i++;
|
||||
while (af->OemVendorName[i]) i++;
|
||||
|
||||
af->OemVendorName[i++] = ',';
|
||||
af->OemVendorName[i++] = ' ';
|
||||
|
||||
while (*name)
|
||||
af->OemVendorName[i++] = *(name++);
|
||||
while (*name) af->OemVendorName[i++] = *(name++);
|
||||
|
||||
af->OemVendorName[i] = 0;
|
||||
|
||||
af->AvailableModes = available_modes;
|
||||
|
||||
af->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
af->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
af->BankSize = 64;
|
||||
af->BankedBasePtr = 0xA0000;
|
||||
|
@ -192,14 +163,11 @@ int SetupDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* InitDriver:
|
||||
* The second thing to be called during the init process, after the
|
||||
* application has mapped all the memory and I/O resources we need.
|
||||
*/
|
||||
int InitDriver(AF_DRIVER *af)
|
||||
{
|
||||
int InitDriver(AF_DRIVER *af) {
|
||||
hwptr_init(hwptr.IOMemMaps[0], af->IOMemMaps[0]);
|
||||
hwptr_init(hwptr.IOMemMaps[1], af->IOMemMaps[1]);
|
||||
hwptr_init(hwptr.IOMemMaps[2], af->IOMemMaps[2]);
|
||||
|
@ -210,78 +178,63 @@ int InitDriver(AF_DRIVER *af)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeBEX:
|
||||
* Returns an interface structure for the requested FreeBE/AF extension.
|
||||
*/
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id)
|
||||
{
|
||||
void *FreeBEX(AF_DRIVER *af, unsigned long id) {
|
||||
switch (id) {
|
||||
|
||||
#ifndef NO_HWPTR
|
||||
#ifndef NO_HWPTR
|
||||
|
||||
case FAFEXT_HWPTR:
|
||||
/* allow farptr access to video memory */
|
||||
return &hwptr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ExtStub:
|
||||
* Vendor-specific extension hook: we don't provide any.
|
||||
*/
|
||||
int ExtStub()
|
||||
{
|
||||
int ExtStub( ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetVideoModeInfo:
|
||||
* Retrieves information about this video mode, returning zero on success
|
||||
* or -1 if the mode is invalid.
|
||||
*/
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
||||
{
|
||||
long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo) {
|
||||
VIDEO_MODE *info;
|
||||
int i;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
for (i=0; i<(int)sizeof(AF_MODE_INFO); i++)
|
||||
((char *)modeInfo)[i] = 0;
|
||||
for (i = 0; i < (int)sizeof(AF_MODE_INFO); i++) ((char *)modeInfo)[i] = 0;
|
||||
|
||||
modeInfo->Attributes = (afHaveMultiBuffer |
|
||||
afHaveVirtualScroll |
|
||||
afHaveBankedBuffer);
|
||||
modeInfo->Attributes =
|
||||
(afHaveMultiBuffer | afHaveVirtualScroll | afHaveBankedBuffer);
|
||||
|
||||
modeInfo->XResolution = info->w;
|
||||
modeInfo->YResolution = info->h;
|
||||
modeInfo->BitsPerPixel = info->bpp;
|
||||
|
||||
modeInfo->MaxBuffers = (af->TotalMemory*1024) /
|
||||
(info->w*info->h*BYTES_PER_PIXEL(info->bpp));
|
||||
modeInfo->MaxBuffers = (af->TotalMemory * 1024) /
|
||||
(info->w * info->h * BYTES_PER_PIXEL(info->bpp));
|
||||
|
||||
if (info->w > 1024) {
|
||||
modeInfo->MaxBytesPerScanLine = 2048*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxBytesPerScanLine = 2048 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 2048;
|
||||
}
|
||||
else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024*BYTES_PER_PIXEL(info->bpp);
|
||||
} else {
|
||||
modeInfo->MaxBytesPerScanLine = 1024 * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->MaxScanLineWidth = 1024;
|
||||
}
|
||||
|
||||
modeInfo->BytesPerScanLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BytesPerScanLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
modeInfo->BnkMaxBuffers = modeInfo->MaxBuffers;
|
||||
|
||||
modeInfo->MaxPixelClock = 135000000;
|
||||
|
@ -289,13 +242,11 @@ long GetVideoModeInfo(AF_DRIVER *af, short mode, AF_MODE_INFO *modeInfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVideoMode:
|
||||
* Sets the specified video mode, returning zero on success.
|
||||
*/
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc)
|
||||
{
|
||||
long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY,
|
||||
long *bytesPerLine, int numBuffers, AF_CRTCInfo *crtc) {
|
||||
long available_vram;
|
||||
long used_vram;
|
||||
int width;
|
||||
|
@ -303,15 +254,13 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
RM_REGS r;
|
||||
|
||||
/* reject anything with hardware stereo, linear framebuffer, or noclear */
|
||||
if (mode & 0xC400)
|
||||
return -1;
|
||||
if (mode & 0xC400) return -1;
|
||||
|
||||
mode &= 0x3FF;
|
||||
|
||||
if ((mode <= 0) || (mode > NUM_MODES))
|
||||
return -1;
|
||||
if ((mode <= 0) || (mode > NUM_MODES)) return -1;
|
||||
|
||||
info = &mode_list[mode-1];
|
||||
info = &mode_list[mode - 1];
|
||||
|
||||
/* call BIOS to set the mode */
|
||||
r.x.ax = 0x6F05;
|
||||
|
@ -320,16 +269,16 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
|
||||
/* adjust the virtual width for widescreen modes */
|
||||
if (virtualX > info->w) {
|
||||
if (virtualX > 1024)
|
||||
return -1;
|
||||
if (virtualX > 1024) return -1;
|
||||
|
||||
*bytesPerLine = ((virtualX*BYTES_PER_PIXEL(info->bpp))+15)&0xFFF0;
|
||||
*bytesPerLine = ((virtualX * BYTES_PER_PIXEL(info->bpp)) + 15) & 0xFFF0;
|
||||
|
||||
width = read_vga_register(0x3D4, 0x13);
|
||||
write_vga_register(0x3D4, 0x13, (width * (*bytesPerLine)) / (info->w*BYTES_PER_PIXEL(info->bpp)));
|
||||
}
|
||||
else
|
||||
*bytesPerLine = info->w*BYTES_PER_PIXEL(info->bpp);
|
||||
write_vga_register(0x3D4, 0x13,
|
||||
(width * (*bytesPerLine)) /
|
||||
(info->w * BYTES_PER_PIXEL(info->bpp)));
|
||||
} else
|
||||
*bytesPerLine = info->w * BYTES_PER_PIXEL(info->bpp);
|
||||
|
||||
/* tweak some hardware registers */
|
||||
write_vga_register(0x3C4, 6, 0xEA); /* enable BIOS extensions */
|
||||
|
@ -347,22 +296,20 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
af_scroll_y = 0;
|
||||
af_bank = -1;
|
||||
|
||||
af->BufferEndX = af_width/BYTES_PER_PIXEL(af_bpp)-1;
|
||||
af->BufferEndY = af_height-1;
|
||||
af->BufferEndX = af_width / BYTES_PER_PIXEL(af_bpp) - 1;
|
||||
af->BufferEndY = af_height - 1;
|
||||
af->OriginOffset = 0;
|
||||
|
||||
used_vram = af_width * af_height * numBuffers;
|
||||
available_vram = af->TotalMemory*1024 ;
|
||||
available_vram = af->TotalMemory * 1024;
|
||||
|
||||
if (used_vram > available_vram)
|
||||
return -1;
|
||||
if (used_vram > available_vram) return -1;
|
||||
|
||||
if (available_vram-used_vram >= af_width) {
|
||||
if (available_vram - used_vram >= af_width) {
|
||||
af->OffscreenOffset = used_vram;
|
||||
af->OffscreenStartY = af_height*numBuffers;
|
||||
af->OffscreenEndY = available_vram/af_width-1;
|
||||
}
|
||||
else {
|
||||
af->OffscreenStartY = af_height * numBuffers;
|
||||
af->OffscreenEndY = available_vram / af_width - 1;
|
||||
} else {
|
||||
af->OffscreenOffset = 0;
|
||||
af->OffscreenStartY = 0;
|
||||
af->OffscreenEndY = 0;
|
||||
|
@ -371,43 +318,32 @@ long SetVideoMode(AF_DRIVER *af, short mode, long virtualX, long virtualY, long
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* RestoreTextMode:
|
||||
* Returns to text mode, shutting down the accelerator hardware.
|
||||
*/
|
||||
void RestoreTextMode(AF_DRIVER *af)
|
||||
{
|
||||
void RestoreTextMode(AF_DRIVER *af) {
|
||||
RM_REGS r;
|
||||
|
||||
r.x.ax = 3;
|
||||
rm_int(0x10, &r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetClosestPixelClock:
|
||||
* I don't have a clue what this should return: it is used for the
|
||||
* refresh rate control.
|
||||
*/
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock)
|
||||
{
|
||||
long GetClosestPixelClock(AF_DRIVER *af, short mode, unsigned long pixelClock) {
|
||||
/* ??? */
|
||||
return 135000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SaveRestoreState:
|
||||
* Stores the current driver status: not presently implemented.
|
||||
*/
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
||||
{
|
||||
void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf) {
|
||||
/* not implemented (not used by Allegro) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetDisplayStart:
|
||||
* Hardware scrolling function. The waitVRT value may be one of:
|
||||
*
|
||||
|
@ -415,114 +351,95 @@ void SaveRestoreState(AF_DRIVER *af, int subfunc, void *saveBuf)
|
|||
* 0 = set values and return immediately
|
||||
* 1 = set values and wait for retrace
|
||||
*/
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT)
|
||||
{
|
||||
void SetDisplayStart(AF_DRIVER *af, long x, long y, long waitVRT) {
|
||||
if (waitVRT >= 0) {
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) + ((y + af_visible_page*af_height) * af_width);
|
||||
long a = (x * BYTES_PER_PIXEL(af_bpp)) +
|
||||
((y + af_visible_page * af_height) * af_width);
|
||||
|
||||
asm volatile ("cli");
|
||||
asm volatile("cli");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 1);
|
||||
}
|
||||
do { } while (inportb(0x3DA) & 1); }
|
||||
|
||||
/* write high bits to Video7 registers */
|
||||
alter_vga_register(0x3C4, 0xF6, 0x30, a>>(18-4));
|
||||
alter_vga_register(0x3C4, 0xF6, 0x30, a >> (18 - 4));
|
||||
|
||||
/* write to normal VGA address registers */
|
||||
write_vga_register(0x3D4, 0x0D, (a>>2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a>>10) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0D, (a >> 2) & 0xFF);
|
||||
write_vga_register(0x3D4, 0x0C, (a >> 10) & 0xFF);
|
||||
|
||||
asm volatile ("sti");
|
||||
asm volatile("sti");
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
/* write low 2 bits to VGA horizontal pan register */
|
||||
write_vga_register(0x3C0, 0x33, a&3);
|
||||
write_vga_register(0x3C0, 0x33, a & 3);
|
||||
}
|
||||
|
||||
af_scroll_x = x;
|
||||
af_scroll_y = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetActiveBuffer:
|
||||
* Sets which buffer is being drawn onto, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index)
|
||||
{
|
||||
void SetActiveBuffer(AF_DRIVER *af, long index) {
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY += af_active_page*af_height;
|
||||
af->OffscreenEndY += af_active_page*af_height;
|
||||
af->OffscreenStartY += af_active_page * af_height;
|
||||
af->OffscreenEndY += af_active_page * af_height;
|
||||
}
|
||||
|
||||
af_active_page = index;
|
||||
|
||||
af->OriginOffset = af_width*af_height*index;
|
||||
af->OriginOffset = af_width * af_height * index;
|
||||
|
||||
if (af->OffscreenOffset) {
|
||||
af->OffscreenStartY -= af_active_page*af_height;
|
||||
af->OffscreenEndY -= af_active_page*af_height;
|
||||
af->OffscreenStartY -= af_active_page * af_height;
|
||||
af->OffscreenEndY -= af_active_page * af_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetVisibleBuffer:
|
||||
* Sets which buffer is displayed on the screen, for use in multi buffering
|
||||
* systems (not used by Allegro).
|
||||
*/
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT)
|
||||
{
|
||||
void SetVisibleBuffer(AF_DRIVER *af, long index, long waitVRT) {
|
||||
af_visible_page = index;
|
||||
|
||||
SetDisplayStart(af, af_scroll_x, af_scroll_y, waitVRT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* GetDisplayStartStatus:
|
||||
* Status poll for triple buffering. Not possible on the majority of
|
||||
* present cards: this function is just a placeholder.
|
||||
*/
|
||||
int GetDisplayStartStatus(AF_DRIVER *af)
|
||||
{
|
||||
int GetDisplayStartStatus(AF_DRIVER *af) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetPaletteData:
|
||||
* Palette setting routine.
|
||||
*/
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index, long waitVRT)
|
||||
{
|
||||
void SetPaletteData(AF_DRIVER *af, AF_PALETTE *pal, long num, long index,
|
||||
long waitVRT) {
|
||||
int i;
|
||||
|
||||
if (waitVRT) {
|
||||
do {
|
||||
} while (inportb(0x3DA) & 8);
|
||||
|
||||
do {
|
||||
} while (!(inportb(0x3DA) & 8));
|
||||
}
|
||||
do { } while (!(inportb(0x3DA) & 8)); }
|
||||
|
||||
for (i=0; i<num; i++) {
|
||||
outportb(0x3C8, index+i);
|
||||
outportb(0x3C9, pal[i].red/4);
|
||||
outportb(0x3C9, pal[i].green/4);
|
||||
outportb(0x3C9, pal[i].blue/4);
|
||||
for (i = 0; i < num; i++) {
|
||||
outportb(0x3C8, index + i);
|
||||
outportb(0x3C9, pal[i].red / 4);
|
||||
outportb(0x3C9, pal[i].green / 4);
|
||||
outportb(0x3C9, pal[i].blue / 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SetBank32:
|
||||
* Relocatable bank switch function, called with a bank number in %edx.
|
||||
*/
|
||||
|
@ -558,14 +475,7 @@ asm ("
|
|||
*/
|
||||
void SetBank(AF_DRIVER *af, long bank)
|
||||
{
|
||||
asm (
|
||||
" call _SetBank32 "
|
||||
:
|
||||
: "d" (bank)
|
||||
);
|
||||
asm(" call _SetBank32 " : : "d"(bank));
|
||||
|
||||
af_bank = bank;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
* See freebe.txt for copyright information.
|
||||
*/
|
||||
|
||||
|
||||
#include "vbeaf.h"
|
||||
|
||||
|
||||
|
||||
AF_DRIVER drvhdr =
|
||||
{
|
||||
AF_DRIVER drvhdr = {
|
||||
"VBEAF.DRV", /* Signature */
|
||||
0x200, /* Version */
|
||||
0, /* DriverRev */
|
||||
|
@ -42,4 +38,3 @@ AF_DRIVER drvhdr =
|
|||
-1, /* PCISubSysID */
|
||||
0 /* Checksum */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue