diff --git a/glide3x/COPYING b/glide3x/COPYING index 16be826..e8b53fe 100644 --- a/glide3x/COPYING +++ b/glide3x/COPYING @@ -1,255 +1,255 @@ -3DFX GLIDE Source Code General Public License - - -1. PREAMBLE - - This license is for software that provides a 3D graphics application - program interface (API).The license is intended to offer terms similar - to some standard General Public Licenses designed to foster open - standards and unrestricted accessibility to source code. Some of these - licenses require that, as a condition of the license of the software, - any derivative works (that is, new software which is a work containing - the original program or a portion of it) must be available for general - use, without restriction other than for a minor transfer fee, and that - the source code for such derivative works must likewise be made - available. The only restriction is that such derivative works must be - subject to the same General Public License terms as the original work. - - This 3dfx GLIDE Source Code General Public License differs from the - standard licenses of this type in that it does not require the entire - derivative work to be made available under the terms of this license - nor is the recipient required to make available the source code for - the entire derivative work. Rather, the license is limited to only the - identifiable portion of the derivative work that is derived from the - licensed software. The precise terms and conditions for copying, - distribution and modification follow. - - -2. DEFINITIONS - - 2.1 This License applies to any program (or other "work") which - contains a notice placed by the copyright holder saying it may be - distributed under the terms of this 3dfx GLIDE Source Code General - Public License. - - 2.2 The term "Program" as used in this Agreement refers to 3DFX's - GLIDE source code and object code and any Derivative Work. - - 2.3 "Derivative Work" means, for the purpose of the License, that - portion of any work that contains the Program or the identifiable - portion of a work that is derived from the Program, either verbatim or - with modifications and/or translated into another language, and that - performs 3D graphics API operations. It does not include any other - portions of a work. - - 2.4 "Modifications of the Program" means any work, which includes a - Derivative Work, and includes the whole of such work. - - 2.5 "License" means this 3dfx GLIDE Source Code General Public License. - - 2.6 The "Source Code" for a work means the preferred form of the work - for making modifications to it. For an executable work, complete source - code means all the source code for all modules it contains, any - associated interface definition files, and the scripts used to control - compilation and installation of the executable work. - - 2.7 "3dfx" means 3dfx Interactive, Inc. - - -3. LICENSED ACTIVITIES - - 3.1 COPYING - You may copy and distribute verbatim copies of the - Program's Source Code as you receive it, in any medium, subject to the - provision of section 3.3 and provided also that: - - (a) you conspicuously and appropriately publish on each copy - an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice - that recipients who wish to copy, distribute or modify the Program can - only do so subject to this License, and a disclaimer of warranty as - set forth in section 5; - - (b) keep intact all the notices that refer to this License and - to the absence of any warranty; and - - (c) do not make any use of the GLIDE trademark without the prior - written permission of 3dfx, and - - (d) give all recipients of the Program a copy of this License - along with the Program or instructions on how to easily receive a copy - of this License. - - - 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your - copy or copies of the Program or any portion of it, and copy and - distribute such modifications subject to the provisions of section 3.3 - and provided that you also meet all of the following conditions: - - (a) you conspicuously and appropriately publish on each copy - of a Derivative Work an appropriate copyright notice, a notice that - recipients who wish to copy, distribute or modify the Derivative Work - can only do so subject to this License, and a disclaimer of warranty - as set forth in section 5; - - (b) keep intact all the notices that refer to this License and - to the absence of any warranty; and - - (c) give all recipients of the Derivative Work a copy of this - License along with the Derivative Work or instructions on how to easily - receive a copy of this License. - - (d) You must cause the modified files of the Derivative Work - to carry prominent notices stating that you changed the files and the - date of any change. - - (e) You must cause any Derivative Work that you distribute or - publish to be licensed at no charge to all third parties under the - terms of this License. - - (f) You do not make any use of the GLIDE trademark without the - prior written permission of 3dfx. - - (g) If the Derivative Work normally reads commands - interactively when run, you must cause it, when started running for - such interactive use, to print or display an announcement as follows: - - "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS - SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, - EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE - TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, - INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE - DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM - INFO@3DFX.COM)." - - (h) The requirements of this section 3.2 do not apply to the - modified work as a whole but only to the Derivative Work. It is not - the intent of this License to claim rights or contest your rights to - work written entirely by you; rather, the intent is to exercise the - right to control the distribution of Derivative Works. - - - 3.3 DISTRIBUTION - - (a) All copies of the Program or Derivative Works which are - distributed must include in the file headers the following language - verbatim: - - "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED - ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO - RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF - 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM - THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). - THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER - EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A - FULL TEXT OF THE NON-WARRANTY PROVISIONS. - - USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO - RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS - IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, - AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR - SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF - THE UNITED STATES. - - COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" - - (b) You may distribute the Program or a Derivative Work in - object code or executable form under the terms of Sections 3.1 and 3.2 - provided that you also do one of the following: - - (1) Accompany it with the complete corresponding - machine-readable source code, which must be distributed under the - terms of Sections 3.1 and 3.2; or, - - (2) Accompany it with a written offer, valid for at - least three years, to give any third party, for a charge no more than - your cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 3.1 and 3.2 on a medium - customarily used for software interchange; or, - - (3) Accompany it with the information you received as - to the offer to distribute corresponding source code. (This alternative - is allowed only for noncommercial distribution and only if you received - the program in object code or executable form with such an offer, in - accord with Subsection 3.3(b)(2) above.) - - (c) The source code distributed need not include anything - that is normally distributed (in either source or binary form) with - the major components (compiler, kernel, and so on) of the operating - system on which the executable runs, unless that component itself - accompanies the executable code. - - (d) If distribution of executable code or object code is made - by offering access to copy from a designated place, then offering - equivalent access to copy the source code from the same place counts - as distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - (e) Each time you redistribute the Program or any Derivative - Work, the recipient automatically receives a license from 3dfx and - successor licensors to copy, distribute or modify the Program and - Derivative Works subject to the terms and conditions of the License. - You may not impose any further restrictions on the recipients' - exercise of the rights granted herein. You are not responsible for - enforcing compliance by third parties to this License. - - (f) You may not make any use of the GLIDE trademark without - the prior written permission of 3dfx. - - (g) You may not copy, modify, sublicense, or distribute the - Program or any Derivative Works except as expressly provided under - this License. Any attempt otherwise to copy, modify, sublicense or - distribute the Program or any Derivative Works is void, and will - automatically terminate your rights under this License. However, - parties who have received copies, or rights, from you under this - License will not have their licenses terminated so long as such - parties remain in full compliance. - - -4. MISCELLANEOUS - - 4.1 Acceptance of this License is voluntary. By using, modifying or - distributing the Program or any Derivative Work, you indicate your - acceptance of this License to do so, and all its terms and conditions - for copying, distributing or modifying the Program or works based on - it. Nothing else grants you permission to modify or distribute the - Program or Derivative Works and doing so without acceptance of this - License is in violation of the U.S. and international copyright laws. - - 4.2 If the distribution and/or use of the Program or Derivative Works - is restricted in certain countries either by patents or by copyrighted - interfaces, the original copyright holder who places the Program under - this License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only in - or among countries not thus excluded. In such case, this License - incorporates the limitation as if written in the body of this License. - - 4.3 This License is to be construed according to the laws of the - State of California and you consent to personal jurisdiction in the - State of California in the event it is necessary to enforce the - provisions of this License. - - -5. NO WARRANTIES - - 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY - FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY - AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. - SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME - THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX - INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY - WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS - PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, - SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT - LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES - SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR - DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH - HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. - +3DFX GLIDE Source Code General Public License + + +1. PREAMBLE + + This license is for software that provides a 3D graphics application + program interface (API).The license is intended to offer terms similar + to some standard General Public Licenses designed to foster open + standards and unrestricted accessibility to source code. Some of these + licenses require that, as a condition of the license of the software, + any derivative works (that is, new software which is a work containing + the original program or a portion of it) must be available for general + use, without restriction other than for a minor transfer fee, and that + the source code for such derivative works must likewise be made + available. The only restriction is that such derivative works must be + subject to the same General Public License terms as the original work. + + This 3dfx GLIDE Source Code General Public License differs from the + standard licenses of this type in that it does not require the entire + derivative work to be made available under the terms of this license + nor is the recipient required to make available the source code for + the entire derivative work. Rather, the license is limited to only the + identifiable portion of the derivative work that is derived from the + licensed software. The precise terms and conditions for copying, + distribution and modification follow. + + +2. DEFINITIONS + + 2.1 This License applies to any program (or other "work") which + contains a notice placed by the copyright holder saying it may be + distributed under the terms of this 3dfx GLIDE Source Code General + Public License. + + 2.2 The term "Program" as used in this Agreement refers to 3DFX's + GLIDE source code and object code and any Derivative Work. + + 2.3 "Derivative Work" means, for the purpose of the License, that + portion of any work that contains the Program or the identifiable + portion of a work that is derived from the Program, either verbatim or + with modifications and/or translated into another language, and that + performs 3D graphics API operations. It does not include any other + portions of a work. + + 2.4 "Modifications of the Program" means any work, which includes a + Derivative Work, and includes the whole of such work. + + 2.5 "License" means this 3dfx GLIDE Source Code General Public License. + + 2.6 The "Source Code" for a work means the preferred form of the work + for making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, any + associated interface definition files, and the scripts used to control + compilation and installation of the executable work. + + 2.7 "3dfx" means 3dfx Interactive, Inc. + + +3. LICENSED ACTIVITIES + + 3.1 COPYING - You may copy and distribute verbatim copies of the + Program's Source Code as you receive it, in any medium, subject to the + provision of section 3.3 and provided also that: + + (a) you conspicuously and appropriately publish on each copy + an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice + that recipients who wish to copy, distribute or modify the Program can + only do so subject to this License, and a disclaimer of warranty as + set forth in section 5; + + (b) keep intact all the notices that refer to this License and + to the absence of any warranty; and + + (c) do not make any use of the GLIDE trademark without the prior + written permission of 3dfx, and + + (d) give all recipients of the Program a copy of this License + along with the Program or instructions on how to easily receive a copy + of this License. + + + 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your + copy or copies of the Program or any portion of it, and copy and + distribute such modifications subject to the provisions of section 3.3 + and provided that you also meet all of the following conditions: + + (a) you conspicuously and appropriately publish on each copy + of a Derivative Work an appropriate copyright notice, a notice that + recipients who wish to copy, distribute or modify the Derivative Work + can only do so subject to this License, and a disclaimer of warranty + as set forth in section 5; + + (b) keep intact all the notices that refer to this License and + to the absence of any warranty; and + + (c) give all recipients of the Derivative Work a copy of this + License along with the Derivative Work or instructions on how to easily + receive a copy of this License. + + (d) You must cause the modified files of the Derivative Work + to carry prominent notices stating that you changed the files and the + date of any change. + + (e) You must cause any Derivative Work that you distribute or + publish to be licensed at no charge to all third parties under the + terms of this License. + + (f) You do not make any use of the GLIDE trademark without the + prior written permission of 3dfx. + + (g) If the Derivative Work normally reads commands + interactively when run, you must cause it, when started running for + such interactive use, to print or display an announcement as follows: + + "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS + SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, + EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE + TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, + INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE + DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM + INFO@3DFX.COM)." + + (h) The requirements of this section 3.2 do not apply to the + modified work as a whole but only to the Derivative Work. It is not + the intent of this License to claim rights or contest your rights to + work written entirely by you; rather, the intent is to exercise the + right to control the distribution of Derivative Works. + + + 3.3 DISTRIBUTION + + (a) All copies of the Program or Derivative Works which are + distributed must include in the file headers the following language + verbatim: + + "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED + ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO + RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF + 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM + THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). + THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER + EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A + FULL TEXT OF THE NON-WARRANTY PROVISIONS. + + USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO + RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS + IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, + AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR + SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF + THE UNITED STATES. + + COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" + + (b) You may distribute the Program or a Derivative Work in + object code or executable form under the terms of Sections 3.1 and 3.2 + provided that you also do one of the following: + + (1) Accompany it with the complete corresponding + machine-readable source code, which must be distributed under the + terms of Sections 3.1 and 3.2; or, + + (2) Accompany it with a written offer, valid for at + least three years, to give any third party, for a charge no more than + your cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 3.1 and 3.2 on a medium + customarily used for software interchange; or, + + (3) Accompany it with the information you received as + to the offer to distribute corresponding source code. (This alternative + is allowed only for noncommercial distribution and only if you received + the program in object code or executable form with such an offer, in + accord with Subsection 3.3(b)(2) above.) + + (c) The source code distributed need not include anything + that is normally distributed (in either source or binary form) with + the major components (compiler, kernel, and so on) of the operating + system on which the executable runs, unless that component itself + accompanies the executable code. + + (d) If distribution of executable code or object code is made + by offering access to copy from a designated place, then offering + equivalent access to copy the source code from the same place counts + as distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + (e) Each time you redistribute the Program or any Derivative + Work, the recipient automatically receives a license from 3dfx and + successor licensors to copy, distribute or modify the Program and + Derivative Works subject to the terms and conditions of the License. + You may not impose any further restrictions on the recipients' + exercise of the rights granted herein. You are not responsible for + enforcing compliance by third parties to this License. + + (f) You may not make any use of the GLIDE trademark without + the prior written permission of 3dfx. + + (g) You may not copy, modify, sublicense, or distribute the + Program or any Derivative Works except as expressly provided under + this License. Any attempt otherwise to copy, modify, sublicense or + distribute the Program or any Derivative Works is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + +4. MISCELLANEOUS + + 4.1 Acceptance of this License is voluntary. By using, modifying or + distributing the Program or any Derivative Work, you indicate your + acceptance of this License to do so, and all its terms and conditions + for copying, distributing or modifying the Program or works based on + it. Nothing else grants you permission to modify or distribute the + Program or Derivative Works and doing so without acceptance of this + License is in violation of the U.S. and international copyright laws. + + 4.2 If the distribution and/or use of the Program or Derivative Works + is restricted in certain countries either by patents or by copyrighted + interfaces, the original copyright holder who places the Program under + this License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only in + or among countries not thus excluded. In such case, this License + incorporates the limitation as if written in the body of this License. + + 4.3 This License is to be construed according to the laws of the + State of California and you consent to personal jurisdiction in the + State of California in the event it is necessary to enforce the + provisions of this License. + + +5. NO WARRANTIES + + 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY + FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY + AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. + SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX + INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY + WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS + PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, + SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT + LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES + SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR + DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH + HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + diff --git a/glide3x/Makefile.DJ b/glide3x/Makefile.DJ index 0f62467..e2852b8 100644 --- a/glide3x/Makefile.DJ +++ b/glide3x/Makefile.DJ @@ -3,15 +3,18 @@ # Copyright (c) 2003 - Borca Daniel # Email : dborca@yahoo.com # Web : http://www.geocities.com/dborca -# -# $Header$ +# +# $Header$ # $Log$ +# Revision 1.1.2.5 2003/06/21 12:43:04 dborca +# h3cinit cleanup +# # Revision 1.1.2.4 2003/06/13 07:22:57 dborca # more fixes to NASM sources # # Revision 1.1.2.3 2003/06/07 09:53:24 dborca # initial checkin for NASM sources -# +# # @@ -102,7 +105,8 @@ endif endif # other -#CDEFS += -DGLIDE_LIB -DGLIDE_PLUG +CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH +#CDEFS += -DGLIDE_LIB ############################################################################### # C flags diff --git a/glide3x/cvg/init/rcver.h b/glide3x/cvg/init/rcver.h index a041667..4335c51 100644 --- a/glide3x/cvg/init/rcver.h +++ b/glide3x/cvg/init/rcver.h @@ -1,5 +1,5 @@ -#define MANVERSION 1 -#define MANREVISION 1 -#define BUILD_NUMBER 1 - -#define VERSIONSTR "Voodoo2 InitCode " "$Revision$" "\0" +#define MANVERSION 1 +#define MANREVISION 1 +#define BUILD_NUMBER 1 + +#define VERSIONSTR "Voodoo2 InitCode " "$Revision$" "\0" diff --git a/glide3x/glide_license.txt b/glide3x/glide_license.txt index 16be826..e8b53fe 100644 --- a/glide3x/glide_license.txt +++ b/glide3x/glide_license.txt @@ -1,255 +1,255 @@ -3DFX GLIDE Source Code General Public License - - -1. PREAMBLE - - This license is for software that provides a 3D graphics application - program interface (API).The license is intended to offer terms similar - to some standard General Public Licenses designed to foster open - standards and unrestricted accessibility to source code. Some of these - licenses require that, as a condition of the license of the software, - any derivative works (that is, new software which is a work containing - the original program or a portion of it) must be available for general - use, without restriction other than for a minor transfer fee, and that - the source code for such derivative works must likewise be made - available. The only restriction is that such derivative works must be - subject to the same General Public License terms as the original work. - - This 3dfx GLIDE Source Code General Public License differs from the - standard licenses of this type in that it does not require the entire - derivative work to be made available under the terms of this license - nor is the recipient required to make available the source code for - the entire derivative work. Rather, the license is limited to only the - identifiable portion of the derivative work that is derived from the - licensed software. The precise terms and conditions for copying, - distribution and modification follow. - - -2. DEFINITIONS - - 2.1 This License applies to any program (or other "work") which - contains a notice placed by the copyright holder saying it may be - distributed under the terms of this 3dfx GLIDE Source Code General - Public License. - - 2.2 The term "Program" as used in this Agreement refers to 3DFX's - GLIDE source code and object code and any Derivative Work. - - 2.3 "Derivative Work" means, for the purpose of the License, that - portion of any work that contains the Program or the identifiable - portion of a work that is derived from the Program, either verbatim or - with modifications and/or translated into another language, and that - performs 3D graphics API operations. It does not include any other - portions of a work. - - 2.4 "Modifications of the Program" means any work, which includes a - Derivative Work, and includes the whole of such work. - - 2.5 "License" means this 3dfx GLIDE Source Code General Public License. - - 2.6 The "Source Code" for a work means the preferred form of the work - for making modifications to it. For an executable work, complete source - code means all the source code for all modules it contains, any - associated interface definition files, and the scripts used to control - compilation and installation of the executable work. - - 2.7 "3dfx" means 3dfx Interactive, Inc. - - -3. LICENSED ACTIVITIES - - 3.1 COPYING - You may copy and distribute verbatim copies of the - Program's Source Code as you receive it, in any medium, subject to the - provision of section 3.3 and provided also that: - - (a) you conspicuously and appropriately publish on each copy - an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice - that recipients who wish to copy, distribute or modify the Program can - only do so subject to this License, and a disclaimer of warranty as - set forth in section 5; - - (b) keep intact all the notices that refer to this License and - to the absence of any warranty; and - - (c) do not make any use of the GLIDE trademark without the prior - written permission of 3dfx, and - - (d) give all recipients of the Program a copy of this License - along with the Program or instructions on how to easily receive a copy - of this License. - - - 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your - copy or copies of the Program or any portion of it, and copy and - distribute such modifications subject to the provisions of section 3.3 - and provided that you also meet all of the following conditions: - - (a) you conspicuously and appropriately publish on each copy - of a Derivative Work an appropriate copyright notice, a notice that - recipients who wish to copy, distribute or modify the Derivative Work - can only do so subject to this License, and a disclaimer of warranty - as set forth in section 5; - - (b) keep intact all the notices that refer to this License and - to the absence of any warranty; and - - (c) give all recipients of the Derivative Work a copy of this - License along with the Derivative Work or instructions on how to easily - receive a copy of this License. - - (d) You must cause the modified files of the Derivative Work - to carry prominent notices stating that you changed the files and the - date of any change. - - (e) You must cause any Derivative Work that you distribute or - publish to be licensed at no charge to all third parties under the - terms of this License. - - (f) You do not make any use of the GLIDE trademark without the - prior written permission of 3dfx. - - (g) If the Derivative Work normally reads commands - interactively when run, you must cause it, when started running for - such interactive use, to print or display an announcement as follows: - - "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS - SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, - EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE - TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, - INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE - DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM - INFO@3DFX.COM)." - - (h) The requirements of this section 3.2 do not apply to the - modified work as a whole but only to the Derivative Work. It is not - the intent of this License to claim rights or contest your rights to - work written entirely by you; rather, the intent is to exercise the - right to control the distribution of Derivative Works. - - - 3.3 DISTRIBUTION - - (a) All copies of the Program or Derivative Works which are - distributed must include in the file headers the following language - verbatim: - - "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED - ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO - RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF - 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM - THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). - THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER - EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A - FULL TEXT OF THE NON-WARRANTY PROVISIONS. - - USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO - RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS - IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, - AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR - SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF - THE UNITED STATES. - - COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" - - (b) You may distribute the Program or a Derivative Work in - object code or executable form under the terms of Sections 3.1 and 3.2 - provided that you also do one of the following: - - (1) Accompany it with the complete corresponding - machine-readable source code, which must be distributed under the - terms of Sections 3.1 and 3.2; or, - - (2) Accompany it with a written offer, valid for at - least three years, to give any third party, for a charge no more than - your cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 3.1 and 3.2 on a medium - customarily used for software interchange; or, - - (3) Accompany it with the information you received as - to the offer to distribute corresponding source code. (This alternative - is allowed only for noncommercial distribution and only if you received - the program in object code or executable form with such an offer, in - accord with Subsection 3.3(b)(2) above.) - - (c) The source code distributed need not include anything - that is normally distributed (in either source or binary form) with - the major components (compiler, kernel, and so on) of the operating - system on which the executable runs, unless that component itself - accompanies the executable code. - - (d) If distribution of executable code or object code is made - by offering access to copy from a designated place, then offering - equivalent access to copy the source code from the same place counts - as distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - (e) Each time you redistribute the Program or any Derivative - Work, the recipient automatically receives a license from 3dfx and - successor licensors to copy, distribute or modify the Program and - Derivative Works subject to the terms and conditions of the License. - You may not impose any further restrictions on the recipients' - exercise of the rights granted herein. You are not responsible for - enforcing compliance by third parties to this License. - - (f) You may not make any use of the GLIDE trademark without - the prior written permission of 3dfx. - - (g) You may not copy, modify, sublicense, or distribute the - Program or any Derivative Works except as expressly provided under - this License. Any attempt otherwise to copy, modify, sublicense or - distribute the Program or any Derivative Works is void, and will - automatically terminate your rights under this License. However, - parties who have received copies, or rights, from you under this - License will not have their licenses terminated so long as such - parties remain in full compliance. - - -4. MISCELLANEOUS - - 4.1 Acceptance of this License is voluntary. By using, modifying or - distributing the Program or any Derivative Work, you indicate your - acceptance of this License to do so, and all its terms and conditions - for copying, distributing or modifying the Program or works based on - it. Nothing else grants you permission to modify or distribute the - Program or Derivative Works and doing so without acceptance of this - License is in violation of the U.S. and international copyright laws. - - 4.2 If the distribution and/or use of the Program or Derivative Works - is restricted in certain countries either by patents or by copyrighted - interfaces, the original copyright holder who places the Program under - this License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only in - or among countries not thus excluded. In such case, this License - incorporates the limitation as if written in the body of this License. - - 4.3 This License is to be construed according to the laws of the - State of California and you consent to personal jurisdiction in the - State of California in the event it is necessary to enforce the - provisions of this License. - - -5. NO WARRANTIES - - 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY - FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY - AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. - SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME - THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX - INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY - WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS - PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, - SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT - LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES - SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR - DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH - HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. - +3DFX GLIDE Source Code General Public License + + +1. PREAMBLE + + This license is for software that provides a 3D graphics application + program interface (API).The license is intended to offer terms similar + to some standard General Public Licenses designed to foster open + standards and unrestricted accessibility to source code. Some of these + licenses require that, as a condition of the license of the software, + any derivative works (that is, new software which is a work containing + the original program or a portion of it) must be available for general + use, without restriction other than for a minor transfer fee, and that + the source code for such derivative works must likewise be made + available. The only restriction is that such derivative works must be + subject to the same General Public License terms as the original work. + + This 3dfx GLIDE Source Code General Public License differs from the + standard licenses of this type in that it does not require the entire + derivative work to be made available under the terms of this license + nor is the recipient required to make available the source code for + the entire derivative work. Rather, the license is limited to only the + identifiable portion of the derivative work that is derived from the + licensed software. The precise terms and conditions for copying, + distribution and modification follow. + + +2. DEFINITIONS + + 2.1 This License applies to any program (or other "work") which + contains a notice placed by the copyright holder saying it may be + distributed under the terms of this 3dfx GLIDE Source Code General + Public License. + + 2.2 The term "Program" as used in this Agreement refers to 3DFX's + GLIDE source code and object code and any Derivative Work. + + 2.3 "Derivative Work" means, for the purpose of the License, that + portion of any work that contains the Program or the identifiable + portion of a work that is derived from the Program, either verbatim or + with modifications and/or translated into another language, and that + performs 3D graphics API operations. It does not include any other + portions of a work. + + 2.4 "Modifications of the Program" means any work, which includes a + Derivative Work, and includes the whole of such work. + + 2.5 "License" means this 3dfx GLIDE Source Code General Public License. + + 2.6 The "Source Code" for a work means the preferred form of the work + for making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, any + associated interface definition files, and the scripts used to control + compilation and installation of the executable work. + + 2.7 "3dfx" means 3dfx Interactive, Inc. + + +3. LICENSED ACTIVITIES + + 3.1 COPYING - You may copy and distribute verbatim copies of the + Program's Source Code as you receive it, in any medium, subject to the + provision of section 3.3 and provided also that: + + (a) you conspicuously and appropriately publish on each copy + an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice + that recipients who wish to copy, distribute or modify the Program can + only do so subject to this License, and a disclaimer of warranty as + set forth in section 5; + + (b) keep intact all the notices that refer to this License and + to the absence of any warranty; and + + (c) do not make any use of the GLIDE trademark without the prior + written permission of 3dfx, and + + (d) give all recipients of the Program a copy of this License + along with the Program or instructions on how to easily receive a copy + of this License. + + + 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your + copy or copies of the Program or any portion of it, and copy and + distribute such modifications subject to the provisions of section 3.3 + and provided that you also meet all of the following conditions: + + (a) you conspicuously and appropriately publish on each copy + of a Derivative Work an appropriate copyright notice, a notice that + recipients who wish to copy, distribute or modify the Derivative Work + can only do so subject to this License, and a disclaimer of warranty + as set forth in section 5; + + (b) keep intact all the notices that refer to this License and + to the absence of any warranty; and + + (c) give all recipients of the Derivative Work a copy of this + License along with the Derivative Work or instructions on how to easily + receive a copy of this License. + + (d) You must cause the modified files of the Derivative Work + to carry prominent notices stating that you changed the files and the + date of any change. + + (e) You must cause any Derivative Work that you distribute or + publish to be licensed at no charge to all third parties under the + terms of this License. + + (f) You do not make any use of the GLIDE trademark without the + prior written permission of 3dfx. + + (g) If the Derivative Work normally reads commands + interactively when run, you must cause it, when started running for + such interactive use, to print or display an announcement as follows: + + "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS + SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, + EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE + TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, + INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE + DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM + INFO@3DFX.COM)." + + (h) The requirements of this section 3.2 do not apply to the + modified work as a whole but only to the Derivative Work. It is not + the intent of this License to claim rights or contest your rights to + work written entirely by you; rather, the intent is to exercise the + right to control the distribution of Derivative Works. + + + 3.3 DISTRIBUTION + + (a) All copies of the Program or Derivative Works which are + distributed must include in the file headers the following language + verbatim: + + "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED + ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO + RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF + 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM + THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). + THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER + EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A + FULL TEXT OF THE NON-WARRANTY PROVISIONS. + + USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO + RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS + IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, + AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR + SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF + THE UNITED STATES. + + COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" + + (b) You may distribute the Program or a Derivative Work in + object code or executable form under the terms of Sections 3.1 and 3.2 + provided that you also do one of the following: + + (1) Accompany it with the complete corresponding + machine-readable source code, which must be distributed under the + terms of Sections 3.1 and 3.2; or, + + (2) Accompany it with a written offer, valid for at + least three years, to give any third party, for a charge no more than + your cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 3.1 and 3.2 on a medium + customarily used for software interchange; or, + + (3) Accompany it with the information you received as + to the offer to distribute corresponding source code. (This alternative + is allowed only for noncommercial distribution and only if you received + the program in object code or executable form with such an offer, in + accord with Subsection 3.3(b)(2) above.) + + (c) The source code distributed need not include anything + that is normally distributed (in either source or binary form) with + the major components (compiler, kernel, and so on) of the operating + system on which the executable runs, unless that component itself + accompanies the executable code. + + (d) If distribution of executable code or object code is made + by offering access to copy from a designated place, then offering + equivalent access to copy the source code from the same place counts + as distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + (e) Each time you redistribute the Program or any Derivative + Work, the recipient automatically receives a license from 3dfx and + successor licensors to copy, distribute or modify the Program and + Derivative Works subject to the terms and conditions of the License. + You may not impose any further restrictions on the recipients' + exercise of the rights granted herein. You are not responsible for + enforcing compliance by third parties to this License. + + (f) You may not make any use of the GLIDE trademark without + the prior written permission of 3dfx. + + (g) You may not copy, modify, sublicense, or distribute the + Program or any Derivative Works except as expressly provided under + this License. Any attempt otherwise to copy, modify, sublicense or + distribute the Program or any Derivative Works is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + +4. MISCELLANEOUS + + 4.1 Acceptance of this License is voluntary. By using, modifying or + distributing the Program or any Derivative Work, you indicate your + acceptance of this License to do so, and all its terms and conditions + for copying, distributing or modifying the Program or works based on + it. Nothing else grants you permission to modify or distribute the + Program or Derivative Works and doing so without acceptance of this + License is in violation of the U.S. and international copyright laws. + + 4.2 If the distribution and/or use of the Program or Derivative Works + is restricted in certain countries either by patents or by copyrighted + interfaces, the original copyright holder who places the Program under + this License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only in + or among countries not thus excluded. In such case, this License + incorporates the limitation as if written in the body of this License. + + 4.3 This License is to be construed according to the laws of the + State of California and you consent to personal jurisdiction in the + State of California in the event it is necessary to enforce the + provisions of this License. + + +5. NO WARRANTIES + + 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY + FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY + AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. + SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX + INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY + WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS + PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, + SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT + LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES + SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR + DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH + HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + diff --git a/glide3x/h3/glide3/tests/Makefile.DJ b/glide3x/h3/glide3/tests/Makefile.DJ index f2a3f23..e511ba3 100644 --- a/glide3x/h3/glide3/tests/Makefile.DJ +++ b/glide3x/h3/glide3/tests/Makefile.DJ @@ -1,51 +1,51 @@ -# DOS/DJGPP tests makefile v1.0 for Glide3 -# -# Copyright (c) 2002 - Borca Daniel -# Email : dborca@yahoo.com -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# CPU optimize for the given processor. -# default = k6 -# DXE=1 use DXE modules. -# default = no -# -# Targets: -# build a specific file -# - - -.PHONY: all -.SUFFIXES: .c .o .exe -.SECONDARY: tlib.o - -FX_GLIDE_HW = h3 -TOP = ../../.. -CPU ?= k6 - -CC = gcc -CFLAGS = -Wall -O2 -ffast-math -mcpu=k6 -CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc -CFLAGS += -I$(TOP)/swlibs/fxmisc -CFLAGS += -D__DOS__ -DH3 -CFLAGS += -D__DOS32__ - -LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib - -ifdef DXE -LDLIBS = -lg3i -else -LDLIBS = -lglid3 -endif - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -%.exe: tlib.o %.o - $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) - -all: - $(error Must specify to build) +# DOS/DJGPP tests makefile v1.0 for Glide3 +# +# Copyright (c) 2002 - Borca Daniel +# Email : dborca@yahoo.com +# Web : http://www.geocities.com/dborca + + +# +# Available options: +# +# Environment variables: +# CPU optimize for the given processor. +# default = k6 +# DXE=1 use DXE modules. +# default = no +# +# Targets: +# build a specific file +# + + +.PHONY: all +.SUFFIXES: .c .o .exe +.SECONDARY: tlib.o + +FX_GLIDE_HW = h3 +TOP = ../../.. +CPU ?= k6 + +CC = gcc +CFLAGS = -Wall -O2 -ffast-math -mcpu=k6 +CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc +CFLAGS += -I$(TOP)/swlibs/fxmisc +CFLAGS += -D__DOS__ -DH3 +CFLAGS += -D__DOS32__ + +LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib + +ifdef DXE +LDLIBS = -lg3i +else +LDLIBS = -lglid3 +endif + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $< +%.exe: tlib.o %.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +all: + $(error Must specify to build) diff --git a/glide3x/h5/glide3/src/glfb.c b/glide3x/h5/glide3/src/glfb.c index 1587de7..8bd86b1 100644 --- a/glide3x/h5/glide3/src/glfb.c +++ b/glide3x/h5/glide3/src/glfb.c @@ -19,6 +19,9 @@ ** ** $Header$ ** $Log$ +** Revision 1.7.4.11 2003/07/08 18:43:37 koolsmoky +** removed unused local variables +** ** Revision 1.7.4.10 2003/07/08 08:06:45 dborca ** updates to MMX/FPU specializations ** @@ -2128,7 +2131,7 @@ _grLfbWriteRegion(FxBool pixPipelineP, rv = FXFALSE; } -#undef SET_LFB_STRAIGHT +#undef SET_LFB_STRAIGHT done: GR_RETURN(rv); #undef FN_NAME diff --git a/glide3x/h5/glide3/tests/Makefile.mgw b/glide3x/h5/glide3/tests/Makefile.mgw index eaeaa1e..9ba6b31 100644 --- a/glide3x/h5/glide3/tests/Makefile.mgw +++ b/glide3x/h5/glide3/tests/Makefile.mgw @@ -1,54 +1,57 @@ -# MinGW tests makefile for Glide3 -# -# Copyright (c) 2002 - Borca Daniel -# Email : dborca@yahoo.com -# Web : http://www.geocities.com/dborca -# -# $Header$ +# MinGW tests makefile for Glide3 +# +# Copyright (c) 2002 - Borca Daniel +# Email : dborca@yahoo.com +# Web : http://www.geocities.com/dborca +# +# $Header$ # $Log$ +# Revision 1.1.2.3 2003/07/01 11:13:34 dborca +# enabled NAPALM for tests +# # Revision 1.1.2.2 2003/06/13 07:22:59 dborca # more fixes to NASM sources # # Revision 1.1.2.1 2003/06/07 09:53:25 dborca # initial checkin for NASM sources -# - - -# -# Available options: -# -# Environment variables: -# CPU optimize for the given processor. -# default = k6 -# -# Targets: -# build a specific file -# - - -.PHONY: all -.SUFFIXES: .c .o .exe -.SECONDARY: tlib.o - -FX_GLIDE_HW = h5 -TOP = ../../.. -CPU ?= k6 - -CC = mingw32-gcc -CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU) -CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc -CFLAGS += -I$(TOP)/swlibs/fxmisc -CFLAGS += -D__WIN32__ -DH3 +# + + +# +# Available options: +# +# Environment variables: +# CPU optimize for the given processor. +# default = k6 +# +# Targets: +# build a specific file +# + + +.PHONY: all +.SUFFIXES: .c .o .exe +.SECONDARY: tlib.o + +FX_GLIDE_HW = h5 +TOP = ../../.. +CPU ?= k6 + +CC = mingw32-gcc +CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU) +CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc +CFLAGS += -I$(TOP)/swlibs/fxmisc +CFLAGS += -D__WIN32__ -DH3 CFLAGS += -DFX_GLIDE_NAPALM=1 - -LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib - -LDLIBS = -lgdi32 -lglide - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -%.exe: tlib.o %.o - $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) - -all: - $(error Must specify to build) + +LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib + +LDLIBS = -lgdi32 -lglide + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $< +%.exe: tlib.o %.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +all: + $(error Must specify to build) diff --git a/swlibs/glide_license.txt b/swlibs/glide_license.txt index 16be826..e8b53fe 100644 --- a/swlibs/glide_license.txt +++ b/swlibs/glide_license.txt @@ -1,255 +1,255 @@ -3DFX GLIDE Source Code General Public License - - -1. PREAMBLE - - This license is for software that provides a 3D graphics application - program interface (API).The license is intended to offer terms similar - to some standard General Public Licenses designed to foster open - standards and unrestricted accessibility to source code. Some of these - licenses require that, as a condition of the license of the software, - any derivative works (that is, new software which is a work containing - the original program or a portion of it) must be available for general - use, without restriction other than for a minor transfer fee, and that - the source code for such derivative works must likewise be made - available. The only restriction is that such derivative works must be - subject to the same General Public License terms as the original work. - - This 3dfx GLIDE Source Code General Public License differs from the - standard licenses of this type in that it does not require the entire - derivative work to be made available under the terms of this license - nor is the recipient required to make available the source code for - the entire derivative work. Rather, the license is limited to only the - identifiable portion of the derivative work that is derived from the - licensed software. The precise terms and conditions for copying, - distribution and modification follow. - - -2. DEFINITIONS - - 2.1 This License applies to any program (or other "work") which - contains a notice placed by the copyright holder saying it may be - distributed under the terms of this 3dfx GLIDE Source Code General - Public License. - - 2.2 The term "Program" as used in this Agreement refers to 3DFX's - GLIDE source code and object code and any Derivative Work. - - 2.3 "Derivative Work" means, for the purpose of the License, that - portion of any work that contains the Program or the identifiable - portion of a work that is derived from the Program, either verbatim or - with modifications and/or translated into another language, and that - performs 3D graphics API operations. It does not include any other - portions of a work. - - 2.4 "Modifications of the Program" means any work, which includes a - Derivative Work, and includes the whole of such work. - - 2.5 "License" means this 3dfx GLIDE Source Code General Public License. - - 2.6 The "Source Code" for a work means the preferred form of the work - for making modifications to it. For an executable work, complete source - code means all the source code for all modules it contains, any - associated interface definition files, and the scripts used to control - compilation and installation of the executable work. - - 2.7 "3dfx" means 3dfx Interactive, Inc. - - -3. LICENSED ACTIVITIES - - 3.1 COPYING - You may copy and distribute verbatim copies of the - Program's Source Code as you receive it, in any medium, subject to the - provision of section 3.3 and provided also that: - - (a) you conspicuously and appropriately publish on each copy - an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice - that recipients who wish to copy, distribute or modify the Program can - only do so subject to this License, and a disclaimer of warranty as - set forth in section 5; - - (b) keep intact all the notices that refer to this License and - to the absence of any warranty; and - - (c) do not make any use of the GLIDE trademark without the prior - written permission of 3dfx, and - - (d) give all recipients of the Program a copy of this License - along with the Program or instructions on how to easily receive a copy - of this License. - - - 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your - copy or copies of the Program or any portion of it, and copy and - distribute such modifications subject to the provisions of section 3.3 - and provided that you also meet all of the following conditions: - - (a) you conspicuously and appropriately publish on each copy - of a Derivative Work an appropriate copyright notice, a notice that - recipients who wish to copy, distribute or modify the Derivative Work - can only do so subject to this License, and a disclaimer of warranty - as set forth in section 5; - - (b) keep intact all the notices that refer to this License and - to the absence of any warranty; and - - (c) give all recipients of the Derivative Work a copy of this - License along with the Derivative Work or instructions on how to easily - receive a copy of this License. - - (d) You must cause the modified files of the Derivative Work - to carry prominent notices stating that you changed the files and the - date of any change. - - (e) You must cause any Derivative Work that you distribute or - publish to be licensed at no charge to all third parties under the - terms of this License. - - (f) You do not make any use of the GLIDE trademark without the - prior written permission of 3dfx. - - (g) If the Derivative Work normally reads commands - interactively when run, you must cause it, when started running for - such interactive use, to print or display an announcement as follows: - - "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS - SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, - EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE - TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, - INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE - DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM - INFO@3DFX.COM)." - - (h) The requirements of this section 3.2 do not apply to the - modified work as a whole but only to the Derivative Work. It is not - the intent of this License to claim rights or contest your rights to - work written entirely by you; rather, the intent is to exercise the - right to control the distribution of Derivative Works. - - - 3.3 DISTRIBUTION - - (a) All copies of the Program or Derivative Works which are - distributed must include in the file headers the following language - verbatim: - - "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED - ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO - RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF - 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM - THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). - THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER - EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A - FULL TEXT OF THE NON-WARRANTY PROVISIONS. - - USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO - RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS - IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, - AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR - SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF - THE UNITED STATES. - - COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" - - (b) You may distribute the Program or a Derivative Work in - object code or executable form under the terms of Sections 3.1 and 3.2 - provided that you also do one of the following: - - (1) Accompany it with the complete corresponding - machine-readable source code, which must be distributed under the - terms of Sections 3.1 and 3.2; or, - - (2) Accompany it with a written offer, valid for at - least three years, to give any third party, for a charge no more than - your cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 3.1 and 3.2 on a medium - customarily used for software interchange; or, - - (3) Accompany it with the information you received as - to the offer to distribute corresponding source code. (This alternative - is allowed only for noncommercial distribution and only if you received - the program in object code or executable form with such an offer, in - accord with Subsection 3.3(b)(2) above.) - - (c) The source code distributed need not include anything - that is normally distributed (in either source or binary form) with - the major components (compiler, kernel, and so on) of the operating - system on which the executable runs, unless that component itself - accompanies the executable code. - - (d) If distribution of executable code or object code is made - by offering access to copy from a designated place, then offering - equivalent access to copy the source code from the same place counts - as distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - (e) Each time you redistribute the Program or any Derivative - Work, the recipient automatically receives a license from 3dfx and - successor licensors to copy, distribute or modify the Program and - Derivative Works subject to the terms and conditions of the License. - You may not impose any further restrictions on the recipients' - exercise of the rights granted herein. You are not responsible for - enforcing compliance by third parties to this License. - - (f) You may not make any use of the GLIDE trademark without - the prior written permission of 3dfx. - - (g) You may not copy, modify, sublicense, or distribute the - Program or any Derivative Works except as expressly provided under - this License. Any attempt otherwise to copy, modify, sublicense or - distribute the Program or any Derivative Works is void, and will - automatically terminate your rights under this License. However, - parties who have received copies, or rights, from you under this - License will not have their licenses terminated so long as such - parties remain in full compliance. - - -4. MISCELLANEOUS - - 4.1 Acceptance of this License is voluntary. By using, modifying or - distributing the Program or any Derivative Work, you indicate your - acceptance of this License to do so, and all its terms and conditions - for copying, distributing or modifying the Program or works based on - it. Nothing else grants you permission to modify or distribute the - Program or Derivative Works and doing so without acceptance of this - License is in violation of the U.S. and international copyright laws. - - 4.2 If the distribution and/or use of the Program or Derivative Works - is restricted in certain countries either by patents or by copyrighted - interfaces, the original copyright holder who places the Program under - this License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only in - or among countries not thus excluded. In such case, this License - incorporates the limitation as if written in the body of this License. - - 4.3 This License is to be construed according to the laws of the - State of California and you consent to personal jurisdiction in the - State of California in the event it is necessary to enforce the - provisions of this License. - - -5. NO WARRANTIES - - 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY - FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY - AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. - SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME - THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX - INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY - WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS - PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, - SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT - LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES - SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR - DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH - HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. - +3DFX GLIDE Source Code General Public License + + +1. PREAMBLE + + This license is for software that provides a 3D graphics application + program interface (API).The license is intended to offer terms similar + to some standard General Public Licenses designed to foster open + standards and unrestricted accessibility to source code. Some of these + licenses require that, as a condition of the license of the software, + any derivative works (that is, new software which is a work containing + the original program or a portion of it) must be available for general + use, without restriction other than for a minor transfer fee, and that + the source code for such derivative works must likewise be made + available. The only restriction is that such derivative works must be + subject to the same General Public License terms as the original work. + + This 3dfx GLIDE Source Code General Public License differs from the + standard licenses of this type in that it does not require the entire + derivative work to be made available under the terms of this license + nor is the recipient required to make available the source code for + the entire derivative work. Rather, the license is limited to only the + identifiable portion of the derivative work that is derived from the + licensed software. The precise terms and conditions for copying, + distribution and modification follow. + + +2. DEFINITIONS + + 2.1 This License applies to any program (or other "work") which + contains a notice placed by the copyright holder saying it may be + distributed under the terms of this 3dfx GLIDE Source Code General + Public License. + + 2.2 The term "Program" as used in this Agreement refers to 3DFX's + GLIDE source code and object code and any Derivative Work. + + 2.3 "Derivative Work" means, for the purpose of the License, that + portion of any work that contains the Program or the identifiable + portion of a work that is derived from the Program, either verbatim or + with modifications and/or translated into another language, and that + performs 3D graphics API operations. It does not include any other + portions of a work. + + 2.4 "Modifications of the Program" means any work, which includes a + Derivative Work, and includes the whole of such work. + + 2.5 "License" means this 3dfx GLIDE Source Code General Public License. + + 2.6 The "Source Code" for a work means the preferred form of the work + for making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, any + associated interface definition files, and the scripts used to control + compilation and installation of the executable work. + + 2.7 "3dfx" means 3dfx Interactive, Inc. + + +3. LICENSED ACTIVITIES + + 3.1 COPYING - You may copy and distribute verbatim copies of the + Program's Source Code as you receive it, in any medium, subject to the + provision of section 3.3 and provided also that: + + (a) you conspicuously and appropriately publish on each copy + an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice + that recipients who wish to copy, distribute or modify the Program can + only do so subject to this License, and a disclaimer of warranty as + set forth in section 5; + + (b) keep intact all the notices that refer to this License and + to the absence of any warranty; and + + (c) do not make any use of the GLIDE trademark without the prior + written permission of 3dfx, and + + (d) give all recipients of the Program a copy of this License + along with the Program or instructions on how to easily receive a copy + of this License. + + + 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your + copy or copies of the Program or any portion of it, and copy and + distribute such modifications subject to the provisions of section 3.3 + and provided that you also meet all of the following conditions: + + (a) you conspicuously and appropriately publish on each copy + of a Derivative Work an appropriate copyright notice, a notice that + recipients who wish to copy, distribute or modify the Derivative Work + can only do so subject to this License, and a disclaimer of warranty + as set forth in section 5; + + (b) keep intact all the notices that refer to this License and + to the absence of any warranty; and + + (c) give all recipients of the Derivative Work a copy of this + License along with the Derivative Work or instructions on how to easily + receive a copy of this License. + + (d) You must cause the modified files of the Derivative Work + to carry prominent notices stating that you changed the files and the + date of any change. + + (e) You must cause any Derivative Work that you distribute or + publish to be licensed at no charge to all third parties under the + terms of this License. + + (f) You do not make any use of the GLIDE trademark without the + prior written permission of 3dfx. + + (g) If the Derivative Work normally reads commands + interactively when run, you must cause it, when started running for + such interactive use, to print or display an announcement as follows: + + "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS + SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, + EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE + TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, + INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE + DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM + INFO@3DFX.COM)." + + (h) The requirements of this section 3.2 do not apply to the + modified work as a whole but only to the Derivative Work. It is not + the intent of this License to claim rights or contest your rights to + work written entirely by you; rather, the intent is to exercise the + right to control the distribution of Derivative Works. + + + 3.3 DISTRIBUTION + + (a) All copies of the Program or Derivative Works which are + distributed must include in the file headers the following language + verbatim: + + "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED + ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO + RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF + 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM + THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). + THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER + EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A + FULL TEXT OF THE NON-WARRANTY PROVISIONS. + + USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO + RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS + IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, + AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR + SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF + THE UNITED STATES. + + COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" + + (b) You may distribute the Program or a Derivative Work in + object code or executable form under the terms of Sections 3.1 and 3.2 + provided that you also do one of the following: + + (1) Accompany it with the complete corresponding + machine-readable source code, which must be distributed under the + terms of Sections 3.1 and 3.2; or, + + (2) Accompany it with a written offer, valid for at + least three years, to give any third party, for a charge no more than + your cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 3.1 and 3.2 on a medium + customarily used for software interchange; or, + + (3) Accompany it with the information you received as + to the offer to distribute corresponding source code. (This alternative + is allowed only for noncommercial distribution and only if you received + the program in object code or executable form with such an offer, in + accord with Subsection 3.3(b)(2) above.) + + (c) The source code distributed need not include anything + that is normally distributed (in either source or binary form) with + the major components (compiler, kernel, and so on) of the operating + system on which the executable runs, unless that component itself + accompanies the executable code. + + (d) If distribution of executable code or object code is made + by offering access to copy from a designated place, then offering + equivalent access to copy the source code from the same place counts + as distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + (e) Each time you redistribute the Program or any Derivative + Work, the recipient automatically receives a license from 3dfx and + successor licensors to copy, distribute or modify the Program and + Derivative Works subject to the terms and conditions of the License. + You may not impose any further restrictions on the recipients' + exercise of the rights granted herein. You are not responsible for + enforcing compliance by third parties to this License. + + (f) You may not make any use of the GLIDE trademark without + the prior written permission of 3dfx. + + (g) You may not copy, modify, sublicense, or distribute the + Program or any Derivative Works except as expressly provided under + this License. Any attempt otherwise to copy, modify, sublicense or + distribute the Program or any Derivative Works is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + +4. MISCELLANEOUS + + 4.1 Acceptance of this License is voluntary. By using, modifying or + distributing the Program or any Derivative Work, you indicate your + acceptance of this License to do so, and all its terms and conditions + for copying, distributing or modifying the Program or works based on + it. Nothing else grants you permission to modify or distribute the + Program or Derivative Works and doing so without acceptance of this + License is in violation of the U.S. and international copyright laws. + + 4.2 If the distribution and/or use of the Program or Derivative Works + is restricted in certain countries either by patents or by copyrighted + interfaces, the original copyright holder who places the Program under + this License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only in + or among countries not thus excluded. In such case, this License + incorporates the limitation as if written in the body of this License. + + 4.3 This License is to be construed according to the laws of the + State of California and you consent to personal jurisdiction in the + State of California in the event it is necessary to enforce the + provisions of this License. + + +5. NO WARRANTIES + + 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY + FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY + AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. + SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX + INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY + WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS + PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, + SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT + LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES + SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR + DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH + HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + diff --git a/swlibs/newpci/pcilib/fxfreebsd.c b/swlibs/newpci/pcilib/fxfreebsd.c index 2437ac5..c039a00 100644 --- a/swlibs/newpci/pcilib/fxfreebsd.c +++ b/swlibs/newpci/pcilib/fxfreebsd.c @@ -1,365 +1,365 @@ -/* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX -** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE -** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). -** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A -** FULL TEXT OF THE NON-WARRANTY PROVISIONS. -** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF -** THE UNITED STATES. -** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED -*/ - -#include -#include -#include <3dfx.h> -#include -#include -#include -#include -#include -#include -#include -#include "fxpci.h" -#include "pcilib.h" - -static const char* pciIdentifyFreeBSD(void); -static FxBool pciOutputStringFreeBSD(const char *msg); -static FxBool pciInitializeFreeBSD(void); -static FxBool pciShutdownFreeBSD(void); -static FxBool pciMapLinearFreeBSD(FxU32, FxU32 physical_addr, FxU32 *linear_addr, - FxU32 *length); -static FxBool pciUnmapLinearFreeBSD(FxU32 linear_addr, FxU32 length); -static FxBool pciSetPermissionFreeBSD(const FxU32, const FxU32, const FxBool); -static FxU8 pciPortInByteFreeBSD(unsigned short port); -static FxU16 pciPortInWordFreeBSD(unsigned short port); -static FxU32 pciPortInLongFreeBSD(unsigned short port); -static FxBool pciPortOutByteFreeBSD(unsigned short port, FxU8 data); -static FxBool pciPortOutWordFreeBSD(unsigned short port, FxU16 data); -static FxBool pciPortOutLongFreeBSD(unsigned short port, FxU32 data); -static FxBool pciMsrGetFreeBSD(MSRInfo *, MSRInfo *); -static FxBool pciMsrSetFreeBSD(MSRInfo *, MSRInfo *); -static FxBool pciSetPassThroughBaseFreeBSD(FxU32 *, FxU32); - -const FxPlatformIOProcs ioProcsFreeBSD = { - pciInitializeFreeBSD, - pciShutdownFreeBSD, - pciIdentifyFreeBSD, - - pciPortInByteFreeBSD, - pciPortInWordFreeBSD, - pciPortInLongFreeBSD, - - pciPortOutByteFreeBSD, - pciPortOutWordFreeBSD, - pciPortOutLongFreeBSD, - - pciMapLinearFreeBSD, - pciUnmapLinearFreeBSD, - pciSetPermissionFreeBSD, - - pciMsrGetFreeBSD, - pciMsrSetFreeBSD, - - pciOutputStringFreeBSD, - pciSetPassThroughBaseFreeBSD -}; - -const FxU32 PCI_VENDOR_ID_FREEBSD = 0x0; -const FxU32 PCI_DEVICE_ID_FREEBSD = 0x2; -const FxU32 PCI_COMMAND_FREEBSD = 0x4; -const FxU32 PCI_BASE_ADDRESS_0_FREEBSD = 0x10; -const FxU32 SST1_PCI_INIT_ENABLE_FREEBSD = 0x40; -const FxU32 SST1_PCI_BUS_SNOOP0_FREEBSD = 0x44; -const FxU32 SST1_PCI_BUS_SNOOP1_FREEBSD = 0x48; - -static int freebsdDevFd=-1; -static int freebsdIoFd=-1; - -struct pioData { - short port; - short size; - int device; - void *value; -}; - -FxBool -pciPlatformInit(void) -{ - gCurPlatformIO = &ioProcsFreeBSD; - return FXTRUE; -} - -FxBool -hasDev3DfxLinux(void) -{ - if (freebsdDevFd==-1) return FXFALSE; - return FXTRUE; -} - -FxU32 -pciFetchRegisterLinux(FxU32 cmd, FxU32 size, FxU32 device) -{ - struct pioData desc; - char cval; - short sval; - int ival; - - if (freebsdDevFd==-1) return -1; - desc.port=cmd; - desc.size=size; - desc.device=device; - switch (size) { - case 1: - desc.value=&cval; - break; - case 2: - desc.value=&sval; - break; - case 4: - desc.value=&ival; - break; - default: - return 0; - } - if (ioctl(freebsdDevFd, _IOR('3', 3, sizeof(struct pioData)), &desc)==-1) - return 0; - switch (size) { - case 1: - return cval; - case 2: - return sval; - case 4: - return ival; - default: - return 0; - } -} - -FxBool -pciUpdateRegisterLinux(FxU32 cmd, FxU32 data, FxU32 size, FxU32 device) -{ - struct pioData desc; - - if (freebsdDevFd==-1) return -1; - desc.port=cmd; - desc.size=size; - desc.device=device; - desc.value=&data; - if (ioctl(freebsdDevFd, _IOW('3', 4, sizeof(struct pioData)), &desc)==-1) - return FXFALSE; - return FXTRUE; -} - -int -getNumDevicesLinux(void) -{ - if (freebsdDevFd==-1) return -1; - return ioctl(freebsdDevFd, _IO('3', 2)); -} - -static const char* -pciIdentifyFreeBSD(void) -{ - return "fxPCI for FreeBSD"; -} - -static FxBool -pciOutputStringFreeBSD(const char *msg) -{ - printf(msg); - return FXTRUE; -} - -static FxBool -pciInitializeFreeBSD(void) -{ - if (geteuid()) freebsdDevFd=open("/dev/3dfx", O_RDWR, 0); - if (freebsdDevFd==-1) { - freebsdIoFd=open("/dev/io", O_RDWR, 0); - if (freebsdIoFd<0) { - pciErrorCode = PCI_ERR_NO_IO_PERM; - return FXFALSE; - } - } - return FXTRUE; -} - -static FxBool -pciShutdownFreeBSD(void) -{ - if (freebsdDevFd!=-1) close(freebsdDevFd); - freebsdDevFd=-1; - if (freebsdIoFd!=-1) close(freebsdIoFd); - freebsdIoFd=-1; - return FXTRUE; -} - -static FxBool -pciMapLinearFreeBSD(FxU32 bus, FxU32 physical_addr, - FxU32 *linear_addr, FxU32 *length) -{ - int fd; - if (freebsdDevFd!=-1) { - fd=freebsdDevFd; - } else { - if ((fd=open("/dev/mem", O_RDWR))<0) { - pciErrorCode=PCI_ERR_NO_MEM_PERM; - return FXFALSE; - } - } - if (((*linear_addr)=(FxU32)mmap(0, *length, PROT_READ|PROT_WRITE, - MAP_SHARED, fd, physical_addr))<0) { - if (fd!=freebsdDevFd) close(fd); - return FXFALSE; - } - if (fd!=freebsdDevFd) close(fd); - return FXTRUE; -} - -static FxBool -pciUnmapLinearFreeBSD( FxU32 linear_addr, FxU32 length ) { - munmap((void*)linear_addr, length); - return FXTRUE; -} - -static FxBool -pciSetPermissionFreeBSD(const FxU32 addrBase, const FxU32 addrLen, - const FxBool writePermP) -{ - return FXTRUE; -} - -static FxU8 -pciPortInByteFreeBSD(unsigned short port) -{ - char tmp; - struct pioData desc; - - if (freebsdDevFd==-1) { - tmp=inb(port); - /* fprintf(stderr, "Read byte at %x got %d\n", port, tmp); */ - return tmp; - } - desc.port=port; - desc.size=sizeof(tmp); - desc.value=&tmp; - /* fprintf(stderr, "Read byte desc at %x tmp at %x\n", &desc, &tmp); */ - ioctl(freebsdDevFd, _IOR(0, 0, sizeof(struct pioData)), &desc); - /* fprintf(stderr, "Got byte %d versus %d\n", tmp, inb(port)); */ - return tmp; -} - -static FxU16 -pciPortInWordFreeBSD(unsigned short port) -{ - short tmp; - struct pioData desc; - - if (freebsdDevFd==-1) { - tmp=inw(port); - /* fprintf(stderr, "Read word at %x got %x\n", port, tmp); */ - return tmp; - } - desc.port=port; - desc.size=sizeof(tmp); - desc.value=&tmp; - /* fprintf(stderr, "Read word desc at %x tmp at %x\n", &desc, &tmp); */ - ioctl(freebsdDevFd, _IOR(0, 0, sizeof(struct pioData)), &desc); - /* fprintf(stderr, "Got word %d versus %d\n", tmp, inw(port)); */ - return tmp; -} - -static FxU32 -pciPortInLongFreeBSD(unsigned short port) -{ - int tmp; - struct pioData desc; - - if (freebsdDevFd==-1) { - tmp=inl(port); - /* fprintf(stderr, "Read long at %x got %x\n", port, tmp); */ - return tmp; - } - desc.port=port; - desc.size=sizeof(tmp); - desc.value=&tmp; - /* fprintf(stderr, "Read long desc at %x tmp at %x\n", &desc, &tmp); */ - ioctl(freebsdDevFd, _IOR(0, 0, sizeof(struct pioData)), &desc); - /* fprintf(stderr, "Got long %x versus %x\n", tmp, inl(port)); */ - return tmp; -} - -static FxBool -pciPortOutByteFreeBSD(unsigned short port, FxU8 data) -{ - struct pioData desc; - /* fprintf(stderr, "write byte=%d desc at %x data at %x\n", data, - &desc, &data); */ - if (freebsdDevFd==-1) { - outb(port, data); - return FXTRUE; - } - desc.port=port; - desc.size=sizeof(data); - desc.value=&data; - return ioctl(freebsdDevFd, _IOW(0, 1, sizeof(struct pioData)), &desc)!=-1; -} - -static FxBool -pciPortOutWordFreeBSD(unsigned short port, FxU16 data) -{ - struct pioData desc; - /* fprintf(stderr, "write word=%x to port=%x desc at %x data at %x\n", - data, port, &desc, &data); */ - if (freebsdDevFd==-1) { - outw(port, data); - return FXTRUE; - } - desc.port=port; - desc.size=sizeof(data); - desc.value=&data; - return ioctl(freebsdDevFd, _IOW(0, 1, sizeof(struct pioData)), &desc)!=-1; -} - -static FxBool -pciPortOutLongFreeBSD(unsigned short port, FxU32 data) -{ - struct pioData desc; - /* fprintf(stderr, "write long=%x to port=%x desc at %x data at %x\n", - data, port, &desc, &data); */ - if (freebsdDevFd==-1) { - outl(port, data); - return FXTRUE; - } - desc.port=port; - desc.size=sizeof(data); - desc.value=&data; - return ioctl(freebsdDevFd, _IOW(0, 1, sizeof(struct pioData)), &desc)!=-1; -} - -static FxBool -pciMsrGetFreeBSD(MSRInfo *in, MSRInfo *out) -{ - return FXTRUE; -} - -static FxBool -pciMsrSetFreeBSD(MSRInfo *in, MSRInfo *out) -{ - return FXTRUE; -} - -static FxBool -pciSetPassThroughBaseFreeBSD(FxU32 *baseAddr, FxU32 baseAddrLen) -{ - return FXTRUE; -} +/* +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE +** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). +** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** FULL TEXT OF THE NON-WARRANTY PROVISIONS. +** +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** THE UNITED STATES. +** +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +*/ + +#include +#include +#include <3dfx.h> +#include +#include +#include +#include +#include +#include +#include +#include "fxpci.h" +#include "pcilib.h" + +static const char* pciIdentifyFreeBSD(void); +static FxBool pciOutputStringFreeBSD(const char *msg); +static FxBool pciInitializeFreeBSD(void); +static FxBool pciShutdownFreeBSD(void); +static FxBool pciMapLinearFreeBSD(FxU32, FxU32 physical_addr, FxU32 *linear_addr, + FxU32 *length); +static FxBool pciUnmapLinearFreeBSD(FxU32 linear_addr, FxU32 length); +static FxBool pciSetPermissionFreeBSD(const FxU32, const FxU32, const FxBool); +static FxU8 pciPortInByteFreeBSD(unsigned short port); +static FxU16 pciPortInWordFreeBSD(unsigned short port); +static FxU32 pciPortInLongFreeBSD(unsigned short port); +static FxBool pciPortOutByteFreeBSD(unsigned short port, FxU8 data); +static FxBool pciPortOutWordFreeBSD(unsigned short port, FxU16 data); +static FxBool pciPortOutLongFreeBSD(unsigned short port, FxU32 data); +static FxBool pciMsrGetFreeBSD(MSRInfo *, MSRInfo *); +static FxBool pciMsrSetFreeBSD(MSRInfo *, MSRInfo *); +static FxBool pciSetPassThroughBaseFreeBSD(FxU32 *, FxU32); + +const FxPlatformIOProcs ioProcsFreeBSD = { + pciInitializeFreeBSD, + pciShutdownFreeBSD, + pciIdentifyFreeBSD, + + pciPortInByteFreeBSD, + pciPortInWordFreeBSD, + pciPortInLongFreeBSD, + + pciPortOutByteFreeBSD, + pciPortOutWordFreeBSD, + pciPortOutLongFreeBSD, + + pciMapLinearFreeBSD, + pciUnmapLinearFreeBSD, + pciSetPermissionFreeBSD, + + pciMsrGetFreeBSD, + pciMsrSetFreeBSD, + + pciOutputStringFreeBSD, + pciSetPassThroughBaseFreeBSD +}; + +const FxU32 PCI_VENDOR_ID_FREEBSD = 0x0; +const FxU32 PCI_DEVICE_ID_FREEBSD = 0x2; +const FxU32 PCI_COMMAND_FREEBSD = 0x4; +const FxU32 PCI_BASE_ADDRESS_0_FREEBSD = 0x10; +const FxU32 SST1_PCI_INIT_ENABLE_FREEBSD = 0x40; +const FxU32 SST1_PCI_BUS_SNOOP0_FREEBSD = 0x44; +const FxU32 SST1_PCI_BUS_SNOOP1_FREEBSD = 0x48; + +static int freebsdDevFd=-1; +static int freebsdIoFd=-1; + +struct pioData { + short port; + short size; + int device; + void *value; +}; + +FxBool +pciPlatformInit(void) +{ + gCurPlatformIO = &ioProcsFreeBSD; + return FXTRUE; +} + +FxBool +hasDev3DfxLinux(void) +{ + if (freebsdDevFd==-1) return FXFALSE; + return FXTRUE; +} + +FxU32 +pciFetchRegisterLinux(FxU32 cmd, FxU32 size, FxU32 device) +{ + struct pioData desc; + char cval; + short sval; + int ival; + + if (freebsdDevFd==-1) return -1; + desc.port=cmd; + desc.size=size; + desc.device=device; + switch (size) { + case 1: + desc.value=&cval; + break; + case 2: + desc.value=&sval; + break; + case 4: + desc.value=&ival; + break; + default: + return 0; + } + if (ioctl(freebsdDevFd, _IOR('3', 3, sizeof(struct pioData)), &desc)==-1) + return 0; + switch (size) { + case 1: + return cval; + case 2: + return sval; + case 4: + return ival; + default: + return 0; + } +} + +FxBool +pciUpdateRegisterLinux(FxU32 cmd, FxU32 data, FxU32 size, FxU32 device) +{ + struct pioData desc; + + if (freebsdDevFd==-1) return -1; + desc.port=cmd; + desc.size=size; + desc.device=device; + desc.value=&data; + if (ioctl(freebsdDevFd, _IOW('3', 4, sizeof(struct pioData)), &desc)==-1) + return FXFALSE; + return FXTRUE; +} + +int +getNumDevicesLinux(void) +{ + if (freebsdDevFd==-1) return -1; + return ioctl(freebsdDevFd, _IO('3', 2)); +} + +static const char* +pciIdentifyFreeBSD(void) +{ + return "fxPCI for FreeBSD"; +} + +static FxBool +pciOutputStringFreeBSD(const char *msg) +{ + printf(msg); + return FXTRUE; +} + +static FxBool +pciInitializeFreeBSD(void) +{ + if (geteuid()) freebsdDevFd=open("/dev/3dfx", O_RDWR, 0); + if (freebsdDevFd==-1) { + freebsdIoFd=open("/dev/io", O_RDWR, 0); + if (freebsdIoFd<0) { + pciErrorCode = PCI_ERR_NO_IO_PERM; + return FXFALSE; + } + } + return FXTRUE; +} + +static FxBool +pciShutdownFreeBSD(void) +{ + if (freebsdDevFd!=-1) close(freebsdDevFd); + freebsdDevFd=-1; + if (freebsdIoFd!=-1) close(freebsdIoFd); + freebsdIoFd=-1; + return FXTRUE; +} + +static FxBool +pciMapLinearFreeBSD(FxU32 bus, FxU32 physical_addr, + FxU32 *linear_addr, FxU32 *length) +{ + int fd; + if (freebsdDevFd!=-1) { + fd=freebsdDevFd; + } else { + if ((fd=open("/dev/mem", O_RDWR))<0) { + pciErrorCode=PCI_ERR_NO_MEM_PERM; + return FXFALSE; + } + } + if (((*linear_addr)=(FxU32)mmap(0, *length, PROT_READ|PROT_WRITE, + MAP_SHARED, fd, physical_addr))<0) { + if (fd!=freebsdDevFd) close(fd); + return FXFALSE; + } + if (fd!=freebsdDevFd) close(fd); + return FXTRUE; +} + +static FxBool +pciUnmapLinearFreeBSD( FxU32 linear_addr, FxU32 length ) { + munmap((void*)linear_addr, length); + return FXTRUE; +} + +static FxBool +pciSetPermissionFreeBSD(const FxU32 addrBase, const FxU32 addrLen, + const FxBool writePermP) +{ + return FXTRUE; +} + +static FxU8 +pciPortInByteFreeBSD(unsigned short port) +{ + char tmp; + struct pioData desc; + + if (freebsdDevFd==-1) { + tmp=inb(port); + /* fprintf(stderr, "Read byte at %x got %d\n", port, tmp); */ + return tmp; + } + desc.port=port; + desc.size=sizeof(tmp); + desc.value=&tmp; + /* fprintf(stderr, "Read byte desc at %x tmp at %x\n", &desc, &tmp); */ + ioctl(freebsdDevFd, _IOR(0, 0, sizeof(struct pioData)), &desc); + /* fprintf(stderr, "Got byte %d versus %d\n", tmp, inb(port)); */ + return tmp; +} + +static FxU16 +pciPortInWordFreeBSD(unsigned short port) +{ + short tmp; + struct pioData desc; + + if (freebsdDevFd==-1) { + tmp=inw(port); + /* fprintf(stderr, "Read word at %x got %x\n", port, tmp); */ + return tmp; + } + desc.port=port; + desc.size=sizeof(tmp); + desc.value=&tmp; + /* fprintf(stderr, "Read word desc at %x tmp at %x\n", &desc, &tmp); */ + ioctl(freebsdDevFd, _IOR(0, 0, sizeof(struct pioData)), &desc); + /* fprintf(stderr, "Got word %d versus %d\n", tmp, inw(port)); */ + return tmp; +} + +static FxU32 +pciPortInLongFreeBSD(unsigned short port) +{ + int tmp; + struct pioData desc; + + if (freebsdDevFd==-1) { + tmp=inl(port); + /* fprintf(stderr, "Read long at %x got %x\n", port, tmp); */ + return tmp; + } + desc.port=port; + desc.size=sizeof(tmp); + desc.value=&tmp; + /* fprintf(stderr, "Read long desc at %x tmp at %x\n", &desc, &tmp); */ + ioctl(freebsdDevFd, _IOR(0, 0, sizeof(struct pioData)), &desc); + /* fprintf(stderr, "Got long %x versus %x\n", tmp, inl(port)); */ + return tmp; +} + +static FxBool +pciPortOutByteFreeBSD(unsigned short port, FxU8 data) +{ + struct pioData desc; + /* fprintf(stderr, "write byte=%d desc at %x data at %x\n", data, + &desc, &data); */ + if (freebsdDevFd==-1) { + outb(port, data); + return FXTRUE; + } + desc.port=port; + desc.size=sizeof(data); + desc.value=&data; + return ioctl(freebsdDevFd, _IOW(0, 1, sizeof(struct pioData)), &desc)!=-1; +} + +static FxBool +pciPortOutWordFreeBSD(unsigned short port, FxU16 data) +{ + struct pioData desc; + /* fprintf(stderr, "write word=%x to port=%x desc at %x data at %x\n", + data, port, &desc, &data); */ + if (freebsdDevFd==-1) { + outw(port, data); + return FXTRUE; + } + desc.port=port; + desc.size=sizeof(data); + desc.value=&data; + return ioctl(freebsdDevFd, _IOW(0, 1, sizeof(struct pioData)), &desc)!=-1; +} + +static FxBool +pciPortOutLongFreeBSD(unsigned short port, FxU32 data) +{ + struct pioData desc; + /* fprintf(stderr, "write long=%x to port=%x desc at %x data at %x\n", + data, port, &desc, &data); */ + if (freebsdDevFd==-1) { + outl(port, data); + return FXTRUE; + } + desc.port=port; + desc.size=sizeof(data); + desc.value=&data; + return ioctl(freebsdDevFd, _IOW(0, 1, sizeof(struct pioData)), &desc)!=-1; +} + +static FxBool +pciMsrGetFreeBSD(MSRInfo *in, MSRInfo *out) +{ + return FXTRUE; +} + +static FxBool +pciMsrSetFreeBSD(MSRInfo *in, MSRInfo *out) +{ + return FXTRUE; +} + +static FxBool +pciSetPassThroughBaseFreeBSD(FxU32 *baseAddr, FxU32 baseAddrLen) +{ + return FXTRUE; +}