From a614dd717420b3713f629f8eabe5607c550dedcd Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 26 Nov 2008 13:12:45 +0000 Subject: [PATCH] (svn r14636) -Add: DOS port of OpenTTD, without network support though. --- Makefile.bundle.in | 6 + Makefile.in | 1 + Makefile.src.in | 4 + config.lib | 40 +- configure | 2 +- os/dos/copying | 339 +++++++++++++++++ os/dos/copying.dj | 48 +++ os/dos/copying.lib | 481 ++++++++++++++++++++++++ os/dos/cwsdpmi.exe | Bin 0 -> 20125 bytes os/dos/cwsdpmi.txt | 173 +++++++++ os/dos/cwsdstub.exe | Bin 0 -> 21504 bytes os/dos/exe2coff.c | 94 +++++ os/dos/make_dos_binary_selfcontained.sh | 9 + readme.txt | 17 +- source.list | 5 +- src/fileio.cpp | 8 +- src/intro_gui.cpp | 2 + src/lang/english.txt | 1 + src/os_timer.cpp | 2 +- src/stdafx.h | 4 +- src/video/allegro_v.cpp | 18 +- 21 files changed, 1225 insertions(+), 29 deletions(-) create mode 100644 os/dos/copying create mode 100644 os/dos/copying.dj create mode 100644 os/dos/copying.lib create mode 100644 os/dos/cwsdpmi.exe create mode 100644 os/dos/cwsdpmi.txt create mode 100644 os/dos/cwsdstub.exe create mode 100644 os/dos/exe2coff.c create mode 100755 os/dos/make_dos_binary_selfcontained.sh diff --git a/Makefile.bundle.in b/Makefile.bundle.in index 998ffac895..f9625f80c0 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -83,6 +83,12 @@ ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/heightmaps/\"* 2>/dev/nul endif ifeq ($(TTD), openttd.exe) $(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt" +ifeq ($(OS), DOS) + $(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi.txt" "$(BUNDLE_DIR)/docs/" +ifndef STRIP + $(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi.exe" "$(TTD_DIR)/" +endif +endif endif ### Packing the current bundle into several compressed file formats ### diff --git a/Makefile.in b/Makefile.in index 9d004997ac..ed9532b48d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,6 +29,7 @@ INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)" INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!! INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!! BINARY_NAME = !!BINARY_NAME!! +STRIP = !!STRIP!! TTD = !!TTD!! TTDS = $(SRC_DIRS:%=%/$(TTD)) OS = !!OS!! diff --git a/Makefile.src.in b/Makefile.src.in index 7a1bb73844..d6d268d9af 100644 --- a/Makefile.src.in +++ b/Makefile.src.in @@ -259,6 +259,10 @@ else endif ifdef STRIP $(Q)$(STRIP) $@ +ifeq ($(OS), DOS) + $(E) '$(STAGE) Adding CWSDPMI stub to $@' + $(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@ +endif endif # The targets to compile the endian-code diff --git a/config.lib b/config.lib index a2352b2268..01b41b484e 100644 --- a/config.lib +++ b/config.lib @@ -446,10 +446,10 @@ check_params() { echo " PREPROCESSOR is only available for OSX" exit 1 fi - # OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP - if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP)$'`" ]; then + # OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP + if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then echo "configure: error: invalid option --os=$os" - echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP]" + echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]" exit 1 fi # cpu_type can be either 32 or 64 @@ -511,7 +511,7 @@ check_params() { detect_cputype if [ "$enable_static" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "DOS" ]; then enable_static="2" else enable_static="0" @@ -521,8 +521,8 @@ check_params() { if [ "$enable_static" != "0" ]; then log 1 "checking static... yes" - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "MORPHOS" ]; then - log 1 "WARNING: static is only known to work on Windows, MacOSX and MorphOS" + if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "DOS" ]; then + log 1 "WARNING: static is only known to work on Windows, DOS, MacOSX and MorphOS" log 1 "WARNING: use static at your own risk on this platform" sleep 5 @@ -532,7 +532,7 @@ check_params() { fi if [ "$enable_unicode" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ]; then enable_unicode="2" else enable_unicode="0" @@ -595,7 +595,10 @@ check_params() { fi fi - if [ "$enable_network" != "0" ]; then + if [ "$enable_network" = "1" ] && [ "$os" = "DOS" ]; then + log 1 "checking network... DOS, skipping" + enable_network=0 + elif [ "$enable_network" != "0" ]; then log 1 "checking network... found" else log 1 "checking network... disabled" @@ -747,6 +750,10 @@ check_params() { log 1 "checking ccache... $ccache" fi + if [ "$os" = "DOS" ]; then + with_threads="0" + fi + if [ "$os" != "OSX" ] && [ "$with_osx_sysroot" != "0" ]; then if [ "$with_osx_sysroot" = "1" ]; then with_osx_sysroot="0" @@ -897,7 +904,7 @@ check_params() { fi if [ "$personal_dir" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ] || [ "$os" = "DOS" ]; then personal_dir="OpenTTD" elif [ "$os" = "OSX" ]; then personal_dir="Documents/OpenTTD" @@ -1120,11 +1127,11 @@ make_cflags_and_ldflags() { fi fi - if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then + if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then LIBS="$LIBS -lpthread" fi - if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ] && [ "$os" != "WINCE" ]; then + if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ]; then LIBS="$LIBS -lc" fi if [ "$os" = "WINCE" ]; then @@ -1708,7 +1715,7 @@ detect_awk() { detect_os() { if [ "$os" = "DETECT" ]; then - # Detect UNIX, OSX, FREEBSD, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP + # Detect UNIX, OSX, FREEBSD, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP # Try first via dumpmachine, then via uname os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk ' @@ -1725,6 +1732,7 @@ detect_os() { /cygwin/ { print "CYGWIN"; exit} /mingw/ { print "MINGW"; exit} /os2/ { print "OS2"; exit} + /dos/ { print "DOS"; exit} /wince/ { print "WINCE"; exit} /psp/ { print "PSP"; exit} '` @@ -1749,7 +1757,7 @@ detect_os() { if [ -z "$os" ]; then log 1 "detecting OS... none detected" log 1 "I couldn't detect your OS. Please use --os=OS to force one" - log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP" + log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP" exit 1 fi @@ -1789,7 +1797,7 @@ detect_allegro() { # By default on OSX we don't use SDL. The rest is auto-detect if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then - log 1 "checking SDL... OSX, skipping" + log 1 "checking Allegro... OSX, skipping" allegro_config="" return 0 @@ -2021,6 +2029,8 @@ detect_library() { exit 1 fi + eval "with_$2=0" + return 0 fi @@ -2721,7 +2731,7 @@ showhelp() { echo " --os=OS the OS we are compiling for [DETECT]" echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/" echo " MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/" - echo " WINCE/PSP" + echo " DOS/WINCE/PSP" echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)" echo " --revision=rXXXX overwrite the revision detection." echo " Use with care!" diff --git a/configure b/configure index 6e8ff6cd76..60b67373c6 100755 --- a/configure +++ b/configure @@ -50,7 +50,7 @@ save_params make_cflags_and_ldflags EXE="" -if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "WINCE" ]; then +if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "DOS" ] || [ "$os" = "WINCE" ]; then EXE=".exe" fi diff --git a/os/dos/copying b/os/dos/copying new file mode 100644 index 0000000000..a43ea2126f --- /dev/null +++ b/os/dos/copying @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. 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 General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section 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 or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) 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 1 and 2 above on a medium + customarily used for software interchange; or, + + c) 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 b above.) + +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, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, 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. + +If distribution of executable 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. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program 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. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), 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. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. 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. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program 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. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM 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 (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 TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/os/dos/copying.dj b/os/dos/copying.dj new file mode 100644 index 0000000000..8a55047845 --- /dev/null +++ b/os/dos/copying.dj @@ -0,0 +1,48 @@ +This is the file "copying.dj". It does NOT apply to any sources or +binaries copyrighted by UCB Berkeley, the Free Software Foundation, or +any other agency besides DJ Delorie and others who have agreed to +allow their sources to be distributed under these terms. + + Copyright Information for sources and executables that are marked + Copyright (C) DJ Delorie + 7 Kim Lane + Rochester NH 03867-2954 + +This document is Copyright (C) DJ Delorie and may be distributed +verbatim, but changing it is not allowed. + +Source code copyright DJ Delorie is distributed under the terms of the +GNU General Public Licence, with the following exceptions: + +* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and + libemu.a are distributed under the terms of the GNU Library General + Public License, rather than the GNU GPL. + +* Any existing copyright or authorship information in any given source + file must remain intact. If you modify a source file, a notice to that + effect must be added to the authorship information in the source file. + +* Runtime binaries, as provided by DJ in DJGPP, may be distributed + without sources ONLY if the recipient is given sufficient information + to obtain a copy of djgpp themselves. This primarily applies to + go32-v2.exe, emu387.dxe, and stubedit.exe. + +* Runtime objects and libraries, as provided by DJ in DJGPP, when + linked into an application, may be distributed without sources ONLY + if the recipient is given sufficient information to obtain a copy of + djgpp themselves. This primarily applies to crt0.o and libc.a. + +----- + +Changes to source code copyright BSD, FSF, or others, by DJ Delorie +fall under the terms of the original copyright. Such files usually +have multiple copyright notices in them. + +A copy of the files "COPYING" and "COPYING.LIB" are included with this +document. If you did not receive a copy of these files, you may +obtain one from whence this document was obtained, or by writing: + + Free Software Foundation + 59 Temple Place - Suite 330 + Boston, MA 02111-1307 + USA diff --git a/os/dos/copying.lib b/os/dos/copying.lib new file mode 100644 index 0000000000..bbe3fe1987 --- /dev/null +++ b/os/dos/copying.lib @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section 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 or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of 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 satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +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. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library 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. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. 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. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/os/dos/cwsdpmi.exe b/os/dos/cwsdpmi.exe new file mode 100644 index 0000000000000000000000000000000000000000..17e3220023ca085fadf981932c9347247a9ac794 GIT binary patch literal 20125 zcmeHve|%KcweOxeCub%aefH0_*Is+?wbx!}9)9d)GMn5+EaV0Lg@{LuUZVZw<4Z@bWmQ&(Bfj-3 z8nN>@LS_Ifjf5-!vH=wd{{S{d5n?wHvOJ!Uvw&*?A?NiC{OC+V27wQNcYqdP2XI?5 zAxrKc#F4V!SG=sy`S1gl>U%8rt>5s&>a`Uvw`KNyb1ZjfWo23JE4D0K zwQkMRtJbZv%&rNC3RYLGU7uOKc6E7X`5Moh%vccf|Np+m0huGgHz!D$deYIrH=k}2 zj3oWMls}2o_4V7{l zZ%aRs-5I+4T3gn!nSm(MC-mEhw;6TywCffho7uKN;j`awvpp(Zkc#+YGiwstRAo|I z0exO#l!^qYjK=D-J0I_9`<^1VlZDEsNNmej{@z0~mGKXGP2Pv@O`1Tec|SfMXVFEx zubcCp9hDFx8FqATilaF^yiS-vxKqjn@42mc-PL@0w=yxh)AOIw@44UAb$PkGKWv=Y zPQ3mp-0A2}cZBy3UcW)=N$N)n!bTO=HtIfF$c z8A8R<7QWFgpdXiCTgf7u?NN#hs*8$~n#=ej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t!pY85(HRoq53LoBPS@1CEMm0Pum zSk|tyJo4~;3yEcw+fu%E!~B%0O?eivYE?ze{FF^mqY+vMgA*Z0X`hm*2m*)Usr$rFg+3k1SZSyfli0`B%Qi@-)WE zvJUKCwR&}VP0d=2Q6?HMuUTEac7uC;b&aKblWUcyhQ4_jMO3wTRrR{H>ni41R^#`@ zP;C8%@^zM)jjJ|T#I+dSl$t2AWW5$qvtiZh@|jU&8BJZYw&p2|=&7ng1R)K4;y3n$^g&Nv-)N73m>QwmKQ<38Y#e{91<A}vVqF5n@$$X(`cdk Qhm=$IKm2eB{<6q_0n{}T+5i9m literal 0 HcmV?d00001 diff --git a/os/dos/cwsdpmi.txt b/os/dos/cwsdpmi.txt new file mode 100644 index 0000000000..14b09c4d76 --- /dev/null +++ b/os/dos/cwsdpmi.txt @@ -0,0 +1,173 @@ +CWSDPMI is Copyright (C) 1995-2000 Charles W Sandmann (sandmann@clio.rice.edu) + 1206 Braelinn, Sugar Land, TX 77479 + +This is release 5. The files in this binary distribution may be redistributed +under the GPL (with source) or without the source code provided: + +* CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way except via CWSPARAM. + +* CWSDSTUB.EXE internal contents are not modified in any way except via + CWSPARAM or STUBEDIT. It may have a COFF image plus data appended to it. + +* Notice to users that they have the right to receive the source code and/or + binary updates for CWSDPMI. Distributors should indicate a site for the + source in their documentation. + +------------------------------------------------------------------------------- + +CWSDPMI was written to provide DPMI services for V2 of DJGPP. It currently +does not support 16-bit DPMI applications, or DPMI applications requiring a +built in extender. It does support virtual memory and hardware interrupt +reflection from real mode to protected mode. DJGPP V1.1x and RSX applications +will also run using this server, which can be used to provide enhanced control +over hardware interrupts. Some DPMI 1.0 extensions (0x506, 0x507, 0x508) have +been implemented. + +CWSDPR0.EXE is an alternate version which runs at ring 0 with virtual memory +disabled. It may be used if access to ring-0 features are desired. It +currently does not switch stacks on HW interrupts, so some DJGPP features +such as SIGINT and SIGFPE are not supported and will generate a double fault +or stack fault error (to be fixed someday). + +CWSDSTUB.EXE is a stub loader image for DJGPP which includes CWSDPMI. This +allows single executable image distributions. You can use the EXE2COFF +program and COPY /B CWSDSTUB.EXE+yourimage yourimage.exe to create a +standalone executable image. + +Some of the internal tuning and configuration parameters may be modified +in the image using CWSPARAM.EXE (see CWSPARAM.DOC). + +If you want to use CWSDPMI with DJGPP, you expand the distribution into the +DJGPP directory tree. CWSDPMI.EXE will be put in the BIN directory with your +DJGPP images and it will automatically be loaded when they run. + +Directions for use (server can be used in either of two different ways): + +1) "cwsdpmi" alone with no parameters will terminate and stay resident + FOR A SINGLE DPMI PROCESS. This means it unloads itself when your + DPMI application exits. This mode is useful in software which needs + DPMI services, since CWSDPMI can be exec'ed and then will unload on exit. + +2) "cwsdpmi -p" will terminate and stay resident until you remove it. + It can be loaded into UMBs with LH. "cwsdpmi -u" will unload the TSR. + +3) The file used for virtual memory swapping, if desired, is controlled + by the "-sc:\cwsdpmi.swp" syntax on the command line. You must specify + either a file with full disk/directory syntax, or "-s-" which disables + virtual memory. + +4) The default swap file name is c:\cwsdpmi.swp, but this can be changed + with the CWSPARAM image, as can some other parameters. + +5) You can disable the DPMI 1.0 extensions by starting the image with the + "cwsdpmi -x" syntax. This feature allows you to run programs developed + under other DPMI providers which do not behave properly with these + extensions enabled (typically use of NULL pointers). + +I would like to give special thanks to DJ Delorie who wrote the original +GO32 code on which CWSDPMI is based. Morten Welinder also provided and +improved much of the code in this program. + +------------------------------------------------------------------------------- + +This section contains a list of the error messages you might see out of +CWSDPMI and some details on what they mean. + +Exceptions are only handled by CWSDPMI if the application does not establish +an exception handler, exceptions nest 5 deep, or the error is particularly bad: + +"Page fault" - + 1) an illegal page fault happens in a RMCB or HW interrupt, (lock all pages!) + 2) all available pages have been locked, + 3) the application is using non-committed pages for null pointer protection. +"Double Fault" - multiple exceptions occurred +"Invalid TSS" - typically due to RMCB or HW interrupt being called after the + selectors/memory have been deallocated (remember to reset the mouse) +"General Protection Fault" - bad parameter sent to a DPMI call + +"80386 required." + +Since 80286 and lesser processors don't have the hardware necessary to +run CWSDPMI. No workaround, upgrade. + +"DOS 3 required." + +A few interrupts are used which need DOS 3.0 or higher. I don't expect to +ever see this message, since 80386 machines were introduced after DOS 3.0 +and that check is made first. + +"CWSDPMI V0.90+ (r5) Copyright (C) 2000 CW Sandmann ABSOLUTELY NO WARRANTY" + +An informational message displayed if the program is not run in one-pass mode. + +"Protected mode not accessible." + +This message should only be displayed if running CWSDPMI in a protected +environment with no access to protected mode. In this case, DPMI should +already be available and CWSDPMI would not be needed. This might happen if +a 16-bit DPMI client is loaded and a DJGPP image attempts to load CWSDPMI +to provide 32-bit DPMI services under Windows. + +"Warning: cannot open swap file c:\cwsdpmi.swp" + +Maybe you are out of file handles, or the swap file name is incorrectly +specified in the image (change the name with cwsparam). + +"No swap space!" + +This message means you tried to use more paging file than CWSDPMI was +configured to handle. Since this is protected against in the memory +allocation code, you should never see this message. + +"Swap disk full!" + +This means the paging file could not be expanded when trying to page +memory out to disk. This would normally not be seen, unless you are +writing output to the same disk which holds the paging file. Decrease +the amount of memory your DPMI application is using or free up disk space. + +"Interrupt 0x??" + +Your application tried to call an interrupt from protected mode which +normally shouldn't be called (something like a data pointer). If the +request was allowed to continue it would likely hang your machine. If you +see this message and think the interrupt should be allowed to continue, let +me know. + +"Error: Using XMS switched CPU into V86 mode." + +This message might be seen if you have your memory manager in AUTO mode. The +only workaround in this case is to stop using AUTO mode. + +"Error: could not allocate page table memory" + +The page table memory (a minimum of 16Kb) is allocated from conventional +memory (either in the 640Kb region or UMBs). If CWSDPMI cannot allocate the +minimum necessary memory, you would see this message. Free up some +conventional memory. You may also see this message if a page directory needs +to be faulted in, and there are no available pages. This means too many pages +have been locked for the allocated page tables available. While CWSDPMI +tries to dynamically allocate these if needed, this effort failed. You need +to increase the number of page tables with CWSPARAM, or increase the amount +of free conventional memory if it is low. If the application which calls +CWSDPMI internally manages all the DOS memory, the page tables may need to +be pre-allocated at DPMI startup time (if this is needed, try using the +run option flag 2 in cwsparam). + +"16-bit DPMI unsupported." + +CWSDPMI is a 32-bit only DPMI server. Ideally, on the request to enter DPMI's +PM with a 16-bit request, we would just fail the call setting the carry bit +like the DPMI specification describes. Some buggy 16-bit compiler tools don't +check the return status and will hang the machine in this case. So, I issue +an error message and exit the image instead. + +"Descriptors exhausted." + +An attempt to nest a DPMI client failed in the setup phase due to insufficient +free selectors in the LDT. + +"CWSDPMI not removed" + +When the -u parameter is specified, if DPMI is not detected this message is +printed. Informational. diff --git a/os/dos/cwsdstub.exe b/os/dos/cwsdstub.exe new file mode 100644 index 0000000000000000000000000000000000000000..fabaf3bf4f158a72ca8cb9d77ef43bf64bbaccf0 GIT binary patch literal 21504 zcmeHveRxwYo#SttVvabj9@{QkZ)X zQUXG{Yws@QT>s{~8!z&4yL#7ckY2({8uj+`3kQIaw8=xZBGAe5k z_`81tNVx!9<3UA7h#n}6C!{KlkflIA(5EM)6G)s$Nb)2?-T-nE37Num^6#e*(hdZG zUBC~4M}eS)5R;V<^BsgN1fB%w-}spOikBBSAAZ1Gd#CxnnvFlIttfZ7&8hdLnHOYa zWSH+OHZNaSz2T{K)z#+Ix@ahWeN{z`wYFk?nYC<#C(SxOW`(QFT<7*YVXmrKx1p@o zTv7KeV)O65J98dB?lc!XXf7zLs;R9gLpf(z?Nb$Xbrm($=JMKg)$XzlW_OL*Q&(md zYiiBws()nO=&9XUgXfL4HT4x6Xu1o;*N?Vzd`xZGQ|l_K>yV+WuB_UPLL1DU>ZfWp zREQO28(7;=pr*R&N9J`KH&#`Y)zK>4(FUip{M9vXb9LGJvbwr;wH3%nQ#ZM4s#vvX z*i#^*@aw<-EU(F2Kv|J)t~W2RW-Op%PY8x_^e=xj@PGa-|D10UR`KE1jNYU?u1?!M}0)EBRL2;fbU-313EhW&Sn9%Ut69ZMzbC?}%;pTpsLFxi9){`6$1b_h%RI zuk-JiN$g+Uiw8`@$v1=u@qX5S>a&{(#ZQ(#8|gU}YDSw|AM8!i zZ%^l}P4UTuMp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8pf#50}_)#M}et+_w{ zXQ|XpxreE&bSo9wdvt9Mv$c7h7!gu!usJxD*Y?NWJZymwacMDn ztMPiAy#DPFCvUpI7|YJ6SxPJ18PUrM8PbU#8lcmP9_H~5B+Nv72-`J1U|KKCi7%ht0pwQRS1o1jiJ{( zMf~G5zN>Y7XaLWxaA8(rFxS*S?vnbHH)0VP@PhCY^4@rX_zCaT~C`wcgiT?#0hW;9|kTcgejG_b~d%$DVXw zYQ4X=yh}bDapM4i8&mHE)wFi@+C;G+)$5LK#c$pqT9mrjC5)DuTH4fz2~BL{=$E05 z$JdVYZcfZRiT=jX#-i8gl1O_*?U!vDWa(;)!Kc&}{qA6QU8||<{^M=2G<}r4WC?yD z&0JPnTT{ExOct8gudANzHrH${tHuNU9WwlsRWx+pGP@nW#O5kn|0Mf4wEBu#{4!cy z8mX=^7c5(DeyZ%Ln%WN5N)8hy?r3bDFP74G#eGkyZCjAf<2?p9Y;Rkq$;Q(HF{ z6D@ty51aMhgCE_2p@k|U_*FRP;w2A}^$S<6-&D6@<5LyZx=kC$I`Iz!UTjr}F!8WVw4C z_^p(4lvS72uB$>?jT`KvKU1e9IMbKRzO8_i+` zh9IRbhAgd7BI-7-TVIwGLzdIj4Hb0|Y)@4cA_(c^r+nv+=ydvxo5=3xUfTESfwm#n zW|DVX-fed+rk~2ctg%quZA+%ov|ImWjm2c$ru^G8bu>i3Z_WJ%(i*30sPxk}OmC5L zIxFxSZuE~BXVZSiuwh?lezXp~Hn;>O>Qc-(K$`|asR^)m*5Y_-2eag{}KoOH>2l{-2eap literal 0 HcmV?d00001 diff --git a/os/dos/exe2coff.c b/os/dos/exe2coff.c new file mode 100644 index 0000000000..aa072e8e41 --- /dev/null +++ b/os/dos/exe2coff.c @@ -0,0 +1,94 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* Updated 2008 to use fread/fopen and friends instead of read/open so it compiles with GCC on Unix (Rubidium) */ +#include +#include +#include +#include +#include +#include +#include + + +static void +exe2aout(char *fname) +{ + unsigned short header[3]; + FILE *ifile; + FILE *ofile; + char buf[4096]; + int rbytes; + char *dot = strrchr(fname, '.'); + if (!dot || strlen(dot) != 4 + || tolower(dot[1]) != 'e' + || tolower(dot[2]) != 'x' + || tolower(dot[3]) != 'e') + { + fprintf(stderr, "%s: Arguments MUST end with a .exe extension\n", fname); + return; + } + + ifile = fopen(fname, "rb"); + if (!ifile) + { + perror(fname); + return; + } + fread(header, sizeof(header), 1, ifile); + if (header[0] == 0x5a4d) + { + long header_offset = (long)header[2]*512L; + if (header[1]) + header_offset += (long)header[1] - 512L; + fseek(ifile, header_offset, SEEK_SET); + header[0] = 0; + fread(header, sizeof(header), 1, ifile); + if ((header[0] != 0x010b) && (header[0] != 0x014c)) + { + fprintf(stderr, "`%s' does not have a COFF/AOUT program appended to it\n", fname); + return; + } + fseek(ifile, header_offset, SEEK_SET); + } + else + { + fprintf(stderr, "`%s' is not an .EXE file\n", fname); + return; + } + + *dot = 0; + ofile = fopen(fname, "w+b"); + if (!ofile) + { + perror(fname); + return; + } + + while ((rbytes=fread(buf, 1, 4096, ifile)) > 0) + { + int wb = fwrite(buf, 1, rbytes, ofile); + if (wb < 0) + { + perror(fname); + break; + } + if (wb < rbytes) + { + fprintf(stderr, "`%s': disk full\n", fname); + exit(1); + } + } + fclose(ifile); + fclose(ofile); +} + +int +main(int argc, char **argv) +{ + int i; + if (argc == 1) printf("Usage: %s ", argv[0]); + for (i=1; i binary.exe || exit +mv binary.exe $1 +rm binary exe2coff diff --git a/readme.txt b/readme.txt index bdc6d3d901..31f4fd20b5 100644 --- a/readme.txt +++ b/readme.txt @@ -73,14 +73,15 @@ OpenTTD has been ported to several platforms and operating systems. It shouldn't be very difficult to port it to a new platform. The currently working platforms are: - BeOS - SDL + BeOS - SDL or Allegro + DOS - Allegro FreeBSD - SDL - Linux - SDL + Linux - SDL or Allegro MacOS X (universal) - Cocoa video and sound drivers (SDL works too, but not 100% and not as a universal binary) MorphOS - SDL OpenBSD - SDL OS/2 - SDL - Windows - Win32 GDI (faster) or SDL + Windows - Win32 GDI (faster) or SDL or Allegro 4.0) Installing and running OpenTTD: @@ -298,6 +299,16 @@ OS/2: A comprehensive GNU build environment is required to build the OS/2 version. See the docs/Readme_OS2.txt file for more information. +DOS: + A build environment with DJGPP is needed as well as libraries such as + Allegro, zlib and libpng, which all can be downloaded from the DJGPP + website. Compilation is straight forward: use make, but do a "./configure" + before the first build. The build binary will need cwsdpmi.exe to be in + the same directory as the openttd executable. cwsdpmi.exe can be found in + the os/dos subdirectory. If you compile with stripping turned on a binary + will be generated that does not need cwsdpmi.exe by adding the cswdstub.exe + to the created OpenTTD binary. + 8.0) Translating: ---- ------------------- diff --git a/source.list b/source.list index d91f500fa8..fa0ba0c56a 100644 --- a/source.list +++ b/source.list @@ -639,7 +639,10 @@ music/null_m.cpp #else #if PSP #else - music/extmidi.cpp + #if DOS + #else + music/extmidi.cpp + #end #end #end #end diff --git a/src/fileio.cpp b/src/fileio.cpp index f7b4a5af2d..0e2d4d8951 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -773,6 +773,10 @@ void ChangeWorkingDirectory(const char *exe) char *s = strrchr(exe, PATHSEPCHAR); if (s != NULL) { *s = '\0'; +#if defined(__DJGPP__) + /* If we want to go to the root, we can't use cd C:, but we must use '/' */ + if (s[-1] == ':') chdir("/"); +#endif if (chdir(exe) != 0) DEBUG(misc, 0, "Directory with the binary does not exist?"); *s = PATHSEPCHAR; } @@ -788,7 +792,7 @@ void ChangeWorkingDirectory(const char *exe) void DetermineBasePaths(const char *exe) { char tmp[MAX_PATH]; -#if defined(__MORPHOS__) || defined(__AMIGA__) || !defined(WITH_PERSONAL_DIR) +#if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS) || !defined(WITH_PERSONAL_DIR) _searchpaths[SP_PERSONAL_DIR] = NULL; #else const char *homedir = getenv("HOME"); @@ -826,7 +830,7 @@ void DetermineBasePaths(const char *exe) AppendPathSeparator(tmp, MAX_PATH); _searchpaths[SP_BINARY_DIR] = strdup(tmp); -#if defined(__MORPHOS__) || defined(__AMIGA__) +#if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS) _searchpaths[SP_INSTALLATION_DIR] = NULL; #else snprintf(tmp, MAX_PATH, "%s", GLOBAL_DATA_DIR); diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 0cd4f95983..6cd94aa006 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -161,6 +161,8 @@ void AskExitGame() SetDParam(0, STR_OSNAME_OS2); #elif defined(SUNOS) SetDParam(0, STR_OSNAME_SUNOS); +#elif defined(DOS) + SetDParam(0, STR_OSNAME_DOS); #else SetDParam(0, STR_OSNAME_UNIX); #endif diff --git a/src/lang/english.txt b/src/lang/english.txt index d77741b029..370e94b310 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -277,6 +277,7 @@ STR_0131_TOO_MANY_NAMES_DEFINED :{WHITE}Too many STR_0132_CHOSEN_NAME_IN_USE_ALREADY :{WHITE}Chosen name already in use STR_OSNAME_WINDOWS :Windows +STR_OSNAME_DOS :DOS STR_OSNAME_UNIX :Unix STR_OSNAME_OSX :OS X STR_OSNAME_BEOS :BeOS diff --git a/src/os_timer.cpp b/src/os_timer.cpp index 0166a445cf..bf0a171de3 100644 --- a/src/os_timer.cpp +++ b/src/os_timer.cpp @@ -35,7 +35,7 @@ unsigned __int64 ottd_rdtsc(); #endif /* rdtsc for all other *nix-en (hopefully). Use GCC syntax */ -#if defined(__i386__) || defined(__x86_64__) && !defined(RDTSC_AVAILABLE) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(__DJGPP__) && !defined(RDTSC_AVAILABLE) uint64 ottd_rdtsc() { uint32 high, low; diff --git a/src/stdafx.h b/src/stdafx.h index a0d715ed3d..6fdc4fd373 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -353,7 +353,7 @@ void NORETURN CDECL usererror(const char *str, ...); void NORETURN CDECL error(const char *str, ...); #define NOT_REACHED() error("NOT_REACHED triggered at line %i of %s", __LINE__, __FILE__) -#if defined(MORPHOS) || defined(__NDS__) +#if defined(MORPHOS) || defined(__NDS__) || defined(__DJGPP__) /* MorphOS and NDS don't have C++ conformant _stricmp... */ #define _stricmp stricmp #elif defined(OPENBSD) @@ -361,7 +361,7 @@ void NORETURN CDECL error(const char *str, ...); #define _stricmp strcasecmp #endif -#if !defined(MORPHOS) && !defined(OPENBSD) && !defined(__NDS__) +#if !defined(MORPHOS) && !defined(OPENBSD) && !defined(__NDS__) && !defined(__DJGPP__) /* NDS, MorphOS & OpenBSD don't know wchars, the rest does :( */ #define HAS_WCHAR #endif /* !defined(MORPHOS) && !defined(OPENBSD) && !defined(__NDS__) */ diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index 913411e6e3..36581bcaa7 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -179,13 +179,19 @@ static bool CreateMainSurface(int w, int h) if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals"); set_color_depth(bpp); +#if defined(DOS) + /* Force DOS builds to ALWAYS use full screen as + * it can't do windowed. */ + _fullscreen = true; +#endif + GetVideoModes(); GetAvailableVideoMode(&w, &h); if (set_gfx_mode(_fullscreen ? GFX_AUTODETECT_FULLSCREEN : GFX_AUTODETECT_WINDOWED, w, h, 0, 0) != 0) return false; - _allegro_screen = create_bitmap(screen->w, screen->h); - _screen.width = screen->w; - _screen.height = screen->h; + _allegro_screen = create_bitmap(w, h); + _screen.width = w; + _screen.height = h; _screen.pitch = ((byte*)screen->line[1] - (byte*)screen->line[0]) / (bitmap_color_depth(screen) / 8); poll_mouse(); @@ -399,7 +405,7 @@ void VideoDriver_Allegro::Stop() if (--_allegro_instance_count == 0) allegro_exit(); } -#if defined(UNIX) || defined(__OS2__) || defined(PSP) +#if defined(UNIX) || defined(__OS2__) || defined(PSP) || defined(DOS) # include /* gettimeofday */ static uint32 GetTime() @@ -490,6 +496,9 @@ bool VideoDriver_Allegro::ChangeResolution(int w, int h) bool VideoDriver_Allegro::ToggleFullscreen(bool fullscreen) { +#ifdef DOS + return false; +#else _fullscreen = fullscreen; GetVideoModes(); // get the list of available video modes if (_num_resolutions == 0 || !this->ChangeResolution(_cur_resolution.width, _cur_resolution.height)) { @@ -498,6 +507,7 @@ bool VideoDriver_Allegro::ToggleFullscreen(bool fullscreen) return false; } return true; +#endif } #endif /* WITH_ALLEGRO */