USB Floppy emulator lib.

git-svn-id: svn://svn.code.sf.net/p/hxcfloppyemu/code/HxCFloppyEmulator/libusbhxcfe/trunk@368 63fa2f70-6a9b-4bc4-b855-9c6a949b1d69
This commit is contained in:
Jean-François DEL NERO
2012-04-17 22:31:45 +00:00
commit 250108d97a
21 changed files with 5906 additions and 0 deletions
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
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
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+792
View File
@@ -0,0 +1,792 @@
HxC Floppy Emulator - A generic/universal floppy disk drive emulator
Copyright (C) 2006-2012 Jean-François DEL NERO / HxC2001
contact: hxc2001( a t )free.fr
website: http://www.hxc2001.com / http://hxc2001.free.fr/floppy_drive_emulator
forum: http://www.torlus.com/floppy/forum
HxCFloppyEmulator may be used and distributed without restriction provided
that this copyright statement is not removed from the file and that any
derivative work contains the original copyright notice and the associated
disclaimer.
HxCFloppyEmulator 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.
HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
The HxCFloppyEmulator software embedded the following libraries :
-----------------------------------------------------------------------------------------------
ADFLib :
ADFLib 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.
ADFLib 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
The main developper is
Laurent Clévy (laurent.clevy (a t) club-internet.fr)
Contributors are:
Bjarne Viksoe
(C++ wrapper, lot of bug fixes)
Gary Harris
(bug fixes and W32 support)
Dan Sutherland
(bug fixes and W32 support)
See CHANGES.txt for detailed contributions.
-----------------------------------------------------------------------------------------------
xDMS v1.3 - Portable DMS archive unpacker - Public Domain
Written by Andre Rodrigues de la Rocha <adlroc (a t) usa.net>
xdms is licensed under PUBLIC DOMAIN. Read xdms.txt.
-----------------------------------------------------------------------------------------------
LibSAP
Version 0.9.4
Copyright (C) 2000-2003 Eric Botcazou
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-----------------------------------------------------------------------------------------------
ZLIB DATA COMPRESSION LIBRARY
zlib 1.2.3 is a general purpose data compression library.
(C) 1995-2004 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup(a t)gzip.org madler(a t)alumni.caltech.edu
If you use the zlib library in a product, we would appreciate *not*
receiving lengthy legal documents to sign. The sources are provided
for free but without warranty of any kind. The library has been
entirely written by Jean-loup Gailly and Mark Adler; it does not
include third-party code.
-----------------------------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
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
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+417
View File
@@ -0,0 +1,417 @@
#CC=i386-pc-linux-gcc
CC=gcc
AR=ar
BASEDIR=../sources
INCLUDES = -I$(BASEDIR)/
ifdef IPF_LIB_SUPPORT
CFLAGS=-O3 $(INCLUDES) -DIPF_SUPPORT
DISKLOADERPLUGINS_IPF= ipf_loader.o libcapsimage.so.2.0
else
CFLAGS=-O3 $(INCLUDES)
DISKLOADERPLUGINS_IPF=
endif
LDFLAGS= -g -shared -lc -lm -ldl
EXEC=libhxcfe.a
ADFLIBOBJ= adf_hd.o adf_disk.o adf_raw.o adf_bitm.o adf_dump.o\
adf_util.o adf_env.o adf_nativ.o adf_dir.o adf_file.o adf_cache.o \
adf_link.o adf_salv.o
XDMSLIBOBJ= getbits.o crc_csum.o maketbl.o pfile.o getbits.o tables.o u_deep.o u_heavy.o u_init.o u_medium.o u_quick.o u_rle.o
ZLIBOBJ=adler32.o compress.o crc32.o deflate.o gzlib.o gzread.o gzwrite.o gzclose.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
MINIZIPOBJ=ioapi.o mztools.o unzip.o zip.o
DISKLOADERPLUGINS=copyqm_loader.o crctable.o adf_loader.o adz_loader.o amigadosfs_loader.o vfile.o cpcdsk_loader.o \
msa_loader.o msx_loader.o smc_loader.o st_loader.o stx_loader.o img_loader.o dms_loader.o mfm_loader.o\
oricdsk_loader.o d64_loader.o trd_loader.o scl_loader.o fat12floppy_loader.o fat12.o\
hfe_loader.o imd_loader.o afi_loader.o sap_loader.o libsap.o jv1_loader.o vtr_loader.o d88_loader.o hdm_loader.o\
ti99pc99_loader.o apridisk_loader.o ede_loader.o fd_loader.o vdk_loader.o dpx_loader.o mgt_loader.o emax_loader.o\
ensoniq_mirage_loader.o sad_loader.o jv3_loader.o stt_loader.o prophet_loader.o teledisk_loader.o td0_lzss.o\
emuii_raw_loader.o emuii_loader.o emui_raw_loader.o jvc_loader.o dim_loader.o ti99v9t9_loader.o d81_loader.o acornadf_loader.o \
camputerslynxldf_loader.o vegasdsk_loader.o dmk_loader.o oldextadf_loader.o extadf_loader.o fdi_loader.o ssd_dsd_loader.o adl_loader.o \
krz_loader.o w30_loader.o fei_loader.o svd_loader.o gkh_loader.o imz_loader.o raw_loader.o
DISKWRITERPLUGINS = cpcdsk_writer.o mfm_writer.o hfe_writer.o raw_writer.o afi_writer.o exthfe_writer.o imd_writer.o vtr_writer.o
all: $(EXEC)
libhxcfe.a: floppy_loader.o floppy_utils.o floppy_ifmode.o linux_api.o emuii_track.o crc.o track_generator.o gcr_track.o sector_extractor.o $(ADFLIBOBJ) $(DISKLOADERPLUGINS) $(DISKWRITERPLUGINS) $(DISKLOADERPLUGINS_IPF) $(XDMSLIBOBJ) $(ZLIBOBJ) $(MINIZIPOBJ)
$(AR) r $@ $^
cp $@ ../../../build
libhxcfe.so: floppy_loader.o floppy_utils.o linux_api.o emuii_track.o crc.o track_generator.o gcr_track.o sector_extractor.o $(ADFLIBOBJ) $(DISKLOADERPLUGINS) $(DISKWRITERPLUGINS) $(DISKLOADERPLUGINS_IPF) $(XDMSLIBOBJ) $(ZLIBOBJ) $(MINIZIPOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
floppy_loader.o: $(BASEDIR)/floppy_loader.c
$(CC) -o $@ -c $< $(CFLAGS)
floppy_ifmode.o: $(BASEDIR)/floppy_ifmode.c
$(CC) -o $@ -c $< $(CFLAGS)
floppy_utils.o: $(BASEDIR)/floppy_utils.c
$(CC) -o $@ -c $< $(CFLAGS)
linux_api.o: $(BASEDIR)/linux/linux_api.c
$(CC) -o $@ -c $< $(CFLAGS)
sector_extractor.o : $(BASEDIR)/tracks/sector_extractor.c $(BASEDIR)/tracks/sector_extractor.h
$(CC) -o $@ -c $< $(CFLAGS)
emuii_track.o: $(BASEDIR)/tracks/emuii_track.c $(BASEDIR)/tracks/emuii_track.h
$(CC) -o $@ -c $< $(CFLAGS)
crc.o: $(BASEDIR)/tracks/crc.c $(BASEDIR)/tracks/crc.h
$(CC) -o $@ -c $< $(CFLAGS)
track_generator.o : $(BASEDIR)/tracks/track_generator.c $(BASEDIR)/tracks/track_generator.h
$(CC) -o $@ -c $< $(CFLAGS)
gcr_track.o : $(BASEDIR)/tracks/gcr_track.c $(BASEDIR)/tracks/gcr_track.h
$(CC) -o $@ -c $< $(CFLAGS)
apridisk_loader.o : $(BASEDIR)/loaders/apridisk_loader/apridisk_loader.c $(BASEDIR)/loaders/apridisk_loader/apridisk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
ede_loader.o : $(BASEDIR)/loaders/ede_loader/ede_loader.c $(BASEDIR)/loaders/ede_loader/ede_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
gkh_loader.o : $(BASEDIR)/loaders/gkh_loader/gkh_loader.c $(BASEDIR)/loaders/gkh_loader/gkh_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
ti99pc99_loader.o : $(BASEDIR)/loaders/ti99pc99_loader/ti99pc99_loader.c $(BASEDIR)/loaders/ti99pc99_loader/ti99pc99_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
ti99v9t9_loader.o : $(BASEDIR)/loaders/ti99v9t9_loader/ti99v9t9_loader.c $(BASEDIR)/loaders/ti99v9t9_loader/ti99v9t9_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
imd_loader.o : $(BASEDIR)/loaders/imd_loader/imd_loader.c $(BASEDIR)/loaders/imd_loader/imd_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
imd_writer.o : $(BASEDIR)/loaders/imd_loader/imd_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
hfe_loader.o : $(BASEDIR)/loaders/hfe_loader/hfe_loader.c $(BASEDIR)/loaders/hfe_loader/hfe_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
hfe_writer.o : $(BASEDIR)/loaders/hfe_loader/hfe_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
exthfe_writer.o : $(BASEDIR)/loaders/hfe_loader/exthfe_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
copyqm_loader.o : $(BASEDIR)/loaders/copyqm_loader/copyqm_loader.c $(BASEDIR)/loaders/copyqm_loader/crctable.c $(BASEDIR)/loaders/copyqm_loader/copyqm_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
crctable.o : $(BASEDIR)/loaders/copyqm_loader/crctable.c $(BASEDIR)/loaders/copyqm_loader/crctable.h
$(CC) -o $@ -c $< $(CFLAGS)
adf_loader.o : $(BASEDIR)/loaders/adf_loader/adf_loader.c $(BASEDIR)/loaders/adf_loader/adf_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
extadf_loader.o : $(BASEDIR)/loaders/extadf_loader/extadf_loader.c $(BASEDIR)/loaders/extadf_loader/extadf_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
oldextadf_loader.o : $(BASEDIR)/loaders/oldextadf_loader/oldextadf_loader.c $(BASEDIR)/loaders/oldextadf_loader/oldextadf_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
acornadf_loader.o : $(BASEDIR)/loaders/acornadf_loader/acornadf_loader.c $(BASEDIR)/loaders/acornadf_loader/acornadf_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
cpcdsk_loader.o : $(BASEDIR)/loaders/cpcdsk_loader/cpcdsk_loader.c $(BASEDIR)/loaders/cpcdsk_loader/cpcdsk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
cpcdsk_writer.o : $(BASEDIR)/loaders/cpcdsk_loader/cpcdsk_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
msa_loader.o : $(BASEDIR)/loaders/msa_loader/msa_loader.c $(BASEDIR)/loaders/msa_loader/msa_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
msx_loader.o : $(BASEDIR)/loaders/msx_loader/msx_loader.c $(BASEDIR)/loaders/msx_loader/msx_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
st_loader.o : $(BASEDIR)/loaders/st_loader/st_loader.c $(BASEDIR)/loaders/st_loader/st_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
dim_loader.o : $(BASEDIR)/loaders/dim_loader/dim_loader.c $(BASEDIR)/loaders/dim_loader/dim_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
stt_loader.o : $(BASEDIR)/loaders/stt_loader/stt_loader.c $(BASEDIR)/loaders/stt_loader/stt_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
stx_loader.o : $(BASEDIR)/loaders/stx_loader/stx_loader.c $(BASEDIR)/loaders/stx_loader/stx_loader.h $(BASEDIR)/loaders/stx_loader/pasti_format.h
$(CC) -o $@ -c $< $(CFLAGS)
img_loader.o : $(BASEDIR)/loaders/img_loader/img_loader.c $(BASEDIR)/loaders/img_loader/img_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
raw_loader.o : $(BASEDIR)/loaders/raw_loader/raw_loader.c $(BASEDIR)/loaders/raw_loader/raw_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
raw_writer.o : $(BASEDIR)/loaders/raw_loader/raw_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
imz_loader.o : $(BASEDIR)/loaders/imz_loader/imz_loader.c $(BASEDIR)/loaders/imz_loader/imz_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
d64_loader.o : $(BASEDIR)/loaders/d64_loader/d64_loader.c $(BASEDIR)/loaders/d64_loader/d64_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
d81_loader.o : $(BASEDIR)/loaders/d81_loader/d81_loader.c $(BASEDIR)/loaders/d81_loader/d81_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
d88_loader.o : $(BASEDIR)/loaders/d88_loader/d88_loader.c $(BASEDIR)/loaders/d88_loader/d88_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
trd_loader.o : $(BASEDIR)/loaders/trd_loader/trd_loader.c $(BASEDIR)/loaders/trd_loader/trd_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
scl_loader.o : $(BASEDIR)/loaders/scl_loader/scl_loader.c $(BASEDIR)/loaders/scl_loader/scl_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
mfm_loader.o : $(BASEDIR)/loaders/mfm_loader/mfm_loader.c $(BASEDIR)/loaders/mfm_loader/mfm_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
mfm_writer.o : $(BASEDIR)/loaders/mfm_loader/mfm_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
svd_loader.o : $(BASEDIR)/loaders/svd_loader/svd_loader.c $(BASEDIR)/loaders/svd_loader/svd_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
smc_loader.o : $(BASEDIR)/loaders/smc_loader/snes_smc_loader.c $(BASEDIR)/loaders/smc_loader/snes_smc_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
krz_loader.o : $(BASEDIR)/loaders/krz_loader/krz_loader.c $(BASEDIR)/loaders/krz_loader/krz_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
camputerslynxldf_loader.o : $(BASEDIR)/loaders/camputerslynxldf_loader/camputerslynxldf_loader.c $(BASEDIR)/loaders/camputerslynxldf_loader/camputerslynxldf_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
vegasdsk_loader.o : $(BASEDIR)/loaders/vegasdsk_loader/vegasdsk_loader.c $(BASEDIR)/loaders/vegasdsk_loader/vegasdsk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
jv1_loader.o : $(BASEDIR)/loaders/jv1_loader/jv1_loader.c $(BASEDIR)/loaders/jv1_loader/jv1_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
jv3_loader.o : $(BASEDIR)/loaders/jv3_loader/jv3_loader.c $(BASEDIR)/loaders/jv3_loader/jv3_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
dmk_loader.o : $(BASEDIR)/loaders/dmk_loader/dmk_loader.c $(BASEDIR)/loaders/dmk_loader/dmk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
sap_loader.o : $(BASEDIR)/loaders/sap_loader/sap_loader.c $(BASEDIR)/loaders/sap_loader/sap_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
fd_loader.o : $(BASEDIR)/loaders/fd_loader/fd_loader.c $(BASEDIR)/loaders/fd_loader/fd_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
ipf_loader.o : $(BASEDIR)/loaders/ipf_loader/ipf_loader.c $(BASEDIR)/loaders/ipf_loader/ipf_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
fdi_loader.o : $(BASEDIR)/loaders/fdi_loader/fdi_loader.c $(BASEDIR)/loaders/fdi_loader/fdi_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
adl_loader.o : $(BASEDIR)/loaders/adl_loader/adl_loader.c $(BASEDIR)/loaders/adl_loader/adl_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
ssd_dsd_loader.o : $(BASEDIR)/loaders/ssd_dsd_loader/ssd_dsd_loader.c $(BASEDIR)/loaders/ssd_dsd_loader/ssd_dsd_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
fat12floppy_loader.o : $(BASEDIR)/loaders/fat12floppy_loader/fat12floppy_loader.c $(BASEDIR)/loaders/fat12floppy_loader/fat12floppy_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
fat12.o : $(BASEDIR)/loaders/fat12floppy_loader/fat12.c $(BASEDIR)/loaders/fat12floppy_loader/fat12.h
$(CC) -o $@ -c $< $(CFLAGS)
oricdsk_loader.o : $(BASEDIR)/loaders/oricdsk_loader/oricdsk_loader.c $(BASEDIR)/loaders/oricdsk_loader/oricdsk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
afi_loader.o : $(BASEDIR)/loaders/afi_loader/afi_loader.c $(BASEDIR)/loaders/afi_loader/afi_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
afi_writer.o : $(BASEDIR)/loaders/afi_loader/afi_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
amigadosfs_loader.o : $(BASEDIR)/loaders/amigadosfs_loader/amigadosfs_loader.c $(BASEDIR)/loaders/amigadosfs_loader/amigadosfs_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
dms_loader.o : $(BASEDIR)/loaders/dms_loader/dms_loader.c $(BASEDIR)/loaders/dms_loader/dms_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
mgt_loader.o : $(BASEDIR)/loaders/mgt_loader/mgt_loader.c $(BASEDIR)/loaders/mgt_loader/mgt_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
sad_loader.o : $(BASEDIR)/loaders/sad_loader/sad_loader.c $(BASEDIR)/loaders/sad_loader/sad_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
emax_loader.o : $(BASEDIR)/loaders/emax_loader/emax_loader.c $(BASEDIR)/loaders/emax_loader/emax_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
ensoniq_mirage_loader.o : $(BASEDIR)/loaders/ensoniq_mirage_loader/ensoniq_mirage_loader.c $(BASEDIR)/loaders/ensoniq_mirage_loader/ensoniq_mirage_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
w30_loader.o : $(BASEDIR)/loaders/w30_loader/w30_loader.c $(BASEDIR)/loaders/w30_loader/w30_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
prophet_loader.o : $(BASEDIR)/loaders/prophet_loader/prophet_loader.c $(BASEDIR)/loaders/prophet_loader/prophet_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
teledisk_loader.o : $(BASEDIR)/loaders/teledisk_loader/teledisk_loader.c $(BASEDIR)/loaders/teledisk_loader/teledisk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
td0_lzss.o : $(BASEDIR)/loaders/teledisk_loader/td0_lzss.c $(BASEDIR)/loaders/teledisk_loader/td0_lzss.h
$(CC) -o $@ -c $< $(CFLAGS)
vtr_loader.o : $(BASEDIR)/loaders/vtr_loader/vtr_loader.c $(BASEDIR)/loaders/vtr_loader/vtr_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
vtr_writer.o : $(BASEDIR)/loaders/vtr_loader/vtr_writer.c
$(CC) -o $@ -c $< $(CFLAGS)
vdk_loader.o : $(BASEDIR)/loaders/vdk_loader/vdk_loader.c $(BASEDIR)/loaders/vdk_loader/vdk_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
dpx_loader.o : $(BASEDIR)/loaders/dpx_loader/dpx_loader.c $(BASEDIR)/loaders/dpx_loader/dpx_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
jvc_loader.o : $(BASEDIR)/loaders/jvc_loader/jvc_loader.c $(BASEDIR)/loaders/jvc_loader/jvc_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
hdm_loader.o : $(BASEDIR)/loaders/hdm_loader/hdm_loader.c $(BASEDIR)/loaders/hdm_loader/hdm_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
emuii_loader.o : $(BASEDIR)/loaders/emuii_loader/emuii_loader.c $(BASEDIR)/loaders/emuii_loader/emuii_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
emuii_raw_loader.o : $(BASEDIR)/loaders/emuii_raw_loader/emuii_raw_loader.c $(BASEDIR)/loaders/emuii_raw_loader/emuii_raw_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
emui_raw_loader.o : $(BASEDIR)/loaders/emui_raw_loader/emui_raw_loader.c $(BASEDIR)/loaders/emui_raw_loader/emui_raw_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
fei_loader.o : $(BASEDIR)/loaders/fei_loader/fei_loader.c $(BASEDIR)/loaders/fei_loader/fei_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
vfile.o : $(BASEDIR)/thirdpartylibs/xdms/vfile.c $(BASEDIR)/thirdpartylibs/xdms/vfile.h
$(CC) -o $@ -c $< $(CFLAGS)
adz_loader.o : $(BASEDIR)/loaders/adz_loader/adz_loader.c $(BASEDIR)/loaders/adz_loader/adz_loader.h
$(CC) -o $@ -c $< $(CFLAGS)
adf_hd.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_hd.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_disk.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_disk.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_raw.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_raw.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_bitm.o: $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_bitm.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_dump.o: $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_dump.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_util.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_util.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_env.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_env.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_nativ.o :$(BASEDIR)/thirdpartylibs/adflib/Lib/adf_nativ.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_dir.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_dir.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_file.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_file.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_cache.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_cache.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_link.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_link.c
$(CC) -o $@ -c $< $(CFLAGS)
adf_salv.o : $(BASEDIR)/thirdpartylibs/adflib/Lib/adf_salv.c
$(CC) -o $@ -c $< $(CFLAGS)
getbits.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/getbits.c
$(CC) -o $@ -c $< $(CFLAGS)
crc_csum.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/crc_csum.c
$(CC) -o $@ -c $< $(CFLAGS)
maketbl.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/maketbl.c
$(CC) -o $@ -c $< $(CFLAGS)
pfile.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/pfile.c
$(CC) -o $@ -c $< $(CFLAGS)
tables.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/tables.c
$(CC) -o $@ -c $< $(CFLAGS)
u_deep.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/u_deep.c
$(CC) -o $@ -c $< $(CFLAGS)
u_heavy.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/u_heavy.c
$(CC) -o $@ -c $< $(CFLAGS)
u_init.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/u_init.c
$(CC) -o $@ -c $< $(CFLAGS)
u_medium.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/u_medium.c
$(CC) -o $@ -c $< $(CFLAGS)
u_quick.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/u_quick.c
$(CC) -o $@ -c $< $(CFLAGS)
u_rle.o : $(BASEDIR)/thirdpartylibs/xdms/xdms-1.3.2/src/u_rle.c
$(CC) -o $@ -c $< $(CFLAGS)
adler32.o : $(BASEDIR)/thirdpartylibs/zlib/adler32.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
compress.o : $(BASEDIR)/thirdpartylibs/zlib/compress.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
crc32.o : $(BASEDIR)/thirdpartylibs/zlib/crc32.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
deflate.o : $(BASEDIR)/thirdpartylibs/zlib/deflate.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
gzlib.o : $(BASEDIR)/thirdpartylibs/zlib/gzlib.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
gzread.o : $(BASEDIR)/thirdpartylibs/zlib/gzread.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
gzwrite.o : $(BASEDIR)/thirdpartylibs/zlib/gzwrite.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
gzclose.o : $(BASEDIR)/thirdpartylibs/zlib/gzclose.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
infback.o : $(BASEDIR)/thirdpartylibs/zlib/infback.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
inffast.o : $(BASEDIR)/thirdpartylibs/zlib/inffast.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
inflate.o : $(BASEDIR)/thirdpartylibs/zlib/inflate.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
inftrees.o : $(BASEDIR)/thirdpartylibs/zlib/inftrees.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
trees.o : $(BASEDIR)/thirdpartylibs/zlib/trees.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
uncompr.o : $(BASEDIR)/thirdpartylibs/zlib/uncompr.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
zutil.o : $(BASEDIR)/thirdpartylibs/zlib/zutil.c
$(CC) -o $@ -c $< $(CFLAGS) -DNO_VIZ
ioapi.o : $(BASEDIR)/thirdpartylibs/zlib/contrib/minizip/ioapi.c
$(CC) -o $@ -c $< $(CFLAGS) -DNOLONGFILESUPPORT
mztools.o : $(BASEDIR)/thirdpartylibs/zlib/contrib/minizip/mztools.c
$(CC) -o $@ -c $< $(CFLAGS)
unzip.o : $(BASEDIR)/thirdpartylibs/zlib/contrib/minizip/unzip.c
$(CC) -o $@ -c $< $(CFLAGS)
zip.o : $(BASEDIR)/thirdpartylibs/zlib/contrib/minizip/zip.c
$(CC) -o $@ -c $< $(CFLAGS)
libsap.o : $(BASEDIR)/thirdpartylibs/libsap/libsap.c $(BASEDIR)/thirdpartylibs/libsap/libsap.h
$(CC) -o $@ -c $< $(CFLAGS)
ftdi_d2xxmode.o : ftdi.c ftdi.h ftd2xx.h WinTypes.h
$(CC) -o $@ -c $< $(CFLAGS)
ftdi_libftdimode.o : ftdi.c ftdi.h ftd2xx.h WinTypes.h
$(CC) -o $@ -c $< $(CFLAGS) -DFTDILIB
clean:
rm -rf *.o
mrproper: clean
rm -rf $(EXEC)
.PHONY: clean mrproper
+141
View File
@@ -0,0 +1,141 @@
# Microsoft Developer Studio Project File - Name="libusbhxcfe" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=libusbhxcfe - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "libusbhxcfe.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "libusbhxcfe.mak" CFG="libusbhxcfe - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "libusbhxcfe - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libusbhxcfe - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "libusbhxcfe - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "..\..\..\build\"
# PROP BASE Intermediate_Dir "..\..\..\build\Release_libusbhxcfe"
# PROP BASE Target_Dir "..\..\..\build\"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\build\"
# PROP Intermediate_Dir "..\..\..\build\Release_libusbhxcfe"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "..\..\..\build\"
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "libusbhxcfe_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\libhxcfe\trunk\sources" /I "..\sources\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "libusbhxcfe_EXPORTS" /D "IPF_SUPPORT" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "NDEBUG"
# ADD RSC /l 0x40c /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
!ELSEIF "$(CFG)" == "libusbhxcfe - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "..\..\..\build\"
# PROP BASE Intermediate_Dir "..\..\..\build\Debug_libusbhxcfe"
# PROP BASE Target_Dir "..\..\..\build\"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\build\"
# PROP Intermediate_Dir "..\..\..\build\Debug_libusbhxcfe"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "..\..\..\build\"
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "libusbhxcfe_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\libhxcfe\trunk\sources" /I "..\sources\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "libusbhxcfe_EXPORTS" /D "IPF_SUPPORT" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG"
# ADD RSC /l 0x40c /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "libusbhxcfe - Win32 Release"
# Name "libusbhxcfe - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\sources\win32\ftdi.c
# End Source File
# Begin Source File
SOURCE=..\sources\win32\libusbhxcfe.def
# End Source File
# Begin Source File
SOURCE=..\sources\usb_hxcfloppyemulator.c
# End Source File
# Begin Source File
SOURCE=..\sources\variablebitrate.c
# End Source File
# Begin Source File
SOURCE=..\sources\win32\win32_api.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\sources\cpld_opcodes.h
# End Source File
# Begin Source File
SOURCE=..\sources\usb_hxcfloppyemulator.h
# End Source File
# Begin Source File
SOURCE=..\sources\variablebitrate.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\sources\win32\libusbhxcfe.rc
# End Source File
# End Group
# End Target
# End Project
+29
View File
@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "libusbhxcfe"=.\libusbhxcfe.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
+9
View File
@@ -0,0 +1,9 @@
#define SETINDEX_H0_OPCODE 0xC0
#define SETINDEX_H1_OPCODE 0x0C
#define NOP_H0_OPCODE 0x70
#define NOP_H1_OPCODE 0x07
#define SETBITRATE_H0_OPCODE 0xD0
#define SETBITRATE_H1_OPCODE 0x0D
File diff suppressed because it is too large Load Diff
+94
View File
@@ -0,0 +1,94 @@
/*
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator 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.
//
// HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
#define NEXTPACKET_EVENT 0x1
#define TRACKCHANGED_EVENT 0x2
#define INCOMINGPACKET_EVENT 0x4
#define STATUS_ERROR 0
#define STATUS_LOOKINGFOR 1
#define STATUS_ONLINE 2
typedef struct _USBStats
{
unsigned long totaldataout;
unsigned long dataout;
unsigned long synclost;
unsigned long packetsize;
unsigned long totalpacketsent;
unsigned long packetsent;
}USBStats;
typedef struct usbtrack_
{
unsigned char * usbtrack;
unsigned char * randomusbtrack;
unsigned long tracklen;
}usbtrack;
typedef struct USBHXCFE_
{
USBStats usbstats;
unsigned char number_of_track;
usbtrack precalcusbtrack[256];
unsigned char *randomlut;
unsigned long hw_handle;
unsigned char interface_mode;
unsigned int drive_select_source;
unsigned char double_step;
unsigned char current_track;
// unsigned char floppyloaded;
unsigned char floppychanged;
unsigned long trackbuffer_pos;
unsigned char start_emulation;
unsigned char stop_emulation;
unsigned char running;
unsigned char status; // 0 -> error 1->lookingfor 2->online
}USBHXCFE;
USBHXCFE * libusbhxcfe_init(HXCFLOPPYEMULATOR* floppycontext);
int libusbhxcfe_deInit(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif);
int libusbhxcfe_loadFloppy(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif,FLOPPY * floppydisk);
int libusbhxcfe_ejectFloppy(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif);
int libusbhxcfe_getStats(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif,USBStats* stats,int clear);
int libusbhxcfe_setInterfaceMode(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif,int interfacemode,int doublestep,int drive);
int libusbhxcfe_getInterfaceMode(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif);
int libusbhxcfe_getDoubleStep(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif);
int libusbhxcfe_getDrive(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif);
int libusbhxcfe_getCurTrack(HXCFLOPPYEMULATOR* floppycontext,USBHXCFE * hwif);
File diff suppressed because it is too large Load Diff
+55
View File
@@ -0,0 +1,55 @@
/*
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator 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.
//
// HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
#define FLOPPYEMUFREQ 16000000
typedef struct trackzone_
{
int start;
int end;
unsigned long bitrate;
unsigned char code1;
unsigned int code1lenint;
unsigned char code2;
unsigned int code2lenint;
}trackzone;
typedef struct trackpart_
{
unsigned char code;
int len;
}trackpart;
#define GRANULA 64
int GetNewTrackRevolution(HXCFLOPPYEMULATOR* floppycontext,unsigned char * index_h0,unsigned char * datah0,unsigned int lendatah0,unsigned char * datah1,unsigned int lendatah1,unsigned char * randomh0,unsigned char * randomh1,long fixedbitrateh0,unsigned long * timeh0,long fixedbitrateh1,unsigned long * timeh1,unsigned char ** finalbuffer,unsigned char ** randomfinalbuffer,unsigned char readysignal,unsigned char diskchange,unsigned char writeprotect,unsigned char amigaready,unsigned char selectconfig);
+10
View File
@@ -0,0 +1,10 @@
#define FILE_VERSION 2,0,0,0
#define STR_FILE_VERSION "2,0,0,0\0"
#define STR_FILE_VERSION2 "2.0.0.0"
#define STR_DATE "04/01/2012\0"
#define NOMFENETRE "HxCFloppyEmulator "##STR_FILE_VERSION2
#define FILEVER FILE_VERSION
#define PRODUCTVER FILE_VERSION
#define STRFILEVER STR_FILE_VERSION
#define STRPRODUCTVER STR_FILE_VERSION
Binary file not shown.
+857
View File
@@ -0,0 +1,857 @@
/*++
Copyright (c) 2001-2005 Future Technology Devices International Ltd.
Module Name:
ftd2xx.h
Abstract:
Native USB device driver for FTDI FT8U232/245
FTD2XX library definitions
Environment:
kernel & user mode
Revision History:
13/03/01 awm Created.
13/01/03 awm Added device information support.
19/03/03 awm Added FT_W32_CancelIo.
12/06/03 awm Added FT_StopInTask and FT_RestartInTask.
18/09/03 awm Added FT_SetResetPipeRetryCount.
10/10/03 awm Added FT_ResetPort.
23/01/04 awm Added support for open-by-location.
16/03/04 awm Added support for FT2232C.
23/09/04 awm Added support for FT232R.
20/10/04 awm Added FT_CyclePort.
18/01/05 awm Added FT_DEVICE_LIST_INFO_NODE type.
11/02/05 awm Added LocId to FT_DEVICE_LIST_INFO_NODE.
25/08/05 awm Added FT_SetDeadmanTimeout.
02/12/05 awm Removed obsolete references.
--*/
#ifndef FTD2XX_H
#define FTD2XX_H
// The following ifdef block is the standard way of creating macros
// which make exporting from a DLL simpler. All files within this DLL
// are compiled with the FTD2XX_EXPORTS symbol defined on the command line.
// This symbol should not be defined on any project that uses this DLL.
// This way any other project whose source files include this file see
// FTD2XX_API functions as being imported from a DLL, whereas this DLL
// sees symbols defined with this macro as being exported.
#ifdef FTD2XX_EXPORTS
#define FTD2XX_API __declspec(dllexport)
#else
#define FTD2XX_API __declspec(dllimport)
#endif
typedef PVOID FT_HANDLE;
typedef ULONG FT_STATUS;
//
// Device status
//
enum {
FT_OK,
FT_INVALID_HANDLE,
FT_DEVICE_NOT_FOUND,
FT_DEVICE_NOT_OPENED,
FT_IO_ERROR,
FT_INSUFFICIENT_RESOURCES,
FT_INVALID_PARAMETER,
FT_INVALID_BAUD_RATE,
FT_DEVICE_NOT_OPENED_FOR_ERASE,
FT_DEVICE_NOT_OPENED_FOR_WRITE,
FT_FAILED_TO_WRITE_DEVICE,
FT_EEPROM_READ_FAILED,
FT_EEPROM_WRITE_FAILED,
FT_EEPROM_ERASE_FAILED,
FT_EEPROM_NOT_PRESENT,
FT_EEPROM_NOT_PROGRAMMED,
FT_INVALID_ARGS,
FT_NOT_SUPPORTED,
FT_OTHER_ERROR
};
#define FT_SUCCESS(status) ((status) == FT_OK)
//
// FT_OpenEx Flags
//
#define FT_OPEN_BY_SERIAL_NUMBER 1
#define FT_OPEN_BY_DESCRIPTION 2
#define FT_OPEN_BY_LOCATION 4
//
// FT_ListDevices Flags (used in conjunction with FT_OpenEx Flags
//
#define FT_LIST_NUMBER_ONLY 0x80000000
#define FT_LIST_BY_INDEX 0x40000000
#define FT_LIST_ALL 0x20000000
#define FT_LIST_MASK (FT_LIST_NUMBER_ONLY|FT_LIST_BY_INDEX|FT_LIST_ALL)
//
// Baud Rates
//
#define FT_BAUD_300 300
#define FT_BAUD_600 600
#define FT_BAUD_1200 1200
#define FT_BAUD_2400 2400
#define FT_BAUD_4800 4800
#define FT_BAUD_9600 9600
#define FT_BAUD_14400 14400
#define FT_BAUD_19200 19200
#define FT_BAUD_38400 38400
#define FT_BAUD_57600 57600
#define FT_BAUD_115200 115200
#define FT_BAUD_230400 230400
#define FT_BAUD_460800 460800
#define FT_BAUD_921600 921600
//
// Word Lengths
//
#define FT_BITS_8 (UCHAR) 8
#define FT_BITS_7 (UCHAR) 7
#define FT_BITS_6 (UCHAR) 6
#define FT_BITS_5 (UCHAR) 5
//
// Stop Bits
//
#define FT_STOP_BITS_1 (UCHAR) 0
#define FT_STOP_BITS_1_5 (UCHAR) 1
#define FT_STOP_BITS_2 (UCHAR) 2
//
// Parity
//
#define FT_PARITY_NONE (UCHAR) 0
#define FT_PARITY_ODD (UCHAR) 1
#define FT_PARITY_EVEN (UCHAR) 2
#define FT_PARITY_MARK (UCHAR) 3
#define FT_PARITY_SPACE (UCHAR) 4
//
// Flow Control
//
#define FT_FLOW_NONE 0x0000
#define FT_FLOW_RTS_CTS 0x0100
#define FT_FLOW_DTR_DSR 0x0200
#define FT_FLOW_XON_XOFF 0x0400
//
// Purge rx and tx buffers
//
#define FT_PURGE_RX 1
#define FT_PURGE_TX 2
//
// Events
//
typedef void (*PFT_EVENT_HANDLER)(DWORD,DWORD);
#define FT_EVENT_RXCHAR 1
#define FT_EVENT_MODEM_STATUS 2
//
// Timeouts
//
#define FT_DEFAULT_RX_TIMEOUT 300
#define FT_DEFAULT_TX_TIMEOUT 300
//
// Device types
//
typedef ULONG FT_DEVICE;
enum {
FT_DEVICE_BM,
FT_DEVICE_AM,
FT_DEVICE_100AX,
FT_DEVICE_UNKNOWN,
FT_DEVICE_2232C,
FT_DEVICE_232R
};
#ifdef __cplusplus
extern "C" {
#endif
FTD2XX_API
FT_STATUS WINAPI FT_Open(
int deviceNumber,
FT_HANDLE *pHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_OpenEx(
PVOID pArg1,
DWORD Flags,
FT_HANDLE *pHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ListDevices(
PVOID pArg1,
PVOID pArg2,
DWORD Flags
);
FTD2XX_API
FT_STATUS WINAPI FT_Close(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_Read(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesReturned
);
FTD2XX_API
FT_STATUS WINAPI FT_Write(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesWritten
);
FTD2XX_API
FT_STATUS WINAPI FT_IoCtl(
FT_HANDLE ftHandle,
DWORD dwIoControlCode,
LPVOID lpInBuf,
DWORD nInBufSize,
LPVOID lpOutBuf,
DWORD nOutBufSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBaudRate(
FT_HANDLE ftHandle,
ULONG BaudRate
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDivisor(
FT_HANDLE ftHandle,
USHORT Divisor
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDataCharacteristics(
FT_HANDLE ftHandle,
UCHAR WordLength,
UCHAR StopBits,
UCHAR Parity
);
FTD2XX_API
FT_STATUS WINAPI FT_SetFlowControl(
FT_HANDLE ftHandle,
USHORT FlowControl,
UCHAR XonChar,
UCHAR XoffChar
);
FTD2XX_API
FT_STATUS WINAPI FT_ResetDevice(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDtr(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ClrDtr(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetRts(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ClrRts(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_GetModemStatus(
FT_HANDLE ftHandle,
ULONG *pModemStatus
);
FTD2XX_API
FT_STATUS WINAPI FT_SetChars(
FT_HANDLE ftHandle,
UCHAR EventChar,
UCHAR EventCharEnabled,
UCHAR ErrorChar,
UCHAR ErrorCharEnabled
);
FTD2XX_API
FT_STATUS WINAPI FT_Purge(
FT_HANDLE ftHandle,
ULONG Mask
);
FTD2XX_API
FT_STATUS WINAPI FT_SetTimeouts(
FT_HANDLE ftHandle,
ULONG ReadTimeout,
ULONG WriteTimeout
);
FTD2XX_API
FT_STATUS WINAPI FT_GetQueueStatus(
FT_HANDLE ftHandle,
DWORD *dwRxBytes
);
FTD2XX_API
FT_STATUS WINAPI FT_SetEventNotification(
FT_HANDLE ftHandle,
DWORD Mask,
PVOID Param
);
FTD2XX_API
FT_STATUS WINAPI FT_GetStatus(
FT_HANDLE ftHandle,
DWORD *dwRxBytes,
DWORD *dwTxBytes,
DWORD *dwEventDWord
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBreakOn(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBreakOff(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetWaitMask(
FT_HANDLE ftHandle,
DWORD Mask
);
FTD2XX_API
FT_STATUS WINAPI FT_WaitOnMask(
FT_HANDLE ftHandle,
DWORD *Mask
);
FTD2XX_API
FT_STATUS WINAPI FT_GetEventStatus(
FT_HANDLE ftHandle,
DWORD *dwEventDWord
);
FTD2XX_API
FT_STATUS WINAPI FT_ReadEE(
FT_HANDLE ftHandle,
DWORD dwWordOffset,
LPWORD lpwValue
);
FTD2XX_API
FT_STATUS WINAPI FT_WriteEE(
FT_HANDLE ftHandle,
DWORD dwWordOffset,
WORD wValue
);
FTD2XX_API
FT_STATUS WINAPI FT_EraseEE(
FT_HANDLE ftHandle
);
//
// structure to hold program data for FT_Program function
//
typedef struct ft_program_data {
DWORD Signature1; // Header - must be 0x00000000
DWORD Signature2; // Header - must be 0xffffffff
DWORD Version; // Header - FT_PROGRAM_DATA version
// 0 = original
// 1 = FT2232C extensions
// 2 = FT232R extensions
WORD VendorId; // 0x0403
WORD ProductId; // 0x6001
char *Manufacturer; // "FTDI"
char *ManufacturerId; // "FT"
char *Description; // "USB HS Serial Converter"
char *SerialNumber; // "FT000001" if fixed, or NULL
WORD MaxPower; // 0 < MaxPower <= 500
WORD PnP; // 0 = disabled, 1 = enabled
WORD SelfPowered; // 0 = bus powered, 1 = self powered
WORD RemoteWakeup; // 0 = not capable, 1 = capable
//
// Rev4 extensions
//
UCHAR Rev4; // non-zero if Rev4 chip, zero otherwise
UCHAR IsoIn; // non-zero if in endpoint is isochronous
UCHAR IsoOut; // non-zero if out endpoint is isochronous
UCHAR PullDownEnable; // non-zero if pull down enabled
UCHAR SerNumEnable; // non-zero if serial number to be used
UCHAR USBVersionEnable; // non-zero if chip uses USBVersion
WORD USBVersion; // BCD (0x0200 => USB2)
//
// FT2232C extensions
//
UCHAR Rev5; // non-zero if Rev5 chip, zero otherwise
UCHAR IsoInA; // non-zero if in endpoint is isochronous
UCHAR IsoInB; // non-zero if in endpoint is isochronous
UCHAR IsoOutA; // non-zero if out endpoint is isochronous
UCHAR IsoOutB; // non-zero if out endpoint is isochronous
UCHAR PullDownEnable5; // non-zero if pull down enabled
UCHAR SerNumEnable5; // non-zero if serial number to be used
UCHAR USBVersionEnable5; // non-zero if chip uses USBVersion
WORD USBVersion5; // BCD (0x0200 => USB2)
UCHAR AIsHighCurrent; // non-zero if interface is high current
UCHAR BIsHighCurrent; // non-zero if interface is high current
UCHAR IFAIsFifo; // non-zero if interface is 245 FIFO
UCHAR IFAIsFifoTar; // non-zero if interface is 245 FIFO CPU target
UCHAR IFAIsFastSer; // non-zero if interface is Fast serial
UCHAR AIsVCP; // non-zero if interface is to use VCP drivers
UCHAR IFBIsFifo; // non-zero if interface is 245 FIFO
UCHAR IFBIsFifoTar; // non-zero if interface is 245 FIFO CPU target
UCHAR IFBIsFastSer; // non-zero if interface is Fast serial
UCHAR BIsVCP; // non-zero if interface is to use VCP drivers
//
// FT232R extensions
//
UCHAR UseExtOsc; // Use External Oscillator
UCHAR HighDriveIOs; // High Drive I/Os
UCHAR EndpointSize; // Endpoint size
UCHAR PullDownEnableR; // non-zero if pull down enabled
UCHAR SerNumEnableR; // non-zero if serial number to be used
UCHAR InvertTXD; // non-zero if invert TXD
UCHAR InvertRXD; // non-zero if invert RXD
UCHAR InvertRTS; // non-zero if invert RTS
UCHAR InvertCTS; // non-zero if invert CTS
UCHAR InvertDTR; // non-zero if invert DTR
UCHAR InvertDSR; // non-zero if invert DSR
UCHAR InvertDCD; // non-zero if invert DCD
UCHAR InvertRI; // non-zero if invert RI
UCHAR Cbus0; // Cbus Mux control
UCHAR Cbus1; // Cbus Mux control
UCHAR Cbus2; // Cbus Mux control
UCHAR Cbus3; // Cbus Mux control
UCHAR Cbus4; // Cbus Mux control
UCHAR RIsVCP; // non-zero if using VCP drivers
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA;
FTD2XX_API
FT_STATUS WINAPI FT_EE_Program(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_ProgramEx(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData,
char *Manufacturer,
char *ManufacturerId,
char *Description,
char *SerialNumber
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_Read(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_ReadEx(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData,
char *Manufacturer,
char *ManufacturerId,
char *Description,
char *SerialNumber
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_UASize(
FT_HANDLE ftHandle,
LPDWORD lpdwSize
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_UAWrite(
FT_HANDLE ftHandle,
PUCHAR pucData,
DWORD dwDataLen
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_UARead(
FT_HANDLE ftHandle,
PUCHAR pucData,
DWORD dwDataLen,
LPDWORD lpdwBytesRead
);
FTD2XX_API
FT_STATUS WINAPI FT_SetLatencyTimer(
FT_HANDLE ftHandle,
UCHAR ucLatency
);
FTD2XX_API
FT_STATUS WINAPI FT_GetLatencyTimer(
FT_HANDLE ftHandle,
PUCHAR pucLatency
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBitMode(
FT_HANDLE ftHandle,
UCHAR ucMask,
UCHAR ucEnable
);
FTD2XX_API
FT_STATUS WINAPI FT_GetBitMode(
FT_HANDLE ftHandle,
PUCHAR pucMode
);
FTD2XX_API
FT_STATUS WINAPI FT_SetUSBParameters(
FT_HANDLE ftHandle,
ULONG ulInTransferSize,
ULONG ulOutTransferSize
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDeadmanTimeout(
FT_HANDLE ftHandle,
ULONG ulDeadmanTimeout
);
FTD2XX_API
FT_STATUS WINAPI FT_GetDeviceInfo(
FT_HANDLE ftHandle,
FT_DEVICE *lpftDevice,
LPDWORD lpdwID,
PCHAR SerialNumber,
PCHAR Description,
LPVOID Dummy
);
FTD2XX_API
FT_STATUS WINAPI FT_StopInTask(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_RestartInTask(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetResetPipeRetryCount(
FT_HANDLE ftHandle,
DWORD dwCount
);
FTD2XX_API
FT_STATUS WINAPI FT_ResetPort(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_CyclePort(
FT_HANDLE ftHandle
);
//
// Win32-type functions
//
FTD2XX_API
FT_HANDLE WINAPI FT_W32_CreateFile(
LPCSTR lpszName,
DWORD dwAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreate,
DWORD dwAttrsAndFlags,
HANDLE hTemplate
);
FTD2XX_API
BOOL WINAPI FT_W32_CloseHandle(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_ReadFile(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
FTD2XX_API
BOOL WINAPI FT_W32_WriteFile(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesWritten,
LPOVERLAPPED lpOverlapped
);
FTD2XX_API
DWORD WINAPI FT_W32_GetLastError(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_GetOverlappedResult(
FT_HANDLE ftHandle,
LPOVERLAPPED lpOverlapped,
LPDWORD lpdwBytesTransferred,
BOOL bWait
);
FTD2XX_API
BOOL WINAPI FT_W32_CancelIo(
FT_HANDLE ftHandle
);
//
// Win32 COMM API type functions
//
typedef struct _FTCOMSTAT {
DWORD fCtsHold : 1;
DWORD fDsrHold : 1;
DWORD fRlsdHold : 1;
DWORD fXoffHold : 1;
DWORD fXoffSent : 1;
DWORD fEof : 1;
DWORD fTxim : 1;
DWORD fReserved : 25;
DWORD cbInQue;
DWORD cbOutQue;
} FTCOMSTAT, *LPFTCOMSTAT;
typedef struct _FTDCB {
DWORD DCBlength; /* sizeof(FTDCB) */
DWORD BaudRate; /* Baudrate at which running */
DWORD fBinary: 1; /* Binary Mode (skip EOF check) */
DWORD fParity: 1; /* Enable parity checking */
DWORD fOutxCtsFlow:1; /* CTS handshaking on output */
DWORD fOutxDsrFlow:1; /* DSR handshaking on output */
DWORD fDtrControl:2; /* DTR Flow control */
DWORD fDsrSensitivity:1; /* DSR Sensitivity */
DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */
DWORD fOutX: 1; /* Enable output X-ON/X-OFF */
DWORD fInX: 1; /* Enable input X-ON/X-OFF */
DWORD fErrorChar: 1; /* Enable Err Replacement */
DWORD fNull: 1; /* Enable Null stripping */
DWORD fRtsControl:2; /* Rts Flow control */
DWORD fAbortOnError:1; /* Abort all reads and writes on Error */
DWORD fDummy2:17; /* Reserved */
WORD wReserved; /* Not currently used */
WORD XonLim; /* Transmit X-ON threshold */
WORD XoffLim; /* Transmit X-OFF threshold */
BYTE ByteSize; /* Number of bits/byte, 4-8 */
BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */
BYTE StopBits; /* 0,1,2 = 1, 1.5, 2 */
char XonChar; /* Tx and Rx X-ON character */
char XoffChar; /* Tx and Rx X-OFF character */
char ErrorChar; /* Error replacement char */
char EofChar; /* End of Input character */
char EvtChar; /* Received Event character */
WORD wReserved1; /* Fill for now. */
} FTDCB, *LPFTDCB;
typedef struct _FTTIMEOUTS {
DWORD ReadIntervalTimeout; /* Maximum time between read chars. */
DWORD ReadTotalTimeoutMultiplier; /* Multiplier of characters. */
DWORD ReadTotalTimeoutConstant; /* Constant in milliseconds. */
DWORD WriteTotalTimeoutMultiplier; /* Multiplier of characters. */
DWORD WriteTotalTimeoutConstant; /* Constant in milliseconds. */
} FTTIMEOUTS,*LPFTTIMEOUTS;
FTD2XX_API
BOOL WINAPI FT_W32_ClearCommBreak(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_ClearCommError(
FT_HANDLE ftHandle,
LPDWORD lpdwErrors,
LPFTCOMSTAT lpftComstat
);
FTD2XX_API
BOOL WINAPI FT_W32_EscapeCommFunction(
FT_HANDLE ftHandle,
DWORD dwFunc
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommModemStatus(
FT_HANDLE ftHandle,
LPDWORD lpdwModemStatus
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommState(
FT_HANDLE ftHandle,
LPFTDCB lpftDcb
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommTimeouts(
FT_HANDLE ftHandle,
FTTIMEOUTS *pTimeouts
);
FTD2XX_API
BOOL WINAPI FT_W32_PurgeComm(
FT_HANDLE ftHandle,
DWORD dwMask
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommBreak(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommMask(
FT_HANDLE ftHandle,
ULONG ulEventMask
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommState(
FT_HANDLE ftHandle,
LPFTDCB lpftDcb
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommTimeouts(
FT_HANDLE ftHandle,
FTTIMEOUTS *pTimeouts
);
FTD2XX_API
BOOL WINAPI FT_W32_SetupComm(
FT_HANDLE ftHandle,
DWORD dwReadBufferSize,
DWORD dwWriteBufferSize
);
FTD2XX_API
BOOL WINAPI FT_W32_WaitCommEvent(
FT_HANDLE ftHandle,
PULONG pulEvent,
LPOVERLAPPED lpOverlapped
);
//
// Device information
//
typedef struct _ft_device_list_info_node {
ULONG Flags;
ULONG Type;
ULONG ID;
DWORD LocId;
char SerialNumber[16];
char Description[64];
FT_HANDLE ftHandle;
} FT_DEVICE_LIST_INFO_NODE;
FTD2XX_API
FT_STATUS WINAPI FT_CreateDeviceInfoList(
LPDWORD lpdwNumDevs
);
FTD2XX_API
FT_STATUS WINAPI FT_GetDeviceInfoList(
FT_DEVICE_LIST_INFO_NODE *pDest,
LPDWORD lpdwNumDevs
);
FTD2XX_API
FT_STATUS WINAPI FT_GetDeviceInfoDetail(
DWORD dwIndex,
LPDWORD lpdwFlags,
LPDWORD lpdwType,
LPDWORD lpdwID,
LPDWORD lpdwLocId,
LPVOID lpSerialNumber,
LPVOID lpDescription,
FT_HANDLE *pftHandle
);
#ifdef __cplusplus
}
#endif
#endif /* FTD2XX_H */
Binary file not shown.
+211
View File
@@ -0,0 +1,211 @@
/*
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator 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.
//
// HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
#include "libhxcfe.h"
#include <windows.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <ftd2xx.h>
#include <winioctl.h>
#include "ftdi.h"
typedef FT_STATUS (WINAPI * FT_OPEN)(int deviceNumber, FT_HANDLE *pHandle);
//extern FT_OPEN pFT_Open;
typedef FT_STATUS (WINAPI * FT_READ)( FT_HANDLE ftHandle,LPVOID lpBuffer,DWORD nBufferSize,LPDWORD lpBytesReturned);
//extern FT_READ pFT_Read;
typedef FT_STATUS (WINAPI * FT_WRITE)(FT_HANDLE ftHandle,LPVOID lpBuffer,DWORD nBufferSize,LPDWORD lpBytesWritten);
//extern FT_WRITE pFT_Write;
typedef FT_STATUS (WINAPI * FT_GETSTATUS)(FT_HANDLE ftHandle,DWORD *dwRxBytes,DWORD *dwTxBytes,DWORD *dwEventDWord);
//extern FT_GETSTATUS pFT_GetStatus;
///
typedef FT_STATUS (WINAPI * FT_PURGE)(FT_HANDLE ftHandle,ULONG Mask);
//extern FT_PURGE pFT_Purge;
typedef FT_STATUS (WINAPI * FT_SETUSBPARAMETERS)(FT_HANDLE ftHandle,ULONG ulInTransferSize,ULONG ulOutTransferSize);
//extern FT_SETUSBPARAMETERS pFT_SetUSBParameters;
typedef FT_STATUS (WINAPI * FT_SETLATENCYTIMER)(FT_HANDLE ftHandle,UCHAR ucLatency);
//extern FT_SETLATENCYTIMER pFT_SetLatencyTimer;
typedef FT_STATUS (WINAPI * FT_SETEVENTNOTIFICATION)(FT_HANDLE ftHandle,DWORD dwEventMask, PVOID pvArg);
//extern FT_SETEVENTNOTIFICATION pFT_SetEventNotification;
typedef FT_STATUS (WINAPI * FT_CLOSE)(FT_HANDLE ftHandle);
//extern FT_CLOSE pFT_Close;
FT_OPEN pFT_Open;
FT_READ pFT_Read;
FT_WRITE pFT_Write;
FT_GETSTATUS pFT_GetStatus;
FT_PURGE pFT_Purge;
FT_SETUSBPARAMETERS pFT_SetUSBParameters;
FT_SETLATENCYTIMER pFT_SetLatencyTimer;
FT_SETEVENTNOTIFICATION pFT_SetEventNotification;
FT_CLOSE pFT_Close;
int ftdi_load_lib (HXCFLOPPYEMULATOR* floppycontext)
{
HMODULE h;
h = LoadLibrary ("ftd2xx.dll");
if (h)
{
pFT_Write = (FT_WRITE)GetProcAddress (h, "FT_Write");
pFT_Read = (FT_READ)GetProcAddress (h, "FT_Read");
pFT_GetStatus = (FT_GETSTATUS)GetProcAddress (h, "FT_GetStatus");
pFT_Open = (FT_OPEN)GetProcAddress (h, "FT_Open");
pFT_Close = (FT_CLOSE)GetProcAddress (h, "FT_Close");
pFT_Purge = (FT_PURGE)GetProcAddress (h, "FT_Purge");
pFT_SetUSBParameters = (FT_SETUSBPARAMETERS)GetProcAddress (h, "FT_SetUSBParameters");
pFT_SetLatencyTimer = (FT_SETLATENCYTIMER)GetProcAddress (h, "FT_SetLatencyTimer");
pFT_SetEventNotification = (FT_SETEVENTNOTIFICATION)GetProcAddress (h, "FT_SetEventNotification");
if(pFT_Write && pFT_Read && pFT_GetStatus && pFT_Open && pFT_Purge && pFT_SetUSBParameters && pFT_SetLatencyTimer && pFT_SetEventNotification)
{
floppycontext->hxc_printf(MSG_INFO_1,"FTDI library loaded successfully!");
return 1;
}
else
{
floppycontext->hxc_printf(MSG_ERROR,"Error while loading FTDI library! Missing entry point ?");
return -3;
}
}
else
{
floppycontext->hxc_printf(MSG_ERROR,"Error while loading FTDI library! library not found !");
return -1;
}
return 0;
}
int open_ftdichip(unsigned long * ftdihandle)
{
int i;
i=0;
do
{
if(pFT_Open(i,(FT_HANDLE*)ftdihandle)==FT_OK)
{
return 0;
}
i++;
}while(i<4);
*ftdihandle=0;
return -1;
}
int close_ftdichip(unsigned long ftdihandle)
{
if(pFT_Close((FT_HANDLE*)ftdihandle)!=FT_OK)
{
return -1;
}
return 0;
}
int purge_ftdichip(unsigned long ftdihandle,unsigned long buffer)
{
if(pFT_Purge((FT_HANDLE*)ftdihandle,buffer)!=FT_OK)
{
return -1;
}
return 0;
}
int setusbparameters_ftdichip(unsigned long ftdihandle,unsigned long buffersizetx,unsigned long buffersizerx)
{
if(pFT_SetUSBParameters ((FT_HANDLE*)ftdihandle,buffersizerx,buffersizetx)!=FT_OK)
{
return -1;
}
return 0;
}
int setlatencytimer_ftdichip(unsigned long ftdihandle,unsigned char latencytimer_ms)
{
if(pFT_SetLatencyTimer ((FT_HANDLE*)ftdihandle,latencytimer_ms)!=FT_OK)
{
return -1;
}
return 0;
}
int write_ftdichip(unsigned long ftdihandle,unsigned char * buffer,unsigned int size)
{
int dwWritten;
if(pFT_Write ((FT_HANDLE*)ftdihandle, buffer, size,&dwWritten)!=FT_OK)
{
return -1;
}
return dwWritten;
}
int read_ftdichip(unsigned long ftdihandle,unsigned char * buffer,unsigned int size)
{
int returnvalue;
if(pFT_Read((FT_HANDLE*)ftdihandle,buffer,size,&returnvalue)!=FT_OK)
{
return -1;
}
return returnvalue;
}
int getfifostatus_ftdichip(unsigned long ftdihandle,int * txlevel,int *rxlevel,unsigned long * event)
{
if(pFT_GetStatus((FT_HANDLE*)ftdihandle,rxlevel,txlevel,event)!=FT_OK)
{
return -1;
}
return 0;
}
int seteventnotification_ftdichip(unsigned long ftdihandle,unsigned long eventmask,void * event)
{
if(pFT_SetEventNotification((FT_HANDLE*)ftdihandle,eventmask,event)!=FT_OK)
{
return -1;
}
return 0;
}
/////////////
+46
View File
@@ -0,0 +1,46 @@
/*
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator 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.
//
// HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
#define SRAMSIZE 8*1024
#define FT_PURGE_RX 1
#define FT_PURGE_TX 2
#define FT_EVENT_RXCHAR 1
int ftdi_load_lib (HXCFLOPPYEMULATOR* floppycontext);
int open_ftdichip(unsigned long * ftdihandle);
int close_ftdichip(unsigned long ftdihandle);
int purge_ftdichip(unsigned long ftdihandle,unsigned long buffer);
int setusbparameters_ftdichip(unsigned long ftdihandle,unsigned long buffersizetx,unsigned long buffersizerx);
int setlatencytimer_ftdichip(unsigned long ftdihandle,unsigned char latencytimer_ms);
int write_ftdichip(unsigned long ftdihandle,unsigned char * buffer,unsigned int size);
int read_ftdichip(unsigned long ftdihandle,unsigned char * buffer,unsigned int size);
int getfifostatus_ftdichip(unsigned long ftdihandle,int * txlevel,int *rxlevel,unsigned long * event);
int seteventnotification_ftdichip(unsigned long ftdihandle,unsigned long eventmask,void * event);
+12
View File
@@ -0,0 +1,12 @@
LIBRARY LIBUSBHXCFE
EXPORTS
libusbhxcfe_init @1
libusbhxcfe_deInit @2
libusbhxcfe_loadFloppy @3
libusbhxcfe_ejectFloppy @4
libusbhxcfe_getStats @5
libusbhxcfe_setInterfaceMode @6
libusbhxcfe_getInterfaceMode @7
libusbhxcfe_getDoubleStep @8
libusbhxcfe_getDrive @9
libusbhxcfe_getCurTrack @10
+110
View File
@@ -0,0 +1,110 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#include "../version.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION FILE_VERSION
PRODUCTVERSION FILE_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "Comments", "USB HxC Floppy Emulator library\0"
VALUE "CompanyName", "(c) HxC2001 \0"
VALUE "FileDescription", "libusbhxcfe\0"
VALUE "FileVersion", STR_FILE_VERSION
VALUE "InternalName", "libusbhxcfe\0"
VALUE "LegalCopyright", "Copyright © 2012\0"
VALUE "LegalTrademarks", "(c) HxC2001 \0"
VALUE "OriginalFilename", "libusbhxcfe.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", " libusbhxcfe\0"
VALUE "ProductVersion", STR_FILE_VERSION
VALUE "SpecialBuild", STR_DATE
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x40c, 1200
END
END
#endif // !_MAC
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+15
View File
@@ -0,0 +1,15 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by libhxcfe.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+262
View File
@@ -0,0 +1,262 @@
/*
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator 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.
//
// HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
#include <windows.h>
#include <stdio.h>
#include "libhxcfe.h"
#include "../usb_hxcfloppyemulator.h"
#include "win32_api.h"
HANDLE eventtab[256];
DWORD WINAPI ThreadProc( LPVOID lpParameter)
{
threadinit *threadinitptr;
THREADFUNCTION thread;
HXCFLOPPYEMULATOR* floppycontext;
USBHXCFE* hw_context;
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
threadinitptr=(threadinit*)lpParameter;
thread=threadinitptr->thread;
floppycontext=threadinitptr->hxcfloppyemulatorcontext;
hw_context=threadinitptr->hwcontext;
thread(floppycontext,hw_context);
return 0;
}
unsigned long hxc_createevent(HXCFLOPPYEMULATOR* floppycontext,unsigned char id)
{
eventtab[id]=CreateEvent(NULL,FALSE,FALSE,NULL);
return (unsigned long)eventtab[id];
}
int hxc_setevent(HXCFLOPPYEMULATOR* floppycontext,unsigned char id)
{
SetEvent(eventtab[id]);
return 0;
}
int hxc_waitevent(HXCFLOPPYEMULATOR* floppycontext,int id,int timeout)
{
int ret;
if(timeout==0) timeout=INFINITE;
ret=WaitForSingleObject(eventtab[id],timeout);
if(ret==0)
{
return 0;
}
else
{
return 1;
}
}
void hxc_pause(int ms)
{
Sleep(ms);
}
int hxc_createthread(HXCFLOPPYEMULATOR* floppycontext,void* hwcontext,THREADFUNCTION thread,int priority)
{
DWORD sit;
threadinit *threadinitptr;
threadinitptr=(threadinit*)malloc(sizeof(threadinit));
threadinitptr->thread=thread;
threadinitptr->hxcfloppyemulatorcontext=floppycontext;
threadinitptr->hwcontext=hwcontext;
CreateThread(NULL,8*1024,&ThreadProc,threadinitptr,0,&sit);
return sit;
}
int getlistoffile(char * directorypath,char *** filelist)
{
int numberoffile;
char ** filepathtab;
HANDLE findfilehandle;
WIN32_FIND_DATA FindFileData;
filepathtab=0;
numberoffile=0;
findfilehandle=FindFirstFile(directorypath,&FindFileData);
if(findfilehandle!=INVALID_HANDLE_VALUE)
{
do
{
filepathtab=(char **) realloc(filepathtab,sizeof(char*)*(numberoffile+1));
filepathtab[numberoffile]=(char*)malloc(strlen(FindFileData.cFileName)+1);
strcpy(filepathtab[numberoffile],FindFileData.cFileName);
numberoffile++;
}while(FindNextFile(findfilehandle,&FindFileData));
FindClose(findfilehandle);
}
*filelist=filepathtab;
return numberoffile;
}
char * getcurrentdirectory(char *currentdirectory,int buffersize)
{
memset(currentdirectory,0,buffersize);
if(GetModuleFileName(GetModuleHandle(NULL),currentdirectory,buffersize))
{
if(strrchr(currentdirectory,'\\'))
{
*((char*)strrchr(currentdirectory,'\\'))=0;
return currentdirectory;
}
}
return 0;
}
long find_first_file(char *folder,char *file,filefoundinfo* fileinfo)
{
HANDLE hfindfile;
char *folderstr;
WIN32_FIND_DATA FindFileData;
if(file)
{
folderstr=(char *) malloc(strlen(folder)+strlen(file)+2);
sprintf((char *)folderstr,"%s\\%s",folder,file);
}
else
{
folderstr=(char *) malloc(strlen(folder)+1);
sprintf((char *)folderstr,"%s",folder);
}
hfindfile=FindFirstFile(folderstr, &FindFileData);
if(hfindfile!=INVALID_HANDLE_VALUE)
{
sprintf(fileinfo->filename,"%s",FindFileData.cFileName);
fileinfo->isdirectory=0;
if(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
fileinfo->isdirectory=1;
}
fileinfo->size=FindFileData.nFileSizeLow;
free(folderstr);
return (long)hfindfile;
}
else
{
free(folderstr);
return -1;
}
return 0;
}
long find_next_file(long handleff,char *folder,char *file,filefoundinfo* fileinfo)
{
WIN32_FIND_DATA FindFileData;
long ret;
ret=FindNextFile((HANDLE)handleff,&FindFileData);
if(ret)
{
sprintf(fileinfo->filename,"%s",FindFileData.cFileName);
fileinfo->isdirectory=0;
if(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
fileinfo->isdirectory=1;
}
fileinfo->size=FindFileData.nFileSizeLow;
}
return ret;
}
long find_close(long handle)
{
FindClose((void*)handle);
return 0;
}
char * strupper(char * str)
{
int i;
i=0;
while(str[i])
{
if(str[i]>='a' && str[i]<='z')
{
str[i]=str[i]+('A'-'a');
}
i++;
}
return str;
}
char * strlower(char * str)
{
int i;
i=0;
while(str[i])
{
if(str[i]>='A' && str[i]<='Z')
{
str[i]=str[i]+('a'-'A');
}
i++;
}
return str;
}
+62
View File
@@ -0,0 +1,62 @@
/*
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator 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.
//
// HxCFloppyEmulator 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 HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
//#define CALLINGMETHOD __cdecl
typedef int (CALLINGMETHOD *THREADFUNCTION) (void* floppyemulator,void* hwemulator);
typedef struct threadinit_
{
THREADFUNCTION thread;
HXCFLOPPYEMULATOR * hxcfloppyemulatorcontext;
void * hwcontext;
}threadinit;
int getlistoffile(char * directorypath,char *** filelist);
char * getcurrentdirectory(char *currentdirectory,int buffersize);
int loaddiskplugins(HXCFLOPPYEMULATOR* floppycontext,FLOPPY * newfloppy,char *pluginpath);
int hxc_createthread(HXCFLOPPYEMULATOR* floppycontext,void* hwcontext,THREADFUNCTION thread,int priority);
//int createthread(HXCFLOPPYEMULATOR* floppycontext,THREADFUNCTION thread,int priority);
unsigned long hxc_createevent(HXCFLOPPYEMULATOR* floppycontext,unsigned char id);
int hxc_waitevent(HXCFLOPPYEMULATOR* floppycontext,int id,int timeout);
int hxc_setevent(HXCFLOPPYEMULATOR* floppycontext,unsigned char id);
unsigned long hxc_create_ftdi_event(HXCFLOPPYEMULATOR* floppycontext,unsigned char id);
void hxc_pause(int ms);
typedef struct filefoundinfo_
{
int isdirectory;
char filename[256];
int size;
}filefoundinfo;
long find_close(long handleff);
long find_next_file(long handleff,char *folder,char *file,filefoundinfo* fileinfo);
long find_first_file(char *folder,char *file,filefoundinfo* fileinfo);
char * strupper(char * str);