mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 11:29:24 +01:00
Imported Troy Davis' (GPF) port
This commit is contained in:
parent
05d9b499d9
commit
6c37dc92c9
13
CHANGES
13
CHANGES
@ -1,3 +1,16 @@
|
|||||||
|
Changes from V4.1b to V4.2:
|
||||||
|
- Changed license to GPL
|
||||||
|
- "plain" Frodo removed, "Frodo PC" renamed to "Frodo"
|
||||||
|
- ROMs are built into the Frodo executable
|
||||||
|
- implemented write access to disk image files (D64/X64)
|
||||||
|
- Voice 3 mute works
|
||||||
|
- Unix: removed obsolete Linux joystick code, added SDL joystick support
|
||||||
|
- Unix: added fullscreen display with SDL
|
||||||
|
- Linux: added support for Catweasel SID
|
||||||
|
- Linux: more accurate timing
|
||||||
|
- BeOS: added support for digital joysticks connected to the GeekPort
|
||||||
|
- BeOS: updated to new Media Kit API
|
||||||
|
|
||||||
Changes from V4.1a to V4.1b:
|
Changes from V4.1a to V4.1b:
|
||||||
- Unix: Updated Tcl/Tk preferences editor [Gerard Decatrel]
|
- Unix: Updated Tcl/Tk preferences editor [Gerard Decatrel]
|
||||||
- Unix: Added SDL display driver which is the default if SDL >= 1.2 is
|
- Unix: Added SDL display driver which is the default if SDL >= 1.2 is
|
||||||
|
64
CHANGES.WII
64
CHANGES.WII
@ -1,64 +0,0 @@
|
|||||||
version 4:
|
|
||||||
|
|
||||||
-- Simon Kagstrom <simon.kagstrom@gmail.com>, Sun Jan 11 19:46:01 CET 2009
|
|
||||||
|
|
||||||
version 3:
|
|
||||||
* Various cleanup of the code
|
|
||||||
|
|
||||||
* Fixed a bug in the menu code which was triggered when there
|
|
||||||
is more than one submenu
|
|
||||||
|
|
||||||
* Make speed configurable (basically fast/normal/slow) and
|
|
||||||
change the menus a bit
|
|
||||||
|
|
||||||
* Skip SDL_Delay and SDL_GetTicks() which seem to give strange
|
|
||||||
results. Use gettime and usleep instead.
|
|
||||||
|
|
||||||
* Improve performance a bit more by doing a custom
|
|
||||||
blit-to-double-size implementation
|
|
||||||
|
|
||||||
* Fixed changelog format
|
|
||||||
|
|
||||||
* Bought a Classic controller and fixed so that it actually works...
|
|
||||||
|
|
||||||
* Allow controlling the joystick via the keyboard for the host (basically
|
|
||||||
to ease debugging)
|
|
||||||
|
|
||||||
-- Simon Kagstrom <simon.kagstrom@gmail.com>, Sun Jan 11 19:46:01 CET 2009
|
|
||||||
|
|
||||||
version 2:
|
|
||||||
* Also support the .prg and p00, s00 formats. Only .prg has been tested.
|
|
||||||
|
|
||||||
* Added support for classic controllers. NOTE: This is untested since I don't
|
|
||||||
have a classic controller!
|
|
||||||
|
|
||||||
* Fixed some corner-cases in the prefs setting to avoid loosing key bindings etc
|
|
||||||
|
|
||||||
* Improve keyboard bindings to handle press and release correctly and also
|
|
||||||
both controllers at the same time (key is released when the last controller releases
|
|
||||||
it)
|
|
||||||
|
|
||||||
* Handle keycode 0 and therefore make del work
|
|
||||||
|
|
||||||
* Remove the 1-1 graphics option and make stretched the default. Should avoid
|
|
||||||
"helpful and constructive" messages such as
|
|
||||||
http://wiinewz.com/forums/nintendo-news/91829-frodo-v1-0-a.html#post580580
|
|
||||||
|
|
||||||
* Improved speed just a bit (by enabling compiler optimization!)
|
|
||||||
|
|
||||||
* Only save prefs on exit
|
|
||||||
|
|
||||||
* Pause sound in the menu
|
|
||||||
|
|
||||||
* Handle very long filenames better (thanks Corey89 for pointing this out)
|
|
||||||
|
|
||||||
* Corrected file sorting
|
|
||||||
|
|
||||||
* Better Makefile
|
|
||||||
|
|
||||||
* More keycodes added (C= etc)
|
|
||||||
|
|
||||||
-- Simon Kagstrom <simon.kagstrom@gmail.com>, Sat Jan 10 17:26:32 CET 2009
|
|
||||||
|
|
||||||
version 1:
|
|
||||||
* Initial release
|
|
340
COPYING
Normal file
340
COPYING
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) 19yy <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
@ -1,37 +0,0 @@
|
|||||||
<HTML>
|
|
||||||
<HEAD>
|
|
||||||
<TITLE>The author</TITLE>
|
|
||||||
</HEAD>
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<H1>How to reach me:</H1>
|
|
||||||
<H3>Snail mail:</H3>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
Christian Bauer<BR>
|
|
||||||
Max-Planck-Str.60<BR>
|
|
||||||
55124 Mainz<BR>
|
|
||||||
Germany<P></BLOCKQUOTE>
|
|
||||||
<H3>EMail:</H3>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<A HREF="mailto:cbauer@iphcip1.physik.uni-mainz.de">cbauer@iphcip1.physik.uni-mainz.de</A><BR>
|
|
||||||
</BLOCKQUOTE><P>
|
|
||||||
|
|
||||||
Questions, criticism, suggestions and <A HREF="bugreports.html">bug
|
|
||||||
reports</A> are always welcome. EMail is preferred. In fact, the probability
|
|
||||||
that physical mail to me will be answered is virtually zero (call me lazy
|
|
||||||
:-).<P>
|
|
||||||
|
|
||||||
Questions about the Unix version should go to <A HREF="mailto:crux@pool.informatik.rwth-aachen.de">Bernd Schmidt</A>
|
|
||||||
(esp. Linux) and <A HREF="mailto:lkv@mania.robin.de">Lutz Vieweg</A> (esp. HP-UX).<P>
|
|
||||||
|
|
||||||
Questions about the Mac version should go to <A HREF="mailto:titan@indigo.ie">Richard Bannister</A>.<P>
|
|
||||||
|
|
||||||
Questions about the Win32 version should go to <A HREF="mailto:jrs@world.std.com">J. Richard Sladkey</A>.<P>
|
|
||||||
|
|
||||||
Questions about the Acorn version should go to <A HREF="mailto:dehmel@informatik.tu-muenchen.de">Andreas Dehmel</A>.<P>
|
|
||||||
|
|
||||||
Frodo is <EM>not</EM> a shareware program, but I won't reject any gifts.
|
|
||||||
<TT>:-)</TT><P>
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
@ -1,52 +0,0 @@
|
|||||||
<HTML>
|
|
||||||
<HEAD>
|
|
||||||
<TITLE>Bug reports</TITLE>
|
|
||||||
</HEAD>
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<H1>Bug reports</H1>
|
|
||||||
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
If you find a bug or a misfeature in Frodo, or have an idea how to make
|
|
||||||
some things better, then please drop me a note so I'll be able to improve
|
|
||||||
Frodo in the future. However, I'm not interested in reports about programs
|
|
||||||
that "don't work" unless you have tested them with both Frodo SC and a
|
|
||||||
real C64. My address can be found <A HREF="author.html">here</A>.
|
|
||||||
Questions about the Unix version should go to
|
|
||||||
<A HREF="mailto:crux@pool.informatik.rwth-aachen.de">Bernd Schmidt</A> (esp. Linux) and
|
|
||||||
<A HREF="mailto:lkv@mania.robin.de">Lutz Vieweg</A> (esp. HP-UX).
|
|
||||||
Questions about the Mac version should go to
|
|
||||||
<A HREF="mailto:titan@indigo.ie">Richard Bannister</A>.
|
|
||||||
Questions about the Win32 version should go to
|
|
||||||
<A HREF="mailto:jrs@world.std.com">J. Richard Sladkey</A>.
|
|
||||||
Questions about the Acorn version should go to
|
|
||||||
<A HREF="mailto:dehmel@informatik.tu-muenchen.de">Andreas Dehmel</A>.<P>
|
|
||||||
|
|
||||||
I don't think the emulation can be made much faster without changing the
|
|
||||||
concept but I'd be happy to find someone showing me how to do it.<P>
|
|
||||||
|
|
||||||
Known bugs of the BeOS version:<P>
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI>Ctrl-C in SAM doesn't work (probably a bug in the signal handling of BeOS)
|
|
||||||
<LI>The "SAM" menu option should be disabled if Frodo was started from the Tracker, but there is no way I know of to determine whether the program was launched from the Shell or the Tracker
|
|
||||||
<LI>Frodo SC doesn't work very well in full-screen mode
|
|
||||||
<LI>Double scan in full-screen mode doesn't work
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
Known bugs of the Unix version:<P>
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI>Only supports german and US keyboards
|
|
||||||
<LI>Can only use 256 color visuals
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
Known bugs of the AmigaOS version:<P>
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI>Many <TT>:-)</TT>
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
123
Docs/contact.html
Normal file
123
Docs/contact.html
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>Contact info</TITLE>
|
||||||
|
</HEAD>
|
||||||
|
<BODY>
|
||||||
|
|
||||||
|
<H1>Contact info</H1>
|
||||||
|
|
||||||
|
<CITE>
|
||||||
|
"The Silmaril as lantern light<BR>
|
||||||
|
And banner bright with living flame<BR>
|
||||||
|
To gleam thereon by Elbereth<BR>
|
||||||
|
Herself was set, who thither came."
|
||||||
|
</CITE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<H2>Authors</H2>
|
||||||
|
|
||||||
|
Frodo is the combined effort of many people:
|
||||||
|
|
||||||
|
<H3>Main program and project administration</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Christian Bauer<BR>
|
||||||
|
<A HREF="mailto:Christian.Bauer@uni-mainz.de">Christian.Bauer@uni-mainz.de</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Initial Unix port</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Bernd Schmidt<BR>
|
||||||
|
<A HREF="mailto:bernds@btinternet.com">bernds@btinternet.com</A><BR><BR>
|
||||||
|
Lutz Vieweg<BR>
|
||||||
|
<A HREF="mailto:lkv@isg.de">lkv@isg.de</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Tcl/Tk interface</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Lutz Vieweg<BR>
|
||||||
|
<A HREF="mailto:lkv@isg.de">lkv@isg.de</A><BR><BR>
|
||||||
|
Gerard Decatrel<BR>
|
||||||
|
<A HREF="mailto:deca39720@hotmail.com">deca39720@hotmail.com</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Mac OS port</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Richard Bannister<BR>
|
||||||
|
<A HREF="mailto:titan@indigo.ie">titan@indigo.ie</A><BR><BR>
|
||||||
|
Ernesto Corvi<BR>
|
||||||
|
<A HREF="mailto:macsupport@overnet.com.ar">macsupport@overnet.com.ar</A><BR><BR>
|
||||||
|
Andreas Varga<BR>
|
||||||
|
<A HREF="mailto:e9426444@student.tuwien.ac.at">e9426444@student.tuwien.ac.at</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Windows port</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
J. Richard Sladkey<BR>
|
||||||
|
<A HREF="mailto:jrs@foliage.com">jrs@foliage.com</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Risc OS port</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Andreas Dehmel<BR>
|
||||||
|
<A HREF="mailto:zarquon@t-online.de">zarquon@t-online.de</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Frodo logo design</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Tinic Urou<BR>
|
||||||
|
<A HREF="mailto:tinic@users.sourceforge.net">tinic@users.sourceforge.net</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H3>Additional contributions by</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
Marc Chabanas<BR>
|
||||||
|
<A HREF="mailto:Marc.Chabanas@france.sun.com">Marc.Chabanas@france.sun.com</A><BR><BR>
|
||||||
|
Jake Hamby<BR>
|
||||||
|
<A HREF="mailto:jehamby@anobject.com">jehamby@anobject.com</A><BR><BR>
|
||||||
|
Erik Lindberg<BR>
|
||||||
|
<A HREF="mailto:d96shade@dtek.chalmers.se">d96shade@dtek.chalmers.se</A><BR><BR>
|
||||||
|
Wolfgang Lorenz<BR><BR>
|
||||||
|
Tinic Urou<BR>
|
||||||
|
<A HREF="mailto:tinic@users.sourceforge.net">tinic@users.sourceforge.net</A><BR><BR>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<H1>Acknowledgements</H1>
|
||||||
|
|
||||||
|
Special thanks go to
|
||||||
|
|
||||||
|
<UL>
|
||||||
|
<LI><A HREF="mailto:a.boose@ldb.han.de">Andreas Boose</A> and <A HREF="mailto:marko.makela@hut.fi">Marko Mäkelä</A> who provided me with precious information on the VIC and on the C64 in general</LI>
|
||||||
|
<LI><A HREF="mailto:pst@cocoon.infra.de">Peter Stegemann</A> and <A HREF="mailto:stegeman@ai-lab.fh-furtwangen.de">Jörg Stegemann</A> who did extensive beta-testing</LI>
|
||||||
|
<LI>All the people who have sent me suggestions and comments
|
||||||
|
</UL>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<H1>Bug reports</H1>
|
||||||
|
|
||||||
|
Bug reports and general suggestions are welcome. But be warned that I'm
|
||||||
|
too lazy to handle most support requests. Questions that are specific to
|
||||||
|
running Frodo on platforms other than BeOS and Unix should be directed to
|
||||||
|
one of the maintainers of the respective port, see the list above. Send all
|
||||||
|
other stuff to:
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="mailto:Christian.Bauer@uni-mainz.de">Christian.Bauer@uni-mainz.de</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
But please don't attach binaries of C64 programs that don't work unless I
|
||||||
|
ask you to. Thanks.
|
||||||
|
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
@ -27,7 +27,7 @@ the speed of a real C64 the emulation achieves.<P>
|
|||||||
The four items labeled "Drive 8" to "Drive 11" are the disk activity
|
The four items labeled "Drive 8" to "Drive 11" are the disk activity
|
||||||
indicators of the 1541 emulation.<P>
|
indicators of the 1541 emulation.<P>
|
||||||
|
|
||||||
Under <b>RISC OS</b> Frodo can be controlled via Menus and the emulator pane. Some notes on
|
Under <B>RISC OS</B> Frodo can be controlled via Menus and the emulator pane. Some notes on
|
||||||
the pane entries:
|
the pane entries:
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>Frodo, Frodo PC and Frodo SC</TITLE>
|
<TITLE>Frodo and Frodo SC</TITLE>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<H1>Frodo, Frodo PC and Frodo SC</H1>
|
<H1>Frodo and Frodo SC</H1>
|
||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
Frodo comes in three 'flavours' that allow you to decide between speed
|
Frodo comes in two 'flavours' that allow you to decide between speed
|
||||||
and accuracy of the emulation.
|
and accuracy of the emulation.
|
||||||
|
|
||||||
<H2>The line-based emulation 'Frodo'</H2>
|
<H2>The line-based emulation 'Frodo'</H2>
|
||||||
@ -18,28 +18,11 @@ in parallel during one video line in the real C64 are emulated one after
|
|||||||
the other for the different chips. This offers a reasonable degree of
|
the other for the different chips. This offers a reasonable degree of
|
||||||
precision of the emulation at a decent speed. There are some things that
|
precision of the emulation at a decent speed. There are some things that
|
||||||
cannot be emulated with this technique, but it works fine with about
|
cannot be emulated with this technique, but it works fine with about
|
||||||
80% of all C64 programs and it is also the fastest of the three Frodo
|
80% of all C64 programs and it is also the faster of the two Frodo
|
||||||
versions.
|
versions.
|
||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
<H2>The improved line-based emulation 'Frodo PC'</H2>
|
|
||||||
|
|
||||||
<B>Frodo PC</B> is also a line-based emulation but it has some improvements
|
|
||||||
over the standard Frodo:
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI>Code in chip registers can be executed
|
|
||||||
<LI>Correct calculation of 6510 instruction cycles
|
|
||||||
<LI>More precise CIA emulation
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
Programs that don't work on the standard Frodo or that produce an
|
|
||||||
"Illegal jump to I/O space" message might work with Frodo PC. However,
|
|
||||||
Frodo PC is a bit slower.
|
|
||||||
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
<H2>The single-cycle emulation 'Frodo SC'</H2>
|
<H2>The single-cycle emulation 'Frodo SC'</H2>
|
||||||
|
|
||||||
<B>Frodo SC</B> is a special version of Frodo that doesn't work with a
|
<B>Frodo SC</B> is a special version of Frodo that doesn't work with a
|
||||||
@ -48,8 +31,7 @@ the emulator switches between 6510 and VIC in every emulated
|
|||||||
phase. By doing this, Frodo SC achieves an extreme precision (nearly all
|
phase. By doing this, Frodo SC achieves an extreme precision (nearly all
|
||||||
$d011 and $d016 effects can be emulated), but at the expense of speed.
|
$d011 and $d016 effects can be emulated), but at the expense of speed.
|
||||||
|
|
||||||
In the settings options, Frodo SC differs from Frodo/Frodo PC in only
|
In the settings options, Frodo SC differs from Frodo in only a few points:
|
||||||
a few points:
|
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI>The "Cycles per line" settings are not available as the timing of Frodo SC is hardcoded
|
<LI>The "Cycles per line" settings are not available as the timing of Frodo SC is hardcoded
|
||||||
|
@ -12,14 +12,12 @@
|
|||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
These are some of the things planned for future versions:<P>
|
Frodo has not been updated for quite a while because I've been working on
|
||||||
|
other projects (GiNaC, Basilisk II, ...). However, I'm currently doing a
|
||||||
<UL>
|
complete rewrite of the code for Frodo V5. It will use an event-based
|
||||||
<LI>Usage of printers and modems (rather unlikely, as Frodo has not been written to run PrintShop on it <TT>:-)</TT>
|
emulation like UAE or VICE because the current line-based model has already
|
||||||
<LI>A C128 and a GEOS mode
|
been stretched beyond its feasibility. Also, the fantastic SDL will be used
|
||||||
<LI>A fast, frame-based emulation mode
|
as the low-level graphics/sound/input library.
|
||||||
<LI>Port to more systems (NeXTStep/Rhapsody, Atari ST/TT/Falcon, Amiga PPC, PSX, N64)
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
</PRE>
|
</PRE>
|
||||||
</BODY>
|
</BODY>
|
||||||
|
@ -220,5 +220,23 @@ emulation and built-in SID emulation
|
|||||||
<LI>BeOS: Prefs saved in /system/settings/Frodo_settings by default
|
<LI>BeOS: Prefs saved in /system/settings/Frodo_settings by default
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
|
<H3>V4.1a</H3>
|
||||||
|
<UL>
|
||||||
|
<LI>Fixed bug in IEC::NewPrefs()
|
||||||
|
<LI>Optimized VIC emulation for speed
|
||||||
|
<LI>BeOS: Prefs saved in /boot/home/config/settings/Frodo_settings
|
||||||
|
<LI>BeOS: Directory panel works again
|
||||||
|
<LI>BeOS: Correct C64/1541 clock frequency ratio (Frodo SC)
|
||||||
|
<LI>BeOS: Correct audio mixing/clipping
|
||||||
|
</UL>
|
||||||
|
|
||||||
|
<H3>V4.1b</H3>
|
||||||
|
<UL>
|
||||||
|
<LI>Unix: Updated Tcl/Tk preferences editor [Gerard Decatrel]
|
||||||
|
<LI>Unix: Added SDL display driver which is the default if SDL >= 1.2 is detected by the configure script
|
||||||
|
<LI>Unix: Increased number of sound buffers from 4 to 16 (emu10k driver doesn't work with the smaller value)
|
||||||
|
<LI>Unix: Fixed some small compilation problems
|
||||||
|
</UL>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
@ -4,10 +4,20 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<H1>Frodo V4.1</H1>
|
<H1>Frodo V4.2</H1>
|
||||||
<A HREF="whatsnew.html">What's new in V4.1?</A>
|
<A HREF="whatsnew.html">What's new in V4.2?</A>
|
||||||
<H2>The free, portable Commodore 64 emulator for BeOS/Unix/MacOS/AmigaOS/RiscOS/Win32</H2>
|
<H2>The free, portable Commodore 64 emulator</H2>
|
||||||
© Copyright 1994-1997,2002 Christian Bauer et al. Freely distributable.
|
|
||||||
|
Copyright © 1994-2005 Christian Bauer
|
||||||
|
<P>
|
||||||
|
Permission is granted to make and distribute verbatim copies of this
|
||||||
|
manual provided the copyright notice and this permission notice are
|
||||||
|
preserved on all copies.
|
||||||
|
<P>
|
||||||
|
Permission is granted to copy and distribute modified versions of this
|
||||||
|
manual under the conditions for verbatim copying, provided that the entire
|
||||||
|
resulting derived work is distributed under the terms of a permission
|
||||||
|
notice identical to this one.
|
||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
@ -36,12 +46,10 @@
|
|||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="legalmush.html">Copyright</A>: Legal mush
|
<LI><A HREF="contact.html">Contact info</A>: Who did it
|
||||||
<LI><A HREF="bugreports.html">Bug reports</A>: Got some problems?
|
|
||||||
<LI><A HREF="thanks.html">Credits</A>: The author wishes to thank...
|
|
||||||
<LI><A HREF="author.html">The author</A>: Programmer's address
|
|
||||||
<LI><A HREF="history.html">History</A>: Revision history of Frodo
|
<LI><A HREF="history.html">History</A>: Revision history of Frodo
|
||||||
<LI><A HREF="future.html">The future</A>: What's on my to-do list
|
<LI><A HREF="future.html">The future</A>: What's on my to-do list
|
||||||
|
<LI><A HREF="legalmush.html">Copyright and license</A>: Legal mush
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
@ -1,37 +1,29 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>Copyright and distribution</TITLE>
|
<TITLE>Copyright and license</TITLE>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<H1>Copyright and distribution</H1>
|
<H1>Copyright and license</H1>
|
||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
The program "Frodo", this manual and the source code may be freely
|
The "Frodo" Commodore 64 emulator is Copyright © 1994-1997,2002-2004
|
||||||
distributed as long as they remain unchanged (archiving and packing is
|
Christian Bauer
|
||||||
allowed) and all files are included. You must not make any profit by
|
<P>
|
||||||
selling Frodo, especially the price of a disk containing Frodo may not
|
This program is free software; you can redistribute it and/or modify it
|
||||||
exceed US$ 5,- (or equivalent amounts in other currencies). Please feel
|
under the terms of the GNU General Public License as published by the Free
|
||||||
free to distribute Frodo via bulletin board systems and networks and as
|
Software Foundation; either version 2 of the License, or (at your option)
|
||||||
part of shareware/freeware CD-ROMs.<P>
|
any later version.
|
||||||
|
<P>
|
||||||
Anyone using this program agrees to incur the risk of using it for himself.
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
In no way can the author be held responsible for any damage directly or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
indirectly caused by the use or misuse of this manual and/or the program.<P>
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
more details.
|
||||||
The rights on the source code remain at the author. It may not - not even
|
<P>
|
||||||
in parts - used for commercial purposes without explicit written permission
|
You should have received a copy of the GNU General Public License along with
|
||||||
by the author. Permission to use it for non-commercial purposes is hereby
|
this program; see the file COPYING. If not, write to the Free Software
|
||||||
granted als long as my copyright notice remains in the program. You are not
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
allowed to use the source to create and distribute a modified version of
|
|
||||||
Frodo.<P>
|
|
||||||
|
|
||||||
Frodo is not designed, intended, or authorized for use as a component in
|
|
||||||
systems intended for surgical implant within the body, or other
|
|
||||||
applications intended to support or sustain life, or for any other
|
|
||||||
application in which the failure of Frodo could create a situation where
|
|
||||||
personal injury or death may occur.<P>
|
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
@ -25,10 +25,9 @@ PowerPC/Pentium/68060. But on the other hand, Frodo can display raster
|
|||||||
effects correctly that only result in a flickering mess with other
|
effects correctly that only result in a flickering mess with other
|
||||||
emulators.<P>
|
emulators.<P>
|
||||||
|
|
||||||
Frodo comes in three <A HREF="flavours.html">flavours</A>: The "normal" Frodo
|
Frodo comes in two <A HREF="flavours.html">flavours</A>: The "normal" Frodo
|
||||||
with a line-based emulation, the improved line-based emulation "Frodo PC",
|
with a line-based emulation and the single-cycle emulation Frodo SC that is slower
|
||||||
and the single-cycle emulation Frodo SC that is slower but far more
|
but far more compatible.<P>
|
||||||
compatible.<P>
|
|
||||||
|
|
||||||
In addition to a precise 6510/VIC emulation, Frodo features a processor-level
|
In addition to a precise 6510/VIC emulation, Frodo features a processor-level
|
||||||
1541 emulation that is even able to handle about 95% of all fast loaders.
|
1541 emulation that is even able to handle about 95% of all fast loaders.
|
||||||
@ -38,7 +37,7 @@ images, .t64/LYNX archives, or directories of the host system.<P>
|
|||||||
Frodo runs on these systems:<P>
|
Frodo runs on these systems:<P>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI>BeBox or PowerMac with BeOS Preview Release
|
<LI>BeOS-ready system (PPC or x86) with BeOS R3
|
||||||
<LI>Unix systems with X11R6 or Linux/SVGAlib (sound only under Linux, HP-UX and Solaris 2.x)
|
<LI>Unix systems with X11R6 or Linux/SVGAlib (sound only under Linux, HP-UX and Solaris 2.x)
|
||||||
<LI>68k or PPC Macintosh with System 7.5
|
<LI>68k or PPC Macintosh with System 7.5
|
||||||
<LI>Amiga/DraCo with 68040/68060, AmigaOS 3.0 and a graphics card (AHI V3 required for sound)
|
<LI>Amiga/DraCo with 68040/68060, AmigaOS 3.0 and a graphics card (AHI V3 required for sound)
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
<HTML>
|
|
||||||
<HEAD>
|
|
||||||
<TITLE>Credits</TITLE>
|
|
||||||
</HEAD>
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<H1>Credits</H1>
|
|
||||||
|
|
||||||
<CITE>
|
|
||||||
"The Silmaril as lantern light<BR>
|
|
||||||
And banner bright with living flame<BR>
|
|
||||||
To gleam thereon by Elbereth<BR>
|
|
||||||
Herself was set, who thither came."
|
|
||||||
</CITE>
|
|
||||||
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
The following persons deserve special thanks from me as they made a
|
|
||||||
significant contribution to the development of Frodo:<P>
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="mailto:a.boose@ldb.han.de">Andreas Boose</A> and <A HREF="mailto:marko.makela@hut.fi">Marko Mäkelä</A> who provided me with precious information on the VIC and on the C64 in general
|
|
||||||
<LI><A HREF="mailto:crux@pool.informatik.rwth-aachen.de">Bernd Schmidt</A> and <A HREF="mailto:lkv@mania.robin.de">Lutz Vieweg</A> who ported Frodo to Unix systems
|
|
||||||
<LI><A HREF="mailto:titan@indigo.ie">Richard Bannister</A>, <A HREF="mailto:macsupport@overnet.com.ar">Ernesto Corvi</A> and <A HREF="mailto:e9426444@student.tuwien.ac.at">Andreas Varga</A> who ported Frodo to MacOS
|
|
||||||
<LI><A HREF="mailto:jrs@world.std.com">J. Richard Sladkey</A> who ported Frodo to Windows NT/95
|
|
||||||
<LI><A HREF="mailto:dehmel@informatik.tu-muenchen.de">Andreas Dehmel</A> who ported Frodo to RISC OS
|
|
||||||
<LI><A HREF="mailto:Marc.Chabanas@france.sun.com">Marc Chabanas</A> for the Solaris sound routines
|
|
||||||
<LI><A HREF="mailto:pst@cocoon.infra.de">Peter Stegemann</A> and <A HREF="mailto:stegeman@ai-lab.fh-furtwangen.de">Jörg Stegemann</A> who did extensive beta-testing
|
|
||||||
<LI><A HREF="mailto:5uro@informatik.uni-hamburg.de">Tinic Urou</A> for designing the Frodo logo and for the GameKit code
|
|
||||||
<LI><A HREF="mailto:jehamby@lightside.com">Jake Hamby</A>, Wolfgang Lorenz and <A HREF="mailto:d96shade@dtek.chalmers.se">Erik Lindberg</A> for bugfixes and improvements
|
|
||||||
<LI>J.R.R.Tolkien for the suggestion for the name of the emulator
|
|
||||||
<LI>All the people who have sent me suggestions and comments
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
@ -4,18 +4,16 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<H1>What's new in V4.1?</H1>
|
<H1>What's new in V4.2?</H1>
|
||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
The most important changes from V4.0 are:
|
The most important changes from V4.1 are:
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI>Ability to save/load the emulator state to/from snapshot files
|
<LI>Changed license to GPL
|
||||||
<LI>Ported to Win32 and Acorn RiscOS
|
<LI>Updated Tcl/Tk preferences editor
|
||||||
<LI>Added <A HREF="flavours.html">Frodo PC</A>, an improved line-based emulation
|
<LI>Added SDL display driver for Unix
|
||||||
<LI>Sound support for Solaris 2.x
|
|
||||||
<LI>Fixed several bugs in the 6510/6526 emulation
|
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
For the tons of other small changes and bug fixes, please look <A HREF="history.html">here</A>.<P>
|
For the tons of other small changes and bug fixes, please look <A HREF="history.html">here</A>.<P>
|
||||||
|
BIN
FreeMono.ttf
BIN
FreeMono.ttf
Binary file not shown.
BIN
Frodo.proj
BIN
Frodo.proj
Binary file not shown.
49
Frodo.spec
Normal file
49
Frodo.spec
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
%define name Frodo
|
||||||
|
%define version 4.2
|
||||||
|
%define release 1
|
||||||
|
|
||||||
|
Summary: Commodore 64 emulator
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
Copyright: GPL
|
||||||
|
Group: Applications/Emulators
|
||||||
|
Source: %{name}-%{version}.tar.gz
|
||||||
|
URL: http://www.uni-mainz.de/~bauec002/FRMain.html
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Frodo is a free, portable Commodore 64 emulator that runs on a variety
|
||||||
|
of platforms, with a focus on the exact reproduction of special graphical
|
||||||
|
effects possible on the C64.
|
||||||
|
|
||||||
|
Frodo comes in two flavours: The "normal" Frodo with a line-based
|
||||||
|
emulation, and the single-cycle emulation "Frodo SC" that is slower
|
||||||
|
but far more compatible.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
cd Src
|
||||||
|
CFLAGS=${RPM_OPT_FLAGS} CXXFLAGS=${RPM_OPT_FLAGS} ./configure --prefix=%{_prefix}
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
cd Src
|
||||||
|
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc COPYING CHANGES
|
||||||
|
%doc Docs/*.html
|
||||||
|
%{_bindir}/Frodo
|
||||||
|
%{_bindir}/FrodoSC
|
||||||
|
%{_bindir}/Frodo_GUI.tcl
|
||||||
|
"%{_datadir}/frodo/Kernal ROM"
|
||||||
|
%{_datadir}/frodo/Frodo.glade
|
BIN
FrodoPC.proj
BIN
FrodoPC.proj
Binary file not shown.
BIN
FrodoSC.proj
BIN
FrodoSC.proj
Binary file not shown.
160
Makefile
160
Makefile
@ -1,160 +0,0 @@
|
|||||||
#---------------------------------------------------------------------------------
|
|
||||||
# Clear the implicit built in rules
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
.SUFFIXES:
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
ifeq ($(strip $(DEVKITPPC)),)
|
|
||||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(DEVKITPPC)/wii_rules
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# TARGET is the name of the output
|
|
||||||
# BUILD is the directory where object files & intermediate files will be placed
|
|
||||||
# SOURCES is a list of directories containing source code
|
|
||||||
# INCLUDES is a list of directories containing extra header files
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
TARGET := frodo
|
|
||||||
BUILD := build
|
|
||||||
SOURCES := Src
|
|
||||||
DATA := data
|
|
||||||
INCLUDES :=
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# options for code generation
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
PCFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
|
||||||
CFLAGS = -O3 -g -Wall $(MACHDEP) $(INCLUDE) -I$(DEVKITPRO)/SDL/include -U__unix -DHAVE_SDL
|
|
||||||
CXXFLAGS = $(CFLAGS)
|
|
||||||
|
|
||||||
LDFLAGS = -L$(DEVKITPRO)/SDL/lib -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# any extra libraries we wish to link with the project
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
LIBS := -lSDL_image -lSDL_ttf -ljpeg -lpng -lz -lSDL -lfreetype -lfat -lwiiuse -lbte -logc -lm
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# list of directories containing libraries, this must be the top level containing
|
|
||||||
# include and lib
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
LIBDIRS :=
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# no real need to edit anything past this point unless you need to add additional
|
|
||||||
# rules for different file extensions
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
|
||||||
|
|
||||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
|
||||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
|
||||||
|
|
||||||
export DEPSDIR := $(CURDIR)/$(BUILD)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# automatically build a list of object files for our project
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
CFILES := char_to_kc.c gcaudio.c
|
|
||||||
CPPFILES := Display.cpp main.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
|
||||||
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp C64.cpp CPUC64.cpp VIC.cpp \
|
|
||||||
CIA.cpp CPU1541.cpp menu.cpp
|
|
||||||
sFILES :=
|
|
||||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
|
||||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# use CXX for linking C++ projects, CC for standard C
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
ifeq ($(strip $(CPPFILES)),)
|
|
||||||
export LD := $(CC)
|
|
||||||
else
|
|
||||||
export LD := $(CXX)
|
|
||||||
endif
|
|
||||||
|
|
||||||
export OFILES := $(addsuffix .o,$(BINFILES)) \
|
|
||||||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
|
|
||||||
$(sFILES:.s=.o) $(SFILES:.S=.o)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# build a list of include paths
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
|
|
||||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
|
||||||
-I$(CURDIR)/$(BUILD) \
|
|
||||||
-I$(LIBOGC_INC)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# build a list of library paths
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
|
||||||
-L$(LIBOGC_LIB)
|
|
||||||
|
|
||||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
|
||||||
.PHONY: $(BUILD) clean
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
$(BUILD):
|
|
||||||
@[ -d $@ ] || mkdir -p $@
|
|
||||||
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
clean:
|
|
||||||
@echo clean ...
|
|
||||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol Src/sysconfig.h Src/*.o \
|
|
||||||
FrodoSC FrodoPC dist
|
|
||||||
|
|
||||||
dist: $(BUILD)
|
|
||||||
install -d $@/apps/frodo
|
|
||||||
install -d $@/apps/frodo/images
|
|
||||||
install -d $@/apps/frodo/saves
|
|
||||||
install -d $@/apps/frodo/tmp
|
|
||||||
cp $(TARGET).dol $@/apps/frodo/boot.dol
|
|
||||||
cp meta.xml $@/apps/frodo/
|
|
||||||
cp icon.png $@/apps/frodo/
|
|
||||||
cp FreeMono.ttf $@/apps/frodo/
|
|
||||||
cp "Kernal ROM" $@/apps/frodo/Kernal_ROM
|
|
||||||
cp "Char ROM" $@/apps/frodo/Char_ROM
|
|
||||||
cp "1541 ROM" $@/apps/frodo/1541_ROM
|
|
||||||
cp "Basic ROM" $@/apps/frodo/Basic_ROM
|
|
||||||
cp frodorc $@/apps/frodo/
|
|
||||||
cd $@ && tar -czf ../frodo-wii-bin.tar.gz *
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
run:
|
|
||||||
wiiload $(TARGET).dol
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
else
|
|
||||||
|
|
||||||
DEPENDS := $(OFILES:.o=.d)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# main targets
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
$(OUTPUT).dol: $(OUTPUT).elf
|
|
||||||
$(OUTPUT).elf: sysconfig.h $(OFILES)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# This rule links in binary data with the .jpg extension
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
%.jpg.o : %.jpg
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
@echo $(notdir $<)
|
|
||||||
$(bin2o)
|
|
||||||
|
|
||||||
sysconfig.h: sysconfig.h.Wii
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
Display.cpp: Display_SDL.i
|
|
||||||
|
|
||||||
-include $(DEPENDS)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
endif
|
|
||||||
#---------------------------------------------------------------------------------
|
|
2057
Src/1541_ROM.h
Normal file
2057
Src/1541_ROM.h
Normal file
File diff suppressed because it is too large
Load Diff
2354
Src/1541d64.cpp
2354
Src/1541d64.cpp
File diff suppressed because it is too large
Load Diff
198
Src/1541d64.h
198
Src/1541d64.h
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* 1541d64.h - 1541 emulation in .d64 file
|
* 1541d64.h - 1541 emulation in disk image files (.d64/.x64/zipcode)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _1541D64_H
|
#ifndef _1541D64_H
|
||||||
@ -10,99 +24,129 @@
|
|||||||
#include "IEC.h"
|
#include "IEC.h"
|
||||||
|
|
||||||
|
|
||||||
// BAM structure
|
/*
|
||||||
typedef struct {
|
* Definitions
|
||||||
uint8 dir_track; // Track...
|
*/
|
||||||
uint8 dir_sector; // ...and sector of first directory block
|
|
||||||
int8 fmt_type; // Format type
|
|
||||||
int8 pad0;
|
|
||||||
uint8 bitmap[4*35]; // Sector allocation
|
|
||||||
uint8 disk_name[18]; // Disk name
|
|
||||||
uint8 id[2]; // Disk ID
|
|
||||||
int8 pad1;
|
|
||||||
uint8 fmt_char[2]; // Format characters
|
|
||||||
int8 pad2[4];
|
|
||||||
int8 pad3[85];
|
|
||||||
} BAM;
|
|
||||||
|
|
||||||
// Directory entry structure
|
// Constants
|
||||||
typedef struct {
|
const int NUM_SECTORS_35 = 683; // Number of sectors in a 35-track image
|
||||||
uint8 type; // File type
|
const int NUM_SECTORS_40 = 768; // Number of sectors in a 40-track image
|
||||||
uint8 track; // Track...
|
|
||||||
uint8 sector; // ...and sector of first data block
|
|
||||||
uint8 name[16]; // File name
|
|
||||||
uint8 side_track; // Track...
|
|
||||||
uint8 side_sector; // ...and sector of first side sector
|
|
||||||
uint8 rec_len; // Record length
|
|
||||||
int8 pad0[4];
|
|
||||||
uint8 ovr_track; // Track...
|
|
||||||
uint8 ovr_sector; // ...and sector on overwrite
|
|
||||||
uint8 num_blocks_l; // Number of blocks, LSB
|
|
||||||
uint8 num_blocks_h; // Number of blocks, MSB
|
|
||||||
int8 pad1[2];
|
|
||||||
} DirEntry;
|
|
||||||
|
|
||||||
// Directory block structure
|
// Disk image types
|
||||||
typedef struct {
|
enum {
|
||||||
uint8 padding[2]; // Keep DirEntry word-aligned
|
TYPE_D64, // D64 file
|
||||||
uint8 next_track;
|
TYPE_ED64, // Converted zipcode file (D64 with header ID)
|
||||||
uint8 next_sector;
|
TYPE_X64 // x64 file
|
||||||
DirEntry entry[8];
|
};
|
||||||
} Directory;
|
|
||||||
|
|
||||||
|
// Channel descriptor
|
||||||
|
struct channel_desc {
|
||||||
|
int mode; // Channel mode
|
||||||
|
bool writing; // Flag: writing to file (for file channels)
|
||||||
|
int buf_num; // Buffer number for direct access and file channels
|
||||||
|
uint8 *buf; // Pointer to start of buffer
|
||||||
|
uint8 *buf_ptr; // Pointer to current position in buffer
|
||||||
|
int buf_len; // Remaining bytes in buffer
|
||||||
|
int track, sector; // Track and sector the buffer will be written to (for writing to file channels)
|
||||||
|
int num_blocks; // Number of blocks in file (for writing to file channels)
|
||||||
|
int dir_track; // Track...
|
||||||
|
int dir_sector; // ...and sector of directory block containing file entry
|
||||||
|
int entry; // Number of entry in directory block
|
||||||
|
};
|
||||||
|
|
||||||
class D64Drive : public Drive {
|
// Disk image file descriptor
|
||||||
|
struct image_file_desc {
|
||||||
|
int type; // See definitions above
|
||||||
|
int header_size; // Size of file header
|
||||||
|
int num_tracks; // Number of tracks
|
||||||
|
uint8 id1, id2; // Block header ID (as opposed to BAM ID)
|
||||||
|
uint8 error_info[NUM_SECTORS_40]; // Sector error information (1 byte/sector)
|
||||||
|
bool has_error_info; // Flag: error info present in file
|
||||||
|
};
|
||||||
|
|
||||||
|
// Disk image drive class
|
||||||
|
class ImageDrive : public Drive {
|
||||||
public:
|
public:
|
||||||
D64Drive(IEC *iec, char *filepath);
|
ImageDrive(IEC *iec, const char *filepath);
|
||||||
virtual ~D64Drive();
|
virtual ~ImageDrive();
|
||||||
virtual uint8 Open(int channel, char *filename);
|
|
||||||
|
virtual uint8 Open(int channel, const uint8 *name, int name_len);
|
||||||
virtual uint8 Close(int channel);
|
virtual uint8 Close(int channel);
|
||||||
virtual uint8 Read(int channel, uint8 *byte);
|
virtual uint8 Read(int channel, uint8 &byte);
|
||||||
virtual uint8 Write(int channel, uint8 byte, bool eoi);
|
virtual uint8 Write(int channel, uint8 byte, bool eoi);
|
||||||
virtual void Reset(void);
|
virtual void Reset(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void open_close_d64_file(char *d64name);
|
void close_image(void);
|
||||||
uint8 open_file(int channel, char *filename);
|
bool change_image(const char *path);
|
||||||
void convert_filename(char *srcname, char *destname, int *filemode, int *filetype);
|
|
||||||
bool find_file(char *filename, int *track, int *sector);
|
uint8 open_file(int channel, const uint8 *name, int name_len);
|
||||||
uint8 open_file_ts(int channel, int track, int sector);
|
uint8 open_file_ts(int channel, int track, int sector);
|
||||||
uint8 open_directory(char *pattern);
|
uint8 create_file(int channel, const uint8 *name, int name_len, int type, bool overwrite = false);
|
||||||
uint8 open_direct(int channel, char *filename);
|
uint8 open_directory(const uint8 *pattern, int pattern_len);
|
||||||
void close_all_channels();
|
uint8 open_direct(int channel, const uint8 *filename);
|
||||||
void execute_command(char *command);
|
void close_all_channels(void);
|
||||||
void block_read_cmd(char *command);
|
|
||||||
void buffer_ptr_cmd(char *command);
|
|
||||||
bool parse_bcmd(char *cmd, int *arg1, int *arg2, int *arg3, int *arg4);
|
|
||||||
void chd64_cmd(char *d64name);
|
|
||||||
int alloc_buffer(int want);
|
int alloc_buffer(int want);
|
||||||
void free_buffer(int buf);
|
void free_buffer(int buf);
|
||||||
|
|
||||||
|
bool find_file(const uint8 *pattern, int pattern_len, int &dir_track, int &dir_sector, int &entry, bool cont);
|
||||||
|
bool find_first_file(const uint8 *pattern, int pattern_len, int &dir_track, int &dir_sector, int &entry);
|
||||||
|
bool find_next_file(const uint8 *pattern, int pattern_len, int &dir_track, int &dir_sector, int &entry);
|
||||||
|
bool alloc_dir_entry(int &track, int §or, int &entry);
|
||||||
|
|
||||||
|
bool is_block_free(int track, int sector);
|
||||||
|
int num_free_blocks(int track);
|
||||||
|
int alloc_block(int track, int sector);
|
||||||
|
int free_block(int track, int sector);
|
||||||
|
bool alloc_block_chain(int track, int sector);
|
||||||
|
bool free_block_chain(int track, int sector);
|
||||||
|
bool alloc_next_block(int &track, int §or, int interleave);
|
||||||
|
|
||||||
bool read_sector(int track, int sector, uint8 *buffer);
|
bool read_sector(int track, int sector, uint8 *buffer);
|
||||||
int offset_from_ts(int track, int sector);
|
bool write_sector(int track, int sector, uint8 *buffer);
|
||||||
uint8 conv_from_64(uint8 c, bool map_slash);
|
void write_error_info(void);
|
||||||
|
|
||||||
char orig_d64_name[256]; // Original path of .d64 file
|
virtual void block_read_cmd(int channel, int track, int sector, bool user_cmd = false);
|
||||||
|
virtual void block_write_cmd(int channel, int track, int sector, bool user_cmd = false);
|
||||||
|
virtual void block_allocate_cmd(int track, int sector);
|
||||||
|
virtual void block_free_cmd(int track, int sector);
|
||||||
|
virtual void buffer_pointer_cmd(int channel, int pos);
|
||||||
|
virtual void mem_read_cmd(uint16 adr, uint8 len);
|
||||||
|
virtual void mem_write_cmd(uint16 adr, uint8 len, uint8 *p);
|
||||||
|
virtual void copy_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_files, int old_files_len);
|
||||||
|
virtual void rename_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_file, int old_file_len);
|
||||||
|
virtual void scratch_cmd(const uint8 *files, int files_len);
|
||||||
|
virtual void initialize_cmd(void);
|
||||||
|
virtual void new_cmd(const uint8 *name, int name_len, const uint8 *comma);
|
||||||
|
virtual void validate_cmd(void);
|
||||||
|
|
||||||
FILE *the_file; // File pointer for .d64 file
|
FILE *the_file; // File pointer for image file
|
||||||
|
image_file_desc desc; // Image file descriptor
|
||||||
|
bool write_protected; // Flag: image file write-protected
|
||||||
|
|
||||||
uint8 *ram; // 2KB 1541 RAM
|
uint8 ram[0x800]; // 2k 1541 RAM
|
||||||
BAM *bam; // Pointer to BAM
|
uint8 dir[258]; // Buffer for directory blocks
|
||||||
Directory dir; // Buffer for directory blocks
|
uint8 *bam; // Pointer to BAM in 1541 RAM (buffer 4, upper 256 bytes)
|
||||||
|
bool bam_dirty; // Flag: BAM modified, needs to be written back
|
||||||
|
|
||||||
int chan_mode[16]; // Channel mode
|
channel_desc ch[18]; // Descriptors for channels 0..17 (16 = internal read, 17 = internal write)
|
||||||
int chan_buf_num[16]; // Buffer number of channel (for direct access channels)
|
bool buf_free[4]; // Flags: buffer 0..3 free?
|
||||||
uint8 *chan_buf[16]; // Pointer to buffer
|
|
||||||
uint8 *buf_ptr[16]; // Pointer in buffer
|
|
||||||
int buf_len[16]; // Remaining bytes in buffer
|
|
||||||
|
|
||||||
bool buf_free[4]; // Buffer 0..3 free?
|
|
||||||
|
|
||||||
char cmd_buffer[44]; // Buffer for incoming command strings
|
|
||||||
int cmd_len; // Length of received command
|
|
||||||
|
|
||||||
int image_header; // Length of .d64 file header
|
|
||||||
|
|
||||||
uint8 error_info[683]; // Sector error information (1 byte/sector)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Check whether file with given header (64 bytes) and size looks like one
|
||||||
|
// of the file types supported by this module
|
||||||
|
extern bool IsImageFile(const char *path, const uint8 *header, long size);
|
||||||
|
|
||||||
|
// Read directory of disk image file into (empty) c64_dir_entry vector
|
||||||
|
extern bool ReadImageDirectory(const char *path, vector<c64_dir_entry> &vec);
|
||||||
|
|
||||||
|
// Create new blank disk image file
|
||||||
|
extern bool CreateImageFile(const char *path);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
374
Src/1541fs.cpp
374
Src/1541fs.cpp
@ -1,9 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* 1541fs.cpp - 1541 emulation in host file system
|
* 1541fs.cpp - 1541 emulation in host file system
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -32,25 +47,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Access modes
|
|
||||||
enum {
|
|
||||||
FMODE_READ, FMODE_WRITE, FMODE_APPEND
|
|
||||||
};
|
|
||||||
|
|
||||||
// File types
|
|
||||||
enum {
|
|
||||||
FTYPE_PRG, FTYPE_SEQ
|
|
||||||
};
|
|
||||||
|
|
||||||
// Prototypes
|
// Prototypes
|
||||||
static bool match(char *p, char *n);
|
static bool match(const char *p, const char *n);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor: Prepare emulation
|
* Constructor: Prepare emulation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FSDrive::FSDrive(IEC *iec, char *path) : Drive(iec)
|
FSDrive::FSDrive(IEC *iec, const char *path) : Drive(iec)
|
||||||
{
|
{
|
||||||
strcpy(orig_dir_path, path);
|
strcpy(orig_dir_path, path);
|
||||||
dir_path[0] = 0;
|
dir_path[0] = 0;
|
||||||
@ -98,16 +103,12 @@ bool FSDrive::change_dir(char *dirpath)
|
|||||||
#else
|
#else
|
||||||
int Info[4];
|
int Info[4];
|
||||||
|
|
||||||
if ((ReadCatalogueInfo(dirpath,Info) & 2) != 0) // Directory or image file
|
if ((ReadCatalogueInfo(dirpath,Info) & 2) != 0) { // Directory or image file
|
||||||
{
|
|
||||||
strcpy(dir_path, dirpath);
|
strcpy(dir_path, dirpath);
|
||||||
strncpy(dir_title, dir_path, 16);
|
strncpy(dir_title, dir_path, 16);
|
||||||
return true;
|
return true;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,13 +117,13 @@ bool FSDrive::change_dir(char *dirpath)
|
|||||||
* Open channel
|
* Open channel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8 FSDrive::Open(int channel, char *filename)
|
uint8 FSDrive::Open(int channel, const uint8 *name, int name_len)
|
||||||
{
|
{
|
||||||
set_error(ERR_OK);
|
set_error(ERR_OK);
|
||||||
|
|
||||||
// Channel 15: Execute file name as command
|
// Channel 15: Execute file name as command
|
||||||
if (channel == 15) {
|
if (channel == 15) {
|
||||||
execute_command(filename);
|
execute_cmd(name, name_len);
|
||||||
return ST_OK;
|
return ST_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,15 +133,15 @@ uint8 FSDrive::Open(int channel, char *filename)
|
|||||||
file[channel] = NULL;
|
file[channel] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename[0] == '$')
|
if (name[0] == '#') {
|
||||||
return open_directory(channel, filename+1);
|
|
||||||
|
|
||||||
if (filename[0] == '#') {
|
|
||||||
set_error(ERR_NOCHANNEL);
|
set_error(ERR_NOCHANNEL);
|
||||||
return ST_OK;
|
return ST_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return open_file(channel, filename);
|
if (name[0] == '$')
|
||||||
|
return open_directory(channel, name + 1, name_len - 1);
|
||||||
|
|
||||||
|
return open_file(channel, name, name_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -148,45 +149,47 @@ uint8 FSDrive::Open(int channel, char *filename)
|
|||||||
* Open file
|
* Open file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8 FSDrive::open_file(int channel, char *filename)
|
uint8 FSDrive::open_file(int channel, const uint8 *name, int name_len)
|
||||||
{
|
{
|
||||||
char plainname[NAMEBUF_LENGTH];
|
char plain_name[NAMEBUF_LENGTH];
|
||||||
int filemode = FMODE_READ;
|
int plain_name_len;
|
||||||
int filetype = FTYPE_PRG;
|
int mode = FMODE_READ;
|
||||||
bool wildflag = false;
|
int type = FTYPE_PRG;
|
||||||
char *mode = "rb";
|
int rec_len = 0;
|
||||||
|
parse_file_name(name, name_len, (uint8 *)plain_name, plain_name_len, mode, type, rec_len, true);
|
||||||
|
|
||||||
convert_filename(filename, plainname, &filemode, &filetype, &wildflag);
|
// Channel 0 is READ, channel 1 is WRITE
|
||||||
|
if (channel == 0 || channel == 1) {
|
||||||
// Channel 0 is READ PRG, channel 1 is WRITE PRG
|
mode = channel ? FMODE_WRITE : FMODE_READ;
|
||||||
if (!channel) {
|
if (type == FTYPE_DEL)
|
||||||
filemode = FMODE_READ;
|
type = FTYPE_PRG;
|
||||||
filetype = FTYPE_PRG;
|
|
||||||
}
|
|
||||||
if (channel == 1) {
|
|
||||||
filemode = FMODE_WRITE;
|
|
||||||
filetype = FTYPE_PRG;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wildcards are only allowed on reading
|
bool writing = (mode == FMODE_WRITE || mode == FMODE_APPEND);
|
||||||
if (wildflag) {
|
|
||||||
if (filemode != FMODE_READ) {
|
// Expand wildcards (only allowed on reading)
|
||||||
|
if (strchr(plain_name, '*') || strchr(plain_name, '?')) {
|
||||||
|
if (writing) {
|
||||||
set_error(ERR_SYNTAX33);
|
set_error(ERR_SYNTAX33);
|
||||||
return ST_OK;
|
return ST_OK;
|
||||||
|
} else
|
||||||
|
find_first_file(plain_name);
|
||||||
}
|
}
|
||||||
find_first_file(plainname);
|
|
||||||
|
// Relative files are not supported
|
||||||
|
if (type == FTYPE_REL) {
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
return ST_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select fopen() mode according to file mode
|
// Select fopen() mode according to file mode
|
||||||
switch (filemode) {
|
const char *mode_str = "rb";
|
||||||
case FMODE_READ:
|
switch (mode) {
|
||||||
mode = "rb";
|
|
||||||
break;
|
|
||||||
case FMODE_WRITE:
|
case FMODE_WRITE:
|
||||||
mode = "wb";
|
mode_str = "wb";
|
||||||
break;
|
break;
|
||||||
case FMODE_APPEND:
|
case FMODE_APPEND:
|
||||||
mode = "ab";
|
mode_str = "ab";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,8 +197,8 @@ uint8 FSDrive::open_file(int channel, char *filename)
|
|||||||
#ifndef __riscos__
|
#ifndef __riscos__
|
||||||
if (chdir(dir_path))
|
if (chdir(dir_path))
|
||||||
set_error(ERR_NOTREADY);
|
set_error(ERR_NOTREADY);
|
||||||
else if ((file[channel] = fopen(plainname, mode)) != NULL) {
|
else if ((file[channel] = fopen(plain_name, mode_str)) != NULL) {
|
||||||
if (filemode == FMODE_READ) // Read and buffer first byte
|
if (mode == FMODE_READ || mode == FMODE_M) // Read and buffer first byte
|
||||||
read_char[channel] = fgetc(file[channel]);
|
read_char[channel] = fgetc(file[channel]);
|
||||||
} else
|
} else
|
||||||
set_error(ERR_FILENOTFOUND);
|
set_error(ERR_FILENOTFOUND);
|
||||||
@ -205,10 +208,10 @@ uint8 FSDrive::open_file(int channel, char *filename)
|
|||||||
char fullname[NAMEBUF_LENGTH];
|
char fullname[NAMEBUF_LENGTH];
|
||||||
|
|
||||||
// On RISC OS make a full filename
|
// On RISC OS make a full filename
|
||||||
sprintf(fullname,"%s.%s",dir_path,plainname);
|
sprintf(fullname,"%s.%s",dir_path,plain_name);
|
||||||
if ((file[channel] = fopen(fullname, mode)) != NULL)
|
if ((file[channel] = fopen(fullname, mode)) != NULL)
|
||||||
{
|
{
|
||||||
if (filemode == FMODE_READ)
|
if (mode == FMODE_READ || mode == FMODE_M)
|
||||||
{
|
{
|
||||||
read_char[channel] = fgetc(file[channel]);
|
read_char[channel] = fgetc(file[channel]);
|
||||||
}
|
}
|
||||||
@ -224,62 +227,12 @@ uint8 FSDrive::open_file(int channel, char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Analyze file name, get access mode and type
|
|
||||||
*/
|
|
||||||
|
|
||||||
void FSDrive::convert_filename(char *srcname, char *destname, int *filemode, int *filetype, bool *wildflag)
|
|
||||||
{
|
|
||||||
char *p, *q;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
// Search for ':', p points to first character after ':'
|
|
||||||
if ((p = strchr(srcname, ':')) != NULL)
|
|
||||||
p++;
|
|
||||||
else
|
|
||||||
p = srcname;
|
|
||||||
|
|
||||||
// Convert char set of the remaining string -> destname
|
|
||||||
q = destname;
|
|
||||||
for (i=0; i<NAMEBUF_LENGTH && (*q++ = conv_from_64(*p++, true)); i++) ;
|
|
||||||
|
|
||||||
// Look for mode parameters seperated by ','
|
|
||||||
p = destname;
|
|
||||||
while ((p = strchr(p, ',')) != NULL) {
|
|
||||||
|
|
||||||
// Cut string after the first ','
|
|
||||||
*p++ = 0;
|
|
||||||
|
|
||||||
switch (*p) {
|
|
||||||
case 'p':
|
|
||||||
*filetype = FTYPE_PRG;
|
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
*filetype = FTYPE_SEQ;
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
*filemode = FMODE_READ;
|
|
||||||
break;
|
|
||||||
case 'w':
|
|
||||||
*filemode = FMODE_WRITE;
|
|
||||||
break;
|
|
||||||
case 'a':
|
|
||||||
*filemode = FMODE_APPEND;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search for wildcards
|
|
||||||
*wildflag = (strchr(destname, '?') != NULL) || (strchr(destname, '*') != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find first file matching wildcard pattern and get its real name
|
* Find first file matching wildcard pattern and get its real name
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Return true if name 'n' matches pattern 'p'
|
// Return true if name 'n' matches pattern 'p'
|
||||||
static bool match(char *p, char *n)
|
static bool match(const char *p, const char *n)
|
||||||
{
|
{
|
||||||
if (!*p) // Null pattern matches everything
|
if (!*p) // Null pattern matches everything
|
||||||
return true;
|
return true;
|
||||||
@ -295,7 +248,7 @@ static bool match(char *p, char *n)
|
|||||||
return !*n;
|
return !*n;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSDrive::find_first_file(char *name)
|
void FSDrive::find_first_file(char *pattern)
|
||||||
{
|
{
|
||||||
#ifndef __riscos__
|
#ifndef __riscos__
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
@ -311,8 +264,8 @@ void FSDrive::find_first_file(char *name)
|
|||||||
while (de) {
|
while (de) {
|
||||||
|
|
||||||
// Match found? Then copy real file name
|
// Match found? Then copy real file name
|
||||||
if (match(name, de->d_name)) {
|
if (match(pattern, de->d_name)) {
|
||||||
strncpy(name, de->d_name, NAMEBUF_LENGTH);
|
strncpy(pattern, de->d_name, NAMEBUF_LENGTH);
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,20 +280,15 @@ void FSDrive::find_first_file(char *name)
|
|||||||
char Buffer[NAMEBUF_LENGTH];
|
char Buffer[NAMEBUF_LENGTH];
|
||||||
|
|
||||||
de.offset = 0; de.buffsize = NAMEBUF_LENGTH; de.match = name;
|
de.offset = 0; de.buffsize = NAMEBUF_LENGTH; de.match = name;
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
de.readno = 1;
|
de.readno = 1;
|
||||||
if (ReadDirName(dir_path,Buffer,&de) != NULL) {de.offset = -1;}
|
if (ReadDirName(dir_path,Buffer,&de) != NULL)
|
||||||
else if (de.offset != -1)
|
de.offset = -1;
|
||||||
{
|
else if (de.offset != -1 && match(name,Buffer)) {
|
||||||
if (match(name,Buffer))
|
|
||||||
{
|
|
||||||
strncpy(name, Buffer, NAMEBUF_LENGTH);
|
strncpy(name, Buffer, NAMEBUF_LENGTH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} while (de.readno > 0);
|
||||||
}
|
|
||||||
while (de.offset != -1);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,11 +297,10 @@ void FSDrive::find_first_file(char *name)
|
|||||||
* Open directory, create temporary file
|
* Open directory, create temporary file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8 FSDrive::open_directory(int channel, char *filename)
|
uint8 FSDrive::open_directory(int channel, const uint8 *pattern, int pattern_len)
|
||||||
{
|
{
|
||||||
char buf[] = "\001\004\001\001\0\0\022\042 \042 00 2A";
|
char buf[] = "\001\004\001\001\0\0\022\042 \042 00 2A";
|
||||||
char str[NAMEBUF_LENGTH];
|
char str[NAMEBUF_LENGTH];
|
||||||
char pattern[NAMEBUF_LENGTH];
|
|
||||||
char *p, *q;
|
char *p, *q;
|
||||||
int i;
|
int i;
|
||||||
int filemode;
|
int filemode;
|
||||||
@ -366,11 +313,19 @@ uint8 FSDrive::open_directory(int channel, char *filename)
|
|||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
// Special treatment for "$0"
|
// Special treatment for "$0"
|
||||||
if (filename[0] == '0' && filename[1] == 0)
|
if (pattern[0] == '0' && pattern[1] == 0) {
|
||||||
filename += 1;
|
pattern++;
|
||||||
|
pattern_len--;
|
||||||
|
}
|
||||||
|
|
||||||
// Convert filename ('$' already stripped), filemode/type are ignored
|
// Skip everything before the ':' in the pattern
|
||||||
convert_filename(filename, pattern, &filemode, &filetype, &wildflag);
|
uint8 *t = (uint8 *)memchr(pattern, ':', pattern_len);
|
||||||
|
if (t)
|
||||||
|
pattern = t + 1;
|
||||||
|
|
||||||
|
// Convert pattern to ASCII
|
||||||
|
char ascii_pattern[NAMEBUF_LENGTH];
|
||||||
|
petscii2ascii(ascii_pattern, pattern, NAMEBUF_LENGTH);
|
||||||
|
|
||||||
// Open directory for reading and skip '.' and '..'
|
// Open directory for reading and skip '.' and '..'
|
||||||
if ((dir = opendir(dir_path)) == NULL) {
|
if ((dir = opendir(dir_path)) == NULL) {
|
||||||
@ -390,14 +345,14 @@ uint8 FSDrive::open_directory(int channel, char *filename)
|
|||||||
// Create directory title
|
// Create directory title
|
||||||
p = &buf[8];
|
p = &buf[8];
|
||||||
for (i=0; i<16 && dir_title[i]; i++)
|
for (i=0; i<16 && dir_title[i]; i++)
|
||||||
*p++ = conv_to_64(dir_title[i], false);
|
*p++ = ascii2petscii(dir_title[i]);
|
||||||
fwrite(buf, 1, 32, file[channel]);
|
fwrite(buf, 1, 32, file[channel]);
|
||||||
|
|
||||||
// Create and write one line for every directory entry
|
// Create and write one line for every directory entry
|
||||||
while (de) {
|
while (de) {
|
||||||
|
|
||||||
// Include only files matching the pattern
|
// Include only files matching the ascii_pattern
|
||||||
if (match(pattern, de->d_name)) {
|
if (match(ascii_pattern, de->d_name)) {
|
||||||
|
|
||||||
// Get file statistics
|
// Get file statistics
|
||||||
chdir(dir_path);
|
chdir(dir_path);
|
||||||
@ -426,7 +381,7 @@ uint8 FSDrive::open_directory(int channel, char *filename)
|
|||||||
*p++ = '\"';
|
*p++ = '\"';
|
||||||
q = p;
|
q = p;
|
||||||
for (i=0; i<16 && str[i]; i++)
|
for (i=0; i<16 && str[i]; i++)
|
||||||
*q++ = conv_to_64(str[i], true);
|
*q++ = ascii2petscii(str[i]);
|
||||||
*q++ = '\"';
|
*q++ = '\"';
|
||||||
p += 18;
|
p += 18;
|
||||||
|
|
||||||
@ -451,20 +406,24 @@ uint8 FSDrive::open_directory(int channel, char *filename)
|
|||||||
#else
|
#else
|
||||||
dir_full_info di;
|
dir_full_info di;
|
||||||
dir_env de;
|
dir_env de;
|
||||||
|
unsigned char c;
|
||||||
|
|
||||||
// Much of this is very similar to the original
|
// Much of this is very similar to the original
|
||||||
if ((filename[0] == '0') && (filename[1] == 0)) {filename++;}
|
if ((pattern[0] == '0') && (pattern[1] == 0)) {pattern++;}
|
||||||
// Concatenate dir_path and pattern in buffer pattern ==> read subdirs!
|
|
||||||
strcpy(pattern,dir_path);
|
// Concatenate dir_path and ascii_pattern in buffer ascii_pattern ==> read subdirs!
|
||||||
convert_filename(filename, pattern + strlen(pattern), &filemode, &filetype, &wildflag);
|
strcpy(ascii_pattern,dir_path); i = strlen(ascii_pattern); ascii_pattern[i++] = '.'; ascii_pattern[i] = 0;
|
||||||
|
convert_filename(pattern, ascii_pattern + i, &filemode, &filetype, &wildflag);
|
||||||
|
p = ascii_pattern + i; q = p;
|
||||||
|
do {c = *q++; if (c == '.') p = q;} while (c >= 32);
|
||||||
|
*(p-1) = 0; // separate directory-path and ascii_pattern
|
||||||
|
if ((uint8)(*p) < 32) {*p = '*'; *(p+1) = 0;}
|
||||||
|
|
||||||
// We don't use tmpfile() -- problems involved!
|
// We don't use tmpfile() -- problems involved!
|
||||||
DeleteFile(RO_TEMPFILE); // first delete it, if it exists
|
DeleteFile(RO_TEMPFILE); // first delete it, if it exists
|
||||||
if ((file[channel] = fopen(RO_TEMPFILE,"wb+")) == NULL)
|
if ((file[channel] = fopen(RO_TEMPFILE,"wb+")) == NULL)
|
||||||
{
|
|
||||||
return(ST_OK);
|
return(ST_OK);
|
||||||
}
|
de.offset = 0; de.buffsize = NAMEBUF_LENGTH; de.match = p;
|
||||||
de.offset = 0; de.buffsize = NAMEBUF_LENGTH; de.match = filename;
|
|
||||||
|
|
||||||
// Create directory title - copied from above
|
// Create directory title - copied from above
|
||||||
p = &buf[8];
|
p = &buf[8];
|
||||||
@ -472,37 +431,32 @@ uint8 FSDrive::open_directory(int channel, char *filename)
|
|||||||
*p++ = conv_to_64(dir_title[i], false);
|
*p++ = conv_to_64(dir_title[i], false);
|
||||||
fwrite(buf, 1, 32, file[channel]);
|
fwrite(buf, 1, 32, file[channel]);
|
||||||
|
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
de.readno = 1;
|
de.readno = 1;
|
||||||
if (ReadDirNameInfo(pattern,&di,&de) != NULL) {de.offset = -1;}
|
if (ReadDirNameInfo(ascii_pattern,&di,&de) != NULL)
|
||||||
else if (de.offset != -1) // don't have to check for match here
|
de.offset = -1;
|
||||||
{
|
else if (de.readno > 0) { // don't have to check for match here
|
||||||
memset(buf,' ',31); buf[31] = 0; // most of this: see above
|
memset(buf,' ',31); buf[31] = 0; // most of this: see above
|
||||||
p = buf; *p++ = 0x01; *p++ = 0x01;
|
p = buf; *p++ = 0x01; *p++ = 0x01;
|
||||||
i = (di.length + 254) / 254; *p++ = i & 0xff; *p++ = (i>>8) & 0xff;
|
i = (di.length + 254) / 254; *p++ = i & 0xff; *p++ = (i>>8) & 0xff;
|
||||||
p++;
|
p++;
|
||||||
if (i < 10) {*p++ = ' ';}
|
if (i < 10)
|
||||||
if (i < 100) {*p++ = ' ';}
|
*p++ = ' ';
|
||||||
|
if (i < 100)
|
||||||
|
*p++ = ' ';
|
||||||
strcpy(str, di.name);
|
strcpy(str, di.name);
|
||||||
*p++ = '\"'; q = p;
|
*p++ = '\"'; q = p;
|
||||||
for (i=0; (i<16 && str[i]); i++)
|
for (i=0; (i<16 && str[i]); i++)
|
||||||
{
|
|
||||||
*q++ = conv_to_64(str[i], true);
|
*q++ = conv_to_64(str[i], true);
|
||||||
}
|
|
||||||
*q++ = '\"'; p += 18;
|
*q++ = '\"'; p += 18;
|
||||||
if ((di.otype & 2) == 0)
|
if ((di.otype & 2) == 0) {
|
||||||
{
|
|
||||||
*p++ = 'P'; *p++ = 'R'; *p++ = 'G';
|
*p++ = 'P'; *p++ = 'R'; *p++ = 'G';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
*p++ = 'D'; *p++ = 'I'; *p++ = 'R';
|
*p++ = 'D'; *p++ = 'I'; *p++ = 'R';
|
||||||
}
|
}
|
||||||
fwrite(buf, 1, 32, file[channel]);
|
fwrite(buf, 1, 32, file[channel]);
|
||||||
}
|
}
|
||||||
}
|
} while (de.offset != -1);
|
||||||
while (de.offset != -1);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Final line
|
// Final line
|
||||||
@ -558,15 +512,15 @@ void FSDrive::close_all_channels(void)
|
|||||||
* Read from channel
|
* Read from channel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8 FSDrive::Read(int channel, uint8 *byte)
|
uint8 FSDrive::Read(int channel, uint8 &byte)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
// Channel 15: Error channel
|
// Channel 15: Error channel
|
||||||
if (channel == 15) {
|
if (channel == 15) {
|
||||||
*byte = *error_ptr++;
|
byte = *error_ptr++;
|
||||||
|
|
||||||
if (*byte != '\r')
|
if (byte != '\r')
|
||||||
return ST_OK;
|
return ST_OK;
|
||||||
else { // End of message
|
else { // End of message
|
||||||
set_error(ERR_OK);
|
set_error(ERR_OK);
|
||||||
@ -577,7 +531,7 @@ uint8 FSDrive::Read(int channel, uint8 *byte)
|
|||||||
if (!file[channel]) return ST_READ_TIMEOUT;
|
if (!file[channel]) return ST_READ_TIMEOUT;
|
||||||
|
|
||||||
// Read one byte
|
// Read one byte
|
||||||
*byte = read_char[channel];
|
byte = read_char[channel];
|
||||||
c = fgetc(file[channel]);
|
c = fgetc(file[channel]);
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
return ST_EOF;
|
return ST_EOF;
|
||||||
@ -596,15 +550,14 @@ uint8 FSDrive::Write(int channel, uint8 byte, bool eoi)
|
|||||||
{
|
{
|
||||||
// Channel 15: Collect chars and execute command on EOI
|
// Channel 15: Collect chars and execute command on EOI
|
||||||
if (channel == 15) {
|
if (channel == 15) {
|
||||||
if (cmd_len >= 40)
|
if (cmd_len >= 58)
|
||||||
return ST_TIMEOUT;
|
return ST_TIMEOUT;
|
||||||
|
|
||||||
cmd_buffer[cmd_len++] = byte;
|
cmd_buf[cmd_len++] = byte;
|
||||||
|
|
||||||
if (eoi) {
|
if (eoi) {
|
||||||
cmd_buffer[cmd_len] = 0;
|
execute_cmd(cmd_buf, cmd_len);
|
||||||
cmd_len = 0;
|
cmd_len = 0;
|
||||||
execute_command(cmd_buffer);
|
|
||||||
}
|
}
|
||||||
return ST_OK;
|
return ST_OK;
|
||||||
}
|
}
|
||||||
@ -614,8 +567,8 @@ uint8 FSDrive::Write(int channel, uint8 byte, bool eoi)
|
|||||||
return ST_TIMEOUT;
|
return ST_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fputc(byte, file[channel]) == EOF) {
|
if (putc(byte, file[channel]) == EOF) {
|
||||||
set_error(ERR_WRITEERROR);
|
set_error(ERR_WRITE25);
|
||||||
return ST_TIMEOUT;
|
return ST_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,59 +577,18 @@ uint8 FSDrive::Write(int channel, uint8 byte, bool eoi)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute command string
|
* Execute drive commands
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void FSDrive::execute_command(char *command)
|
// INITIALIZE
|
||||||
|
void FSDrive::initialize_cmd(void)
|
||||||
{
|
{
|
||||||
switch (command[0]) {
|
|
||||||
case 'I':
|
|
||||||
close_all_channels();
|
close_all_channels();
|
||||||
set_error(ERR_OK);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'U':
|
|
||||||
if ((command[1] & 0x0f) == 0x0a) {
|
|
||||||
Reset();
|
|
||||||
} else
|
|
||||||
set_error(ERR_SYNTAX30);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'G':
|
|
||||||
if (command[1] != ':')
|
|
||||||
set_error(ERR_SYNTAX30);
|
|
||||||
else
|
|
||||||
chdir_cmd(&command[2]);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
set_error(ERR_SYNTAX30);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VALIDATE
|
||||||
/*
|
void FSDrive::validate_cmd(void)
|
||||||
* Execute 'G' command
|
|
||||||
*/
|
|
||||||
|
|
||||||
void FSDrive::chdir_cmd(char *dirpath)
|
|
||||||
{
|
{
|
||||||
char str[NAMEBUF_LENGTH];
|
|
||||||
char *p = str;
|
|
||||||
|
|
||||||
close_all_channels();
|
|
||||||
|
|
||||||
// G:. resets the directory path to its original setting
|
|
||||||
if (dirpath[0] == '.' && dirpath[1] == 0) {
|
|
||||||
change_dir(orig_dir_path);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// Convert directory name
|
|
||||||
for (int i=0; i<NAMEBUF_LENGTH && (*p++ = conv_from_64(*dirpath++, false)); i++) ;
|
|
||||||
|
|
||||||
if (!change_dir(str))
|
|
||||||
set_error(ERR_NOTREADY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -690,45 +602,3 @@ void FSDrive::Reset(void)
|
|||||||
cmd_len = 0;
|
cmd_len = 0;
|
||||||
set_error(ERR_STARTUP);
|
set_error(ERR_STARTUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Conversion PETSCII->ASCII
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint8 FSDrive::conv_from_64(uint8 c, bool map_slash)
|
|
||||||
{
|
|
||||||
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
|
|
||||||
return c ^ 0x20;
|
|
||||||
if ((c >= 0xc1) && (c <= 0xda))
|
|
||||||
return c ^ 0x80;
|
|
||||||
if ((c == '/') && map_slash && ThePrefs.MapSlash)
|
|
||||||
#ifdef __riscos__
|
|
||||||
return '.'; // directory separator is '.' in RO
|
|
||||||
if (c == '.') {return('_');} // convert dot to underscore
|
|
||||||
#else
|
|
||||||
return '\\';
|
|
||||||
#endif
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Conversion ASCII->PETSCII
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint8 FSDrive::conv_to_64(uint8 c, bool map_slash)
|
|
||||||
{
|
|
||||||
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
|
|
||||||
return c ^ 0x20;
|
|
||||||
#ifdef __riscos__
|
|
||||||
if ((c == '.') && map_slash && ThePrefs.MapSlash)
|
|
||||||
#else
|
|
||||||
if ((c == '\\') && map_slash && ThePrefs.MapSlash)
|
|
||||||
#endif
|
|
||||||
return '/';
|
|
||||||
#ifdef __riscos__
|
|
||||||
if (c == '_') {return('.');} // convert underscore to dot
|
|
||||||
#endif
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
41
Src/1541fs.h
41
Src/1541fs.h
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* 1541fs.h - 1541 emulation in host file system
|
* 1541fs.h - 1541 emulation in host file system
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _1541FS_H
|
#ifndef _1541FS_H
|
||||||
@ -12,34 +26,31 @@
|
|||||||
|
|
||||||
class FSDrive : public Drive {
|
class FSDrive : public Drive {
|
||||||
public:
|
public:
|
||||||
FSDrive(IEC *iec, char *path);
|
FSDrive(IEC *iec, const char *path);
|
||||||
virtual ~FSDrive();
|
virtual ~FSDrive();
|
||||||
virtual uint8 Open(int channel, char *filename);
|
|
||||||
|
virtual uint8 Open(int channel, const uint8 *name, int name_len);
|
||||||
virtual uint8 Close(int channel);
|
virtual uint8 Close(int channel);
|
||||||
virtual uint8 Read(int channel, uint8 *byte);
|
virtual uint8 Read(int channel, uint8 &byte);
|
||||||
virtual uint8 Write(int channel, uint8 byte, bool eoi);
|
virtual uint8 Write(int channel, uint8 byte, bool eoi);
|
||||||
virtual void Reset(void);
|
virtual void Reset(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool change_dir(char *dirpath);
|
bool change_dir(char *dirpath);
|
||||||
uint8 open_file(int channel, char *filename);
|
|
||||||
uint8 open_directory(int channel, char *filename);
|
uint8 open_file(int channel, const uint8 *name, int name_len);
|
||||||
void convert_filename(char *srcname, char *destname, int *filemode, int *filetype, bool *wildflag);
|
uint8 open_directory(int channel, const uint8 *pattern, int pattern_len);
|
||||||
void find_first_file(char *name);
|
void find_first_file(char *pattern);
|
||||||
void close_all_channels(void);
|
void close_all_channels(void);
|
||||||
void execute_command(char *command);
|
|
||||||
void chdir_cmd(char *dirpath);
|
virtual void initialize_cmd(void);
|
||||||
uint8 conv_from_64(uint8 c, bool map_slash);
|
virtual void validate_cmd(void);
|
||||||
uint8 conv_to_64(uint8 c, bool map_slash);
|
|
||||||
|
|
||||||
char dir_path[256]; // Path to directory
|
char dir_path[256]; // Path to directory
|
||||||
char orig_dir_path[256]; // Original directory path
|
char orig_dir_path[256]; // Original directory path
|
||||||
char dir_title[16]; // Directory title
|
char dir_title[16]; // Directory title
|
||||||
FILE *file[16]; // File pointers for each of the 16 channels
|
FILE *file[16]; // File pointers for each of the 16 channels
|
||||||
|
|
||||||
char cmd_buffer[44]; // Buffer for incoming command strings
|
|
||||||
int cmd_len; // Length of received command
|
|
||||||
|
|
||||||
uint8 read_char[16]; // Buffers for one-byte read-ahead
|
uint8 read_char[16]; // Buffers for one-byte read-ahead
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* 1541job.cpp - Emulation of 1541 GCR disk reading/writing
|
* 1541job.cpp - Emulation of 1541 GCR disk reading/writing
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* 1541job.h - Emulation of 1541 GCR disk reading/writing
|
* 1541job.h - Emulation of 1541 GCR disk reading/writing
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _1541JOB_H
|
#ifndef _1541JOB_H
|
||||||
|
809
Src/1541t64.cpp
809
Src/1541t64.cpp
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* 1541t64.h - 1541 emulation in .t64/LYNX file
|
* 1541t64.h - 1541 emulation in archive-type files (.t64/LYNX/.p00)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _1541T64_H
|
#ifndef _1541T64_H
|
||||||
@ -10,53 +24,61 @@
|
|||||||
#include "IEC.h"
|
#include "IEC.h"
|
||||||
|
|
||||||
|
|
||||||
// Information for file inside a .t64 file
|
/*
|
||||||
typedef struct {
|
* Definitions
|
||||||
char name[17]; // File name, PETSCII
|
*/
|
||||||
uint8 type; // File type
|
|
||||||
uint8 sa_lo, sa_hi; // Start address
|
|
||||||
int offset; // Offset of first byte in .t64 file
|
|
||||||
int length; // Length of file
|
|
||||||
} FileInfo;
|
|
||||||
|
|
||||||
|
// Archive types
|
||||||
|
enum {
|
||||||
|
TYPE_T64, // C64S tape file
|
||||||
|
TYPE_LYNX, // C64 LYNX archive
|
||||||
|
TYPE_P00 // .p00 file
|
||||||
|
};
|
||||||
|
|
||||||
class T64Drive : public Drive {
|
// Archive file drive class
|
||||||
|
class ArchDrive : public Drive {
|
||||||
public:
|
public:
|
||||||
T64Drive(IEC *iec, char *filepath);
|
ArchDrive(IEC *iec, const char *filepath);
|
||||||
virtual ~T64Drive();
|
virtual ~ArchDrive();
|
||||||
virtual uint8 Open(int channel, char *filename);
|
|
||||||
|
virtual uint8 Open(int channel, const uint8 *name, int name_len);
|
||||||
virtual uint8 Close(int channel);
|
virtual uint8 Close(int channel);
|
||||||
virtual uint8 Read(int channel, uint8 *byte);
|
virtual uint8 Read(int channel, uint8 &byte);
|
||||||
virtual uint8 Write(int channel, uint8 byte, bool eoi);
|
virtual uint8 Write(int channel, uint8 byte, bool eoi);
|
||||||
virtual void Reset(void);
|
virtual void Reset(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void open_close_t64_file(char *t64name);
|
bool change_arch(const char *path);
|
||||||
bool parse_t64_file(void);
|
|
||||||
bool parse_lynx_file(void);
|
uint8 open_file(int channel, const uint8 *name, int name_len);
|
||||||
uint8 open_file(int channel, char *filename);
|
uint8 open_directory(int channel, const uint8 *pattern, int pattern_len);
|
||||||
uint8 open_directory(int channel, char *filename);
|
bool find_first_file(const uint8 *pattern, int pattern_len, int &num);
|
||||||
void convert_filename(char *srcname, char *destname, int *filemode, int *filetype);
|
|
||||||
bool find_first_file(char *name, int type, int *num);
|
|
||||||
void close_all_channels(void);
|
void close_all_channels(void);
|
||||||
void execute_command(char *command);
|
|
||||||
void cht64_cmd(char *t64path);
|
|
||||||
uint8 conv_from_64(uint8 c, bool map_slash);
|
|
||||||
|
|
||||||
FILE *the_file; // File pointer for .t64 file
|
virtual void rename_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_file, int old_file_len);
|
||||||
bool is_lynx; // Flag: .t64 file is really a LYNX archive
|
virtual void initialize_cmd(void);
|
||||||
|
virtual void validate_cmd(void);
|
||||||
|
|
||||||
|
FILE *the_file; // File pointer for archive file
|
||||||
|
int archive_type; // File/archive type (see defines above)
|
||||||
|
vector<c64_dir_entry> file_info; // Vector of file information structs for all files in the archive
|
||||||
|
|
||||||
char orig_t64_name[256]; // Original path of .t64 file
|
|
||||||
char dir_title[16]; // Directory title
|
char dir_title[16]; // Directory title
|
||||||
FILE *file[16]; // File pointers for each of the 16 channels (all temporary files)
|
FILE *file[16]; // File pointers for each of the 16 channels (all temporary files)
|
||||||
|
|
||||||
int num_files; // Number of files in .t64 file and in file_info array
|
|
||||||
FileInfo *file_info; // Pointer to array of file information structs for each file
|
|
||||||
|
|
||||||
char cmd_buffer[44]; // Buffer for incoming command strings
|
|
||||||
int cmd_len; // Length of received command
|
|
||||||
|
|
||||||
uint8 read_char[16]; // Buffers for one-byte read-ahead
|
uint8 read_char[16]; // Buffers for one-byte read-ahead
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Check whether file with given header (64 bytes) and size looks like one
|
||||||
|
// of the file types supported by this module
|
||||||
|
extern bool IsArchFile(const char *path, const uint8 *header, long size);
|
||||||
|
|
||||||
|
// Read directory of archive file into (empty) c64_dir_entry vector
|
||||||
|
extern bool ReadArchDirectory(const char *path, vector<c64_dir_entry> &vec);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,13 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
* AcornGUI.cc
|
* AcornGUI.cc - Frodo's Graphical User Interface for Acorn RISC OS machines
|
||||||
*
|
*
|
||||||
* Frodo's Graphical User Interface for Acorn RISC OS machines (WIMP)
|
|
||||||
* (C) 1997 Andreas Dehmel
|
* (C) 1997 Andreas Dehmel
|
||||||
*
|
*
|
||||||
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "sysdeps.h"
|
#include "sysdeps.h"
|
||||||
|
|
||||||
#include "C64.h"
|
#include "C64.h"
|
||||||
@ -515,6 +527,12 @@ void WIMP::ThePrefsToWindow(void)
|
|||||||
PrefsWindow->WriteIconNumber(Icon_Prefs_CycleBad,ThePrefs.BadLineCycles);
|
PrefsWindow->WriteIconNumber(Icon_Prefs_CycleBad,ThePrefs.BadLineCycles);
|
||||||
PrefsWindow->WriteIconNumber(Icon_Prefs_CycleCIA,ThePrefs.CIACycles);
|
PrefsWindow->WriteIconNumber(Icon_Prefs_CycleCIA,ThePrefs.CIACycles);
|
||||||
PrefsWindow->WriteIconNumber(Icon_Prefs_CycleFloppy,ThePrefs.FloppyCycles);
|
PrefsWindow->WriteIconNumber(Icon_Prefs_CycleFloppy,ThePrefs.FloppyCycles);
|
||||||
|
|
||||||
|
#ifdef SUPPORT_XROM
|
||||||
|
// XROM
|
||||||
|
PrefsWindow->SetIconState(Icon_Prefs_XROMOn,(ThePrefs.XPandROMOn)?IFlg_Slct:0,IFlg_Slct);
|
||||||
|
PrefsWindow->WriteIconText(Icon_Prefs_XROMPath,ThePrefs.XPandROMFile);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -595,6 +613,12 @@ void WIMP::WindowToThePrefs(void)
|
|||||||
prefs->CIACycles = PrefsWindow->ReadIconNumber(Icon_Prefs_CycleCIA);
|
prefs->CIACycles = PrefsWindow->ReadIconNumber(Icon_Prefs_CycleCIA);
|
||||||
prefs->FloppyCycles = PrefsWindow->ReadIconNumber(Icon_Prefs_CycleFloppy);
|
prefs->FloppyCycles = PrefsWindow->ReadIconNumber(Icon_Prefs_CycleFloppy);
|
||||||
|
|
||||||
|
#ifdef SUPPORT_XROM
|
||||||
|
// XROM
|
||||||
|
pread_opt(XPandROMOn,XROMOn);
|
||||||
|
strcpy(prefs->XPandROMFile,PrefsWindow->ReadIconText(Icon_Prefs_XROMPath));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Finally make the changes known to the system:
|
// Finally make the changes known to the system:
|
||||||
the_c64->NewPrefs(prefs);
|
the_c64->NewPrefs(prefs);
|
||||||
ThePrefs = *prefs;
|
ThePrefs = *prefs;
|
||||||
@ -1587,7 +1611,7 @@ void WIMP::UserMessage(void)
|
|||||||
i = -1; // indicator whether file is accepted
|
i = -1; // indicator whether file is accepted
|
||||||
if ((Block[5] == EmuWindow->MyHandle()) && (Block[10] == FileType_C64File)) {i=0;}
|
if ((Block[5] == EmuWindow->MyHandle()) && (Block[10] == FileType_C64File)) {i=0;}
|
||||||
else if ((Block[5] == EmuWindow->MyHandle()) && (Block[10] == FileType_Data)) {i=0;}
|
else if ((Block[5] == EmuWindow->MyHandle()) && (Block[10] == FileType_Data)) {i=0;}
|
||||||
else if ((Block[5] == PrefsWindow->MyHandle()) && (Block[10] == FileType_Text)) {i=0;}
|
else if ((Block[5] == PrefsWindow->MyHandle()) && ((Block[10] == FileType_Text) || (Block[10] == FileType_C64File))) {i=0;}
|
||||||
else if ((Block[5] == ConfigWindow->MyHandle()) && (Block[10] == FileType_Text)) {i=0;}
|
else if ((Block[5] == ConfigWindow->MyHandle()) && (Block[10] == FileType_Text)) {i=0;}
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
{
|
{
|
||||||
@ -1647,6 +1671,12 @@ void WIMP::UserMessage(void)
|
|||||||
Block[MsgB_YourRef] = Block[MsgB_MyRef]; Block[MsgB_Action] = Message_DataLoadAck;
|
Block[MsgB_YourRef] = Block[MsgB_MyRef]; Block[MsgB_Action] = Message_DataLoadAck;
|
||||||
Wimp_SendMessage(17,Block,Block[MsgB_Sender],Block[6]);
|
Wimp_SendMessage(17,Block,Block[MsgB_Sender],Block[6]);
|
||||||
}
|
}
|
||||||
|
else if ((Block[6] == Icon_Prefs_XROMPath) && (Block[10] == FileType_C64File))
|
||||||
|
{
|
||||||
|
PrefsWindow->WriteIconText(Icon_Prefs_XROMPath,((char*)Block)+44);
|
||||||
|
Block[MsgB_YourRef] = Block[MsgB_MyRef]; Block[MsgB_Action] = Message_DataLoadAck;
|
||||||
|
Wimp_SendMessage(17,Block,Block[MsgB_Sender],Block[6]);
|
||||||
|
}
|
||||||
else // interpret as drive path (if dragged on one of the drive path icons)
|
else // interpret as drive path (if dragged on one of the drive path icons)
|
||||||
{
|
{
|
||||||
switch (Block[6])
|
switch (Block[6])
|
||||||
@ -1655,7 +1685,7 @@ void WIMP::UserMessage(void)
|
|||||||
case Icon_Prefs_Dr9Path: i = 1; break;
|
case Icon_Prefs_Dr9Path: i = 1; break;
|
||||||
case Icon_Prefs_Dr10Path: i = 2; break;
|
case Icon_Prefs_Dr10Path: i = 2; break;
|
||||||
case Icon_Prefs_Dr11Path: i = 3; break;
|
case Icon_Prefs_Dr11Path: i = 3; break;
|
||||||
default: -1; break;
|
default: i = -1; break;
|
||||||
}
|
}
|
||||||
if (i >= 0) {NewDriveImage(i,Block,false);}
|
if (i >= 0) {NewDriveImage(i,Block,false);}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
* AcornGUI.h
|
* AcornGUI.h - Defines variables for the WIMP interface
|
||||||
*
|
*
|
||||||
* Defines variables for the WIMP interface
|
|
||||||
* (C) 1997 Andreas Dehmel
|
* (C) 1997 Andreas Dehmel
|
||||||
*
|
*
|
||||||
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -262,6 +276,8 @@
|
|||||||
#define Icon_Prefs_PrefPath 70
|
#define Icon_Prefs_PrefPath 70
|
||||||
#define Icon_Prefs_Save 71
|
#define Icon_Prefs_Save 71
|
||||||
#define Icon_Prefs_PrefSprite 72
|
#define Icon_Prefs_PrefSprite 72
|
||||||
|
#define Icon_Prefs_XROMOn 75
|
||||||
|
#define Icon_Prefs_XROMPath 76
|
||||||
|
|
||||||
#define Icon_Conf_PollAfter 3
|
#define Icon_Conf_PollAfter 3
|
||||||
#define Icon_Conf_SpeedAfter 5
|
#define Icon_Conf_SpeedAfter 5
|
||||||
|
@ -4,7 +4,23 @@
|
|||||||
* The RISC OS port needs to recompile AcornGUI_SC.cc with FRODO_SC defined
|
* The RISC OS port needs to recompile AcornGUI_SC.cc with FRODO_SC defined
|
||||||
* or it won't work. Source code is identical with AcornGUI.cc
|
* or it won't work. Source code is identical with AcornGUI.cc
|
||||||
*
|
*
|
||||||
|
* (C) 1997 Andreas Dehmel
|
||||||
|
*
|
||||||
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "AcornGUI.cc"
|
#include "AcornGUI.cc"
|
||||||
|
3104
Src/BRUCELEE.h
Normal file
3104
Src/BRUCELEE.h
Normal file
File diff suppressed because it is too large
Load Diff
1033
Src/Basic_ROM.h
Normal file
1033
Src/Basic_ROM.h
Normal file
File diff suppressed because it is too large
Load Diff
69
Src/C64.cpp
69
Src/C64.cpp
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* C64.cpp - Put the pieces together
|
* C64.cpp - Put the pieces together
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sysdeps.h"
|
#include "sysdeps.h"
|
||||||
@ -18,7 +32,7 @@
|
|||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
|
|
||||||
#if defined(__unix) && !defined(__svgalib__) && !defined(HAVE_SDL)
|
#if defined(__unix) && !defined(__svgalib__) &&!defined(WII)
|
||||||
#include "CmdPipe.h"
|
#include "CmdPipe.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -36,7 +50,6 @@ bool IsFrodoSC = false;
|
|||||||
|
|
||||||
C64::C64()
|
C64::C64()
|
||||||
{
|
{
|
||||||
int i,j;
|
|
||||||
uint8 *p;
|
uint8 *p;
|
||||||
|
|
||||||
// The thread is not yet running
|
// The thread is not yet running
|
||||||
@ -51,13 +64,13 @@ C64::C64()
|
|||||||
TheDisplay = new C64Display(this);
|
TheDisplay = new C64Display(this);
|
||||||
|
|
||||||
// Allocate RAM/ROM memory
|
// Allocate RAM/ROM memory
|
||||||
RAM = new uint8[0x10000];
|
RAM = new uint8[C64_RAM_SIZE];
|
||||||
Basic = new uint8[0x2000];
|
Basic = new uint8[BASIC_ROM_SIZE];
|
||||||
Kernal = new uint8[0x2000];
|
Kernal = new uint8[KERNAL_ROM_SIZE];
|
||||||
Char = new uint8[0x1000];
|
Char = new uint8[CHAR_ROM_SIZE];
|
||||||
Color = new uint8[0x0400];
|
Color = new uint8[COLOR_RAM_SIZE];
|
||||||
RAM1541 = new uint8[0x0800];
|
RAM1541 = new uint8[DRIVE_RAM_SIZE];
|
||||||
ROM1541 = new uint8[0x4000];
|
ROM1541 = new uint8[DRIVE_ROM_SIZE];
|
||||||
|
|
||||||
// Create the chips
|
// Create the chips
|
||||||
TheCPU = new MOS6510(this, RAM, Basic, Kernal, Char, Color);
|
TheCPU = new MOS6510(this, RAM, Basic, Kernal, Char, Color);
|
||||||
@ -73,22 +86,24 @@ C64::C64()
|
|||||||
TheREU = TheCPU->TheREU = new REU(TheCPU);
|
TheREU = TheCPU->TheREU = new REU(TheCPU);
|
||||||
|
|
||||||
// Initialize RAM with powerup pattern
|
// Initialize RAM with powerup pattern
|
||||||
for (i=0, p=RAM; i<512; i++) {
|
p = RAM;
|
||||||
for (j=0; j<64; j++)
|
for (unsigned i=0; i<512; i++) {
|
||||||
|
for (unsigned j=0; j<64; j++)
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
for (j=0; j<64; j++)
|
for (unsigned j=0; j<64; j++)
|
||||||
*p++ = 0xff;
|
*p++ = 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize color RAM with random values
|
// Initialize color RAM with random values
|
||||||
for (i=0, p=Color; i<1024; i++)
|
p = Color;
|
||||||
|
for (unsigned i=0; i<COLOR_RAM_SIZE; i++)
|
||||||
*p++ = rand() & 0x0f;
|
*p++ = rand() & 0x0f;
|
||||||
|
|
||||||
// Clear 1541 RAM
|
// Clear 1541 RAM
|
||||||
memset(RAM1541, 0, 0x800);
|
memset(RAM1541, 0, DRIVE_RAM_SIZE);
|
||||||
|
|
||||||
// Open joystick drivers if required
|
// Open joystick drivers if required
|
||||||
open_close_joysticks(false, false, ThePrefs.Joystick1On, ThePrefs.Joystick2On);
|
open_close_joysticks(0, 0, ThePrefs.Joystick1Port, ThePrefs.Joystick2Port);
|
||||||
joykey = 0xff;
|
joykey = 0xff;
|
||||||
|
|
||||||
#ifdef FRODO_SC
|
#ifdef FRODO_SC
|
||||||
@ -106,7 +121,7 @@ C64::C64()
|
|||||||
|
|
||||||
C64::~C64()
|
C64::~C64()
|
||||||
{
|
{
|
||||||
open_close_joysticks(ThePrefs.Joystick1On, ThePrefs.Joystick2On, false, false);
|
open_close_joysticks(ThePrefs.Joystick1Port, ThePrefs.Joystick2Port, 0, 0);
|
||||||
|
|
||||||
delete TheJob1541;
|
delete TheJob1541;
|
||||||
delete TheREU;
|
delete TheREU;
|
||||||
@ -164,7 +179,7 @@ void C64::NMI(void)
|
|||||||
|
|
||||||
void C64::NewPrefs(Prefs *prefs)
|
void C64::NewPrefs(Prefs *prefs)
|
||||||
{
|
{
|
||||||
open_close_joysticks(ThePrefs.Joystick1On, ThePrefs.Joystick2On, prefs->Joystick1On, prefs->Joystick2On);
|
open_close_joysticks(ThePrefs.Joystick1Port, ThePrefs.Joystick2Port, prefs->Joystick1Port, prefs->Joystick2Port);
|
||||||
PatchKernal(prefs->FastReset, prefs->Emul1541Proc);
|
PatchKernal(prefs->FastReset, prefs->Emul1541Proc);
|
||||||
|
|
||||||
TheDisplay->NewPrefs(prefs);
|
TheDisplay->NewPrefs(prefs);
|
||||||
@ -690,25 +705,29 @@ bool C64::LoadSnapshot(char *filename)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
#include "C64_Be.i"
|
#include "C64_Be.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef AMIGA
|
#ifdef AMIGA
|
||||||
#include "C64_Amiga.i"
|
#include "C64_Amiga.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SDL
|
#ifdef __unix
|
||||||
#include "C64_SDL.i"
|
# if defined(QTOPIA) or defined(MAEMO) or defined(WII)
|
||||||
|
# include "C64_Embedded.h"
|
||||||
|
# else
|
||||||
|
# include "C64_x.h"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __mac__
|
#ifdef __mac__
|
||||||
#include "C64_mac.i"
|
#include "C64_mac.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "C64_WIN32.i"
|
#include "C64_WIN32.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
#include "C64_Acorn.i"
|
#include "C64_Acorn.h"
|
||||||
#endif
|
#endif
|
||||||
|
74
Src/C64.h
74
Src/C64.h
@ -1,20 +1,28 @@
|
|||||||
/*
|
/*
|
||||||
* C64.h - Put the pieces together
|
* C64.h - Put the pieces together
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _C64_H
|
#ifndef _C64_H
|
||||||
#define _C64_H
|
#define _C64_H
|
||||||
|
|
||||||
#if defined(HAVE_SDL)
|
|
||||||
/* SDL menu */
|
|
||||||
#include "menu.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
#include <KernelKit.h>
|
#include <KernelKit.h>
|
||||||
#include <device/Joystick.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef AMIGA
|
#ifdef AMIGA
|
||||||
@ -27,11 +35,16 @@
|
|||||||
#include "ROlib.h"
|
#include "ROlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GEKKO
|
|
||||||
#define PREFS_PATH "/apps/frodo/frodorc"
|
// Sizes of memory areas
|
||||||
#elif HAVE_SDL
|
const int C64_RAM_SIZE = 0x10000;
|
||||||
#define PREFS_PATH "/home/ska/.frodorc"
|
const int COLOR_RAM_SIZE = 0x400;
|
||||||
#endif
|
const int BASIC_ROM_SIZE = 0x2000;
|
||||||
|
const int KERNAL_ROM_SIZE = 0x2000;
|
||||||
|
const int CHAR_ROM_SIZE = 0x1000;
|
||||||
|
const int DRIVE_RAM_SIZE = 0x800;
|
||||||
|
const int DRIVE_ROM_SIZE = 0x4000;
|
||||||
|
|
||||||
|
|
||||||
// false: Frodo, true: FrodoSC
|
// false: Frodo, true: FrodoSC
|
||||||
extern bool IsFrodoSC;
|
extern bool IsFrodoSC;
|
||||||
@ -100,15 +113,12 @@ public:
|
|||||||
#ifdef FRODO_SC
|
#ifdef FRODO_SC
|
||||||
uint32 CycleCounter;
|
uint32 CycleCounter;
|
||||||
#endif
|
#endif
|
||||||
void enter_menu() {
|
|
||||||
this->have_a_break = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void c64_ctor1(void);
|
void c64_ctor1(void);
|
||||||
void c64_ctor2(void);
|
void c64_ctor2(void);
|
||||||
void c64_dtor(void);
|
void c64_dtor(void);
|
||||||
void open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2);
|
void open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2);
|
||||||
uint8 poll_joystick(int port);
|
uint8 poll_joystick(int port);
|
||||||
void thread_func(void);
|
void thread_func(void);
|
||||||
|
|
||||||
@ -116,7 +126,7 @@ private:
|
|||||||
bool quit_thyself; // Emulation thread shall quit
|
bool quit_thyself; // Emulation thread shall quit
|
||||||
bool have_a_break; // Emulation thread shall pause
|
bool have_a_break; // Emulation thread shall pause
|
||||||
|
|
||||||
int joy_minx, joy_maxx, joy_miny, joy_maxy; // For dynamic joystick calibration
|
int joy_minx[2], joy_maxx[2], joy_miny[2], joy_maxy[2]; // For dynamic joystick calibration
|
||||||
uint8 joykey; // Joystick keyboard emulation mask value
|
uint8 joykey; // Joystick keyboard emulation mask value
|
||||||
|
|
||||||
uint8 orig_kernal_1d84, // Original contents of kernal locations $1d84 and $1d85
|
uint8 orig_kernal_1d84, // Original contents of kernal locations $1d84 and $1d85
|
||||||
@ -128,12 +138,14 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static long thread_invoc(void *obj);
|
static long thread_invoc(void *obj);
|
||||||
|
void open_close_joystick(int port, int oldjoy, int newjoy);
|
||||||
|
|
||||||
BJoystick *joy[2]; // Joystick objects
|
void *joy[2]; // Joystick objects (BJoystick or BDigitalPort)
|
||||||
|
bool joy_geek_port[2]; // Flag: joystick on GeekPort?
|
||||||
thread_id the_thread;
|
thread_id the_thread;
|
||||||
sem_id pause_sem;
|
sem_id pause_sem;
|
||||||
sem_id sound_sync_sem;
|
sem_id sound_sync_sem;
|
||||||
double start_time;
|
bigtime_t start_time;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef AMIGA
|
#ifdef AMIGA
|
||||||
@ -148,31 +160,11 @@ private:
|
|||||||
bool game_open, port_allocated; // Flags: gameport.device opened, game port allocated
|
bool game_open, port_allocated; // Flags: gameport.device opened, game port allocated
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GEKKO
|
|
||||||
double speed_index;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __unix
|
#ifdef __unix
|
||||||
int joyfd[2]; // File descriptors for joysticks
|
void open_close_joystick(int port, int oldjoy, int newjoy);
|
||||||
double speed_index;
|
double speed_index;
|
||||||
public:
|
public:
|
||||||
#endif
|
CmdPipe *gui;
|
||||||
#ifdef HAVE_SDL
|
|
||||||
menu_t main_menu;
|
|
||||||
TTF_Font *menu_font;
|
|
||||||
|
|
||||||
bool fake_key_sequence;
|
|
||||||
int fake_key_type;
|
|
||||||
int fake_key_index;
|
|
||||||
int fake_key_keytime;
|
|
||||||
|
|
||||||
bool prefs_changed;
|
|
||||||
char save_game_name[256];
|
|
||||||
|
|
||||||
void select_disc(Prefs *np);
|
|
||||||
void bind_key(Prefs *np);
|
|
||||||
void other_options(Prefs *np);
|
|
||||||
void save_load_state(Prefs *np);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
* C64_Acorn.i
|
* C64_Acorn.h - Put the pieces together, RISC OS specific stuff
|
||||||
*
|
*
|
||||||
* RISC OS specific stuff concerning the actual emulator
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
|
||||||
* Acorn port by Andreas Dehmel, 1997
|
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "ROlib.h"
|
#include "ROlib.h"
|
||||||
#include "AcornGUI.h"
|
#include "AcornGUI.h"
|
||||||
@ -146,7 +156,7 @@ void C64::c64_dtor(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
|
void C64::open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2)
|
||||||
{
|
{
|
||||||
// Check if the Joystick module is loaded. If not then write an illegal value to
|
// Check if the Joystick module is loaded. If not then write an illegal value to
|
||||||
// the joystick state.
|
// the joystick state.
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* C64_Amiga.i - Put the pieces together, Amiga specific stuff
|
* C64_Amiga.h - Put the pieces together, Amiga specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <proto/exec.h>
|
#include <proto/exec.h>
|
||||||
@ -213,7 +227,7 @@ void C64::VBlank(bool draw_frame)
|
|||||||
* joystick preferences
|
* joystick preferences
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
|
void C64::open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2)
|
||||||
{
|
{
|
||||||
if (game_open && (oldjoy2 != newjoy2))
|
if (game_open && (oldjoy2 != newjoy2))
|
||||||
|
|
@ -1,11 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
* C64_Be.i - Put the pieces together, Be specific stuff
|
* C64_Be.h - Put the pieces together, Be specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <KernelKit.h>
|
#include <KernelKit.h>
|
||||||
#include <device/Joystick.h>
|
#include <device/Joystick.h>
|
||||||
|
#include <device/DigitalPort.h>
|
||||||
|
|
||||||
#undef PROFILING
|
#undef PROFILING
|
||||||
|
|
||||||
@ -16,8 +31,8 @@
|
|||||||
|
|
||||||
void C64::c64_ctor1(void)
|
void C64::c64_ctor1(void)
|
||||||
{
|
{
|
||||||
joy[0] = new BJoystick();
|
joy[0] = joy[1] = NULL;
|
||||||
joy[1] = new BJoystick();
|
joy_geek_port[0] = joy_geek_port[1] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void C64::c64_ctor2(void)
|
void C64::c64_ctor2(void)
|
||||||
@ -43,9 +58,6 @@ void C64::c64_dtor(void)
|
|||||||
{
|
{
|
||||||
delete_sem(pause_sem);
|
delete_sem(pause_sem);
|
||||||
delete_sem(sound_sync_sem);
|
delete_sem(sound_sync_sem);
|
||||||
|
|
||||||
delete joy[0];
|
|
||||||
delete joy[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -210,25 +222,50 @@ void C64::SoundSync(void)
|
|||||||
* joystick preferences
|
* joystick preferences
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
|
void C64::open_close_joystick(int port, int oldjoy, int newjoy)
|
||||||
{
|
{
|
||||||
if (oldjoy1 != newjoy1) {
|
if (oldjoy != newjoy) {
|
||||||
joy_minx = joy_miny = 32767; // Reset calibration
|
joy_minx = joy_miny = 32767; // Reset calibration
|
||||||
joy_maxx = joy_maxy = 0;
|
joy_maxx = joy_maxy = 0;
|
||||||
if (newjoy1)
|
if (joy[port]) {
|
||||||
joy[0]->Open("joystick2");
|
if (joy_geek_port[port]) {
|
||||||
else
|
((BDigitalPort *)joy[port])->Close();
|
||||||
joy[0]->Close();
|
delete (BDigitalPort *)joy[port];
|
||||||
|
} else {
|
||||||
|
((BJoystick *)joy[port])->Close();
|
||||||
|
delete (BJoystick *)joy[port];
|
||||||
}
|
}
|
||||||
|
joy[port] = NULL;
|
||||||
|
}
|
||||||
|
switch (newjoy) {
|
||||||
|
case 1:
|
||||||
|
joy[port] = new BJoystick;
|
||||||
|
((BJoystick *)joy[port])->Open("joystick1");
|
||||||
|
joy_geek_port[port] = false;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
joy[port] = new BJoystick;
|
||||||
|
((BJoystick *)joy[port])->Open("joystick2");
|
||||||
|
joy_geek_port[port] = false;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
joy[port] = new BDigitalPort;
|
||||||
|
((BDigitalPort *)joy[port])->Open("DigitalA");
|
||||||
|
joy_geek_port[port] = true;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
joy[port] = new BDigitalPort;
|
||||||
|
((BDigitalPort *)joy[port])->Open("DigitalB");
|
||||||
|
joy_geek_port[port] = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (oldjoy2 != newjoy2) {
|
void C64::open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2)
|
||||||
joy_minx = joy_miny = 32767; // Reset calibration
|
{
|
||||||
joy_maxx = joy_maxy = 0;
|
open_close_joystick(0, oldjoy1, newjoy1);
|
||||||
if (newjoy2)
|
open_close_joystick(1, oldjoy2, newjoy2);
|
||||||
joy[1]->Open("joystick1");
|
|
||||||
else
|
|
||||||
joy[1]->Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -240,32 +277,47 @@ uint8 C64::poll_joystick(int port)
|
|||||||
{
|
{
|
||||||
uint8 j = 0xff;
|
uint8 j = 0xff;
|
||||||
|
|
||||||
if (joy[port]->Update() != B_ERROR) {
|
if (joy[port] == NULL)
|
||||||
if (joy[port]->horizontal > joy_maxx)
|
return j;
|
||||||
joy_maxx = joy[port]->horizontal;
|
|
||||||
if (joy[port]->horizontal < joy_minx)
|
|
||||||
joy_minx = joy[port]->horizontal;
|
|
||||||
if (joy[port]->vertical > joy_maxy)
|
|
||||||
joy_maxy = joy[port]->vertical;
|
|
||||||
if (joy[port]->vertical < joy_miny)
|
|
||||||
joy_miny = joy[port]->vertical;
|
|
||||||
|
|
||||||
if (!joy[port]->button1)
|
if (joy_geek_port[port]) {
|
||||||
|
|
||||||
|
// GeekPort
|
||||||
|
uint8 val;
|
||||||
|
if (((BDigitalPort *)joy[port])->Read(&val) == 1)
|
||||||
|
j = val | 0xe0;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Joystick port
|
||||||
|
BJoystick *p = (BJoystick *)joy[port];
|
||||||
|
if (p->Update() != B_ERROR) {
|
||||||
|
if (p->horizontal > joy_maxx)
|
||||||
|
joy_maxx = p->horizontal;
|
||||||
|
if (p->horizontal < joy_minx)
|
||||||
|
joy_minx = p->horizontal;
|
||||||
|
if (p->vertical > joy_maxy)
|
||||||
|
joy_maxy = p->vertical;
|
||||||
|
if (p->vertical < joy_miny)
|
||||||
|
joy_miny = p->vertical;
|
||||||
|
|
||||||
|
if (!p->button1)
|
||||||
j &= 0xef; // Button
|
j &= 0xef; // Button
|
||||||
|
|
||||||
if (joy_maxx-joy_minx < 100 || joy_maxy-joy_miny < 100)
|
if (joy_maxx-joy_minx < 100 || joy_maxy-joy_miny < 100)
|
||||||
return j;
|
return j;
|
||||||
|
|
||||||
if (joy[port]->horizontal < (joy_minx + (joy_maxx-joy_minx)/3))
|
if (p->horizontal < (joy_minx + (joy_maxx-joy_minx)/3))
|
||||||
j &= 0xf7; // Right
|
j &= 0xf7; // Right
|
||||||
else if (joy[port]->horizontal > (joy_minx + 2*(joy_maxx-joy_minx)/3))
|
else if (p->horizontal > (joy_minx + 2*(joy_maxx-joy_minx)/3))
|
||||||
j &= 0xfb; // Left
|
j &= 0xfb; // Left
|
||||||
|
|
||||||
if (joy[port]->vertical < (joy_miny + (joy_maxy-joy_miny)/3))
|
if (p->vertical < (joy_miny + (joy_maxy-joy_miny)/3))
|
||||||
j &= 0xfd; // Down
|
j &= 0xfd; // Down
|
||||||
else if (joy[port]->vertical > (joy_miny + 2*(joy_maxy-joy_miny)/3))
|
else if (p->vertical > (joy_miny + 2*(joy_maxy-joy_miny)/3))
|
||||||
j &= 0xfe; // Up
|
j &= 0xfe; // Up
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
357
Src/C64_Embedded.h
Normal file
357
Src/C64_Embedded.h
Normal file
@ -0,0 +1,357 @@
|
|||||||
|
/*
|
||||||
|
* C64_x.h - Put the pieces together, X specific stuff
|
||||||
|
*
|
||||||
|
* Frodo (C) 1994-1997,2002-2004 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
#include <sys/time.h>
|
||||||
|
#ifndef R14
|
||||||
|
static struct timeval tv_start;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_USLEEP
|
||||||
|
/*
|
||||||
|
* NAME:
|
||||||
|
* usleep -- This is the precision timer for Test Set
|
||||||
|
* Automation. It uses the select(2) system
|
||||||
|
* call to delay for the desired number of
|
||||||
|
* micro-seconds. This call returns ZERO
|
||||||
|
* (which is usually ignored) on successful
|
||||||
|
* completion, -1 otherwise.
|
||||||
|
*
|
||||||
|
* ALGORITHM:
|
||||||
|
* 1) We range check the passed in microseconds and log a
|
||||||
|
* warning message if appropriate. We then return without
|
||||||
|
* delay, flagging an error.
|
||||||
|
* 2) Load the Seconds and micro-seconds portion of the
|
||||||
|
* interval timer structure.
|
||||||
|
* 3) Call select(2) with no file descriptors set, just the
|
||||||
|
* timer, this results in either delaying the proper
|
||||||
|
* ammount of time or being interupted early by a signal.
|
||||||
|
*
|
||||||
|
* HISTORY:
|
||||||
|
* Added when the need for a subsecond timer was evident.
|
||||||
|
*
|
||||||
|
* AUTHOR:
|
||||||
|
* Michael J. Dyer Telephone: AT&T 414.647.4044
|
||||||
|
* General Electric Medical Systems GE DialComm 8 *767.4044
|
||||||
|
* P.O. Box 414 Mail Stop 12-27 Sect'y AT&T 414.647.4584
|
||||||
|
* Milwaukee, Wisconsin USA 53201 8 *767.4584
|
||||||
|
* internet: mike@sherlock.med.ge.com GEMS WIZARD e-mail: DYER
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
int usleep(unsigned long int microSeconds)
|
||||||
|
{
|
||||||
|
unsigned int Seconds, uSec;
|
||||||
|
int nfds, readfds, writefds, exceptfds;
|
||||||
|
struct timeval Timer;
|
||||||
|
|
||||||
|
nfds = readfds = writefds = exceptfds = 0;
|
||||||
|
|
||||||
|
if( (microSeconds == (unsigned long) 0)
|
||||||
|
|| microSeconds > (unsigned long) 4000000 )
|
||||||
|
{
|
||||||
|
errno = ERANGE; /* value out of range */
|
||||||
|
perror( "usleep time out of range ( 0 -> 4000000 ) " );
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Seconds = microSeconds / (unsigned long) 1000000;
|
||||||
|
uSec = microSeconds % (unsigned long) 1000000;
|
||||||
|
|
||||||
|
Timer.tv_sec = Seconds;
|
||||||
|
Timer.tv_usec = uSec;
|
||||||
|
|
||||||
|
if( select( nfds, &readfds, &writefds, &exceptfds, &Timer ) < 0 )
|
||||||
|
{
|
||||||
|
perror( "usleep (select) failed" );
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
// select() timing is much more accurate under Linux
|
||||||
|
static void Delay_usec(unsigned long usec)
|
||||||
|
{
|
||||||
|
int was_error;
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
|
tv.tv_sec = 0;
|
||||||
|
tv.tv_usec = usec;
|
||||||
|
do {
|
||||||
|
errno = 0;
|
||||||
|
was_error = select(0, NULL, NULL, NULL, &tv);
|
||||||
|
} while (was_error && (errno == EINTR));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void Delay_usec(unsigned long usec)
|
||||||
|
{
|
||||||
|
usleep(usec);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructor, system-dependent things
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::c64_ctor1(void)
|
||||||
|
{
|
||||||
|
// Initialize joystick variables
|
||||||
|
joy_minx[0] = joy_miny[0] = 32767;
|
||||||
|
joy_maxx[0] = joy_maxy[0] = -32768;
|
||||||
|
joy_minx[1] = joy_miny[1] = 32767;
|
||||||
|
joy_maxx[1] = joy_maxy[1] = -32768;
|
||||||
|
}
|
||||||
|
|
||||||
|
void C64::c64_ctor2(void)
|
||||||
|
{
|
||||||
|
#ifndef R14
|
||||||
|
gettimeofday(&tv_start, NULL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destructor, system-dependent things
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::c64_dtor(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Start main emulation thread
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::Run(void)
|
||||||
|
{
|
||||||
|
// Reset chips
|
||||||
|
TheCPU->Reset();
|
||||||
|
TheSID->Reset();
|
||||||
|
TheCIA1->Reset();
|
||||||
|
TheCIA2->Reset();
|
||||||
|
TheCPU1541->Reset();
|
||||||
|
|
||||||
|
// Patch kernal IEC routines
|
||||||
|
orig_kernal_1d84 = Kernal[0x1d84];
|
||||||
|
orig_kernal_1d85 = Kernal[0x1d85];
|
||||||
|
PatchKernal(ThePrefs.FastReset, ThePrefs.Emul1541Proc);
|
||||||
|
|
||||||
|
quit_thyself = false;
|
||||||
|
thread_func();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char kbd_feedbuf[255];
|
||||||
|
int kbd_feedbuf_pos;
|
||||||
|
|
||||||
|
void kbd_buf_feed(char *s) {
|
||||||
|
strcpy(kbd_feedbuf, s);
|
||||||
|
kbd_feedbuf_pos=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void kbd_buf_update(C64 *TheC64) {
|
||||||
|
if((kbd_feedbuf[kbd_feedbuf_pos]!=0)
|
||||||
|
&& TheC64->RAM[198]==0) {
|
||||||
|
TheC64->RAM[631]=kbd_feedbuf[kbd_feedbuf_pos];
|
||||||
|
TheC64->RAM[198]=1;
|
||||||
|
|
||||||
|
kbd_feedbuf_pos++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void load_prg(C64 *TheC64, uint8 *prg, int prg_size) {
|
||||||
|
uint8 start_hi, start_lo;
|
||||||
|
uint16 start;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
start_lo=*prg++;
|
||||||
|
start_hi=*prg++;
|
||||||
|
start=(start_hi<<8)+start_lo;
|
||||||
|
|
||||||
|
for(i=0; i<(prg_size-2); i++) {
|
||||||
|
TheC64->RAM[start+i]=prg[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Vertical blank: Poll keyboard and joysticks, update window
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::VBlank(bool draw_frame)
|
||||||
|
{
|
||||||
|
// Poll keyboard
|
||||||
|
TheDisplay->PollKeyboard(TheCIA1->KeyMatrix, TheCIA1->RevMatrix, &joykey);
|
||||||
|
if (TheDisplay->quit_requested)
|
||||||
|
quit_thyself = true;
|
||||||
|
|
||||||
|
// Poll joysticks
|
||||||
|
TheCIA1->Joystick1 = poll_joystick(0);
|
||||||
|
TheCIA1->Joystick2 = poll_joystick(1);
|
||||||
|
|
||||||
|
if (ThePrefs.JoystickSwap) {
|
||||||
|
uint8 tmp = TheCIA1->Joystick1;
|
||||||
|
TheCIA1->Joystick1 = TheCIA1->Joystick2;
|
||||||
|
TheCIA1->Joystick2 = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Joystick keyboard emulation
|
||||||
|
if (TheDisplay->NumLock())
|
||||||
|
TheCIA1->Joystick1 &= joykey;
|
||||||
|
else
|
||||||
|
TheCIA1->Joystick2 &= joykey;
|
||||||
|
|
||||||
|
// Count TOD clocks
|
||||||
|
TheCIA1->CountTOD();
|
||||||
|
TheCIA2->CountTOD();
|
||||||
|
|
||||||
|
// Update window if needed
|
||||||
|
if (draw_frame) {
|
||||||
|
TheDisplay->Update();
|
||||||
|
#ifndef R14
|
||||||
|
// Calculate time between VBlanks, display speedometer
|
||||||
|
struct timeval tv;
|
||||||
|
gettimeofday(&tv, NULL);
|
||||||
|
if ((tv.tv_usec -= tv_start.tv_usec) < 0) {
|
||||||
|
tv.tv_usec += 1000000;
|
||||||
|
tv.tv_sec -= 1;
|
||||||
|
}
|
||||||
|
tv.tv_sec -= tv_start.tv_sec;
|
||||||
|
double elapsed_time = (double)tv.tv_sec * 1000000 + tv.tv_usec;
|
||||||
|
speed_index = 20000 / (elapsed_time + 1) * ThePrefs.SkipFrames * 100;
|
||||||
|
|
||||||
|
// Limit speed to 100% if desired
|
||||||
|
if ((speed_index > 100) && ThePrefs.LimitSpeed) {
|
||||||
|
Delay_usec((unsigned long)(ThePrefs.SkipFrames * 20000 - elapsed_time));
|
||||||
|
speed_index = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
gettimeofday(&tv_start, NULL);
|
||||||
|
#endif
|
||||||
|
kbd_buf_update(this);
|
||||||
|
TheDisplay->Speedometer((int)speed_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The emulation's main loop
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::thread_func(void)
|
||||||
|
{
|
||||||
|
int linecnt = 0;
|
||||||
|
|
||||||
|
#ifdef FRODO_SC
|
||||||
|
while (!quit_thyself) {
|
||||||
|
|
||||||
|
// The order of calls is important here
|
||||||
|
if (TheVIC->EmulateCycle())
|
||||||
|
TheSID->EmulateLine();
|
||||||
|
TheCIA1->CheckIRQs();
|
||||||
|
TheCIA2->CheckIRQs();
|
||||||
|
TheCIA1->EmulateCycle();
|
||||||
|
TheCIA2->EmulateCycle();
|
||||||
|
TheCPU->EmulateCycle();
|
||||||
|
|
||||||
|
if (ThePrefs.Emul1541Proc) {
|
||||||
|
TheCPU1541->CountVIATimers(1);
|
||||||
|
if (!TheCPU1541->Idle)
|
||||||
|
TheCPU1541->EmulateCycle();
|
||||||
|
}
|
||||||
|
CycleCounter++;
|
||||||
|
#else
|
||||||
|
while (!quit_thyself) {
|
||||||
|
|
||||||
|
// The order of calls is important here
|
||||||
|
int cycles = TheVIC->EmulateLine();
|
||||||
|
TheSID->EmulateLine();
|
||||||
|
#if !PRECISE_CIA_CYCLES
|
||||||
|
TheCIA1->EmulateLine(ThePrefs.CIACycles);
|
||||||
|
TheCIA2->EmulateLine(ThePrefs.CIACycles);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (ThePrefs.Emul1541Proc) {
|
||||||
|
int cycles_1541 = ThePrefs.FloppyCycles;
|
||||||
|
TheCPU1541->CountVIATimers(cycles_1541);
|
||||||
|
|
||||||
|
if (!TheCPU1541->Idle) {
|
||||||
|
// 1541 processor active, alternately execute
|
||||||
|
// 6502 and 6510 instructions until both have
|
||||||
|
// used up their cycles
|
||||||
|
while (cycles >= 0 || cycles_1541 >= 0)
|
||||||
|
if (cycles > cycles_1541)
|
||||||
|
cycles -= TheCPU->EmulateLine(1);
|
||||||
|
else
|
||||||
|
cycles_1541 -= TheCPU1541->EmulateLine(1);
|
||||||
|
} else
|
||||||
|
TheCPU->EmulateLine(cycles);
|
||||||
|
} else
|
||||||
|
// 1541 processor disabled, only emulate 6510
|
||||||
|
TheCPU->EmulateLine(cycles);
|
||||||
|
#endif
|
||||||
|
linecnt++;
|
||||||
|
#if !defined(__svgalib__) && !defined(WII)
|
||||||
|
if ((linecnt & 0xfff) == 0 && gui) {
|
||||||
|
|
||||||
|
// check for command from GUI process
|
||||||
|
// fprintf(stderr,":");
|
||||||
|
while (gui->probe()) {
|
||||||
|
char c;
|
||||||
|
if (gui->eread(&c, 1) != 1) {
|
||||||
|
delete gui;
|
||||||
|
gui = 0;
|
||||||
|
fprintf(stderr,"Oops, GUI process died...\n");
|
||||||
|
} else {
|
||||||
|
// fprintf(stderr,"%c",c);
|
||||||
|
switch (c) {
|
||||||
|
case 'q':
|
||||||
|
quit_thyself = true;
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
Reset();
|
||||||
|
break;
|
||||||
|
case 'p':{
|
||||||
|
Prefs *np = Frodo::reload_prefs();
|
||||||
|
NewPrefs(np);
|
||||||
|
ThePrefs = *np;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
* C64_PC.cpp - Put the pieces together (Frodo PC)
|
|
||||||
*
|
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Same as C64.cpp (mainly to keep the BeIDE happy)
|
|
||||||
#ifdef __riscos__
|
|
||||||
#include "C64.cc"
|
|
||||||
#else
|
|
||||||
#include "C64.cpp"
|
|
||||||
#endif
|
|
@ -1,10 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
* C64_SC.cpp - Put the pieces together (Frodo SC)
|
* C64_SC.cpp - Put the pieces together (Frodo SC)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Same as C64.cpp (mainly to keep the BeIDE happy)
|
// Same as C64.cpp (but object files are different, and this gives it the
|
||||||
|
// name "C64_SC.o" instead of "C64.o" which is needed under some build
|
||||||
|
// environments)
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
#include "C64.cc"
|
#include "C64.cc"
|
||||||
#else
|
#else
|
||||||
|
830
Src/C64_SDL.i
830
Src/C64_SDL.i
@ -1,830 +0,0 @@
|
|||||||
/*
|
|
||||||
* C64_x.i - Put the pieces together, X specific stuff
|
|
||||||
*
|
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
|
||||||
* Unix stuff by Bernd Schmidt/Lutz Vieweg
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
#if defined(GEKKO)
|
|
||||||
#include <wiiuse/wpad.h>
|
|
||||||
#include <ogc/lwp_watchdog.h>
|
|
||||||
#define FONT_PATH "/apps/frodo/FreeMono.ttf"
|
|
||||||
#define SAVES_PATH "/apps/frodo/saves"
|
|
||||||
#define IMAGE_PATH "/apps/frodo/images"
|
|
||||||
#define TMP_PATH "/apps/frodo/tmp"
|
|
||||||
#else
|
|
||||||
#define FONT_PATH "FreeMono.ttf"
|
|
||||||
#define SAVES_PATH "saves"
|
|
||||||
#define IMAGE_PATH "images"
|
|
||||||
#define TMP_PATH "tmp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct timeval tv_start;
|
|
||||||
static int MENU_SIZE_X, MENU_SIZE_Y;
|
|
||||||
static const char *main_menu_messages[] = {
|
|
||||||
"Insert disc or tape", /* 0 */
|
|
||||||
"Load disc or tape", /* 1 */
|
|
||||||
"Reset C64", /* 2 */
|
|
||||||
"Bind key to joystick",/* 3 */
|
|
||||||
"Other options", /* 4 */
|
|
||||||
"Controller 1 joystick port", /* 5 */
|
|
||||||
"^|1|2",
|
|
||||||
"Save/Load state", /* 7 */
|
|
||||||
" ",
|
|
||||||
"Quit", /* 9 */
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *other_options_messages[] = {
|
|
||||||
"Display resolution", /* 0 */
|
|
||||||
"^|double-center|stretched",
|
|
||||||
"Speed (approx)", /* 2 */
|
|
||||||
"^|95|100|110",
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *save_load_state_messages[] = {
|
|
||||||
"Load saved state", /* 0 */
|
|
||||||
"Save current state", /* 1 */
|
|
||||||
"Delete state", /* 2 */
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Constructor, system-dependent things
|
|
||||||
*/
|
|
||||||
void C64::c64_ctor1(void)
|
|
||||||
{
|
|
||||||
// Initialize joystick variables
|
|
||||||
#ifdef HAVE_LINUX_JOYSTICK_H
|
|
||||||
joyfd[0] = joyfd[1] = -1;
|
|
||||||
joy_minx = joy_miny = 32767;
|
|
||||||
joy_maxx = joy_maxy = -32768;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
this->fake_key_sequence = false;
|
|
||||||
this->fake_key_index = 0;
|
|
||||||
this->fake_key_keytime = 5;
|
|
||||||
this->fake_key_type = 0;
|
|
||||||
|
|
||||||
this->prefs_changed = false;
|
|
||||||
memset(this->save_game_name, 0, sizeof(this->save_game_name));
|
|
||||||
strcpy(this->save_game_name, "unknown");
|
|
||||||
|
|
||||||
MENU_SIZE_X = FULL_DISPLAY_X - FULL_DISPLAY_X / 4;
|
|
||||||
MENU_SIZE_Y = FULL_DISPLAY_Y - FULL_DISPLAY_Y / 4;
|
|
||||||
|
|
||||||
SDL_RWops *rw;
|
|
||||||
|
|
||||||
Uint8 *data = (Uint8*)malloc(1 * 1024*1024);
|
|
||||||
FILE *fp = fopen(FONT_PATH, "r");
|
|
||||||
if (!fp) {
|
|
||||||
fprintf(stderr, "Could not open font\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
fread(data, 1, 1 * 1024 * 1024, fp);
|
|
||||||
rw = SDL_RWFromMem(data, 1 * 1024 * 1024);
|
|
||||||
if (!rw) {
|
|
||||||
fprintf(stderr, "Could not create RW: %s\n", SDL_GetError());
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->menu_font = TTF_OpenFontRW(rw, 1, 20);
|
|
||||||
if (!this->menu_font)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Unable to open font\n" );
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
menu_init(&this->main_menu, this->menu_font, main_menu_messages,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void C64::c64_ctor2(void)
|
|
||||||
{
|
|
||||||
gettimeofday(&tv_start, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Destructor, system-dependent things
|
|
||||||
*/
|
|
||||||
|
|
||||||
void C64::c64_dtor(void)
|
|
||||||
{
|
|
||||||
menu_fini(&this->main_menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cmpstringp(const void *p1, const void *p2)
|
|
||||||
{
|
|
||||||
return strcmp(* (char * const *) p1, * (char * const *) p2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char **get_file_list(const char *base_dir)
|
|
||||||
{
|
|
||||||
DIR *d = opendir(base_dir);
|
|
||||||
const char **file_list;
|
|
||||||
int cur = 0;
|
|
||||||
struct dirent *de;
|
|
||||||
int cnt = 16;
|
|
||||||
|
|
||||||
if (!d)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
file_list = (const char**)malloc(cnt * sizeof(char*));
|
|
||||||
file_list[cur++] = strdup("None");
|
|
||||||
file_list[cur] = NULL;
|
|
||||||
|
|
||||||
for (de = readdir(d);
|
|
||||||
de;
|
|
||||||
de = readdir(d))
|
|
||||||
{
|
|
||||||
if (strstr(de->d_name, ".d64") || strstr(de->d_name, ".D64") ||
|
|
||||||
strstr(de->d_name, ".prg") || strstr(de->d_name, ".PRG") ||
|
|
||||||
strstr(de->d_name, ".p00") || strstr(de->d_name, ".P00") ||
|
|
||||||
strstr(de->d_name, ".s00") || strstr(de->d_name, ".S00") ||
|
|
||||||
strstr(de->d_name, ".t64") || strstr(de->d_name, ".T64") ||
|
|
||||||
strstr(de->d_name, ".sav"))
|
|
||||||
{
|
|
||||||
char *p;
|
|
||||||
|
|
||||||
p = strdup(de->d_name);
|
|
||||||
file_list[cur++] = p;
|
|
||||||
file_list[cur] = NULL;
|
|
||||||
if (cur > cnt - 2)
|
|
||||||
{
|
|
||||||
cnt = cnt + 32;
|
|
||||||
file_list = (const char**)realloc(file_list, cnt * sizeof(char*));
|
|
||||||
if (!file_list)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir(d);
|
|
||||||
qsort(&file_list[1], cur-1, sizeof(const char *), cmpstringp);
|
|
||||||
|
|
||||||
return file_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
void C64::select_disc(Prefs *np)
|
|
||||||
{
|
|
||||||
const char **file_list = get_file_list(IMAGE_PATH);
|
|
||||||
menu_t select_disc_menu;
|
|
||||||
|
|
||||||
if (file_list == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
menu_init(&select_disc_menu, this->menu_font, file_list,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
int opt = menu_select(real_screen, &select_disc_menu, NULL);
|
|
||||||
if (opt >= 0)
|
|
||||||
{
|
|
||||||
const char *name = file_list[opt];
|
|
||||||
|
|
||||||
if (strcmp(file_list[opt], "None") == 0)
|
|
||||||
{
|
|
||||||
strcpy(np->DrivePath[0], "\0");
|
|
||||||
strcpy(this->save_game_name, "unknown");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
snprintf(np->DrivePath[0], 255, "%s/%s",
|
|
||||||
IMAGE_PATH, name);
|
|
||||||
strncpy(this->save_game_name, name, 255);
|
|
||||||
if (strstr(name, ".d64") || strstr(name, ".D64"))
|
|
||||||
np->DriveType[0] = DRVTYPE_D64;
|
|
||||||
else if (strstr(name, ".prg") || strstr(name, ".PRG") ||
|
|
||||||
strstr(name, ".p00") || strstr(name, ".P00") ||
|
|
||||||
strstr(name, ".s00") || strstr(name, ".S00")) {
|
|
||||||
FILE *src, *dst;
|
|
||||||
|
|
||||||
/* Clean temp dir first (we only want one file) */
|
|
||||||
unlink(TMP_PATH"/a");
|
|
||||||
|
|
||||||
src = fopen(np->DrivePath[0], "r");
|
|
||||||
if (src != NULL)
|
|
||||||
{
|
|
||||||
np->DriveType[0] = DRVTYPE_DIR;
|
|
||||||
snprintf(np->DrivePath[0], 255, "%s", TMP_PATH);
|
|
||||||
|
|
||||||
/* Special handling of .prg: Copy to TMP_PATH and
|
|
||||||
* load that as a dir */
|
|
||||||
dst = fopen(TMP_PATH"/a", "w");
|
|
||||||
if (dst)
|
|
||||||
{
|
|
||||||
Uint8 buf[1024];
|
|
||||||
size_t v;
|
|
||||||
|
|
||||||
do {
|
|
||||||
v = fread(buf, 1, 1024, src);
|
|
||||||
fwrite(buf, 1, v, dst);
|
|
||||||
} while (v > 0);
|
|
||||||
fclose(dst);
|
|
||||||
}
|
|
||||||
fclose(src);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
np->DriveType[0] = DRVTYPE_T64;
|
|
||||||
NewPrefs(np);
|
|
||||||
ThePrefs = *np;
|
|
||||||
}
|
|
||||||
this->prefs_changed = true;
|
|
||||||
}
|
|
||||||
menu_fini(&select_disc_menu);
|
|
||||||
|
|
||||||
/* Cleanup everything */
|
|
||||||
for ( int i = 0; file_list[i]; i++ )
|
|
||||||
free((void*)file_list[i]);
|
|
||||||
free(file_list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
C64 keyboard matrix:
|
|
||||||
|
|
||||||
Bit 7 6 5 4 3 2 1 0
|
|
||||||
0 CUD F5 F3 F1 F7 CLR RET DEL
|
|
||||||
1 SHL E S Z 4 A W 3
|
|
||||||
2 X T F C 6 D R 5
|
|
||||||
3 V U H B 8 G Y 7
|
|
||||||
4 N O K M 0 J I 9
|
|
||||||
5 , @ : . - L P +
|
|
||||||
6 / ^ = SHR HOM ; * <EFBFBD>
|
|
||||||
7 R/S Q C= SPC 2 CTL <- 1
|
|
||||||
*/
|
|
||||||
#define MATRIX(a,b) (((a) << 3) | (b))
|
|
||||||
|
|
||||||
void C64::bind_key(Prefs *np)
|
|
||||||
{
|
|
||||||
const char **bind_key_messages;
|
|
||||||
bool has_classic_controller = false;
|
|
||||||
menu_t bind_key_menu;
|
|
||||||
menu_t key_menu;
|
|
||||||
static const char *keys[] = { "None", "space", "Run/Stop", "return", "F1", "F3", "F5", "F7",
|
|
||||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
|
|
||||||
"B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
|
|
||||||
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
|
||||||
"ctrl", "del", "home,", "shl", "shr", "clr", "C=", "<-",
|
|
||||||
NULL };
|
|
||||||
int kcs[] = { 0, MATRIX(7, 4), MATRIX(7, 7), MATRIX(0, 1), /* space, R/S, return */
|
|
||||||
MATRIX(0, 4), MATRIX(0, 5), MATRIX(0, 6), MATRIX(0, 3), MATRIX(4, 3), MATRIX(7, 0),
|
|
||||||
MATRIX(7, 3), MATRIX(1, 0), MATRIX(1, 3), MATRIX(2, 0), MATRIX(2, 3), MATRIX(3, 0),
|
|
||||||
MATRIX(3, 3), MATRIX(4, 0), MATRIX(1, 2), MATRIX(3, 4), MATRIX(2, 4), MATRIX(2, 2),
|
|
||||||
MATRIX(1, 6), MATRIX(2, 5), MATRIX(3, 2), MATRIX(3, 5), MATRIX(4, 1), MATRIX(4, 2),
|
|
||||||
MATRIX(4, 5), MATRIX(5, 2), MATRIX(4, 4), MATRIX(4, 7), MATRIX(4, 6), MATRIX(5, 1),
|
|
||||||
MATRIX(7, 6), MATRIX(2, 1), MATRIX(1, 5), MATRIX(2, 6), MATRIX(3, 6), MATRIX(3, 7),
|
|
||||||
MATRIX(1, 1), MATRIX(2, 7), MATRIX(3, 1), MATRIX(1, 4), /* ... Z */
|
|
||||||
MATRIX(7, 3), MATRIX(0, 0), MATRIX(6, 4), MATRIX(1, 7), MATRIX(6, 4),
|
|
||||||
MATRIX(0, 2), MATRIX(7, 5), MATRIX(7, 1),
|
|
||||||
};
|
|
||||||
|
|
||||||
#if defined(GEKKO)
|
|
||||||
WPADData *wpad, *wpad_other;
|
|
||||||
|
|
||||||
wpad = WPAD_Data(0);
|
|
||||||
wpad_other = WPAD_Data(1);
|
|
||||||
|
|
||||||
if (wpad->exp.type == WPAD_EXP_CLASSIC ||
|
|
||||||
wpad_other->exp.type == WPAD_EXP_CLASSIC)
|
|
||||||
has_classic_controller = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bind_key_messages = (const char **)malloc( sizeof(const char*) * (N_WIIMOTE_BINDINGS + 1));
|
|
||||||
assert(bind_key_messages);
|
|
||||||
memset(bind_key_messages, 0, sizeof(const char*) * (N_WIIMOTE_BINDINGS + 1));
|
|
||||||
|
|
||||||
bind_key_messages[WIIMOTE_A] = "Bind to A";
|
|
||||||
bind_key_messages[WIIMOTE_B] = "Bind to B";
|
|
||||||
bind_key_messages[WIIMOTE_PLUS] = "Bind to Plus";
|
|
||||||
bind_key_messages[WIIMOTE_MINUS] = "Bind to Minus";
|
|
||||||
bind_key_messages[WIIMOTE_1] = "Bind to 1";
|
|
||||||
|
|
||||||
if (has_classic_controller)
|
|
||||||
{
|
|
||||||
bind_key_messages[WIIMOTE_PLUS] = "Bind to wiimote/classic Plus";
|
|
||||||
bind_key_messages[WIIMOTE_MINUS] = "Bind to wiimote/classic Minus";
|
|
||||||
|
|
||||||
bind_key_messages[CLASSIC_X] = "Bind to classic X";
|
|
||||||
bind_key_messages[CLASSIC_Y] = "Bind to classic Y";
|
|
||||||
bind_key_messages[CLASSIC_B] = "Bind to classic B";
|
|
||||||
bind_key_messages[CLASSIC_L] = "Bind to classic L";
|
|
||||||
bind_key_messages[CLASSIC_R] = "Bind to classic R";
|
|
||||||
bind_key_messages[CLASSIC_ZL] = "Bind to classic ZL";
|
|
||||||
bind_key_messages[CLASSIC_ZR] = "Bind to classic ZR";
|
|
||||||
}
|
|
||||||
|
|
||||||
menu_init(&bind_key_menu, this->menu_font, bind_key_messages,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
int opt = menu_select(real_screen, &bind_key_menu, NULL);
|
|
||||||
if (opt >= 0)
|
|
||||||
{
|
|
||||||
menu_init(&key_menu, this->menu_font, keys,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
int key = menu_select(real_screen, &key_menu, NULL);
|
|
||||||
|
|
||||||
/* Assume prefs are changed */
|
|
||||||
this->prefs_changed = true;
|
|
||||||
if (key > 0)
|
|
||||||
np->JoystickKeyBinding[opt] = kcs[key];
|
|
||||||
else if (key == 0)
|
|
||||||
np->JoystickKeyBinding[opt] = -1;
|
|
||||||
else
|
|
||||||
this->prefs_changed = false;
|
|
||||||
menu_fini(&key_menu);
|
|
||||||
}
|
|
||||||
menu_fini(&bind_key_menu);
|
|
||||||
free(bind_key_messages);
|
|
||||||
}
|
|
||||||
|
|
||||||
void C64::other_options(Prefs *np)
|
|
||||||
{
|
|
||||||
menu_t display_menu;
|
|
||||||
int submenus[2] = { np->DisplayOption};
|
|
||||||
|
|
||||||
#define SPEED_95 40
|
|
||||||
#define SPEED_110 34
|
|
||||||
#define SPEED_100 38
|
|
||||||
|
|
||||||
switch (np->MsPerFrame)
|
|
||||||
{
|
|
||||||
case SPEED_95:
|
|
||||||
submenus[1] = 0; break;
|
|
||||||
case SPEED_110:
|
|
||||||
submenus[1] = 2; break;
|
|
||||||
default:
|
|
||||||
/* If it has some other value... */
|
|
||||||
submenus[1] = 1; break;
|
|
||||||
}
|
|
||||||
menu_init(&display_menu, this->menu_font, other_options_messages,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
int opt = menu_select(real_screen, &display_menu, submenus);
|
|
||||||
if (opt >= 0)
|
|
||||||
{
|
|
||||||
np->DisplayOption = submenus[0];
|
|
||||||
switch(submenus[1])
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
np->MsPerFrame = SPEED_95; break;
|
|
||||||
case 1:
|
|
||||||
np->MsPerFrame = SPEED_100; break;
|
|
||||||
case 2:
|
|
||||||
default:
|
|
||||||
np->MsPerFrame = SPEED_110; break;
|
|
||||||
}
|
|
||||||
this->prefs_changed = true;
|
|
||||||
}
|
|
||||||
menu_fini(&display_menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
void C64::save_load_state(Prefs *np)
|
|
||||||
{
|
|
||||||
menu_t save_load_menu;
|
|
||||||
menu_t select_saves_menu;
|
|
||||||
|
|
||||||
menu_init(&save_load_menu, this->menu_font, save_load_state_messages,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
int opt = menu_select(real_screen, &save_load_menu, NULL);
|
|
||||||
switch(opt)
|
|
||||||
{
|
|
||||||
case 1: /* save */
|
|
||||||
{
|
|
||||||
char buf[255];
|
|
||||||
|
|
||||||
snprintf(buf, 255, "%s/%s.sav", SAVES_PATH,
|
|
||||||
this->save_game_name);
|
|
||||||
|
|
||||||
this->SaveSnapshot(buf);
|
|
||||||
} break;
|
|
||||||
case 0: /* load/delete */
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
const char **file_list = get_file_list(SAVES_PATH);
|
|
||||||
|
|
||||||
if (file_list == NULL)
|
|
||||||
break;
|
|
||||||
menu_init(&select_saves_menu, this->menu_font, file_list,
|
|
||||||
32, 32, MENU_SIZE_X, MENU_SIZE_Y);
|
|
||||||
int save = menu_select(real_screen, &select_saves_menu, NULL);
|
|
||||||
if (save >= 0)
|
|
||||||
{
|
|
||||||
char buf[255];
|
|
||||||
|
|
||||||
snprintf(buf, 255, "%s/%s", SAVES_PATH, file_list[save]);
|
|
||||||
if (opt == 2)
|
|
||||||
unlink(buf);
|
|
||||||
else /* Load the snapshot */
|
|
||||||
this->LoadSnapshot(buf);
|
|
||||||
}
|
|
||||||
menu_fini(&select_saves_menu);
|
|
||||||
|
|
||||||
/* Cleanup everything */
|
|
||||||
for ( int i = 0; file_list[i]; i++ )
|
|
||||||
free((void*)file_list[i]);
|
|
||||||
free(file_list);
|
|
||||||
} break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
menu_fini(&save_load_menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Start main emulation thread
|
|
||||||
*/
|
|
||||||
|
|
||||||
void C64::Run(void)
|
|
||||||
{
|
|
||||||
// Reset chips
|
|
||||||
TheCPU->Reset();
|
|
||||||
TheSID->Reset();
|
|
||||||
TheCIA1->Reset();
|
|
||||||
TheCIA2->Reset();
|
|
||||||
TheCPU1541->Reset();
|
|
||||||
|
|
||||||
// Patch kernal IEC routines
|
|
||||||
orig_kernal_1d84 = Kernal[0x1d84];
|
|
||||||
orig_kernal_1d85 = Kernal[0x1d85];
|
|
||||||
PatchKernal(ThePrefs.FastReset, ThePrefs.Emul1541Proc);
|
|
||||||
|
|
||||||
quit_thyself = false;
|
|
||||||
thread_func();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* From dreamcast port */
|
|
||||||
static const char *auto_seq[4] =
|
|
||||||
{
|
|
||||||
"\nLOAD \"*\",8,1\nRUN\n",
|
|
||||||
"\nLOAD \"*\",9,1\nRUN\n",
|
|
||||||
"\nLOAD \"*\",10,1\nRUN\n",
|
|
||||||
"\nLOAD \"*\",11,1\nRUN\n",
|
|
||||||
};
|
|
||||||
extern "C" int get_kc_from_char(char c_in, int *shifted);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Vertical blank: Poll keyboard and joysticks, update window
|
|
||||||
*/
|
|
||||||
|
|
||||||
void C64::VBlank(bool draw_frame)
|
|
||||||
{
|
|
||||||
#if defined(GEKKO)
|
|
||||||
WPAD_ScanPads();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Poll joysticks
|
|
||||||
TheCIA1->Joystick1 = poll_joystick(0);
|
|
||||||
TheCIA1->Joystick2 = poll_joystick(1);
|
|
||||||
|
|
||||||
// Poll keyboard
|
|
||||||
TheDisplay->PollKeyboard(TheCIA1->KeyMatrix, TheCIA1->RevMatrix, &joykey);
|
|
||||||
if (TheDisplay->quit_requested)
|
|
||||||
quit_thyself = true;
|
|
||||||
|
|
||||||
if (this->fake_key_sequence)
|
|
||||||
{
|
|
||||||
int shifted;
|
|
||||||
int kc = get_kc_from_char(auto_seq[this->fake_key_type][this->fake_key_index], &shifted);
|
|
||||||
|
|
||||||
TheDisplay->FakeKeyPress(kc, shifted, TheCIA1->KeyMatrix,
|
|
||||||
TheCIA1->RevMatrix);
|
|
||||||
|
|
||||||
this->fake_key_keytime --;
|
|
||||||
if (this->fake_key_keytime == 0)
|
|
||||||
{
|
|
||||||
this->fake_key_keytime = 1;
|
|
||||||
this->fake_key_index ++;
|
|
||||||
|
|
||||||
if (auto_seq[this->fake_key_type][this->fake_key_index] == '\0')
|
|
||||||
{
|
|
||||||
this->fake_key_sequence = false;
|
|
||||||
this->fake_key_index = 0;
|
|
||||||
this->fake_key_keytime = 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifndef GEKKO
|
|
||||||
// Joystick keyboard emulation
|
|
||||||
if (TheDisplay->NumLock())
|
|
||||||
TheCIA1->Joystick1 &= joykey;
|
|
||||||
else
|
|
||||||
TheCIA1->Joystick2 &= joykey;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Count TOD clocks
|
|
||||||
TheCIA1->CountTOD();
|
|
||||||
TheCIA2->CountTOD();
|
|
||||||
|
|
||||||
// Update window if needed
|
|
||||||
if (draw_frame) {
|
|
||||||
TheDisplay->Update();
|
|
||||||
#if 0
|
|
||||||
// Calculate time between VBlanks, display speedometer
|
|
||||||
struct timeval tv;
|
|
||||||
gettimeofday(&tv, NULL);
|
|
||||||
if ((tv.tv_usec -= tv_start.tv_usec) < 0) {
|
|
||||||
tv.tv_usec += 1000000;
|
|
||||||
tv.tv_sec -= 1;
|
|
||||||
}
|
|
||||||
tv.tv_sec -= tv_start.tv_sec;
|
|
||||||
double elapsed_time = (double)tv.tv_sec * 1000000 + tv.tv_usec;
|
|
||||||
speed_index = 20000 / (elapsed_time + 1) * 100;
|
|
||||||
|
|
||||||
// Limit speed to 100% if desired
|
|
||||||
if ((speed_index > 100)) {
|
|
||||||
usleep((unsigned long)(20000 - elapsed_time));
|
|
||||||
speed_index = 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
gettimeofday(&tv_start, NULL);
|
|
||||||
|
|
||||||
TheDisplay->Speedometer((int)speed_index);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
if (this->have_a_break) {
|
|
||||||
int submenus[1];
|
|
||||||
int opt;
|
|
||||||
int old_swap = ThePrefs.JoystickSwap == true ? 1 : 0;
|
|
||||||
|
|
||||||
Prefs np = ThePrefs;
|
|
||||||
this->prefs_changed = false;
|
|
||||||
|
|
||||||
TheSID->PauseSound();
|
|
||||||
submenus[0] = old_swap;
|
|
||||||
opt = menu_select(real_screen, &this->main_menu, submenus);
|
|
||||||
|
|
||||||
switch(opt)
|
|
||||||
{
|
|
||||||
case 0: /* Insert disc/tape */
|
|
||||||
this->select_disc(&np);
|
|
||||||
break;
|
|
||||||
case 1: /* Load disc/tape */
|
|
||||||
this->fake_key_sequence = true;
|
|
||||||
break;
|
|
||||||
case 2: /* Reset */
|
|
||||||
Reset();
|
|
||||||
break;
|
|
||||||
case 3: /* Bind keys to joystick */
|
|
||||||
this->bind_key(&np);
|
|
||||||
break;
|
|
||||||
case 4: /* Other options */
|
|
||||||
this->other_options(&np);
|
|
||||||
break;
|
|
||||||
case 5: /* Swap joysticks */
|
|
||||||
break;
|
|
||||||
case 7: /* Save / load game */
|
|
||||||
this->save_load_state(&np);
|
|
||||||
break;
|
|
||||||
case 9: /* Quit */
|
|
||||||
quit_thyself = true;
|
|
||||||
break;
|
|
||||||
case -1:
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (submenus[0] == 0)
|
|
||||||
np.JoystickSwap = false;
|
|
||||||
else
|
|
||||||
np.JoystickSwap = true;
|
|
||||||
if (submenus[0] != old_swap)
|
|
||||||
this->prefs_changed = true;
|
|
||||||
|
|
||||||
if (this->prefs_changed)
|
|
||||||
{
|
|
||||||
this->NewPrefs(&np);
|
|
||||||
ThePrefs = np;
|
|
||||||
}
|
|
||||||
TheDisplay->FakeKeyPress(-1, false, TheCIA1->KeyMatrix,
|
|
||||||
TheCIA1->RevMatrix);
|
|
||||||
|
|
||||||
this->have_a_break = false;
|
|
||||||
if (this->quit_thyself)
|
|
||||||
ThePrefs.Save(PREFS_PATH);
|
|
||||||
}
|
|
||||||
/* From Acorn port */
|
|
||||||
static uint64_t lastFrame;
|
|
||||||
#if defined(GEKKO)
|
|
||||||
uint32_t now = ticks_to_millisecs(gettime());
|
|
||||||
#else
|
|
||||||
uint32_t now = SDL_GetTicks();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( (now - lastFrame) < ThePrefs.MsPerFrame) {
|
|
||||||
usleep( (ThePrefs.MsPerFrame - (now - lastFrame)) * 1000);
|
|
||||||
}
|
|
||||||
lastFrame = now;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Open/close joystick drivers given old and new state of
|
|
||||||
* joystick preferences
|
|
||||||
*/
|
|
||||||
|
|
||||||
void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_LINUX_JOYSTICK_H
|
|
||||||
if (oldjoy1 != newjoy1) {
|
|
||||||
joy_minx = joy_miny = 32767; // Reset calibration
|
|
||||||
joy_maxx = joy_maxy = -32768;
|
|
||||||
if (newjoy1) {
|
|
||||||
joyfd[0] = open("/dev/js0", O_RDONLY);
|
|
||||||
if (joyfd[0] < 0)
|
|
||||||
fprintf(stderr, "Couldn't open joystick 1\n");
|
|
||||||
} else {
|
|
||||||
close(joyfd[0]);
|
|
||||||
joyfd[0] = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oldjoy2 != newjoy2) {
|
|
||||||
joy_minx = joy_miny = 32767; // Reset calibration
|
|
||||||
joy_maxx = joy_maxy = -32768;
|
|
||||||
if (newjoy2) {
|
|
||||||
joyfd[1] = open("/dev/js1", O_RDONLY);
|
|
||||||
if (joyfd[1] < 0)
|
|
||||||
fprintf(stderr, "Couldn't open joystick 2\n");
|
|
||||||
} else {
|
|
||||||
close(joyfd[1]);
|
|
||||||
joyfd[1] = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Poll joystick port, return CIA mask
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint8 C64::poll_joystick(int port)
|
|
||||||
{
|
|
||||||
#ifdef GEKKO
|
|
||||||
int extra_keys[N_WIIMOTE_BINDINGS];
|
|
||||||
int controller = port;
|
|
||||||
WPADData *wpad, *wpad_other;
|
|
||||||
Uint32 held, held_other, held_classic, held_classic_other;
|
|
||||||
uint8 j = 0xff;
|
|
||||||
|
|
||||||
if (ThePrefs.JoystickSwap)
|
|
||||||
controller = !port;
|
|
||||||
held_classic = held_classic_other = 0;
|
|
||||||
|
|
||||||
wpad = WPAD_Data(controller);
|
|
||||||
wpad_other = WPAD_Data(!controller);
|
|
||||||
held = wpad->btns_h;
|
|
||||||
held_other = wpad_other->btns_h;
|
|
||||||
|
|
||||||
// Check classic controller as well
|
|
||||||
if (wpad->exp.type == WPAD_EXP_CLASSIC)
|
|
||||||
held_classic = wpad->exp.classic.btns_held;
|
|
||||||
if (wpad_other->exp.type == WPAD_EXP_CLASSIC)
|
|
||||||
held_classic_other = wpad_other->exp.classic.btns_held;
|
|
||||||
|
|
||||||
if ( (held & WPAD_BUTTON_UP) || (held_classic & CLASSIC_CTRL_BUTTON_LEFT) )
|
|
||||||
j &= 0xfb; // Left
|
|
||||||
if ( (held & WPAD_BUTTON_DOWN) || (held_classic & CLASSIC_CTRL_BUTTON_RIGHT) )
|
|
||||||
j &= 0xf7; // Right
|
|
||||||
if ( (held & WPAD_BUTTON_RIGHT) || (held_classic & CLASSIC_CTRL_BUTTON_UP) )
|
|
||||||
j &= 0xfe; // Up
|
|
||||||
if ( (held & WPAD_BUTTON_LEFT) || (held_classic & CLASSIC_CTRL_BUTTON_DOWN) )
|
|
||||||
j &= 0xfd; // Down
|
|
||||||
if ( (held & WPAD_BUTTON_2) || (held_classic & CLASSIC_CTRL_BUTTON_A) )
|
|
||||||
j &= 0xef; // Button
|
|
||||||
if ( (held & WPAD_BUTTON_HOME) || (held_classic & CLASSIC_CTRL_BUTTON_HOME) )
|
|
||||||
this->enter_menu();
|
|
||||||
|
|
||||||
extra_keys[WIIMOTE_A] = (held | held_other) & WPAD_BUTTON_A;
|
|
||||||
extra_keys[WIIMOTE_B] = (held | held_other) & WPAD_BUTTON_B;
|
|
||||||
extra_keys[WIIMOTE_PLUS] = (held | held_other) & WPAD_BUTTON_PLUS;
|
|
||||||
extra_keys[WIIMOTE_MINUS] = (held | held_other) & WPAD_BUTTON_MINUS;
|
|
||||||
extra_keys[WIIMOTE_1] = (held | held_other) & WPAD_BUTTON_1;
|
|
||||||
|
|
||||||
/* Classic buttons (might not be connected) */
|
|
||||||
extra_keys[CLASSIC_X] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_X;
|
|
||||||
extra_keys[CLASSIC_Y] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_Y;
|
|
||||||
extra_keys[CLASSIC_B] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_B;
|
|
||||||
extra_keys[CLASSIC_L] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_L;
|
|
||||||
extra_keys[CLASSIC_R] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_R;
|
|
||||||
extra_keys[CLASSIC_ZL] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_ZL;
|
|
||||||
extra_keys[CLASSIC_ZR] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_ZR;
|
|
||||||
|
|
||||||
extra_keys[WIIMOTE_PLUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_MINUS;
|
|
||||||
extra_keys[WIIMOTE_MINUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_PLUS;
|
|
||||||
|
|
||||||
for (int i = 0; i < N_WIIMOTE_BINDINGS; i++)
|
|
||||||
{
|
|
||||||
int kc = ThePrefs.JoystickKeyBinding[i];
|
|
||||||
|
|
||||||
if ( kc < 0 )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (extra_keys[i])
|
|
||||||
TheDisplay->UpdateKeyMatrix(kc, false,
|
|
||||||
TheCIA1->KeyMatrix, TheCIA1->RevMatrix);
|
|
||||||
else
|
|
||||||
TheDisplay->UpdateKeyMatrix(kc, true,
|
|
||||||
TheCIA1->KeyMatrix, TheCIA1->RevMatrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
return j;
|
|
||||||
#elif defined(HAVE_LINUX_JOYSTICK_H)
|
|
||||||
JS_DATA_TYPE js;
|
|
||||||
uint8 j = 0xff;
|
|
||||||
|
|
||||||
if (joyfd[port] >= 0) {
|
|
||||||
if (read(joyfd[port], &js, JS_RETURN) == JS_RETURN) {
|
|
||||||
if (js.x > joy_maxx)
|
|
||||||
joy_maxx = js.x;
|
|
||||||
if (js.x < joy_minx)
|
|
||||||
joy_minx = js.x;
|
|
||||||
if (js.y > joy_maxy)
|
|
||||||
joy_maxy = js.y;
|
|
||||||
if (js.y < joy_miny)
|
|
||||||
joy_miny = js.y;
|
|
||||||
|
|
||||||
if (joy_maxx-joy_minx < 100 || joy_maxy-joy_miny < 100)
|
|
||||||
return 0xff;
|
|
||||||
|
|
||||||
if (js.x < (joy_minx + (joy_maxx-joy_minx)/3))
|
|
||||||
j &= 0xfb; // Left
|
|
||||||
else if (js.x > (joy_minx + 2*(joy_maxx-joy_minx)/3))
|
|
||||||
j &= 0xf7; // Right
|
|
||||||
|
|
||||||
if (js.y < (joy_miny + (joy_maxy-joy_miny)/3))
|
|
||||||
j &= 0xfe; // Up
|
|
||||||
else if (js.y > (joy_miny + 2*(joy_maxy-joy_miny)/3))
|
|
||||||
j &= 0xfd; // Down
|
|
||||||
|
|
||||||
if (js.buttons & 1)
|
|
||||||
j &= 0xef; // Button
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return j;
|
|
||||||
#else
|
|
||||||
return 0xff;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The emulation's main loop
|
|
||||||
*/
|
|
||||||
|
|
||||||
void C64::thread_func(void)
|
|
||||||
{
|
|
||||||
int linecnt = 0;
|
|
||||||
|
|
||||||
#ifdef FRODO_SC
|
|
||||||
while (!quit_thyself) {
|
|
||||||
|
|
||||||
// The order of calls is important here
|
|
||||||
if (TheVIC->EmulateCycle())
|
|
||||||
TheSID->EmulateLine();
|
|
||||||
TheCIA1->CheckIRQs();
|
|
||||||
TheCIA2->CheckIRQs();
|
|
||||||
TheCIA1->EmulateCycle();
|
|
||||||
TheCIA2->EmulateCycle();
|
|
||||||
TheCPU->EmulateCycle();
|
|
||||||
|
|
||||||
if (ThePrefs.Emul1541Proc) {
|
|
||||||
TheCPU1541->CountVIATimers(1);
|
|
||||||
if (!TheCPU1541->Idle)
|
|
||||||
TheCPU1541->EmulateCycle();
|
|
||||||
}
|
|
||||||
CycleCounter++;
|
|
||||||
#else
|
|
||||||
while (!quit_thyself) {
|
|
||||||
|
|
||||||
// The order of calls is important here
|
|
||||||
int cycles = TheVIC->EmulateLine();
|
|
||||||
TheSID->EmulateLine();
|
|
||||||
#if !PRECISE_CIA_CYCLES
|
|
||||||
TheCIA1->EmulateLine(ThePrefs.CIACycles);
|
|
||||||
TheCIA2->EmulateLine(ThePrefs.CIACycles);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ThePrefs.Emul1541Proc) {
|
|
||||||
int cycles_1541 = ThePrefs.FloppyCycles;
|
|
||||||
TheCPU1541->CountVIATimers(cycles_1541);
|
|
||||||
|
|
||||||
if (!TheCPU1541->Idle) {
|
|
||||||
// 1541 processor active, alternately execute
|
|
||||||
// 6502 and 6510 instructions until both have
|
|
||||||
// used up their cycles
|
|
||||||
while (cycles >= 0 || cycles_1541 >= 0)
|
|
||||||
if (cycles > cycles_1541)
|
|
||||||
cycles -= TheCPU->EmulateLine(1);
|
|
||||||
else
|
|
||||||
cycles_1541 -= TheCPU1541->EmulateLine(1);
|
|
||||||
} else
|
|
||||||
TheCPU->EmulateLine(cycles);
|
|
||||||
} else
|
|
||||||
// 1541 processor disabled, only emulate 6510
|
|
||||||
TheCPU->EmulateLine(cycles);
|
|
||||||
#endif
|
|
||||||
linecnt++;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* C64_WIN32.i - Put the pieces together, WIN32 specific stuff
|
* C64_WIN32.h - Put the pieces together, WIN32 specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* WIN32 code by J. Richard Sladkey <jrs@world.std.com>
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
@ -212,7 +225,7 @@ void C64::CheckTimerChange()
|
|||||||
|
|
||||||
BOOL joystick_open[2];
|
BOOL joystick_open[2];
|
||||||
|
|
||||||
void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
|
void C64::open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2)
|
||||||
{
|
{
|
||||||
if (oldjoy1 != newjoy1) {
|
if (oldjoy1 != newjoy1) {
|
||||||
joystick_open[0] = FALSE;
|
joystick_open[0] = FALSE;
|
@ -1,14 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* C64_x.i - Put the pieces together, X specific stuff
|
* C64_x.h - Put the pieces together, X specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* Unix stuff by Bernd Schmidt/Lutz Vieweg
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "sys\time.h"
|
||||||
|
|
||||||
|
typedef struct timeval tv_start;
|
||||||
static struct timeval tv_start;
|
|
||||||
|
|
||||||
#ifndef HAVE_USLEEP
|
#ifndef HAVE_USLEEP
|
||||||
/*
|
/*
|
||||||
@ -82,6 +95,27 @@ int usleep(unsigned long int microSeconds)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
// select() timing is much more accurate under Linux
|
||||||
|
static void Delay_usec(unsigned long usec)
|
||||||
|
{
|
||||||
|
int was_error;
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
|
tv.tv_sec = 0;
|
||||||
|
tv.tv_usec = usec;
|
||||||
|
do {
|
||||||
|
errno = 0;
|
||||||
|
was_error = select(0, NULL, NULL, NULL, &tv);
|
||||||
|
} while (was_error && (errno == EINTR));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void Delay_usec(unsigned long usec)
|
||||||
|
{
|
||||||
|
usleep(usec);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor, system-dependent things
|
* Constructor, system-dependent things
|
||||||
@ -90,17 +124,18 @@ int usleep(unsigned long int microSeconds)
|
|||||||
void C64::c64_ctor1(void)
|
void C64::c64_ctor1(void)
|
||||||
{
|
{
|
||||||
// Initialize joystick variables
|
// Initialize joystick variables
|
||||||
joyfd[0] = joyfd[1] = -1;
|
joy_minx[0] = joy_miny[0] = 32767;
|
||||||
joy_minx = joy_miny = 32767;
|
joy_maxx[0] = joy_maxy[0] = -32768;
|
||||||
joy_maxx = joy_maxy = -32768;
|
joy_minx[1] = joy_miny[1] = 32767;
|
||||||
|
joy_maxx[1] = joy_maxy[1] = -32768;
|
||||||
|
|
||||||
// we need to create a potential GUI subprocess here, because we don't want
|
// we need to create a potential GUI subprocess here, because we don't want
|
||||||
// it to inherit file-descriptors (such as for the audio-device and alike..)
|
// it to inherit file-descriptors (such as for the audio-device and alike..)
|
||||||
#if defined(__svgalib__)
|
#if defined(__svgalib__) or defined(WII)
|
||||||
gui = 0;
|
gui = 0;
|
||||||
#else
|
#else
|
||||||
// try to start up Tk gui.
|
// try to start up Tk gui.
|
||||||
gui = new CmdPipe("wish", "TkGui.tcl");
|
gui = new CmdPipe("wish", BINDIR "Frodo_GUI.tcl");
|
||||||
if (gui) {
|
if (gui) {
|
||||||
if (gui->fail) {
|
if (gui->fail) {
|
||||||
delete gui; gui = 0;
|
delete gui; gui = 0;
|
||||||
@ -149,7 +184,7 @@ void C64::c64_ctor2(void)
|
|||||||
}
|
}
|
||||||
#endif // SVGAlib
|
#endif // SVGAlib
|
||||||
|
|
||||||
gettimeofday(&tv_start, NULL);
|
//gettimeofday(&tv_start, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -221,111 +256,29 @@ void C64::VBlank(bool draw_frame)
|
|||||||
TheDisplay->Update();
|
TheDisplay->Update();
|
||||||
|
|
||||||
// Calculate time between VBlanks, display speedometer
|
// Calculate time between VBlanks, display speedometer
|
||||||
struct timeval tv;
|
//struct timeval tv;
|
||||||
gettimeofday(&tv, NULL);
|
//gettimeofday(&tv, NULL);
|
||||||
if ((tv.tv_usec -= tv_start.tv_usec) < 0) {
|
//if ((tv.tv_usec -= tv_start.tv_usec) < 0) {
|
||||||
tv.tv_usec += 1000000;
|
// tv.tv_usec += 1000000;
|
||||||
tv.tv_sec -= 1;
|
// tv.tv_sec -= 1;
|
||||||
}
|
//}
|
||||||
tv.tv_sec -= tv_start.tv_sec;
|
//tv.tv_sec -= tv_start.tv_sec;
|
||||||
double elapsed_time = (double)tv.tv_sec * 1000000 + tv.tv_usec;
|
//double elapsed_time = (double)tv.tv_sec * 1000000 + tv.tv_usec;
|
||||||
speed_index = 20000 / (elapsed_time + 1) * ThePrefs.SkipFrames * 100;
|
//speed_index = 20000 / (elapsed_time + 1) * ThePrefs.SkipFrames * 100;
|
||||||
|
|
||||||
// Limit speed to 100% if desired
|
//// Limit speed to 100% if desired
|
||||||
if ((speed_index > 100) && ThePrefs.LimitSpeed) {
|
//if ((speed_index > 100) && ThePrefs.LimitSpeed) {
|
||||||
usleep((unsigned long)(ThePrefs.SkipFrames * 20000 - elapsed_time));
|
// Delay_usec((unsigned long)(ThePrefs.SkipFrames * 20000 - elapsed_time));
|
||||||
speed_index = 100;
|
// speed_index = 100;
|
||||||
}
|
//}
|
||||||
|
|
||||||
gettimeofday(&tv_start, NULL);
|
//gettimeofday(&tv_start, NULL);
|
||||||
|
|
||||||
TheDisplay->Speedometer((int)speed_index);
|
TheDisplay->Speedometer((int)speed_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Open/close joystick drivers given old and new state of
|
|
||||||
* joystick preferences
|
|
||||||
*/
|
|
||||||
|
|
||||||
void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_LINUX_JOYSTICK_H
|
|
||||||
if (oldjoy1 != newjoy1) {
|
|
||||||
joy_minx = joy_miny = 32767; // Reset calibration
|
|
||||||
joy_maxx = joy_maxy = -32768;
|
|
||||||
if (newjoy1) {
|
|
||||||
joyfd[0] = open("/dev/js0", O_RDONLY);
|
|
||||||
if (joyfd[0] < 0)
|
|
||||||
fprintf(stderr, "Couldn't open joystick 1\n");
|
|
||||||
} else {
|
|
||||||
close(joyfd[0]);
|
|
||||||
joyfd[0] = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oldjoy2 != newjoy2) {
|
|
||||||
joy_minx = joy_miny = 32767; // Reset calibration
|
|
||||||
joy_maxx = joy_maxy = -32768;
|
|
||||||
if (newjoy2) {
|
|
||||||
joyfd[1] = open("/dev/js1", O_RDONLY);
|
|
||||||
if (joyfd[1] < 0)
|
|
||||||
fprintf(stderr, "Couldn't open joystick 2\n");
|
|
||||||
} else {
|
|
||||||
close(joyfd[1]);
|
|
||||||
joyfd[1] = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Poll joystick port, return CIA mask
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint8 C64::poll_joystick(int port)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_LINUX_JOYSTICK_H
|
|
||||||
JS_DATA_TYPE js;
|
|
||||||
uint8 j = 0xff;
|
|
||||||
|
|
||||||
if (joyfd[port] >= 0) {
|
|
||||||
if (read(joyfd[port], &js, JS_RETURN) == JS_RETURN) {
|
|
||||||
if (js.x > joy_maxx)
|
|
||||||
joy_maxx = js.x;
|
|
||||||
if (js.x < joy_minx)
|
|
||||||
joy_minx = js.x;
|
|
||||||
if (js.y > joy_maxy)
|
|
||||||
joy_maxy = js.y;
|
|
||||||
if (js.y < joy_miny)
|
|
||||||
joy_miny = js.y;
|
|
||||||
|
|
||||||
if (joy_maxx-joy_minx < 100 || joy_maxy-joy_miny < 100)
|
|
||||||
return 0xff;
|
|
||||||
|
|
||||||
if (js.x < (joy_minx + (joy_maxx-joy_minx)/3))
|
|
||||||
j &= 0xfb; // Left
|
|
||||||
else if (js.x > (joy_minx + 2*(joy_maxx-joy_minx)/3))
|
|
||||||
j &= 0xf7; // Right
|
|
||||||
|
|
||||||
if (js.y < (joy_miny + (joy_maxy-joy_miny)/3))
|
|
||||||
j &= 0xfe; // Up
|
|
||||||
else if (js.y > (joy_miny + 2*(joy_maxy-joy_miny)/3))
|
|
||||||
j &= 0xfd; // Down
|
|
||||||
|
|
||||||
if (js.buttons & 1)
|
|
||||||
j &= 0xef; // Button
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return j;
|
|
||||||
#else
|
|
||||||
return 0xff;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The emulation's main loop
|
* The emulation's main loop
|
||||||
*/
|
*/
|
18
Src/CIA.cpp
18
Src/CIA.cpp
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* CIA.cpp - 6526 emulation
|
* CIA.cpp - 6526 emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
|
16
Src/CIA.h
16
Src/CIA.h
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CIA.h - 6526 emulation
|
* CIA.h - 6526 emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CIA_H
|
#ifndef _CIA_H
|
||||||
|
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* CIA_SC.cpp - Single-cycle 6526 emulation
|
* CIA_SC.cpp - Single-cycle 6526 emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -44,7 +58,7 @@ enum {
|
|||||||
T_LOAD_THEN_COUNT,
|
T_LOAD_THEN_COUNT,
|
||||||
T_LOAD_THEN_WAIT_THEN_COUNT,
|
T_LOAD_THEN_WAIT_THEN_COUNT,
|
||||||
T_COUNT,
|
T_COUNT,
|
||||||
T_COUNT_THEN_STOP,
|
T_COUNT_THEN_STOP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* CPU1541.cpp - 6502 (1541) emulation (line based)
|
* CPU1541.cpp - 6502 (1541) emulation (line based)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -731,7 +745,7 @@ handle_int:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define IS_CPU_1541
|
#define IS_CPU_1541
|
||||||
#include "CPU_emulline.i"
|
#include "CPU_emulline.h"
|
||||||
|
|
||||||
// Extension opcode
|
// Extension opcode
|
||||||
case 0xf2:
|
case 0xf2:
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CPU1541.h - 6502 (1541) emulation (line based)
|
* CPU1541.h - 6502 (1541) emulation (line based)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CPU_1541_H
|
#ifndef _CPU_1541_H
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
* CPU1541_PC.cpp - Put the pieces together (Frodo PC)
|
|
||||||
*
|
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Same as CPU1541.cpp (mainly to keep the BeIDE happy)
|
|
||||||
#ifdef __riscos__
|
|
||||||
#include "CPU1541.cc"
|
|
||||||
#else
|
|
||||||
#include "CPU1541.cpp"
|
|
||||||
#endif
|
|
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* CPU1541_SC.cpp - Single-cycle 6502 (1541) emulation
|
* CPU1541_SC.cpp - Single-cycle 6502 (1541) emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -613,7 +627,7 @@ void MOS6502_1541::EmulateCycle(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define IS_CPU_1541
|
#define IS_CPU_1541
|
||||||
#include "CPU_emulcycle.i"
|
#include "CPU_emulcycle.h"
|
||||||
|
|
||||||
// Extension opcode
|
// Extension opcode
|
||||||
case O_EXT:
|
case O_EXT:
|
||||||
|
179
Src/CPUC64.cpp
179
Src/CPUC64.cpp
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* CPUC64.cpp - 6510 (C64) emulation (line based)
|
* CPUC64.cpp - 6510 (C64) emulation (line based)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -465,55 +479,51 @@ void MOS6510::REUWriteByte(uint16 adr, uint8 byte)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if PC_IS_POINTER
|
#if PC_IS_POINTER
|
||||||
void MOS6510::jump(uint16 adr)
|
#define jump(adr) \
|
||||||
{
|
if ((adr) < 0xa000) { \
|
||||||
if (adr < 0xa000) {
|
pc = ram + (adr); \
|
||||||
pc = ram + adr;
|
pc_base = ram; \
|
||||||
pc_base = ram;
|
} else { \
|
||||||
} else
|
switch ((adr) >> 12) { \
|
||||||
switch (adr >> 12) {
|
case 0xa: \
|
||||||
case 0xa:
|
case 0xb: \
|
||||||
case 0xb:
|
if (basic_in) { \
|
||||||
if (basic_in) {
|
pc = basic_rom + ((adr) & 0x1fff); \
|
||||||
pc = basic_rom + (adr & 0x1fff);
|
pc_base = basic_rom - 0xa000; \
|
||||||
pc_base = basic_rom - 0xa000;
|
} else { \
|
||||||
} else {
|
pc = ram + (adr); \
|
||||||
pc = ram + adr;
|
pc_base = ram; \
|
||||||
pc_base = ram;
|
} \
|
||||||
|
break; \
|
||||||
|
case 0xc: \
|
||||||
|
pc = ram + (adr); \
|
||||||
|
pc_base = ram; \
|
||||||
|
break; \
|
||||||
|
case 0xd: \
|
||||||
|
if (io_in) { \
|
||||||
|
illegal_jump(pc-pc_base, (adr)); \
|
||||||
|
} else if (char_in) { \
|
||||||
|
pc = char_rom + ((adr) & 0x0fff); \
|
||||||
|
pc_base = char_rom - 0xd000; \
|
||||||
|
} else { \
|
||||||
|
pc = ram + (adr); \
|
||||||
|
pc_base = ram; \
|
||||||
|
} \
|
||||||
|
break; \
|
||||||
|
case 0xe: \
|
||||||
|
case 0xf: \
|
||||||
|
if (kernal_in) { \
|
||||||
|
pc = kernal_rom + ((adr) & 0x1fff); \
|
||||||
|
pc_base = kernal_rom - 0xe000; \
|
||||||
|
} else { \
|
||||||
|
pc = ram + (adr); \
|
||||||
|
pc_base = ram; \
|
||||||
|
} \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case 0xc:
|
|
||||||
pc = ram + adr;
|
|
||||||
pc_base = ram;
|
|
||||||
break;
|
|
||||||
case 0xd:
|
|
||||||
if (io_in)
|
|
||||||
illegal_jump(pc-pc_base, adr);
|
|
||||||
else if (char_in) {
|
|
||||||
pc = char_rom + (adr & 0x0fff);
|
|
||||||
pc_base = char_rom - 0xd000;
|
|
||||||
} else {
|
|
||||||
pc = ram + adr;
|
|
||||||
pc_base = ram;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 0xe:
|
|
||||||
case 0xf:
|
|
||||||
if (kernal_in) {
|
|
||||||
pc = kernal_rom + (adr & 0x1fff);
|
|
||||||
pc_base = kernal_rom - 0xe000;
|
|
||||||
} else {
|
|
||||||
pc = ram + adr;
|
|
||||||
pc_base = ram;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
inline void MOS6510::jump(uint16 adr)
|
#define jump(adr) pc = (adr)
|
||||||
{
|
|
||||||
pc = adr;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -524,31 +534,22 @@ inline void MOS6510::jump(uint16 adr)
|
|||||||
void MOS6510::do_adc(uint8 byte)
|
void MOS6510::do_adc(uint8 byte)
|
||||||
{
|
{
|
||||||
if (!d_flag) {
|
if (!d_flag) {
|
||||||
uint16 tmp;
|
uint16 tmp = a + (byte) + (c_flag ? 1 : 0);
|
||||||
|
|
||||||
// Binary mode
|
|
||||||
tmp = a + byte + (c_flag ? 1 : 0);
|
|
||||||
c_flag = tmp > 0xff;
|
c_flag = tmp > 0xff;
|
||||||
v_flag = !((a ^ byte) & 0x80) && ((a ^ tmp) & 0x80);
|
v_flag = !((a ^ (byte)) & 0x80) && ((a ^ tmp) & 0x80);
|
||||||
z_flag = n_flag = a = tmp;
|
z_flag = n_flag = a = tmp;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uint16 al, ah;
|
uint16 al, ah;
|
||||||
|
al = (a & 0x0f) + ((byte) & 0x0f) + (c_flag ? 1 : 0);
|
||||||
// Decimal mode
|
if (al > 9) al += 6;
|
||||||
al = (a & 0x0f) + (byte & 0x0f) + (c_flag ? 1 : 0); // Calculate lower nybble
|
ah = (a >> 4) + ((byte) >> 4);
|
||||||
if (al > 9) al += 6; // BCD fixup for lower nybble
|
|
||||||
|
|
||||||
ah = (a >> 4) + (byte >> 4); // Calculate upper nybble
|
|
||||||
if (al > 0x0f) ah++;
|
if (al > 0x0f) ah++;
|
||||||
|
z_flag = a + (byte) + (c_flag ? 1 : 0);
|
||||||
z_flag = a + byte + (c_flag ? 1 : 0); // Set flags
|
n_flag = ah << 4;
|
||||||
n_flag = ah << 4; // Only highest bit used
|
v_flag = (((ah << 4) ^ a) & 0x80) && !((a ^ (byte)) & 0x80);
|
||||||
v_flag = (((ah << 4) ^ a) & 0x80) && !((a ^ byte) & 0x80);
|
if (ah > 9) ah += 6;
|
||||||
|
c_flag = ah > 0x0f;
|
||||||
if (ah > 9) ah += 6; // BCD fixup for upper nybble
|
a = (ah << 4) | (al & 0x0f);
|
||||||
c_flag = ah > 0x0f; // Set carry flag
|
|
||||||
a = (ah << 4) | (al & 0x0f); // Compose result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,32 +560,24 @@ void MOS6510::do_adc(uint8 byte)
|
|||||||
|
|
||||||
void MOS6510::do_sbc(uint8 byte)
|
void MOS6510::do_sbc(uint8 byte)
|
||||||
{
|
{
|
||||||
uint16 tmp = a - byte - (c_flag ? 0 : 1);
|
uint16 tmp = a - (byte) - (c_flag ? 0 : 1);
|
||||||
|
|
||||||
if (!d_flag) {
|
if (!d_flag) {
|
||||||
|
|
||||||
// Binary mode
|
|
||||||
c_flag = tmp < 0x100;
|
c_flag = tmp < 0x100;
|
||||||
v_flag = ((a ^ tmp) & 0x80) && ((a ^ byte) & 0x80);
|
v_flag = ((a ^ tmp) & 0x80) && ((a ^ (byte)) & 0x80);
|
||||||
z_flag = n_flag = a = tmp;
|
z_flag = n_flag = a = tmp;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uint16 al, ah;
|
uint16 al, ah;
|
||||||
|
al = (a & 0x0f) - ((byte) & 0x0f) - (c_flag ? 0 : 1);
|
||||||
// Decimal mode
|
ah = (a >> 4) - ((byte) >> 4);
|
||||||
al = (a & 0x0f) - (byte & 0x0f) - (c_flag ? 0 : 1); // Calculate lower nybble
|
|
||||||
ah = (a >> 4) - (byte >> 4); // Calculate upper nybble
|
|
||||||
if (al & 0x10) {
|
if (al & 0x10) {
|
||||||
al -= 6; // BCD fixup for lower nybble
|
al -= 6;
|
||||||
ah--;
|
ah--;
|
||||||
}
|
}
|
||||||
if (ah & 0x10) ah -= 6; // BCD fixup for upper nybble
|
if (ah & 0x10) ah -= 6;
|
||||||
|
c_flag = tmp < 0x100;
|
||||||
c_flag = tmp < 0x100; // Set flags
|
v_flag = ((a ^ tmp) & 0x80) && ((a ^ (byte)) & 0x80);
|
||||||
v_flag = ((a ^ tmp) & 0x80) && ((a ^ byte) & 0x80);
|
|
||||||
z_flag = n_flag = tmp;
|
z_flag = n_flag = tmp;
|
||||||
|
a = (ah << 4) | (al & 0x0f);
|
||||||
a = (ah << 4) | (al & 0x0f); // Compose result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -758,10 +751,10 @@ int MOS6510::EmulateLine(int cycles_left)
|
|||||||
// Any pending interrupts?
|
// Any pending interrupts?
|
||||||
if (interrupt.intr_any) {
|
if (interrupt.intr_any) {
|
||||||
handle_int:
|
handle_int:
|
||||||
if (interrupt.intr[INT_RESET])
|
if (interrupt.intr[INT_RESET]) {
|
||||||
Reset();
|
Reset();
|
||||||
|
|
||||||
else if (interrupt.intr[INT_NMI]) {
|
} else if (interrupt.intr[INT_NMI]) {
|
||||||
interrupt.intr[INT_NMI] = false; // Simulate an edge-triggered input
|
interrupt.intr[INT_NMI] = false; // Simulate an edge-triggered input
|
||||||
#if PC_IS_POINTER
|
#if PC_IS_POINTER
|
||||||
push_byte((pc-pc_base) >> 8); push_byte(pc-pc_base);
|
push_byte((pc-pc_base) >> 8); push_byte(pc-pc_base);
|
||||||
@ -770,7 +763,8 @@ handle_int:
|
|||||||
#endif
|
#endif
|
||||||
push_flags(false);
|
push_flags(false);
|
||||||
i_flag = true;
|
i_flag = true;
|
||||||
jump(read_word(0xfffa));
|
adr = read_word(0xfffa);
|
||||||
|
jump(adr);
|
||||||
last_cycles = 7;
|
last_cycles = 7;
|
||||||
|
|
||||||
} else if ((interrupt.intr[INT_VICIRQ] || interrupt.intr[INT_CIAIRQ]) && !i_flag) {
|
} else if ((interrupt.intr[INT_VICIRQ] || interrupt.intr[INT_CIAIRQ]) && !i_flag) {
|
||||||
@ -781,12 +775,13 @@ handle_int:
|
|||||||
#endif
|
#endif
|
||||||
push_flags(false);
|
push_flags(false);
|
||||||
i_flag = true;
|
i_flag = true;
|
||||||
jump(read_word(0xfffe));
|
adr = read_word(0xfffe);
|
||||||
|
jump(adr);
|
||||||
last_cycles = 7;
|
last_cycles = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "CPU_emulline.i"
|
#include "CPU_emulline.h"
|
||||||
|
|
||||||
// Extension opcode
|
// Extension opcode
|
||||||
case 0xf2:
|
case 0xf2:
|
||||||
@ -816,7 +811,7 @@ handle_int:
|
|||||||
jump(0xedac);
|
jump(0xedac);
|
||||||
break;
|
break;
|
||||||
case 0x03:
|
case 0x03:
|
||||||
ram[0x90] |= TheIEC->In(&a);
|
ram[0x90] |= TheIEC->In(a);
|
||||||
set_nz(a);
|
set_nz(a);
|
||||||
c_flag = false;
|
c_flag = false;
|
||||||
jump(0xedac);
|
jump(0xedac);
|
||||||
|
17
Src/CPUC64.h
17
Src/CPUC64.h
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CPUC64.h - 6510 (C64) emulation (line based)
|
* CPUC64.h - 6510 (C64) emulation (line based)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CPU_C64_H
|
#ifndef _CPU_C64_H
|
||||||
@ -98,7 +112,6 @@ private:
|
|||||||
void write_zp(uint16 adr, uint8 byte);
|
void write_zp(uint16 adr, uint8 byte);
|
||||||
|
|
||||||
void new_config(void);
|
void new_config(void);
|
||||||
void jump(uint16 adr);
|
|
||||||
void illegal_op(uint8 op, uint16 at);
|
void illegal_op(uint8 op, uint16 at);
|
||||||
void illegal_jump(uint16 at, uint16 to);
|
void illegal_jump(uint16 at, uint16 to);
|
||||||
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
* C64_PC.cpp - Put the pieces together (Frodo PC)
|
|
||||||
*
|
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Same as CPUC64.cpp (mainly to keep the BeIDE happy)
|
|
||||||
#ifdef __riscos__
|
|
||||||
#include "CPUC64.cc"
|
|
||||||
#else
|
|
||||||
#include "CPUC64.cpp"
|
|
||||||
#endif
|
|
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* CPUC64_SC.cpp - Single-cycle 6510 (C64) emulation
|
* CPUC64_SC.cpp - Single-cycle 6510 (C64) emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -262,9 +276,6 @@ inline uint8 MOS6510::read_byte_io(uint16 adr)
|
|||||||
* Read a byte from the CPU's address space
|
* Read a byte from the CPU's address space
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __i386
|
|
||||||
inline
|
|
||||||
#endif
|
|
||||||
uint8 MOS6510::read_byte(uint16 adr)
|
uint8 MOS6510::read_byte(uint16 adr)
|
||||||
{
|
{
|
||||||
if (adr < 0xa000) {
|
if (adr < 0xa000) {
|
||||||
@ -594,7 +605,7 @@ void MOS6510::EmulateCycle(void)
|
|||||||
state = 0x0008;
|
state = 0x0008;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "CPU_emulcycle.i"
|
#include "CPU_emulcycle.h"
|
||||||
|
|
||||||
// Extension opcode
|
// Extension opcode
|
||||||
case O_EXT:
|
case O_EXT:
|
||||||
@ -619,7 +630,7 @@ void MOS6510::EmulateCycle(void)
|
|||||||
pc = 0xedac;
|
pc = 0xedac;
|
||||||
Last;
|
Last;
|
||||||
case 0x03:
|
case 0x03:
|
||||||
ram[0x90] |= TheIEC->In(&a);
|
ram[0x90] |= TheIEC->In(a);
|
||||||
set_nz(a);
|
set_nz(a);
|
||||||
c_flag = false;
|
c_flag = false;
|
||||||
pc = 0xedac;
|
pc = 0xedac;
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CPU_common.cpp - Definitions common to 6502/6510 SC emulation
|
* CPU_common.cpp - Definitions common to 6502/6510 SC emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sysdeps.h"
|
#include "sysdeps.h"
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CPU_common.h - Definitions common to 6502/6510 SC emulation
|
* CPU_common.h - Definitions common to 6502/6510 SC emulation
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CPU_COMMON_H_
|
#ifndef _CPU_COMMON_H_
|
||||||
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
* CPU_emulcycle.i - SC 6510/6502 emulation core (body of
|
* CPU_emulcycle.h - SC 6510/6502 emulation core (body of
|
||||||
* EmulateCycle() function, the same for
|
* EmulateCycle() function, the same for
|
||||||
* both 6510 and 6502)
|
* both 6510 and 6502)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -1057,7 +1071,7 @@
|
|||||||
v_flag = (data ^ a) & 0x40;
|
v_flag = (data ^ a) & 0x40;
|
||||||
if ((data & 0x0f) + (data & 0x01) > 5)
|
if ((data & 0x0f) + (data & 0x01) > 5)
|
||||||
a = a & 0xf0 | (a + 6) & 0x0f;
|
a = a & 0xf0 | (a + 6) & 0x0f;
|
||||||
if (c_flag = ((data + (data & 0x10)) & 0x1f0) > 0x50)
|
if ((c_flag = ((data + (data & 0x10)) & 0x1f0) > 0x50) != 0)
|
||||||
a += 0x60;
|
a += 0x60;
|
||||||
}
|
}
|
||||||
Last;
|
Last;
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
* CPU_emulline.i - 6510/6502 emulation core (body of
|
* CPU_emulline.h - 6510/6502 emulation core (body of
|
||||||
* EmulateLine() function, the same for
|
* EmulateLine() function, the same for
|
||||||
* both 6510 and 6502)
|
* both 6510 and 6502)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -744,12 +758,14 @@
|
|||||||
|
|
||||||
// Jump/branch group
|
// Jump/branch group
|
||||||
case 0x4c: // JMP abs
|
case 0x4c: // JMP abs
|
||||||
jump(read_adr_abs());
|
adr = read_adr_abs();
|
||||||
|
jump(adr);
|
||||||
ENDOP(3);
|
ENDOP(3);
|
||||||
|
|
||||||
case 0x6c: // JMP (ind)
|
case 0x6c: // JMP (ind)
|
||||||
adr = read_adr_abs();
|
adr = read_adr_abs();
|
||||||
jump(read_byte(adr) | (read_byte((adr + 1) & 0xff | adr & 0xff00) << 8));
|
adr = read_byte(adr) | (read_byte((adr + 1) & 0xff | adr & 0xff00) << 8);
|
||||||
|
jump(adr);
|
||||||
ENDOP(5);
|
ENDOP(5);
|
||||||
|
|
||||||
case 0x20: // JSR abs
|
case 0x20: // JSR abs
|
||||||
@ -758,18 +774,21 @@
|
|||||||
#else
|
#else
|
||||||
push_byte(pc+1 >> 8); push_byte(pc+1);
|
push_byte(pc+1 >> 8); push_byte(pc+1);
|
||||||
#endif
|
#endif
|
||||||
jump(read_adr_abs());
|
adr = read_adr_abs();
|
||||||
|
jump(adr);
|
||||||
ENDOP(6);
|
ENDOP(6);
|
||||||
|
|
||||||
case 0x60: // RTS
|
case 0x60: // RTS
|
||||||
adr = pop_byte(); // Split because of pop_byte ++sp side-effect
|
adr = pop_byte(); // Split because of pop_byte ++sp side-effect
|
||||||
jump((adr | pop_byte() << 8) + 1);
|
adr = (adr | pop_byte() << 8) + 1;
|
||||||
|
jump(adr);
|
||||||
ENDOP(6);
|
ENDOP(6);
|
||||||
|
|
||||||
case 0x40: // RTI
|
case 0x40: // RTI
|
||||||
pop_flags();
|
pop_flags();
|
||||||
adr = pop_byte(); // Split because of pop_byte ++sp side-effect
|
adr = pop_byte(); // Split because of pop_byte ++sp side-effect
|
||||||
jump(adr | pop_byte() << 8);
|
adr = adr | pop_byte() << 8;
|
||||||
|
jump(adr);
|
||||||
if (interrupt.intr_any && !i_flag)
|
if (interrupt.intr_any && !i_flag)
|
||||||
goto handle_int;
|
goto handle_int;
|
||||||
ENDOP(6);
|
ENDOP(6);
|
||||||
@ -782,7 +801,8 @@
|
|||||||
#endif
|
#endif
|
||||||
push_flags(true);
|
push_flags(true);
|
||||||
i_flag = true;
|
i_flag = true;
|
||||||
jump(read_word(0xfffe));
|
adr = read_word(0xfffe);
|
||||||
|
jump(adr);
|
||||||
ENDOP(7);
|
ENDOP(7);
|
||||||
|
|
||||||
#if PC_IS_POINTER
|
#if PC_IS_POINTER
|
||||||
@ -1309,7 +1329,7 @@
|
|||||||
v_flag = (tmp2 ^ a) & 0x40;
|
v_flag = (tmp2 ^ a) & 0x40;
|
||||||
if ((tmp2 & 0x0f) + (tmp2 & 0x01) > 5)
|
if ((tmp2 & 0x0f) + (tmp2 & 0x01) > 5)
|
||||||
a = a & 0xf0 | (a + 6) & 0x0f;
|
a = a & 0xf0 | (a + 6) & 0x0f;
|
||||||
if (c_flag = ((tmp2 + (tmp2 & 0x10)) & 0x1f0) > 0x50)
|
if ((c_flag = ((tmp2 + (tmp2 & 0x10)) & 0x1f0) > 0x50) != 0)
|
||||||
a += 0x60;
|
a += 0x60;
|
||||||
}
|
}
|
||||||
ENDOP(2);
|
ENDOP(2);
|
521
Src/Char_ROM.h
Normal file
521
Src/Char_ROM.h
Normal file
@ -0,0 +1,521 @@
|
|||||||
|
/*
|
||||||
|
* Char_ROM.h - C64 Character ROM
|
||||||
|
*
|
||||||
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
* C64/1541 ROMs (C) Commodore Business Machines
|
||||||
|
*/
|
||||||
|
|
||||||
|
static const uint8 builtin_char_rom[CHAR_ROM_SIZE] = {
|
||||||
|
0x3c, 0x66, 0x6e, 0x6e, 0x60, 0x62, 0x3c, 0x00,
|
||||||
|
0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
||||||
|
0x7c, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00,
|
||||||
|
0x78, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x00,
|
||||||
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7e, 0x00,
|
||||||
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x6e, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
||||||
|
0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
||||||
|
0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00,
|
||||||
|
0x66, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x00,
|
||||||
|
0x63, 0x77, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x00,
|
||||||
|
0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0e, 0x00,
|
||||||
|
0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x66, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x3c, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
||||||
|
0x63, 0x63, 0x63, 0x6b, 0x7f, 0x77, 0x63, 0x00,
|
||||||
|
0x66, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x66, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x7e, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x7e, 0x00,
|
||||||
|
0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00,
|
||||||
|
0x0c, 0x12, 0x30, 0x7c, 0x30, 0x62, 0xfc, 0x00,
|
||||||
|
0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00,
|
||||||
|
0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x10, 0x30, 0x7f, 0x7f, 0x30, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x66, 0x66, 0xff, 0x66, 0xff, 0x66, 0x66, 0x00,
|
||||||
|
0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
|
||||||
|
0x62, 0x66, 0x0c, 0x18, 0x30, 0x66, 0x46, 0x00,
|
||||||
|
0x3c, 0x66, 0x3c, 0x38, 0x67, 0x66, 0x3f, 0x00,
|
||||||
|
0x06, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
|
||||||
|
0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
|
||||||
|
0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
|
||||||
|
0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
||||||
|
0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
||||||
|
0x00, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00,
|
||||||
|
0x3c, 0x66, 0x6e, 0x76, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7e, 0x00,
|
||||||
|
0x3c, 0x66, 0x06, 0x0c, 0x30, 0x60, 0x7e, 0x00,
|
||||||
|
0x3c, 0x66, 0x06, 0x1c, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x06, 0x0e, 0x1e, 0x66, 0x7f, 0x06, 0x06, 0x00,
|
||||||
|
0x7e, 0x60, 0x7c, 0x06, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x7c, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x7e, 0x66, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
||||||
|
0x0e, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0e, 0x00,
|
||||||
|
0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00,
|
||||||
|
0x70, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x70, 0x00,
|
||||||
|
0x3c, 0x66, 0x06, 0x0c, 0x18, 0x00, 0x18, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0x08, 0x1c, 0x3e, 0x7f, 0x7f, 0x1c, 0x3e, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
|
||||||
|
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||||
|
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
|
||||||
|
0x00, 0x00, 0x00, 0xe0, 0xf0, 0x38, 0x18, 0x18,
|
||||||
|
0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x18, 0x38, 0xf0, 0xe0, 0x00, 0x00, 0x00,
|
||||||
|
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff,
|
||||||
|
0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x07, 0x03,
|
||||||
|
0x03, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0,
|
||||||
|
0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||||
|
0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x00, 0x3c, 0x7e, 0x7e, 0x7e, 0x7e, 0x3c, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00,
|
||||||
|
0x36, 0x7f, 0x7f, 0x7f, 0x3e, 0x1c, 0x08, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||||
|
0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18,
|
||||||
|
0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3,
|
||||||
|
0x00, 0x3c, 0x7e, 0x66, 0x66, 0x7e, 0x3c, 0x00,
|
||||||
|
0x18, 0x18, 0x66, 0x66, 0x18, 0x18, 0x3c, 0x00,
|
||||||
|
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
||||||
|
0x08, 0x1c, 0x3e, 0x7f, 0x3e, 0x1c, 0x08, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18,
|
||||||
|
0xc0, 0xc0, 0x30, 0x30, 0xc0, 0xc0, 0x30, 0x30,
|
||||||
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x00, 0x03, 0x3e, 0x76, 0x36, 0x36, 0x00,
|
||||||
|
0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||||
|
0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0x33, 0x33,
|
||||||
|
0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
||||||
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18,
|
||||||
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
||||||
|
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||||
|
0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0,
|
||||||
|
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0xc3, 0x99, 0x91, 0x91, 0x9f, 0x99, 0xc3, 0xff,
|
||||||
|
0xe7, 0xc3, 0x99, 0x81, 0x99, 0x99, 0x99, 0xff,
|
||||||
|
0x83, 0x99, 0x99, 0x83, 0x99, 0x99, 0x83, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0x9f, 0x9f, 0x99, 0xc3, 0xff,
|
||||||
|
0x87, 0x93, 0x99, 0x99, 0x99, 0x93, 0x87, 0xff,
|
||||||
|
0x81, 0x9f, 0x9f, 0x87, 0x9f, 0x9f, 0x81, 0xff,
|
||||||
|
0x81, 0x9f, 0x9f, 0x87, 0x9f, 0x9f, 0x9f, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0x91, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0x81, 0x99, 0x99, 0x99, 0xff,
|
||||||
|
0xc3, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xc3, 0xff,
|
||||||
|
0xe1, 0xf3, 0xf3, 0xf3, 0xf3, 0x93, 0xc7, 0xff,
|
||||||
|
0x99, 0x93, 0x87, 0x8f, 0x87, 0x93, 0x99, 0xff,
|
||||||
|
0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x81, 0xff,
|
||||||
|
0x9c, 0x88, 0x80, 0x94, 0x9c, 0x9c, 0x9c, 0xff,
|
||||||
|
0x99, 0x89, 0x81, 0x81, 0x91, 0x99, 0x99, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x83, 0x99, 0x99, 0x83, 0x9f, 0x9f, 0x9f, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xf1, 0xff,
|
||||||
|
0x83, 0x99, 0x99, 0x83, 0x87, 0x93, 0x99, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0xc3, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0x81, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xe7, 0xff,
|
||||||
|
0x9c, 0x9c, 0x9c, 0x94, 0x80, 0x88, 0x9c, 0xff,
|
||||||
|
0x99, 0x99, 0xc3, 0xe7, 0xc3, 0x99, 0x99, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0xc3, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0x81, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0x81, 0xff,
|
||||||
|
0xc3, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xc3, 0xff,
|
||||||
|
0xf3, 0xed, 0xcf, 0x83, 0xcf, 0x9d, 0x03, 0xff,
|
||||||
|
0xc3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xc3, 0xff,
|
||||||
|
0xff, 0xe7, 0xc3, 0x81, 0xe7, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xef, 0xcf, 0x80, 0x80, 0xcf, 0xef, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe7, 0xff, 0xff, 0xe7, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x99, 0x99, 0x00, 0x99, 0x00, 0x99, 0x99, 0xff,
|
||||||
|
0xe7, 0xc1, 0x9f, 0xc3, 0xf9, 0x83, 0xe7, 0xff,
|
||||||
|
0x9d, 0x99, 0xf3, 0xe7, 0xcf, 0x99, 0xb9, 0xff,
|
||||||
|
0xc3, 0x99, 0xc3, 0xc7, 0x98, 0x99, 0xc0, 0xff,
|
||||||
|
0xf9, 0xf3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf3, 0xe7, 0xcf, 0xcf, 0xcf, 0xe7, 0xf3, 0xff,
|
||||||
|
0xcf, 0xe7, 0xf3, 0xf3, 0xf3, 0xe7, 0xcf, 0xff,
|
||||||
|
0xff, 0x99, 0xc3, 0x00, 0xc3, 0x99, 0xff, 0xff,
|
||||||
|
0xff, 0xe7, 0xe7, 0x81, 0xe7, 0xe7, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xcf,
|
||||||
|
0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xff,
|
||||||
|
0xff, 0xfc, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0xff,
|
||||||
|
0xc3, 0x99, 0x91, 0x89, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0xe7, 0xe7, 0xc7, 0xe7, 0xe7, 0xe7, 0x81, 0xff,
|
||||||
|
0xc3, 0x99, 0xf9, 0xf3, 0xcf, 0x9f, 0x81, 0xff,
|
||||||
|
0xc3, 0x99, 0xf9, 0xe3, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0xf9, 0xf1, 0xe1, 0x99, 0x80, 0xf9, 0xf9, 0xff,
|
||||||
|
0x81, 0x9f, 0x83, 0xf9, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0x83, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x81, 0x99, 0xf3, 0xe7, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0xc3, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0xc1, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0xff, 0xff, 0xe7, 0xff, 0xff, 0xe7, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xe7, 0xff, 0xff, 0xe7, 0xe7, 0xcf,
|
||||||
|
0xf1, 0xe7, 0xcf, 0x9f, 0xcf, 0xe7, 0xf1, 0xff,
|
||||||
|
0xff, 0xff, 0x81, 0xff, 0x81, 0xff, 0xff, 0xff,
|
||||||
|
0x8f, 0xe7, 0xf3, 0xf9, 0xf3, 0xe7, 0x8f, 0xff,
|
||||||
|
0xc3, 0x99, 0xf9, 0xf3, 0xe7, 0xff, 0xe7, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0xf7, 0xe3, 0xc1, 0x80, 0x80, 0xe3, 0xc1, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf,
|
||||||
|
0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3,
|
||||||
|
0xff, 0xff, 0xff, 0x1f, 0x0f, 0xc7, 0xe7, 0xe7,
|
||||||
|
0xe7, 0xe7, 0xe3, 0xf0, 0xf8, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xe7, 0xc7, 0x0f, 0x1f, 0xff, 0xff, 0xff,
|
||||||
|
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x00,
|
||||||
|
0x3f, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0xfc,
|
||||||
|
0xfc, 0xf8, 0xf1, 0xe3, 0xc7, 0x8f, 0x1f, 0x3f,
|
||||||
|
0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
|
||||||
|
0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc,
|
||||||
|
0xff, 0xc3, 0x81, 0x81, 0x81, 0x81, 0xc3, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff,
|
||||||
|
0xc9, 0x80, 0x80, 0x80, 0xc1, 0xe3, 0xf7, 0xff,
|
||||||
|
0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f,
|
||||||
|
0xff, 0xff, 0xff, 0xf8, 0xf0, 0xe3, 0xe7, 0xe7,
|
||||||
|
0x3c, 0x18, 0x81, 0xc3, 0xc3, 0x81, 0x18, 0x3c,
|
||||||
|
0xff, 0xc3, 0x81, 0x99, 0x99, 0x81, 0xc3, 0xff,
|
||||||
|
0xe7, 0xe7, 0x99, 0x99, 0xe7, 0xe7, 0xc3, 0xff,
|
||||||
|
0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
|
||||||
|
0xf7, 0xe3, 0xc1, 0x80, 0xc1, 0xe3, 0xf7, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x00, 0x00, 0xe7, 0xe7, 0xe7,
|
||||||
|
0x3f, 0x3f, 0xcf, 0xcf, 0x3f, 0x3f, 0xcf, 0xcf,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xff, 0xfc, 0xc1, 0x89, 0xc9, 0xc9, 0xff,
|
||||||
|
0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||||
|
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
|
||||||
|
0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc,
|
||||||
|
0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0xcc, 0xcc,
|
||||||
|
0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f,
|
||||||
|
0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe0, 0xe0, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe0, 0xe0, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0x07, 0x07, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x07, 0x07, 0xe7, 0xe7, 0xe7,
|
||||||
|
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
|
||||||
|
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
|
||||||
|
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x07, 0x07, 0xff, 0xff, 0xff,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0x3c, 0x66, 0x6e, 0x6e, 0x60, 0x62, 0x3c, 0x00,
|
||||||
|
0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
||||||
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
||||||
|
0x00, 0x00, 0x3c, 0x60, 0x60, 0x60, 0x3c, 0x00,
|
||||||
|
0x00, 0x06, 0x06, 0x3e, 0x66, 0x66, 0x3e, 0x00,
|
||||||
|
0x00, 0x00, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
||||||
|
0x00, 0x0e, 0x18, 0x3e, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x7c,
|
||||||
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x00,
|
||||||
|
0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
||||||
|
0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3c,
|
||||||
|
0x00, 0x60, 0x60, 0x6c, 0x78, 0x6c, 0x66, 0x00,
|
||||||
|
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
||||||
|
0x00, 0x00, 0x66, 0x7f, 0x7f, 0x6b, 0x63, 0x00,
|
||||||
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x00,
|
||||||
|
0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60,
|
||||||
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x06,
|
||||||
|
0x00, 0x00, 0x7c, 0x66, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x00, 0x00, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x00,
|
||||||
|
0x00, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x0e, 0x00,
|
||||||
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
||||||
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
||||||
|
0x00, 0x00, 0x63, 0x6b, 0x7f, 0x3e, 0x36, 0x00,
|
||||||
|
0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00,
|
||||||
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x0c, 0x78,
|
||||||
|
0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, 0x00,
|
||||||
|
0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00,
|
||||||
|
0x0c, 0x12, 0x30, 0x7c, 0x30, 0x62, 0xfc, 0x00,
|
||||||
|
0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00,
|
||||||
|
0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x10, 0x30, 0x7f, 0x7f, 0x30, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x66, 0x66, 0xff, 0x66, 0xff, 0x66, 0x66, 0x00,
|
||||||
|
0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
|
||||||
|
0x62, 0x66, 0x0c, 0x18, 0x30, 0x66, 0x46, 0x00,
|
||||||
|
0x3c, 0x66, 0x3c, 0x38, 0x67, 0x66, 0x3f, 0x00,
|
||||||
|
0x06, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
|
||||||
|
0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
|
||||||
|
0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
|
||||||
|
0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
||||||
|
0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
||||||
|
0x00, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00,
|
||||||
|
0x3c, 0x66, 0x6e, 0x76, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7e, 0x00,
|
||||||
|
0x3c, 0x66, 0x06, 0x0c, 0x30, 0x60, 0x7e, 0x00,
|
||||||
|
0x3c, 0x66, 0x06, 0x1c, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x06, 0x0e, 0x1e, 0x66, 0x7f, 0x06, 0x06, 0x00,
|
||||||
|
0x7e, 0x60, 0x7c, 0x06, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x7c, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x7e, 0x66, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
||||||
|
0x0e, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0e, 0x00,
|
||||||
|
0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00,
|
||||||
|
0x70, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x70, 0x00,
|
||||||
|
0x3c, 0x66, 0x06, 0x0c, 0x18, 0x00, 0x18, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
||||||
|
0x7c, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00,
|
||||||
|
0x78, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x00,
|
||||||
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7e, 0x00,
|
||||||
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x6e, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
||||||
|
0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
||||||
|
0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00,
|
||||||
|
0x66, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x00,
|
||||||
|
0x63, 0x77, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x00,
|
||||||
|
0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0e, 0x00,
|
||||||
|
0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x66, 0x00,
|
||||||
|
0x3c, 0x66, 0x60, 0x3c, 0x06, 0x66, 0x3c, 0x00,
|
||||||
|
0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
||||||
|
0x63, 0x63, 0x63, 0x6b, 0x7f, 0x77, 0x63, 0x00,
|
||||||
|
0x66, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x66, 0x00,
|
||||||
|
0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x00,
|
||||||
|
0x7e, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x7e, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18,
|
||||||
|
0xc0, 0xc0, 0x30, 0x30, 0xc0, 0xc0, 0x30, 0x30,
|
||||||
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||||
|
0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc,
|
||||||
|
0x33, 0x99, 0xcc, 0x66, 0x33, 0x99, 0xcc, 0x66,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||||
|
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||||
|
0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0x33, 0x33,
|
||||||
|
0xcc, 0x99, 0x33, 0x66, 0xcc, 0x99, 0x33, 0x66,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
||||||
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18,
|
||||||
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
||||||
|
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||||
|
0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0,
|
||||||
|
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0x01, 0x03, 0x06, 0x6c, 0x78, 0x70, 0x60, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0xc3, 0x99, 0x91, 0x91, 0x9f, 0x99, 0xc3, 0xff,
|
||||||
|
0xff, 0xff, 0xc3, 0xf9, 0xc1, 0x99, 0xc1, 0xff,
|
||||||
|
0xff, 0x9f, 0x9f, 0x83, 0x99, 0x99, 0x83, 0xff,
|
||||||
|
0xff, 0xff, 0xc3, 0x9f, 0x9f, 0x9f, 0xc3, 0xff,
|
||||||
|
0xff, 0xf9, 0xf9, 0xc1, 0x99, 0x99, 0xc1, 0xff,
|
||||||
|
0xff, 0xff, 0xc3, 0x99, 0x81, 0x9f, 0xc3, 0xff,
|
||||||
|
0xff, 0xf1, 0xe7, 0xc1, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0xff, 0xff, 0xc1, 0x99, 0x99, 0xc1, 0xf9, 0x83,
|
||||||
|
0xff, 0x9f, 0x9f, 0x83, 0x99, 0x99, 0x99, 0xff,
|
||||||
|
0xff, 0xe7, 0xff, 0xc7, 0xe7, 0xe7, 0xc3, 0xff,
|
||||||
|
0xff, 0xf9, 0xff, 0xf9, 0xf9, 0xf9, 0xf9, 0xc3,
|
||||||
|
0xff, 0x9f, 0x9f, 0x93, 0x87, 0x93, 0x99, 0xff,
|
||||||
|
0xff, 0xc7, 0xe7, 0xe7, 0xe7, 0xe7, 0xc3, 0xff,
|
||||||
|
0xff, 0xff, 0x99, 0x80, 0x80, 0x94, 0x9c, 0xff,
|
||||||
|
0xff, 0xff, 0x83, 0x99, 0x99, 0x99, 0x99, 0xff,
|
||||||
|
0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0xff, 0xff, 0x83, 0x99, 0x99, 0x83, 0x9f, 0x9f,
|
||||||
|
0xff, 0xff, 0xc1, 0x99, 0x99, 0xc1, 0xf9, 0xf9,
|
||||||
|
0xff, 0xff, 0x83, 0x99, 0x9f, 0x9f, 0x9f, 0xff,
|
||||||
|
0xff, 0xff, 0xc1, 0x9f, 0xc3, 0xf9, 0x83, 0xff,
|
||||||
|
0xff, 0xe7, 0x81, 0xe7, 0xe7, 0xe7, 0xf1, 0xff,
|
||||||
|
0xff, 0xff, 0x99, 0x99, 0x99, 0x99, 0xc1, 0xff,
|
||||||
|
0xff, 0xff, 0x99, 0x99, 0x99, 0xc3, 0xe7, 0xff,
|
||||||
|
0xff, 0xff, 0x9c, 0x94, 0x80, 0xc1, 0xc9, 0xff,
|
||||||
|
0xff, 0xff, 0x99, 0xc3, 0xe7, 0xc3, 0x99, 0xff,
|
||||||
|
0xff, 0xff, 0x99, 0x99, 0x99, 0xc1, 0xf3, 0x87,
|
||||||
|
0xff, 0xff, 0x81, 0xf3, 0xe7, 0xcf, 0x81, 0xff,
|
||||||
|
0xc3, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xc3, 0xff,
|
||||||
|
0xf3, 0xed, 0xcf, 0x83, 0xcf, 0x9d, 0x03, 0xff,
|
||||||
|
0xc3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xc3, 0xff,
|
||||||
|
0xff, 0xe7, 0xc3, 0x81, 0xe7, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xef, 0xcf, 0x80, 0x80, 0xcf, 0xef, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe7, 0xff, 0xff, 0xe7, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x99, 0x99, 0x00, 0x99, 0x00, 0x99, 0x99, 0xff,
|
||||||
|
0xe7, 0xc1, 0x9f, 0xc3, 0xf9, 0x83, 0xe7, 0xff,
|
||||||
|
0x9d, 0x99, 0xf3, 0xe7, 0xcf, 0x99, 0xb9, 0xff,
|
||||||
|
0xc3, 0x99, 0xc3, 0xc7, 0x98, 0x99, 0xc0, 0xff,
|
||||||
|
0xf9, 0xf3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf3, 0xe7, 0xcf, 0xcf, 0xcf, 0xe7, 0xf3, 0xff,
|
||||||
|
0xcf, 0xe7, 0xf3, 0xf3, 0xf3, 0xe7, 0xcf, 0xff,
|
||||||
|
0xff, 0x99, 0xc3, 0x00, 0xc3, 0x99, 0xff, 0xff,
|
||||||
|
0xff, 0xe7, 0xe7, 0x81, 0xe7, 0xe7, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xcf,
|
||||||
|
0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xff,
|
||||||
|
0xff, 0xfc, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0xff,
|
||||||
|
0xc3, 0x99, 0x91, 0x89, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0xe7, 0xe7, 0xc7, 0xe7, 0xe7, 0xe7, 0x81, 0xff,
|
||||||
|
0xc3, 0x99, 0xf9, 0xf3, 0xcf, 0x9f, 0x81, 0xff,
|
||||||
|
0xc3, 0x99, 0xf9, 0xe3, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0xf9, 0xf1, 0xe1, 0x99, 0x80, 0xf9, 0xf9, 0xff,
|
||||||
|
0x81, 0x9f, 0x83, 0xf9, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0x83, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x81, 0x99, 0xf3, 0xe7, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0xc3, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0xc1, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0xff, 0xff, 0xe7, 0xff, 0xff, 0xe7, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xe7, 0xff, 0xff, 0xe7, 0xe7, 0xcf,
|
||||||
|
0xf1, 0xe7, 0xcf, 0x9f, 0xcf, 0xe7, 0xf1, 0xff,
|
||||||
|
0xff, 0xff, 0x81, 0xff, 0x81, 0xff, 0xff, 0xff,
|
||||||
|
0x8f, 0xe7, 0xf3, 0xf9, 0xf3, 0xe7, 0x8f, 0xff,
|
||||||
|
0xc3, 0x99, 0xf9, 0xf3, 0xe7, 0xff, 0xe7, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xc3, 0x99, 0x81, 0x99, 0x99, 0x99, 0xff,
|
||||||
|
0x83, 0x99, 0x99, 0x83, 0x99, 0x99, 0x83, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0x9f, 0x9f, 0x99, 0xc3, 0xff,
|
||||||
|
0x87, 0x93, 0x99, 0x99, 0x99, 0x93, 0x87, 0xff,
|
||||||
|
0x81, 0x9f, 0x9f, 0x87, 0x9f, 0x9f, 0x81, 0xff,
|
||||||
|
0x81, 0x9f, 0x9f, 0x87, 0x9f, 0x9f, 0x9f, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0x91, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0x81, 0x99, 0x99, 0x99, 0xff,
|
||||||
|
0xc3, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xc3, 0xff,
|
||||||
|
0xe1, 0xf3, 0xf3, 0xf3, 0xf3, 0x93, 0xc7, 0xff,
|
||||||
|
0x99, 0x93, 0x87, 0x8f, 0x87, 0x93, 0x99, 0xff,
|
||||||
|
0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x81, 0xff,
|
||||||
|
0x9c, 0x88, 0x80, 0x94, 0x9c, 0x9c, 0x9c, 0xff,
|
||||||
|
0x99, 0x89, 0x81, 0x81, 0x91, 0x99, 0x99, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x83, 0x99, 0x99, 0x83, 0x9f, 0x9f, 0x9f, 0xff,
|
||||||
|
0xc3, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xf1, 0xff,
|
||||||
|
0x83, 0x99, 0x99, 0x83, 0x87, 0x93, 0x99, 0xff,
|
||||||
|
0xc3, 0x99, 0x9f, 0xc3, 0xf9, 0x99, 0xc3, 0xff,
|
||||||
|
0x81, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xe7, 0xff,
|
||||||
|
0x9c, 0x9c, 0x9c, 0x94, 0x80, 0x88, 0x9c, 0xff,
|
||||||
|
0x99, 0x99, 0xc3, 0xe7, 0xc3, 0x99, 0x99, 0xff,
|
||||||
|
0x99, 0x99, 0x99, 0xc3, 0xe7, 0xe7, 0xe7, 0xff,
|
||||||
|
0x81, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0x81, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x00, 0x00, 0xe7, 0xe7, 0xe7,
|
||||||
|
0x3f, 0x3f, 0xcf, 0xcf, 0x3f, 0x3f, 0xcf, 0xcf,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33,
|
||||||
|
0xcc, 0x66, 0x33, 0x99, 0xcc, 0x66, 0x33, 0x99,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||||
|
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
|
||||||
|
0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc,
|
||||||
|
0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0xcc, 0xcc,
|
||||||
|
0x33, 0x66, 0xcc, 0x99, 0x33, 0x66, 0xcc, 0x99,
|
||||||
|
0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe0, 0xe0, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||||
|
0xe7, 0xe7, 0xe7, 0xe0, 0xe0, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0x07, 0x07, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0x00, 0x00, 0xe7, 0xe7, 0xe7,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x07, 0x07, 0xe7, 0xe7, 0xe7,
|
||||||
|
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
|
||||||
|
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
|
||||||
|
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||||
|
0xfe, 0xfc, 0xf9, 0x93, 0x87, 0x8f, 0x9f, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||||
|
0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xe7, 0xe7, 0x07, 0x07, 0xff, 0xff, 0xff,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0
|
||||||
|
};
|
@ -1,8 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CmdPipe.cpp
|
* CmdPipe.cpp
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* Tcl/Tk stuff by Lutz Vieweg
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CmdPipe.h"
|
#include "CmdPipe.h"
|
||||||
@ -102,18 +115,18 @@ unsigned long Pipe::eread(void * buf, unsigned long len) {
|
|||||||
|
|
||||||
int Pipe::probe(void) const {
|
int Pipe::probe(void) const {
|
||||||
|
|
||||||
fd_set set;
|
// fd_set set;
|
||||||
FD_ZERO(&set);
|
// FD_ZERO(&set);
|
||||||
FD_SET(fds[0], &set);
|
// FD_SET(fds[0], &set);
|
||||||
|
//
|
||||||
struct timeval tv;
|
// struct timeval tv;
|
||||||
tv.tv_sec = 0;
|
// tv.tv_sec = 0;
|
||||||
tv.tv_usec = 0;
|
// tv.tv_usec = 0;
|
||||||
|
//
|
||||||
int res;
|
int res;
|
||||||
// Use the following commented line for HP-UX < 10.20
|
//// Use the following commented line for HP-UX < 10.20
|
||||||
// res = select(FD_SETSIZE, (int *)&set, (int *)0, (int *)0, &tv);
|
//// res = select(FD_SETSIZE, (int *)&set, (int *)0, (int *)0, &tv);
|
||||||
res = select(FD_SETSIZE, &set, (fd_set *)0, (fd_set *)0, &tv);
|
// res = select(FD_SETSIZE, &set, (fd_set *)0, (fd_set *)0, &tv);
|
||||||
|
|
||||||
if (res > 0) return -1;
|
if (res > 0) return -1;
|
||||||
return 0;
|
return 0;
|
||||||
@ -157,12 +170,12 @@ CmdPipe::CmdPipe(const char * command, const char * arg, int nicediff) : childpi
|
|||||||
|
|
||||||
CmdPipe::~CmdPipe(void) {
|
CmdPipe::~CmdPipe(void) {
|
||||||
|
|
||||||
if (childpid) {
|
//if (childpid) {
|
||||||
int status;
|
// int status;
|
||||||
waitpid(childpid, &status, 0);
|
// waitpid(childpid, &status, 0);
|
||||||
|
//
|
||||||
if (status != 0) {
|
// if (status != 0) {
|
||||||
fprintf(stderr,"~CmdPipe child process returned error\n");
|
// fprintf(stderr,"~CmdPipe child process returned error\n");
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* CmdPipe.h
|
* CmdPipe.h
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* Tcl/Tk stuff by Lutz Vieweg
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CmdPipe_h
|
#ifndef CmdPipe_h
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Display.cpp - C64 graphics display, emulator window handling
|
* Display.cpp - C64 graphics display, emulator window handling
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sysdeps.h"
|
#include "sysdeps.h"
|
||||||
@ -20,32 +34,34 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#undef USE_THEORETICAL_COLORS
|
#define USE_PEPTO_COLORS 1
|
||||||
|
|
||||||
#ifdef USE_THEORETICAL_COLORS
|
#ifdef USE_PEPTO_COLORS
|
||||||
|
|
||||||
// C64 color palette (theoretical values)
|
// C64 color palette
|
||||||
|
// Values based on measurements by Philip "Pepto" Timmermann <pepto@pepto.de>
|
||||||
|
// (see http://www.pepto.de/projects/colorvic/)
|
||||||
const uint8 palette_red[16] = {
|
const uint8 palette_red[16] = {
|
||||||
0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x80, 0xff, 0x40, 0x80, 0x80, 0x80, 0xc0
|
0x00, 0xff, 0x86, 0x4c, 0x88, 0x35, 0x20, 0xcf, 0x88, 0x40, 0xcb, 0x34, 0x68, 0x8b, 0x68, 0xa1
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8 palette_green[16] = {
|
const uint8 palette_green[16] = {
|
||||||
0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x80, 0x40, 0x80, 0x40, 0x80, 0xff, 0x80, 0xc0
|
0x00, 0xff, 0x19, 0xc1, 0x17, 0xac, 0x07, 0xf2, 0x3e, 0x2a, 0x55, 0x34, 0x68, 0xff, 0x4a, 0xa1
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8 palette_blue[16] = {
|
const uint8 palette_blue[16] = {
|
||||||
0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x80, 0xff, 0xc0
|
0x00, 0xff, 0x01, 0xe3, 0xbd, 0x0a, 0xc0, 0x2d, 0x00, 0x00, 0x37, 0x34, 0x68, 0x59, 0xff, 0xa1
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// C64 color palette (more realistic looking colors)
|
// C64 color palette (traditional Frodo colors)
|
||||||
const uint8 palette_red[16] = {
|
const uint8 palette_red[16] = {
|
||||||
0x00, 0xff, 0x99, 0x00, 0xcc, 0x44, 0x11, 0xff, 0xaa, 0x66, 0xff, 0x40, 0x80, 0x66, 0x77, 0xc0
|
0x00, 0xff, 0x99, 0x00, 0xcc, 0x44, 0x11, 0xff, 0xaa, 0x66, 0xff, 0x40, 0x80, 0x66, 0x77, 0xc0
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8 palette_green[16] = {
|
const uint8 palette_green[16] = {
|
||||||
0x00, 0xff, 0x00, 0xff, 0x00, 0xcc, 0x00, 0xff, 0x55, 0x33, 0x66, 0x40, 0x80, 0xff, 0x77, 0xc0
|
0x00, 0xff, 0x00, 0xff, 0x00, 0xcc, 0x00, 0xdd, 0x55, 0x33, 0x66, 0x40, 0x80, 0xff, 0x77, 0xc0
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8 palette_blue[16] = {
|
const uint8 palette_blue[16] = {
|
||||||
@ -69,21 +85,25 @@ void C64Display::UpdateLEDs(int l0, int l1, int l2, int l3)
|
|||||||
|
|
||||||
|
|
||||||
#if defined(__BEOS__)
|
#if defined(__BEOS__)
|
||||||
#include "Display_Be.i"
|
#include "Display_Be.h"
|
||||||
#elif defined(AMIGA)
|
#elif defined(AMIGA)
|
||||||
#include "Display_Amiga.i"
|
#include "Display_Amiga.h"
|
||||||
#elif defined(HAVE_SDL)
|
#elif defined(HAVE_SDL)
|
||||||
#include "Display_SDL.i"
|
# if defined(QTOPIA) or defined(MAEMO) or defined(WII)
|
||||||
|
# include "Display_EmbeddedSDL.h"
|
||||||
|
# else
|
||||||
|
# include "Display_SDL.h"
|
||||||
|
# endif
|
||||||
#elif defined(__unix)
|
#elif defined(__unix)
|
||||||
# ifdef __svgalib__
|
# ifdef __svgalib__
|
||||||
# include "Display_svga.i"
|
# include "Display_svga.h"
|
||||||
# else
|
# else
|
||||||
# include "Display_x.i"
|
# include "Display_x.h"
|
||||||
# endif
|
# endif
|
||||||
#elif defined(__mac__)
|
#elif defined(__mac__)
|
||||||
#include "Display_mac.i"
|
#include "Display_mac.h"
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
#include "Display_WIN32.i"
|
#include "Display_WIN32.h"
|
||||||
#elif defined(__riscos__)
|
#elif defined(__riscos__)
|
||||||
#include "Display_Acorn.i"
|
#include "Display_Acorn.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Display.h - C64 graphics display, emulator window handling
|
* Display.h - C64 graphics display, emulator window handling
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DISPLAY_H
|
#ifndef _DISPLAY_H
|
||||||
@ -16,8 +30,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SDL
|
#ifdef HAVE_SDL
|
||||||
#include <SDL.h>
|
struct SDL_Surface;
|
||||||
extern SDL_Surface *real_screen;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@ -38,10 +51,6 @@ const int DISPLAY_X = 0x180;
|
|||||||
const int DISPLAY_Y = 0x110;
|
const int DISPLAY_Y = 0x110;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_SDL)
|
|
||||||
const int FULL_DISPLAY_X = 640;
|
|
||||||
const int FULL_DISPLAY_Y = 480;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class C64Window;
|
class C64Window;
|
||||||
class C64Screen;
|
class C64Screen;
|
||||||
@ -63,12 +72,6 @@ public:
|
|||||||
void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick, uint8 *joystick2);
|
void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick, uint8 *joystick2);
|
||||||
#else
|
#else
|
||||||
void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick);
|
void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick);
|
||||||
#endif
|
|
||||||
#if defined(HAVE_SDL)
|
|
||||||
void FakeKeyPress(int kc, bool shift, uint8 *CIA_key_matrix,
|
|
||||||
uint8 *CIA_rev_matrix);
|
|
||||||
void TranslateKey(SDLKey key, bool key_up, uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick);
|
|
||||||
void UpdateKeyMatrix(int c64_key, bool key_up, uint8 *key_matrix, uint8 *rev_matrix);
|
|
||||||
#endif
|
#endif
|
||||||
bool NumLock(void);
|
bool NumLock(void);
|
||||||
void InitColors(uint8 *colors);
|
void InitColors(uint8 *colors);
|
||||||
@ -90,7 +93,7 @@ public:
|
|||||||
Joy_Keys JoystickKeys[2]; // it's easier making the joystick keys public
|
Joy_Keys JoystickKeys[2]; // it's easier making the joystick keys public
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__unix) || defined(GEKKO)
|
#ifdef __unix
|
||||||
bool quit_requested;
|
bool quit_requested;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,10 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_Acorn.i
|
* Display_Acorn.h - C64 graphics display, emulator window handling,
|
||||||
|
* RISC OS specific stuff
|
||||||
*
|
*
|
||||||
* Handles redraws and suchlike as well as the keyboard
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* Frodo (C) 1994-1997 by Christian Bauer
|
|
||||||
* Acorn port by Andreas Dehmel, 1997
|
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -1,8 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_Amiga.i - C64 graphics display, emulator window handling,
|
* Display_Amiga.h - C64 graphics display, emulator window handling,
|
||||||
* Amiga specific stuff
|
* Amiga specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exec/types.h>
|
#include <exec/types.h>
|
||||||
@ -487,7 +501,7 @@ void C64Display::PollKeyboard(UBYTE *key_matrix, UBYTE *rev_matrix, UBYTE *joyst
|
|||||||
case 0: { // About Frodo
|
case 0: { // About Frodo
|
||||||
TheC64->Pause();
|
TheC64->Pause();
|
||||||
char str[256];
|
char str[256];
|
||||||
sprintf(str, "%s by Christian Bauer\n<cbauer@iphcip1.physik.uni-mainz.de>\n© Copyright 1994-1997\nFreely distributable", VERSION_STRING);
|
sprintf(str, "%s by Christian Bauer\n<Christian.Bauer@uni-mainz.de>\n© Copyright 1994-1997,2002-2005", VERSION_STRING);
|
||||||
ShowRequester(str, "OK");
|
ShowRequester(str, "OK");
|
||||||
TheC64->Resume();
|
TheC64->Resume();
|
||||||
break;
|
break;
|
@ -1,9 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_Be.i - C64 graphics display, emulator window handling,
|
* Display_Be.h - C64 graphics display, emulator window handling,
|
||||||
* Be specific stuff
|
* Be specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* GameKit stuff by Tinic Urou
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AppKit.h>
|
#include <AppKit.h>
|
||||||
@ -15,6 +28,14 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef BIT_BANG
|
||||||
|
#define BIT_BANG 0
|
||||||
|
#endif
|
||||||
|
#ifndef MGA_HACK
|
||||||
|
#define MGA_HACK 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Window thread messages
|
// Window thread messages
|
||||||
const uint32 MSG_REDRAW = 1;
|
const uint32 MSG_REDRAW = 1;
|
||||||
|
|
||||||
@ -71,7 +92,7 @@ const int key_byte[128] = {
|
|||||||
3, 4, 4, 5, 5, 6, 6, 8+0,
|
3, 4, 4, 5, 5, 6, 6, 8+0,
|
||||||
0x26,0x22,0x2a, 0, 7, -1, 7, -1,
|
0x26,0x22,0x2a, 0, 7, -1, 7, -1,
|
||||||
|
|
||||||
7, 8+0, 0, 0,0x30, -1, 7, 7,
|
0x30, 8+0, 0, 0,0x30, -1, 7, 7,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
|
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
@ -128,17 +149,23 @@ private:
|
|||||||
class SpeedoView;
|
class SpeedoView;
|
||||||
class LEDView;
|
class LEDView;
|
||||||
|
|
||||||
class C64Window : public BWindow {
|
class C64Window : public BDirectWindow {
|
||||||
public:
|
public:
|
||||||
C64Window();
|
C64Window();
|
||||||
|
|
||||||
virtual bool QuitRequested(void);
|
virtual bool QuitRequested(void);
|
||||||
virtual void MessageReceived(BMessage *msg);
|
virtual void MessageReceived(BMessage *msg);
|
||||||
|
virtual void DirectConnected(direct_buffer_info *info);
|
||||||
|
|
||||||
BBitmap *TheBitmap[2];
|
BBitmap *TheBitmap[2];
|
||||||
SpeedoView *Speedometer;
|
SpeedoView *Speedometer;
|
||||||
LEDView *LED[4];
|
LEDView *LED[4];
|
||||||
|
|
||||||
|
#if BIT_BANG
|
||||||
|
uint8 *bits;
|
||||||
|
int bytes_per_row;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BitmapView *main_view;
|
BitmapView *main_view;
|
||||||
};
|
};
|
||||||
@ -153,12 +180,21 @@ public:
|
|||||||
C64Screen(C64Display *display) : BWindowScreen("Frodo", B_8_BIT_640x480, &error), the_display(display)
|
C64Screen(C64Display *display) : BWindowScreen("Frodo", B_8_BIT_640x480, &error), the_display(display)
|
||||||
{
|
{
|
||||||
Lock();
|
Lock();
|
||||||
BitmapView *main_view = new BitmapView(Bounds(), NULL);
|
TheBitmap = new BBitmap(DisplayFrame, B_COLOR_8_BIT);
|
||||||
|
main_view = new BitmapView(Bounds(), TheBitmap);
|
||||||
AddChild(main_view);
|
AddChild(main_view);
|
||||||
main_view->MakeFocus();
|
main_view->MakeFocus();
|
||||||
Connected = false;
|
Connected = false;
|
||||||
|
first_connected = true;
|
||||||
|
#if MGA_HACK
|
||||||
|
mga_ready = false;
|
||||||
|
#endif
|
||||||
Unlock();
|
Unlock();
|
||||||
}
|
}
|
||||||
|
~C64Screen()
|
||||||
|
{
|
||||||
|
delete TheBitmap;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void ScreenConnected(bool active);
|
virtual void ScreenConnected(bool active);
|
||||||
virtual void DispatchMessage(BMessage *msg, BHandler *handler);
|
virtual void DispatchMessage(BMessage *msg, BHandler *handler);
|
||||||
@ -169,10 +205,27 @@ public:
|
|||||||
bool Connected; // Flag: screen connected
|
bool Connected; // Flag: screen connected
|
||||||
int Speed;
|
int Speed;
|
||||||
char SpeedoStr[16]; // Speedometer value converted to a string
|
char SpeedoStr[16]; // Speedometer value converted to a string
|
||||||
|
BBitmap *TheBitmap;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
C64Display *the_display;
|
C64Display *the_display;
|
||||||
|
BitmapView *main_view;
|
||||||
|
bool first_connected;
|
||||||
status_t error;
|
status_t error;
|
||||||
|
|
||||||
|
#if MGA_HACK
|
||||||
|
area_id mga_clone_area;
|
||||||
|
volatile uint8 *isa_io;
|
||||||
|
bool mga_ready;
|
||||||
|
|
||||||
|
void CRTC_out(int reg, uint8 val) {isa_io[0x3d4] = reg; __eieio(); isa_io[0x3d5] = val; __eieio();}
|
||||||
|
uint8 CRTC_in(int reg) {isa_io[0x3d4] = reg; __eieio(); return isa_io[0x3d5];}
|
||||||
|
void SEQ_out(int reg, uint8 val) {isa_io[0x3c4] = reg; __eieio(); isa_io[0x3c5] = val; __eieio();}
|
||||||
|
uint8 SEQ_in(int reg) {isa_io[0x3c4] = reg; __eieio(); return isa_io[0x3c5];}
|
||||||
|
void GDC_out(int reg, uint8 val) {isa_io[0x3ce] = reg; __eieio(); isa_io[0x3cf] = val; __eieio();}
|
||||||
|
uint8 GDC_in(int reg) {isa_io[0x3ce] = reg; __eieio(); return isa_io[0x3cf];}
|
||||||
|
void ATC_out(int reg, uint8 val) {isa_io[0x3c0] = reg; __eieio(); isa_io[0x3c0] = val; __eieio();}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -300,13 +353,75 @@ void C64Display::Update(void)
|
|||||||
the_screen->DrawLED(i, led_state[i]);
|
the_screen->DrawLED(i, led_state[i]);
|
||||||
the_screen->DrawSpeedometer();
|
the_screen->DrawSpeedometer();
|
||||||
|
|
||||||
|
// Update C64 display in dobule scan mode
|
||||||
|
if (ThePrefs.DoubleScan) {
|
||||||
|
uint8 *src = (uint8 *)the_screen->TheBitmap->Bits();
|
||||||
|
uint32 src_xmod = the_screen->TheBitmap->BytesPerRow();
|
||||||
|
src += src_xmod * 16 + 32;
|
||||||
|
uint8 *dest = (uint8 *)the_screen->CardInfo()->frame_buffer;
|
||||||
|
uint32 dest_xmod = the_screen->CardInfo()->bytes_per_row;
|
||||||
|
#ifdef __POWERPC__
|
||||||
|
double tmp[1];
|
||||||
|
for (int y=0; y<240; y++) {
|
||||||
|
uint32 *p = (uint32 *)src - 1;
|
||||||
|
double *q1 = (double *)dest - 1;
|
||||||
|
double *q2 = q1 + dest_xmod / sizeof(double);
|
||||||
|
for (int x=0; x<80; x++) {
|
||||||
|
uint32 val = *(++p);
|
||||||
|
uint8 *r = (uint8 *)&tmp[1];
|
||||||
|
*(--r) = val;
|
||||||
|
*(--r) = val;
|
||||||
|
val >>= 8;
|
||||||
|
*(--r) = val;
|
||||||
|
*(--r) = val;
|
||||||
|
val >>= 8;
|
||||||
|
*(--r) = val;
|
||||||
|
*(--r) = val;
|
||||||
|
val >>= 8;
|
||||||
|
*(--r) = val;
|
||||||
|
*(--r) = val;
|
||||||
|
double tmp2 = tmp[0];
|
||||||
|
*(++q1) = tmp2;
|
||||||
|
*(++q2) = tmp2;
|
||||||
|
}
|
||||||
|
src += src_xmod;
|
||||||
|
dest += dest_xmod * 2;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
for (int y=0; y<240; y++) {
|
||||||
|
uint32 *p = (uint32 *)src;
|
||||||
|
uint32 *q1 = (uint32 *)dest;
|
||||||
|
uint32 *q2 = q1 + dest_xmod / sizeof(uint32);
|
||||||
|
for (int x=0; x<80; x++) {
|
||||||
|
uint32 val = *p++;
|
||||||
|
uint32 tmp = val & 0x000000ff;
|
||||||
|
tmp |= (val << 8) & 0x0000ff00;
|
||||||
|
tmp |= (val << 8) & 0x00ff0000;
|
||||||
|
tmp |= (val << 16) & 0xff000000;
|
||||||
|
*q1++ = tmp;
|
||||||
|
*q2++ = tmp;
|
||||||
|
tmp = (val >> 16) & 0x000000ff;
|
||||||
|
tmp |= (val >> 8) & 0x0000ff00;
|
||||||
|
tmp |= (val >> 8) & 0x00ff0000;
|
||||||
|
tmp |= val & 0xff000000;
|
||||||
|
*q1++ = tmp;
|
||||||
|
*q2++ = tmp;
|
||||||
|
}
|
||||||
|
src += src_xmod;
|
||||||
|
dest += dest_xmod * 2;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
#if !BIT_BANG
|
||||||
// Update C64 display
|
// Update C64 display
|
||||||
BMessage msg(MSG_REDRAW);
|
BMessage msg(MSG_REDRAW);
|
||||||
msg.AddInt32("bitmap", draw_bitmap);
|
msg.AddInt32("bitmap", draw_bitmap);
|
||||||
the_window->PostMessage(&msg);
|
the_window->PostMessage(&msg);
|
||||||
draw_bitmap ^= 1;
|
draw_bitmap ^= 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Update LEDs
|
// Update LEDs
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++)
|
||||||
@ -338,10 +453,17 @@ void C64Display::Speedometer(int speed)
|
|||||||
|
|
||||||
uint8 *C64Display::BitmapBase(void)
|
uint8 *C64Display::BitmapBase(void)
|
||||||
{
|
{
|
||||||
if (using_screen)
|
if (using_screen) {
|
||||||
return (uint8 *)the_screen->CardInfo()->frame_buffer;
|
if (ThePrefs.DoubleScan)
|
||||||
|
return (uint8 *)the_screen->TheBitmap->Bits();
|
||||||
else
|
else
|
||||||
|
return (uint8 *)the_screen->CardInfo()->frame_buffer;
|
||||||
|
} else
|
||||||
|
#if BIT_BANG
|
||||||
|
return (uint8 *)the_window->bits;
|
||||||
|
#else
|
||||||
return (uint8 *)the_window->TheBitmap[draw_bitmap]->Bits();
|
return (uint8 *)the_window->TheBitmap[draw_bitmap]->Bits();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -351,10 +473,17 @@ uint8 *C64Display::BitmapBase(void)
|
|||||||
|
|
||||||
int C64Display::BitmapXMod(void)
|
int C64Display::BitmapXMod(void)
|
||||||
{
|
{
|
||||||
if (using_screen)
|
if (using_screen) {
|
||||||
return the_screen->CardInfo()->bytes_per_row;
|
if (ThePrefs.DoubleScan)
|
||||||
|
return the_screen->TheBitmap->BytesPerRow();
|
||||||
else
|
else
|
||||||
|
return the_screen->CardInfo()->bytes_per_row;
|
||||||
|
} else
|
||||||
|
#if BIT_BANG
|
||||||
|
return the_window->bytes_per_row;
|
||||||
|
#else
|
||||||
return the_window->TheBitmap[draw_bitmap]->BytesPerRow();
|
return the_window->TheBitmap[draw_bitmap]->BytesPerRow();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -486,7 +615,7 @@ void C64Display::Resume(void)
|
|||||||
* Window constructor
|
* Window constructor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
C64Window::C64Window() : BWindow(WindowFrame, "Frodo", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
|
C64Window::C64Window() : BDirectWindow(WindowFrame, "Frodo", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
|
||||||
{
|
{
|
||||||
// Move window to right position
|
// Move window to right position
|
||||||
Lock();
|
Lock();
|
||||||
@ -511,7 +640,7 @@ C64Window::C64Window() : BWindow(WindowFrame, "Frodo", B_TITLED_WINDOW, B_NOT_RE
|
|||||||
bar->AddItem(menu);
|
bar->AddItem(menu);
|
||||||
AddChild(bar);
|
AddChild(bar);
|
||||||
SetKeyMenuBar(bar);
|
SetKeyMenuBar(bar);
|
||||||
int mbar_height = bar->Frame().bottom + 1;
|
int mbar_height = int(bar->Frame().bottom) + 1;
|
||||||
|
|
||||||
// Resize window to fit menu bar
|
// Resize window to fit menu bar
|
||||||
ResizeBy(0, mbar_height);
|
ResizeBy(0, mbar_height);
|
||||||
@ -572,8 +701,10 @@ void C64Window::MessageReceived(BMessage *msg)
|
|||||||
switch (msg->what) {
|
switch (msg->what) {
|
||||||
case MSG_REDRAW: // Redraw bitmap
|
case MSG_REDRAW: // Redraw bitmap
|
||||||
MessageQueue()->Lock();
|
MessageQueue()->Lock();
|
||||||
while ((msg2 = MessageQueue()->FindMessage(MSG_REDRAW, 0)) != NULL)
|
while ((msg2 = MessageQueue()->FindMessage(MSG_REDRAW, 0)) != NULL) {
|
||||||
MessageQueue()->RemoveMessage(msg2);
|
MessageQueue()->RemoveMessage(msg2);
|
||||||
|
delete msg2;
|
||||||
|
}
|
||||||
MessageQueue()->Unlock();
|
MessageQueue()->Unlock();
|
||||||
main_view->ChangeBitmap(TheBitmap[msg->FindInt32("bitmap")]);
|
main_view->ChangeBitmap(TheBitmap[msg->FindInt32("bitmap")]);
|
||||||
Lock();
|
Lock();
|
||||||
@ -587,6 +718,29 @@ void C64Window::MessageReceived(BMessage *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Window connected/disconnected
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64Window::DirectConnected(direct_buffer_info *info)
|
||||||
|
{
|
||||||
|
#if BIT_BANG
|
||||||
|
switch (info->buffer_state & B_DIRECT_MODE_MASK) {
|
||||||
|
case B_DIRECT_STOP:
|
||||||
|
// acquire_sem(drawing_sem);
|
||||||
|
break;
|
||||||
|
case B_DIRECT_MODIFY:
|
||||||
|
// acquire_sem(drawing_sem);
|
||||||
|
case B_DIRECT_START:
|
||||||
|
bits = ((uint8 *)info->bits + info->window_bounds.top * info->bytes_per_row + info->window_bounds.left * info->bits_per_pixel / 8);
|
||||||
|
bytes_per_row = info->bytes_per_row;
|
||||||
|
// release_sem(drawing_sem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Workspace activated/deactivated
|
* Workspace activated/deactivated
|
||||||
*/
|
*/
|
||||||
@ -594,6 +748,54 @@ void C64Window::MessageReceived(BMessage *msg)
|
|||||||
void C64Screen::ScreenConnected(bool active)
|
void C64Screen::ScreenConnected(bool active)
|
||||||
{
|
{
|
||||||
if (active) {
|
if (active) {
|
||||||
|
if (first_connected) {
|
||||||
|
first_connected = false;
|
||||||
|
|
||||||
|
#if MGA_HACK
|
||||||
|
mga_clone_area = -1;
|
||||||
|
|
||||||
|
// Construct register area name
|
||||||
|
char mga_area_name[64];
|
||||||
|
int bus = 0, device = 13, function = 0;
|
||||||
|
sprintf(mga_area_name, "102B_0519_%02X%02X%02X regs", bus, device, function);
|
||||||
|
|
||||||
|
// Find MGA register area
|
||||||
|
area_id mga_area = find_area(mga_area_name);
|
||||||
|
if (mga_area > 0) {
|
||||||
|
|
||||||
|
// Clone area, remove write protection
|
||||||
|
volatile uint8 *mga_io;
|
||||||
|
mga_clone_area = clone_area("mga registers", (void **)&mga_io, B_ANY_ADDRESS, B_READ_AREA | B_WRITE_AREA, mga_area);
|
||||||
|
if (mga_clone_area > 0) {
|
||||||
|
isa_io = mga_io + 0x1c00;
|
||||||
|
mga_ready = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if MGA_HACK
|
||||||
|
if (mga_ready) {
|
||||||
|
CRTC_out(0x09, 1); // Enable double scan
|
||||||
|
int a = 4 * 640;
|
||||||
|
CRTC_out(0x0c, a >> 8); // Center screen vertically
|
||||||
|
CRTC_out(0x0d, a);
|
||||||
|
// defaults:
|
||||||
|
// total 0x67
|
||||||
|
// display end 0x4f
|
||||||
|
// blank start 0x4f
|
||||||
|
// blank end 2b
|
||||||
|
// sync start 0x53
|
||||||
|
// sync end 1f
|
||||||
|
CRTC_out(0x00, 0x3f); // Horizontal timing
|
||||||
|
CRTC_out(0x01, 0x2f);
|
||||||
|
CRTC_out(0x02, 0x2f);
|
||||||
|
CRTC_out(0x03, 0x83);
|
||||||
|
CRTC_out(0x04, 0x32);
|
||||||
|
CRTC_out(0x05, 0x1a);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
FillRect(0, 0, 639, 479, 0); // Clear screen
|
FillRect(0, 0, 639, 479, 0); // Clear screen
|
||||||
the_display->TheC64->Resume();
|
the_display->TheC64->Resume();
|
||||||
Connected = true;
|
Connected = true;
|
||||||
@ -644,12 +846,18 @@ void C64Screen::DispatchMessage(BMessage *msg, BHandler *handler)
|
|||||||
|
|
||||||
void C64Screen::DrawLED(int i, int state)
|
void C64Screen::DrawLED(int i, int state)
|
||||||
{
|
{
|
||||||
|
int maxy;
|
||||||
|
if (ThePrefs.DoubleScan)
|
||||||
|
maxy = 480;
|
||||||
|
else
|
||||||
|
maxy = DISPLAY_Y;
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case LED_ON:
|
case LED_ON:
|
||||||
FillRect(10+i*20, DISPLAY_Y-20, 20+i*20, DISPLAY_Y-12, 54);
|
FillRect(10+i*20, maxy-20, 20+i*20, maxy-12, 54);
|
||||||
break;
|
break;
|
||||||
case LED_ERROR_ON:
|
case LED_ERROR_ON:
|
||||||
FillRect(10+i*20, DISPLAY_Y-20, 20+i*20, DISPLAY_Y-12, 44);
|
FillRect(10+i*20, maxy-20, 20+i*20, maxy-12, 44);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -676,14 +884,23 @@ static const int8 Digits[11][8] = { // Digit images
|
|||||||
void C64Screen::DrawSpeedometer()
|
void C64Screen::DrawSpeedometer()
|
||||||
{
|
{
|
||||||
// Don't display speedometer if we're running at about 100%
|
// Don't display speedometer if we're running at about 100%
|
||||||
if (Speed >= 99 && Speed <= 101)
|
if (Speed >= 50 && Speed <= 101)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int maxx, maxy;
|
||||||
|
if (ThePrefs.DoubleScan) {
|
||||||
|
maxx = 640;
|
||||||
|
maxy = 480;
|
||||||
|
} else {
|
||||||
|
maxx = DISPLAY_X;
|
||||||
|
maxy = DISPLAY_Y;
|
||||||
|
}
|
||||||
|
|
||||||
char *s = SpeedoStr;
|
char *s = SpeedoStr;
|
||||||
char c;
|
char c;
|
||||||
long xmod = CardInfo()->bytes_per_row;
|
long xmod = CardInfo()->bytes_per_row;
|
||||||
uint8 *p = (uint8 *)CardInfo()->frame_buffer + DISPLAY_X - 8*8 + (DISPLAY_Y-20) * xmod;
|
uint8 *p = (uint8 *)CardInfo()->frame_buffer + maxx - 8*8 + (maxy-20) * xmod;
|
||||||
while (c = *s++) {
|
while ((c = *s++) != 0) {
|
||||||
if (c == ' ')
|
if (c == ' ')
|
||||||
continue;
|
continue;
|
||||||
if (c == '%')
|
if (c == '%')
|
||||||
@ -716,7 +933,11 @@ void C64Screen::FillRect(int x1, int y1, int x2, int y2, int color)
|
|||||||
uint8 *p = (uint8 *)CardInfo()->frame_buffer + y1 * xmod + x1;
|
uint8 *p = (uint8 *)CardInfo()->frame_buffer + y1 * xmod + x1;
|
||||||
int n = x2 - x1 + 1;
|
int n = x2 - x1 + 1;
|
||||||
for(int y=y1; y<=y2; y++) {
|
for(int y=y1; y<=y2; y++) {
|
||||||
|
#ifdef __POWERPC__
|
||||||
memset_nc(p, color, n);
|
memset_nc(p, color, n);
|
||||||
|
#else
|
||||||
|
memset(p, color, n);
|
||||||
|
#endif
|
||||||
p += xmod;
|
p += xmod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -804,6 +1025,7 @@ SpeedoView::SpeedoView(BRect frame) : BView(frame, "", B_FOLLOW_NONE, B_WILL_DRA
|
|||||||
speedostr[0] = 0;
|
speedostr[0] = 0;
|
||||||
bounds = Bounds();
|
bounds = Bounds();
|
||||||
SetViewColor(fill_gray);
|
SetViewColor(fill_gray);
|
||||||
|
SetLowColor(fill_gray);
|
||||||
SetFont(be_plain_font);
|
SetFont(be_plain_font);
|
||||||
}
|
}
|
||||||
|
|
1003
Src/Display_EmbeddedSDL.h
Normal file
1003
Src/Display_EmbeddedSDL.h
Normal file
File diff suppressed because it is too large
Load Diff
1037
Src/Display_EmbeddedSDL.org
Normal file
1037
Src/Display_EmbeddedSDL.org
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_SDL.i - C64 graphics display, emulator window handling,
|
* Display_SDL.h - C64 graphics display, emulator window handling,
|
||||||
* SDL specific stuff
|
* SDL specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "C64.h"
|
#include "C64.h"
|
||||||
@ -13,18 +27,18 @@
|
|||||||
|
|
||||||
|
|
||||||
// Display surface
|
// Display surface
|
||||||
SDL_Surface *screen = NULL;
|
static SDL_Surface *screen = NULL;
|
||||||
SDL_Surface *real_screen = NULL;
|
|
||||||
|
|
||||||
// Keyboard
|
// Keyboard
|
||||||
static bool num_locked = false;
|
static bool num_locked = false;
|
||||||
|
|
||||||
#if defined(DO_ERROR_BLINK)
|
|
||||||
// For LED error blinking
|
// For LED error blinking
|
||||||
static C64Display *c64_disp;
|
static C64Display *c64_disp;
|
||||||
static struct sigaction pulse_sa;
|
//static struct sigaction pulse_sa;
|
||||||
static itimerval pulse_tv;
|
//static itimerval pulse_tv;
|
||||||
#endif
|
|
||||||
|
// SDL joysticks
|
||||||
|
static SDL_Joystick *joy[2] = {NULL, NULL};
|
||||||
|
|
||||||
// Colors for speedometer/drive LEDs
|
// Colors for speedometer/drive LEDs
|
||||||
enum {
|
enum {
|
||||||
@ -61,40 +75,10 @@ enum {
|
|||||||
|
|
||||||
int init_graphics(void)
|
int init_graphics(void)
|
||||||
{
|
{
|
||||||
Uint32 rmask, gmask, bmask, amask;
|
// Init SDL
|
||||||
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
|
||||||
/* SDL interprets each pixel as a 32-bit number, so our masks must depend
|
fprintf(stderr, "Couldn't initialize SDL (%s)\n", SDL_GetError());
|
||||||
on the endianness (byte order) of the machine */
|
return 0;
|
||||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
|
||||||
rmask = 0xff000000;
|
|
||||||
gmask = 0x00ff0000;
|
|
||||||
bmask = 0x0000ff00;
|
|
||||||
amask = 0x000000ff;
|
|
||||||
#else
|
|
||||||
rmask = 0x000000ff;
|
|
||||||
gmask = 0x0000ff00;
|
|
||||||
bmask = 0x00ff0000;
|
|
||||||
amask = 0xff000000;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Open window
|
|
||||||
SDL_WM_SetCaption(VERSION_STRING, "Frodo");
|
|
||||||
SDL_ShowCursor(SDL_DISABLE);
|
|
||||||
|
|
||||||
screen = SDL_CreateRGBSurface(SDL_SWSURFACE, DISPLAY_X, DISPLAY_Y + 17, 8,
|
|
||||||
rmask, gmask, bmask, amask);
|
|
||||||
if (!screen)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Cannot allocate surface to draw on: %s\n",
|
|
||||||
SDL_GetError);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
real_screen = SDL_SetVideoMode(FULL_DISPLAY_X, FULL_DISPLAY_Y, 8,
|
|
||||||
SDL_DOUBLEBUF);
|
|
||||||
if (!real_screen)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "\n\nCannot initialize video: %s\n", SDL_GetError());
|
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -110,15 +94,19 @@ C64Display::C64Display(C64 *the_c64) : TheC64(the_c64)
|
|||||||
quit_requested = false;
|
quit_requested = false;
|
||||||
speedometer_string[0] = 0;
|
speedometer_string[0] = 0;
|
||||||
|
|
||||||
|
// Open window
|
||||||
|
SDL_WM_SetCaption(VERSION_STRING, "Frodo");
|
||||||
|
screen = SDL_SetVideoMode(DISPLAY_X, DISPLAY_Y + 17, 16, SDL_SWSURFACE |SDL_DOUBLEBUF | (ThePrefs.DisplayType == DISPTYPE_SCREEN ? SDL_FULLSCREEN : 0));
|
||||||
|
|
||||||
// LEDs off
|
// LEDs off
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++)
|
||||||
led_state[i] = old_led_state[i] = LED_OFF;
|
led_state[i] = old_led_state[i] = LED_OFF;
|
||||||
|
|
||||||
#if defined(DO_ERROR_BLINK)
|
|
||||||
// Start timer for LED error blinking
|
// Start timer for LED error blinking
|
||||||
c64_disp = this;
|
c64_disp = this;
|
||||||
|
/*
|
||||||
pulse_sa.sa_handler = (void (*)(int))pulse_handler;
|
pulse_sa.sa_handler = (void (*)(int))pulse_handler;
|
||||||
pulse_sa.sa_flags = 0;
|
pulse_sa.sa_flags = SA_RESTART;
|
||||||
sigemptyset(&pulse_sa.sa_mask);
|
sigemptyset(&pulse_sa.sa_mask);
|
||||||
sigaction(SIGALRM, &pulse_sa, NULL);
|
sigaction(SIGALRM, &pulse_sa, NULL);
|
||||||
pulse_tv.it_interval.tv_sec = 0;
|
pulse_tv.it_interval.tv_sec = 0;
|
||||||
@ -126,7 +114,7 @@ C64Display::C64Display(C64 *the_c64) : TheC64(the_c64)
|
|||||||
pulse_tv.it_value.tv_sec = 0;
|
pulse_tv.it_value.tv_sec = 0;
|
||||||
pulse_tv.it_value.tv_usec = 400000;
|
pulse_tv.it_value.tv_usec = 400000;
|
||||||
setitimer(ITIMER_REAL, &pulse_tv, NULL);
|
setitimer(ITIMER_REAL, &pulse_tv, NULL);
|
||||||
#endif
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -155,38 +143,60 @@ void C64Display::NewPrefs(Prefs *prefs)
|
|||||||
|
|
||||||
void C64Display::Update(void)
|
void C64Display::Update(void)
|
||||||
{
|
{
|
||||||
if (ThePrefs.DisplayOption == 0) {
|
// Draw speedometer/LEDs
|
||||||
const int x_border = (DISPLAY_X - FULL_DISPLAY_X / 2) / 2;
|
SDL_Rect r = {0, DISPLAY_Y, DISPLAY_X, 15};
|
||||||
const int y_border = (DISPLAY_Y - FULL_DISPLAY_Y / 2) / 2;
|
SDL_FillRect(screen, &r, fill_gray);
|
||||||
Uint8 *src_pixels = (Uint8*)screen->pixels;
|
r.w = DISPLAY_X; r.h = 1;
|
||||||
Uint8 *dst_pixels = (Uint8*)real_screen->pixels;
|
SDL_FillRect(screen, &r, shine_gray);
|
||||||
const Uint16 src_pitch = screen->pitch;
|
r.y = DISPLAY_Y + 14;
|
||||||
const Uint16 dst_pitch = real_screen->pitch;
|
SDL_FillRect(screen, &r, shadow_gray);
|
||||||
|
r.w = 16;
|
||||||
|
for (int i=2; i<6; i++) {
|
||||||
|
r.x = DISPLAY_X * i/5 - 24; r.y = DISPLAY_Y + 4;
|
||||||
|
SDL_FillRect(screen, &r, shadow_gray);
|
||||||
|
r.y = DISPLAY_Y + 10;
|
||||||
|
SDL_FillRect(screen, &r, shine_gray);
|
||||||
|
}
|
||||||
|
r.y = DISPLAY_Y; r.w = 1; r.h = 15;
|
||||||
|
for (int i=0; i<5; i++) {
|
||||||
|
r.x = DISPLAY_X * i / 5;
|
||||||
|
SDL_FillRect(screen, &r, shine_gray);
|
||||||
|
r.x = DISPLAY_X * (i+1) / 5 - 1;
|
||||||
|
SDL_FillRect(screen, &r, shadow_gray);
|
||||||
|
}
|
||||||
|
r.y = DISPLAY_Y + 4; r.h = 7;
|
||||||
|
for (int i=2; i<6; i++) {
|
||||||
|
r.x = DISPLAY_X * i/5 - 24;
|
||||||
|
SDL_FillRect(screen, &r, shadow_gray);
|
||||||
|
r.x = DISPLAY_X * i/5 - 9;
|
||||||
|
SDL_FillRect(screen, &r, shine_gray);
|
||||||
|
}
|
||||||
|
r.y = DISPLAY_Y + 5; r.w = 14; r.h = 5;
|
||||||
|
for (int i=0; i<4; i++) {
|
||||||
|
r.x = DISPLAY_X * (i+2) / 5 - 23;
|
||||||
|
int c;
|
||||||
|
switch (led_state[i]) {
|
||||||
|
case LED_ON:
|
||||||
|
c = green;
|
||||||
|
break;
|
||||||
|
case LED_ERROR_ON:
|
||||||
|
c = red;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
c = black;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SDL_FillRect(screen, &r, c);
|
||||||
|
}
|
||||||
|
|
||||||
/* Center, double size */
|
draw_string(screen, DISPLAY_X * 1/5 + 8, DISPLAY_Y + 4, "D\x12 8", black, fill_gray);
|
||||||
for (int y = y_border; y < (FULL_DISPLAY_Y/2) + y_border; y++)
|
draw_string(screen, DISPLAY_X * 2/5 + 8, DISPLAY_Y + 4, "D\x12 9", black, fill_gray);
|
||||||
{
|
draw_string(screen, DISPLAY_X * 3/5 + 8, DISPLAY_Y + 4, "D\x12 10", black, fill_gray);
|
||||||
for (int x = x_border; x < (FULL_DISPLAY_X / 2 + x_border); x++)
|
draw_string(screen, DISPLAY_X * 4/5 + 8, DISPLAY_Y + 4, "D\x12 11", black, fill_gray);
|
||||||
{
|
draw_string(screen, 24, DISPLAY_Y + 4, speedometer_string, black, fill_gray);
|
||||||
int src_off = y * src_pitch + x;
|
|
||||||
int dst_off = (y * 2 - y_border * 2) * dst_pitch + (x * 2 - x_border * 2);
|
|
||||||
Uint8 v = src_pixels[src_off];
|
|
||||||
|
|
||||||
dst_pixels[ dst_off ] = v;
|
// Update display
|
||||||
dst_pixels[ dst_off + 1 ] = v;
|
SDL_Flip(screen);
|
||||||
dst_pixels[ dst_off + dst_pitch ] = v;
|
|
||||||
dst_pixels[ dst_off + dst_pitch + 1] = v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SDL_Rect srcrect = {0, 0, DISPLAY_X, DISPLAY_Y};
|
|
||||||
SDL_Rect dstrect = {0, 0, FULL_DISPLAY_X, FULL_DISPLAY_Y};
|
|
||||||
|
|
||||||
/* Stretch */
|
|
||||||
SDL_SoftStretch(screen, &srcrect, real_screen, &dstrect);
|
|
||||||
}
|
|
||||||
SDL_Flip(real_screen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -222,7 +232,6 @@ void C64Display::draw_string(SDL_Surface *s, int x, int y, const char *str, uint
|
|||||||
* LED error blink
|
* LED error blink
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(DO_ERROR_BLINK)
|
|
||||||
void C64Display::pulse_handler(...)
|
void C64Display::pulse_handler(...)
|
||||||
{
|
{
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++)
|
||||||
@ -235,7 +244,6 @@ void C64Display::pulse_handler(...)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -273,67 +281,12 @@ int C64Display::BitmapXMod(void)
|
|||||||
return screen->pitch;
|
return screen->pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void C64Display::FakeKeyPress(int kc, bool shift, uint8 *CIA_key_matrix,
|
|
||||||
uint8 *CIA_rev_matrix)
|
|
||||||
{
|
|
||||||
// Clear matrices
|
|
||||||
for (int i = 0; i < 8; i ++)
|
|
||||||
{
|
|
||||||
CIA_key_matrix[i] = 0xFF;
|
|
||||||
CIA_rev_matrix[i] = 0xFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shift)
|
|
||||||
{
|
|
||||||
CIA_key_matrix[6] &= 0xef;
|
|
||||||
CIA_rev_matrix[4] &= 0xbf;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kc != -1)
|
|
||||||
{
|
|
||||||
int c64_byte, c64_bit, shifted;
|
|
||||||
c64_byte = kc >> 3;
|
|
||||||
c64_bit = kc & 7;
|
|
||||||
shifted = kc & 128;
|
|
||||||
c64_byte &= 7;
|
|
||||||
if (shifted)
|
|
||||||
{
|
|
||||||
CIA_key_matrix[6] &= 0xef;
|
|
||||||
CIA_rev_matrix[4] &= 0xbf;
|
|
||||||
}
|
|
||||||
CIA_key_matrix[c64_byte] &= ~(1 << c64_bit);
|
|
||||||
CIA_rev_matrix[c64_bit] &= ~(1 << c64_byte);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void C64Display::UpdateKeyMatrix(int c64_key, bool key_up, uint8 *key_matrix, uint8 *rev_matrix)
|
|
||||||
{
|
|
||||||
bool shifted = c64_key & 0x80;
|
|
||||||
int c64_byte = (c64_key >> 3) & 7;
|
|
||||||
int c64_bit = c64_key & 7;
|
|
||||||
|
|
||||||
if (key_up) {
|
|
||||||
if (shifted) {
|
|
||||||
key_matrix[6] |= 0x10;
|
|
||||||
rev_matrix[4] |= 0x40;
|
|
||||||
}
|
|
||||||
key_matrix[c64_byte] |= (1 << c64_bit);
|
|
||||||
rev_matrix[c64_bit] |= (1 << c64_byte);
|
|
||||||
} else {
|
|
||||||
if (shifted) {
|
|
||||||
key_matrix[6] &= 0xef;
|
|
||||||
rev_matrix[4] &= 0xbf;
|
|
||||||
}
|
|
||||||
key_matrix[c64_byte] &= ~(1 << c64_bit);
|
|
||||||
rev_matrix[c64_bit] &= ~(1 << c64_byte);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Poll the keyboard
|
* Poll the keyboard
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void C64Display::TranslateKey(SDLKey key, bool key_up, uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick)
|
static void translate_key(SDLKey key, bool key_up, uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick)
|
||||||
{
|
{
|
||||||
int c64_key = -1;
|
int c64_key = -1;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
@ -397,18 +350,17 @@ void C64Display::TranslateKey(SDLKey key, bool key_up, uint8 *key_matrix, uint8
|
|||||||
case SDLK_PAGEUP: c64_key = MATRIX(6,0); break;
|
case SDLK_PAGEUP: c64_key = MATRIX(6,0); break;
|
||||||
case SDLK_PAGEDOWN: c64_key = MATRIX(6,5); break;
|
case SDLK_PAGEDOWN: c64_key = MATRIX(6,5); break;
|
||||||
|
|
||||||
case SDLK_LCTRL: c64_key = 0x10 | 0x40; break;
|
case SDLK_LCTRL: case SDLK_TAB: c64_key = MATRIX(7,2); break;
|
||||||
case SDLK_TAB: c64_key = MATRIX(7,2); break;
|
|
||||||
case SDLK_RCTRL: c64_key = MATRIX(7,5); break;
|
case SDLK_RCTRL: c64_key = MATRIX(7,5); break;
|
||||||
case SDLK_LSHIFT: c64_key = MATRIX(1,7); break;
|
case SDLK_LSHIFT: c64_key = MATRIX(1,7); break;
|
||||||
case SDLK_RSHIFT: c64_key = MATRIX(6,4); break;
|
case SDLK_RSHIFT: c64_key = MATRIX(6,4); break;
|
||||||
case SDLK_LALT: case SDLK_LMETA: c64_key = MATRIX(7,5); break;
|
case SDLK_LALT: case SDLK_LMETA: c64_key = MATRIX(7,5); break;
|
||||||
case SDLK_RALT: case SDLK_RMETA: c64_key = MATRIX(7,5); break;
|
case SDLK_RALT: case SDLK_RMETA: c64_key = MATRIX(7,5); break;
|
||||||
|
|
||||||
case SDLK_UP: c64_key = 0x01 | 0x40; break;
|
case SDLK_UP: c64_key = MATRIX(0,7)| 0x80; break;
|
||||||
case SDLK_DOWN: c64_key = 0x02 | 0x40; break;
|
case SDLK_DOWN: c64_key = MATRIX(0,7); break;
|
||||||
case SDLK_LEFT: c64_key = 0x04 | 0x40; break;
|
case SDLK_LEFT: c64_key = MATRIX(0,2) | 0x80; break;
|
||||||
case SDLK_RIGHT: c64_key = 0x08 | 0x40; break;
|
case SDLK_RIGHT: c64_key = MATRIX(0,2); break;
|
||||||
|
|
||||||
case SDLK_F1: c64_key = MATRIX(0,4); break;
|
case SDLK_F1: c64_key = MATRIX(0,4); break;
|
||||||
case SDLK_F2: c64_key = MATRIX(0,4) | 0x80; break;
|
case SDLK_F2: c64_key = MATRIX(0,4) | 0x80; break;
|
||||||
@ -431,7 +383,6 @@ void C64Display::TranslateKey(SDLKey key, bool key_up, uint8 *key_matrix, uint8
|
|||||||
|
|
||||||
case SDLK_KP_DIVIDE: c64_key = MATRIX(6,7); break;
|
case SDLK_KP_DIVIDE: c64_key = MATRIX(6,7); break;
|
||||||
case SDLK_KP_ENTER: c64_key = MATRIX(0,1); break;
|
case SDLK_KP_ENTER: c64_key = MATRIX(0,1); break;
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,7 +399,25 @@ void C64Display::TranslateKey(SDLKey key, bool key_up, uint8 *key_matrix, uint8
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->UpdateKeyMatrix(c64_key, key_up, key_matrix, rev_matrix);
|
// Handle other keys
|
||||||
|
bool shifted = c64_key & 0x80;
|
||||||
|
int c64_byte = (c64_key >> 3) & 7;
|
||||||
|
int c64_bit = c64_key & 7;
|
||||||
|
if (key_up) {
|
||||||
|
if (shifted) {
|
||||||
|
key_matrix[6] |= 0x10;
|
||||||
|
rev_matrix[4] |= 0x40;
|
||||||
|
}
|
||||||
|
key_matrix[c64_byte] |= (1 << c64_bit);
|
||||||
|
rev_matrix[c64_bit] |= (1 << c64_byte);
|
||||||
|
} else {
|
||||||
|
if (shifted) {
|
||||||
|
key_matrix[6] &= 0xef;
|
||||||
|
rev_matrix[4] &= 0xbf;
|
||||||
|
}
|
||||||
|
key_matrix[c64_byte] &= ~(1 << c64_bit);
|
||||||
|
rev_matrix[c64_bit] &= ~(1 << c64_byte);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void C64Display::PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick)
|
void C64Display::PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick)
|
||||||
@ -477,11 +446,7 @@ void C64Display::PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joyst
|
|||||||
TheC64->Reset();
|
TheC64->Reset();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDLK_HOME: // Home: Pause and enter menu
|
case SDLK_NUMLOCK:
|
||||||
TheC64->enter_menu();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDLK_SCROLLOCK:
|
|
||||||
num_locked = true;
|
num_locked = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -499,17 +464,17 @@ void C64Display::PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joyst
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
TranslateKey(event.key.keysym.sym, false, key_matrix, rev_matrix, joystick);
|
translate_key(event.key.keysym.sym, false, key_matrix, rev_matrix, joystick);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Key released
|
// Key released
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
if (event.key.keysym.sym == SDLK_SCROLLOCK)
|
if (event.key.keysym.sym == SDLK_NUMLOCK)
|
||||||
num_locked = false;
|
num_locked = false;
|
||||||
else
|
else
|
||||||
TranslateKey(event.key.keysym.sym, true, key_matrix, rev_matrix, joystick);
|
translate_key(event.key.keysym.sym, true, key_matrix, rev_matrix, joystick);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Quit Frodo
|
// Quit Frodo
|
||||||
@ -531,6 +496,80 @@ bool C64Display::NumLock(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open/close joystick drivers given old and new state of
|
||||||
|
* joystick preferences
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::open_close_joystick(int port, int oldjoy, int newjoy)
|
||||||
|
{
|
||||||
|
if (oldjoy != newjoy) {
|
||||||
|
joy_minx[port] = joy_miny[port] = 32767; // Reset calibration
|
||||||
|
joy_maxx[port] = joy_maxy[port] = -32768;
|
||||||
|
if (newjoy) {
|
||||||
|
joy[port] = SDL_JoystickOpen(newjoy - 1);
|
||||||
|
if (joy[port] == NULL)
|
||||||
|
fprintf(stderr, "Couldn't open joystick %d\n", port + 1);
|
||||||
|
} else {
|
||||||
|
if (joy[port]) {
|
||||||
|
SDL_JoystickClose(joy[port]);
|
||||||
|
joy[port] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void C64::open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2)
|
||||||
|
{
|
||||||
|
open_close_joystick(0, oldjoy1, newjoy1);
|
||||||
|
open_close_joystick(1, oldjoy2, newjoy2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Poll joystick port, return CIA mask
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint8 C64::poll_joystick(int port)
|
||||||
|
{
|
||||||
|
uint8 j = 0xff;
|
||||||
|
|
||||||
|
if (port == 0 && (joy[0] || joy[1]))
|
||||||
|
SDL_JoystickUpdate();
|
||||||
|
|
||||||
|
if (joy[port]) {
|
||||||
|
int x = SDL_JoystickGetAxis(joy[port], 0), y = SDL_JoystickGetAxis(joy[port], 1);
|
||||||
|
|
||||||
|
if (x > joy_maxx[port])
|
||||||
|
joy_maxx[port] = x;
|
||||||
|
if (x < joy_minx[port])
|
||||||
|
joy_minx[port] = x;
|
||||||
|
if (y > joy_maxy[port])
|
||||||
|
joy_maxy[port] = y;
|
||||||
|
if (y < joy_miny[port])
|
||||||
|
joy_miny[port] = y;
|
||||||
|
|
||||||
|
if (joy_maxx[port] - joy_minx[port] < 100 || joy_maxy[port] - joy_miny[port] < 100)
|
||||||
|
return 0xff;
|
||||||
|
|
||||||
|
if (x < (joy_minx[port] + (joy_maxx[port]-joy_minx[port])/3))
|
||||||
|
j &= 0xfb; // Left
|
||||||
|
else if (x > (joy_minx[port] + 2*(joy_maxx[port]-joy_minx[port])/3))
|
||||||
|
j &= 0xf7; // Right
|
||||||
|
|
||||||
|
if (y < (joy_miny[port] + (joy_maxy[port]-joy_miny[port])/3))
|
||||||
|
j &= 0xfe; // Up
|
||||||
|
else if (y > (joy_miny[port] + 2*(joy_maxy[port]-joy_miny[port])/3))
|
||||||
|
j &= 0xfd; // Down
|
||||||
|
|
||||||
|
if (SDL_JoystickGetButton(joy[port], 0))
|
||||||
|
j &= 0xef; // Button
|
||||||
|
}
|
||||||
|
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate C64 colors
|
* Allocate C64 colors
|
||||||
*/
|
*/
|
||||||
@ -551,8 +590,6 @@ void C64Display::InitColors(uint8 *colors)
|
|||||||
palette[green].g = 0xf0;
|
palette[green].g = 0xf0;
|
||||||
palette[green].r = palette[green].b = 0;
|
palette[green].r = palette[green].b = 0;
|
||||||
SDL_SetColors(screen, palette, 0, PALETTE_SIZE);
|
SDL_SetColors(screen, palette, 0, PALETTE_SIZE);
|
||||||
SDL_SetColors(real_screen, palette, 0, PALETTE_SIZE);
|
|
||||||
|
|
||||||
|
|
||||||
for (int i=0; i<256; i++)
|
for (int i=0; i<256; i++)
|
||||||
colors[i] = i & 0x0f;
|
colors[i] = i & 0x0f;
|
@ -1,9 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_WIN32.i - C64 graphics display, emulator window handling,
|
* Display_WIN32.h - C64 graphics display, emulator window handling,
|
||||||
* WIN32 specific stuff
|
* WIN32 specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* WIN32 code by J. Richard Sladkey <jrs@world.std.com>
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
@ -1,9 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_svga.i - C64 graphics display, emulator window handling,
|
* Display_svga.h - C64 graphics display, emulator window handling,
|
||||||
* SVGAlib specific stuff
|
* SVGAlib specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* SVGAlib stuff by Bernd Schmidt
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vga.h>
|
#include <vga.h>
|
||||||
@ -137,7 +150,7 @@ static int keystate[256];
|
|||||||
static int f11pressed = 0, f12pressed = 0, quit = 0;
|
static int f11pressed = 0, f12pressed = 0, quit = 0;
|
||||||
static int joystate = 0xFF;
|
static int joystate = 0xFF;
|
||||||
static int numlock = 0;
|
static int numlock = 0;
|
||||||
static UBYTE rev_matrix[8], key_matrix[8];
|
static uint8 rev_matrix[8], key_matrix[8];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
C64 keyboard matrix:
|
C64 keyboard matrix:
|
||||||
@ -482,14 +495,14 @@ void C64Display::Update(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (y = 0; y < DISPLAY_Y; y++) {
|
for (y = 0; y < DISPLAY_Y; y++) {
|
||||||
vga_drawscanline(y, bufmem + hsize * y);
|
vga_drawscanline(y, (uint8 *)bufmem + hsize * y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UBYTE *C64Display::BitmapBase(void)
|
uint8 *C64Display::BitmapBase(void)
|
||||||
{
|
{
|
||||||
return (UBYTE *)bufmem;
|
return (uint8 *)bufmem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -499,7 +512,7 @@ int C64Display::BitmapXMod(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C64Display::PollKeyboard(UBYTE *CIA_key_matrix, UBYTE *CIA_rev_matrix, UBYTE *joystick)
|
void C64Display::PollKeyboard(uint8 *CIA_key_matrix, uint8 *CIA_rev_matrix, uint8 *joystick)
|
||||||
{
|
{
|
||||||
keyboard_update();
|
keyboard_update();
|
||||||
*joystick = joystate;
|
*joystick = joystate;
|
||||||
@ -534,7 +547,7 @@ static int colorval(int v)
|
|||||||
return ((v & 255)*0x01010101) >> 26;
|
return ((v & 255)*0x01010101) >> 26;
|
||||||
}
|
}
|
||||||
|
|
||||||
void C64Display::InitColors(UBYTE *colors)
|
void C64Display::InitColors(uint8 *colors)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -1,9 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Display_x.i - C64 graphics display, emulator window handling,
|
* Display_x.h - C64 graphics display, emulator window handling,
|
||||||
* X specific stuff
|
* X specific stuff
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
* X11 stuff by Bernd Schmidt/Lutz Vieweg
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SAM.h"
|
#include "SAM.h"
|
||||||
@ -329,7 +342,7 @@ C64Display::C64Display(C64 *the_c64) : TheC64(the_c64)
|
|||||||
// Start timer for LED error blinking
|
// Start timer for LED error blinking
|
||||||
c64_disp = this;
|
c64_disp = this;
|
||||||
pulse_sa.sa_handler = (void (*)(int))pulse_handler;
|
pulse_sa.sa_handler = (void (*)(int))pulse_handler;
|
||||||
pulse_sa.sa_flags = 0;
|
pulse_sa.sa_flags = SA_RESTART;
|
||||||
sigemptyset(&pulse_sa.sa_mask);
|
sigemptyset(&pulse_sa.sa_mask);
|
||||||
sigaction(SIGALRM, &pulse_sa, NULL);
|
sigaction(SIGALRM, &pulse_sa, NULL);
|
||||||
pulse_tv.it_interval.tv_sec = 0;
|
pulse_tv.it_interval.tv_sec = 0;
|
||||||
@ -761,6 +774,26 @@ bool C64Display::NumLock(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open/close joystick drivers given old and new state of
|
||||||
|
* joystick preferences
|
||||||
|
*/
|
||||||
|
|
||||||
|
void C64::open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Poll joystick port, return CIA mask
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint8 C64::poll_joystick(int port)
|
||||||
|
{
|
||||||
|
return 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate C64 colors
|
* Allocate C64 colors
|
||||||
*/
|
*/
|
@ -1,12 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
* FixPoint.i
|
* FixPoint.h - Provides fixed point arithmetic (for use in SID.cpp)
|
||||||
*
|
*
|
||||||
* Provides fixpoint arithmetic (for use in SID.cpp)
|
* (C) 1997 Andreas Dehmel
|
||||||
|
*
|
||||||
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
* You need to define FIXPOINT_PREC (number of fractional bits) and
|
* You need to define FIXPOINT_PREC (number of fractional bits) and
|
||||||
* ldSINTAB (ld of the size of the sinus table) as well M_PI
|
* ldSINTAB (ld of the size of the sinus table) as well M_PI
|
||||||
* _before_ including this file.
|
* _before_ including this file.
|
||||||
* Requires at least 32bit ints!
|
* Requires at least 32bit ints!
|
||||||
* (C) 1997 Andreas Dehmel
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
BIN
Src/Frodo.RES
Normal file
BIN
Src/Frodo.RES
Normal file
Binary file not shown.
@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
* FrodoHeaders.pch++ (for Metrowerks BeIDE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define PC_IS_POINTER 1
|
|
||||||
#define PRECISE_CPU_CYCLES 0
|
|
||||||
#define PRECISE_CIA_CYCLES 0
|
|
||||||
|
|
||||||
#include <Be.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
* FrodoPCHeaders.pch++ (for Metrowerks BeIDE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define PC_IS_POINTER 0
|
|
||||||
#define PRECISE_CPU_CYCLES 1
|
|
||||||
#define PRECISE_CIA_CYCLES 1
|
|
||||||
|
|
||||||
#include <Be.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* FrodoSCHeaders.pch++ (for Metrowerks BeIDE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define FRODO_SC
|
|
||||||
|
|
||||||
#include <Be.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
BIN
Src/FrodoWii.rar
Normal file
BIN
Src/FrodoWii.rar
Normal file
Binary file not shown.
19
TkGui.tcl → Src/Frodo_GUI.tcl
Executable file → Normal file
19
TkGui.tcl → Src/Frodo_GUI.tcl
Executable file → Normal file
@ -2,6 +2,22 @@
|
|||||||
|
|
||||||
# Frodo Tk GUI by Lutz Vieweg <lkv@mania.robin.de>
|
# Frodo Tk GUI by Lutz Vieweg <lkv@mania.robin.de>
|
||||||
# requires Tk >= 4.1
|
# requires Tk >= 4.1
|
||||||
|
#
|
||||||
|
# Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
#package require Tk 4.1
|
#package require Tk 4.1
|
||||||
|
|
||||||
@ -1013,6 +1029,3 @@ trace variable pref(ShowOptions) w set_ShowOptions
|
|||||||
set pref(ShowOptions) $pref(ShowOptions)
|
set pref(ShowOptions) $pref(ShowOptions)
|
||||||
|
|
||||||
tkwait window .
|
tkwait window .
|
||||||
|
|
||||||
|
|
||||||
|
|
603
Src/IEC.cpp
603
Src/IEC.cpp
@ -1,10 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* IEC.cpp - IEC bus routines, 1541 emulation (DOS level)
|
* IEC.cpp - IEC bus routines, 1541 emulation (DOS level)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
*
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
* ------
|
* ------
|
||||||
*
|
*
|
||||||
@ -35,12 +49,52 @@
|
|||||||
#include "1541t64.h"
|
#include "1541t64.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
|
||||||
|
// IEC command codes
|
||||||
|
enum {
|
||||||
|
CMD_DATA = 0x60, // Data transfer
|
||||||
|
CMD_CLOSE = 0xe0, // Close channel
|
||||||
|
CMD_OPEN = 0xf0 // Open channel
|
||||||
|
};
|
||||||
|
|
||||||
|
// IEC ATN codes
|
||||||
|
enum {
|
||||||
|
ATN_LISTEN = 0x20,
|
||||||
|
ATN_UNLISTEN = 0x30,
|
||||||
|
ATN_TALK = 0x40,
|
||||||
|
ATN_UNTALK = 0x50
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor: Initialize variables
|
* Constructor: Initialize variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Drive *IEC::create_drive(const char *path)
|
||||||
|
{
|
||||||
|
if (IsDirectory(path)) {
|
||||||
|
// Mount host directory
|
||||||
|
return new FSDrive(this, path);
|
||||||
|
} else {
|
||||||
|
// Not a directory, check for mountable file type
|
||||||
|
int type;
|
||||||
|
if (IsMountableFile(path, type)) {
|
||||||
|
if (type == FILE_IMAGE) {
|
||||||
|
// Mount disk image
|
||||||
|
return new ImageDrive(this, path);
|
||||||
|
} else {
|
||||||
|
// Mount archive type file
|
||||||
|
return new ArchDrive(this, path);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Unknown file type
|
||||||
|
// print error?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IEC::IEC(C64Display *display) : the_display(display)
|
IEC::IEC(C64Display *display) : the_display(display)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -49,14 +103,9 @@ IEC::IEC(C64Display *display) : the_display(display)
|
|||||||
for (i=0; i<4; i++)
|
for (i=0; i<4; i++)
|
||||||
drive[i] = NULL; // Important because UpdateLEDs is called from the drive constructors (via set_error)
|
drive[i] = NULL; // Important because UpdateLEDs is called from the drive constructors (via set_error)
|
||||||
|
|
||||||
if (!ThePrefs.Emul1541Proc)
|
if (!ThePrefs.Emul1541Proc) {
|
||||||
for (i=0; i<4; i++) {
|
for (i=0; i<4; i++)
|
||||||
if (ThePrefs.DriveType[i] == DRVTYPE_DIR)
|
drive[i] = create_drive(ThePrefs.DrivePath[i]);
|
||||||
drive[i] = new FSDrive(this, ThePrefs.DrivePath[i]);
|
|
||||||
else if (ThePrefs.DriveType[i] == DRVTYPE_D64)
|
|
||||||
drive[i] = new D64Drive(this, ThePrefs.DrivePath[i]);
|
|
||||||
else
|
|
||||||
drive[i] = new T64Drive(this, ThePrefs.DrivePath[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listener_active = talker_active = false;
|
listener_active = talker_active = false;
|
||||||
@ -98,17 +147,12 @@ void IEC::Reset(void)
|
|||||||
void IEC::NewPrefs(Prefs *prefs)
|
void IEC::NewPrefs(Prefs *prefs)
|
||||||
{
|
{
|
||||||
// Delete and recreate all changed drives
|
// Delete and recreate all changed drives
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++) {
|
||||||
if ((ThePrefs.DriveType[i] != prefs->DriveType[i]) || strcmp(ThePrefs.DrivePath[i], prefs->DrivePath[i]) || ThePrefs.Emul1541Proc != prefs->Emul1541Proc) {
|
if (strcmp(ThePrefs.DrivePath[i], prefs->DrivePath[i]) || ThePrefs.Emul1541Proc != prefs->Emul1541Proc) {
|
||||||
delete drive[i];
|
delete drive[i];
|
||||||
drive[i] = NULL; // Important because UpdateLEDs is called from drive constructors (via set_error())
|
drive[i] = NULL; // Important because UpdateLEDs is called from drive constructors (via set_error())
|
||||||
if (!prefs->Emul1541Proc) {
|
if (!prefs->Emul1541Proc)
|
||||||
if (prefs->DriveType[i] == DRVTYPE_DIR)
|
drive[i] = create_drive(prefs->DrivePath[i]);
|
||||||
drive[i] = new FSDrive(this, prefs->DrivePath[i]);
|
|
||||||
else if (prefs->DriveType[i] == DRVTYPE_D64)
|
|
||||||
drive[i] = new D64Drive(this, prefs->DrivePath[i]);
|
|
||||||
else
|
|
||||||
drive[i] = new T64Drive(this, prefs->DrivePath[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,12 +240,12 @@ uint8 IEC::OutSec(uint8 byte)
|
|||||||
* Read one byte
|
* Read one byte
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8 IEC::In(uint8 *byte)
|
uint8 IEC::In(uint8 &byte)
|
||||||
{
|
{
|
||||||
if (talker_active && (received_cmd == CMD_DATA))
|
if (talker_active && (received_cmd == CMD_DATA))
|
||||||
return data_in(byte);
|
return data_in(byte);
|
||||||
|
|
||||||
*byte = 0;
|
byte = 0;
|
||||||
return ST_TIMEOUT;
|
return ST_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,7 +397,7 @@ uint8 IEC::open_out(uint8 byte, bool eoi)
|
|||||||
*name_ptr = 0; // End string
|
*name_ptr = 0; // End string
|
||||||
listener->LED = DRVLED_ON; // Turn on drive LED
|
listener->LED = DRVLED_ON; // Turn on drive LED
|
||||||
UpdateLEDs();
|
UpdateLEDs();
|
||||||
return listener->Open(sec_addr, name_buf);
|
return listener->Open(sec_addr, name_buf, name_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ST_OK;
|
return ST_OK;
|
||||||
@ -374,7 +418,7 @@ uint8 IEC::data_out(uint8 byte, bool eoi)
|
|||||||
* Read byte from channel
|
* Read byte from channel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8 IEC::data_in(uint8 *byte)
|
uint8 IEC::data_in(uint8 &byte)
|
||||||
{
|
{
|
||||||
return talker->Read(sec_addr, byte);
|
return talker->Read(sec_addr, byte);
|
||||||
}
|
}
|
||||||
@ -398,28 +442,49 @@ Drive::Drive(IEC *iec)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 1541 error messages
|
// 1541 error messages
|
||||||
char *Errors_1541[] = {
|
static const char *Errors_1541[] = {
|
||||||
"00, OK,00,00\r",
|
"00, OK,%02d,%02d\x0d",
|
||||||
"25,WRITE ERROR,00,00\r",
|
"01, FILES SCRATCHED,%02d,%02d\x0d",
|
||||||
"26,WRITE PROTECT ON,00,00\r",
|
"03, UNIMPLEMENTED,%02d,%02d\x0d",
|
||||||
"30,SYNTAX ERROR,00,00\r",
|
"20, READ ERROR,%02d,%02d\x0d",
|
||||||
"33,SYNTAX ERROR,00,00\r",
|
"21, READ ERROR,%02d,%02d\x0d",
|
||||||
"60,WRITE FILE OPEN,00,00\r",
|
"22, READ ERROR,%02d,%02d\x0d",
|
||||||
"61,FILE NOT OPEN,00,00\r",
|
"23, READ ERROR,%02d,%02d\x0d",
|
||||||
"62,FILE NOT FOUND,00,00\r",
|
"24, READ ERROR,%02d,%02d\x0d",
|
||||||
"67,ILLEGAL TRACK OR SECTOR,00,00\r",
|
"25, WRITE ERROR,%02d,%02d\x0d",
|
||||||
"70,NO CHANNEL,00,00\r",
|
"26, WRITE PROTECT ON,%02d,%02d\x0d",
|
||||||
"73,CBM DOS V2.6 1541,00,00\r",
|
"27, READ ERROR,%02d,%02d\x0d",
|
||||||
"74,DRIVE NOT READY,00,00\r"
|
"28, WRITE ERROR,%02d,%02d\x0d",
|
||||||
|
"29, DISK ID MISMATCH,%02d,%02d\x0d",
|
||||||
|
"30, SYNTAX ERROR,%02d,%02d\x0d",
|
||||||
|
"31, SYNTAX ERROR,%02d,%02d\x0d",
|
||||||
|
"32, SYNTAX ERROR,%02d,%02d\x0d",
|
||||||
|
"33, SYNTAX ERROR,%02d,%02d\x0d",
|
||||||
|
"34, SYNTAX ERROR,%02d,%02d\x0d",
|
||||||
|
"60, WRITE FILE OPEN,%02d,%02d\x0d",
|
||||||
|
"61, FILE NOT OPEN,%02d,%02d\x0d",
|
||||||
|
"62, FILE NOT FOUND,%02d,%02d\x0d",
|
||||||
|
"63, FILE EXISTS,%02d,%02d\x0d",
|
||||||
|
"64, FILE TYPE MISMATCH,%02d,%02d\x0d",
|
||||||
|
"65, NO BLOCK,%02d,%02d\x0d",
|
||||||
|
"66, ILLEGAL TRACK OR SECTOR,%02d,%02d\x0d",
|
||||||
|
"70, NO CHANNEL,%02d,%02d\x0d",
|
||||||
|
"71, DIR ERROR,%02d,%02d\x0d",
|
||||||
|
"72, DISK FULL,%02d,%02d\x0d",
|
||||||
|
"73, CBM DOS V2.6 1541,%02d,%02d\x0d",
|
||||||
|
"74, DRIVE NOT READY,%02d,%02d\x0d"
|
||||||
};
|
};
|
||||||
|
|
||||||
void Drive::set_error(int error)
|
void Drive::set_error(int error, int track, int sector)
|
||||||
{
|
{
|
||||||
error_ptr = Errors_1541[error];
|
// Write error message to buffer
|
||||||
error_len = strlen(error_ptr);
|
sprintf(error_buf, Errors_1541[error], track, sector);
|
||||||
|
error_ptr = error_buf;
|
||||||
|
error_len = strlen(error_buf);
|
||||||
|
current_error = error;
|
||||||
|
|
||||||
// Set drive condition
|
// Set drive condition
|
||||||
if (error != ERR_OK)
|
if (error != ERR_OK && error != ERR_SCRATCHED)
|
||||||
if (error == ERR_STARTUP)
|
if (error == ERR_STARTUP)
|
||||||
LED = DRVLED_OFF;
|
LED = DRVLED_OFF;
|
||||||
else
|
else
|
||||||
@ -428,3 +493,461 @@ void Drive::set_error(int error)
|
|||||||
LED = DRVLED_OFF;
|
LED = DRVLED_OFF;
|
||||||
the_iec->UpdateLEDs();
|
the_iec->UpdateLEDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Parse file name, determine access mode and file type
|
||||||
|
*/
|
||||||
|
|
||||||
|
void Drive::parse_file_name(const uint8 *src, int src_len, uint8 *dest, int &dest_len, int &mode, int &type, int &rec_len, bool convert_charset)
|
||||||
|
{
|
||||||
|
// If the string contains a ':', the file name starts after that
|
||||||
|
const uint8 *p = (const uint8 *)memchr(src, ':', src_len);
|
||||||
|
if (p) {
|
||||||
|
p++;
|
||||||
|
src_len -= p - src;
|
||||||
|
} else
|
||||||
|
p = src;
|
||||||
|
|
||||||
|
// Transfer file name upto ','
|
||||||
|
dest_len = 0;
|
||||||
|
uint8 *q = dest;
|
||||||
|
while (*p != ',' && src_len-- > 0) {
|
||||||
|
if (convert_charset)
|
||||||
|
*q++ = petscii2ascii(*p++);
|
||||||
|
else
|
||||||
|
*q++ = *p++;
|
||||||
|
dest_len++;
|
||||||
|
}
|
||||||
|
*q++ = 0;
|
||||||
|
|
||||||
|
// Strip trailing CRs
|
||||||
|
while (dest_len > 0 && dest[dest_len - 1] == 0x0d)
|
||||||
|
dest[--dest_len] = 0;
|
||||||
|
|
||||||
|
// Look for mode and type parameters separated by ','
|
||||||
|
p++; src_len--;
|
||||||
|
while (src_len > 0) {
|
||||||
|
switch (*p) {
|
||||||
|
case 'D':
|
||||||
|
type = FTYPE_DEL;
|
||||||
|
break;
|
||||||
|
case 'S':
|
||||||
|
type = FTYPE_SEQ;
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
type = FTYPE_PRG;
|
||||||
|
break;
|
||||||
|
case 'U':
|
||||||
|
type = FTYPE_USR;
|
||||||
|
break;
|
||||||
|
case 'L':
|
||||||
|
type = FTYPE_REL;
|
||||||
|
while (*p != ',' && src_len-- > 0) p++;
|
||||||
|
p++; src_len--;
|
||||||
|
rec_len = *p++; src_len--;
|
||||||
|
if (src_len < 0)
|
||||||
|
rec_len = 0;
|
||||||
|
break;
|
||||||
|
case 'R':
|
||||||
|
mode = FMODE_READ;
|
||||||
|
break;
|
||||||
|
case 'W':
|
||||||
|
mode = FMODE_WRITE;
|
||||||
|
break;
|
||||||
|
case 'A':
|
||||||
|
mode = FMODE_APPEND;
|
||||||
|
break;
|
||||||
|
case 'M':
|
||||||
|
mode = FMODE_M;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip to ','
|
||||||
|
while (*p != ',' && src_len-- > 0) p++;
|
||||||
|
p++; src_len--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Execute DOS command (parse command and call appropriate routine)
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void parse_block_cmd_args(const uint8 *p, int &arg1, int &arg2, int &arg3, int &arg4)
|
||||||
|
{
|
||||||
|
arg1 = arg2 = arg3 = arg4 = 0;
|
||||||
|
|
||||||
|
while (*p == ' ' || *p == 0x1d || *p == ',') p++;
|
||||||
|
while (*p >= '0' && *p < '@')
|
||||||
|
arg1 = arg1 * 10 + (*p++ & 0x0f);
|
||||||
|
|
||||||
|
while (*p == ' ' || *p == 0x1d || *p == ',') p++;
|
||||||
|
while (*p >= '0' && *p < '@')
|
||||||
|
arg2 = arg2 * 10 + (*p++ & 0x0f);
|
||||||
|
|
||||||
|
while (*p == ' ' || *p == 0x1d || *p == ',') p++;
|
||||||
|
while (*p >= '0' && *p < '@')
|
||||||
|
arg3 = arg3 * 10 + (*p++ & 0x0f);
|
||||||
|
|
||||||
|
while (*p == ' ' || *p == 0x1d || *p == ',') p++;
|
||||||
|
while (*p >= '0' && *p < '@')
|
||||||
|
arg4 = arg4 * 10 + (*p++ & 0x0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Drive::execute_cmd(const uint8 *cmd, int cmd_len)
|
||||||
|
{
|
||||||
|
// Strip trailing CRs
|
||||||
|
while (cmd_len > 0 && cmd[cmd_len - 1] == 0x0d)
|
||||||
|
cmd_len--;
|
||||||
|
|
||||||
|
// Find token delimiters
|
||||||
|
const uint8 *colon = (const uint8 *)memchr(cmd, ':', cmd_len);
|
||||||
|
const uint8 *equal = colon ? (const uint8 *)memchr(colon, '=', cmd_len - (colon - cmd)) : NULL;
|
||||||
|
const uint8 *comma = (const uint8 *)memchr(cmd, ',', cmd_len);
|
||||||
|
const uint8 *minus = (const uint8 *)memchr(cmd, '-', cmd_len);
|
||||||
|
|
||||||
|
// Parse command name
|
||||||
|
set_error(ERR_OK);
|
||||||
|
switch (cmd[0]) {
|
||||||
|
case 'B': // Block/buffer
|
||||||
|
if (!minus)
|
||||||
|
set_error(ERR_SYNTAX31);
|
||||||
|
else {
|
||||||
|
// Parse arguments (up to 4 decimal numbers separated by
|
||||||
|
// space, cursor right or comma)
|
||||||
|
const uint8 *p = colon ? colon + 1 : cmd + 3;
|
||||||
|
int arg1, arg2, arg3, arg4;
|
||||||
|
parse_block_cmd_args(p, arg1, arg2, arg3, arg4);
|
||||||
|
|
||||||
|
// Switch on command
|
||||||
|
switch (minus[1]) {
|
||||||
|
case 'R':
|
||||||
|
block_read_cmd(arg1, arg3, arg4);
|
||||||
|
break;
|
||||||
|
case 'W':
|
||||||
|
block_write_cmd(arg1, arg3, arg4);
|
||||||
|
break;
|
||||||
|
case 'E':
|
||||||
|
block_execute_cmd(arg1, arg3, arg4);
|
||||||
|
break;
|
||||||
|
case 'A':
|
||||||
|
block_allocate_cmd(arg2, arg3);
|
||||||
|
break;
|
||||||
|
case 'F':
|
||||||
|
block_free_cmd(arg2, arg3);
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
buffer_pointer_cmd(arg1, arg2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
set_error(ERR_SYNTAX31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'M': // Memory
|
||||||
|
if (cmd[1] != '-')
|
||||||
|
set_error(ERR_SYNTAX31);
|
||||||
|
else {
|
||||||
|
// Read parameters
|
||||||
|
uint16 adr = uint8(cmd[3]) | (uint8(cmd[4]) << 8);
|
||||||
|
uint8 len = uint8(cmd[5]);
|
||||||
|
|
||||||
|
// Switch on command
|
||||||
|
switch (cmd[2]) {
|
||||||
|
case 'R':
|
||||||
|
mem_read_cmd(adr, (cmd_len < 6) ? 1 : len);
|
||||||
|
break;
|
||||||
|
case 'W':
|
||||||
|
mem_write_cmd(adr, len, (uint8 *)cmd + 6);
|
||||||
|
break;
|
||||||
|
case 'E':
|
||||||
|
mem_execute_cmd(adr);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
set_error(ERR_SYNTAX31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'C': // Copy
|
||||||
|
if (!colon)
|
||||||
|
set_error(ERR_SYNTAX31);
|
||||||
|
else if (!equal || memchr(cmd, '*', cmd_len) || memchr(cmd, '?', cmd_len) || (comma && comma < equal))
|
||||||
|
set_error(ERR_SYNTAX30);
|
||||||
|
else
|
||||||
|
copy_cmd(colon + 1, equal - colon - 1, equal + 1, cmd_len - (equal + 1 - cmd));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'R': // Rename
|
||||||
|
if (!colon)
|
||||||
|
set_error(ERR_SYNTAX34);
|
||||||
|
else if (!equal || comma || memchr(cmd, '*', cmd_len) || memchr(cmd, '?', cmd_len))
|
||||||
|
set_error(ERR_SYNTAX30);
|
||||||
|
else
|
||||||
|
rename_cmd(colon + 1, equal - colon - 1, equal + 1, cmd_len - (equal + 1 - cmd));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'S': // Scratch
|
||||||
|
if (!colon)
|
||||||
|
set_error(ERR_SYNTAX34);
|
||||||
|
else
|
||||||
|
scratch_cmd(colon + 1, cmd_len - (colon + 1 - cmd));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'P': // Position
|
||||||
|
position_cmd(cmd + 1, cmd_len - 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'I': // Initialize
|
||||||
|
initialize_cmd();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'N': // New (format)
|
||||||
|
if (!colon)
|
||||||
|
set_error(ERR_SYNTAX34);
|
||||||
|
else
|
||||||
|
new_cmd(colon + 1, comma ? (comma - colon - 1) : cmd_len - (colon + 1 - cmd), comma);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'V': // Validate
|
||||||
|
validate_cmd();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'U': // User
|
||||||
|
if (cmd[1] == '0')
|
||||||
|
break;
|
||||||
|
switch (cmd[1] & 0x0f) {
|
||||||
|
case 1: { // U1/UA: Read block
|
||||||
|
const uint8 *p = colon ? colon + 1 : cmd + 2;
|
||||||
|
int arg1, arg2, arg3, arg4;
|
||||||
|
parse_block_cmd_args(p, arg1, arg2, arg3, arg4);
|
||||||
|
block_read_cmd(arg1, arg3, arg4, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: { // U2/UB: Write block
|
||||||
|
const uint8 *p = colon ? colon + 1 : cmd + 2;
|
||||||
|
int arg1, arg2, arg3, arg4;
|
||||||
|
parse_block_cmd_args(p, arg1, arg2, arg3, arg4);
|
||||||
|
block_write_cmd(arg1, arg3, arg4, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9: // U9/UI: C64/VC20 mode switch
|
||||||
|
if (cmd[2] != '+' && cmd[2] != '-')
|
||||||
|
Reset();
|
||||||
|
break;
|
||||||
|
case 10: // U:/UJ: Reset
|
||||||
|
Reset();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
set_error(ERR_SYNTAX31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// BLOCK-READ:channel,0,track,sector
|
||||||
|
void Drive::block_read_cmd(int channel, int track, int sector, bool user_cmd)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// BLOCK-WRITE:channel,0,track,sector
|
||||||
|
void Drive::block_write_cmd(int channel, int track, int sector, bool user_cmd)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// BLOCK-EXECUTE:channel,0,track,sector
|
||||||
|
void Drive::block_execute_cmd(int channel, int track, int sector)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// BLOCK-ALLOCATE:0,track,sector
|
||||||
|
void Drive::block_allocate_cmd(int track, int sector)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// BLOCK-FREE:0,track,sector
|
||||||
|
void Drive::block_free_cmd(int track, int sector)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// BUFFER-POINTER:channel,pos
|
||||||
|
void Drive::buffer_pointer_cmd(int channel, int pos)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// M-R<adr low><adr high>[<number>]
|
||||||
|
void Drive::mem_read_cmd(uint16 adr, uint8 len)
|
||||||
|
{
|
||||||
|
unsupp_cmd();
|
||||||
|
error_ptr = error_buf;
|
||||||
|
error_buf[0] = 0;
|
||||||
|
error_len = 0;
|
||||||
|
set_error(ERR_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
// M-W<adr low><adr high><number><data...>
|
||||||
|
void Drive::mem_write_cmd(uint16 adr, uint8 len, uint8 *p)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// M-E<adr low><adr high>
|
||||||
|
void Drive::mem_execute_cmd(uint16 adr)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// COPY:new=file1,file2,...
|
||||||
|
// ^ ^
|
||||||
|
// new_file old_files
|
||||||
|
void Drive::copy_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_files, int old_files_len)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// RENAME:new=old
|
||||||
|
// ^ ^
|
||||||
|
// new_file old_file
|
||||||
|
void Drive::rename_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_file, int old_file_len)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SCRATCH:file1,file2,...
|
||||||
|
// ^
|
||||||
|
// files
|
||||||
|
void Drive::scratch_cmd(const uint8 *files, int files_len)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// P<channel><record low><record high><byte>
|
||||||
|
// ^
|
||||||
|
// cmd
|
||||||
|
void Drive::position_cmd(const uint8 *cmd, int cmd_len)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// INITIALIZE
|
||||||
|
void Drive::initialize_cmd(void)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// NEW:name,id
|
||||||
|
// ^ ^
|
||||||
|
// name comma (or NULL)
|
||||||
|
void Drive::new_cmd(const uint8 *name, int name_len, const uint8 *comma)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// VALIDATE
|
||||||
|
void Drive::validate_cmd(void)
|
||||||
|
{
|
||||||
|
set_error(ERR_UNIMPLEMENTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Notice user of unsupported drive command
|
||||||
|
*/
|
||||||
|
|
||||||
|
void Drive::unsupp_cmd(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert PETSCII<->ASCII
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint8 ascii2petscii(char c)
|
||||||
|
{
|
||||||
|
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
|
||||||
|
return c ^ 0x20;
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ascii2petscii(uint8 *dest, const char *src, int n)
|
||||||
|
{
|
||||||
|
while (n-- && (*dest++ = ascii2petscii(*src++))) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
char petscii2ascii(uint8 c)
|
||||||
|
{
|
||||||
|
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
|
||||||
|
return c ^ 0x20;
|
||||||
|
if ((c >= 0xc1) && (c <= 0xda))
|
||||||
|
return c ^ 0x80;
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
void petscii2ascii(char *dest, const uint8 *src, int n)
|
||||||
|
{
|
||||||
|
while (n-- && (*dest++ = petscii2ascii(*src++))) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check whether file is a mountable disk image or archive file, return type
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool IsMountableFile(const char *path, int &type)
|
||||||
|
{
|
||||||
|
// Read header and determine file size
|
||||||
|
uint8 header[64];
|
||||||
|
memset(header, 0, sizeof(header));
|
||||||
|
FILE *f = fopen(path, "rb");
|
||||||
|
if (f == NULL)
|
||||||
|
return false;
|
||||||
|
fseek(f, 0, SEEK_END);
|
||||||
|
long size = ftell(f);
|
||||||
|
fseek(f, 0, SEEK_SET);
|
||||||
|
fread(header, 1, sizeof(header), f);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
if (IsImageFile(path, header, size)) {
|
||||||
|
type = FILE_IMAGE;
|
||||||
|
return true;
|
||||||
|
} else if (IsArchFile(path, header, size)) {
|
||||||
|
type = FILE_ARCH;
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read directory of mountable disk image or archive file into c64_dir_entry vector,
|
||||||
|
* returns false on error
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool ReadDirectory(const char *path, int type, vector<c64_dir_entry> &vec)
|
||||||
|
{
|
||||||
|
vec.clear();
|
||||||
|
switch (type) {
|
||||||
|
case FILE_IMAGE:
|
||||||
|
return ReadImageDirectory(path, vec);
|
||||||
|
case FILE_ARCH:
|
||||||
|
return ReadArchDirectory(path, vec);
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
166
Src/IEC.h
166
Src/IEC.h
@ -1,17 +1,34 @@
|
|||||||
/*
|
/*
|
||||||
* IEC.h - IEC bus routines, 1541 emulation (DOS level)
|
* IEC.h - IEC bus routines, 1541 emulation (DOS level)
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _IEC_H
|
#ifndef _IEC_H
|
||||||
#define _IEC_H
|
#define _IEC_H
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Definitions
|
||||||
|
*/
|
||||||
|
|
||||||
// Maximum length of file names
|
// Maximum length of file names
|
||||||
const int NAMEBUF_LENGTH = 256;
|
const int NAMEBUF_LENGTH = 256;
|
||||||
|
|
||||||
|
|
||||||
// C64 status codes
|
// C64 status codes
|
||||||
enum {
|
enum {
|
||||||
ST_OK = 0, // No error
|
ST_OK = 0, // No error
|
||||||
@ -21,40 +38,69 @@ enum {
|
|||||||
ST_NOTPRESENT = 0x80 // Device not present
|
ST_NOTPRESENT = 0x80 // Device not present
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 1541 error codes
|
// 1541 error codes
|
||||||
enum {
|
enum {
|
||||||
|
#ifndef R14
|
||||||
|
aERR_OK, // 00 OK
|
||||||
|
#else
|
||||||
ERR_OK, // 00 OK
|
ERR_OK, // 00 OK
|
||||||
ERR_WRITEERROR, // 25 WRITE ERROR
|
#endif
|
||||||
|
ERR_SCRATCHED, // 01 FILES SCRATCHED
|
||||||
|
ERR_UNIMPLEMENTED, // 03 UNIMPLEMENTED
|
||||||
|
ERR_READ20, // 20 READ ERROR (block header not found)
|
||||||
|
ERR_READ21, // 21 READ ERROR (no sync character)
|
||||||
|
ERR_READ22, // 22 READ ERROR (data block not present)
|
||||||
|
ERR_READ23, // 23 READ ERROR (checksum error in data block)
|
||||||
|
ERR_READ24, // 24 READ ERROR (byte decoding error)
|
||||||
|
ERR_WRITE25, // 25 WRITE ERROR (write-verify error)
|
||||||
ERR_WRITEPROTECT, // 26 WRITE PROTECT ON
|
ERR_WRITEPROTECT, // 26 WRITE PROTECT ON
|
||||||
ERR_SYNTAX30, // 30 SYNTAX ERROR (unknown command)
|
ERR_READ27, // 27 READ ERROR (checksum error in header)
|
||||||
|
ERR_WRITE28, // 28 WRITE ERROR (long data block)
|
||||||
|
ERR_DISKID, // 29 DISK ID MISMATCH
|
||||||
|
ERR_SYNTAX30, // 30 SYNTAX ERROR (general syntax)
|
||||||
|
ERR_SYNTAX31, // 31 SYNTAX ERROR (invalid command)
|
||||||
|
ERR_SYNTAX32, // 32 SYNTAX ERROR (command too long)
|
||||||
ERR_SYNTAX33, // 33 SYNTAX ERROR (wildcards on writing)
|
ERR_SYNTAX33, // 33 SYNTAX ERROR (wildcards on writing)
|
||||||
|
ERR_SYNTAX34, // 34 SYNTAX ERROR (missing file name)
|
||||||
ERR_WRITEFILEOPEN, // 60 WRITE FILE OPEN
|
ERR_WRITEFILEOPEN, // 60 WRITE FILE OPEN
|
||||||
ERR_FILENOTOPEN, // 61 FILE NOT OPEN
|
ERR_FILENOTOPEN, // 61 FILE NOT OPEN
|
||||||
ERR_FILENOTFOUND, // 62 FILE NOT FOUND
|
ERR_FILENOTFOUND, // 62 FILE NOT FOUND
|
||||||
ERR_ILLEGALTS, // 67 ILLEGAL TRACK OR SECTOR
|
ERR_FILEEXISTS, // 63 FILE EXISTS
|
||||||
|
ERR_FILETYPE, // 64 FILE TYPE MISMATCH
|
||||||
|
ERR_NOBLOCK, // 65 NO BLOCK
|
||||||
|
ERR_ILLEGALTS, // 66 ILLEGAL TRACK OR SECTOR
|
||||||
ERR_NOCHANNEL, // 70 NO CHANNEL
|
ERR_NOCHANNEL, // 70 NO CHANNEL
|
||||||
|
ERR_DIRERROR, // 71 DIR ERROR
|
||||||
|
ERR_DISKFULL, // 72 DISK FULL
|
||||||
ERR_STARTUP, // 73 Power-up message
|
ERR_STARTUP, // 73 Power-up message
|
||||||
ERR_NOTREADY // 74 DRIVE NOT READY
|
ERR_NOTREADY // 74 DRIVE NOT READY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Mountable file types
|
||||||
// IEC command codes
|
|
||||||
enum {
|
enum {
|
||||||
CMD_DATA = 0x60, // Data transfer
|
FILE_IMAGE, // Disk image, handled by ImageDrive
|
||||||
CMD_CLOSE = 0xe0, // Close channel
|
FILE_ARCH // Archive file, handled by ArchDrive
|
||||||
CMD_OPEN = 0xf0 // Open channel
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 1541 file types
|
||||||
// IEC ATN codes
|
|
||||||
enum {
|
enum {
|
||||||
ATN_LISTEN = 0x20,
|
FTYPE_DEL, // Deleted
|
||||||
ATN_UNLISTEN = 0x30,
|
FTYPE_SEQ, // Sequential
|
||||||
ATN_TALK = 0x40,
|
FTYPE_PRG, // Program
|
||||||
ATN_UNTALK = 0x50
|
FTYPE_USR, // User
|
||||||
|
FTYPE_REL, // Relative
|
||||||
|
FTYPE_UNKNOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char ftype_char[9] = "DSPUL ";
|
||||||
|
|
||||||
|
// 1541 file access modes
|
||||||
|
enum {
|
||||||
|
FMODE_READ, // Read
|
||||||
|
FMODE_WRITE, // Write
|
||||||
|
FMODE_APPEND, // Append
|
||||||
|
FMODE_M // Read open file
|
||||||
|
};
|
||||||
|
|
||||||
// Drive LED states
|
// Drive LED states
|
||||||
enum {
|
enum {
|
||||||
@ -63,6 +109,26 @@ enum {
|
|||||||
DRVLED_ERROR // Error, blink LED
|
DRVLED_ERROR // Error, blink LED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Information about file in disk image/archive file
|
||||||
|
struct c64_dir_entry {
|
||||||
|
c64_dir_entry(const uint8 *n, int t, bool o, bool p, size_t s, off_t ofs = 0, uint8 sal = 0, uint8 sah = 0)
|
||||||
|
: type(t), is_open(o), is_protected(p), size(s), offset(ofs), sa_lo(sal), sa_hi(sah)
|
||||||
|
{
|
||||||
|
strncpy((char *)name, (const char *)n, 17);
|
||||||
|
name[16] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Basic information
|
||||||
|
uint8 name[17]; // File name (C64 charset, null-terminated)
|
||||||
|
int type; // File type (see defines above)
|
||||||
|
bool is_open; // Flag: file open
|
||||||
|
bool is_protected; // Flag: file protected
|
||||||
|
size_t size; // File size (may be approximated)
|
||||||
|
|
||||||
|
// Special information
|
||||||
|
off_t offset; // Offset of file in archive file
|
||||||
|
uint8 sa_lo, sa_hi; // C64 start address
|
||||||
|
};
|
||||||
|
|
||||||
class Drive;
|
class Drive;
|
||||||
class C64Display;
|
class C64Display;
|
||||||
@ -81,13 +147,15 @@ public:
|
|||||||
uint8 Out(uint8 byte, bool eoi);
|
uint8 Out(uint8 byte, bool eoi);
|
||||||
uint8 OutATN(uint8 byte);
|
uint8 OutATN(uint8 byte);
|
||||||
uint8 OutSec(uint8 byte);
|
uint8 OutSec(uint8 byte);
|
||||||
uint8 In(uint8 *byte);
|
uint8 In(uint8 &byte);
|
||||||
void SetATN(void);
|
void SetATN(void);
|
||||||
void RelATN(void);
|
void RelATN(void);
|
||||||
void Turnaround(void);
|
void Turnaround(void);
|
||||||
void Release(void);
|
void Release(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Drive *create_drive(const char *path);
|
||||||
|
|
||||||
uint8 listen(int device);
|
uint8 listen(int device);
|
||||||
uint8 talk(int device);
|
uint8 talk(int device);
|
||||||
uint8 unlisten(void);
|
uint8 unlisten(void);
|
||||||
@ -96,12 +164,12 @@ private:
|
|||||||
uint8 sec_talk(void);
|
uint8 sec_talk(void);
|
||||||
uint8 open_out(uint8 byte, bool eoi);
|
uint8 open_out(uint8 byte, bool eoi);
|
||||||
uint8 data_out(uint8 byte, bool eoi);
|
uint8 data_out(uint8 byte, bool eoi);
|
||||||
uint8 data_in(uint8 *byte);
|
uint8 data_in(uint8 &byte);
|
||||||
|
|
||||||
C64Display *the_display; // Pointer to display object (for drive LEDs)
|
C64Display *the_display; // Pointer to display object (for drive LEDs)
|
||||||
|
|
||||||
char name_buf[NAMEBUF_LENGTH]; // Buffer for file names and command strings
|
uint8 name_buf[NAMEBUF_LENGTH]; // Buffer for file names and command strings
|
||||||
char *name_ptr; // Pointer for reception of file name
|
uint8 *name_ptr; // Pointer for reception of file name
|
||||||
int name_len; // Received length of file name
|
int name_len; // Received length of file name
|
||||||
|
|
||||||
Drive *drive[4]; // 4 drives (8..11)
|
Drive *drive[4]; // 4 drives (8..11)
|
||||||
@ -117,16 +185,15 @@ private:
|
|||||||
uint8 sec_addr; // Received secondary address ($0x)
|
uint8 sec_addr; // Received secondary address ($0x)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Abstract superclass for individual drives
|
// Abstract superclass for individual drives
|
||||||
class Drive {
|
class Drive {
|
||||||
public:
|
public:
|
||||||
Drive(IEC *iec);
|
Drive(IEC *iec);
|
||||||
virtual ~Drive() {}
|
virtual ~Drive() {}
|
||||||
|
|
||||||
virtual uint8 Open(int channel, char *filename)=0;
|
virtual uint8 Open(int channel, const uint8 *name, int name_len)=0;
|
||||||
virtual uint8 Close(int channel)=0;
|
virtual uint8 Close(int channel)=0;
|
||||||
virtual uint8 Read(int channel, uint8 *byte)=0;
|
virtual uint8 Read(int channel, uint8 &byte)=0;
|
||||||
virtual uint8 Write(int channel, uint8 byte, bool eoi)=0;
|
virtual uint8 Write(int channel, uint8 byte, bool eoi)=0;
|
||||||
virtual void Reset(void)=0;
|
virtual void Reset(void)=0;
|
||||||
|
|
||||||
@ -134,13 +201,62 @@ public:
|
|||||||
bool Ready; // Drive is ready for operation
|
bool Ready; // Drive is ready for operation
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void set_error(int error);
|
void set_error(int error, int track = 0, int sector = 0);
|
||||||
|
|
||||||
|
void parse_file_name(const uint8 *src, int src_len, uint8 *dest, int &dest_len, int &mode, int &type, int &rec_len, bool convert_charset = false);
|
||||||
|
|
||||||
|
void execute_cmd(const uint8 *cmd, int cmd_len);
|
||||||
|
virtual void block_read_cmd(int channel, int track, int sector, bool user_cmd = false);
|
||||||
|
virtual void block_write_cmd(int channel, int track, int sector, bool user_cmd = false);
|
||||||
|
virtual void block_execute_cmd(int channel, int track, int sector);
|
||||||
|
virtual void block_allocate_cmd(int track, int sector);
|
||||||
|
virtual void block_free_cmd(int track, int sector);
|
||||||
|
virtual void buffer_pointer_cmd(int channel, int pos);
|
||||||
|
virtual void mem_read_cmd(uint16 adr, uint8 len);
|
||||||
|
virtual void mem_write_cmd(uint16 adr, uint8 len, uint8 *p);
|
||||||
|
virtual void mem_execute_cmd(uint16 adr);
|
||||||
|
virtual void copy_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_files, int old_files_len);
|
||||||
|
virtual void rename_cmd(const uint8 *new_file, int new_file_len, const uint8 *old_file, int old_file_len);
|
||||||
|
virtual void scratch_cmd(const uint8 *files, int files_len);
|
||||||
|
virtual void position_cmd(const uint8 *cmd, int cmd_len);
|
||||||
|
virtual void initialize_cmd(void);
|
||||||
|
virtual void new_cmd(const uint8 *name, int name_len, const uint8 *comma);
|
||||||
|
virtual void validate_cmd(void);
|
||||||
|
void unsupp_cmd(void);
|
||||||
|
|
||||||
|
char error_buf[256]; // Buffer with current error message
|
||||||
char *error_ptr; // Pointer within error message
|
char *error_ptr; // Pointer within error message
|
||||||
int error_len; // Remaining length of error message
|
int error_len; // Remaining length of error message
|
||||||
|
int current_error; // Number of current error
|
||||||
|
|
||||||
|
uint8 cmd_buf[64]; // Buffer for incoming command strings
|
||||||
|
int cmd_len; // Length of received command
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IEC *the_iec; // Pointer to IEC object
|
IEC *the_iec; // Pointer to IEC object
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Convert ASCII character to PETSCII character
|
||||||
|
extern uint8 ascii2petscii(char c);
|
||||||
|
|
||||||
|
// Convert ASCII string to PETSCII string
|
||||||
|
extern void ascii2petscii(uint8 *dest, const char *src, int max);
|
||||||
|
|
||||||
|
// Convert PETSCII character to ASCII character
|
||||||
|
extern char petscii2ascii(uint8 c);
|
||||||
|
|
||||||
|
// Convert PETSCII string to ASCII string
|
||||||
|
extern void petscii2ascii(char *dest, const uint8 *src, int max);
|
||||||
|
|
||||||
|
// Check whether file is a mountable disk image or archive file, return type
|
||||||
|
extern bool IsMountableFile(const char *path, int &type);
|
||||||
|
|
||||||
|
// Read directory of mountable disk image or archive file into c64_dir_entry vector
|
||||||
|
extern bool ReadDirectory(const char *path, int type, vector<c64_dir_entry> &vec);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
1033
Src/Kernal_ROM.h
Normal file
1033
Src/Kernal_ROM.h
Normal file
File diff suppressed because it is too large
Load Diff
166
Src/Makefile
166
Src/Makefile
@ -1,136 +1,74 @@
|
|||||||
# Makefile.in for Frodo (generic Unix/X11)
|
# Makefile.in for Frodo (generic Unix/X11)
|
||||||
# Copyright (C) 1995-1997 Christian Bauer <cbauer@iphcip1.physik.uni-mainz.de>
|
include $(DEVKITPPC)/gamecube_rules
|
||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
REVISION = 1
|
REVISION = 3
|
||||||
|
|
||||||
|
## System specific configuration
|
||||||
|
|
||||||
|
#SHELL = /bin/sh
|
||||||
|
|
||||||
|
#prefix = /usr/local
|
||||||
|
#exec_prefix = ${prefix}
|
||||||
|
#bindir = ${exec_prefix}/bin
|
||||||
|
#datadir = ${prefix}/share
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
|
||||||
CXX = g++
|
|
||||||
LIBS = -L/usr/lib -lSDL -lSDL_ttf -lSDL_mixer -lSDL_image
|
|
||||||
CFLAGS = -g -Wall -Wno-unused -Wno-format -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_SDL -I./ -DFRODO_HPUX_REV=0 -DKBD_LANG=0
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
prefix = /usr/local
|
|
||||||
exec_prefix = ${prefix}
|
|
||||||
bindir = ${exec_prefix}/bin
|
|
||||||
libdir = ${exec_prefix}/lib
|
|
||||||
sysconfdir = ${prefix}/etc
|
|
||||||
|
|
||||||
.SUFFIXES: .o .cpp .h
|
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
OBJS = main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o \
|
GUIOBJS = sdlgui.o file.o dlgFileSelect.o dlgMain.o dlgDrives.o dlgOptions.o dlgVideoSound.o dlgAdvanced.o dlgInput.o
|
||||||
1541d64.o 1541t64.o 1541job.o SAM.o menu.o CmdPipe.o char_to_kc.o
|
OBJS = $(GUIOBJS) main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o dirent.o\
|
||||||
|
1541d64.o 1541t64.o 1541job.o SAM.o
|
||||||
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
||||||
PCOBJS = $(OBJS) C64_PC.o CPUC64_PC.o VIC.o CIA.o CPU1541_PC.o
|
SLFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
||||||
PCFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
|
||||||
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
||||||
SCFLAGS = -DFRODO_SC
|
SCFLAGS = -DFRODO_SC
|
||||||
SRCS = main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
GUISRCS = sdlgui.cpp file.cpp dlgFileSelect.cpp dlgMain.cpp dlgDrives.cpp dlgOptions.cpp dlgVidoSound.cpp dlgAdvanced.cpp dlgInput.cpp
|
||||||
|
SRCS = $(GUISRCS) main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
||||||
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
||||||
C64_PC.cpp C64_SC.cpp CPUC64.cpp CPUC64_PC.cpp CPUC64_SC.cpp \
|
C64_SC.cpp CPUC64.cpp CPUC64_SC.cpp VIC.cpp VIC_SC.cpp CIA.cpp \
|
||||||
VIC.cpp VIC_SC.cpp CIA.cpp CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp \
|
CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp CPU1541_SC.cpp CPU_common.cpp
|
||||||
CPU1541_SC.cpp CPU_common.cpp
|
|
||||||
|
|
||||||
all: Frodo FrodoPC FrodoSC
|
#CXX = g++
|
||||||
|
|
||||||
sysconfig.h: sysconfig.h.Host-SDL
|
CFLAGS = $(SLFLAGS) -g -O2 -fomit-frame-pointer -fno-exceptions $(MACHDEP) -I. -I$(DEVKITPRO)/libogc/include/ -I$(DEVKITPRO)/libogc/include/SDL -DHAVE_SDL -DWII -DR14 -I./ -DKBD_LANG=0
|
||||||
cp $< $@
|
DEFS = -DHAVE_CONFIG_H -DDATADIR=\"/frodo/\" -DBINDIR=\"/frodo/\"
|
||||||
|
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||||
|
LIBS = -L$(DEVKITPRO)/libogc/lib/cube -lSDL -logc -lz -lm
|
||||||
|
CXXFLAGS = $(CFLAGS)
|
||||||
|
|
||||||
Frodo: sysconfig.h $(SLOBJS)
|
## Rules
|
||||||
$(CXX) -o Frodo $(SLOBJS) $(LDFLAGS) $(LIBS)
|
.PHONY: install installdirs uninstall clean distclean depend dep
|
||||||
cp Frodo ..
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .o .cpp .h
|
||||||
|
|
||||||
FrodoPC: $(PCOBJS)
|
all: boot.dol #FrodoSC
|
||||||
$(CXX) -o FrodoPC $(PCOBJS) $(LDFLAGS) $(LIBS)
|
|
||||||
cp FrodoPC ..
|
Frodo.elf: $(SLOBJS)
|
||||||
|
$(CXX) -o Frodo.elf $(CFLAGS) $(LDFLAGS) $(SLOBJS) $(LIBS)
|
||||||
|
#@powerpc-gekko-objcopy -O binary $< $@
|
||||||
|
|
||||||
FrodoSC: $(SCOBJS)
|
FrodoSC: $(SCOBJS)
|
||||||
$(CXX) -o FrodoSC $(SCOBJS) $(LDFLAGS) $(LIBS)
|
$(CXX) -o FrodoSC $(LDFLAGS) $(SCOBJS) $(LIBS)
|
||||||
cp FrodoSC ..
|
|
||||||
|
boot.dol: Frodo.dol
|
||||||
|
cp Frodo.dol boot.dol
|
||||||
|
|
||||||
|
Frodo.dol: Frodo.elf
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo
|
||||||
|
rm -f $(DESTDIR)$(bindir)/FrodoSC
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo_GUI.tcl
|
||||||
|
rm -f $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
|
||||||
|
rmdir $(DESTDIR)$(datadir)/frodo
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(SLOBJS) $(PCOBJS) $(SCOBJS) sysconfig.h
|
rm -f $(SLOBJS) $(SCOBJS)
|
||||||
rm -f Frodo FrodoPC FrodoSC
|
rm -f Frodo FrodoSC
|
||||||
|
rm -f core* *.core *~ *.bak
|
||||||
distclean: clean
|
|
||||||
rm -rf autom4te.cache
|
|
||||||
rm -f Makefile sysconfig.h
|
|
||||||
rm -f config.cache config.log config.status config.h
|
|
||||||
|
|
||||||
depend dep:
|
|
||||||
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
|
|
||||||
|
|
||||||
.cpp.o:
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
.cpp.s:
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(EXTRAFLAGS) -o $@ -S $*.cpp -g0
|
|
||||||
|
|
||||||
C64_PC.o: C64.cpp C64.h C64_SDL.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPUC64_PC.o: CPUC64.cpp CPUC64.h CPU_emulline.i C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPU1541_PC.o: CPU1541.cpp CPU1541.h CPU_emulline.i 1541job.h C64.h CIA.h Display.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
C64_SC.o: C64_SC.cpp C64.h C64_SDL.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPUC64_SC.o: CPUC64_SC.cpp CPUC64.h CPU_emulcycle.i CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPU1541_SC.o: CPU1541_SC.cpp CPU1541.h CPU_emulcycle.i CPU_common.h 1541job.h C64.h CIA.h Display.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
VIC_SC.o: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CIA_SC.o: CIA_SC.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
main.o: sysdeps.h sysconfig.h main.h C64.h Display.h Prefs.h SAM.h main_x.i
|
|
||||||
Display.o: sysdeps.h sysconfig.h Display.h main.h Prefs.h Display_SDL.i
|
|
||||||
Prefs.o: sysdeps.h sysconfig.h Prefs.h Display.h C64.h main.h
|
|
||||||
SID.o: sysdeps.h sysconfig.h SID.h Prefs.h SID_linux.i
|
|
||||||
REU.o: sysdeps.h sysconfig.h REU.h CPUC64.h C64.h Prefs.h
|
|
||||||
IEC.o: sysdeps.h sysconfig.h IEC.h 1541fs.h 1541d64.h 1541t64.h Prefs.h
|
|
||||||
IEC.o: Display.h
|
|
||||||
1541fs.o: sysdeps.h sysconfig.h 1541fs.h IEC.h main.h Prefs.h
|
|
||||||
1541d64.o: sysdeps.h sysconfig.h 1541d64.h IEC.h Prefs.h
|
|
||||||
1541t64.o: sysdeps.h sysconfig.h 1541t64.h IEC.h Prefs.h
|
|
||||||
1541job.o: sysdeps.h sysconfig.h 1541job.h CPU1541.h CIA.h Prefs.h C64.h
|
|
||||||
SAM.o: sysdeps.h sysconfig.h SAM.h C64.h CPUC64.h CPU1541.h CIA.h Prefs.h
|
|
||||||
SAM.o: VIC.h SID.h
|
|
||||||
CmdPipe.o: CmdPipe.h
|
|
||||||
C64.o: sysdeps.h sysconfig.h C64.h CPUC64.h CPU1541.h CIA.h Prefs.h VIC.h C64_SDL.i
|
|
||||||
C64.o: SID.h REU.h IEC.h 1541job.h Display.h
|
|
||||||
C64_PC.o: C64.cpp sysdeps.h sysconfig.h C64.h CPUC64.h CPU1541.h CIA.h
|
|
||||||
C64_PC.o: Prefs.h VIC.h SID.h REU.h IEC.h 1541job.h Display.h
|
|
||||||
C64_SC.o: C64.cpp sysdeps.h sysconfig.h C64.h CPUC64.h CPU1541.h CIA.h
|
|
||||||
C64_SC.o: Prefs.h VIC.h SID.h REU.h IEC.h 1541job.h Display.h
|
|
||||||
CPUC64.o: sysdeps.h sysconfig.h CPUC64.h C64.h VIC.h SID.h CIA.h Prefs.h
|
|
||||||
CPUC64.o: REU.h IEC.h Display.h Version.h CPU_emulline.i
|
|
||||||
CPUC64_PC.o: CPUC64.cpp sysdeps.h sysconfig.h CPUC64.h C64.h VIC.h SID.h
|
|
||||||
CPUC64_PC.o: CIA.h Prefs.h REU.h IEC.h Display.h Version.h CPU_emulline.i
|
|
||||||
CPUC64_SC.o: sysdeps.h sysconfig.h CPUC64.h C64.h CPU_common.h VIC.h SID.h
|
|
||||||
CPUC64_SC.o: CIA.h Prefs.h REU.h IEC.h Display.h Version.h CPU_emulcycle.i
|
|
||||||
VIC.o: sysdeps.h sysconfig.h VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|
||||||
VIC_SC.o: sysdeps.h sysconfig.h VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|
||||||
CIA.o: sysdeps.h sysconfig.h CIA.h Prefs.h CPUC64.h C64.h CPU1541.h VIC.h
|
|
||||||
CIA_SC.o: sysdeps.h sysconfig.h CIA.h Prefs.h CPUC64.h C64.h CPU1541.h VIC.h
|
|
||||||
CPU1541.o: sysdeps.h sysconfig.h CPU1541.h CIA.h Prefs.h C64.h 1541job.h
|
|
||||||
CPU1541.o: Display.h CPU_emulline.i
|
|
||||||
CPU1541_PC.o: CPU1541.cpp sysdeps.h sysconfig.h CPU1541.h CIA.h Prefs.h C64.h
|
|
||||||
CPU1541_PC.o: 1541job.h Display.h CPU_emulline.i
|
|
||||||
CPU1541_SC.o: sysdeps.h sysconfig.h CPU1541.h CIA.h Prefs.h C64.h
|
|
||||||
CPU1541_SC.o: CPU_common.h 1541job.h Display.h CPU_emulcycle.i
|
|
||||||
CPU_common.o: sysdeps.h sysconfig.h CPU_common.h
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
# Makefile.in for Frodo (AmigaOS with GCC)
|
# Makefile for Frodo (AmigaOS with GCC)
|
||||||
# Copyright (C) 1995-1997 Christian Bauer <cbauer@iphcip1.physik.uni-mainz.de>
|
|
||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
REVISION = 1
|
REVISION = 2
|
||||||
|
|
||||||
CXX = gcc
|
CXX = gcc
|
||||||
CFLAGS = -O2 -I./ -fomit-frame-pointer -m68040 -m68881
|
CFLAGS = -O2 -I./ -fomit-frame-pointer -m68040 -m68881
|
||||||
@ -15,8 +14,7 @@ LIBRARIES =
|
|||||||
OBJS = main.o Display.o Prefs.o AmigaGUI.o SID.o REU.o IEC.o 1541fs.o \
|
OBJS = main.o Display.o Prefs.o AmigaGUI.o SID.o REU.o IEC.o 1541fs.o \
|
||||||
1541d64.o 1541t64.o 1541job.o SAM.o
|
1541d64.o 1541t64.o 1541job.o SAM.o
|
||||||
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
||||||
PCOBJS = $(OBJS) C64_PC.o CPUC64_PC.o VIC.o CIA.o CPU1541_PC.o
|
SLFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
||||||
PCFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
|
||||||
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
||||||
SCFLAGS = -DFRODO_SC
|
SCFLAGS = -DFRODO_SC
|
||||||
|
|
||||||
@ -24,19 +22,15 @@ Frodo: $(SLOBJS)
|
|||||||
$(CXX) -o Frodo $(SLOBJS) $(LDFLAGS) $(LIBRARIES)
|
$(CXX) -o Frodo $(SLOBJS) $(LDFLAGS) $(LIBRARIES)
|
||||||
copy Frodo /
|
copy Frodo /
|
||||||
|
|
||||||
FrodoPC: $(PCOBJS)
|
|
||||||
$(CXX) -o FrodoPC $(PCOBJS) $(LDFLAGS) $(LIBRARIES)
|
|
||||||
copy FrodoPC /
|
|
||||||
|
|
||||||
FrodoSC: $(SCOBJS)
|
FrodoSC: $(SCOBJS)
|
||||||
$(CXX) -o FrodoSC $(SCOBJS) $(LDFLAGS) $(LIBRARIES)
|
$(CXX) -o FrodoSC $(SCOBJS) $(LDFLAGS) $(LIBRARIES)
|
||||||
copy FrodoSC /
|
copy FrodoSC /
|
||||||
|
|
||||||
all: Frodo FrodoPC FrodoSC
|
all: Frodo FrodoSC
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@-delete $(SLOBJS) $(PCOBJS) $(SCOBJS)
|
@-delete $(SLOBJS) $(SCOBJS)
|
||||||
@-delete -f Frodo FrodoPC FrodoSC
|
@-delete -f Frodo FrodoSC
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(INCLUDES) $(CFLAGS) -o $@ -c $*.cpp
|
||||||
@ -44,44 +38,41 @@ clean:
|
|||||||
.c.o:
|
.c.o:
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) -o $@ -c $*.c
|
$(CXX) $(INCLUDES) $(CFLAGS) -o $@ -c $*.c
|
||||||
|
|
||||||
.cpp.s:
|
C64.o: C64.cpp
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) -o $@ -S $*.cpp -g0
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
C64_SC.o: C64.cpp C64.h C64_Amiga.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
C64_SC.o: C64.cpp
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CPUC64_SC.o: CPUC64_SC.cpp CPUC64.h CPU_emulcycle.i CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPUC64.o: CPUC64.cpp
|
||||||
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CPUC64_SC.o: CPUC64_SC.cpp
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CPU1541_SC.o: CPU1541_SC.cpp CPU1541.h CPU_emulcycle.i CPU_common.h 1541job.h C64.h CIA.h Display.h
|
CPU1541.o: CPU1541.cpp
|
||||||
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CPU1541_SC.o: CPU1541_SC.cpp
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
VIC_SC.o: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
VIC_SC.o: VIC_SC.cpp
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CIA_SC.o: CIA_SC.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
CIA_SC.o: CIA_SC.cpp
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
C64_PC.o: C64.cpp C64.h C64_Amiga.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPUC64_PC.o: CPUC64.cpp CPUC64.h CPU_emulline.i C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPU1541_PC.o: CPU1541.cpp CPU1541.h CPU_emulline.i 1541job.h C64.h CIA.h Display.h
|
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
main.o: main.cpp main.h main_Amiga.i C64.h Display.h Prefs.h SAM.h
|
main.o: main.cpp main.h main_Amiga.h C64.h Display.h Prefs.h SAM.h
|
||||||
C64.o: C64.cpp C64.h C64_Amiga.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
C64.o: C64.cpp C64.h C64_Amiga.h CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
||||||
CmdPipe.o: CmdPipe.h
|
CmdPipe.o: CmdPipe.h
|
||||||
Display.o: Display.cpp Display.h Display_Amiga.i main.h Prefs.h Version.h
|
Display.o: Display.cpp Display.h Display_Amiga.h main.h Prefs.h Version.h
|
||||||
Prefs.o: Prefs.cpp Prefs.h Prefs_Amiga.i Display.h main.h
|
Prefs.o: Prefs.cpp Prefs.h Prefs_Amiga.h Display.h main.h
|
||||||
CPUC64.o: CPUC64.cpp CPUC64.h CPU_emulline.i C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPUC64.o: CPUC64.cpp CPUC64.h CPU_emulline.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
||||||
CPU1541.o: CPU1541.cpp CPU1541.h CPU_emulline.i 1541job.h C64.h CIA.h Display.h
|
CPU1541.o: CPU1541.cpp CPU1541.h CPU_emulline.h 1541job.h C64.h CIA.h Display.h
|
||||||
CPU_common.o: CPU_common.cpp CPU_common.h
|
CPU_common.o: CPU_common.cpp CPU_common.h
|
||||||
VIC.o: VIC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
VIC.o: VIC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
||||||
SID.o: SID.cpp SID.h SID_Amiga.i Prefs.h
|
SID.o: SID.cpp SID.h SID_Amiga.h Prefs.h
|
||||||
CIA.o: CIA.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
CIA.o: CIA.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
||||||
IEC.o: IEC.cpp IEC.h 1541fs.h 1541d64.h 1541t64.h Prefs.h Display.h
|
IEC.o: IEC.cpp IEC.h 1541fs.h 1541d64.h 1541t64.h Prefs.h Display.h
|
||||||
1541fs.o: 1541fs.cpp 1541fs.h IEC.h main.h Prefs.h
|
1541fs.o: 1541fs.cpp 1541fs.h IEC.h main.h Prefs.h
|
||||||
|
117
Src/Makefile.BeOS
Normal file
117
Src/Makefile.BeOS
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
## BeOS Generic Makefile v2.1 ##
|
||||||
|
|
||||||
|
## Fill in this file to specify the project being created, and the referenced
|
||||||
|
## makefile-engine will do all of the hard work for you. This handles both
|
||||||
|
## Intel and PowerPC builds of the BeOS.
|
||||||
|
|
||||||
|
## Application Specific Settings ---------------------------------------------
|
||||||
|
|
||||||
|
# specify the name of the binary
|
||||||
|
NAME= Frodo
|
||||||
|
|
||||||
|
# specify the type of binary
|
||||||
|
# APP: Application
|
||||||
|
# SHARED: Shared library or add-on
|
||||||
|
# STATIC: Static library archive
|
||||||
|
# DRIVER: Kernel Driver
|
||||||
|
TYPE= APP
|
||||||
|
|
||||||
|
# add support for new Pe and Eddie features
|
||||||
|
# to fill in generic makefile
|
||||||
|
|
||||||
|
#%{
|
||||||
|
# @src->@
|
||||||
|
|
||||||
|
# specify the source files to use
|
||||||
|
# full paths or paths relative to the makefile can be included
|
||||||
|
# all files, regardless of directory, will have their object
|
||||||
|
# files created in the common object directory.
|
||||||
|
# Note that this means this makefile will not work correctly
|
||||||
|
# if two source files with the same name (source.c or source.cpp)
|
||||||
|
# are included from different directories. Also note that spaces
|
||||||
|
# in folder names do not work well with this makefile.
|
||||||
|
SRCS = main.cpp Prefs.cpp SAM.cpp Display.cpp C64.cpp CPUC64.cpp CPU1541.cpp \
|
||||||
|
VIC.cpp SID.cpp CIA.cpp REU.cpp IEC.cpp 1541fs.cpp 1541d64.cpp 1541t64.cpp 1541job.cpp
|
||||||
|
|
||||||
|
# specify the resource files to use
|
||||||
|
# full path or a relative path to the resource file can be used.
|
||||||
|
RSRCS= Frodo.rsrc
|
||||||
|
|
||||||
|
# @<-src@
|
||||||
|
#%}
|
||||||
|
|
||||||
|
# end support for Pe and Eddie
|
||||||
|
|
||||||
|
# specify additional libraries to link against
|
||||||
|
# there are two acceptable forms of library specifications
|
||||||
|
# - if your library follows the naming pattern of:
|
||||||
|
# libXXX.so or libXXX.a you can simply specify XXX
|
||||||
|
# library: libbe.so entry: be
|
||||||
|
#
|
||||||
|
# - if your library does not follow the standard library
|
||||||
|
# naming scheme you need to specify the path to the library
|
||||||
|
# and it's name
|
||||||
|
# library: my_lib.a entry: my_lib.a or path/my_lib.a
|
||||||
|
LIBS=be media game device tracker
|
||||||
|
|
||||||
|
# specify additional paths to directories following the standard
|
||||||
|
# libXXX.so or libXXX.a naming scheme. You can specify full paths
|
||||||
|
# or paths relative to the makefile. The paths included may not
|
||||||
|
# be recursive, so include all of the paths where libraries can
|
||||||
|
# be found. Directories where source files are found are
|
||||||
|
# automatically included.
|
||||||
|
LIBPATHS=
|
||||||
|
|
||||||
|
# additional paths to look for system headers
|
||||||
|
# thes use the form: #include <header>
|
||||||
|
# source file directories are NOT auto-included here
|
||||||
|
SYSTEM_INCLUDE_PATHS =
|
||||||
|
|
||||||
|
# additional paths to look for local headers
|
||||||
|
# thes use the form: #include "header"
|
||||||
|
# source file directories are automatically included
|
||||||
|
LOCAL_INCLUDE_PATHS =
|
||||||
|
|
||||||
|
# specify the level of optimization that you desire
|
||||||
|
# NONE, SOME, FULL
|
||||||
|
OPTIMIZE= FULL
|
||||||
|
|
||||||
|
# specify any preprocessor symbols to be defined. The symbols will not
|
||||||
|
# have their values set automatically; you must supply the value (if any)
|
||||||
|
# to use. For example, setting DEFINES to "DEBUG=1" will cause the
|
||||||
|
# compiler option "-DDEBUG=1" to be used. Setting DEFINES to "DEBUG"
|
||||||
|
# would pass "-DDEBUG" on the compiler's command line.
|
||||||
|
DEFINES= PRECISE_CPU_CYCLES=1 PRECISE_CIA_CYCLES=1 PC_IS_POINTER=0
|
||||||
|
|
||||||
|
# specify special warning levels
|
||||||
|
# if unspecified default warnings will be used
|
||||||
|
# NONE = supress all warnings
|
||||||
|
# ALL = enable all warnings
|
||||||
|
WARNINGS =
|
||||||
|
|
||||||
|
# specify whether image symbols will be created
|
||||||
|
# so that stack crawls in the debugger are meaningful
|
||||||
|
# if TRUE symbols will be created
|
||||||
|
SYMBOLS =
|
||||||
|
|
||||||
|
# specify debug settings
|
||||||
|
# if TRUE will allow application to be run from
|
||||||
|
# a source-level debugger
|
||||||
|
DEBUGGER =
|
||||||
|
|
||||||
|
# specify additional compiler flags for all files
|
||||||
|
COMPILER_FLAGS =
|
||||||
|
|
||||||
|
# specify additional linker flags
|
||||||
|
LINKER_FLAGS =
|
||||||
|
|
||||||
|
|
||||||
|
## include the makefile-engine
|
||||||
|
include /boot/develop/etc/makefile-engine
|
||||||
|
|
||||||
|
|
||||||
|
## Custom stuff for Frodo
|
||||||
|
sysconfig.h: sysconfig.h.Be
|
||||||
|
ln -s sysconfig.h.Be sysconfig.h
|
||||||
|
|
||||||
|
main.cpp: sysconfig.h
|
118
Src/Makefile.BeOS.SC
Normal file
118
Src/Makefile.BeOS.SC
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
## BeOS Generic Makefile v2.1 ##
|
||||||
|
|
||||||
|
## Fill in this file to specify the project being created, and the referenced
|
||||||
|
## makefile-engine will do all of the hard work for you. This handles both
|
||||||
|
## Intel and PowerPC builds of the BeOS.
|
||||||
|
|
||||||
|
## Application Specific Settings ---------------------------------------------
|
||||||
|
|
||||||
|
# specify the name of the binary
|
||||||
|
NAME= FrodoSC
|
||||||
|
|
||||||
|
# specify the type of binary
|
||||||
|
# APP: Application
|
||||||
|
# SHARED: Shared library or add-on
|
||||||
|
# STATIC: Static library archive
|
||||||
|
# DRIVER: Kernel Driver
|
||||||
|
TYPE= APP
|
||||||
|
|
||||||
|
# add support for new Pe and Eddie features
|
||||||
|
# to fill in generic makefile
|
||||||
|
|
||||||
|
#%{
|
||||||
|
# @src->@
|
||||||
|
|
||||||
|
# specify the source files to use
|
||||||
|
# full paths or paths relative to the makefile can be included
|
||||||
|
# all files, regardless of directory, will have their object
|
||||||
|
# files created in the common object directory.
|
||||||
|
# Note that this means this makefile will not work correctly
|
||||||
|
# if two source files with the same name (source.c or source.cpp)
|
||||||
|
# are included from different directories. Also note that spaces
|
||||||
|
# in folder names do not work well with this makefile.
|
||||||
|
SRCS = main.cpp Prefs.cpp SAM.cpp Display.cpp C64_SC.cpp CPUC64_SC.cpp CPU1541_SC.cpp \
|
||||||
|
CPU_common.cpp VIC_SC.cpp SID.cpp CIA_SC.cpp REU.cpp IEC.cpp 1541fs.cpp 1541d64.cpp \
|
||||||
|
1541t64.cpp 1541job.cpp
|
||||||
|
|
||||||
|
# specify the resource files to use
|
||||||
|
# full path or a relative path to the resource file can be used.
|
||||||
|
RSRCS= Frodo.rsrc
|
||||||
|
|
||||||
|
# @<-src@
|
||||||
|
#%}
|
||||||
|
|
||||||
|
# end support for Pe and Eddie
|
||||||
|
|
||||||
|
# specify additional libraries to link against
|
||||||
|
# there are two acceptable forms of library specifications
|
||||||
|
# - if your library follows the naming pattern of:
|
||||||
|
# libXXX.so or libXXX.a you can simply specify XXX
|
||||||
|
# library: libbe.so entry: be
|
||||||
|
#
|
||||||
|
# - if your library does not follow the standard library
|
||||||
|
# naming scheme you need to specify the path to the library
|
||||||
|
# and it's name
|
||||||
|
# library: my_lib.a entry: my_lib.a or path/my_lib.a
|
||||||
|
LIBS=be media game device tracker
|
||||||
|
|
||||||
|
# specify additional paths to directories following the standard
|
||||||
|
# libXXX.so or libXXX.a naming scheme. You can specify full paths
|
||||||
|
# or paths relative to the makefile. The paths included may not
|
||||||
|
# be recursive, so include all of the paths where libraries can
|
||||||
|
# be found. Directories where source files are found are
|
||||||
|
# automatically included.
|
||||||
|
LIBPATHS=
|
||||||
|
|
||||||
|
# additional paths to look for system headers
|
||||||
|
# thes use the form: #include <header>
|
||||||
|
# source file directories are NOT auto-included here
|
||||||
|
SYSTEM_INCLUDE_PATHS =
|
||||||
|
|
||||||
|
# additional paths to look for local headers
|
||||||
|
# thes use the form: #include "header"
|
||||||
|
# source file directories are automatically included
|
||||||
|
LOCAL_INCLUDE_PATHS =
|
||||||
|
|
||||||
|
# specify the level of optimization that you desire
|
||||||
|
# NONE, SOME, FULL
|
||||||
|
OPTIMIZE= FULL
|
||||||
|
|
||||||
|
# specify any preprocessor symbols to be defined. The symbols will not
|
||||||
|
# have their values set automatically; you must supply the value (if any)
|
||||||
|
# to use. For example, setting DEFINES to "DEBUG=1" will cause the
|
||||||
|
# compiler option "-DDEBUG=1" to be used. Setting DEFINES to "DEBUG"
|
||||||
|
# would pass "-DDEBUG" on the compiler's command line.
|
||||||
|
DEFINES= FRODO_SC
|
||||||
|
|
||||||
|
# specify special warning levels
|
||||||
|
# if unspecified default warnings will be used
|
||||||
|
# NONE = supress all warnings
|
||||||
|
# ALL = enable all warnings
|
||||||
|
WARNINGS =
|
||||||
|
|
||||||
|
# specify whether image symbols will be created
|
||||||
|
# so that stack crawls in the debugger are meaningful
|
||||||
|
# if TRUE symbols will be created
|
||||||
|
SYMBOLS =
|
||||||
|
|
||||||
|
# specify debug settings
|
||||||
|
# if TRUE will allow application to be run from
|
||||||
|
# a source-level debugger
|
||||||
|
DEBUGGER =
|
||||||
|
|
||||||
|
# specify additional compiler flags for all files
|
||||||
|
COMPILER_FLAGS =
|
||||||
|
|
||||||
|
# specify additional linker flags
|
||||||
|
LINKER_FLAGS =
|
||||||
|
|
||||||
|
|
||||||
|
## include the makefile-engine
|
||||||
|
include /boot/develop/etc/makefile-engine
|
||||||
|
|
||||||
|
|
||||||
|
## Custom stuff for Frodo
|
||||||
|
sysconfig.h: sysconfig.h.Be
|
||||||
|
ln -s sysconfig.h.Be sysconfig.h
|
||||||
|
|
||||||
|
main.cpp: sysconfig.h
|
@ -1,10 +1,8 @@
|
|||||||
# Makefile.in for Frodo (WIN32 DirectX with MSVC++)
|
# Makefile for Frodo (WIN32 DirectX with MSVC++)
|
||||||
# Copyright (C) 1994-1997 Christian Bauer <cbauer@iphcip1.physik.uni-mainz.de>
|
|
||||||
# WIN32 code by J. Richard Sladkey <jrs@world.std.com>
|
|
||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
REVISION = 1
|
REVISION = 2
|
||||||
|
|
||||||
# Choose static (L) or dynamic (D) version of C library
|
# Choose static (L) or dynamic (D) version of C library
|
||||||
LIBC = L
|
LIBC = L
|
||||||
@ -65,13 +63,13 @@ clean:
|
|||||||
.c.obj:
|
.c.obj:
|
||||||
$(CXX) $(ALLCFLAGS) -o $@ -c $*.c
|
$(CXX) $(ALLCFLAGS) -o $@ -c $*.c
|
||||||
|
|
||||||
C64_SC.obj: C64.cpp C64.h C64_WIN32.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
C64_SC.obj: C64.cpp C64.h C64_WIN32.h CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
||||||
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
CPUC64_SC.obj: CPUC64_SC.cpp CPUC64.h CPU_emulcycle.i CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPUC64_SC.obj: CPUC64_SC.cpp CPUC64.h CPU_emulcycle.h CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
||||||
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
CPU1541_SC.obj: CPU1541_SC.cpp CPU1541.h CPU_emulcycle.i CPU_common.h 1541job.h C64.h CIA.h Display.h
|
CPU1541_SC.obj: CPU1541_SC.cpp CPU1541.h CPU_emulcycle.h CPU_common.h 1541job.h C64.h CIA.h Display.h
|
||||||
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
VIC_SC.obj: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
VIC_SC.obj: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
||||||
@ -80,26 +78,28 @@ VIC_SC.obj: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|||||||
CIA_SC.obj: CIA_SC.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
CIA_SC.obj: CIA_SC.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
||||||
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
$(CXX) $(ALLSCCFLAGS) -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
C64_PC.obj: C64.cpp C64.h C64_WIN32.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
C64_PC.obj: C64.cpp C64.h C64_WIN32.h CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
||||||
$(CXX) $(ALLPCCFLAGS) -Fo$@ -c $*.cpp
|
$(CXX) $(ALLPCCFLAGS) -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
CPUC64_PC.obj: CPUC64.cpp CPUC64.h CPU_emulline.i CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPUC64_PC.obj: CPUC64.cpp CPUC64.h CPU_emulline.h CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
||||||
$(CXX) $(ALLPCCFLAGS) -DPC_IS_POINTER=0 -Fo$@ -c $*.cpp
|
$(CXX) $(ALLPCCFLAGS) -DPC_IS_POINTER=0 -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
CPU1541_PC.obj: CPU1541_PC.cpp CPU1541.h CPU_emulline.i CPU_common.h 1541job.h C64.h CIA.h Display.h
|
CPU1541_PC.obj: CPU1541_PC.cpp CPU1541.h CPU_emulline.h CPU_common.h 1541job.h C64.h CIA.h Display.h
|
||||||
$(CXX) $(ALLPCCFLAGS) -Fo$@ -c $*.cpp
|
$(CXX) $(ALLPCCFLAGS) -Fo$@ -c $*.cpp
|
||||||
|
|
||||||
|
ndir.obj: ndir.c ndir.h
|
||||||
|
$(CXX) $(ALLPCCFLAGS) -Fo$@ -c ndir.c
|
||||||
## Dependencies
|
## Dependencies
|
||||||
main.obj: main.cpp main.h main_WIN32.i C64.h Display.h Prefs.h SAM.h
|
main.obj: main.cpp main.h main_WIN32.h C64.h Display.h Prefs.h SAM.h
|
||||||
C64.obj: C64.cpp C64.h C64_WIN32.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
C64.obj: C64.cpp C64.h C64_WIN32.h CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
||||||
CmdPipe.obj: CmdPipe.h
|
CmdPipe.obj: CmdPipe.h
|
||||||
Display.obj: Display.cpp Display.h Display_WIN32.i main.h Prefs.h Version.h resource.h
|
Display.obj: Display.cpp Display.h Display_WIN32.h main.h Prefs.h Version.h resource.h
|
||||||
Prefs.obj: Prefs.cpp Prefs.h Prefs_WIN32.i Display.h main.h resource.h
|
Prefs.obj: Prefs.cpp Prefs.h Prefs_WIN32.h Display.h main.h resource.h
|
||||||
CPUC64.obj: CPUC64.cpp CPUC64.h CPU_emulline.i C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPUC64.obj: CPUC64.cpp CPUC64.h CPU_emulline.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
||||||
CPU1541.obj: CPU1541.cpp CPU1541.h CPU_emulline.i 1541job.h C64.h CIA.h Display.h
|
CPU1541.obj: CPU1541.cpp CPU1541.h CPU_emulline.h 1541job.h C64.h CIA.h Display.h
|
||||||
CPU_common.obj: CPU_common.cpp CPU_common.h
|
CPU_common.obj: CPU_common.cpp CPU_common.h
|
||||||
VIC.obj: VIC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
VIC.obj: VIC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
||||||
SID.obj: SID.cpp SID.h SID_WIN32.i Prefs.h main.h
|
SID.obj: SID.cpp SID.h SID_WIN32.h Prefs.h main.h
|
||||||
CIA.obj: CIA.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
CIA.obj: CIA.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
||||||
IEC.obj: IEC.cpp IEC.h 1541fs.h 1541d64.h 1541t64.h Prefs.h Display.h
|
IEC.obj: IEC.cpp IEC.h 1541fs.h 1541d64.h 1541t64.h Prefs.h Display.h
|
||||||
1541fs.obj: 1541fs.cpp 1541fs.h IEC.h main.h Prefs.h
|
1541fs.obj: 1541fs.cpp 1541fs.h IEC.h main.h Prefs.h
|
||||||
|
136
Src/Makefile.bak
136
Src/Makefile.bak
@ -1,136 +0,0 @@
|
|||||||
# Makefile.in for Frodo (generic Unix/X11)
|
|
||||||
# Copyright (C) 1995-1997 Christian Bauer <cbauer@iphcip1.physik.uni-mainz.de>
|
|
||||||
|
|
||||||
## Version information
|
|
||||||
VERSION = 4
|
|
||||||
REVISION = 1
|
|
||||||
|
|
||||||
|
|
||||||
CXX = g++
|
|
||||||
LIBS = -L/usr/lib -lSDL -lSDL_ttf -lSDL_mixer -lSDL_image
|
|
||||||
CFLAGS = -O2 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_SDL -fno-strength-reduce -DREGPARAM="__attribute__((regparm(3)))" -I./ -DFRODO_HPUX_REV=0 -DKBD_LANG=0
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
prefix = /usr/local
|
|
||||||
exec_prefix = ${prefix}
|
|
||||||
bindir = ${exec_prefix}/bin
|
|
||||||
libdir = ${exec_prefix}/lib
|
|
||||||
sysconfdir = ${prefix}/etc
|
|
||||||
|
|
||||||
.SUFFIXES: .o .cpp .h
|
|
||||||
|
|
||||||
## Files
|
|
||||||
OBJS = main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o \
|
|
||||||
1541d64.o 1541t64.o 1541job.o SAM.o menu.o CmdPipe.o char_to_kc.o
|
|
||||||
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
|
||||||
PCOBJS = $(OBJS) C64_PC.o CPUC64_PC.o VIC.o CIA.o CPU1541_PC.o
|
|
||||||
PCFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
|
||||||
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
|
||||||
SCFLAGS = -DFRODO_SC
|
|
||||||
SRCS = main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
|
||||||
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
|
||||||
C64_PC.cpp C64_SC.cpp CPUC64.cpp CPUC64_PC.cpp CPUC64_SC.cpp \
|
|
||||||
VIC.cpp VIC_SC.cpp CIA.cpp CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp \
|
|
||||||
CPU1541_SC.cpp CPU_common.cpp
|
|
||||||
|
|
||||||
all: Frodo FrodoPC FrodoSC
|
|
||||||
|
|
||||||
sysconfig.h: sysconfig.h.Host-SDL
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
Frodo: sysconfig.h $(SLOBJS)
|
|
||||||
$(CXX) -o Frodo $(SLOBJS) $(LDFLAGS) $(LIBS)
|
|
||||||
cp Frodo ..
|
|
||||||
|
|
||||||
FrodoPC: $(PCOBJS)
|
|
||||||
$(CXX) -o FrodoPC $(PCOBJS) $(LDFLAGS) $(LIBS)
|
|
||||||
cp FrodoPC ..
|
|
||||||
|
|
||||||
FrodoSC: $(SCOBJS)
|
|
||||||
$(CXX) -o FrodoSC $(SCOBJS) $(LDFLAGS) $(LIBS)
|
|
||||||
cp FrodoSC ..
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(SLOBJS) $(PCOBJS) $(SCOBJS) sysconfig.h
|
|
||||||
rm -f Frodo FrodoPC FrodoSC
|
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
rm -rf autom4te.cache
|
|
||||||
rm -f Makefile sysconfig.h
|
|
||||||
rm -f config.cache config.log config.status config.h
|
|
||||||
|
|
||||||
depend dep:
|
|
||||||
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
|
|
||||||
|
|
||||||
.cpp.o:
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
.cpp.s:
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(EXTRAFLAGS) -o $@ -S $*.cpp -g0
|
|
||||||
|
|
||||||
C64_PC.o: C64.cpp C64.h C64_SDL.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPUC64_PC.o: CPUC64.cpp CPUC64.h CPU_emulline.i C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPU1541_PC.o: CPU1541.cpp CPU1541.h CPU_emulline.i 1541job.h C64.h CIA.h Display.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
C64_SC.o: C64_SC.cpp C64.h C64_SDL.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPUC64_SC.o: CPUC64_SC.cpp CPUC64.h CPU_emulcycle.i CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CPU1541_SC.o: CPU1541_SC.cpp CPU1541.h CPU_emulcycle.i CPU_common.h 1541job.h C64.h CIA.h Display.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
VIC_SC.o: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
CIA_SC.o: CIA_SC.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
||||||
|
|
||||||
main.o: sysdeps.h sysconfig.h main.h C64.h Display.h Prefs.h SAM.h
|
|
||||||
Display.o: sysdeps.h sysconfig.h Display.h main.h Prefs.h
|
|
||||||
Prefs.o: sysdeps.h sysconfig.h Prefs.h Display.h C64.h main.h
|
|
||||||
SID.o: sysdeps.h sysconfig.h SID.h Prefs.h SID_SDL.i
|
|
||||||
REU.o: sysdeps.h sysconfig.h REU.h CPUC64.h C64.h Prefs.h
|
|
||||||
IEC.o: sysdeps.h sysconfig.h IEC.h 1541fs.h 1541d64.h 1541t64.h Prefs.h
|
|
||||||
IEC.o: Display.h
|
|
||||||
1541fs.o: sysdeps.h sysconfig.h 1541fs.h IEC.h main.h Prefs.h
|
|
||||||
1541d64.o: sysdeps.h sysconfig.h 1541d64.h IEC.h Prefs.h
|
|
||||||
1541t64.o: sysdeps.h sysconfig.h 1541t64.h IEC.h Prefs.h
|
|
||||||
1541job.o: sysdeps.h sysconfig.h 1541job.h CPU1541.h CIA.h Prefs.h C64.h
|
|
||||||
SAM.o: sysdeps.h sysconfig.h SAM.h C64.h CPUC64.h CPU1541.h CIA.h Prefs.h
|
|
||||||
SAM.o: VIC.h SID.h
|
|
||||||
CmdPipe.o: CmdPipe.h
|
|
||||||
C64.o: sysdeps.h sysconfig.h C64.h CPUC64.h CPU1541.h CIA.h Prefs.h VIC.h C64_SDL.i
|
|
||||||
C64.o: SID.h REU.h IEC.h 1541job.h Display.h
|
|
||||||
C64_PC.o: C64.cpp sysdeps.h sysconfig.h C64.h CPUC64.h CPU1541.h CIA.h
|
|
||||||
C64_PC.o: Prefs.h VIC.h SID.h REU.h IEC.h 1541job.h Display.h
|
|
||||||
C64_SC.o: C64.cpp sysdeps.h sysconfig.h C64.h CPUC64.h CPU1541.h CIA.h
|
|
||||||
C64_SC.o: Prefs.h VIC.h SID.h REU.h IEC.h 1541job.h Display.h
|
|
||||||
CPUC64.o: sysdeps.h sysconfig.h CPUC64.h C64.h VIC.h SID.h CIA.h Prefs.h
|
|
||||||
CPUC64.o: REU.h IEC.h Display.h Version.h CPU_emulline.i
|
|
||||||
CPUC64_PC.o: CPUC64.cpp sysdeps.h sysconfig.h CPUC64.h C64.h VIC.h SID.h
|
|
||||||
CPUC64_PC.o: CIA.h Prefs.h REU.h IEC.h Display.h Version.h CPU_emulline.i
|
|
||||||
CPUC64_SC.o: sysdeps.h sysconfig.h CPUC64.h C64.h CPU_common.h VIC.h SID.h
|
|
||||||
CPUC64_SC.o: CIA.h Prefs.h REU.h IEC.h Display.h Version.h CPU_emulcycle.i
|
|
||||||
VIC.o: sysdeps.h sysconfig.h VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|
||||||
VIC_SC.o: sysdeps.h sysconfig.h VIC.h C64.h CPUC64.h Display.h Prefs.h
|
|
||||||
CIA.o: sysdeps.h sysconfig.h CIA.h Prefs.h CPUC64.h C64.h CPU1541.h VIC.h
|
|
||||||
CIA_SC.o: sysdeps.h sysconfig.h CIA.h Prefs.h CPUC64.h C64.h CPU1541.h VIC.h
|
|
||||||
CPU1541.o: sysdeps.h sysconfig.h CPU1541.h CIA.h Prefs.h C64.h 1541job.h
|
|
||||||
CPU1541.o: Display.h CPU_emulline.i
|
|
||||||
CPU1541_PC.o: CPU1541.cpp sysdeps.h sysconfig.h CPU1541.h CIA.h Prefs.h C64.h
|
|
||||||
CPU1541_PC.o: 1541job.h Display.h CPU_emulline.i
|
|
||||||
CPU1541_SC.o: sysdeps.h sysconfig.h CPU1541.h CIA.h Prefs.h C64.h
|
|
||||||
CPU1541_SC.o: CPU_common.h 1541job.h Display.h CPU_emulcycle.i
|
|
||||||
CPU_common.o: sysdeps.h sysconfig.h CPU_common.h
|
|
121
Src/Makefile.in
121
Src/Makefile.in
@ -1,57 +1,83 @@
|
|||||||
# Makefile.in for Frodo (generic Unix/X11)
|
# Makefile.in for Frodo (generic Unix/X11)
|
||||||
# Copyright (C) 1995-1997 Christian Bauer <cbauer@iphcip1.physik.uni-mainz.de>
|
|
||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
REVISION = 1
|
REVISION = 3
|
||||||
|
|
||||||
|
## System specific configuration
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
CXX = @CXX@
|
SHELL = /bin/sh
|
||||||
LIBS = @LIBS@
|
|
||||||
CFLAGS = @CFLAGS@ -I./ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
libdir = @libdir@
|
datadir = @datadir@
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
|
|
||||||
.SUFFIXES: .o .cpp .h
|
DESTDIR =
|
||||||
|
|
||||||
|
CXX = @CXX@
|
||||||
|
CFLAGS = @CFLAGS@ @GLADE_CFLAGS@ @OSSO_CFLAGS@ -I./ -DKBD_LANG=@KBD_LANG@
|
||||||
|
DEFS = @DEFS@ -DDATADIR=\"$(datadir)/frodo/\" -DBINDIR=\"$(bindir)/\"
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBS = @LIBS@ @GLADE_LIBS@ @OSSO_LIBS@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
OBJS = main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o \
|
GUIOBJS = @GUIOBJS@
|
||||||
|
OBJS = $(GUIOBJS) main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o \
|
||||||
1541d64.o 1541t64.o 1541job.o SAM.o CmdPipe.o
|
1541d64.o 1541t64.o 1541job.o SAM.o CmdPipe.o
|
||||||
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
||||||
PCOBJS = $(OBJS) C64_PC.o CPUC64_PC.o VIC.o CIA.o CPU1541_PC.o
|
SLFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
||||||
PCFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
|
||||||
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
||||||
SCFLAGS = -DFRODO_SC
|
SCFLAGS = -DFRODO_SC
|
||||||
SRCS = main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
GUISRCS = @GUISRCS@
|
||||||
|
SRCS = $(GUISRCS) main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
||||||
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
||||||
C64_PC.cpp C64_SC.cpp CPUC64.cpp CPUC64_PC.cpp CPUC64_SC.cpp \
|
C64_SC.cpp CPUC64.cpp CPUC64_SC.cpp VIC.cpp VIC_SC.cpp CIA.cpp \
|
||||||
VIC.cpp VIC_SC.cpp CIA.cpp CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp \
|
CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp CPU1541_SC.cpp CPU_common.cpp
|
||||||
CPU1541_SC.cpp CPU_common.cpp
|
|
||||||
|
|
||||||
all: Frodo FrodoPC FrodoSC
|
## Rules
|
||||||
|
.PHONY: install installdirs uninstall clean distclean depend dep
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .o .cpp .h
|
||||||
|
|
||||||
|
all: Frodo FrodoSC
|
||||||
|
|
||||||
Frodo: $(SLOBJS)
|
Frodo: $(SLOBJS)
|
||||||
$(CXX) -o Frodo $(SLOBJS) $(LDFLAGS) $(LIBS)
|
$(CXX) -o Frodo $(LDFLAGS) $(SLOBJS) $(LIBS)
|
||||||
cp Frodo ..
|
|
||||||
|
|
||||||
FrodoPC: $(PCOBJS)
|
|
||||||
$(CXX) -o FrodoPC $(PCOBJS) $(LDFLAGS) $(LIBS)
|
|
||||||
cp FrodoPC ..
|
|
||||||
|
|
||||||
FrodoSC: $(SCOBJS)
|
FrodoSC: $(SCOBJS)
|
||||||
$(CXX) -o FrodoSC $(SCOBJS) $(LDFLAGS) $(LIBS)
|
$(CXX) -o FrodoSC $(LDFLAGS) $(SCOBJS) $(LIBS)
|
||||||
cp FrodoSC ..
|
|
||||||
|
install: Frodo FrodoSC installdirs
|
||||||
|
$(INSTALL_PROGRAM) Frodo $(DESTDIR)$(bindir)/Frodo
|
||||||
|
$(INSTALL_PROGRAM) FrodoSC $(DESTDIR)$(bindir)/FrodoSC
|
||||||
|
$(INSTALL_PROGRAM) Frodo_GUI.tcl $(DESTDIR)$(bindir)/Frodo_GUI.tcl
|
||||||
|
$(INSTALL_DATA) ../Kernal\ ROM $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
|
||||||
|
$(INSTALL_DATA) glade/Frodo.glade $(DESTDIR)$(datadir)/frodo/Frodo.glade
|
||||||
|
$(INSTALL_DATA) maemo/frodo.desktop $(DESTDIR)$(datadir)/applications/hildon/frodo.desktop
|
||||||
|
$(INSTALL_DATA) maemo/frodo.service $(DESTDIR)$(datadir)/dbus-1/services/frodo.service
|
||||||
|
$(INSTALL_DATA) maemo/frodo.service $(DESTDIR)$(datadir)/dbus-1/services/frodo.service
|
||||||
|
$(INSTALL_DATA) maemo/Frodo_26_26.png $(DESTDIR)$(datadir)/icons/hicolor/26x26/hildon/frodo.png
|
||||||
|
$(INSTALL_DATA) maemo/Frodo_40_40.png $(DESTDIR)$(datadir)/icons/hicolor/40x40/hildon/frodo.png
|
||||||
|
$(INSTALL_DATA) maemo/Frodo_64_64.png $(DESTDIR)$(datadir)/icons/hicolor/scalable/hildon/frodo.png
|
||||||
|
|
||||||
|
installdirs:
|
||||||
|
$(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/frodo $(DESTDIR)$(datadir)/applications/hildon $(DESTDIR)$(datadir)/dbus-1/services $(DESTDIR)$(datadir)/icons/hicolor/26x26/hildon $(DESTDIR)$(datadir)/icons/hicolor/40x40/hildon $(DESTDIR)$(datadir)/icons/hicolor/scalable/hildon
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo
|
||||||
|
rm -f $(DESTDIR)$(bindir)/FrodoSC
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo_GUI.tcl
|
||||||
|
rm -f $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
|
||||||
|
rmdir $(DESTDIR)$(datadir)/frodo
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(SLOBJS) $(PCOBJS) $(SCOBJS)
|
rm -f $(SLOBJS) $(SCOBJS)
|
||||||
rm -f Frodo FrodoPC FrodoSC
|
rm -f Frodo FrodoSC
|
||||||
|
rm -f core* *.core *~ *.bak
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf autom4te.cache
|
rm -rf autom4te.cache
|
||||||
@ -62,34 +88,31 @@ depend dep:
|
|||||||
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
|
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
.cpp.s:
|
C64.o: C64.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(EXTRAFLAGS) -o $@ -S $*.cpp -g0
|
$(CXX) $(DEFS) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
C64_PC.o: C64.cpp C64.h C64_x.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
C64_SC.o: C64_SC.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CPUC64_PC.o: CPUC64.cpp CPUC64.h CPU_emulline.i C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPUC64.o: CPUC64.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CPU1541_PC.o: CPU1541.cpp CPU1541.h CPU_emulline.i 1541job.h C64.h CIA.h Display.h
|
CPUC64_SC.o: CPUC64_SC.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
C64_SC.o: C64_SC.cpp C64.h C64_x.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
|
CPU1541.o: CPU1541.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CPUC64_SC.o: CPUC64_SC.cpp CPUC64.h CPU_emulcycle.i CPU_common.h C64.h VIC.h SID.h CIA.h REU.h IEC.h Display.h Version.h
|
CPU1541_SC.o: CPU1541_SC.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CPU1541_SC.o: CPU1541_SC.cpp CPU1541.h CPU_emulcycle.i CPU_common.h 1541job.h C64.h CIA.h Display.h
|
VIC_SC.o: VIC_SC.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
VIC_SC.o: VIC_SC.cpp VIC.h C64.h CPUC64.h Display.h Prefs.h
|
CIA_SC.o: CIA_SC.cpp
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
CIA_SC.o: CIA_SC.cpp CIA.h CPUC64.h CPU1541.h VIC.h Prefs.h
|
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
78
Src/Makefile.wii
Normal file
78
Src/Makefile.wii
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
# Makefile.in for Frodo (generic Unix/X11)
|
||||||
|
include $(DEVKITPPC)/wii_rules
|
||||||
|
## Version information
|
||||||
|
VERSION = 4
|
||||||
|
REVISION = 3
|
||||||
|
|
||||||
|
## System specific configuration
|
||||||
|
|
||||||
|
#SHELL = /bin/sh
|
||||||
|
|
||||||
|
#prefix = /usr/local
|
||||||
|
#exec_prefix = ${prefix}
|
||||||
|
#bindir = ${exec_prefix}/bin
|
||||||
|
#datadir = ${prefix}/share
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Files
|
||||||
|
GUIOBJS = sdlgui.o file.o dlgFileSelect.o dlgMain.o dlgDrives.o dlgOptions.o dlgVideoSound.o dlgAdvanced.o dlgInput.o
|
||||||
|
OBJS = $(GUIOBJS) main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o \
|
||||||
|
1541d64.o 1541t64.o 1541job.o SAM.o
|
||||||
|
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
||||||
|
SLFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
||||||
|
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
||||||
|
SCFLAGS = -DFRODO_SC
|
||||||
|
GUISRCS = sdlgui.cpp file.cpp dlgFileSelect.cpp dlgMain.cpp dlgDrives.cpp dlgOptions.cpp dlgVidoSound.cpp dlgAdvanced.cpp dlgInput.cpp
|
||||||
|
SRCS = $(GUISRCS) main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
||||||
|
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
||||||
|
C64_SC.cpp CPUC64.cpp CPUC64_SC.cpp VIC.cpp VIC_SC.cpp CIA.cpp \
|
||||||
|
CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp CPU1541_SC.cpp CPU_common.cpp
|
||||||
|
#CXX = g++
|
||||||
|
|
||||||
|
CFLAGS = $(SLFLAGS) -g -O0 -fomit-frame-pointer -fno-exceptions $(MACHDEP) -I. -I$(DEVKITPRO)/libogc/include/ -I$(DEVKITPRO)/libogc/include/SDL -DHAVE_SDL -DWII -I./ -DKBD_LANG=0
|
||||||
|
DEFS = -DHAVE_CONFIG_H -DDATADIR=\"/frodo/\" -DBINDIR=\"/frodo/\"
|
||||||
|
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||||
|
LIBS = -L$(DEVKITPRO)/libogc/lib/wii -lSDL -lwiiuse -lbte -ldb -lfat -logc -lz -lm
|
||||||
|
CXXFLAGS = $(CFLAGS)
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
.PHONY: install installdirs uninstall clean distclean depend dep
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .o .cpp .h
|
||||||
|
|
||||||
|
all: boot.dol #FrodoSC
|
||||||
|
|
||||||
|
Frodo.elf: $(SLOBJS)
|
||||||
|
$(CXX) -o Frodo.elf $(CFLAGS) $(LDFLAGS) $(SLOBJS) $(LIBS)
|
||||||
|
#@powerpc-gekko-objcopy -O binary $< $@
|
||||||
|
|
||||||
|
FrodoSC: $(SCOBJS)
|
||||||
|
$(CXX) -o FrodoSC $(LDFLAGS) $(SCOBJS) $(LIBS)
|
||||||
|
|
||||||
|
boot.dol: Frodo.dol
|
||||||
|
cp Frodo.dol boot.dol
|
||||||
|
|
||||||
|
Frodo.dol: Frodo.elf
|
||||||
|
|
||||||
|
%.bin.o : %.bin
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
@echo $(notdir $<)
|
||||||
|
$(bin2o)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo
|
||||||
|
rm -f $(DESTDIR)$(bindir)/FrodoSC
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo_GUI.tcl
|
||||||
|
rm -f $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
|
||||||
|
rmdir $(DESTDIR)$(datadir)/frodo
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(SLOBJS) $(SCOBJS)
|
||||||
|
rm -f Frodo FrodoSC
|
||||||
|
rm -f core* *.core *~ *.bak
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
@ -1,18 +1,14 @@
|
|||||||
# Makefile.in for Frodo (RISC OS with GCC)
|
# Makefile for Frodo (RISC OS with GCC)
|
||||||
# Copyright (C) 1995-1997 Christian Bauer <cbauer@iphcip1.physik.uni-mainz.de>
|
|
||||||
# Acorn port 1997 by Andreas Dehmel
|
|
||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
REVISION = 0
|
REVISION = 2
|
||||||
|
|
||||||
CXX = gcc
|
CXX = gcc
|
||||||
CFLAGS = -O2
|
CFLAGS = -O2
|
||||||
CFLAGSO = -O3
|
CFLAGSO = -O3
|
||||||
SCFLAGS = -O2 -DFRODO_SC
|
SCFLAGS = -O2 -DFRODO_SC
|
||||||
SCFLAGSO = -O3 -DFRODO_SC
|
SCFLAGSO = -O3 -DFRODO_SC
|
||||||
PCFLAGS = -O2 -DFRODO_PC
|
|
||||||
PCFLAGSO = -O3 -DFRODO_PC
|
|
||||||
|
|
||||||
LIBRARIES = GCC:o.libgcc C:o.stubs
|
LIBRARIES = GCC:o.libgcc C:o.stubs
|
||||||
LINK = drlink
|
LINK = drlink
|
||||||
@ -23,24 +19,18 @@ OBJS = o.Prefs o.REU o.IEC o.1541fs o.1541d64 o.1541t64 o.1541job o.SAM o.ROli
|
|||||||
SLOBJS = $(OBJS) o.C64 o.CPUC64 o.VIC o.CIA o.CPU1541 o.Display o.SID o.main o.AcornGUI
|
SLOBJS = $(OBJS) o.C64 o.CPUC64 o.VIC o.CIA o.CPU1541 o.Display o.SID o.main o.AcornGUI
|
||||||
SCOBJS = $(OBJS) o.C64_SC o.CPUC64_SC o.VIC_SC o.CIA_SC o.CPU1541_SC o.CPU_common o.Display_SC\
|
SCOBJS = $(OBJS) o.C64_SC o.CPUC64_SC o.VIC_SC o.CIA_SC o.CPU1541_SC o.CPU_common o.Display_SC\
|
||||||
o.main_SC o.SID_SC o.AcornGUI_SC
|
o.main_SC o.SID_SC o.AcornGUI_SC
|
||||||
PCOBJS = $(OBJS) o.C64_PC o.CPUC64_PC o.VIC o.CIA o.CPU1541_PC o.Display o.main_PC o.SID\
|
|
||||||
o.AcornGUI_PC
|
|
||||||
|
|
||||||
|
all: Frodo FrodoSC
|
||||||
all: Frodo FrodoSC FrodoPC
|
|
||||||
|
|
||||||
Frodo: $(SLOBJS)
|
Frodo: $(SLOBJS)
|
||||||
$(LINK) -o Frodo $(LIBRARIES) $(SLOBJS) $(LDFLAGS)
|
$(LINK) -o Frodo $(LIBRARIES) $(SLOBJS) $(LDFLAGS)
|
||||||
|
|
||||||
FrodoSC: $(SCOBJS)
|
|
||||||
$(LINK) -o FrodoSC $(LIBRARIES) $(SCOBJS) $(LDFLAGS)
|
|
||||||
|
|
||||||
FrodoPC: $(PCOBJS)
|
FrodoPC: $(PCOBJS)
|
||||||
$(LINK) -o FrodoPC $(LIBRARIES) $(PCOBJS) $(LDFLAGS)
|
$(LINK) -o FrodoPC $(LIBRARIES) $(PCOBJS) $(LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# SC objects
|
# SC objects
|
||||||
o.C64_SC: cc.C64 h.C64 i.C64_Acorn h.CPUC64 h.CPU1541 h.VIC h.SID h.CIA h.REU \
|
o.C64_SC: cc.C64_SC h.C64 i.C64_Acorn h.CPUC64 h.CPU1541 h.VIC h.SID h.CIA h.REU \
|
||||||
h.IEC h.1541job h.Display h.Prefs h.ROlib h.AcornGUI i.OldSnap
|
h.IEC h.1541job h.Display h.Prefs h.ROlib h.AcornGUI i.OldSnap
|
||||||
$(CXX) $(INCLUDES) $(SCFLAGS) -c C64_SC.cc
|
$(CXX) $(INCLUDES) $(SCFLAGS) -c C64_SC.cc
|
||||||
|
|
||||||
@ -74,30 +64,6 @@ o.AcornGUI_SC: cc.AcornGUI_SC cc.AcornGUI h.AcornGUI h.ROlib h.main h.Prefs h.C6
|
|||||||
h.Version
|
h.Version
|
||||||
$(CXX) $(INCLUDES) $(SCFLAGS) -c AcornGUI_SC.cc
|
$(CXX) $(INCLUDES) $(SCFLAGS) -c AcornGUI_SC.cc
|
||||||
|
|
||||||
|
|
||||||
# PC objects
|
|
||||||
o.C64_PC: cc.C64 h.C64 i.C64_Acorn h.CPUC64 h.CPU1541 h.VIC h.SID h.CIA h.REU \
|
|
||||||
h.IEC h.1541job h.Display h.Prefs h.ROlib h.AcornGUI i.OldSnap
|
|
||||||
$(CXX) $(INCLUDES) $(PCFLAGS) -c C64_PC.cc
|
|
||||||
|
|
||||||
o.CPUC64_PC: cc.CPUC64_PC cc.CPUC64 h.CPUC64 i.CPU_emulline h.C64 h.VIC h.SID h.CIA \
|
|
||||||
h.REU h.IEC h.Display h.Version h.ROlib
|
|
||||||
$(CXX) $(INCLUDES) $(PCFLAGSO) -c CPUC64_PC.cc
|
|
||||||
|
|
||||||
o.CPU1541_PC: cc.CPU1541_PC cc.CPU1541 h.CPU1541 i.CPU_emulline h.1541job h.C64 h.CIA \
|
|
||||||
h.Display h.ROlib
|
|
||||||
$(CXX) $(INCLUDES) $(PCFLAGSO) -c CPU1541_PC.cc
|
|
||||||
|
|
||||||
## These were added for RISC OS -- same source code, but different object files needed!
|
|
||||||
o.main_PC: cc.main_PC cc.main h.main i.main_Acorn h.C64 h.Display h.Prefs h.SAM h.ROlib\
|
|
||||||
h.AcornGUI
|
|
||||||
$(CXX) $(INCLUDES) $(PCFLAGS) -c main_PC.cc
|
|
||||||
|
|
||||||
o.AcornGUI_PC: cc.AcornGUI_PC cc.AcornGUI h.AcornGUI h.ROlib h.main h.Prefs h.C64 h.VIC\
|
|
||||||
h.Version
|
|
||||||
$(CXX) $(INCLUDES) $(PCFLAGS) -c AcornGUI_PC.cc
|
|
||||||
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
o.main: cc.main h.main i.main_Acorn h.C64 h.Display h.Prefs h.SAM h.ROlib h.AcornGUI
|
o.main: cc.main h.main i.main_Acorn h.C64 h.Display h.Prefs h.SAM h.ROlib h.AcornGUI
|
||||||
$(CXX) $(INCLUDES) $(CFLAGS) -c main.cc
|
$(CXX) $(INCLUDES) $(CFLAGS) -c main.cc
|
||||||
|
118
Src/ORGMakefile
Normal file
118
Src/ORGMakefile
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
# Makefile.in for Frodo (generic Unix/X11)
|
||||||
|
|
||||||
|
## Version information
|
||||||
|
VERSION = 4
|
||||||
|
REVISION = 3
|
||||||
|
|
||||||
|
## System specific configuration
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
prefix = /usr/local
|
||||||
|
exec_prefix = ${prefix}
|
||||||
|
bindir = ${exec_prefix}/bin
|
||||||
|
datadir = ${prefix}/share
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
CXX = g++
|
||||||
|
CFLAGS = -g -O2 -fomit-frame-pointer -fno-exceptions -I/c/Dev-Cpp/include/SDL -Dmain=SDL_main -DHAVE_SDL -DWII -I./ -DKBD_LANG=0
|
||||||
|
DEFS = -DHAVE_CONFIG_H -DDATADIR=\"$(datadir)/frodo/\" -DBINDIR=\"$(bindir)/\"
|
||||||
|
LDFLAGS =
|
||||||
|
LIBS = -L/c/Dev-Cpp/lib -lmingw32 -lSDLmain -lSDL -mwindows
|
||||||
|
INSTALL = /bin/install -c
|
||||||
|
INSTALL_PROGRAM = ${INSTALL}
|
||||||
|
INSTALL_DATA = ${INSTALL} -m 644
|
||||||
|
|
||||||
|
## Files
|
||||||
|
GUIOBJS =
|
||||||
|
OBJS = $(GUIOBJS) main.o Display.o Prefs.o SID.o REU.o IEC.o 1541fs.o \
|
||||||
|
1541d64.o 1541t64.o 1541job.o SAM.o CmdPipe.o
|
||||||
|
SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o
|
||||||
|
SLFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
||||||
|
SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o
|
||||||
|
SCFLAGS = -DFRODO_SC
|
||||||
|
GUISRCS =
|
||||||
|
SRCS = $(GUISRCS) main.cpp Display.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \
|
||||||
|
1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp CmdPipe.cpp C64.cpp \
|
||||||
|
C64_SC.cpp CPUC64.cpp CPUC64_SC.cpp VIC.cpp VIC_SC.cpp CIA.cpp \
|
||||||
|
CIA_SC.cpp CPU1541.cpp CPU1541_PC.cpp CPU1541_SC.cpp CPU_common.cpp
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
.PHONY: install installdirs uninstall clean distclean depend dep
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .o .cpp .h
|
||||||
|
|
||||||
|
all: Frodo FrodoSC
|
||||||
|
|
||||||
|
Frodo: $(SLOBJS)
|
||||||
|
$(CXX) -o Frodo $(LDFLAGS) $(SLOBJS) $(LIBS)
|
||||||
|
|
||||||
|
FrodoSC: $(SCOBJS)
|
||||||
|
$(CXX) -o FrodoSC $(LDFLAGS) $(SCOBJS) $(LIBS)
|
||||||
|
|
||||||
|
install: Frodo FrodoSC installdirs
|
||||||
|
$(INSTALL_PROGRAM) Frodo $(DESTDIR)$(bindir)/Frodo
|
||||||
|
$(INSTALL_PROGRAM) FrodoSC $(DESTDIR)$(bindir)/FrodoSC
|
||||||
|
$(INSTALL_PROGRAM) Frodo_GUI.tcl $(DESTDIR)$(bindir)/Frodo_GUI.tcl
|
||||||
|
$(INSTALL_DATA) ../Kernal\ ROM $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
|
||||||
|
$(INSTALL_DATA) glade/Frodo.glade $(DESTDIR)$(datadir)/frodo/Frodo.glade
|
||||||
|
$(INSTALL_DATA) maemo/frodo.desktop $(DESTDIR)$(datadir)/applications/hildon/frodo.desktop
|
||||||
|
$(INSTALL_DATA) maemo/frodo.service $(DESTDIR)$(datadir)/dbus-1/services/frodo.service
|
||||||
|
$(INSTALL_DATA) maemo/frodo.service $(DESTDIR)$(datadir)/dbus-1/services/frodo.service
|
||||||
|
$(INSTALL_DATA) maemo/Frodo_26_26.png $(DESTDIR)$(datadir)/icons/hicolor/26x26/hildon/frodo.png
|
||||||
|
$(INSTALL_DATA) maemo/Frodo_40_40.png $(DESTDIR)$(datadir)/icons/hicolor/40x40/hildon/frodo.png
|
||||||
|
$(INSTALL_DATA) maemo/Frodo_64_64.png $(DESTDIR)$(datadir)/icons/hicolor/scalable/hildon/frodo.png
|
||||||
|
|
||||||
|
installdirs:
|
||||||
|
$(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/frodo $(DESTDIR)$(datadir)/applications/hildon $(DESTDIR)$(datadir)/dbus-1/services $(DESTDIR)$(datadir)/icons/hicolor/26x26/hildon $(DESTDIR)$(datadir)/icons/hicolor/40x40/hildon $(DESTDIR)$(datadir)/icons/hicolor/scalable/hildon
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo
|
||||||
|
rm -f $(DESTDIR)$(bindir)/FrodoSC
|
||||||
|
rm -f $(DESTDIR)$(bindir)/Frodo_GUI.tcl
|
||||||
|
rm -f $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
|
||||||
|
rmdir $(DESTDIR)$(datadir)/frodo
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(SLOBJS) $(SCOBJS)
|
||||||
|
rm -f Frodo FrodoSC
|
||||||
|
rm -f core* *.core *~ *.bak
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -rf autom4te.cache
|
||||||
|
rm -f Makefile sysconfig.h
|
||||||
|
rm -f config.cache config.log config.status config.h
|
||||||
|
|
||||||
|
depend dep:
|
||||||
|
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
C64.o: C64.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
C64_SC.o: C64_SC.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CPUC64.o: CPUC64.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CPUC64_SC.o: CPUC64_SC.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CPU1541.o: CPU1541.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SLFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CPU1541_SC.o: CPU1541_SC.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
VIC_SC.o: VIC_SC.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
CIA_SC.o: CIA_SC.cpp
|
||||||
|
$(CXX) $(DEFS) $(CFLAGS) $(SCFLAGS) -o $@ -c $*.cpp
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
175
Src/Prefs.cpp
175
Src/Prefs.cpp
@ -1,7 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Prefs.cpp - Global preferences
|
* Prefs.cpp - Global preferences
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sysdeps.h"
|
#include "sysdeps.h"
|
||||||
@ -29,16 +43,13 @@ Prefs::Prefs()
|
|||||||
BadLineCycles = 23;
|
BadLineCycles = 23;
|
||||||
CIACycles = 63;
|
CIACycles = 63;
|
||||||
FloppyCycles = 64;
|
FloppyCycles = 64;
|
||||||
SkipFrames = 0;
|
SkipFrames = 1;
|
||||||
LatencyMin = 80;
|
LatencyMin = 80;
|
||||||
LatencyMax = 120;
|
LatencyMax = 120;
|
||||||
LatencyAvg = 280;
|
LatencyAvg = 280;
|
||||||
ScalingNumerator = 2;
|
ScalingNumerator = 2;
|
||||||
ScalingDenominator = 2;
|
ScalingDenominator = 2;
|
||||||
|
|
||||||
for (int i=0; i<4; i++)
|
|
||||||
DriveType[i] = DRVTYPE_DIR;
|
|
||||||
|
|
||||||
strcpy(DrivePath[0], "64prgs");
|
strcpy(DrivePath[0], "64prgs");
|
||||||
strcpy(DrivePath[1], "");
|
strcpy(DrivePath[1], "");
|
||||||
strcpy(DrivePath[2], "");
|
strcpy(DrivePath[2], "");
|
||||||
@ -47,19 +58,19 @@ Prefs::Prefs()
|
|||||||
strcpy(ViewPort, "Default");
|
strcpy(ViewPort, "Default");
|
||||||
strcpy(DisplayMode, "Default");
|
strcpy(DisplayMode, "Default");
|
||||||
|
|
||||||
SIDType = SIDTYPE_NONE;
|
SIDType = SIDTYPE_DIGITAL;
|
||||||
REUSize = REU_NONE;
|
REUSize = REU_NONE;
|
||||||
DisplayType = DISPTYPE_WINDOW;
|
DisplayType = DISPTYPE_WINDOW;
|
||||||
|
Joystick1Port = 1;
|
||||||
|
Joystick2Port = 1;
|
||||||
|
|
||||||
SpritesOn = true;
|
SpritesOn = true;
|
||||||
SpriteCollisions = true;
|
SpriteCollisions = true;
|
||||||
Joystick1On = false;
|
|
||||||
Joystick2On = false;
|
|
||||||
JoystickSwap = false;
|
JoystickSwap = false;
|
||||||
LimitSpeed = false;
|
LimitSpeed = true;
|
||||||
FastReset = false;
|
FastReset = true;
|
||||||
CIAIRQHack = false;
|
CIAIRQHack = false;
|
||||||
MapSlash = true;
|
MapSlash = false;
|
||||||
Emul1541Proc = false;
|
Emul1541Proc = false;
|
||||||
SIDFilters = true;
|
SIDFilters = true;
|
||||||
DoubleScan = true;
|
DoubleScan = true;
|
||||||
@ -72,14 +83,6 @@ Prefs::Prefs()
|
|||||||
AlwaysCopy = false;
|
AlwaysCopy = false;
|
||||||
SystemKeys = true;
|
SystemKeys = true;
|
||||||
ShowLEDs = true;
|
ShowLEDs = true;
|
||||||
|
|
||||||
#ifdef HAVE_SDL
|
|
||||||
for (int i = 0; i < N_WIIMOTE_BINDINGS; i++)
|
|
||||||
this->JoystickKeyBinding[i] = -1;
|
|
||||||
|
|
||||||
this->DisplayOption = 0;
|
|
||||||
this->MsPerFrame = 38;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,10 +103,6 @@ bool Prefs::operator==(const Prefs &rhs) const
|
|||||||
&& LatencyAvg == rhs.LatencyAvg
|
&& LatencyAvg == rhs.LatencyAvg
|
||||||
&& ScalingNumerator == rhs.ScalingNumerator
|
&& ScalingNumerator == rhs.ScalingNumerator
|
||||||
&& ScalingDenominator == rhs.ScalingNumerator
|
&& ScalingDenominator == rhs.ScalingNumerator
|
||||||
&& DriveType[0] == rhs.DriveType[0]
|
|
||||||
&& DriveType[1] == rhs.DriveType[1]
|
|
||||||
&& DriveType[2] == rhs.DriveType[2]
|
|
||||||
&& DriveType[3] == rhs.DriveType[3]
|
|
||||||
&& strcmp(DrivePath[0], rhs.DrivePath[0]) == 0
|
&& strcmp(DrivePath[0], rhs.DrivePath[0]) == 0
|
||||||
&& strcmp(DrivePath[1], rhs.DrivePath[1]) == 0
|
&& strcmp(DrivePath[1], rhs.DrivePath[1]) == 0
|
||||||
&& strcmp(DrivePath[2], rhs.DrivePath[2]) == 0
|
&& strcmp(DrivePath[2], rhs.DrivePath[2]) == 0
|
||||||
@ -115,8 +114,8 @@ bool Prefs::operator==(const Prefs &rhs) const
|
|||||||
&& DisplayType == rhs.DisplayType
|
&& DisplayType == rhs.DisplayType
|
||||||
&& SpritesOn == rhs.SpritesOn
|
&& SpritesOn == rhs.SpritesOn
|
||||||
&& SpriteCollisions == rhs.SpriteCollisions
|
&& SpriteCollisions == rhs.SpriteCollisions
|
||||||
&& Joystick1On == rhs.Joystick1On
|
&& Joystick1Port == rhs.Joystick1Port
|
||||||
&& Joystick2On == rhs.Joystick2On
|
&& Joystick2Port == rhs.Joystick2Port
|
||||||
&& JoystickSwap == rhs.JoystickSwap
|
&& JoystickSwap == rhs.JoystickSwap
|
||||||
&& LimitSpeed == rhs.LimitSpeed
|
&& LimitSpeed == rhs.LimitSpeed
|
||||||
&& FastReset == rhs.FastReset
|
&& FastReset == rhs.FastReset
|
||||||
@ -134,23 +133,6 @@ bool Prefs::operator==(const Prefs &rhs) const
|
|||||||
&& AlwaysCopy == rhs.AlwaysCopy
|
&& AlwaysCopy == rhs.AlwaysCopy
|
||||||
&& SystemKeys == rhs.SystemKeys
|
&& SystemKeys == rhs.SystemKeys
|
||||||
&& ShowLEDs == rhs.ShowLEDs
|
&& ShowLEDs == rhs.ShowLEDs
|
||||||
#ifdef HAVE_SDL
|
|
||||||
&& this->JoystickKeyBinding[0] == rhs.JoystickKeyBinding[0]
|
|
||||||
&& this->JoystickKeyBinding[1] == rhs.JoystickKeyBinding[1]
|
|
||||||
&& this->JoystickKeyBinding[2] == rhs.JoystickKeyBinding[2]
|
|
||||||
&& this->JoystickKeyBinding[3] == rhs.JoystickKeyBinding[3]
|
|
||||||
&& this->JoystickKeyBinding[4] == rhs.JoystickKeyBinding[4]
|
|
||||||
&& this->JoystickKeyBinding[5] == rhs.JoystickKeyBinding[5]
|
|
||||||
&& this->JoystickKeyBinding[6] == rhs.JoystickKeyBinding[6]
|
|
||||||
&& this->JoystickKeyBinding[7] == rhs.JoystickKeyBinding[7]
|
|
||||||
&& this->JoystickKeyBinding[8] == rhs.JoystickKeyBinding[8]
|
|
||||||
&& this->JoystickKeyBinding[9] == rhs.JoystickKeyBinding[9]
|
|
||||||
&& this->JoystickKeyBinding[10] == rhs.JoystickKeyBinding[10]
|
|
||||||
&& this->JoystickKeyBinding[11] == rhs.JoystickKeyBinding[11]
|
|
||||||
&& this->JoystickKeyBinding[12] == rhs.JoystickKeyBinding[12]
|
|
||||||
&& this->DisplayOption == rhs.DisplayOption
|
|
||||||
&& this->MsPerFrame == rhs.MsPerFrame
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,10 +158,6 @@ void Prefs::Check(void)
|
|||||||
|
|
||||||
if (DisplayType < DISPTYPE_WINDOW || DisplayType > DISPTYPE_SCREEN)
|
if (DisplayType < DISPTYPE_WINDOW || DisplayType > DISPTYPE_SCREEN)
|
||||||
DisplayType = DISPTYPE_WINDOW;
|
DisplayType = DISPTYPE_WINDOW;
|
||||||
|
|
||||||
for (int i=0; i<4; i++)
|
|
||||||
if (DriveType[i] < DRVTYPE_DIR || DriveType[i] > DRVTYPE_T64)
|
|
||||||
DriveType[i] = DRVTYPE_DIR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -215,34 +193,6 @@ void Prefs::Load(char *filename)
|
|||||||
ScalingNumerator = atoi(value);
|
ScalingNumerator = atoi(value);
|
||||||
else if (!strcmp(keyword, "ScalingDenominator"))
|
else if (!strcmp(keyword, "ScalingDenominator"))
|
||||||
ScalingDenominator = atoi(value);
|
ScalingDenominator = atoi(value);
|
||||||
else if (!strcmp(keyword, "DriveType8"))
|
|
||||||
if (!strcmp(value, "DIR"))
|
|
||||||
DriveType[0] = DRVTYPE_DIR;
|
|
||||||
else if (!strcmp(value, "D64"))
|
|
||||||
DriveType[0] = DRVTYPE_D64;
|
|
||||||
else
|
|
||||||
DriveType[0] = DRVTYPE_T64;
|
|
||||||
else if (!strcmp(keyword, "DriveType9"))
|
|
||||||
if (!strcmp(value, "DIR"))
|
|
||||||
DriveType[1] = DRVTYPE_DIR;
|
|
||||||
else if (!strcmp(value, "D64"))
|
|
||||||
DriveType[1] = DRVTYPE_D64;
|
|
||||||
else
|
|
||||||
DriveType[1] = DRVTYPE_T64;
|
|
||||||
else if (!strcmp(keyword, "DriveType10"))
|
|
||||||
if (!strcmp(value, "DIR"))
|
|
||||||
DriveType[2] = DRVTYPE_DIR;
|
|
||||||
else if (!strcmp(value, "D64"))
|
|
||||||
DriveType[2] = DRVTYPE_D64;
|
|
||||||
else
|
|
||||||
DriveType[2] = DRVTYPE_T64;
|
|
||||||
else if (!strcmp(keyword, "DriveType11"))
|
|
||||||
if (!strcmp(value, "DIR"))
|
|
||||||
DriveType[3] = DRVTYPE_DIR;
|
|
||||||
else if (!strcmp(value, "D64"))
|
|
||||||
DriveType[3] = DRVTYPE_D64;
|
|
||||||
else
|
|
||||||
DriveType[3] = DRVTYPE_T64;
|
|
||||||
else if (!strcmp(keyword, "DrivePath8"))
|
else if (!strcmp(keyword, "DrivePath8"))
|
||||||
strcpy(DrivePath[0], value);
|
strcpy(DrivePath[0], value);
|
||||||
else if (!strcmp(keyword, "DrivePath9"))
|
else if (!strcmp(keyword, "DrivePath9"))
|
||||||
@ -273,14 +223,14 @@ void Prefs::Load(char *filename)
|
|||||||
REUSize = REU_NONE;
|
REUSize = REU_NONE;
|
||||||
} else if (!strcmp(keyword, "DisplayType"))
|
} else if (!strcmp(keyword, "DisplayType"))
|
||||||
DisplayType = strcmp(value, "SCREEN") ? DISPTYPE_WINDOW : DISPTYPE_SCREEN;
|
DisplayType = strcmp(value, "SCREEN") ? DISPTYPE_WINDOW : DISPTYPE_SCREEN;
|
||||||
|
else if (!strcmp(keyword, "Joystick1Port"))
|
||||||
|
Joystick1Port = atoi(value);
|
||||||
|
else if (!strcmp(keyword, "Joystick2Port"))
|
||||||
|
Joystick2Port = atoi(value);
|
||||||
else if (!strcmp(keyword, "SpritesOn"))
|
else if (!strcmp(keyword, "SpritesOn"))
|
||||||
SpritesOn = !strcmp(value, "TRUE");
|
SpritesOn = !strcmp(value, "TRUE");
|
||||||
else if (!strcmp(keyword, "SpriteCollisions"))
|
else if (!strcmp(keyword, "SpriteCollisions"))
|
||||||
SpriteCollisions = !strcmp(value, "TRUE");
|
SpriteCollisions = !strcmp(value, "TRUE");
|
||||||
else if (!strcmp(keyword, "Joystick1On"))
|
|
||||||
Joystick1On = !strcmp(value, "TRUE");
|
|
||||||
else if (!strcmp(keyword, "Joystick2On"))
|
|
||||||
Joystick2On = !strcmp(value, "TRUE");
|
|
||||||
else if (!strcmp(keyword, "JoystickSwap"))
|
else if (!strcmp(keyword, "JoystickSwap"))
|
||||||
JoystickSwap = !strcmp(value, "TRUE");
|
JoystickSwap = !strcmp(value, "TRUE");
|
||||||
else if (!strcmp(keyword, "LimitSpeed"))
|
else if (!strcmp(keyword, "LimitSpeed"))
|
||||||
@ -315,38 +265,6 @@ void Prefs::Load(char *filename)
|
|||||||
SystemKeys = !strcmp(value, "TRUE");
|
SystemKeys = !strcmp(value, "TRUE");
|
||||||
else if (!strcmp(keyword, "ShowLEDs"))
|
else if (!strcmp(keyword, "ShowLEDs"))
|
||||||
ShowLEDs = !strcmp(value, "TRUE");
|
ShowLEDs = !strcmp(value, "TRUE");
|
||||||
#if defined(HAVE_SDL)
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding0"))
|
|
||||||
JoystickKeyBinding[0] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding1"))
|
|
||||||
JoystickKeyBinding[1] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding2"))
|
|
||||||
JoystickKeyBinding[2] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding3"))
|
|
||||||
JoystickKeyBinding[3] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding4"))
|
|
||||||
JoystickKeyBinding[4] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding5"))
|
|
||||||
JoystickKeyBinding[5] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding6"))
|
|
||||||
JoystickKeyBinding[6] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding7"))
|
|
||||||
JoystickKeyBinding[7] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding8"))
|
|
||||||
JoystickKeyBinding[8] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding9"))
|
|
||||||
JoystickKeyBinding[9] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding10"))
|
|
||||||
JoystickKeyBinding[10] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding11"))
|
|
||||||
JoystickKeyBinding[11] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "JoystickKeyBinding12"))
|
|
||||||
JoystickKeyBinding[12] = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "DisplayOption"))
|
|
||||||
DisplayOption = atoi(value);
|
|
||||||
else if (!strcmp(keyword, "MsPerFrame"))
|
|
||||||
MsPerFrame = atoi(value);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
@ -377,21 +295,8 @@ bool Prefs::Save(char *filename)
|
|||||||
fprintf(file, "LatencyAvg = %d\n", LatencyAvg);
|
fprintf(file, "LatencyAvg = %d\n", LatencyAvg);
|
||||||
fprintf(file, "ScalingNumerator = %d\n", ScalingNumerator);
|
fprintf(file, "ScalingNumerator = %d\n", ScalingNumerator);
|
||||||
fprintf(file, "ScalingDenominator = %d\n", ScalingDenominator);
|
fprintf(file, "ScalingDenominator = %d\n", ScalingDenominator);
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++)
|
||||||
fprintf(file, "DriveType%d = ", i+8);
|
|
||||||
switch (DriveType[i]) {
|
|
||||||
case DRVTYPE_DIR:
|
|
||||||
fprintf(file, "DIR\n");
|
|
||||||
break;
|
|
||||||
case DRVTYPE_D64:
|
|
||||||
fprintf(file, "D64\n");
|
|
||||||
break;
|
|
||||||
case DRVTYPE_T64:
|
|
||||||
fprintf(file, "T64\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
fprintf(file, "DrivePath%d = %s\n", i+8, DrivePath[i]);
|
fprintf(file, "DrivePath%d = %s\n", i+8, DrivePath[i]);
|
||||||
}
|
|
||||||
fprintf(file, "ViewPort = %s\n", ViewPort);
|
fprintf(file, "ViewPort = %s\n", ViewPort);
|
||||||
fprintf(file, "DisplayMode = %s\n", DisplayMode);
|
fprintf(file, "DisplayMode = %s\n", DisplayMode);
|
||||||
fprintf(file, "SIDType = ");
|
fprintf(file, "SIDType = ");
|
||||||
@ -422,10 +327,10 @@ bool Prefs::Save(char *filename)
|
|||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
fprintf(file, "DisplayType = %s\n", DisplayType == DISPTYPE_WINDOW ? "WINDOW" : "SCREEN");
|
fprintf(file, "DisplayType = %s\n", DisplayType == DISPTYPE_WINDOW ? "WINDOW" : "SCREEN");
|
||||||
|
fprintf(file, "Joystick1Port = %d\n", Joystick1Port);
|
||||||
|
fprintf(file, "Joystick2Port = %d\n", Joystick2Port);
|
||||||
fprintf(file, "SpritesOn = %s\n", SpritesOn ? "TRUE" : "FALSE");
|
fprintf(file, "SpritesOn = %s\n", SpritesOn ? "TRUE" : "FALSE");
|
||||||
fprintf(file, "SpriteCollisions = %s\n", SpriteCollisions ? "TRUE" : "FALSE");
|
fprintf(file, "SpriteCollisions = %s\n", SpriteCollisions ? "TRUE" : "FALSE");
|
||||||
fprintf(file, "Joystick1On = %s\n", Joystick1On ? "TRUE" : "FALSE");
|
|
||||||
fprintf(file, "Joystick2On = %s\n", Joystick2On ? "TRUE" : "FALSE");
|
|
||||||
fprintf(file, "JoystickSwap = %s\n", JoystickSwap ? "TRUE" : "FALSE");
|
fprintf(file, "JoystickSwap = %s\n", JoystickSwap ? "TRUE" : "FALSE");
|
||||||
fprintf(file, "LimitSpeed = %s\n", LimitSpeed ? "TRUE" : "FALSE");
|
fprintf(file, "LimitSpeed = %s\n", LimitSpeed ? "TRUE" : "FALSE");
|
||||||
fprintf(file, "FastReset = %s\n", FastReset ? "TRUE" : "FALSE");
|
fprintf(file, "FastReset = %s\n", FastReset ? "TRUE" : "FALSE");
|
||||||
@ -443,14 +348,6 @@ bool Prefs::Save(char *filename)
|
|||||||
fprintf(file, "AlwaysCopy = %s\n", AlwaysCopy ? "TRUE" : "FALSE");
|
fprintf(file, "AlwaysCopy = %s\n", AlwaysCopy ? "TRUE" : "FALSE");
|
||||||
fprintf(file, "SystemKeys = %s\n", SystemKeys ? "TRUE" : "FALSE");
|
fprintf(file, "SystemKeys = %s\n", SystemKeys ? "TRUE" : "FALSE");
|
||||||
fprintf(file, "ShowLEDs = %s\n", ShowLEDs ? "TRUE" : "FALSE");
|
fprintf(file, "ShowLEDs = %s\n", ShowLEDs ? "TRUE" : "FALSE");
|
||||||
#if defined(HAVE_SDL)
|
|
||||||
for (int i = 0; i < N_WIIMOTE_BINDINGS; i++)
|
|
||||||
fprintf(file, "JoystickKeyBinding%d = %d\n",
|
|
||||||
i, JoystickKeyBinding[i]);
|
|
||||||
|
|
||||||
fprintf(file, "DisplayOption = %d\n", DisplayOption);
|
|
||||||
fprintf(file, "MsPerFrame = %d\n", MsPerFrame);
|
|
||||||
#endif
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
ThePrefsOnDisk = *this;
|
ThePrefsOnDisk = *this;
|
||||||
return true;
|
return true;
|
||||||
@ -460,13 +357,17 @@ bool Prefs::Save(char *filename)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
#include "Prefs_Be.i"
|
#include "Prefs_Be.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef AMIGA
|
#ifdef AMIGA
|
||||||
#include "Prefs_Amiga.i"
|
#include "Prefs_Amiga.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "Prefs_WIN32.i"
|
#include "Prefs_WIN32.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_GLADE
|
||||||
|
#include "Prefs_glade.h"
|
||||||
#endif
|
#endif
|
||||||
|
61
Src/Prefs.h
61
Src/Prefs.h
@ -1,21 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* Prefs.h - Global preferences
|
* Prefs.h - Global preferences
|
||||||
*
|
*
|
||||||
* Frodo (C) 1994-1997,2002 Christian Bauer
|
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PREFS_H
|
#ifndef _PREFS_H
|
||||||
#define _PREFS_H
|
#define _PREFS_H
|
||||||
|
|
||||||
|
|
||||||
// Drive types
|
|
||||||
enum {
|
|
||||||
DRVTYPE_DIR, // 1541 emulation in host file system
|
|
||||||
DRVTYPE_D64, // 1541 emulation in .d64 file
|
|
||||||
DRVTYPE_T64 // 1541 emulation in .t64 file
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// SID types
|
// SID types
|
||||||
enum {
|
enum {
|
||||||
SIDTYPE_NONE, // SID emulation off
|
SIDTYPE_NONE, // SID emulation off
|
||||||
@ -33,30 +39,12 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Display types (BeOS)
|
// Display types
|
||||||
enum {
|
enum {
|
||||||
DISPTYPE_WINDOW, // BWindow
|
DISPTYPE_WINDOW, // Window
|
||||||
DISPTYPE_SCREEN // BWindowScreen
|
DISPTYPE_SCREEN // Fullscreen
|
||||||
};
|
};
|
||||||
|
|
||||||
// Key bindings (WII)
|
|
||||||
enum {
|
|
||||||
WIIMOTE_A,
|
|
||||||
WIIMOTE_B,
|
|
||||||
WIIMOTE_PLUS,
|
|
||||||
WIIMOTE_MINUS,
|
|
||||||
WIIMOTE_1,
|
|
||||||
CLASSIC_X,
|
|
||||||
CLASSIC_Y,
|
|
||||||
CLASSIC_B,
|
|
||||||
CLASSIC_L,
|
|
||||||
CLASSIC_R,
|
|
||||||
CLASSIC_ZR,
|
|
||||||
CLASSIC_ZL,
|
|
||||||
N_WIIMOTE_BINDINGS
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Preferences data
|
// Preferences data
|
||||||
class Prefs {
|
class Prefs {
|
||||||
@ -76,8 +64,6 @@ public:
|
|||||||
int FloppyCycles; // Available 1541 CPU cycles per line
|
int FloppyCycles; // Available 1541 CPU cycles per line
|
||||||
int SkipFrames; // Draw every n-th frame
|
int SkipFrames; // Draw every n-th frame
|
||||||
|
|
||||||
int DriveType[4]; // Type of drive 8..11
|
|
||||||
|
|
||||||
char DrivePath[4][256]; // Path for drive 8..11
|
char DrivePath[4][256]; // Path for drive 8..11
|
||||||
|
|
||||||
char ViewPort[256]; // Size of the C64 screen to display (Win32)
|
char ViewPort[256]; // Size of the C64 screen to display (Win32)
|
||||||
@ -86,6 +72,8 @@ public:
|
|||||||
int SIDType; // SID emulation type
|
int SIDType; // SID emulation type
|
||||||
int REUSize; // Size of REU
|
int REUSize; // Size of REU
|
||||||
int DisplayType; // Display type (BeOS)
|
int DisplayType; // Display type (BeOS)
|
||||||
|
int Joystick1Port; // Port that joystick 1 is connected to (0 = no joystick, all other values are system dependant)
|
||||||
|
int Joystick2Port; // Port that joystick 2 is connected to
|
||||||
int LatencyMin; // Min msecs ahead of sound buffer (Win32)
|
int LatencyMin; // Min msecs ahead of sound buffer (Win32)
|
||||||
int LatencyMax; // Max msecs ahead of sound buffer (Win32)
|
int LatencyMax; // Max msecs ahead of sound buffer (Win32)
|
||||||
int LatencyAvg; // Averaging interval in msecs (Win32)
|
int LatencyAvg; // Averaging interval in msecs (Win32)
|
||||||
@ -94,8 +82,6 @@ public:
|
|||||||
|
|
||||||
bool SpritesOn; // Sprite display is on
|
bool SpritesOn; // Sprite display is on
|
||||||
bool SpriteCollisions; // Sprite collision detection is on
|
bool SpriteCollisions; // Sprite collision detection is on
|
||||||
bool Joystick1On; // Joystick connected to port 1 of host
|
|
||||||
bool Joystick2On; // Joystick connected to port 2 of host
|
|
||||||
bool JoystickSwap; // Swap joysticks 1<->2
|
bool JoystickSwap; // Swap joysticks 1<->2
|
||||||
bool LimitSpeed; // Limit speed to 100%
|
bool LimitSpeed; // Limit speed to 100%
|
||||||
bool FastReset; // Skip RAM test on reset
|
bool FastReset; // Skip RAM test on reset
|
||||||
@ -104,6 +90,7 @@ public:
|
|||||||
bool Emul1541Proc; // Enable processor-level 1541 emulation
|
bool Emul1541Proc; // Enable processor-level 1541 emulation
|
||||||
bool SIDFilters; // Emulate SID filters
|
bool SIDFilters; // Emulate SID filters
|
||||||
bool DoubleScan; // Double scan lines (BeOS, if DisplayType == DISPTYPE_SCREEN)
|
bool DoubleScan; // Double scan lines (BeOS, if DisplayType == DISPTYPE_SCREEN)
|
||||||
|
bool JoystickGeekPort; // Enable GeekPort joystick adapter
|
||||||
bool HideCursor; // Hide mouse cursor when visible (Win32)
|
bool HideCursor; // Hide mouse cursor when visible (Win32)
|
||||||
bool DirectSound; // Use direct sound (instead of wav) (Win32)
|
bool DirectSound; // Use direct sound (instead of wav) (Win32)
|
||||||
bool ExclusiveSound; // Use exclusive mode with direct sound (Win32)
|
bool ExclusiveSound; // Use exclusive mode with direct sound (Win32)
|
||||||
@ -132,12 +119,6 @@ private:
|
|||||||
static char *edit_prefs_name;
|
static char *edit_prefs_name;
|
||||||
static HWND hDlg;
|
static HWND hDlg;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SDL
|
|
||||||
int JoystickKeyBinding[N_WIIMOTE_BINDINGS];
|
|
||||||
int DisplayOption;
|
|
||||||
int MsPerFrame;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user