Removed superfluous ^Z at the end of files
This commit is contained in:
@@ -1,57 +1,57 @@
|
|||||||
Compiling the Source Code:
|
Compiling the Source Code:
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Well, for the moment, zsnes sources may be a little hard to compile. Here
|
Well, for the moment, zsnes sources may be a little hard to compile. Here
|
||||||
is a quick guide (based on my own experience and on a doc written by zsKnight)
|
is a quick guide (based on my own experience and on a doc written by zsKnight)
|
||||||
explaining how to compile zsnes. With these tools, I can build both dos and
|
explaining how to compile zsnes. With these tools, I can build both dos and
|
||||||
win version, I hope it will also work for you
|
win version, I hope it will also work for you
|
||||||
|
|
||||||
|
|
||||||
First, you need the following software:
|
First, you need the following software:
|
||||||
|
|
||||||
Dos port :
|
Dos port :
|
||||||
- NASM v0.98 : http://www.cryogen.com/nasm/
|
- NASM v0.98 : http://www.cryogen.com/nasm/
|
||||||
the version found on http://nasm.2y.net/ DOES NOT WORK
|
the version found on http://nasm.2y.net/ DOES NOT WORK
|
||||||
with zsnes sources. When you type nasm -r, you must get
|
with zsnes sources. When you type nasm -r, you must get
|
||||||
'NASM version 0.98' and not 'NASM version 0.98.08' if you
|
'NASM version 0.98' and not 'NASM version 0.98.08' if you
|
||||||
have the correct version
|
have the correct version
|
||||||
- DJGPP v2 or higher, (GCC also installed) : http://www.delorie.com/djgpp/
|
- DJGPP v2 or higher, (GCC also installed) : http://www.delorie.com/djgpp/
|
||||||
using the zip picker, the default choices are ok if you
|
using the zip picker, the default choices are ok if you
|
||||||
check C and C++ in the programming languages. You also need
|
check C and C++ in the programming languages. You also need
|
||||||
to get zlib which is available with the full distribution
|
to get zlib which is available with the full distribution
|
||||||
of djgpp. You can get it at :
|
of djgpp. You can get it at :
|
||||||
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2tk/zlib112b.zip
|
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2tk/zlib112b.zip
|
||||||
|
|
||||||
Then to build the executable, go to the src directory and type:
|
Then to build the executable, go to the src directory and type:
|
||||||
make -f makefile.dos
|
make -f makefile.dos
|
||||||
|
|
||||||
You may also want to compress zsnes.exe with upx (http://upx.tsx.org), it will
|
You may also want to compress zsnes.exe with upx (http://upx.tsx.org), it will
|
||||||
divide its size by 10.
|
divide its size by 10.
|
||||||
|
|
||||||
|
|
||||||
Windows port :
|
Windows port :
|
||||||
- GNU Make : it comes with djgpp
|
- GNU Make : it comes with djgpp
|
||||||
- NASM v0.98 : http://nasm.2y.net/ or http://www.cryogen.com/nasm/
|
- NASM v0.98 : http://nasm.2y.net/ or http://www.cryogen.com/nasm/
|
||||||
- MSVC++ 6.0 or higher : not freely available, you'll have to buy it
|
- MSVC++ 6.0 or higher : not freely available, you'll have to buy it
|
||||||
You need to run VCVARS32.BAT. If you get an
|
You need to run VCVARS32.BAT. If you get an
|
||||||
out of environment space error, type 'command /e:32768'
|
out of environment space error, type 'command /e:32768'
|
||||||
(to create a new command.com entity with more
|
(to create a new command.com entity with more
|
||||||
environment space)
|
environment space)
|
||||||
- DX7.0 SDK or higher : you can get it at microsoft.com. It is quite big.
|
- DX7.0 SDK or higher : you can get it at microsoft.com. It is quite big.
|
||||||
Also, edit makefile.win to set the correct path to your
|
Also, edit makefile.win to set the correct path to your
|
||||||
SDK. I also had some problems with vc++ using its own
|
SDK. I also had some problems with vc++ using its own
|
||||||
(old) directx headers instead of the sdk headers. I replaced
|
(old) directx headers instead of the sdk headers. I replaced
|
||||||
these old headers (in the include directory of vc++ dir)
|
these old headers (in the include directory of vc++ dir)
|
||||||
with the newer ones.
|
with the newer ones.
|
||||||
- zlib : http://www.info-zip.org/pub/infozip/zlib/
|
- zlib : http://www.info-zip.org/pub/infozip/zlib/
|
||||||
you need the Win9x/WinNT static library (the dll version doesn't
|
you need the Win9x/WinNT static library (the dll version doesn't
|
||||||
seem to work with zsnes). Name the static version zlib.lib and
|
seem to work with zsnes). Name the static version zlib.lib and
|
||||||
put it somewhere where vc++ will find it (for example, the lib
|
put it somewhere where vc++ will find it (for example, the lib
|
||||||
directory in vc++ dir).
|
directory in vc++ dir).
|
||||||
|
|
||||||
Don't forget to set the correct path to the directx sdk in makefile.win!
|
Don't forget to set the correct path to the directx sdk in makefile.win!
|
||||||
Then to build the executable, go to the src directory and type:
|
Then to build the executable, go to the src directory and type:
|
||||||
make -f makefile.win
|
make -f makefile.win
|
||||||
|
|
||||||
You may also want to compress zsnesw.exe with upx (http://upx.tsx.org), it will
|
You may also want to compress zsnesw.exe with upx (http://upx.tsx.org), it will
|
||||||
divide its size by 10.
|
divide its size by 10.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
ZSNES Open Source Authors:
|
ZSNES Open Source Authors:
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
zsKnight <zsknight@zsnes.com>
|
zsKnight <zsknight@zsnes.com>
|
||||||
_Demo_ <z_demo_z@users.sourceforge.net>
|
_Demo_ <z_demo_z@users.sourceforge.net>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1207
zsnes/dos/readme.txt
1207
zsnes/dos/readme.txt
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,343 +1,342 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
License is intended to guarantee your freedom to share and change free
|
License is intended to guarantee your freedom to share and change free
|
||||||
software--to make sure the software is free for all its users. This
|
software--to make sure the software is free for all its users. This
|
||||||
General Public License applies to most of the Free Software
|
General Public License applies to most of the Free Software
|
||||||
Foundation's software and to any other program whose authors commit to
|
Foundation's software and to any other program whose authors commit to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
have the freedom to distribute copies of free software (and charge for
|
have the freedom to distribute copies of free software (and charge for
|
||||||
this service if you wish), that you receive source code or can get it
|
this service if you wish), that you receive source code or can get it
|
||||||
if you want it, that you can change the software or use pieces of it
|
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.
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
To protect your rights, we need to make restrictions that forbid
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
These restrictions translate to certain responsibilities for you if you
|
These restrictions translate to certain responsibilities for you if you
|
||||||
distribute copies of the software, or if you modify it.
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
For example, if you distribute copies of such a program, whether
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
you have. You must make sure that they, too, receive or can get the
|
you have. You must make sure that they, too, receive or can get the
|
||||||
source code. And you must show them these terms so they know their
|
source code. And you must show them these terms so they know their
|
||||||
rights.
|
rights.
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
distribute and/or modify the software.
|
distribute and/or modify the software.
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
Also, for each author's protection and ours, we want to make certain
|
||||||
that everyone understands that there is no warranty for this free
|
that everyone understands that there is no warranty for this free
|
||||||
software. If the software is modified by someone else and passed on, we
|
software. If the software is modified by someone else and passed on, we
|
||||||
want its recipients to know that what they have is not the original, so
|
want its recipients to know that what they have is not the original, so
|
||||||
that any problems introduced by others will not reflect on the original
|
that any problems introduced by others will not reflect on the original
|
||||||
authors' reputations.
|
authors' reputations.
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
Finally, any free program is threatened constantly by software
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
program will individually obtain patent licenses, in effect making the
|
program will individually obtain patent licenses, in effect making the
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
0. This License applies to any program or other work which contains
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
under the terms of this General Public License. The "Program", below,
|
under the terms of this General Public License. The "Program", below,
|
||||||
refers to any such program or work, and a "work based on the Program"
|
refers to any such program or work, and a "work based on the Program"
|
||||||
means either the Program or any derivative work under copyright law:
|
means either the Program or any derivative work under copyright law:
|
||||||
that is to say, a work containing the Program or a portion of it,
|
that is to say, a work containing the Program or a portion of it,
|
||||||
either verbatim or with modifications and/or translated into another
|
either verbatim or with modifications and/or translated into another
|
||||||
language. (Hereinafter, translation is included without limitation in
|
language. (Hereinafter, translation is included without limitation in
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
Activities other than copying, distribution and modification are not
|
||||||
covered by this License; they are outside its scope. The act of
|
covered by this License; they are outside its scope. The act of
|
||||||
running the Program is not restricted, and the output from the Program
|
running the Program is not restricted, and the output from the Program
|
||||||
is covered only if its contents constitute a work based on the
|
is covered only if its contents constitute a work based on the
|
||||||
Program (independent of having been made by running the Program).
|
Program (independent of having been made by running the Program).
|
||||||
Whether that is true depends on what the Program does.
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
source code as you receive it, in any medium, provided that you
|
source code as you receive it, in any medium, provided that you
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
notices that refer to this License and to the absence of any warranty;
|
notices that refer to this License and to the absence of any warranty;
|
||||||
and give any other recipients of the Program a copy of this License
|
and give any other recipients of the Program a copy of this License
|
||||||
along with the Program.
|
along with the Program.
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
of it, thus forming a work based on the Program, and copy and
|
of it, thus forming a work based on the Program, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
above, provided that you also meet all of these conditions:
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
a) You must cause the modified files to carry prominent notices
|
||||||
stating that you changed the files and the date of any change.
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
b) You must cause any work that you distribute or publish, that in
|
||||||
whole or in part contains or is derived from the Program or any
|
whole or in part contains or is derived from the Program or any
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
parties under the terms of this License.
|
parties under the terms of this License.
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
c) If the modified program normally reads commands interactively
|
||||||
when run, you must cause it, when started running for such
|
when run, you must cause it, when started running for such
|
||||||
interactive use in the most ordinary way, to print or display an
|
interactive use in the most ordinary way, to print or display an
|
||||||
announcement including an appropriate copyright notice and a
|
announcement including an appropriate copyright notice and a
|
||||||
notice that there is no warranty (or else, saying that you provide
|
notice that there is no warranty (or else, saying that you provide
|
||||||
a warranty) and that users may redistribute the program under
|
a warranty) and that users may redistribute the program under
|
||||||
these conditions, and telling the user how to view a copy of this
|
these conditions, and telling the user how to view a copy of this
|
||||||
License. (Exception: if the Program itself is interactive but
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
and can be reasonably considered independent and separate works in
|
||||||
themselves, then this License, and its terms, do not apply to those
|
themselves, then this License, and its terms, do not apply to those
|
||||||
sections when you distribute them as separate works. But when you
|
sections when you distribute them as separate works. But when you
|
||||||
distribute the same sections as part of a whole which is a work based
|
distribute the same sections as part of a whole which is a work based
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
this License, whose permissions for other licensees extend to the
|
this License, whose permissions for other licensees extend to the
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
exercise the right to control the distribution of derivative or
|
exercise the right to control the distribution of derivative or
|
||||||
collective works based on the Program.
|
collective works based on the Program.
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
In addition, mere aggregation of another work not based on the Program
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
a storage or distribution medium does not bring the other work under
|
a storage or distribution medium does not bring the other work under
|
||||||
the scope of this License.
|
the scope of this License.
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
under Section 2) in object code or executable form under the terms of
|
under Section 2) in object code or executable form under the terms of
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
source code, which must be distributed under the terms of Sections
|
source code, which must be distributed under the terms of Sections
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
b) Accompany it with a written offer, valid for at least three
|
||||||
years, to give any third party, for a charge no more than your
|
years, to give any third party, for a charge no more than your
|
||||||
cost of physically performing source distribution, a complete
|
cost of physically performing source distribution, a complete
|
||||||
machine-readable copy of the corresponding source code, to be
|
machine-readable copy of the corresponding source code, to be
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
customarily used for software interchange; or,
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
c) Accompany it with the information you received as to the offer
|
||||||
to distribute corresponding source code. (This alternative is
|
to distribute corresponding source code. (This alternative is
|
||||||
allowed only for noncommercial distribution and only if you
|
allowed only for noncommercial distribution and only if you
|
||||||
received the program in object code or executable form with such
|
received the program in object code or executable form with such
|
||||||
an offer, in accord with Subsection b above.)
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
The source code for a work means the preferred form of the work for
|
||||||
making modifications to it. For an executable work, complete source
|
making modifications to it. For an executable work, complete source
|
||||||
code means all the source code for all modules it contains, plus any
|
code means all the source code for all modules it contains, plus any
|
||||||
associated interface definition files, plus the scripts used to
|
associated interface definition files, plus the scripts used to
|
||||||
control compilation and installation of the executable. However, as a
|
control compilation and installation of the executable. However, as a
|
||||||
special exception, the source code distributed need not include
|
special exception, the source code distributed need not include
|
||||||
anything that is normally distributed (in either source or binary
|
anything that is normally distributed (in either source or binary
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
operating system on which the executable runs, unless that component
|
operating system on which the executable runs, unless that component
|
||||||
itself accompanies the executable.
|
itself accompanies the executable.
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
If distribution of executable or object code is made by offering
|
||||||
access to copy from a designated place, then offering equivalent
|
access to copy from a designated place, then offering equivalent
|
||||||
access to copy the source code from the same place counts as
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
void, and will automatically terminate your rights under this License.
|
void, and will automatically terminate your rights under this License.
|
||||||
However, parties who have received copies, or rights, from you under
|
However, parties who have received copies, or rights, from you under
|
||||||
this License will not have their licenses terminated so long as such
|
this License will not have their licenses terminated so long as such
|
||||||
parties remain in full compliance.
|
parties remain in full compliance.
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
5. You are not required to accept this License, since you have not
|
||||||
signed it. However, nothing else grants you permission to modify or
|
signed it. However, nothing else grants you permission to modify or
|
||||||
distribute the Program or its derivative works. These actions are
|
distribute the Program or its derivative works. These actions are
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
modifying or distributing the Program (or any work based on the
|
modifying or distributing the Program (or any work based on the
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
all its terms and conditions for copying, distributing or modifying
|
all its terms and conditions for copying, distributing or modifying
|
||||||
the Program or works based on it.
|
the Program or works based on it.
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
Program), the recipient automatically receives a license from the
|
Program), the recipient automatically receives a license from the
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
these terms and conditions. You may not impose any further
|
these terms and conditions. You may not impose any further
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties to
|
You are not responsible for enforcing compliance by third parties to
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot
|
excuse you from the conditions of this License. If you cannot
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
License and any other pertinent obligations, then as a consequence you
|
License and any other pertinent obligations, then as a consequence you
|
||||||
may not distribute the Program at all. For example, if a patent
|
may not distribute the Program at all. For example, if a patent
|
||||||
license would not permit royalty-free redistribution of the Program by
|
license would not permit royalty-free redistribution of the Program by
|
||||||
all those who receive copies directly or indirectly through you, then
|
all those who receive copies directly or indirectly through you, then
|
||||||
the only way you could satisfy both it and this License would be to
|
the only way you could satisfy both it and this License would be to
|
||||||
refrain entirely from distribution of the Program.
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
If any portion of this section is held invalid or unenforceable under
|
||||||
any particular circumstance, the balance of the section is intended to
|
any particular circumstance, the balance of the section is intended to
|
||||||
apply and the section as a whole is intended to apply in other
|
apply and the section as a whole is intended to apply in other
|
||||||
circumstances.
|
circumstances.
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
It is not the purpose of this section to induce you to infringe any
|
||||||
patents or other property right claims or to contest validity of any
|
patents or other property right claims or to contest validity of any
|
||||||
such claims; this section has the sole purpose of protecting the
|
such claims; this section has the sole purpose of protecting the
|
||||||
integrity of the free software distribution system, which is
|
integrity of the free software distribution system, which is
|
||||||
implemented by public license practices. Many people have made
|
implemented by public license practices. Many people have made
|
||||||
generous contributions to the wide range of software distributed
|
generous contributions to the wide range of software distributed
|
||||||
through that system in reliance on consistent application of that
|
through that system in reliance on consistent application of that
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
to distribute software through any other system and a licensee cannot
|
to distribute software through any other system and a licensee cannot
|
||||||
impose that choice.
|
impose that choice.
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
original copyright holder who places the Program under this License
|
||||||
may add an explicit geographical distribution limitation excluding
|
may add an explicit geographical distribution limitation excluding
|
||||||
those countries, so that distribution is permitted only in or among
|
those countries, so that distribution is permitted only in or among
|
||||||
countries not thus excluded. In such case, this License incorporates
|
countries not thus excluded. In such case, this License incorporates
|
||||||
the limitation as if written in the body of this License.
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
of the General Public License from time to time. Such new versions will
|
of the General Public License from time to time. Such new versions will
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the Program
|
||||||
specifies a version number of this License which applies to it and "any
|
specifies a version number of this License which applies to it and "any
|
||||||
later version", you have the option of following the terms and conditions
|
later version", you have the option of following the terms and conditions
|
||||||
either of that version or of any later version published by the Free
|
either of that version or of any later version published by the Free
|
||||||
Software Foundation. If the Program does not specify a version number of
|
Software Foundation. If the Program does not specify a version number of
|
||||||
this License, you may choose any version ever published by the Free Software
|
this License, you may choose any version ever published by the Free Software
|
||||||
Foundation.
|
Foundation.
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
programs whose distribution conditions are different, write to the author
|
programs whose distribution conditions are different, write to the author
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
of preserving the free status of all derivatives of our free software and
|
of preserving the free status of all derivatives of our free software and
|
||||||
of promoting the sharing and reuse of software generally.
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
REPAIR OR CORRECTION.
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
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
|
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
|
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
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
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
|
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.
|
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 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
|
to attach them to the start of each source file to most effectively
|
||||||
convey the exclusion of warranty; and each file should have at least
|
convey the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
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.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) <year> <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program is interactive, make it output a short notice like this
|
||||||
when it starts in an interactive mode:
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
parts of the General Public License. Of course, the commands you use may
|
parts of the General Public License. Of course, the commands you use may
|
||||||
be called something other than `show w' and `show c'; they could even be
|
be called something other than `show w' and `show c'; they could even be
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
You should also get your employer (if you work as a programmer) or your
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
necessary. Here is a sample; alter the names:
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
<signature of Ty Coon>, 1 April 1989
|
||||||
Ty Coon, President of Vice
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
This General Public License does not permit incorporating your program into
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
consider it more useful to permit linking proprietary applications with the
|
consider it more useful to permit linking proprietary applications with the
|
||||||
library. If this is what you want to do, use the GNU Library General
|
library. If this is what you want to do, use the GNU Library General
|
||||||
Public License instead of this License.
|
Public License instead of this License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
If you need help to compile zsnes, read install.txt.
|
If you need help to compile zsnes, read install.txt.
|
||||||
If you need help to browse the sources, read srcinfo.txt.
|
If you need help to browse the sources, read srcinfo.txt.
|
||||||
|
|
||||||
For more information about zsnes development, check http://zsnes.sourceforge.net
|
For more information about zsnes development, check http://zsnes.sourceforge.net
|
||||||
The official website is at http://www.zsnes.com
|
The official website is at http://www.zsnes.com
|
||||||
@@ -1,29 +1,28 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%define USERNAMEN 'Public'
|
%define USERNAMEN 'Public'
|
||||||
%define USERNAMEC 'P'^76,'b'^89,'-'^178,'|'^34,'-'^217
|
%define USERNAMEC 'P'^76,'b'^89,'-'^178,'|'^34,'-'^217
|
||||||
%define USERNAMEI 0 ; 1
|
%define USERNAMEI 0 ; 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,89 +1,88 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%macro TORNb 1 ; V
|
%macro TORNb 1 ; V
|
||||||
FETCHPIPE
|
FETCHPIPE
|
||||||
test dword [SfxB],1
|
test dword [SfxB],1
|
||||||
jnz .VersionB
|
jnz .VersionB
|
||||||
mov edi, SfxR0+%1*4
|
mov edi, SfxR0+%1*4
|
||||||
inc ebp ; Increase program counter
|
inc ebp ; Increase program counter
|
||||||
mov eax,ebp
|
mov eax,ebp
|
||||||
sub eax,[SfxCPB]
|
sub eax,[SfxCPB]
|
||||||
mov dword[withr15sk],1
|
mov dword[withr15sk],1
|
||||||
mov [SfxR15],eax
|
mov [SfxR15],eax
|
||||||
call [FxTableb+ecx*4]
|
call [FxTableb+ecx*4]
|
||||||
mov edi,SfxR0
|
mov edi,SfxR0
|
||||||
ret
|
ret
|
||||||
.VersionB
|
.VersionB
|
||||||
mov eax,[esi] ; Read Source
|
mov eax,[esi] ; Read Source
|
||||||
mov dword[withr15sk],1
|
mov dword[withr15sk],1
|
||||||
inc ebp ; Increase program counter
|
inc ebp ; Increase program counter
|
||||||
mov [SfxR0+%1*4],eax ; Write
|
mov [SfxR0+%1*4],eax ; Write
|
||||||
CLRFLAGS
|
CLRFLAGS
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro FROMRNb 1 ; V
|
%macro FROMRNb 1 ; V
|
||||||
FETCHPIPE
|
FETCHPIPE
|
||||||
test dword [SfxB],1
|
test dword [SfxB],1
|
||||||
jnz .VersionB
|
jnz .VersionB
|
||||||
mov esi,SfxR0+%1*4
|
mov esi,SfxR0+%1*4
|
||||||
inc ebp ; Increase program counter
|
inc ebp ; Increase program counter
|
||||||
call [FxTable+ecx*4]
|
call [FxTable+ecx*4]
|
||||||
mov esi,SfxR0
|
mov esi,SfxR0
|
||||||
ret
|
ret
|
||||||
.VersionB
|
.VersionB
|
||||||
mov eax,[SfxR0+%1*4] ; Read
|
mov eax,[SfxR0+%1*4] ; Read
|
||||||
inc ebp
|
inc ebp
|
||||||
mov [edi],eax ; Write Destination
|
mov [edi],eax ; Write Destination
|
||||||
mov [SfxSignZero],eax
|
mov [SfxSignZero],eax
|
||||||
shr al,7
|
shr al,7
|
||||||
mov byte[SfxOverflow],al
|
mov byte[SfxOverflow],al
|
||||||
CLRFLAGS
|
CLRFLAGS
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro TORNc 1 ; V
|
%macro TORNc 1 ; V
|
||||||
FETCHPIPE
|
FETCHPIPE
|
||||||
mov eax,[esi] ; Read Source
|
mov eax,[esi] ; Read Source
|
||||||
inc ebp ; Increase program counter
|
inc ebp ; Increase program counter
|
||||||
mov [SfxR0+%1*4],eax ; Write
|
mov [SfxR0+%1*4],eax ; Write
|
||||||
CLRFLAGS
|
CLRFLAGS
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
%macro FROMRNc 1 ; V
|
%macro FROMRNc 1 ; V
|
||||||
FETCHPIPE
|
FETCHPIPE
|
||||||
mov eax,[SfxR0+%1*4] ; Read
|
mov eax,[SfxR0+%1*4] ; Read
|
||||||
inc ebp
|
inc ebp
|
||||||
mov [edi],eax ; Write Destination
|
mov [edi],eax ; Write Destination
|
||||||
mov [SfxSignZero],eax
|
mov [SfxSignZero],eax
|
||||||
shr al,7
|
shr al,7
|
||||||
mov byte[SfxOverflow],al
|
mov byte[SfxOverflow],al
|
||||||
CLRFLAGS
|
CLRFLAGS
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,365 +1,364 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
EXTSYM xa,xx,xy,xd,xdb,xpb,xs,xe,initaddrl,UpdateDPage,wramdata,IRAM,cycpbl,SA1DoIRQ
|
EXTSYM xa,xx,xy,xd,xdb,xpb,xs,xe,initaddrl,UpdateDPage,wramdata,IRAM,cycpbl,SA1DoIRQ
|
||||||
EXTSYM spcnumread,SA1IRQEn,nextopcodesa1,debugds
|
EXTSYM spcnumread,SA1IRQEn,nextopcodesa1,debugds
|
||||||
EXTSYM SNSRegP,SNSRegE,SNSRegPCS,SA1Ptr,SNSPtr,nmiv,irqv,nmiv2,irqv2,snesmap2,SA1tablead
|
EXTSYM SNSRegP,SNSRegE,SNSRegPCS,SA1Ptr,SNSPtr,nmiv,irqv,nmiv2,irqv2,snesmap2,SA1tablead
|
||||||
EXTSYM SA1xpb,SA1RegP,wramdataa,SA1TimerVal,debuggeron
|
EXTSYM SA1xpb,SA1RegP,wramdataa,SA1TimerVal,debuggeron
|
||||||
EXTSYM SA1RegE,SA1RegPCS,SA1BWPtr,SNSBWPtr,CurBWPtr,SA1NMIV,SA1IRQV,debstop,tablead
|
EXTSYM SA1RegE,SA1RegPCS,SA1BWPtr,SNSBWPtr,CurBWPtr,SA1NMIV,SA1IRQV,debstop,tablead
|
||||||
EXTSYM membank0w8,romdata,SA1LBound,SA1UBound,SA1SH,SA1SHb
|
EXTSYM membank0w8,romdata,SA1LBound,SA1UBound,SA1SH,SA1SHb
|
||||||
EXTSYM stackor,stackand,snesmmap,SA1xs,SA1IRQExec
|
EXTSYM stackor,stackand,snesmmap,SA1xs,SA1IRQExec
|
||||||
EXTSYM SA1Message,Sflagnz,Sflagc,Sflago
|
EXTSYM SA1Message,Sflagnz,Sflagc,Sflago
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; In exec loop, jump to execloop if SA1Status != 0
|
; In exec loop, jump to execloop if SA1Status != 0
|
||||||
; *** Disable spc700 if possible ***
|
; *** Disable spc700 if possible ***
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NEWSYM SA1Status, db 0 ; 0 = 65816, 1 = SA1A, 2 = SA1B
|
NEWSYM SA1Status, db 0 ; 0 = 65816, 1 = SA1A, 2 = SA1B
|
||||||
|
|
||||||
NEWSYM CurrentExecSA1, db 0
|
NEWSYM CurrentExecSA1, db 0
|
||||||
NEWSYM CurrentCPU, db 0
|
NEWSYM CurrentCPU, db 0
|
||||||
|
|
||||||
ALIGN32
|
ALIGN32
|
||||||
NEWSYM prevedi, dd 0
|
NEWSYM prevedi, dd 0
|
||||||
|
|
||||||
%macro SA1Debugb 0
|
%macro SA1Debugb 0
|
||||||
pushad
|
pushad
|
||||||
sub esi,[initaddrl]
|
sub esi,[initaddrl]
|
||||||
mov [SA1xpc],esi
|
mov [SA1xpc],esi
|
||||||
call nextopcodesa1
|
call nextopcodesa1
|
||||||
popad
|
popad
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
xor dh,dh
|
xor dh,dh
|
||||||
inc esi
|
inc esi
|
||||||
call dword near [edi+ebx*4]
|
call dword near [edi+ebx*4]
|
||||||
dec esi
|
dec esi
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SA1Debug 0
|
%macro SA1Debug 0
|
||||||
; debug version
|
; debug version
|
||||||
test byte[debugds],01h
|
test byte[debugds],01h
|
||||||
jz near .nodebug
|
jz near .nodebug
|
||||||
cmp byte[debuggeron],0
|
cmp byte[debuggeron],0
|
||||||
je near .nodebug
|
je near .nodebug
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
SA1Debugb
|
SA1Debugb
|
||||||
jmp .debug
|
jmp .debug
|
||||||
.nodebug
|
.nodebug
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
NEWSYM SA1Swap
|
NEWSYM SA1Swap
|
||||||
mov ecx,[SA1BWPtr]
|
mov ecx,[SA1BWPtr]
|
||||||
mov eax,[SA1Ptr] ; small speed hack
|
mov eax,[SA1Ptr] ; small speed hack
|
||||||
test byte[SA1DoIRQ],1
|
test byte[SA1DoIRQ],1
|
||||||
jnz near .sa1exec3
|
jnz near .sa1exec3
|
||||||
cmp byte[IRAM],0
|
cmp byte[IRAM],0
|
||||||
jne .sa1exec2
|
jne .sa1exec2
|
||||||
cmp dword[eax],0FCF000A5h
|
cmp dword[eax],0FCF000A5h
|
||||||
je near .nosa1exec
|
je near .nosa1exec
|
||||||
cmp dword[eax-2],0FCF000A5h
|
cmp dword[eax-2],0FCF000A5h
|
||||||
je near .nosa1exec
|
je near .nosa1exec
|
||||||
.sa1exec2
|
.sa1exec2
|
||||||
cmp byte[SA1SHb],1
|
cmp byte[SA1SHb],1
|
||||||
je near .nosa1execb
|
je near .nosa1execb
|
||||||
|
|
||||||
cmp word[ecx+72A4h],0
|
cmp word[ecx+72A4h],0
|
||||||
jnz .sa1exec
|
jnz .sa1exec
|
||||||
cmp dword[eax],0F072A4ADh
|
cmp dword[eax],0F072A4ADh
|
||||||
je near .nosa1execb
|
je near .nosa1execb
|
||||||
.sa1exec
|
.sa1exec
|
||||||
cmp byte[IRAM+72h],0
|
cmp byte[IRAM+72h],0
|
||||||
jne .sa1exec3
|
jne .sa1exec3
|
||||||
cmp dword[eax],0F03072ADh
|
cmp dword[eax],0F03072ADh
|
||||||
je near .nosa1execb
|
je near .nosa1execb
|
||||||
.sa1exec3
|
.sa1exec3
|
||||||
.yesdebugr
|
.yesdebugr
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
; store all snes 65816 stuff
|
; store all snes 65816 stuff
|
||||||
mov [SNSRegP],dl
|
mov [SNSRegP],dl
|
||||||
mov eax,[initaddrl]
|
mov eax,[initaddrl]
|
||||||
mov [prevedi],edi
|
mov [prevedi],edi
|
||||||
mov [SNSRegPCS],eax
|
mov [SNSRegPCS],eax
|
||||||
mov [SNSPtr],esi
|
mov [SNSPtr],esi
|
||||||
; restore all sa1 65816 stuff
|
; restore all sa1 65816 stuff
|
||||||
mov dl,[SA1RegP]
|
mov dl,[SA1RegP]
|
||||||
mov eax,[SA1RegPCS]
|
mov eax,[SA1RegPCS]
|
||||||
mov [initaddrl],eax
|
mov [initaddrl],eax
|
||||||
mov eax,[SA1BWPtr]
|
mov eax,[SA1BWPtr]
|
||||||
mov [CurBWPtr],eax
|
mov [CurBWPtr],eax
|
||||||
mov esi,[SA1Ptr]
|
mov esi,[SA1Ptr]
|
||||||
mov dword[snesmap2],IRAM
|
mov dword[snesmap2],IRAM
|
||||||
mov dword[wramdata],IRAM
|
mov dword[wramdata],IRAM
|
||||||
; Check if IRQ is executed on SA-1
|
; Check if IRQ is executed on SA-1
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,dl
|
mov al,dl
|
||||||
add dh,25
|
add dh,25
|
||||||
mov edi,[SA1tablead+eax*4]
|
mov edi,[SA1tablead+eax*4]
|
||||||
mov byte[SA1Status],1
|
mov byte[SA1Status],1
|
||||||
test dword[SA1DoIRQ],0FF000003h
|
test dword[SA1DoIRQ],0FF000003h
|
||||||
jnz near .switchirq
|
jnz near .switchirq
|
||||||
.returnirq
|
.returnirq
|
||||||
|
|
||||||
; SA1Debug
|
; SA1Debug
|
||||||
|
|
||||||
cmp byte[SA1SH],1
|
cmp byte[SA1SH],1
|
||||||
je near .speedhack
|
je near .speedhack
|
||||||
|
|
||||||
; non debug version
|
; non debug version
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
inc esi
|
inc esi
|
||||||
call dword near [edi+ebx*4]
|
call dword near [edi+ebx*4]
|
||||||
dec esi
|
dec esi
|
||||||
.debug
|
.debug
|
||||||
|
|
||||||
; store all sa1 65816 stuff
|
; store all sa1 65816 stuff
|
||||||
mov [SA1RegP],dl
|
mov [SA1RegP],dl
|
||||||
mov eax,[initaddrl]
|
mov eax,[initaddrl]
|
||||||
mov [SA1RegPCS],eax
|
mov [SA1RegPCS],eax
|
||||||
mov [SA1Ptr],esi
|
mov [SA1Ptr],esi
|
||||||
; restore all snes 65816 stuff
|
; restore all snes 65816 stuff
|
||||||
mov dl,[SNSRegP]
|
mov dl,[SNSRegP]
|
||||||
mov eax,[SNSRegPCS]
|
mov eax,[SNSRegPCS]
|
||||||
mov [initaddrl],eax
|
mov [initaddrl],eax
|
||||||
mov eax,[SNSBWPtr]
|
mov eax,[SNSBWPtr]
|
||||||
mov [CurBWPtr],eax
|
mov [CurBWPtr],eax
|
||||||
mov dword[wramdata],wramdataa
|
mov dword[wramdata],wramdataa
|
||||||
mov esi,[SNSPtr]
|
mov esi,[SNSPtr]
|
||||||
mov eax,[wramdata]
|
mov eax,[wramdata]
|
||||||
mov dword[snesmap2],eax
|
mov dword[snesmap2],eax
|
||||||
mov edi,[prevedi]
|
mov edi,[prevedi]
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
add dh,11
|
add dh,11
|
||||||
inc byte[CurrentExecSA1]
|
inc byte[CurrentExecSA1]
|
||||||
mov byte[SA1Status],0
|
mov byte[SA1Status],0
|
||||||
add dword[SA1TimerVal],23
|
add dword[SA1TimerVal],23
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.speedhack
|
.speedhack
|
||||||
add dh,100
|
add dh,100
|
||||||
|
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
inc esi
|
inc esi
|
||||||
call dword near [edi+ebx*4]
|
call dword near [edi+ebx*4]
|
||||||
dec esi
|
dec esi
|
||||||
; store all sa1 65816 stuff
|
; store all sa1 65816 stuff
|
||||||
mov [SA1RegP],dl
|
mov [SA1RegP],dl
|
||||||
mov eax,[initaddrl]
|
mov eax,[initaddrl]
|
||||||
mov [SA1RegPCS],eax
|
mov [SA1RegPCS],eax
|
||||||
mov [SA1Ptr],esi
|
mov [SA1Ptr],esi
|
||||||
; restore all snes 65816 stuff
|
; restore all snes 65816 stuff
|
||||||
mov dl,[SNSRegP]
|
mov dl,[SNSRegP]
|
||||||
mov eax,[SNSRegPCS]
|
mov eax,[SNSRegPCS]
|
||||||
mov [initaddrl],eax
|
mov [initaddrl],eax
|
||||||
mov eax,[SNSBWPtr]
|
mov eax,[SNSBWPtr]
|
||||||
mov [CurBWPtr],eax
|
mov [CurBWPtr],eax
|
||||||
mov dword[wramdata],wramdataa
|
mov dword[wramdata],wramdataa
|
||||||
mov esi,[SNSPtr]
|
mov esi,[SNSPtr]
|
||||||
mov eax,[wramdata]
|
mov eax,[wramdata]
|
||||||
mov dword[snesmap2],eax
|
mov dword[snesmap2],eax
|
||||||
mov edi,[prevedi]
|
mov edi,[prevedi]
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
add byte[CurrentExecSA1],4
|
add byte[CurrentExecSA1],4
|
||||||
mov byte[SA1Status],0
|
mov byte[SA1Status],0
|
||||||
add dword[SA1TimerVal],23
|
add dword[SA1TimerVal],23
|
||||||
; xor dh,dh
|
; xor dh,dh
|
||||||
mov dh,18
|
mov dh,18
|
||||||
cmp esi,dword[SA1LBound]
|
cmp esi,dword[SA1LBound]
|
||||||
jb .stoph
|
jb .stoph
|
||||||
cmp esi,dword[SA1UBound]
|
cmp esi,dword[SA1UBound]
|
||||||
ja .stoph
|
ja .stoph
|
||||||
ret
|
ret
|
||||||
.stoph
|
.stoph
|
||||||
mov byte[SA1SH],0
|
mov byte[SA1SH],0
|
||||||
ret
|
ret
|
||||||
.nosa1execb
|
.nosa1execb
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
add dh,15
|
add dh,15
|
||||||
add byte[CurrentExecSA1],2
|
add byte[CurrentExecSA1],2
|
||||||
mov byte[SA1Status],0
|
mov byte[SA1Status],0
|
||||||
ret
|
ret
|
||||||
.nosa1exec
|
.nosa1exec
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
add dh,22
|
add dh,22
|
||||||
add byte[CurrentExecSA1],2
|
add byte[CurrentExecSA1],2
|
||||||
mov byte[SA1Status],0
|
mov byte[SA1Status],0
|
||||||
ret
|
ret
|
||||||
.switchirq
|
.switchirq
|
||||||
test dword[SA1DoIRQ],3
|
test dword[SA1DoIRQ],3
|
||||||
jz .notirq
|
jz .notirq
|
||||||
test dword[SA1DoIRQ],1
|
test dword[SA1DoIRQ],1
|
||||||
jz .nmi
|
jz .nmi
|
||||||
and byte[SA1DoIRQ],0FEh
|
and byte[SA1DoIRQ],0FEh
|
||||||
call SA1switchtovirq
|
call SA1switchtovirq
|
||||||
jmp .returnirq
|
jmp .returnirq
|
||||||
.nmi
|
.nmi
|
||||||
and byte[SA1DoIRQ],0FDh
|
and byte[SA1DoIRQ],0FDh
|
||||||
call SA1switchtonmi
|
call SA1switchtonmi
|
||||||
jmp .returnirq
|
jmp .returnirq
|
||||||
.notirq
|
.notirq
|
||||||
dec byte[SA1DoIRQ+3]
|
dec byte[SA1DoIRQ+3]
|
||||||
jz .hack
|
jz .hack
|
||||||
jmp .returnirq
|
jmp .returnirq
|
||||||
.hack
|
.hack
|
||||||
or byte[SA1DoIRQ],8
|
or byte[SA1DoIRQ],8
|
||||||
jmp .returnirq
|
jmp .returnirq
|
||||||
|
|
||||||
NEWSYM SA1xpc, dd 0
|
NEWSYM SA1xpc, dd 0
|
||||||
|
|
||||||
%macro makedl 0
|
%macro makedl 0
|
||||||
and dl,00111100b
|
and dl,00111100b
|
||||||
test dword[Sflagnz],18000h
|
test dword[Sflagnz],18000h
|
||||||
jz %%noneg
|
jz %%noneg
|
||||||
or dl,80h
|
or dl,80h
|
||||||
%%noneg
|
%%noneg
|
||||||
test dword[Sflagnz],0FFFFh
|
test dword[Sflagnz],0FFFFh
|
||||||
jnz %%nozero
|
jnz %%nozero
|
||||||
or dl,02h
|
or dl,02h
|
||||||
%%nozero
|
%%nozero
|
||||||
test dword[Sflagc],0FFh
|
test dword[Sflagc],0FFh
|
||||||
jz %%nocarry
|
jz %%nocarry
|
||||||
or dl,01h
|
or dl,01h
|
||||||
%%nocarry
|
%%nocarry
|
||||||
test dword[Sflago],0FFh
|
test dword[Sflago],0FFh
|
||||||
jz %%nov
|
jz %%nov
|
||||||
or dl,40h
|
or dl,40h
|
||||||
%%nov
|
%%nov
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
NEWSYM SA1switchtonmi
|
NEWSYM SA1switchtonmi
|
||||||
mov al,byte[SA1Message]
|
mov al,byte[SA1Message]
|
||||||
mov byte[SA1Message+2],al
|
mov byte[SA1Message+2],al
|
||||||
mov byte[SA1IRQExec+2],1
|
mov byte[SA1IRQExec+2],1
|
||||||
mov ebx,esi
|
mov ebx,esi
|
||||||
sub ebx,[initaddrl]
|
sub ebx,[initaddrl]
|
||||||
mov [SA1xpc],bx
|
mov [SA1xpc],bx
|
||||||
|
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov cx,[SA1xs]
|
mov cx,[SA1xs]
|
||||||
mov al,[SA1xpb]
|
mov al,[SA1xpb]
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
mov al,[SA1xpc+1]
|
mov al,[SA1xpc+1]
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
mov al,[SA1xpc]
|
mov al,[SA1xpc]
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
makedl
|
makedl
|
||||||
mov al,dl
|
mov al,dl
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
mov [SA1xs],cx
|
mov [SA1xs],cx
|
||||||
|
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov [SA1xpb],bl
|
mov [SA1xpb],bl
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[SA1NMIV]
|
mov ax,[SA1NMIV]
|
||||||
and dl,11110011b
|
and dl,11110011b
|
||||||
or dl,00000100b
|
or dl,00000100b
|
||||||
test ax,8000h
|
test ax,8000h
|
||||||
jz .loweraddr
|
jz .loweraddr
|
||||||
mov esi,[snesmmap+ebx*4]
|
mov esi,[snesmmap+ebx*4]
|
||||||
mov [initaddrl],esi
|
mov [initaddrl],esi
|
||||||
add esi,eax
|
add esi,eax
|
||||||
ret
|
ret
|
||||||
.loweraddr
|
.loweraddr
|
||||||
mov esi,[snesmap2+ebx*4]
|
mov esi,[snesmap2+ebx*4]
|
||||||
mov [initaddrl],esi
|
mov [initaddrl],esi
|
||||||
add esi,eax
|
add esi,eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM SA1switchtovirq
|
NEWSYM SA1switchtovirq
|
||||||
mov al,byte[SA1Message]
|
mov al,byte[SA1Message]
|
||||||
mov byte[SA1Message+2],al
|
mov byte[SA1Message+2],al
|
||||||
mov byte[SA1IRQExec+1],1
|
mov byte[SA1IRQExec+1],1
|
||||||
mov ebx,esi
|
mov ebx,esi
|
||||||
sub ebx,[initaddrl]
|
sub ebx,[initaddrl]
|
||||||
mov [SA1xpc],bx
|
mov [SA1xpc],bx
|
||||||
|
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov cx,[SA1xs]
|
mov cx,[SA1xs]
|
||||||
mov al,[SA1xpb]
|
mov al,[SA1xpb]
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
mov al,[SA1xpc+1]
|
mov al,[SA1xpc+1]
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
mov al,[SA1xpc]
|
mov al,[SA1xpc]
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
makedl
|
makedl
|
||||||
mov al,dl
|
mov al,dl
|
||||||
call membank0w8
|
call membank0w8
|
||||||
|
|
||||||
dec cx
|
dec cx
|
||||||
and cx,word[stackand]
|
and cx,word[stackand]
|
||||||
or cx,word[stackor]
|
or cx,word[stackor]
|
||||||
mov [SA1xs],cx
|
mov [SA1xs],cx
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov [SA1xpb],bl
|
mov [SA1xpb],bl
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,[SA1IRQV]
|
mov ax,[SA1IRQV]
|
||||||
and dl,11110011b
|
and dl,11110011b
|
||||||
or dl,00000100b
|
or dl,00000100b
|
||||||
test ax,8000h
|
test ax,8000h
|
||||||
jz .loweraddr
|
jz .loweraddr
|
||||||
mov esi,[snesmmap+ebx*4]
|
mov esi,[snesmmap+ebx*4]
|
||||||
mov [initaddrl],esi
|
mov [initaddrl],esi
|
||||||
add esi,eax
|
add esi,eax
|
||||||
ret
|
ret
|
||||||
.loweraddr
|
.loweraddr
|
||||||
mov esi,[snesmap2+ebx*4]
|
mov esi,[snesmap2+ebx*4]
|
||||||
mov [initaddrl],esi
|
mov [initaddrl],esi
|
||||||
add esi,eax
|
add esi,eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,409 +1,408 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; Address Modes
|
; Address Modes
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
; 1. Immediate Addressing -- # - DONE IN PROGRAM
|
; 1. Immediate Addressing -- # - DONE IN PROGRAM
|
||||||
|
|
||||||
%macro addr_I_8brni 0
|
%macro addr_I_8brni 0
|
||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_I_16brni 0
|
%macro addr_I_16brni 0
|
||||||
mov ax,[esi]
|
mov ax,[esi]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 2. Absolute -- a (TESTED)
|
; 2. Absolute -- a (TESTED)
|
||||||
|
|
||||||
%macro addr_a_8brni 0
|
%macro addr_a_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_a_16brni 0
|
%macro addr_a_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 3. Absolute Long -- al
|
; 3. Absolute Long -- al
|
||||||
|
|
||||||
%macro addr_al_8brni 0
|
%macro addr_al_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_al_16brni 0
|
%macro addr_al_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 4. Direct -- d (TESTED)
|
; 4. Direct -- d (TESTED)
|
||||||
|
|
||||||
%macro addr_d_8brni 0
|
%macro addr_d_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR8]
|
call dword near [DPageR8]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_d_16brni 0
|
%macro addr_d_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 5. Accumulator -- A
|
; 5. Accumulator -- A
|
||||||
|
|
||||||
%macro addr_A_8brni 0
|
%macro addr_A_8brni 0
|
||||||
mov al,[xa]
|
mov al,[xa]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_A_16brni 0
|
%macro addr_A_16brni 0
|
||||||
mov ax,[xa]
|
mov ax,[xa]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 7. Direct Indirect Indexed -- (d),y
|
; 7. Direct Indirect Indexed -- (d),y
|
||||||
|
|
||||||
%macro addr_BdBCy_8brni 0
|
%macro addr_BdBCy_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdBCy_16brni 0
|
%macro addr_BdBCy_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 8. Direct Indirect Indexed Long -- [d],y
|
; 8. Direct Indirect Indexed Long -- [d],y
|
||||||
|
|
||||||
%macro addr_LdLCy_8brni 0
|
%macro addr_LdLCy_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_LdLCy_16brni 0
|
%macro addr_LdLCy_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 9. Direct Indexed Indirect -- (d,x)
|
; 9. Direct Indexed Indirect -- (d,x)
|
||||||
|
|
||||||
%macro addr_BdCxB_8brni 0
|
%macro addr_BdCxB_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdCxB_16brni 0
|
%macro addr_BdCxB_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 10. Direct Indexed With X -- d,x
|
; 10. Direct Indexed With X -- d,x
|
||||||
|
|
||||||
%macro addr_dCx_8brni 0
|
%macro addr_dCx_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCx_16brni 0
|
%macro addr_dCx_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 11. Direct Indexed With Y -- d,y
|
; 11. Direct Indexed With Y -- d,y
|
||||||
|
|
||||||
%macro addr_dCy_8brni 0
|
%macro addr_dCy_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCy_16brni 0
|
%macro addr_dCy_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 12. Absolute Indexed With X -- a,x
|
; 12. Absolute Indexed With X -- a,x
|
||||||
|
|
||||||
%macro addr_aCx_8brni 0
|
%macro addr_aCx_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_aCx_16brni 0
|
%macro addr_aCx_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 13. Absolute Indexed With Y -- a,y
|
; 13. Absolute Indexed With Y -- a,y
|
||||||
|
|
||||||
%macro addr_aCy_8brni 0
|
%macro addr_aCy_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_aCy_16brni 0
|
%macro addr_aCy_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 14. Absolute Long Indexed With X -- al,x
|
; 14. Absolute Long Indexed With X -- al,x
|
||||||
|
|
||||||
%macro addr_alCx_8brni 0
|
%macro addr_alCx_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_alCx_16brni 0
|
%macro addr_alCx_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 18. Direct Indirect -- (d)
|
; 18. Direct Indirect -- (d)
|
||||||
; ___________________
|
; ___________________
|
||||||
; Instruction: | opcode | offset |
|
; Instruction: | opcode | offset |
|
||||||
; ~~~~~~~~~~~~~~~~~~~
|
; ~~~~~~~~~~~~~~~~~~~
|
||||||
; | Direct Register |
|
; | Direct Register |
|
||||||
; + | offset |
|
; + | offset |
|
||||||
; ---------------------
|
; ---------------------
|
||||||
; | 00 | direct address |
|
; | 00 | direct address |
|
||||||
; then:
|
; then:
|
||||||
; | 00 | (direct address) |
|
; | 00 | (direct address) |
|
||||||
; + | DB |
|
; + | DB |
|
||||||
; -------------------------------
|
; -------------------------------
|
||||||
; Address: | effective address |
|
; Address: | effective address |
|
||||||
|
|
||||||
%macro addr_BdB_8brni 0
|
%macro addr_BdB_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdB_16brni 0
|
%macro addr_BdB_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 19. Direct Indirect Long -- [d]
|
; 19. Direct Indirect Long -- [d]
|
||||||
; ___________________
|
; ___________________
|
||||||
; Instruction: | opcode | offset |
|
; Instruction: | opcode | offset |
|
||||||
; ~~~~~~~~~~~~~~~~~~~
|
; ~~~~~~~~~~~~~~~~~~~
|
||||||
; | Direct Register |
|
; | Direct Register |
|
||||||
; + | offset |
|
; + | offset |
|
||||||
; ---------------------
|
; ---------------------
|
||||||
; | 00 | direct address |
|
; | 00 | direct address |
|
||||||
; then:
|
; then:
|
||||||
; -------------------------------
|
; -------------------------------
|
||||||
; Address: | (direct address) |
|
; Address: | (direct address) |
|
||||||
|
|
||||||
%macro addr_LdL_8brni 0
|
%macro addr_LdL_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_LdL_16brni 0
|
%macro addr_LdL_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 22. Stack Relative -- d,s
|
; 22. Stack Relative -- d,s
|
||||||
|
|
||||||
%macro addr_dCs_8brni 0
|
%macro addr_dCs_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCs_16brni 0
|
%macro addr_dCs_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
|
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
|
||||||
|
|
||||||
%macro addr_BdCsBCy_8brni 0
|
%macro addr_BdCsBCy_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdCsBCy_16brni 0
|
%macro addr_BdCsBCy_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,405 +1,404 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; Address Modes
|
; Address Modes
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
|
|
||||||
; 1. Immediate Addressing -- # - DONE IN PROGRAM
|
; 1. Immediate Addressing -- # - DONE IN PROGRAM
|
||||||
|
|
||||||
%macro addr_I_8brni 0
|
%macro addr_I_8brni 0
|
||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_I_16brni 0
|
%macro addr_I_16brni 0
|
||||||
mov ax,[esi]
|
mov ax,[esi]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 2. Absolute -- a (TESTED)
|
; 2. Absolute -- a (TESTED)
|
||||||
|
|
||||||
%macro addr_a_8brni 0
|
%macro addr_a_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_a_16brni 0
|
%macro addr_a_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 3. Absolute Long -- al
|
; 3. Absolute Long -- al
|
||||||
|
|
||||||
%macro addr_al_8brni 0
|
%macro addr_al_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_al_16brni 0
|
%macro addr_al_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 4. Direct -- d (TESTED)
|
; 4. Direct -- d (TESTED)
|
||||||
|
|
||||||
%macro addr_d_8brni 0
|
%macro addr_d_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR8]
|
call dword near [DPageR8]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_d_16brni 0
|
%macro addr_d_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 5. Accumulator -- A
|
; 5. Accumulator -- A
|
||||||
|
|
||||||
%macro addr_A_8brni 0
|
%macro addr_A_8brni 0
|
||||||
mov al,[xa]
|
mov al,[xa]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_A_16brni 0
|
%macro addr_A_16brni 0
|
||||||
mov ax,[xa]
|
mov ax,[xa]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 7. Direct Indirect Indexed -- (d),y
|
; 7. Direct Indirect Indexed -- (d),y
|
||||||
|
|
||||||
%macro addr_BdBCy_8brni 0
|
%macro addr_BdBCy_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdBCy_16brni 0
|
%macro addr_BdBCy_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 8. Direct Indirect Indexed Long -- [d],y
|
; 8. Direct Indirect Indexed Long -- [d],y
|
||||||
|
|
||||||
%macro addr_LdLCy_8brni 0
|
%macro addr_LdLCy_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_LdLCy_16brni 0
|
%macro addr_LdLCy_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 9. Direct Indexed Indirect -- (d,x)
|
; 9. Direct Indexed Indirect -- (d,x)
|
||||||
|
|
||||||
%macro addr_BdCxB_8brni 0
|
%macro addr_BdCxB_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdCxB_16brni 0
|
%macro addr_BdCxB_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 10. Direct Indexed With X -- d,x
|
; 10. Direct Indexed With X -- d,x
|
||||||
|
|
||||||
%macro addr_dCx_8brni 0
|
%macro addr_dCx_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCx_16brni 0
|
%macro addr_dCx_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 11. Direct Indexed With Y -- d,y
|
; 11. Direct Indexed With Y -- d,y
|
||||||
|
|
||||||
%macro addr_dCy_8brni 0
|
%macro addr_dCy_8brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCy_16brni 0
|
%macro addr_dCy_16brni 0
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 12. Absolute Indexed With X -- a,x
|
; 12. Absolute Indexed With X -- a,x
|
||||||
|
|
||||||
%macro addr_aCx_8brni 0
|
%macro addr_aCx_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_aCx_16brni 0
|
%macro addr_aCx_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 13. Absolute Indexed With Y -- a,y
|
; 13. Absolute Indexed With Y -- a,y
|
||||||
|
|
||||||
%macro addr_aCy_8brni 0
|
%macro addr_aCy_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_aCy_16brni 0
|
%macro addr_aCy_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 14. Absolute Long Indexed With X -- al,x
|
; 14. Absolute Long Indexed With X -- al,x
|
||||||
|
|
||||||
%macro addr_alCx_8brni 0
|
%macro addr_alCx_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_alCx_16brni 0
|
%macro addr_alCx_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
add cx,[xx]
|
add cx,[xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 18. Direct Indirect -- (d)
|
; 18. Direct Indirect -- (d)
|
||||||
; ___________________
|
; ___________________
|
||||||
; Instruction: | opcode | offset |
|
; Instruction: | opcode | offset |
|
||||||
; ~~~~~~~~~~~~~~~~~~~
|
; ~~~~~~~~~~~~~~~~~~~
|
||||||
; | Direct Register |
|
; | Direct Register |
|
||||||
; + | offset |
|
; + | offset |
|
||||||
; ---------------------
|
; ---------------------
|
||||||
; | 00 | direct address |
|
; | 00 | direct address |
|
||||||
; then:
|
; then:
|
||||||
; | 00 | (direct address) |
|
; | 00 | (direct address) |
|
||||||
; + | DB |
|
; + | DB |
|
||||||
; -------------------------------
|
; -------------------------------
|
||||||
; Address: | effective address |
|
; Address: | effective address |
|
||||||
|
|
||||||
%macro addr_BdB_8brni 0
|
%macro addr_BdB_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdB_16brni 0
|
%macro addr_BdB_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
call dword near [DPageR16]
|
call dword near [DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 19. Direct Indirect Long -- [d]
|
; 19. Direct Indirect Long -- [d]
|
||||||
; ___________________
|
; ___________________
|
||||||
; Instruction: | opcode | offset |
|
; Instruction: | opcode | offset |
|
||||||
; ~~~~~~~~~~~~~~~~~~~
|
; ~~~~~~~~~~~~~~~~~~~
|
||||||
; | Direct Register |
|
; | Direct Register |
|
||||||
; + | offset |
|
; + | offset |
|
||||||
; ---------------------
|
; ---------------------
|
||||||
; | 00 | direct address |
|
; | 00 | direct address |
|
||||||
; then:
|
; then:
|
||||||
; -------------------------------
|
; -------------------------------
|
||||||
; Address: | (direct address) |
|
; Address: | (direct address) |
|
||||||
|
|
||||||
%macro addr_LdL_8brni 0
|
%macro addr_LdL_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_LdL_16brni 0
|
%macro addr_LdL_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[xd]
|
mov ecx,[xd]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 22. Stack Relative -- d,s
|
; 22. Stack Relative -- d,s
|
||||||
|
|
||||||
%macro addr_dCs_8brni 0
|
%macro addr_dCs_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCs_16brni 0
|
%macro addr_dCs_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
|
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
|
||||||
|
|
||||||
%macro addr_BdCsBCy_8brni 0
|
%macro addr_BdCsBCy_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdCsBCy_16brni 0
|
%macro addr_BdCsBCy_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[xs]
|
mov cx,[xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[xdb]
|
mov bl,[xdb]
|
||||||
add cx,[xy]
|
add cx,[xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,101 +1,100 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; InitReg Initializes Registers
|
; InitReg Initializes Registers
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
%macro setreg 2
|
%macro setreg 2
|
||||||
mov edi,%1
|
mov edi,%1
|
||||||
add edi,[regptr]
|
add edi,[regptr]
|
||||||
mov eax,%2
|
mov eax,%2
|
||||||
mov [edi],eax
|
mov [edi],eax
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; Registers Note : Remember to restore AH, ECX, & DX
|
; Registers Note : Remember to restore AH, ECX, & DX
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
%macro checkmultchange 0
|
%macro checkmultchange 0
|
||||||
; execute multiplication
|
; execute multiplication
|
||||||
cmp byte[multchange],0
|
cmp byte[multchange],0
|
||||||
je .nomult
|
je .nomult
|
||||||
push edx
|
push edx
|
||||||
push eax
|
push eax
|
||||||
xor bh,bh
|
xor bh,bh
|
||||||
mov bl,[mode7B+1]
|
mov bl,[mode7B+1]
|
||||||
mov ax,[mode7A]
|
mov ax,[mode7A]
|
||||||
test bl,80h
|
test bl,80h
|
||||||
jz .noneg
|
jz .noneg
|
||||||
mov bh,0FFh
|
mov bh,0FFh
|
||||||
.noneg
|
.noneg
|
||||||
imul bx
|
imul bx
|
||||||
mov [compmult],ax
|
mov [compmult],ax
|
||||||
mov [compmult+2],dl
|
mov [compmult+2],dl
|
||||||
pop eax
|
pop eax
|
||||||
pop edx
|
pop edx
|
||||||
mov byte[multchange],0
|
mov byte[multchange],0
|
||||||
.nomult
|
.nomult
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro mouse4016doxA 2
|
%macro mouse4016doxA 2
|
||||||
cmp byte[JoyAPos],%1
|
cmp byte[JoyAPos],%1
|
||||||
jne .nx7
|
jne .nx7
|
||||||
mov bx,[mousexpos]
|
mov bx,[mousexpos]
|
||||||
shr bx,%2
|
shr bx,%2
|
||||||
and bx,1
|
and bx,1
|
||||||
mov al,bl
|
mov al,bl
|
||||||
.nx7
|
.nx7
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro mouse4016doyA 2
|
%macro mouse4016doyA 2
|
||||||
cmp byte[JoyAPos],%1
|
cmp byte[JoyAPos],%1
|
||||||
jne .ny7
|
jne .ny7
|
||||||
mov bx,[mouseypos]
|
mov bx,[mouseypos]
|
||||||
shr bx,%2
|
shr bx,%2
|
||||||
and bx,1
|
and bx,1
|
||||||
mov al,bl
|
mov al,bl
|
||||||
.ny7
|
.ny7
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro mouse4017dox 2
|
%macro mouse4017dox 2
|
||||||
cmp byte[JoyBPos],%1
|
cmp byte[JoyBPos],%1
|
||||||
jne .nx7
|
jne .nx7
|
||||||
mov bx,[mousexpos]
|
mov bx,[mousexpos]
|
||||||
shr bx,%2
|
shr bx,%2
|
||||||
and bx,1
|
and bx,1
|
||||||
mov al,bl
|
mov al,bl
|
||||||
.nx7
|
.nx7
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro mouse4017doy 2
|
%macro mouse4017doy 2
|
||||||
cmp byte[JoyBPos],%1
|
cmp byte[JoyBPos],%1
|
||||||
jne .ny7
|
jne .ny7
|
||||||
mov bx,[mouseypos]
|
mov bx,[mouseypos]
|
||||||
shr bx,%2
|
shr bx,%2
|
||||||
and bx,1
|
and bx,1
|
||||||
mov al,bl
|
mov al,bl
|
||||||
.ny7
|
.ny7
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,52 +1,51 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
EXTSYM tableadc
|
EXTSYM tableadc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; InitRegW Initializes Write Registers
|
; InitRegW Initializes Write Registers
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
%macro reenablespc 0
|
%macro reenablespc 0
|
||||||
cmp dword[cycpbl],1000000h
|
cmp dword[cycpbl],1000000h
|
||||||
jb %%enspc
|
jb %%enspc
|
||||||
mov dword[cycpbl],0
|
mov dword[cycpbl],0
|
||||||
test byte[curexecstate],02h
|
test byte[curexecstate],02h
|
||||||
jnz %%enspc
|
jnz %%enspc
|
||||||
or byte[curexecstate],02h
|
or byte[curexecstate],02h
|
||||||
push ebx
|
push ebx
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,dl
|
mov bl,dl
|
||||||
mov edi,[tableadc+ebx*4]
|
mov edi,[tableadc+ebx*4]
|
||||||
pop ebx
|
pop ebx
|
||||||
%%enspc
|
%%enspc
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro setregw 2
|
%macro setregw 2
|
||||||
mov edi,%1
|
mov edi,%1
|
||||||
add edi,[regptw]
|
add edi,[regptw]
|
||||||
mov eax,%2
|
mov eax,%2
|
||||||
mov [edi],eax
|
mov [edi],eax
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,404 +1,403 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
; Address Modes
|
; Address Modes
|
||||||
;*******************************************************
|
;*******************************************************
|
||||||
|
|
||||||
; 1. Immediate Addressing -- # - DONE IN PROGRAM
|
; 1. Immediate Addressing -- # - DONE IN PROGRAM
|
||||||
|
|
||||||
%macro addr_I_8brni 0
|
%macro addr_I_8brni 0
|
||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_I_16brni 0
|
%macro addr_I_16brni 0
|
||||||
mov ax,[esi]
|
mov ax,[esi]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 2. Absolute -- a (TESTED)
|
; 2. Absolute -- a (TESTED)
|
||||||
|
|
||||||
%macro addr_a_8brni 0
|
%macro addr_a_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_a_16brni 0
|
%macro addr_a_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 3. Absolute Long -- al
|
; 3. Absolute Long -- al
|
||||||
|
|
||||||
%macro addr_al_8brni 0
|
%macro addr_al_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_al_16brni 0
|
%macro addr_al_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 4. Direct -- d (TESTED)
|
; 4. Direct -- d (TESTED)
|
||||||
|
|
||||||
%macro addr_d_8brni 0
|
%macro addr_d_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
call dword near [SA1DPageR8]
|
call dword near [SA1DPageR8]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_d_16brni 0
|
%macro addr_d_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
call dword near [SA1DPageR16]
|
call dword near [SA1DPageR16]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 5. Accumulator -- A
|
; 5. Accumulator -- A
|
||||||
|
|
||||||
%macro addr_A_8brni 0
|
%macro addr_A_8brni 0
|
||||||
mov al,[SA1xa]
|
mov al,[SA1xa]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_A_16brni 0
|
%macro addr_A_16brni 0
|
||||||
mov ax,[SA1xa]
|
mov ax,[SA1xa]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 7. Direct Indirect Indexed -- (d),y
|
; 7. Direct Indirect Indexed -- (d),y
|
||||||
|
|
||||||
%macro addr_BdBCy_8brni 0
|
%macro addr_BdBCy_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
call dword near [SA1DPageR16]
|
call dword near [SA1DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdBCy_16brni 0
|
%macro addr_BdBCy_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
call dword near [SA1DPageR16]
|
call dword near [SA1DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 8. Direct Indirect Indexed Long -- [d],y
|
; 8. Direct Indirect Indexed Long -- [d],y
|
||||||
|
|
||||||
%macro addr_LdLCy_8brni 0
|
%macro addr_LdLCy_8brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_LdLCy_16brni 0
|
%macro addr_LdLCy_16brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 9. Direct Indexed Indirect -- (d,x)
|
; 9. Direct Indexed Indirect -- (d,x)
|
||||||
|
|
||||||
%macro addr_BdCxB_8brni 0
|
%macro addr_BdCxB_8brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdCxB_16brni 0
|
%macro addr_BdCxB_16brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 10. Direct Indexed With X -- d,x
|
; 10. Direct Indexed With X -- d,x
|
||||||
|
|
||||||
%macro addr_dCx_8brni 0
|
%macro addr_dCx_8brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCx_16brni 0
|
%macro addr_dCx_16brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 11. Direct Indexed With Y -- d,y
|
; 11. Direct Indexed With Y -- d,y
|
||||||
|
|
||||||
%macro addr_dCy_8brni 0
|
%macro addr_dCy_8brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCy_16brni 0
|
%macro addr_dCy_16brni 0
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 12. Absolute Indexed With X -- a,x
|
; 12. Absolute Indexed With X -- a,x
|
||||||
|
|
||||||
%macro addr_aCx_8brni 0
|
%macro addr_aCx_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_aCx_16brni 0
|
%macro addr_aCx_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 13. Absolute Indexed With Y -- a,y
|
; 13. Absolute Indexed With Y -- a,y
|
||||||
|
|
||||||
%macro addr_aCy_8brni 0
|
%macro addr_aCy_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_aCy_16brni 0
|
%macro addr_aCy_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 14. Absolute Long Indexed With X -- al,x
|
; 14. Absolute Long Indexed With X -- al,x
|
||||||
|
|
||||||
%macro addr_alCx_8brni 0
|
%macro addr_alCx_8brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_alCx_16brni 0
|
%macro addr_alCx_16brni 0
|
||||||
mov cx,[esi]
|
mov cx,[esi]
|
||||||
mov bl,[esi+2]
|
mov bl,[esi+2]
|
||||||
add cx,[SA1xx]
|
add cx,[SA1xx]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 18. Direct Indirect -- (d)
|
; 18. Direct Indirect -- (d)
|
||||||
; ___________________
|
; ___________________
|
||||||
; Instruction: | opcode | offset |
|
; Instruction: | opcode | offset |
|
||||||
; ~~~~~~~~~~~~~~~~~~~
|
; ~~~~~~~~~~~~~~~~~~~
|
||||||
; | Direct Register |
|
; | Direct Register |
|
||||||
; + | offset |
|
; + | offset |
|
||||||
; ---------------------
|
; ---------------------
|
||||||
; | 00 | direct address |
|
; | 00 | direct address |
|
||||||
; then:
|
; then:
|
||||||
; | 00 | (direct address) |
|
; | 00 | (direct address) |
|
||||||
; + | DB |
|
; + | DB |
|
||||||
; -------------------------------
|
; -------------------------------
|
||||||
; Address: | effective address |
|
; Address: | effective address |
|
||||||
|
|
||||||
%macro addr_BdB_8brni 0
|
%macro addr_BdB_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
call dword near [SA1DPageR16]
|
call dword near [SA1DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdB_16brni 0
|
%macro addr_BdB_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
call dword near [SA1DPageR16]
|
call dword near [SA1DPageR16]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 19. Direct Indirect Long -- [d]
|
; 19. Direct Indirect Long -- [d]
|
||||||
; ___________________
|
; ___________________
|
||||||
; Instruction: | opcode | offset |
|
; Instruction: | opcode | offset |
|
||||||
; ~~~~~~~~~~~~~~~~~~~
|
; ~~~~~~~~~~~~~~~~~~~
|
||||||
; | Direct Register |
|
; | Direct Register |
|
||||||
; + | offset |
|
; + | offset |
|
||||||
; ---------------------
|
; ---------------------
|
||||||
; | 00 | direct address |
|
; | 00 | direct address |
|
||||||
; then:
|
; then:
|
||||||
; -------------------------------
|
; -------------------------------
|
||||||
; Address: | (direct address) |
|
; Address: | (direct address) |
|
||||||
|
|
||||||
%macro addr_LdL_8brni 0
|
%macro addr_LdL_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_LdL_16brni 0
|
%macro addr_LdL_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov ecx,[SA1xd]
|
mov ecx,[SA1xd]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
push cx
|
push cx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
pop cx
|
pop cx
|
||||||
add cx,2
|
add cx,2
|
||||||
push ax
|
push ax
|
||||||
call membank0r8
|
call membank0r8
|
||||||
mov bl,al
|
mov bl,al
|
||||||
pop ax
|
pop ax
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 22. Stack Relative -- d,s
|
; 22. Stack Relative -- d,s
|
||||||
|
|
||||||
%macro addr_dCs_8brni 0
|
%macro addr_dCs_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[SA1xs]
|
mov cx,[SA1xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r8
|
call membank0r8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_dCs_16brni 0
|
%macro addr_dCs_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[SA1xs]
|
mov cx,[SA1xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
|
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
|
||||||
|
|
||||||
%macro addr_BdCsBCy_8brni 0
|
%macro addr_BdCsBCy_8brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[SA1xs]
|
mov cx,[SA1xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler8+ebx*4]
|
call dword near [memtabler8+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro addr_BdCsBCy_16brni 0
|
%macro addr_BdCsBCy_16brni 0
|
||||||
mov bl,[esi]
|
mov bl,[esi]
|
||||||
mov cx,[SA1xs]
|
mov cx,[SA1xs]
|
||||||
add cx,bx
|
add cx,bx
|
||||||
call membank0r16
|
call membank0r16
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov bl,[SA1xdb]
|
mov bl,[SA1xdb]
|
||||||
add cx,[SA1xy]
|
add cx,[SA1xy]
|
||||||
jnc .npb
|
jnc .npb
|
||||||
inc bl
|
inc bl
|
||||||
.npb
|
.npb
|
||||||
call dword near [memtabler16+ebx*4]
|
call dword near [memtabler16+ebx*4]
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,97 +1,96 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; A,DP addressing mode
|
; A,DP addressing mode
|
||||||
%macro SPCaddr_DP 0
|
%macro SPCaddr_DP 0
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
inc ebp
|
inc ebp
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPCaddr_DP_X 0
|
%macro SPCaddr_DP_X 0
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add bl,[spcX]
|
add bl,[spcX]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
inc ebp
|
inc ebp
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPCaddr_LABS 0
|
%macro SPCaddr_LABS 0
|
||||||
mov bx,[ebp]
|
mov bx,[ebp]
|
||||||
add ebx,spcRam
|
add ebx,spcRam
|
||||||
ReadByte
|
ReadByte
|
||||||
add ebp,2
|
add ebp,2
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPCaddr_LABS_X 0
|
%macro SPCaddr_LABS_X 0
|
||||||
mov bl,[spcX]
|
mov bl,[spcX]
|
||||||
add bx,[ebp]
|
add bx,[ebp]
|
||||||
add ebp,2
|
add ebp,2
|
||||||
add ebx,spcRam
|
add ebx,spcRam
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; A,(X)
|
; A,(X)
|
||||||
%macro SPCaddr__X_ 0
|
%macro SPCaddr__X_ 0
|
||||||
mov bl,[spcX]
|
mov bl,[spcX]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; A,labs+Y
|
; A,labs+Y
|
||||||
%macro SPCaddr_LABS_Y 0
|
%macro SPCaddr_LABS_Y 0
|
||||||
mov bl,[spcY]
|
mov bl,[spcY]
|
||||||
add bx,[ebp]
|
add bx,[ebp]
|
||||||
add ebp,2
|
add ebp,2
|
||||||
add ebx,spcRam
|
add ebx,spcRam
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; A,(DP,X)
|
; A,(DP,X)
|
||||||
%macro SPCaddr_bDP_Xb 0
|
%macro SPCaddr_bDP_Xb 0
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add bl,[spcX]
|
add bl,[spcX]
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
inc ebp
|
inc ebp
|
||||||
mov ax, word [ebx]
|
mov ax, word [ebx]
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
add ebx,spcRam
|
add ebx,spcRam
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPCaddr_bDPb_Y 0
|
%macro SPCaddr_bDPb_Y 0
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
inc ebp
|
inc ebp
|
||||||
mov ax,[ebx]
|
mov ax,[ebx]
|
||||||
add ax,[spcY]
|
add ax,[spcY]
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
add ebx,spcRam
|
add ebx,spcRam
|
||||||
ReadByte
|
ReadByte
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|||||||
@@ -1,168 +1,167 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; move al at address ebx
|
; move al at address ebx
|
||||||
|
|
||||||
; branch instructions
|
; branch instructions
|
||||||
%macro spcbrancher 0
|
%macro spcbrancher 0
|
||||||
inc ebp
|
inc ebp
|
||||||
ret
|
ret
|
||||||
.branch
|
.branch
|
||||||
movsx ebx,byte [ebp]
|
movsx ebx,byte [ebp]
|
||||||
inc ebp
|
inc ebp
|
||||||
add ebp,ebx
|
add ebp,ebx
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; tcall instruction
|
; tcall instruction
|
||||||
%macro spctcall 1
|
%macro spctcall 1
|
||||||
mov ebx,ebp
|
mov ebx,ebp
|
||||||
sub ebx,spcRam
|
sub ebx,spcRam
|
||||||
mov eax,[spcS]
|
mov eax,[spcS]
|
||||||
mov [spcRam+eax],bh
|
mov [spcRam+eax],bh
|
||||||
dec byte [spcS]
|
dec byte [spcS]
|
||||||
mov eax,[spcS]
|
mov eax,[spcS]
|
||||||
mov [spcRam+eax],bl
|
mov [spcRam+eax],bl
|
||||||
dec byte [spcS]
|
dec byte [spcS]
|
||||||
mov bx,[spcextraram+%1]
|
mov bx,[spcextraram+%1]
|
||||||
test byte[spcRam+0F1h],80h
|
test byte[spcRam+0F1h],80h
|
||||||
jnz %%finished
|
jnz %%finished
|
||||||
mov bx,[spcRam+0FFC0h+%1]
|
mov bx,[spcRam+0FFC0h+%1]
|
||||||
%%finished
|
%%finished
|
||||||
add ebx,spcRam
|
add ebx,spcRam
|
||||||
mov ebp,ebx
|
mov ebp,ebx
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; SET1 instruction
|
; SET1 instruction
|
||||||
%macro set1 1
|
%macro set1 1
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
inc ebp
|
inc ebp
|
||||||
push ebx
|
push ebx
|
||||||
ReadByte
|
ReadByte
|
||||||
pop ebx
|
pop ebx
|
||||||
or al,%1
|
or al,%1
|
||||||
WriteByte
|
WriteByte
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; CLR1 instruction
|
; CLR1 instruction
|
||||||
%macro clr1 1
|
%macro clr1 1
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
inc ebp
|
inc ebp
|
||||||
push ebx
|
push ebx
|
||||||
ReadByte
|
ReadByte
|
||||||
pop ebx
|
pop ebx
|
||||||
and al,%1
|
and al,%1
|
||||||
WriteByte
|
WriteByte
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; BBS instruction
|
; BBS instruction
|
||||||
%macro bbs 1
|
%macro bbs 1
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
ReadByte
|
ReadByte
|
||||||
test al,%1
|
test al,%1
|
||||||
jnz .dp0jump
|
jnz .dp0jump
|
||||||
add ebp,2
|
add ebp,2
|
||||||
ret
|
ret
|
||||||
.dp0jump
|
.dp0jump
|
||||||
movsx ebx,byte [ebp+1]
|
movsx ebx,byte [ebp+1]
|
||||||
add ebp,ebx
|
add ebp,ebx
|
||||||
add ebp,2
|
add ebp,2
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; BBC instruction
|
; BBC instruction
|
||||||
%macro bbc 1
|
%macro bbc 1
|
||||||
mov bl,[ebp]
|
mov bl,[ebp]
|
||||||
add ebx,[spcRamDP]
|
add ebx,[spcRamDP]
|
||||||
ReadByte
|
ReadByte
|
||||||
test al,%1
|
test al,%1
|
||||||
jz .dp0jump
|
jz .dp0jump
|
||||||
add ebp,2
|
add ebp,2
|
||||||
ret
|
ret
|
||||||
.dp0jump
|
.dp0jump
|
||||||
movsx ebx,byte [ebp+1]
|
movsx ebx,byte [ebp+1]
|
||||||
add ebp,ebx
|
add ebp,ebx
|
||||||
add ebp,2
|
add ebp,2
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; OR A, instruction
|
; OR A, instruction
|
||||||
%macro SPC_OR_A 0
|
%macro SPC_OR_A 0
|
||||||
or byte [spcA], al
|
or byte [spcA], al
|
||||||
mov al,[spcA]
|
mov al,[spcA]
|
||||||
mov [spcNZ],al
|
mov [spcNZ],al
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; AND A, instruction
|
; AND A, instruction
|
||||||
%macro SPC_AND_A 0
|
%macro SPC_AND_A 0
|
||||||
and byte [spcA], al
|
and byte [spcA], al
|
||||||
mov al,[spcA]
|
mov al,[spcA]
|
||||||
mov [spcNZ],al
|
mov [spcNZ],al
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; EOR A, instruction
|
; EOR A, instruction
|
||||||
%macro SPC_EOR_A 0
|
%macro SPC_EOR_A 0
|
||||||
xor byte [spcA], al
|
xor byte [spcA], al
|
||||||
mov al,[spcA]
|
mov al,[spcA]
|
||||||
mov [spcNZ],al
|
mov [spcNZ],al
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; CMP A, instruction
|
; CMP A, instruction
|
||||||
%macro SPC_CMP_A 0
|
%macro SPC_CMP_A 0
|
||||||
cmp byte [spcA], al
|
cmp byte [spcA], al
|
||||||
cmc
|
cmc
|
||||||
SPCSetFlagnzc
|
SPCSetFlagnzc
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPC_ADC_A 0
|
%macro SPC_ADC_A 0
|
||||||
mov cl,[spcP]
|
mov cl,[spcP]
|
||||||
shr cl,1
|
shr cl,1
|
||||||
adc byte [spcA], al
|
adc byte [spcA], al
|
||||||
SPCSetFlagnvhzc
|
SPCSetFlagnvhzc
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPC_SBC_A 0
|
%macro SPC_SBC_A 0
|
||||||
mov cl,[spcP]
|
mov cl,[spcP]
|
||||||
xor cl,1
|
xor cl,1
|
||||||
shr cl,1
|
shr cl,1
|
||||||
sbb byte [spcA], al
|
sbb byte [spcA], al
|
||||||
cmc
|
cmc
|
||||||
SPCSetFlagnvhzc
|
SPCSetFlagnvhzc
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SPC_MOV_A 0
|
%macro SPC_MOV_A 0
|
||||||
mov byte [spcA], al
|
mov byte [spcA], al
|
||||||
mov [spcNZ],al
|
mov [spcNZ],al
|
||||||
ret
|
ret
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,156 +1,155 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
section .data
|
section .data
|
||||||
sample times 60 db 0
|
sample times 60 db 0
|
||||||
clock_mask db 0
|
clock_mask db 0
|
||||||
data_mask db 0
|
data_mask db 0
|
||||||
|
|
||||||
section .text
|
section .text
|
||||||
|
|
||||||
NEWSYM read_gpp
|
NEWSYM read_gpp
|
||||||
push ebx
|
push ebx
|
||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
push edi
|
push edi
|
||||||
push esi
|
push esi
|
||||||
|
|
||||||
cmp al,0
|
cmp al,0
|
||||||
jne GPP_L14
|
jne GPP_L14
|
||||||
mov byte [clock_mask],0x10
|
mov byte [clock_mask],0x10
|
||||||
mov byte [data_mask],0x20
|
mov byte [data_mask],0x20
|
||||||
jmp GPP_L15
|
jmp GPP_L15
|
||||||
GPP_L14:
|
GPP_L14:
|
||||||
mov byte [clock_mask],0x40
|
mov byte [clock_mask],0x40
|
||||||
mov byte [data_mask],0x80
|
mov byte [data_mask],0x80
|
||||||
GPP_L15:
|
GPP_L15:
|
||||||
|
|
||||||
|
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
|
|
||||||
cli
|
cli
|
||||||
in al,dx
|
in al,dx
|
||||||
mov ah,al
|
mov ah,al
|
||||||
|
|
||||||
GPP_L4:
|
GPP_L4:
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
GPP_L0:
|
GPP_L0:
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
in al,dx
|
in al,dx
|
||||||
cmp al,ah
|
cmp al,ah
|
||||||
jne GPP_L1
|
jne GPP_L1
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp ecx,255
|
cmp ecx,255
|
||||||
jl GPP_L0
|
jl GPP_L0
|
||||||
GPP_L1:
|
GPP_L1:
|
||||||
cmp ecx,255
|
cmp ecx,255
|
||||||
je near GPP_ERR
|
je near GPP_ERR
|
||||||
|
|
||||||
test [clock_mask],ah
|
test [clock_mask],ah
|
||||||
jz GPP_L2
|
jz GPP_L2
|
||||||
test [clock_mask],al
|
test [clock_mask],al
|
||||||
jnz GPP_L2
|
jnz GPP_L2
|
||||||
|
|
||||||
test [data_mask],al
|
test [data_mask],al
|
||||||
jz GPP_L3
|
jz GPP_L3
|
||||||
mov byte [sample+edi],1
|
mov byte [sample+edi],1
|
||||||
jmp GPP_L12
|
jmp GPP_L12
|
||||||
GPP_L3:
|
GPP_L3:
|
||||||
mov byte [sample+edi],0
|
mov byte [sample+edi],0
|
||||||
GPP_L12:
|
GPP_L12:
|
||||||
inc edi
|
inc edi
|
||||||
|
|
||||||
GPP_L2:
|
GPP_L2:
|
||||||
mov ah,al
|
mov ah,al
|
||||||
cmp ebx,200
|
cmp ebx,200
|
||||||
je GPP_L13
|
je GPP_L13
|
||||||
inc ebx
|
inc ebx
|
||||||
cmp edi,50
|
cmp edi,50
|
||||||
jl GPP_L4
|
jl GPP_L4
|
||||||
|
|
||||||
GPP_L13:
|
GPP_L13:
|
||||||
sti
|
sti
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov esi,1
|
mov esi,1
|
||||||
GPP_L7:
|
GPP_L7:
|
||||||
cmp byte [sample+esi],1
|
cmp byte [sample+esi],1
|
||||||
jg GPP_ERR
|
jg GPP_ERR
|
||||||
jne GPP_L6
|
jne GPP_L6
|
||||||
inc ecx
|
inc ecx
|
||||||
jmp GPP_L5
|
jmp GPP_L5
|
||||||
GPP_L6:
|
GPP_L6:
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
|
|
||||||
GPP_L5:
|
GPP_L5:
|
||||||
cmp ecx,5
|
cmp ecx,5
|
||||||
je GPP_L8
|
je GPP_L8
|
||||||
cmp esi,edi
|
cmp esi,edi
|
||||||
je GPP_L8
|
je GPP_L8
|
||||||
inc esi
|
inc esi
|
||||||
jmp GPP_L7
|
jmp GPP_L7
|
||||||
|
|
||||||
GPP_L8:
|
GPP_L8:
|
||||||
cmp ecx,5
|
cmp ecx,5
|
||||||
jne GPP_ERR
|
jne GPP_ERR
|
||||||
add esi,2
|
add esi,2
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
|
|
||||||
GPP_L10:
|
GPP_L10:
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp ecx,5
|
cmp ecx,5
|
||||||
jne GPP_L11
|
jne GPP_L11
|
||||||
mov ecx,1
|
mov ecx,1
|
||||||
inc esi
|
inc esi
|
||||||
GPP_L11:
|
GPP_L11:
|
||||||
mov dl,[sample+esi]
|
mov dl,[sample+esi]
|
||||||
or eax,edx
|
or eax,edx
|
||||||
shl eax,1
|
shl eax,1
|
||||||
cmp ebx,13
|
cmp ebx,13
|
||||||
je GPP_L9
|
je GPP_L9
|
||||||
inc ebx
|
inc ebx
|
||||||
inc esi
|
inc esi
|
||||||
jmp GPP_L10
|
jmp GPP_L10
|
||||||
|
|
||||||
GPP_L9:
|
GPP_L9:
|
||||||
pop esi
|
pop esi
|
||||||
pop edi
|
pop edi
|
||||||
pop edx
|
pop edx
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GPP_ERR:
|
GPP_ERR:
|
||||||
sti
|
sti
|
||||||
pop esi
|
pop esi
|
||||||
pop edi
|
pop edi
|
||||||
pop edx
|
pop edx
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
mov eax,1
|
mov eax,1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,437 +1,436 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
EXTSYM ComNum, ComIRQ, BaudRate
|
EXTSYM ComNum, ComIRQ, BaudRate
|
||||||
EXTSYM dssel,FossilUse
|
EXTSYM dssel,FossilUse
|
||||||
EXTSYM GUIinit18_2hz,GUIinit36_4hz
|
EXTSYM GUIinit18_2hz,GUIinit36_4hz
|
||||||
EXTSYM GUIMenuItem
|
EXTSYM GUIMenuItem
|
||||||
EXTSYM delay
|
EXTSYM delay
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NEWSYM UartType, db 0
|
NEWSYM UartType, db 0
|
||||||
NEWSYM cantinitmodem, db 1
|
NEWSYM cantinitmodem, db 1
|
||||||
NEWSYM ModemInited, db 0
|
NEWSYM ModemInited, db 0
|
||||||
|
|
||||||
ComPort dw 2E8h ; 1=3F8,2=2F8,3=3E8,4=2E8
|
ComPort dw 2E8h ; 1=3F8,2=2F8,3=3E8,4=2E8
|
||||||
PortData dw 0,3F8h,2F8h,3E8h,2E8h
|
PortData dw 0,3F8h,2F8h,3E8h,2E8h
|
||||||
ComInt db 0
|
ComInt db 0
|
||||||
BRateSel dw 000Ch,0008h,0006h,0004h,0003h,0002h,0001h
|
BRateSel dw 000Ch,0008h,0006h,0004h,0003h,0002h,0001h
|
||||||
oldhandmodems dw 0
|
oldhandmodems dw 0
|
||||||
oldhandmodemo dd 0
|
oldhandmodemo dd 0
|
||||||
PICMaskPm db 21h
|
PICMaskPm db 21h
|
||||||
PortNum dw 0
|
PortNum dw 0
|
||||||
CharStore db 0
|
CharStore db 0
|
||||||
|
|
||||||
NEWSYM ModemGetChar
|
NEWSYM ModemGetChar
|
||||||
cmp byte[UartType],2
|
cmp byte[UartType],2
|
||||||
je near FossilGetChar
|
je near FossilGetChar
|
||||||
xor dh,dh
|
xor dh,dh
|
||||||
mov eax,[modemhead]
|
mov eax,[modemhead]
|
||||||
cmp eax,[modemtail]
|
cmp eax,[modemtail]
|
||||||
je .nonewchar
|
je .nonewchar
|
||||||
mov dh,1
|
mov dh,1
|
||||||
mov dl,[modembuffer+eax]
|
mov dl,[modembuffer+eax]
|
||||||
inc dword[modemhead]
|
inc dword[modemhead]
|
||||||
and dword[modemhead],2047
|
and dword[modemhead],2047
|
||||||
.nonewchar
|
.nonewchar
|
||||||
ret
|
ret
|
||||||
|
|
||||||
FossilGetChar:
|
FossilGetChar:
|
||||||
pushad
|
pushad
|
||||||
mov ah,0Ch
|
mov ah,0Ch
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
cmp ax,0FFFFh
|
cmp ax,0FFFFh
|
||||||
je .nochar
|
je .nochar
|
||||||
mov ah,02h
|
mov ah,02h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
mov [CharStore],al
|
mov [CharStore],al
|
||||||
popad
|
popad
|
||||||
mov dh,1
|
mov dh,1
|
||||||
mov dl,[CharStore]
|
mov dl,[CharStore]
|
||||||
ret
|
ret
|
||||||
.nochar
|
.nochar
|
||||||
popad
|
popad
|
||||||
xor dh,dh
|
xor dh,dh
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ModemCheckRing
|
NEWSYM ModemCheckRing
|
||||||
cmp byte[UartType],2
|
cmp byte[UartType],2
|
||||||
je near .fossil
|
je near .fossil
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,6
|
add dx,6
|
||||||
in al,dx
|
in al,dx
|
||||||
shr al,6
|
shr al,6
|
||||||
and al,01h
|
and al,01h
|
||||||
ret
|
ret
|
||||||
.fossil
|
.fossil
|
||||||
pushad
|
pushad
|
||||||
mov ah,03h
|
mov ah,03h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
test al,40h
|
test al,40h
|
||||||
jnz .ring
|
jnz .ring
|
||||||
popad
|
popad
|
||||||
xor al,al
|
xor al,al
|
||||||
ret
|
ret
|
||||||
.ring
|
.ring
|
||||||
popad
|
popad
|
||||||
mov al,1
|
mov al,1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ModemCheckDCD
|
NEWSYM ModemCheckDCD
|
||||||
cmp byte[UartType],2
|
cmp byte[UartType],2
|
||||||
je near .fossil
|
je near .fossil
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,6
|
add dx,6
|
||||||
in al,dx
|
in al,dx
|
||||||
shr al,7
|
shr al,7
|
||||||
and al,01h
|
and al,01h
|
||||||
ret
|
ret
|
||||||
.fossil
|
.fossil
|
||||||
pushad
|
pushad
|
||||||
mov ah,03h
|
mov ah,03h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
test al,80h
|
test al,80h
|
||||||
jnz .dcd
|
jnz .dcd
|
||||||
popad
|
popad
|
||||||
xor al,al
|
xor al,al
|
||||||
ret
|
ret
|
||||||
.dcd
|
.dcd
|
||||||
popad
|
popad
|
||||||
mov al,1
|
mov al,1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ModemSendChar
|
NEWSYM ModemSendChar
|
||||||
cmp byte[UartType],2
|
cmp byte[UartType],2
|
||||||
je near FossilSendChar
|
je near FossilSendChar
|
||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
push ebx
|
push ebx
|
||||||
mov ecx,1000000
|
mov ecx,1000000
|
||||||
mov bl,al
|
mov bl,al
|
||||||
.loop
|
.loop
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,5
|
add dx,5
|
||||||
in al,dx
|
in al,dx
|
||||||
test al,00100000b
|
test al,00100000b
|
||||||
jnz .transokay
|
jnz .transokay
|
||||||
loop .loop
|
loop .loop
|
||||||
xor al,al
|
xor al,al
|
||||||
pop ebx
|
pop ebx
|
||||||
pop edx
|
pop edx
|
||||||
pop ecx
|
pop ecx
|
||||||
ret
|
ret
|
||||||
.transokay
|
.transokay
|
||||||
mov al,bl
|
mov al,bl
|
||||||
mov dx,[ComPort] ; Send the char through the modem
|
mov dx,[ComPort] ; Send the char through the modem
|
||||||
out dx,al
|
out dx,al
|
||||||
pop ebx
|
pop ebx
|
||||||
pop edx
|
pop edx
|
||||||
pop ecx
|
pop ecx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
FossilSendChar:
|
FossilSendChar:
|
||||||
pushad
|
pushad
|
||||||
mov ah,01h
|
mov ah,01h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
NEWSYM InitModem
|
NEWSYM InitModem
|
||||||
mov byte[ModemInited],1
|
mov byte[ModemInited],1
|
||||||
cmp byte[FossilUse],0
|
cmp byte[FossilUse],0
|
||||||
jne near InitFossil
|
jne near InitFossil
|
||||||
mov byte[cantinitmodem],0
|
mov byte[cantinitmodem],0
|
||||||
cli
|
cli
|
||||||
; Get Port value
|
; Get Port value
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,[ComNum]
|
mov al,[ComNum]
|
||||||
mov ax,[PortData+eax*2]
|
mov ax,[PortData+eax*2]
|
||||||
mov [ComPort],ax
|
mov [ComPort],ax
|
||||||
|
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,2
|
add dx,2
|
||||||
xor al,al
|
xor al,al
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
; Set IRQ PIC Mask Port
|
; Set IRQ PIC Mask Port
|
||||||
mov byte[PICMaskPm],21h
|
mov byte[PICMaskPm],21h
|
||||||
mov bl,[ComIRQ]
|
mov bl,[ComIRQ]
|
||||||
cmp bl,7
|
cmp bl,7
|
||||||
jbe .noupper
|
jbe .noupper
|
||||||
add bl,60h
|
add bl,60h
|
||||||
add byte[PICMaskPm],80h
|
add byte[PICMaskPm],80h
|
||||||
.noupper
|
.noupper
|
||||||
add bl,8
|
add bl,8
|
||||||
mov [ComInt],bl
|
mov [ComInt],bl
|
||||||
|
|
||||||
; Get IRQ handler
|
; Get IRQ handler
|
||||||
mov ax,204h
|
mov ax,204h
|
||||||
mov bl,[ComInt]
|
mov bl,[ComInt]
|
||||||
int 31h
|
int 31h
|
||||||
mov [oldhandmodems],cx
|
mov [oldhandmodems],cx
|
||||||
mov [oldhandmodemo],edx
|
mov [oldhandmodemo],edx
|
||||||
; Set IRQ handler
|
; Set IRQ handler
|
||||||
mov ax,205h
|
mov ax,205h
|
||||||
mov bl,[ComInt]
|
mov bl,[ComInt]
|
||||||
mov cx,cs
|
mov cx,cs
|
||||||
mov edx,modemhandler
|
mov edx,modemhandler
|
||||||
int 31h
|
int 31h
|
||||||
|
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,3
|
add dx,3
|
||||||
mov al,00000011b
|
mov al,00000011b
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
; Set Normal Modem functioning, User2 bit, and DTR
|
; Set Normal Modem functioning, User2 bit, and DTR
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,4
|
add dx,4
|
||||||
mov al,00001011b
|
mov al,00001011b
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
; Enable IRQ
|
; Enable IRQ
|
||||||
xor dh,dh
|
xor dh,dh
|
||||||
mov dl,[PICMaskPm] ; Output to IRQ PIC Mask Port
|
mov dl,[PICMaskPm] ; Output to IRQ PIC Mask Port
|
||||||
mov cl,[ComIRQ] ; Get proper bit
|
mov cl,[ComIRQ] ; Get proper bit
|
||||||
and cl,07h
|
and cl,07h
|
||||||
mov al,01h
|
mov al,01h
|
||||||
shl al,cl
|
shl al,cl
|
||||||
not al ; Complement since clear bit = enable
|
not al ; Complement since clear bit = enable
|
||||||
mov bl,al
|
mov bl,al
|
||||||
in al,dx ; input to preserve other bits
|
in al,dx ; input to preserve other bits
|
||||||
and al,bl
|
and al,bl
|
||||||
xor al,al
|
xor al,al
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
; Enable interrupt to execute only on data available
|
; Enable interrupt to execute only on data available
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
inc dx
|
inc dx
|
||||||
mov al,00000001b
|
mov al,00000001b
|
||||||
out dx,al
|
out dx,al
|
||||||
sti
|
sti
|
||||||
|
|
||||||
; Write baudrate
|
; Write baudrate
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,3
|
add dx,3
|
||||||
in al,dx
|
in al,dx
|
||||||
or al,10000000b
|
or al,10000000b
|
||||||
out dx,al
|
out dx,al
|
||||||
mov eax,[BaudRate]
|
mov eax,[BaudRate]
|
||||||
mov ax,[BRateSel+eax*2]
|
mov ax,[BRateSel+eax*2]
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
inc dx
|
inc dx
|
||||||
push eax
|
push eax
|
||||||
mov al,ah
|
mov al,ah
|
||||||
out dx,al
|
out dx,al
|
||||||
pop eax
|
pop eax
|
||||||
dec dx
|
dec dx
|
||||||
out dx,al
|
out dx,al
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,3
|
add dx,3
|
||||||
in al,dx
|
in al,dx
|
||||||
and al,01111111b
|
and al,01111111b
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
; Initialize 16550A UART chip
|
; Initialize 16550A UART chip
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,2
|
add dx,2
|
||||||
mov al,0C7h
|
mov al,0C7h
|
||||||
out dx,al
|
out dx,al
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
in al,dx
|
in al,dx
|
||||||
mov byte[UartType],1
|
mov byte[UartType],1
|
||||||
test al,40h
|
test al,40h
|
||||||
jnz .passed16550a
|
jnz .passed16550a
|
||||||
xor al,al
|
xor al,al
|
||||||
out dx,al
|
out dx,al
|
||||||
mov byte[UartType],0
|
mov byte[UartType],0
|
||||||
.passed16550a
|
.passed16550a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
InitFossil:
|
InitFossil:
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dl,[ComNum]
|
mov dl,[ComNum]
|
||||||
dec dl
|
dec dl
|
||||||
mov [PortNum],dx
|
mov [PortNum],dx
|
||||||
mov byte[cantinitmodem],0
|
mov byte[cantinitmodem],0
|
||||||
mov byte[UartType],2
|
mov byte[UartType],2
|
||||||
mov ah,04h
|
mov ah,04h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
cmp ax,1954h
|
cmp ax,1954h
|
||||||
jne .notsuccess
|
jne .notsuccess
|
||||||
xor ah,ah
|
xor ah,ah
|
||||||
mov al,00000011b ; 19200 baud, 81N
|
mov al,00000011b ; 19200 baud, 81N
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
ret
|
ret
|
||||||
.notsuccess
|
.notsuccess
|
||||||
mov byte[cantinitmodem],1
|
mov byte[cantinitmodem],1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
modemhandler:
|
modemhandler:
|
||||||
push ds
|
push ds
|
||||||
push eax
|
push eax
|
||||||
mov ax,[cs:dssel]
|
mov ax,[cs:dssel]
|
||||||
mov ds,ax
|
mov ds,ax
|
||||||
push edx
|
push edx
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,4
|
add dx,4
|
||||||
in al,dx
|
in al,dx
|
||||||
and al,11111101b
|
and al,11111101b
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
.next
|
.next
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
in al,dx
|
in al,dx
|
||||||
mov edx,[modemtail]
|
mov edx,[modemtail]
|
||||||
mov [modembuffer+edx],al
|
mov [modembuffer+edx],al
|
||||||
inc dword[modemtail]
|
inc dword[modemtail]
|
||||||
and dword[modemtail],2047
|
and dword[modemtail],2047
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,2
|
add dx,2
|
||||||
in al,dx
|
in al,dx
|
||||||
test al,1
|
test al,1
|
||||||
jz .next
|
jz .next
|
||||||
|
|
||||||
mov al,20h
|
mov al,20h
|
||||||
out 20h,al
|
out 20h,al
|
||||||
|
|
||||||
cmp byte[ComIRQ],7
|
cmp byte[ComIRQ],7
|
||||||
jbe .nohighirq
|
jbe .nohighirq
|
||||||
mov al,20h
|
mov al,20h
|
||||||
out 0A0h,al
|
out 0A0h,al
|
||||||
.nohighirq
|
.nohighirq
|
||||||
|
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,4
|
add dx,4
|
||||||
in al,dx
|
in al,dx
|
||||||
or al,00000010b
|
or al,00000010b
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
pop edx
|
pop edx
|
||||||
pop eax
|
pop eax
|
||||||
pop ds
|
pop ds
|
||||||
iretd
|
iretd
|
||||||
|
|
||||||
NEWSYM ModemClearBuffer
|
NEWSYM ModemClearBuffer
|
||||||
mov dword[modemhead],0
|
mov dword[modemhead],0
|
||||||
mov dword[modemtail],0
|
mov dword[modemtail],0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM modembuffer, times 2048 db 0
|
NEWSYM modembuffer, times 2048 db 0
|
||||||
NEWSYM modemhead, dd 0
|
NEWSYM modemhead, dd 0
|
||||||
NEWSYM modemtail, dd 0
|
NEWSYM modemtail, dd 0
|
||||||
|
|
||||||
NEWSYM DeInitModem
|
NEWSYM DeInitModem
|
||||||
cmp byte[ModemInited],1
|
cmp byte[ModemInited],1
|
||||||
je .okaydeinit
|
je .okaydeinit
|
||||||
ret
|
ret
|
||||||
.okaydeinit
|
.okaydeinit
|
||||||
mov byte[ModemInited],0
|
mov byte[ModemInited],0
|
||||||
cmp byte[UartType],2
|
cmp byte[UartType],2
|
||||||
je near DeInitFossil
|
je near DeInitFossil
|
||||||
cli
|
cli
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,2
|
add dx,2
|
||||||
xor al,al
|
xor al,al
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
xor dh,dh
|
xor dh,dh
|
||||||
mov dl,[PICMaskPm]
|
mov dl,[PICMaskPm]
|
||||||
mov cl,[ComIRQ]
|
mov cl,[ComIRQ]
|
||||||
and cl,07h
|
and cl,07h
|
||||||
mov al,01h
|
mov al,01h
|
||||||
shl al,cl
|
shl al,cl
|
||||||
mov bl,al
|
mov bl,al
|
||||||
in al,dx
|
in al,dx
|
||||||
or al,bl
|
or al,bl
|
||||||
xor al,al
|
xor al,al
|
||||||
out dx,al
|
out dx,al
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
inc dx
|
inc dx
|
||||||
mov al,00h
|
mov al,00h
|
||||||
out dx,al
|
out dx,al
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,4
|
add dx,4
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
mov cx,[oldhandmodems]
|
mov cx,[oldhandmodems]
|
||||||
mov edx,[oldhandmodemo]
|
mov edx,[oldhandmodemo]
|
||||||
mov ax,205h
|
mov ax,205h
|
||||||
mov bl,[ComInt]
|
mov bl,[ComInt]
|
||||||
int 31h
|
int 31h
|
||||||
sti
|
sti
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DeInitFossil:
|
DeInitFossil:
|
||||||
mov byte[cantinitmodem],0
|
mov byte[cantinitmodem],0
|
||||||
jne .nodeinit
|
jne .nodeinit
|
||||||
mov ax,0600h
|
mov ax,0600h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h ; Lower DTR
|
int 14h ; Lower DTR
|
||||||
mov ah,05h
|
mov ah,05h
|
||||||
mov dx,[PortNum]
|
mov dx,[PortNum]
|
||||||
int 14h
|
int 14h
|
||||||
.nodeinit
|
.nodeinit
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM DeInitModemC
|
NEWSYM DeInitModemC
|
||||||
cmp byte[ModemInited],1
|
cmp byte[ModemInited],1
|
||||||
je .okaydeinit
|
je .okaydeinit
|
||||||
ret
|
ret
|
||||||
.okaydeinit
|
.okaydeinit
|
||||||
cmp byte[UartType],2
|
cmp byte[UartType],2
|
||||||
je near DeInitFossil
|
je near DeInitFossil
|
||||||
cli
|
cli
|
||||||
mov al,00h
|
mov al,00h
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,4
|
add dx,4
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
mov al,13
|
mov al,13
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
mov ecx,16384
|
mov ecx,16384
|
||||||
call delay
|
call delay
|
||||||
|
|
||||||
out dx,al
|
out dx,al
|
||||||
|
|
||||||
mov al,00001001b
|
mov al,00001001b
|
||||||
mov dx,[ComPort]
|
mov dx,[ComPort]
|
||||||
add dx,4
|
add dx,4
|
||||||
out dx,al
|
out dx,al
|
||||||
sti
|
sti
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,226 +1,225 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
EXTSYM SidewinderFix
|
EXTSYM SidewinderFix
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%macro ParityCheckSW 1
|
%macro ParityCheckSW 1
|
||||||
mov ecx,ebx
|
mov ecx,ebx
|
||||||
xor cl,ch
|
xor cl,ch
|
||||||
jpe %%ParChkSW
|
jpe %%ParChkSW
|
||||||
mov [%1],ebx
|
mov [%1],ebx
|
||||||
%%ParChkSW:
|
%%ParChkSW:
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
section .data
|
section .data
|
||||||
gDump times 256 db 0
|
gDump times 256 db 0
|
||||||
bDump times 128 db 0
|
bDump times 128 db 0
|
||||||
NEWSYM _SW1, dd 0
|
NEWSYM _SW1, dd 0
|
||||||
NEWSYM _SW2, dd 0
|
NEWSYM _SW2, dd 0
|
||||||
NEWSYM _SW3, dd 0
|
NEWSYM _SW3, dd 0
|
||||||
NEWSYM _SW4, dd 0
|
NEWSYM _SW4, dd 0
|
||||||
NEWSYM _SWCount, dd 0
|
NEWSYM _SWCount, dd 0
|
||||||
|
|
||||||
section .text
|
section .text
|
||||||
NEWSYM _readSideWinder
|
NEWSYM _readSideWinder
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov ecx,200
|
mov ecx,200
|
||||||
mov ebx,gDump
|
mov ebx,gDump
|
||||||
|
|
||||||
cli
|
cli
|
||||||
cmp byte[SidewinderFix],0
|
cmp byte[SidewinderFix],0
|
||||||
je .write
|
je .write
|
||||||
out dx,al
|
out dx,al
|
||||||
.write
|
.write
|
||||||
GetSWDataLoop:
|
GetSWDataLoop:
|
||||||
cmp byte[SidewinderFix],0
|
cmp byte[SidewinderFix],0
|
||||||
jne .nowrite
|
jne .nowrite
|
||||||
out dx,al
|
out dx,al
|
||||||
.nowrite
|
.nowrite
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
in al,dx
|
in al,dx
|
||||||
mov [ebx],al
|
mov [ebx],al
|
||||||
inc ebx
|
inc ebx
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz GetSWDataLoop
|
jnz GetSWDataLoop
|
||||||
sti
|
sti
|
||||||
|
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
mov esi,1
|
mov esi,1
|
||||||
|
|
||||||
FindCycle:
|
FindCycle:
|
||||||
mov al,[gDump+edi]
|
mov al,[gDump+edi]
|
||||||
inc edi
|
inc edi
|
||||||
cmp edi,200
|
cmp edi,200
|
||||||
je SMWError
|
je SMWError
|
||||||
test al,00010000b
|
test al,00010000b
|
||||||
jnz WMFCS1
|
jnz WMFCS1
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
jmp FindCycle
|
jmp FindCycle
|
||||||
WMFCS1:
|
WMFCS1:
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp ecx,15
|
cmp ecx,15
|
||||||
jne FindCycle
|
jne FindCycle
|
||||||
|
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
|
|
||||||
FindStrobeLow:
|
FindStrobeLow:
|
||||||
mov al,[gDump+edi]
|
mov al,[gDump+edi]
|
||||||
inc edi
|
inc edi
|
||||||
cmp edi,200
|
cmp edi,200
|
||||||
je SMWError
|
je SMWError
|
||||||
test al,00010000b
|
test al,00010000b
|
||||||
jnz FindStrobeLow
|
jnz FindStrobeLow
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
|
|
||||||
FindStrobeHigh:
|
FindStrobeHigh:
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp ecx,15
|
cmp ecx,15
|
||||||
je SWModeCheck
|
je SWModeCheck
|
||||||
mov al,[gDump+edi]
|
mov al,[gDump+edi]
|
||||||
inc edi
|
inc edi
|
||||||
cmp edi,200
|
cmp edi,200
|
||||||
je SMWError
|
je SMWError
|
||||||
test al,00010000b
|
test al,00010000b
|
||||||
jz FindStrobeHigh
|
jz FindStrobeHigh
|
||||||
|
|
||||||
mov [bDump+ebp],al
|
mov [bDump+ebp],al
|
||||||
inc ebp
|
inc ebp
|
||||||
jmp FindStrobeLow
|
jmp FindStrobeLow
|
||||||
|
|
||||||
SMWDone:
|
SMWDone:
|
||||||
popad
|
popad
|
||||||
mov eax,0
|
mov eax,0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SMWError:
|
SMWError:
|
||||||
popad
|
popad
|
||||||
mov eax,1
|
mov eax,1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SWModeCheck:
|
SWModeCheck:
|
||||||
cmp ebp,5
|
cmp ebp,5
|
||||||
je near ModeB1
|
je near ModeB1
|
||||||
cmp ebp,15
|
cmp ebp,15
|
||||||
je near ModeA1
|
je near ModeA1
|
||||||
cmp ebp,10
|
cmp ebp,10
|
||||||
je near ModeB2
|
je near ModeB2
|
||||||
cmp ebp,30
|
cmp ebp,30
|
||||||
je near ModeA2
|
je near ModeA2
|
||||||
cmp ebp,45
|
cmp ebp,45
|
||||||
je near ModeA3
|
je near ModeA3
|
||||||
cmp ebp,20
|
cmp ebp,20
|
||||||
je near ModeB4
|
je near ModeB4
|
||||||
cmp ebp,60
|
cmp ebp,60
|
||||||
je near ModeA4
|
je near ModeA4
|
||||||
jmp short SMWError
|
jmp short SMWError
|
||||||
|
|
||||||
ModeA1:
|
ModeA1:
|
||||||
cmp dword [_SWCount],3
|
cmp dword [_SWCount],3
|
||||||
je near ModeB3
|
je near ModeB3
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW _SW1
|
ParityCheckSW _SW1
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeA4:
|
ModeA4:
|
||||||
mov ebp,45
|
mov ebp,45
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW _SW4
|
ParityCheckSW _SW4
|
||||||
ModeA3:
|
ModeA3:
|
||||||
mov ebp,30
|
mov ebp,30
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW _SW3
|
ParityCheckSW _SW3
|
||||||
ModeA2:
|
ModeA2:
|
||||||
mov ebp,15
|
mov ebp,15
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW _SW2
|
ParityCheckSW _SW2
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW _SW1
|
ParityCheckSW _SW1
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeB4:
|
ModeB4:
|
||||||
mov ebp,15
|
mov ebp,15
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW _SW4
|
ParityCheckSW _SW4
|
||||||
ModeB3:
|
ModeB3:
|
||||||
mov ebp,10
|
mov ebp,10
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW _SW3
|
ParityCheckSW _SW3
|
||||||
ModeB2:
|
ModeB2:
|
||||||
mov ebp,5
|
mov ebp,5
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW _SW2
|
ParityCheckSW _SW2
|
||||||
ModeB1:
|
ModeB1:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW _SW1
|
ParityCheckSW _SW1
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
DoModeB:
|
DoModeB:
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov eax,2
|
mov eax,2
|
||||||
mov ecx,5
|
mov ecx,5
|
||||||
add ebp,bDump
|
add ebp,bDump
|
||||||
ModeBLoop:
|
ModeBLoop:
|
||||||
test byte [ebp],00100000b
|
test byte [ebp],00100000b
|
||||||
jnz $+4
|
jnz $+4
|
||||||
or ebx,eax
|
or ebx,eax
|
||||||
shl eax,1
|
shl eax,1
|
||||||
test byte [ebp],01000000b
|
test byte [ebp],01000000b
|
||||||
jnz $+4
|
jnz $+4
|
||||||
or ebx,eax
|
or ebx,eax
|
||||||
shl eax,1
|
shl eax,1
|
||||||
test byte [ebp],10000000b
|
test byte [ebp],10000000b
|
||||||
jnz $+4
|
jnz $+4
|
||||||
or ebx,eax
|
or ebx,eax
|
||||||
shl eax,1
|
shl eax,1
|
||||||
inc ebp
|
inc ebp
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz ModeBLoop
|
jnz ModeBLoop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DoModeA:
|
DoModeA:
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov eax,2
|
mov eax,2
|
||||||
mov ecx,15
|
mov ecx,15
|
||||||
add ebp,bDump
|
add ebp,bDump
|
||||||
ModeALoop:
|
ModeALoop:
|
||||||
test byte [ebp],00100000b
|
test byte [ebp],00100000b
|
||||||
jnz $+4
|
jnz $+4
|
||||||
or ebx,eax
|
or ebx,eax
|
||||||
shl eax,1
|
shl eax,1
|
||||||
inc ebp
|
inc ebp
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz ModeALoop
|
jnz ModeALoop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|||||||
@@ -1,330 +1,329 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;32-bit DOS-Mode driver for the Microsoft Sidewinder Gamepad
|
;32-bit DOS-Mode driver for the Microsoft Sidewinder Gamepad
|
||||||
;Multi-SW Version 1.5
|
;Multi-SW Version 1.5
|
||||||
;(C) 1997, 1998 Robert William Grubbs, All Rights Reserved
|
;(C) 1997, 1998 Robert William Grubbs, All Rights Reserved
|
||||||
;Latest revision 1/20/98
|
;Latest revision 1/20/98
|
||||||
; Driver Source code Include file
|
; Driver Source code Include file
|
||||||
|
|
||||||
;C-linkable, rewrote decoder -sardu
|
;C-linkable, rewrote decoder -sardu
|
||||||
|
|
||||||
;Flat memory mode (Protected mode extender required! Tested with DOS32)
|
;Flat memory mode (Protected mode extender required! Tested with DOS32)
|
||||||
;Tested with TASM 4.0+
|
;Tested with TASM 4.0+
|
||||||
|
|
||||||
|
|
||||||
SW1 dd 0 ;SW #1's button status
|
SW1 dd 0 ;SW #1's button status
|
||||||
SW2 dd 0 ;SW #2's button status
|
SW2 dd 0 ;SW #2's button status
|
||||||
SW3 dd 0 ;SW #3's button status
|
SW3 dd 0 ;SW #3's button status
|
||||||
SW4 dd 0 ;SW #4's button status
|
SW4 dd 0 ;SW #4's button status
|
||||||
SWCount dd 1 ;Tell the driver how many sidewinders are present
|
SWCount dd 1 ;Tell the driver how many sidewinders are present
|
||||||
SWSetup dd 0 ;Tell the driver what polling mode to use
|
SWSetup dd 0 ;Tell the driver what polling mode to use
|
||||||
; 0=Interrupts disabled, Multiple OUT statements
|
; 0=Interrupts disabled, Multiple OUT statements
|
||||||
; 1=Interrupts disabled, Single OUT statement
|
; 1=Interrupts disabled, Single OUT statement
|
||||||
; 2=Interrupts enabled, Multiple OUT statements
|
; 2=Interrupts enabled, Multiple OUT statements
|
||||||
; 3=Interrupts enabled, Single OUT statement
|
; 3=Interrupts enabled, Single OUT statement
|
||||||
|
|
||||||
gDump times 100h db 0 ;SW Status dump buffer (space for 256 bytes, uses 200)
|
gDump times 100h db 0 ;SW Status dump buffer (space for 256 bytes, uses 200)
|
||||||
bDump times 80h db 0 ;buffer to hold button data (Modes A and B, all SW)
|
bDump times 80h db 0 ;buffer to hold button data (Modes A and B, all SW)
|
||||||
|
|
||||||
;This macro calculates parity for the buttons and compares it to the SW's
|
;This macro calculates parity for the buttons and compares it to the SW's
|
||||||
; parity bit. If they don't match, the button data is discarded.
|
; parity bit. If they don't match, the button data is discarded.
|
||||||
%macro ParityCheckSW 1
|
%macro ParityCheckSW 1
|
||||||
mov ecx,ebx ;duplicate button status
|
mov ecx,ebx ;duplicate button status
|
||||||
xor cl,ch ;
|
xor cl,ch ;
|
||||||
jpe %%ParChkSW
|
jpe %%ParChkSW
|
||||||
mov [%1],ebx ;update button status for SW #n
|
mov [%1],ebx ;update button status for SW #n
|
||||||
%%ParChkSW ;done
|
%%ParChkSW ;done
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
;The main subroutine; this is the important one; bow down before it
|
;The main subroutine; this is the important one; bow down before it
|
||||||
;IN: None
|
;IN: None
|
||||||
;Out: SWx=buttons (bit 0=null 1=up 2=dn 3=rt 4=lt 5=A 6=B 7=C 8=X)
|
;Out: SWx=buttons (bit 0=null 1=up 2=dn 3=rt 4=lt 5=A 6=B 7=C 8=X)
|
||||||
; (9=Y 10=Z 11=L 12=R 13=St 14=M 15=Parity)
|
; (9=Y 10=Z 11=L 12=R 13=St 14=M 15=Parity)
|
||||||
;No registers destroyed
|
;No registers destroyed
|
||||||
|
|
||||||
readSideWinder:
|
readSideWinder:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov ecx,200 ;dump buffer fill size
|
mov ecx,200 ;dump buffer fill size
|
||||||
mov ebx,gDump ;initial dump pointer
|
mov ebx,gDump ;initial dump pointer
|
||||||
mov edx,0201h ;joystick port
|
mov edx,0201h ;joystick port
|
||||||
|
|
||||||
cmp dword[SWSetup],0
|
cmp dword[SWSetup],0
|
||||||
jne NotSW0
|
jne NotSW0
|
||||||
cli ;Disable interrupts (required to avoid jitter)
|
cli ;Disable interrupts (required to avoid jitter)
|
||||||
GetSWDataLoop: ;
|
GetSWDataLoop: ;
|
||||||
out dx,al ;trigger joystick port
|
out dx,al ;trigger joystick port
|
||||||
in al,dx ;read SW status byte
|
in al,dx ;read SW status byte
|
||||||
mov [ebx],al ;dump status byte
|
mov [ebx],al ;dump status byte
|
||||||
inc ebx ;increment dump pointer
|
inc ebx ;increment dump pointer
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz GetSWDataLoop
|
jnz GetSWDataLoop
|
||||||
sti ;Re-enable interrupts
|
sti ;Re-enable interrupts
|
||||||
jmp SWPollDone
|
jmp SWPollDone
|
||||||
|
|
||||||
NotSW0:
|
NotSW0:
|
||||||
cmp dword[SWSetup],1
|
cmp dword[SWSetup],1
|
||||||
jne NotSW1
|
jne NotSW1
|
||||||
cli ;Disable interrupts (required to avoid jitter)
|
cli ;Disable interrupts (required to avoid jitter)
|
||||||
out dx,al ;trigger joystick port
|
out dx,al ;trigger joystick port
|
||||||
GetSWDataLoop1: ;
|
GetSWDataLoop1: ;
|
||||||
in al,dx ;read SW status byte
|
in al,dx ;read SW status byte
|
||||||
mov [ebx],al ;dump status byte
|
mov [ebx],al ;dump status byte
|
||||||
inc ebx ;increment dump pointer
|
inc ebx ;increment dump pointer
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz GetSWDataLoop1
|
jnz GetSWDataLoop1
|
||||||
sti ;Re-enable interrupts
|
sti ;Re-enable interrupts
|
||||||
jmp SWPollDone
|
jmp SWPollDone
|
||||||
|
|
||||||
NotSW1:
|
NotSW1:
|
||||||
cmp dword[SWSetup],2
|
cmp dword[SWSetup],2
|
||||||
jne NotSW2
|
jne NotSW2
|
||||||
GetSWDataLoop2: ;
|
GetSWDataLoop2: ;
|
||||||
out dx,al ;trigger joystick port
|
out dx,al ;trigger joystick port
|
||||||
in al,dx ;read SW status byte
|
in al,dx ;read SW status byte
|
||||||
mov [ebx],al ;dump status byte
|
mov [ebx],al ;dump status byte
|
||||||
inc ebx ;increment dump pointer
|
inc ebx ;increment dump pointer
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz GetSWDataLoop2
|
jnz GetSWDataLoop2
|
||||||
jmp SWPollDone
|
jmp SWPollDone
|
||||||
|
|
||||||
NotSW2:
|
NotSW2:
|
||||||
;default all others to SWStatus=3
|
;default all others to SWStatus=3
|
||||||
out dx,al ;trigger joystick port
|
out dx,al ;trigger joystick port
|
||||||
GetSWDataLoop3: ;
|
GetSWDataLoop3: ;
|
||||||
in al,dx ;read SW status byte
|
in al,dx ;read SW status byte
|
||||||
mov [ebx],al ;dump status byte
|
mov [ebx],al ;dump status byte
|
||||||
inc ebx ;increment dump pointer
|
inc ebx ;increment dump pointer
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz GetSWDataLoop3
|
jnz GetSWDataLoop3
|
||||||
|
|
||||||
SWPollDone:
|
SWPollDone:
|
||||||
|
|
||||||
mov ecx,0 ;tick count
|
mov ecx,0 ;tick count
|
||||||
mov esi,1 ;initialize output mask
|
mov esi,1 ;initialize output mask
|
||||||
mov ebx,0 ;initialize output
|
mov ebx,0 ;initialize output
|
||||||
mov edi,0 ;initialize input pointer
|
mov edi,0 ;initialize input pointer
|
||||||
|
|
||||||
;My current method of cycle detection is to look for 15 highs in a row on
|
;My current method of cycle detection is to look for 15 highs in a row on
|
||||||
; the strobe line. Cycle ends is detected by 15 lows in a row.
|
; the strobe line. Cycle ends is detected by 15 lows in a row.
|
||||||
;Mode A has 15 strobes in a cycle, Mode B has 5.
|
;Mode A has 15 strobes in a cycle, Mode B has 5.
|
||||||
; Note that the 15 highs/lows for cycle detection may be too high for slow
|
; Note that the 15 highs/lows for cycle detection may be too high for slow
|
||||||
; machines. I havn't seen a problem yet, but it may exist...
|
; machines. I havn't seen a problem yet, but it may exist...
|
||||||
;Multiple Sidewinder data complicates things. Each additional SW tags
|
;Multiple Sidewinder data complicates things. Each additional SW tags
|
||||||
; another set of strobes to the cycle, 5 more in mode B, 15 more in mode A.
|
; another set of strobes to the cycle, 5 more in mode B, 15 more in mode A.
|
||||||
; Detecting extra SW gamepad data is fairly simple: count the number of
|
; Detecting extra SW gamepad data is fairly simple: count the number of
|
||||||
; strobes. If it is a multiple of 5, you're in mode B and can divide by 5
|
; strobes. If it is a multiple of 5, you're in mode B and can divide by 5
|
||||||
; to get the total number of gamepads. If it's divisible by 15, use mode A.
|
; to get the total number of gamepads. If it's divisible by 15, use mode A.
|
||||||
; However, this method cannot distinguish between mode A for one SW and mode
|
; However, this method cannot distinguish between mode A for one SW and mode
|
||||||
; B for three SW. In that case, the SWCount variable must be set correctly.
|
; B for three SW. In that case, the SWCount variable must be set correctly.
|
||||||
|
|
||||||
FindCycle:
|
FindCycle:
|
||||||
mov al,[gDump+edi] ;get next status byte
|
mov al,[gDump+edi] ;get next status byte
|
||||||
inc edi ;increment input pointer
|
inc edi ;increment input pointer
|
||||||
cmp edi,200 ;test for end of status block
|
cmp edi,200 ;test for end of status block
|
||||||
je SWNoFind ;if it's the end, quit sub with error
|
je SWNoFind ;if it's the end, quit sub with error
|
||||||
test al,00010000b ;Check for nonzero bits
|
test al,00010000b ;Check for nonzero bits
|
||||||
jnz WMFCS1 ;
|
jnz WMFCS1 ;
|
||||||
xor ecx,ecx ;if zero, reset tick count
|
xor ecx,ecx ;if zero, reset tick count
|
||||||
jmp FindCycle ;can't be pre-cycle
|
jmp FindCycle ;can't be pre-cycle
|
||||||
WMFCS1: ;Possibly pre-cycle
|
WMFCS1: ;Possibly pre-cycle
|
||||||
inc ecx ;increment tick count
|
inc ecx ;increment tick count
|
||||||
cmp ecx,15 ;test for sufficient ticks for cycle start
|
cmp ecx,15 ;test for sufficient ticks for cycle start
|
||||||
jne FindCycle ;if insufficient, get next status byte
|
jne FindCycle ;if insufficient, get next status byte
|
||||||
;Yippie! it found a (probable) cycle!
|
;Yippie! it found a (probable) cycle!
|
||||||
|
|
||||||
mov ebp,0 ;initialize bDump index (strobe count)
|
mov ebp,0 ;initialize bDump index (strobe count)
|
||||||
|
|
||||||
FindStrobeLow: ;Search for leading edge of data strobe
|
FindStrobeLow: ;Search for leading edge of data strobe
|
||||||
mov al,[gDump+edi] ;get next status byte
|
mov al,[gDump+edi] ;get next status byte
|
||||||
inc edi ;increment input pointer
|
inc edi ;increment input pointer
|
||||||
cmp edi,200 ;test for end of status block
|
cmp edi,200 ;test for end of status block
|
||||||
je SWNoFind ;if it's the end, quit sub with error
|
je SWNoFind ;if it's the end, quit sub with error
|
||||||
test al,00010000b ;get "strobe" bit
|
test al,00010000b ;get "strobe" bit
|
||||||
jnz SHORT FindStrobeLow ;if it isn't zero, we're not there yet
|
jnz SHORT FindStrobeLow ;if it isn't zero, we're not there yet
|
||||||
xor ecx,ecx ;initialize cycle end test count
|
xor ecx,ecx ;initialize cycle end test count
|
||||||
|
|
||||||
FindStrobeHigh:
|
FindStrobeHigh:
|
||||||
inc ecx ;increment zero count
|
inc ecx ;increment zero count
|
||||||
cmp ecx,0fh ;is it 15?
|
cmp ecx,0fh ;is it 15?
|
||||||
je SWModeCheck ;if so, goto mode check
|
je SWModeCheck ;if so, goto mode check
|
||||||
mov al,[gDump+edi] ;get next status byte
|
mov al,[gDump+edi] ;get next status byte
|
||||||
inc edi ;increment input pointer
|
inc edi ;increment input pointer
|
||||||
cmp edi,200 ;test for end of status block
|
cmp edi,200 ;test for end of status block
|
||||||
je SWNoFind ;if it's the end, quit sub with error
|
je SWNoFind ;if it's the end, quit sub with error
|
||||||
test al,00010000b ;get "strobe" bit
|
test al,00010000b ;get "strobe" bit
|
||||||
jz FindStrobeHigh ;if it is zero, we're not there yet
|
jz FindStrobeHigh ;if it is zero, we're not there yet
|
||||||
;if not, we're there! data bit is valid (probably)
|
;if not, we're there! data bit is valid (probably)
|
||||||
mov [bDump+ebp],al ;preserve data for button decoding
|
mov [bDump+ebp],al ;preserve data for button decoding
|
||||||
inc ebp ;increment strobe count/bDump index
|
inc ebp ;increment strobe count/bDump index
|
||||||
jmp FindStrobeLow ;wait for the next button
|
jmp FindStrobeLow ;wait for the next button
|
||||||
|
|
||||||
SMWDone:
|
SMWDone:
|
||||||
SWNoFind:
|
SWNoFind:
|
||||||
popad
|
popad
|
||||||
ret ;return to calling procedure
|
ret ;return to calling procedure
|
||||||
|
|
||||||
SWModeCheck: ;Check strobe count to identify mode and # of SW
|
SWModeCheck: ;Check strobe count to identify mode and # of SW
|
||||||
cmp ebp,15 ;Is it Mode A with 1 Sidewinder or B with 3?
|
cmp ebp,15 ;Is it Mode A with 1 Sidewinder or B with 3?
|
||||||
je ModeA1
|
je ModeA1
|
||||||
cmp ebp,5 ;Is it Mode B with 1 Sidewinders?
|
cmp ebp,5 ;Is it Mode B with 1 Sidewinders?
|
||||||
je ModeB1
|
je ModeB1
|
||||||
cmp ebp,30 ;Is it Mode A with 2 Sidewinders?
|
cmp ebp,30 ;Is it Mode A with 2 Sidewinders?
|
||||||
je ModeA2
|
je ModeA2
|
||||||
cmp ebp,10 ;Is it Mode B with 2 Sidewinders?
|
cmp ebp,10 ;Is it Mode B with 2 Sidewinders?
|
||||||
je near ModeB2
|
je near ModeB2
|
||||||
cmp ebp,45 ;Is it Mode A with 3 Sidewinders?
|
cmp ebp,45 ;Is it Mode A with 3 Sidewinders?
|
||||||
je near ModeA3
|
je near ModeA3
|
||||||
cmp ebp,60 ;Is it Mode A with 4 Sidewinders?
|
cmp ebp,60 ;Is it Mode A with 4 Sidewinders?
|
||||||
je near ModeA4
|
je near ModeA4
|
||||||
cmp ebp,20 ;Is it Mode B with 4 Sidewinders?
|
cmp ebp,20 ;Is it Mode B with 4 Sidewinders?
|
||||||
je near ModeB4
|
je near ModeB4
|
||||||
jmp SHORT SWNoFind ;Any other # of strobes is invalid data
|
jmp SHORT SWNoFind ;Any other # of strobes is invalid data
|
||||||
|
|
||||||
ModeB1:
|
ModeB1:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeA1:
|
ModeA1:
|
||||||
cmp dword [SWCount],3
|
cmp dword [SWCount],3
|
||||||
je near ModeB3
|
je near ModeB3
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeA2:
|
ModeA2:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
mov ebp,15
|
mov ebp,15
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW2
|
ParityCheckSW SW2
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeA3:
|
ModeA3:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
mov ebp,15
|
mov ebp,15
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW2
|
ParityCheckSW SW2
|
||||||
mov ebp,30
|
mov ebp,30
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW3
|
ParityCheckSW SW3
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeA4:
|
ModeA4:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
mov ebp,15
|
mov ebp,15
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW2
|
ParityCheckSW SW2
|
||||||
mov ebp,30
|
mov ebp,30
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW3
|
ParityCheckSW SW3
|
||||||
mov ebp,45
|
mov ebp,45
|
||||||
call DoModeA
|
call DoModeA
|
||||||
ParityCheckSW SW4
|
ParityCheckSW SW4
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeB2:
|
ModeB2:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
mov ebp,5
|
mov ebp,5
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW2
|
ParityCheckSW SW2
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeB3:
|
ModeB3:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
mov ebp,5
|
mov ebp,5
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW2
|
ParityCheckSW SW2
|
||||||
mov ebp,10
|
mov ebp,10
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW3
|
ParityCheckSW SW3
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
|
|
||||||
ModeB4:
|
ModeB4:
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW1
|
ParityCheckSW SW1
|
||||||
mov ebp,5
|
mov ebp,5
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW2
|
ParityCheckSW SW2
|
||||||
mov ebp,10
|
mov ebp,10
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW3
|
ParityCheckSW SW3
|
||||||
mov ebp,15
|
mov ebp,15
|
||||||
call DoModeB
|
call DoModeB
|
||||||
ParityCheckSW SW4
|
ParityCheckSW SW4
|
||||||
jmp SMWDone
|
jmp SMWDone
|
||||||
ENDP
|
ENDP
|
||||||
|
|
||||||
%macro SWRepeat 1
|
%macro SWRepeat 1
|
||||||
mov al,[bDump+ebp+%1]
|
mov al,[bDump+ebp+%1]
|
||||||
shr al,5 ;get upper 3 bits
|
shr al,5 ;get upper 3 bits
|
||||||
shl eax,1+3*%1 ;shift into place
|
shl eax,1+3*%1 ;shift into place
|
||||||
or ebx,eax ;or into output
|
or ebx,eax ;or into output
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
DoModeB:
|
DoModeB:
|
||||||
xor ebx,ebx ;Initialize output
|
xor ebx,ebx ;Initialize output
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
|
|
||||||
SWRepeat 0
|
SWRepeat 0
|
||||||
SWRepeat 1
|
SWRepeat 1
|
||||||
SWRepeat 2
|
SWRepeat 2
|
||||||
SWRepeat 3
|
SWRepeat 3
|
||||||
SWRepeat 4
|
SWRepeat 4
|
||||||
|
|
||||||
xor ebx,0FFFEh
|
xor ebx,0FFFEh
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DoModeA:
|
DoModeA:
|
||||||
xor ebx,ebx ;Clear output
|
xor ebx,ebx ;Clear output
|
||||||
mov ecx,15 ;bit count
|
mov ecx,15 ;bit count
|
||||||
|
|
||||||
ALP:
|
ALP:
|
||||||
mov al,[bDump+ebp]
|
mov al,[bDump+ebp]
|
||||||
inc ebp
|
inc ebp
|
||||||
shl al,3
|
shl al,3
|
||||||
rcr ebx,1
|
rcr ebx,1
|
||||||
dec ecx
|
dec ecx
|
||||||
jg ALP
|
jg ALP
|
||||||
|
|
||||||
shr ebx,16
|
shr ebx,16
|
||||||
xor ebx,0FFFEh
|
xor ebx,0FFFEh
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,267 +1,267 @@
|
|||||||
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
//
|
//
|
||||||
//This program is free software; you can redistribute it and/or
|
//This program is free software; you can redistribute it and/or
|
||||||
//modify it under the terms of the GNU General Public License
|
//modify it under the terms of the GNU General Public License
|
||||||
//as published by the Free Software Foundation; either
|
//as published by the Free Software Foundation; either
|
||||||
//version 2 of the License, or (at your option) any later
|
//version 2 of the License, or (at your option) any later
|
||||||
//version.
|
//version.
|
||||||
//
|
//
|
||||||
//This program is distributed in the hope that it will be useful,
|
//This program is distributed in the hope that it will be useful,
|
||||||
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//GNU General Public License for more details.
|
//GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
//You should have received a copy of the GNU General Public License
|
//You should have received a copy of the GNU General Public License
|
||||||
//along with this program; if not, write to the Free Software
|
//along with this program; if not, write to the Free Software
|
||||||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef ZDOS
|
#ifdef ZDOS
|
||||||
#include <dos.h>
|
#include <dos.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define DWORD unsigned int
|
#define DWORD unsigned int
|
||||||
#define BYTE unsigned char
|
#define BYTE unsigned char
|
||||||
|
|
||||||
FILE *FILEHANDLE[16];
|
FILE *FILEHANDLE[16];
|
||||||
DWORD CurrentHandle=0;
|
DWORD CurrentHandle=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ZFileSystemInit
|
// ZFileSystemInit
|
||||||
// return 0
|
// return 0
|
||||||
|
|
||||||
// ZOpenFile info :
|
// ZOpenFile info :
|
||||||
BYTE * ZOpenFileName;
|
BYTE * ZOpenFileName;
|
||||||
DWORD ZOpenMode;
|
DWORD ZOpenMode;
|
||||||
// Open modes : 0 read/write in
|
// Open modes : 0 read/write in
|
||||||
// 1 write (create file, overwrite)
|
// 1 write (create file, overwrite)
|
||||||
// return file handle if success, 0xFFFFFFFF if error
|
// return file handle if success, 0xFFFFFFFF if error
|
||||||
|
|
||||||
// ZCloseFile info :
|
// ZCloseFile info :
|
||||||
DWORD ZCloseFileHandle;
|
DWORD ZCloseFileHandle;
|
||||||
// return 0
|
// return 0
|
||||||
|
|
||||||
// ZFileSeek info :
|
// ZFileSeek info :
|
||||||
DWORD ZFileSeekHandle;
|
DWORD ZFileSeekHandle;
|
||||||
DWORD ZFileSeekPos;
|
DWORD ZFileSeekPos;
|
||||||
DWORD ZFileSeekMode; // 0 start, 1 end
|
DWORD ZFileSeekMode; // 0 start, 1 end
|
||||||
// return 0
|
// return 0
|
||||||
|
|
||||||
// ZFileReadBlock info :
|
// ZFileReadBlock info :
|
||||||
BYTE * ZFileReadBlock;
|
BYTE * ZFileReadBlock;
|
||||||
DWORD ZFileReadSize;
|
DWORD ZFileReadSize;
|
||||||
DWORD ZFileReadHandle;
|
DWORD ZFileReadHandle;
|
||||||
// return 0
|
// return 0
|
||||||
|
|
||||||
// ZFileWriteBlock info :
|
// ZFileWriteBlock info :
|
||||||
BYTE * ZFileWriteBlock;
|
BYTE * ZFileWriteBlock;
|
||||||
DWORD ZFileWriteSize;
|
DWORD ZFileWriteSize;
|
||||||
DWORD ZFileWriteHandle;
|
DWORD ZFileWriteHandle;
|
||||||
// return 0
|
// return 0
|
||||||
|
|
||||||
// ZFileTell
|
// ZFileTell
|
||||||
DWORD ZFileTellHandle;
|
DWORD ZFileTellHandle;
|
||||||
|
|
||||||
// ZFileGetftime
|
// ZFileGetftime
|
||||||
BYTE * ZFFTimeFName;
|
BYTE * ZFFTimeFName;
|
||||||
DWORD ZFTimeHandle;
|
DWORD ZFTimeHandle;
|
||||||
DWORD ZFDate;
|
DWORD ZFDate;
|
||||||
DWORD ZFTime;
|
DWORD ZFTime;
|
||||||
|
|
||||||
// MKDir/CHDir
|
// MKDir/CHDir
|
||||||
BYTE * MKPath;
|
BYTE * MKPath;
|
||||||
BYTE * CHPath;
|
BYTE * CHPath;
|
||||||
BYTE * RMPath;
|
BYTE * RMPath;
|
||||||
|
|
||||||
// GetDir
|
// GetDir
|
||||||
BYTE * DirName;
|
BYTE * DirName;
|
||||||
DWORD DriveNumber;
|
DWORD DriveNumber;
|
||||||
|
|
||||||
// ZFileDelete
|
// ZFileDelete
|
||||||
BYTE * ZFileDelFName;
|
BYTE * ZFileDelFName;
|
||||||
// return current position
|
// return current position
|
||||||
|
|
||||||
DWORD ZFileSystemInit()
|
DWORD ZFileSystemInit()
|
||||||
{
|
{
|
||||||
CurrentHandle=0;
|
CurrentHandle=0;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZOpenFile()
|
DWORD ZOpenFile()
|
||||||
{
|
{
|
||||||
if(ZOpenMode==0)
|
if(ZOpenMode==0)
|
||||||
{
|
{
|
||||||
if((FILEHANDLE[CurrentHandle]=fopen(ZOpenFileName,"rb"))!=NULL)
|
if((FILEHANDLE[CurrentHandle]=fopen(ZOpenFileName,"rb"))!=NULL)
|
||||||
{
|
{
|
||||||
CurrentHandle+=1;
|
CurrentHandle+=1;
|
||||||
return(CurrentHandle-1);
|
return(CurrentHandle-1);
|
||||||
}
|
}
|
||||||
return(0xFFFFFFFF);
|
return(0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
if(ZOpenMode==1)
|
if(ZOpenMode==1)
|
||||||
{
|
{
|
||||||
if((FILEHANDLE[CurrentHandle]=fopen(ZOpenFileName,"wb"))!=NULL)
|
if((FILEHANDLE[CurrentHandle]=fopen(ZOpenFileName,"wb"))!=NULL)
|
||||||
{
|
{
|
||||||
CurrentHandle+=1;
|
CurrentHandle+=1;
|
||||||
return(CurrentHandle-1);
|
return(CurrentHandle-1);
|
||||||
}
|
}
|
||||||
return(0xFFFFFFFF);
|
return(0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
if(ZOpenMode==2)
|
if(ZOpenMode==2)
|
||||||
{
|
{
|
||||||
if((FILEHANDLE[CurrentHandle]=fopen(ZOpenFileName,"r+b"))!=NULL)
|
if((FILEHANDLE[CurrentHandle]=fopen(ZOpenFileName,"r+b"))!=NULL)
|
||||||
{
|
{
|
||||||
CurrentHandle+=1;
|
CurrentHandle+=1;
|
||||||
return(CurrentHandle-1);
|
return(CurrentHandle-1);
|
||||||
}
|
}
|
||||||
return(0xFFFFFFFF);
|
return(0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
return(0xFFFFFFFF);
|
return(0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZCloseFile()
|
DWORD ZCloseFile()
|
||||||
{
|
{
|
||||||
fclose(FILEHANDLE[ZCloseFileHandle]);
|
fclose(FILEHANDLE[ZCloseFileHandle]);
|
||||||
CurrentHandle-=1;
|
CurrentHandle-=1;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileSeek()
|
DWORD ZFileSeek()
|
||||||
{
|
{
|
||||||
if(ZFileSeekMode==0)
|
if(ZFileSeekMode==0)
|
||||||
{
|
{
|
||||||
fseek(FILEHANDLE[ZFileSeekHandle],ZFileSeekPos,SEEK_SET);
|
fseek(FILEHANDLE[ZFileSeekHandle],ZFileSeekPos,SEEK_SET);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if(ZFileSeekMode==1)
|
if(ZFileSeekMode==1)
|
||||||
{
|
{
|
||||||
fseek(FILEHANDLE[ZFileSeekHandle],ZFileSeekPos,SEEK_END);
|
fseek(FILEHANDLE[ZFileSeekHandle],ZFileSeekPos,SEEK_END);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
return(0xFFFFFFFF);
|
return(0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileRead()
|
DWORD ZFileRead()
|
||||||
{
|
{
|
||||||
return(fread(ZFileReadBlock,1,ZFileReadSize,FILEHANDLE[ZFileReadHandle]));
|
return(fread(ZFileReadBlock,1,ZFileReadSize,FILEHANDLE[ZFileReadHandle]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD ZFileWrite()
|
DWORD ZFileWrite()
|
||||||
{
|
{
|
||||||
if((fwrite(ZFileWriteBlock,1,ZFileWriteSize,FILEHANDLE[ZFileWriteHandle]))!=ZFileWriteSize) return(0xFFFFFFFF);
|
if((fwrite(ZFileWriteBlock,1,ZFileWriteSize,FILEHANDLE[ZFileWriteHandle]))!=ZFileWriteSize) return(0xFFFFFFFF);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileTell()
|
DWORD ZFileTell()
|
||||||
{
|
{
|
||||||
return(ftell(FILEHANDLE[ZFileTellHandle]));
|
return(ftell(FILEHANDLE[ZFileTellHandle]));
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileDelete()
|
DWORD ZFileDelete()
|
||||||
{
|
{
|
||||||
return(remove(ZFileDelFName));
|
return(remove(ZFileDelFName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD ZFileGetFTime()
|
DWORD ZFileGetFTime()
|
||||||
{
|
{
|
||||||
_dos_open(ZFFTimeFName, 0,&ZFTimeHandle);
|
_dos_open(ZFFTimeFName, 0,&ZFTimeHandle);
|
||||||
_dos_getftime(ZFTimeHandle,&ZFDate,&ZFTime);
|
_dos_getftime(ZFTimeHandle,&ZFDate,&ZFTime);
|
||||||
_dos_close(ZFTimeHandle);
|
_dos_close(ZFTimeHandle);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileMKDir()
|
DWORD ZFileMKDir()
|
||||||
{
|
{
|
||||||
return(mkdir(MKPath));
|
return(mkdir(MKPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileCHDir()
|
DWORD ZFileCHDir()
|
||||||
{
|
{
|
||||||
return(chdir(CHPath));
|
return(chdir(CHPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileRMDir()
|
DWORD ZFileRMDir()
|
||||||
{
|
{
|
||||||
return(rmdir(RMPath));
|
return(rmdir(RMPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileGetDir()
|
DWORD ZFileGetDir()
|
||||||
{
|
{
|
||||||
return(getcwd(DirName,128));
|
return(getcwd(DirName,128));
|
||||||
}
|
}
|
||||||
|
|
||||||
BYTE * ZFileFindPATH;
|
BYTE * ZFileFindPATH;
|
||||||
DWORD ZFileFindATTRIB;
|
DWORD ZFileFindATTRIB;
|
||||||
DWORD DTALocPos;
|
DWORD DTALocPos;
|
||||||
|
|
||||||
//struct _find_t {
|
//struct _find_t {
|
||||||
// char reserved[21] __attribute__((packed));
|
// char reserved[21] __attribute__((packed));
|
||||||
// unsigned char attrib __attribute__((packed));
|
// unsigned char attrib __attribute__((packed));
|
||||||
// unsigned short wr_time __attribute__((packed));
|
// unsigned short wr_time __attribute__((packed));
|
||||||
// unsigned short wr_date __attribute__((packed));
|
// unsigned short wr_date __attribute__((packed));
|
||||||
// unsigned long size __attribute__((packed));
|
// unsigned long size __attribute__((packed));
|
||||||
// char name[256] __attribute__((packed));
|
// char name[256] __attribute__((packed));
|
||||||
//};
|
//};
|
||||||
|
|
||||||
DWORD ZFileFindFirst()
|
DWORD ZFileFindFirst()
|
||||||
{
|
{
|
||||||
return(_dos_findfirst(ZFileFindPATH,ZFileFindATTRIB,DTALocPos));
|
return(_dos_findfirst(ZFileFindPATH,ZFileFindATTRIB,DTALocPos));
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileFindNext()
|
DWORD ZFileFindNext()
|
||||||
{
|
{
|
||||||
return(_dos_findnext(DTALocPos));
|
return(_dos_findnext(DTALocPos));
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD ZFileFindEnd() // for compatibility with windows later
|
DWORD ZFileFindEnd() // for compatibility with windows later
|
||||||
{
|
{
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//BYTE * DirName;
|
//BYTE * DirName;
|
||||||
//DWORD DriveNumber;
|
//DWORD DriveNumber;
|
||||||
|
|
||||||
//unsigned int _dos_findfirst(char *_name, unsigned int _attr, struct _find_t *_result);
|
//unsigned int _dos_findfirst(char *_name, unsigned int _attr, struct _find_t *_result);
|
||||||
//unsigned int _dos_findnext(struct _find_t *_result);
|
//unsigned int _dos_findnext(struct _find_t *_result);
|
||||||
|
|
||||||
|
|
||||||
DWORD GetTime()
|
DWORD GetTime()
|
||||||
{
|
{
|
||||||
|
|
||||||
DWORD value;
|
DWORD value;
|
||||||
struct tm *newtime;
|
struct tm *newtime;
|
||||||
time_t long_time;
|
time_t long_time;
|
||||||
|
|
||||||
time( &long_time );
|
time( &long_time );
|
||||||
newtime = localtime( &long_time );
|
newtime = localtime( &long_time );
|
||||||
|
|
||||||
value = ((newtime->tm_sec) % 10)+((newtime->tm_sec)/10)*16
|
value = ((newtime->tm_sec) % 10)+((newtime->tm_sec)/10)*16
|
||||||
+((((newtime->tm_min) % 10)+((newtime->tm_min)/10)*16) << 8)
|
+((((newtime->tm_min) % 10)+((newtime->tm_min)/10)*16) << 8)
|
||||||
+((((newtime->tm_hour) % 10)+((newtime->tm_hour)/10)*16) << 16);
|
+((((newtime->tm_hour) % 10)+((newtime->tm_hour)/10)*16) << 16);
|
||||||
return(value);
|
return(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD GetDate()
|
DWORD GetDate()
|
||||||
{
|
{
|
||||||
|
|
||||||
DWORD value;
|
DWORD value;
|
||||||
struct tm *newtime;
|
struct tm *newtime;
|
||||||
time_t long_time;
|
time_t long_time;
|
||||||
|
|
||||||
time( &long_time );
|
time( &long_time );
|
||||||
newtime = localtime( &long_time );
|
newtime = localtime( &long_time );
|
||||||
value = ((newtime->tm_mday) % 10)+((newtime->tm_mday)/10)*16
|
value = ((newtime->tm_mday) % 10)+((newtime->tm_mday)/10)*16
|
||||||
+(((newtime->tm_mon)+1) << 8)
|
+(((newtime->tm_mon)+1) << 8)
|
||||||
+((((newtime->tm_year) % 10)+((newtime->tm_year)/10)*16) << 16);
|
+((((newtime->tm_year) % 10)+((newtime->tm_year)/10)*16) << 16);
|
||||||
+((newtime->tm_wday) << 28);
|
+((newtime->tm_wday) << 28);
|
||||||
|
|
||||||
return(value);
|
return(value);
|
||||||
}
|
}
|
||||||
@@ -1,396 +1,395 @@
|
|||||||
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
//
|
//
|
||||||
//This program is free software; you can redistribute it and/or
|
//This program is free software; you can redistribute it and/or
|
||||||
//modify it under the terms of the GNU General Public License
|
//modify it under the terms of the GNU General Public License
|
||||||
//as published by the Free Software Foundation; either
|
//as published by the Free Software Foundation; either
|
||||||
//version 2 of the License, or (at your option) any later
|
//version 2 of the License, or (at your option) any later
|
||||||
//version.
|
//version.
|
||||||
//
|
//
|
||||||
//This program is distributed in the hope that it will be useful,
|
//This program is distributed in the hope that it will be useful,
|
||||||
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//GNU General Public License for more details.
|
//GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
//You should have received a copy of the GNU General Public License
|
//You should have received a copy of the GNU General Public License
|
||||||
//along with this program; if not, write to the Free Software
|
//along with this program; if not, write to the Free Software
|
||||||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
extern void zstart(void);
|
extern void zstart(void);
|
||||||
extern void DosExit(void);
|
extern void DosExit(void);
|
||||||
extern void ConvertJoyMap1(void);
|
extern void ConvertJoyMap1(void);
|
||||||
extern void ConvertJoyMap2(void);
|
extern void ConvertJoyMap2(void);
|
||||||
extern void displayparams(void);
|
extern void displayparams(void);
|
||||||
extern void makeextension(void);
|
extern void makeextension(void);
|
||||||
|
|
||||||
extern unsigned char Palette0, SPC700sh, OffBy1Line, DSPDisable,
|
extern unsigned char Palette0, SPC700sh, OffBy1Line, DSPDisable,
|
||||||
FPUCopy, Force8b, ForcePal, GUIClick, MouseDis,
|
FPUCopy, Force8b, ForcePal, GUIClick, MouseDis,
|
||||||
MusicRelVol, ScreenScale, SoundCompD, SoundQuality,
|
MusicRelVol, ScreenScale, SoundCompD, SoundQuality,
|
||||||
StereoSound, V8Mode, antienab, cvidmode, debugdisble,
|
StereoSound, V8Mode, antienab, cvidmode, debugdisble,
|
||||||
debugger, enterpress, finterleave, frameskip,
|
debugger, enterpress, finterleave, frameskip,
|
||||||
gammalevel, guioff, per2exec, pl1contrl, pl2contrl,
|
gammalevel, guioff, per2exec, pl1contrl, pl2contrl,
|
||||||
romtype, scanlines, showallext, smallscreenon, soundon,
|
romtype, scanlines, showallext, smallscreenon, soundon,
|
||||||
spcon, vsyncon, DisplayS, fname, filefound, SnowOn;
|
spcon, vsyncon, DisplayS, fname, filefound, SnowOn;
|
||||||
|
|
||||||
void ccmdline(void);
|
void ccmdline(void);
|
||||||
|
|
||||||
char *ers[] =
|
char *ers[] =
|
||||||
{
|
{
|
||||||
"Frame Skip must be a value of 0 to 9!\n",
|
"Frame Skip must be a value of 0 to 9!\n",
|
||||||
"Gamma Correction Level must be a value of 0 to 5!\n",
|
"Gamma Correction Level must be a value of 0 to 5!\n",
|
||||||
"Sound Sampling Rate must be a value of 0 to 6!\n",
|
"Sound Sampling Rate must be a value of 0 to 6!\n",
|
||||||
"Invalid Video Mode!\n",
|
"Invalid Video Mode!\n",
|
||||||
"Percentage of instructions to execute must be a number from 50 to 150!\n",
|
"Percentage of instructions to execute must be a number from 50 to 150!\n",
|
||||||
"Player Input must be a value from 0 to 6!\n",
|
"Player Input must be a value from 0 to 6!\n",
|
||||||
"Volume must be a number from 0 to 100!\n"
|
"Volume must be a number from 0 to 100!\n"
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
int main(int margc, char **margv)
|
int main(int margc, char **margv)
|
||||||
{
|
{
|
||||||
argc=margc;
|
argc=margc;
|
||||||
argv=margv;
|
argv=margv;
|
||||||
zstart();
|
zstart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int my_atoi(char *nptr)
|
int my_atoi(char *nptr)
|
||||||
{
|
{
|
||||||
int p,c;
|
int p,c;
|
||||||
c=0;
|
c=0;
|
||||||
for(p=0;nptr[p];p++)
|
for(p=0;nptr[p];p++)
|
||||||
{
|
{
|
||||||
if( !isdigit(nptr[p]) ) c+=1;
|
if( !isdigit(nptr[p]) ) c+=1;
|
||||||
}
|
}
|
||||||
if(c) return -1;
|
if(c) return -1;
|
||||||
else return atoi(nptr);
|
else return atoi(nptr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ccmdline(void)
|
void ccmdline(void)
|
||||||
{
|
{
|
||||||
int p=0;
|
int p=0;
|
||||||
p=pccmdline();
|
p=pccmdline();
|
||||||
if(p == 0) return;
|
if(p == 0) return;
|
||||||
|
|
||||||
if(p == 9)
|
if(p == 9)
|
||||||
{
|
{
|
||||||
displayparams();
|
displayparams();
|
||||||
}
|
}
|
||||||
if(p == 4)
|
if(p == 4)
|
||||||
{
|
{
|
||||||
// printf("Mangled command line, did you forget a parm?\n");
|
// printf("Mangled command line, did you forget a parm?\n");
|
||||||
printf("Invalid Commandline!\n");
|
printf("Invalid Commandline!\n");
|
||||||
DosExit();
|
DosExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if((p > 9) && (p < 17))
|
if((p > 9) && (p < 17))
|
||||||
{
|
{
|
||||||
printf(ers[p-10]);
|
printf(ers[p-10]);
|
||||||
DosExit();
|
DosExit();
|
||||||
}
|
}
|
||||||
if(p == 2)
|
if(p == 2)
|
||||||
{
|
{
|
||||||
DosExit();
|
DosExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
printf("cmdline returned %i\n",p);
|
printf("cmdline returned %i\n",p);
|
||||||
DosExit();
|
DosExit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int pccmdline(void)
|
int pccmdline(void)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
int gfnm=0;
|
int gfnm=0;
|
||||||
|
|
||||||
for(p=1;p<argc;p++)
|
for(p=1;p<argc;p++)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
printf("(%i/%i): %s\n",p,argc,argv[p]);
|
printf("(%i/%i): %s\n",p,argc,argv[p]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(argv[p][0] == '-')
|
if(argv[p][0] == '-')
|
||||||
{
|
{
|
||||||
int hasroom=0;
|
int hasroom=0;
|
||||||
int pp=1;
|
int pp=1;
|
||||||
int cp=p;
|
int cp=p;
|
||||||
int nn='_';
|
int nn='_';
|
||||||
for(pp=1;argv[cp][pp];pp++)
|
for(pp=1;argv[cp][pp];pp++)
|
||||||
{
|
{
|
||||||
if( (p+1) < argc) hasroom=1;
|
if( (p+1) < argc) hasroom=1;
|
||||||
nn=tolower(argv[cp][pp+1]);
|
nn=tolower(argv[cp][pp+1]);
|
||||||
switch(tolower(argv[cp][pp]))
|
switch(tolower(argv[cp][pp]))
|
||||||
{
|
{
|
||||||
case '1': /* Player 1 Input */
|
case '1': /* Player 1 Input */
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
pl1contrl=my_atoi(argv[p+1]);
|
pl1contrl=my_atoi(argv[p+1]);
|
||||||
if(pl1contrl > 6) return 15;
|
if(pl1contrl > 6) return 15;
|
||||||
p++;
|
p++;
|
||||||
ConvertJoyMap1();
|
ConvertJoyMap1();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '2': /* Player 2 Input */
|
case '2': /* Player 2 Input */
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
pl2contrl=my_atoi(argv[p+1]);
|
pl2contrl=my_atoi(argv[p+1]);
|
||||||
if(pl2contrl > 6) return 15;
|
if(pl2contrl > 6) return 15;
|
||||||
p++;
|
p++;
|
||||||
ConvertJoyMap2();
|
ConvertJoyMap2();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'f':
|
case 'f':
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
frameskip=my_atoi(argv[p+1]);
|
frameskip=my_atoi(argv[p+1]);
|
||||||
if(frameskip > 9) return 10;
|
if(frameskip > 9) return 10;
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'g':
|
case 'g':
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
gammalevel=my_atoi(argv[p+1]);
|
gammalevel=my_atoi(argv[p+1]);
|
||||||
if(gammalevel > 5) return 11;
|
if(gammalevel > 5) return 11;
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'p':
|
case 'p':
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
per2exec=my_atoi(argv[p+1]);
|
per2exec=my_atoi(argv[p+1]);
|
||||||
if(per2exec > 150) return 14;
|
if(per2exec > 150) return 14;
|
||||||
if(per2exec < 50) return 14;
|
if(per2exec < 50) return 14;
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'r':
|
case 'r':
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
SoundQuality=my_atoi(argv[p+1]);
|
SoundQuality=my_atoi(argv[p+1]);
|
||||||
if(SoundQuality > 6) return 12;
|
if(SoundQuality > 6) return 12;
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'v':
|
case 'v':
|
||||||
{
|
{
|
||||||
if(nn == '8')
|
if(nn == '8')
|
||||||
{
|
{
|
||||||
V8Mode=1;
|
V8Mode=1;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
cvidmode=my_atoi(argv[p+1]);
|
cvidmode=my_atoi(argv[p+1]);
|
||||||
if(cvidmode > 10) return 13;
|
if(cvidmode > 10) return 13;
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'k':
|
case 'k':
|
||||||
{
|
{
|
||||||
if(!hasroom) return 4;
|
if(!hasroom) return 4;
|
||||||
MusicRelVol=my_atoi(argv[p+1]);
|
MusicRelVol=my_atoi(argv[p+1]);
|
||||||
if(MusicRelVol > 100) return 16;
|
if(MusicRelVol > 100) return 16;
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '8':
|
case '8':
|
||||||
{
|
{
|
||||||
Force8b=1;
|
Force8b=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '0': /* Palette 0 disable */
|
case '0': /* Palette 0 disable */
|
||||||
{
|
{
|
||||||
Palette0=1;
|
Palette0=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '7': /* SPC700 speed hack disable */
|
case '7': /* SPC700 speed hack disable */
|
||||||
{
|
{
|
||||||
SPC700sh=1;
|
SPC700sh=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '9': /* Off by 1 line */
|
case '9': /* Off by 1 line */
|
||||||
{
|
{
|
||||||
OffBy1Line=1;
|
OffBy1Line=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'e':
|
case 'e':
|
||||||
{
|
{
|
||||||
enterpress=1;
|
enterpress=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'h':
|
case 'h':
|
||||||
{
|
{
|
||||||
romtype=2;
|
romtype=2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'l':
|
case 'l':
|
||||||
{
|
{
|
||||||
romtype=1;
|
romtype=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'm':
|
case 'm':
|
||||||
{
|
{
|
||||||
guioff=1; /* disables GUI */
|
guioff=1; /* disables GUI */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'n':
|
case 'n':
|
||||||
{
|
{
|
||||||
scanlines=1;
|
scanlines=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 's':
|
case 's':
|
||||||
{
|
{
|
||||||
if(nn == 'p')
|
if(nn == 'p')
|
||||||
{
|
{
|
||||||
DisplayS=1;
|
DisplayS=1;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if(nn == 'a')
|
if(nn == 'a')
|
||||||
{
|
{
|
||||||
showallext=1;
|
showallext=1;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if(nn == 'n')
|
if(nn == 'n')
|
||||||
{
|
{
|
||||||
SnowOn=1;
|
SnowOn=1;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spcon=1;
|
spcon=1;
|
||||||
soundon=1;
|
soundon=1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 't':
|
case 't':
|
||||||
{
|
{
|
||||||
ForcePal=1;
|
ForcePal=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'u':
|
case 'u':
|
||||||
{
|
{
|
||||||
ForcePal=2;
|
ForcePal=2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'w':
|
case 'w':
|
||||||
{
|
{
|
||||||
vsyncon=1;
|
vsyncon=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'z':
|
case 'z':
|
||||||
{
|
{
|
||||||
StereoSound=1;
|
StereoSound=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'd':
|
case 'd':
|
||||||
{
|
{
|
||||||
if(nn == 'd')
|
if(nn == 'd')
|
||||||
{
|
{
|
||||||
DSPDisable=1;
|
DSPDisable=1;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
debugger=1;
|
debugger=1;
|
||||||
debugdisble=0;
|
debugdisble=0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'b':
|
case 'b':
|
||||||
{
|
{
|
||||||
SoundCompD=1;
|
SoundCompD=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
{
|
{
|
||||||
if(nn == 'c')
|
if(nn == 'c')
|
||||||
{
|
{
|
||||||
smallscreenon=1;
|
smallscreenon=1;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ScreenScale=1;
|
ScreenScale=1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'y':
|
case 'y':
|
||||||
{
|
{
|
||||||
antienab=1;
|
antienab=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'o':
|
case 'o':
|
||||||
{
|
{
|
||||||
if(nn == 'm')
|
if(nn == 'm')
|
||||||
{
|
{
|
||||||
FPUCopy=2;
|
FPUCopy=2;
|
||||||
pp++;
|
pp++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FPUCopy=0;
|
FPUCopy=0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'i':
|
case 'i':
|
||||||
{
|
{
|
||||||
finterleave=1;
|
finterleave=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'j':
|
case 'j':
|
||||||
{
|
{
|
||||||
GUIClick=0;
|
GUIClick=0;
|
||||||
MouseDis=1;
|
MouseDis=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '?':
|
case '?':
|
||||||
{
|
{
|
||||||
return 9;
|
return 9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(gfnm > 0)
|
if(gfnm > 0)
|
||||||
{
|
{
|
||||||
printf("Limit yourself to one filename\n");
|
printf("Limit yourself to one filename\n");
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *fvar;
|
char *fvar;
|
||||||
fvar=&fname;
|
fvar=&fname;
|
||||||
fvar[0] = strlen(argv[p]);
|
fvar[0] = strlen(argv[p]);
|
||||||
strncpy(&fvar[1],argv[p],127);
|
strncpy(&fvar[1],argv[p],127);
|
||||||
gfnm++;
|
gfnm++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(gfnm == 1)
|
if(gfnm == 1)
|
||||||
{
|
{
|
||||||
filefound=0;
|
filefound=0;
|
||||||
makeextension();
|
makeextension();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,212 +1,211 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
EXTSYM ipx_init ; To init ipx
|
EXTSYM ipx_init ; To init ipx
|
||||||
EXTSYM ipx_initcode ; return 0 if everything is ok (int)
|
EXTSYM ipx_initcode ; return 0 if everything is ok (int)
|
||||||
EXTSYM ipx_packet ; 80 bytes buffer to send
|
EXTSYM ipx_packet ; 80 bytes buffer to send
|
||||||
EXTSYM ipx_packet_size ; size to send (max 80 bytes) (dword)
|
EXTSYM ipx_packet_size ; size to send (max 80 bytes) (dword)
|
||||||
EXTSYM sendpacket ; to send a packet
|
EXTSYM sendpacket ; to send a packet
|
||||||
EXTSYM checkpacket ; check if a packet is ready to receive
|
EXTSYM checkpacket ; check if a packet is ready to receive
|
||||||
EXTSYM ipx_packet_ready ; return 1 if there is a packet ready (byte)
|
EXTSYM ipx_packet_ready ; return 1 if there is a packet ready (byte)
|
||||||
EXTSYM read_packet ; to read an incoming packet
|
EXTSYM read_packet ; to read an incoming packet
|
||||||
EXTSYM ipx_read_packet ; 80 bytes buffer of received packet
|
EXTSYM ipx_read_packet ; 80 bytes buffer of received packet
|
||||||
EXTSYM ipx_deinit ; to deinit the ipx
|
EXTSYM ipx_deinit ; to deinit the ipx
|
||||||
EXTSYM IPXInfoStr,IPXInfoStrR
|
EXTSYM IPXInfoStr,IPXInfoStrR
|
||||||
EXTSYM modembuffer, modemhead, modemtail
|
EXTSYM modembuffer, modemhead, modemtail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NEWSYM ipxinited, db 0
|
NEWSYM ipxinited, db 0
|
||||||
|
|
||||||
NEWSYM initipx
|
NEWSYM initipx
|
||||||
mov dword[modemhead],0
|
mov dword[modemhead],0
|
||||||
mov dword[modemtail],0
|
mov dword[modemtail],0
|
||||||
xor ax,ax
|
xor ax,ax
|
||||||
cmp byte[ipxinited],1
|
cmp byte[ipxinited],1
|
||||||
je .notokay
|
je .notokay
|
||||||
call ipx_init
|
call ipx_init
|
||||||
mov ax,[ipx_initcode]
|
mov ax,[ipx_initcode]
|
||||||
cmp ax,0
|
cmp ax,0
|
||||||
jne .notokay
|
jne .notokay
|
||||||
mov byte[ipxinited],1
|
mov byte[ipxinited],1
|
||||||
.notokay
|
.notokay
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM deinitipx
|
NEWSYM deinitipx
|
||||||
cmp byte[ipxinited],0
|
cmp byte[ipxinited],0
|
||||||
je .notinitialized
|
je .notinitialized
|
||||||
mov byte[ipxinited],0
|
mov byte[ipxinited],0
|
||||||
call ipx_deinit
|
call ipx_deinit
|
||||||
.notinitialized
|
.notinitialized
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM PacketPointer, dd 0
|
NEWSYM PacketPointer, dd 0
|
||||||
|
|
||||||
NEWSYM PreparePacketIPX
|
NEWSYM PreparePacketIPX
|
||||||
cmp byte[ipxinited],1
|
cmp byte[ipxinited],1
|
||||||
jne .noipx
|
jne .noipx
|
||||||
call ipxpp
|
call ipxpp
|
||||||
.noipx
|
.noipx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM SendPacketIPX
|
NEWSYM SendPacketIPX
|
||||||
cmp byte[ipxinited],1
|
cmp byte[ipxinited],1
|
||||||
jne .noipx
|
jne .noipx
|
||||||
call ipxsp
|
call ipxsp
|
||||||
.noipx
|
.noipx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ipxsendchar ; prepare packet
|
NEWSYM ipxsendchar ; prepare packet
|
||||||
push esi
|
push esi
|
||||||
mov esi,[PacketPointer]
|
mov esi,[PacketPointer]
|
||||||
mov [esi],al
|
mov [esi],al
|
||||||
inc dword[PacketPointer]
|
inc dword[PacketPointer]
|
||||||
pop esi
|
pop esi
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM IPXSearchval, db 0
|
NEWSYM IPXSearchval, db 0
|
||||||
NEWSYM ipxlookforconnect
|
NEWSYM ipxlookforconnect
|
||||||
cmp byte[ipxinited],0
|
cmp byte[ipxinited],0
|
||||||
je .initialized
|
je .initialized
|
||||||
ret
|
ret
|
||||||
.initialized
|
.initialized
|
||||||
pushad
|
pushad
|
||||||
call checkpacket
|
call checkpacket
|
||||||
cmp byte[ipx_packet_ready],1
|
cmp byte[ipx_packet_ready],1
|
||||||
jne near .nopacket
|
jne near .nopacket
|
||||||
call read_packet
|
call read_packet
|
||||||
cmp dword[ipx_read_packet],'ZZ|Z'
|
cmp dword[ipx_read_packet],'ZZ|Z'
|
||||||
jne .nopacketf
|
jne .nopacketf
|
||||||
cmp byte[ipx_read_packet+6],'L'
|
cmp byte[ipx_read_packet+6],'L'
|
||||||
jne .nopacketf
|
jne .nopacketf
|
||||||
mov ax,[ipx_read_packet+4]
|
mov ax,[ipx_read_packet+4]
|
||||||
cmp ax,[IPXInfoStr]
|
cmp ax,[IPXInfoStr]
|
||||||
je .nopacketf
|
je .nopacketf
|
||||||
mov [IPXInfoStrR],ax
|
mov [IPXInfoStrR],ax
|
||||||
mov eax,ipx_packet
|
mov eax,ipx_packet
|
||||||
mov dword[eax],'ZY|Z'
|
mov dword[eax],'ZY|Z'
|
||||||
mov bx,[IPXInfoStr]
|
mov bx,[IPXInfoStr]
|
||||||
mov [eax+4],bx
|
mov [eax+4],bx
|
||||||
mov bx,[IPXInfoStrR]
|
mov bx,[IPXInfoStrR]
|
||||||
mov [eax+6],bx
|
mov [eax+6],bx
|
||||||
mov dword[ipx_packet_size],8
|
mov dword[ipx_packet_size],8
|
||||||
call sendpacket
|
call sendpacket
|
||||||
mov byte[IPXSearchval],1
|
mov byte[IPXSearchval],1
|
||||||
jmp .skipall
|
jmp .skipall
|
||||||
.nopacketf
|
.nopacketf
|
||||||
cmp dword[ipx_read_packet],'ZY|Z'
|
cmp dword[ipx_read_packet],'ZY|Z'
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
mov bx,[IPXInfoStr]
|
mov bx,[IPXInfoStr]
|
||||||
cmp [eax+6],bx
|
cmp [eax+6],bx
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
mov bx,[eax+4]
|
mov bx,[eax+4]
|
||||||
cmp bx,[IPXInfoStr]
|
cmp bx,[IPXInfoStr]
|
||||||
je .nopacket
|
je .nopacket
|
||||||
mov [IPXInfoStrR],bx
|
mov [IPXInfoStrR],bx
|
||||||
mov byte[IPXSearchval],1
|
mov byte[IPXSearchval],1
|
||||||
jmp .skipall
|
jmp .skipall
|
||||||
.nopacket
|
.nopacket
|
||||||
mov eax,ipx_packet
|
mov eax,ipx_packet
|
||||||
mov dword[eax],'ZZ|Z'
|
mov dword[eax],'ZZ|Z'
|
||||||
mov bx,[IPXInfoStr]
|
mov bx,[IPXInfoStr]
|
||||||
mov [eax+4],bx
|
mov [eax+4],bx
|
||||||
mov byte[eax+6],'L'
|
mov byte[eax+6],'L'
|
||||||
mov dword[ipx_packet_size],7
|
mov dword[ipx_packet_size],7
|
||||||
call sendpacket
|
call sendpacket
|
||||||
.skipall
|
.skipall
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ipxpp ; prepare packet
|
NEWSYM ipxpp ; prepare packet
|
||||||
pushad
|
pushad
|
||||||
mov eax,ipx_packet
|
mov eax,ipx_packet
|
||||||
mov byte[eax],'Z'
|
mov byte[eax],'Z'
|
||||||
mov byte[eax+1],'|'
|
mov byte[eax+1],'|'
|
||||||
mov byte[eax+2],'S'
|
mov byte[eax+2],'S'
|
||||||
mov bx,[IPXInfoStr]
|
mov bx,[IPXInfoStr]
|
||||||
mov [eax+3],bx
|
mov [eax+3],bx
|
||||||
add eax,6
|
add eax,6
|
||||||
mov [PacketPointer],eax
|
mov [PacketPointer],eax
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ipxsp ; send packet
|
NEWSYM ipxsp ; send packet
|
||||||
pushad
|
pushad
|
||||||
mov eax,[PacketPointer]
|
mov eax,[PacketPointer]
|
||||||
sub eax,ipx_packet
|
sub eax,ipx_packet
|
||||||
mov [ipx_packet+5],al
|
mov [ipx_packet+5],al
|
||||||
mov [ipx_packet_size],eax
|
mov [ipx_packet_size],eax
|
||||||
call sendpacket
|
call sendpacket
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM ipxgetchar
|
NEWSYM ipxgetchar
|
||||||
pushad
|
pushad
|
||||||
call checkpacket
|
call checkpacket
|
||||||
cmp byte[ipx_packet_ready],1
|
cmp byte[ipx_packet_ready],1
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
call read_packet
|
call read_packet
|
||||||
cmp byte[ipx_read_packet],'Z'
|
cmp byte[ipx_read_packet],'Z'
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
cmp byte[ipx_read_packet+1],'|'
|
cmp byte[ipx_read_packet+1],'|'
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
cmp byte[ipx_read_packet+2],'S'
|
cmp byte[ipx_read_packet+2],'S'
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
mov bx,[IPXInfoStrR]
|
mov bx,[IPXInfoStrR]
|
||||||
cmp [ipx_read_packet+3],bx
|
cmp [ipx_read_packet+3],bx
|
||||||
jne .nopacket
|
jne .nopacket
|
||||||
mov cl,[ipx_read_packet+5]
|
mov cl,[ipx_read_packet+5]
|
||||||
sub cl,6
|
sub cl,6
|
||||||
mov esi,ipx_read_packet+6
|
mov esi,ipx_read_packet+6
|
||||||
cmp cl,0
|
cmp cl,0
|
||||||
je .nopacket
|
je .nopacket
|
||||||
.loop
|
.loop
|
||||||
mov edi,[modemtail]
|
mov edi,[modemtail]
|
||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
mov [modembuffer+edi],al
|
mov [modembuffer+edi],al
|
||||||
inc dword[modemtail]
|
inc dword[modemtail]
|
||||||
inc esi
|
inc esi
|
||||||
and dword[modemtail],2047
|
and dword[modemtail],2047
|
||||||
dec cl
|
dec cl
|
||||||
jnz .loop
|
jnz .loop
|
||||||
.nopacket
|
.nopacket
|
||||||
popad
|
popad
|
||||||
push eax
|
push eax
|
||||||
xor dh,dh
|
xor dh,dh
|
||||||
mov eax,[modemhead]
|
mov eax,[modemhead]
|
||||||
cmp eax,[modemtail]
|
cmp eax,[modemtail]
|
||||||
je .nonewchar
|
je .nonewchar
|
||||||
mov dh,1
|
mov dh,1
|
||||||
mov dl,[modembuffer+eax]
|
mov dl,[modembuffer+eax]
|
||||||
inc dword[modemhead]
|
inc dword[modemhead]
|
||||||
and dword[modemhead],2047
|
and dword[modemhead],2047
|
||||||
.nonewchar
|
.nonewchar
|
||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,250 +1,249 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NEWSYM romdatahere
|
NEWSYM romdatahere
|
||||||
|
|
||||||
; Much of this used to be in uninitialized space, until I discovered that
|
; Much of this used to be in uninitialized space, until I discovered that
|
||||||
; ZSNES was unstable because of them... Odd.
|
; ZSNES was unstable because of them... Odd.
|
||||||
|
|
||||||
Stuff db 'ZSNES v?.??? / Freeware, programmed by zsKnight, _Demo_, and Pharos',13,10,0
|
Stuff db 'ZSNES v?.??? / Freeware, programmed by zsKnight, _Demo_, and Pharos',13,10,0
|
||||||
|
|
||||||
ALIGN32
|
ALIGN32
|
||||||
|
|
||||||
NEWSYM wramdataa, times 65536 db 0
|
NEWSYM wramdataa, times 65536 db 0
|
||||||
NEWSYM ram7fa, times 65536 db 0
|
NEWSYM ram7fa, times 65536 db 0
|
||||||
NEWSYM Inbetweendat, dd 0,0,0,0
|
NEWSYM Inbetweendat, dd 0,0,0,0
|
||||||
NEWSYM opcjmptab, times 256 dd 0
|
NEWSYM opcjmptab, times 256 dd 0
|
||||||
|
|
||||||
NEWSYM Bank0datr8 ,times 256 dd 0
|
NEWSYM Bank0datr8 ,times 256 dd 0
|
||||||
NEWSYM Bank0datr16,times 256 dd 0
|
NEWSYM Bank0datr16,times 256 dd 0
|
||||||
NEWSYM Bank0datw8 ,times 256 dd 0
|
NEWSYM Bank0datw8 ,times 256 dd 0
|
||||||
NEWSYM Bank0datw16,times 256 dd 0
|
NEWSYM Bank0datw16,times 256 dd 0
|
||||||
|
|
||||||
NEWSYM tableA, times 256 dd 0
|
NEWSYM tableA, times 256 dd 0
|
||||||
NEWSYM tableB, times 256 dd 0
|
NEWSYM tableB, times 256 dd 0
|
||||||
NEWSYM tableC, times 256 dd 0
|
NEWSYM tableC, times 256 dd 0
|
||||||
NEWSYM tableD, times 256 dd 0
|
NEWSYM tableD, times 256 dd 0
|
||||||
NEWSYM tableE, times 256 dd 0
|
NEWSYM tableE, times 256 dd 0
|
||||||
NEWSYM tableF, times 256 dd 0
|
NEWSYM tableF, times 256 dd 0
|
||||||
NEWSYM tableG, times 256 dd 0
|
NEWSYM tableG, times 256 dd 0
|
||||||
NEWSYM tableH, times 256 dd 0
|
NEWSYM tableH, times 256 dd 0
|
||||||
|
|
||||||
NEWSYM tableAb, times 256 dd 0
|
NEWSYM tableAb, times 256 dd 0
|
||||||
NEWSYM tableBb, times 256 dd 0
|
NEWSYM tableBb, times 256 dd 0
|
||||||
NEWSYM tableCb, times 256 dd 0
|
NEWSYM tableCb, times 256 dd 0
|
||||||
NEWSYM tableDb, times 256 dd 0
|
NEWSYM tableDb, times 256 dd 0
|
||||||
NEWSYM tableEb, times 256 dd 0
|
NEWSYM tableEb, times 256 dd 0
|
||||||
NEWSYM tableFb, times 256 dd 0
|
NEWSYM tableFb, times 256 dd 0
|
||||||
NEWSYM tableGb, times 256 dd 0
|
NEWSYM tableGb, times 256 dd 0
|
||||||
NEWSYM tableHb, times 256 dd 0
|
NEWSYM tableHb, times 256 dd 0
|
||||||
|
|
||||||
NEWSYM tableAc, times 256 dd 0
|
NEWSYM tableAc, times 256 dd 0
|
||||||
NEWSYM tableBc, times 256 dd 0
|
NEWSYM tableBc, times 256 dd 0
|
||||||
NEWSYM tableCc, times 256 dd 0
|
NEWSYM tableCc, times 256 dd 0
|
||||||
NEWSYM tableDc, times 256 dd 0
|
NEWSYM tableDc, times 256 dd 0
|
||||||
NEWSYM tableEc, times 256 dd 0
|
NEWSYM tableEc, times 256 dd 0
|
||||||
NEWSYM tableFc, times 256 dd 0
|
NEWSYM tableFc, times 256 dd 0
|
||||||
NEWSYM tableGc, times 256 dd 0
|
NEWSYM tableGc, times 256 dd 0
|
||||||
NEWSYM tableHc, times 256 dd 0
|
NEWSYM tableHc, times 256 dd 0
|
||||||
|
|
||||||
NEWSYM SA1tableA, times 256 dd 0
|
NEWSYM SA1tableA, times 256 dd 0
|
||||||
NEWSYM SA1tableB, times 256 dd 0
|
NEWSYM SA1tableB, times 256 dd 0
|
||||||
NEWSYM SA1tableC, times 256 dd 0
|
NEWSYM SA1tableC, times 256 dd 0
|
||||||
NEWSYM SA1tableD, times 256 dd 0
|
NEWSYM SA1tableD, times 256 dd 0
|
||||||
NEWSYM SA1tableE, times 256 dd 0
|
NEWSYM SA1tableE, times 256 dd 0
|
||||||
NEWSYM SA1tableF, times 256 dd 0
|
NEWSYM SA1tableF, times 256 dd 0
|
||||||
NEWSYM SA1tableG, times 256 dd 0
|
NEWSYM SA1tableG, times 256 dd 0
|
||||||
NEWSYM SA1tableH, times 256 dd 0
|
NEWSYM SA1tableH, times 256 dd 0
|
||||||
|
|
||||||
NEWSYM tablead, times 256 dd 0
|
NEWSYM tablead, times 256 dd 0
|
||||||
NEWSYM tableadb, times 256 dd 0
|
NEWSYM tableadb, times 256 dd 0
|
||||||
NEWSYM tableadc, times 256 dd 0
|
NEWSYM tableadc, times 256 dd 0
|
||||||
NEWSYM SA1tablead, times 256 dd 0
|
NEWSYM SA1tablead, times 256 dd 0
|
||||||
|
|
||||||
NEWSYM memtabler8, times 256 dd 0
|
NEWSYM memtabler8, times 256 dd 0
|
||||||
NEWSYM memtablew8, times 256 dd 0
|
NEWSYM memtablew8, times 256 dd 0
|
||||||
NEWSYM memtabler16, times 256 dd 0
|
NEWSYM memtabler16, times 256 dd 0
|
||||||
NEWSYM memtablew16, times 256 dd 0
|
NEWSYM memtablew16, times 256 dd 0
|
||||||
NEWSYM vidmemch2, times 4096 db 0
|
NEWSYM vidmemch2, times 4096 db 0
|
||||||
NEWSYM vidmemch4, times 4096 db 0
|
NEWSYM vidmemch4, times 4096 db 0
|
||||||
NEWSYM vidmemch8, times 4096 db 0
|
NEWSYM vidmemch8, times 4096 db 0
|
||||||
NEWSYM snesmmap, times 256 dd 0
|
NEWSYM snesmmap, times 256 dd 0
|
||||||
NEWSYM snesmap2, times 256 dd 0
|
NEWSYM snesmap2, times 256 dd 0
|
||||||
NEWSYM cachebg1, times 64 db 0
|
NEWSYM cachebg1, times 64 db 0
|
||||||
NEWSYM cachebg2, times 64 db 0
|
NEWSYM cachebg2, times 64 db 0
|
||||||
NEWSYM cachebg3, times 64 db 0
|
NEWSYM cachebg3, times 64 db 0
|
||||||
NEWSYM cachebg4, times 64 db 0
|
NEWSYM cachebg4, times 64 db 0
|
||||||
NEWSYM sprlefttot, times 256 db 0
|
NEWSYM sprlefttot, times 256 db 0
|
||||||
NEWSYM sprleftpr, times 256 db 0
|
NEWSYM sprleftpr, times 256 db 0
|
||||||
NEWSYM sprleftpr1, times 256 db 0
|
NEWSYM sprleftpr1, times 256 db 0
|
||||||
NEWSYM sprleftpr2, times 256 db 0
|
NEWSYM sprleftpr2, times 256 db 0
|
||||||
NEWSYM sprleftpr3, times 256 db 0
|
NEWSYM sprleftpr3, times 256 db 0
|
||||||
NEWSYM sprpriodata, times 288 db 0
|
NEWSYM sprpriodata, times 288 db 0
|
||||||
NEWSYM sprprtabc, times 64 db 0
|
NEWSYM sprprtabc, times 64 db 0
|
||||||
NEWSYM sprprtabu, times 64 db 0
|
NEWSYM sprprtabu, times 64 db 0
|
||||||
NEWSYM prevpal, times 256 dw 0 ; previous palette buffer
|
NEWSYM prevpal, times 256 dw 0 ; previous palette buffer
|
||||||
NEWSYM winbgdata, times 288 db 0 ; window buffer for backgrounds
|
NEWSYM winbgdata, times 288 db 0 ; window buffer for backgrounds
|
||||||
NEWSYM winspdata, times 288 db 0 ; window buffer for sprites
|
NEWSYM winspdata, times 288 db 0 ; window buffer for sprites
|
||||||
NEWSYM FxTable, times 256 dd 0
|
NEWSYM FxTable, times 256 dd 0
|
||||||
NEWSYM FxTableA1, times 256 dd 0
|
NEWSYM FxTableA1, times 256 dd 0
|
||||||
NEWSYM FxTableA2, times 256 dd 0
|
NEWSYM FxTableA2, times 256 dd 0
|
||||||
NEWSYM FxTableA3, times 256 dd 0
|
NEWSYM FxTableA3, times 256 dd 0
|
||||||
NEWSYM FxTableb, times 256 dd 0
|
NEWSYM FxTableb, times 256 dd 0
|
||||||
NEWSYM FxTablebA1, times 256 dd 0
|
NEWSYM FxTablebA1, times 256 dd 0
|
||||||
NEWSYM FxTablebA2, times 256 dd 0
|
NEWSYM FxTablebA2, times 256 dd 0
|
||||||
NEWSYM FxTablebA3, times 256 dd 0
|
NEWSYM FxTablebA3, times 256 dd 0
|
||||||
NEWSYM FxTablec, times 256 dd 0
|
NEWSYM FxTablec, times 256 dd 0
|
||||||
NEWSYM FxTablecA1, times 256 dd 0
|
NEWSYM FxTablecA1, times 256 dd 0
|
||||||
NEWSYM FxTablecA2, times 256 dd 0
|
NEWSYM FxTablecA2, times 256 dd 0
|
||||||
NEWSYM FxTablecA3, times 256 dd 0
|
NEWSYM FxTablecA3, times 256 dd 0
|
||||||
NEWSYM FxTabled, times 256 dd 0
|
NEWSYM FxTabled, times 256 dd 0
|
||||||
NEWSYM FxTabledA1, times 256 dd 0
|
NEWSYM FxTabledA1, times 256 dd 0
|
||||||
NEWSYM FxTabledA2, times 256 dd 0
|
NEWSYM FxTabledA2, times 256 dd 0
|
||||||
NEWSYM FxTabledA3, times 256 dd 0
|
NEWSYM FxTabledA3, times 256 dd 0
|
||||||
NEWSYM SfxMemTable, times 256 dd 0
|
NEWSYM SfxMemTable, times 256 dd 0
|
||||||
NEWSYM fxxand, times 256 dd 0
|
NEWSYM fxxand, times 256 dd 0
|
||||||
NEWSYM fxbit01, times 256 dd 0
|
NEWSYM fxbit01, times 256 dd 0
|
||||||
NEWSYM fxbit23, times 256 dd 0
|
NEWSYM fxbit23, times 256 dd 0
|
||||||
NEWSYM fxbit45, times 256 dd 0
|
NEWSYM fxbit45, times 256 dd 0
|
||||||
NEWSYM fxbit67, times 256 dd 0
|
NEWSYM fxbit67, times 256 dd 0
|
||||||
NEWSYM PLOTJmpa, times 64 dd 0
|
NEWSYM PLOTJmpa, times 64 dd 0
|
||||||
NEWSYM PLOTJmpb, times 64 dd 0
|
NEWSYM PLOTJmpb, times 64 dd 0
|
||||||
|
|
||||||
NEWSYM pal16b, times 256 dd 0
|
NEWSYM pal16b, times 256 dd 0
|
||||||
NEWSYM pal16bcl, times 256 dd 0
|
NEWSYM pal16bcl, times 256 dd 0
|
||||||
NEWSYM pal16bclha, times 256 dd 0
|
NEWSYM pal16bclha, times 256 dd 0
|
||||||
NEWSYM pal16bxcl, times 256 dd 0
|
NEWSYM pal16bxcl, times 256 dd 0
|
||||||
NEWSYM xtravbuf, times 576 db 0
|
NEWSYM xtravbuf, times 576 db 0
|
||||||
NEWSYM BG1SXl, times 256 dw 0
|
NEWSYM BG1SXl, times 256 dw 0
|
||||||
NEWSYM BG2SXl, times 256 dw 0
|
NEWSYM BG2SXl, times 256 dw 0
|
||||||
NEWSYM BG3SXl, times 256 dw 0
|
NEWSYM BG3SXl, times 256 dw 0
|
||||||
NEWSYM BG4SXl, times 256 dw 0
|
NEWSYM BG4SXl, times 256 dw 0
|
||||||
NEWSYM BG1SYl, times 256 dw 0
|
NEWSYM BG1SYl, times 256 dw 0
|
||||||
NEWSYM BG2SYl, times 256 dw 0
|
NEWSYM BG2SYl, times 256 dw 0
|
||||||
NEWSYM BG3SYl, times 256 dw 0
|
NEWSYM BG3SYl, times 256 dw 0
|
||||||
NEWSYM BG4SYl, times 256 dw 0
|
NEWSYM BG4SYl, times 256 dw 0
|
||||||
NEWSYM BGMA, times 256 db 0
|
NEWSYM BGMA, times 256 db 0
|
||||||
NEWSYM BGFB, times 256 db 0
|
NEWSYM BGFB, times 256 db 0
|
||||||
NEWSYM BG3PRI, times 256 db 0
|
NEWSYM BG3PRI, times 256 db 0
|
||||||
NEWSYM BGOPT1, times 256 dw 0
|
NEWSYM BGOPT1, times 256 dw 0
|
||||||
NEWSYM BGOPT2, times 256 dw 0
|
NEWSYM BGOPT2, times 256 dw 0
|
||||||
NEWSYM BGOPT3, times 256 dw 0
|
NEWSYM BGOPT3, times 256 dw 0
|
||||||
NEWSYM BGOPT4, times 256 dw 0
|
NEWSYM BGOPT4, times 256 dw 0
|
||||||
NEWSYM BGPT1, times 256 dw 0
|
NEWSYM BGPT1, times 256 dw 0
|
||||||
NEWSYM BGPT2, times 256 dw 0
|
NEWSYM BGPT2, times 256 dw 0
|
||||||
NEWSYM BGPT3, times 256 dw 0
|
NEWSYM BGPT3, times 256 dw 0
|
||||||
NEWSYM BGPT4, times 256 dw 0
|
NEWSYM BGPT4, times 256 dw 0
|
||||||
NEWSYM BGPT1X, times 256 dw 0
|
NEWSYM BGPT1X, times 256 dw 0
|
||||||
NEWSYM BGPT2X, times 256 dw 0
|
NEWSYM BGPT2X, times 256 dw 0
|
||||||
NEWSYM BGPT3X, times 256 dw 0
|
NEWSYM BGPT3X, times 256 dw 0
|
||||||
NEWSYM BGPT4X, times 256 dw 0
|
NEWSYM BGPT4X, times 256 dw 0
|
||||||
NEWSYM BGPT1Y, times 256 dw 0
|
NEWSYM BGPT1Y, times 256 dw 0
|
||||||
NEWSYM BGPT2Y, times 256 dw 0
|
NEWSYM BGPT2Y, times 256 dw 0
|
||||||
NEWSYM BGPT3Y, times 256 dw 0
|
NEWSYM BGPT3Y, times 256 dw 0
|
||||||
NEWSYM BGPT4Y, times 256 dw 0
|
NEWSYM BGPT4Y, times 256 dw 0
|
||||||
NEWSYM BGMS1, times 1024 dw 0
|
NEWSYM BGMS1, times 1024 dw 0
|
||||||
NEWSYM prdata, times 256 db 0
|
NEWSYM prdata, times 256 db 0
|
||||||
NEWSYM prdatb, times 256 db 0
|
NEWSYM prdatb, times 256 db 0
|
||||||
NEWSYM prdatc, times 256 db 0
|
NEWSYM prdatc, times 256 db 0
|
||||||
NEWSYM ngpalcon2b, times 20h dd 0
|
NEWSYM ngpalcon2b, times 20h dd 0
|
||||||
NEWSYM ngpalcon4b, times 20h dd 0
|
NEWSYM ngpalcon4b, times 20h dd 0
|
||||||
NEWSYM ngpalcon8b, times 20h dd 0
|
NEWSYM ngpalcon8b, times 20h dd 0
|
||||||
NEWSYM tltype2b, times 4096 db 0
|
NEWSYM tltype2b, times 4096 db 0
|
||||||
NEWSYM tltype4b, times 2048 db 0
|
NEWSYM tltype4b, times 2048 db 0
|
||||||
NEWSYM tltype8b, times 1024 db 0
|
NEWSYM tltype8b, times 1024 db 0
|
||||||
|
|
||||||
NEWSYM ngptrdat, times 1024 dd 0
|
NEWSYM ngptrdat, times 1024 dd 0
|
||||||
NEWSYM ngceax, times 1024 dd 0
|
NEWSYM ngceax, times 1024 dd 0
|
||||||
NEWSYM ngcedi, times 1024 dd 0
|
NEWSYM ngcedi, times 1024 dd 0
|
||||||
NEWSYM bgtxad, times 1024 dw 0
|
NEWSYM bgtxad, times 1024 dw 0
|
||||||
NEWSYM sprtbng, times 256 dd 0
|
NEWSYM sprtbng, times 256 dd 0
|
||||||
NEWSYM sprtlng, times 256 db 0
|
NEWSYM sprtlng, times 256 db 0
|
||||||
NEWSYM mosszng, times 256 db 0
|
NEWSYM mosszng, times 256 db 0
|
||||||
NEWSYM mosenng, times 256 db 0
|
NEWSYM mosenng, times 256 db 0
|
||||||
|
|
||||||
NEWSYM vidmemch2s, times 4096 db 0FFh
|
NEWSYM vidmemch2s, times 4096 db 0FFh
|
||||||
NEWSYM vidmemch4s, times 2048 db 0FFh
|
NEWSYM vidmemch4s, times 2048 db 0FFh
|
||||||
NEWSYM vidmemch8s, times 1024 db 0FFh
|
NEWSYM vidmemch8s, times 1024 db 0FFh
|
||||||
|
|
||||||
NEWSYM mode7ab, times 256 dd 0
|
NEWSYM mode7ab, times 256 dd 0
|
||||||
NEWSYM mode7cd, times 256 dd 0
|
NEWSYM mode7cd, times 256 dd 0
|
||||||
NEWSYM mode7xy, times 256 dd 0
|
NEWSYM mode7xy, times 256 dd 0
|
||||||
NEWSYM mode7st, times 256 db 0
|
NEWSYM mode7st, times 256 db 0
|
||||||
|
|
||||||
NEWSYM t16x161, times 256 db 0
|
NEWSYM t16x161, times 256 db 0
|
||||||
NEWSYM t16x162, times 256 db 0
|
NEWSYM t16x162, times 256 db 0
|
||||||
NEWSYM t16x163, times 256 db 0
|
NEWSYM t16x163, times 256 db 0
|
||||||
NEWSYM t16x164, times 256 db 0
|
NEWSYM t16x164, times 256 db 0
|
||||||
|
|
||||||
NEWSYM intrlng, times 256 db 0
|
NEWSYM intrlng, times 256 db 0
|
||||||
NEWSYM mode7hr, times 256 db 0
|
NEWSYM mode7hr, times 256 db 0
|
||||||
|
|
||||||
NEWSYM scadsng, times 256 db 0
|
NEWSYM scadsng, times 256 db 0
|
||||||
NEWSYM scadtng, times 256 db 0
|
NEWSYM scadtng, times 256 db 0
|
||||||
|
|
||||||
NEWSYM scbcong, times 256 dw 0
|
NEWSYM scbcong, times 256 dw 0
|
||||||
|
|
||||||
NEWSYM cpalval, times 256 dd 0
|
NEWSYM cpalval, times 256 dd 0
|
||||||
NEWSYM cgfxmod, times 256 db 0
|
NEWSYM cgfxmod, times 256 db 0
|
||||||
|
|
||||||
NEWSYM winboundary, times 256 dd 0
|
NEWSYM winboundary, times 256 dd 0
|
||||||
NEWSYM winbg1enval, times 256 db 0
|
NEWSYM winbg1enval, times 256 db 0
|
||||||
NEWSYM winbg2enval, times 256 db 0
|
NEWSYM winbg2enval, times 256 db 0
|
||||||
NEWSYM winbg3enval, times 256 db 0
|
NEWSYM winbg3enval, times 256 db 0
|
||||||
NEWSYM winbg4enval, times 256 db 0
|
NEWSYM winbg4enval, times 256 db 0
|
||||||
NEWSYM winbgobjenval, times 256 db 0
|
NEWSYM winbgobjenval, times 256 db 0
|
||||||
NEWSYM winbgbackenval, times 256 db 0
|
NEWSYM winbgbackenval, times 256 db 0
|
||||||
NEWSYM winlogicaval, times 256 dw 0
|
NEWSYM winlogicaval, times 256 dw 0
|
||||||
|
|
||||||
NEWSYM winbg1envals, times 256 db 0
|
NEWSYM winbg1envals, times 256 db 0
|
||||||
NEWSYM winbg2envals, times 256 db 0
|
NEWSYM winbg2envals, times 256 db 0
|
||||||
NEWSYM winbg3envals, times 256 db 0
|
NEWSYM winbg3envals, times 256 db 0
|
||||||
NEWSYM winbg4envals, times 256 db 0
|
NEWSYM winbg4envals, times 256 db 0
|
||||||
NEWSYM winbgobjenvals, times 256 db 0
|
NEWSYM winbgobjenvals, times 256 db 0
|
||||||
NEWSYM winbgbackenvals, times 256 db 0
|
NEWSYM winbgbackenvals, times 256 db 0
|
||||||
NEWSYM winbg1envalm, times 256 db 0
|
NEWSYM winbg1envalm, times 256 db 0
|
||||||
NEWSYM winbg2envalm, times 256 db 0
|
NEWSYM winbg2envalm, times 256 db 0
|
||||||
NEWSYM winbg3envalm, times 256 db 0
|
NEWSYM winbg3envalm, times 256 db 0
|
||||||
NEWSYM winbg4envalm, times 256 db 0
|
NEWSYM winbg4envalm, times 256 db 0
|
||||||
NEWSYM winbgobjenvalm, times 256 db 0
|
NEWSYM winbgobjenvalm, times 256 db 0
|
||||||
NEWSYM winbgbackenvalm, times 256 db 0
|
NEWSYM winbgbackenvalm, times 256 db 0
|
||||||
|
|
||||||
NEWSYM FillSubScr, times 256 db 0
|
NEWSYM FillSubScr, times 256 db 0
|
||||||
|
|
||||||
NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
|
NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
|
||||||
NEWSYM objwlrpos , times 256 dd 0FFFFFFFFh
|
NEWSYM objwlrpos , times 256 dd 0FFFFFFFFh
|
||||||
NEWSYM objwen , times 256 dw 0FFFFh ; en,log
|
NEWSYM objwen , times 256 dw 0FFFFh ; en,log
|
||||||
|
|
||||||
NEWSYM SpecialLine, times 256 db 0
|
NEWSYM SpecialLine, times 256 db 0
|
||||||
|
|
||||||
NEWSYM bgallchange, times 256 db 0
|
NEWSYM bgallchange, times 256 db 0
|
||||||
NEWSYM bg1change, times 256 db 0
|
NEWSYM bg1change, times 256 db 0
|
||||||
NEWSYM bg2change, times 256 db 0
|
NEWSYM bg2change, times 256 db 0
|
||||||
NEWSYM bg3change, times 256 db 0
|
NEWSYM bg3change, times 256 db 0
|
||||||
NEWSYM bg4change, times 256 db 0
|
NEWSYM bg4change, times 256 db 0
|
||||||
NEWSYM bgwinchange, times 256 db 0
|
NEWSYM bgwinchange, times 256 db 0
|
||||||
|
|
||||||
NEWSYM PrevPicture, times 64*56*2 db 0
|
NEWSYM PrevPicture, times 64*56*2 db 0
|
||||||
|
|
||||||
|
|||||||
@@ -1,411 +1,410 @@
|
|||||||
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
//
|
//
|
||||||
//This program is free software; you can redistribute it and/or
|
//This program is free software; you can redistribute it and/or
|
||||||
//modify it under the terms of the GNU General Public License
|
//modify it under the terms of the GNU General Public License
|
||||||
//as published by the Free Software Foundation; either
|
//as published by the Free Software Foundation; either
|
||||||
//version 2 of the License, or (at your option) any later
|
//version 2 of the License, or (at your option) any later
|
||||||
//version.
|
//version.
|
||||||
//
|
//
|
||||||
//This program is distributed in the hope that it will be useful,
|
//This program is distributed in the hope that it will be useful,
|
||||||
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//GNU General Public License for more details.
|
//GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
//You should have received a copy of the GNU General Public License
|
//You should have received a copy of the GNU General Public License
|
||||||
//along with this program; if not, write to the Free Software
|
//along with this program; if not, write to the Free Software
|
||||||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
int FSinTab[2048] =
|
int FSinTab[2048] =
|
||||||
{
|
{
|
||||||
0, 201, 402, 603, 804, 1005, 1206, 1407, 1608, 1809, 2010, 2211, 2412, 2613,
|
0, 201, 402, 603, 804, 1005, 1206, 1407, 1608, 1809, 2010, 2211, 2412, 2613,
|
||||||
2814, 3014, 3215, 3416, 3617, 3818, 4018, 4219, 4420, 4620, 4821, 5021, 5222,
|
2814, 3014, 3215, 3416, 3617, 3818, 4018, 4219, 4420, 4620, 4821, 5021, 5222,
|
||||||
5422, 5622, 5823, 6023, 6223, 6423, 6623, 6823, 7023, 7223, 7423, 7623, 7822,
|
5422, 5622, 5823, 6023, 6223, 6423, 6623, 6823, 7023, 7223, 7423, 7623, 7822,
|
||||||
8022, 8221, 8421, 8620, 8819, 9019, 9218, 9417, 9616, 9814, 10013, 10212, 10410,
|
8022, 8221, 8421, 8620, 8819, 9019, 9218, 9417, 9616, 9814, 10013, 10212, 10410,
|
||||||
10609, 10807, 11006, 11204, 11402, 11600, 11797, 11995, 12193, 12390, 12588,
|
10609, 10807, 11006, 11204, 11402, 11600, 11797, 11995, 12193, 12390, 12588,
|
||||||
12785, 12982, 13179, 13376, 13573, 13769, 13966, 14162, 14359, 14555, 14751,
|
12785, 12982, 13179, 13376, 13573, 13769, 13966, 14162, 14359, 14555, 14751,
|
||||||
14946, 15142, 15338, 15533, 15728, 15923, 16118, 16313, 16508, 16702, 16897,
|
14946, 15142, 15338, 15533, 15728, 15923, 16118, 16313, 16508, 16702, 16897,
|
||||||
17091, 17285, 17479, 17672, 17866, 18059, 18253, 18446, 18638, 18831, 19024,
|
17091, 17285, 17479, 17672, 17866, 18059, 18253, 18446, 18638, 18831, 19024,
|
||||||
19216, 19408, 19600, 19792, 19983, 20175, 20366, 20557, 20748, 20938, 21129,
|
19216, 19408, 19600, 19792, 19983, 20175, 20366, 20557, 20748, 20938, 21129,
|
||||||
21319, 21509, 21699, 21889, 22078, 22267, 22456, 22645, 22833, 23022, 23210,
|
21319, 21509, 21699, 21889, 22078, 22267, 22456, 22645, 22833, 23022, 23210,
|
||||||
23398, 23586, 23773, 23960, 24147, 24334, 24521, 24707, 24893, 25079, 25265,
|
23398, 23586, 23773, 23960, 24147, 24334, 24521, 24707, 24893, 25079, 25265,
|
||||||
25450, 25635, 25820, 26005, 26189, 26373, 26557, 26741, 26925, 27108, 27291,
|
25450, 25635, 25820, 26005, 26189, 26373, 26557, 26741, 26925, 27108, 27291,
|
||||||
27473, 27656, 27838, 28020, 28201, 28383, 28564, 28745, 28925, 29105, 29285,
|
27473, 27656, 27838, 28020, 28201, 28383, 28564, 28745, 28925, 29105, 29285,
|
||||||
29465, 29645, 29824, 30003, 30181, 30360, 30538, 30715, 30893, 31070, 31247,
|
29465, 29645, 29824, 30003, 30181, 30360, 30538, 30715, 30893, 31070, 31247,
|
||||||
31424, 31600, 31776, 31952, 32127, 32302, 32477, 32651, 32826, 32999, 33173,
|
31424, 31600, 31776, 31952, 32127, 32302, 32477, 32651, 32826, 32999, 33173,
|
||||||
33346, 33519, 33692, 33864, 34036, 34208, 34379, 34550, 34721, 34891, 35061,
|
33346, 33519, 33692, 33864, 34036, 34208, 34379, 34550, 34721, 34891, 35061,
|
||||||
35231, 35400, 35569, 35738, 35906, 36074, 36242, 36409, 36576, 36743, 36909,
|
35231, 35400, 35569, 35738, 35906, 36074, 36242, 36409, 36576, 36743, 36909,
|
||||||
37075, 37241, 37406, 37571, 37736, 37900, 38064, 38227, 38390, 38553, 38716,
|
37075, 37241, 37406, 37571, 37736, 37900, 38064, 38227, 38390, 38553, 38716,
|
||||||
38878, 39039, 39201, 39362, 39522, 39682, 39842, 40002, 40161, 40319, 40478,
|
38878, 39039, 39201, 39362, 39522, 39682, 39842, 40002, 40161, 40319, 40478,
|
||||||
40636, 40793, 40950, 41107, 41263, 41419, 41575, 41730, 41885, 42040, 42194,
|
40636, 40793, 40950, 41107, 41263, 41419, 41575, 41730, 41885, 42040, 42194,
|
||||||
42347, 42501, 42653, 42806, 42958, 43110, 43261, 43412, 43562, 43712, 43862,
|
42347, 42501, 42653, 42806, 42958, 43110, 43261, 43412, 43562, 43712, 43862,
|
||||||
44011, 44160, 44308, 44456, 44603, 44750, 44897, 45043, 45189, 45335, 45480,
|
44011, 44160, 44308, 44456, 44603, 44750, 44897, 45043, 45189, 45335, 45480,
|
||||||
45624, 45768, 45912, 46055, 46198, 46340, 46482, 46624, 46765, 46906, 47046,
|
45624, 45768, 45912, 46055, 46198, 46340, 46482, 46624, 46765, 46906, 47046,
|
||||||
47186, 47325, 47464, 47602, 47740, 47878, 48015, 48151, 48288, 48423, 48558,
|
47186, 47325, 47464, 47602, 47740, 47878, 48015, 48151, 48288, 48423, 48558,
|
||||||
48693, 48828, 48961, 49095, 49228, 49360, 49492, 49624, 49755, 49886, 50016,
|
48693, 48828, 48961, 49095, 49228, 49360, 49492, 49624, 49755, 49886, 50016,
|
||||||
50146, 50275, 50403, 50532, 50660, 50787, 50914, 51040, 51166, 51291, 51416,
|
50146, 50275, 50403, 50532, 50660, 50787, 50914, 51040, 51166, 51291, 51416,
|
||||||
51541, 51665, 51788, 51911, 52033, 52155, 52277, 52398, 52518, 52639, 52758,
|
51541, 51665, 51788, 51911, 52033, 52155, 52277, 52398, 52518, 52639, 52758,
|
||||||
52877, 52996, 53114, 53231, 53348, 53465, 53581, 53696, 53811, 53926, 54040,
|
52877, 52996, 53114, 53231, 53348, 53465, 53581, 53696, 53811, 53926, 54040,
|
||||||
54153, 54266, 54379, 54491, 54602, 54713, 54823, 54933, 55043, 55152, 55260,
|
54153, 54266, 54379, 54491, 54602, 54713, 54823, 54933, 55043, 55152, 55260,
|
||||||
55368, 55475, 55582, 55688, 55794, 55899, 56004, 56108, 56212, 56315, 56417,
|
55368, 55475, 55582, 55688, 55794, 55899, 56004, 56108, 56212, 56315, 56417,
|
||||||
56519, 56621, 56722, 56822, 56922, 57022, 57120, 57219, 57316, 57414, 57510,
|
56519, 56621, 56722, 56822, 56922, 57022, 57120, 57219, 57316, 57414, 57510,
|
||||||
57606, 57702, 57797, 57892, 57986, 58079, 58172, 58264, 58356, 58447, 58538,
|
57606, 57702, 57797, 57892, 57986, 58079, 58172, 58264, 58356, 58447, 58538,
|
||||||
58628, 58718, 58807, 58895, 58983, 59070, 59157, 59243, 59329, 59414, 59499,
|
58628, 58718, 58807, 58895, 58983, 59070, 59157, 59243, 59329, 59414, 59499,
|
||||||
59583, 59666, 59749, 59831, 59913, 59994, 60075, 60155, 60235, 60313, 60392,
|
59583, 59666, 59749, 59831, 59913, 59994, 60075, 60155, 60235, 60313, 60392,
|
||||||
60470, 60547, 60624, 60700, 60775, 60850, 60924, 60998, 61071, 61144, 61216,
|
60470, 60547, 60624, 60700, 60775, 60850, 60924, 60998, 61071, 61144, 61216,
|
||||||
61288, 61359, 61429, 61499, 61568, 61637, 61705, 61772, 61839, 61905, 61971,
|
61288, 61359, 61429, 61499, 61568, 61637, 61705, 61772, 61839, 61905, 61971,
|
||||||
62036, 62100, 62164, 62228, 62291, 62353, 62414, 62475, 62536, 62596, 62655,
|
62036, 62100, 62164, 62228, 62291, 62353, 62414, 62475, 62536, 62596, 62655,
|
||||||
62714, 62772, 62829, 62886, 62942, 62998, 63053, 63108, 63162, 63215, 63268,
|
62714, 62772, 62829, 62886, 62942, 62998, 63053, 63108, 63162, 63215, 63268,
|
||||||
63320, 63371, 63422, 63473, 63522, 63571, 63620, 63668, 63715, 63762, 63808,
|
63320, 63371, 63422, 63473, 63522, 63571, 63620, 63668, 63715, 63762, 63808,
|
||||||
63854, 63899, 63943, 63987, 64030, 64073, 64115, 64156, 64197, 64237, 64276,
|
63854, 63899, 63943, 63987, 64030, 64073, 64115, 64156, 64197, 64237, 64276,
|
||||||
64315, 64353, 64391, 64428, 64465, 64501, 64536, 64571, 64605, 64638, 64671,
|
64315, 64353, 64391, 64428, 64465, 64501, 64536, 64571, 64605, 64638, 64671,
|
||||||
64703, 64735, 64766, 64796, 64826, 64855, 64884, 64912, 64939, 64966, 64992,
|
64703, 64735, 64766, 64796, 64826, 64855, 64884, 64912, 64939, 64966, 64992,
|
||||||
65018, 65043, 65067, 65091, 65114, 65136, 65158, 65179, 65200, 65220, 65239,
|
65018, 65043, 65067, 65091, 65114, 65136, 65158, 65179, 65200, 65220, 65239,
|
||||||
65258, 65276, 65294, 65311, 65327, 65343, 65358, 65372, 65386, 65400, 65412,
|
65258, 65276, 65294, 65311, 65327, 65343, 65358, 65372, 65386, 65400, 65412,
|
||||||
65424, 65436, 65446, 65457, 65466, 65475, 65483, 65491, 65498, 65505, 65511,
|
65424, 65436, 65446, 65457, 65466, 65475, 65483, 65491, 65498, 65505, 65511,
|
||||||
65516, 65520, 65524, 65528, 65531, 65533, 65534, 65535, 65536, 65535, 65534,
|
65516, 65520, 65524, 65528, 65531, 65533, 65534, 65535, 65536, 65535, 65534,
|
||||||
65533, 65531, 65528, 65524, 65520, 65516, 65511, 65505, 65498, 65491, 65483,
|
65533, 65531, 65528, 65524, 65520, 65516, 65511, 65505, 65498, 65491, 65483,
|
||||||
65475, 65466, 65457, 65446, 65436, 65424, 65412, 65400, 65386, 65372, 65358,
|
65475, 65466, 65457, 65446, 65436, 65424, 65412, 65400, 65386, 65372, 65358,
|
||||||
65343, 65327, 65311, 65294, 65276, 65258, 65239, 65220, 65200, 65179, 65158,
|
65343, 65327, 65311, 65294, 65276, 65258, 65239, 65220, 65200, 65179, 65158,
|
||||||
65136, 65114, 65091, 65067, 65043, 65018, 64992, 64966, 64939, 64912, 64884,
|
65136, 65114, 65091, 65067, 65043, 65018, 64992, 64966, 64939, 64912, 64884,
|
||||||
64855, 64826, 64796, 64766, 64735, 64703, 64671, 64638, 64605, 64571, 64536,
|
64855, 64826, 64796, 64766, 64735, 64703, 64671, 64638, 64605, 64571, 64536,
|
||||||
64501, 64465, 64428, 64391, 64353, 64315, 64276, 64237, 64197, 64156, 64115,
|
64501, 64465, 64428, 64391, 64353, 64315, 64276, 64237, 64197, 64156, 64115,
|
||||||
64073, 64030, 63987, 63943, 63899, 63854, 63808, 63762, 63715, 63668, 63620,
|
64073, 64030, 63987, 63943, 63899, 63854, 63808, 63762, 63715, 63668, 63620,
|
||||||
63571, 63522, 63473, 63422, 63371, 63320, 63268, 63215, 63162, 63108, 63053,
|
63571, 63522, 63473, 63422, 63371, 63320, 63268, 63215, 63162, 63108, 63053,
|
||||||
62998, 62942, 62886, 62829, 62772, 62714, 62655, 62596, 62536, 62475, 62414,
|
62998, 62942, 62886, 62829, 62772, 62714, 62655, 62596, 62536, 62475, 62414,
|
||||||
62353, 62291, 62228, 62164, 62100, 62036, 61971, 61905, 61839, 61772, 61705,
|
62353, 62291, 62228, 62164, 62100, 62036, 61971, 61905, 61839, 61772, 61705,
|
||||||
61637, 61568, 61499, 61429, 61359, 61288, 61216, 61144, 61071, 60998, 60924,
|
61637, 61568, 61499, 61429, 61359, 61288, 61216, 61144, 61071, 60998, 60924,
|
||||||
60850, 60775, 60700, 60624, 60547, 60470, 60392, 60313, 60235, 60155, 60075,
|
60850, 60775, 60700, 60624, 60547, 60470, 60392, 60313, 60235, 60155, 60075,
|
||||||
59994, 59913, 59831, 59749, 59666, 59583, 59499, 59414, 59329, 59243, 59157,
|
59994, 59913, 59831, 59749, 59666, 59583, 59499, 59414, 59329, 59243, 59157,
|
||||||
59070, 58983, 58895, 58807, 58718, 58628, 58538, 58447, 58356, 58264, 58172,
|
59070, 58983, 58895, 58807, 58718, 58628, 58538, 58447, 58356, 58264, 58172,
|
||||||
58079, 57986, 57892, 57797, 57702, 57606, 57510, 57414, 57316, 57219, 57120,
|
58079, 57986, 57892, 57797, 57702, 57606, 57510, 57414, 57316, 57219, 57120,
|
||||||
57022, 56922, 56822, 56722, 56621, 56519, 56417, 56315, 56212, 56108, 56004,
|
57022, 56922, 56822, 56722, 56621, 56519, 56417, 56315, 56212, 56108, 56004,
|
||||||
55899, 55794, 55688, 55582, 55475, 55368, 55260, 55152, 55043, 54933, 54823,
|
55899, 55794, 55688, 55582, 55475, 55368, 55260, 55152, 55043, 54933, 54823,
|
||||||
54713, 54602, 54491, 54379, 54266, 54153, 54040, 53926, 53811, 53696, 53581,
|
54713, 54602, 54491, 54379, 54266, 54153, 54040, 53926, 53811, 53696, 53581,
|
||||||
53465, 53348, 53231, 53114, 52996, 52877, 52758, 52639, 52518, 52398, 52277,
|
53465, 53348, 53231, 53114, 52996, 52877, 52758, 52639, 52518, 52398, 52277,
|
||||||
52155, 52033, 51911, 51788, 51665, 51541, 51416, 51291, 51166, 51040, 50914,
|
52155, 52033, 51911, 51788, 51665, 51541, 51416, 51291, 51166, 51040, 50914,
|
||||||
50787, 50660, 50532, 50403, 50275, 50146, 50016, 49886, 49755, 49624, 49492,
|
50787, 50660, 50532, 50403, 50275, 50146, 50016, 49886, 49755, 49624, 49492,
|
||||||
49360, 49228, 49095, 48961, 48828, 48693, 48558, 48423, 48288, 48151, 48015,
|
49360, 49228, 49095, 48961, 48828, 48693, 48558, 48423, 48288, 48151, 48015,
|
||||||
47878, 47740, 47602, 47464, 47325, 47186, 47046, 46906, 46765, 46624, 46482,
|
47878, 47740, 47602, 47464, 47325, 47186, 47046, 46906, 46765, 46624, 46482,
|
||||||
46340, 46198, 46055, 45912, 45768, 45624, 45480, 45335, 45189, 45043, 44897,
|
46340, 46198, 46055, 45912, 45768, 45624, 45480, 45335, 45189, 45043, 44897,
|
||||||
44750, 44603, 44456, 44308, 44160, 44011, 43862, 43712, 43562, 43412, 43261,
|
44750, 44603, 44456, 44308, 44160, 44011, 43862, 43712, 43562, 43412, 43261,
|
||||||
43110, 42958, 42806, 42653, 42501, 42347, 42194, 42040, 41885, 41730, 41575,
|
43110, 42958, 42806, 42653, 42501, 42347, 42194, 42040, 41885, 41730, 41575,
|
||||||
41419, 41263, 41107, 40950, 40793, 40636, 40478, 40319, 40161, 40002, 39842,
|
41419, 41263, 41107, 40950, 40793, 40636, 40478, 40319, 40161, 40002, 39842,
|
||||||
39682, 39522, 39362, 39201, 39039, 38878, 38716, 38553, 38390, 38227, 38064,
|
39682, 39522, 39362, 39201, 39039, 38878, 38716, 38553, 38390, 38227, 38064,
|
||||||
37900, 37736, 37571, 37406, 37241, 37075, 36909, 36743, 36576, 36409, 36242,
|
37900, 37736, 37571, 37406, 37241, 37075, 36909, 36743, 36576, 36409, 36242,
|
||||||
36074, 35906, 35738, 35569, 35400, 35231, 35061, 34891, 34721, 34550, 34379,
|
36074, 35906, 35738, 35569, 35400, 35231, 35061, 34891, 34721, 34550, 34379,
|
||||||
34208, 34036, 33864, 33692, 33519, 33346, 33173, 32999, 32826, 32651, 32477,
|
34208, 34036, 33864, 33692, 33519, 33346, 33173, 32999, 32826, 32651, 32477,
|
||||||
32302, 32127, 31952, 31776, 31600, 31424, 31247, 31070, 30893, 30715, 30538,
|
32302, 32127, 31952, 31776, 31600, 31424, 31247, 31070, 30893, 30715, 30538,
|
||||||
30360, 30181, 30003, 29824, 29645, 29465, 29285, 29105, 28925, 28745, 28564,
|
30360, 30181, 30003, 29824, 29645, 29465, 29285, 29105, 28925, 28745, 28564,
|
||||||
28383, 28201, 28020, 27838, 27656, 27473, 27291, 27108, 26925, 26741, 26557,
|
28383, 28201, 28020, 27838, 27656, 27473, 27291, 27108, 26925, 26741, 26557,
|
||||||
26373, 26189, 26005, 25820, 25635, 25450, 25265, 25079, 24893, 24707, 24521,
|
26373, 26189, 26005, 25820, 25635, 25450, 25265, 25079, 24893, 24707, 24521,
|
||||||
24334, 24147, 23960, 23773, 23586, 23398, 23210, 23022, 22833, 22645, 22456,
|
24334, 24147, 23960, 23773, 23586, 23398, 23210, 23022, 22833, 22645, 22456,
|
||||||
22267, 22078, 21889, 21699, 21509, 21319, 21129, 20938, 20748, 20557, 20366,
|
22267, 22078, 21889, 21699, 21509, 21319, 21129, 20938, 20748, 20557, 20366,
|
||||||
20175, 19983, 19792, 19600, 19408, 19216, 19024, 18831, 18638, 18446, 18253,
|
20175, 19983, 19792, 19600, 19408, 19216, 19024, 18831, 18638, 18446, 18253,
|
||||||
18059, 17866, 17672, 17479, 17285, 17091, 16897, 16702, 16508, 16313, 16118,
|
18059, 17866, 17672, 17479, 17285, 17091, 16897, 16702, 16508, 16313, 16118,
|
||||||
15923, 15728, 15533, 15338, 15142, 14946, 14751, 14555, 14359, 14162, 13966,
|
15923, 15728, 15533, 15338, 15142, 14946, 14751, 14555, 14359, 14162, 13966,
|
||||||
13769, 13573, 13376, 13179, 12982, 12785, 12588, 12390, 12193, 11995, 11797,
|
13769, 13573, 13376, 13179, 12982, 12785, 12588, 12390, 12193, 11995, 11797,
|
||||||
11600, 11402, 11204, 11006, 10807, 10609, 10410, 10212, 10013, 9814, 9616, 9417,
|
11600, 11402, 11204, 11006, 10807, 10609, 10410, 10212, 10013, 9814, 9616, 9417,
|
||||||
9218, 9019, 8819, 8620, 8421, 8221, 8022, 7822, 7623, 7423, 7223, 7023, 6823,
|
9218, 9019, 8819, 8620, 8421, 8221, 8022, 7822, 7623, 7423, 7223, 7023, 6823,
|
||||||
6623, 6423, 6223, 6023, 5823, 5622, 5422, 5222, 5021, 4821, 4620, 4420, 4219,
|
6623, 6423, 6223, 6023, 5823, 5622, 5422, 5222, 5021, 4821, 4620, 4420, 4219,
|
||||||
4018, 3818, 3617, 3416, 3215, 3014, 2814, 2613, 2412, 2211, 2010, 1809, 1608,
|
4018, 3818, 3617, 3416, 3215, 3014, 2814, 2613, 2412, 2211, 2010, 1809, 1608,
|
||||||
1407, 1206, 1005, 804, 603, 402, 201, 0, -201, -402, -603, -804, -1005, -1206,
|
1407, 1206, 1005, 804, 603, 402, 201, 0, -201, -402, -603, -804, -1005, -1206,
|
||||||
-1407, -1608, -1809, -2010, -2211, -2412, -2613, -2814, -3014, -3215, -3416,
|
-1407, -1608, -1809, -2010, -2211, -2412, -2613, -2814, -3014, -3215, -3416,
|
||||||
-3617, -3818, -4018, -4219, -4420, -4620, -4821, -5021, -5222, -5422, -5622,
|
-3617, -3818, -4018, -4219, -4420, -4620, -4821, -5021, -5222, -5422, -5622,
|
||||||
-5823, -6023, -6223, -6423, -6623, -6823, -7023, -7223, -7423, -7623, -7822,
|
-5823, -6023, -6223, -6423, -6623, -6823, -7023, -7223, -7423, -7623, -7822,
|
||||||
-8022, -8221, -8421, -8620, -8819, -9019, -9218, -9417, -9616, -9814, -10013,
|
-8022, -8221, -8421, -8620, -8819, -9019, -9218, -9417, -9616, -9814, -10013,
|
||||||
-10212, -10410, -10609, -10807, -11006, -11204, -11402, -11600, -11797, -11995,
|
-10212, -10410, -10609, -10807, -11006, -11204, -11402, -11600, -11797, -11995,
|
||||||
-12193, -12390, -12588, -12785, -12982, -13179, -13376, -13573, -13769, -13966,
|
-12193, -12390, -12588, -12785, -12982, -13179, -13376, -13573, -13769, -13966,
|
||||||
-14162, -14359, -14555, -14751, -14946, -15142, -15338, -15533, -15728, -15923,
|
-14162, -14359, -14555, -14751, -14946, -15142, -15338, -15533, -15728, -15923,
|
||||||
-16118, -16313, -16508, -16702, -16897, -17091, -17285, -17479, -17672, -17866,
|
-16118, -16313, -16508, -16702, -16897, -17091, -17285, -17479, -17672, -17866,
|
||||||
-18059, -18253, -18446, -18638, -18831, -19024, -19216, -19408, -19600, -19792,
|
-18059, -18253, -18446, -18638, -18831, -19024, -19216, -19408, -19600, -19792,
|
||||||
-19983, -20175, -20366, -20557, -20748, -20938, -21129, -21319, -21509, -21699,
|
-19983, -20175, -20366, -20557, -20748, -20938, -21129, -21319, -21509, -21699,
|
||||||
-21889, -22078, -22267, -22456, -22645, -22833, -23022, -23210, -23398, -23586,
|
-21889, -22078, -22267, -22456, -22645, -22833, -23022, -23210, -23398, -23586,
|
||||||
-23773, -23960, -24147, -24334, -24521, -24707, -24893, -25079, -25265, -25450,
|
-23773, -23960, -24147, -24334, -24521, -24707, -24893, -25079, -25265, -25450,
|
||||||
-25635, -25820, -26005, -26189, -26373, -26557, -26741, -26925, -27108, -27291,
|
-25635, -25820, -26005, -26189, -26373, -26557, -26741, -26925, -27108, -27291,
|
||||||
-27473, -27656, -27838, -28020, -28201, -28383, -28564, -28745, -28925, -29105,
|
-27473, -27656, -27838, -28020, -28201, -28383, -28564, -28745, -28925, -29105,
|
||||||
-29285, -29465, -29645, -29824, -30003, -30181, -30360, -30538, -30715, -30893,
|
-29285, -29465, -29645, -29824, -30003, -30181, -30360, -30538, -30715, -30893,
|
||||||
-31070, -31247, -31424, -31600, -31776, -31952, -32127, -32302, -32477, -32651,
|
-31070, -31247, -31424, -31600, -31776, -31952, -32127, -32302, -32477, -32651,
|
||||||
-32826, -32999, -33173, -33346, -33519, -33692, -33864, -34036, -34208, -34379,
|
-32826, -32999, -33173, -33346, -33519, -33692, -33864, -34036, -34208, -34379,
|
||||||
-34550, -34721, -34891, -35061, -35231, -35400, -35569, -35738, -35906, -36074,
|
-34550, -34721, -34891, -35061, -35231, -35400, -35569, -35738, -35906, -36074,
|
||||||
-36242, -36409, -36576, -36743, -36909, -37075, -37241, -37406, -37571, -37736,
|
-36242, -36409, -36576, -36743, -36909, -37075, -37241, -37406, -37571, -37736,
|
||||||
-37900, -38064, -38227, -38390, -38553, -38716, -38878, -39039, -39201, -39362,
|
-37900, -38064, -38227, -38390, -38553, -38716, -38878, -39039, -39201, -39362,
|
||||||
-39522, -39682, -39842, -40002, -40161, -40319, -40478, -40636, -40793, -40950,
|
-39522, -39682, -39842, -40002, -40161, -40319, -40478, -40636, -40793, -40950,
|
||||||
-41107, -41263, -41419, -41575, -41730, -41885, -42040, -42194, -42347, -42501,
|
-41107, -41263, -41419, -41575, -41730, -41885, -42040, -42194, -42347, -42501,
|
||||||
-42653, -42806, -42958, -43110, -43261, -43412, -43562, -43712, -43862, -44011,
|
-42653, -42806, -42958, -43110, -43261, -43412, -43562, -43712, -43862, -44011,
|
||||||
-44160, -44308, -44456, -44603, -44750, -44897, -45043, -45189, -45335, -45480,
|
-44160, -44308, -44456, -44603, -44750, -44897, -45043, -45189, -45335, -45480,
|
||||||
-45624, -45768, -45912, -46055, -46198, -46340, -46482, -46624, -46765, -46906,
|
-45624, -45768, -45912, -46055, -46198, -46340, -46482, -46624, -46765, -46906,
|
||||||
-47046, -47186, -47325, -47464, -47602, -47740, -47878, -48015, -48151, -48288,
|
-47046, -47186, -47325, -47464, -47602, -47740, -47878, -48015, -48151, -48288,
|
||||||
-48423, -48558, -48693, -48828, -48961, -49095, -49228, -49360, -49492, -49624,
|
-48423, -48558, -48693, -48828, -48961, -49095, -49228, -49360, -49492, -49624,
|
||||||
-49755, -49886, -50016, -50146, -50275, -50403, -50532, -50660, -50787, -50914,
|
-49755, -49886, -50016, -50146, -50275, -50403, -50532, -50660, -50787, -50914,
|
||||||
-51040, -51166, -51291, -51416, -51541, -51665, -51788, -51911, -52033, -52155,
|
-51040, -51166, -51291, -51416, -51541, -51665, -51788, -51911, -52033, -52155,
|
||||||
-52277, -52398, -52518, -52639, -52758, -52877, -52996, -53114, -53231, -53348,
|
-52277, -52398, -52518, -52639, -52758, -52877, -52996, -53114, -53231, -53348,
|
||||||
-53465, -53581, -53696, -53811, -53926, -54040, -54153, -54266, -54379, -54491,
|
-53465, -53581, -53696, -53811, -53926, -54040, -54153, -54266, -54379, -54491,
|
||||||
-54602, -54713, -54823, -54933, -55043, -55152, -55260, -55368, -55475, -55582,
|
-54602, -54713, -54823, -54933, -55043, -55152, -55260, -55368, -55475, -55582,
|
||||||
-55688, -55794, -55899, -56004, -56108, -56212, -56315, -56417, -56519, -56621,
|
-55688, -55794, -55899, -56004, -56108, -56212, -56315, -56417, -56519, -56621,
|
||||||
-56722, -56822, -56922, -57022, -57120, -57219, -57316, -57414, -57510, -57606,
|
-56722, -56822, -56922, -57022, -57120, -57219, -57316, -57414, -57510, -57606,
|
||||||
-57702, -57797, -57892, -57986, -58079, -58172, -58264, -58356, -58447, -58538,
|
-57702, -57797, -57892, -57986, -58079, -58172, -58264, -58356, -58447, -58538,
|
||||||
-58628, -58718, -58807, -58895, -58983, -59070, -59157, -59243, -59329, -59414,
|
-58628, -58718, -58807, -58895, -58983, -59070, -59157, -59243, -59329, -59414,
|
||||||
-59499, -59583, -59666, -59749, -59831, -59913, -59994, -60075, -60155, -60235,
|
-59499, -59583, -59666, -59749, -59831, -59913, -59994, -60075, -60155, -60235,
|
||||||
-60313, -60392, -60470, -60547, -60624, -60700, -60775, -60850, -60924, -60998,
|
-60313, -60392, -60470, -60547, -60624, -60700, -60775, -60850, -60924, -60998,
|
||||||
-61071, -61144, -61216, -61288, -61359, -61429, -61499, -61568, -61637, -61705,
|
-61071, -61144, -61216, -61288, -61359, -61429, -61499, -61568, -61637, -61705,
|
||||||
-61772, -61839, -61905, -61971, -62036, -62100, -62164, -62228, -62291, -62353,
|
-61772, -61839, -61905, -61971, -62036, -62100, -62164, -62228, -62291, -62353,
|
||||||
-62414, -62475, -62536, -62596, -62655, -62714, -62772, -62829, -62886, -62942,
|
-62414, -62475, -62536, -62596, -62655, -62714, -62772, -62829, -62886, -62942,
|
||||||
-62998, -63053, -63108, -63162, -63215, -63268, -63320, -63371, -63422, -63473,
|
-62998, -63053, -63108, -63162, -63215, -63268, -63320, -63371, -63422, -63473,
|
||||||
-63522, -63571, -63620, -63668, -63715, -63762, -63808, -63854, -63899, -63943,
|
-63522, -63571, -63620, -63668, -63715, -63762, -63808, -63854, -63899, -63943,
|
||||||
-63987, -64030, -64073, -64115, -64156, -64197, -64237, -64276, -64315, -64353,
|
-63987, -64030, -64073, -64115, -64156, -64197, -64237, -64276, -64315, -64353,
|
||||||
-64391, -64428, -64465, -64501, -64536, -64571, -64605, -64638, -64671, -64703,
|
-64391, -64428, -64465, -64501, -64536, -64571, -64605, -64638, -64671, -64703,
|
||||||
-64735, -64766, -64796, -64826, -64855, -64884, -64912, -64939, -64966, -64992,
|
-64735, -64766, -64796, -64826, -64855, -64884, -64912, -64939, -64966, -64992,
|
||||||
-65018, -65043, -65067, -65091, -65114, -65136, -65158, -65179, -65200, -65220,
|
-65018, -65043, -65067, -65091, -65114, -65136, -65158, -65179, -65200, -65220,
|
||||||
-65239, -65258, -65276, -65294, -65311, -65327, -65343, -65358, -65372, -65386,
|
-65239, -65258, -65276, -65294, -65311, -65327, -65343, -65358, -65372, -65386,
|
||||||
-65400, -65412, -65424, -65436, -65446, -65457, -65466, -65475, -65483, -65491,
|
-65400, -65412, -65424, -65436, -65446, -65457, -65466, -65475, -65483, -65491,
|
||||||
-65498, -65505, -65511, -65516, -65520, -65524, -65528, -65531, -65533, -65534,
|
-65498, -65505, -65511, -65516, -65520, -65524, -65528, -65531, -65533, -65534,
|
||||||
-65535, -65536, -65535, -65534, -65533, -65531, -65528, -65524, -65520, -65516,
|
-65535, -65536, -65535, -65534, -65533, -65531, -65528, -65524, -65520, -65516,
|
||||||
-65511, -65505, -65498, -65491, -65483, -65475, -65466, -65457, -65446, -65436,
|
-65511, -65505, -65498, -65491, -65483, -65475, -65466, -65457, -65446, -65436,
|
||||||
-65424, -65412, -65400, -65386, -65372, -65358, -65343, -65327, -65311, -65294,
|
-65424, -65412, -65400, -65386, -65372, -65358, -65343, -65327, -65311, -65294,
|
||||||
-65276, -65258, -65239, -65220, -65200, -65179, -65158, -65136, -65114, -65091,
|
-65276, -65258, -65239, -65220, -65200, -65179, -65158, -65136, -65114, -65091,
|
||||||
-65067, -65043, -65018, -64992, -64966, -64939, -64912, -64884, -64855, -64826,
|
-65067, -65043, -65018, -64992, -64966, -64939, -64912, -64884, -64855, -64826,
|
||||||
-64796, -64766, -64735, -64703, -64671, -64638, -64605, -64571, -64536, -64501,
|
-64796, -64766, -64735, -64703, -64671, -64638, -64605, -64571, -64536, -64501,
|
||||||
-64465, -64428, -64391, -64353, -64315, -64276, -64237, -64197, -64156, -64115,
|
-64465, -64428, -64391, -64353, -64315, -64276, -64237, -64197, -64156, -64115,
|
||||||
-64073, -64030, -63987, -63943, -63899, -63854, -63808, -63762, -63715, -63668,
|
-64073, -64030, -63987, -63943, -63899, -63854, -63808, -63762, -63715, -63668,
|
||||||
-63620, -63571, -63522, -63473, -63422, -63371, -63320, -63268, -63215, -63162,
|
-63620, -63571, -63522, -63473, -63422, -63371, -63320, -63268, -63215, -63162,
|
||||||
-63108, -63053, -62998, -62942, -62886, -62829, -62772, -62714, -62655, -62596,
|
-63108, -63053, -62998, -62942, -62886, -62829, -62772, -62714, -62655, -62596,
|
||||||
-62536, -62475, -62414, -62353, -62291, -62228, -62164, -62100, -62036, -61971,
|
-62536, -62475, -62414, -62353, -62291, -62228, -62164, -62100, -62036, -61971,
|
||||||
-61905, -61839, -61772, -61705, -61637, -61568, -61499, -61429, -61359, -61288,
|
-61905, -61839, -61772, -61705, -61637, -61568, -61499, -61429, -61359, -61288,
|
||||||
-61216, -61144, -61071, -60998, -60924, -60850, -60775, -60700, -60624, -60547,
|
-61216, -61144, -61071, -60998, -60924, -60850, -60775, -60700, -60624, -60547,
|
||||||
-60470, -60392, -60313, -60235, -60155, -60075, -59994, -59913, -59831, -59749,
|
-60470, -60392, -60313, -60235, -60155, -60075, -59994, -59913, -59831, -59749,
|
||||||
-59666, -59583, -59499, -59414, -59329, -59243, -59157, -59070, -58983, -58895,
|
-59666, -59583, -59499, -59414, -59329, -59243, -59157, -59070, -58983, -58895,
|
||||||
-58807, -58718, -58628, -58538, -58447, -58356, -58264, -58172, -58079, -57986,
|
-58807, -58718, -58628, -58538, -58447, -58356, -58264, -58172, -58079, -57986,
|
||||||
-57892, -57797, -57702, -57606, -57510, -57414, -57316, -57219, -57120, -57022,
|
-57892, -57797, -57702, -57606, -57510, -57414, -57316, -57219, -57120, -57022,
|
||||||
-56922, -56822, -56722, -56621, -56519, -56417, -56315, -56212, -56108, -56004,
|
-56922, -56822, -56722, -56621, -56519, -56417, -56315, -56212, -56108, -56004,
|
||||||
-55899, -55794, -55688, -55582, -55475, -55368, -55260, -55152, -55043, -54933,
|
-55899, -55794, -55688, -55582, -55475, -55368, -55260, -55152, -55043, -54933,
|
||||||
-54823, -54713, -54602, -54491, -54379, -54266, -54153, -54040, -53926, -53811,
|
-54823, -54713, -54602, -54491, -54379, -54266, -54153, -54040, -53926, -53811,
|
||||||
-53696, -53581, -53465, -53348, -53231, -53114, -52996, -52877, -52758, -52639,
|
-53696, -53581, -53465, -53348, -53231, -53114, -52996, -52877, -52758, -52639,
|
||||||
-52518, -52398, -52277, -52155, -52033, -51911, -51788, -51665, -51541, -51416,
|
-52518, -52398, -52277, -52155, -52033, -51911, -51788, -51665, -51541, -51416,
|
||||||
-51291, -51166, -51040, -50914, -50787, -50660, -50532, -50403, -50275, -50146,
|
-51291, -51166, -51040, -50914, -50787, -50660, -50532, -50403, -50275, -50146,
|
||||||
-50016, -49886, -49755, -49624, -49492, -49360, -49228, -49095, -48961, -48828,
|
-50016, -49886, -49755, -49624, -49492, -49360, -49228, -49095, -48961, -48828,
|
||||||
-48693, -48558, -48423, -48288, -48151, -48015, -47878, -47740, -47602, -47464,
|
-48693, -48558, -48423, -48288, -48151, -48015, -47878, -47740, -47602, -47464,
|
||||||
-47325, -47186, -47046, -46906, -46765, -46624, -46482, -46340, -46198, -46055,
|
-47325, -47186, -47046, -46906, -46765, -46624, -46482, -46340, -46198, -46055,
|
||||||
-45912, -45768, -45624, -45480, -45335, -45189, -45043, -44897, -44750, -44603,
|
-45912, -45768, -45624, -45480, -45335, -45189, -45043, -44897, -44750, -44603,
|
||||||
-44456, -44308, -44160, -44011, -43862, -43712, -43562, -43412, -43261, -43110,
|
-44456, -44308, -44160, -44011, -43862, -43712, -43562, -43412, -43261, -43110,
|
||||||
-42958, -42806, -42653, -42501, -42347, -42194, -42040, -41885, -41730, -41575,
|
-42958, -42806, -42653, -42501, -42347, -42194, -42040, -41885, -41730, -41575,
|
||||||
-41419, -41263, -41107, -40950, -40793, -40636, -40478, -40319, -40161, -40002,
|
-41419, -41263, -41107, -40950, -40793, -40636, -40478, -40319, -40161, -40002,
|
||||||
-39842, -39682, -39522, -39362, -39201, -39039, -38878, -38716, -38553, -38390,
|
-39842, -39682, -39522, -39362, -39201, -39039, -38878, -38716, -38553, -38390,
|
||||||
-38227, -38064, -37900, -37736, -37571, -37406, -37241, -37075, -36909, -36743,
|
-38227, -38064, -37900, -37736, -37571, -37406, -37241, -37075, -36909, -36743,
|
||||||
-36576, -36409, -36242, -36074, -35906, -35738, -35569, -35400, -35231, -35061,
|
-36576, -36409, -36242, -36074, -35906, -35738, -35569, -35400, -35231, -35061,
|
||||||
-34891, -34721, -34550, -34379, -34208, -34036, -33864, -33692, -33519, -33346,
|
-34891, -34721, -34550, -34379, -34208, -34036, -33864, -33692, -33519, -33346,
|
||||||
-33173, -32999, -32826, -32651, -32477, -32302, -32127, -31952, -31776, -31600,
|
-33173, -32999, -32826, -32651, -32477, -32302, -32127, -31952, -31776, -31600,
|
||||||
-31424, -31247, -31070, -30893, -30715, -30538, -30360, -30181, -30003, -29824,
|
-31424, -31247, -31070, -30893, -30715, -30538, -30360, -30181, -30003, -29824,
|
||||||
-29645, -29465, -29285, -29105, -28925, -28745, -28564, -28383, -28201, -28020,
|
-29645, -29465, -29285, -29105, -28925, -28745, -28564, -28383, -28201, -28020,
|
||||||
-27838, -27656, -27473, -27291, -27108, -26925, -26741, -26557, -26373, -26189,
|
-27838, -27656, -27473, -27291, -27108, -26925, -26741, -26557, -26373, -26189,
|
||||||
-26005, -25820, -25635, -25450, -25265, -25079, -24893, -24707, -24521, -24334,
|
-26005, -25820, -25635, -25450, -25265, -25079, -24893, -24707, -24521, -24334,
|
||||||
-24147, -23960, -23773, -23586, -23398, -23210, -23022, -22833, -22645, -22456,
|
-24147, -23960, -23773, -23586, -23398, -23210, -23022, -22833, -22645, -22456,
|
||||||
-22267, -22078, -21889, -21699, -21509, -21319, -21129, -20938, -20748, -20557,
|
-22267, -22078, -21889, -21699, -21509, -21319, -21129, -20938, -20748, -20557,
|
||||||
-20366, -20175, -19983, -19792, -19600, -19408, -19216, -19024, -18831, -18638,
|
-20366, -20175, -19983, -19792, -19600, -19408, -19216, -19024, -18831, -18638,
|
||||||
-18446, -18253, -18059, -17866, -17672, -17479, -17285, -17091, -16897, -16702,
|
-18446, -18253, -18059, -17866, -17672, -17479, -17285, -17091, -16897, -16702,
|
||||||
-16508, -16313, -16118, -15923, -15728, -15533, -15338, -15142, -14946, -14751,
|
-16508, -16313, -16118, -15923, -15728, -15533, -15338, -15142, -14946, -14751,
|
||||||
-14555, -14359, -14162, -13966, -13769, -13573, -13376, -13179, -12982, -12785,
|
-14555, -14359, -14162, -13966, -13769, -13573, -13376, -13179, -12982, -12785,
|
||||||
-12588, -12390, -12193, -11995, -11797, -11600, -11402, -11204, -11006, -10807,
|
-12588, -12390, -12193, -11995, -11797, -11600, -11402, -11204, -11006, -10807,
|
||||||
-10609, -10410, -10212, -10013, -9814, -9616, -9417, -9218, -9019, -8819, -8620,
|
-10609, -10410, -10212, -10013, -9814, -9616, -9417, -9218, -9019, -8819, -8620,
|
||||||
-8421, -8221, -8022, -7822, -7623, -7423, -7223, -7023, -6823, -6623, -6423,
|
-8421, -8221, -8022, -7822, -7623, -7423, -7223, -7023, -6823, -6623, -6423,
|
||||||
-6223, -6023, -5823, -5622, -5422, -5222, -5021, -4821, -4620, -4420, -4219,
|
-6223, -6023, -5823, -5622, -5422, -5222, -5021, -4821, -4620, -4420, -4219,
|
||||||
-4018, -3818, -3617, -3416, -3215, -3014, -2814, -2613, -2412, -2211, -2010,
|
-4018, -3818, -3617, -3416, -3215, -3014, -2814, -2613, -2412, -2211, -2010,
|
||||||
-1809, -1608, -1407, -1206, -1005, -804, -603, -402, -201
|
-1809, -1608, -1407, -1206, -1005, -804, -603, -402, -201
|
||||||
};
|
};
|
||||||
int FCosTab[2048] =
|
int FCosTab[2048] =
|
||||||
{
|
{
|
||||||
65536, 65535, 65534, 65533, 65531, 65528, 65524, 65520, 65516, 65511, 65505,
|
65536, 65535, 65534, 65533, 65531, 65528, 65524, 65520, 65516, 65511, 65505,
|
||||||
65498, 65491, 65483, 65475, 65466, 65457, 65446, 65436, 65424, 65412, 65400,
|
65498, 65491, 65483, 65475, 65466, 65457, 65446, 65436, 65424, 65412, 65400,
|
||||||
65386, 65372, 65358, 65343, 65327, 65311, 65294, 65276, 65258, 65239, 65220,
|
65386, 65372, 65358, 65343, 65327, 65311, 65294, 65276, 65258, 65239, 65220,
|
||||||
65200, 65179, 65158, 65136, 65114, 65091, 65067, 65043, 65018, 64992, 64966,
|
65200, 65179, 65158, 65136, 65114, 65091, 65067, 65043, 65018, 64992, 64966,
|
||||||
64939, 64912, 64884, 64855, 64826, 64796, 64766, 64735, 64703, 64671, 64638,
|
64939, 64912, 64884, 64855, 64826, 64796, 64766, 64735, 64703, 64671, 64638,
|
||||||
64605, 64571, 64536, 64501, 64465, 64428, 64391, 64353, 64315, 64276, 64237,
|
64605, 64571, 64536, 64501, 64465, 64428, 64391, 64353, 64315, 64276, 64237,
|
||||||
64197, 64156, 64115, 64073, 64030, 63987, 63943, 63899, 63854, 63808, 63762,
|
64197, 64156, 64115, 64073, 64030, 63987, 63943, 63899, 63854, 63808, 63762,
|
||||||
63715, 63668, 63620, 63571, 63522, 63473, 63422, 63371, 63320, 63268, 63215,
|
63715, 63668, 63620, 63571, 63522, 63473, 63422, 63371, 63320, 63268, 63215,
|
||||||
63162, 63108, 63053, 62998, 62942, 62886, 62829, 62772, 62714, 62655, 62596,
|
63162, 63108, 63053, 62998, 62942, 62886, 62829, 62772, 62714, 62655, 62596,
|
||||||
62536, 62475, 62414, 62353, 62291, 62228, 62164, 62100, 62036, 61971, 61905,
|
62536, 62475, 62414, 62353, 62291, 62228, 62164, 62100, 62036, 61971, 61905,
|
||||||
61839, 61772, 61705, 61637, 61568, 61499, 61429, 61359, 61288, 61216, 61144,
|
61839, 61772, 61705, 61637, 61568, 61499, 61429, 61359, 61288, 61216, 61144,
|
||||||
61071, 60998, 60924, 60850, 60775, 60700, 60624, 60547, 60470, 60392, 60313,
|
61071, 60998, 60924, 60850, 60775, 60700, 60624, 60547, 60470, 60392, 60313,
|
||||||
60235, 60155, 60075, 59994, 59913, 59831, 59749, 59666, 59583, 59499, 59414,
|
60235, 60155, 60075, 59994, 59913, 59831, 59749, 59666, 59583, 59499, 59414,
|
||||||
59329, 59243, 59157, 59070, 58983, 58895, 58807, 58718, 58628, 58538, 58447,
|
59329, 59243, 59157, 59070, 58983, 58895, 58807, 58718, 58628, 58538, 58447,
|
||||||
58356, 58264, 58172, 58079, 57986, 57892, 57797, 57702, 57606, 57510, 57414,
|
58356, 58264, 58172, 58079, 57986, 57892, 57797, 57702, 57606, 57510, 57414,
|
||||||
57316, 57219, 57120, 57022, 56922, 56822, 56722, 56621, 56519, 56417, 56315,
|
57316, 57219, 57120, 57022, 56922, 56822, 56722, 56621, 56519, 56417, 56315,
|
||||||
56212, 56108, 56004, 55899, 55794, 55688, 55582, 55475, 55368, 55260, 55152,
|
56212, 56108, 56004, 55899, 55794, 55688, 55582, 55475, 55368, 55260, 55152,
|
||||||
55043, 54933, 54823, 54713, 54602, 54491, 54379, 54266, 54153, 54040, 53926,
|
55043, 54933, 54823, 54713, 54602, 54491, 54379, 54266, 54153, 54040, 53926,
|
||||||
53811, 53696, 53581, 53465, 53348, 53231, 53114, 52996, 52877, 52758, 52639,
|
53811, 53696, 53581, 53465, 53348, 53231, 53114, 52996, 52877, 52758, 52639,
|
||||||
52518, 52398, 52277, 52155, 52033, 51911, 51788, 51665, 51541, 51416, 51291,
|
52518, 52398, 52277, 52155, 52033, 51911, 51788, 51665, 51541, 51416, 51291,
|
||||||
51166, 51040, 50914, 50787, 50660, 50532, 50403, 50275, 50146, 50016, 49886,
|
51166, 51040, 50914, 50787, 50660, 50532, 50403, 50275, 50146, 50016, 49886,
|
||||||
49755, 49624, 49492, 49360, 49228, 49095, 48961, 48828, 48693, 48558, 48423,
|
49755, 49624, 49492, 49360, 49228, 49095, 48961, 48828, 48693, 48558, 48423,
|
||||||
48288, 48151, 48015, 47878, 47740, 47602, 47464, 47325, 47186, 47046, 46906,
|
48288, 48151, 48015, 47878, 47740, 47602, 47464, 47325, 47186, 47046, 46906,
|
||||||
46765, 46624, 46482, 46340, 46198, 46055, 45912, 45768, 45624, 45480, 45335,
|
46765, 46624, 46482, 46340, 46198, 46055, 45912, 45768, 45624, 45480, 45335,
|
||||||
45189, 45043, 44897, 44750, 44603, 44456, 44308, 44160, 44011, 43862, 43712,
|
45189, 45043, 44897, 44750, 44603, 44456, 44308, 44160, 44011, 43862, 43712,
|
||||||
43562, 43412, 43261, 43110, 42958, 42806, 42653, 42501, 42347, 42194, 42040,
|
43562, 43412, 43261, 43110, 42958, 42806, 42653, 42501, 42347, 42194, 42040,
|
||||||
41885, 41730, 41575, 41419, 41263, 41107, 40950, 40793, 40636, 40478, 40319,
|
41885, 41730, 41575, 41419, 41263, 41107, 40950, 40793, 40636, 40478, 40319,
|
||||||
40161, 40002, 39842, 39682, 39522, 39362, 39201, 39039, 38878, 38716, 38553,
|
40161, 40002, 39842, 39682, 39522, 39362, 39201, 39039, 38878, 38716, 38553,
|
||||||
38390, 38227, 38064, 37900, 37736, 37571, 37406, 37241, 37075, 36909, 36743,
|
38390, 38227, 38064, 37900, 37736, 37571, 37406, 37241, 37075, 36909, 36743,
|
||||||
36576, 36409, 36242, 36074, 35906, 35738, 35569, 35400, 35231, 35061, 34891,
|
36576, 36409, 36242, 36074, 35906, 35738, 35569, 35400, 35231, 35061, 34891,
|
||||||
34721, 34550, 34379, 34208, 34036, 33864, 33692, 33519, 33346, 33173, 32999,
|
34721, 34550, 34379, 34208, 34036, 33864, 33692, 33519, 33346, 33173, 32999,
|
||||||
32826, 32651, 32477, 32302, 32127, 31952, 31776, 31600, 31424, 31247, 31070,
|
32826, 32651, 32477, 32302, 32127, 31952, 31776, 31600, 31424, 31247, 31070,
|
||||||
30893, 30715, 30538, 30360, 30181, 30003, 29824, 29645, 29465, 29285, 29105,
|
30893, 30715, 30538, 30360, 30181, 30003, 29824, 29645, 29465, 29285, 29105,
|
||||||
28925, 28745, 28564, 28383, 28201, 28020, 27838, 27656, 27473, 27291, 27108,
|
28925, 28745, 28564, 28383, 28201, 28020, 27838, 27656, 27473, 27291, 27108,
|
||||||
26925, 26741, 26557, 26373, 26189, 26005, 25820, 25635, 25450, 25265, 25079,
|
26925, 26741, 26557, 26373, 26189, 26005, 25820, 25635, 25450, 25265, 25079,
|
||||||
24893, 24707, 24521, 24334, 24147, 23960, 23773, 23586, 23398, 23210, 23022,
|
24893, 24707, 24521, 24334, 24147, 23960, 23773, 23586, 23398, 23210, 23022,
|
||||||
22833, 22645, 22456, 22267, 22078, 21889, 21699, 21509, 21319, 21129, 20938,
|
22833, 22645, 22456, 22267, 22078, 21889, 21699, 21509, 21319, 21129, 20938,
|
||||||
20748, 20557, 20366, 20175, 19983, 19792, 19600, 19408, 19216, 19024, 18831,
|
20748, 20557, 20366, 20175, 19983, 19792, 19600, 19408, 19216, 19024, 18831,
|
||||||
18638, 18446, 18253, 18059, 17866, 17672, 17479, 17285, 17091, 16897, 16702,
|
18638, 18446, 18253, 18059, 17866, 17672, 17479, 17285, 17091, 16897, 16702,
|
||||||
16508, 16313, 16118, 15923, 15728, 15533, 15338, 15142, 14946, 14751, 14555,
|
16508, 16313, 16118, 15923, 15728, 15533, 15338, 15142, 14946, 14751, 14555,
|
||||||
14359, 14162, 13966, 13769, 13573, 13376, 13179, 12982, 12785, 12588, 12390,
|
14359, 14162, 13966, 13769, 13573, 13376, 13179, 12982, 12785, 12588, 12390,
|
||||||
12193, 11995, 11797, 11600, 11402, 11204, 11006, 10807, 10609, 10410, 10212,
|
12193, 11995, 11797, 11600, 11402, 11204, 11006, 10807, 10609, 10410, 10212,
|
||||||
10013, 9814, 9616, 9417, 9218, 9019, 8819, 8620, 8421, 8221, 8022, 7822, 7623,
|
10013, 9814, 9616, 9417, 9218, 9019, 8819, 8620, 8421, 8221, 8022, 7822, 7623,
|
||||||
7423, 7223, 7023, 6823, 6623, 6423, 6223, 6023, 5823, 5622, 5422, 5222, 5021,
|
7423, 7223, 7023, 6823, 6623, 6423, 6223, 6023, 5823, 5622, 5422, 5222, 5021,
|
||||||
4821, 4620, 4420, 4219, 4018, 3818, 3617, 3416, 3215, 3014, 2814, 2613, 2412,
|
4821, 4620, 4420, 4219, 4018, 3818, 3617, 3416, 3215, 3014, 2814, 2613, 2412,
|
||||||
2211, 2010, 1809, 1608, 1407, 1206, 1005, 804, 603, 402, 201, 0, -201, -402,
|
2211, 2010, 1809, 1608, 1407, 1206, 1005, 804, 603, 402, 201, 0, -201, -402,
|
||||||
-603, -804, -1005, -1206, -1407, -1608, -1809, -2010, -2211, -2412, -2613, -2814,
|
-603, -804, -1005, -1206, -1407, -1608, -1809, -2010, -2211, -2412, -2613, -2814,
|
||||||
-3014, -3215, -3416, -3617, -3818, -4018, -4219, -4420, -4620, -4821, -5021,
|
-3014, -3215, -3416, -3617, -3818, -4018, -4219, -4420, -4620, -4821, -5021,
|
||||||
-5222, -5422, -5622, -5823, -6023, -6223, -6423, -6623, -6823, -7023, -7223,
|
-5222, -5422, -5622, -5823, -6023, -6223, -6423, -6623, -6823, -7023, -7223,
|
||||||
-7423, -7623, -7822, -8022, -8221, -8421, -8620, -8819, -9019, -9218, -9417,
|
-7423, -7623, -7822, -8022, -8221, -8421, -8620, -8819, -9019, -9218, -9417,
|
||||||
-9616, -9814, -10013, -10212, -10410, -10609, -10807, -11006, -11204, -11402,
|
-9616, -9814, -10013, -10212, -10410, -10609, -10807, -11006, -11204, -11402,
|
||||||
-11600, -11797, -11995, -12193, -12390, -12588, -12785, -12982, -13179, -13376,
|
-11600, -11797, -11995, -12193, -12390, -12588, -12785, -12982, -13179, -13376,
|
||||||
-13573, -13769, -13966, -14162, -14359, -14555, -14751, -14946, -15142, -15338,
|
-13573, -13769, -13966, -14162, -14359, -14555, -14751, -14946, -15142, -15338,
|
||||||
-15533, -15728, -15923, -16118, -16313, -16508, -16702, -16897, -17091, -17285,
|
-15533, -15728, -15923, -16118, -16313, -16508, -16702, -16897, -17091, -17285,
|
||||||
-17479, -17672, -17866, -18059, -18253, -18446, -18638, -18831, -19024, -19216,
|
-17479, -17672, -17866, -18059, -18253, -18446, -18638, -18831, -19024, -19216,
|
||||||
-19408, -19600, -19792, -19983, -20175, -20366, -20557, -20748, -20938, -21129,
|
-19408, -19600, -19792, -19983, -20175, -20366, -20557, -20748, -20938, -21129,
|
||||||
-21319, -21509, -21699, -21889, -22078, -22267, -22456, -22645, -22833, -23022,
|
-21319, -21509, -21699, -21889, -22078, -22267, -22456, -22645, -22833, -23022,
|
||||||
-23210, -23398, -23586, -23773, -23960, -24147, -24334, -24521, -24707, -24893,
|
-23210, -23398, -23586, -23773, -23960, -24147, -24334, -24521, -24707, -24893,
|
||||||
-25079, -25265, -25450, -25635, -25820, -26005, -26189, -26373, -26557, -26741,
|
-25079, -25265, -25450, -25635, -25820, -26005, -26189, -26373, -26557, -26741,
|
||||||
-26925, -27108, -27291, -27473, -27656, -27838, -28020, -28201, -28383, -28564,
|
-26925, -27108, -27291, -27473, -27656, -27838, -28020, -28201, -28383, -28564,
|
||||||
-28745, -28925, -29105, -29285, -29465, -29645, -29824, -30003, -30181, -30360,
|
-28745, -28925, -29105, -29285, -29465, -29645, -29824, -30003, -30181, -30360,
|
||||||
-30538, -30715, -30893, -31070, -31247, -31424, -31600, -31776, -31952, -32127,
|
-30538, -30715, -30893, -31070, -31247, -31424, -31600, -31776, -31952, -32127,
|
||||||
-32302, -32477, -32651, -32826, -32999, -33173, -33346, -33519, -33692, -33864,
|
-32302, -32477, -32651, -32826, -32999, -33173, -33346, -33519, -33692, -33864,
|
||||||
-34036, -34208, -34379, -34550, -34721, -34891, -35061, -35231, -35400, -35569,
|
-34036, -34208, -34379, -34550, -34721, -34891, -35061, -35231, -35400, -35569,
|
||||||
-35738, -35906, -36074, -36242, -36409, -36576, -36743, -36909, -37075, -37241,
|
-35738, -35906, -36074, -36242, -36409, -36576, -36743, -36909, -37075, -37241,
|
||||||
-37406, -37571, -37736, -37900, -38064, -38227, -38390, -38553, -38716, -38878,
|
-37406, -37571, -37736, -37900, -38064, -38227, -38390, -38553, -38716, -38878,
|
||||||
-39039, -39201, -39362, -39522, -39682, -39842, -40002, -40161, -40319, -40478,
|
-39039, -39201, -39362, -39522, -39682, -39842, -40002, -40161, -40319, -40478,
|
||||||
-40636, -40793, -40950, -41107, -41263, -41419, -41575, -41730, -41885, -42040,
|
-40636, -40793, -40950, -41107, -41263, -41419, -41575, -41730, -41885, -42040,
|
||||||
-42194, -42347, -42501, -42653, -42806, -42958, -43110, -43261, -43412, -43562,
|
-42194, -42347, -42501, -42653, -42806, -42958, -43110, -43261, -43412, -43562,
|
||||||
-43712, -43862, -44011, -44160, -44308, -44456, -44603, -44750, -44897, -45043,
|
-43712, -43862, -44011, -44160, -44308, -44456, -44603, -44750, -44897, -45043,
|
||||||
-45189, -45335, -45480, -45624, -45768, -45912, -46055, -46198, -46340, -46482,
|
-45189, -45335, -45480, -45624, -45768, -45912, -46055, -46198, -46340, -46482,
|
||||||
-46624, -46765, -46906, -47046, -47186, -47325, -47464, -47602, -47740, -47878,
|
-46624, -46765, -46906, -47046, -47186, -47325, -47464, -47602, -47740, -47878,
|
||||||
-48015, -48151, -48288, -48423, -48558, -48693, -48828, -48961, -49095, -49228,
|
-48015, -48151, -48288, -48423, -48558, -48693, -48828, -48961, -49095, -49228,
|
||||||
-49360, -49492, -49624, -49755, -49886, -50016, -50146, -50275, -50403, -50532,
|
-49360, -49492, -49624, -49755, -49886, -50016, -50146, -50275, -50403, -50532,
|
||||||
-50660, -50787, -50914, -51040, -51166, -51291, -51416, -51541, -51665, -51788,
|
-50660, -50787, -50914, -51040, -51166, -51291, -51416, -51541, -51665, -51788,
|
||||||
-51911, -52033, -52155, -52277, -52398, -52518, -52639, -52758, -52877, -52996,
|
-51911, -52033, -52155, -52277, -52398, -52518, -52639, -52758, -52877, -52996,
|
||||||
-53114, -53231, -53348, -53465, -53581, -53696, -53811, -53926, -54040, -54153,
|
-53114, -53231, -53348, -53465, -53581, -53696, -53811, -53926, -54040, -54153,
|
||||||
-54266, -54379, -54491, -54602, -54713, -54823, -54933, -55043, -55152, -55260,
|
-54266, -54379, -54491, -54602, -54713, -54823, -54933, -55043, -55152, -55260,
|
||||||
-55368, -55475, -55582, -55688, -55794, -55899, -56004, -56108, -56212, -56315,
|
-55368, -55475, -55582, -55688, -55794, -55899, -56004, -56108, -56212, -56315,
|
||||||
-56417, -56519, -56621, -56722, -56822, -56922, -57022, -57120, -57219, -57316,
|
-56417, -56519, -56621, -56722, -56822, -56922, -57022, -57120, -57219, -57316,
|
||||||
-57414, -57510, -57606, -57702, -57797, -57892, -57986, -58079, -58172, -58264,
|
-57414, -57510, -57606, -57702, -57797, -57892, -57986, -58079, -58172, -58264,
|
||||||
-58356, -58447, -58538, -58628, -58718, -58807, -58895, -58983, -59070, -59157,
|
-58356, -58447, -58538, -58628, -58718, -58807, -58895, -58983, -59070, -59157,
|
||||||
-59243, -59329, -59414, -59499, -59583, -59666, -59749, -59831, -59913, -59994,
|
-59243, -59329, -59414, -59499, -59583, -59666, -59749, -59831, -59913, -59994,
|
||||||
-60075, -60155, -60235, -60313, -60392, -60470, -60547, -60624, -60700, -60775,
|
-60075, -60155, -60235, -60313, -60392, -60470, -60547, -60624, -60700, -60775,
|
||||||
-60850, -60924, -60998, -61071, -61144, -61216, -61288, -61359, -61429, -61499,
|
-60850, -60924, -60998, -61071, -61144, -61216, -61288, -61359, -61429, -61499,
|
||||||
-61568, -61637, -61705, -61772, -61839, -61905, -61971, -62036, -62100, -62164,
|
-61568, -61637, -61705, -61772, -61839, -61905, -61971, -62036, -62100, -62164,
|
||||||
-62228, -62291, -62353, -62414, -62475, -62536, -62596, -62655, -62714, -62772,
|
-62228, -62291, -62353, -62414, -62475, -62536, -62596, -62655, -62714, -62772,
|
||||||
-62829, -62886, -62942, -62998, -63053, -63108, -63162, -63215, -63268, -63320,
|
-62829, -62886, -62942, -62998, -63053, -63108, -63162, -63215, -63268, -63320,
|
||||||
-63371, -63422, -63473, -63522, -63571, -63620, -63668, -63715, -63762, -63808,
|
-63371, -63422, -63473, -63522, -63571, -63620, -63668, -63715, -63762, -63808,
|
||||||
-63854, -63899, -63943, -63987, -64030, -64073, -64115, -64156, -64197, -64237,
|
-63854, -63899, -63943, -63987, -64030, -64073, -64115, -64156, -64197, -64237,
|
||||||
-64276, -64315, -64353, -64391, -64428, -64465, -64501, -64536, -64571, -64605,
|
-64276, -64315, -64353, -64391, -64428, -64465, -64501, -64536, -64571, -64605,
|
||||||
-64638, -64671, -64703, -64735, -64766, -64796, -64826, -64855, -64884, -64912,
|
-64638, -64671, -64703, -64735, -64766, -64796, -64826, -64855, -64884, -64912,
|
||||||
-64939, -64966, -64992, -65018, -65043, -65067, -65091, -65114, -65136, -65158,
|
-64939, -64966, -64992, -65018, -65043, -65067, -65091, -65114, -65136, -65158,
|
||||||
-65179, -65200, -65220, -65239, -65258, -65276, -65294, -65311, -65327, -65343,
|
-65179, -65200, -65220, -65239, -65258, -65276, -65294, -65311, -65327, -65343,
|
||||||
-65358, -65372, -65386, -65400, -65412, -65424, -65436, -65446, -65457, -65466,
|
-65358, -65372, -65386, -65400, -65412, -65424, -65436, -65446, -65457, -65466,
|
||||||
-65475, -65483, -65491, -65498, -65505, -65511, -65516, -65520, -65524, -65528,
|
-65475, -65483, -65491, -65498, -65505, -65511, -65516, -65520, -65524, -65528,
|
||||||
-65531, -65533, -65534, -65535, -65536, -65535, -65534, -65533, -65531, -65528,
|
-65531, -65533, -65534, -65535, -65536, -65535, -65534, -65533, -65531, -65528,
|
||||||
-65524, -65520, -65516, -65511, -65505, -65498, -65491, -65483, -65475, -65466,
|
-65524, -65520, -65516, -65511, -65505, -65498, -65491, -65483, -65475, -65466,
|
||||||
-65457, -65446, -65436, -65424, -65412, -65400, -65386, -65372, -65358, -65343,
|
-65457, -65446, -65436, -65424, -65412, -65400, -65386, -65372, -65358, -65343,
|
||||||
-65327, -65311, -65294, -65276, -65258, -65239, -65220, -65200, -65179, -65158,
|
-65327, -65311, -65294, -65276, -65258, -65239, -65220, -65200, -65179, -65158,
|
||||||
-65136, -65114, -65091, -65067, -65043, -65018, -64992, -64966, -64939, -64912,
|
-65136, -65114, -65091, -65067, -65043, -65018, -64992, -64966, -64939, -64912,
|
||||||
-64884, -64855, -64826, -64796, -64766, -64735, -64703, -64671, -64638, -64605,
|
-64884, -64855, -64826, -64796, -64766, -64735, -64703, -64671, -64638, -64605,
|
||||||
-64571, -64536, -64501, -64465, -64428, -64391, -64353, -64315, -64276, -64237,
|
-64571, -64536, -64501, -64465, -64428, -64391, -64353, -64315, -64276, -64237,
|
||||||
-64197, -64156, -64115, -64073, -64030, -63987, -63943, -63899, -63854, -63808,
|
-64197, -64156, -64115, -64073, -64030, -63987, -63943, -63899, -63854, -63808,
|
||||||
-63762, -63715, -63668, -63620, -63571, -63522, -63473, -63422, -63371, -63320,
|
-63762, -63715, -63668, -63620, -63571, -63522, -63473, -63422, -63371, -63320,
|
||||||
-63268, -63215, -63162, -63108, -63053, -62998, -62942, -62886, -62829, -62772,
|
-63268, -63215, -63162, -63108, -63053, -62998, -62942, -62886, -62829, -62772,
|
||||||
-62714, -62655, -62596, -62536, -62475, -62414, -62353, -62291, -62228, -62164,
|
-62714, -62655, -62596, -62536, -62475, -62414, -62353, -62291, -62228, -62164,
|
||||||
-62100, -62036, -61971, -61905, -61839, -61772, -61705, -61637, -61568, -61499,
|
-62100, -62036, -61971, -61905, -61839, -61772, -61705, -61637, -61568, -61499,
|
||||||
-61429, -61359, -61288, -61216, -61144, -61071, -60998, -60924, -60850, -60775,
|
-61429, -61359, -61288, -61216, -61144, -61071, -60998, -60924, -60850, -60775,
|
||||||
-60700, -60624, -60547, -60470, -60392, -60313, -60235, -60155, -60075, -59994,
|
-60700, -60624, -60547, -60470, -60392, -60313, -60235, -60155, -60075, -59994,
|
||||||
-59913, -59831, -59749, -59666, -59583, -59499, -59414, -59329, -59243, -59157,
|
-59913, -59831, -59749, -59666, -59583, -59499, -59414, -59329, -59243, -59157,
|
||||||
-59070, -58983, -58895, -58807, -58718, -58628, -58538, -58447, -58356, -58264,
|
-59070, -58983, -58895, -58807, -58718, -58628, -58538, -58447, -58356, -58264,
|
||||||
-58172, -58079, -57986, -57892, -57797, -57702, -57606, -57510, -57414, -57316,
|
-58172, -58079, -57986, -57892, -57797, -57702, -57606, -57510, -57414, -57316,
|
||||||
-57219, -57120, -57022, -56922, -56822, -56722, -56621, -56519, -56417, -56315,
|
-57219, -57120, -57022, -56922, -56822, -56722, -56621, -56519, -56417, -56315,
|
||||||
-56212, -56108, -56004, -55899, -55794, -55688, -55582, -55475, -55368, -55260,
|
-56212, -56108, -56004, -55899, -55794, -55688, -55582, -55475, -55368, -55260,
|
||||||
-55152, -55043, -54933, -54823, -54713, -54602, -54491, -54379, -54266, -54153,
|
-55152, -55043, -54933, -54823, -54713, -54602, -54491, -54379, -54266, -54153,
|
||||||
-54040, -53926, -53811, -53696, -53581, -53465, -53348, -53231, -53114, -52996,
|
-54040, -53926, -53811, -53696, -53581, -53465, -53348, -53231, -53114, -52996,
|
||||||
-52877, -52758, -52639, -52518, -52398, -52277, -52155, -52033, -51911, -51788,
|
-52877, -52758, -52639, -52518, -52398, -52277, -52155, -52033, -51911, -51788,
|
||||||
-51665, -51541, -51416, -51291, -51166, -51040, -50914, -50787, -50660, -50532,
|
-51665, -51541, -51416, -51291, -51166, -51040, -50914, -50787, -50660, -50532,
|
||||||
-50403, -50275, -50146, -50016, -49886, -49755, -49624, -49492, -49360, -49228,
|
-50403, -50275, -50146, -50016, -49886, -49755, -49624, -49492, -49360, -49228,
|
||||||
-49095, -48961, -48828, -48693, -48558, -48423, -48288, -48151, -48015, -47878,
|
-49095, -48961, -48828, -48693, -48558, -48423, -48288, -48151, -48015, -47878,
|
||||||
-47740, -47602, -47464, -47325, -47186, -47046, -46906, -46765, -46624, -46482,
|
-47740, -47602, -47464, -47325, -47186, -47046, -46906, -46765, -46624, -46482,
|
||||||
-46340, -46198, -46055, -45912, -45768, -45624, -45480, -45335, -45189, -45043,
|
-46340, -46198, -46055, -45912, -45768, -45624, -45480, -45335, -45189, -45043,
|
||||||
-44897, -44750, -44603, -44456, -44308, -44160, -44011, -43862, -43712, -43562,
|
-44897, -44750, -44603, -44456, -44308, -44160, -44011, -43862, -43712, -43562,
|
||||||
-43412, -43261, -43110, -42958, -42806, -42653, -42501, -42347, -42194, -42040,
|
-43412, -43261, -43110, -42958, -42806, -42653, -42501, -42347, -42194, -42040,
|
||||||
-41885, -41730, -41575, -41419, -41263, -41107, -40950, -40793, -40636, -40478,
|
-41885, -41730, -41575, -41419, -41263, -41107, -40950, -40793, -40636, -40478,
|
||||||
-40319, -40161, -40002, -39842, -39682, -39522, -39362, -39201, -39039, -38878,
|
-40319, -40161, -40002, -39842, -39682, -39522, -39362, -39201, -39039, -38878,
|
||||||
-38716, -38553, -38390, -38227, -38064, -37900, -37736, -37571, -37406, -37241,
|
-38716, -38553, -38390, -38227, -38064, -37900, -37736, -37571, -37406, -37241,
|
||||||
-37075, -36909, -36743, -36576, -36409, -36242, -36074, -35906, -35738, -35569,
|
-37075, -36909, -36743, -36576, -36409, -36242, -36074, -35906, -35738, -35569,
|
||||||
-35400, -35231, -35061, -34891, -34721, -34550, -34379, -34208, -34036, -33864,
|
-35400, -35231, -35061, -34891, -34721, -34550, -34379, -34208, -34036, -33864,
|
||||||
-33692, -33519, -33346, -33173, -32999, -32826, -32651, -32477, -32302, -32127,
|
-33692, -33519, -33346, -33173, -32999, -32826, -32651, -32477, -32302, -32127,
|
||||||
-31952, -31776, -31600, -31424, -31247, -31070, -30893, -30715, -30538, -30360,
|
-31952, -31776, -31600, -31424, -31247, -31070, -30893, -30715, -30538, -30360,
|
||||||
-30181, -30003, -29824, -29645, -29465, -29285, -29105, -28925, -28745, -28564,
|
-30181, -30003, -29824, -29645, -29465, -29285, -29105, -28925, -28745, -28564,
|
||||||
-28383, -28201, -28020, -27838, -27656, -27473, -27291, -27108, -26925, -26741,
|
-28383, -28201, -28020, -27838, -27656, -27473, -27291, -27108, -26925, -26741,
|
||||||
-26557, -26373, -26189, -26005, -25820, -25635, -25450, -25265, -25079, -24893,
|
-26557, -26373, -26189, -26005, -25820, -25635, -25450, -25265, -25079, -24893,
|
||||||
-24707, -24521, -24334, -24147, -23960, -23773, -23586, -23398, -23210, -23022,
|
-24707, -24521, -24334, -24147, -23960, -23773, -23586, -23398, -23210, -23022,
|
||||||
-22833, -22645, -22456, -22267, -22078, -21889, -21699, -21509, -21319, -21129,
|
-22833, -22645, -22456, -22267, -22078, -21889, -21699, -21509, -21319, -21129,
|
||||||
-20938, -20748, -20557, -20366, -20175, -19983, -19792, -19600, -19408, -19216,
|
-20938, -20748, -20557, -20366, -20175, -19983, -19792, -19600, -19408, -19216,
|
||||||
-19024, -18831, -18638, -18446, -18253, -18059, -17866, -17672, -17479, -17285,
|
-19024, -18831, -18638, -18446, -18253, -18059, -17866, -17672, -17479, -17285,
|
||||||
-17091, -16897, -16702, -16508, -16313, -16118, -15923, -15728, -15533, -15338,
|
-17091, -16897, -16702, -16508, -16313, -16118, -15923, -15728, -15533, -15338,
|
||||||
-15142, -14946, -14751, -14555, -14359, -14162, -13966, -13769, -13573, -13376,
|
-15142, -14946, -14751, -14555, -14359, -14162, -13966, -13769, -13573, -13376,
|
||||||
-13179, -12982, -12785, -12588, -12390, -12193, -11995, -11797, -11600, -11402,
|
-13179, -12982, -12785, -12588, -12390, -12193, -11995, -11797, -11600, -11402,
|
||||||
-11204, -11006, -10807, -10609, -10410, -10212, -10013, -9814, -9616, -9417,
|
-11204, -11006, -10807, -10609, -10410, -10212, -10013, -9814, -9616, -9417,
|
||||||
-9218, -9019, -8819, -8620, -8421, -8221, -8022, -7822, -7623, -7423, -7223,
|
-9218, -9019, -8819, -8620, -8421, -8221, -8022, -7822, -7623, -7423, -7223,
|
||||||
-7023, -6823, -6623, -6423, -6223, -6023, -5823, -5622, -5422, -5222, -5021,
|
-7023, -6823, -6623, -6423, -6223, -6023, -5823, -5622, -5422, -5222, -5021,
|
||||||
-4821, -4620, -4420, -4219, -4018, -3818, -3617, -3416, -3215, -3014, -2814,
|
-4821, -4620, -4420, -4219, -4018, -3818, -3617, -3416, -3215, -3014, -2814,
|
||||||
-2613, -2412, -2211, -2010, -1809, -1608, -1407, -1206, -1005, -804, -603, -402,
|
-2613, -2412, -2211, -2010, -1809, -1608, -1407, -1206, -1005, -804, -603, -402,
|
||||||
-201, 0, 201, 402, 603, 804, 1005, 1206, 1407, 1608, 1809, 2010, 2211, 2412,
|
-201, 0, 201, 402, 603, 804, 1005, 1206, 1407, 1608, 1809, 2010, 2211, 2412,
|
||||||
2613, 2814, 3014, 3215, 3416, 3617, 3818, 4018, 4219, 4420, 4620, 4821, 5021,
|
2613, 2814, 3014, 3215, 3416, 3617, 3818, 4018, 4219, 4420, 4620, 4821, 5021,
|
||||||
5222, 5422, 5622, 5823, 6023, 6223, 6423, 6623, 6823, 7023, 7223, 7423, 7623,
|
5222, 5422, 5622, 5823, 6023, 6223, 6423, 6623, 6823, 7023, 7223, 7423, 7623,
|
||||||
7822, 8022, 8221, 8421, 8620, 8819, 9019, 9218, 9417, 9616, 9814, 10013, 10212,
|
7822, 8022, 8221, 8421, 8620, 8819, 9019, 9218, 9417, 9616, 9814, 10013, 10212,
|
||||||
10410, 10609, 10807, 11006, 11204, 11402, 11600, 11797, 11995, 12193, 12390,
|
10410, 10609, 10807, 11006, 11204, 11402, 11600, 11797, 11995, 12193, 12390,
|
||||||
12588, 12785, 12982, 13179, 13376, 13573, 13769, 13966, 14162, 14359, 14555,
|
12588, 12785, 12982, 13179, 13376, 13573, 13769, 13966, 14162, 14359, 14555,
|
||||||
14751, 14946, 15142, 15338, 15533, 15728, 15923, 16118, 16313, 16508, 16702,
|
14751, 14946, 15142, 15338, 15533, 15728, 15923, 16118, 16313, 16508, 16702,
|
||||||
16897, 17091, 17285, 17479, 17672, 17866, 18059, 18253, 18446, 18638, 18831,
|
16897, 17091, 17285, 17479, 17672, 17866, 18059, 18253, 18446, 18638, 18831,
|
||||||
19024, 19216, 19408, 19600, 19792, 19983, 20175, 20366, 20557, 20748, 20938,
|
19024, 19216, 19408, 19600, 19792, 19983, 20175, 20366, 20557, 20748, 20938,
|
||||||
21129, 21319, 21509, 21699, 21889, 22078, 22267, 22456, 22645, 22833, 23022,
|
21129, 21319, 21509, 21699, 21889, 22078, 22267, 22456, 22645, 22833, 23022,
|
||||||
23210, 23398, 23586, 23773, 23960, 24147, 24334, 24521, 24707, 24893, 25079,
|
23210, 23398, 23586, 23773, 23960, 24147, 24334, 24521, 24707, 24893, 25079,
|
||||||
25265, 25450, 25635, 25820, 26005, 26189, 26373, 26557, 26741, 26925, 27108,
|
25265, 25450, 25635, 25820, 26005, 26189, 26373, 26557, 26741, 26925, 27108,
|
||||||
27291, 27473, 27656, 27838, 28020, 28201, 28383, 28564, 28745, 28925, 29105,
|
27291, 27473, 27656, 27838, 28020, 28201, 28383, 28564, 28745, 28925, 29105,
|
||||||
29285, 29465, 29645, 29824, 30003, 30181, 30360, 30538, 30715, 30893, 31070,
|
29285, 29465, 29645, 29824, 30003, 30181, 30360, 30538, 30715, 30893, 31070,
|
||||||
31247, 31424, 31600, 31776, 31952, 32127, 32302, 32477, 32651, 32826, 32999,
|
31247, 31424, 31600, 31776, 31952, 32127, 32302, 32477, 32651, 32826, 32999,
|
||||||
33173, 33346, 33519, 33692, 33864, 34036, 34208, 34379, 34550, 34721, 34891,
|
33173, 33346, 33519, 33692, 33864, 34036, 34208, 34379, 34550, 34721, 34891,
|
||||||
35061, 35231, 35400, 35569, 35738, 35906, 36074, 36242, 36409, 36576, 36743,
|
35061, 35231, 35400, 35569, 35738, 35906, 36074, 36242, 36409, 36576, 36743,
|
||||||
36909, 37075, 37241, 37406, 37571, 37736, 37900, 38064, 38227, 38390, 38553,
|
36909, 37075, 37241, 37406, 37571, 37736, 37900, 38064, 38227, 38390, 38553,
|
||||||
38716, 38878, 39039, 39201, 39362, 39522, 39682, 39842, 40002, 40161, 40319,
|
38716, 38878, 39039, 39201, 39362, 39522, 39682, 39842, 40002, 40161, 40319,
|
||||||
40478, 40636, 40793, 40950, 41107, 41263, 41419, 41575, 41730, 41885, 42040,
|
40478, 40636, 40793, 40950, 41107, 41263, 41419, 41575, 41730, 41885, 42040,
|
||||||
42194, 42347, 42501, 42653, 42806, 42958, 43110, 43261, 43412, 43562, 43712,
|
42194, 42347, 42501, 42653, 42806, 42958, 43110, 43261, 43412, 43562, 43712,
|
||||||
43862, 44011, 44160, 44308, 44456, 44603, 44750, 44897, 45043, 45189, 45335,
|
43862, 44011, 44160, 44308, 44456, 44603, 44750, 44897, 45043, 45189, 45335,
|
||||||
45480, 45624, 45768, 45912, 46055, 46198, 46340, 46482, 46624, 46765, 46906,
|
45480, 45624, 45768, 45912, 46055, 46198, 46340, 46482, 46624, 46765, 46906,
|
||||||
47046, 47186, 47325, 47464, 47602, 47740, 47878, 48015, 48151, 48288, 48423,
|
47046, 47186, 47325, 47464, 47602, 47740, 47878, 48015, 48151, 48288, 48423,
|
||||||
48558, 48693, 48828, 48961, 49095, 49228, 49360, 49492, 49624, 49755, 49886,
|
48558, 48693, 48828, 48961, 49095, 49228, 49360, 49492, 49624, 49755, 49886,
|
||||||
50016, 50146, 50275, 50403, 50532, 50660, 50787, 50914, 51040, 51166, 51291,
|
50016, 50146, 50275, 50403, 50532, 50660, 50787, 50914, 51040, 51166, 51291,
|
||||||
51416, 51541, 51665, 51788, 51911, 52033, 52155, 52277, 52398, 52518, 52639,
|
51416, 51541, 51665, 51788, 51911, 52033, 52155, 52277, 52398, 52518, 52639,
|
||||||
52758, 52877, 52996, 53114, 53231, 53348, 53465, 53581, 53696, 53811, 53926,
|
52758, 52877, 52996, 53114, 53231, 53348, 53465, 53581, 53696, 53811, 53926,
|
||||||
54040, 54153, 54266, 54379, 54491, 54602, 54713, 54823, 54933, 55043, 55152,
|
54040, 54153, 54266, 54379, 54491, 54602, 54713, 54823, 54933, 55043, 55152,
|
||||||
55260, 55368, 55475, 55582, 55688, 55794, 55899, 56004, 56108, 56212, 56315,
|
55260, 55368, 55475, 55582, 55688, 55794, 55899, 56004, 56108, 56212, 56315,
|
||||||
56417, 56519, 56621, 56722, 56822, 56922, 57022, 57120, 57219, 57316, 57414,
|
56417, 56519, 56621, 56722, 56822, 56922, 57022, 57120, 57219, 57316, 57414,
|
||||||
57510, 57606, 57702, 57797, 57892, 57986, 58079, 58172, 58264, 58356, 58447,
|
57510, 57606, 57702, 57797, 57892, 57986, 58079, 58172, 58264, 58356, 58447,
|
||||||
58538, 58628, 58718, 58807, 58895, 58983, 59070, 59157, 59243, 59329, 59414,
|
58538, 58628, 58718, 58807, 58895, 58983, 59070, 59157, 59243, 59329, 59414,
|
||||||
59499, 59583, 59666, 59749, 59831, 59913, 59994, 60075, 60155, 60235, 60313,
|
59499, 59583, 59666, 59749, 59831, 59913, 59994, 60075, 60155, 60235, 60313,
|
||||||
60392, 60470, 60547, 60624, 60700, 60775, 60850, 60924, 60998, 61071, 61144,
|
60392, 60470, 60547, 60624, 60700, 60775, 60850, 60924, 60998, 61071, 61144,
|
||||||
61216, 61288, 61359, 61429, 61499, 61568, 61637, 61705, 61772, 61839, 61905,
|
61216, 61288, 61359, 61429, 61499, 61568, 61637, 61705, 61772, 61839, 61905,
|
||||||
61971, 62036, 62100, 62164, 62228, 62291, 62353, 62414, 62475, 62536, 62596,
|
61971, 62036, 62100, 62164, 62228, 62291, 62353, 62414, 62475, 62536, 62596,
|
||||||
62655, 62714, 62772, 62829, 62886, 62942, 62998, 63053, 63108, 63162, 63215,
|
62655, 62714, 62772, 62829, 62886, 62942, 62998, 63053, 63108, 63162, 63215,
|
||||||
63268, 63320, 63371, 63422, 63473, 63522, 63571, 63620, 63668, 63715, 63762,
|
63268, 63320, 63371, 63422, 63473, 63522, 63571, 63620, 63668, 63715, 63762,
|
||||||
63808, 63854, 63899, 63943, 63987, 64030, 64073, 64115, 64156, 64197, 64237,
|
63808, 63854, 63899, 63943, 63987, 64030, 64073, 64115, 64156, 64197, 64237,
|
||||||
64276, 64315, 64353, 64391, 64428, 64465, 64501, 64536, 64571, 64605, 64638,
|
64276, 64315, 64353, 64391, 64428, 64465, 64501, 64536, 64571, 64605, 64638,
|
||||||
64671, 64703, 64735, 64766, 64796, 64826, 64855, 64884, 64912, 64939, 64966,
|
64671, 64703, 64735, 64766, 64796, 64826, 64855, 64884, 64912, 64939, 64966,
|
||||||
64992, 65018, 65043, 65067, 65091, 65114, 65136, 65158, 65179, 65200, 65220,
|
64992, 65018, 65043, 65067, 65091, 65114, 65136, 65158, 65179, 65200, 65220,
|
||||||
65239, 65258, 65276, 65294, 65311, 65327, 65343, 65358, 65372, 65386, 65400,
|
65239, 65258, 65276, 65294, 65311, 65327, 65343, 65358, 65372, 65386, 65400,
|
||||||
65412, 65424, 65436, 65446, 65457, 65466, 65475, 65483, 65491, 65498, 65505,
|
65412, 65424, 65436, 65446, 65457, 65466, 65475, 65483, 65491, 65498, 65505,
|
||||||
65511, 65516, 65520, 65524, 65528, 65531, 65533, 65534, 65535
|
65511, 65516, 65520, 65524, 65528, 65531, 65533, 65534, 65535
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,24 @@
|
|||||||
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
//
|
//
|
||||||
//This program is free software; you can redistribute it and/or
|
//This program is free software; you can redistribute it and/or
|
||||||
//modify it under the terms of the GNU General Public License
|
//modify it under the terms of the GNU General Public License
|
||||||
//as published by the Free Software Foundation; either
|
//as published by the Free Software Foundation; either
|
||||||
//version 2 of the License, or (at your option) any later
|
//version 2 of the License, or (at your option) any later
|
||||||
//version.
|
//version.
|
||||||
//
|
//
|
||||||
//This program is distributed in the hope that it will be useful,
|
//This program is distributed in the hope that it will be useful,
|
||||||
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//GNU General Public License for more details.
|
//GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
//You should have received a copy of the GNU General Public License
|
//You should have received a copy of the GNU General Public License
|
||||||
//along with this program; if not, write to the Free Software
|
//along with this program; if not, write to the Free Software
|
||||||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
extern int FSinTab[2048];
|
extern int FSinTab[2048];
|
||||||
extern int FCosTab[2048];
|
extern int FCosTab[2048];
|
||||||
#define FSINMAX 2047
|
#define FSINMAX 2047
|
||||||
#define FSin(x) FSinTab[(x)&FSINMAX]
|
#define FSin(x) FSinTab[(x)&FSINMAX]
|
||||||
#define FCos(x) FCosTab[(x)&FSINMAX]
|
#define FCos(x) FCosTab[(x)&FSINMAX]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,190 +1,189 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ComboClip:
|
ComboClip:
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,[GUINumCombo]
|
mov al,[GUINumCombo]
|
||||||
.next
|
.next
|
||||||
cmp al,42
|
cmp al,42
|
||||||
jae .excess
|
jae .excess
|
||||||
mov byte[GUIComboData+eax],0
|
mov byte[GUIComboData+eax],0
|
||||||
inc eax
|
inc eax
|
||||||
jmp .next
|
jmp .next
|
||||||
.excess
|
.excess
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ComboAdder:
|
ComboAdder:
|
||||||
cmp byte[romloadskip],0
|
cmp byte[romloadskip],0
|
||||||
je .romloaded
|
je .romloaded
|
||||||
cmp byte[GUIComboGameSpec],0
|
cmp byte[GUIComboGameSpec],0
|
||||||
jne near .skipall
|
jne near .skipall
|
||||||
.romloaded
|
.romloaded
|
||||||
pushad
|
pushad
|
||||||
call ComboClip
|
call ComboClip
|
||||||
mov eax,[NumCombo]
|
mov eax,[NumCombo]
|
||||||
shl eax,6
|
shl eax,6
|
||||||
add eax,[NumCombo]
|
add eax,[NumCombo]
|
||||||
add eax,[NumCombo]
|
add eax,[NumCombo]
|
||||||
add eax,CombinDataGlob
|
add eax,CombinDataGlob
|
||||||
cmp byte[GUIComboGameSpec],0
|
cmp byte[GUIComboGameSpec],0
|
||||||
je .nogamespec
|
je .nogamespec
|
||||||
sub eax,CombinDataGlob
|
sub eax,CombinDataGlob
|
||||||
add eax,CombinDataLocl
|
add eax,CombinDataLocl
|
||||||
.nogamespec
|
.nogamespec
|
||||||
; copy data to eax
|
; copy data to eax
|
||||||
mov ecx,20 ; copy name
|
mov ecx,20 ; copy name
|
||||||
mov ebx,GUIComboTextH
|
mov ebx,GUIComboTextH
|
||||||
.loop
|
.loop
|
||||||
mov dl,[ebx]
|
mov dl,[ebx]
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc ebx
|
inc ebx
|
||||||
inc eax
|
inc eax
|
||||||
loop .loop
|
loop .loop
|
||||||
mov ecx,42 ; copy combination code
|
mov ecx,42 ; copy combination code
|
||||||
mov ebx,GUIComboData
|
mov ebx,GUIComboData
|
||||||
.loop2
|
.loop2
|
||||||
mov dl,[ebx]
|
mov dl,[ebx]
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc ebx
|
inc ebx
|
||||||
inc eax
|
inc eax
|
||||||
loop .loop2
|
loop .loop2
|
||||||
mov dx,[GUIComboKey]
|
mov dx,[GUIComboKey]
|
||||||
mov [eax],dx
|
mov [eax],dx
|
||||||
mov dl,[GUIComboPNum]
|
mov dl,[GUIComboPNum]
|
||||||
mov [eax+2],dl
|
mov [eax+2],dl
|
||||||
mov dl,[GUIComboLHorz]
|
mov dl,[GUIComboLHorz]
|
||||||
mov [eax+3],dl
|
mov [eax+3],dl
|
||||||
mov eax,[NumCombo]
|
mov eax,[NumCombo]
|
||||||
mov [GUIccombcursloc],eax
|
mov [GUIccombcursloc],eax
|
||||||
sub eax,7
|
sub eax,7
|
||||||
cmp [GUIccombviewloc],eax
|
cmp [GUIccombviewloc],eax
|
||||||
jge .rangeokay
|
jge .rangeokay
|
||||||
mov [GUIccombviewloc],eax
|
mov [GUIccombviewloc],eax
|
||||||
.rangeokay
|
.rangeokay
|
||||||
inc dword[NumCombo]
|
inc dword[NumCombo]
|
||||||
mov eax,[NumCombo]
|
mov eax,[NumCombo]
|
||||||
cmp byte[GUIComboGameSpec],0
|
cmp byte[GUIComboGameSpec],0
|
||||||
jne .local
|
jne .local
|
||||||
mov [NumComboGlob],eax
|
mov [NumComboGlob],eax
|
||||||
jmp .global
|
jmp .global
|
||||||
.local
|
.local
|
||||||
mov [NumComboLocl],eax
|
mov [NumComboLocl],eax
|
||||||
.global
|
.global
|
||||||
popad
|
popad
|
||||||
mov byte[GUIComboTextH],0
|
mov byte[GUIComboTextH],0
|
||||||
mov byte[GUINumCombo],0
|
mov byte[GUINumCombo],0
|
||||||
mov dword[GUIComboKey],0
|
mov dword[GUIComboKey],0
|
||||||
.skipall
|
.skipall
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ComboReplace:
|
ComboReplace:
|
||||||
pushad
|
pushad
|
||||||
call ComboClip
|
call ComboClip
|
||||||
mov eax,[GUIccombcursloc]
|
mov eax,[GUIccombcursloc]
|
||||||
shl eax,6
|
shl eax,6
|
||||||
add eax,[GUIccombcursloc]
|
add eax,[GUIccombcursloc]
|
||||||
add eax,[GUIccombcursloc]
|
add eax,[GUIccombcursloc]
|
||||||
add eax,CombinDataGlob
|
add eax,CombinDataGlob
|
||||||
cmp byte[GUIComboGameSpec],0
|
cmp byte[GUIComboGameSpec],0
|
||||||
je .nogamespec
|
je .nogamespec
|
||||||
sub eax,CombinDataGlob
|
sub eax,CombinDataGlob
|
||||||
add eax,CombinDataLocl
|
add eax,CombinDataLocl
|
||||||
.nogamespec
|
.nogamespec
|
||||||
; copy data to eax
|
; copy data to eax
|
||||||
mov ecx,20 ; copy name
|
mov ecx,20 ; copy name
|
||||||
mov ebx,GUIComboTextH
|
mov ebx,GUIComboTextH
|
||||||
.loop
|
.loop
|
||||||
mov dl,[ebx]
|
mov dl,[ebx]
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc ebx
|
inc ebx
|
||||||
inc eax
|
inc eax
|
||||||
loop .loop
|
loop .loop
|
||||||
mov ecx,42 ; copy combination code
|
mov ecx,42 ; copy combination code
|
||||||
mov ebx,GUIComboData
|
mov ebx,GUIComboData
|
||||||
.loop2
|
.loop2
|
||||||
mov dl,[ebx]
|
mov dl,[ebx]
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc ebx
|
inc ebx
|
||||||
inc eax
|
inc eax
|
||||||
loop .loop2
|
loop .loop2
|
||||||
mov dx,[GUIComboKey]
|
mov dx,[GUIComboKey]
|
||||||
mov [eax],dx
|
mov [eax],dx
|
||||||
mov dl,[GUIComboPNum]
|
mov dl,[GUIComboPNum]
|
||||||
mov [eax+2],dl
|
mov [eax+2],dl
|
||||||
mov dl,[GUIComboLHorz]
|
mov dl,[GUIComboLHorz]
|
||||||
mov [eax+3],dl
|
mov [eax+3],dl
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ComboRemoval:
|
ComboRemoval:
|
||||||
pushad
|
pushad
|
||||||
mov eax,[GUIccombcursloc]
|
mov eax,[GUIccombcursloc]
|
||||||
shl eax,6
|
shl eax,6
|
||||||
add eax,[GUIccombcursloc]
|
add eax,[GUIccombcursloc]
|
||||||
add eax,[GUIccombcursloc]
|
add eax,[GUIccombcursloc]
|
||||||
add eax,CombinDataGlob
|
add eax,CombinDataGlob
|
||||||
cmp byte[GUIComboGameSpec],0
|
cmp byte[GUIComboGameSpec],0
|
||||||
je .nogamespec
|
je .nogamespec
|
||||||
sub eax,CombinDataGlob
|
sub eax,CombinDataGlob
|
||||||
add eax,CombinDataLocl
|
add eax,CombinDataLocl
|
||||||
.nogamespec
|
.nogamespec
|
||||||
mov ecx,[NumCombo]
|
mov ecx,[NumCombo]
|
||||||
sub ecx,[GUIccombcursloc]
|
sub ecx,[GUIccombcursloc]
|
||||||
dec ecx
|
dec ecx
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jle .nomove
|
jle .nomove
|
||||||
.loop2
|
.loop2
|
||||||
mov ebx,66
|
mov ebx,66
|
||||||
.loop
|
.loop
|
||||||
mov dl,[eax+66]
|
mov dl,[eax+66]
|
||||||
mov [eax],dl
|
mov [eax],dl
|
||||||
inc eax
|
inc eax
|
||||||
dec ebx
|
dec ebx
|
||||||
jnz .loop
|
jnz .loop
|
||||||
loop .loop2
|
loop .loop2
|
||||||
.nomove
|
.nomove
|
||||||
dec dword[NumCombo]
|
dec dword[NumCombo]
|
||||||
mov eax,[NumCombo]
|
mov eax,[NumCombo]
|
||||||
or eax,eax
|
or eax,eax
|
||||||
jz .yeszero
|
jz .yeszero
|
||||||
dec eax
|
dec eax
|
||||||
.yeszero
|
.yeszero
|
||||||
cmp [GUIccombviewloc],eax
|
cmp [GUIccombviewloc],eax
|
||||||
jbe .notequal
|
jbe .notequal
|
||||||
mov [GUIccombviewloc],eax
|
mov [GUIccombviewloc],eax
|
||||||
.notequal
|
.notequal
|
||||||
cmp [GUIccombcursloc],eax
|
cmp [GUIccombcursloc],eax
|
||||||
jbe .notequal2
|
jbe .notequal2
|
||||||
mov [GUIccombcursloc],eax
|
mov [GUIccombcursloc],eax
|
||||||
.notequal2
|
.notequal2
|
||||||
mov eax,[NumCombo]
|
mov eax,[NumCombo]
|
||||||
cmp byte[GUIComboGameSpec],0
|
cmp byte[GUIComboGameSpec],0
|
||||||
jne .local
|
jne .local
|
||||||
mov [NumComboGlob],eax
|
mov [NumComboGlob],eax
|
||||||
jmp .global
|
jmp .global
|
||||||
.local
|
.local
|
||||||
mov [NumComboLocl],eax
|
mov [NumComboLocl],eax
|
||||||
.global
|
.global
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,499 +1,498 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Movie, Joystick setting (display) routines, SNES Reset Function
|
; Movie, Joystick setting (display) routines, SNES Reset Function
|
||||||
|
|
||||||
MovieRecord:
|
MovieRecord:
|
||||||
mov byte[GUICBHold],0
|
mov byte[GUICBHold],0
|
||||||
mov dword[MovieCounter],0
|
mov dword[MovieCounter],0
|
||||||
cmp byte[MovieProcessing],0
|
cmp byte[MovieProcessing],0
|
||||||
jne near .dontrecord
|
jne near .dontrecord
|
||||||
; check if movie exists already
|
; check if movie exists already
|
||||||
mov ebx,[statefileloc]
|
mov ebx,[statefileloc]
|
||||||
mov eax,[fnamest+ebx-3]
|
mov eax,[fnamest+ebx-3]
|
||||||
push eax
|
push eax
|
||||||
mov dword[fnamest+ebx-3],'.ZMV'
|
mov dword[fnamest+ebx-3],'.ZMV'
|
||||||
mov al,[CMovieExt]
|
mov al,[CMovieExt]
|
||||||
mov byte[fnamest+ebx],al
|
mov byte[fnamest+ebx],al
|
||||||
|
|
||||||
; check if file exists
|
; check if file exists
|
||||||
cmp byte[MovieRecordWinVal],1
|
cmp byte[MovieRecordWinVal],1
|
||||||
je .nocheck
|
je .nocheck
|
||||||
mov edx,fnamest+1
|
mov edx,fnamest+1
|
||||||
call Open_File
|
call Open_File
|
||||||
jc .nocheck
|
jc .nocheck
|
||||||
mov bx,ax
|
mov bx,ax
|
||||||
call Close_File
|
call Close_File
|
||||||
mov byte[MovieRecordWinVal],1
|
mov byte[MovieRecordWinVal],1
|
||||||
jmp .skipstate
|
jmp .skipstate
|
||||||
.nocheck
|
.nocheck
|
||||||
mov dword[CFWriteHead],0
|
mov dword[CFWriteHead],0
|
||||||
mov dword[CReadHead],0
|
mov dword[CReadHead],0
|
||||||
mov dword[ReadHead],0
|
mov dword[ReadHead],0
|
||||||
mov dword[CFWriteStart],64
|
mov dword[CFWriteStart],64
|
||||||
mov byte[MovieRecordWinVal],0
|
mov byte[MovieRecordWinVal],0
|
||||||
call ChangetoSRAMdir
|
call ChangetoSRAMdir
|
||||||
mov byte[NoPictureSave],1
|
mov byte[NoPictureSave],1
|
||||||
call statesaver
|
call statesaver
|
||||||
mov byte[NoPictureSave],0
|
mov byte[NoPictureSave],0
|
||||||
mov edx,fnamest+1
|
mov edx,fnamest+1
|
||||||
call Open_File_Write
|
call Open_File_Write
|
||||||
mov bx,ax
|
mov bx,ax
|
||||||
mov [MovieFileHand],bx
|
mov [MovieFileHand],bx
|
||||||
mov cx,0
|
mov cx,0
|
||||||
mov dx,0
|
mov dx,0
|
||||||
call File_Seek_End
|
call File_Seek_End
|
||||||
mov al,[soundon]
|
mov al,[soundon]
|
||||||
mov [RecData],al
|
mov [RecData],al
|
||||||
mov eax,[welcome+8]
|
mov eax,[welcome+8]
|
||||||
mov [RecData+1],eax
|
mov [RecData+1],eax
|
||||||
mov byte[RecData+2],1
|
mov byte[RecData+2],1
|
||||||
mov eax,[timer2upd]
|
mov eax,[timer2upd]
|
||||||
mov [RecData+3],eax
|
mov [RecData+3],eax
|
||||||
mov eax,[curexecstate]
|
mov eax,[curexecstate]
|
||||||
mov [RecData+7],eax
|
mov [RecData+7],eax
|
||||||
mov edx,RecData
|
mov edx,RecData
|
||||||
mov ecx,16
|
mov ecx,16
|
||||||
call Write_File
|
call Write_File
|
||||||
cmp dword[ramsize],0
|
cmp dword[ramsize],0
|
||||||
je .noram
|
je .noram
|
||||||
mov edx,[sram]
|
mov edx,[sram]
|
||||||
mov ecx,[ramsize]
|
mov ecx,[ramsize]
|
||||||
call Write_File
|
call Write_File
|
||||||
.noram
|
.noram
|
||||||
mov byte[MovieProcessing],2
|
mov byte[MovieProcessing],2
|
||||||
mov dword[MovieBuffSize],0
|
mov dword[MovieBuffSize],0
|
||||||
mov dword[MovieBuffFrame],0
|
mov dword[MovieBuffFrame],0
|
||||||
mov byte[RepeatFrame],0
|
mov byte[RepeatFrame],0
|
||||||
cmp byte[CNetType],20
|
cmp byte[CNetType],20
|
||||||
je near .netstuff
|
je near .netstuff
|
||||||
cmp byte[CNetType],21
|
cmp byte[CNetType],21
|
||||||
je near .netstuff
|
je near .netstuff
|
||||||
mov dword[nmiprevaddrl],0
|
mov dword[nmiprevaddrl],0
|
||||||
mov dword[nmiprevaddrh],0
|
mov dword[nmiprevaddrh],0
|
||||||
mov dword[nmirept],0
|
mov dword[nmirept],0
|
||||||
mov dword[nmiprevline],224
|
mov dword[nmiprevline],224
|
||||||
mov dword[nmistatus],0
|
mov dword[nmistatus],0
|
||||||
mov byte[spcnumread],0
|
mov byte[spcnumread],0
|
||||||
mov byte[NextLineCache],0
|
mov byte[NextLineCache],0
|
||||||
mov dword[PJoyAOrig],0
|
mov dword[PJoyAOrig],0
|
||||||
mov dword[PJoyBOrig],0
|
mov dword[PJoyBOrig],0
|
||||||
mov dword[PJoyCOrig],0
|
mov dword[PJoyCOrig],0
|
||||||
mov dword[PJoyDOrig],0
|
mov dword[PJoyDOrig],0
|
||||||
mov dword[PJoyEOrig],0
|
mov dword[PJoyEOrig],0
|
||||||
mov byte[DSPMem+08h],0
|
mov byte[DSPMem+08h],0
|
||||||
mov byte[DSPMem+18h],0
|
mov byte[DSPMem+18h],0
|
||||||
mov byte[DSPMem+28h],0
|
mov byte[DSPMem+28h],0
|
||||||
mov byte[DSPMem+38h],0
|
mov byte[DSPMem+38h],0
|
||||||
mov byte[DSPMem+48h],0
|
mov byte[DSPMem+48h],0
|
||||||
mov byte[DSPMem+58h],0
|
mov byte[DSPMem+58h],0
|
||||||
mov byte[DSPMem+68h],0
|
mov byte[DSPMem+68h],0
|
||||||
mov byte[DSPMem+78h],0
|
mov byte[DSPMem+78h],0
|
||||||
.netstuff
|
.netstuff
|
||||||
call ChangetoLOADdir
|
call ChangetoLOADdir
|
||||||
.skipstate
|
.skipstate
|
||||||
pop eax
|
pop eax
|
||||||
mov ebx,[statefileloc]
|
mov ebx,[statefileloc]
|
||||||
mov [fnamest+ebx-3],eax
|
mov [fnamest+ebx-3],eax
|
||||||
.dontrecord
|
.dontrecord
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MovieRecordWinVal db 0
|
MovieRecordWinVal db 0
|
||||||
NEWSYM MovieProcessing, db 0
|
NEWSYM MovieProcessing, db 0
|
||||||
NEWSYM MovieFileHand, dw 0
|
NEWSYM MovieFileHand, dw 0
|
||||||
NEWSYM RepeatFrame, db 0
|
NEWSYM RepeatFrame, db 0
|
||||||
NEWSYM RecData, times 16 db 0
|
NEWSYM RecData, times 16 db 0
|
||||||
NEWSYM NoPictureSave, db 0
|
NEWSYM NoPictureSave, db 0
|
||||||
|
|
||||||
SkipMovie:
|
SkipMovie:
|
||||||
mov byte[MovieRecordWinVal],0
|
mov byte[MovieRecordWinVal],0
|
||||||
mov byte[GUICBHold],0
|
mov byte[GUICBHold],0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MovieStop:
|
MovieStop:
|
||||||
mov byte[GUICBHold],0
|
mov byte[GUICBHold],0
|
||||||
cmp byte[MovieProcessing],0
|
cmp byte[MovieProcessing],0
|
||||||
je .skipfileend
|
je .skipfileend
|
||||||
mov bx,[MovieFileHand]
|
mov bx,[MovieFileHand]
|
||||||
mov byte[MovieProcessing],0
|
mov byte[MovieProcessing],0
|
||||||
call Close_File
|
call Close_File
|
||||||
.skipfileend
|
.skipfileend
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CalibrateDispA:
|
CalibrateDispA:
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov ecx,256
|
mov ecx,256
|
||||||
.a
|
.a
|
||||||
mov byte[pressed+ebx],0
|
mov byte[pressed+ebx],0
|
||||||
inc ebx
|
inc ebx
|
||||||
loop .a
|
loop .a
|
||||||
call GUIUnBuffer
|
call GUIUnBuffer
|
||||||
call DisplayBoxes
|
call DisplayBoxes
|
||||||
call DisplayMenu
|
call DisplayMenu
|
||||||
GUIBox 75,103,192,135,160
|
GUIBox 75,103,192,135,160
|
||||||
GUIBox 75,103,192,103,162
|
GUIBox 75,103,192,103,162
|
||||||
GUIBox 75,103,75,135,161
|
GUIBox 75,103,75,135,161
|
||||||
GUIBox 192,103,192,135,159
|
GUIBox 192,103,192,135,159
|
||||||
GUIBox 75,135,192,135,158
|
GUIBox 75,135,192,135,158
|
||||||
GUIOuttext 81,109,guicalberror1,220-15
|
GUIOuttext 81,109,guicalberror1,220-15
|
||||||
GUIOuttext 80,108,guicalberror1,220
|
GUIOuttext 80,108,guicalberror1,220
|
||||||
GUIOuttext 81,117,guicalberror2,220-15
|
GUIOuttext 81,117,guicalberror2,220-15
|
||||||
GUIOuttext 80,116,guicalberror2,220
|
GUIOuttext 80,116,guicalberror2,220
|
||||||
GUIOuttext 81,125,guicalberror3,220-15
|
GUIOuttext 81,125,guicalberror3,220-15
|
||||||
GUIOuttext 80,124,guicalberror3,220
|
GUIOuttext 80,124,guicalberror3,220
|
||||||
call vidpastecopyscr
|
call vidpastecopyscr
|
||||||
call WaitForKey
|
call WaitForKey
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CalibrateDispB:
|
CalibrateDispB:
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov ecx,256
|
mov ecx,256
|
||||||
.a
|
.a
|
||||||
mov byte[pressed+ebx],0
|
mov byte[pressed+ebx],0
|
||||||
inc ebx
|
inc ebx
|
||||||
loop .a
|
loop .a
|
||||||
call GUIUnBuffer
|
call GUIUnBuffer
|
||||||
call DisplayBoxes
|
call DisplayBoxes
|
||||||
call DisplayMenu
|
call DisplayMenu
|
||||||
GUIBox 75,103,192,143,160
|
GUIBox 75,103,192,143,160
|
||||||
GUIBox 75,103,192,103,162
|
GUIBox 75,103,192,103,162
|
||||||
GUIBox 75,103,75,143,161
|
GUIBox 75,103,75,143,161
|
||||||
GUIBox 192,103,192,143,159
|
GUIBox 192,103,192,143,159
|
||||||
GUIBox 75,143,192,143,158
|
GUIBox 75,143,192,143,158
|
||||||
GUIOuttext 81,109,guicalberror4,220-15
|
GUIOuttext 81,109,guicalberror4,220-15
|
||||||
GUIOuttext 80,108,guicalberror4,220
|
GUIOuttext 80,108,guicalberror4,220
|
||||||
GUIOuttext 81,117,guicalberror5,220-15
|
GUIOuttext 81,117,guicalberror5,220-15
|
||||||
GUIOuttext 80,116,guicalberror5,220
|
GUIOuttext 80,116,guicalberror5,220
|
||||||
GUIOuttext 81,125,guicalberror6,220-15
|
GUIOuttext 81,125,guicalberror6,220-15
|
||||||
GUIOuttext 80,124,guicalberror6,220
|
GUIOuttext 80,124,guicalberror6,220
|
||||||
GUIOuttext 81,133,guicalberror7,220-15
|
GUIOuttext 81,133,guicalberror7,220-15
|
||||||
GUIOuttext 80,132,guicalberror7,220
|
GUIOuttext 80,132,guicalberror7,220
|
||||||
call vidpastecopyscr
|
call vidpastecopyscr
|
||||||
call WaitForKey
|
call WaitForKey
|
||||||
ret
|
ret
|
||||||
|
|
||||||
guicalberror1 db 'PRESS THE TOP LEFT',0
|
guicalberror1 db 'PRESS THE TOP LEFT',0
|
||||||
guicalberror2 db 'CORNER AND PRESS A',0
|
guicalberror2 db 'CORNER AND PRESS A',0
|
||||||
guicalberror3 db 'BUTTON OR KEY',0
|
guicalberror3 db 'BUTTON OR KEY',0
|
||||||
guicalberror4 db 'PRESS THE BOTTOM',0
|
guicalberror4 db 'PRESS THE BOTTOM',0
|
||||||
guicalberror5 db 'RIGHT CORNER AND',0
|
guicalberror5 db 'RIGHT CORNER AND',0
|
||||||
guicalberror6 db 'PRESS A BUTTON OR',0
|
guicalberror6 db 'PRESS A BUTTON OR',0
|
||||||
guicalberror7 db 'KEY',0
|
guicalberror7 db 'KEY',0
|
||||||
|
|
||||||
|
|
||||||
SetAllKeys:
|
SetAllKeys:
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov ecx,256+128+64
|
mov ecx,256+128+64
|
||||||
.a
|
.a
|
||||||
mov byte[pressed+ebx],0
|
mov byte[pressed+ebx],0
|
||||||
inc ebx
|
inc ebx
|
||||||
loop .a
|
loop .a
|
||||||
|
|
||||||
mov byte[GUICBHold],0
|
mov byte[GUICBHold],0
|
||||||
mov edi,pl1selk
|
mov edi,pl1selk
|
||||||
cmp byte[cplayernum],1
|
cmp byte[cplayernum],1
|
||||||
jne .nopl2
|
jne .nopl2
|
||||||
mov edi,pl2selk
|
mov edi,pl2selk
|
||||||
.nopl2
|
.nopl2
|
||||||
cmp byte[cplayernum],2
|
cmp byte[cplayernum],2
|
||||||
jne .nopl3
|
jne .nopl3
|
||||||
mov edi,pl3selk
|
mov edi,pl3selk
|
||||||
.nopl3
|
.nopl3
|
||||||
cmp byte[cplayernum],3
|
cmp byte[cplayernum],3
|
||||||
jne .nopl4
|
jne .nopl4
|
||||||
mov edi,pl4selk
|
mov edi,pl4selk
|
||||||
.nopl4
|
.nopl4
|
||||||
cmp byte[cplayernum],4
|
cmp byte[cplayernum],4
|
||||||
jne .nopl5
|
jne .nopl5
|
||||||
mov edi,pl5selk
|
mov edi,pl5selk
|
||||||
.nopl5
|
.nopl5
|
||||||
mov dword[guicpressptr],edi
|
mov dword[guicpressptr],edi
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov ecx,12
|
mov ecx,12
|
||||||
mov dword[guipressptr],guipresstext4b
|
mov dword[guipressptr],guipresstext4b
|
||||||
.loop
|
.loop
|
||||||
mov eax,[.ordercalb+ebx*4]
|
mov eax,[.ordercalb+ebx*4]
|
||||||
shl eax,2
|
shl eax,2
|
||||||
add dword[guicpressptr],eax
|
add dword[guicpressptr],eax
|
||||||
push ebx
|
push ebx
|
||||||
push ecx
|
push ecx
|
||||||
call guipresstestb
|
call guipresstestb
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
add dword[guipressptr],21
|
add dword[guipressptr],21
|
||||||
mov eax,[.ordercalb+ebx*4]
|
mov eax,[.ordercalb+ebx*4]
|
||||||
shl eax,2
|
shl eax,2
|
||||||
sub dword[guicpressptr],eax
|
sub dword[guicpressptr],eax
|
||||||
inc ebx
|
inc ebx
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .loop
|
jnz .loop
|
||||||
ret
|
ret
|
||||||
.ordercalb dd 2,3,4,5,1,0,7,10,6,9,8,11
|
.ordercalb dd 2,3,4,5,1,0,7,10,6,9,8,11
|
||||||
|
|
||||||
CalibrateDev1:
|
CalibrateDev1:
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,[cplayernum]
|
mov al,[cplayernum]
|
||||||
mov ebx,[GUIInputRefP+eax*4]
|
mov ebx,[GUIInputRefP+eax*4]
|
||||||
mov bl,[ebx]
|
mov bl,[ebx]
|
||||||
mov byte[GUICBHold],0
|
mov byte[GUICBHold],0
|
||||||
cmp byte[pl1p209+eax],0
|
cmp byte[pl1p209+eax],0
|
||||||
jne near .port209
|
jne near .port209
|
||||||
cmp bl,1
|
cmp bl,1
|
||||||
jbe .nojoy
|
jbe .nojoy
|
||||||
cmp bl,18
|
cmp bl,18
|
||||||
je near .6button
|
je near .6button
|
||||||
cmp bl,5
|
cmp bl,5
|
||||||
je near .6button
|
je near .6button
|
||||||
cmp bl,6
|
cmp bl,6
|
||||||
jae .nojoy
|
jae .nojoy
|
||||||
mov dx,201h
|
mov dx,201h
|
||||||
call GetCoords
|
call GetCoords
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joybcx],eax
|
mov [.joybcx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybcy],eax
|
mov [.joybcy],eax
|
||||||
call CalibrateDispA
|
call CalibrateDispA
|
||||||
mov dx,201h
|
mov dx,201h
|
||||||
call GetCoords
|
call GetCoords
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joyblx],eax
|
mov [.joyblx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybly],eax
|
mov [.joybly],eax
|
||||||
call CalibrateDispB
|
call CalibrateDispB
|
||||||
mov dx,201h
|
mov dx,201h
|
||||||
call GetCoords
|
call GetCoords
|
||||||
jmp .procdir
|
jmp .procdir
|
||||||
.nojoy
|
.nojoy
|
||||||
ret
|
ret
|
||||||
.6button
|
.6button
|
||||||
mov dx,201h
|
mov dx,201h
|
||||||
call GetCoords3
|
call GetCoords3
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joybcx],eax
|
mov [.joybcx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybcy],eax
|
mov [.joybcy],eax
|
||||||
call CalibrateDispA
|
call CalibrateDispA
|
||||||
mov dx,201h
|
mov dx,201h
|
||||||
call GetCoords3
|
call GetCoords3
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joyblx],eax
|
mov [.joyblx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybly],eax
|
mov [.joybly],eax
|
||||||
call CalibrateDispB
|
call CalibrateDispB
|
||||||
mov dx,201h
|
mov dx,201h
|
||||||
call GetCoords3
|
call GetCoords3
|
||||||
.procdir
|
.procdir
|
||||||
mov eax,[.joybcx]
|
mov eax,[.joybcx]
|
||||||
add eax,[.joyblx]
|
add eax,[.joyblx]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMinX],eax
|
mov [JoyMinX],eax
|
||||||
mov [CalibXmin],eax
|
mov [CalibXmin],eax
|
||||||
mov eax,[.joybcy]
|
mov eax,[.joybcy]
|
||||||
add eax,[.joybly]
|
add eax,[.joybly]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMinY],eax
|
mov [JoyMinY],eax
|
||||||
mov [CalibYmin],eax
|
mov [CalibYmin],eax
|
||||||
mov eax,[.joybcx]
|
mov eax,[.joybcx]
|
||||||
add eax,[JoyX]
|
add eax,[JoyX]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMaxX],eax
|
mov [JoyMaxX],eax
|
||||||
mov [CalibXmax],eax
|
mov [CalibXmax],eax
|
||||||
mov eax,[.joybcy]
|
mov eax,[.joybcy]
|
||||||
add eax,[JoyY]
|
add eax,[JoyY]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMaxY],eax
|
mov [JoyMaxY],eax
|
||||||
mov [CalibYmax],eax
|
mov [CalibYmax],eax
|
||||||
ret
|
ret
|
||||||
.port209
|
.port209
|
||||||
cmp bl,1
|
cmp bl,1
|
||||||
jbe .nojoy209
|
jbe .nojoy209
|
||||||
cmp bl,18
|
cmp bl,18
|
||||||
je near .6button209
|
je near .6button209
|
||||||
cmp bl,5
|
cmp bl,5
|
||||||
je near .6button209
|
je near .6button209
|
||||||
cmp bl,6
|
cmp bl,6
|
||||||
jae .nojoy209
|
jae .nojoy209
|
||||||
mov dx,209h
|
mov dx,209h
|
||||||
call GetCoords
|
call GetCoords
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joybcx],eax
|
mov [.joybcx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybcy],eax
|
mov [.joybcy],eax
|
||||||
call CalibrateDispA
|
call CalibrateDispA
|
||||||
mov dx,209h
|
mov dx,209h
|
||||||
call GetCoords
|
call GetCoords
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joyblx],eax
|
mov [.joyblx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybly],eax
|
mov [.joybly],eax
|
||||||
call CalibrateDispB
|
call CalibrateDispB
|
||||||
mov dx,209h
|
mov dx,209h
|
||||||
call GetCoords
|
call GetCoords
|
||||||
jmp .procdir209
|
jmp .procdir209
|
||||||
.nojoy209
|
.nojoy209
|
||||||
ret
|
ret
|
||||||
.6button209
|
.6button209
|
||||||
mov dx,209h
|
mov dx,209h
|
||||||
call GetCoords3
|
call GetCoords3
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joybcx],eax
|
mov [.joybcx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybcy],eax
|
mov [.joybcy],eax
|
||||||
call CalibrateDispA
|
call CalibrateDispA
|
||||||
mov dx,209h
|
mov dx,209h
|
||||||
call GetCoords3
|
call GetCoords3
|
||||||
mov eax,[JoyX]
|
mov eax,[JoyX]
|
||||||
mov [.joyblx],eax
|
mov [.joyblx],eax
|
||||||
mov eax,[JoyY]
|
mov eax,[JoyY]
|
||||||
mov [.joybly],eax
|
mov [.joybly],eax
|
||||||
call CalibrateDispB
|
call CalibrateDispB
|
||||||
mov dx,209h
|
mov dx,209h
|
||||||
call GetCoords3
|
call GetCoords3
|
||||||
.procdir209
|
.procdir209
|
||||||
mov eax,[.joybcx]
|
mov eax,[.joybcx]
|
||||||
add eax,[.joyblx]
|
add eax,[.joyblx]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMinX209],eax
|
mov [JoyMinX209],eax
|
||||||
mov [CalibXmin209],eax
|
mov [CalibXmin209],eax
|
||||||
mov eax,[.joybcy]
|
mov eax,[.joybcy]
|
||||||
add eax,[.joybly]
|
add eax,[.joybly]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMinY209],eax
|
mov [JoyMinY209],eax
|
||||||
mov [CalibYmin209],eax
|
mov [CalibYmin209],eax
|
||||||
mov eax,[.joybcx]
|
mov eax,[.joybcx]
|
||||||
add eax,[JoyX]
|
add eax,[JoyX]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMaxX209],eax
|
mov [JoyMaxX209],eax
|
||||||
mov [CalibXmax209],eax
|
mov [CalibXmax209],eax
|
||||||
mov eax,[.joybcy]
|
mov eax,[.joybcy]
|
||||||
add eax,[JoyY]
|
add eax,[JoyY]
|
||||||
shr eax,1
|
shr eax,1
|
||||||
mov [JoyMaxY209],eax
|
mov [JoyMaxY209],eax
|
||||||
mov [CalibYmax209],eax
|
mov [CalibYmax209],eax
|
||||||
ret
|
ret
|
||||||
.joyblx dd 0
|
.joyblx dd 0
|
||||||
.joybly dd 0
|
.joybly dd 0
|
||||||
.joybcx dd 0
|
.joybcx dd 0
|
||||||
.joybcy dd 0
|
.joybcy dd 0
|
||||||
|
|
||||||
|
|
||||||
SetDevice:
|
SetDevice:
|
||||||
mov byte[GUICBHold],0
|
mov byte[GUICBHold],0
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,[cplayernum]
|
mov al,[cplayernum]
|
||||||
cmp byte[OSPort],1
|
cmp byte[OSPort],1
|
||||||
ja .notdos
|
ja .notdos
|
||||||
cmp byte[pl1p209+eax],0
|
cmp byte[pl1p209+eax],0
|
||||||
jne .port209
|
jne .port209
|
||||||
.notdos
|
.notdos
|
||||||
mov dword[CalibXmin],0
|
mov dword[CalibXmin],0
|
||||||
mov ecx,[DevicePtr+eax*4]
|
mov ecx,[DevicePtr+eax*4]
|
||||||
mov eax,[GUIInputRefP+eax*4]
|
mov eax,[GUIInputRefP+eax*4]
|
||||||
mov ebx,[GUIcurrentinputcursloc]
|
mov ebx,[GUIcurrentinputcursloc]
|
||||||
mov bl,[GUIInputRefF+ebx]
|
mov bl,[GUIInputRefF+ebx]
|
||||||
mov [eax],bl
|
mov [eax],bl
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov bh,[cplayernum]
|
mov bh,[cplayernum]
|
||||||
call SetInputDevice
|
call SetInputDevice
|
||||||
call UpdateDevices
|
call UpdateDevices
|
||||||
jmp .procmtap
|
jmp .procmtap
|
||||||
.port209
|
.port209
|
||||||
mov dword[CalibXmin209],0
|
mov dword[CalibXmin209],0
|
||||||
mov ecx,[DevicePtr+eax*4]
|
mov ecx,[DevicePtr+eax*4]
|
||||||
mov eax,[GUIInputRefP+eax*4]
|
mov eax,[GUIInputRefP+eax*4]
|
||||||
mov ebx,[GUIcurrentinputcursloc]
|
mov ebx,[GUIcurrentinputcursloc]
|
||||||
mov bl,[GUIInputRefF+ebx]
|
mov bl,[GUIInputRefF+ebx]
|
||||||
mov [eax],bl
|
mov [eax],bl
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov bh,[cplayernum]
|
mov bh,[cplayernum]
|
||||||
call SetInputDevice209
|
call SetInputDevice209
|
||||||
call UpdateDevices
|
call UpdateDevices
|
||||||
.procmtap
|
.procmtap
|
||||||
mov byte[MultiTap],1
|
mov byte[MultiTap],1
|
||||||
cmp byte[SFXEnable],1
|
cmp byte[SFXEnable],1
|
||||||
je .dismtap
|
je .dismtap
|
||||||
cmp byte[pl3contrl],0
|
cmp byte[pl3contrl],0
|
||||||
jne .mtap
|
jne .mtap
|
||||||
cmp byte[pl4contrl],0
|
cmp byte[pl4contrl],0
|
||||||
jne .mtap
|
jne .mtap
|
||||||
cmp byte[pl5contrl],0
|
cmp byte[pl5contrl],0
|
||||||
jne .mtap
|
jne .mtap
|
||||||
.dismtap
|
.dismtap
|
||||||
mov byte[MultiTap],0
|
mov byte[MultiTap],0
|
||||||
.mtap
|
.mtap
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM GUIDoReset
|
NEWSYM GUIDoReset
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
; mov byte[NetPlayNoMore],1
|
; mov byte[NetPlayNoMore],1
|
||||||
mov byte[RestoreValues],0
|
mov byte[RestoreValues],0
|
||||||
|
|
||||||
cmp byte[MovieProcessing],0
|
cmp byte[MovieProcessing],0
|
||||||
je .skipfileend
|
je .skipfileend
|
||||||
mov bx,[MovieFileHand]
|
mov bx,[MovieFileHand]
|
||||||
mov byte[MovieProcessing],0
|
mov byte[MovieProcessing],0
|
||||||
call Close_File
|
call Close_File
|
||||||
.skipfileend
|
.skipfileend
|
||||||
call RestoreSystemVars
|
call RestoreSystemVars
|
||||||
; clear spc700 ram
|
; clear spc700 ram
|
||||||
mov al,0FFh
|
mov al,0FFh
|
||||||
mov edi,spcRam
|
mov edi,spcRam
|
||||||
mov ecx,65472
|
mov ecx,65472
|
||||||
rep stosb
|
rep stosb
|
||||||
; clear dsp ram
|
; clear dsp ram
|
||||||
xor al,al
|
xor al,al
|
||||||
mov edi,DSPMem
|
mov edi,DSPMem
|
||||||
mov ecx,256
|
mov ecx,256
|
||||||
rep stosb
|
rep stosb
|
||||||
|
|
||||||
; reset the snes
|
; reset the snes
|
||||||
call init65816
|
call init65816
|
||||||
call procexecloop
|
call procexecloop
|
||||||
|
|
||||||
mov eax,spcRam
|
mov eax,spcRam
|
||||||
mov edx,0EFh
|
mov edx,0EFh
|
||||||
.loop
|
.loop
|
||||||
mov byte[eax],0
|
mov byte[eax],0
|
||||||
inc eax
|
inc eax
|
||||||
dec edx
|
dec edx
|
||||||
jnz .loop
|
jnz .loop
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov edx,spcRam
|
mov edx,spcRam
|
||||||
mov ax,0FFC9h
|
mov ax,0FFC9h
|
||||||
add edx,eax
|
add edx,eax
|
||||||
mov [spcPCRam],edx
|
mov [spcPCRam],edx
|
||||||
mov dword [spcS],1EFh
|
mov dword [spcS],1EFh
|
||||||
mov dword [spcRamDP],spcRam
|
mov dword [spcRamDP],spcRam
|
||||||
mov byte[spcA],0
|
mov byte[spcA],0
|
||||||
mov byte[spcX],0
|
mov byte[spcX],0
|
||||||
mov byte[spcY],0
|
mov byte[spcY],0
|
||||||
mov byte[spcP],0
|
mov byte[spcP],0
|
||||||
mov byte[spcNZ],0
|
mov byte[spcNZ],0
|
||||||
mov byte[Voice0Status],0
|
mov byte[Voice0Status],0
|
||||||
mov byte[Voice1Status],0
|
mov byte[Voice1Status],0
|
||||||
mov byte[Voice2Status],0
|
mov byte[Voice2Status],0
|
||||||
mov byte[Voice3Status],0
|
mov byte[Voice3Status],0
|
||||||
mov byte[Voice4Status],0
|
mov byte[Voice4Status],0
|
||||||
mov byte[Voice5Status],0
|
mov byte[Voice5Status],0
|
||||||
mov byte[Voice6Status],0
|
mov byte[Voice6Status],0
|
||||||
mov byte[Voice7Status],0
|
mov byte[Voice7Status],0
|
||||||
mov byte[GUIQuit],2
|
mov byte[GUIQuit],2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
10653
zsnes/src/init.asm
10653
zsnes/src/init.asm
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1 @@
|
|||||||
/Fezsnesw.exe chips\dsp1proc.obj dos\sw.obj dos\gppro.obj dos\vesa12.obj dos\zsipx.obj dos\modemrtn.obj dos\joy.obj dos\debug.obj dos\vesa2.obj dos\initvid.obj cfgload.obj endmem.obj fixsin.obj init.obj ui.obj vcache.obj water.obj video\procvid.obj win\copyvwin.obj win\winintrf.obj win\winlink.obj win\zloaderw.obj win\ztcp.obj win\zfilew.obj win\zipxw.obj video\makev16b.obj video\makev16t.obj video\makevid.obj video\mode716.obj video\mode716b.obj video\mode716d.obj video\mode716e.obj video\mode716t.obj video\mode7.obj video\mode7ext.obj video\mv16tms.obj video\newg162.obj video\newgfx16.obj video\newgfx2.obj video\newgfx.obj video\m716text.obj video\2xsaiw.obj video\2xsai.obj gui\gui.obj gui\menu.obj cpu\addrni.obj cpu\dma.obj cpu\dsp.obj cpu\dspproc.obj cpu\execute.obj cpu\irq.obj cpu\memory.obj cpu\spc700.obj cpu\stable.obj cpu\table.obj cpu\tableb.obj cpu\tablec.obj chips\dsp1emu.obj chips\fxemu2.obj chips\fxemu2b.obj chips\fxemu2c.obj chips\fxtable.obj chips\sa1proc.obj chips\sa1regs.obj chips\sfxproc.obj obj\unzip.obj obj\zzip.obj zlib.lib wsock32.lib user32.lib gdi32.lib shell32.lib ddraw.lib dsound.lib dinput.lib d3dx.lib /link /section:.text,erw
|
/Fezsnesw.exe chips\dsp1proc.obj dos\sw.obj dos\gppro.obj dos\vesa12.obj dos\zsipx.obj dos\modemrtn.obj dos\joy.obj dos\debug.obj dos\vesa2.obj dos\initvid.obj cfgload.obj endmem.obj fixsin.obj init.obj ui.obj vcache.obj water.obj video\procvid.obj win\copyvwin.obj win\winintrf.obj win\winlink.obj win\zloaderw.obj win\ztcp.obj win\zfilew.obj win\zipxw.obj video\makev16b.obj video\makev16t.obj video\makevid.obj video\mode716.obj video\mode716b.obj video\mode716d.obj video\mode716e.obj video\mode716t.obj video\mode7.obj video\mode7ext.obj video\mv16tms.obj video\newg162.obj video\newgfx16.obj video\newgfx2.obj video\newgfx.obj video\m716text.obj video\2xsaiw.obj video\2xsai.obj gui\gui.obj gui\menu.obj cpu\addrni.obj cpu\dma.obj cpu\dsp.obj cpu\dspproc.obj cpu\execute.obj cpu\irq.obj cpu\memory.obj cpu\spc700.obj cpu\stable.obj cpu\table.obj cpu\tableb.obj cpu\tablec.obj chips\dsp1emu.obj chips\fxemu2.obj chips\fxemu2b.obj chips\fxemu2c.obj chips\fxtable.obj chips\sa1proc.obj chips\sa1regs.obj chips\sfxproc.obj obj\unzip.obj obj\zzip.obj zlib.lib wsock32.lib user32.lib gdi32.lib shell32.lib ddraw.lib dsound.lib dinput.lib d3dx.lib /link /section:.text,erw
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +1,48 @@
|
|||||||
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
;
|
;
|
||||||
;This program is free software; you can redistribute it and/or
|
;This program is free software; you can redistribute it and/or
|
||||||
;modify it under the terms of the GNU General Public License
|
;modify it under the terms of the GNU General Public License
|
||||||
;as published by the Free Software Foundation; either
|
;as published by the Free Software Foundation; either
|
||||||
;version 2 of the License, or (at your option) any later
|
;version 2 of the License, or (at your option) any later
|
||||||
;version.
|
;version.
|
||||||
;
|
;
|
||||||
;This program is distributed in the hope that it will be useful,
|
;This program is distributed in the hope that it will be useful,
|
||||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;GNU General Public License for more details.
|
;GNU General Public License for more details.
|
||||||
;
|
;
|
||||||
;You should have received a copy of the GNU General Public License
|
;You should have received a copy of the GNU General Public License
|
||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
bits 32
|
bits 32
|
||||||
section .text
|
section .text
|
||||||
; Zsnes required macros
|
; Zsnes required macros
|
||||||
%imacro newsym 1
|
%imacro newsym 1
|
||||||
GLOBAL _%1
|
GLOBAL _%1
|
||||||
_%1:
|
_%1:
|
||||||
%1:
|
%1:
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%imacro newsym 2+
|
%imacro newsym 2+
|
||||||
GLOBAL _%1
|
GLOBAL _%1
|
||||||
_%1:
|
_%1:
|
||||||
%1: %2
|
%1: %2
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro ALIGN32 0
|
%macro ALIGN32 0
|
||||||
times ($$-$) & 1Fh nop ; Long word alignment
|
times ($$-$) & 1Fh nop ; Long word alignment
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro ALIGN16 0
|
%macro ALIGN16 0
|
||||||
times ($$-$) & 1Fh nop ; Long word alignment
|
times ($$-$) & 1Fh nop ; Long word alignment
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%imacro extsym 1-*
|
%imacro extsym 1-*
|
||||||
%rep %0
|
%rep %0
|
||||||
EXTERN _%1
|
EXTERN _%1
|
||||||
%define %1 _%1
|
%define %1 _%1
|
||||||
%rotate 1
|
%rotate 1
|
||||||
%endrep
|
%endrep
|
||||||
%endmacro
|
%endmacro
|
||||||
@@ -1,185 +1,185 @@
|
|||||||
#Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
#Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
#
|
#
|
||||||
#This program is free software; you can redistribute it and/or
|
#This program is free software; you can redistribute it and/or
|
||||||
#modify it under the terms of the GNU General Public License
|
#modify it under the terms of the GNU General Public License
|
||||||
#as published by the Free Software Foundation; either
|
#as published by the Free Software Foundation; either
|
||||||
#version 2 of the License, or (at your option) any later
|
#version 2 of the License, or (at your option) any later
|
||||||
#version.
|
#version.
|
||||||
#
|
#
|
||||||
#This program is distributed in the hope that it will be useful,
|
#This program is distributed in the hope that it will be useful,
|
||||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
#GNU General Public License for more details.
|
#GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
#You should have received a copy of the GNU General Public License
|
#You should have received a copy of the GNU General Public License
|
||||||
#along with this program; if not, write to the Free Software
|
#along with this program; if not, write to the Free Software
|
||||||
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
CHIPDIR=chips
|
CHIPDIR=chips
|
||||||
CPUDIR=cpu
|
CPUDIR=cpu
|
||||||
DOSDIR=dos
|
DOSDIR=dos
|
||||||
GUIDIR=gui
|
GUIDIR=gui
|
||||||
VIDEODIR=video
|
VIDEODIR=video
|
||||||
WINDIR=win
|
WINDIR=win
|
||||||
OBJDIR=obj
|
OBJDIR=obj
|
||||||
|
|
||||||
CHIPSOBJ=${CHIPDIR}/dsp1emu.o ${CHIPDIR}/fxemu2.o ${CHIPDIR}/sfxproc.o\
|
CHIPSOBJ=${CHIPDIR}/dsp1emu.o ${CHIPDIR}/fxemu2.o ${CHIPDIR}/sfxproc.o\
|
||||||
${CHIPDIR}/fxemu2b.o ${CHIPDIR}/fxemu2c.o ${CHIPDIR}/fxtable.o\
|
${CHIPDIR}/fxemu2b.o ${CHIPDIR}/fxemu2c.o ${CHIPDIR}/fxtable.o\
|
||||||
${CHIPDIR}/sa1proc.o ${CHIPDIR}/sa1regs.o ${CHIPDIR}/dsp1proc.o
|
${CHIPDIR}/sa1proc.o ${CHIPDIR}/sa1regs.o ${CHIPDIR}/dsp1proc.o
|
||||||
|
|
||||||
CPUOBJ=${CPUDIR}/addrni.o ${CPUDIR}/dma.o ${CPUDIR}/dsp.o ${CPUDIR}/dspproc.o\
|
CPUOBJ=${CPUDIR}/addrni.o ${CPUDIR}/dma.o ${CPUDIR}/dsp.o ${CPUDIR}/dspproc.o\
|
||||||
${CPUDIR}/execute.o ${CPUDIR}/irq.o ${CPUDIR}/memory.o\
|
${CPUDIR}/execute.o ${CPUDIR}/irq.o ${CPUDIR}/memory.o\
|
||||||
${CPUDIR}/spc700.o ${CPUDIR}/stable.o ${CPUDIR}/table.o\
|
${CPUDIR}/spc700.o ${CPUDIR}/stable.o ${CPUDIR}/table.o\
|
||||||
${CPUDIR}/tableb.o ${CPUDIR}/tablec.o
|
${CPUDIR}/tableb.o ${CPUDIR}/tablec.o
|
||||||
|
|
||||||
GUIOBJ=${GUIDIR}/gui.o ${GUIDIR}/menu.o
|
GUIOBJ=${GUIDIR}/gui.o ${GUIDIR}/menu.o
|
||||||
|
|
||||||
VIDEOBJ=${VIDEODIR}/makev16b.o ${VIDEODIR}/makev16t.o ${VIDEODIR}/makevid.o\
|
VIDEOBJ=${VIDEODIR}/makev16b.o ${VIDEODIR}/makev16t.o ${VIDEODIR}/makevid.o\
|
||||||
${VIDEODIR}/mode716.o ${VIDEODIR}/mode716b.o ${VIDEODIR}/mode716d.o\
|
${VIDEODIR}/mode716.o ${VIDEODIR}/mode716b.o ${VIDEODIR}/mode716d.o\
|
||||||
${VIDEODIR}/mode716e.o ${VIDEODIR}/mode716t.o ${VIDEODIR}/mode7.o\
|
${VIDEODIR}/mode716e.o ${VIDEODIR}/mode716t.o ${VIDEODIR}/mode7.o\
|
||||||
${VIDEODIR}/mode7ext.o ${VIDEODIR}/mv16tms.o ${VIDEODIR}/newg162.o\
|
${VIDEODIR}/mode7ext.o ${VIDEODIR}/mv16tms.o ${VIDEODIR}/newg162.o\
|
||||||
${VIDEODIR}/newgfx16.o ${VIDEODIR}/newgfx2.o ${VIDEODIR}/newgfx.o\
|
${VIDEODIR}/newgfx16.o ${VIDEODIR}/newgfx2.o ${VIDEODIR}/newgfx.o\
|
||||||
${VIDEODIR}/m716text.o ${VIDEODIR}/2xsai.o ${VIDEODIR}/procvid.o
|
${VIDEODIR}/m716text.o ${VIDEODIR}/2xsai.o ${VIDEODIR}/procvid.o
|
||||||
|
|
||||||
DOSOBJ= ${DOSDIR}/dosintrf.o ${DOSDIR}/gppro.o ${DOSDIR}/debug.o\
|
DOSOBJ= ${DOSDIR}/dosintrf.o ${DOSDIR}/gppro.o ${DOSDIR}/debug.o\
|
||||||
${DOSDIR}/initvid.o ${DOSDIR}/modemrtn.o ${DOSDIR}/sw32.o\
|
${DOSDIR}/initvid.o ${DOSDIR}/modemrtn.o ${DOSDIR}/sw32.o\
|
||||||
${DOSDIR}/joy.o ${DOSDIR}/sw.o ${DOSDIR}/vesa12.o ${DOSDIR}/vesa2.o\
|
${DOSDIR}/joy.o ${DOSDIR}/sw.o ${DOSDIR}/vesa12.o ${DOSDIR}/vesa2.o\
|
||||||
${DOSDIR}/zloader.o ${DOSDIR}/zsipx.o ${DOSDIR}/zfile.o
|
${DOSDIR}/zloader.o ${DOSDIR}/zsipx.o ${DOSDIR}/zfile.o
|
||||||
|
|
||||||
WINOBJ=${WINDIR}/copywin.o ${WINDIR}/winintrf.o ${WINDIR}/winlink.o\
|
WINOBJ=${WINDIR}/copywin.o ${WINDIR}/winintrf.o ${WINDIR}/winlink.o\
|
||||||
${WINDIR}/zloaderw.o ${WINDIR}/ztcp.o ${WINDIR}/zipxw.o
|
${WINDIR}/zloaderw.o ${WINDIR}/ztcp.o ${WINDIR}/zipxw.o
|
||||||
|
|
||||||
PREOBJ=${OBJDIR}/dosbuff.o ${OBJDIR}/ipx.o ${OBJDIR}/unzip.o\
|
PREOBJ=${OBJDIR}/dosbuff.o ${OBJDIR}/ipx.o ${OBJDIR}/unzip.o\
|
||||||
${OBJDIR}/zipx.o ${OBJDIR}/zzip.o
|
${OBJDIR}/zipx.o ${OBJDIR}/zzip.o
|
||||||
|
|
||||||
MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o
|
MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o
|
||||||
|
|
||||||
|
|
||||||
OBJS=${CHIPSOBJ} ${CPUOBJ} ${DOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ}
|
OBJS=${CHIPSOBJ} ${CPUOBJ} ${DOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ}
|
||||||
LIBS=-lz -lgcc -lm
|
LIBS=-lz -lgcc -lm
|
||||||
CFLAGS=
|
CFLAGS=
|
||||||
ASM=nasm
|
ASM=nasm
|
||||||
ASMFLAGS=-f coff
|
ASMFLAGS=-f coff
|
||||||
CC=gcc
|
CC=gcc
|
||||||
PP=gpp
|
PP=gpp
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .c .cpp .asm
|
.SUFFIXES: .c .cpp .asm
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
${CC} ${CFLAGS} -o $@ -c $<
|
${CC} ${CFLAGS} -o $@ -c $<
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
${PP} ${CFLAGS} -o $@ -c $<
|
${PP} ${CFLAGS} -o $@ -c $<
|
||||||
|
|
||||||
%.o: %.asm
|
%.o: %.asm
|
||||||
${ASM} ${ASMFLAGS} -o $@ $<
|
${ASM} ${ASMFLAGS} -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
ALL: zsnes.exe
|
ALL: zsnes.exe
|
||||||
|
|
||||||
zsnes.exe: ${OBJS}
|
zsnes.exe: ${OBJS}
|
||||||
${CC} -Ws -s -o zsnes.exe ${OBJS} ${LIBS}
|
${CC} -Ws -s -o zsnes.exe ${OBJS} ${LIBS}
|
||||||
|
|
||||||
${DOSDIR}/zloader.o: ${DOSDIR}/zloader.c
|
${DOSDIR}/zloader.o: ${DOSDIR}/zloader.c
|
||||||
fixsin.o: fixsin.c
|
fixsin.o: fixsin.c
|
||||||
water.o: water.c
|
water.o: water.c
|
||||||
${DOSDIR}/zfile.o: ${DOSDIR}/zfile.c
|
${DOSDIR}/zfile.o: ${DOSDIR}/zfile.c
|
||||||
${VIDEODIR}/2xsai.o: ${VIDEODIR}/2xsai.cpp
|
${VIDEODIR}/2xsai.o: ${VIDEODIR}/2xsai.cpp
|
||||||
${VIDEODIR}/procvid.o: ${VIDEODIR}/procvid.asm macros.mac ${VIDEODIR}/copyvid.inc ${VIDEODIR}/2xSaImmx.inc
|
${VIDEODIR}/procvid.o: ${VIDEODIR}/procvid.asm macros.mac ${VIDEODIR}/copyvid.inc ${VIDEODIR}/2xSaImmx.inc
|
||||||
${CHIPDIR}/dsp1proc.o: ${CHIPDIR}/dsp1proc.asm macros.mac
|
${CHIPDIR}/dsp1proc.o: ${CHIPDIR}/dsp1proc.asm macros.mac
|
||||||
${CHIPDIR}/sa1regs.o: ${CHIPDIR}/sa1regs.asm macros.mac\
|
${CHIPDIR}/sa1regs.o: ${CHIPDIR}/sa1regs.asm macros.mac\
|
||||||
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
||||||
${CHIPDIR}/sfxproc.o: ${CHIPDIR}/sfxproc.asm macros.mac\
|
${CHIPDIR}/sfxproc.o: ${CHIPDIR}/sfxproc.asm macros.mac\
|
||||||
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
||||||
|
|
||||||
${CHIPDIR}/dsp1emu.o: ${CHIPDIR}/dsp1emu.c betauser.mac
|
${CHIPDIR}/dsp1emu.o: ${CHIPDIR}/dsp1emu.c betauser.mac
|
||||||
ui.o: ui.asm macros.mac betauser.mac
|
ui.o: ui.asm macros.mac betauser.mac
|
||||||
cfgload.o:cfgload.asm macros.mac
|
cfgload.o:cfgload.asm macros.mac
|
||||||
init.o:init.asm macros.mac
|
init.o:init.asm macros.mac
|
||||||
${DOSDIR}/debug.o: ${DOSDIR}/debug.asm macros.mac
|
${DOSDIR}/debug.o: ${DOSDIR}/debug.asm macros.mac
|
||||||
${CPUDIR}/execute.o: ${CPUDIR}/execute.asm macros.mac
|
${CPUDIR}/execute.o: ${CPUDIR}/execute.asm macros.mac
|
||||||
${CPUDIR}/table.o: ${CPUDIR}/table.asm ${CPUDIR}/65816d.inc\
|
${CPUDIR}/table.o: ${CPUDIR}/table.asm ${CPUDIR}/65816d.inc\
|
||||||
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\
|
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\
|
||||||
${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac\
|
${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac\
|
||||||
${CPUDIR}/regsw.inc macros.mac
|
${CPUDIR}/regsw.inc macros.mac
|
||||||
${CPUDIR}/tableb.o: ${CPUDIR}/tableb.asm ${CPUDIR}/65816db.inc\
|
${CPUDIR}/tableb.o: ${CPUDIR}/tableb.asm ${CPUDIR}/65816db.inc\
|
||||||
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816b.inc\
|
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816b.inc\
|
||||||
${CPUDIR}/regs.mac macros.mac
|
${CPUDIR}/regs.mac macros.mac
|
||||||
${CPUDIR}/tablec.o: ${CPUDIR}/tablec.asm ${CPUDIR}/65816dc.inc\
|
${CPUDIR}/tablec.o: ${CPUDIR}/tablec.asm ${CPUDIR}/65816dc.inc\
|
||||||
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816c.inc\
|
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816c.inc\
|
||||||
${CPUDIR}/regs.mac macros.mac
|
${CPUDIR}/regs.mac macros.mac
|
||||||
${CPUDIR}/stable.o: ${CPUDIR}/stable.asm ${CPUDIR}/s65816d.inc\
|
${CPUDIR}/stable.o: ${CPUDIR}/stable.asm ${CPUDIR}/s65816d.inc\
|
||||||
${CPUDIR}/saddress.inc ${CPUDIR}/saddrni.inc ${CPUDIR}/se65816.inc\
|
${CPUDIR}/saddress.inc ${CPUDIR}/saddrni.inc ${CPUDIR}/se65816.inc\
|
||||||
macros.mac
|
macros.mac
|
||||||
${CPUDIR}/memory.o: ${CPUDIR}/memory.asm macros.mac
|
${CPUDIR}/memory.o: ${CPUDIR}/memory.asm macros.mac
|
||||||
${CPUDIR}/dma.o: ${CPUDIR}/dma.asm macros.mac
|
${CPUDIR}/dma.o: ${CPUDIR}/dma.asm macros.mac
|
||||||
${DOSDIR}/dosintrf.o: ${DOSDIR}/dosintrf.asm macros.mac
|
${DOSDIR}/dosintrf.o: ${DOSDIR}/dosintrf.asm macros.mac
|
||||||
vcache.o:vcache.asm macros.mac
|
vcache.o:vcache.asm macros.mac
|
||||||
${DOSDIR}/initvid.o:${DOSDIR}/initvid.asm macros.mac
|
${DOSDIR}/initvid.o:${DOSDIR}/initvid.asm macros.mac
|
||||||
${VIDEODIR}/makevid.o: ${VIDEODIR}/makevid.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/makevid.o: ${VIDEODIR}/makevid.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/makev16b.o: ${VIDEODIR}/makev16b.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/makev16b.o: ${VIDEODIR}/makev16b.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/makev16t.o: ${VIDEODIR}/makev16t.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/makev16t.o: ${VIDEODIR}/makev16t.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mv16tms.o: ${VIDEODIR}/mv16tms.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/mv16tms.o: ${VIDEODIR}/mv16tms.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode7.o: ${VIDEODIR}/mode7.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode7.o: ${VIDEODIR}/mode7.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716.o: ${VIDEODIR}/mode716.asm ${VIDEODIR}/mode716.mac\
|
${VIDEODIR}/mode716.o: ${VIDEODIR}/mode716.asm ${VIDEODIR}/mode716.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716b.o:${VIDEODIR}/mode716b.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode716b.o:${VIDEODIR}/mode716b.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716t.o:${VIDEODIR}/mode716t.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode716t.o:${VIDEODIR}/mode716t.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716d.o:${VIDEODIR}/mode716d.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode716d.o:${VIDEODIR}/mode716d.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode7ext.o:${VIDEODIR}/mode7ext.asm macros.mac
|
${VIDEODIR}/mode7ext.o:${VIDEODIR}/mode7ext.asm macros.mac
|
||||||
${VIDEODIR}/mode716e.o:${VIDEODIR}/mode716e.asm macros.mac
|
${VIDEODIR}/mode716e.o:${VIDEODIR}/mode716e.asm macros.mac
|
||||||
${VIDEODIR}/m716text.o:${VIDEODIR}/m716text.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/m716text.o:${VIDEODIR}/m716text.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${CPUDIR}/irq.o: ${CPUDIR}/irq.asm macros.mac
|
${CPUDIR}/irq.o: ${CPUDIR}/irq.asm macros.mac
|
||||||
${CPUDIR}/dspproc.o: ${CPUDIR}/dspproc.asm macros.mac
|
${CPUDIR}/dspproc.o: ${CPUDIR}/dspproc.asm macros.mac
|
||||||
${CPUDIR}/spc700.o:${CPUDIR}/spc700.asm macros.mac\
|
${CPUDIR}/spc700.o:${CPUDIR}/spc700.asm macros.mac\
|
||||||
${CPUDIR}/regsw.mac ${CPUDIR}/spcdef.inc ${CPUDIR}/spcaddr.inc
|
${CPUDIR}/regsw.mac ${CPUDIR}/spcdef.inc ${CPUDIR}/spcaddr.inc
|
||||||
${CPUDIR}/dsp.o: ${CPUDIR}/dsp.asm macros.mac
|
${CPUDIR}/dsp.o: ${CPUDIR}/dsp.asm macros.mac
|
||||||
${DOSDIR}/vesa2.o: ${DOSDIR}/vesa2.asm macros.mac
|
${DOSDIR}/vesa2.o: ${DOSDIR}/vesa2.asm macros.mac
|
||||||
${DOSDIR}/vesa12.o: ${DOSDIR}/vesa12.asm macros.mac
|
${DOSDIR}/vesa12.o: ${DOSDIR}/vesa12.asm macros.mac
|
||||||
${DOSDIR}/joy.o: ${DOSDIR}/joy.asm macros.mac
|
${DOSDIR}/joy.o: ${DOSDIR}/joy.asm macros.mac
|
||||||
${DOSDIR}/sw.o: ${DOSDIR}/sw.asm macros.mac
|
${DOSDIR}/sw.o: ${DOSDIR}/sw.asm macros.mac
|
||||||
${GUIDIR}/gui.o: ${GUIDIR}/gui.asm ${GUIDIR}/guitools.inc\
|
${GUIDIR}/gui.o: ${GUIDIR}/gui.asm ${GUIDIR}/guitools.inc\
|
||||||
${GUIDIR}/guimisc.inc ${GUIDIR}/guimouse.inc ${GUIDIR}/guiwindp.inc\
|
${GUIDIR}/guimisc.inc ${GUIDIR}/guimouse.inc ${GUIDIR}/guiwindp.inc\
|
||||||
${GUIDIR}/guinetpl.inc ${GUIDIR}/guikeys.inc ${GUIDIR}/guicheat.inc\
|
${GUIDIR}/guinetpl.inc ${GUIDIR}/guikeys.inc ${GUIDIR}/guicheat.inc\
|
||||||
${GUIDIR}/guicombo.inc ${GUIDIR}/guiload.inc macros.mac
|
${GUIDIR}/guicombo.inc ${GUIDIR}/guiload.inc macros.mac
|
||||||
${GUIDIR}/menu.o: ${GUIDIR}/menu.asm macros.mac
|
${GUIDIR}/menu.o: ${GUIDIR}/menu.asm macros.mac
|
||||||
${VIDEODIR}/newgfx.o:${VIDEODIR}/newgfx.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/newgfx.o:${VIDEODIR}/newgfx.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
${VIDEODIR}/newgfx2.mac ${VIDEODIR}/newgfx.mac macros.mac
|
${VIDEODIR}/newgfx2.mac ${VIDEODIR}/newgfx.mac macros.mac
|
||||||
${VIDEODIR}/newgfx2.o:${VIDEODIR}/newgfx2.asm ${VIDEODIR}/newgfxwn.mac\
|
${VIDEODIR}/newgfx2.o:${VIDEODIR}/newgfx2.asm ${VIDEODIR}/newgfxwn.mac\
|
||||||
${VIDEODIR}/newgfx.mac macros.mac
|
${VIDEODIR}/newgfx.mac macros.mac
|
||||||
${VIDEODIR}/newgfx16.o: ${VIDEODIR}/newgfx16.asm macros.mac ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/newgfx16.o: ${VIDEODIR}/newgfx16.asm macros.mac ${VIDEODIR}/vidmacro.mac\
|
||||||
${VIDEODIR}/newgfx16.mac ${VIDEODIR}/newg162.mac
|
${VIDEODIR}/newgfx16.mac ${VIDEODIR}/newg162.mac
|
||||||
${VIDEODIR}/newg162.o: macros.mac ${VIDEODIR}/newg162.asm ${VIDEODIR}/newg162.mac\
|
${VIDEODIR}/newg162.o: macros.mac ${VIDEODIR}/newg162.asm ${VIDEODIR}/newg162.mac\
|
||||||
${VIDEODIR}/vidmacro.mac ${VIDEODIR}/newg16wn.mac
|
${VIDEODIR}/vidmacro.mac ${VIDEODIR}/newg16wn.mac
|
||||||
${CHIPDIR}/fxemu2.o: ${CHIPDIR}/fxemu2.asm ${CHIPDIR}/fxemu2.mac\
|
${CHIPDIR}/fxemu2.o: ${CHIPDIR}/fxemu2.asm ${CHIPDIR}/fxemu2.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${CHIPSDIR}/fxemu2b.o: ${CHIPDIR}/fxemu2b.asm ${CHIPDIR}/fxemu2.mac\
|
${CHIPSDIR}/fxemu2b.o: ${CHIPDIR}/fxemu2b.asm ${CHIPDIR}/fxemu2.mac\
|
||||||
${CHIPDIR}/fxemu2b.mac
|
${CHIPDIR}/fxemu2b.mac
|
||||||
${CHIPSDIR}/fxemu2c.o: ${CHIPDIR}/fxemu2c.asm macros.mac ${CHIPDIR}/fxemu2.mac\
|
${CHIPSDIR}/fxemu2c.o: ${CHIPDIR}/fxemu2c.asm macros.mac ${CHIPDIR}/fxemu2.mac\
|
||||||
${CHIPDIR}/fxemu2b.mac ${CHIPDIR}/fxemu2c.mac
|
${CHIPDIR}/fxemu2b.mac ${CHIPDIR}/fxemu2c.mac
|
||||||
${CHIPDIR}/fxtable.o: ${CHIPDIR}/fxtable.asm macros.mac
|
${CHIPDIR}/fxtable.o: ${CHIPDIR}/fxtable.asm macros.mac
|
||||||
${DOSDIR}/gppro.o: ${DOSDIR}/gppro.asm macros.mac
|
${DOSDIR}/gppro.o: ${DOSDIR}/gppro.asm macros.mac
|
||||||
${DOSDIR}/zsipx.o: ${DOSDIR}/zsipx.asm
|
${DOSDIR}/zsipx.o: ${DOSDIR}/zsipx.asm
|
||||||
${CHIPDIR}/sa1proc.o: ${CHIPDIR}/sa1proc.asm macros.mac
|
${CHIPDIR}/sa1proc.o: ${CHIPDIR}/sa1proc.asm macros.mac
|
||||||
endmem.o: endmem.asm macros.mac
|
endmem.o: endmem.asm macros.mac
|
||||||
${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac
|
${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
del *.o
|
del *.o
|
||||||
del ${CHIPDIR}\*.o
|
del ${CHIPDIR}\*.o
|
||||||
del ${CPUDIR}\*.o
|
del ${CPUDIR}\*.o
|
||||||
del ${VIDEODIR}\*.o
|
del ${VIDEODIR}\*.o
|
||||||
del ${GUIDIR}\*.o
|
del ${GUIDIR}\*.o
|
||||||
del ${DOSDIR}\*.o
|
del ${DOSDIR}\*.o
|
||||||
del zsnes.exe
|
del zsnes.exe
|
||||||
|
|
||||||
@@ -1,212 +1,211 @@
|
|||||||
#Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
#Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
#
|
#
|
||||||
#This program is free software; you can redistribute it and/or
|
#This program is free software; you can redistribute it and/or
|
||||||
#modify it under the terms of the GNU General Public License
|
#modify it under the terms of the GNU General Public License
|
||||||
#as published by the Free Software Foundation; either
|
#as published by the Free Software Foundation; either
|
||||||
#version 2 of the License, or (at your option) any later
|
#version 2 of the License, or (at your option) any later
|
||||||
#version.
|
#version.
|
||||||
#
|
#
|
||||||
#This program is distributed in the hope that it will be useful,
|
#This program is distributed in the hope that it will be useful,
|
||||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
#GNU General Public License for more details.
|
#GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
#You should have received a copy of the GNU General Public License
|
#You should have received a copy of the GNU General Public License
|
||||||
#along with this program; if not, write to the Free Software
|
#along with this program; if not, write to the Free Software
|
||||||
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
#This file depends on link.win32 so if you modify this makefile,
|
#This file depends on link.win32 so if you modify this makefile,
|
||||||
#don't forget to update link.win32
|
#don't forget to update link.win32
|
||||||
#it is quite ugly but without that trick, the compilation didn't
|
#it is quite ugly but without that trick, the compilation didn't
|
||||||
#work for me (command line too long)
|
#work for me (command line too long)
|
||||||
|
|
||||||
#put the correct path to your directx sdk here
|
#put the correct path to your directx sdk here
|
||||||
DXDIR=f:\mssdk
|
DXDIR=f:\mssdk
|
||||||
|
|
||||||
CHIPDIR=chips
|
CHIPDIR=chips
|
||||||
CPUDIR=cpu
|
CPUDIR=cpu
|
||||||
DOSDIR=dos
|
DOSDIR=dos
|
||||||
GUIDIR=gui
|
GUIDIR=gui
|
||||||
VIDEODIR=video
|
VIDEODIR=video
|
||||||
WINDIR=win
|
WINDIR=win
|
||||||
OBJDIR=obj
|
OBJDIR=obj
|
||||||
|
|
||||||
CHIPSOBJ=${CHIPDIR}/sfxproc.obj ${CHIPDIR}/fxemu2.obj ${CHIPDIR}/dsp1proc.obj\
|
CHIPSOBJ=${CHIPDIR}/sfxproc.obj ${CHIPDIR}/fxemu2.obj ${CHIPDIR}/dsp1proc.obj\
|
||||||
${CHIPDIR}/fxemu2b.obj ${CHIPDIR}/fxemu2c.obj ${CHIPDIR}/fxtable.obj\
|
${CHIPDIR}/fxemu2b.obj ${CHIPDIR}/fxemu2c.obj ${CHIPDIR}/fxtable.obj\
|
||||||
${CHIPDIR}/sa1proc.obj ${CHIPDIR}/sa1regs.obj ${CHIPDIR}/dsp1emu.obj
|
${CHIPDIR}/sa1proc.obj ${CHIPDIR}/sa1regs.obj ${CHIPDIR}/dsp1emu.obj
|
||||||
|
|
||||||
CPUOBJ=${CPUDIR}/addrni.obj ${CPUDIR}/dma.obj ${CPUDIR}/dsp.obj ${CPUDIR}/dspproc.obj\
|
CPUOBJ=${CPUDIR}/addrni.obj ${CPUDIR}/dma.obj ${CPUDIR}/dsp.obj ${CPUDIR}/dspproc.obj\
|
||||||
${CPUDIR}/execute.obj ${CPUDIR}/irq.obj ${CPUDIR}/memory.obj \
|
${CPUDIR}/execute.obj ${CPUDIR}/irq.obj ${CPUDIR}/memory.obj \
|
||||||
${CPUDIR}/spc700.obj ${CPUDIR}/stable.obj ${CPUDIR}/table.obj\
|
${CPUDIR}/spc700.obj ${CPUDIR}/stable.obj ${CPUDIR}/table.obj\
|
||||||
${CPUDIR}/tableb.obj ${CPUDIR}/tablec.obj
|
${CPUDIR}/tableb.obj ${CPUDIR}/tablec.obj
|
||||||
|
|
||||||
GUIOBJ=${GUIDIR}/gui.obj ${GUIDIR}/menu.obj
|
GUIOBJ=${GUIDIR}/gui.obj ${GUIDIR}/menu.obj
|
||||||
|
|
||||||
VIDEOBJ=${VIDEODIR}/makev16b.obj ${VIDEODIR}/makev16t.obj ${VIDEODIR}/makevid.obj\
|
VIDEOBJ=${VIDEODIR}/makev16b.obj ${VIDEODIR}/makev16t.obj ${VIDEODIR}/makevid.obj\
|
||||||
${VIDEODIR}/mode716.obj ${VIDEODIR}/mode716b.obj ${VIDEODIR}/mode716d.obj\
|
${VIDEODIR}/mode716.obj ${VIDEODIR}/mode716b.obj ${VIDEODIR}/mode716d.obj\
|
||||||
${VIDEODIR}/mode716e.obj ${VIDEODIR}/mode716t.obj ${VIDEODIR}/mode7.obj\
|
${VIDEODIR}/mode716e.obj ${VIDEODIR}/mode716t.obj ${VIDEODIR}/mode7.obj\
|
||||||
${VIDEODIR}/mode7ext.obj ${VIDEODIR}/mv16tms.obj ${VIDEODIR}/newg162.obj\
|
${VIDEODIR}/mode7ext.obj ${VIDEODIR}/mv16tms.obj ${VIDEODIR}/newg162.obj\
|
||||||
${VIDEODIR}/newgfx16.obj ${VIDEODIR}/newgfx2.obj ${VIDEODIR}/newgfx.obj\
|
${VIDEODIR}/newgfx16.obj ${VIDEODIR}/newgfx2.obj ${VIDEODIR}/newgfx.obj\
|
||||||
${VIDEODIR}/m716text.obj ${VIDEODIR}/2xsaiw.obj ${VIDEODIR}/2xsai.obj\
|
${VIDEODIR}/m716text.obj ${VIDEODIR}/2xsaiw.obj ${VIDEODIR}/2xsai.obj\
|
||||||
${VIDEODIR}/procvid.obj
|
${VIDEODIR}/procvid.obj
|
||||||
|
|
||||||
WINOBJ=${WINDIR}/copyvwin.obj ${WINDIR}/winintrf.obj ${WINDIR}/winlink.obj\
|
WINOBJ=${WINDIR}/copyvwin.obj ${WINDIR}/winintrf.obj ${WINDIR}/winlink.obj\
|
||||||
${WINDIR}/zloaderw.obj ${WINDIR}/ztcp.obj ${WINDIR}/zipxw.obj\
|
${WINDIR}/zloaderw.obj ${WINDIR}/ztcp.obj ${WINDIR}/zipxw.obj\
|
||||||
${WINDIR}/zfilew.obj
|
${WINDIR}/zfilew.obj
|
||||||
|
|
||||||
WINDOSOBJ=${DOSDIR}/debug.obj ${DOSDIR}/joy.obj ${DOSDIR}/modemrtn.obj ${DOSDIR}/vesa2.obj\
|
WINDOSOBJ=${DOSDIR}/debug.obj ${DOSDIR}/joy.obj ${DOSDIR}/modemrtn.obj ${DOSDIR}/vesa2.obj\
|
||||||
${DOSDIR}/initvid.obj ${DOSDIR}/sw.obj ${DOSDIR}/gppro.obj ${DOSDIR}/vesa12.obj
|
${DOSDIR}/initvid.obj ${DOSDIR}/sw.obj ${DOSDIR}/gppro.obj ${DOSDIR}/vesa12.obj
|
||||||
|
|
||||||
PREOBJ=${OBJDIR}/unzip.obj ${OBJDIR}/zzip.obj ${DOSDIR}/zsipx.obj
|
PREOBJ=${OBJDIR}/unzip.obj ${OBJDIR}/zzip.obj ${DOSDIR}/zsipx.obj
|
||||||
|
|
||||||
MAINOBJ=cfgload.obj endmem.obj fixsin.obj init.obj ui.obj vcache.obj water.obj
|
MAINOBJ=cfgload.obj endmem.obj fixsin.obj init.obj ui.obj vcache.obj water.obj
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ} ${WINDOSOBJ}
|
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ} ${WINDOSOBJ}
|
||||||
LIBS=
|
LIBS=
|
||||||
CFLAGS=/c
|
CFLAGS=/c
|
||||||
ASM=nasm
|
ASM=nasm
|
||||||
ASMFLAGS=-f win32
|
ASMFLAGS=-f win32
|
||||||
CC=cl
|
CC=cl
|
||||||
|
|
||||||
.SUFFIXES: .c .cpp .asm
|
.SUFFIXES: .c .cpp .asm
|
||||||
|
|
||||||
%.obj : %.c
|
%.obj : %.c
|
||||||
${CC} ${CFLAGS} /Fo$@ $<
|
${CC} ${CFLAGS} /Fo$@ $<
|
||||||
|
|
||||||
%.obj: %.cpp
|
%.obj: %.cpp
|
||||||
${CC} ${CFLAGS} /Fo$@ $<
|
${CC} ${CFLAGS} /Fo$@ $<
|
||||||
|
|
||||||
%.obj: %.asm
|
%.obj: %.asm
|
||||||
${ASM} ${ASMFLAGS} -o $@ $<
|
${ASM} ${ASMFLAGS} -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
ALL: zsnesw.exe
|
ALL: zsnesw.exe
|
||||||
|
|
||||||
zsnesw.exe: ${OBJS} ${WINDIR}/zsnes.res
|
zsnesw.exe: ${OBJS} ${WINDIR}/zsnes.res
|
||||||
cl @link.win32 ${WINDIR}/zsnes.res /link /libpath:${DXDIR}\lib
|
cl @link.win32 ${WINDIR}/zsnes.res /link /libpath:${DXDIR}\lib
|
||||||
|
|
||||||
${WINDIR}/zsnes.res: ${WINDIR}/zsnes.rc
|
${WINDIR}/zsnes.res: ${WINDIR}/zsnes.rc
|
||||||
rc ${WINDIR}/zsnes.rc
|
rc ${WINDIR}/zsnes.rc
|
||||||
${WINDIR}/copyvwin.obj: ${WINDIR}/copyvwin.asm macros.mac
|
${WINDIR}/copyvwin.obj: ${WINDIR}/copyvwin.asm macros.mac
|
||||||
${WINDIR}/winintrf.obj: ${WINDIR}/winintrf.asm macros.mac
|
${WINDIR}/winintrf.obj: ${WINDIR}/winintrf.asm macros.mac
|
||||||
${WINDIR}/zfilew.obj: ${WINDIR}/zfilew.c
|
${WINDIR}/zfilew.obj: ${WINDIR}/zfilew.c
|
||||||
${WINDIR}/zipxw.obj: ${WINDIR}/zipxw.c
|
${WINDIR}/zipxw.obj: ${WINDIR}/zipxw.c
|
||||||
${WINDIR}/zloaderw.obj: ${WINDIR}/zloaderw.c
|
${WINDIR}/zloaderw.obj: ${WINDIR}/zloaderw.c
|
||||||
${WINDIR}/ztcp.obj: ${WINDIR}/ztcp.c
|
${WINDIR}/ztcp.obj: ${WINDIR}/ztcp.c
|
||||||
${WINDIR}/winlink.obj: ${WINDIR}/winlink.cpp ${WINDIR}/resource.h
|
${WINDIR}/winlink.obj: ${WINDIR}/winlink.cpp ${WINDIR}/resource.h
|
||||||
${DOSDIR}/initvid.o:${DOSDIR}/initvid.asm macros.mac
|
${DOSDIR}/initvid.o:${DOSDIR}/initvid.asm macros.mac
|
||||||
${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac
|
${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac
|
||||||
${DOSDIR}/zsipx.o: ${DOSDIR}/zsipx.asm
|
${DOSDIR}/zsipx.o: ${DOSDIR}/zsipx.asm
|
||||||
${DOSDIR}/debug.obj: ${DOSDIR}/debug.asm macros.mac
|
${DOSDIR}/debug.obj: ${DOSDIR}/debug.asm macros.mac
|
||||||
${DOSDIR}/joy.obj: ${DOSDIR}/joy.asm macros.mac
|
${DOSDIR}/joy.obj: ${DOSDIR}/joy.asm macros.mac
|
||||||
${DOSDIR}/vesa2.obj: ${DOSDIR}/vesa2.asm macros.mac
|
${DOSDIR}/vesa2.obj: ${DOSDIR}/vesa2.asm macros.mac
|
||||||
${DOSDIR}/gppro.o: ${DOSDIR}/gppro.asm macros.mac
|
${DOSDIR}/gppro.o: ${DOSDIR}/gppro.asm macros.mac
|
||||||
${DOSDIR}/sw.o: ${DOSDIR}/sw.asm macros.mac
|
${DOSDIR}/sw.o: ${DOSDIR}/sw.asm macros.mac
|
||||||
${DOSDIR}/vesa12.o: ${DOSDIR}/vesa12.asm macros.mac
|
${DOSDIR}/vesa12.o: ${DOSDIR}/vesa12.asm macros.mac
|
||||||
fixsin.obj: fixsin.c
|
fixsin.obj: fixsin.c
|
||||||
water.obj: water.c
|
water.obj: water.c
|
||||||
${VIDEODIR}/2xsaiw.obj: ${VIDEODIR}/2xsaiw.asm macros.mac
|
${VIDEODIR}/2xsaiw.obj: ${VIDEODIR}/2xsaiw.asm macros.mac
|
||||||
${VIDEODIR}/2xsai.obj: ${VIDEODIR}/2xsai.cpp
|
${VIDEODIR}/2xsai.obj: ${VIDEODIR}/2xsai.cpp
|
||||||
${VIDEODIR}/procvid.obj: ${VIDEODIR}/procvid.asm macros.mac ${VIDEODIR}/copyvid.inc ${VIDEODIR}/2xSaImmx.inc
|
${VIDEODIR}/procvid.obj: ${VIDEODIR}/procvid.asm macros.mac ${VIDEODIR}/copyvid.inc ${VIDEODIR}/2xSaImmx.inc
|
||||||
${CHIPDIR}/sa1regs.obj: ${CHIPDIR}/sa1regs.asm macros.mac\
|
${CHIPDIR}/sa1regs.obj: ${CHIPDIR}/sa1regs.asm macros.mac\
|
||||||
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
||||||
${CHIPDIR}/sfxproc.obj: ${CHIPDIR}/sfxproc.asm macros.mac\
|
${CHIPDIR}/sfxproc.obj: ${CHIPDIR}/sfxproc.asm macros.mac\
|
||||||
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
|
||||||
|
|
||||||
${CHIPDIR}/dsp1emu.obj: ${CHIPDIR}/dsp1emu.c betauser.mac
|
${CHIPDIR}/dsp1emu.obj: ${CHIPDIR}/dsp1emu.c betauser.mac
|
||||||
${CHIPDIR}/dsp1proc.obj: ${CHIPDIR}/dsp1proc.asm macros.mac
|
${CHIPDIR}/dsp1proc.obj: ${CHIPDIR}/dsp1proc.asm macros.mac
|
||||||
ui.obj: ui.asm macros.mac betauser.mac
|
ui.obj: ui.asm macros.mac betauser.mac
|
||||||
cfgload.obj:cfgload.asm macros.mac
|
cfgload.obj:cfgload.asm macros.mac
|
||||||
init.obj:init.asm macros.mac
|
init.obj:init.asm macros.mac
|
||||||
${DOSDIR}/debug.obj: ${DOSDIR}/debug.asm macros.mac
|
${DOSDIR}/debug.obj: ${DOSDIR}/debug.asm macros.mac
|
||||||
${CPUDIR}/addrni.obj: ${CPUDIR}/addrni.asm
|
${CPUDIR}/addrni.obj: ${CPUDIR}/addrni.asm
|
||||||
${CPUDIR}/execute.obj: ${CPUDIR}/execute.asm macros.mac
|
${CPUDIR}/execute.obj: ${CPUDIR}/execute.asm macros.mac
|
||||||
${CPUDIR}/table.obj: ${CPUDIR}/table.asm ${CPUDIR}/65816d.inc\
|
${CPUDIR}/table.obj: ${CPUDIR}/table.asm ${CPUDIR}/65816d.inc\
|
||||||
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\
|
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\
|
||||||
${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac\
|
${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac\
|
||||||
${CPUDIR}/regsw.inc macros.mac
|
${CPUDIR}/regsw.inc macros.mac
|
||||||
${CPUDIR}/tableb.obj: ${CPUDIR}/tableb.asm ${CPUDIR}/65816db.inc\
|
${CPUDIR}/tableb.obj: ${CPUDIR}/tableb.asm ${CPUDIR}/65816db.inc\
|
||||||
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816b.inc\
|
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816b.inc\
|
||||||
${CPUDIR}/regs.mac macros.mac
|
${CPUDIR}/regs.mac macros.mac
|
||||||
${CPUDIR}/tablec.obj: ${CPUDIR}/tablec.asm ${CPUDIR}/65816dc.inc\
|
${CPUDIR}/tablec.obj: ${CPUDIR}/tablec.asm ${CPUDIR}/65816dc.inc\
|
||||||
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816c.inc\
|
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816c.inc\
|
||||||
${CPUDIR}/regs.mac macros.mac
|
${CPUDIR}/regs.mac macros.mac
|
||||||
${CPUDIR}/stable.obj: ${CPUDIR}/stable.asm ${CPUDIR}/s65816d.inc\
|
${CPUDIR}/stable.obj: ${CPUDIR}/stable.asm ${CPUDIR}/s65816d.inc\
|
||||||
${CPUDIR}/saddress.inc ${CPUDIR}/saddrni.inc ${CPUDIR}/se65816.inc\
|
${CPUDIR}/saddress.inc ${CPUDIR}/saddrni.inc ${CPUDIR}/se65816.inc\
|
||||||
macros.mac
|
macros.mac
|
||||||
${CPUDIR}/memory.obj: ${CPUDIR}/memory.asm macros.mac
|
${CPUDIR}/memory.obj: ${CPUDIR}/memory.asm macros.mac
|
||||||
${CPUDIR}/dma.obj: ${CPUDIR}/dma.asm macros.mac
|
${CPUDIR}/dma.obj: ${CPUDIR}/dma.asm macros.mac
|
||||||
${DOSDIR}/dosintrf.obj: ${DOSDIR}/dosintrf.asm macros.mac
|
${DOSDIR}/dosintrf.obj: ${DOSDIR}/dosintrf.asm macros.mac
|
||||||
vcache.obj:vcache.asm macros.mac
|
vcache.obj:vcache.asm macros.mac
|
||||||
${DOSDIR}/initvid.obj:${DOSDIR}/initvid.asm macros.mac
|
${DOSDIR}/initvid.obj:${DOSDIR}/initvid.asm macros.mac
|
||||||
${VIDEODIR}/makevid.obj: ${VIDEODIR}/makevid.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/makevid.obj: ${VIDEODIR}/makevid.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/makev16b.obj: ${VIDEODIR}/makev16b.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/makev16b.obj: ${VIDEODIR}/makev16b.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/makev16t.obj: ${VIDEODIR}/makev16t.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/makev16t.obj: ${VIDEODIR}/makev16t.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mv16tms.obj: ${VIDEODIR}/mv16tms.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/mv16tms.obj: ${VIDEODIR}/mv16tms.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode7.obj: ${VIDEODIR}/mode7.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode7.obj: ${VIDEODIR}/mode7.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716.obj: ${VIDEODIR}/mode716.asm ${VIDEODIR}/mode716.mac\
|
${VIDEODIR}/mode716.obj: ${VIDEODIR}/mode716.asm ${VIDEODIR}/mode716.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716b.obj:${VIDEODIR}/mode716b.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode716b.obj:${VIDEODIR}/mode716b.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716t.obj:${VIDEODIR}/mode716t.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode716t.obj:${VIDEODIR}/mode716t.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode716d.obj:${VIDEODIR}/mode716d.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/mode716d.obj:${VIDEODIR}/mode716d.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${VIDEODIR}/mode7ext.obj:${VIDEODIR}/mode7ext.asm macros.mac
|
${VIDEODIR}/mode7ext.obj:${VIDEODIR}/mode7ext.asm macros.mac
|
||||||
${VIDEODIR}/mode716e.obj:${VIDEODIR}/mode716e.asm macros.mac
|
${VIDEODIR}/mode716e.obj:${VIDEODIR}/mode716e.asm macros.mac
|
||||||
${VIDEODIR}/m716text.obj:${VIDEODIR}/m716text.asm ${VIDEODIR}/mode7.mac\
|
${VIDEODIR}/m716text.obj:${VIDEODIR}/m716text.asm ${VIDEODIR}/mode7.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${CPUDIR}/irq.obj: ${CPUDIR}/irq.asm macros.mac
|
${CPUDIR}/irq.obj: ${CPUDIR}/irq.asm macros.mac
|
||||||
${CPUDIR}/dspproc.obj: ${CPUDIR}/dspproc.asm macros.mac
|
${CPUDIR}/dspproc.obj: ${CPUDIR}/dspproc.asm macros.mac
|
||||||
${CPUDIR}/spc700.obj:${CPUDIR}/spc700.asm macros.mac\
|
${CPUDIR}/spc700.obj:${CPUDIR}/spc700.asm macros.mac\
|
||||||
${CPUDIR}/regsw.mac ${CPUDIR}/spcdef.inc ${CPUDIR}/spcaddr.inc
|
${CPUDIR}/regsw.mac ${CPUDIR}/spcdef.inc ${CPUDIR}/spcaddr.inc
|
||||||
${CPUDIR}/dsp.obj: ${CPUDIR}/dsp.asm macros.mac
|
${CPUDIR}/dsp.obj: ${CPUDIR}/dsp.asm macros.mac
|
||||||
${DOSDIR}/vesa2.obj: ${DOSDIR}/vesa2.asm macros.mac
|
${DOSDIR}/vesa2.obj: ${DOSDIR}/vesa2.asm macros.mac
|
||||||
${DOSDIR}/vesa12.obj: ${DOSDIR}/vesa12.asm macros.mac
|
${DOSDIR}/vesa12.obj: ${DOSDIR}/vesa12.asm macros.mac
|
||||||
${DOSDIR}/joy.obj: ${DOSDIR}/joy.asm macros.mac
|
${DOSDIR}/joy.obj: ${DOSDIR}/joy.asm macros.mac
|
||||||
${DOSDIR}/sw.obj: ${DOSDIR}/sw.asm macros.mac
|
${DOSDIR}/sw.obj: ${DOSDIR}/sw.asm macros.mac
|
||||||
${GUIDIR}/gui.obj: ${GUIDIR}/gui.asm ${GUIDIR}/guitools.inc\
|
${GUIDIR}/gui.obj: ${GUIDIR}/gui.asm ${GUIDIR}/guitools.inc\
|
||||||
${GUIDIR}/guimisc.inc ${GUIDIR}/guimouse.inc ${GUIDIR}/guiwindp.inc\
|
${GUIDIR}/guimisc.inc ${GUIDIR}/guimouse.inc ${GUIDIR}/guiwindp.inc\
|
||||||
${GUIDIR}/guinetpl.inc ${GUIDIR}/guikeys.inc ${GUIDIR}/guicheat.inc\
|
${GUIDIR}/guinetpl.inc ${GUIDIR}/guikeys.inc ${GUIDIR}/guicheat.inc\
|
||||||
${GUIDIR}/guicombo.inc ${GUIDIR}/guiload.inc macros.mac
|
${GUIDIR}/guicombo.inc ${GUIDIR}/guiload.inc macros.mac
|
||||||
${GUIDIR}/menu.obj: ${GUIDIR}/menu.asm macros.mac
|
${GUIDIR}/menu.obj: ${GUIDIR}/menu.asm macros.mac
|
||||||
${VIDEODIR}/newgfx.obj:${VIDEODIR}/newgfx.asm ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/newgfx.obj:${VIDEODIR}/newgfx.asm ${VIDEODIR}/vidmacro.mac\
|
||||||
${VIDEODIR}/newgfx2.mac ${VIDEODIR}/newgfx.mac macros.mac
|
${VIDEODIR}/newgfx2.mac ${VIDEODIR}/newgfx.mac macros.mac
|
||||||
${VIDEODIR}/newgfx2.obj:${VIDEODIR}/newgfx2.asm ${VIDEODIR}/newgfxwn.mac\
|
${VIDEODIR}/newgfx2.obj:${VIDEODIR}/newgfx2.asm ${VIDEODIR}/newgfxwn.mac\
|
||||||
${VIDEODIR}/newgfx.mac macros.mac
|
${VIDEODIR}/newgfx.mac macros.mac
|
||||||
${VIDEODIR}/newgfx16.obj: ${VIDEODIR}/newgfx16.asm macros.mac ${VIDEODIR}/vidmacro.mac\
|
${VIDEODIR}/newgfx16.obj: ${VIDEODIR}/newgfx16.asm macros.mac ${VIDEODIR}/vidmacro.mac\
|
||||||
${VIDEODIR}/newgfx16.mac ${VIDEODIR}/newg162.mac
|
${VIDEODIR}/newgfx16.mac ${VIDEODIR}/newg162.mac
|
||||||
${VIDEODIR}/newg162.obj: macros.mac ${VIDEODIR}/newg162.asm ${VIDEODIR}/newg162.mac\
|
${VIDEODIR}/newg162.obj: macros.mac ${VIDEODIR}/newg162.asm ${VIDEODIR}/newg162.mac\
|
||||||
${VIDEODIR}/vidmacro.mac ${VIDEODIR}/newg16wn.mac
|
${VIDEODIR}/vidmacro.mac ${VIDEODIR}/newg16wn.mac
|
||||||
${CHIPDIR}/fxemu2.obj: ${CHIPDIR}/fxemu2.asm ${CHIPDIR}/fxemu2.mac\
|
${CHIPDIR}/fxemu2.obj: ${CHIPDIR}/fxemu2.asm ${CHIPDIR}/fxemu2.mac\
|
||||||
macros.mac
|
macros.mac
|
||||||
${CHIPDIR}/fxemu2b.obj: ${CHIPDIR}/fxemu2b.asm ${CHIPDIR}/fxemu2.mac\
|
${CHIPDIR}/fxemu2b.obj: ${CHIPDIR}/fxemu2b.asm ${CHIPDIR}/fxemu2.mac\
|
||||||
${CHIPDIR}/fxemu2b.mac
|
${CHIPDIR}/fxemu2b.mac
|
||||||
${CHIPDIR}/fxemu2c.obj: ${CHIPDIR}/fxemu2c.asm macros.mac ${CHIPDIR}/fxemu2.mac\
|
${CHIPDIR}/fxemu2c.obj: ${CHIPDIR}/fxemu2c.asm macros.mac ${CHIPDIR}/fxemu2.mac\
|
||||||
${CHIPDIR}/fxemu2b.mac ${CHIPDIR}/fxemu2c.mac
|
${CHIPDIR}/fxemu2b.mac ${CHIPDIR}/fxemu2c.mac
|
||||||
${CHIPDIR}/fxtable.obj: ${CHIPDIR}/fxtable.asm macros.mac
|
${CHIPDIR}/fxtable.obj: ${CHIPDIR}/fxtable.asm macros.mac
|
||||||
${DOSDIR}/gppro.obj: ${DOSDIR}/gppro.asm macros.mac
|
${DOSDIR}/gppro.obj: ${DOSDIR}/gppro.asm macros.mac
|
||||||
${DOSDIR}/zsipx.obj: ${DOSDIR}/zsipx.asm
|
${DOSDIR}/zsipx.obj: ${DOSDIR}/zsipx.asm
|
||||||
${CHIPDIR}/sa1proc.obj: ${CHIPDIR}/sa1proc.asm macros.mac
|
${CHIPDIR}/sa1proc.obj: ${CHIPDIR}/sa1proc.asm macros.mac
|
||||||
endmem.obj: endmem.asm macros.mac
|
endmem.obj: endmem.asm macros.mac
|
||||||
${DOSDIR}/modemrtn.obj: ${DOSDIR}/modemrtn.asm macros.mac
|
${DOSDIR}/modemrtn.obj: ${DOSDIR}/modemrtn.asm macros.mac
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
del *.obj
|
del *.obj
|
||||||
del ${CHIPDIR}\*.obj
|
del ${CHIPDIR}\*.obj
|
||||||
del ${CPUDIR}\*.obj
|
del ${CPUDIR}\*.obj
|
||||||
del ${VIDEODIR}\*.obj
|
del ${VIDEODIR}\*.obj
|
||||||
del ${GUIDIR}\*.obj
|
del ${GUIDIR}\*.obj
|
||||||
del ${WINDIR}\*.obj
|
del ${WINDIR}\*.obj
|
||||||
del ${WINDIR}\zsnes.res
|
del ${WINDIR}\zsnes.res
|
||||||
del ${DOSDIR}\*.obj
|
del ${DOSDIR}\*.obj
|
||||||
del zsnesw.exe
|
del zsnesw.exe
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7529
zsnes/src/vcache.asm
7529
zsnes/src/vcache.asm
File diff suppressed because it is too large
Load Diff
@@ -1,289 +1,288 @@
|
|||||||
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
|
||||||
//
|
//
|
||||||
//This program is free software; you can redistribute it and/or
|
//This program is free software; you can redistribute it and/or
|
||||||
//modify it under the terms of the GNU General Public License
|
//modify it under the terms of the GNU General Public License
|
||||||
//as published by the Free Software Foundation; either
|
//as published by the Free Software Foundation; either
|
||||||
//version 2 of the License, or (at your option) any later
|
//version 2 of the License, or (at your option) any later
|
||||||
//version.
|
//version.
|
||||||
//
|
//
|
||||||
//This program is distributed in the hope that it will be useful,
|
//This program is distributed in the hope that it will be useful,
|
||||||
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//GNU General Public License for more details.
|
//GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
//You should have received a copy of the GNU General Public License
|
//You should have received a copy of the GNU General Public License
|
||||||
//along with this program; if not, write to the Free Software
|
//along with this program; if not, write to the Free Software
|
||||||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
//#define MMX
|
//#define MMX
|
||||||
|
|
||||||
|
|
||||||
#define uint32 unsigned long
|
#define uint32 unsigned long
|
||||||
#define uint16 unsigned short
|
#define uint16 unsigned short
|
||||||
#define uint8 unsigned char
|
#define uint8 unsigned char
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static uint32 colorMask = 0xF7DEF7DE;
|
static uint32 colorMask = 0xF7DEF7DE;
|
||||||
static uint32 lowPixelMask = 0x08210821;
|
static uint32 lowPixelMask = 0x08210821;
|
||||||
static uint32 qcolorMask = 0xE79CE79C;
|
static uint32 qcolorMask = 0xE79CE79C;
|
||||||
static uint32 qlowpixelMask = 0x18631863;
|
static uint32 qlowpixelMask = 0x18631863;
|
||||||
static uint32 redblueMask = 0xF81F;
|
static uint32 redblueMask = 0xF81F;
|
||||||
static uint32 greenMask = 0x7E0;
|
static uint32 greenMask = 0x7E0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" void Init_2xSaI(uint32 BitFormat)
|
extern "C" void Init_2xSaI(uint32 BitFormat)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (BitFormat == 565)
|
if (BitFormat == 565)
|
||||||
{
|
{
|
||||||
colorMask = 0xF7DEF7DE;
|
colorMask = 0xF7DEF7DE;
|
||||||
lowPixelMask = 0x08210821;
|
lowPixelMask = 0x08210821;
|
||||||
qcolorMask = 0xE79CE79C;
|
qcolorMask = 0xE79CE79C;
|
||||||
qlowpixelMask = 0x18631863;
|
qlowpixelMask = 0x18631863;
|
||||||
redblueMask = 0xF81F;
|
redblueMask = 0xF81F;
|
||||||
greenMask = 0x7E0;
|
greenMask = 0x7E0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (BitFormat == 555)
|
if (BitFormat == 555)
|
||||||
{
|
{
|
||||||
colorMask = 0x7BDE7BDE;
|
colorMask = 0x7BDE7BDE;
|
||||||
lowPixelMask = 0x04210421;
|
lowPixelMask = 0x04210421;
|
||||||
qcolorMask = 0x739C739C;
|
qcolorMask = 0x739C739C;
|
||||||
qlowpixelMask = 0x0C630C63;
|
qlowpixelMask = 0x0C630C63;
|
||||||
redblueMask = 0x7C1F;
|
redblueMask = 0x7C1F;
|
||||||
greenMask = 0x3E0;
|
greenMask = 0x3E0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef MMX
|
#ifdef MMX
|
||||||
Init_2xSaIMMX(BitFormat);
|
Init_2xSaIMMX(BitFormat);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int GetResult1(uint32 A, uint32 B, uint32 C, uint32 D, uint32 E)
|
static inline int GetResult1(uint32 A, uint32 B, uint32 C, uint32 D, uint32 E)
|
||||||
{
|
{
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
if (A == C) x+=1; else if (B == C) y+=1;
|
if (A == C) x+=1; else if (B == C) y+=1;
|
||||||
if (A == D) x+=1; else if (B == D) y+=1;
|
if (A == D) x+=1; else if (B == D) y+=1;
|
||||||
if (x <= 1) r+=1;
|
if (x <= 1) r+=1;
|
||||||
if (y <= 1) r-=1;
|
if (y <= 1) r-=1;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int GetResult2(uint32 A, uint32 B, uint32 C, uint32 D, uint32 E)
|
static inline int GetResult2(uint32 A, uint32 B, uint32 C, uint32 D, uint32 E)
|
||||||
{
|
{
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
if (A == C) x+=1; else if (B == C) y+=1;
|
if (A == C) x+=1; else if (B == C) y+=1;
|
||||||
if (A == D) x+=1; else if (B == D) y+=1;
|
if (A == D) x+=1; else if (B == D) y+=1;
|
||||||
if (x <= 1) r-=1;
|
if (x <= 1) r-=1;
|
||||||
if (y <= 1) r+=1;
|
if (y <= 1) r+=1;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int GetResult(uint32 A, uint32 B, uint32 C, uint32 D)
|
static inline int GetResult(uint32 A, uint32 B, uint32 C, uint32 D)
|
||||||
{
|
{
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
if (A == C) x+=1; else if (B == C) y+=1;
|
if (A == C) x+=1; else if (B == C) y+=1;
|
||||||
if (A == D) x+=1; else if (B == D) y+=1;
|
if (A == D) x+=1; else if (B == D) y+=1;
|
||||||
if (x <= 1) r+=1;
|
if (x <= 1) r+=1;
|
||||||
if (y <= 1) r-=1;
|
if (y <= 1) r-=1;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline uint32 INTERPOLATE(uint32 A, uint32 B)
|
static inline uint32 INTERPOLATE(uint32 A, uint32 B)
|
||||||
{
|
{
|
||||||
if (A !=B)
|
if (A !=B)
|
||||||
{
|
{
|
||||||
return ( ((A & colorMask) >> 1) + ((B & colorMask) >> 1) + (A & B & lowPixelMask) );
|
return ( ((A & colorMask) >> 1) + ((B & colorMask) >> 1) + (A & B & lowPixelMask) );
|
||||||
}
|
}
|
||||||
else return A;
|
else return A;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline uint32 Q_INTERPOLATE(uint32 A, uint32 B, uint32 C, uint32 D)
|
static inline uint32 Q_INTERPOLATE(uint32 A, uint32 B, uint32 C, uint32 D)
|
||||||
{
|
{
|
||||||
register uint32 x = ((A & qcolorMask) >> 2) +
|
register uint32 x = ((A & qcolorMask) >> 2) +
|
||||||
((B & qcolorMask) >> 2) +
|
((B & qcolorMask) >> 2) +
|
||||||
((C & qcolorMask) >> 2) +
|
((C & qcolorMask) >> 2) +
|
||||||
((D & qcolorMask) >> 2);
|
((D & qcolorMask) >> 2);
|
||||||
register uint32 y = (A & qlowpixelMask) +
|
register uint32 y = (A & qlowpixelMask) +
|
||||||
(B & qlowpixelMask) +
|
(B & qlowpixelMask) +
|
||||||
(C & qlowpixelMask) +
|
(C & qlowpixelMask) +
|
||||||
(D & qlowpixelMask);
|
(D & qlowpixelMask);
|
||||||
y = (y>>2) & qlowpixelMask;
|
y = (y>>2) & qlowpixelMask;
|
||||||
return x+y;
|
return x+y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define BLUE_MASK565 0x001F001F
|
#define BLUE_MASK565 0x001F001F
|
||||||
#define RED_MASK565 0xF800F800
|
#define RED_MASK565 0xF800F800
|
||||||
#define GREEN_MASK565 0x07E007E0
|
#define GREEN_MASK565 0x07E007E0
|
||||||
|
|
||||||
#define BLUE_MASK555 0x001F001F
|
#define BLUE_MASK555 0x001F001F
|
||||||
#define RED_MASK555 0x7C007C00
|
#define RED_MASK555 0x7C007C00
|
||||||
#define GREEN_MASK555 0x03E003E0
|
#define GREEN_MASK555 0x03E003E0
|
||||||
|
|
||||||
|
|
||||||
//srcPtr equ 8
|
//srcPtr equ 8
|
||||||
//deltaPtr equ 12
|
//deltaPtr equ 12
|
||||||
//srcPitch equ 16
|
//srcPitch equ 16
|
||||||
//width equ 20
|
//width equ 20
|
||||||
//dstOffset equ 24
|
//dstOffset equ 24
|
||||||
//dstPitch equ 28
|
//dstPitch equ 28
|
||||||
//dstSegment equ 32
|
//dstSegment equ 32
|
||||||
|
|
||||||
extern "C" void Super2xSaI(uint8 *srcPtr, uint8 *deltaPtr, uint32 srcPitch,
|
extern "C" void Super2xSaI(uint8 *srcPtr, uint8 *deltaPtr, uint32 srcPitch,
|
||||||
int width, uint8 *dstPtr , uint32 dstPitch)
|
int width, uint8 *dstPtr , uint32 dstPitch)
|
||||||
{
|
{
|
||||||
uint16 *dP;
|
uint16 *dP;
|
||||||
uint16 *bP;
|
uint16 *bP;
|
||||||
uint32 inc_bP;
|
uint32 inc_bP;
|
||||||
int height = 1;
|
int height = 1;
|
||||||
uint32 dPitch = dstPitch >> 1;
|
uint32 dPitch = dstPitch >> 1;
|
||||||
uint32 Nextline = srcPitch >> 1;
|
uint32 Nextline = srcPitch >> 1;
|
||||||
|
|
||||||
{
|
{
|
||||||
inc_bP = 1;
|
inc_bP = 1;
|
||||||
|
|
||||||
// for (height; height; height-=1)
|
// for (height; height; height-=1)
|
||||||
{
|
{
|
||||||
bP = (uint16 *) srcPtr;
|
bP = (uint16 *) srcPtr;
|
||||||
dP = (uint16 *) dstPtr;
|
dP = (uint16 *) dstPtr;
|
||||||
for (uint32 finish = width; finish; finish -= inc_bP )
|
for (uint32 finish = width; finish; finish -= inc_bP )
|
||||||
{
|
{
|
||||||
uint32 color4, color5, color6;
|
uint32 color4, color5, color6;
|
||||||
uint32 color1, color2, color3;
|
uint32 color1, color2, color3;
|
||||||
uint32 colorA0, colorA1, colorA2, colorA3,
|
uint32 colorA0, colorA1, colorA2, colorA3,
|
||||||
colorB0, colorB1, colorB2, colorB3,
|
colorB0, colorB1, colorB2, colorB3,
|
||||||
colorS1, colorS2;
|
colorS1, colorS2;
|
||||||
uint32 product1a, product1b,
|
uint32 product1a, product1b,
|
||||||
product2a, product2b;
|
product2a, product2b;
|
||||||
|
|
||||||
//--------------------------------------- B1 B2
|
//--------------------------------------- B1 B2
|
||||||
// 4 5 6 S2
|
// 4 5 6 S2
|
||||||
// 1 2 3 S1
|
// 1 2 3 S1
|
||||||
// A1 A2
|
// A1 A2
|
||||||
|
|
||||||
colorB0 = *(bP- Nextline - 1);
|
colorB0 = *(bP- Nextline - 1);
|
||||||
colorB1 = *(bP- Nextline);
|
colorB1 = *(bP- Nextline);
|
||||||
colorB2 = *(bP- Nextline + 1);
|
colorB2 = *(bP- Nextline + 1);
|
||||||
colorB3 = *(bP- Nextline + 2);
|
colorB3 = *(bP- Nextline + 2);
|
||||||
|
|
||||||
color4 = *(bP - 1);
|
color4 = *(bP - 1);
|
||||||
color5 = *(bP);
|
color5 = *(bP);
|
||||||
color6 = *(bP + 1);
|
color6 = *(bP + 1);
|
||||||
colorS2 = *(bP + 2);
|
colorS2 = *(bP + 2);
|
||||||
|
|
||||||
color1 = *(bP + Nextline - 1);
|
color1 = *(bP + Nextline - 1);
|
||||||
color2 = *(bP + Nextline);
|
color2 = *(bP + Nextline);
|
||||||
color3 = *(bP + Nextline + 1);
|
color3 = *(bP + Nextline + 1);
|
||||||
colorS1 = *(bP + Nextline + 2);
|
colorS1 = *(bP + Nextline + 2);
|
||||||
|
|
||||||
colorA0 = *(bP + Nextline + Nextline - 1);
|
colorA0 = *(bP + Nextline + Nextline - 1);
|
||||||
colorA1 = *(bP + Nextline + Nextline);
|
colorA1 = *(bP + Nextline + Nextline);
|
||||||
colorA2 = *(bP + Nextline + Nextline + 1);
|
colorA2 = *(bP + Nextline + Nextline + 1);
|
||||||
colorA3 = *(bP + Nextline + Nextline + 2);
|
colorA3 = *(bP + Nextline + Nextline + 2);
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------
|
//--------------------------------------
|
||||||
if (color2 == color6 && color5 != color3)
|
if (color2 == color6 && color5 != color3)
|
||||||
{
|
{
|
||||||
product2b = product1b = color2;
|
product2b = product1b = color2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (color5 == color3 && color2 != color6)
|
if (color5 == color3 && color2 != color6)
|
||||||
{
|
{
|
||||||
product2b = product1b = color5;
|
product2b = product1b = color5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (color5 == color3 && color2 == color6)
|
if (color5 == color3 && color2 == color6)
|
||||||
{
|
{
|
||||||
register int r = 0;
|
register int r = 0;
|
||||||
|
|
||||||
r += GetResult (color6, color5, color1, colorA1);
|
r += GetResult (color6, color5, color1, colorA1);
|
||||||
r += GetResult (color6, color5, color4, colorB1);
|
r += GetResult (color6, color5, color4, colorB1);
|
||||||
r += GetResult (color6, color5, colorA2, colorS1);
|
r += GetResult (color6, color5, colorA2, colorS1);
|
||||||
r += GetResult (color6, color5, colorB2, colorS2);
|
r += GetResult (color6, color5, colorB2, colorS2);
|
||||||
|
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
product2b = product1b = color6;
|
product2b = product1b = color6;
|
||||||
else
|
else
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
product2b = product1b = color5;
|
product2b = product1b = color5;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
product2b = product1b = INTERPOLATE (color5, color6);
|
product2b = product1b = INTERPOLATE (color5, color6);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0)
|
if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0)
|
||||||
product2b = Q_INTERPOLATE (color3, color3, color3, color2);
|
product2b = Q_INTERPOLATE (color3, color3, color3, color2);
|
||||||
else
|
else
|
||||||
if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3)
|
if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3)
|
||||||
product2b = Q_INTERPOLATE (color2, color2, color2, color3);
|
product2b = Q_INTERPOLATE (color2, color2, color2, color3);
|
||||||
else
|
else
|
||||||
product2b = INTERPOLATE (color2, color3);
|
product2b = INTERPOLATE (color2, color3);
|
||||||
|
|
||||||
if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0)
|
if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0)
|
||||||
product1b = Q_INTERPOLATE (color6, color6, color6, color5);
|
product1b = Q_INTERPOLATE (color6, color6, color6, color5);
|
||||||
else
|
else
|
||||||
if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3)
|
if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3)
|
||||||
product1b = Q_INTERPOLATE (color6, color5, color5, color5);
|
product1b = Q_INTERPOLATE (color6, color5, color5, color5);
|
||||||
else
|
else
|
||||||
product1b = INTERPOLATE (color5, color6);
|
product1b = INTERPOLATE (color5, color6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2)
|
if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2)
|
||||||
product2a = INTERPOLATE (color2, color5);
|
product2a = INTERPOLATE (color2, color5);
|
||||||
else
|
else
|
||||||
if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0)
|
if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0)
|
||||||
product2a = INTERPOLATE(color2, color5);
|
product2a = INTERPOLATE(color2, color5);
|
||||||
else
|
else
|
||||||
product2a = color2;
|
product2a = color2;
|
||||||
|
|
||||||
if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2)
|
if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2)
|
||||||
product1a = INTERPOLATE (color2, color5);
|
product1a = INTERPOLATE (color2, color5);
|
||||||
else
|
else
|
||||||
if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0)
|
if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0)
|
||||||
product1a = INTERPOLATE(color2, color5);
|
product1a = INTERPOLATE(color2, color5);
|
||||||
else
|
else
|
||||||
product1a = color5;
|
product1a = color5;
|
||||||
|
|
||||||
|
|
||||||
product1a = product1a | (product1b << 16);
|
product1a = product1a | (product1b << 16);
|
||||||
product2a = product2a | (product2b << 16);
|
product2a = product2a | (product2b << 16);
|
||||||
|
|
||||||
*dP = product1a;
|
*dP = product1a;
|
||||||
*(dP + 1) = product1b;
|
*(dP + 1) = product1b;
|
||||||
*(dP + dPitch) = product2a;
|
*(dP + dPitch) = product2a;
|
||||||
*(dP + dPitch + 1) = product2b;
|
*(dP + dPitch + 1) = product2b;
|
||||||
|
|
||||||
bP ++;
|
bP ++;
|
||||||
dP += 2;
|
dP += 2;
|
||||||
}//end of for ( finish= width etc..)
|
}//end of for ( finish= width etc..)
|
||||||
|
|
||||||
srcPtr += srcPitch;
|
srcPtr += srcPitch;
|
||||||
deltaPtr += srcPitch << 1;
|
deltaPtr += srcPitch << 1;
|
||||||
}; //endof: for (height; height; height--)
|
}; //endof: for (height; height; height--)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user