]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/MAI/bios_emulator/scitech/src/common/gados.c
* Code cleanup:
[people/ms/u-boot.git] / board / MAI / bios_emulator / scitech / src / common / gados.c
CommitLineData
c7de829c
WD
1/****************************************************************************
2*
3* SciTech Nucleus Graphics Architecture
4*
5* Copyright (C) 1991-1998 SciTech Software, Inc.
6* All rights reserved.
7*
8* ======================================================================
9* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
10* | |
11* |This copyrighted computer code contains proprietary technology |
12* |owned by SciTech Software, Inc., located at 505 Wall Street, |
13* |Chico, CA 95928 USA (http://www.scitechsoft.com). |
14* | |
15* |The contents of this file are subject to the SciTech Nucleus |
16* |License; you may *not* use this file or related software except in |
17* |compliance with the License. You may obtain a copy of the License |
18* |at http://www.scitechsoft.com/nucleus-license.txt |
19* | |
20* |Software distributed under the License is distributed on an |
21* |"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
22* |implied. See the License for the specific language governing |
23* |rights and limitations under the License. |
24* | |
25* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
26* ======================================================================
27*
28* Language: ANSI C
29* Environment: MSDOS
30*
31* Description: OS specific Nucleus Graphics Architecture services for
32* the MSDOS operating system.
33*
34****************************************************************************/
35
36#include "pm_help.h"
37#include "pmapi.h"
38#include <stdio.h>
39#include <stdlib.h>
40#include <string.h>
41
42/*-------------------------- Implementation -------------------------------*/
43
44/****************************************************************************
45PARAMETERS:
46path - Local path to the Nucleus driver files.
47
48REMARKS:
49This function is used by the application program to override the location
50of the Nucleus driver files that are loaded. Normally the loader code
51will look in the system Nucleus directories first, then in the 'drivers'
52directory relative to the current working directory, and finally relative
53to the MGL_ROOT environment variable.
54****************************************************************************/
55void NAPI GA_setLocalPath(
56 const char *path)
57{
58 PM_setLocalBPDPath(path);
59}
60
61/****************************************************************************
62RETURNS:
63Pointer to the system wide PM library imports, or the internal version if none
64
65REMARKS:
66Nothing to do here for DOS. Basically since DOS has no system wide shared
67library mechanism we are essentially screwed if the binary API changes.
68By default for 32-bit DOS apps the local Nucleus drivers should always be
69used in preference to the system wide Nucleus drivers.
70****************************************************************************/
71PM_imports * NAPI GA_getSystemPMImports(void)
72{
73 return &_PM_imports;
74}
75
76/****************************************************************************
77REMARKS:
78Nothing special for this OS.
79****************************************************************************/
80ibool NAPI GA_getSharedExports(
81 GA_exports *gaExp,
82 ibool shared)
83{
84 (void)gaExp;
85 (void)shared;
86 return false;
87}
88
89#if !defined(TEST_HARNESS) && !defined(VBETEST)
90/****************************************************************************
91REMARKS:
92Nothing special for this OS
93****************************************************************************/
94ibool NAPI GA_queryFunctions(
95 GA_devCtx *dc,
96 N_uint32 id,
97 void _FAR_ *funcs)
98{
99 return __GA_exports.GA_queryFunctions(dc,id,funcs);
100}
101
102/****************************************************************************
103REMARKS:
104Nothing special for this OS
105****************************************************************************/
106ibool NAPI REF2D_queryFunctions(
107 REF2D_driver *ref2d,
108 N_uint32 id,
109 void _FAR_ *funcs)
110{
111 return __GA_exports.REF2D_queryFunctions(ref2d,id,funcs);
112}
113#endif
114
115/****************************************************************************
116REMARKS:
117This function initialises the high precision timing functions for the DOS
118Nucleus loader library.
119****************************************************************************/
120ibool NAPI GA_TimerInit(void)
121{
122 if (_GA_haveCPUID() && (_GA_getCPUIDFeatures() & CPU_HaveRDTSC) != 0)
8bde7f77 123 return true;
c7de829c
WD
124 return false;
125}
126
127/****************************************************************************
128REMARKS:
129This function reads the high resolution timer.
130****************************************************************************/
131void NAPI GA_TimerRead(
132 GA_largeInteger *value)
133{
134 _GA_readTimeStamp(value);
135}