ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/BeOS/CreatePCIDrivers/Video.cpp
Revision: 1.2
Committed: 2004-01-12T15:37:20Z (20 years, 5 months ago) by cebix
Branch: MAIN
Changes since 1.1: +1 -1 lines
Log Message:
Happy New Year! :)

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * Video.cpp - SheepShaver video PCI driver stub
3     *
4 cebix 1.2 * SheepShaver (C) 1997-2004 Christian Bauer and Marc Hellwig
5 cebix 1.1 *
6     * This program is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19     */
20    
21     #include "sysdeps.h"
22     #include "xlowmem.h"
23    
24    
25     /*
26     * Driver Description structure
27     */
28    
29     struct DriverDescription {
30     uint32 driverDescSignature;
31     uint32 driverDescVersion;
32     char nameInfoStr[32];
33     uint32 version;
34     uint32 driverRuntime;
35     char driverName[32];
36     uint32 driverDescReserved[8];
37     uint32 nServices;
38     uint32 serviceCategory;
39     uint32 serviceType;
40     uint32 serviceVersion;
41     };
42    
43     #pragma export on
44     struct DriverDescription TheDriverDescription = {
45     'mtej',
46     0,
47     "\pvideo",
48     0x01008000, // V1.0.0final
49     6, // kDriverIsUnderExpertControl, kDriverIsOpenedUponLoad
50     "\pDisplay_Video_Apple_Sheep",
51     0, 0, 0, 0, 0, 0, 0, 0,
52     1,
53     'ndrv',
54     'vido',
55     0x01000000, // V1.0.0
56     };
57     #pragma export off
58    
59    
60     // Prototypes for exported functions
61     extern "C" {
62     #pragma export on
63     extern int16 DoDriverIO(void *spaceID, void *commandID, void *commandContents, uint32 commandCode, uint32 commandKind);
64     #pragma export off
65     }
66    
67    
68     /*
69     * Do driver IO
70     */
71    
72     asm int16 DoDriverIO(void *spaceID, void *commandID, void *commandContents, uint32 commandCode, uint32 commandKind)
73     {
74     lwz r2,XLM_TOC
75     lwz r0,XLM_VIDEO_DOIO
76     mtctr r0
77     bctr
78     }