mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-20 22:33:22 +02:00
initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
**/CVS
|
||||
autom4te.cache/
|
||||
*.o
|
||||
/src/Makefile
|
||||
/src/atari800
|
||||
/src/config.h
|
||||
/src/config.h.in
|
||||
/src/config.log
|
||||
/src/config.status
|
||||
/src/configure
|
||||
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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) year 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.
|
||||
@@ -0,0 +1,114 @@
|
||||
Bugs and Known Problems
|
||||
-----------------------
|
||||
|
||||
* Cosmic Balance (game) hangs before the intro screen. This is probably
|
||||
due to inaccurate emulation of POKEY interrupts (see below). The program
|
||||
uses a hardware SIO loader as part of a presumed protection scheme.
|
||||
There is a bug in the code which activates the POKEY timers at an
|
||||
absurdly high frequency. This causes repeated interrupts which hangs the
|
||||
program.
|
||||
Probably there is some interaction with SIO which prevents this on
|
||||
a real Atari.
|
||||
A workaround is to invoke the monitor and type "c 10 40" and "cont".
|
||||
|
||||
* new Pokey engine doesn't switch to mono output in STEREO_SOUND config
|
||||
|
||||
* new Pokey engine doesn't support VOL_ONLY_SOUND on the second Pokey
|
||||
|
||||
* a few keyboard-related bugs: e.g. pressing SHIFT+1 and then
|
||||
releasing SHIFT should still give '!' characters
|
||||
|
||||
* The cycle-exact ANTIC/GTIA/CPU timing is not 100%.
|
||||
This causes display bugs in following programs:
|
||||
- Surf's up (game) (the horizon)
|
||||
- Satan's Hollow (game) (horizon) (confirmed sta WSYNC at WSYNC_C bug)
|
||||
- Dimension X (game) (alignment problem)
|
||||
- Te.mod (demo) (small glitched pixel in the final credits on the bottom left)
|
||||
- Our 5oft Unity Part (demo) (cycle-alignment, probably WSYNC)
|
||||
- Isolation (demo) (vector animations)
|
||||
- 80 Random Moving Rectangles (demo) (top left of rectangles, screen data
|
||||
is modified while drawing a scanline)
|
||||
- Sirius games: Scores and Text in Worm War I, Final Orbit, Spider City,
|
||||
Turmoil, Fantastic Voyage. These games store screen data in page 0
|
||||
and modify it each scan line. They reuse the same data for each
|
||||
scan line with an LMS on every line. This makes the code look
|
||||
like 2600 code. Emulating this requires trapping writes to
|
||||
page 0 and doing partial ANTIC loads.
|
||||
- Spider City has another bug in the map which is caused by player graphics
|
||||
and HPOS being changed before the player is finished being drawn. This
|
||||
is only possible for wide players.
|
||||
- Extract (demo) (face)
|
||||
|
||||
* Non-bugs:
|
||||
- Ergo Bibamus (demo) (one pixel of the flower above the perspective scroll)
|
||||
- Mail Order Monsters (game)
|
||||
(some colour changes do not align with text, occurs on a real Atari)
|
||||
- The Break (demo) (bugs on the left side of photo)
|
||||
- Star Raiders (disk image) (game) (doesn't work on XL/XE, select OS/B)
|
||||
- Many other disk images of cartridges that work on XL/XE require OS B
|
||||
because a once-popular cart dumping program for the Atari 800 generates
|
||||
an OS B-specific loader. IIRC it loads the image and jumps into the OS B
|
||||
RESET vector location, which is changed on the XL.
|
||||
- Strip Poker (game) (Atari Basic must be enabled)
|
||||
- Joust (Atari 5200 game) (the game sets all colors to black on PAL systems,
|
||||
you need to switch the emulator to NTSC mode)
|
||||
|
||||
* The following programs are improved by using the new cycle-exact code:
|
||||
- 8 Players Demo (demo)
|
||||
- Bewesoft's Demo (demo)
|
||||
- Bitter Reality (demo)
|
||||
- Demonic Laughter (music collection)
|
||||
- Extract (graphics collection)
|
||||
- GED (graphics editor)
|
||||
- Joyride (demo)
|
||||
- Mail Order Monsters (game)
|
||||
- Master of the Lamps (game)
|
||||
- Orneta '95 invitro (demo)
|
||||
- Our 5oft Unity Part (demo)
|
||||
- Studio Dream (demo)
|
||||
- Sweet Illusion (demo)
|
||||
- Te.mod (demo)
|
||||
- The Break (demo)
|
||||
- Miner 2049'er (game) (rotating 5's)
|
||||
- Dimension X (game) (title screen upper and lower bars)
|
||||
- Graphics impossible (demo) (Antic magazine)
|
||||
- Power Graph (graphics editor)
|
||||
- Darkness Warrior (picture)
|
||||
|
||||
* POKEY interrupts are scanline-, not cycle-exact.
|
||||
This causes display or sound bugs in following programs:
|
||||
- Joyride (demo) (white lines on title picture)
|
||||
- Mirax Force (game) (speech)
|
||||
- Saturday Demo (demo) (music)
|
||||
- The Last Guardian (game) (speech)
|
||||
- Digital Trash (demo) (music)
|
||||
|
||||
* VOL_ONLY_SOUND causes sound bugs in following programs:
|
||||
- Ghostbusters (game)
|
||||
- Overmind (demo)
|
||||
|
||||
* intensive 130xe-banks switching slows down emulation much.
|
||||
This causes performance problems in following programs:
|
||||
- Impossible but Real (demo)
|
||||
- Sheol (demo)
|
||||
- Total Daze (demo)
|
||||
- Ultra (demo)
|
||||
|
||||
* The following VAPI images are known to not work:
|
||||
(This list may not be complete, as full VAPI documentation
|
||||
has never been released by the author)
|
||||
- Alternate Reality: The City
|
||||
- Ankh
|
||||
- Attack at EP CYG 4
|
||||
- Ballblazer Activision (UK)
|
||||
- Jenny of the Prairie
|
||||
- Mercenary - Escape from Targ _ Novagen Software
|
||||
- Mr. Do!
|
||||
- Music Studio (The)
|
||||
- Promoteur
|
||||
- Rescue on Fractalus! _ Activision (UK)
|
||||
- Spy vs Spy
|
||||
- Targets - A Number Game
|
||||
|
||||
* SDL port uses call back system for filling sound buffer.
|
||||
This causes wrong sound effects (noise) in some games.
|
||||
@@ -0,0 +1,22 @@
|
||||
To compile use ps2dev from ps2dev.org
|
||||
Additional libraries neeeded:
|
||||
gsKit
|
||||
Additional Modules
|
||||
usbd.irx, kbd.irx, audsrv.irx
|
||||
Convert irx modules to *.s via bin2s,
|
||||
Copy *.s files to src directory.
|
||||
|
||||
./configure \
|
||||
--target=ps2 \
|
||||
--build=i686-pc-linux-gnu \
|
||||
--host=mipsel \
|
||||
--disable-stereosound \
|
||||
--disable-monitorbreak
|
||||
make
|
||||
|
||||
To install read DOC/INSTALL.ps2
|
||||
|
||||
Thanks Piotr of atari800!
|
||||
Thanks ps2dev! Esp NeoVanglist, author of gsKit.
|
||||
|
||||
-Troy Ayers
|
||||
@@ -0,0 +1,11 @@
|
||||
Raspberry Pi (rpi) target is cross-compiling, so you need to get toolchain here:
|
||||
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
|
||||
|
||||
Also you need to copy SDL headers and libs from Raspberry Pi device to this toolchain.
|
||||
|
||||
Then you need to export RPI_SDK pointed to the rpi toolchain root folder.
|
||||
|
||||
Then go to 'src' folder and type './configure --target=rpi --host=arm-linux --with-sdl-prefix=$RPI_SDK'.
|
||||
|
||||
Then type 'make'.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,161 @@
|
||||
27-Apr-2015 atari800dc v0.79beta2
|
||||
|
||||
* adapt to current Atari800 cvs code base
|
||||
* adapt to current KOS code base (9b7049b3c8b39421)
|
||||
* add atari800.cfg file generated with the current version
|
||||
* fix controller dis-/reconnection code (due to new KOS version)
|
||||
* fix autorepeat in emulator menu (due to new KOS version)
|
||||
|
||||
01-Apr-2015 atari800dc v0.79beta1
|
||||
|
||||
* adapt to current Atari800 cvs code base
|
||||
* adapt to current KOS code base (f6fff5b012265521)
|
||||
|
||||
17-Aug-2008 atari800dc v0.78
|
||||
|
||||
* fix crash when loading state save file from ramdisk
|
||||
* add screen position configuration ability
|
||||
* default screen position can be set in the configuration file
|
||||
(DISPLAY_X_ADJUST and DISPLAY_Y_ADJUST)
|
||||
* adjust default PAL screen position by x=10, y=-8
|
||||
* adjust default NTSC screen position by x=10, y=-8
|
||||
* remove "Save configuration file" option in "Emulator
|
||||
configuration" menu. Since the atari800.cfg file is on the CD
|
||||
this option anyway never worked.
|
||||
|
||||
13-May-2008 atari800dc v0.77
|
||||
|
||||
* enable basic R: device emulation with the DC Coder's Cable (no
|
||||
modem controls; fixed to 8n1; baud rates 300 - 9600)
|
||||
* use Atari800 2.0.3 code base
|
||||
* use KOS svn code base version 560
|
||||
* add possibility to switch X and Y axes of controller input
|
||||
* ability to disable either the D-Pad or the Joystick of the
|
||||
controllers (in "Controller Configuration" menu)
|
||||
* ability to disable or enable Bienias' sound improvements. They
|
||||
are too heavy for the DC and therefore disabled by default. 0.75
|
||||
had them disabled, 0.76 had them enabled, now it's selectable.
|
||||
* when saving or restoring state display a "please wait" since
|
||||
accessing the VMU is very slow. This was already in 0.75 but got
|
||||
lost in 0.76.
|
||||
|
||||
30-Jan-2006 atari800dc v0.76
|
||||
|
||||
* use Atari800 cvs code base as of jan-27-2006
|
||||
* use KOS svn code base version 289
|
||||
* unplugging/replugging controllers after atari800dc has started
|
||||
up works now
|
||||
* screen update is now done by an assembler routine
|
||||
|
||||
17-Jan-2003 atari800dc v0.75
|
||||
|
||||
* use Atari800 cvs code base as of jan-11-2003
|
||||
* reverted the sound changes which were introduced in the 0.72
|
||||
version - the sound should be similar to 0.71.
|
||||
* saved states on the VMU now show a Atari icon. Due to a
|
||||
change in the layout of the state save file, saved states of
|
||||
previous versions aren't recognized.
|
||||
* changing video mode of emulated Atari now doesn't change the
|
||||
video mode used to drive the screen. These 2 video mode
|
||||
settings (what the emulated Atari thinks the video mode is,
|
||||
and the video mode used by the DC) can now be changed
|
||||
independently.
|
||||
Setting them to different values will disable double
|
||||
buffering, so best results are achieved if both settings are
|
||||
the same.
|
||||
* buttons B, X, Y on the 1st DC controller can now be
|
||||
redefined to generate simulated key presses on the
|
||||
keyboard. If they are redefined, the Start, Select, and
|
||||
Option keys can be entered in the keyboard emulation
|
||||
screen.
|
||||
|
||||
21-Sep-2002 atari800dc v0.72
|
||||
|
||||
* use Atari800 cvs code base as of sep-17-2002
|
||||
* changing CDs should now work more reliably
|
||||
* load and save (VMU) state now display "please wait" messages
|
||||
and report if the save failed
|
||||
|
||||
21-Jul-2002 atari800dc v0.71
|
||||
|
||||
* use Atari800 1.2.3 code base
|
||||
* support to save/restore status on VMU.
|
||||
The status will be saved on the first VMU found, unless the
|
||||
configuration file contains an entry for STATE_DIR which is
|
||||
not empty and not ".".
|
||||
* changing video mode of emulated Atari (PAL/NTSC) now changes
|
||||
the video refresh rate of the DC (50 for PAL/60 for
|
||||
NTSC). Since the timing of atari800dc now depends on the
|
||||
video refresh rate, the PAL/NTSC differences are better
|
||||
emulated.
|
||||
* support for the Arcade Stick.
|
||||
* implemented double buffered screen update with the
|
||||
possibility to switch at runtime between normal screen
|
||||
update and double buffered version
|
||||
|
||||
17-May-2002 atari800dc v0.7
|
||||
|
||||
* support for autostarting executable files or atr images:
|
||||
place autorun.com or autorun.exe or autorun.atr into the
|
||||
root directory of the CD
|
||||
autorunning cartridges is not implemented (the emulator
|
||||
needs the cart type, and there is no way to tell him
|
||||
automatically)
|
||||
* selecting (inserting) a cartridge will now start it
|
||||
immediately
|
||||
* 800: added keyboard emulation using DC controller: now most
|
||||
keys can be generated with the standard DC controller
|
||||
* 5200: added keypad emulation (only for the 1st 5200
|
||||
controller)
|
||||
* 800: Option/Select/Start are now emulated with the DC
|
||||
keyboard (F2/F3/F4)
|
||||
* support to change video mode of emulated Atari (PAL/NTSC)
|
||||
|
||||
08-May-2002 atari800dc v0.65
|
||||
|
||||
* directory browsing on the CD implemented. Due to additional
|
||||
CD accesses needed for this, don't populate a directory with
|
||||
more than a few hundred files, otherwise entering the
|
||||
directory will become very slow.
|
||||
* after startup, the CD can be exchanged.
|
||||
|
||||
15-Apr-2002 atari800dc v0.61
|
||||
|
||||
* fix display glitch on the left side introduced in the last
|
||||
version
|
||||
* in the crash menu one item wasn't centered
|
||||
|
||||
11-Apr-2002 atari800dc v0.6
|
||||
|
||||
* speed increase: use new DIRTYRECT facility of the a800 main
|
||||
code
|
||||
* 5200: controller joystick now generates 5200 controller
|
||||
compatible (analog) data.
|
||||
* 800: controller joystick also generates joystick direction
|
||||
events (previously only the joypad did)
|
||||
* customized ui
|
||||
* support for ui switch "emulate paddle": must now be turned
|
||||
on when using paddles. Up to four paddles are supported
|
||||
(only 2 tested, don't have more controllers; makes sense in
|
||||
800 mode only, 5200 results are undefined :-)
|
||||
* in ui, B button is now the same as R trigger (go back)
|
||||
|
||||
05-Apr-2002 atari800dc v0.5
|
||||
|
||||
* sound fixed (reason of the large version jump)
|
||||
* improved ui "keyrepeat"
|
||||
* 800: simple paddle support
|
||||
* 5200: Y key now generates "H" - some games want a "H" to
|
||||
start
|
||||
|
||||
27-Mar-2002 atari800dc v0.2
|
||||
|
||||
* implemented "keyrepeat" while in the emulator ui (controller
|
||||
only)
|
||||
* fixed crash when system was set to atari 800 (not XL) and
|
||||
less than 3 controllers were connected
|
||||
* some sound changes (but they don't improve anything :-)
|
||||
* added support for 5200 controller 2nd action button
|
||||
|
||||
22-Mar-2002 atari800dc v0.1
|
||||
|
||||
@@ -0,0 +1,429 @@
|
||||
Current active members of the Atari800 development team:
|
||||
--------------------------------------------------------
|
||||
|
||||
Petr Stehlik (maintainer)
|
||||
Perry McFarlane (core developer)
|
||||
Piotr Fusik (core developer)
|
||||
Tomasz Krasuski (core developer)
|
||||
Mark Grebe (Mac OSX)
|
||||
Kostas Nakos (Windows CE, Android)
|
||||
James Wilkinson (DOS, BeOS, Win32)
|
||||
Christian Groessler (Sega Dreamcast)
|
||||
Andrey Dj (Raspberry Pi)
|
||||
|
||||
|
||||
|
||||
All contributors, past and present:
|
||||
-----------------------------------
|
||||
|
||||
Troy Ayers <holiday42@gmail.com>
|
||||
- PlayStation 2 port
|
||||
|
||||
Michael Beck <beck@dresearch.de>
|
||||
- SIO2PC ATR patch
|
||||
- SIO config patches (tested on real XF551)
|
||||
- monitor continues last command
|
||||
|
||||
Dave Bennett <bennett@halcyon.com>
|
||||
- code enabling the use of OSS super cartridges
|
||||
- correction to Display List jump instruction
|
||||
- tidied cartridge code up
|
||||
|
||||
Adam Bienias
|
||||
- a fix for better quality of sound
|
||||
|
||||
Jakub Bogusz <qboosh@pld.org.pl>
|
||||
- fixed memory corruption in input.c
|
||||
- a fix for DCM decoding
|
||||
- jakub.act palette file (built-in since 1.3.6)
|
||||
|
||||
Michael Borisov <borata@brain.uni-bremen.de>
|
||||
- completely new, high quality Pokey sound emulation
|
||||
|
||||
Robert Brewer <rbrewer@op.net>
|
||||
- Voxware sound driver updated for POKEY v2.4
|
||||
|
||||
Chris Chiesa <xetwnk@shell.portal.com>
|
||||
- added code allowing emulator to run under DEC Windows
|
||||
|
||||
Mike Coates <Mike@Dissfulfils.co.uk>
|
||||
Tom Haukap <Tom.Haukap@t-online.de>
|
||||
- Votrax SC-01
|
||||
|
||||
Ed Cogburn <ecogburn@xtn.net>
|
||||
- major improvements of configure & make process
|
||||
- added copyright headers to all source files
|
||||
- miscellaneous cleanups and fixes
|
||||
|
||||
Matthew Conte <matt@conte.com>
|
||||
- new SoundBlaster driver for DOS
|
||||
|
||||
Preston Crow <preston.crow@dancer.dartmouth.edu>
|
||||
- corrected calculation of ATR sector count
|
||||
- UI enhancement (folders in disk management)
|
||||
|
||||
David Dahlstrom <ddahlstrom@charter.net>
|
||||
- DirectX input and display enhancements
|
||||
|
||||
Nir Dary <ndary@bigfoot.com>
|
||||
- detailed information about OSS, Williams, XEGS and MegaCart cartridges
|
||||
|
||||
Andrey Dj <djdron@gmail.com>
|
||||
- Raspberry Pi support
|
||||
|
||||
Jason Duerstock <jason@cluephone.com>
|
||||
- R-Time 8 cartridge support (real date and time from host machine)
|
||||
- page based memory access
|
||||
- PAGED_ATTRIB support
|
||||
|
||||
Zdenek Eisenhammer <pg@pinknet.cz>
|
||||
- real.act palette file
|
||||
- util/keyboard.png
|
||||
|
||||
Maximum Entropy <entropy@zippy.bernstein.com>
|
||||
- various corrections to Motif code
|
||||
- Motif callbacks for Insert Disk, Eject Disk and Insert ROM
|
||||
- bug fixes in sio.c
|
||||
- bug fix to devices.c allowing DOS 2.5 to get a directory of H:
|
||||
- bug fix to monitor.c (EOF on input + blank lines)
|
||||
- undocumented commands added to monitor's "HELP" command
|
||||
- implementation of Disable Drive menu item for Motif
|
||||
- fixed scrolling problem for SGI and SPARC machines
|
||||
- added FPS Monitor to X11 and Motif versions
|
||||
- changes to pattern matching for H: device
|
||||
- Motif fileselector retains state from one invocation to the next
|
||||
- fixed an unitialized pointer
|
||||
- tidied up declaration of various functions
|
||||
- removed warning messages when compiled with -Wall
|
||||
- configuration program detects if longwords need to be aligned
|
||||
- modification to X11 paddle emulation
|
||||
- removed annoying flicker present under some X11 platforms
|
||||
- removed hardcoded paths in Motif code
|
||||
- various fixes for curses mode
|
||||
|
||||
David Firth <david@signus.demon.co.uk>
|
||||
- original author of Atari800
|
||||
|
||||
Stephen Firth <stephen@signus.demon.co.uk>
|
||||
- graphical support for Amiga
|
||||
|
||||
Friedrich Friedrichs <friedel@nomaden.org>
|
||||
- RPM .spec file
|
||||
|
||||
Ron Fries
|
||||
- Pokey Sound Emulation library
|
||||
|
||||
Rob Funk <rfunk@magnus.acs.ohio-state.edu>
|
||||
- tidied up emulator abort code
|
||||
- case insensitive monitor commands
|
||||
|
||||
Piotr Fusik <fox@scene.pl>
|
||||
- general rewrite of ANTIC and GTIA (accuracy and speed improvements)
|
||||
- changed ANTIC/CPU synchronization
|
||||
- corrected undocumented 6502 opcodes
|
||||
- corrected PCX screenshots and added interlaced screenshots
|
||||
- PNG screenshots
|
||||
- improved IRQ accuracy
|
||||
- ATR write protection
|
||||
- monitor improvements
|
||||
- loading of .act palette files
|
||||
- improved disk LEDs
|
||||
- rewritten executable loader
|
||||
- UI enhancements
|
||||
- read-only mode for H: devices
|
||||
- exact 17-bit and 9-bit polys for sound and RANDOM
|
||||
- improved emulation of potentiometers
|
||||
- support for Express, Diamond, SpartaDOS X, XEGS, and other cartridges
|
||||
- corrected disk formatting
|
||||
- cassette recorder emulation
|
||||
- emulation of paddles, Touch Tablet, Koala Pad, Light Pen/Gun, Trak-Ball
|
||||
and Amiga/ST mice
|
||||
- util/act2html
|
||||
- initial cycle-exact GTIA emulation
|
||||
- 16K, 576K, 1088K RAM machines
|
||||
- Display List based screen in CURSES ports
|
||||
- util/benchmark.pl
|
||||
- loader for Atari BASIC programs
|
||||
- file format autodetection
|
||||
- ported DirectX version to MSVC
|
||||
|
||||
Robert Golias <golias@informatics.muni.cz>
|
||||
- UI enhancements and DJGPP fixes
|
||||
- monitor enhancements (esp. line assembler)
|
||||
- fullscreen in DOS port - 320x240 and 320x480 interlaced graphics
|
||||
- VESA2 support in DOS
|
||||
- keyboard and joystick handling, joystick emulated on keyboard
|
||||
|
||||
Mark Grebe <markgrebe@yahoo.com>
|
||||
- initial Mac OSX support
|
||||
- new complete H: device support (with subdirectories)
|
||||
- Multiple Disk Set support
|
||||
- new state-file implementation supporting bank-switching cartridges
|
||||
and disk images
|
||||
- XEP80
|
||||
|
||||
Shay Green <gblargg@gmail.com>
|
||||
- NTSC composite video emulator, based on NewRisingSun's algorithm
|
||||
|
||||
Christian Groessler <chris@groessler.org>
|
||||
- Sega Dreamcast port
|
||||
- SVGAlib patch for joystick
|
||||
- BRKHERE command
|
||||
- missing autorepeat in Atari800 debugger under X11 fixed
|
||||
- missing XSync calls in X11
|
||||
- UI improvements ("Please Wait" message for slow operations)
|
||||
- improved R: device support (serial/network/both)
|
||||
|
||||
Achim Haertel <achim.haertel@e-technik.tu-chemnitz.de>
|
||||
- XF551 highspeed transfer emulation
|
||||
- greatly improved standard cassette loading
|
||||
- implemented cassette writing
|
||||
- cassette loading with variable baud rate
|
||||
- trainer searcher
|
||||
- slow loading of binary DOS files
|
||||
|
||||
Nathan Hartwell <mage@magelair.com>
|
||||
- Win32 fixes
|
||||
- sethdr perl script
|
||||
|
||||
Cameron Heide <cheide@home.com>
|
||||
- 16,32-bit X11 SHM support
|
||||
|
||||
Alex Hornby <alex@zetnet.co.uk>
|
||||
- Virtual 2600 Emulator the "/dev/dsp" code bases on
|
||||
|
||||
Tom Hunt
|
||||
- original author of R: device support
|
||||
|
||||
Jakub Husak
|
||||
- support for SIC! cartridge mapping (wihout the flash programming
|
||||
feature)
|
||||
|
||||
Gerhard Janka <gerhard.janka@siemens.at>
|
||||
- cpu_m68k.asm corrections and improvements
|
||||
- double buffering of screen output
|
||||
- cpu_m68k.asm massive updates that keep it compatible with cpu.c
|
||||
|
||||
Ed Kaminski <ekamins@ibm.net>
|
||||
- correction of Antic 4&5 Bug affecting Galactic Chase & Mr. Do
|
||||
- improved speed of DOS version by syncing with a high resolution timer
|
||||
- PORTB duplicated special handling of PORTA
|
||||
|
||||
Jari Karppinen <jakarppi@mail.student.oulu.fi>
|
||||
- fixed some warnings and bugs such as "void main()" in joycfg
|
||||
|
||||
Tomasz Krasuski <kr0tki@poczta.onet.pl>
|
||||
- various bugfixes
|
||||
- accurate emulation of NTSC and PAL palettes
|
||||
- support for color adjustments
|
||||
- saving of color palettes
|
||||
- integration of Blargg's video kernel version 0.2.2
|
||||
- rewrite of SDL video subsystem
|
||||
- new options for display adjustments in SDL port
|
||||
- OpenGL support in SDL
|
||||
- support for V-Sync in SDL port (only on Windows fullscreen)
|
||||
- slider widget in basic UI
|
||||
- autosaving of the configuration file
|
||||
- Tape Management menu with options for creation of tapes and rewinding
|
||||
- display tape position during loading/saving
|
||||
- fixes in tape emulation to support some non-standard tapes
|
||||
- rewrite of cartridge subsystem to fix savestates and pigyback cartridges
|
||||
- support OSS 8 KB, OSS 043M, Blizzard 4 KB, AST, Atrax SDX, Turbosoft,
|
||||
Ultracart, Low bank, and standard 2 & 4 KB cartridge mappings
|
||||
- rewrite of XEP80 emulation to fix inaccuracies
|
||||
- automatic searching for OS ROM images based on CRC matching
|
||||
- rewrite of Select system menu, incl. choosing OS & BASIC revision
|
||||
- support for RAM amounts other than 16/48 KB in Atari 400/800
|
||||
- support for RAM expansions by RC Systems
|
||||
- emulation of 1200XL and XEGS features
|
||||
- autodetection of video and sound libraries in configure
|
||||
|
||||
Kuba <kubad@zeus.polsl.gliwice.pl>
|
||||
- vertical retrace control in DOS port
|
||||
|
||||
Jindrich Kubec <kubecj@asw.cz>
|
||||
- various corrections and refinements (SIO)
|
||||
- hours of testing on real Atari800XL
|
||||
- research on real cartridges
|
||||
|
||||
Jerzy Kut <mono@atari.pl>
|
||||
- MapRAM memory expansion for the XL/XE
|
||||
|
||||
Chris Lam <lamcw@sun.aston.ac.uk>
|
||||
- RGB values for each Atari colour
|
||||
|
||||
Rich Lawrence <rich@kesmai.com>
|
||||
- Atari800Win author
|
||||
- DCM and ZLIB compressed files support
|
||||
|
||||
Avery Lee <phaeron@virtualdub.org>
|
||||
- a fix for error codes in SIO patch handler
|
||||
|
||||
Marcin Lewandowski <jaskier@atari8.info>
|
||||
- Atari800Win PLus maintainer since version 4.0
|
||||
- initial implementation of "B" and "LABELS" monitor commands
|
||||
- fixed incorrectly saved N flag when entering the monitor
|
||||
- found a memory leak in remez.c
|
||||
|
||||
Paulo Lopes <paulo.lopes@ist.utl.pt>
|
||||
- windowed mode for Win32
|
||||
|
||||
maddoxik <maddoxik@funnyvoid.com>
|
||||
- "Make Blank Boot Disk" option added to Disk Management UI
|
||||
|
||||
Cyrus Malek <Cyrus.Malek@amd.com>
|
||||
- patch to make the X11 Backspace key work the same as the Delete key
|
||||
|
||||
Chris Martin <cmartin@ti.com>
|
||||
- R: device as Atari850 emulation via network
|
||||
|
||||
Perry McFarlane <ce596@freenet.toronto.on.ca>
|
||||
- Antic fix in vertical scroll
|
||||
- complete Antic rewrite (DIRECT_VIDEO approach, but better)
|
||||
- GTIA enhancements (based on Thomas' code, but using DIRECT_VIDEO)
|
||||
- Allegro library in DOS port
|
||||
- colour artifacting
|
||||
- "digital sound" emulation in DOS port
|
||||
- complete cycle-exact ANTIC/GTIA emulation
|
||||
- SDL on MS Windows fixes
|
||||
- interpolated scanlines (for SDL)
|
||||
- various SDL fixes (Caps Lock)
|
||||
- Axlon and Mosaic RAM expansions for Atari400/800
|
||||
- support for switching between NTSC and PAL color palettes
|
||||
- Java port (NestedVM)
|
||||
- sound improvements: nonlinear mixing, two-tone filter
|
||||
- emulation of the 1400XL, 1450XLD, MIO and Black Box
|
||||
- XEP80 emulation by Mark Grebe
|
||||
- CX85 numeric keypad
|
||||
- SIO: support for .pro images
|
||||
- various bugfixes in all areas of Atari800
|
||||
- and much much more, including general source clean up in 2.1.0
|
||||
|
||||
Petr Mojzisek <mojzisek@bimbo.fjfi.cvut.cz>
|
||||
- rawkey support for svgalib
|
||||
|
||||
Nathan Monson <nathan@polaristel.net>
|
||||
- fix for handling 6502 V flag during ADC and SBC operations
|
||||
|
||||
Kostas Nakos <knakos@gmail.com>
|
||||
- update of the WinCE port
|
||||
- porting to Smartphone devices
|
||||
- the whole Android port ("Colleen")
|
||||
|
||||
Krzysztof Nikiel <krzych00@priv.onet.pl>
|
||||
- SaveINT() fix in state save code
|
||||
- Linux improvements (new svgalib keyboard input and screen output)
|
||||
- sound improvements (interpolation, configurable delay, 4 buffers)
|
||||
- autoconf stuff
|
||||
- Windows code clean up and DirectX version
|
||||
|
||||
John Oyler <john.m.oyler@gmail.com>
|
||||
- atari2.svg and atari2.png icons
|
||||
|
||||
Chris Palmer <crpalmer@solo.uwaterloo.ca>
|
||||
- spotted incorrect declaration of atari_basic[8129] in pia.c
|
||||
|
||||
Ivo van Poorten <ivop@euronet.nl> <ivop@free.fr>
|
||||
- added X11 window Expose Event
|
||||
- made hardware registers repeat within their page
|
||||
- control characters in CURSES version
|
||||
- Makefile targets for FreeBSD systems
|
||||
- modification to Curses character attributes handling (for FreeBSD)
|
||||
- ported emulator to DOS using DJGPP
|
||||
- IDE support
|
||||
|
||||
Jacek Poplawski <jpopl@interia.pl>
|
||||
- SDL port of Atari800
|
||||
|
||||
Erhard Puetz <erhard-puetz@wtal.de>
|
||||
- reported inaccurate PERCOM emulation
|
||||
|
||||
Matthias Reichl <hias@horus.com>
|
||||
- POKEY ALLPOT register fix
|
||||
- The!Cart emulation fixes
|
||||
- reported quirks in behaviour of XEGS cartridges
|
||||
|
||||
Thomas Richter <thor@math.tu-berlin.de>
|
||||
- GTIA collisions and third colour of players
|
||||
- new SIO code with formatting support
|
||||
- POKEY timers
|
||||
- ADC/SBC "V" bit bug found and fixed using Frodo 6502 emu source
|
||||
|
||||
Karel Rous (Empty Head)
|
||||
- rewrote cpu.c to optimized MC68030 assembler
|
||||
|
||||
Benjamin Schreiber <fishy_PKAT151@gmx.de>
|
||||
and Alexander Martinez <kubus3561@gmx.de>
|
||||
- SDL keyboard joystick emulation stored in the Atari800 config file
|
||||
|
||||
Daniel Serpell <daniel_serpell@yahoo.com>
|
||||
- SDL keyboard based on Unicode values, more keys emulated correctly
|
||||
|
||||
Neil Ship <nlshipp@dictator.uwaterloo.ca>
|
||||
- correction to new cartridge code introduced in 0.4.0
|
||||
|
||||
Ken Sider
|
||||
- his binary loader has been used by Rich for developing our EXE LOADER
|
||||
|
||||
Petr Stehlik <pstehlik@sophics.cz>
|
||||
- project coordinator/manager since v0.8.2 (spring of the 1998)
|
||||
- added support for Atari Falcon (port itself, sound, kbd, joy)
|
||||
- added sound, keyboard and joystick support for DOS version
|
||||
- snailmeter
|
||||
- various fixes in the SDL version
|
||||
- Atari800 project web pages at http://atari800.sourceforge.net/
|
||||
- RT-Config fixes (per-user and system wide config, Y/N questions)
|
||||
|
||||
Radek Sterba <raster@infos.cz>
|
||||
- added all missing CPU 6502 instructions
|
||||
- implemented precise timing in Antic and CPU
|
||||
- fixed PMG registers and implemented PMG flickering
|
||||
- added full 256 opcodes support to disassembler
|
||||
- various DOS enhancements
|
||||
- added emulation of 320 kB memory (Atari320XE)
|
||||
|
||||
Petr Sumbera <xsumbe00@stud.fee.vutbr.cz>
|
||||
- LPTjoy idea and design of the interface
|
||||
|
||||
Tomasz Szymankowski
|
||||
- Atari800Win PLus author
|
||||
- "-state" command line option
|
||||
- sector counter
|
||||
|
||||
Vasyl Tsvirkunov <vasyl@pacbell.net>
|
||||
- WinCE port of Atari800
|
||||
- refactored UI (introduced ui_basic.c)
|
||||
|
||||
Steven Tucker <classics@atarimax.com>
|
||||
and Wrathchild <atari@mkeates.f9.co.uk>
|
||||
- Atarimax cartridges
|
||||
|
||||
B Watson <yalhcru@gmail.com>
|
||||
- mouse support for SDL
|
||||
- direct mouse support (SDL and X11)
|
||||
- readline support for the internal monitor (including command history)
|
||||
- turbo mode
|
||||
|
||||
James Wilkinson <james@slor.net>
|
||||
- DirectX joystick support
|
||||
- various enhancements and bug fixes
|
||||
|
||||
Piotr Wiszowaty
|
||||
- LPTjoy support for Linux
|
||||
|
||||
Ken Zalewski <kennyz@nycap.rr.com>
|
||||
- segfault fix in GetKeyCode of atari_x11
|
||||
|
||||
Marek Zelem <marek@formax.elf.stuba.sk>
|
||||
- little improvements in SIO and main sync loop for Unix
|
||||
- X11 keyboard
|
||||
- X11 screen (background => faster emulation)
|
||||
- digital (volume only) sound
|
||||
- console sound emulation
|
||||
- disk drive sound emulation
|
||||
- various fixes
|
||||
|
||||
Marcin Zukowski <eru@ibb.waw.pl>
|
||||
- fix in ANTIC, GTIA
|
||||
- slight monitor improvement
|
||||
- fix in Atrax cartridge bank switching
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
Frequently asked questions (with answers)
|
||||
-----------------------------------------
|
||||
|
||||
0. Q: Where to get ROM files for the emulator?
|
||||
A: Download the xf25.zip from http://prdownloads.sf.net/atari800/xf25.zip
|
||||
You'll get three .ROM files - ATARIBAS.ROM, ATARIOSB.ROM and ATARIXL.ROM.
|
||||
We cannot distribute them due to licensing and copyright issues. Sorry.
|
||||
In Atari800 UI there is an option to locate these ROM images.
|
||||
|
||||
1. Q: I want Windows version of Atari800 with Windows GUI.
|
||||
A: Try Atari800Win PLus: http://atariarea.histeria.pl/PLus/index_us.htm
|
||||
|
||||
2. Q: If I use keyboard as the emulated joystick in the DOS version
|
||||
it often stops some games (e.g. Bruce Lee). What should I do?
|
||||
A: Press F7 to switch the keyboard into joy-only mode. Or better,
|
||||
use a real joystick (either PC or the old CX-40 Atari one).
|
||||
|
||||
3. Q: How about keyboard joysticks in the SDL version?
|
||||
A: Up to two keyboard joysticks can be freely defined and enabled/disabled
|
||||
on-the-fly in the UI (user interface). Press F1 to enter the UI, then
|
||||
enter "Controller Configuration" and then "Define layout of ...".
|
||||
There you can choose which keys will be used as joystick directions
|
||||
and the fire button. Don't forget to enable the joysticks before
|
||||
gaming and to disable it before using your keyboard in BASIC, DOS
|
||||
or a text editor. When you're satisfied with your keyboard joystick
|
||||
mapping you can save the settings.
|
||||
|
||||
4. Q: Sound problems in xxx
|
||||
A: We know about problems with volume-only sound (digitized sound effects).
|
||||
See the BUGS file. You can try disabling the new HIFI Pokey
|
||||
emulation (in the UI go to Sound Settings and disable the HIFI there).
|
||||
|
||||
I also experienced sound problems in SDL on my Debian GNU/Linux with ESD
|
||||
(a sound daemon coming with GNOME) that were fixed by installing
|
||||
the libsdl1.2debian-alsa package (that is compiled to output sound
|
||||
directly to ALSA instead of going through the ESD (this is applicable
|
||||
only if you are using ALSA (http://alsa-project.org/) and have ESD
|
||||
running, of course).
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
USING DIRTY UPDATE SCHEME
|
||||
|
||||
1. Why dirty updates?
|
||||
Most Atari 800 games and applications update only very small part of
|
||||
the screen every frame. Typical numbers range from 1% to 5%. On the
|
||||
other hand many ports have to convert screen image from internal
|
||||
emulator format to port native format and copy it to platform video
|
||||
memory. Both conversion and copy (or blit) are typically slow.
|
||||
|
||||
2. How to enable it?
|
||||
To enable dirty update tracking the symbol DIRTYRECT must be #defined
|
||||
globally (in CONFIG.H or in project settings). When it is defined the
|
||||
array screen_dirty[] gets allocated. This is UBYTE array of the size
|
||||
ATARI_HEIGHT*ATARI_WIDTH/8. In current implementation every element
|
||||
is either 0 or 1. Initially the entire array is initialized with 0.
|
||||
Each element in this array corresponds to eight consequtive pixels in
|
||||
atari_screen[]. When any of this pixels is being changed the element
|
||||
in screen_dirty[] is getting set to 1. Port's implementation of
|
||||
Atari_DisplayScreen() can use this information and draw only those
|
||||
pixels belonging to "changed" octets. Port must reset screen_dirty[]
|
||||
at the end of its Atari_DisplayScreen(). Emulator core _never_ resets
|
||||
screen_dirty[] elements.
|
||||
|
||||
3. How to use it?
|
||||
The simplest implementation would be this: every time your code is
|
||||
attempting to process pixel at pointer src (which must point somewhere
|
||||
_inside_ atari_screen[]) do a check:
|
||||
|
||||
if(screen_dirty[((ULONG)src-(ULONG)atari_screen)/8]) ...
|
||||
|
||||
If the condition succeeds, update the pixel. Otherwise, skip it. More
|
||||
advanced implementation would do a check only once per eight pixels
|
||||
but the check basically remains the same. The best use is to redesign
|
||||
the entire update loop so it moves through the array screen_dirty[]
|
||||
instead of typical loop through atari_screen[] or double loop through
|
||||
screen coordinates x and y. Essentially, if screen_dirty[m]==1 then
|
||||
eight pixels starting at atari_screen[m*8] needs to be refreshed. Or,
|
||||
if you want these in screen coordinates: y=m/ATARI_WIDTH, eight pixels
|
||||
starting at m%ATARI_WIDTH. Note that pixels are guaranteed to be at
|
||||
the same scanline. Properly written loop would not even use division
|
||||
there:
|
||||
|
||||
for(m=0, x=0, y=0; m<ATARI_HEIGHT*ATARI_WIDTH/8; m++)
|
||||
{
|
||||
if(screen_dirty[m])
|
||||
{
|
||||
/* Draw eight pixels (x,y), (x+1,y),...,(x+7,y) here */
|
||||
...
|
||||
screen_dirty[m] = 0;
|
||||
}
|
||||
x += 8;
|
||||
if(x >= ATARI_WIDTH)
|
||||
{
|
||||
x = 0;
|
||||
y ++;
|
||||
}
|
||||
}
|
||||
|
||||
The code in that last example also resets screen_dirty[] as it goes
|
||||
and does it in very efficient way. If your code does not do that you
|
||||
can just use:
|
||||
|
||||
memset(screen_dirty, 0, ATARI_HEIGHT * ATARI_WIDTH/8);
|
||||
|
||||
at the end of Atari_DisplayScreen().
|
||||
|
||||
4. Is it worth a trouble?
|
||||
Believe me, yes, unless your target platform is so fast that you don't
|
||||
care about the performance. I tested this implementation on PocketPC
|
||||
(WinCE) port on iPaq. Old implementation was too slow even with
|
||||
frameskip of 3 (anything higher tends to break PM graphics). With the
|
||||
new implementation I am getting better speed at frameskip 1 than I had
|
||||
with the old implementation at frameskip 3, and I finally got 100%
|
||||
speed at frameskip 2! At the same time I am using linear filtering
|
||||
with the new implemenation, something that was too expensive with the
|
||||
old one. On the top of this, I am not using the most efficient
|
||||
(described above) way to use the scheme.
|
||||
There are only a few little catches there. First, you should use
|
||||
compiler with at least semi-decent optimizer. Otherwise you will get
|
||||
a few extra memory moves every time you access video memory. It's not
|
||||
a big problem but it is something to be aware of. Second, there is
|
||||
slight performance hit in ANTIC.C: changed pixels are slightly more
|
||||
expensive (unchanged pixels stay the same, may be even cheaper than
|
||||
before depending on platform memory controller). That only means that
|
||||
if you #define DIRTYRECT you should definitely implement proper dirty
|
||||
update support in your port or you'll burn CPU cycles. Then again, the
|
||||
impact is not that big.
|
||||
|
||||
5. Changing core emulator code.
|
||||
If you need to draw anything on the screen from the emulator core you
|
||||
need to follow certain protocol. First of all, you cannot use
|
||||
atari_screen[] directly anymore. If your code resides in ANTIC.C you
|
||||
should use macros WRITE_VIDEO_BYTE(), WRITE_VIDEO() (writes a word),
|
||||
WRITE_VIDEO_LONG(), and FILL_VIDEO(). There is one case when code
|
||||
reads from atari_screen[], that one uses macro READ_VIDEO_LONG() but
|
||||
I would strongly discourage everybody from doing tricks like that.
|
||||
For code outside of ANTIC.C there are two simple functions:
|
||||
video_putbyte() and video_memset(). Those should suffice in most
|
||||
situations.
|
||||
|
||||
6. Other notes.
|
||||
With current set of macros the emulator core is shielded from actual
|
||||
atari_screen[] implementation. By all means, atari_screen can be fake
|
||||
pointer now. It is possible to create set of macros that will cause
|
||||
port code (outside of emulator core) to draw pixels directly to the
|
||||
screen as emulator generates them, potentially saving some CPU clocks
|
||||
(just replace screen_dirty[] changes with calls to client functions).
|
||||
It is also possible to move atari_screen[] allocation completely to
|
||||
the client side. Not sure if anybody needs these features, but they
|
||||
come free. Another interesting use of dirty update implementation
|
||||
would be very efficient way to record movies straight from the
|
||||
emulator: no need to calculate diff frames anymore. This is rather
|
||||
fancy feature but you never know.
|
||||
|
||||
Vasyl
|
||||
04/07/2002
|
||||
@@ -0,0 +1,110 @@
|
||||
DIRTY SPANS TECHNIQUE
|
||||
|
||||
Please note: this is just an idea.
|
||||
|
||||
I'll explain it in pseudo-code:
|
||||
|
||||
/* in antic.c: */
|
||||
|
||||
int dirty_left[ATARI_HEIGHT];
|
||||
int dirty_right[ATARI_HEIGHT];
|
||||
|
||||
static void draw_antic_*()
|
||||
{
|
||||
int x;
|
||||
for (x = left_margin; x < right_margin; x++) {
|
||||
UBYTE new_pixel = generate_pixel(x);
|
||||
if (new_pixel != scrn_ptr[x]) {
|
||||
dirty_left[ypos - 8] = x;
|
||||
x = right_margin;
|
||||
do {
|
||||
x--;
|
||||
new_pixel = generate_pixel(x);
|
||||
} while (new_pixel == scrn_ptr[x]);
|
||||
dirty_right[ypos - 8] = x + 1;
|
||||
for (x = dirty_left[ypos - 8]; x < dirty_right[ypos - 8]; x++) {
|
||||
scrn_ptr[x] = generate_pixel(x);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* no pixels changed in this line */
|
||||
dirty_left[ypos - 8] = dirty_right[ypos - 8] = 0;
|
||||
}
|
||||
|
||||
/* Note: (ypos - 8) is because ypos ranges from 8 to 247
|
||||
for the visible scanlines */
|
||||
|
||||
|
||||
/* port-specific Atari_DisplayScreen(): */
|
||||
|
||||
void Atari_DisplayScreen(UBYTE *screen)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < ATARI_HEIGHT; y++) {
|
||||
/* copy pixels dirty_left[y] <= x < dirty_right[y]
|
||||
from screen[] to the real screen */
|
||||
blit_pixels(screen, dirty_left[y], dirty_right[y], y);
|
||||
}
|
||||
}
|
||||
|
||||
Now some less formal explanation:
|
||||
|
||||
The idea is to update only parts of scanlines that changed since last frame.
|
||||
We update one continuous sequence of pixels ("span") per scanline.
|
||||
dirty_left[y] and dirty_right[y] are the boundaries of the span in scanline y.
|
||||
In each scanline, we search for a first pixel that is different
|
||||
from the previous frame. If we don't find one, then the whole scanline
|
||||
is not dirty, which we mark with:
|
||||
dirty_left[y] = dirty_right[y] = 0;
|
||||
If we find left-most pixel that differs from the previous frame,
|
||||
we save its x coordinate in dirty_left[y]. Then we search starting
|
||||
from the right side for a pixel that changed since last frame. We know we'll
|
||||
find one. We save (x + 1) in dirty_right[y]. Now we normally generate pixels
|
||||
between dirty_left[y] and dirty_right[y].
|
||||
|
||||
The display routine doesn't need any additional comments, I think.
|
||||
|
||||
Compared to the current approach (always display whole Atari screen),
|
||||
the DIRTY SPANS technique adds almost zero overhead in the worst case.
|
||||
In the best case we avoid screen updates completely.
|
||||
On average, we update just the areas that changed.
|
||||
|
||||
There's one case when DIRTY SPANS perform worse than DIRTY RECT:
|
||||
if left and right sides of screen are changing while the center of screen
|
||||
remains static. This is however extremely rare (actually, I cannot recall
|
||||
any real Atari program that does such things).
|
||||
|
||||
Compared to DIRTY RECT, DIRTY SPANS has nearly zero overhead in ANTIC code:
|
||||
while searching for boundaries there are comparisons but no writes
|
||||
to the screen; generating the changed part of the scanlines operates
|
||||
as fast as without DIRTY techniques.
|
||||
|
||||
Displaying pixels is much faster: we immediately know which pixels to update,
|
||||
without stepping through 8K screen_dirty[]. It is also better for hardware
|
||||
architectures where continuous writes to the video memory are faster
|
||||
then random writes.
|
||||
|
||||
It is possible to combine DIRTY SPANS with DIRTY RECT: in the first pass,
|
||||
find span boundaries using DIRTY SPANS. Then, in the display loop,
|
||||
update only the pixels that changed (compare current pixels to a backup copy
|
||||
of the screen).
|
||||
|
||||
DIRTY SPANS should be straightforward to implement on most platforms:
|
||||
all we need is displaying 1-pixel-high bitmaps.
|
||||
|
||||
The ANTIC code is what gets more complicated with DIRTY SPANS.
|
||||
Basically, we have to split each function that generates an Atari graphics
|
||||
mode into 3 parts:
|
||||
1. Find dirty_left (similar to normal code, but compare instead of write
|
||||
pixels).
|
||||
2. Find dirty_right (likewise, but *right-to-left*; it should be possible
|
||||
to implement it without a speed penalty).
|
||||
3. Write pixels (same as the current code).
|
||||
This probably means more and more macros (antic.c is already full of them).
|
||||
|
||||
As noted at the beginning of this document, these are all plans
|
||||
for the future.
|
||||
|
||||
Piotr Fusik
|
||||
2005-09-09
|
||||
@@ -0,0 +1,243 @@
|
||||
Installation of the Atari800 Emulator
|
||||
--------------------------------------
|
||||
|
||||
Irrespective of whether you are going to compile the emulator yourself
|
||||
or install a pre-compiled binary version you must obtain a copy of the
|
||||
Operating System ROMs.
|
||||
|
||||
The ROM images are distributed within the PC Xformer 2.5 package (other
|
||||
versions of this program do not contain the ROMs in a suitable format)
|
||||
which can be downloaded from:-
|
||||
|
||||
http://prdownloads.sf.net/atari800/xf25.zip
|
||||
|
||||
If you are creating the ROM images yourself they should be copied from
|
||||
the following locations:-
|
||||
|
||||
1. Atari BASIC (8192 bytes between $a000 and $bfff)
|
||||
Note: On a 400/800/1200XL system a BASIC cartridge must be inserted, and on
|
||||
other systems the built-in BASIC must be enabled by setting bit 1 of PORTB
|
||||
to 0.
|
||||
2. Atari 400/800 OS (10240 bytes between $d800 and $ffff)
|
||||
3. Atari XL/XE OS (16384 bytes between $c000 and $ffff)
|
||||
Note: If you are extracting the XL/XE OS you will find that the ROM area
|
||||
under the custom chip ($d000 to $d7ff) is mapped between $5000 and $57ff
|
||||
when bit 7 of PORTB is set to 1. I.e. you should set bit 7 of PORTB and
|
||||
then dump the memory out in the following order:- $c000 to $cfff,
|
||||
$5000 to $57ff and finally $d800 to $ffff.
|
||||
4. Atari XEGS built-in game (8192 bytes between $a000 and $bfff)
|
||||
Note: the built-in game must be enabled by setting bit 1 of PORTB to 1 and
|
||||
bit 6 to 0.
|
||||
5. Atari 5200 BIOS (2048 bytes between $f800 and $ffff)
|
||||
|
||||
The first time you run the emulator you will be prompted for the
|
||||
location of the ROMs and various other defaults. If you want to
|
||||
change any of these in the future simply start the emulator with
|
||||
the "-configure" command line option.
|
||||
|
||||
Compiling the Emulator
|
||||
----------------------
|
||||
|
||||
The emulator can be compiled for the following systems (and probably
|
||||
many others with a little work):-
|
||||
|
||||
1. X Window Version (including SUN OpenWindows) on a Unix Platform
|
||||
(prefer the SDL version)
|
||||
2. CURSES version
|
||||
3. Graphical Version for the Amiga (not maintained)
|
||||
4. Graphical version for the Atari TT/Falcon and compatible computers
|
||||
5. "simple" version (no graphics). Should be straightforward to configure
|
||||
for any 32-bit environment supporting ANSI C.
|
||||
6. VGA Version for DOS
|
||||
7. DirectX Version for Microsoft Windows (also try the SDL version)
|
||||
8. SDL (Linux/Unix, Windows, BeOS)
|
||||
9. WinCE
|
||||
10. Java (various platforms)
|
||||
|
||||
Installed zlib (compression library) enables building the emulator with
|
||||
compressed statesave images support. Additionally installed libpng
|
||||
makes the emulator capable of generating screenshots in the PNG format.
|
||||
|
||||
Building the Emulator on most platforms
|
||||
---------------------------------------
|
||||
|
||||
1. Change your working dir to the atari800/src path
|
||||
2. Check if "configure" script is there. If it is skip to step 4.
|
||||
3. Run "./autogen.sh" (make sure you have autoconf >= 2.5x installed).
|
||||
4. Type "./configure".
|
||||
5. Type "make".
|
||||
6. Install the emulator by typing "make install".
|
||||
|
||||
By default, the "configure" script attempts to auto-detect the best interfaces
|
||||
available to use for emulating video and sound. It is also possible to
|
||||
override autodetection and select a specific interface by appending the
|
||||
"--with-video=<value>" and "--with-sound=<value>" options to the command
|
||||
in step 4. Below is the list of available values for these options:
|
||||
a) Video interfaces (--with-video):
|
||||
- dosvga: use direct access to VGA card, only under DOS/DJGPP
|
||||
- sdl: use the Simple DirectMedia Library
|
||||
- curses: use the curses library
|
||||
- ncurses: use the ncurses library
|
||||
- pdcurses: use the pdcurses library
|
||||
- no: use only stdin/stdout for input/output. Supported on all platforms
|
||||
b) Sound interfaces (--with-sound):
|
||||
- win: use the WinMM library, only under Windows
|
||||
- falcon: use Atari Falcon native sound
|
||||
- dossb: use direct access to a Sound Blaster-compatible card, only under
|
||||
DOS/DJGPP
|
||||
- sdl: use the Simple DirectMedia Library
|
||||
- oss: use Open Sound System
|
||||
- no: disable sound altogether. Supported on all platforms
|
||||
|
||||
Only the video and sound interfaces listed above are autodetected, but the
|
||||
emulator also supports other ones. To build for a platform that is
|
||||
not automatically detected, replace step 4 of the above instructions with:
|
||||
|
||||
4a. Type "./configure --target=help" for a list of supported platforms.
|
||||
4b. Type "./configure --target=<YourTarget>" (choose from the list above)
|
||||
|
||||
|
||||
Building the Emulator for Curses
|
||||
--------------------------------
|
||||
|
||||
Follow the instruction above but note that you must be using the
|
||||
System V Curses Library. BSD Curses is lacking a few functions and
|
||||
will not work (nodelay, attron, attroff, keypad and curs_set).
|
||||
|
||||
Building the Emulator for DOS
|
||||
-----------------------------
|
||||
|
||||
To compile, use DJGPP the DOS port of gcc, which can be got from
|
||||
http://www.delorie.com/djgpp/. You will need complete environment
|
||||
in order to configure and build the executables.
|
||||
You may need zlib (compression library) to use compressed statesave images
|
||||
and libpng for PNG screenshots. To build curses (text mode) version install
|
||||
curses-compatible library (e.g. PDCurses) and add
|
||||
"--with-video=pdcurses" when invoking "./configure".
|
||||
|
||||
Since the source code contains files with long file names, you must unpack
|
||||
and compile the source on a filesystem supporting long file names (for example
|
||||
VFAT of Windows95). An additional change of DJGPP setting is required:
|
||||
open the DJGPP.ENV file in editor and change the LFN= line to LFN=y
|
||||
|
||||
1. Run "configure_dos.bat".
|
||||
2. Run "make" and "make joycfg".
|
||||
3. If everything went good you should have atari800.exe and joycfg.exe -
|
||||
copy them to destination directory.
|
||||
|
||||
Building the Emulator for Windows using Cygwin
|
||||
----------------------------------------------
|
||||
|
||||
Atari800 for Windows can be built using Cygwin environment:
|
||||
http://cygwin.com/
|
||||
|
||||
1. Get and install at least one of SDL or DirectX for MinGW.
|
||||
2. For SDL, get the file SDL_win32_main.c from the SDL source that matches
|
||||
your version and copy it into the Atari800 src directory.
|
||||
3. Type "./configure --target=windx" for DirectX or "./configure
|
||||
--with-video=sdl --with-sound=sdl" for SDL.
|
||||
4. Type "make".
|
||||
5. Copy atari800.exe to destination directory.
|
||||
6. Copy the needed DLLs: /bin/mgwz.dll and (for SDL) sdl.dll
|
||||
|
||||
Building the Emulator for Windows using Microsoft 32-bit C/C++ Compiler
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Atari800 for Windows can be built using command-line tools
|
||||
from Microsoft Visual C++ 2005. Avoid older compilers such as VC++ 6
|
||||
because they are buggy (even with service packs) and unsupported.
|
||||
In addition to the compiler suite you need Windows Platform SDK (included
|
||||
in Visual C++ 2008 or newer) and DirectX SDK (not newer than the August 2007
|
||||
version, as it is the last one to contain the now-deprecated DirectInput
|
||||
libraries.) Set "Path", "INCLUDE" and "LIB" environment variables to point to
|
||||
the correct locations in VC++, PSDK and DXSDK.
|
||||
|
||||
1. Install the ZLIB library:
|
||||
a. Download the source code from http://www.zlib.org
|
||||
b. Remove -MD from CFLAGS in win32\Makefile.msc
|
||||
c. Compile with "nmake /f win32\Makefile.msc zlib.lib".
|
||||
d. Copy zlib.h and zconf.h to the Include directory of VC++.
|
||||
e. Copy zlib.lib to the Lib directory of VC++.
|
||||
2. Install the LIBPNG library:
|
||||
a. Download the source code from http://www.libpng.org
|
||||
b. Remove -MD from CFLAGS in scripts\makefile.vcwin32
|
||||
c. Compile with "nmake /f scripts\makefile.vcwin32".
|
||||
d. Copy png.h and pngconf.h to the Include directory of VC++.
|
||||
e. Copy libpng.lib to the Lib directory of VC++.
|
||||
OR
|
||||
1&2. #undef HAVE_LIBPNG and HAVE_LIBZ in Atari800's src\win32\msc\config.h.
|
||||
The compiled emulator won't handle zlib-compressed disk images
|
||||
and state files and won't produce PNG screenshots.
|
||||
3. Navigate to the src directory of Atari800 sources.
|
||||
4. Type "nmake /f win32\msc\Makefile".
|
||||
5. If you are getting linking errors saying something about MSVCRT
|
||||
then you probably ignored step 1b or 2b.
|
||||
6. Copy atari800.exe to destination directory.
|
||||
|
||||
Building the Emulator for Falcon
|
||||
--------------------------------
|
||||
|
||||
You need a recent GCC, for example 2.7.2, running on a filesystem with long
|
||||
file names (either minix-fs of MiNT, or VFAT of MagiC).
|
||||
|
||||
1. Type "./configure --target=falcon".
|
||||
2. Type "make".
|
||||
3. Copy atari800 to destination directory or try "make install".
|
||||
|
||||
You also can build the default target (by omitting the "--target" option)
|
||||
with optional support for curses or SDL - see "Building the Emulator on most
|
||||
platforms".
|
||||
|
||||
Building the Emulator for SDL
|
||||
-----------------------------
|
||||
|
||||
1. Please install (and configure) SDL library (http://www.libsdl.org).
|
||||
2. If you are using MinGW or Cygwin, get the file SDL_win32_main.c from the SDL
|
||||
source (in src/main/win32) and copy it to the atari800 src directory.
|
||||
3. If you want to build an OpenGL-capable version, you'll need OpenGL headers
|
||||
installed. They should support OpenGL version 2.1 (support for the Pixel
|
||||
Buffer Object extension). The result binary however will only need OpenGL
|
||||
version 1.1 (PBOs simply won't be used). The same binary will work on
|
||||
machines without OpenGL support - only software modes will be available.
|
||||
For MinGW, get the OpenGL headers at
|
||||
http://www.libsdl.org/extras/win32/common/opengl-devel.tar.gz
|
||||
See also http://www.libsdl.org/extras/win32/mingw32/README.txt
|
||||
4. Follow the instructions in the "Building the Emulator on most platforms"
|
||||
section above. NOTE: If required, force using SDL by adding
|
||||
"--with-video-input=sdl --with-sound=sdl" when calling "./configure". When
|
||||
building using MinGW, you might also need to add "--with-sdl-prefix=/mingw".
|
||||
|
||||
Building the Emulator for Java using NestedVM
|
||||
---------------------------------------------
|
||||
1. Get and build NestedVM (nestedvm.ibex.org). make env.sh and unix_runtime.jar
|
||||
2. source env.sh in the NestedVM directory.
|
||||
3. Follow steps 1-5 of the "Building the Emulator on most platforms" section
|
||||
above, but when calling ./configure, add these two parameters:
|
||||
--host=mips-unknown-elf --disable-ide
|
||||
ie.
|
||||
./configure --host=mips-unknown-elf --disable-ide
|
||||
You might want to add --enable-veryslow --disable-monitorbreak to the above.
|
||||
This should result in creation of the file named atari800.jar.
|
||||
4. atari800.jar requires unix_runtime.jar in the same directory. Copy it from
|
||||
the NestedVM directory where you made it using "make unix_runtime.jar" as
|
||||
stated above.
|
||||
5. To run use: java -jar atari800.jar
|
||||
Add -o UnixRuntime to the NestedVM compiler options to enable directory
|
||||
browsing.
|
||||
This requires changing Windows paths to the form: /c:/file in all configuration
|
||||
files and on the command line. It will look for .atari800.cfg in your
|
||||
Windows home directory.
|
||||
Applet version:
|
||||
You must compile with -o UnixRuntime
|
||||
Apply UnixRuntime.patch to NestedVM.
|
||||
To use:
|
||||
<APPLET CODE="atari800.class" WIDTH=672 HEIGHT=480 ARCHIVE="atari800.jar, unix_runtime.jar">
|
||||
<PARAM name=args value="-config /resource/http://atari800_applet.cfg -xlxe_rom /resource/http://ospp.rom -basic_rom none -nobasic -nopatchall /resource/http://disk.atr">
|
||||
</APPLET>
|
||||
All files should have /resource/http:// in front of their names.
|
||||
Edit atari800_applet.cfg and add /resource/http:// to all rom files, even those
|
||||
you are not providing.
|
||||
Legal distribution of Atari800 as an applet cannot include the OS and BASIC
|
||||
ROM Files. You can run without BASIC by using -basic_rom none and Thomas
|
||||
Richter's Os++.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
Installation of the Atari800 emulator for MS-DOS
|
||||
------------------------------------------------------
|
||||
|
||||
Irrespective of whether you are going to compile the emulator yourself
|
||||
or install a pre-compiled binary version you must obtain a copy of the
|
||||
Operating System ROMs.
|
||||
|
||||
The ROM images are distributed within the PC Xformer 2.5 package (other
|
||||
versions of this program do not contain the ROMs in a suitable format)
|
||||
which can be downloaded from:-
|
||||
|
||||
http://prdownloads.sf.net/atari800/xf25.zip
|
||||
|
||||
PC-Xformer contains "ataribas.rom", "atariosb.rom" and "atarixl.rom".
|
||||
If have the original OS it should be called "atariosa.rom" and if
|
||||
you have the ROM for the 5200 Games System it should be called
|
||||
"atari5200.rom".
|
||||
|
||||
Installation of the Emulator
|
||||
----------------------------
|
||||
|
||||
1. Create a toplevel directory called "atari800"
|
||||
|
||||
mkdir c:\atari800
|
||||
|
||||
2. Copy the Atari800 ZIP file into the newly created "atari800"
|
||||
directory and unzip.
|
||||
|
||||
copy *.zip c:\atari800
|
||||
cd c:\atari800
|
||||
pkunzip *.zip
|
||||
|
||||
3. Copy the Operating System ROMS into the same newly created "atari800"
|
||||
|
||||
4. Start the emulator by typing "atari800".
|
||||
@@ -0,0 +1,71 @@
|
||||
May 2008
|
||||
|
||||
Hi all Atari users,
|
||||
|
||||
this is the Atari 8-bit computer emulator for Atari TT/Falcon range of computers.
|
||||
It should run on any computer with 68030 or higher CPU and a graphics
|
||||
capable of resolution 320x240 (or higher) in 256 colors.
|
||||
Atari800 contains special routines for direct VIDEL programming (for achieving
|
||||
336x240 resolution on VGA monitors) and also dedicated NOVA graphics (ISA ATI
|
||||
Mach64) support.
|
||||
|
||||
Atari800 had originally been developed by David Firth though it's been
|
||||
a community project for more than 10 years already.
|
||||
The Falcon port was initially done by me and I still try to keep it updated.
|
||||
Empty Head (= Karel Rous) and Gerhard Janka wrote the 65C02 emulation
|
||||
in pure MC68030 assembler. Douglas Little's assembler routines for VIDEL
|
||||
and IKBD from his game/demo Bad Mood (a DOOM clone) were used for achieving
|
||||
maximum possible speed and compatibility.
|
||||
|
||||
ATARI800.TTP - atari800 (full C source, GNU C -m68020-60 -O3)
|
||||
ATARICPU.TTP - atari800 (cpu.c rewritten in optimized MC68030 asm)
|
||||
|
||||
The following script might be used for rebuilding the fastest possible
|
||||
version:
|
||||
============================== make.sh ====================================
|
||||
#!/bin/sh
|
||||
CFLAGS="-m68020-60 -O3 -fomit-frame-pointer -Wall" ./configure --disable-newcycleexact --without-sound --enable-veryslow --disable-monitorbreak --target=falcon
|
||||
make clean
|
||||
time make
|
||||
fixstk 256k atari800
|
||||
===========================================================================
|
||||
|
||||
Keyboard emulation works just like in other Atari800 flavors:
|
||||
|
||||
F1 = Configuration menu
|
||||
F2 = Option key
|
||||
F3 = Select key
|
||||
F4 = Start key
|
||||
F5 = Reset key (warm start)
|
||||
Shift+F5 = Switch Atari off and on (cold start)
|
||||
F6 = Help key
|
||||
F7 = Break key
|
||||
F8 = Invoke monitor
|
||||
F9 = Exit emulator
|
||||
F10 = Save screenshot
|
||||
Shift+F10 = Save interlaced screenshot
|
||||
Help = Help key
|
||||
|
||||
Joystick emulation works fine. Both real joysticks (CX-40 type) can be
|
||||
connected.
|
||||
|
||||
Several special command line parameters were introduced in this Falcon port:
|
||||
|
||||
-interlace <number> the <number> is a number of skipped Falcon screens.
|
||||
Normally the Falcon screen is updated every time
|
||||
when it's build, i.e. <number> is 0 by default. Higher
|
||||
<number> should cause faster emulation (because of
|
||||
less time spent by updating slow Falcon screen).
|
||||
|
||||
-joyswap swap Joysticks
|
||||
|
||||
-videl on Falcon use direct VIDEL programing (allows you
|
||||
to switch res on-the-fly and achieve special 336x240
|
||||
resolution on VGA)
|
||||
|
||||
-double double the screen size on NOVA cards
|
||||
|
||||
For bugreports of Falcon port please write to me (Petr Stehlik)
|
||||
|
||||
e-mail pstehlik@sophics.cz
|
||||
WWW http://atari800.sourceforge.net/
|
||||
@@ -0,0 +1,35 @@
|
||||
PS2 Specific installation guide
|
||||
|
||||
|
||||
Build atari800.elf from source (see BUILD.ps2) if you
|
||||
do not already have the pre-built binary.
|
||||
|
||||
From Read DOC/INSTALL:
|
||||
***
|
||||
Irrespective of whether you are going to compile the emulator yourself
|
||||
or install a pre-compiled binary version you must obtain a copy of the
|
||||
Operating System ROMs.
|
||||
|
||||
The ROM images are distributed within the PC Xformer 2.5 package (other
|
||||
versions of this program do not contain the ROMs in a suitable format)
|
||||
which can be downloaded from:-
|
||||
|
||||
http://prdownloads.sf.net/atari800/xf25.zip
|
||||
***
|
||||
|
||||
Now, on the PS2:
|
||||
Create an ATARI directory on memcard.
|
||||
Copy atari800.elf,Atari roms, and some atari executables/images to the
|
||||
ATARI directory.
|
||||
launch atari800.elf.
|
||||
|
||||
If your memcard is cramped for space, you should be able to run
|
||||
atari800.elf from HDD (via Ulaunch, etc) or other mass device.
|
||||
Note that currently atari800.elf only can look at MemCard for
|
||||
atari roms and executables/images, and is hard-coded to store
|
||||
the ATARI800.CFG file (the configuration file for atari800) there.
|
||||
|
||||
Read README.ps2
|
||||
|
||||
Thanks Piotr of atari800!
|
||||
Thanks ps2dev.org! Esp NeoVanglist, author of gsKi, and Oopo for the ps2dev toolchain.
|
||||
@@ -0,0 +1,153 @@
|
||||
PocketAtari: The Windows CE Port of the Atari 800 Emulator.
|
||||
|
||||
(Last Update of this File: 30 Oct 06)
|
||||
|
||||
I. PURPOSE
|
||||
------------------------------------------------------------------------------
|
||||
This file describes the installation and compilation procedure for the Windows
|
||||
CE port of the Atari800 emulator [1]. The port currently supports Pocket PC and
|
||||
Smartphone devices deployed with the 2002 version of the OS, also known as
|
||||
WCE300. It has also been tested on devices featuring version 2003 and Windows
|
||||
Mobile 5 of the OS and runs just fine. Your mileage may vary.
|
||||
|
||||
II. NEWS
|
||||
------------------------------------------------------------------------------
|
||||
The updated version of this port:
|
||||
|
||||
o Adds support for Smartphone devices.
|
||||
- Now supporting QVGA Smartphone devices.
|
||||
- Supports QVGA Landcape Smartphone devices. [NEW in 2.0.3]
|
||||
- Adds a popup virtual keyboard. [NEW in 2.0.3]
|
||||
o Support for VGA displays.
|
||||
o Includes interpolating downsampling filter for Smartphone displays.
|
||||
o Keeps the backlight always on.
|
||||
|
||||
III. INSTALLING
|
||||
------------------------------------------------------------------------------
|
||||
To intall PocketAtari on your PocketPC/Smartphone device:
|
||||
|
||||
o Create a directory anywhere on your device (Smartphone users need a suitable
|
||||
file explorer application; else you can create it in the Start Menu folder).
|
||||
o Copy the pocketatari.exe file there.
|
||||
o (Optional) Older Windows CE devices also need GAPI from Microsoft [6]. Copy
|
||||
gx.dll into the folder as well.
|
||||
o Copy the Atari OS ROM files in the same folder (see the FAQ for the ROMs).
|
||||
o (Optional) Create a symbolic link to pocketatari.exe at
|
||||
(IPSM)\Windows\Start Menu.
|
||||
o You're good to go!
|
||||
|
||||
NOTE: The PocketAtari binary does not support older Palm devices (eg. wince
|
||||
2.11), but the source code should compile and run with no problems. If you
|
||||
can contribute a build for these devices contact me through [3].
|
||||
|
||||
IV. USING
|
||||
------------------------------------------------------------------------------
|
||||
Pocket Atari can operate in portrait, landscape and inverse landscape mode.
|
||||
Port-specific options in the Windows CE version are:
|
||||
|
||||
o Virtual Joystick (in Controller Configuration, Pocket PC only)
|
||||
Enable joystick emulation with stylus.
|
||||
o Enable Linear Filtering (in Display Settings)
|
||||
Use filtering for better image quality.
|
||||
|
||||
Controls for the different classes of devices:
|
||||
|
||||
a. Pocket PC
|
||||
Use the displayed keyboard/menu to operate the emulator. In landscape modes
|
||||
tap the bottom right corner of the atari screen to display the keyboard/menu.
|
||||
|
||||
b. Smartphone
|
||||
Due to the lack of proper keyboard and pointing device, the emulated Atari features
|
||||
are limited. You can play the majority of games though. Use the following keys:
|
||||
|
||||
Directional keys : Simulate joystick 0 $
|
||||
Softkey A, Softkey B, 4, 6 : Fire joystick 0 $
|
||||
0 : Return key
|
||||
7 : Option key
|
||||
8 : Select key
|
||||
9 : Start key
|
||||
Softkey C (usually '*' key) : Show emulator menu $
|
||||
Talk/Call/Green key : Switch between the 3 display modes
|
||||
|
||||
For navigating the emulator menus use buttons marked with '$' above.
|
||||
|
||||
Pressing and holding the Softkey C for more than one (1) second during emulation
|
||||
brings up the virtual Atari keyboard. Navigate with cursor keys to the desired
|
||||
key and press Softkey A or B to inject one keystroke into the emulator.
|
||||
|
||||
TIP: In some demos, pressing the SHIFT key skips the current part. In the virtual
|
||||
keyboard the SHIFT key is a toggle, so select also another key. The SHIFT
|
||||
keycode will register just fine.
|
||||
|
||||
NOTE 1 : Functionality of Softkey A, Softkey B and * keys may be attributed
|
||||
differently according to the drivers of your cellphone.
|
||||
NOTE 2 : Until we get a fully modifiable controller configuration option in
|
||||
Atari800, you have to live with the preassigned keys. As an exception,
|
||||
some smartphones have reported problems with the simultaneous use of
|
||||
the fire keys and the directional pad. I have included an option to
|
||||
exchange the functionality of the Softkey B and C keys. This should be
|
||||
considered as an UNSUPPORTED option which will go away in the future.
|
||||
To enable it include the following line in your atari800.cfg file:
|
||||
WCE_SMARTPHONE_KBHACK=1
|
||||
Also note that this behavior is enabled by default for QVGA Landscape
|
||||
Smartphone devices, due to the possible lack of a Softkey C.
|
||||
|
||||
V. COMPILING
|
||||
------------------------------------------------------------------------------
|
||||
You will need the following tools:
|
||||
|
||||
o Microsoft Embedded Visual Tools 3.0 [7].
|
||||
o GAPI emulation [4] for the emulators.
|
||||
o The zlibce library [5].
|
||||
|
||||
Create a folder named zlib inside the src/wince directory. Copy zconf.h
|
||||
and zlib.h in zlib/. Create two folders named arm and x86 (src/wince/zlib/arm
|
||||
and src/wince/zlib/x86). Copy the appropriate zlibce.lib files in these
|
||||
directories. Don't forget to upload gx.dll (if needed) and zlibce.dll to your
|
||||
emulator. Also for older Smartphones you'll have to compile yourself a version of
|
||||
the gx.dll using the GAPI emulator files. The Smartphone resolution is 176x220
|
||||
pixels with 16bpp (either 565 or 555 RGB configurations).
|
||||
|
||||
NOTE 1 : If you cannot open the project file "PocketAtari.vcp" from the source
|
||||
tarball or CVS checkout, make sure that it is in CR+LF format (and not
|
||||
just LF). A utility like unix2dos can do the trick.
|
||||
|
||||
NOTE 2 : PocketAtari can also compile OK using evc4 or Visual Studio 2005.
|
||||
|
||||
VI. HISTORY
|
||||
------------------------------------------------------------------------------
|
||||
The Pocket PC port was originally done by Vasyl Tsvirkunov [2].
|
||||
Kostas Nakos [3] updated the port and added support for Smartphone devices.
|
||||
Many thanks to Vasyl for providing us with a stable codebase!
|
||||
|
||||
VII. CONTACT
|
||||
------------------------------------------------------------------------------
|
||||
Please visit my Atari800 page [3] for fresh builds and news.
|
||||
To report bugs or request new features you can email me at: knakos@gmail.com
|
||||
Also visit Vasyl's Atari800 page [2] and check out the links for more of his work.
|
||||
For inquiries about the Pocket PC/Smartphone port or the emulator in general
|
||||
you can also take a look at the Atari800-users mailing list available at [1].
|
||||
|
||||
|
||||
Enjoy!
|
||||
Kostas Nakos,
|
||||
31/08/05
|
||||
Athens, Greece
|
||||
|
||||
|
||||
VIII. REFERENCES
|
||||
------------------------------------------------------------------------------
|
||||
[1] Atari800 project homepage
|
||||
http://atari800.sourceforge.net/
|
||||
[2] Vasyl Tsvirkunov's Atari800 page
|
||||
http://pocketatari.retrogames.com
|
||||
[3] Kostas Nakos' Atari800 page
|
||||
http://pocketatari.atari.org
|
||||
[4] GAPI emulation
|
||||
http://pocketfrog.droneship.com/
|
||||
[5] zlib for Windows CE
|
||||
http://www.tenik.co.jp/~adachi/wince/
|
||||
[6] Microsoft GAPI 1.2
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=d9879b0e-4ef1-4049-9c61-e758933d84c4&displaylang=en
|
||||
[7] Microsoft eMbedded Visual Tools 3.0
|
||||
http://msdn.microsoft.com/mobility/windowsmobile/downloads/default.aspx
|
||||
@@ -0,0 +1,14 @@
|
||||
LPTjoy interface (designed by Petr Sumbera)
|
||||
|
||||
[ CANON 25 MALE ] [ CANON 9 M ]
|
||||
|
||||
(acknowledge) 10 ........................... 4 (right)
|
||||
(busy) 11 ........................... 3 (left)
|
||||
(out of paper) 12 ........................... 2 (down)
|
||||
(select) 13 ........................... 1 (up)
|
||||
|
||||
(error) 15 ........................... 6 (button)
|
||||
|
||||
(strobe) 1 ........................... 7 (Ucc)
|
||||
(ground) 25 ........................... 8 (ground)
|
||||
|
||||
@@ -0,0 +1,941 @@
|
||||
Version ?.?.? (????/??/??)
|
||||
|
||||
This release contains changes in color handling. Users updating from
|
||||
an earlier version should reset their color settings, or else the display
|
||||
might be unreadable. To reset the color settings, do one of these:
|
||||
* Select one of the presets available in the menu option "Display settings"->
|
||||
"Color preset"; or
|
||||
* Run atari800 with the -color-preset command-line option, e.g.:
|
||||
atari800 -colors-preset standard; or
|
||||
* Delete the emulator's config file (.atari800.cfg). Caution: you'll lose
|
||||
all Atari800 settings!
|
||||
|
||||
New features:
|
||||
-------------
|
||||
* Support for loading of CAS images with "fsk" chunks - images of
|
||||
copy-protected tapes can now be loaded, with SIO patch being disabled.
|
||||
* Bit3 Full View 80 Column card emulation.
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* The Sound Settings option "Fragment size" has been renamed to less cryptic
|
||||
"Hardware buffer size".
|
||||
|
||||
Fixes:
|
||||
------
|
||||
* Fixed computation of gamma adjustment - now it is applied to each of the
|
||||
three RGB channels separately.
|
||||
* On systems that support synchronized sound: Fixed the emulator crashing
|
||||
when Dual POKEY was enabled while High Fidelity POKEY was turned off.
|
||||
* Improve screen update routines in the Dreamcast port. They don't use
|
||||
DIRTYRECT anymore but are faster than the old routines when the whole
|
||||
screen is dirty.
|
||||
|
||||
|
||||
Version 3.1.0 (2014/04/12) - release cooked at Atariada.cz
|
||||
|
||||
Highlight of this release: Raspberry Pi port by Andrey Dj
|
||||
|
||||
Hidden easter egg: on-screen keyboard in SDL by Christian Groessler
|
||||
|
||||
All the following work has been done by Tomasz Krasuski:
|
||||
|
||||
General new features:
|
||||
---------------------
|
||||
* More accurate emulation of PAL colours (based on analysis of oscillograms
|
||||
of real PAL GTIA output)
|
||||
|
||||
* Improved PAL blending, working on all grayscale pixels and is accurate now
|
||||
(can be enabled/disabled in "TV effect" display settings)
|
||||
|
||||
* common sound layer implemented (SDL, JavaNVM, OSS, DOS) with synchro sound.
|
||||
|
||||
* synchronized sound is now supported by both POKEY sound engines.
|
||||
|
||||
* turbo mode (F12) is considerably faster
|
||||
|
||||
* Added cartridge mapping used by "Turbo Hit"/"Atari Blizzard Hit".
|
||||
* Added MegaMax 2 MB cartridge mapping.
|
||||
* Added read-only support for the 4 MB Flash MegaCart mapping.
|
||||
* Added minimal support for The!Cart.
|
||||
|
||||
General Fixes:
|
||||
--------------
|
||||
* fixed possible unnecessary cartridge bank switching
|
||||
* fixes and clean up in Java port
|
||||
* fixed diagnostic cartridge cold start (doesn't send Start+Option)
|
||||
* fixed two old bugs in DOS sound (pitch being wrong and sound missing)
|
||||
* fixed keyboard not working for ncurses video and OSS sound
|
||||
|
||||
|
||||
Version 3.0.0 (2013/03/03)
|
||||
|
||||
New features:
|
||||
-------------
|
||||
* Option to automatically save configuration on exit
|
||||
* More settings saved in configuration:
|
||||
- currently attached tape file
|
||||
- cartridge settings, including currently attached cartridges
|
||||
- state of R-Time 8
|
||||
- system settings, including Mosaic/Axlon RAM size
|
||||
* New Tape Management menu - can now create blank tape images, switch tape
|
||||
to read/write in order to save additional data at the end of the current
|
||||
tape image, rewind/fast forward the tape, and mark it as read-only. See
|
||||
DOC/USAGE for details.
|
||||
* Displaying tape position when "Show sector/block counter" is enabled.
|
||||
* Reworked Cartridge Management menu - now displays filename of the
|
||||
attached cartridge.
|
||||
* Option to disable restarting of the machine after cartridge change.
|
||||
* When attaching a cartridge from the command line, cartridge type can now
|
||||
be specified using the new -cart-type and -cart2-type options.
|
||||
* New cartridge types supported:
|
||||
- OSS 8 KB cartridge
|
||||
- OSS two chip 16 KB cartridge (043M)
|
||||
- Blizzard 4 KB cartridge
|
||||
- AST 32 KB cartridge
|
||||
- Atrax SDX 64 KB cartridge
|
||||
- Atrax SDX 128 KB cartridge
|
||||
- Turbosoft 64 KB cartridge
|
||||
- Turbosoft 128 KB cartridge
|
||||
- Ultracart 32 KB cartridge
|
||||
- Low bank 8 KB cartridge
|
||||
- SIC! 128 KB cartridge
|
||||
- SIC! 256 KB cartridge
|
||||
- SIC! 512 KB cartridge
|
||||
- Standard 2 KB cartridge
|
||||
- Standard 4 KB cartridge
|
||||
- Right slot 4 KB cartridge
|
||||
* The configure script can now auto-detect some of the available display and
|
||||
sound interfaces before compiling.
|
||||
* Option to enable XEP80 added to The Emulator Settings menu.
|
||||
* Emulation of the 1200XL, including console LEDs, no built-in BASIC, the
|
||||
F1-F4 keys (mapped to arrow keys in the SDL version) and the on-board
|
||||
J1 jumper.
|
||||
* Emulation of the XE Game System, including the built-in game and
|
||||
detachable keyboard.
|
||||
* Revamped the Select System menu (now called System Settings). Can now
|
||||
select many system settings, including RAM expansions, OS and BASIC
|
||||
revision, and more.
|
||||
* System ROM settings moved to a separate menu. Now it stores paths to all
|
||||
known official revisions of the Atari OS, the 5200 BIOS, all BASIC
|
||||
revisions, and the XEGS built-in game. The OS revision to use is chosen
|
||||
automatically when selecting a machine type (for example, the 400/800 OS
|
||||
PAL or NTSC version is chosen depending on the selected TV system).
|
||||
* 400/800: Emulation of all RAM sizes achievable with different combinations
|
||||
of the CX852 and CX853 modules - from 8 to 48 KB.
|
||||
* Emulation of 32/48KB memory sizes in the XL/XE mode, compatible
|
||||
with memory expansions for the 600XL manufactured by RC Systems.
|
||||
* Emulation of the MapRAM hardware hack.
|
||||
* Display settings: "Hue" renamed to "Tint". Tint now configurable also in
|
||||
PAL mode.
|
||||
|
||||
New Android port features:
|
||||
--------------------------
|
||||
* Renamed Atari800 Android port to "Colleen"
|
||||
* Implemented extended key remapping
|
||||
* Implemented the B: device (8-bit games can reach the web now)
|
||||
* Support for Xperia play keycodes added
|
||||
* Remapped dpad enter to break
|
||||
* Added paddle emulation
|
||||
* Optimized file selector, allow roaming outside of ext. storage dir
|
||||
* Added an exclusion border for paddle mode
|
||||
* Implemented state saving
|
||||
* Implemented Planetary Defense mode, a Koala Pad click-where-I-point mode
|
||||
* Natively supported UI on post-Honeycomb devices
|
||||
* Fixes for Jelly Bean (audio stuttering, keypad dialogs, soft keyboard)
|
||||
* Added new dialog for cartridge type selection
|
||||
* UI fine tuning
|
||||
|
||||
General Fixes:
|
||||
--------------
|
||||
* Bugfixes in cassette emulation - works reliably even for tape images with
|
||||
long (> 4096 B) blocks.
|
||||
* Fixes in save states - loading of save states works correctly even with an
|
||||
attached bank-switched cartridge or with an Axlon/Mosaic RAM expansion.
|
||||
Note 1: Format of the state files has changed. Old save states can still
|
||||
be opened, but newly-created ones cannot be opened in older versions of
|
||||
Atari800.
|
||||
Note 2: Tape position is not restored on loading of save states. Do not
|
||||
save state during tape loading/saving - it won't work as expected.
|
||||
* "Disable BASIC when booting Atari" no longer emulates pressing of the
|
||||
Option key when in the 400/800 mode.
|
||||
* Fixed a bug with BASIC sometimes disabling itself when switching system
|
||||
type to 400/800
|
||||
* Minor bugfixes in file selector
|
||||
* Fixed emulation of SpartaDOS X piggyback cartridge functionality
|
||||
* "Save Screenshot" fixed - it saved an interlaced screenshot instead of a
|
||||
normal one.
|
||||
* SDL version: Swapped mapping of right and middle mouse buttons, to make it
|
||||
identical to the X11 and Win32 ports.
|
||||
* Monitor: fixed displaying/disassembling of memory area $D000-$D7FF - with
|
||||
the new supported cartridge types, code may reside on page $D5, and now it
|
||||
can be debugged.
|
||||
* SDL version: fixed a blue border when in OpenGL BGRA32 mode.
|
||||
* Minor fixes in parsing of command-line options.
|
||||
* Rewritten XEP80 emulation - now more accurate and supports switching
|
||||
between NTSC/PAL modes with correct aspect ratio. XEP80 emulation now
|
||||
requires a charset ROM image, path to which should be set in the
|
||||
XEP80_CHARSET line in the config file.
|
||||
* Fixed operating system patches not working with all official revisions of
|
||||
the OS.
|
||||
* Fixed emulation of separate ANTIC/CPU access to XE RAM when Self-Test is
|
||||
enabled.
|
||||
* Fixed the emulator menu sometimes being displayed incorrectly (missing
|
||||
font) when running without an OS ROM image.
|
||||
* Improved accuracy of generated colours in PAL mode.
|
||||
* Fixed emulation of the H: read operation - Turbo Basic's BLOAD now works
|
||||
on H: devices.
|
||||
|
||||
|
||||
Version 2.2.1 (2011/04/28)
|
||||
|
||||
Quick update fixing some annoying bugs from the previous release
|
||||
and adding some new host screen optimizations and improvements:
|
||||
|
||||
* X11 target can be compiled again
|
||||
* SDL sound on *BSD should work
|
||||
* older compilers (DOS/BeOS) should compile again
|
||||
* many SDL/OpenGL workarounds for Microsoft Windows libSDL bugs
|
||||
* IDE fix and CF emulation
|
||||
* some small Android fixes and new arrow key derotation workaround
|
||||
* UI sliders used for more settings (video area/shift options)
|
||||
* several command line options renamed to be more intuitive (see the USAGE)
|
||||
* automatic detection of host screen aspect ratio
|
||||
* added option for disabling OpenGL Pixel Buffer Objects
|
||||
* added option for enabling video synchronization with vertical retrace
|
||||
* added option for selecting pixel format in OpenGL
|
||||
* now saves the Show Speed/Disk Activity/Sector Counter in the settings
|
||||
|
||||
|
||||
Version 2.2.0 (2011/04/02)
|
||||
|
||||
Another update after two long years. A lot of changes and major improvements:
|
||||
|
||||
New features:
|
||||
-------------
|
||||
* SDL features synchronized sound (GTIA+POKEY digisounds play properly now)
|
||||
* SDL display enhancements (hardware accelerated using OpenGL)
|
||||
* DirectX display enhancements (also hardware accelerated)
|
||||
* Improved NTSC and PAL colours (presets: Standard/Deep Black/Vibrant)
|
||||
* Austin Franklin 80 Column card
|
||||
* Emulate the Alien Group Voice Box I and II
|
||||
* Added support for F12 turbo mode.
|
||||
* IDE emulation (compatible with MyIDE)
|
||||
* New Android port by Kostas Nakos (available in the App Market already)
|
||||
* Auto frame skip for slower devices (currently enabled for Android only)
|
||||
|
||||
Fixes:
|
||||
------
|
||||
* trak-ball (cx22) emulation fixed
|
||||
* SDL: leftmost column missing in 16/32bpp fixed
|
||||
* DirectX default for Win32 SDL
|
||||
|
||||
SDL Display enhancements:
|
||||
-------------------------
|
||||
1. Fullscreen resolution - this gives a list of all available resolutions from
|
||||
which a user chooses one. The default resolution is the next-bigger-than
|
||||
336x240.
|
||||
|
||||
2. Fullscreen: yes/no - obvious. Window size is independent from the chosen
|
||||
fullscreen resolution and can be changed by resizing the window.
|
||||
|
||||
3. Rotate sideways: yes/no - rotates the screen by 90 deg. Works as earlier,
|
||||
ie. only for "standard" display (no NTSC filter, no 80 column card).
|
||||
|
||||
4. Stretch - this option controls how display stretching (scaling) is
|
||||
performed. We can select one of:
|
||||
a) none - no stretching at all
|
||||
b) integer multiples (default) - width and height will be resized by 1x, 2x,
|
||||
3x etc.
|
||||
c) full - stretching is unrestricted, display will cover the entire screen.
|
||||
|
||||
5. Keep aspect ratio - this option controls how the display's aspect ratio is
|
||||
corrected. 3 options available:
|
||||
a) disabled - no aspect ratio correction, display will fill entire
|
||||
screen/window,
|
||||
b) 1:1 (default) - width and height will be multipled by the same value
|
||||
c) like real TV - display will be resized to reflect pixel aspect ratio of a
|
||||
real Atari connected to a TV. Atari pixels are not square; pixel width-to-
|
||||
height ratio is about 0.857 for NTSC and 1.039 for PAL. This option reflects
|
||||
that.
|
||||
|
||||
6. Host display aspect ratio - here the user enters aspect ratio of his
|
||||
monitor. This value is used to properly compute display aspect ratio when
|
||||
"Keep aspect ratio" is set to "like real TV". Set it to 4:3 (default), 16:9,
|
||||
1.78:1 etc.
|
||||
|
||||
7. Horizontal view area - this option sets the size of Atari screen area
|
||||
visible horizontally. Choose one of:
|
||||
a) narrow - 320 columns wide,
|
||||
b) normal (default) - 336 columns wide,
|
||||
c) full - 384 columns
|
||||
d) custom - lets the user enter any value between 160 and 384.
|
||||
|
||||
8. Vertical view area - similar to above:
|
||||
a) short - 200 lines high
|
||||
b) normal (default) - this setting is TV-system-dependent. In PAL this makes
|
||||
all 240 lines visible, while in NTSC top and bottom 8 lines are hidden, which
|
||||
leaves 224 lines visible. I've made this as such because apparently on NTSC
|
||||
TVs not all 240 lines are visible. The value of 224 was taken by taking full
|
||||
NTSC height (480, divided by 2) and cutting top and bottom 3.5% (different
|
||||
sources say 3.5% is the "action-safe" overscan area).
|
||||
c) full - 240 lines high
|
||||
d) custom - any value between 100 and 240.
|
||||
|
||||
9. Horizontal offset - when amount of columns displayed is less than 384, this
|
||||
option "shifts" the visible screen area. Setting to higher than 0 shows more
|
||||
of the right side, and lower than 0 shows more of the left side.
|
||||
|
||||
10. Vertical offset - similar to above.
|
||||
|
||||
Additionally, the Alt+Shift+X shortcut that switches beetween standard<->80
|
||||
column display is now also available as "Display settings->80 column display
|
||||
if available: yes/no".
|
||||
|
||||
The Alt+B switch however has been removed - since setting black/white colours
|
||||
can be done in Display settings anyway.
|
||||
|
||||
All new options are also available from command line and are saveable in
|
||||
configuration.
|
||||
|
||||
New Android port features:
|
||||
-------------------------
|
||||
- Efficient performance
|
||||
- Uses Opengl ES to handle scaling of the graphics
|
||||
- Runs on Android 1.6+
|
||||
- Novel on screen touch joystick control for less hand cramps & intuitive
|
||||
control
|
||||
- Supports multi touch input
|
||||
- Supports hardware keyboard with key remapping for joystick input
|
||||
- Supports the Wii Controller for joystick input
|
||||
- Supports the "move to SD" feature
|
||||
- Sound emulation very good but not perfect yet
|
||||
- Bypasses the emulator UI menu completely - goes 'the android way' about it
|
||||
- Available in the App Market: market://details?id=name.nick.jubanka.atari800
|
||||
|
||||
|
||||
Version 2.1.0 (2009/03/27)
|
||||
|
||||
The promised completely new next-gen Atari800 was postponed so this
|
||||
is another incremental update of the good old Atari800. Let's see
|
||||
what we have added and improved in the last 20 months:
|
||||
|
||||
New features:
|
||||
-------------
|
||||
* added Axlon and Mosaic RAM expansions for Atari 400/800
|
||||
* added emulation of 1400XL, 1450XLD, MIO and Black Box
|
||||
* added support of .PRO copy-protected disk images
|
||||
* implemented tape loading with variable bitrates
|
||||
* implemented cassette writing via hardware registers
|
||||
* added switching between NTSC and PAL color palettes
|
||||
* added emulation of XEP80 and a prototype 80 column card
|
||||
for the Atari 1090 (SDL only currently)
|
||||
* added emulation of CX85 numeric keyboard (Java and SDL only)
|
||||
* event recording added (-record, -playback): save your game walkthrough
|
||||
using the "-record mygame.dat" and later impress your friends by
|
||||
your game skills or highest score using the "-playback mygame.dat"
|
||||
* NTSC Filter option added to UI
|
||||
* -directmouse added to SDL and X11 (used for -mouse pad or koala)
|
||||
* monitor supports arrow keys - e.g. up-arrow for history
|
||||
* SDL: interpolated scanlines (use -scanlinesnoint to disable)
|
||||
* SDL: added -mouse, -mousespeed, -grabmouse (also Alt+M)
|
||||
* SDL: visual configuration of keyboard joysticks layout in the UI
|
||||
(F1 -> Controller Configuration -> Define layout)
|
||||
default mapping changed to 4,8,6,5 (joy0) and A,W,D,S (joy1)
|
||||
* R: device can be serial-only, network-only or both (selectable)
|
||||
* R: device now supported on MS Windows and Dreamcast as well
|
||||
* a completely new port to Java using NestedVM, running also as an applet
|
||||
* Falcon/TT: removed Devpac dependency in asm files (now gcc friendly)
|
||||
|
||||
Fixes:
|
||||
------
|
||||
* fix for "Ilusia" demo
|
||||
* better GTIA bug mode emulation
|
||||
* POKEY sound: nonlinear mixing (not enabled by default), two-tone filter
|
||||
* fixed POKEY registers: ALLPOT, IRQEN and STIMER
|
||||
* various Atari5200 fixes
|
||||
* fixed Atrax cartridge bank switching
|
||||
* fixed sound recording to WAV
|
||||
* -showspeed fixed, now shows speed <= 100% correctly
|
||||
* major source code cleanup, compiles with -pedantic etc.
|
||||
* Save State: added support for Axlon and Mosaic (version increased to 5),
|
||||
fixed PBIM12 restoring, fixed PAGED_MEM error with POKEY,
|
||||
color palette restoring fixed
|
||||
* SDL: using DirectX driver on MS Windows (much faster),
|
||||
fixed stdout.txt on MS Windows,
|
||||
fixed broken Caps Lock key handling,
|
||||
-audio16 fixed
|
||||
* Dreamcast recognizes the TAB key
|
||||
* MS-Windows: Shift+Control fixes
|
||||
* dropped SVGAlib target - use SDL instead
|
||||
|
||||
Thanks to Perry McFarlane and other developers for their contributions
|
||||
to this release. Enjoy Atari800!
|
||||
|
||||
|
||||
Version 2.0.3 (2007/07/11)
|
||||
|
||||
This is probably the last release that is based on the source code
|
||||
written by David Firth back in previous century.
|
||||
A completely new Atari800, written from scratch, with even better
|
||||
portability and maintainability is being planned so stay tuned!
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* new style of artifacting
|
||||
* corrected PMG in bizarre ANTIC/GTIA modes
|
||||
* added 128 KB SpartaDOS X cartridge type
|
||||
* added support for QVGA landscape smartphones, added the virtual keyboard
|
||||
* new command-line option "-win32keys" for keyboard layouts different from US
|
||||
* MS-Win: run the emulator in a window ("-windowed" on the command line)
|
||||
* middle button support for ST and Amiga mice in X11 and MS-Win targets
|
||||
|
||||
|
||||
Version 2.0.2 (2006/04/08)
|
||||
|
||||
There is a new NTSC emulator available thanks to Blargg (Shay Green)
|
||||
(http://www.slack.net/~ant) and NewRisingSun who made the original algorithm.
|
||||
You can access it with -ntscemu in the SDL port only.
|
||||
Only 640x480x16 is supported and will be invoked automatically.
|
||||
You will need a fast processor (~700 MHz or so).
|
||||
This code should be considered experimental but I hope you
|
||||
will try it and report any problems. Please experiment with the
|
||||
many settings and compare them with a real NTSC Atari if you have one.
|
||||
If you come up with better settings than the current defaults please provide
|
||||
feedback. Try -ntsc_burst 0.70 in Drol, Choplifter and Ultima.
|
||||
Please read DOC/USAGE and check -help.
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* Blargg's NTSC composite video emulator, based on NewRisingSun's Algorithm.
|
||||
* small fixes in ANTIC/GTIA emulation
|
||||
* fixed DCM image handling (broken in 2.0.0)
|
||||
* added emulation of Atari XL/XE with 192 KB RAM
|
||||
* integrated SEGA Dreamcast port
|
||||
* Atari Inverse key mapped also to "`" (backquote) in SDL port (MS Win users)
|
||||
* some minor improvements
|
||||
* much more DOC/TODO
|
||||
|
||||
|
||||
Version 2.0.1 (2006/01/02)
|
||||
|
||||
Just a quick UI bugfixes release.
|
||||
|
||||
|
||||
Version 2.0.0 (2005/12/31) - celebrating decade of Atari800 development!
|
||||
|
||||
This release brings major source code clean up, numerous bug fixes and
|
||||
many great new features and important improvements. 98% of changes since
|
||||
last release have been made by Piotr Fusik - admire his dedication
|
||||
to Atari800 project while you will be browsing through the impressive list
|
||||
of changes below.
|
||||
|
||||
Run-time configuration (via the .atari800.cfg file) has been improved.
|
||||
All configuration options are now available in the User Interface.
|
||||
Remember to use "Save configuration file" when necessary.
|
||||
|
||||
If you are new to Atari800, press F1 and select "Emulator Configuration"
|
||||
to configure the ROM images. This can be easily done with
|
||||
"Find ROM images in a directory".
|
||||
|
||||
DISK_DIR, ROM_DIR, EXE_DIR and STATE_DIR configuration options are no longer
|
||||
supported in this version. You need to re-select your directories
|
||||
using "Emulator Configuration" -> "Configure directories".
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* auto-starting any file supported by the emulator
|
||||
via the command line, User Interface or Alt+R
|
||||
* direct loading of Atari Basic programs:
|
||||
- SAVEd (*.BAS) programs
|
||||
- LISTed (*.LST) programs with auto-detected Atari, LF, CR/LF or CR
|
||||
line terminators
|
||||
* numerous fixes and improvements in H: device emulation
|
||||
* fixed a bug in DMACTL emulation
|
||||
* cycle-exact Read-Modify-Write instructions for all GTIA registers
|
||||
* Atarimax cartridges
|
||||
* correct emulation of the RESET key in 400/800 (it generates RNMI)
|
||||
* improved DCM format support
|
||||
* improved PERCOM emulation (helps non-standard disk images)
|
||||
* removed questions that appeared in the console window when no configuration
|
||||
file was found; now a default configuration is written and you can
|
||||
modify it using User Interface; the easiest way to configure ROMs is
|
||||
"Find ROM images in a directory" which looks for common names of ROM images
|
||||
* DISK_DIR, ROM_DIR, EXE_DIR and STATE_DIR configuration options replaced
|
||||
with ATARI_FILES_DIR and SAVED_FILES_DIR
|
||||
* sound recording now works (was completely broken)
|
||||
* new in User Interface: "Emulator Configuration", "Controller
|
||||
Configuration", "Save Interlaced Screenshot", "Uncompress Disk Image"
|
||||
* improved "open file" selector:
|
||||
- sorts case-insensitively
|
||||
- sorts directories whose name begins with a dot
|
||||
- starts on the previously selected file
|
||||
- you can move to a file by pressing its first letter (works in menus, too)
|
||||
- path of the listed directory is shown at the top of the screen
|
||||
* improved "save file" filename selection:
|
||||
- no longer limited to 32 characters
|
||||
- directory appears in the edit box
|
||||
- Tab invokes directory browser
|
||||
* "Make Blank ATR Disk" creates standard Single Density disk image
|
||||
* shortcut keys (Alt+letter, F9, ...) work in User Interface
|
||||
* new "-screenshots <pattern>" command-line option
|
||||
* replaced "-rtime <onoff>" with "-rtime" / "-nortime"
|
||||
* replaced "-hdreadonly <onoff>" with "-hreadonly" / "-hreadwrite"
|
||||
* new monitor commands: "LABELS", "LOOP"
|
||||
* "C", "M" and "S" monitor commands support hardware registers
|
||||
* improved "SHOW", "DLIST", "D" and "A" monitor commands
|
||||
* fixed memory leaks, buffer overflows, Y2K and Y2100 bugs
|
||||
* fixed GCC 4 compilation error and warnings
|
||||
* fixed sound in X11 version (feedback is welcome)
|
||||
* much faster display in the X11 version
|
||||
* MOTIF and XVIEW versions are now compilable
|
||||
* standard key mappings for F6-F10 in DirectX, SDL, SVGALIB and X11 versions
|
||||
* implemented Atari 5200 keys in DirectX, SDL, SVGALIB and X11 versions
|
||||
* WinCE version ported to Smartphones
|
||||
* DirectX version can be compiled with MSVC 6
|
||||
* stereo now works in DOS ports
|
||||
* fixed "-rotate90" and Alt+B in SDL version
|
||||
* greatly improved BASIC version:
|
||||
- supports sound
|
||||
- supports all interrupts
|
||||
- timing much closer to real Atari
|
||||
- Clear Screen, Backspace, Tab and Bell converted from ATASCII to ASCII
|
||||
- improved "K:" input
|
||||
- much smaller executable (does not include unused code)
|
||||
* greatly improved CURSES version:
|
||||
- support for PDCurses
|
||||
- small fix for NCurses
|
||||
- generates screen basing on the Display List
|
||||
- fixed Tab, Backspace, Insert, Delete, Home, F2, F3, F4, F8 and Ctrl+letter
|
||||
- fixed "-wide2" mode
|
||||
- Alt+letter shortcuts work on PDCurses
|
||||
- bitmap graphics emulation is now disabled by default
|
||||
(smaller and faster executable), but can be enabled with "configure"
|
||||
* new experimental PlayStation 2 port
|
||||
* improved "configure" script
|
||||
* SDL keyboard joysticks can be enabled/disabled in the UI (Controller Config)
|
||||
* many small fixes and major source code clean up
|
||||
|
||||
|
||||
Version 1.3.6 (2005/04/30)
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* different color palette used by default
|
||||
* PNG screenshots added
|
||||
* added sector counter and speedometer
|
||||
* F6 is Atari HELP key on Curses, Falcon and in X11
|
||||
* added missing combinations of ANTIC modes with GTIA modes
|
||||
* keyboard joystick works in more games (doesn't pause the game) in SDL
|
||||
* mouse joystick emulation works in X11
|
||||
* cassette loading by hardware registers (Ninja and Elektraglide
|
||||
are examples of games that load correctly now)
|
||||
* blank boot ATR disk image can be created in the Disk Management menu
|
||||
* many small fixes and major source code clean up
|
||||
|
||||
|
||||
Version 1.3.5 (2004/12/30)
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* keyboard handling improved in SDL (working on non-US layouts, more
|
||||
keys recognized)
|
||||
* keyboard handling improved in X11 (crash fixed, auto-repeat working)
|
||||
|
||||
|
||||
Version 1.3.4 (2004/12/27)
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* security fixes (buffer overflows) and compilation errors (GCC 3.4)
|
||||
* ANTIC timing fix for Timeslip game
|
||||
* fix in UI fileselector (crashed if there were no files)
|
||||
* Amiga port updated
|
||||
|
||||
|
||||
Version 1.3.3 (2004/08/08)
|
||||
|
||||
Changes:
|
||||
--------
|
||||
* ANTIC mode 2 + GTIA mode 10 - half pixel shift fix
|
||||
* Amiga port updated
|
||||
* OS/2 port updated
|
||||
* DOSVGA port updated - joystick definition read again
|
||||
* X11 port has improved keyboard support (Ctrl+Pause, left Ctrl for joy button)
|
||||
* SDL port updated: joysticks emulated on keyboard can be freely edited
|
||||
now with SDL_JOY_0_<direction> and SDL_TRIG_0 (same for JOY_1/TRIG_1)
|
||||
config file parameters that expect values from SDL keySyms.
|
||||
|
||||
|
||||
Version 1.3.2 (2003/12/20)
|
||||
|
||||
Highlights since previous release:
|
||||
----------------------------------
|
||||
* R: can now be hooked to a real serial port (no runtime config yet)
|
||||
* various ANTIC and POKEY fixes for perfect software compatibility
|
||||
* disk and cartridge info saved in the state files
|
||||
* casette handling greatly improved
|
||||
* even more cartridges supported (40 now!)
|
||||
* some rare buffer overflows fixed
|
||||
|
||||
|
||||
Version 1.3.1 (2003/09/04)
|
||||
|
||||
Highlights since last 1.3.0 release:
|
||||
------------------------------------
|
||||
* rewritten and much improved configure script
|
||||
* new cartridge types supported (38 types now!) - see DOC/cart.txt
|
||||
* Disk Sets - loading and saving of D1-D8 set is possible in the UI
|
||||
* R: as the Atari850 serial port emulation added - see DOC/r_device.txt
|
||||
* updated and improved m68k assembler emulation of the CPU
|
||||
* XF551 HighSpeed transfer emulation added
|
||||
|
||||
|
||||
Version 1.3.0 (2003/02/10)
|
||||
|
||||
Highlights since last 1.2.5 release:
|
||||
------------------------------------
|
||||
* new HiFi sound (you may en/disable it in the UI)
|
||||
* new cycle-exact Antic emulation
|
||||
* "H:" emulation complete (including subfolders)
|
||||
* Paged memory implementation (fast XE bank-switching)
|
||||
* new configuration file name and location ($HOME/.atari800.cfg)
|
||||
|
||||
Detailed list of changes follows:
|
||||
|
||||
* configuration file ("atari800.cfg") related changes:
|
||||
|
||||
1) configuration file is renamed to ".atari800.cfg" by default (note
|
||||
the leading dot in the name, similarly to most other configuration
|
||||
files of programs on Unix platforms). On DOS/TOS (FS 8+3 limitation)
|
||||
the old "atari800.cfg" will be supported.
|
||||
|
||||
2) RT-Config (the module in Atari800) tries to search the configuration
|
||||
file in user's home folder first (environment variable HOME should
|
||||
point there). If it's found then it's used. If it's not there then
|
||||
RT-Config tries to open system wide configuration file (by default
|
||||
it's "/etc/atari800.cfg"). Please note that the system wide file is
|
||||
not updated by Save function of RT-Config because it's expected
|
||||
that this file is read-only for regular user.
|
||||
|
||||
3) RT-Config can also be told where your configuration file is by
|
||||
using the "-config <filepath>" command line parameter. If the file
|
||||
is not there yet it's created. So it's quite easy to let Atari800
|
||||
create a test config file and compare it with your current config
|
||||
or to have several config files for various game/demo/application
|
||||
uses of the Atari800 emulator.
|
||||
|
||||
4) Some config file options were renamed or otherwise changed some
|
||||
time ago already but they were still recognized. This is no longer
|
||||
true so better create a new config file from scratch.
|
||||
|
||||
5) There are two new important switches - "ENABLE_NEW_POKEY" and
|
||||
"STEREO_POKEY" so better create new config file so you get these
|
||||
options configured properly.
|
||||
|
||||
* new Sound:
|
||||
|
||||
The new MZ POKEY emulation is now enabled by default on all ports.
|
||||
Also the STEREO sound (Dual POKEY) is compiled in by default
|
||||
but is not enabled (so there's a single POKEY by default but you
|
||||
can enable the second one very easily in the User Interface (press F1).
|
||||
|
||||
Both can be en/disabled in the configuration file (call atari800 with
|
||||
the "-configure" parameter to reconfigure these and other options).
|
||||
|
||||
Win32 and SDL ports also recognize a new cmdline switch "-audio16"
|
||||
that switches to 16-bit sound.
|
||||
|
||||
|
||||
Unreleased version 1.2.10 (2003/02/09)
|
||||
|
||||
* autoconf 2.5x required for building the source fetched from CVS.
|
||||
However, released source code comes with prebuilt configure script
|
||||
so you shouldn't even notice this change.
|
||||
|
||||
* SDL version contains the same keyboard IRQ fix that was recently
|
||||
done in the general input core. In human language: Super Pacman 5200
|
||||
will not crash after SHIFT and * keypress.
|
||||
|
||||
* On-the-fly change of POKEY emulation core (old Ron Fries' or new
|
||||
Michael Borisov's). Compare the new HiFi sound with the previous one.
|
||||
|
||||
|
||||
Unreleased version 1.2.9 (2003/01/27)
|
||||
|
||||
* New cycle-exact ANTIC/GTIA emulation. Enabled by default, disable by
|
||||
./configure --disable-cycleexact
|
||||
|
||||
Unreleased version 1.2.8 (2003/01/27)
|
||||
|
||||
* Paged memory implementation finished. Disabled by default, enable by
|
||||
./configure --enable-paged
|
||||
|
||||
Unreleased version 1.2.7 (2003/01/27)
|
||||
|
||||
* Harddisk emulation now complete including support for subdirectories.
|
||||
|
||||
Unreleased version 1.2.6 (2003/01/27)
|
||||
|
||||
* New sound core and 16 bit sound support -- high sound quality but slower.
|
||||
Use -audio16 option to enable 16 bit sound and -quality <level> to set sound
|
||||
quality (level > 0 enables new sound core) on the win32 port.
|
||||
Consult port specific doc for command line details.
|
||||
|
||||
Version 1.2.5 (2002/12/02)
|
||||
|
||||
* UI - the SpaceBar in disk management switches between the RW and RO flags
|
||||
(this didn't work for a long time, now fixed). Please note that this RW/RO
|
||||
switch is just temporary and does not change the writeprotect flag of ATR
|
||||
images. Besides, it cannot override this flag so you actually can't mount
|
||||
a writeprotected ATR image read/write using this Space Bar toggle.
|
||||
|
||||
* Atari800 compilable under OS/2
|
||||
|
||||
* MultiJoy4 interface and Amiga/AtariST right mouse button supported
|
||||
|
||||
* 13 new cartridge types supported
|
||||
|
||||
* ANTIC mode E + GTIA mode 9 added (used in "Unconventional 2k", "Ass Kisiel")
|
||||
|
||||
|
||||
Version 1.2.4 (2002/08/07)
|
||||
|
||||
* 576 and 1088 kB RAM supported (selection available in the UI)
|
||||
|
||||
* separate Antic access to extended memory for 130 XE and 320 Compy Shop
|
||||
|
||||
* 256K and 512K XEGS carts
|
||||
|
||||
* SDL version now
|
||||
- cleans up after unsuccessful initialization
|
||||
- supports "-nosound" and "-dsprate"
|
||||
- continues to run even if sound initialization failed
|
||||
|
||||
* command line options "-help" and "-v" ("-version") now work better
|
||||
in most supported ports.
|
||||
|
||||
|
||||
Version 1.2.3 (2002/07/08)
|
||||
|
||||
* 16 kB RAM machines (Atari 400/600XL) emulated
|
||||
|
||||
* LPTjoy support added to the SDL port
|
||||
|
||||
* SDL port is generally much improved. To get list of SDL specific options
|
||||
start the SDL version of Atari800 with -help.
|
||||
|
||||
* casette image loading accessible from UI
|
||||
|
||||
* -palette option (for loading an alternate ACT color palette file) fixed.
|
||||
|
||||
* channel 1 in stereo mode fixed
|
||||
|
||||
* antic: NMIST bit 5 fixed (is always zero)
|
||||
|
||||
* input: second button in 5200 joystick generates "Break key" IRQ
|
||||
(you can now jump in "Moon Patrol" - use Shift)
|
||||
|
||||
* monitor: "DLIST" now accepts address as an argument
|
||||
|
||||
* antic: Dirty update scheme that allows slower machines to run Atari800
|
||||
at full speed now! See DOC/HOWTO-DIRTYRECT for more information.
|
||||
|
||||
* pokey: allow high-speed disk i/o (Alpha-Load works, thanks to Paul Irvine)
|
||||
|
||||
|
||||
Version 1.2.2 (2001/12/31)
|
||||
|
||||
* Falcon .s files had to be renamed to .asm, otherwise the vga
|
||||
port could not be built.
|
||||
|
||||
|
||||
Version 1.2.1 (2001/12/31)
|
||||
|
||||
* serious memory overflow bug fixed (caused crashing of X11 port
|
||||
and probably also other unexpected bugs or problems)
|
||||
|
||||
* joysticks in SDL port fixed and improved.
|
||||
|
||||
* RPM's .spec file fixed.
|
||||
|
||||
|
||||
Version 1.2.1pre0 (2001/12/17)
|
||||
|
||||
* Falcon port configurable and buildable again
|
||||
|
||||
* SDL support for 32-bit display, screen width switching (LALT+g)
|
||||
|
||||
* documentation updated (still can be much improved :)
|
||||
|
||||
* util/ folder contains new sethdr and act2html utilities
|
||||
|
||||
* configure process is non-interactive (doesn't ask any questions)
|
||||
|
||||
* RPM .spec file for easy building of Atari800 from source .tar.gz
|
||||
|
||||
|
||||
Version 1.2.0 (2001/11/29)
|
||||
|
||||
* completely new SDL port (use ./configure --target=sdl) that should run
|
||||
on most/all platforms/OSes SDL supports (http://www.libsdl.org/)
|
||||
|
||||
* completely new WinCE port
|
||||
|
||||
*** New features:
|
||||
|
||||
* support for Express, Diamond, SpartaDOS X, XEGS, Action!, BASIC XL
|
||||
and other cartridge types (see cart.txt for complete list).
|
||||
The "-cart" option runs CART files and all types of raw images.
|
||||
"-rtime 0" disables emulation of R-Time 8.
|
||||
Thanks to:
|
||||
- Jindroush, who described most of the cartridge types
|
||||
- Nir Dary, for information on 8*8 KB D50x and OSS 'M091' cartridges
|
||||
|
||||
* mouse can emulate following devices
|
||||
(in parentheses the option that enables emulation):
|
||||
- paddles (-mouse pad)
|
||||
- Atari Touch Tablet (-mouse touch)
|
||||
- Koala Pad (-mouse koala)
|
||||
- Light Pen (-mouse pen)
|
||||
- Light Gun (-mouse gun)
|
||||
- Amiga mouse (-mouse amiga)
|
||||
- Atari ST mouse (-mouse st)
|
||||
- Atari Trak-Ball (-mouse trak)
|
||||
- joystick (-mouse joy)
|
||||
For Atari 5200 you can use "-mouse pad" (good for Gorf and Kaboom)
|
||||
or "-mouse joy" (good for Missile Command and Super Breakout).
|
||||
Use "-mouseport <1-4>" to select the Atari port.
|
||||
Use "-mousespeed <1-9>" to select speed (default is 3).
|
||||
|
||||
* cassette recorder emulation! (experimental)
|
||||
Currently only reading works and only with SIO patch.
|
||||
Supported are:
|
||||
- CAS files - the digital cassette image format by Ernest Schreurs.
|
||||
The format handles different lengths of blocks, gaps, non-standard blocks,
|
||||
baud rates and more. See http://home.planet.nl/~ernest/home.html
|
||||
for the excellent WAV2CAS converter, which includes detailed description
|
||||
of the format. Atari800 supports the format only partially at the moment.
|
||||
- raw files - any file can be attached, as if it has been written
|
||||
to the C: device (standard Atari OS format).
|
||||
No UI available yet. Attach a file with "-tape filename"
|
||||
or "-boottape filename" (emulator presses Start and Space to boot the tape).
|
||||
|
||||
* SIO, H: and P: patches are now independent and can be toggled at run-time
|
||||
|
||||
* the H: device no longer replaces C:.
|
||||
The H: device is now added to HATABS in RAM, and the escape codes
|
||||
are put in 0xd100-0xd1ff, so H: doesn't modify Atari OS at all.
|
||||
|
||||
* "-basic" and "-nobasic" work for Atari 800 (Atari BASIC is attached
|
||||
as a cartridge in Atari 800)
|
||||
|
||||
* devices: added open mode 9 (append) for H: device
|
||||
|
||||
* input: the illegal joystick positions (e.g. left+right) are not passed
|
||||
to the emulated Atari (good for "Mario Bros.")
|
||||
|
||||
* monitor:
|
||||
- "C 600 ABCD" does the same as "C 600 CD AB"
|
||||
- 1 KB boundary is respected by "DLIST"
|
||||
- "POKEY" command
|
||||
- "S" without parameters repeats last search
|
||||
|
||||
* ui: added Atari Settings (enable/disable BASIC, R-Time 8, SIO patch, H:, P:)
|
||||
|
||||
*** Compatibility improvements:
|
||||
|
||||
* antic,gtia: the background color can be changed inside a scanline.
|
||||
Currently implemented only for blank lines without PMG.
|
||||
Try the "Partyland" part of the "Bitter Reality" demo.
|
||||
|
||||
* antic: corrected timing of DLISTL/H ("Spelunker" works)
|
||||
|
||||
* binload: 0x31 stored at 0x300 ("Studio Dream" loads now)
|
||||
|
||||
* cpu: Read-Modify-Write (RMW) instructions (ASL, INC, etc.) store
|
||||
the unmodified value of $D01A before they store the modified value.
|
||||
Now you can see the white dots made with INC $D01A.
|
||||
|
||||
* cpu: on reset, the I flag is set (now reset works if stuck in interrupts)
|
||||
|
||||
* devices: replaced "dGetByte(0x2e)" with "regX" in H: handler routines
|
||||
(fixes problems with Atari BASIC's GET/PUT/INPUT/PRINT)
|
||||
|
||||
* pia: & 0x3f on read PACTL and PBCTL
|
||||
|
||||
* pokey: potentiometers emulation improved: POTGO and ALLPOT registers
|
||||
and bit 2 of SKCTLS implemented, "Tree Surgeon" no longer hangs
|
||||
|
||||
* pokey: true RANDOM emulation (both 9- and 17-bit poly) !
|
||||
Not using rand() anymore. Try the "Bank Bang!" game.
|
||||
|
||||
* pokey: fixed STIMER (speech in "Mirax Force" is better, but still
|
||||
not perfect)
|
||||
|
||||
* pokey: a few fixes for stereo detection routines (helps "Sheol",
|
||||
"Total Daze", "Crockett's Theme"...)
|
||||
|
||||
* pokey: fixed SERIN ("Timeless Announcement" loads now)
|
||||
|
||||
* pokeysnd: added exact poly9_lookup and poly17_lookup, removed bit17
|
||||
(which was initialised with rand()) saving ca. 100 KB of memory.
|
||||
Do you hear any difference?
|
||||
|
||||
* sio: made double density ATR images compatible with SIO2PC
|
||||
|
||||
*** Bug fixes:
|
||||
|
||||
* cpu: fixed wrong extern
|
||||
|
||||
* devices: fixed Device_isvalid (problems with trailing 0x9b)
|
||||
|
||||
* rtime: added "byte &= 0x0f" to prevent out of bounds accesses
|
||||
to regset[]
|
||||
|
||||
* sio: corrected and added checks if drive number is in range 1-8
|
||||
|
||||
* sio: Format Disk rewritten. Now it can resize both ATR and XFD images.
|
||||
The ATR header is being updated. Double density format works.
|
||||
|
||||
*** Optimizations:
|
||||
|
||||
* antic: optimized ANTIC_Load and character modes
|
||||
|
||||
* atari_vga: no unnecessary Atari_DisplayScreen() calls if "-refresh" is used
|
||||
|
||||
* cpu: slight optimization of ROL and ROR
|
||||
|
||||
* gtia: optimized players in new_pm_scanline
|
||||
|
||||
*** Clean-ups in sources (for programmers):
|
||||
|
||||
* created cartridge.[ch] and rtime.[ch], removed supercart.[ch]
|
||||
|
||||
* created input.[ch] to handle keyboard, joysticks and mouse
|
||||
|
||||
* removed enable_rom_patches, added enable_h_patch and enable_p_patch.
|
||||
Original OS is saved in atari_os. Removed SetSIOEsc() and RestoreSIO().
|
||||
After changing enable_*_patch call Atari800_UpdatePatches().
|
||||
|
||||
* replaced following variables: machine, mach_xlxe, Ram256, os,
|
||||
default_system and enable_c000_ram with only two: machine_type and ram_size
|
||||
(ram_size is in kilobytes, and there're #define's for 320 Rambo/Compy).
|
||||
There are no more Initialise_Atari... routines. Instead, set machine_type
|
||||
and ram_size and call Atari800_InitialiseMachine().
|
||||
|
||||
* moved main() to platform-dependent code,
|
||||
created Atari800_Initialise and Atari800_Frame
|
||||
|
||||
* removed i386 asm tricks
|
||||
|
||||
* diskled: rewritten to be cleaner and more flexible
|
||||
|
||||
* pokey: SKSTAT variable renamed to SKCTLS to avoid confusions
|
||||
(it's the write-only, not the read-only Pokey register)
|
||||
|
||||
* pokeysnd: removed duplicates of Pokey constant definitions
|
||||
and AUDC/AUDF/AUDCTL variables, included pokey.h
|
||||
|
||||
|
||||
Previous changes (pre 1.2.0) are in the CHANGES.OLD file.
|
||||
@@ -0,0 +1,223 @@
|
||||
How to port Atari800 to new platforms
|
||||
=====================================
|
||||
|
||||
This is a guide for people who intend to create a new version of Atari800
|
||||
for their computer or operating system (called "target system" throughout
|
||||
this document).
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
The target system must have a raw computing power at least comparable
|
||||
to a Pentium 100, otherwise the emulator will run slower than the original
|
||||
8-bit Atari. Other hardware requirements are usually easier to fulfill:
|
||||
a few megs RAM, a few megs disk space, a display, some keys and an audio
|
||||
output.
|
||||
|
||||
You should have a working compiler of the C programming language
|
||||
for the target system. The compiler, however, can run on another system
|
||||
(such as PC), which is called cross-compiling and is common when developing
|
||||
for small devices.
|
||||
|
||||
You should understand at least the basics of programming in C.
|
||||
The more you know, the better.
|
||||
|
||||
|
||||
Getting started
|
||||
---------------
|
||||
|
||||
Try compiling an existing version of Atari800 for a system different
|
||||
from your target system, just to learn how this works.
|
||||
See the INSTALL file for instructions.
|
||||
|
||||
Try compiling something for your target system: a "Hello world" program
|
||||
or (preferrably) a game. In case of problems, ask people who develop
|
||||
for your target system. If you are not an expert of programming
|
||||
the target system, get in touch with more experienced developers,
|
||||
as you may need their advice sooner or later.
|
||||
|
||||
|
||||
Compile-time configuration
|
||||
--------------------------
|
||||
|
||||
Before you start feeding your C compiler with *.c files,
|
||||
you need a file named "config.h". This file specifies the system
|
||||
to compile for, the C library functions that are available and features
|
||||
to include. There are two methods of creating this file: manually
|
||||
and using the configure script.
|
||||
|
||||
Using the configure script is recommended, because it makes your port
|
||||
easier to maintain for people who have never seen your target system.
|
||||
Yet if you find it too hard to use the configure script, go on with
|
||||
editing config.h by hand and consider using the configure script later.
|
||||
The configure script is works well on Unix and GNU/Linux systems,
|
||||
but can be awkward to use on Windows, especially if you use
|
||||
an Integrated Development Environment and not command-line tools.
|
||||
|
||||
The configure script is the file named "configure" that should be run
|
||||
by a Unix shell program such as "bash". The file is hardly human-readable.
|
||||
It is generated from the source file "configure.ac" by a tool called
|
||||
"autoconf". Another tool "autoheader" turns "configure.ac" into
|
||||
"config.h.in", which is a template for "config.h" used by "configure".
|
||||
"autogen.sh" is a shortcut that simply runs "autoheader" and "autoconf".
|
||||
|
||||
If you opt to edit "config.h" by hand, make a copy of "config.h.in"
|
||||
under the name "config.h" and edit it changing some #undef's into #define's.
|
||||
Consult the comments and other config.h files created this way, in "dc",
|
||||
"win32/msc" and "wince/port" directories.
|
||||
|
||||
|
||||
Compiling for the first time
|
||||
----------------------------
|
||||
|
||||
Try starting with something simple. Disable sound emulation,
|
||||
either by passing "--without-sound" to the configure script or by #undef'ing
|
||||
sound items in "config.h".
|
||||
|
||||
The easiest way to start is to compile a "simple" version of the emulator,
|
||||
that does not use any external libraries/interfaces for emulation of video,
|
||||
audio and input, and uses only standard C library functions. With the
|
||||
configure script you specify "--without-video --without-sound". If editing
|
||||
"config.h", "#define BASIC 1" and figure out which files to compile.
|
||||
|
||||
The "simple" version does not support graphics or joysticks and has a very
|
||||
limited keyboard input. Most likely it will appear as a blank screen when
|
||||
run. That's fine. Edit the runtime configuration file providing paths to
|
||||
Atari ROM images and change "DISABLE_BASIC" to "0". If you're lucky, you'll
|
||||
see the "READY" prompt of Atari BASIC.
|
||||
|
||||
|
||||
Implementing platform-specific part
|
||||
-----------------------------------
|
||||
|
||||
Create a new source file with your platform-specific code.
|
||||
You have several examples to copy-and-paste from.
|
||||
|
||||
The entry point to the program normally looks like this:
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
/* initialise Atari800 core */
|
||||
if (!Atari800_Initialise(&argc, argv))
|
||||
return 3;
|
||||
|
||||
/* main loop */
|
||||
for (;;) {
|
||||
key_code = Atari_Keyboard();
|
||||
Atari800_Frame();
|
||||
if (display_screen)
|
||||
Atari_DisplayScreen();
|
||||
}
|
||||
}
|
||||
|
||||
You need to implement functions specified in "platform.h".
|
||||
These functions should display graphics on screen and read keyboard
|
||||
and joysticks/mouse in a platform-specific way.
|
||||
|
||||
|
||||
Graphics
|
||||
--------
|
||||
|
||||
Atari_Initialise() is the function that does platform-specific initialization.
|
||||
You may need to switch the graphics mode in this function.
|
||||
|
||||
Atari_DisplayScreen() should update the screen with the contents
|
||||
of the atari_screen array. atari_screen is declared in screen.h as (ULONG *),
|
||||
but it is really a pointer to a rectangular array of bytes. There are
|
||||
240 (ATARI_HEIGHT) rows, 384 (ATARI_WIDTH) bytes each. While there are exactly
|
||||
240 rows to display, only 336 middle columns of the 384 are meaningful.
|
||||
Do never display more than 336 middle columns! Although the remaining columns
|
||||
may appear black when you start the emulator, there's no such guarantee
|
||||
when the emulator is running.
|
||||
|
||||
It is fine to display only 320 middle columns if that's easier for you than 336.
|
||||
You can also crop the Atari graphics from the top and the bottom, because most
|
||||
programs use just the 192 middle lines. If your display has considerably lower
|
||||
resolution, you need to provide your own bitmap rescaling.
|
||||
|
||||
Bytes in atari_screen[] are Atari color codes (0-15 = shades of gray,
|
||||
16-31 = shades of brown/yellow, etc). 8-bit Ataris have a fixed palette
|
||||
of 256 colors. You can get 8-bit RGB components of Atari colors
|
||||
with the macros Palette_GetR(code), Palette_GetG(code) and Palette_GetB(code),
|
||||
defined in "colours.h".
|
||||
|
||||
|
||||
Keyboard input
|
||||
--------------
|
||||
|
||||
There are three variables that are read by the emulation core and should be
|
||||
set by your platform-specific code:
|
||||
|
||||
int key_code;
|
||||
int key_shift;
|
||||
int key_consol;
|
||||
|
||||
key_code is the Atari scancode of the currently pressed keystroke, or one
|
||||
of the emulator-defined special values, such as AKEY_NONE, AKEY_COLDSTART,
|
||||
AKEY_BREAK, etc. Atari scancodes are 8-bit values with 6 low bits containing
|
||||
the code of a regular key and two high bits reflecting the status of Shift
|
||||
and Control modifiers. See input.h or some Atari documentation for details.
|
||||
Codes that are special to the emulator are AKEY_NONE (which means no key
|
||||
pressed, or just the Shift or the Control) and AKEY_* values defined
|
||||
in "atari.h".
|
||||
|
||||
key_shift should be TRUE when any Shift key is pressed, FALSE otherwise.
|
||||
|
||||
In 8-bit Atari world the term "console keys" refers to the three function keys
|
||||
(Start, Select and Option) commonly used in games. The keys are independent
|
||||
of each other and of all other keys. The state of each console key should
|
||||
be reflected by one bit in key_consol (cleared if the key is pressed).
|
||||
See "input.h".
|
||||
|
||||
|
||||
Joystick input
|
||||
--------------
|
||||
|
||||
Four Atari joysticks are emulated, but few Atari games support more than two.
|
||||
|
||||
Each joystick has one fire button. Your Atari_TRIG() is passed the joystick
|
||||
number (0-3) and should return 0 if the corresponding fire button is pressed
|
||||
and 1 if it's not.
|
||||
|
||||
The joysticks are "digital", that is, they can be moved in one of 8 directions
|
||||
from the center position. Joystick positions are passed in a bit obscure way.
|
||||
Atari_PORT(0) should return the position of joysticks 0 and 1, Atari_PORT(1)
|
||||
- the position of joysticks 2 and 3. The returned values are 8-bit,
|
||||
four bits per joystick. The acceptable values of the four bits are defined
|
||||
as STICK_* constants in "input.h".
|
||||
|
||||
|
||||
Mouse input
|
||||
-----------
|
||||
|
||||
Nearly all Atari programs are controlled by keyboard or joysticks.
|
||||
Other controllers were much less popular. However, it is easy to support
|
||||
them in your version of Atari800.
|
||||
|
||||
Paddles, touch tablet, light pen and other devices can be emulated
|
||||
by a pointing device such as mouse. In the main emulation loop your code
|
||||
should update the variables mouse_delta_x, mouse_delta_y and mouse_butons.
|
||||
mouse_delta_x and mouse_delta_y are *relative* positions, that is,
|
||||
how far the mouse was moved since last time. mouse_buttons is composed
|
||||
of 3 bits that represent left, right and middle mouse button (1 = pressed).
|
||||
|
||||
To test mouse input, select "Light pen" as the emulated device
|
||||
and press right mouse button to enable the mouse pointer maintained
|
||||
by the emulator.
|
||||
|
||||
|
||||
Final words
|
||||
-----------
|
||||
|
||||
That's the end of this guide. I hope it's useful for developers new
|
||||
to Atari800. Suggestions about what to add or improve are welcome.
|
||||
|
||||
If you are serious about porting Atari800, please join our mailing list.
|
||||
See the documentation or the web page for details.
|
||||
|
||||
|
||||
Happy hacking!
|
||||
|
||||
Piotr Fusik
|
||||
November 5, 2006
|
||||
@@ -0,0 +1,31 @@
|
||||
Who does build the binaries for Atari800 releases?
|
||||
==================================================
|
||||
|
||||
The regular binaries for Linux (curses, SDL and X11) distributed
|
||||
in RPM and Debian packages and available at Sourceforge.net for download
|
||||
are built by me (Petr Stehlik).
|
||||
|
||||
Official Debian package is built by Martin Albert <ma@debian.org>
|
||||
|
||||
The following guys should build the binary for the other port/platform/OS:
|
||||
|
||||
Port (platform, OS): Maintainer:
|
||||
----------------------+-----------------------------------------
|
||||
DOS James Wilkinson <james@slor.net>
|
||||
BeOS James Wilkinson <james@slor.net>
|
||||
Win32 James Wilkinson <james@slor.net>
|
||||
WinCE, Android Kostas Nakos <knakos@gmail.com>
|
||||
Mac OS X Mark Grebe <markgrebe@yahoo.com>
|
||||
Atari Falcon/TT Petr Stehlik <pstehlik@sophics.cz>
|
||||
OS/2 <volunteer wanted>
|
||||
*BSD <volunteer wanted>
|
||||
Amiga Sebastian Bauer
|
||||
Sega Dreamcast Christian Groessler
|
||||
JVM Perry McFarlane
|
||||
|
||||
If there is a volunteer for any of the above listed ports or if there
|
||||
is another port working that I didn't list then please contact me
|
||||
at <pstehlik@sophics.cz>.
|
||||
|
||||
This document was created on 2003/02/11 and last updated on 2011/02/06.
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
Free and portable Atari 800 Emulator for everybody, Version 3.1.0
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1995 David Firth. E-Mail: david@signus.demon.co.uk
|
||||
Copyright (C) 1998-2013 Atari800 Development Team.
|
||||
http://atari800.sourceforge.net/
|
||||
|
||||
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, or (at your option)
|
||||
any later version.
|
||||
|
||||
This is the emulator of Atari 8-bit computer systems and the 5200 console
|
||||
for Unix, Linux, Amiga, MS-DOS, Atari TT/Falcon, MS Windows, MS WinCE,
|
||||
Sega Dreamcast, Android and systems running the SDL library.
|
||||
Our main objective is to create a freely distributable portable emulator
|
||||
(i.e. with source code available).
|
||||
It can be configured to run in the following ways :-
|
||||
|
||||
1. "simple" version (many platforms) - uses only the standard C library
|
||||
2. curses (many platforms)
|
||||
3. X Window + Optional XVIEW or MOTIF User Interface
|
||||
4. CBM Amiga
|
||||
5. MS-DOS (DJGPP)
|
||||
6. Atari Falcon/TT and compatible machines
|
||||
7. MS Windows (DirectX)
|
||||
8. SDL (running on _many_ platforms)
|
||||
9. WinCE
|
||||
10. Sega Dreamcast
|
||||
11. JVM (Java applet)
|
||||
12. Android
|
||||
13. Raspberry Pi
|
||||
|
||||
The "simple" version is only useful for running programs such as MAC65,
|
||||
Atari BASIC etc. I have had this version running on Linux,
|
||||
SunOS 4.1.3, Solaris 2.4, Silicon Graphics, VAX/VMS, CBM Amiga
|
||||
(Dice C and GNU C), DOS/DJGPP and the HP-UX 9000/380.
|
||||
|
||||
When using curses, the emulator is similar to the "simple" version, but it
|
||||
also enables full screen editing capability. Some computer don't seem to
|
||||
support curses fully - SunOS 4.1.3, VAX/VMS, LINUX (but ncurses is OK).
|
||||
|
||||
The X Window version supports graphics and has an optional XVIEW
|
||||
or MOTIF user interface. The Linux X Window version can be built with
|
||||
joystick and mouse support.
|
||||
|
||||
The Amiga version supports graphics but currently lacks Paddle support.
|
||||
|
||||
The MS-DOS version supports 320x200, 320x240 and even 320x480 interlaced
|
||||
graphics, sound (SoundBlaster compatible sound cards, 8bit),
|
||||
keyboard, one joystick connected to game port and up to three additional
|
||||
digital joysticks connected to parallel (printer) ports and mouse.
|
||||
|
||||
The Atari Falcon030/040 version supports 320x240 and 336x240 Falcon/TT
|
||||
8-bit planes graphics modes, NOVA graphics cards, DMA sound and both
|
||||
joysticks (old CX-40, Atari800 compatible - not the new paddle-like ones).
|
||||
|
||||
The SDL version should compile on Unix, Win32, BeOS, etc... It's optimized for
|
||||
8, 16 and 32 color depth. Of course it will work fastest in 8bit. If you use it
|
||||
in XFree86 - please set "Depth=8" in XF86Config to gain maximum speed.
|
||||
Includes support for joystick and mouse.
|
||||
|
||||
All versions supporting bitmapped graphics have a User Interface implemented
|
||||
on the emulator's "screen". The User Interface is enter by pressing F1 at any
|
||||
time. ESC is used to return to the previous screen.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Note: Not all features are supported on all platforms.
|
||||
|
||||
o Emulated machines: Atari 400, 800, 1200XL, 600XL, 800XL, 65XE, 130XE, 800XE,
|
||||
XE Game System, 5200 SuperSystem.
|
||||
|
||||
o Configurable 400/800 RAM size, between 8 and 48 KB.
|
||||
|
||||
o Optional 4K RAM between 0xc000 and 0xcfff in 400/800 mode.
|
||||
|
||||
o Axlon and Mosaic memory expansions for the 400/800.
|
||||
|
||||
o 600XL memory expansions to 32 or 48 KB.
|
||||
|
||||
o 130XE compatible memory expansions: 192K, 320K, 576K, 1088K.
|
||||
|
||||
o MapRAM memory enhancement for the XL/XE.
|
||||
|
||||
o Cycle-exact 6502 emulation, all unofficial instructions.
|
||||
|
||||
o Cycle-exact NMI interrupts, scanline-based POKEY interrupts.
|
||||
|
||||
o Cycle-exact ANTIC and GTIA emulation, all display modes.
|
||||
|
||||
o Player/Missile Graphics, exact priority control and collision detection.
|
||||
|
||||
o Exact POKEY shift registers (sound and random number generator).
|
||||
|
||||
o 8 disk drives, emulated at computer-to-drive communication
|
||||
and fast patched SIO levels.
|
||||
|
||||
o ATR, XFD, DCM, ATR.GZ, XFD.GZ and .PRO disk images.
|
||||
|
||||
o Direct loading of Atari executable files and Atari BASIC programs.
|
||||
|
||||
o 59 cartridge types, raw and CART format.
|
||||
|
||||
o Cassette recorder, raw and CAS images.
|
||||
|
||||
o Printer support.
|
||||
|
||||
o Files can be stored directly on your host computer via the H: device.
|
||||
|
||||
o Current emulation state can be saved in a state file.
|
||||
|
||||
o Sound support on Unix using "/dev/dsp".
|
||||
|
||||
o Stereo (two POKEYs) emulation.
|
||||
|
||||
o Joystick controller using numeric keypad.
|
||||
|
||||
o Real joystick support.
|
||||
|
||||
o Paddles, Atari touch tablet, Koala pad, light pen, light gun,
|
||||
ST/Amiga mouse, Atari trak-ball, joystick and Atari 5200 analog
|
||||
controller emulated using mouse.
|
||||
|
||||
o R-Time 8 emulation using host computer clock.
|
||||
|
||||
o Atari palette read from a file or calculated basing on user-defined
|
||||
parameters.
|
||||
|
||||
o Screen snapshots (normal and interlaced) to PCX and PNG files.
|
||||
|
||||
o Sound output may be written to WAV files.
|
||||
|
||||
o User interface on all versions supporting bitmapped graphics.
|
||||
|
||||
o R: device (the Atari850 serial ports) mapped to net or real serial port.
|
||||
|
||||
o Recording input events to a file and playing them back
|
||||
|
||||
o MIO and Black Box emulation
|
||||
|
||||
o 1400XL and 1450XLD emulation
|
||||
@@ -0,0 +1,21 @@
|
||||
Note: you need to setup correct video mode for PAL/NTSC machines (proper video/audio sync and vsync).
|
||||
edit /boot/config.txt
|
||||
|
||||
for PAL version (50 Hz) you can supply this values:
|
||||
720p mode:
|
||||
hdmi_group=1
|
||||
hdmi_mode=19
|
||||
1080p mode:
|
||||
hdmi_group=1
|
||||
hdmi_mode=31
|
||||
|
||||
for NTSC version (60 Hz):
|
||||
720p mode:
|
||||
hdmi_group=1
|
||||
hdmi_mode=4
|
||||
1080p mode:
|
||||
hdmi_group=1
|
||||
hdmi_mode=16
|
||||
|
||||
See http://elinux.org/RPiconfig for more info.
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
Build instructions for the Android port
|
||||
---------------------------------------
|
||||
|
||||
If you are looking for instructions on how to use the Android port, what the
|
||||
preferences mean etc. you should check out instead:
|
||||
|
||||
http://pocketatari.atari.org/android
|
||||
|
||||
To compile the android port, you are going to need:
|
||||
|
||||
* The Android SDK
|
||||
* The Android NDK
|
||||
* The Java JDK
|
||||
* A working autotools/make environment (i.e. Cygwin on Windows)
|
||||
|
||||
Setup the environment correctly: create an environment variable called
|
||||
ANDROID_NDK_ROOT which points to the root of the NDK
|
||||
(f.ex.:export ANDROID_NDK_ROOT='C:\cygwin\android-ndk\android-ndk-r10b\').
|
||||
Next, add the NDK root, gcc and android tools paths to PATH (f.ex. export PATH=
|
||||
"$ANDROID_NDK_ROOT:$ANDROID_NDK_ROOT//toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin:
|
||||
/android-sdk-windows/tools/:/android-sdk-windows/platform-tools/:$PATH").
|
||||
Don't forget to also add the proper Java environment vars too (f.ex.
|
||||
export PATH="/ant/bin:$PATH"; export JAVA_HOME='c:\Java\jdk1.6.0_21\';).
|
||||
|
||||
Note: Since newer NDKs are built for Windows and not Cygwin, make sure the NDK
|
||||
is accessible by normal Windows methods (i.e. no symlinks in Cygwin).
|
||||
Also, make sure the ANDROID_NDK_ROOT is set using Windows notation,
|
||||
as shown above.
|
||||
|
||||
Unpack the source tarball or get the CVS module. Go to the src directory and
|
||||
update the project thusly:
|
||||
android.bat update project --path android/ --name colleen --target "android-20"
|
||||
Configure the build. I use this setup:
|
||||
autoheader && autoconf && ./configure --target=android --disable-monitorbreak --enable-pagedattrib --enable-seriosound --disable-crashmenu --disable-monitorasm --disable-monitorhints --without-readline --enable-clipsound
|
||||
Then just type make and your apk package should appear in:
|
||||
android/bin/colleen-debug.apk
|
||||
|
||||
Cheers,
|
||||
Kostas
|
||||
@@ -0,0 +1,159 @@
|
||||
Atari800 for SEGA Dreamcast
|
||||
===========================
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
The mapping of the connected DC controllers to the Atari joysticks is
|
||||
as follows:
|
||||
|
||||
The leftmost controller is joystick #1. Then, while going to the
|
||||
right, the next controller is joystick #2. The next one is joystick
|
||||
#3. Joystick #4 is the rightmost controller if all 4 controller jacks
|
||||
are in use.
|
||||
|
||||
The 1st (leftmost) controller is used to provide the console keys
|
||||
(start, select, etc).
|
||||
|
||||
The mapping for the 1st controller is as follows (for computers, not
|
||||
5200):
|
||||
|
||||
B - START
|
||||
(maps to ESC key while being in the
|
||||
emulator menu)
|
||||
Y - SELECT
|
||||
X - OPTION
|
||||
A - joystick button
|
||||
|
||||
L - emulator menu
|
||||
R - enter keyboard emulation screen
|
||||
|
||||
Start - warm boot (reset key)
|
||||
Start + X - cold boot (power cycle)
|
||||
|
||||
joypad - joystick directions
|
||||
|
||||
On the other controllers only the joypad and A are used.
|
||||
|
||||
L and R are mapped to Z and C buttons on the Arcade Stick.
|
||||
While in the emulator menu, pressing Start causes the Dreamcast to
|
||||
reboot.
|
||||
|
||||
The Dreamcast keyboard is also supported:
|
||||
F1 - emulator menu
|
||||
ESC - leave menu/go back
|
||||
|
||||
F2 - OPTION
|
||||
F3 - SELECT
|
||||
F4 - START
|
||||
|
||||
F5 - cold boot (power cycle)
|
||||
F12 - Dreamcast reboot
|
||||
|
||||
End - HELP
|
||||
Pause - break
|
||||
S3 - Atari key
|
||||
|
||||
In 5200 mode the A, B, X, and Y buttons of the controllers are
|
||||
redefined:
|
||||
Y - Start key (only the 1st controller)
|
||||
B - 4 (starts some games, " " " " )
|
||||
X - joystick button #2
|
||||
A - joystick button #1
|
||||
|
||||
In 800 mode up to 4 paddles are supported (only 2 tested by
|
||||
me). A is the paddle trigger.
|
||||
|
||||
Also in 800 mode, X, Y, and B can be redefined to generate keys from
|
||||
the keyboard. If this is enabled, Option, Select, and Start keys can
|
||||
be entered in the keyboard emulation screen.
|
||||
|
||||
In order to use paddles, you have to switch on the "Emulate paddles"
|
||||
setting in the "AtariDC Settings" menu.
|
||||
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
You will need a SH4 cross compiler and the KallistiOS library
|
||||
(http://cadcdev.sourceforge.net).
|
||||
|
||||
See the README included in KallistiOS for information on how to build
|
||||
the cross compiler and library.
|
||||
|
||||
After you have installed the cross compiler and compiled KOS, adapt
|
||||
src/dc/Makefile.dc to your environment. You'll probably have to change
|
||||
the SHBASE and KOS variables in dc/Makefile.dc to point to your
|
||||
compiler and KOS locations, respectively.
|
||||
|
||||
Then you can build the executable, "atari800.elf". In the atari800 src
|
||||
directory type
|
||||
|
||||
make -f dc/Makefile.dc
|
||||
|
||||
to compile it. Use GNU make.
|
||||
|
||||
|
||||
CD setup
|
||||
--------
|
||||
|
||||
After you have compiled the atari800.elf file, you may want to make a
|
||||
CD image which contains the a8 binary files and disk images you'd like
|
||||
to use.
|
||||
|
||||
If you don't want to burn a CD, but have a serial, broadband, or lan
|
||||
adapter, then you can use the dc-load tool to transfer the ELF
|
||||
executable to the Dreamcast and run it. The dc-load tool is included
|
||||
in the KOS library. You need to create a CD ISO image, as described
|
||||
below, and use the -i switch to dc-load, to emulate this image over
|
||||
the the dc-load connection.
|
||||
|
||||
If you create a real CD, there is one more step needed additionally to
|
||||
the steps described below: You need to put the atari800 executable
|
||||
file as boot file onto the CD. For information to create Dreamcast
|
||||
bootable CDs see http://mc.pp.se/dc/cdr.html. Convert the atari800.elf
|
||||
to a plain binary file with something like "sh-elf-objcopy -R .stack
|
||||
-R .comment -R .bss -R .sbss -O binary atari800.elf atari800.bin" and
|
||||
then scramble it.
|
||||
|
||||
The CD must contain the atari800.cfg file in the root directory. If
|
||||
you use the supplied demo atari800.cfg file, the Atari BIOS ROMS also
|
||||
have to be in the CD root directory. If you don't like this layout,
|
||||
change it and adapt the atari800.cfg file accordingly.
|
||||
|
||||
Please note that paths in the atari800.cfg must start with /cd to
|
||||
reference the CD, so for a /roms directory on the CD the atari800.cfg
|
||||
entry must be ROM_DIR=/cd/roms.
|
||||
|
||||
If you like to have a .com/.exe/.atr to be started automatically, copy
|
||||
it into the CD root directory and name it autorun.com / autorun.exe /
|
||||
autorun.atr, respectively.
|
||||
|
||||
|
||||
Bugs/ToDos
|
||||
----------
|
||||
|
||||
* There are still sound glitches on some games.
|
||||
* There might be display jitter in scrolling games in NTSC mode.
|
||||
* Run ATRs read-write from vmu.
|
||||
* More than 2 controllers are not well tested.
|
||||
* Improve keyboard support
|
||||
* Mouse support?
|
||||
|
||||
|
||||
Help/Problems/Bugs/Suggestions
|
||||
------------------------------
|
||||
|
||||
Please contact me at chris@groessler.org or
|
||||
groessler_christian@yahoo.de. I'm also monitoring the official
|
||||
Atari800 mailing list (atari800-users@lists.sourceforge.net).
|
||||
|
||||
The newest version is at
|
||||
|
||||
ftp://ftp.groessler.org/pub/chris/dreamcast/atari800dc
|
||||
|
||||
|
||||
Have fun with it,
|
||||
Christian Groessler
|
||||
|
||||
Last change: 27-Apr-2015.
|
||||
@@ -0,0 +1,32 @@
|
||||
This document assumes you are already familiar with
|
||||
the standard atari documentation.
|
||||
|
||||
INSTALL Information is in DOC/INSTALL.ps2
|
||||
|
||||
The following ps2 controller keys are mapped thus:
|
||||
|
||||
During Emulation:
|
||||
Circle=Enter
|
||||
Cross=Fire
|
||||
Square=spacebar
|
||||
Triangle=UI (user interface)
|
||||
L1=Cold Start
|
||||
R1=Warm Start
|
||||
pad=Joystick
|
||||
start=Atari Start
|
||||
select=Atari Select
|
||||
|
||||
While in UI:
|
||||
Circle=cancel/back
|
||||
Cross=select/enter
|
||||
Square=spacebar
|
||||
L1=Cold Start
|
||||
R1=Warm Start
|
||||
|
||||
USB Keyboard is supported.
|
||||
|
||||
TODO is located in src/atari_ps2.c itself.
|
||||
|
||||
Thanks Piotr of atari800!
|
||||
Thanks ps2dev.org! Esp NeoVanglist, author of gsKi, and Oopo for the ps2dev toolchain.
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
Tests to be performed prior to a new release of Atari800DC
|
||||
==========================================================
|
||||
|
||||
|
||||
General:
|
||||
--------
|
||||
|
||||
- Before burning a CD it's advisable to run most of the tests by other
|
||||
means (e.g. loading the new version with 'dc-tool'). After all tests
|
||||
are passing, burn a CD and run at least all the tests which require
|
||||
access to the host file system again, and run the CD-only tests.
|
||||
|
||||
- Unless otherwise stated, the tests assume "computer mode", not "5200
|
||||
mode".
|
||||
|
||||
- Run the new version, play around in the menus, and run your
|
||||
favourite Atari programs. If something is strange, compare with the
|
||||
PC version of Atari800 and/or a real Atari.
|
||||
|
||||
- Check new features and/or bug fixes since the previous version.
|
||||
|
||||
- Check "about" menus ("About the Emulator", "About AtariDC") for
|
||||
correct information (typically copyright year and version) and
|
||||
layout.
|
||||
|
||||
- Check that Atari800DC specific menu entries are present and working:
|
||||
main menu:
|
||||
-> "About AtariDC"
|
||||
"Display settings":
|
||||
-> "Double buffer video data"
|
||||
-> "Emulator video mode"
|
||||
-> "Display video mode"
|
||||
-> "Screen position configuration"
|
||||
"Controller configuration":
|
||||
-> "Joystick/D-Pad configuration"
|
||||
-> "Button configuration"
|
||||
|
||||
- Check "autorun" feature
|
||||
For each of "autorun.com", "autorun.exe", "autorun.atr" have it as
|
||||
the only 'autorun.*' file in the root directory of the
|
||||
CD(-image). Check that each of them is automatically started at
|
||||
boot. ("autorun.com" and "autorun.exe" are just regular AtariDOS
|
||||
program files, the extension doesn't/shouldn't make any
|
||||
difference. "autorun.atr" is a bootable disk image.)
|
||||
|
||||
|
||||
On-screen keyboard:
|
||||
-------------------
|
||||
|
||||
- Check that if leaving emulator menu or on-screen keyboard UI by
|
||||
pressing 'B' doesn't insert a 'START' console button press (use
|
||||
e.g. Berzerk or ROM self test).
|
||||
- leave emulator menu
|
||||
- leave onscreen keyboard
|
||||
|
||||
- Check that the keyboard emulation works within the emulator menu
|
||||
("Load State" or "Save State" and enter a file name).
|
||||
|
||||
- Test button overrides ("Controller Configuration"->"Button
|
||||
Configuration").
|
||||
Assign keys to all controller buttons (B, X, Y).
|
||||
- check that the keys are generated on button presses (e.g. in the
|
||||
BASIC editor)
|
||||
- check that the now inaccessible "START", "SELECT", or "OPTION"
|
||||
keys can be injected via the on-screen keyboard (e.g. in the ROM
|
||||
self test or River Raid)
|
||||
- try more than one injection (for each of "SELECT" and "OPTION"
|
||||
and "START")
|
||||
- check that the injected key gets released (e.g. River Raid)
|
||||
|
||||
|
||||
Emulator menu:
|
||||
--------------
|
||||
|
||||
- Check auto-repeat (up/down/left/right on d-pad) in emulator menu.
|
||||
(Currently there is no auto-repeat when using a keyboard, that's a
|
||||
KOS problem.)
|
||||
|
||||
|
||||
Controllers:
|
||||
------------
|
||||
|
||||
- Check that the controller D-Pad works.
|
||||
- Check that the controller Joystick works.
|
||||
- Check that reverting X and Y axes both work ("Controller
|
||||
configuration"->"Joystick/D-Pad configuration"->"Reverse ...
|
||||
axis").
|
||||
- Check that disabling D-Pad and disabling Joystick works ("Controller
|
||||
configuration"->"Joystick/D-Pad configuration"->...).
|
||||
- Check unplugging/replugging controllers:
|
||||
- there shouldn't be a crash/reboot
|
||||
- try in the emulation, in the emulator menu, and in the on-screen
|
||||
keyboard
|
||||
- disconnecting and reconnecting the leftmost controller to a
|
||||
different port (still being the leftmost controller) should keep
|
||||
it accessible and the "main" controller/port #1 (in emulation,
|
||||
emulator menu, and on-screen keyboard)
|
||||
- Check paddle emulation ("Controller configuration"->"Emulate
|
||||
Paddles") with e.g. "Super Breakout"
|
||||
- Keyboard
|
||||
- boot with keyboard connected and check if it works (BASIC and
|
||||
emulator menu)
|
||||
- disconnect and reconnect (to a different port) and check if it
|
||||
still works (BASIC and emulator menu)
|
||||
- boot with keyboard disconnected, then connect, and see if it works
|
||||
- disconnect and reconnect (to a different port) and check if it
|
||||
still works (BASIC and emulator menu)
|
||||
|
||||
|
||||
Config file:
|
||||
------------
|
||||
|
||||
- Add/modify DC specific entries to atari800.cfg (DISPLAY_X_ADJUST and
|
||||
DISPLAY_Y_ADJUST)
|
||||
- check that they are used after bootup
|
||||
- Check that double buffering ("Display Settings"->"Double buffer
|
||||
video data") is enabled/disabled according to the config file
|
||||
setting (DOUBLE_BUFFERING).
|
||||
|
||||
|
||||
Load/Save state:
|
||||
----------------
|
||||
|
||||
VMU:
|
||||
|
||||
- Start a game and play it for some time and then enter emulator menu
|
||||
and select "Save State".
|
||||
- enter "TAB" (via the on-screen keyboard or a connected keyboard
|
||||
controller) and select the VMU ('/vmu')
|
||||
- enter a new file name (again via the on-screen or a real keyboard)
|
||||
and press "return" (on-screen or real keyboard)
|
||||
- select a VMU with enough free space (currently a "save file"
|
||||
requires ~ 76 blocks)
|
||||
- check that a "please wait" message appears while saving
|
||||
- reboot DC and and enter VMU menu
|
||||
- check that the state file is present
|
||||
- the description should be "<atari800 version number> saved
|
||||
state"
|
||||
- the icon should show the Atari "fuji" logo
|
||||
- the file name should be the same as the one entered
|
||||
- reboot DC into Atari800DC
|
||||
- enter emulator menu and load the just saved state
|
||||
- check that a "please wait" message appears while loading
|
||||
- exit emulator menu and check that the game continues at the
|
||||
point where it was saved
|
||||
- select a VMU with not enough free space
|
||||
- check that an error message appears
|
||||
- reboot DC and and enter VMU menu
|
||||
- check that the state file is not present and the free space
|
||||
on the VMU hasn't decreased
|
||||
|
||||
RAMDISK:
|
||||
|
||||
- Start a game and play it for some time and then enter emulator menu
|
||||
and select "Save State".
|
||||
- enter "TAB" (via the on-screen keyboard or a connected keyboard
|
||||
controller) and select the ramdisk ('/ram')
|
||||
- enter file name (e.g '/ram/saved') and press "return"
|
||||
- load a different program
|
||||
- enter emulator menu and load the just saved state
|
||||
- check that the game continues at the point where it was saved
|
||||
|
||||
|
||||
R: device emulation:
|
||||
--------------------
|
||||
|
||||
- Connect DC to peer with serial ("Coder's Cable") cable.
|
||||
- Check that R: device emulation is enabled in Atari800DC ("Emulator
|
||||
Configuration"->"R: device ...").
|
||||
- Check that the serial connection is working (e.g. by using terminal
|
||||
programs on both sides).
|
||||
|
||||
|
||||
Sound:
|
||||
------
|
||||
|
||||
- Check sound synchronization/speed
|
||||
- Use "MULE" and watch the title screen. The third voice should
|
||||
start when the mule is just beneath the "L".
|
||||
|
||||
|
||||
Video:
|
||||
------
|
||||
|
||||
- Check VGA and composite monitor. Screen should be centered and
|
||||
"good".
|
||||
- Check speed (no jitter):
|
||||
- Enable double buffering if it isn't enabled.
|
||||
- Load "Boulder Dash" and run through the first screen as fast as
|
||||
possible.
|
||||
- There shouldn't be any jitter in PAL mode. NTSC mode will have
|
||||
some jitter.
|
||||
- Check both composite and VGA.
|
||||
|
||||
|
||||
CD-only tests:
|
||||
--------------
|
||||
|
||||
- Boot from CD and start some program/game
|
||||
- Open the CD tray
|
||||
- Emulator should enter the emulator menu
|
||||
- Insert a different CD
|
||||
- Check that the content of the new CD is there
|
||||
- Load program/disk image from new CD
|
||||
- Check that the file is loaded correctly (emulator runs the new
|
||||
file).
|
||||
- Open the CD tray at random times
|
||||
- There should never be a crash/hang.
|
||||
- If not in any emulator menu, the emulator menu should be entered.
|
||||
@@ -0,0 +1,302 @@
|
||||
Plans for future versions
|
||||
=========================
|
||||
|
||||
Keyboard and controllers
|
||||
------------------------
|
||||
|
||||
* map host joysticks to Atari ports in the emulation core in order to make
|
||||
the configuration available in UI and config file
|
||||
|
||||
* pass the state of all host keys to the emulation core in order to configure
|
||||
keysticks in UI and config file
|
||||
|
||||
* standardize key mappings in all ports (making host and Atari layouts
|
||||
available everywhere)
|
||||
|
||||
* emulate POKEY keyboard scanning (with optional debouncing)
|
||||
|
||||
* enhance support for pointing devices, including touch screens;
|
||||
"directmouse" should work in more ports, support light pen/gun
|
||||
and correct mirroring of pad/touch/koala
|
||||
|
||||
* Atari Keyboard Interface (AKI) emulation
|
||||
|
||||
|
||||
Emulation core
|
||||
--------------
|
||||
|
||||
* Java midlet
|
||||
|
||||
* cycle-exact POKEY interrupts (timers, serial I/O, keyboard)
|
||||
|
||||
* precisely emulate serial I/O rates
|
||||
|
||||
* emulate POKEY reset (via SKCTL)
|
||||
|
||||
* more accurate frame rates (for example 49.8607456 instead of 50 Hz in PAL)
|
||||
|
||||
* improve VAPI and .PRO support
|
||||
|
||||
* emulate POKEY SIO shift register
|
||||
|
||||
* emulate SIO bus lines, and SIO cable data/audio cross-talk "feep" sound
|
||||
|
||||
* redirection of specific Dn: devices to Hn: (for software that supports
|
||||
only the D: device)
|
||||
|
||||
* log POKEY audio writes, SIO commands (hardware level or DCB level),
|
||||
executed Display List commands, all activity to a defined range
|
||||
of adressess etc. in a way similar to the 6502 trace
|
||||
|
||||
* log events that affect software compatibility: undocumented 6502 opcodes,
|
||||
unofficial system calls (including the 5200), extended memory access
|
||||
|
||||
* emulate drives at the hardware level (810, 1050, XF551.) use code from other
|
||||
emulators which does this. (drive rotation, FM/MFM raw bits). WDCxxxx
|
||||
controller. RIOT chip. 6507. Intel 8048-line chip for the XFD551.
|
||||
Use emulated SIO line for bit-banging. Emulate Drive upgrades (Happy etc.)
|
||||
Emulate 3rd party drives (Rana, Karin Maxi etc.)
|
||||
|
||||
* sound effects. Drive retracking noise (BlueMSX has.) Motor whine.
|
||||
On/off switch sound. Physical key-press sounds. Cartridge slot sounds.
|
||||
Drive door sounds. Floppy rotation flap sound.
|
||||
|
||||
* Atari vapourware emulation. XEM (see below). 1090.
|
||||
1060 CP/M (sweet-pea.)
|
||||
|
||||
* emulate the 850 interface at the hardware level.
|
||||
|
||||
* ATR-8000 emulation. ATR-8500.
|
||||
Adapt an existing CPM emulator.
|
||||
|
||||
* 6502 BRK bug
|
||||
|
||||
* try to understand 6502's "unstable" opcodes (0x93, 0x9b, 0x9f) that seem
|
||||
to have unpredictable (at least not easily predictable) results,
|
||||
preferrably by studying 6502 schematics
|
||||
|
||||
* an option to emulate the variant of 6502 used in new XE machines
|
||||
(which lacks most of the undocumented opcodes of the classic 6502)
|
||||
|
||||
* fully emulate executing 6502 code from Hardware, cycle-exact ANTIC_load
|
||||
from hardware, cycle-exact PMG flickering bus data
|
||||
|
||||
* CPU upgrades (65816, etc)
|
||||
|
||||
* improve emuos so it can boot disks and executables
|
||||
|
||||
* create emuos for 5200
|
||||
|
||||
* emulate printer graphics (on screen or bitmap/PDF output): 1029, 1020, etc.
|
||||
The Mac OS X port of Atari800 has lots of printer emulation routines.
|
||||
|
||||
* RAM Carts (cartridges with battery-powered RAM), writes to flash carts
|
||||
|
||||
* serial "network" interfaces (e.g. 8 Ataris connected, is it GameLink?)
|
||||
|
||||
* ability to play multi-player games across network
|
||||
|
||||
* generate hard disk images or write directly to media that the 8-bit Ataris
|
||||
can use, like CompactFlash or MyIDE/SmartIDE/BB
|
||||
|
||||
* "Turbo" cassette upgrades (Turbo 2000 etc.)
|
||||
|
||||
* cassette emulation of WAV files. Load a WAV file like WAV2CAS does. Save
|
||||
to a WAV file or real cassette like CAS2WAV does. Load voice-and-data
|
||||
combined programmed audio tape images from WAV files. Support compressed
|
||||
(lossless? lossy even?) tape sound images.
|
||||
|
||||
* disk auto-flip. Examine screen data for text string "Insert Side B
|
||||
and press any key/fire/return." Flip disk, print on-screen message and
|
||||
optionally press key. More a core feature than UI. Requires a database.
|
||||
|
||||
* support physical floppy media (hard, port-specific and not very useful)
|
||||
|
||||
* support physical Atari drives (hard, port-specific and not very useful)
|
||||
|
||||
* improve the event recording. Avoid cycle-exact RANDOM?
|
||||
|
||||
|
||||
Graphics
|
||||
--------
|
||||
|
||||
* investigate different palettes for different models such as GTIA vs CTIA
|
||||
or 400/800, 1200XL, 800XL, XE, 5200, hardware modifications to the colour
|
||||
circuts etc.
|
||||
|
||||
* SECAM palette and video emulation.
|
||||
|
||||
* "flicker fixer": display average pixel values of last two Atari frames
|
||||
|
||||
* use YUV output if available. Will it help?
|
||||
|
||||
* PAL emulation. VICE has it, but it's not as complete as Blargg's emulation
|
||||
of NTSC. PAL luma/chroma artifacts are missing (it is like S-Video).
|
||||
Blargg's optimization technique won't work so easily for PAL.
|
||||
(perry: I have a hack of Blargg's slow version of the NTSC emulator that
|
||||
I tried to make work for PAL. But it isn't quite right and is way too slow.
|
||||
Ask me if you are interested.)
|
||||
|
||||
* the NTSC emulator should support other resolutions. It should be supported
|
||||
in all possible ports.
|
||||
|
||||
* fix the remaining bugs in the NTSC emulation. Artificating colours are
|
||||
not quite right. odd-even and even-odd combined artifacts (light red
|
||||
and light green) do not show unless Gaussian factor is changed a lot,
|
||||
which causes even worse artifacts. Fully document the Atari's video
|
||||
output signal (might require a scope.) Fully document NTSC decoding
|
||||
of late 70's and 80's era TVs.
|
||||
|
||||
* document CTIA and emulate properly. Emulate the players not aligning
|
||||
with playfield bug/feature of CTIA which is said to exist. Need
|
||||
at least screenshots of a CTIA Atari showing all possible artifacts.
|
||||
|
||||
* an option to emulate the buggy GTIA chip found in new XE machines.
|
||||
|
||||
* fix all remaining collision bugs in the ANTIC and GTIA code (border+scroll,
|
||||
player HPOS and GRAF changes, partial_scanline changes.) Use the technique
|
||||
of saving data that might generate false collisions, drawing, and then
|
||||
restoring the data (pm_scanline).
|
||||
|
||||
* cycle-exact DMACTL and HSCROL including all glitches
|
||||
|
||||
* ANTIC glitch:
|
||||
POKE 39974,18:POKE 39975,8:POKE 54276,15
|
||||
or
|
||||
POKE 39974,18:POKE 39975,40:POKE 54276,15:POKE 54277,15
|
||||
|
||||
* Video Board XE emulation
|
||||
|
||||
|
||||
Sound
|
||||
-----
|
||||
|
||||
* correctly emulate serial I/O sound
|
||||
|
||||
* one POKEY sound engine
|
||||
|
||||
* include sound settings in the emulation core (command line options,
|
||||
config file, UI) and make it possible to change them at runtime
|
||||
|
||||
* support WAV files in configurations with no live sound
|
||||
|
||||
* an option to auto-enable stereo when an Atari program uses it
|
||||
|
||||
* Covox emulation
|
||||
|
||||
* 2 POKEY mono, 4 POKEY stereo, 4 POKEY quad
|
||||
|
||||
* MIDI <> serial port interface. In it's simplest form there's only MIDI
|
||||
output from the Atari. The more complicated version is enabled by the motor
|
||||
control line and includes two MIDI outputs selected by the command control
|
||||
line and one MIDI input. There is a MIDI composer program for Atari.
|
||||
|
||||
* A/D Converter - 4-bit sampler that returns 0xf0-0xff in the 0xd500-0xd5ff
|
||||
address space.
|
||||
|
||||
* XEM AMY-1 Chip. This is a huge project. Schematics (netlist)
|
||||
are said to exist. Prototyping software for the PC (connected to parallel
|
||||
port) is available online. Datasheet is online. Need netlist for AMY-1,
|
||||
schematics for XEM and any software.
|
||||
|
||||
* SID chip
|
||||
|
||||
|
||||
User Interface
|
||||
--------------
|
||||
|
||||
* make sure all command-line options are available in UI and config file
|
||||
|
||||
* error messages should appear on screen and not in the log
|
||||
|
||||
* on screen display, like a TV remote, for the NTSC (or other) screen filter.
|
||||
|
||||
* support pointing devices (mouse, touch screen) in UI
|
||||
|
||||
* a database to identify programs and choose appropriate settings.
|
||||
OS version. Memory size. Memory expansion type. Peripherals.
|
||||
Machine type. Joystick/Trackball/Paddle etc. controller type.
|
||||
Artifacting mode. SIO patch compatibility. Even if compatible with
|
||||
SIO patch, loading screen graphics are often interesting to watch, so
|
||||
give the user an option to view or ignore them if present. If not
|
||||
SIO patch compatible, optional warp-speed through the loading.
|
||||
Keyboard layout. Advisories as to bad dump/bad image/special considerations
|
||||
Provide documentation, box scan, label scan for the program
|
||||
PAL/NTSC mode. Database should indicate PAL/NTSC
|
||||
compatibility, and which system the program was originally designed for.
|
||||
Allow PAL users to prefer PAL for NTSC-designed programs, but NTSC users
|
||||
to prefer NTSC. NTSC users get PAL (or fake NTSC-upgraded-to-PAL) for
|
||||
all PAL-designed programs (Except perhaps very old ones like English
|
||||
Software titles that NTSC users might remember.) PAL users get NTSC
|
||||
video only for artifacting programs.
|
||||
|
||||
|
||||
Clean up
|
||||
--------
|
||||
|
||||
* make port-specific features available in other ports - now many features
|
||||
work only in SDL, Mac OS X or Win PLus
|
||||
|
||||
* clean up the "util" directory - remove obsolete files, write one-file
|
||||
documentation for all utils
|
||||
|
||||
* make documentation consistent across systems (HTML?)
|
||||
|
||||
* further clean up in the directory structure - port specific files should
|
||||
be hidden in their subfolders (falcon, amiga, ...)
|
||||
|
||||
|
||||
Speed optimizations
|
||||
-------------------
|
||||
|
||||
* use a boolean variable to disable 6502 history tracking and breakpoints
|
||||
(even with MONITOR_BREAKPOINTS and MONITOR_TRACE it should be
|
||||
faster than currently with just the default MONITOR_BREAK)
|
||||
|
||||
* use function pointer table for hardware registers (like PAGED_ATTRIB does)
|
||||
|
||||
* 6502 emulation optimizations: limit number of CPU_GO() calls (call ANTIC/GTIA
|
||||
routines from 6502 and not vice-versa), use ints instead of UWORD and UBYTE,
|
||||
merge N and Z flags into one variable, put 6502 flags into local variables
|
||||
so they can be stored in registers;
|
||||
see http://asap.sourceforge.net for a 6502 emulator which includes these
|
||||
optimizations
|
||||
|
||||
* use patches for common routines such as OS interrupt handlers
|
||||
|
||||
* make some hardware registers directly available in memory[]
|
||||
|
||||
* write versions of draw_antic_* functions for the common case when there are
|
||||
no sprites in the current scanline
|
||||
|
||||
* update color lookup tables only when color registers change
|
||||
|
||||
* automatic framedrop
|
||||
|
||||
* fast bank switching (without memcpy)
|
||||
|
||||
* implement Dirty Spans (see HOWTO-DIRTYSPAN)
|
||||
|
||||
* an option to detect popular lengthy Atari decompression routines
|
||||
and run equivalent C routines instead
|
||||
|
||||
|
||||
R: device
|
||||
---------
|
||||
|
||||
* clean up and comment the code
|
||||
|
||||
* improve portability
|
||||
|
||||
* documentation
|
||||
|
||||
* automatic test (similar to hdevtest.lst for H:)
|
||||
|
||||
* identify security problems
|
||||
|
||||
* TCP port should be configurable (currently hardwired to 9000). The switch
|
||||
between real serial port and TCP port should be put there. Something
|
||||
along the following lines:
|
||||
R_SERIAL = 1
|
||||
R_SERPORT = /dev/ttyS0
|
||||
R_NETPORT = 9000
|
||||
@@ -0,0 +1,604 @@
|
||||
Up-to-date list of command line parameters and key mappings
|
||||
===========================================================
|
||||
|
||||
Usage:
|
||||
atari800 [options] [filenames]
|
||||
|
||||
where:
|
||||
"filenames" are names of files supported by the emulator.
|
||||
The following file types are currently supported:
|
||||
- disk images: ATR, XFD, ATR.GZ/ATZ, XFD.GZ/XFZ, DCM, PRO, ATX
|
||||
- programs: COM/EXE/XEX, BAS, LST
|
||||
- cartridge images: CAR/CART, ROM (raw)
|
||||
- tape images: CAS, raw bootable programs
|
||||
- Atari800 state files: compressed and not compressed
|
||||
Disk images are mounted in order, i.e. the first file is mounted
|
||||
to the drive 1, next one to the drive 2, etc.
|
||||
|
||||
Cassette operation
|
||||
==================
|
||||
There is support for loading and saving from/to CAS tape images. It is also
|
||||
possible to select raw files (DOS binaries, bootable programs, BASIC programs
|
||||
etc.) as tape images, but only for loading. Upon attaching a tape image, the
|
||||
emulator acts as if the tape recorder's "Play" button was permanently pressed,
|
||||
so that a tape rolls automatically when an Atari program turns the tape motor
|
||||
on.
|
||||
|
||||
Turning the SIO patch on speeds up the tape load and save operations. Some
|
||||
tapes, however, are copy-protected an will load correctly only with the SIO
|
||||
patch being disabled. Note that toggling the SIO patch during any tape
|
||||
operation will cause it to fail.
|
||||
|
||||
A tape image can be rewound to a specific part (block), to allow loading
|
||||
from tape images which contain multiple programs one-after-another. After
|
||||
rewinding the "Record" option is automatically turned off. Rewinding will
|
||||
cause any tape operation being in progress to fail.
|
||||
|
||||
When a tape image is attached to Atari800, only loading from it is possible.
|
||||
Before saving data on the tape, a user has to manually switch the "Record"
|
||||
option to "yes", in the same way as one would manually press/release the
|
||||
"Record" button on a physical tape recorder. Remember to disable the "Record"
|
||||
option before loading from tape. Note that switching the "Record" option
|
||||
on/off during any tape operation will cause it to fail and may cause random
|
||||
data to be saved to a tape image.
|
||||
|
||||
With the SIO patch active, the emulator automatically recognises whether
|
||||
a load or save operation is requested. and it is not necessary to touch the
|
||||
"Record" option. This can lead to unwanted changes in a tape file. To avoid
|
||||
the problem, a user can mark the attached cassette image as read-only to
|
||||
disallow any write operations.
|
||||
|
||||
Saving to tape always casues the new blocks to be appended at the end of the
|
||||
tape image, regardless of the tape's current position. It is not possible
|
||||
to overwrite existing data on the tape.
|
||||
|
||||
A user can create a new empty CAS tape image with the "Make blank tape"
|
||||
option. The user then provides the image's filename and its description
|
||||
(stored in the CAS image's header; may be left empty). The created image is
|
||||
automatically attached to Atari800 with the "Record" option turned on, which
|
||||
allows to go straight to saving the data. Creating an image with the filename
|
||||
pointing to an existing file will cause that file to be cleared.
|
||||
|
||||
Only standard blocks can be loaded or saved. Any copy protection that relies
|
||||
on non-standard signals is not supported. Additionally, saving is only
|
||||
supported with the standard speed of 600 baud.
|
||||
|
||||
Saving the emulator's state during a tape loading/saving is not supported. The
|
||||
current tape operation is not stored in the savestate and it will not be
|
||||
restored properly when that savestate is later loaded.
|
||||
|
||||
MIO and Black Box
|
||||
==================
|
||||
You need ROM images (not provided.)
|
||||
Make a blank SCSI disk image (using dd for instance.)
|
||||
Set MIO_SCSI_DISK or BB_SCSI_DISK to the disk image name.
|
||||
Use 256 byte sectors for the Black Box.
|
||||
Don't use SASI.
|
||||
Use ALT-Backslash for the Black Box menu.
|
||||
Don't use the OS patches, use -nopatchall. The patches conflict with D1xx
|
||||
|
||||
1400XL/1450XLD
|
||||
==================
|
||||
You need ROM images (not provided.)
|
||||
Don't use the OS patches, use -nopatchall. The patches conflict with D1xx
|
||||
The Self test can talk.
|
||||
You can use the V: device to talk.
|
||||
If you set the drives to empty, then a message appears on the 1450XLD screen
|
||||
asking you to insert a disk.
|
||||
If you press select when booting, the behavior of the 1450XLD disks is changed.
|
||||
I believe it slows down for compability.
|
||||
|
||||
Command line options
|
||||
====================
|
||||
|
||||
-help Display list of options and terminate
|
||||
-v Display version number and terminate
|
||||
-verbose Display framerate when exiting
|
||||
|
||||
-config <filename> Use specified configuration file instead of default
|
||||
-autosave-config Automatically save the current configuration on emulator
|
||||
exit
|
||||
-no-autosave-config Don't save the current configuration on emulator exit
|
||||
(the default)
|
||||
|
||||
-osa_rom <filename> Use specified OS/A ROM image
|
||||
-osb_rom <filename> Use specified OS/B ROM image
|
||||
-xlxe_rom <filename> Use specified XL/XE OS ROM image
|
||||
-5200_rom <filename> Use specified 5200 OS ROM image
|
||||
-basic_rom <filename> Use specified Atari BASIC ROM image
|
||||
|
||||
-800-rev auto|a-ntsc|a-pal|b-ntsc|custom
|
||||
Select OS revision for Atari 400/800
|
||||
-xl-rev auto|10|11|1|2|3a|3b|5|3|4|59|59a|custom
|
||||
Select OS revision for Atari XL/XE
|
||||
-5200-rev auto|orig|a|custom
|
||||
Select OS revision for Atari 5200
|
||||
-basic-rev auto|a|b|c|custom
|
||||
Select BASIC revision
|
||||
-xegame-rev auto|orig|custom
|
||||
Select XEGS builtin game version
|
||||
|
||||
-atari Emulate Atari 800
|
||||
-1200 Emulate Atari 1200XL
|
||||
-xl Emulate Atari 800XL
|
||||
-xe Emulate Atari 130XE
|
||||
-320xe Emulate Atari 320XE (Compy Shop)
|
||||
-rambo Emulate Atari 320XE (Rambo)
|
||||
-xegs Emulate Atari XEGS
|
||||
-5200 Emulate Atari 5200
|
||||
|
||||
-emuos Use EmuOS
|
||||
-c Enable RAM between 0xc000 and 0xcfff in Atari 800
|
||||
|
||||
-axlon <n> Use Atari 800 Axlon memory expansion: <n> k total RAM
|
||||
-axlon0f Use Axlon shadow at 0x0fc0-0x0fff
|
||||
-mosaic <n> Use 400/800 Mosaic memory expansion: <n> k total RAM
|
||||
-mapram Enable MapRAM enhancement for Atari XL/XE
|
||||
-no-mapram Disable MapRAM
|
||||
|
||||
|
||||
-pal Emulate PAL TV mode
|
||||
-ntsc Emulate NTSC TV mode
|
||||
|
||||
-nobasic Turn off Atari BASIC ROM
|
||||
-basic Turn on Atari BASIC ROM
|
||||
|
||||
-cart <filename> Insert cartridge (CART or raw format)
|
||||
-cart-type <0..67> Select type of cartridge inserted with -cart. 0 means
|
||||
no cartridge, and other values indicate a specific
|
||||
cartridge type as in cart.txt.
|
||||
-cart2 <filename> Insert second cartridge (CART or raw format)
|
||||
Only if first cartridge is SpartaDOS X (64 or 128)
|
||||
-cart2-type <0..67> Similar to -cart-type. Select type of cartridge inserted
|
||||
with -cart2.
|
||||
-cart-autoreboot Automatically reboot after cartridge inserting/removing
|
||||
(doesn't affect the piggyback cartridge)
|
||||
-no-cart-autoreboot Don't reboot after cartridge inserting/removing
|
||||
|
||||
-run <filename> Run Atari program (EXE, COM, XEX, BAS, LST)
|
||||
|
||||
-state <filename> Load saved-state file
|
||||
|
||||
-tape <filename> Attach cassette image (CAS format or raw file)
|
||||
-boottape <filename> Attach cassette image and boot it
|
||||
-tape-readonly Set the attached cassette image as read-only
|
||||
|
||||
-1400 Emulate the Atari 1400XL
|
||||
-xld Emulate the Atari 1450XLD
|
||||
-bb Emulate the CSS Black Box
|
||||
-mio Emulate the ICD MIO board
|
||||
|
||||
-voicebox Emulate the Alien Group Voice Box I
|
||||
-voiceboxii Emulate the Alien Group Voice Box II
|
||||
|
||||
-nopatch Don't patch SIO routine in OS
|
||||
-nopatchall Don't patch OS at all, H:, P: and R: devices won't work
|
||||
-H1 <path> Set path for H1: device
|
||||
-H2 <path> Set path for H2: device
|
||||
-H3 <path> Set path for H3: device
|
||||
-H4 <path> Set path for H4: device
|
||||
-hreadonly Enable read-only mode for H: device
|
||||
-hreadwrite Disable read-only mode for H: device
|
||||
-devbug Put debugging messages for H: and P: devices in log file
|
||||
|
||||
-rtime Enable R-Time 8 emulation
|
||||
-nortime Disable R-Time 8 emulation
|
||||
|
||||
-rdevice [<dev>] Enable R: device (<dev> can be host serial device name)
|
||||
|
||||
-mouse off Do not use mouse
|
||||
-mouse pad Emulate paddles
|
||||
-mouse touch Emulate Atari Touch Tablet
|
||||
-mouse koala Emulate Koala Pad
|
||||
-mouse pen Emulate Light Pen
|
||||
-mouse gun Emulate Light Gun
|
||||
-mouse amiga Emulate Amiga mouse
|
||||
-mouse st Emulate Atari ST mouse
|
||||
-mouse trak Emulate Atari Trak-Ball
|
||||
-mouse joy Emulate joystick using mouse
|
||||
-mouseport <num> Set mouse port 1-4 (default 1)
|
||||
-mousespeed <num> Set mouse speed 1-9 (default 3)
|
||||
-multijoy Emulate MultiJoy4 interface
|
||||
-directmouse Use mouse's absolute position
|
||||
-cx85 <num> Emulate CX85 numeric keypad on port <num>
|
||||
-grabmouse SDL only, prevent mouse pointer from leaving the window
|
||||
|
||||
-record <filename> Record input to <filename>
|
||||
-playback <filename> Playback input from <filename>
|
||||
|
||||
-refresh <rate> Set screen refresh rate
|
||||
-ntsc-artif none|ntsc-old|ntsc-new|ntsc-full
|
||||
Set video artifacting emulation mode for NTSC.
|
||||
-pal-artif none|pal-simple|pal-blend
|
||||
Set video artifacting emulation mode for PAL.
|
||||
|
||||
-artif <mode> Set artifacting mode 0-4 (0 = disable) - only for
|
||||
ntsc-old and ntsc-new
|
||||
|
||||
-colors-preset standard|deep-black|vibrant
|
||||
Use one of predefined color adjustments
|
||||
-saturation <n> Set screen color saturation (like TV Colour control)
|
||||
-contrast <n> Set screen contrast (also called white level)
|
||||
-brightness <n> Set screen brightness (also called black level)
|
||||
-gamma <n> Set screen gamma correction
|
||||
-tint <n> Set tint -1..1
|
||||
-ntsc-saturation <n> Set saturation only for NTSC
|
||||
-ntsc-contrast <n> Set contrast only for NTSC
|
||||
-ntsc-brightness <n> Set brightness only for NTSC
|
||||
-ntsc-gamma <n> Set gamma adjustment only for NTSC
|
||||
-ntsc-tint <n> Set tint only for NTSC
|
||||
-ntsc-colordelay <n> Set GTIA color delay for NTSC (emulates the potentiometer at the
|
||||
bottom of Atari computers, that adjusts colors)
|
||||
-pal-saturation <n> Set saturation only for PAL
|
||||
-pal-contrast <n> Set contrast only for PAL
|
||||
-pal-brightness <n> Set brightness only for PAL
|
||||
-pal-gamma <n> Set gamma adjustment only for PAL
|
||||
-pal-tint <n> Set tint only for PAL
|
||||
-pal-colordelay <n> Set GTIA color delay for PAL
|
||||
|
||||
-paletten <filename> Read Atari NTSC colors from ACT file
|
||||
-paletten-adjust Apply the colour adjustments to the loaded NTSC palette
|
||||
-palettep <filename> Read Atari PAL colors from ACT file
|
||||
-palettep-adjust Apply the colour adjustments to the loaded PAL palette
|
||||
|
||||
-screenshots <pattern>Set filename pattern for screenshots
|
||||
-showspeed Show percentage of actual speed
|
||||
-turbo Run at max speed (Turbo mode)
|
||||
|
||||
-sound Enable sound
|
||||
-nosound Disable sound
|
||||
-dsprate <freq> Set sound output frequency in Hz
|
||||
-audio16 Set sound output format to 16-bit
|
||||
-audio8 Set sound output format to 8-bit
|
||||
-snd-buflen <ms> Set length of the hardware sound buffer in milliseconds
|
||||
-snddelay <ms> Set sound latency in milliseconds
|
||||
|
||||
-ide <file> Enable IDE emulation
|
||||
-ide_debug Enable IDE Debug output
|
||||
-ide_cf Enable CF emulation
|
||||
|
||||
|
||||
Curses version options
|
||||
----------------------
|
||||
-left Use columns 0 to 39
|
||||
-central Use columns 20 to 59
|
||||
-right Use columns 40 to 79
|
||||
-wide1 Use columns 0 to 79 (spaces between characters)
|
||||
-wide2 Use columns 0 to 79 (as above but normal/reverse spaces)
|
||||
|
||||
|
||||
DOS/VGA version options
|
||||
-----------------------
|
||||
|
||||
-interlace Generate screen with interlace
|
||||
-video <mode> 0=320x200, 1=320x240, 2=320x480 interlaced with black
|
||||
lines, 3=320x480 interlaced with darker lines
|
||||
-novesa Do not use VESA 2 video modes
|
||||
-vretrace Use vertical retrace control
|
||||
|
||||
-LPTjoy1 Read joystick connected to LPT1
|
||||
-LPTjoy2 Read joystick connected to LPT2
|
||||
-LPTjoy3 Read joystick connected to LPT3
|
||||
-joyswap Swap joysticks
|
||||
|
||||
-keyboard 0 PC keyboard layout
|
||||
-keyboard 1 Atari keyboard layout
|
||||
|
||||
|
||||
Falcon version options
|
||||
----------------------
|
||||
|
||||
-interlace <x> Generate Falcon screen only every x frame
|
||||
-videl Direct VIDEL programming (Falcon/VGA only)
|
||||
-double Double the screen size on NOVA
|
||||
-delta Delta screen output (differences only)
|
||||
|
||||
-joyswap Swap joysticks
|
||||
|
||||
|
||||
Java NestedVM version options
|
||||
----------------------
|
||||
-scale <n> Scale width and height by <n>
|
||||
|
||||
|
||||
SDL version options
|
||||
-------------------
|
||||
|
||||
-fullscreen Start in fullscreen mode
|
||||
-windowed Start in windowed mode (the default)
|
||||
-rotate90 Rotate display (useful for devices with 240x320 screen)
|
||||
-no-rotate90 Don't rotate display (the default)
|
||||
-fs-width <x> Set horizontal fullscreen resolution
|
||||
-fs-height <y> Set vertical fullscreen resolution
|
||||
-win-width <x> Set window's horizontal size
|
||||
-win-height <y> Set window's vertical size
|
||||
-bpp <n> Set mode bits per pixel, only if OpenGL is disabled
|
||||
(0=desktop depth, 8, 16, 32)
|
||||
-vsync Synchronize the display with monitor's vertical retrace
|
||||
to avoid image tearing.
|
||||
-no-vsync Don't synchronize the display with the monitor (the default).
|
||||
-horiz-area narrow|tv|full|<number>
|
||||
Set visible horizontal area:
|
||||
narrow: 320 pixels,
|
||||
tv: similar to real tv - 336 pixels,
|
||||
full: full overscan - 384 pixels,
|
||||
or provide a number between 160 and 384.
|
||||
-vert-area short|tv|full|<number>
|
||||
Set visible vertical area:
|
||||
short: 200 pixels,
|
||||
tv: similar to real tv - 224 or 240 pixels (depending on
|
||||
TV system),
|
||||
full: full overscan - 300 pixels,
|
||||
or provide a number between 100 and 300.
|
||||
-horiz-shift <n> Set horizontal shift of the visible area (-384..384)
|
||||
-vert-shift <n> Set vertical shift of the visible area (-300..300)
|
||||
-stretch none|integral|full|<number>
|
||||
Set method for image stretching:
|
||||
none: no stretching at all,
|
||||
integral: fit to screen/window, but stretch only by
|
||||
integral multiplier
|
||||
full: stretch to fit screen/window, unrestricted
|
||||
or provide a custom multiplier (e.g. 2, 3, 2.5, ...)
|
||||
-fit-screen width|height|both
|
||||
Set method of fitting the display to screen/window.
|
||||
-image-aspect none|square-pixels|real
|
||||
How to maintain image aspect ratio when stretching:
|
||||
none: maintaining disabled, image stretches to fill
|
||||
the entire screen/window
|
||||
square-pixels: width and height stretched by the same
|
||||
multiplier
|
||||
real: real TV's aspect ratio (depending on TV system)
|
||||
-host-aspect-ratio auto|<x>:<y>
|
||||
Set host display's aspect ratio. Used to correctly
|
||||
compute aspect ratio when -image-aspect is "real".
|
||||
Can be set to values such as 4:3, 16:9, 1.25:1, etc.
|
||||
"auto" tries to autodetect the ratio.
|
||||
-80column Display output of 80 column hardware. Usable only in
|
||||
conjunction with one of -xep80, -proto80, -af80, -bit3.
|
||||
-bit3 uses software control and does not need this.
|
||||
-no-80column Display normal screen instead of 80 column output
|
||||
|
||||
-nojoystick Do not initialize joysticks
|
||||
-joy0 </dev/lp0> Define the device for LPTjoy
|
||||
-joy1 </dev/lp1> --""-- only when LPTjoy support compiled in
|
||||
|
||||
The following 7 items are only for -ntsc-artif set to ntsc-full:
|
||||
-ntsc-filter-preset composite|svideo|rgb|monochrome
|
||||
Use one of predefined NTSC filter adjustments
|
||||
-ntsc-sharpness <n> Set sharpness
|
||||
-ntsc-resolution <n> Set resolution
|
||||
-ntsc-artifacts <n> Set artifacts
|
||||
-ntsc-fringing <n> Set fringing
|
||||
-ntsc-bleed <n> Set bleed
|
||||
-ntsc-burstphase <n> Set burst phase. This changes colors of artifacts.
|
||||
The best values are 0, 0.5, 1, 1.5
|
||||
-scanlines <n> Set visibility of scanlines (0-100)
|
||||
-scanlinesint Enable scanlines interpolation
|
||||
-no-scanlinesint Disable scanlines interpolation
|
||||
-video-accel Use OpenGL hardware acceleration
|
||||
-no-video-accel Don't use OpenGL hardware acceleration
|
||||
-pixel-format bgr16|rgb16|bgra32|argb32
|
||||
Choose OpenGL texture format
|
||||
-pbo With OpenGL, use Pixel Buffer Objects for performance
|
||||
-no-pbo Disable usage of Pixel Buffer Objects
|
||||
-bilinear-filter Enable OpenGL bilinear filtering
|
||||
-no-bilinear-filter Disable OpenGL bilinear filtering
|
||||
-opengl-lib <path> Use a custom OpenGL shared library
|
||||
-proto80 Emulate a prototype 80 column board for the 1090
|
||||
-xep80 Emulate the XEP80
|
||||
-xep80port <n> Use XEP80 on joystick port <n>
|
||||
-af80 Emulate the Austin Franklin 80 column board
|
||||
-bit3 Emulate the Bit3 Full View 80 column board
|
||||
|
||||
|
||||
X11 options
|
||||
-----------
|
||||
|
||||
-small Single size window
|
||||
-large Double size window
|
||||
-huge Triple size window
|
||||
-clip_x <n> Left offset for clipping
|
||||
-clip_y <n> Top offset for clipping
|
||||
-clip_width Width of the clipping area
|
||||
-clip_height Height of the clipping area
|
||||
-private_cmap Use private colormap
|
||||
|
||||
-sio Show SIO monitor
|
||||
-x11bug Enable debug code in atari_x11.c
|
||||
|
||||
-keypad Keypad mode
|
||||
|
||||
|
||||
Keyboard, joystick and other controllers
|
||||
========================================
|
||||
|
||||
Unlike PC Xformer, I have not tried to emulate the exact keyboard layout,
|
||||
instead, I have tried to make your native keyboard work as normal.
|
||||
|
||||
F1 Built in user interface
|
||||
F2 Option key
|
||||
F3 Select key
|
||||
F4 Start key
|
||||
F5 Reset key ("warm reset")
|
||||
Shift+F5 Reboot ("cold reset")
|
||||
F6 Help key (XL/XE only)
|
||||
F7 Break key / Pause during DOS file booting (**)
|
||||
F8 Enter monitor
|
||||
F9 Exit emulator
|
||||
F10 Save screenshot
|
||||
Shift+F10 Save interlaced screenshot
|
||||
F12 Turbo mode
|
||||
Alt+R Run Atari program
|
||||
Alt+D Disk management
|
||||
Alt+C Cartridge management
|
||||
Alt+T Tape management
|
||||
Alt+Y Select system
|
||||
Alt+O Sound settings
|
||||
Alt+W Sound recording start/stop
|
||||
Alt+S Save state file
|
||||
Alt+L Load state file
|
||||
Alt+A About the emulator
|
||||
Insert Insert line (Atari Shift+'>')
|
||||
Ctrl+Insert Insert character (Atari Ctrl+'>')
|
||||
Shift+Ctrl+Insert Shift+Ctrl+'>'
|
||||
Delete Delete line (Atari Shift+Backspace)
|
||||
Shift+Backspace Delete line (Atari Shift+Backspace)
|
||||
Ctrl+Delete Delete character (Atari Ctrl+Backspace)
|
||||
Ctrl+Backspace Delete character (Atari Ctrl+Backspace)
|
||||
Shift+Ctrl+Delete Shift+Ctrl+Backspace
|
||||
Shift+Ctrl+Backspace Shift+Ctrl+Backspace
|
||||
Home Clear (Atari Shift+'<')
|
||||
Ctrl+Home Ctrl+'<' (also clears screen)
|
||||
Shift+Ctrl+Home Shift+Ctrl+'<'
|
||||
~ Inverse video
|
||||
Up Up (Atari Ctrl+'-')
|
||||
Down Down (Atari Ctrl+'=')
|
||||
Left Left (Atari ctrl+'+')
|
||||
Right Right (Atari ctrl+'*')
|
||||
Ctrl+Up -
|
||||
Ctrl+Down =
|
||||
Ctrl+Left +
|
||||
Ctrl+Right *
|
||||
Shift+Up _ (Atari Shift+'-')
|
||||
Shift+Down | (Atari Shift+'=')
|
||||
Shift+Left \ (Atari Shift+'+')
|
||||
Shift+Right ^ (Atari Shift+'*')
|
||||
Shift+Ctrl+Up Shift+Ctrl+-
|
||||
Shift+Ctrl+Down Shift+Ctrl+=
|
||||
Ctrl+'\' Ctrl+Esc (Workaround for Windows)
|
||||
Shift+Ctrl+'\' Shift+Ctrl+Esc (Workaround for Windows)
|
||||
|
||||
CX85 Keypad (if enabled):
|
||||
host keypad 0123456789-. 0123456789-.
|
||||
host keypad / NO
|
||||
host keypad Ctrl+/ ESCAPE
|
||||
host keypad * DELETE
|
||||
host keypad + YES
|
||||
host keypad Enter +ENTER
|
||||
|
||||
Paddles, Atari touch tablet, Koala pad, light pen, light gun,
|
||||
ST/Amiga mouse, Atari trak-ball, joystick and Atari 5200 analog
|
||||
controller are emulated using mouse on ports that support it.
|
||||
See the options above for how to enable mouse.
|
||||
|
||||
(**) When Slow booting of DOS binary files is enabled, holding F7 during
|
||||
loading pauses the booting process.
|
||||
|
||||
|
||||
Amiga keyboard, joystick and other controllers
|
||||
----------------------------------------------
|
||||
|
||||
Please look into the supplied Atari800.guide.
|
||||
|
||||
|
||||
BASIC keyboard, joystick and other controllers
|
||||
----------------------------------------------
|
||||
|
||||
No function keys or Alt+letter shortcuts.
|
||||
Use Ctrl+C to enter the monitor.
|
||||
Controllers not supported in this version.
|
||||
|
||||
|
||||
Curses keyboard, joystick and other controllers
|
||||
-----------------------------------------------
|
||||
|
||||
F10 (Save screenshot) does not work in the default CURSES_BASIC build.
|
||||
Shift+F5 and Shift+F10 don't work at all.
|
||||
Avoid Ctrl + C, H, J, M, Q, S and Z. The remaining control characters
|
||||
can be typed. Control characters are displayed on the screen
|
||||
with the associated upper case character in bold.
|
||||
Controllers not supported in this version.
|
||||
|
||||
|
||||
DOS VGA keyboard, joystick and other controllers
|
||||
------------------------------------------------
|
||||
|
||||
F7 Switch between Emulated joysticks mode and Normal keyboard
|
||||
` Atari/Inverse key
|
||||
|
||||
Joysticks can be either real one connected to game port, or old 8-bit
|
||||
digital CX-40 joysticks connected to parallel port or keyboard joysticks
|
||||
(try out JOYCFG.EXE).
|
||||
|
||||
|
||||
Falcon keyboard, joystick and other controllers
|
||||
-----------------------------------------------
|
||||
|
||||
Help Help key (XL/XE)
|
||||
|
||||
Joystick 0 is operated by the numeric keypad (make sure that the numeric
|
||||
keypad has been enabled).
|
||||
|
||||
7 8 9
|
||||
\|/
|
||||
4 5 6
|
||||
/|\
|
||||
1 2 3
|
||||
|
||||
And 0 is the fire key.
|
||||
|
||||
Mouse not supported in this version.
|
||||
|
||||
|
||||
SDL keyboard, joystick and other controllers
|
||||
--------------------------------------------
|
||||
` Atari/Inverse key
|
||||
LSUPER Atari/Inverse key (unusable under Windows)
|
||||
RSUPER CapsToggle (+Shift = CapsLock)
|
||||
|
||||
LAlt+F Switch fullscreen
|
||||
LAlt+G Switch visible horizontal area. See -horiz-area.
|
||||
LAlt+J Swap joysticks 0 and 1
|
||||
LAlt+M Grab mouse (prevents mouse pointer from leaving the window)
|
||||
|
||||
LAlt+LShift+1 Decrease tint (also called hue)
|
||||
LAlt+1 Increase tint
|
||||
LAlt+LShift+2 Decrease saturation (like TV Colour control)
|
||||
LAlt+2 Increase saturation
|
||||
LAlt+LShift+3 Decrease contrast (also called white level)
|
||||
LAlt+3 Increase contrast
|
||||
LAlt+LShift+4 Decrease brightness (also called black level)
|
||||
LAlt+4 Increase brightness
|
||||
LAlt+LShift+5 Decrease gamma adjustment
|
||||
LAlt+5 Increase gamma adjustment
|
||||
LAlt+LShift+6 Decrease color delay (Atari color adjustment potentiometer)
|
||||
LAlt+6 Increase color delay
|
||||
|
||||
The following keys work only when the NTSC filter is enabled (-ntsc-artif set
|
||||
to ntsc-full):
|
||||
LAlt+LShift+7 Decrease sharpness
|
||||
LAlt+7 Increase sharpness
|
||||
LAlt+LShift+8 Decrease resolution
|
||||
LAlt+8 Increase resolution
|
||||
LAlt+LShift+9 Decrease artifacts
|
||||
LAlt+9 Increase artifacts
|
||||
LAlt+LShift+0 Decrease fringing
|
||||
LAlt+0 Increase fringing
|
||||
LAlt+LShift+- Decrease bleed
|
||||
LAlt+- Increase bleed
|
||||
LAlt+LShift+= Decrease burst phase (use this to change artifacting colours)
|
||||
LAlt+= Increase burst phase
|
||||
LAlt+LShift+[ Decrease scanlines percentage
|
||||
LAlt+[ Increase scanlines percentage
|
||||
LAlt+] Toggle NTSC composite/S-Video/RGB/monochrome settings
|
||||
|
||||
LAlt+Shift+X Enable/disable 80 column screen (for -xep80/-af80/-proto80/
|
||||
-bit3)
|
||||
|
||||
Apart from standard joysticks (handled by the SDL) up to two keyboard joysticks
|
||||
are supported. The keys used for joystick directions and the trigger can be
|
||||
freely defined in the config UI (Controller Config -> Define layout).
|
||||
Keyboard joystick emulation can be enabled/disabled in the Controller Config.
|
||||
By default, joy 0 is enabled and joy 1 is disabled (to not steal normal
|
||||
AWDS keys in the emulator).
|
||||
|
||||
|
||||
X11 keyboard, joystick and other controllers
|
||||
--------------------------------------------
|
||||
|
||||
Alt Atari/Inverse key (either Alt key will work)
|
||||
|
||||
Joystick 0 is operated by the mouse position relative to the center of the
|
||||
screen. The mouse button acts as the trigger. On Linux, standard joysticks
|
||||
are also supported.
|
||||
|
||||
@@ -0,0 +1,998 @@
|
||||
This file describes types of cartridge images supported by the Atari800
|
||||
emulator.
|
||||
|
||||
There are:
|
||||
- raw images - files that contain only dump of cartridge memory
|
||||
- CART files - images with additional 16-byte header, which contains type
|
||||
of the cartridge
|
||||
|
||||
For raw images you usually have to select the cartridge type each time
|
||||
you insert an image. To make it easier, you only select from types of same
|
||||
image size. If there's only one supported type that matches file's length
|
||||
(currently only for 2 KB cartridges), that type is selected automatically.
|
||||
|
||||
The advantage of using CART files is that you don't have to select
|
||||
the cartridge type, because it is stored inside the file.
|
||||
|
||||
The CART format has been introduced in Atari800 0.8.0, when there were
|
||||
only 4 supported cartridge types. The format has not changed, only new types
|
||||
have been added.
|
||||
|
||||
The format is:
|
||||
first 4 bytes containing 'C' 'A' 'R' 'T'.
|
||||
next 4 bytes containing cartridge type in MSB format (see the table below).
|
||||
next 4 bytes containing cartridge checksum in MSB format (ROM only).
|
||||
next 4 bytes are currently unused (zero).
|
||||
followed immediately with the ROM data: 2, 4, 8, 16, 32, 40, etc. kilobytes.
|
||||
|
||||
The recommended file name extension for CART files is CAR.
|
||||
|
||||
Currently supported cartridge types:
|
||||
|
||||
+----+-----------+------+-----------------------------------------------+---+
|
||||
| Id | Machine | Size | Name | E |
|
||||
|----+-----------+------+-----------------------------------------------+---+
|
||||
| 1 | 800/XL/XE | 8 | Standard 8 KB cartridge | |
|
||||
| 2 | 800/XL/XE | 16 | Standard 16 KB cartridge | |
|
||||
| 3 | 800/XL/XE | 16 | OSS two chip 16 KB cartridge (034M) | |
|
||||
| 4 | 5200 | 32 | Standard 32 KB 5200 cartridge | |
|
||||
| 5 | 800/XL/XE | 32 | DB 32 KB cartridge | |
|
||||
| 6 | 5200 | 16 | Two chip 16 KB 5200 cartridge | |
|
||||
| 7 | 5200 | 40 | Bounty Bob Strikes Back 40 KB 5200 cartridge | |
|
||||
| 8 | 800/XL/XE | 64 | 64 KB Williams cartridge | |
|
||||
| 9 | 800/XL/XE | 64 | Express 64 KB cartridge | |
|
||||
| 10 | 800/XL/XE | 64 | Diamond 64 KB cartridge | |
|
||||
| 11 | 800/XL/XE | 64 | SpartaDOS X 64 KB cartridge | |
|
||||
| 12 | 800/XL/XE | 32 | XEGS 32 KB cartridge | |
|
||||
| 13 | 800/XL/XE | 64 | XEGS 64 KB cartridge (banks 0-7) | |
|
||||
| 14 | 800/XL/XE | 128 | XEGS 128 KB cartridge | |
|
||||
| 15 | 800/XL/XE | 16 | OSS one chip 16 KB cartridge | |
|
||||
| 16 | 5200 | 16 | One chip 16 KB 5200 cartridge | |
|
||||
| 17 | 800/XL/XE | 128 | Atrax 128 KB cartridge | |
|
||||
| 18 | 800/XL/XE | 40 | Bounty Bob Strikes Back 40 KB cartridge | |
|
||||
| 19 | 5200 | 8 | Standard 8 KB 5200 cartridge | |
|
||||
| 20 | 5200 | 4 | Standard 4 KB 5200 cartridge | |
|
||||
| 21 | 800 | 8 | Right slot 8 KB cartridge | |
|
||||
| 22 | 800/XL/XE | 32 | 32 KB Williams cartridge | |
|
||||
| 23 | 800/XL/XE | 256 | XEGS 256 KB cartridge | |
|
||||
| 24 | 800/XL/XE | 512 | XEGS 512 KB cartridge | |
|
||||
| 25 | 800/XL/XE | 1024 | XEGS 1 MB cartridge | |
|
||||
| 26 | 800/XL/XE | 16 | MegaCart 16 KB cartridge | |
|
||||
| 27 | 800/XL/XE | 32 | MegaCart 32 KB cartridge | |
|
||||
| 28 | 800/XL/XE | 64 | MegaCart 64 KB cartridge | |
|
||||
| 29 | 800/XL/XE | 128 | MegaCart 128 KB cartridge | |
|
||||
| 30 | 800/XL/XE | 256 | MegaCart 256 KB cartridge | |
|
||||
| 31 | 800/XL/XE | 512 | MegaCart 512 KB cartridge | |
|
||||
| 32 | 800/XL/XE | 1024 | MegaCart 1 MB cartridge | |
|
||||
| 33 | 800/XL/XE | 32 | Switchable XEGS 32 KB cartridge | |
|
||||
| 34 | 800/XL/XE | 64 | Switchable XEGS 64 KB cartridge | |
|
||||
| 35 | 800/XL/XE | 128 | Switchable XEGS 128 KB cartridge | |
|
||||
| 36 | 800/XL/XE | 256 | Switchable XEGS 256 KB cartridge | |
|
||||
| 37 | 800/XL/XE | 512 | Switchable XEGS 512 KB cartridge | |
|
||||
| 38 | 800/XL/XE | 1024 | Switchable XEGS 1 MB cartridge | |
|
||||
| 39 | 800/XL/XE | 8 | Phoenix 8 KB cartridge | |
|
||||
| 40 | 800/XL/XE | 16 | Blizzard 16 KB cartridge | |
|
||||
| 41 | 800/XL/XE | 128 | Atarimax 128 KB Flash cartridge | p |
|
||||
| 42 | 800/XL/XE | 1024 | Atarimax 1 MB Flash cartridge | p |
|
||||
| 43 | 800/XL/XE | 128 | SpartaDOS X 128 KB cartridge | |
|
||||
| 44 | 800/XL/XE | 8 | OSS 8 KB cartridge | |
|
||||
| 45 | 800/XL/XE | 16 | OSS two chip 16 KB cartridge (043M) | |
|
||||
| 46 | 800/XL/XE | 4 | Blizzard 4 KB cartridge | |
|
||||
| 47 | 800/XL/XE | 32 | AST 32 KB cartridge | |
|
||||
| 48 | 800/XL/XE | 64 | Atrax SDX 64 KB cartridge | |
|
||||
| 49 | 800/XL/XE | 128 | Atrax SDX 128 KB cartridge | |
|
||||
| 50 | 800/XL/XE | 64 | Turbosoft 64 KB cartridge | |
|
||||
| 51 | 800/XL/XE | 128 | Turbosoft 128 KB cartridge | |
|
||||
| 52 | 800/XL/XE | 32 | Ultracart 32 KB cartridge | |
|
||||
| 53 | 800/XL/XE | 8 | Low bank 8 KB cartridge | |
|
||||
| 54 | 800/XL/XE | 128 | SIC! 128 KB cartridge | p |
|
||||
| 55 | 800/XL/XE | 256 | SIC! 256 KB cartridge | p |
|
||||
| 56 | 800/XL/XE | 512 | SIC! 512 KB cartridge | p |
|
||||
| 57 | 800/XL/XE | 2 | Standard 2 KB cartridge | |
|
||||
| 58 | 800/XL/XE | 4 | Standard 4 KB cartridge | |
|
||||
| 59 | 800 | 4 | Right slot 4 KB cartridge | |
|
||||
| 60 | 800/XL/XE | 32 | Blizzard 32 KB cartridge | |
|
||||
| 61 | 800/XL/XE | 2048 | MegaMax 2 MB cartridge | |
|
||||
| 62 | 800/XL/XE | 128M | The!Cart 128 MB cartridge | p |
|
||||
| 63 | 800/XL/XE | 4096 | Flash MegaCart 4 MB cartridge | p |
|
||||
| 64 | 800/XL/XE | 2048 | MegaCart 2 MB cartridge | |
|
||||
| 65 | 800/XL/XE | 32M | The!Cart 32 MB cartridge | p |
|
||||
| 66 | 800/XL/XE | 64M | The!Cart 64 MB cartridge | p |
|
||||
| 67 | 800/XL/XE | 64 | XEGS 64 KB cartridge (banks 8-15) | |
|
||||
+----+-----------+------+-----------------------------------------------+---+
|
||||
|
||||
Id is the cartridge type code stored in the CART file.
|
||||
|
||||
Machine indicates if the cartridge is for Atari 8-bit Home Computers
|
||||
(400/800 and XL/XE) or the Atari 5200 Game System.
|
||||
|
||||
Size is length of image in kilobytes, unless the value ends with "M", which
|
||||
means it is in megabytes.
|
||||
|
||||
E (for Emulation) describes state of emulation support of the cartridge in
|
||||
Atari800. "p" means the cartridge is emulated partially (some features
|
||||
missing), no value means emulation of all features.
|
||||
|
||||
Below are descriptions of all types. For bank-switched cartridges banks
|
||||
are numbered in the order they appear in the image file, starting with 0.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 1: Standard 8 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Standard 8 KB cartridge, that occupies 8 KB of address space between $A000
|
||||
and $BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 2: Standard 16 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Standard 16 KB cartridge, that occupies 16 KB of address space between
|
||||
$8000 and $BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 3: OSS two chip 16 KB cartridge (034M) |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
NOTE: This cartridge image format has been obsoleted by Type 45 because its
|
||||
order of banks is incorrect (i.e. the order in a physical cartridge's ROM
|
||||
chips is different). This format is still supported by the CART file format
|
||||
for backward compatibility.
|
||||
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF. Its
|
||||
memory is divided into 4 banks, 4 KB each. Bank number 3 (the last one) is
|
||||
always mapped to $B000-$BFFF. Bank in $A000-$AFFF is selected by an access to
|
||||
$D500-$D5FF. Only 4 lowest bits of address are significant:
|
||||
- $D5x0 selects bank 0.
|
||||
- $D5x1 is not useful - it selects banks 0 and 1 (the bytes are binary AND of
|
||||
the corresponding bytes from banks 0 and 1).
|
||||
- $D5x3 or $D5x7 selects bank 1.
|
||||
- $D5x4 selects bank 2.
|
||||
- $D5x5 is not useful - it selects banks 1 and 2 (the bytes are binary AND of
|
||||
the corresponding bytes from banks 1 and 2).
|
||||
- $D5x2 or $D5x6 is not useful. It disables ROM (there are $FF bytes in
|
||||
$A000-$AFFF).
|
||||
- $D5x8-$D5xF disables whole cartridge (enables computer's memory in address
|
||||
space between $A000 and $BFFF).
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 4: Standard 32 KB 5200 cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Standard 32 KB cartridge for Atari 5200, that occupies 32 KB of address
|
||||
space between $4000 and $BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 5: DB 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 32 KB bank-switched cartridge. There are 4 banks. Bank 3 is mapped to
|
||||
$A000-$BFFF. Bank in $8000-$9FFF is selected by an access to $D500-$D5FF.
|
||||
Two lowest bits of address select bank 0, 1, 2 or 3.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 6: Two chip 16 KB 5200 cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
In Atari 5200 there's 32 KB of address space reserved for the cartridge
|
||||
($4000-$BFFF). A two chip 16 KB cartridge is mapped that way:
|
||||
- First 8 KB are mapped into lower 16 KB. Since an address line is not
|
||||
connected, $4000-$5FFF and $6000-$7FFF contain same data, which is first
|
||||
half of the cartridge image.
|
||||
- Similarly, second 8 KB are mapped into upper 16 KB.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 7: Bounty Bob Strikes Back 40 KB 5200 cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge with "Bounty Bob Strikes Back" game uses very strange
|
||||
bank switching method:
|
||||
- Four 4 KB banks (0,1,2,3) are mapped into $4000-$4FFF. An access to $4FF6
|
||||
selects bank 0, $4FF7 - bank 1, $4FF8 - bank 2, $4FF9 - bank 3.
|
||||
- Four 4 KB banks (4,5,6,7) are mapped into $5000-$5FFF. An access to $5FF6
|
||||
selects bank 4, $5FF7 - bank 5, $5FF8 - bank 6, $5FF9 - bank 7.
|
||||
- The remaining 8 KB is mapped to upper 16 KB of cartridge address space
|
||||
in Atari 5200. That is, $8000-$9FFF and $A000-$BFFF contain same data.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 8: 64 KB Williams cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge has 8 banks mapped to $A000-$BFFF. An access to $D500 selects
|
||||
bank 0, $D501 - bank 1, etc. An access to $D508-$D50F disables
|
||||
the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 9: Express 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge has 8 banks mapped to $A000-$BFFF. An access to $D577 selects
|
||||
bank 0, $D576 - bank 1, etc. An access to $D578-$D57F disables
|
||||
the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 10: Diamond 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge has 8 banks mapped to $A000-$BFFF. An access to $D5D7 selects
|
||||
bank 0, $D5D6 - bank 1, etc. An access to $D5D8-$D5DF disables
|
||||
the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 11: SpartaDOS X 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge has 8 banks mapped to $A000-$BFFF. It also contains an
|
||||
additional cartridge slot which allows to plug a second cartridge in.
|
||||
An access to $D5E7 selects bank 0, $D5E6 - bank 1, etc. down to $D5E0. An
|
||||
access to $D5E8-$D5EB disables the SDX cartridge and enables the second
|
||||
cartridge. An access to $D5EC-$D5EF disables both cartridges.
|
||||
Accesses to all addresses on page D5 always reaches the second cartridge,
|
||||
even if it is disabled by SpartaDOS or if the SpartaDOS cartridge itself is
|
||||
enabled.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 12: XEGS 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 4 banks, 8 KB each.
|
||||
Bank 3 (the last one) is always mapped to $A000-$BFFF. Two lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
The initially selected bank is random, although it seems that 0 gets chosen
|
||||
the most often. Atari800 always selects bank 0 initially.
|
||||
|
||||
Reference:
|
||||
http://www.atarimax.com/jindroush.atari.org/acarts.html#xegs
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 13: XEGS 64 KB cartridge (banks 0-7) |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
One of the two variants of the 64 KB XEGS cartridge, that's built on either
|
||||
a C100649 board with the W1 solder point not connected, or a C026449 board
|
||||
with pin 9 of the 74LS374 chip unconnected.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 8 banks, 8 KB each.
|
||||
Bank 7 (the last one) is always mapped to $A000-$BFFF. Three lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
The initially selected bank is random, although it seems that 0 gets chosen
|
||||
the most often. Atari800 always selects bank 0 initially.
|
||||
|
||||
Reference:
|
||||
http://www.atarimax.com/jindroush.atari.org/acarts.html#xegs
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 14: XEGS 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Built on either a C100649 board with the W1 solder point connected, or a
|
||||
C026449 board.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 16 banks, 8 KB each.
|
||||
Bank 15 (the last one) is always mapped to $A000-$BFFF. Four lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
The initially selected bank is random, although it seems that 0 gets chosen
|
||||
the most often. Atari800 always selects bank 0 initially.
|
||||
|
||||
Reference:
|
||||
http://www.atarimax.com/jindroush.atari.org/acarts.html#xegs
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 15: OSS one chip 16 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
There are two types of OSS 16KB cartridges; this is the later, simpler one.
|
||||
Used by BASIC XL 1.03, Action! 3.6, MAC/65 1.1 and BASIC XE 4.1 (and possibly
|
||||
also by later versions of the above software).
|
||||
It consists of one 16 KB ROM chip.
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF. Its
|
||||
memory is divided into 4 banks, 4 KB each. Bank number 0 (the first one) is
|
||||
always mapped to $B000-$BFFF. Bank in $A000-$AFFF is selected by an access to
|
||||
$D500-$D5FF. Only bits 0 and 3 of address are significant:
|
||||
- A3=0, A0=0 - selects bank 1
|
||||
- A3=0, A0=1 - selects bank 3
|
||||
- A3=1, A0=0 - disables cartridge (enables computer's memory in address space
|
||||
between $A000 and $BFFF)
|
||||
- A3=1, A0=1 - selects bank 2
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 16: One chip 16 KB 5200 cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
16 KB cartridge for Atari 5200, that occupies 16 KB of address space
|
||||
between $8000 and $BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 17: Atrax 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 16 banks, 8 KB each.
|
||||
If a byte written to $D500-$D5FF has highest bit set, the cartridge is
|
||||
disabled. Otherwise four lowest bits select the bank mapped to $A000-$BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 18: Bounty Bob Strikes Back 40 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge with "Bounty Bob Strikes Back" game uses very strange
|
||||
bank switching method:
|
||||
- Four 4 KB banks (0,1,2,3) are mapped into $8000-$8FFF. An access to $8FF6
|
||||
selects bank 0, $8FF7 - bank 1, $8FF8 - bank 2, $8FF9 - bank 3.
|
||||
- Four 4 KB banks (4,5,6,7) are mapped into $9000-$9FFF. An access to $9FF6
|
||||
selects bank 4, $9FF7 - bank 5, $9FF8 - bank 6, $9FF9 - bank 7.
|
||||
- The remaining 8 KB is mapped to $A000-$BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 19: Standard 8 KB 5200 cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Standard 8 KB cartridge for Atari 5200, mapped into $8000-$9FFF
|
||||
and $A000-$BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 20: Standard 4 KB 5200 cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Standard 4 KB cartridge for Atari 5200, mapped into $8000-$8FFF,
|
||||
$9000-$9FFF, $A000-$AFFF and $B000-$BFFF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 21: Right slot 8 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
8 KB cartridge for Atari 800, mapped into $8000-$9FFF. Atari 800 was
|
||||
the only 8-bit Atari with a Right Cartridge slot, in addition
|
||||
to the Left Cartridge slot as present on all 8-bit Ataris.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 22: 32 KB Williams cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge has 4 banks mapped to $A000-$BFFF. An access to $D500 selects
|
||||
bank 0, $D501 - bank 1, etc. An access to $D508-$D50F disables
|
||||
the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 23: XEGS 256 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 32 banks, 8 KB each.
|
||||
The last bank is always mapped to $A000-BFFF. Five lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 24: XEGS 512 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 64 banks, 8 KB each.
|
||||
The last bank is always mapped to $A000-$BFFF. Six lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 25: XEGS 1 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 128 banks, 8 KB each.
|
||||
The last bank is always mapped to $A000-$BFFF. Seven lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 26: MegaCart 16 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 16 KB cartridge, that occupies 16 KB of address space between $8000
|
||||
and $BFFF, and can be disabled by writing a byte with bit 7 set to
|
||||
$D500-$D5FF.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 27: MegaCart 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bit 0
|
||||
selects one of two available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 28: MegaCart 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bits 0-1
|
||||
select one of four available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 29: MegaCart 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bits 0-2
|
||||
select one of 8 available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 30: MegaCart 256 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bits 0-3
|
||||
select one of 16 available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 31: MegaCart 512 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bits 0-4
|
||||
select one of 32 available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 32: MegaCart 1 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bits 0-5
|
||||
select one of 64 available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 33: Switchable XEGS 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 4 banks, 8 KB each.
|
||||
Bank 3 (the last one) is always mapped to $A000-$BFFF. Two lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF,
|
||||
bit 7 disables the cartridge.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 34: Switchable XEGS 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 8 banks, 8 KB each.
|
||||
Bank 7 (the last one) is always mapped to $A000-$BFFF. Three lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF,
|
||||
bit 7 disables the cartridge.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 35: Switchable XEGS 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 16 banks, 8 KB each.
|
||||
Bank 15 (the last one) is always mapped to $A000-$BFFF. Four lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF,
|
||||
bit 7 disables the cartridge.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 36: Switchable XEGS 256 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 32 banks, 8 KB each.
|
||||
The last bank is always mapped to $A000-$BFFF. Five lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF,
|
||||
bit 7 disables the cartridge.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 37: Switchable XEGS 512 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 64 banks, 8 KB each.
|
||||
The last bank is always mapped to $A000-$BFFF. Six lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF,
|
||||
bit 7 disables the cartridge.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 38: Switchable XEGS 1 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
An extension to the standard XEGS cartridge, apparently sold by Nir Dary
|
||||
in the 1990s/2000s.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 128 banks, 8 KB each.
|
||||
The last bank is always mapped to $A000-$BFFF. Seven lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF,
|
||||
bit 7 disables the cartridge.
|
||||
The initially selected bank is currently not known, although it's probable
|
||||
that it's the same as in standard XEGS cartridges, ie. random. Atari800
|
||||
always selects bank 0 initially.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 39: Phoenix 8 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 8 KB cartridge, that occupies 8 KB of address space between $A000
|
||||
and $BFFF. It starts in enabled state and can be disabled by an access to
|
||||
$D500-$D5FF. Re-enabling is possible only by turning the computer off and on.
|
||||
Some units contain a RESET button that allows to enable the cartridge without
|
||||
touching the power button.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 40: Blizzard 16 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 16 KB cartridge, that occupies 16 KB of address space between $8000
|
||||
and $BFFF. It starts in enabled state and can be disabled by an access to
|
||||
$D500-$D5FF. Re-enabling is possible only by turning the computer off and on.
|
||||
Some units contain a RESET button that allows to enable the cartridge without
|
||||
touching the power button.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 41: Atarimax 128 KB Flash cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 16 banks, 8 KB each.
|
||||
The 4 lowest bits of the address written to $D500-$D50F select the bank
|
||||
mapped to $A000-$BFFF. Writing to $D510-$D51F disables the cartridge
|
||||
and any write to $D520-$D5FF is ignored.
|
||||
|
||||
The cartridge also supports programming of the Flash ROM - this feature is
|
||||
currently not emulated.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 42: Atarimax 1 MB Flash cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 128 banks, 8 KB each.
|
||||
The seven lowest bits of the address written to $D500-$D57F select the bank
|
||||
mapped to $A000-$BFFF, bit 7 disables the cartridge.
|
||||
|
||||
The cartridge also supports programming of the Flash ROM - this feature is
|
||||
currently not emulated.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 43: SpartaDOS X 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
The cartridge has 16 banks mapped to $A000-$BFFF. It also contains an
|
||||
additional cartridge slot which allows to plug a second cartridge in. First
|
||||
8 banks are selected by an access to $D5F7-$D5F0, the other 8 banks by an
|
||||
access to $D5E7-$D5E0. An access to $D5E8-$D5EB or $D5F8-$D5FB disables the
|
||||
SDX cartridge and enables the second cartridge. An access to $D5EC-$D5EF or
|
||||
$D5FC-$D5FF disables both cartriges.
|
||||
Accesses to all addresses on page D5 always reaches the second cartridge,
|
||||
even if it is disabled by SpartaDOS or if the SpartaDOS cartridge itself is
|
||||
enabled.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 44: OSS 8 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Used in The Writer's Tool cartridge, it is actually an OSS one chip cartridge
|
||||
board (see Type 15) with an 8 KB ROM chip instead of a normal 16 KB one.
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF. Its
|
||||
memory is divided into 2 banks, 4 KB each. Bank number 0 (the first one) is
|
||||
always mapped to $B000-$BFFF. Bank in $A000-$AFFF is selected by an access to
|
||||
$D500-$D5FF. Only bits 0 and 3 of address are significant:
|
||||
- A3=0, A0=0 or 1 - selects bank 1
|
||||
- A3=1, A0=0 - disables cartridge (enables computer's memory in address space
|
||||
between $A000 and $BFFF)
|
||||
- A3=1, A0=1 - selects bank 0
|
||||
|
||||
Reference: http://www.retrobits.net/atari/osshack.shtml
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 45: OSS two chip 16 KB cartridge (043M) |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
There are two types of OSS 16KB cartridges; this is the earlier, more
|
||||
complicated one. Used by BASIC XL 1.02 and earlier, Action! 3.5 and earlier,
|
||||
and MAC/65 1.0. It consists of two 8 KB ROM chips.
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF. Its
|
||||
memory is divided into 4 banks, 4 KB each. Bank number 3 (the last one) is
|
||||
always mapped to $B000-$BFFF. Bank in $A000-$AFFF is selected by an access to
|
||||
$D500-$D5FF. Only 4 lowest bits of address are significant:
|
||||
- $D5x0 selects bank 0.
|
||||
- $D5x1 is not useful - it selects banks 0 and 2 (the bytes are binary AND of
|
||||
the corresponding bytes from banks 0 and 2).
|
||||
- $D5x3 or $D5x7 selects bank 2.
|
||||
- $D5x4 selects bank 1.
|
||||
- $D5x5 is not useful - it selects banks 1 and 2 (the bytes are binary AND of
|
||||
the corresponding bytes from banks 1 and 2).
|
||||
- $D5x2 or $D5x6 is not useful. It disables ROM (there are $FF bytes in
|
||||
$A000-$AFFF).
|
||||
- $D5x8-$D5xF disables whole cartridge (enables computer's memory in address
|
||||
space between $A000 and $BFFF).
|
||||
|
||||
Reference: http://www.retrobits.net/atari/osscarts.shtml
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 46: Blizzard 4 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 4 KB cartridge, that occupies 8 KB of address space between $A000
|
||||
and $BFFF. Line A12 is unconnected, so the cartridge's memory is duplicated
|
||||
in $A000-$AFFF and $B000-$BFFF. The cartridge starts in enabled state and can
|
||||
be disabled by an access to $D500-$D5FF. Re-enabling is possible only by
|
||||
turning the computer off and on. Some units contain a RESET button that
|
||||
allows to enable the cartridge without touching the power button.
|
||||
|
||||
Reference: http://www.serious-dial.atari.pl/Serious/S13/A18.html
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 47: AST 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This cartridge occupies 8 KB of address space between $A000 and $BFFF. The
|
||||
cartridge memory is divided into 128 banks, 256 B each. On power on, bank 0
|
||||
is visible in $A000-$BFFF (repeated 32 times) and also in $D500-$D5FF. A
|
||||
write operation to $D500-$D5FF disables the cartridge (freeing the
|
||||
$A000-$BFFF area) and selects the next 256-byte bank visible at $D500-$D5FF.
|
||||
After bank 31 the write operation selects bank 0 again.
|
||||
|
||||
Reference: http://www.atari.org.pl/forum/viewtopic.php?pid=134014#p134014
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 48: Atrax SDX 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A variant of Type 11: SpartaDOS X 64 KB cartridge. The banking scheme is
|
||||
identical, but the address and data lines between the cartridge port and the
|
||||
ROM chip are interleaved as follows:
|
||||
(Left - cartridge port + bank select lines, right - EPROM pins)
|
||||
A0 - A6
|
||||
A1 - A7
|
||||
A2 - A12
|
||||
A3 - A15
|
||||
A4 - A14
|
||||
A5 - A13
|
||||
A6 - A8
|
||||
A7 - A5
|
||||
A8 - A4
|
||||
A9 - A3
|
||||
A10 - A0
|
||||
A11 - A1
|
||||
A12 - A2
|
||||
A13 - A9 \
|
||||
A14 - A11 > bank select
|
||||
A15 - A10 /
|
||||
D0 - Q4
|
||||
D1 - Q0
|
||||
D2 - Q5
|
||||
D3 - Q1
|
||||
D4 - Q7
|
||||
D5 - Q6
|
||||
D6 - Q3
|
||||
D7 - Q2
|
||||
By deinterleaving a ROM image, one would get a normal image of type 11.
|
||||
See Type 11 for details on the banking scheme.
|
||||
|
||||
Reference: http://www.dereatari.republika.pl/atarisch/sparta.zip
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 49: Atrax SDX 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A variant of Type 43: SpartaDOS X 128 KB cartridge. The banking scheme is
|
||||
identical, but the address and data lines between the cartridge port and the
|
||||
ROM chip are interleaved. The interleaving is similar to that of Type 48,
|
||||
but with added A16 line, so it looks as follows:
|
||||
(Left - cartridge port + bank select lines, right - EPROM pins)
|
||||
A0 - A6
|
||||
A1 - A7
|
||||
A2 - A12
|
||||
A3 - A15
|
||||
A4 - A14
|
||||
A5 - A13
|
||||
A6 - A8
|
||||
A7 - A5
|
||||
A8 - A4
|
||||
A9 - A3
|
||||
A10 - A0
|
||||
A11 - A1
|
||||
A12 - A2
|
||||
A13 - A9 \
|
||||
A14 - A11 > bank select
|
||||
A15 - A10 /
|
||||
A16 - A16 /
|
||||
D0 - Q4
|
||||
D1 - Q0
|
||||
D2 - Q5
|
||||
D3 - Q1
|
||||
D4 - Q7
|
||||
D5 - Q6
|
||||
D6 - Q3
|
||||
D7 - Q2
|
||||
By deinterleaving a ROM image, one would get a normal image of type 43.
|
||||
See Type 43 for details on the banking scheme.
|
||||
|
||||
Reference: http://www.dereatari.republika.pl/atarisch/sparta.zip
|
||||
http://trub.atari8.info/index.php?ref=atrax_128
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 50: Turbosoft 64 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 8 banks, 8 KB each. Banks
|
||||
are selected by an access to an address at $D500-$D5FF. Bits 0-2 of the
|
||||
address select the bank mapped to $A000-$BFFF. Bit 4 disables the cartridge
|
||||
and enables RAM. Bits 3 and 5-7 are ignored. The cartridge starts with bank 0
|
||||
enabled.
|
||||
|
||||
Reference: http://www.retrogames.cl/turbosoft.html
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 51: Turbosoft 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 16 banks, 8 KB each. Banks
|
||||
are selected by an access to an address at $D500-D5FF. Bits 0-3 of the
|
||||
address select the bank mapped to $A000-$BFFF. Bit 4 disables the cartridge
|
||||
and enables RAM. Bits 5-7 are ignored. The cartridge starts with bank 0
|
||||
enabled.
|
||||
|
||||
Reference: http://www.retrogames.cl/turbosoft.html
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 52: Ultracart 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 4 banks, 8 KB each. On power
|
||||
on, bank 0 is visible. Each access to $D500-$D5FF switches another bank in
|
||||
the sequence as follows: 0->1->2->3->cartridge disabled->0 etc.
|
||||
|
||||
Reference: Altirra source code, ver. 2.10-test20
|
||||
http://www.atarimania.com/utility-atari-400-800-xl-xe-microcalc_28241.html
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 53: Low bank 8 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This cartridge, destined for the left cartridge slot, occupies 8 KB of
|
||||
address space between $8000 and $9FFF. It achieves that by asserting the RD4
|
||||
line and not asserting the RD5 line.
|
||||
|
||||
Reference: http://www.atariage.com/forums/topic/161828-hooked-on-8-bit-carts/page__view__findpost__p__2338297
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 54: SIC! 128 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Cartridge memory is divided into 8 banks, each 16KB long and consisting of
|
||||
two 8KB subbanks. Each subbank can be mapped to Atari memory or switched
|
||||
off. The lower subbank always maps to $8000-$9FFF, while the upper one always
|
||||
maps to $A000-$BFFF.
|
||||
Control register address is $D500-$D51F mirrored, read/write (written value
|
||||
can be read at any time).
|
||||
Bit 7 = 0 - flash write-protection is on
|
||||
Bit 6 = 0 - odd 8k block (upper subbank) present in $A000-$BFFF
|
||||
Bit 5 = 0 - even 8k block (lower subbank) not present in $8000-$9FFF
|
||||
Bits 4..3 - unused
|
||||
Bits 2..0 - 16KB bank number (0..7)
|
||||
Default value = 0 which means 0 bank upper subbank in address $A000-$BFFF
|
||||
To switch cart off - poke $40 info $D500-$D51F
|
||||
The cartridge also supports programming of the Flash ROM - this feature is
|
||||
currently not emulated.
|
||||
|
||||
Reference: http://sic.pigwa.net/files/specyfikacja_pl_eng.zip
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 55: SIC! 256 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Same as Type 54, but with cartridge memory being divided into 16 banks.
|
||||
Bit 4 is unused
|
||||
Bits 3..0 - 16KB bank number (0..15)
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 56: SIC! 512 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Same as Type 54, but with cartridge memory being divided into 32 banks.
|
||||
Bits 4..0 - 16KB bank number (0..31)
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 57: Standard 2 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 2 KB cartridge, that occupies 8 KB of address space between $A000 and
|
||||
$BFFF. The ROM chip is active only when lines A11 and A12 are high. In
|
||||
effect, the cartridge's memory appears at $B800-$BFFF while the $A000-B7FF
|
||||
area is unavailable and returns $FF when read.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 58: Standard 4 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 4 KB cartridge, that occupies 8 KB of address space between $A000 and
|
||||
$BFFF. The ROM chip is active only when line A12 is high. In effect, the
|
||||
cartridge's memory appears at $B000-$BFFF while the $A000-AFFF area is
|
||||
unavailable and returns $FF when read.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 59: Right slot 4 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A 4 KB cartridge for Atari 800, mapped into $8000-$9FFF. The ROM chip is
|
||||
active only when line A12 is high. In effect, the cartridge's memory appears
|
||||
at $9000-$9FFF while the $8000-8FFF area is unavailable and returns $FF when
|
||||
read.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 60: Blizzard 32 KB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
This bank-switched cartridge occupies 8 KB of address space between $A000
|
||||
and $BFFF. The cartridge memory is divided into 4 banks, 8 KB each. On power
|
||||
on, bank 0 is visible. Each access to $D500-$D5FF switches another bank in
|
||||
the sequence as follows: 0->1->2->3->cartridge disabled. Re-enabling is
|
||||
possible only by turning the computer off and on. Some units contain a RESET
|
||||
button that allows to enable the cartridge without touching the power button.
|
||||
|
||||
Reference:
|
||||
http://www.atari.org.pl/forum/viewtopic.php?id=7292
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 61: MegaMax 2 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A variant of the MegaMax cartridge with 2MB ROM. The cartridge has a switch
|
||||
to toggle between the 1 MB Atarimax-compatible mode and the 2MB mode;
|
||||
this type describes the latter one.
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by access to an address at $D500-$D5FF.
|
||||
Bits 0-6 of the address select one of 128 available banks, bit 7 disables the
|
||||
cartridge. The cartridge starts with bank 0 enabled.
|
||||
|
||||
Reference:
|
||||
http://www.mega-hz.de/Angebote/MEGAMAX/en/MegaMAX%20Cart%20en%20V1.htm
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 62: The!Cart 128 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Only a small subset, as described below, of this cartridge's features is
|
||||
currently emulated.
|
||||
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF, and
|
||||
consists of 16384 banks. Byte written to $D5A2 turns the cartridge on/off:
|
||||
bit 0 = 1 enables the cartridge, 0 disables it and enables RAM. The enabled
|
||||
bank is controlled by bytes written to $D5A0 (LSB) and $D5A1 (MSB, only 6
|
||||
lowest bytes matter). Any write do $D5A0-$D5A1 also automatically enables the
|
||||
cartridge.
|
||||
|
||||
The cartridge starts with bank 0 enabled.
|
||||
|
||||
The $D5A0-$D5A2 registers are read/write; one can read the cartridge's current
|
||||
state from them. Unused bits are always read as 0.
|
||||
|
||||
Reference:
|
||||
http://www.mega-hz.de/Angebote/THE!CART/THE!CART_EN.htm
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 63: Flash MegaCart 4 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D51F. Values
|
||||
0-254 select one of the first 255 banks, and the value 255 disables the
|
||||
cartridge. Bank 255 is not available. The cartridge starts with bank 254
|
||||
enabled.
|
||||
|
||||
A read from $D500-$D51F returns the last value written (initially 254).
|
||||
|
||||
The cartridge also has ROM flashing functionality, which is currently not
|
||||
emulated.
|
||||
|
||||
Reference:
|
||||
http://herale.org/4MB_FLASH_MEGACART
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 64: MegaCart 2 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
A bank-switched cartridge that occupies 16 KB of address space between
|
||||
$8000 and $BFFF. It is controlled by a byte written to $D500-$D5FF. Bits 0-6
|
||||
select one of 128 available banks, bit 7 disables the cartridge.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 65: The!Cart 32 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Only a small subset, as described below, of this cartridge's features is
|
||||
currently emulated.
|
||||
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF, and
|
||||
consists of 4096 banks. Byte written to $D5A2 turns the cartridge on/off:
|
||||
bit 0 = 1 enables the cartridge, 0 disables it and enables RAM. The enabled
|
||||
bank is controlled by bytes written to $D5A0 (LSB) and $D5A1 (MSB, only 6
|
||||
lowest bytes are stored in the internal register, and only 4 lowest bytes
|
||||
matter in choosing the enabled bank). Any write do $D5A0-$D5A1 also
|
||||
automatically enables the cartridge.
|
||||
|
||||
The cartridge starts with bank 0 enabled.
|
||||
|
||||
The $D5A0-$D5A2 registers are read/write; one can read the cartridge's current
|
||||
state from them. Unused bits are always read as 0.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 66: The!Cart 64 MB cartridge |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
Only a small subset, as described below, of this cartridge's features is
|
||||
currently emulated.
|
||||
|
||||
The cartridge occupies 8 KB of address space between $A000 and $BFFF, and
|
||||
consists of 8192 banks. Byte written to $D5A2 turns the cartridge on/off:
|
||||
bit 0 = 1 enables the cartridge, 0 disables it and enables RAM. The enabled
|
||||
bank is controlled by bytes written to $D5A0 (LSB) and $D5A1 (MSB, only 6
|
||||
lowest bytes are stored in the internal register, and only 5 lowest bytes
|
||||
matter in choosing the enabled bank). Any write do $D5A0-$D5A1 also
|
||||
automatically enables the cartridge.
|
||||
|
||||
The cartridge starts with bank 0 enabled.
|
||||
|
||||
The $D5A0-$D5A2 registers are read/write; one can read the cartridge's current
|
||||
state from them. Unused bits are always read as 0.
|
||||
|
||||
+---------------------------------------------------------------------------+
|
||||
| Type 67: XEGS 64 KB cartridge (banks 8-15) |
|
||||
+---------------------------------------------------------------------------+
|
||||
|
||||
One of the two variants of the 64 KB XEGS cartridge, built on a C026449 board
|
||||
with all pins of the 74LS374 chip connected. All software designed for this
|
||||
cartridge type also works with the other variant; see Type 13.
|
||||
This bank-switched cartridge occupies 16 KB of address space between $8000
|
||||
and $BFFF. The cartridge memory is divided into 8 banks, 8 KB each.
|
||||
Bank 7 (the last one) is always mapped to $A000-$BFFF. Four lowest bits of
|
||||
a byte written to $D500-$D5FF select the bank mapped to $8000-$9FFF.
|
||||
Unsetting bit 3 unmaps the $8000-$9FFFF area and leaves it unconnected
|
||||
(floating or all $FFs); otherwise a bank selected by the three lowest bits is
|
||||
mapped.
|
||||
The initially selected bank is random, although it seems that the value of 0
|
||||
(ie. no bank mapped) gets chosen the most often. Atari800 always selects 0
|
||||
initially.
|
||||
|
||||
Reference:
|
||||
http://www.atarimax.com/jindroush.atari.org/acarts.html#xegs
|
||||
@@ -0,0 +1,229 @@
|
||||
This file documents new options that I have personally
|
||||
added to the Windows DX port of the emulator since 2.1.
|
||||
The major goal of these enhancements is to allow the
|
||||
emulator to perform better on modern display and game
|
||||
controller technology, including widescreen monitors,
|
||||
TVs, gamepads, and HTPC/kiosk setups. A secondary
|
||||
goal is to make usability improvements to the emulator
|
||||
shell including main menu and internal mouse support.
|
||||
|
||||
|
||||
Windows DX: Windows Display Options
|
||||
===================================
|
||||
Note: Defaults are shown in [brackets].
|
||||
Note: All settings (except -console) can be saved in the UI.
|
||||
|
||||
Display Rendering
|
||||
-----------------
|
||||
[GDI] Software pixel scaling. Fast.
|
||||
GDI+ Software pixel scaling. Moderate.
|
||||
GDI+/Bilinear Software bilinear scaling. Slow.
|
||||
GDI+/Bilinear (HQ) Software HQ bilinear scaling. Very slow.
|
||||
GDI+/Bicubic (HQ) Software HQ bicubic scaling. Slow
|
||||
Direct3D Hardware pixel scaling. Fast.
|
||||
Direct3D/Bilinear Hardware bilinear scaling. Fast.
|
||||
|
||||
Note: Emulator must be restarted to activate a rendering
|
||||
mode change.
|
||||
|
||||
Hint: For softer pixels and resolution-independent aliasing
|
||||
control, choose Direct3D/Bilinear mode.
|
||||
|
||||
Fullscreen Resolution
|
||||
---------------------
|
||||
[Desktop] Use the current desktop resolution.
|
||||
VGA 640x480. 2x native pixel resolution.
|
||||
SXGA 1280x960. 4x native pixel resolution.
|
||||
UXGA 1600x1200. 5x native pixel resolution.
|
||||
|
||||
Hint: Use -fsres command line to use a custom resolution that
|
||||
does not appear in this list.
|
||||
|
||||
Scaling Method
|
||||
--------------
|
||||
Off Stretch unconstrained to window boundary
|
||||
[Normal] Scale dynamically while enforcing aspect.
|
||||
Simple Scale to exact multiple of native screen.
|
||||
Adaptive Compensate for widescreen stretching.
|
||||
|
||||
Note: Adaptive mode is "experimental" and not fully compatible
|
||||
with all combinations of settings.
|
||||
|
||||
Aspect Mode
|
||||
-----------
|
||||
[Auto] 7:5 or 4:3 crop depending on screen metrics.
|
||||
Wide Display 336x240 pixel matrix in 7:5 aspect.
|
||||
Cropped Display 320x240 pixel matrix in 4:3 aspect.
|
||||
Compressed Display 336x240 pixel matrix in 4:3 aspect.
|
||||
|
||||
Note: Scaling method must be set to "Normal" or "Simple" for these
|
||||
settings to be effective.
|
||||
|
||||
|
||||
Custom Crop Options
|
||||
-------------------
|
||||
Horizontal crop Symmetrically crop width by # of pixels. [0]
|
||||
Vertical crop Symmetrically crop height by # of pixels. [0]
|
||||
Lock aspect mode Force current aspect mode ratio on crop.[No]
|
||||
|
||||
Hint: Cropping can be used to effectively zoom or stretch. To zoom
|
||||
without distortion while using a 4:3 resolution in fullscreen,
|
||||
set horizontal and vertical crop to equal values. To zoom
|
||||
when using a widescreen display and resolution in fullscreen,
|
||||
you typically only need to set a vertical crop value.
|
||||
|
||||
Note: Be aware that using vertical crop will clip the notification
|
||||
area of the screen sometimes used to display frame rates or
|
||||
disk activity.
|
||||
|
||||
|
||||
Other Settings
|
||||
--------------
|
||||
Screen mode Switch between Fullscreen and [Windowed] modes.
|
||||
Window scale Set size of window as percent of native. [200]
|
||||
Scanline mode Three resolutions of simulated scanlines. [Off]
|
||||
Horizontal offset Shift screen horizontally <-24..24>. [0]
|
||||
Vertical offset Shift screen vertically <-50..50>. [0]
|
||||
Always hide cursor Hide mouse cursor in fullscreen UI. [No]
|
||||
Show menu Show or hide the Windows main menu. [Yes]
|
||||
|
||||
|
||||
Windows DX: Display Settings
|
||||
============================
|
||||
|
||||
Color preset
|
||||
-------------------------
|
||||
[Standard] Standard color adjustments as seen on a real TV or
|
||||
monitor. Accurately represents full spectrum of colors.
|
||||
Deep black Adjusted to allow producing pure black color (unlike the
|
||||
Standard preset). May look more pleasant, although is
|
||||
less accurate when representing the darkest colors.
|
||||
Vibrant Arcade-like vibrant colors. Enhanced color saturation
|
||||
and black-level.
|
||||
|
||||
Hint: Changing video settings (i.e. brightness, contrast, etc.) from
|
||||
one of the base profile settings will cause the profile name
|
||||
to read "Custom".
|
||||
|
||||
|
||||
Windows DX: Controller Configuration
|
||||
====================================
|
||||
|
||||
Keyboard Joystick Modes
|
||||
-----------------------
|
||||
Keypad Keypad is joystick. 0 key is trigger.
|
||||
Keypad+ Keypad is joystick. 5=down. 0, left ctrl=trigger.
|
||||
[Arrows] Use cursor block as joystick. Left ctrl=trigger.
|
||||
|
||||
Alternate Joystick Modes
|
||||
------------------------
|
||||
[Normal] Normal joystick functions.
|
||||
Dual Double-map player 2 stick to Z/Z-Rotation axis.
|
||||
Shared Double-map player 2 stick to player 1 stick.
|
||||
|
||||
Hint: Use "Dual" on two-stick gamepads for two joystick games like
|
||||
Robotron and Space Dungeon. Use "Shared" to share a single
|
||||
joystick between two players on games that normally require
|
||||
two joysticks.
|
||||
|
||||
Custom Button Options
|
||||
---------------------
|
||||
Use "Enable custom buttons" to turn on custom joystickbutton feature.
|
||||
Use "Assign custom buttons" to assign keystrokes to joystick buttons.
|
||||
|
||||
The following buttons may be mapped.
|
||||
|
||||
* All numbers.
|
||||
* All alphabet keys in upper & lower case.
|
||||
* Atari Option, Select, and Start (press F2, F3, or F4).
|
||||
* Space
|
||||
* Return
|
||||
|
||||
|
||||
Windows DX Menu Operation
|
||||
=========================
|
||||
Configuration options may be accessed through either the
|
||||
main menu or by pressing F1. The main menu is only available
|
||||
when the emulator is run in a window.
|
||||
|
||||
Mouse Operations
|
||||
----------------
|
||||
Inside the configuration menus, mouse ops are as follows.
|
||||
|
||||
Click: Selects item
|
||||
Double click: Activates item (Enter)
|
||||
Right click: Back (Esc)
|
||||
Wheel up: Up
|
||||
Wheel down: Down
|
||||
Wheel left: Left
|
||||
Wheel right: Right
|
||||
|
||||
|
||||
Windows DX keyboard hot-keys
|
||||
============================
|
||||
Alt+Enter Toggles between windowed and fullscreen modes
|
||||
Alt+PageUp Increases the size of the window
|
||||
Alt+PageDown Decreases the size of the window
|
||||
Alt+I Advances to the next scanline (interleave) mode
|
||||
Alt+M Toggles Windows main menu on or off.
|
||||
Alt+Shift+Z 3D "tilt screen". (Direct3D modes only)
|
||||
Alt+Z 3D "screensaver". (Direct3D modes only)
|
||||
|
||||
Hint: Use of Alt-T & Alt-Z may require running the "DirectX 9 Updater"
|
||||
from microsoft.com. Google or Bing the quoted text to find it.
|
||||
|
||||
|
||||
Windows DX: Command Line Options
|
||||
================================
|
||||
-help Show all help options (including these)
|
||||
|
||||
-console Send debug output to a console instead of
|
||||
atari800.txt. Required for debug monitor.
|
||||
|
||||
-keyjoy <mode> Keyboard joystick mode.
|
||||
<keypad>, <keypadplus>, <arrow>
|
||||
-altjoy <mode> Alternate joystick mode.
|
||||
<normal>, <dual>, <shared>
|
||||
-mapjoy1buttons Use custom button mappings for joystick 1.
|
||||
-mapjoy2buttons Use custom button mappings for joystick 2.
|
||||
|
||||
-render <mode> Rendering engine to use.
|
||||
<ddraw>, <gdi>, <gdiplus>, <direct3d>
|
||||
-filter <mode> Scaling filter.
|
||||
<bilinear>, <bicubic>, <hqbilinear>, <hqbicubic>
|
||||
-scaling <mode> Scaling method.
|
||||
<off>, <normal>, <simple>, <adaptive>
|
||||
-aspect <mode> Aspect mode.
|
||||
<auto>, <wide>, <cropped>, <compressed>
|
||||
-winscale <scale> Window size as a percent of native Atari screen.
|
||||
<100>, <200>, <250>, etc.
|
||||
-fullscreen Force fullscreen mode at startup.
|
||||
-windowed Force windowed mode at startup.
|
||||
-fsres <dim> Custom fullscreen resolution. <widthxheight>
|
||||
i.e. <640x480>, <800x600>, <1024x768>, etc.
|
||||
-scanlines <mode> Scanline mode.
|
||||
<low>, <medium>, <high>
|
||||
-hcrop <amt> Crop the screen horizontally.
|
||||
<number of atari pixels>
|
||||
-vcrop <amt> Crop the screen vertically.
|
||||
<number of atari pixels>
|
||||
-crop <amt> Crop the screen horizonally & vertically.
|
||||
<number of atari pixels>
|
||||
-lockaspect Lock current aspect mode when trimming.
|
||||
-hoffset <amt> Shift screen horizontally.
|
||||
<number of atari pixels>
|
||||
-voffset <amt> Shift screen vertically.
|
||||
<number of atari pixels>
|
||||
-hidecursor Hide mouse cursor in fullscreen UI mode.
|
||||
-hidemenu Hide the Windows main menu.
|
||||
|
||||
-colors-preset Use one of predefined color adjustments.
|
||||
<standard>, <deep-black>, <vibrant>
|
||||
|
||||
-width Set display mode width (ddraw only).
|
||||
-blt Use blitting to draw graphics (ddraw only).
|
||||
|
||||
|
||||
|
||||
David Dahlstrom
|
||||
2010-04-29
|
||||
@@ -0,0 +1,7 @@
|
||||
Working program under emulated OS
|
||||
---------------------------------
|
||||
|
||||
1. Montezummas Revenge
|
||||
2. Defender
|
||||
3. Star Raider
|
||||
4. Fast Eddie
|
||||
@@ -0,0 +1,352 @@
|
||||
Atari POKEY Chip Emulator V2.3
|
||||
==============================
|
||||
by Ron Fries
|
||||
19 Jan 98
|
||||
|
||||
The PokeySound Chip Emulator is designed to emulate the functionality of the
|
||||
Atari POKEY Chip Hardware through 'C' Sourcecode. The emulator is able to
|
||||
produce sounds which are essentially identical to the original POKEY chip,
|
||||
including the exact distortions and pitches.
|
||||
|
||||
The emulator is designed to run in a 32-bit environment. Though it can be
|
||||
compiled and run in a 16-bit environment, it is slow.
|
||||
|
||||
I would like to give special thanks to Neil Bradley. He provided excellent
|
||||
testing support and was also the driving force behind the multiple POKEY
|
||||
emulation.
|
||||
|
||||
New Features:
|
||||
-------------
|
||||
|
||||
Version 2.3:
|
||||
|
||||
1) Added configurable support for signed/unsigned samples. Default is
|
||||
unsigned, define SIGNED_SAMPLES if necessary.
|
||||
|
||||
2) Included SBDRV1.2 which adds DJGPP support and corrects the AUTO-INIT
|
||||
detection problem.
|
||||
|
||||
|
||||
Version 2.2:
|
||||
|
||||
1) Changed to signed 8-bit samples.
|
||||
|
||||
2) Increased gain range by a factor of 16. Divide gain from previous version
|
||||
by sixteen to produce the same results.
|
||||
|
||||
3) Removed DOS dependent routines to provide cross-platform support.
|
||||
|
||||
4) Added conditional defines for TRUE and FALSE
|
||||
|
||||
5) Added support for big/little endian machines. Defaults to little endian.
|
||||
Define BIG_ENDIAN if necessary.
|
||||
|
||||
|
||||
Version 2.0:
|
||||
|
||||
1) Support for multiple POKEY chips. The maximum supported is configured
|
||||
at compile time.
|
||||
|
||||
2) An adjustable gain. The previous releases had a built-in gain of 64.
|
||||
|
||||
3) A clipping option. Depending on the number of chips emulated and the
|
||||
configured gain, it is possible for the output to exceed 8-bits.
|
||||
Clipping can be enabled to prevent this, though it does increase the
|
||||
processing time.
|
||||
|
||||
|
||||
Standard Features:
|
||||
------------------
|
||||
|
||||
The 'PokeySound' emulator supports the following functions:
|
||||
|
||||
1) All polynomial sound generators:
|
||||
a) 4-bit poly - actual bit pattern determined from sampled sound
|
||||
b) 5-bit poly - actual bit pattern determined from sampled sound
|
||||
c) 17-bit poly - simulated random bit pattern
|
||||
d) 9-bit poly - derived from simulated 17-bit poly
|
||||
|
||||
2) Full support of all 'Divide by N' counter clocks:
|
||||
a) 1.79 MHz (high limited to playback sample rate)
|
||||
b) 64 KHz (high limited to playback sample rate)
|
||||
c) 15 KHz
|
||||
|
||||
3) Full support of all 'Divide by N' resolutions:
|
||||
a) 8-bit - single channel
|
||||
b) 16-bit - double channel
|
||||
|
||||
4) Full support of all distortions
|
||||
a) 5-bit poly, then 17-bit poly
|
||||
b) 5-bit poly only
|
||||
c) 5-bit poly, then 4-bit poly
|
||||
d) 17-bit poly only
|
||||
e) no poly counters (pure tone)
|
||||
f) 5-bit poly only
|
||||
|
||||
5) Full support of volume control
|
||||
|
||||
6) Full support of all pitches - distortions will vary exactly as the
|
||||
original Atari based on different pitches
|
||||
|
||||
7) Accurate pitch generation
|
||||
|
||||
8) Support of any playback sample rate (e.g. 22050)
|
||||
|
||||
|
||||
The 'PokeySound' emulator does not currently support the following functions:
|
||||
|
||||
1) High pass filters
|
||||
|
||||
|
||||
Though I don't believe adding support for the High-Pass filters is very
|
||||
complicated, I decided not to add support right now because I don't
|
||||
believe this feature is used much. I'm also not sure how much impact it
|
||||
would have on performance. Let me know if you find an application that
|
||||
uses it.
|
||||
|
||||
In the 2.0 release, I've removed the non-optimized version. It was only
|
||||
left in for reference. If you would still like to see the non-optimized
|
||||
version, it's available in the 1.2 release.
|
||||
|
||||
One of the unique features of the emulator is that the processing time varies
|
||||
based on the frequency. Since the routine only calculates new output values
|
||||
when a change is sensed, the lower frequencies (which change less frequently)
|
||||
will require less processing time.
|
||||
|
||||
|
||||
Differences Between the Emulator and the Actual POKEY Chip:
|
||||
-----------------------------------------------------------
|
||||
|
||||
The biggest difference between the emulator and the original hardware is
|
||||
that the emulator emulates an 'ideal' POKEY chip. All output from the
|
||||
emulator is a based on a precise square wave, whereas the output from the
|
||||
original chip has decay. Though the output is slightly different, I
|
||||
don't believe this difference is easily discernible.
|
||||
|
||||
Another slight difference is the 17-bit/9-bit poly. Since the polynomial
|
||||
is large (2^17 bits), I choose to create the sample using a random number
|
||||
generator rather than a table. I don't believe this difference is
|
||||
significant.
|
||||
|
||||
There are also a few differences which are introduced by aliasing. This is
|
||||
a direct result of using an output sampling rate which is not identical to
|
||||
the original sound rate. It is most evident with high frequencies.
|
||||
|
||||
A final difference is the lack of support for the High-Pass Filter
|
||||
functionality. I plan to add this in a future release if necessary.
|
||||
|
||||
|
||||
Sample/Test Application:
|
||||
------------------------
|
||||
|
||||
The test program I've distributed is a 16-bit DOS application created with
|
||||
the Borland 'C' compiler. The only reason I used 16-bit was because I
|
||||
already had a set of working SB drivers in 16-bit. Since the test system
|
||||
is dedicated to generating sounds, the performance in 16-bit is more than
|
||||
adequate.
|
||||
|
||||
|
||||
POKEY.C
|
||||
=======
|
||||
|
||||
The POKEY.C file is the heart of the PokeySound Emulation program.
|
||||
Although the routines in the file must work together, no other files are
|
||||
modules are required for operation. A header file, 'POKEY.H', has
|
||||
been included for use in other modules, and provides the necessary
|
||||
function prototypes. I've attempted to make the routines as portable as
|
||||
possible, so the file should compile on almost any compiler with little
|
||||
or no modification.
|
||||
|
||||
I have made some attempts at optimizing the routines, though I am sure
|
||||
more optimization can be done. They are currently only available in 'C'.
|
||||
I'll be happy to convert them to assembly language if desired. Please feel
|
||||
free to send me e-mail at rfries@tcmail.frco.com.
|
||||
|
||||
The routines are easy to use. Detailed descriptions on the function calls
|
||||
are listed below.
|
||||
|
||||
The POKEY.C module can be compiled in a 32-bit or 16-bit environment.
|
||||
Since these routines are optimized for 32-bit use, the code will default
|
||||
to 32-bit. To compile in 16-bits, use a command line option to define
|
||||
the variable COMP16.
|
||||
|
||||
|
||||
GENERAL OVERVIEW
|
||||
----------------
|
||||
|
||||
On start-up of the system, a single call should be made to Pokey_sound_init.
|
||||
This routine will prepare the structures for sound output. This routine
|
||||
can be called again if necessary during warm-start or other reset.
|
||||
|
||||
Once in the main loop, there are two other functions that will be used.
|
||||
Whenever the system needs to write to either the AUDC or AUDF values,
|
||||
a call should be made to the Update_pokey_sound routine. This routine will
|
||||
take care of updating the internal registers. It will pre-calculate several
|
||||
values to help with optimization.
|
||||
|
||||
The only other routine that is called is the Pokey_process function. This
|
||||
function will fill a audio buffer with a specified number of bytes. This
|
||||
function should be called whenever a new audio buffer is required.
|
||||
|
||||
For best results, I recommend using at least two output buffers. Using this
|
||||
scheme, the sound card can be playing one buffer while the system is filling
|
||||
the other.
|
||||
|
||||
|
||||
DETAILED FUNCTION DESCRIPTIONS
|
||||
------------------------------
|
||||
|
||||
Pokey_sound_init(uint32 freq17, uint16 playback_freq, uint8 num_pokeys)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
This function initializes the structures used by the PokeySound routines.
|
||||
This function takes three parameters: the main clock frequency, the
|
||||
playback frequency and the number of POKEY chips to emulate.
|
||||
|
||||
The maximum number of POKEY chips emulated is configured at compile time.
|
||||
Though the maximum number of chips can be configured as one, the PokeySound
|
||||
1.2 routines are recommended if only a single chip is to be emulated since
|
||||
they have will provide better performance.
|
||||
|
||||
NOTE: The following information on the 1.79MHz clock applies only to the
|
||||
Atari 800 line of home computers. Many Arcade games also use the
|
||||
POKEY chip, but most use a different frequency for the POKEY clock.
|
||||
Refer to the schematics for more details.
|
||||
|
||||
The main clock frequency is the frequency of the 1.79MHz source clock.
|
||||
To provide exact results, freq17 should be set equal to 1789790 Hz. As an
|
||||
alternative, freq17 can be set to an approximate frequency of 1787520 Hz.
|
||||
Using this approximate frequency will reduce aliasing and thus produce a
|
||||
clearer output signal.
|
||||
|
||||
A constant has been defined for both of these values for your convenience.
|
||||
The names are FREQ_17_EXACT and FREQ_17_APPROX.
|
||||
|
||||
The playback frequency is the frequency of the sound playback (the frequency
|
||||
used by the sound card). For best results, the playback frequency should
|
||||
be an even division of the main clock frequency. Since most of the sounds
|
||||
will be generated using the 64kHz clock, I also recommend making the
|
||||
playback frequency an even division of the 64kHz clock.
|
||||
|
||||
The 64kHz clock is exactly equal to the main clock divided by 28. For
|
||||
the playback frequency, I recommend one of the following values:
|
||||
|
||||
1) FREQ_17_APPROX / (28*1), which is equal to 63840. Of course, most sound
|
||||
cards can't reproduce this frequency.
|
||||
|
||||
2) FREQ_17_APPROX / (28*2), which is equal to 31920. All of the newer cards
|
||||
will support this frequency.
|
||||
|
||||
3) FREQ_17_APPROX / (28*3), which is equal to 21280. All of the SB
|
||||
compatibles should support this frequency.
|
||||
|
||||
4) FREQ_17_APPROX / (28*4), which is equal to 15960. This may be the
|
||||
best choice, as it offers good sound reproduction with good performance.
|
||||
|
||||
Of course, these options also assume you are using the approximate
|
||||
frequency for the main clock as well. Any of these choices will offer the
|
||||
best results when the main 64kHz clock is used, reasonable results when the
|
||||
15kHz clock is selected, and marginal results when the 1.79MHz clock is
|
||||
selected (the only way to produce good results in all cases is to set the
|
||||
playback frequency to 1.79MHz!)
|
||||
|
||||
Feel free to experiment to find other alternatives as well.
|
||||
|
||||
This function has no return value (void).
|
||||
|
||||
|
||||
Update_pokey_sound (uint16 addr, uint8 val, uint8 chip, uint8 gain)
|
||||
-------------------------------------------------------------------
|
||||
|
||||
This function should be called each time an AUDC, AUDF or AUDCTL value
|
||||
changes. This function takes four parameters: the address to change,
|
||||
the new value, the chip to be updated, and the gain to be used.
|
||||
The lower four bits of the address should be one of the following values:
|
||||
|
||||
Addr Description
|
||||
------ -----------
|
||||
0x00 AUDF1
|
||||
0x01 AUDC1
|
||||
0x02 AUDF2
|
||||
0x03 AUDC2
|
||||
0x04 AUDF3
|
||||
0x05 AUDC3
|
||||
0x06 AUDF4
|
||||
0x07 AUDC4
|
||||
0x08 AUDCTL
|
||||
|
||||
In order to support multiple POKEY chips, only the lower four bits of
|
||||
the address are used. Note that this routine can no longer be called with
|
||||
any address as it will affect the operation of the specified chip.
|
||||
|
||||
The routine pre-calculates several values that are needed by the
|
||||
processing function. This is done to optimize performance.
|
||||
|
||||
The output will be amplified (multiplied) by the gain (note that POKEY 2.0
|
||||
used gain/16). If the output exceeds the maximum value after then gain and
|
||||
clipping is enabled, the output will be limited to reduce distortion.
|
||||
|
||||
The best value for the gain depends on the number of POKEYs emulated and
|
||||
the maximum volume used. The maximum possible output for each channel is 15,
|
||||
making the maximum possible output for a single chip to be 60. Assuming all
|
||||
four channels on the chip are used at full volume, a gain of 4 can be used
|
||||
without distortion. If 4 POKEY chips are emulated and all 16 channels are
|
||||
used at full volume, the gain must be no more than one to prevent distortion.
|
||||
Of course, if only a few of the 16 channels are used or not all channels are
|
||||
used at full volume, a larger gain can be used.
|
||||
|
||||
To enable clipping, define the logical CLIP before compiling. The default
|
||||
mode of operation is no clipping as this provides the best performance. If
|
||||
necessary (only required if the gain is too large), remove the comments from
|
||||
around the CLIP definition in the POKEY.H file.
|
||||
|
||||
To enable signed output, define the logical SIGNED_SAMPLES before compiling.
|
||||
The default is unsigned 8-bit centered around 128. If unsigned samples are
|
||||
necessary, remove the comments from around the SIGNED_SAMPLES definition in
|
||||
POKEY.H.
|
||||
|
||||
This function has no return value (void).
|
||||
|
||||
|
||||
Pokey_process (uint8 *buffer, uint16 n)
|
||||
---------------------------------------
|
||||
|
||||
This function calculates and fills a buffer with signed or unsigned 8-bit
|
||||
mono audio. This function takes two parameters: a pointer to the buffer to
|
||||
fill and the size of the buffer (limited to 65535). This function fills the
|
||||
buffer based on the requested size and returns. It automatically
|
||||
updates the pointers for the next call, so subsequent calls to this function
|
||||
will provide a continuous stream of data.
|
||||
|
||||
The size of the buffer that is needed depends on the playback frequency.
|
||||
It is best to keep the buffer as small as possible to maximize response time
|
||||
to changes in the sound. Of course, the minimum size is dependent on
|
||||
system and emulator performance.
|
||||
|
||||
Selecting the correct buffer size is a careful balance. Selecting a buffer
|
||||
size that is too small will produce noticeable clicks in the output, though
|
||||
selecting a size that is too large will cause a poor response time and
|
||||
possible delays in the system when the new buffer is filled.
|
||||
|
||||
This function has no return value (void).
|
||||
|
||||
|
||||
License Information and Copyright Notice
|
||||
========================================
|
||||
|
||||
PokeySound is Copyright(c) 1996-1998 by Ron Fries
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it under
|
||||
the terms of version 2 of the GNU Library General Public License as published
|
||||
by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
|
||||
details.
|
||||
|
||||
To obtain a copy of the GNU Library General Public License, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Any permitted reproduction of these routines, in whole or in part, must bear
|
||||
this legend.
|
||||
@@ -0,0 +1,119 @@
|
||||
---- about the R: device in Atari800 emulator ----
|
||||
|
||||
From: Chris Martin <cmartin@ti.com>
|
||||
|
||||
I have some code that I have integrated into my personal
|
||||
download of atari800 v1.3.0 for allowing talking to the
|
||||
Atari800 emulator via R: and network sockets. I have taken
|
||||
some code released by Tom Hunt and made some bug fixes and a
|
||||
few minor updates.
|
||||
|
||||
I have tested this both under Solaris and Linux. I have
|
||||
plans to update the code to allow connections to the host
|
||||
machine serial ports for talking to a real Modem as well.
|
||||
|
||||
I have tested this with Bobterm and Ice-T. If you need the ATR files for
|
||||
these programs, let me know.
|
||||
|
||||
Once in Bobterm or Ice-T you can type 'ATDI localhost 23', to telnet.
|
||||
|
||||
I would like to add options for allowing to compile this or not, and
|
||||
command line args for the connect string and the port number (it accepts
|
||||
connections on port 9000 now for in coming calls...)
|
||||
|
||||
Best regards,
|
||||
Chris
|
||||
|
||||
===
|
||||
|
||||
The basic use of the R: emulation is that it emulates an Atari 850. If
|
||||
you use the bobterm.atr or the icet.atr disk image to run these terminal
|
||||
programs, you can telnet to any telnetable Atari BBS in the terminal
|
||||
screen by typing:
|
||||
|
||||
ATDL
|
||||
ATDI <address> <port>
|
||||
|
||||
|
||||
So, basically these two commands have been added on top of the 850
|
||||
emulation. The ATDL toggles Line feeds on/off. the ATDI allow you to
|
||||
telnet out to an atari machine.
|
||||
|
||||
For example, to telnet to my atari BBS to this in Bobterm:
|
||||
|
||||
ATDL
|
||||
ATDI jybolac.homelinux.com 800
|
||||
|
||||
You could also to the following, if you are running on your linux/unix box
|
||||
and want to telnet from atari800:
|
||||
|
||||
ATDL
|
||||
ATDI localhost
|
||||
|
||||
(Of course, be sure to turn on ASCII translation in the terminal program).
|
||||
|
||||
You can also telnet to atari800 by doing the following at any linux
|
||||
prompt:
|
||||
|
||||
telnet <machinename> 9000
|
||||
|
||||
Also, everything that can be done in the 850 manual as far as XIO commands
|
||||
are concerned can be done as well.
|
||||
|
||||
|
||||
|
||||
|
||||
To sum up, the R: emulation can be used with terminal programs like
|
||||
Bobterm and Ice-T, as well as BBS programs like carina and bbs express.
|
||||
|
||||
I have tested it with bobterm, Ice-T and Carina, but not Express, yet.
|
||||
|
||||
|
||||
|
||||
|
||||
Again, feel free to email with any questions, until I can write a full
|
||||
document/web-page on it.
|
||||
|
||||
Cheers,
|
||||
Chris
|
||||
|
||||
===
|
||||
|
||||
> > The basic use of the R: emulation is that it emulates an Atari 850.
|
||||
>
|
||||
> What is it? A printer? I never heard about it.
|
||||
|
||||
The 850 interface is an RS232 device, for connecting non-Atari-specific
|
||||
modems (unlike the SX212, which had an SIO port, so didn't need an 850),
|
||||
and other 'serial port' devices. (Think COM1, COM2, etc. under MSDOS,
|
||||
or /dev/ttyS0, /dev/ttyS1, etc. under Linux)
|
||||
|
||||
-bill!
|
||||
|
||||
===
|
||||
|
||||
It was called an "Interface module". It provided 4 RS-232 serial ports,
|
||||
one was fully functionaly, the others were stripped down. It also
|
||||
provided a parallel port.
|
||||
|
||||
> Do you think this can be misused by hackers? Again not joking. We need
|
||||
> to keep an eye on this.
|
||||
>
|
||||
|
||||
Anything can be exploited by hackers! :^) However, port 9000 only is
|
||||
enabled if you run a terminal program, so normal game operation wouldn't
|
||||
be a problem. Also, I put this at port 9000 so that normally it would be
|
||||
found, but there are always port sniffers. I would think it would be a
|
||||
problem only if there was a bug in a buffer overflow and you were running
|
||||
atari800 as root. But, I know of no problem currently....not saying that
|
||||
there is no problem.
|
||||
|
||||
So, yes, it could be misused, but only if you are running a terminal
|
||||
program or a bbs program. ( I cannot say that my code is foolproof :)
|
||||
|
||||
However, the R: device it is normally not on, and can only be turned on
|
||||
(thus, enabling port 9000), after run a program that calls the XIO
|
||||
commands for the R: device or you write a basic program that reads/writes
|
||||
to the R: device. So, normally I would say that it is safe.
|
||||
|
||||
--Chris
|
||||
@@ -0,0 +1,518 @@
|
||||
Atari800 R: Emulation Frequently Asked Questions
|
||||
------------------------------------------------
|
||||
|
||||
Chris Martin
|
||||
<atariguy1@comcast.net>
|
||||
|
||||
|
||||
1. General Information
|
||||
|
||||
1.1 Q: What is an R: Device?
|
||||
A: The R: device is typically a handler for an RS-232 serial port.
|
||||
This serial port can be on an Atari 850, an MIO, Black Box or
|
||||
P:R:Connection from ICD. Most handlers are the same with
|
||||
subtle differences.
|
||||
|
||||
1.2 Q: What is the Atari 850?
|
||||
A: The Atari 850 is a computer peripheral for the Atari 8-bit line
|
||||
of computers that was released in 1980.
|
||||
It was called an "Interface module" that connected to the SIO port.
|
||||
It provided 4 RS-232 serial ports:
|
||||
one was fully functional (R1:)
|
||||
and 3 that did not provide all the RS-232 signals (R2:-R4:).
|
||||
It also provided one parallel port (P1:).
|
||||
|
||||
1.3 Q: What features of the 850 are supported by Atari800?
|
||||
A: Atari800 support several features of both the 850 hardware and the
|
||||
R: handler. There are two modes of operation for the R: device
|
||||
emulation: network sockets or serial port. I will talk more about
|
||||
this below, but you can either use the host serial ports
|
||||
(/dev/ttyS* under Linux) or network sockets (ports 9000-9003).
|
||||
|
||||
XIO calls (The following are the BASIC examples):
|
||||
-------------------------------------------------
|
||||
|
||||
In each of the XIO calls below, 'channel' specifies the IOCB or
|
||||
channel number (1-7) and "Rn" specifies the RS-232-C port,
|
||||
where n = {1-4}.
|
||||
|
||||
- XIO 32 -
|
||||
|
||||
XIO 32, #channel, Aux1, Aux2, "Rn:"
|
||||
|
||||
(Not Implemented)
|
||||
|
||||
- XIO 34 -
|
||||
|
||||
XIO 34, #channel, Aux1, Aux2, "Rn:"
|
||||
|
||||
Aux1 bits do the following:
|
||||
|
||||
Aux1[7] = DTR control enable (active high)
|
||||
Aux1[6] = Force DTR value
|
||||
Aux1[5] = RTS control enable (active high)
|
||||
Aux1[4] = Force RTS value
|
||||
Aux1[3] = not used
|
||||
Aux1[2] = not used
|
||||
Aux1[1] = XMT control enable (active high)
|
||||
Aux1[0] = Force XMT to SPACE (0) or MARK (1) * Not implemented
|
||||
|
||||
To force DTR off: Aux1 = 128
|
||||
To force DTR on: Aux1 = 192
|
||||
|
||||
Aux2 is unused.
|
||||
|
||||
XIO 34 is really only used if using the serial port on the host,
|
||||
if you are using network sockets, then changing DTR is the only
|
||||
operation that you may perform. Turning DTR off, in this case,
|
||||
will disconnect.
|
||||
|
||||
- XIO 36 -
|
||||
|
||||
XIO 36, #channel, Aux1, Aux2, "Rn:"
|
||||
|
||||
Aux1 select the Baud rate, the Word size and the stop bits.
|
||||
Add the values listed below to obtain the BASIC number.
|
||||
|
||||
Aux1[3:0] = Baud rate where:
|
||||
0 = 300 bps
|
||||
1 = 57600 bps (was 45.5 bps in 850 spec)
|
||||
2 = 50 bps
|
||||
3 = 115200 bps (was 56.875 bps in 850 spec)
|
||||
4 = 75 bps
|
||||
5 = 110 bps
|
||||
6 = 134.5 bps
|
||||
7 = 150 bps
|
||||
8 = 300 bps
|
||||
9 = 600 bps
|
||||
10 = 1200 bps
|
||||
11 = 1800 bps
|
||||
12 = 2400 bps
|
||||
13 = 4800 bps
|
||||
14 = 9600 bps
|
||||
15 = 19200 bps
|
||||
|
||||
Aux1[5:4] = Word size where:
|
||||
0 = 8 bits
|
||||
1 = 7 bits
|
||||
2 = 6 bits
|
||||
3 = 5 bits
|
||||
|
||||
Aux1[6] = Select 230400 bps (feature added to Atari800)
|
||||
|
||||
Aux1[7] = Stop bits
|
||||
0 = 1 stop bit
|
||||
1 = 2 stop bits
|
||||
|
||||
Aux2 specifies whether or not the Interface Module should check
|
||||
Data Set Ready (DSR), Clear to Send (CTS) and/or Carrier Detect (CD).
|
||||
This function is currently not supported.
|
||||
|
||||
- XIO 38 -
|
||||
|
||||
XIO 38, #channel, Aux1, Aux2, "Rn:"
|
||||
|
||||
Aux1 Specifies te translation mode, input/output parity modes and
|
||||
the append Line Feed option.
|
||||
|
||||
Aux1[1:0] = Output Parity (* Not Implemented)
|
||||
0 = Do not change parity bit
|
||||
1 = Set output parity odd
|
||||
2 = Set output parity even
|
||||
3 = Set output parity bit to 1
|
||||
|
||||
Aux1[3:2] = Input Parity
|
||||
0 = Ignore and do not change Parity bit (NO PARITY)
|
||||
1 = Set Parity to ODD
|
||||
2 = Set Parity to EVEN
|
||||
3 = Do not use Parity (NO PARITY)
|
||||
|
||||
Aux1[4] = Heavy Translation * Not Implemented
|
||||
0 = Light Translation
|
||||
1 = Heavy Translation
|
||||
|
||||
Aux1[5] = Translation
|
||||
0 = Translation ON
|
||||
1 = Translation off
|
||||
|
||||
Aux1[6] = Line Feeds
|
||||
0 = Do not append LF
|
||||
1 = Append LF after Carriage Return
|
||||
|
||||
Aux1[7] = Not Used
|
||||
|
||||
Aux2 is the numeric representation of the "won't translate" character
|
||||
for heavy translation. (Not currently supported.)
|
||||
|
||||
- XIO 40 -
|
||||
|
||||
XIO 40, #channel, Aux1, Aux2, "Rn:"
|
||||
|
||||
XIO 40 starts concurrent I/O Mode.
|
||||
|
||||
Both Aux1 and Aux2 are used to specify an output buffer, but using
|
||||
the specified input buffer is not currently supported. The default
|
||||
256 byte internal buffer is use when both Aux1 and Aux2 = 0.
|
||||
|
||||
However, since using a different buffer is not supported, the
|
||||
setting Aux1 or Aux2 to any value will not affect how this works.
|
||||
|
||||
Other BASIC commands:
|
||||
---------------------
|
||||
OPEN #Channel, Aux1, Aux2, "Rn:"
|
||||
|
||||
Aux1 specifies the direction of the port.
|
||||
Aux1[7:4] = NOT USED.
|
||||
Aux1[3] = Specifies Output when high.
|
||||
Aux1[2] = Specifies Input when high.
|
||||
Aux1[1] = NOT USED.
|
||||
Aux1[0] = Specifies Concurrent I/O mode.
|
||||
|
||||
Aux2 is not used.
|
||||
|
||||
CLOSE #Channel
|
||||
|
||||
Closes the Serial port or the network connection.
|
||||
|
||||
GET, INPUT, PUT and PRINT - Use as normal
|
||||
|
||||
STATUS #Channel, AVAR
|
||||
|
||||
The STATUS command will update the memory locations 746-749.
|
||||
Please read the meaning of these locations below.
|
||||
|
||||
AVAR is a variable that receives the status returned for the STATUS
|
||||
call itself. This number will be the same as the ERROR code.
|
||||
|
||||
Atari Memory Address Locations:
|
||||
-------------------------------
|
||||
|
||||
The following locations will be updated after a STATUS call (after
|
||||
the STATUS function/routine runs).
|
||||
|
||||
0x2ea (746) - Error flags (* Not Implemented)
|
||||
bit[7] = Received Data Framing Error
|
||||
bit[6] = Received Data Byte Overrun Error
|
||||
bit[5] = Received Data Parity Error
|
||||
bit[4] = Received Data Buffer Overflow error
|
||||
bit[3] = Illegal Option Combination Attempted
|
||||
bit[2] = External Device Not Fully Ready Flag
|
||||
bit[1] = Error On Block Data Transfer Out
|
||||
bit[0] = Error On Command To Interface Module
|
||||
|
||||
0x2eb (747) - Concurrent I/O Mode:
|
||||
Number of Characters in Input buffer (Low Byte)
|
||||
|
||||
Non-Concurrent I/O Mode: (* Not Implemented)
|
||||
bit[7] = Data Set Ready (DSR) status during current
|
||||
STATUS command. 0=DSR is low; 1=DSR is hi.
|
||||
bit[6] = DSR status during last STATUS command.
|
||||
bit[5] = Clear to Send (CTS) status during current
|
||||
STATUS command. 0=CTS is low; 1=CTS is hi.
|
||||
bit[4] = CTS status during last STATUS command.
|
||||
bit[3] = CARRIER DETECT (CD) status during current
|
||||
STATUS command. 0=CD is low; 1=CD is high.
|
||||
bit[2] = CD status during last STATUS command.
|
||||
bit[1] = NOT USED.
|
||||
bit[0] = Data Receive (RCV) current status.
|
||||
1 = MARK (1)
|
||||
0 = SPACE (0)
|
||||
|
||||
0x2ec (748) - Concurrent I/O Mode:
|
||||
Number of Characters in Input buffer (High Byte)
|
||||
This is always zero in Atari800 since the input
|
||||
buffer is only 256 bytes.
|
||||
|
||||
Non-Concurrent I/O Mode:
|
||||
Always zero.
|
||||
|
||||
0x2ed (749) - Concurrent I/O Mode:
|
||||
Number of Character in Output Buffer.
|
||||
This is always zero in Atari800 since we always
|
||||
output the character, so a write of more than
|
||||
one character will not work.
|
||||
|
||||
Non-Concurrent I/O Mode:
|
||||
Always Zero.
|
||||
|
||||
1.4 Q: What features of the 850 are not currently supported by Atari800?
|
||||
A:
|
||||
|
||||
1. Cannot set RTS or XMT in XIO 34.
|
||||
2. Cannot select 45.5 bps or 56.875 bps in XIO 36.
|
||||
3. Cannot monitor DSR, CTS or CD in XIO 36.
|
||||
4. Heavy ASCII/ATASCII translation.
|
||||
5. Early force of short I/O block (XIO 32). This forces the output
|
||||
buffer to be sent, but it is not currently implement as we now
|
||||
always send after a write.
|
||||
6. Cannot set output parity with XIO 38. The Output parity is set the
|
||||
same as the input parity.
|
||||
7. Using a different input buffer, as specified by XIO 40 is not supported.
|
||||
I am not sure anyone ever used this anyway...
|
||||
8. Not all functions return an error code if something fails.
|
||||
Most of the functions should return an error to regY.
|
||||
9. Error bits at location 746 are not implemented.
|
||||
10. Although you can access each serial port or talk to the network to
|
||||
a different socket, you cannot have more than one R: device
|
||||
open at a time. For example, you cannot open R1: and R2: and expect
|
||||
things to behave sanely. The reason for this is that currently
|
||||
there is only one buffer for ALL serial ports.
|
||||
11. Error reporting to address 747 during non-concurrent mode has
|
||||
not been implemented. In fact non-concurrent mode has not been
|
||||
tested! I invite you to test it and let me know!!!
|
||||
|
||||
|
||||
1.5 Q: Is there a version of the 850 Operator's Manual On-line?
|
||||
A: I am currently working on scanning the original Document. See below
|
||||
in the links section.
|
||||
|
||||
1.6 Q: Do you have some example code?
|
||||
A: Yes. Below are several BASIC programs taken from the 850 Operator's
|
||||
Manual. Also included is a C program written by Christian Groessler
|
||||
using the rs232 library for cc65 (www.cc65.org).
|
||||
|
||||
------------------------------------------------
|
||||
RECEIVE PROGRAM
|
||||
------------------------------------------------
|
||||
|
||||
110 DIM INLINE$(255)
|
||||
200 REM
|
||||
201 REM ==========
|
||||
202 REM
|
||||
210 LET TRANSLATE=32:REM [Full ATASCII]
|
||||
220 XIO 38,#1,TRANSLATE,0,"R1:"
|
||||
230 REM
|
||||
240 PRINT "Receive file's full name";
|
||||
250 INPUT INLINE$
|
||||
260 OPEN #2,8.0,INLINE$
|
||||
270 REM
|
||||
280 OPEN #1,13,0,"R1:"
|
||||
290 XIO 40,#1,0,0,"R1:":REM [Start I/0]
|
||||
500 REM
|
||||
501 REM ==========
|
||||
502 REM
|
||||
510 FOR ETERNITY=1 TO 2 STEP 0
|
||||
520 REM
|
||||
530 INPUT #1;INLINE$:REM [Get line]
|
||||
540 CLOSE #1:REM [Stop I/O]
|
||||
550 REM
|
||||
560 IF INLINE$="EOF EOF EOF" THEN 900
|
||||
570 REM
|
||||
580 PRINT #2; INLINE$:REM [Save line]
|
||||
590 PRINT INLINE$:REM [Echo onscreen]
|
||||
600 REM
|
||||
610 OPEN #1,13,0,"R1:"
|
||||
620 XIO 40,#1,0,0,"R1:":REM [Start I/O]
|
||||
630 PRINT #1:REM [Send reply]
|
||||
640 REM
|
||||
650 NEXT ETERNITY
|
||||
900 REM
|
||||
901 REM ==========
|
||||
902 REM
|
||||
910 CLOSE #2:REM [EOF received]
|
||||
999 END
|
||||
|
||||
------------------------------------------------
|
||||
SEND PROGRAM
|
||||
------------------------------------------------
|
||||
|
||||
110 DIM OUTLINE$(255)
|
||||
200 REM
|
||||
201 REM ==========
|
||||
202 REM
|
||||
210 LET TRANSLATE=32:REM [Full ATASCII]
|
||||
220 XIO 38,#2,TRANSLATE,0,"Rl:"
|
||||
230 REM
|
||||
240 PRINT "Send file's full name";
|
||||
250 INPUT OUTLINE$
|
||||
260 OPEN #1,4,0,OUTLINE$
|
||||
500 REM
|
||||
501 REM ==========
|
||||
502 REM
|
||||
510 FOR ETERNITY=1 TO 2 STEP 0
|
||||
520 REM
|
||||
530 TRAP 900:REM [Trap end file #1]
|
||||
540 INPUT #1, OUTLINE$:REM [Get line]
|
||||
550 PRINT OUTLINE$:REM [Echo onscreen]
|
||||
560 REM
|
||||
570 OPEN #2,13,0,"Rl:"
|
||||
580 XIO 40,#2,0,0,"Rl":REM [Start I/O]
|
||||
590 PRINT #2;OUTLINE$:REM [Send line]
|
||||
600 INPUT #2;OUTLINE$:REM [Get reply]
|
||||
610 CLOSE #2:REM [Stop I/O]
|
||||
620 REM
|
||||
630 NEXT ETERNITY
|
||||
900 REM
|
||||
901 REM ==========
|
||||
902 REM
|
||||
910 OPEN #2,8,0,"Rl:":REM [Send EOF]
|
||||
920 PRINT #2;"EOF EOF EOF"
|
||||
930 CLOSE #2:CLOSE #1:REM [All done]
|
||||
999 END
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
rs232t.c
|
||||
------------------------------------------------
|
||||
|
||||
/* $Id$
|
||||
*
|
||||
* RS232 library test
|
||||
* (c) by Christian Groessler, chris@groessler.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <dbg.h>
|
||||
#include <6502.h>
|
||||
#include <conio.h>
|
||||
#include <rs232.h>
|
||||
#include <time.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
char err;
|
||||
unsigned char c, baud, t;
|
||||
|
||||
do {
|
||||
printf("\n");
|
||||
printf("0 = 300baud\n");
|
||||
printf("1 = 1200baud\n");
|
||||
printf("2 = 2400baud\n");
|
||||
printf("3 = 4800baud\n");
|
||||
printf("4 = 9600baud\n");
|
||||
printf("Enter type (0-4): ");
|
||||
c = cgetc();
|
||||
printf("%c\n",c);
|
||||
} while (c < '0' || c > '4');
|
||||
t = c - '0';
|
||||
switch (t) {
|
||||
case 0: baud = RS_BAUD_300; break;
|
||||
case 1: baud = RS_BAUD_1200; break;
|
||||
case 2: baud = RS_BAUD_2400; break;
|
||||
case 3: baud = RS_BAUD_4800; break;
|
||||
case 4: baud = RS_BAUD_9600; break;
|
||||
}
|
||||
|
||||
err = rs232_init(0);
|
||||
printf("rs232_init: %d\n", err);
|
||||
err = rs232_params(baud | RS_BITS_8 | RS_STOP_1, RS_PAR_NONE);
|
||||
printf("rs232_params: %d\n", err);
|
||||
|
||||
printf("waiting for stuff to arrive...\n");
|
||||
|
||||
/* display all received chars,
|
||||
* send all typed chars to the other end,
|
||||
* type ESC to exit
|
||||
*/
|
||||
while(1) {
|
||||
if (kbhit()) {
|
||||
c = cgetc();
|
||||
if (c == CH_ESC) break;
|
||||
else rs232_put(c);
|
||||
}
|
||||
if (rs232_get(&c) != RS_ERR_NO_DATA) cputc(c);
|
||||
}
|
||||
|
||||
rs232_done();
|
||||
}
|
||||
|
||||
------------------------------------------------
|
||||
1.7 Q: What Atari programs use the R: device?
|
||||
A:
|
||||
Terminal programs: Bobterm, Ice-T, etc.
|
||||
BBS programs: Express, Carina, etc.
|
||||
Some Games: I know I saw a Modem Chess game back in the day.
|
||||
I will have to find the ATR image of this.
|
||||
|
||||
|
||||
1.8 Q: How does the Serial Port Version work?
|
||||
A: Basically, in this mode, when you open R1: under Atari800, you will
|
||||
open the first serial port on the host computer. Under Linux, this
|
||||
will be /dev/ttyS0. Opening R2: will open /dev/ttyS1 and so on.
|
||||
When you control the baud rate, parity, stop bits (with XIO 36), you
|
||||
will control the host serial port. The same will all the other
|
||||
configuration options, this will set those options on the host
|
||||
serial port. This mode can be used to connect to a real MODEM, or
|
||||
to use a null-modem cable to connect to you Linux host. The
|
||||
null-modem could be used to run SLIP(Linux) and Contiki on Atari800.
|
||||
|
||||
The R: device emulation will take care of adding Line Feeds and
|
||||
Light ASCII translation.
|
||||
|
||||
1.9 Q: How does the Network Sockets version work?
|
||||
A: This mode works similarly to the Serial Port Version, except that
|
||||
instead of connecting to the host serial ports you will connect
|
||||
to a network socket. All configuration such as baud rate, parity
|
||||
et cetera will be ignored, since these mean nothing in this mode.
|
||||
|
||||
Opening an R: device will open a network socket and allow other users
|
||||
to "telnet" into Atari800. For example, if you open R1:, port 9000
|
||||
will accept connections from other hosts (or the local host). R2: will
|
||||
accept connections on 9001, and so on. Only one of these can
|
||||
currently be opened at one time. (I may add support for
|
||||
multiple R: devices later.) Allow others to connect to your
|
||||
emulated Atari can be used to run an emulated BBS or to potentially
|
||||
run a web server from Atari800.
|
||||
|
||||
Also included with the Network Sockets version of the R: Device
|
||||
emulation is a somewhat handicapped Modem emulation. There are
|
||||
only two commands that are implemented:
|
||||
|
||||
ATDL - Translates carrage returns into line feeds.
|
||||
This may not be needed if the "add line feeds" in XIO 38
|
||||
is used. But I found that it is not always used by terminal
|
||||
programs, and thus some telnet and ftp servers expect
|
||||
a line feed, causing you to not be able to do anything
|
||||
once connected.
|
||||
|
||||
Typing 'ATDL' in a terminal program such as Bobterm or Ice-T
|
||||
will toggle CR translation on/off.
|
||||
|
||||
ATDI <address name|ip address> <port #>
|
||||
|
||||
This command allows you to "dial" out to an external host.
|
||||
For example you can connect to my BBS by typing the following:
|
||||
'ATDI jybolac.homelinux.com 800'
|
||||
|
||||
This connects Atari800 to the external host
|
||||
'jybolac.homelinux.com' at port 800.
|
||||
|
||||
These commands were chosen to somewhat look like modem 'AT' commands.
|
||||
|
||||
The R: device emulation will take care of adding Line Feeds and
|
||||
Light ASCII translation, same as in the Serial Port Version.
|
||||
|
||||
|
||||
1.10 Q: Who wrote the R: Device Emulation?
|
||||
A: Tom Hunt wrote the original network sockets version. I, Chris Martin,
|
||||
updated that code, added the simple modem emulation and added code
|
||||
to access the serial ports on the host computer via the R: device. I
|
||||
also added ASCII/ATASCII translation.
|
||||
|
||||
1.11 Q: Do you have any URLs for more information?
|
||||
A: Sure!
|
||||
|
||||
I am working on scanning and placing the Atari 850 Operator's Manual
|
||||
online here:
|
||||
http://jybolac.virtualave.net/atari/850man/
|
||||
|
||||
The MIO documentation has some great info that still applies to
|
||||
the 850:
|
||||
http://www.1000bit.net/support/manuali/atari/pdf/icd_mio.pdf
|
||||
|
||||
The Black-Box Documentation has some great info on the 850 as well:
|
||||
http://nleaudio.com/css/products/BB_Docs.htm
|
||||
|
||||
Some Atari Magazine Articles:
|
||||
http://www.atarimagazines.com/creative/v9n6/177_A_letter_quality_alternat.php
|
||||
|
||||
The JL-BASIC Manual:
|
||||
http://www.jeff-jackson.com/Atari/JLS_Manual.html
|
||||
|
||||
Mapping the Atari will show some information about some R:-related
|
||||
addresses (746-747) and IOCB:
|
||||
http://www.atariarchives.org/mapping/memorymap.php
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Atari800 emulator readme
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<center><h1>
|
||||
Atari800 emulator version $A800VERSION
|
||||
</h1></center>
|
||||
|
||||
<h2>Table Of Contents:</h2>
|
||||
|
||||
<menu>
|
||||
<li><a href="#intro">INTRODUCTION</a>
|
||||
<li><a href="#install">INSTALLATION</a>
|
||||
<li><a href="#keys">KEYS</a>
|
||||
<li><a href="#run">RUNNING ATARI800</a>
|
||||
<li><a href="#bugs">REPORTING BUGS</a>
|
||||
<li><a href="#copy">COPYRIGHT</a>
|
||||
<li><a href="#contact">CONTACT</a>
|
||||
</menu>
|
||||
|
||||
|
||||
<a name="intro">
|
||||
<h3>INTRODUCTION</h3>
|
||||
This is the version $A800VERSION of Atari800 for MS Windows.
|
||||
Atari800 is a free (you don't pay for it, you can get source code and you are
|
||||
welcome to develop it) and portable (can run on many weird machines
|
||||
and different operating systems) emulator of Atari 8-bit computer systems and
|
||||
the 5200 console, developed by <A HREF="DOC/CREDITS">many people</A> under the <A HREF="COPYING">GPL</A>. More information you find
|
||||
in the <A HREF="DOC/README">README</A> file.
|
||||
|
||||
<a name="install">
|
||||
<h3>INSTALLATION</h3>
|
||||
To install this Atari800 package you will need the following:
|
||||
<menu>
|
||||
<li> Windows 9x<br>
|
||||
<li> DirectX<br>
|
||||
<li> Atari 800 ROM files (see <A HREF="DOC/INSTALL.dos">INSTALL</A> file for more info)<br>
|
||||
<li> Seperate folder to put the emulator and ROM files in<br>
|
||||
</menu>
|
||||
|
||||
Extract Atari800 zip file to destination folder and copy ROM files to the same
|
||||
folder.
|
||||
Run atari800 and you will be prompted for several config values, if you don't
|
||||
know the correct value just press Enter.
|
||||
|
||||
<a name="keys">
|
||||
<h3>KEYS</h3>
|
||||
<menu>
|
||||
<li>F1 Menu (built in User Interface)
|
||||
<li>F2 Option
|
||||
<li>F3 Select
|
||||
<li>F4 Start
|
||||
<li>F5 Warm Reset
|
||||
<li>Shft+F5 Cold Reset
|
||||
<li>F8 Monitor
|
||||
<li>F9 Exit Emulator
|
||||
<li>F10 Screenshot
|
||||
<li>F11 Change autofire mode
|
||||
</menu>
|
||||
|
||||
Joystick 0 is operated by the numeric keypad:<br>
|
||||
<menu>
|
||||
<li>7 - forward/left
|
||||
<li>8 - forward
|
||||
<li>9 - forward/right
|
||||
<li>4 - left
|
||||
<li>6 - right
|
||||
<li>1 - back/left
|
||||
<li>2 - back
|
||||
<li>3 - back/right
|
||||
<li>0 - fire key
|
||||
</menu>
|
||||
|
||||
<a name="run">
|
||||
<h3>RUNNING ATARI800</h3>
|
||||
You can use some command line parameters to atari800.
|
||||
To add command line parameter create a shortcut to atari800 and append them
|
||||
to Properties/Shortcut/Target window.<br>
|
||||
If you need '-mouse pad' option you should have something like:<br>
|
||||
"C:\Program Files\Atari800\Atari800.exe -mouse pad"<br>
|
||||
|
||||
Available command line options are: (see <A HREF="DOC/USAGE">USAGE</A> for more)
|
||||
<menu>
|
||||
|
||||
$HELPMENU
|
||||
|
||||
</menu>
|
||||
|
||||
<a name="bugs">
|
||||
<h3>REPORTING BUGS</h3>
|
||||
If you have a problem running this emulator please read <A HREF="DOC/FAQ">FAQ</A> first.<br>
|
||||
Look at <A HREF="DOC/BUGS">BUGS</A> first to not report same bug hundred times, please.<br>
|
||||
If the problem persists you can contact Atari800 developers at
|
||||
<a href="mailto:atari800-users@lists.sourceforge.net">
|
||||
atari800-users mailing list</a>
|
||||
or you can use <a href="http://sourceforge.net/projects/atari800/">
|
||||
sourceforge.net interface</a>.
|
||||
|
||||
<a name="copy">
|
||||
<h3>COPYRIGHT</h3>
|
||||
<blockquote>
|
||||
Copyright © 1995
|
||||
<a href="mailto:david@signus.demon.co.uk">David Firth.</a><br>
|
||||
Copyright © 2002
|
||||
<a href="mailto:atari800-users@lists.sourceforge.net">
|
||||
Atari800 development team</a>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
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.
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
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.
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
</blockquote>
|
||||
|
||||
See <A HREF="COPYING">COPYING</A> file for details.<br><br>
|
||||
All trademarks are the property of their respective companies.
|
||||
|
||||
<a name="contact">
|
||||
<h3>CONTACT</h3>
|
||||
Atari800 Windows port maintainer:
|
||||
<a href="mailto:knik@poczta.onet.pl">Krzysztof Nikiel</a><br>
|
||||
You can find more info at <a href="http://atari800.atari.org/">
|
||||
Atari800 home page</a>.<br>
|
||||
<br><br<br>
|
||||
<center><h6>Page by Krzysztof Nikiel</h6></center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
Trainer searcher
|
||||
================
|
||||
The trainer searcher is a set of four commands (TSS, TSC, TSN and TSP) to find interesting ram addresses.
|
||||
|
||||
You have two options of either a conventional trainer or of a deep trainer, but in either case you will have to put the game into a state first where the lifes are being displayed (means: starting a trainer search for lifes in the title screen yields an unreliable result).
|
||||
|
||||
In both trainers, TSS serves to break an old search and initialize a new one by copying the currently active Atari800 memory to a shadow buffer and setting a flag for each storage cell to "could be a desired location".
|
||||
When giving a number as argument to TSS, then for all memory locations which do not match the number the flag will be set to "is not a desired location". In the process also the other commands TSC and TSN will sort out memory adresses whose values do not satisfy the requirements of the commands.
|
||||
|
||||
In a normal trainer, just create with the current number of your lifes as parameter the command TSS <number>, then change your lives and use then with the changed value TSC <new value> (TSN <new value> does here the same). Print the possible addresses with TSP and look if there are few enough. TSP defaults to a list of the first 64 adresses to print, but may be adapted to your needs by an argument of the maximum count of addresses to print. If there are still more possible life-addresses left than you want to scan manually, repeat losing or gaining a life and executing the TSC <new number> afterwards. E.g. Jet Set Willy fits in this category.
|
||||
|
||||
In a deep trainer you have no clue what the trainer value might be, although it has one commonality - the effect uses one memory location.
|
||||
So start the trainer with TSS (without any number as you dont know it), run around a bit, and lets say you have still all lifes. So you should choose TSN now, return to the game, then lose a life and use TSC, and so on. Alternating use of TSC and TSN yields the best results. Like in the normal trainer, TSP <number> prints a maximum number of possible candidates. Save a state of the game, change one candidate and look what happens. If it has not been the life counter you hoped for load the saved state and change the value of the next address. E.g. the life counter address of Domain of the Undead can only be found by a deep trainer search.
|
||||
|
||||
The search goes through the currently active memory layout of the Atari800. It does not switch ram banks on its own. So if you presume that a trainer address lies not in the currently active memory layout you must switch the memory banks by their respective control adresses before using the trainer searcher commands (and of course, before continuing the game, switch back to the memory banks the running program expects!).
|
||||
|
||||
It is on purpose that the trainer searcher state is not influenced by resets as there are some very changelling searches which require resets (like e.g. the search for the treasure finding ability of Alternate Reality).
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
Atari800 emulator version 3.1.0
|
||||
-------------------------------
|
||||
|
||||
This is a free and portable Atari 8-bit computer and 5200 console emulator,
|
||||
originally written by David Firth and now developed by the Atari800
|
||||
Development Team (please see DOC/CREDITS). This program is copyrighted and
|
||||
released under the GPL (see COPYING).
|
||||
|
||||
Please read DOC/README, DOC/INSTALL and DOC/USAGE.
|
||||
|
||||
For news in this release please do read DOC/NEWS.
|
||||
|
||||
If you have a problem running this emulator please read DOC/FAQ first.
|
||||
If the problem persists then please ask in newsgroup comp.sys.atari.8bit
|
||||
or in the atari800-users mailing list (see below).
|
||||
|
||||
Look at DOC/BUGS before reporting something you consider a bug.
|
||||
|
||||
If you want to help developing Atari800 emulator you can subscribe to our
|
||||
mailing list (http://lists.sourceforge.net/lists/listinfo/atari800-users).
|
||||
DOC/TODO might point you in the right direction.
|
||||
|
||||
This version, and all versions back to 0.8.2 have been released by me (Petr
|
||||
Stehlik) and are now available at Sourceforge.net (URL below). Thanks
|
||||
go to David Firth and all the people that helped making this release.
|
||||
|
||||
EnJoy!
|
||||
|
||||
Petr Stehlik
|
||||
April 12, 2014
|
||||
|
||||
E-mail: pstehlik@sophics.cz
|
||||
|
||||
Project homepage: http://atari800.sourceforge.net/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,254 @@
|
||||
# generic defines used by all distributions.
|
||||
#
|
||||
%define ver 3.1.0
|
||||
# When adding a target, add an $options_<target_name> variable to the %build
|
||||
# section, and add %{_bindir}/%{name}-<target_name> to the files list in the
|
||||
# %files section.
|
||||
%define targets sdl
|
||||
%define maintarget sdl
|
||||
|
||||
%define myrelease 1
|
||||
%define mybuild 1
|
||||
%define _rel %{myrelease}.%{mybuild}
|
||||
|
||||
# define the package groups. If they all followed the same naming convention,
|
||||
# these would be the same. They don't, and so they aren't :(
|
||||
#
|
||||
%define suse_group System/Emulators/Other
|
||||
%define mandriva_group Console/Emulators
|
||||
%define fedora_group Console/Emulators
|
||||
|
||||
# defaults
|
||||
#
|
||||
%define group Console/Emulators
|
||||
%define rel %{_rel}
|
||||
|
||||
%define my_suse 0
|
||||
%define my_mandriva 0
|
||||
%define my_fedora 0
|
||||
%define my_centos 0
|
||||
|
||||
|
||||
%if 0%{?suse_version:1}%{?sles_version:1}
|
||||
%define my_suse 1
|
||||
%endif
|
||||
|
||||
# if present, use %distversion to find out which Mandriva version is being built
|
||||
#
|
||||
%if 0%{?distversion:1}
|
||||
%if 0%{?!mandriva_version:1}
|
||||
%define mandriva_version %(echo $[%{distversion}/10])
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%if 0%{?mandriva_version:1}
|
||||
%define my_mandriva 1
|
||||
%define my_vendor mandriva
|
||||
%endif
|
||||
|
||||
# if present, decode %dist to find out which OS package is being built on
|
||||
#
|
||||
%if 0%{?dist:1}
|
||||
|
||||
# Centos or Fedora
|
||||
#
|
||||
%define my_which_os %(i=%{dist} ; if [ "${i::3}" == ".fc" ] ; then echo "1" ; else echo "0" ; fi )
|
||||
|
||||
%if %{my_which_os}
|
||||
|
||||
%if 0%{?!fedora_version:1}
|
||||
%define fedora_version %(i=%{dist} ; echo "${i:3}" )
|
||||
%endif
|
||||
|
||||
%else
|
||||
|
||||
%if 0%{?!centos_version:1}
|
||||
%define centos_version %(i=%{dist} ; echo "${i:3}00" )
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora_version:1}
|
||||
%define my_fedora 1
|
||||
%define my_vendor fedora
|
||||
%endif
|
||||
|
||||
%if 0%{?centos_version:1}
|
||||
%define my_centos 1
|
||||
%define my_vendor centos
|
||||
%endif
|
||||
|
||||
|
||||
%if %{my_suse}
|
||||
|
||||
%if %{suse_version}
|
||||
%define rel %{myrelease}.suse%(echo $[%suse_version/10]).%{mybuild}
|
||||
%else
|
||||
%define rel %{myrelease}.sles%{sles_version}.%{mybuild}
|
||||
%endif
|
||||
|
||||
%define group %{suse_group}
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
# building on a Mandriva/Mandrake Linux system.
|
||||
#
|
||||
# this should create a release that conforms to the Mandriva naming conventions.
|
||||
#
|
||||
%if %{my_mandriva}
|
||||
|
||||
%define rel %{myrelease}.mdv%{mandriva_version}.%{mybuild}
|
||||
|
||||
%define group %{mandriva_group}
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
# building on a Fedora Core Linux system.
|
||||
#
|
||||
# this should create a release that conforms to the Fedora naming conventions.
|
||||
#
|
||||
%if %{my_fedora}
|
||||
|
||||
%if 0%{?!fedora_version:1}
|
||||
%define fedora_version %(i="%dist" ; echo "${i:3}")
|
||||
%endif
|
||||
|
||||
%if 0%{?!dist:1}
|
||||
%define dist .fc%{fedora_version}
|
||||
%endif
|
||||
|
||||
%define rel %{myrelease}%{dist}.%{mybuild}
|
||||
%define group %{fedora_group}
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
# building on a Centos Linux system.
|
||||
#
|
||||
# this should create a release that conforms to the Centos naming conventions.
|
||||
#
|
||||
%if %{my_centos}
|
||||
|
||||
%if 0%{?!centos_version:1}
|
||||
%define centos_version %(i="%dist" ; echo "${i:3}")
|
||||
%endif
|
||||
|
||||
%if 0%{?!dist:1}
|
||||
%define dist .el%{centos_version}
|
||||
%endif
|
||||
|
||||
%define rel %{myrelease}%{dist}.%{mybuild}
|
||||
%define group %{fedora_group}
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
%if %{my_suse}
|
||||
Requires: SDL >= 1.2.10
|
||||
BuildRequires: SDL-devel >= 1.2.10
|
||||
%endif
|
||||
|
||||
%if %{my_mandriva}
|
||||
Requires: libSDL >= 1.2.10
|
||||
BuildRequires: libSDL-devel >= 1.2.10
|
||||
%endif
|
||||
|
||||
%if %{my_fedora}
|
||||
Requires: SDL >= 1.2.10
|
||||
BuildRequires: SDL-devel >= 1.2.10
|
||||
%endif
|
||||
|
||||
|
||||
# Now for the meat of the spec file
|
||||
#
|
||||
Name: atari800
|
||||
Version: %{ver}
|
||||
Summary: An emulator of 8-bit Atari personal computers
|
||||
License: GPLv2
|
||||
URL: http://atari800.sourceforge.net/
|
||||
Source: http://prdownloads.sourceforge.net/atari800/%{name}-%{version}.tar.gz
|
||||
Group: %{group}
|
||||
Release: %{rel}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: readline-devel
|
||||
|
||||
|
||||
%description
|
||||
Atari800 is an emulator for Atari 8-bit computer systems including the 400,
|
||||
800, 1200XL, 600XL, 800XL, 65XE, 130XE, 800XE and the XE Game System, and also
|
||||
for the Atari 5200 SuperSystem console. It can be used on console, FrameBuffer
|
||||
or X11. It features excellent compatibility, HIFI sound support, artifacting
|
||||
emulation, precise cycle-exact ANTIC/GTIA emulation and more.
|
||||
|
||||
Authors:
|
||||
David Firth
|
||||
and Atari800 Development Team (see CREDITS for a full list)
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
options_sdl="--with-video=sdl --with-sound=sdl"
|
||||
#options_ncurses="--with-video=ncurses --with-sound=oss"
|
||||
#options_x11="--target=x11 --with-sound=oss"
|
||||
|
||||
cd src
|
||||
for target in %{targets}
|
||||
do
|
||||
%configure `eval echo \\\$options_${target}`
|
||||
%{__make} %{?jobs:-j%jobs}
|
||||
mv atari800 atari800-${target}
|
||||
%{__make} clean
|
||||
done
|
||||
touch atari800
|
||||
|
||||
|
||||
%install
|
||||
cd src
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
||||
for target in %{targets}
|
||||
do
|
||||
install -m 755 atari800-$target %{buildroot}/%{_bindir}
|
||||
done
|
||||
(
|
||||
cd %{buildroot}/%{_bindir}
|
||||
ln -sf %{name}-%{maintarget} %{name}
|
||||
)
|
||||
|
||||
mv %{name}.man %{name}.1
|
||||
|
||||
install -m 644 %{name}.1 %{buildroot}/%{_mandir}/man1/
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{name}-%{maintarget}
|
||||
%{_mandir}/man1/%{name}.1.*
|
||||
%doc COPYING
|
||||
%doc README.1ST
|
||||
%doc DOC/BUGS
|
||||
%doc DOC/ChangeLog
|
||||
%doc DOC/CREDITS
|
||||
%doc DOC/FAQ
|
||||
%doc DOC/INSTALL
|
||||
%doc DOC/NEWS
|
||||
%doc DOC/PORTING
|
||||
%doc DOC/README
|
||||
%doc DOC/TODO
|
||||
%doc DOC/USAGE
|
||||
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
%{__rm} -rf %{_builddir}/%{name}-%{version}-%{release}-buildroot
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,356 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.46"
|
||||
version="1.0"
|
||||
sodipodi:docname="atari2.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient3528">
|
||||
<stop
|
||||
style="stop-color:#bebebe;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3530" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3532" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
id="perspective10" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3528"
|
||||
id="linearGradient3534"
|
||||
x1="68.435989"
|
||||
y1="64.22361"
|
||||
x2="122.0442"
|
||||
y2="38.515549"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3528"
|
||||
id="linearGradient3590"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="68.435989"
|
||||
y1="64.22361"
|
||||
x2="122.0442"
|
||||
y2="38.515549" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="1"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="4.59"
|
||||
inkscape:cx="63.367423"
|
||||
inkscape:cy="70.888375"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1061"
|
||||
inkscape:window-height="858"
|
||||
inkscape:window-x="101"
|
||||
inkscape:window-y="0"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:object-paths="false"
|
||||
inkscape:snap-global="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2383"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
dotted="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
id="g3536"
|
||||
transform="matrix(1,0,1.0364434e-2,1,-0.6688011,-0.6535948)">
|
||||
<path
|
||||
id="path3218"
|
||||
d="M 45.043496,11.645848 L 54.44643,15.393422 L 53.941831,32.396367 L 44.538897,28.648793 L 45.043496,11.645848 z"
|
||||
style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 28.530938,33.738135 L 37.933876,37.485708 L 37.429277,54.488653 L 28.026339,50.741081 L 28.530938,33.738135 z"
|
||||
id="path3220" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path3222"
|
||||
d="M 12.018387,55.830421 L 21.421324,59.577994 L 19.402927,127.58978 L 9.9999903,123.8422 L 12.018387,55.830421 z"
|
||||
style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 76.050208,35.473057 L 85.453142,39.220631 L 84.443944,73.226521 L 75.04101,69.478948 L 76.050208,35.473057 z"
|
||||
id="path3224"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 74.536411,86.481893 L 83.939344,90.229464 L 83.434745,107.23241 L 74.031811,103.48484 L 74.536411,86.481893 z"
|
||||
id="path3226" />
|
||||
<path
|
||||
id="path3206"
|
||||
d="M 117.46905,29.041949 L 108.06612,25.294375 L 92.058164,30.383716 L 101.4611,34.13129 L 117.46905,29.041949"
|
||||
style="fill:#9c9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:#9c9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 101.9657,17.128344 L 92.562763,13.38077 L 76.554808,18.470111 L 85.957741,22.217685 L 101.9657,17.128344"
|
||||
id="path3208" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path3210"
|
||||
d="M 86.462341,5.2147403 L 77.059407,1.4671665 L 45.043496,11.645848 L 54.44643,15.393422 L 86.462341,5.2147403"
|
||||
style="fill:#9c9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
id="path3212"
|
||||
d="M 53.941831,32.396367 L 44.538897,28.648793 L 28.530938,33.738135 L 37.933876,37.485708 L 53.941831,32.396367"
|
||||
style="fill:#9c9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:#9c9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 37.429277,54.488653 L 28.026339,50.741081 L 12.018387,55.830421 L 21.421324,59.577994 L 37.429277,54.488653"
|
||||
id="path3214" />
|
||||
<path
|
||||
style="fill:#9c9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 84.443944,73.226521 L 75.04101,69.478948 L 43.025099,79.65763 L 52.428033,83.405203 L 84.443944,73.226521"
|
||||
id="path3216"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
id="path3197"
|
||||
d="M 86.462341,5.2147403 L 85.957741,22.217685 L 101.9657,17.128344 L 101.4611,34.13129 L 117.46905,29.041949 L 115.45066,97.053732 L 83.434745,107.23241 L 83.939344,90.229464 L 51.923434,100.40815 L 51.418834,117.4111 L 19.402927,127.58978 L 21.421324,59.577994 L 37.429277,54.488653 L 37.933876,37.485708 L 53.941831,32.396367 L 54.44643,15.393422 L 86.462341,5.2147403 z M 85.453142,39.220631 L 53.437232,49.399313 L 52.428033,83.405203 L 84.443944,73.226521 L 85.453142,39.220631 z"
|
||||
style="fill:url(#linearGradient3590);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 101.83651,21.481506 L 37.804687,41.83887"
|
||||
id="path3246" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 86.376007,8.1238175 L 54.360097,18.302499"
|
||||
id="path3252" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3254"
|
||||
d="M 117.4065,31.14979 L 85.390587,41.328472"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 53.374677,51.507153 L 21.358769,61.685834"
|
||||
id="path3256"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 116.42108,64.354444 L 20.373349,94.890488"
|
||||
id="path3258"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
id="path3314"
|
||||
d="M 86.266516,11.813224 L 54.250606,21.991905"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 86.157025,15.50263 L 54.141115,25.681311"
|
||||
id="path3316" />
|
||||
<path
|
||||
id="path3318"
|
||||
d="M 86.047534,19.192036 L 54.031624,29.370717"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
id="path3324"
|
||||
d="M 101.946,17.7921 L 37.914178,38.149464"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path3326"
|
||||
d="M 101.72702,25.170912 L 37.695195,45.528276"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 101.61753,28.860318 L 37.585704,49.217682"
|
||||
id="path3328" />
|
||||
<path
|
||||
id="path3330"
|
||||
d="M 101.50803,32.549724 L 37.476213,52.907088"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 117.29701,34.839196 L 85.281096,45.017878"
|
||||
id="path3334"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3336"
|
||||
d="M 53.265186,55.196559 L 21.249278,65.37524"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3338"
|
||||
d="M 117.18752,38.528602 L 85.171605,48.707284"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 53.155695,58.885965 L 21.139787,69.064646"
|
||||
id="path3340"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 117.07802,42.218008 L 85.062114,52.39669"
|
||||
id="path3342"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3344"
|
||||
d="M 53.046204,62.575371 L 21.030296,72.754052"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3346"
|
||||
d="M 116.96853,45.907414 L 84.952623,56.086096"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 52.936712,66.264777 L 20.920805,76.443458"
|
||||
id="path3348"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 116.85904,49.59682 L 84.843132,59.775502"
|
||||
id="path3350"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3352"
|
||||
d="M 52.827221,69.954183 L 20.811313,80.132864"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3354"
|
||||
d="M 116.74955,53.286226 L 84.733641,63.464908"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 52.71773,73.643589 L 20.701822,83.82227"
|
||||
id="path3356"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 116.64006,56.975632 L 84.62415,67.154314"
|
||||
id="path3358"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3360"
|
||||
d="M 52.608239,77.332995 L 20.592331,87.511676"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3362"
|
||||
d="M 116.53057,60.665038 L 84.514658,70.84372"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 52.498748,81.022401 L 20.48284,91.201082"
|
||||
id="path3364"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3370"
|
||||
d="M 116.31159,68.04385 L 20.263858,98.579894"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 116.2021,71.733256 L 20.154367,102.2693"
|
||||
id="path3372"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3374"
|
||||
d="M 116.0926,75.422662 L 20.044876,105.95871"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 115.98311,79.112068 L 19.935384,109.64811"
|
||||
id="path3376"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3380"
|
||||
d="M 115.87362,82.801474 L 83.857712,92.980156"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 51.841801,103.15884 L 19.825893,113.33752"
|
||||
id="path3382"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 115.76413,86.49088 L 83.748221,96.669562"
|
||||
id="path3384"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3386"
|
||||
d="M 51.73231,106.84824 L 19.716402,117.02692"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3388"
|
||||
d="M 115.65464,90.180286 L 83.638729,100.35897"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 51.622819,110.53765 L 19.606911,120.71633"
|
||||
id="path3390"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 115.54515,93.869692 L 83.529238,104.04837"
|
||||
id="path3392"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path3394"
|
||||
d="M 51.513328,114.22706 L 19.49742,124.40574"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f5f5f5;stroke-width:0.30017442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
@@ -0,0 +1,58 @@
|
||||
Getting Atari ROMs
|
||||
------------------
|
||||
|
||||
The Atari ROMs can be downloaded from:
|
||||
|
||||
http://prdownloads.sf.net/atari800/xf25.zip
|
||||
|
||||
Note that if you don't own an Atari, getting the ROMs via ftp may not be
|
||||
legal. You must have the ROMs to use this emulator. The system admin should
|
||||
install the ROMS in /usr/local/lib/atari/ROMS/ or anywhere else if you
|
||||
adapt the configuration file (see the provided atari800.cfg).
|
||||
|
||||
Getting Atari Software
|
||||
----------------------
|
||||
|
||||
To add other software, you'll have to find your own disk images (some are
|
||||
in the xf25.zip I mentioned above), and install them either in
|
||||
/usr/local/lib/atari/DISKS or somewhere else.
|
||||
|
||||
Running the Emulator
|
||||
--------------------
|
||||
|
||||
In the past, 3 versions of the Atari emulator were needed to support both
|
||||
an X version and either vga or curses version for the console.
|
||||
|
||||
With the incorporation of the SDL interface, the same code can run in both
|
||||
the console and an X window.
|
||||
|
||||
Luck,
|
||||
|
||||
-- Dale Scheetz <dwarf@polaris.net>
|
||||
|
||||
From the new maintainer:
|
||||
------------------------
|
||||
|
||||
1st takeover
|
||||
------------
|
||||
|
||||
I took over this package from Dale after using it for some years, thanks Dwarf!
|
||||
|
||||
Future packages should be build with either
|
||||
- diskleds (temporarily visible disk activity indicators) or
|
||||
- siosound (the atari makes some noise for every disk sector transferred).
|
||||
Please vote!
|
||||
|
||||
Join the A-Team to comaintain this and possibly other (Atari-)Emulators and
|
||||
build some common foundation and knowledgebase for emulation within Debian GNU.
|
||||
|
||||
Have a nice day, Martin Albert <ma@debian.org>
|
||||
|
||||
2nd takeover
|
||||
------------
|
||||
|
||||
I took over this package from Martin, thanks for excelent work. I am in close
|
||||
cooperation with Petr Stehlik, who maintains the sources, he is doing
|
||||
excelent job as a release manager.
|
||||
|
||||
Enjoy the package, Antonin Kral <A.Kral@sh.cvut.cz>
|
||||
@@ -0,0 +1,91 @@
|
||||
Atari 800 Emulator, Version 2.2.0
|
||||
OS/A_ROM=/usr/local/lib/atari/ROMS/ATARIOSA.ROM
|
||||
OS/B_ROM=/usr/local/lib/atari/ROMS/ATARIOSB.ROM
|
||||
XL/XE_ROM=/usr/local/lib/atari/ROMS/ATARIXL.ROM
|
||||
BASIC_ROM=/usr/local/lib/atari/ROMS/ATARIBAS.ROM
|
||||
5200_ROM=/usr/local/lib/atari/ROMS/5200.ROM
|
||||
H1_DIR=
|
||||
H2_DIR=
|
||||
H3_DIR=
|
||||
H4_DIR=
|
||||
HD_READ_ONLY=1
|
||||
PRINT_COMMAND=lpr %s
|
||||
SCREEN_REFRESH_RATIO=1
|
||||
MACHINE_TYPE=Atari XL/XE
|
||||
RAM_SIZE=64
|
||||
DEFAULT_TV_MODE=PAL
|
||||
DISABLE_BASIC=1
|
||||
ENABLE_SIO_PATCH=1
|
||||
ENABLE_H_PATCH=1
|
||||
ENABLE_P_PATCH=1
|
||||
STEREO_POKEY=0
|
||||
SPEAKER_SOUND=1
|
||||
MIO_ROM=
|
||||
BLACK_BOX_ROM=
|
||||
XLD_D_ROM=
|
||||
XLD_V_ROM=
|
||||
PROTO80_ROM=
|
||||
AF80_ROM=
|
||||
AF80_CHARSET=
|
||||
COLOURS_NTSC_SATURATION=0
|
||||
COLOURS_NTSC_CONTRAST=0
|
||||
COLOURS_NTSC_BRIGHTNESS=0
|
||||
COLOURS_NTSC_GAMMA=0.3
|
||||
COLOURS_NTSC_HUE=0
|
||||
COLOURS_NTSC_DELAY=21
|
||||
COLOURS_NTSC_EXTERNAL_PALETTE=
|
||||
COLOURS_NTSC_EXTERNAL_PALETTE_LOADED=0
|
||||
COLOURS_NTSC_ADJUST_EXTERNAL_PALETTE=0
|
||||
COLOURS_PAL_SATURATION=0
|
||||
COLOURS_PAL_CONTRAST=0
|
||||
COLOURS_PAL_BRIGHTNESS=0
|
||||
COLOURS_PAL_GAMMA=0.3
|
||||
COLOURS_PAL_EXTERNAL_PALETTE=
|
||||
COLOURS_PAL_EXTERNAL_PALETTE_LOADED=0
|
||||
COLOURS_PAL_ADJUST_EXTERNAL_PALETTE=0
|
||||
SCREEN_SHOW_SPEED=0
|
||||
SCREEN_SHOW_IO_ACTIVITY=1
|
||||
SCREEN_SHOW_IO_COUNTER=0
|
||||
FILTER_NTSC_SHARPNESS=-0.5
|
||||
FILTER_NTSC_RESOLUTION=-0.1
|
||||
FILTER_NTSC_ARTIFACTS=0
|
||||
FILTER_NTSC_FRINGING=0
|
||||
FILTER_NTSC_BLEED=0
|
||||
FILTER_NTSC_BURST_PHASE=0
|
||||
VIDEOMODE_WINDOW_WIDTH=336
|
||||
VIDEOMODE_WINDOW_HEIGHT=240
|
||||
VIDEOMODE_FULLSCREEN_WIDTH=336
|
||||
VIDEOMODE_FULLSCREEN_HEIGHT=240
|
||||
VIDEOMODE_WINDOWED=1
|
||||
VIDEOMODE_HORIZONTAL_AREA=TV
|
||||
VIDEOMODE_VERTICAL_AREA=TV
|
||||
VIDEOMODE_HORIZONTAL_SHIFT=0
|
||||
VIDEOMODE_VERTICAL_SHIFT=0
|
||||
VIDEOMODE_STRETCH=INTEGRAL
|
||||
VIDEOMODE_FIT=BOTH
|
||||
VIDEOMODE_IMAGE_ASPECT=SQUARE-PIXELS
|
||||
VIDEOMODE_ROTATE90=0
|
||||
VIDEOMODE_HOST_ASPECT_RATIO=0:0
|
||||
VIDEOMODE_NTSC_FILTER=0
|
||||
VIDEOMODE_80_COLUMN=1
|
||||
SCANLINES_PERCENTAGE=5
|
||||
INTERPOLATE_SCANLINES=1
|
||||
VIDEO_VSYNC=0
|
||||
VIDEO_ACCEL=0
|
||||
PIXEL_FORMAT=BGR16
|
||||
BILINEAR_FILTERING=0
|
||||
OPENGL_PBO=1
|
||||
VIDEO_BPP=0
|
||||
SDL_JOY_0_ENABLED=1
|
||||
SDL_JOY_0_LEFT=260
|
||||
SDL_JOY_0_RIGHT=262
|
||||
SDL_JOY_0_UP=264
|
||||
SDL_JOY_0_DOWN=261
|
||||
SDL_JOY_0_TRIGGER=305
|
||||
SDL_JOY_1_ENABLED=0
|
||||
SDL_JOY_1_LEFT=97
|
||||
SDL_JOY_1_RIGHT=100
|
||||
SDL_JOY_1_UP=119
|
||||
SDL_JOY_1_DOWN=115
|
||||
SDL_JOY_1_TRIGGER=306
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
atari800 (3.0.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Petr Stehlik <pstehlik@sophics.cz> Sun, 03 Mar 2013 03:03:03 +0200
|
||||
|
||||
atari800 (2.2.1-2) unstable; urgency=low
|
||||
|
||||
* depend on libpng-dev not libpng12-dev (Closes: #662272)
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Mon, 05 Mar 2012 09:29:03 +0100
|
||||
|
||||
atari800 (2.2.1-1) unstable; urgency=low
|
||||
|
||||
* new upstream release fixes kFreeBSD and other things
|
||||
Closes: #621100
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Thu, 28 Apr 2011 18:45:09 +0200
|
||||
|
||||
atari800 (2.2.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Upstream dropped support for X and ncurses versions
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Wed, 06 Apr 2011 13:11:07 +0200
|
||||
|
||||
atari800 (2.1.0-2) unstable; urgency=low
|
||||
|
||||
* Link against libreadline(6) (Closes: #553728)
|
||||
* fixes stale autoconf files
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Tue, 22 Dec 2009 21:45:05 +0100
|
||||
|
||||
atari800 (2.1.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Updated atari800.cfg example config file.
|
||||
* Added dependency to libreadline5-dev.
|
||||
* added libpng12-dev to build depends
|
||||
* hopefully fixed problem with gpg key in keyring
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Tue, 05 May 2009 19:05:33 +0000
|
||||
|
||||
atari800 (2.0.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* added calls to strip to get rid of .comment section (linda complained)
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Wed, 11 Jul 2007 18:49:38 +0000
|
||||
|
||||
atari800 (2.0.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream source. Closes: #288543
|
||||
* Updated atari800.cfg example config file.
|
||||
* Package addopted, Closes: #379022
|
||||
|
||||
-- Antonin Kral <A.Kral@sh.cvut.cz> Sun, 01 Oct 2006 13:59:59 +0200
|
||||
|
||||
atari800 (1.3.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream source and new maintainer (closes: #226787).
|
||||
* Debian/control: remove debhelper and sharutils from Build-Depends.
|
||||
* Debian/rules: handle DEB_BUILD_OPTIONS=noopt,
|
||||
clean: removes src/Makefile and src/config.{h,log,status}.
|
||||
* Update config.{guess,sub} from autotools-dev-20040105.1.
|
||||
* Patch src/rdevice.c::581,583 to use '/dev/ttyS0' on all archs.
|
||||
* Add some notes of new maintainer to README.Debian - thanks Dale.
|
||||
|
||||
-- Martin Albert <ma@debian.org> Thu, 19 Feb 2004 20:09:49 +0100
|
||||
|
||||
atari800 (1.3.1-2) unstable; urgency=low
|
||||
|
||||
* Fixed broken syntax in last changelog entry. Closes: #203707
|
||||
* Changed dependency from xlib6g-dev to xlibs-dev. Closes: #209203
|
||||
* Repaired bad patch. Now deliver upstream changelog and NEWS
|
||||
* Updated /etc/atari800.cfg example in /usr/share/doc/atari800
|
||||
* provided by upstream author.
|
||||
* Fixed several Lintian Warnings/Errors:
|
||||
* Removed /usr/share/doc/atari800/INSTALL.gz
|
||||
* Removed postinst usr-doc-link code
|
||||
* Added copyright reference to /usr/share/common-licenses
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Wed, 8 Oct 2003 17:26:37 -0400
|
||||
|
||||
atari800 (1.3.1-1) unstable; urgency=low
|
||||
|
||||
* new upstream source
|
||||
* updated configure files. Closes: #193397
|
||||
* removed svgalib version, security fix installed upstream. Closes 203707
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Sat, 6 Sep 2003 17:14:56 -0400
|
||||
|
||||
atari800 (1.3.0-2) unstable; urgency=low
|
||||
|
||||
* changed build depends from xlib6g-dev to xlibs-dev and libncurses-dev
|
||||
* to libncurses5-dev. Closes: #188777
|
||||
* new system wide config file example in /usr/share/doc/atari800/atari800.cfg
|
||||
* for details see /usr/share/doc/atari800/README.Debian
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Tue, 13 May 2003 19:00:50 -0400
|
||||
|
||||
atari800 (1.3.0-1) unstable; urgency=low
|
||||
|
||||
* new upstream source. (error in last entry ;-)
|
||||
* modified config and added sdl target to the build
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Sat, 12 Apr 2003 14:56:16 -0400
|
||||
|
||||
atari800 (1.2.2-1) unstable; urgency=low
|
||||
|
||||
* new upstream source. Finally catching up...
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Sat, 16 Mar 2002 20:32:22 -0500
|
||||
|
||||
atari800 (1.0.7-3) unstable; urgency=low
|
||||
|
||||
* Compiled against libncurses5-dev. Closes: #132589
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Sat, 9 Feb 2002 14:32:05 -0500
|
||||
|
||||
atari800 (1.0.7-2) unstable; urgency=low
|
||||
|
||||
* Fixed rules file so svgalib version is only built/installed
|
||||
* on i386 architectures. Closes: #122282, #122779
|
||||
* Added patch to wrap LED_lastline in SET_LED #ifdef to allow reasonable
|
||||
* feature selection. Thanks Stephen!
|
||||
* Fixed USAGE docs for curses mode keyboard controls to declare
|
||||
* the F8 function key starts basic mode operations.
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Fri, 7 Dec 2001 11:47:05 -0500
|
||||
|
||||
atari800 (1.0.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream source. Closes: #81032
|
||||
* Changed Maintainer to match signature. Closes: #104829
|
||||
* Compiled with sound enabled. Closes: #70940
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Sat, 3 Nov 2001 17:25:15 -0500
|
||||
|
||||
atari800 (0.9.9f-3) unstable; urgency=low
|
||||
|
||||
* Added sharutils to build-depends. Closes: #104829
|
||||
|
||||
-- Dale Scheetz (Dwarf #1) <dwarf@polaris.net> Tue, 25 Sep 2001 12:46:15 -0400
|
||||
|
||||
atari800 (0.9.9f-2) unstable; urgency=low
|
||||
|
||||
* new maintainer...
|
||||
|
||||
-- Dale Scheetz <dwarf@polaris.net> Sat, 26 Aug 2000 08:11:23 -0400
|
||||
|
||||
atari800 (0.9.9f-1) unstable; urgency=low
|
||||
|
||||
* Hm, seems this is the package time forgot. I missed checking this into
|
||||
cvs when I converted, and then forgot about it.
|
||||
* New upstream version which fixes X. Closes: #57435
|
||||
* Several changes like build-depends and FHS.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Mon, 1 May 2000 15:35:26 -0700
|
||||
|
||||
atari800 (0.9.8a-2) unstable; urgency=low
|
||||
|
||||
* Updated config file.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Fri, 9 Oct 1998 12:34:44 -0700
|
||||
|
||||
atari800 (0.9.8a-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* No pristine source since upstream source is now a .zip file.
|
||||
* Corrected several apparent dos-isms in the source. Ugh.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Tue, 6 Oct 1998 21:16:02 -0700
|
||||
|
||||
atari800 (0.8.6-3) unstable; urgency=low
|
||||
|
||||
* Don't use icon=none in menu file.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Wed, 5 Aug 1998 14:31:25 -0700
|
||||
|
||||
atari800 (0.8.6-2) unstable; urgency=low
|
||||
|
||||
* Rebuilt with a newer svgalib.
|
||||
* Hacked debian/rules so it still depends on | svgalib-dummyg1.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Sat, 14 Mar 1998 17:44:03 -0800
|
||||
|
||||
atari800 (0.8.6-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Sun, 8 Mar 1998 13:15:06 -0800
|
||||
|
||||
atari800 (0.8.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Sat, 21 Feb 1998 12:35:57 -0800
|
||||
|
||||
atari800 (0.8.2-2) unstable; urgency=low
|
||||
|
||||
* Updated fsf address.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Mon, 9 Feb 1998 13:05:46 -0800
|
||||
|
||||
atari800 (0.8.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Use debhelper.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Fri, 16 Jan 1998 14:34:10 -0500
|
||||
|
||||
atari800 (0.8.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* Libc6.
|
||||
* Moved to contrib: depends on non-free roms.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Mon, 8 Sep 1997 18:43:42 -0400
|
||||
|
||||
atari800 (0.8.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
- Now has sound support!
|
||||
* Changed debian menu file to 1.0 format.
|
||||
* The X version no longer uses xview. This interface has been obsoleted by
|
||||
the menu system that appears if you hit F1.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Sun, 20 Apr 1997 22:06:04 -0400
|
||||
|
||||
atari800 (0.7.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Wed, 2 Apr 1997 18:58:37 -0500
|
||||
|
||||
atari800 (0.6.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Added an atari800 game: Alien Encounter, with permission of
|
||||
author.
|
||||
* Added /etc/atari800.cfg file.
|
||||
* Added svgalib version to debian menu.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Sun, 23 Mar 1997 13:50:54 -0500
|
||||
|
||||
atari800 (0.6.1-1) unstable; urgency=low
|
||||
|
||||
* First release.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Wed, 5 Mar 1997 22:08:42 -0500
|
||||
|
||||
|
||||
Local variables:
|
||||
mode: debian-changelog
|
||||
End:
|
||||
@@ -0,0 +1,20 @@
|
||||
Source: atari800
|
||||
Section: contrib/otherosfs
|
||||
Priority: optional
|
||||
Maintainer: Antonin Kral <A.Kral@sh.cvut.cz>
|
||||
Build-Depends: libsdl1.2-dev, zlib1g-dev, libreadline-dev, libgl1-mesa-dev, libpng-dev, autotools-dev
|
||||
Standards-Version: 3.9.3
|
||||
Vcs-Git: git://github.com/bobek/aranym800-debian.git
|
||||
Vcs-Browser: https://github.com/bobek/aranym800-debian
|
||||
|
||||
Package: atari800
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: Atari800 emulator for SDL
|
||||
This is an emulator of Atari 8-bit computer systems including the 400, 800,
|
||||
1200XL, 600XL, 800XL, 65XE, 130XE, 800XE and the XE Game System,
|
||||
and also of the Atari 5200 SuperSystem console.
|
||||
.
|
||||
The Atari Operating System ROMs are not available with this package, due to
|
||||
copyright. You'll have to either make copies of them from an old Atari
|
||||
computer, or see README.Debian for other ways to obtain them.
|
||||
@@ -0,0 +1,11 @@
|
||||
This is a Debian prepackaged version of the atari800 emulator.
|
||||
|
||||
This package was put together by Dale Scheetz <dwarf@polaris.net>, using
|
||||
sources from:
|
||||
http://atari800.sourceforge.net/
|
||||
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 2011, Atari800 development team. Release under
|
||||
GPLv2 (see /usr/share/common-licenses/GPL-2)
|
||||
@@ -0,0 +1,2 @@
|
||||
?package(atari800):needs="x11" section="Applications/Emulators" \
|
||||
title="Atari Emulator" command="atari800"
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" -a -x /usr/bin/update-menus ]; then update-menus ; fi
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -x /usr/bin/update-menus ]; then update-menus ; fi
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/atari800 ]; then
|
||||
rm -f /usr/doc/atari800
|
||||
fi
|
||||
@@ -0,0 +1,149 @@
|
||||
#!/usr/bin/make -f
|
||||
#
|
||||
# This is a debian/rules make file. It supports the targets:
|
||||
# build, clean, binary-indep, binary-arch, and binary
|
||||
#
|
||||
# Package name variables
|
||||
#
|
||||
P=atari800
|
||||
|
||||
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
|
||||
# Special Debian build options - nostrip yet un-handled
|
||||
export CFLAGS
|
||||
CFLAGS += -g -Wall
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
|
||||
# Build the binary components and assemble the libraries
|
||||
# =====================================================================
|
||||
build: build-arch build-indep
|
||||
build-arch: build-stamp
|
||||
build-indep: build-stamp
|
||||
build-stamp:
|
||||
$(checkdir)
|
||||
debian/rules bld-sdl
|
||||
touch build-stamp
|
||||
|
||||
bld-sdl:
|
||||
cd src ; if [ -e Makefile ]; then $(MAKE) clean; fi
|
||||
cd src ; ./configure \
|
||||
--with-video=sdl --with-sound=sdl
|
||||
cd src ; $(MAKE)
|
||||
|
||||
# Clean up after a build and before building a source package
|
||||
#======================================================================
|
||||
clean:
|
||||
$(checkdir)
|
||||
-rm -f build-stamp
|
||||
cd src ; if [ -e Makefile ]; then $(MAKE) clean; fi; \
|
||||
rm -f config.log config.status config.h Makefile
|
||||
mv ./atari800.spec ./tmp ; rm -f atari800 ; rm -f atari800.* ; mv ./tmp ./atari800.spec
|
||||
-rm -rf debian/tmp debian/*~ *~ *.orig *.log \
|
||||
debian/files* debian/substvars*
|
||||
|
||||
binary: binary-arch
|
||||
|
||||
# No binary independent components to this package
|
||||
#======================================================================
|
||||
binary-indep:
|
||||
#
|
||||
# No independent components
|
||||
#
|
||||
echo "No independent binary components."
|
||||
|
||||
# Install package components into debian/tmp to be built into packages
|
||||
#======================================================================
|
||||
binary-arch: checkroot build
|
||||
|
||||
# Clean out old tmp directory
|
||||
#
|
||||
-rm -rf debian/tmp
|
||||
install -d debian/tmp
|
||||
|
||||
# Install installation scripts
|
||||
#
|
||||
install -d debian/tmp/DEBIAN
|
||||
install -m 755 debian/postinst debian/tmp/DEBIAN/.
|
||||
install -m 755 debian/postrm debian/tmp/DEBIAN/.
|
||||
install -m 755 debian/prerm debian/tmp/DEBIAN/.
|
||||
|
||||
# Install docs in proper directory and gzip them
|
||||
#
|
||||
install -d debian/tmp/usr/share/doc/$(P)
|
||||
cp debian/changelog debian/tmp/usr/share/doc/$(P)/changelog.Debian
|
||||
cp DOC/ChangeLog debian/tmp/usr/share/doc/$(P)/changelog
|
||||
cp DOC/NEWS debian/tmp/usr/share/doc/$(P)/NEWS
|
||||
cp DOC/CREDITS debian/tmp/usr/share/doc/$(P)/CREDITS
|
||||
cp DOC/README debian/tmp/usr/share/doc/$(P)/README
|
||||
cp DOC/USAGE debian/tmp/usr/share/doc/$(P)/USAGE
|
||||
gzip -9v debian/tmp/usr/share/doc/$(P)/*
|
||||
|
||||
# These are too small to gzip
|
||||
#
|
||||
cp DOC/FAQ debian/tmp/usr/share/doc/$(P)/FAQ
|
||||
cp DOC/BUGS debian/tmp/usr/share/doc/$(P)/BUGS
|
||||
cp DOC/TODO debian/tmp/usr/share/doc/$(P)/TODO
|
||||
cp debian/README.Debian debian/tmp/usr/share/doc/$(P)/README.Debian
|
||||
cp debian/atari800.cfg debian/tmp/usr/share/doc/$(P)/atari800.cfg
|
||||
|
||||
|
||||
# and don't gzip the copyright statement
|
||||
#
|
||||
cp debian/copyright debian/tmp/usr/share/doc/$(P)/copyright
|
||||
|
||||
# install and gzip man page
|
||||
#
|
||||
install -d debian/tmp/usr/share/man/man1
|
||||
install -m 644 src/$(P).man debian/tmp/usr/share/man/man1/$(P).1
|
||||
gzip -9 debian/tmp/usr/share/man/man1/$(P).1
|
||||
|
||||
# install menu file
|
||||
#
|
||||
install -d debian/tmp/usr/share/menu
|
||||
install -m 644 debian/menu debian/tmp/usr/share/menu/$(P)
|
||||
|
||||
# install binaries
|
||||
#
|
||||
install -d debian/tmp/usr/bin
|
||||
install -s src/$(P) debian/tmp/usr/bin/$(P)
|
||||
|
||||
strip -R .comment -R .note -R .note.ABI-tag debian/tmp/usr/bin/$(P)
|
||||
|
||||
# (if [ "$(ARCH)" = "i386" ]; then install debian/$(P) debian/tmp/usr/bin; \
|
||||
# else install debian/$(P).alt debian/tmp/usr/bin/$(P); fi)
|
||||
|
||||
# Create dependency information
|
||||
#
|
||||
dpkg-shlibdeps src/$(P)
|
||||
|
||||
# Generate control file for the package
|
||||
#
|
||||
dpkg-gencontrol -p$(P) -isp
|
||||
|
||||
# Clean up file ownership
|
||||
#
|
||||
chown -R root.root debian/tmp
|
||||
|
||||
# and permissions
|
||||
#
|
||||
chmod -R g-ws debian/tmp
|
||||
|
||||
# and build the package
|
||||
#
|
||||
dpkg --build debian/tmp ..
|
||||
|
||||
define checkdir
|
||||
test -f ./atari800.spec
|
||||
endef
|
||||
|
||||
# Below here is fairly generic really
|
||||
checkroot:
|
||||
$(checkdir)
|
||||
test root = "`whoami`"
|
||||
|
||||
.PHONY: binary binary-arch binary-indep clean checkroot
|
||||
@@ -0,0 +1,12 @@
|
||||
atari800.cfg
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.cache
|
||||
configure
|
||||
Makefile
|
||||
SDL_win32_main.c
|
||||
emuos.img
|
||||
atari800
|
||||
@@ -0,0 +1,158 @@
|
||||
CC = @CC@
|
||||
RC = windres
|
||||
|
||||
DEFS = @DEFS@
|
||||
LIBS = @LIBS@
|
||||
TARGET_BASE_NAME = atari800
|
||||
TARGET = $(TARGET_BASE_NAME)@EXEEXT@
|
||||
CONFIGURE_TARGET = @CONFIGURE_TARGET@
|
||||
CONFIGURE_HOST = @CONFIGURE_HOST@
|
||||
ifeq (@CONFIGURE_HOST@, javanvm)
|
||||
FINALTARGET = $(TARGET_BASE_NAME).jar
|
||||
JAVAFLAGS = @JAVAFLAGS@
|
||||
JAVA = java
|
||||
JAVACFLAGS = @JAVACFLAGS@
|
||||
JAVAC = javac
|
||||
else
|
||||
ifeq (@CONFIGURE_TARGET@,android)
|
||||
FINALTARGET = android
|
||||
else
|
||||
FINALTARGET = $(TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS = @CFLAGS@ @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
BIN_DIR = @prefix@/bin
|
||||
MAN_DIR = @prefix@/share/man/man1
|
||||
DOC_DIR = @prefix@/share/doc/atari800
|
||||
|
||||
DESTDIR =
|
||||
|
||||
OBJS = \
|
||||
afile.o \
|
||||
antic.o \
|
||||
atari.o \
|
||||
binload.o \
|
||||
cartridge.o \
|
||||
cassette.o \
|
||||
compfile.o \
|
||||
cfg.o \
|
||||
cpu.o \
|
||||
crc32.o \
|
||||
devices.o \
|
||||
emuos.o \
|
||||
esc.o \
|
||||
gtia.o \
|
||||
img_tape.o \
|
||||
log.o \
|
||||
memory.o \
|
||||
monitor.o \
|
||||
pbi.o \
|
||||
pia.o \
|
||||
pokey.o \
|
||||
rtime.o \
|
||||
sio.o \
|
||||
sysrom.o \
|
||||
util.o \
|
||||
@OBJS@
|
||||
|
||||
|
||||
|
||||
all: $(FINALTARGET)
|
||||
|
||||
# A special rule for SDL_win32_main.c to suppress warnings since this file is
|
||||
# from SDL and should not have to be modified
|
||||
SDL_win32_main.o: SDL_win32_main.c
|
||||
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) -Wno-missing-declarations -Wno-missing-prototypes $<
|
||||
|
||||
# A special rule for win32 to not compile with -ansi -pedantic
|
||||
win32/%.o: win32/%.c
|
||||
$(CC) -c -o $@ $(DEFS) -I. $(patsubst -pedantic,,$(patsubst -ansi,,$(CFLAGS))) $<
|
||||
|
||||
ide.o: ide.c ide.h ide_internal.h
|
||||
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS:-ansi=) $<
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) $<
|
||||
|
||||
%.ro: %.rc
|
||||
$(RC) --define WIN32 --define __MINGW32__ --include-dir . $< $@
|
||||
|
||||
%.o: %.cpp
|
||||
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) $<
|
||||
|
||||
ifeq ($(CONFIGURE_HOST),javanvm)
|
||||
$(TARGET_BASE_NAME).class: javanvm/$(TARGET_BASE_NAME).java | $(TARGET_BASE_NAME)_runtime.class
|
||||
$(JAVAC) -d . $(JAVACFLAGS) javanvm/$(TARGET_BASE_NAME).java
|
||||
RUNTIME = _runtime
|
||||
else
|
||||
RUNTIME =
|
||||
endif
|
||||
|
||||
$(TARGET_BASE_NAME)$(RUNTIME).class: $(TARGET)
|
||||
#To compile using java bytecode directly:
|
||||
# $(JAVA) $(JAVAFLAGS) org.ibex.nestedvm.Compiler -o UnixRuntime -outfile $@ $(TARGET_BASE_NAME)$(RUNTIME) $(TARGET)
|
||||
$(JAVA) $(JAVAFLAGS) org.ibex.nestedvm.Compiler -o UnixRuntime -outformat javasource -outfile $(TARGET_BASE_NAME)$(RUNTIME).java $(TARGET_BASE_NAME)$(RUNTIME) $(TARGET)
|
||||
$(JAVAC) -d . $(JAVACFLAGS) -J-Xmx256m $(TARGET_BASE_NAME)$(RUNTIME).java
|
||||
##Also, -o UnixRuntime fixes directory browsing but requires /c:/-style paths
|
||||
|
||||
$(TARGET_BASE_NAME).jar: $(TARGET_BASE_NAME).class $(TARGET_BASE_NAME)$(RUNTIME).class
|
||||
printf "Manifest-Version: 1.0\nMain-Class: $(TARGET_BASE_NAME)\nClass-Path: unix_runtime.jar\n" > .manifest
|
||||
jar cfm $(TARGET_BASE_NAME).jar .manifest *.class
|
||||
|
||||
# Allow parallel execution in sub-make with '+'
|
||||
android:
|
||||
+ ndk-build -C android
|
||||
ant -f android/build.xml debug
|
||||
.PHONY: android
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
|
||||
dep:
|
||||
@if ! makedepend -Y $(DEFS) -I. ${OBJS:.o=.c} 2>/dev/null; \
|
||||
then echo warning: makedepend failed; fi
|
||||
|
||||
clean:
|
||||
rm -f *.o *.class .manifest $(TARGET) $(TARGET_BASE_NAME).jar $(TARGET_BASE_NAME)_runtime.java core *.bak *~
|
||||
rm -f dos/*.o dos/*.bak dos/*~
|
||||
rm -f falcon/*.o falcon/*.bak falcon/*~
|
||||
rm -f sdl/*.o sdl/*.bak sdl/*~
|
||||
rm -f win32/*.o win32/*.ro win32/*.bak win32/*~
|
||||
rm -f javanvm/*.o javanvm/*.bak javanvm/*~
|
||||
rm -f atari_ntsc/*.o atari_ntsc/*.bak atari_ntsc/*~
|
||||
rm -rf android/libs android/obj android/bin android/gen
|
||||
|
||||
|
||||
distclean: clean
|
||||
-rm -f Makefile configure config.log config.status config.h android/jni/Android.mk
|
||||
-rm -rf autom4te.cache
|
||||
|
||||
install: $(TARGET) installdirs
|
||||
$(INSTALL_PROGRAM) $(TARGET) ${DESTDIR}${BIN_DIR}/$(TARGET)
|
||||
$(INSTALL_DATA) atari800.man ${DESTDIR}${MAN_DIR}/atari800.1
|
||||
# install also the documentation
|
||||
$(INSTALL_DATA) ../COPYING ${DESTDIR}${DOC_DIR}/COPYING
|
||||
$(INSTALL_DATA) ../README.1ST ${DESTDIR}${DOC_DIR}/README.1ST
|
||||
$(INSTALL_DATA) ../DOC/README ${DESTDIR}${DOC_DIR}/README
|
||||
$(INSTALL_DATA) ../DOC/INSTALL ${DESTDIR}${DOC_DIR}/INSTALL
|
||||
$(INSTALL_DATA) ../DOC/USAGE ${DESTDIR}${DOC_DIR}/USAGE
|
||||
$(INSTALL_DATA) ../DOC/NEWS ${DESTDIR}${DOC_DIR}/NEWS
|
||||
|
||||
readme.html: $(TARGET)
|
||||
./$(TARGET) -help </dev/null | ../util/usage2html.pl \
|
||||
../DOC/readme.html.in ../DOC/USAGE ./atari.h > $@
|
||||
|
||||
doc: readme.html
|
||||
|
||||
installdirs:
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) $(DESTDIR)$(MAN_DIR) $(DESTDIR)$(DOC_DIR)
|
||||
Vendored
+187
@@ -0,0 +1,187 @@
|
||||
##############################################
|
||||
## The following part is copied from sdl.m4 ##
|
||||
##############################################
|
||||
|
||||
# Configure paths for SDL
|
||||
# Sam Lantinga 9/21/99
|
||||
# stolen from Manish Singh
|
||||
# stolen back from Frank Belew
|
||||
# stolen from Manish Singh
|
||||
# Shamelessly stolen from Owen Taylor
|
||||
|
||||
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_SDL],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the sdl-config script
|
||||
dnl
|
||||
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
|
||||
sdl_prefix="$withval", sdl_prefix="")
|
||||
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
|
||||
sdl_exec_prefix="$withval", sdl_exec_prefix="")
|
||||
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
|
||||
, enable_sdltest=yes)
|
||||
|
||||
if test x$sdl_exec_prefix != x ; then
|
||||
sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
|
||||
if test x${SDL_CONFIG+set} != xset ; then
|
||||
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
|
||||
fi
|
||||
fi
|
||||
if test x$sdl_prefix != x ; then
|
||||
sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
|
||||
if test x${SDL_CONFIG+set} != xset ; then
|
||||
SDL_CONFIG=$sdl_prefix/bin/sdl-config
|
||||
fi
|
||||
fi
|
||||
|
||||
as_save_PATH="$PATH"
|
||||
if test "x$prefix" != xNONE; then
|
||||
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
|
||||
fi
|
||||
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
|
||||
PATH="$as_save_PATH"
|
||||
min_sdl_version=ifelse([$1], ,0.11.0,$1)
|
||||
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
|
||||
no_sdl=""
|
||||
if test "$SDL_CONFIG" = "no" ; then
|
||||
no_sdl=yes
|
||||
else
|
||||
SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
|
||||
SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
|
||||
|
||||
sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_sdltest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed SDL is sufficiently new. (Also sanity
|
||||
dnl checks the results of sdl-config to some extent
|
||||
dnl
|
||||
rm -f conf.sdltest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "SDL.h"
|
||||
|
||||
char*
|
||||
my_strdup (char *str)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
if (str)
|
||||
{
|
||||
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
|
||||
strcpy (new_str, str);
|
||||
}
|
||||
else
|
||||
new_str = NULL;
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
/* This hangs on some systems (?)
|
||||
system ("touch conf.sdltest");
|
||||
*/
|
||||
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = my_strdup("$min_sdl_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_sdl_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (($sdl_major_version > major) ||
|
||||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
|
||||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
|
||||
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
|
||||
printf("*** best to upgrade to the required version.\n");
|
||||
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
|
||||
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
|
||||
printf("*** config.cache before re-running configure\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_sdl" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$SDL_CONFIG" = "no" ; then
|
||||
echo "*** The sdl-config script installed by SDL could not be found"
|
||||
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the SDL_CONFIG environment variable to the"
|
||||
echo "*** full path to sdl-config."
|
||||
else
|
||||
if test -f conf.sdltest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run SDL test program, checking why..."
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include "SDL.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{ return 0; }
|
||||
#undef main
|
||||
#define main K_and_R_C_main
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding SDL or finding the wrong"
|
||||
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
|
||||
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
SDL_CFLAGS=""
|
||||
SDL_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(SDL_CFLAGS)
|
||||
AC_SUBST(SDL_LIBS)
|
||||
rm -f conf.sdltest
|
||||
])
|
||||
@@ -0,0 +1,390 @@
|
||||
/*
|
||||
* af80.c - Emulation of the Austin Franklin 80 column card.
|
||||
*
|
||||
* Copyright (C) 2009 Perry McFarlane
|
||||
* Copyright (C) 2009 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "af80.h"
|
||||
#include "atari.h"
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "memory.h"
|
||||
#include "cpu.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
static UBYTE *af80_rom = NULL;
|
||||
static char af80_rom_filename[FILENAME_MAX];
|
||||
static UBYTE *af80_charset = NULL;
|
||||
static char af80_charset_filename[FILENAME_MAX];
|
||||
|
||||
static UBYTE *af80_screen = NULL;
|
||||
static UBYTE *af80_attrib = NULL;
|
||||
|
||||
int AF80_enabled = FALSE;
|
||||
|
||||
/* Austin Franklin information from forum posts by warerat at Atariage */
|
||||
static int rom_bank_select; /* bits 0-3 of d5f7, $0-$f 16 banks */
|
||||
static int not_rom_output_enable; /* bit 4 of d5f7 0 = Enable ROM 1 = Disable ROM */
|
||||
static int not_right_cartridge_rd4_control; /* 0=$8000-$9fff cart ROM, 1= $8000-$9fff system RAM */
|
||||
static int not_enable_2k_character_ram;
|
||||
static int not_enable_2k_attribute_ram;
|
||||
static int not_enable_crtc_registers;
|
||||
static int not_enable_80_column_output;
|
||||
static int video_bank_select; /* bits 0-3 of d5f6, $0-$f 16 banks */
|
||||
static int crtreg[0x40];
|
||||
static int const rgbi_palette[16] = {
|
||||
0x000000, /* black */
|
||||
0x0000AA, /* blue */
|
||||
0x00AA00, /* green */
|
||||
0x00AAAA, /* cyan */
|
||||
0xAA0000, /* red */
|
||||
0xAA00AA, /* magenta */
|
||||
0xAA5500, /* brown */
|
||||
0xAAAAAA, /* white */
|
||||
0x555555, /* grey */
|
||||
0x5555FF, /* light blue */
|
||||
0x55FF55, /* light green */
|
||||
0x55FFFF, /* light cyan */
|
||||
0xFF5555, /* light red */
|
||||
0xFF55FF, /* light magenta */
|
||||
0xFFFF55, /* yellow */
|
||||
0xFFFFFF /* white (high intensity) */
|
||||
};
|
||||
int AF80_palette[16];
|
||||
|
||||
#ifdef AF80_DEBUG
|
||||
#define D(a) a
|
||||
#else
|
||||
#define D(a) do{}while(0)
|
||||
#endif
|
||||
|
||||
static void update_d6(void)
|
||||
{
|
||||
if (!not_enable_2k_character_ram) {
|
||||
memcpy(MEMORY_mem + 0xd600, af80_screen + (video_bank_select<<7), 0x80);
|
||||
memcpy(MEMORY_mem + 0xd680, af80_screen + (video_bank_select<<7), 0x80);
|
||||
}
|
||||
else if (!not_enable_2k_attribute_ram) {
|
||||
memcpy(MEMORY_mem + 0xd600, af80_attrib + (video_bank_select<<7), 0x80);
|
||||
memcpy(MEMORY_mem + 0xd680, af80_attrib + (video_bank_select<<7), 0x80);
|
||||
}
|
||||
else if (not_enable_crtc_registers) {
|
||||
memset(MEMORY_mem + 0xd600, 0xff, 0x100);
|
||||
}
|
||||
}
|
||||
|
||||
static void update_d5(void)
|
||||
{
|
||||
if (not_rom_output_enable) {
|
||||
memset(MEMORY_mem + 0xd500, 0xff, 0x100);
|
||||
}
|
||||
else {
|
||||
memcpy(MEMORY_mem + 0xd500, af80_rom + (rom_bank_select<<8), 0x100);
|
||||
}
|
||||
}
|
||||
|
||||
static void update_8000_9fff(void)
|
||||
{
|
||||
if (not_right_cartridge_rd4_control) return;
|
||||
if (not_rom_output_enable) {
|
||||
memset(MEMORY_mem + 0x8000, 0xff, 0x2000);
|
||||
}
|
||||
else {
|
||||
int i;
|
||||
for (i=0; i<32; i++) {
|
||||
memcpy(MEMORY_mem + 0x8000 + (i<<8), af80_rom + (rom_bank_select<<8), 0x100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int AF80_Initialise(int *argc, char *argv[])
|
||||
{
|
||||
int i, j;
|
||||
int help_only = FALSE;
|
||||
for (i = j = 1; i < *argc; i++) {
|
||||
if (strcmp(argv[i], "-af80") == 0) {
|
||||
AF80_enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
if (strcmp(argv[i], "-help") == 0) {
|
||||
help_only = TRUE;
|
||||
Log_print("\t-af80 Emulate the Austin Franklin 80 column board");
|
||||
}
|
||||
argv[j++] = argv[i];
|
||||
}
|
||||
}
|
||||
*argc = j;
|
||||
|
||||
if (help_only)
|
||||
return TRUE;
|
||||
|
||||
if (AF80_enabled) {
|
||||
Log_print("Austin Franklin 80 enabled");
|
||||
af80_rom = (UBYTE *)Util_malloc(0x1000);
|
||||
if (!Atari800_LoadImage(af80_rom_filename, af80_rom, 0x1000)) {
|
||||
free(af80_rom);
|
||||
af80_rom = NULL;
|
||||
AF80_enabled = FALSE;
|
||||
Log_print("Couldn't load Austin Franklin ROM image");
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
Log_print("loaded Austin Franklin rom image");
|
||||
}
|
||||
af80_charset = (UBYTE *)Util_malloc(0x1000);
|
||||
if (!Atari800_LoadImage(af80_charset_filename, af80_charset, 0x1000)) {
|
||||
free(af80_charset);
|
||||
free(af80_rom);
|
||||
af80_charset = af80_rom = NULL;
|
||||
AF80_enabled = FALSE;
|
||||
Log_print("Couldn't load Austin Franklin charset image");
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
Log_print("loaded Austin Franklin charset image");
|
||||
}
|
||||
af80_screen = (UBYTE *)Util_malloc(0x800);
|
||||
af80_attrib = (UBYTE *)Util_malloc(0x800);
|
||||
AF80_Reset();
|
||||
|
||||
/* swap palette */
|
||||
for (i=0; i<16; i++ ) {
|
||||
j=i;
|
||||
j = (j&0x0a) + ((j&0x01) << 2) + ((j&0x04) >> 2);
|
||||
AF80_palette[i] = rgbi_palette[j];
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void AF80_Exit(void)
|
||||
{
|
||||
free(af80_screen);
|
||||
free(af80_attrib);
|
||||
free(af80_charset);
|
||||
free(af80_rom);
|
||||
af80_screen = af80_attrib = af80_charset = af80_rom = NULL;
|
||||
}
|
||||
|
||||
void AF80_InsertRightCartridge(void)
|
||||
{
|
||||
MEMORY_Cart809fEnable();
|
||||
update_d5();
|
||||
update_8000_9fff();
|
||||
}
|
||||
|
||||
int AF80_ReadConfig(char *string, char *ptr)
|
||||
{
|
||||
if (strcmp(string, "AF80_ROM") == 0)
|
||||
Util_strlcpy(af80_rom_filename, ptr, sizeof(af80_rom_filename));
|
||||
else if (strcmp(string, "AF80_CHARSET") == 0)
|
||||
Util_strlcpy(af80_charset_filename, ptr, sizeof(af80_charset_filename));
|
||||
else return FALSE; /* no match */
|
||||
return TRUE; /* matched something */
|
||||
}
|
||||
|
||||
void AF80_WriteConfig(FILE *fp)
|
||||
{
|
||||
fprintf(fp, "AF80_ROM=%s\n", af80_rom_filename);
|
||||
fprintf(fp, "AF80_CHARSET=%s\n", af80_charset_filename);
|
||||
}
|
||||
|
||||
int AF80_D6GetByte(UWORD addr, int no_side_effects)
|
||||
{
|
||||
int result = 0xff;
|
||||
if (!not_enable_2k_character_ram) {
|
||||
result = MEMORY_dGetByte(addr);
|
||||
}
|
||||
else if (!not_enable_2k_attribute_ram) {
|
||||
result = MEMORY_dGetByte(addr);
|
||||
}
|
||||
else if (!not_enable_crtc_registers) {
|
||||
if (video_bank_select == 0 ) {
|
||||
if ((addr&0xff)<0x40) {
|
||||
result = crtreg[addr&0xff];
|
||||
if ((addr&0xff) == 0x3a) {
|
||||
result = 0x01;
|
||||
}
|
||||
}
|
||||
D(printf("AF80 Read addr:%4x cpu:%4x\n", addr, CPU_remember_PC[(CPU_remember_PC_curpos-1)%CPU_REMEMBER_PC_STEPS]));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void AF80_D6PutByte(UWORD addr, UBYTE byte)
|
||||
{
|
||||
if (!not_enable_2k_character_ram) {
|
||||
MEMORY_dPutByte((addr&0xff7f),byte);
|
||||
MEMORY_dPutByte((addr&0xff7f)+0x80,byte);
|
||||
af80_screen[(addr&0x7f) + (video_bank_select<<7)] = byte;
|
||||
}
|
||||
else if (!not_enable_2k_attribute_ram) {
|
||||
MEMORY_dPutByte((addr&0xff7f),byte);
|
||||
MEMORY_dPutByte((addr&0xff7f)+0x80,byte);
|
||||
af80_attrib[(addr&0x7f) + (video_bank_select<<7)] = byte;
|
||||
D(printf("AF80 Write, attribute, addr:%4x byte:%2x, cpu:%4x\n", addr, byte,CPU_remember_PC[(CPU_remember_PC_curpos-1)%CPU_REMEMBER_PC_STEPS]));
|
||||
}
|
||||
else if (!not_enable_crtc_registers) {
|
||||
if (video_bank_select == 0 ) {
|
||||
if ((addr&0xff)<0x40) {
|
||||
crtreg[addr&0xff] = byte;
|
||||
}
|
||||
D(if (1 || (addr!=0xd618 && addr!=0xd619)) printf("AF80 Write addr:%4x byte:%2x, cpu:%4x\n", addr, byte,CPU_remember_PC[(CPU_remember_PC_curpos-1)%CPU_REMEMBER_PC_STEPS]));
|
||||
}
|
||||
else {
|
||||
D(printf("AF80 Write, video_bank_select!=0, addr:%4x byte:%2x, cpu:%4x\n", addr, byte,CPU_remember_PC[(CPU_remember_PC_curpos-1)%CPU_REMEMBER_PC_STEPS]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int AF80_D5GetByte(UWORD addr, int no_side_effects)
|
||||
{
|
||||
int result = MEMORY_dGetByte(addr);
|
||||
return result;
|
||||
}
|
||||
|
||||
void AF80_D5PutByte(UWORD addr, UBYTE byte)
|
||||
{
|
||||
if (addr == 0xd5f6) {
|
||||
int need_update_d6 = FALSE;
|
||||
if ((byte&0x10) != not_enable_2k_character_ram) {
|
||||
not_enable_2k_character_ram = (byte & 0x10);
|
||||
need_update_d6 = TRUE;
|
||||
}
|
||||
if ((byte&0x20) != not_enable_2k_attribute_ram) {
|
||||
not_enable_2k_attribute_ram = (byte & 0x20);
|
||||
need_update_d6 = TRUE;
|
||||
}
|
||||
if ((byte&0x40) != not_enable_crtc_registers) {
|
||||
not_enable_crtc_registers = (byte & 0x40);
|
||||
need_update_d6 = TRUE;
|
||||
}
|
||||
if ((byte&0x80) != not_enable_80_column_output) {
|
||||
not_enable_80_column_output = (byte & 0x80);
|
||||
}
|
||||
if ((byte&0x0f) != video_bank_select) {
|
||||
video_bank_select = (byte & 0x0f);
|
||||
need_update_d6 = TRUE;
|
||||
}
|
||||
if (need_update_d6) {
|
||||
update_d6();
|
||||
}
|
||||
}
|
||||
else if (addr == 0xd5f7) {
|
||||
int need_update_d5 = FALSE;
|
||||
int need_update_8000_9fff = FALSE;
|
||||
if ((byte&0x10) != not_rom_output_enable) {
|
||||
not_rom_output_enable = (byte & 0x10);
|
||||
need_update_d5 = TRUE;
|
||||
if (byte&0x20) {
|
||||
need_update_8000_9fff = TRUE;
|
||||
}
|
||||
}
|
||||
if ((byte&0x20) != not_right_cartridge_rd4_control) {
|
||||
not_right_cartridge_rd4_control = (byte & 0x20);
|
||||
if (not_right_cartridge_rd4_control) {
|
||||
MEMORY_Cart809fDisable();
|
||||
}
|
||||
else {
|
||||
MEMORY_Cart809fEnable();
|
||||
need_update_8000_9fff = TRUE;
|
||||
}
|
||||
}
|
||||
if ((byte&0x0f) != rom_bank_select) {
|
||||
rom_bank_select = (byte & 0x0f);
|
||||
if (!not_rom_output_enable) {
|
||||
need_update_d5 = TRUE;
|
||||
if (!not_right_cartridge_rd4_control) {
|
||||
need_update_8000_9fff = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (need_update_d5) {
|
||||
update_d5();
|
||||
}
|
||||
if (need_update_8000_9fff) {
|
||||
update_8000_9fff();
|
||||
}
|
||||
}
|
||||
D(if (addr!=0xd5f7 && addr!=0xd5f6) printf("AF80 Write addr:%4x byte:%2x, cpu:%4x\n", addr, byte,CPU_remember_PC[(CPU_remember_PC_curpos-1)%CPU_REMEMBER_PC_STEPS]));
|
||||
}
|
||||
|
||||
UBYTE AF80_GetPixels(int scanline, int column, int *colour, int blink)
|
||||
{
|
||||
#define AF80_ROWS 25
|
||||
#define AF80_CELL_HEIGHT 10
|
||||
UBYTE character;
|
||||
int attrib;
|
||||
UBYTE font_data;
|
||||
int table_start = crtreg[0x0c] + ((crtreg[0x0d]&0x3f)<<8);
|
||||
int row = scanline / AF80_CELL_HEIGHT;
|
||||
int line = scanline % AF80_CELL_HEIGHT;
|
||||
int screen_pos;
|
||||
if (row >= AF80_ROWS) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (row >= crtreg[0x10]) {
|
||||
screen_pos = (row-crtreg[0x10])*80 + column + crtreg[0x0e] + ((crtreg[0x0f]&0x3f)<<8);
|
||||
}
|
||||
else {
|
||||
screen_pos = row*80+column + table_start;
|
||||
}
|
||||
screen_pos &= 0x7ff;
|
||||
character = af80_screen[screen_pos];
|
||||
attrib = af80_attrib[screen_pos];
|
||||
font_data = af80_charset[character*16 + line];
|
||||
if (attrib & 0x01) {
|
||||
font_data ^= 0xff; /* invert */
|
||||
}
|
||||
if ((attrib & 0x02) && blink) {
|
||||
font_data = 0x00; /* blink */
|
||||
}
|
||||
if (line+1 == AF80_CELL_HEIGHT && (attrib & 0x04)) {
|
||||
font_data = 0xff; /* underline */
|
||||
}
|
||||
if (row == crtreg[0x18] && column == crtreg[0x19] && !blink) {
|
||||
font_data = 0xff; /* cursor */
|
||||
}
|
||||
*colour = attrib>>4; /* set number of palette entry */
|
||||
return font_data;
|
||||
}
|
||||
|
||||
void AF80_Reset(void)
|
||||
{
|
||||
memset(af80_screen, 0, 0x800);
|
||||
memset(af80_attrib, 0, 0x800);
|
||||
rom_bank_select = 0;
|
||||
not_rom_output_enable = 0;
|
||||
not_right_cartridge_rd4_control = 0;
|
||||
not_enable_2k_character_ram = 0;
|
||||
not_enable_2k_attribute_ram = 0;
|
||||
not_enable_crtc_registers = 0;
|
||||
not_enable_80_column_output = 0;
|
||||
video_bank_select = 0;
|
||||
memset(crtreg, 0, 0x40);
|
||||
}
|
||||
|
||||
/*
|
||||
vim:ts=4:sw=4:
|
||||
*/
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef AF80_H_
|
||||
#define AF80_H_
|
||||
|
||||
#include "atari.h"
|
||||
#include <stdio.h>
|
||||
|
||||
extern int AF80_palette[16];
|
||||
int AF80_Initialise(int *argc, char *argv[]);
|
||||
void AF80_Exit(void);
|
||||
void AF80_InsertRightCartridge(void);
|
||||
int AF80_ReadConfig(char *string, char *ptr);
|
||||
void AF80_WriteConfig(FILE *fp);
|
||||
int AF80_D5GetByte(UWORD addr, int no_side_effects);
|
||||
void AF80_D5PutByte(UWORD addr, UBYTE byte);
|
||||
int AF80_D6GetByte(UWORD addr, int no_side_effects);
|
||||
void AF80_D6PutByte(UWORD addr, UBYTE byte);
|
||||
UBYTE AF80_GetPixels(int scanline, int column, int *colour, int blink);
|
||||
extern int AF80_enabled;
|
||||
void AF80_Reset(void);
|
||||
|
||||
#endif /* AF80_H_ */
|
||||
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
* afile.c - Detection and opening of different Atari file types.
|
||||
*
|
||||
* Copyright (c) 1998-2008 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "atari.h"
|
||||
#include "afile.h"
|
||||
#include "binload.h"
|
||||
#include "cartridge.h"
|
||||
#include "cassette.h"
|
||||
#include "gtia.h"
|
||||
#include "img_tape.h"
|
||||
#include "log.h"
|
||||
#include "sio.h"
|
||||
#include "statesav.h"
|
||||
#include "util.h"
|
||||
#ifndef BASIC
|
||||
#include "ui.h"
|
||||
#endif /* BASIC */
|
||||
#ifdef HAVE_LIBZ
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int AFILE_DetectFileType(const char *filename)
|
||||
{
|
||||
UBYTE header[4];
|
||||
int file_length;
|
||||
FILE *fp = fopen(filename, "rb");
|
||||
if (fp == NULL)
|
||||
return AFILE_ERROR;
|
||||
if (fread(header, 1, 4, fp) != 4) {
|
||||
fclose(fp);
|
||||
return AFILE_ERROR;
|
||||
}
|
||||
switch (header[0]) {
|
||||
case 0:
|
||||
if (header[1] == 0 && (header[2] != 0 || header[3] != 0) /* && file_length < 37 * 1024 */) {
|
||||
fclose(fp);
|
||||
return AFILE_BAS;
|
||||
}
|
||||
break;
|
||||
case 0x1f:
|
||||
if (header[1] == 0x8b) {
|
||||
#ifndef HAVE_LIBZ
|
||||
fclose(fp);
|
||||
Log_print("\"%s\" is a compressed file.", filename);
|
||||
Log_print("This executable does not support compressed files. You can uncompress this file");
|
||||
Log_print("with an external program that supports gzip (*.gz) files (e.g. gunzip)");
|
||||
Log_print("and then load into this emulator.");
|
||||
return AFILE_ERROR;
|
||||
#else /* HAVE_LIBZ */
|
||||
gzFile gzf;
|
||||
fclose(fp);
|
||||
gzf = gzopen(filename, "rb");
|
||||
if (gzf == NULL)
|
||||
return AFILE_ERROR;
|
||||
if (gzread(gzf, header, 4) != 4) {
|
||||
gzclose(gzf);
|
||||
return AFILE_ERROR;
|
||||
}
|
||||
gzclose(gzf);
|
||||
if (header[0] == 0x96 && header[1] == 0x02)
|
||||
return AFILE_ATR_GZ;
|
||||
if (header[0] == 'A' && header[1] == 'T' && header[2] == 'A' && header[3] == 'R')
|
||||
return AFILE_STATE_GZ;
|
||||
return AFILE_XFD_GZ;
|
||||
#endif /* HAVE_LIBZ */
|
||||
}
|
||||
break;
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if ((header[1] >= '0' && header[1] <= '9') || header[1] == ' ') {
|
||||
fclose(fp);
|
||||
return AFILE_LST;
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
if (header[1] == 'T' && header[2] == 'A' && header[3] == 'R') {
|
||||
fclose(fp);
|
||||
return AFILE_STATE;
|
||||
}
|
||||
if (header[1] == 'T' && header[2] == '8' && header[3] == 'X') {
|
||||
fclose(fp);
|
||||
return AFILE_ATX;
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
if (header[1] == 'A' && header[2] == 'R' && header[3] == 'T') {
|
||||
fclose(fp);
|
||||
return AFILE_CART;
|
||||
}
|
||||
break;
|
||||
case 0x96:
|
||||
if (header[1] == 0x02) {
|
||||
fclose(fp);
|
||||
return AFILE_ATR;
|
||||
}
|
||||
break;
|
||||
case 0xf9:
|
||||
case 0xfa:
|
||||
fclose(fp);
|
||||
return AFILE_DCM;
|
||||
case 0xff:
|
||||
if (header[1] == 0xff && (header[2] != 0xff || header[3] != 0xff)) {
|
||||
fclose(fp);
|
||||
return AFILE_XEX;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
file_length = Util_flen(fp);
|
||||
fclose(fp);
|
||||
/* Detect .pro images */
|
||||
/* # of sectors is in header */
|
||||
if ((file_length-16)%(128+12) == 0 &&
|
||||
header[0]*256 + header[1] == (file_length-16)/(128+12) &&
|
||||
header[2] == 'P') {
|
||||
#ifdef DEBUG_PRO
|
||||
Log_print(".pro file detected");
|
||||
#endif
|
||||
return AFILE_PRO;
|
||||
}
|
||||
/* 40K or a-power-of-two between 4K and CARTRIDGE_MAX_SIZE */
|
||||
if (file_length >= 4 * 1024 && file_length <= CARTRIDGE_MAX_SIZE
|
||||
&& ((file_length & (file_length - 1)) == 0 || file_length == 40 * 1024))
|
||||
return AFILE_ROM;
|
||||
/* BOOT_TAPE is a raw file containing a program booted from a tape */
|
||||
if ((header[1] << 7) == file_length)
|
||||
return AFILE_BOOT_TAPE;
|
||||
if ((file_length & 0x7f) == 0)
|
||||
return AFILE_XFD;
|
||||
if (IMG_TAPE_FileSupported(header))
|
||||
return AFILE_CAS;
|
||||
return AFILE_ERROR;
|
||||
}
|
||||
|
||||
int AFILE_OpenFile(const char *filename, int reboot, int diskno, int readonly)
|
||||
{
|
||||
int type = AFILE_DetectFileType(filename);
|
||||
switch (type) {
|
||||
case AFILE_ATR:
|
||||
case AFILE_ATX:
|
||||
case AFILE_XFD:
|
||||
case AFILE_ATR_GZ:
|
||||
case AFILE_XFD_GZ:
|
||||
case AFILE_DCM:
|
||||
case AFILE_PRO:
|
||||
if (!SIO_Mount(diskno, filename, readonly))
|
||||
return AFILE_ERROR;
|
||||
if (reboot)
|
||||
Atari800_Coldstart();
|
||||
break;
|
||||
case AFILE_XEX:
|
||||
case AFILE_BAS:
|
||||
case AFILE_LST:
|
||||
if (!BINLOAD_Loader(filename))
|
||||
return AFILE_ERROR;
|
||||
break;
|
||||
case AFILE_CART:
|
||||
case AFILE_ROM:
|
||||
{
|
||||
int r;
|
||||
if (reboot)
|
||||
r = CARTRIDGE_InsertAutoReboot(filename);
|
||||
else
|
||||
r = CARTRIDGE_Insert(filename);
|
||||
switch (r) {
|
||||
case CARTRIDGE_CANT_OPEN:
|
||||
case CARTRIDGE_BAD_FORMAT:
|
||||
return AFILE_ERROR;
|
||||
case CARTRIDGE_BAD_CHECKSUM:
|
||||
case 0:
|
||||
/* ok */
|
||||
break;
|
||||
default:
|
||||
#ifdef BASIC
|
||||
Log_print("Raw cartridge images are not supported in BASIC version.");
|
||||
return AFILE_ERROR;
|
||||
#else /* BASIC */
|
||||
/* r > 0 */
|
||||
#ifndef ANDROID
|
||||
CARTRIDGE_SetTypeAutoReboot(&CARTRIDGE_main, UI_SelectCartType(r));
|
||||
#else
|
||||
return (r << 8) | AFILE_ROM;
|
||||
#endif /* ANDROID */
|
||||
break;
|
||||
#endif /* BASIC */
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AFILE_CAS:
|
||||
case AFILE_BOOT_TAPE:
|
||||
if (!CASSETTE_Insert(filename))
|
||||
return AFILE_ERROR;
|
||||
if (reboot) {
|
||||
CASSETTE_hold_start = TRUE;
|
||||
Atari800_Coldstart();
|
||||
}
|
||||
break;
|
||||
case AFILE_STATE:
|
||||
case AFILE_STATE_GZ:
|
||||
#ifdef BASIC
|
||||
Log_print("State files are not supported in BASIC version");
|
||||
return AFILE_ERROR;
|
||||
#else
|
||||
if (!StateSav_ReadAtariState(filename, "rb"))
|
||||
return AFILE_ERROR;
|
||||
/* Don't press Start nor Option */
|
||||
GTIA_consol_override = 0;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef AFILE_H_
|
||||
#define AFILE_H_
|
||||
|
||||
/* File types returned by AFILE_DetectFileType() and AFILE_OpenFile(). */
|
||||
#define AFILE_ERROR 0
|
||||
#define AFILE_ATR 1
|
||||
#define AFILE_XFD 2
|
||||
#define AFILE_ATR_GZ 3
|
||||
#define AFILE_XFD_GZ 4
|
||||
#define AFILE_DCM 5
|
||||
#define AFILE_XEX 6
|
||||
#define AFILE_BAS 7
|
||||
#define AFILE_LST 8
|
||||
#define AFILE_CART 9
|
||||
#define AFILE_ROM 10
|
||||
#define AFILE_CAS 11
|
||||
#define AFILE_BOOT_TAPE 12
|
||||
#define AFILE_STATE 13
|
||||
#define AFILE_STATE_GZ 14
|
||||
#define AFILE_PRO 15
|
||||
#define AFILE_ATX 16
|
||||
|
||||
/* ATR format header */
|
||||
struct AFILE_ATR_Header {
|
||||
unsigned char magic1;
|
||||
unsigned char magic2;
|
||||
unsigned char seccountlo;
|
||||
unsigned char seccounthi;
|
||||
unsigned char secsizelo;
|
||||
unsigned char secsizehi;
|
||||
unsigned char hiseccountlo;
|
||||
unsigned char hiseccounthi;
|
||||
unsigned char gash[7];
|
||||
unsigned char writeprotect;
|
||||
};
|
||||
|
||||
/* First two bytes of an ATR file. */
|
||||
#define AFILE_ATR_MAGIC1 0x96
|
||||
#define AFILE_ATR_MAGIC2 0x02
|
||||
|
||||
/* Auto-detects file type and returns one of AFILE_* values. */
|
||||
int AFILE_DetectFileType(const char *filename);
|
||||
|
||||
/* Auto-detects file type and mounts the file in the emulator.
|
||||
reboot: Atari800_Coldstart() for disks, cartridges and tapes
|
||||
diskno: drive number for disks (1-8)
|
||||
readonly: mount disks as read-only */
|
||||
int AFILE_OpenFile(const char *filename, int reboot, int diskno, int readonly);
|
||||
|
||||
#endif /* AFILE_H_ */
|
||||
@@ -0,0 +1,255 @@
|
||||
#ifndef AKEY_H_
|
||||
#define AKEY_H_
|
||||
/* akey.h: Atari key codes */
|
||||
|
||||
/* INPUT_key_code values */
|
||||
#define AKEY_NONE -1
|
||||
|
||||
/* Special key codes. */
|
||||
#define AKEY_WARMSTART -2
|
||||
#define AKEY_COLDSTART -3
|
||||
#define AKEY_EXIT -4
|
||||
#define AKEY_BREAK -5
|
||||
#define AKEY_UI -7
|
||||
#define AKEY_SCREENSHOT -8
|
||||
#define AKEY_SCREENSHOT_INTERLACE -9
|
||||
#define AKEY_START -10
|
||||
#define AKEY_SELECT -11
|
||||
#define AKEY_OPTION -12
|
||||
#define AKEY_PBI_BB_MENU -13
|
||||
#define AKEY_CX85_1 -14
|
||||
#define AKEY_CX85_2 -15
|
||||
#define AKEY_CX85_3 -16
|
||||
#define AKEY_CX85_4 -17
|
||||
#define AKEY_CX85_5 -18
|
||||
#define AKEY_CX85_6 -19
|
||||
#define AKEY_CX85_7 -20
|
||||
#define AKEY_CX85_8 -21
|
||||
#define AKEY_CX85_9 -22
|
||||
#define AKEY_CX85_0 -23
|
||||
#define AKEY_CX85_PERIOD -24
|
||||
#define AKEY_CX85_MINUS -25
|
||||
#define AKEY_CX85_PLUS_ENTER -26
|
||||
#define AKEY_CX85_ESCAPE -27
|
||||
#define AKEY_CX85_NO -28
|
||||
#define AKEY_CX85_DELETE -29
|
||||
#define AKEY_CX85_YES -30
|
||||
#define AKEY_TURBO -31
|
||||
#ifdef USE_UI_BASIC_ONSCREEN_KEYBOARD
|
||||
#define AKEY_KEYB -32
|
||||
#endif
|
||||
#ifdef DIRECTX
|
||||
/* special menu directives */
|
||||
#define AKEY32_MENU_SAVE_CONFIG -107
|
||||
#define AKEY32_UI_MOUSE_CLICK -108
|
||||
#endif
|
||||
|
||||
#define AKEY_SHFT 0x40
|
||||
#define AKEY_CTRL 0x80
|
||||
#define AKEY_SHFTCTRL 0xc0
|
||||
|
||||
#define AKEY_0 0x32
|
||||
#define AKEY_1 0x1f
|
||||
#define AKEY_2 0x1e
|
||||
#define AKEY_3 0x1a
|
||||
#define AKEY_4 0x18
|
||||
#define AKEY_5 0x1d
|
||||
#define AKEY_6 0x1b
|
||||
#define AKEY_7 0x33
|
||||
#define AKEY_8 0x35
|
||||
#define AKEY_9 0x30
|
||||
|
||||
#define AKEY_CTRL_0 (AKEY_CTRL | AKEY_0)
|
||||
#define AKEY_CTRL_1 (AKEY_CTRL | AKEY_1)
|
||||
#define AKEY_CTRL_2 (AKEY_CTRL | AKEY_2)
|
||||
#define AKEY_CTRL_3 (AKEY_CTRL | AKEY_3)
|
||||
#define AKEY_CTRL_4 (AKEY_CTRL | AKEY_4)
|
||||
#define AKEY_CTRL_5 (AKEY_CTRL | AKEY_5)
|
||||
#define AKEY_CTRL_6 (AKEY_CTRL | AKEY_6)
|
||||
#define AKEY_CTRL_7 (AKEY_CTRL | AKEY_7)
|
||||
#define AKEY_CTRL_8 (AKEY_CTRL | AKEY_8)
|
||||
#define AKEY_CTRL_9 (AKEY_CTRL | AKEY_9)
|
||||
|
||||
#define AKEY_a 0x3f
|
||||
#define AKEY_b 0x15
|
||||
#define AKEY_c 0x12
|
||||
#define AKEY_d 0x3a
|
||||
#define AKEY_e 0x2a
|
||||
#define AKEY_f 0x38
|
||||
#define AKEY_g 0x3d
|
||||
#define AKEY_h 0x39
|
||||
#define AKEY_i 0x0d
|
||||
#define AKEY_j 0x01
|
||||
#define AKEY_k 0x05
|
||||
#define AKEY_l 0x00
|
||||
#define AKEY_m 0x25
|
||||
#define AKEY_n 0x23
|
||||
#define AKEY_o 0x08
|
||||
#define AKEY_p 0x0a
|
||||
#define AKEY_q 0x2f
|
||||
#define AKEY_r 0x28
|
||||
#define AKEY_s 0x3e
|
||||
#define AKEY_t 0x2d
|
||||
#define AKEY_u 0x0b
|
||||
#define AKEY_v 0x10
|
||||
#define AKEY_w 0x2e
|
||||
#define AKEY_x 0x16
|
||||
#define AKEY_y 0x2b
|
||||
#define AKEY_z 0x17
|
||||
|
||||
#define AKEY_A (AKEY_SHFT | AKEY_a)
|
||||
#define AKEY_B (AKEY_SHFT | AKEY_b)
|
||||
#define AKEY_C (AKEY_SHFT | AKEY_c)
|
||||
#define AKEY_D (AKEY_SHFT | AKEY_d)
|
||||
#define AKEY_E (AKEY_SHFT | AKEY_e)
|
||||
#define AKEY_F (AKEY_SHFT | AKEY_f)
|
||||
#define AKEY_G (AKEY_SHFT | AKEY_g)
|
||||
#define AKEY_H (AKEY_SHFT | AKEY_h)
|
||||
#define AKEY_I (AKEY_SHFT | AKEY_i)
|
||||
#define AKEY_J (AKEY_SHFT | AKEY_j)
|
||||
#define AKEY_K (AKEY_SHFT | AKEY_k)
|
||||
#define AKEY_L (AKEY_SHFT | AKEY_l)
|
||||
#define AKEY_M (AKEY_SHFT | AKEY_m)
|
||||
#define AKEY_N (AKEY_SHFT | AKEY_n)
|
||||
#define AKEY_O (AKEY_SHFT | AKEY_o)
|
||||
#define AKEY_P (AKEY_SHFT | AKEY_p)
|
||||
#define AKEY_Q (AKEY_SHFT | AKEY_q)
|
||||
#define AKEY_R (AKEY_SHFT | AKEY_r)
|
||||
#define AKEY_S (AKEY_SHFT | AKEY_s)
|
||||
#define AKEY_T (AKEY_SHFT | AKEY_t)
|
||||
#define AKEY_U (AKEY_SHFT | AKEY_u)
|
||||
#define AKEY_V (AKEY_SHFT | AKEY_v)
|
||||
#define AKEY_W (AKEY_SHFT | AKEY_w)
|
||||
#define AKEY_X (AKEY_SHFT | AKEY_x)
|
||||
#define AKEY_Y (AKEY_SHFT | AKEY_y)
|
||||
#define AKEY_Z (AKEY_SHFT | AKEY_z)
|
||||
|
||||
#define AKEY_CTRL_a (AKEY_CTRL | AKEY_a)
|
||||
#define AKEY_CTRL_b (AKEY_CTRL | AKEY_b)
|
||||
#define AKEY_CTRL_c (AKEY_CTRL | AKEY_c)
|
||||
#define AKEY_CTRL_d (AKEY_CTRL | AKEY_d)
|
||||
#define AKEY_CTRL_e (AKEY_CTRL | AKEY_e)
|
||||
#define AKEY_CTRL_f (AKEY_CTRL | AKEY_f)
|
||||
#define AKEY_CTRL_g (AKEY_CTRL | AKEY_g)
|
||||
#define AKEY_CTRL_h (AKEY_CTRL | AKEY_h)
|
||||
#define AKEY_CTRL_i (AKEY_CTRL | AKEY_i)
|
||||
#define AKEY_CTRL_j (AKEY_CTRL | AKEY_j)
|
||||
#define AKEY_CTRL_k (AKEY_CTRL | AKEY_k)
|
||||
#define AKEY_CTRL_l (AKEY_CTRL | AKEY_l)
|
||||
#define AKEY_CTRL_m (AKEY_CTRL | AKEY_m)
|
||||
#define AKEY_CTRL_n (AKEY_CTRL | AKEY_n)
|
||||
#define AKEY_CTRL_o (AKEY_CTRL | AKEY_o)
|
||||
#define AKEY_CTRL_p (AKEY_CTRL | AKEY_p)
|
||||
#define AKEY_CTRL_q (AKEY_CTRL | AKEY_q)
|
||||
#define AKEY_CTRL_r (AKEY_CTRL | AKEY_r)
|
||||
#define AKEY_CTRL_s (AKEY_CTRL | AKEY_s)
|
||||
#define AKEY_CTRL_t (AKEY_CTRL | AKEY_t)
|
||||
#define AKEY_CTRL_u (AKEY_CTRL | AKEY_u)
|
||||
#define AKEY_CTRL_v (AKEY_CTRL | AKEY_v)
|
||||
#define AKEY_CTRL_w (AKEY_CTRL | AKEY_w)
|
||||
#define AKEY_CTRL_x (AKEY_CTRL | AKEY_x)
|
||||
#define AKEY_CTRL_y (AKEY_CTRL | AKEY_y)
|
||||
#define AKEY_CTRL_z (AKEY_CTRL | AKEY_z)
|
||||
|
||||
#define AKEY_CTRL_A (AKEY_CTRL | AKEY_A)
|
||||
#define AKEY_CTRL_B (AKEY_CTRL | AKEY_B)
|
||||
#define AKEY_CTRL_C (AKEY_CTRL | AKEY_C)
|
||||
#define AKEY_CTRL_D (AKEY_CTRL | AKEY_D)
|
||||
#define AKEY_CTRL_E (AKEY_CTRL | AKEY_E)
|
||||
#define AKEY_CTRL_F (AKEY_CTRL | AKEY_F)
|
||||
#define AKEY_CTRL_G (AKEY_CTRL | AKEY_G)
|
||||
#define AKEY_CTRL_H (AKEY_CTRL | AKEY_H)
|
||||
#define AKEY_CTRL_I (AKEY_CTRL | AKEY_I)
|
||||
#define AKEY_CTRL_J (AKEY_CTRL | AKEY_J)
|
||||
#define AKEY_CTRL_K (AKEY_CTRL | AKEY_K)
|
||||
#define AKEY_CTRL_L (AKEY_CTRL | AKEY_L)
|
||||
#define AKEY_CTRL_M (AKEY_CTRL | AKEY_M)
|
||||
#define AKEY_CTRL_N (AKEY_CTRL | AKEY_N)
|
||||
#define AKEY_CTRL_O (AKEY_CTRL | AKEY_O)
|
||||
#define AKEY_CTRL_P (AKEY_CTRL | AKEY_P)
|
||||
#define AKEY_CTRL_Q (AKEY_CTRL | AKEY_Q)
|
||||
#define AKEY_CTRL_R (AKEY_CTRL | AKEY_R)
|
||||
#define AKEY_CTRL_S (AKEY_CTRL | AKEY_S)
|
||||
#define AKEY_CTRL_T (AKEY_CTRL | AKEY_T)
|
||||
#define AKEY_CTRL_U (AKEY_CTRL | AKEY_U)
|
||||
#define AKEY_CTRL_V (AKEY_CTRL | AKEY_V)
|
||||
#define AKEY_CTRL_W (AKEY_CTRL | AKEY_W)
|
||||
#define AKEY_CTRL_X (AKEY_CTRL | AKEY_X)
|
||||
#define AKEY_CTRL_Y (AKEY_CTRL | AKEY_Y)
|
||||
#define AKEY_CTRL_Z (AKEY_CTRL | AKEY_Z)
|
||||
|
||||
#define AKEY_HELP 0x11
|
||||
#define AKEY_DOWN 0x8f
|
||||
#define AKEY_LEFT 0x86
|
||||
#define AKEY_RIGHT 0x87
|
||||
#define AKEY_UP 0x8e
|
||||
#define AKEY_BACKSPACE 0x34
|
||||
#define AKEY_DELETE_CHAR 0xb4
|
||||
#define AKEY_DELETE_LINE 0x74
|
||||
#define AKEY_INSERT_CHAR 0xb7
|
||||
#define AKEY_INSERT_LINE 0x77
|
||||
#define AKEY_ESCAPE 0x1c
|
||||
#define AKEY_ATARI 0x27
|
||||
#define AKEY_CAPSLOCK 0x7c
|
||||
#define AKEY_CAPSTOGGLE 0x3c
|
||||
#define AKEY_TAB 0x2c
|
||||
#define AKEY_SETTAB 0x6c
|
||||
#define AKEY_CLRTAB 0xac
|
||||
#define AKEY_RETURN 0x0c
|
||||
#define AKEY_SPACE 0x21
|
||||
#define AKEY_EXCLAMATION 0x5f
|
||||
#define AKEY_DBLQUOTE 0x5e
|
||||
#define AKEY_HASH 0x5a
|
||||
#define AKEY_DOLLAR 0x58
|
||||
#define AKEY_PERCENT 0x5d
|
||||
#define AKEY_AMPERSAND 0x5b
|
||||
#define AKEY_QUOTE 0x73
|
||||
#define AKEY_AT 0x75
|
||||
#define AKEY_PARENLEFT 0x70
|
||||
#define AKEY_PARENRIGHT 0x72
|
||||
#define AKEY_LESS 0x36
|
||||
#define AKEY_GREATER 0x37
|
||||
#define AKEY_EQUAL 0x0f
|
||||
#define AKEY_QUESTION 0x66
|
||||
#define AKEY_MINUS 0x0e
|
||||
#define AKEY_PLUS 0x06
|
||||
#define AKEY_ASTERISK 0x07
|
||||
#define AKEY_SLASH 0x26
|
||||
#define AKEY_COLON 0x42
|
||||
#define AKEY_SEMICOLON 0x02
|
||||
#define AKEY_COMMA 0x20
|
||||
#define AKEY_FULLSTOP 0x22
|
||||
#define AKEY_UNDERSCORE 0x4e
|
||||
#define AKEY_BRACKETLEFT 0x60
|
||||
#define AKEY_BRACKETRIGHT 0x62
|
||||
#define AKEY_CIRCUMFLEX 0x47
|
||||
#define AKEY_BACKSLASH 0x46
|
||||
#define AKEY_BAR 0x4f
|
||||
#define AKEY_CLEAR (AKEY_SHFT | AKEY_LESS)
|
||||
#define AKEY_CARET (AKEY_SHFT | AKEY_ASTERISK)
|
||||
#define AKEY_F1 0x03
|
||||
#define AKEY_F2 0x04
|
||||
#define AKEY_F3 0x13
|
||||
#define AKEY_F4 0x14
|
||||
|
||||
/* Following keys cannot be read with both shift and control pressed:
|
||||
J K L ; + * Z X C V B F1 F2 F3 F4 HELP */
|
||||
|
||||
/* 5200 key codes */
|
||||
#define AKEY_5200_START 0x39
|
||||
#define AKEY_5200_PAUSE 0x31
|
||||
#define AKEY_5200_RESET 0x29
|
||||
#define AKEY_5200_0 0x25
|
||||
#define AKEY_5200_1 0x3f
|
||||
#define AKEY_5200_2 0x3d
|
||||
#define AKEY_5200_3 0x3b
|
||||
#define AKEY_5200_4 0x37
|
||||
#define AKEY_5200_5 0x35
|
||||
#define AKEY_5200_6 0x33
|
||||
#define AKEY_5200_7 0x2f
|
||||
#define AKEY_5200_8 0x2d
|
||||
#define AKEY_5200_9 0x2b
|
||||
#define AKEY_5200_HASH 0x23
|
||||
#define AKEY_5200_ASTERISK 0x27
|
||||
|
||||
#endif /* AKEY_H_ */
|
||||
@@ -0,0 +1,3 @@
|
||||
ppc-amigaos-objs
|
||||
Atari800
|
||||
Atari800.debug
|
||||
@@ -0,0 +1,109 @@
|
||||
@DATABASE "Atari800.guide"
|
||||
@$VER: Atari800.guide 1.0 (23.03.00)
|
||||
@AUTHOR Sebastian Bauer
|
||||
@(C) ©2000
|
||||
|
||||
@NODE MAIN "Atari800 - Guide"
|
||||
@SMARTWRAP
|
||||
@{b}Atari800 1.0 @{AMIGAGUIDE}@{ub}
|
||||
|
||||
|
||||
Note that the @{" guide author's " link CONTACTING} native language is German. So please
|
||||
forgive any spelling and gramer mistakes. Or better correct them and send them
|
||||
to @{" me " link CONTACTING}.
|
||||
|
||||
@{b}Attention!@{ub} This guide is designed for use with version 40 of the
|
||||
amigaguide.datatype which is supplied with AmigaOS 3.1. Under other versions
|
||||
this guide may look @{b}"less than optimal"@{ub}. Note further that if you
|
||||
are presently running Kickstart 3.0, you may @{b}still@{ub} use Workbench
|
||||
3.1 with it, including the newer amigaguide.datatype.
|
||||
@{CODE}
|
||||
|
||||
@{" Copyright " link COPYRIGHT} Copyright and disclaimer
|
||||
@{" Introduction " link INTRO} What does it do ?
|
||||
@{" Requirements " link REQUIRE} What does it need ?
|
||||
@{" Installation " link INSTALL} How to install (and remove) ?
|
||||
|
||||
@{" Usage " link USAGE} How to use it?
|
||||
|
||||
@{" Contacting " link CONTACTING } Where to send bug reports ?
|
||||
|
||||
@ENDNODE
|
||||
|
||||
|
||||
@NODE COPYRIGHT "Atari800 - Copyright and disclamer"
|
||||
@SMARTWRAP
|
||||
@{b}Copyright@{ub}
|
||||
|
||||
Copyright (C) 1995 David Firth. E-Mail: david@signus.demon.co.uk
|
||||
|
||||
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, or (at your option)
|
||||
any later version.
|
||||
|
||||
|
||||
@{" GNU General Public License " link COPYING/main}
|
||||
|
||||
@ENDNODE
|
||||
|
||||
@NODE INTRO "Atari800 - Introduction"
|
||||
@SMARTWRAP
|
||||
@{b}Introduction@{ub}
|
||||
|
||||
@ENDNODE
|
||||
|
||||
@NODE REQUIRE "Atari800 - Requirements"
|
||||
@SMARTWRAP
|
||||
@{b}Requirements@{ub}
|
||||
|
||||
|
||||
The Amiga port of the Emulator requires a 68020 processor, OS3.0 and
|
||||
MUI3.8. For sound support AHI is needed.
|
||||
|
||||
|
||||
It also requires the Atari ROMs.
|
||||
|
||||
@ENDNODE
|
||||
|
||||
@NODE INSTALL "Atari800 - Installation"
|
||||
@SMARTWRAP
|
||||
@{b}How to install Atari800@{ub}
|
||||
|
||||
|
||||
To install Atari800 simply copy the whole Atari800 drawer to the destination of your
|
||||
choice. The ROM files must be in the copied in the same directory (but this can
|
||||
be also changed).
|
||||
|
||||
@ENDNODE
|
||||
|
||||
|
||||
@NODE USAGE "Atari800 - Usage"
|
||||
@SMARTWRAP
|
||||
@{b}Usage@{ub}
|
||||
|
||||
|
||||
Sorry, but not written yet.
|
||||
|
||||
@ENDNODE
|
||||
|
||||
@NODE CONTACTING "Atari800 - Contacting"
|
||||
@SMARTWRAP
|
||||
@{b}Contacting@{ub}
|
||||
|
||||
|
||||
The Amiga port of the Atari800 emulator was created by Sebastian Bauer.
|
||||
|
||||
Any comments which are related to the Amiga version should be sent to@{LINE}
|
||||
@{" sebauer@t-online.de " system "YAM:YAM MAILTO sebauer@t-online.de NOCHECK"} or @{" Sebastian.Bauer@in.stud.tu-ilmenau.de " system "YAM:YAM MAILTO Sebastian.Bauer@in.stud.tu-ilmenau.de NOCHECK"}@{LINE}
|
||||
|
||||
The latest version of the emulator can be obtained from my homepage:@{LINE}
|
||||
@{" http://home.t-online.de/home/sebauer/english.html " system "C:OpenURL http://home.t-online.de/home/sebauer/english.html"}
|
||||
|
||||
|
||||
Also look on the official Atari800 Emulator support page at:
|
||||
|
||||
@{" http://cas3.zlin.vutbr.cz/~stehlik/a800.htm " system "C:OpenURL http://cas3.zlin.vutbr.cz/~stehlik/a800.htm"}
|
||||
|
||||
@ENDNODE
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#define VERSION 2
|
||||
#define REVISION 1
|
||||
#define DATE "30.03.2009"
|
||||
#define VERS "Atari800 2.1.0"
|
||||
#define VSTRING "Atari800 2.1.0 (30.03.2009)\r\n"
|
||||
#define VERSTAG "\0$VER: Atari800 2.1.0 (30.03.2009)"
|
||||
@@ -0,0 +1,18 @@
|
||||
VERSION EQU 2
|
||||
REVISION EQU 4
|
||||
|
||||
DATE MACRO
|
||||
dc.b '31.03.2009'
|
||||
ENDM
|
||||
|
||||
VERS MACRO
|
||||
dc.b 'Atari800 2.1'
|
||||
ENDM
|
||||
|
||||
VSTRING MACRO
|
||||
dc.b 'Atari800 2.1 (31.03.2009)',13,10,0
|
||||
ENDM
|
||||
|
||||
VERSTAG MACRO
|
||||
dc.b 0,'$VER: Atari800 2.1 (31.03.2009)',0
|
||||
ENDM
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,21 @@
|
||||
VERSION = 2
|
||||
REVISION = 1
|
||||
|
||||
.macro DATE
|
||||
.ascii "31.03.2009"
|
||||
.endm
|
||||
|
||||
.macro VERS
|
||||
.ascii "Atari800 2.1"
|
||||
.endm
|
||||
|
||||
.macro VSTRING
|
||||
.ascii "Atari800 2.1 (31.03.2009)"
|
||||
.byte 13,10,0
|
||||
.endm
|
||||
|
||||
.macro VERSTAG
|
||||
.byte 0
|
||||
.ascii "$VER: Atari800 2.1 (31.03.2009)"
|
||||
.byte 0
|
||||
.endm
|
||||
@@ -0,0 +1,79 @@
|
||||
Short: V2.4 of the Atari 8-bit emulator
|
||||
Uploader: mail@sebastianbauer.info (Sebastian Bauer)
|
||||
Author: mail@sebastianbauer.info (Sebastian Bauer), Atari800 Emulator Development Team
|
||||
Type: misc/emu
|
||||
Kurz: V2.4 des Atari 8-bit Emulator
|
||||
Requires: OS4
|
||||
Version: 2.4
|
||||
|
||||
This is the Amiga port of the Atari800 Emulator. It requires at
|
||||
least OS4 (e.g. the prerelease CD).
|
||||
|
||||
Install
|
||||
~~~~~~~
|
||||
Extract the archive and copy the resulting Atari800 drawer
|
||||
anywhere you like. Later, copy the ROM Files into the ROMs
|
||||
directory. Those ROMs can be extracted from an old XFormer
|
||||
Archive. See http://atari800.sourceforge.net for details.
|
||||
From there you find also the information how to obtain the
|
||||
source code which is released under the GPL.
|
||||
|
||||
History
|
||||
~~~~~~~
|
||||
Version 2.4 (16.3.2005)
|
||||
- matches version 1.3.6 of original sources
|
||||
|
||||
Version 2.3 (29.12.2004)
|
||||
- matches version 1.3.4 of original sources
|
||||
|
||||
Version 2.2 (8.10.2004)
|
||||
- the workbench window is now an appwindow. Drop in a file to
|
||||
boot/run its contents
|
||||
- tries to start a given workbench argument
|
||||
- added an iconify option (menu entry and title gadget)
|
||||
|
||||
Version 2.1 (24.09.2004)
|
||||
- major changes within the Amiga front end, including
|
||||
o) ported to OS4, requires PPC processor
|
||||
o) dropped MUI GUI, GUI is now menu driven
|
||||
o) dropped overlay support for now
|
||||
o) Atari joystick can be mapped to the keyboard
|
||||
o) sound fixes
|
||||
- matches 1.3.3 of original sources
|
||||
|
||||
Version 1.2 (15.10.2000)
|
||||
- compiled the latest source
|
||||
- a special 68060 version has been added
|
||||
|
||||
Version 1.1 (12.06.2000)
|
||||
- console keys and sound should work better now
|
||||
|
||||
Version 1.0 (31.05.2000)
|
||||
- initial public release
|
||||
|
||||
How can you reach me?
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
My e-mail address is:
|
||||
mail@sebastianbauer.info
|
||||
|
||||
Address:
|
||||
Sebastian Bauer
|
||||
Neustädter Str. 50
|
||||
07768 Kahla
|
||||
Germany
|
||||
|
||||
Visit my homepage at
|
||||
http://www.sebastianbauer.info/
|
||||
|
||||
Here you can find the latest version of the Atari800 emulator for
|
||||
Amiga but also other things for Amiga, for example SimpleFind3,
|
||||
SimpleHTML, SimplePac and the Freeciv Port.
|
||||
|
||||
Also look at the offical Atari800 Emulator homepage at
|
||||
http://atari800.sourceforce.net/
|
||||
__
|
||||
/ /
|
||||
__ / / Only Amiga makes it possible...
|
||||
\ \/ /
|
||||
\__/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,70 @@
|
||||
#ifndef _ATARI_AMIGA_H_
|
||||
#define _ATARI_AMIGA_H_
|
||||
|
||||
LONG InsertROM(LONG CartType);
|
||||
LONG InsertDisk( LONG Drive );
|
||||
|
||||
VOID FreeDisplay(void);
|
||||
LONG SetupDisplay(void);
|
||||
VOID Iconify(void);
|
||||
|
||||
enum{
|
||||
MEN_PROJECT=1,
|
||||
MEN_PROJECT_ABOUT,
|
||||
MEN_PROJECT_LOADSTATE,
|
||||
MEN_PROJECT_SAVESTATE,
|
||||
MEN_PROJECT_LOADBIN,
|
||||
MEN_PROJECT_ICONIFY,
|
||||
MEN_PROJECT_QUIT,
|
||||
|
||||
MEN_SYSTEM,
|
||||
MEN_SYSTEM_BOOT,
|
||||
MEN_SYSTEM_ID,
|
||||
MEN_SYSTEM_ID1,
|
||||
MEN_SYSTEM_ID2,
|
||||
MEN_SYSTEM_ID3,
|
||||
MEN_SYSTEM_ID4,
|
||||
MEN_SYSTEM_ID5,
|
||||
MEN_SYSTEM_ID6,
|
||||
MEN_SYSTEM_ID7,
|
||||
MEN_SYSTEM_ID8,
|
||||
MEN_SYSTEM_ED,
|
||||
MEN_SYSTEM_ED1,
|
||||
MEN_SYSTEM_ED2,
|
||||
MEN_SYSTEM_ED3,
|
||||
MEN_SYSTEM_ED4,
|
||||
MEN_SYSTEM_ED5,
|
||||
MEN_SYSTEM_ED6,
|
||||
MEN_SYSTEM_ED7,
|
||||
MEN_SYSTEM_ED8,
|
||||
|
||||
MEN_SYSTEM_UI,
|
||||
|
||||
MEN_CONSOLE,
|
||||
MEN_CONSOLE_OPTION,
|
||||
MEN_CONSOLE_SELECT,
|
||||
MEN_CONSOLE_START,
|
||||
MEN_CONSOLE_HELP,
|
||||
MEN_CONSOLE_BREAK,
|
||||
MEN_CONSOLE_RESET,
|
||||
MEN_CONSOLE_COLDSTART,
|
||||
|
||||
MEN_SETTINGS,
|
||||
MEN_SETTINGS_FRAMERATE,
|
||||
MEN_SETTINGS_CUSTOMSCREEN,
|
||||
MEN_SETTINGS_WINDOW,
|
||||
MEN_SETTINGS_SCALABLEWINDOW,
|
||||
MEN_SETTINGS_SAVE,
|
||||
|
||||
MEN_SETTINGS_PORT0_GAMEPORT,
|
||||
MEN_SETTINGS_PORT0_NUMERICPAD,
|
||||
MEN_SETTINGS_PORT0_CURSORKEYS,
|
||||
MEN_SETTINGS_PORT0_UNASSIGNED,
|
||||
|
||||
MEN_SETTINGS_PORT1_GAMEPORT,
|
||||
MEN_SETTINGS_PORT1_NUMERICPAD,
|
||||
MEN_SETTINGS_PORT1_CURSORKEYS,
|
||||
MEN_SETTINGS_PORT1_UNASSIGNED,
|
||||
};
|
||||
|
||||
#endif /* _ATARI_AMIGA_H_ */
|
||||
@@ -0,0 +1,133 @@
|
||||
; atari_asm.asm - Amiga specific port code
|
||||
;
|
||||
; Copyright (c) 2000 Sebastian Bauer
|
||||
; Copyright (C) 2000-2003 Atari800 development team (see DOC/CREDITS)
|
||||
;
|
||||
; This file is part of the Atari800 emulator project which emulates
|
||||
; the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
;
|
||||
; Atari800 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.
|
||||
;
|
||||
; Atari800 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 Atari800; if not, write to the Free Software
|
||||
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
MC68020
|
||||
|
||||
XDEF _ScreenData28bit
|
||||
|
||||
; a0 - UBYTE *screen
|
||||
; a1 - UBYTE *destscreendata
|
||||
; a2 - UBYTE *colortable8
|
||||
; d0 - UWORD width
|
||||
; d1 - UWORD height
|
||||
|
||||
_ScreenData28bit:
|
||||
movem.l d2/d7,-(a7)
|
||||
lsr.w #2,d0
|
||||
subq.l #1,d1
|
||||
subq.l #1,d0
|
||||
|
||||
moveq #0,d2
|
||||
; moveq #0,d3
|
||||
; moveq #0,d4
|
||||
; moveq #0,d5
|
||||
|
||||
.heightloop: move.l d0,d7
|
||||
|
||||
.widthloop:
|
||||
; move.b (a0)+,d2
|
||||
; move.b (a0)+,d3
|
||||
; move.b (a0)+,d4
|
||||
; move.b (a0)+,d5
|
||||
|
||||
; move.b (a2,d2),(a1)+
|
||||
; move.b (a2,d3),(a1)+
|
||||
; move.b (a2,d4),(a1)+
|
||||
; move.b (a2,d5),(a1)+
|
||||
|
||||
move.b (a0)+,d2
|
||||
move.b (a2,d2),(a1)+
|
||||
|
||||
move.b (a0)+,d2
|
||||
move.b (a2,d2),(a1)+
|
||||
|
||||
move.b (a0)+,d2
|
||||
move.b (a2,d2),(a1)+
|
||||
|
||||
move.b (a0)+,d2
|
||||
move.b (a2,d2),(a1)+
|
||||
|
||||
; moveq #0,d3
|
||||
; moveq #0,d5
|
||||
|
||||
; move.b (a0)+,d2
|
||||
; move.b (a2,d2),d3
|
||||
|
||||
; move.b (a0)+,d2
|
||||
; lsl.w #8,d3
|
||||
; move.b (a2,d2),d4
|
||||
|
||||
; move.b (a0)+,d2
|
||||
; or.w d4,d3
|
||||
; move.b (a2,d2),d5
|
||||
; swap d3
|
||||
|
||||
; move.b (a0)+,d2
|
||||
; lsl.w #8,d5
|
||||
; move.b (a2,d2),d3
|
||||
|
||||
; or.w d5,d3
|
||||
; move.l d3,(a1)+
|
||||
|
||||
dbra d7,.widthloop
|
||||
dbra d1,.heightloop
|
||||
|
||||
movem.l (a7)+,d2/d7
|
||||
rts
|
||||
|
||||
|
||||
XDEF _ScreenData215bit
|
||||
|
||||
; a0 - UBYTE *screen
|
||||
; a1 - UWORD *destscreendata
|
||||
; a2 - UWORD *colortable15
|
||||
; d0 - UWORD width
|
||||
; d1 - UWORD height
|
||||
|
||||
|
||||
_ScreenData215bit:
|
||||
movem.l d2/d3/d7,-(a7)
|
||||
lsr.l #1,d0
|
||||
subq.l #1,d1
|
||||
subq.l #1,d0
|
||||
|
||||
moveq #0,d2
|
||||
|
||||
.heightloop: move.l d0,d7
|
||||
|
||||
.widthloop:
|
||||
move.b (a0)+,d2
|
||||
move.w (a2,d2*2),d3
|
||||
|
||||
move.b (a0)+,d2
|
||||
swap d3
|
||||
move.w (a2,d2*2),d3
|
||||
|
||||
move.l d3,(a1)+
|
||||
|
||||
dbra d7,.widthloop
|
||||
dbra d1,.heightloop
|
||||
|
||||
movem.l (a7)+,d2/d3/d7
|
||||
rts
|
||||
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef _AMIGA_ASM_H_
|
||||
#define _AMIGA_ASM_H_
|
||||
|
||||
ASM void ScreenData28bit( register __a0 UBYTE *screen,
|
||||
register __a1 UBYTE *tempscreendata,
|
||||
register __a2 UBYTE *colortable8,
|
||||
register __d0 ULONG width,
|
||||
register __d1 ULONG height);
|
||||
|
||||
ASM void ScreenData215bit( register __a0 UBYTE *screen,
|
||||
register __a1 UWORD *,
|
||||
register __a2 UWORD *colortable15,
|
||||
register __d0 ULONG width,
|
||||
register __d1 ULONG height);
|
||||
|
||||
#endif /* _AMIGA_ASM_H_ */
|
||||
|
||||
@@ -0,0 +1,579 @@
|
||||
/*
|
||||
* async.c - async I/O code
|
||||
*
|
||||
* Copyright (c) 2000 Sebastian Bauer
|
||||
* Copyright (c) 2000-2003 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "async.h"
|
||||
|
||||
//-------------------------------------
|
||||
// AS_OpenAsnycFH
|
||||
|
||||
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
AsyncFile*
|
||||
AS_OpenAsyncFH(
|
||||
BPTR handle,
|
||||
OpenModes mode,
|
||||
LONG bufferSize,
|
||||
BOOL closeIt,
|
||||
struct ExecBase *SysBase,
|
||||
struct DosLibrary *DOSBase )
|
||||
#else
|
||||
AsyncFile *
|
||||
AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt )
|
||||
#endif
|
||||
{
|
||||
struct FileHandle *fh;
|
||||
AsyncFile *file = NULL;
|
||||
BPTR lock = NULL;
|
||||
LONG blockSize, blockSize2;
|
||||
D_S( struct InfoData, infoData );
|
||||
|
||||
if( mode == MODE_READ )
|
||||
{
|
||||
if( handle )
|
||||
{
|
||||
lock = DupLockFromFH( handle );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( mode == MODE_APPEND )
|
||||
{
|
||||
/* in append mode, we open for writing, and then seek to the
|
||||
* end of the file. That way, the initial write will happen at
|
||||
* the end of the file, thus extending it
|
||||
*/
|
||||
|
||||
if( handle )
|
||||
{
|
||||
if( Seek( handle, 0, OFFSET_END ) < 0 )
|
||||
{
|
||||
if( closeIt )
|
||||
{
|
||||
Close( handle );
|
||||
}
|
||||
|
||||
handle = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* we want a lock on the same device as where the file is. We can't
|
||||
* use DupLockFromFH() for a write-mode file though. So we get sneaky
|
||||
* and get a lock on the parent of the file
|
||||
*/
|
||||
if( handle )
|
||||
{
|
||||
lock = ParentOfFH( handle );
|
||||
}
|
||||
}
|
||||
|
||||
if( handle )
|
||||
{
|
||||
/* if it was possible to obtain a lock on the same device as the
|
||||
* file we're working on, get the block size of that device and
|
||||
* round up our buffer size to be a multiple of the block size.
|
||||
* This maximizes DMA efficiency.
|
||||
*/
|
||||
|
||||
blockSize = 512;
|
||||
blockSize2 = 1024;
|
||||
|
||||
if( lock )
|
||||
{
|
||||
if( Info( lock, infoData ) )
|
||||
{
|
||||
blockSize = infoData->id_BytesPerBlock;
|
||||
blockSize2 = blockSize * 2;
|
||||
bufferSize = ( ( bufferSize + blockSize2 - 1 ) / blockSize2 ) * blockSize2;
|
||||
}
|
||||
|
||||
UnLock(lock);
|
||||
}
|
||||
|
||||
/* now allocate the ASyncFile structure, as well as the read buffers.
|
||||
* Add 15 bytes to the total size in order to allow for later
|
||||
* quad-longword alignement of the buffers
|
||||
*/
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
if(( file = AllocVec( sizeof( AsyncFile ) + bufferSize + 15, MEMF_PUBLIC | MEMF_ANY ) ))
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( bufferSize > blockSize2 )
|
||||
{
|
||||
bufferSize -= blockSize2;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( file )
|
||||
{
|
||||
file->af_File = handle;
|
||||
file->af_ReadMode = ( mode == MODE_READ );
|
||||
file->af_BlockSize = blockSize;
|
||||
file->af_CloseFH = closeIt;
|
||||
|
||||
/* initialize the ASyncFile structure. We do as much as we can here,
|
||||
* in order to avoid doing it in more critical sections
|
||||
*
|
||||
* Note how the two buffers used are quad-longword aligned. This
|
||||
* helps performance on 68040 systems with copyback cache. Aligning
|
||||
* the data avoids a nasty side-effect of the 040 caches on DMA.
|
||||
* Not aligning the data causes the device driver to have to do
|
||||
* some magic to avoid the cache problem. This magic will generally
|
||||
* involve flushing the CPU caches. This is very costly on an 040.
|
||||
* Aligning things avoids the need for magic, at the cost of at
|
||||
* most 15 bytes of ram.
|
||||
*/
|
||||
|
||||
fh = BADDR( file->af_File );
|
||||
file->af_Handler = fh->fh_Type;
|
||||
file->af_BufferSize = ( ULONG ) bufferSize / 2;
|
||||
file->af_Buffers[ 0 ] = ( APTR ) ( ( ( ULONG ) file + sizeof( AsyncFile ) + 15 ) & 0xfffffff0 );
|
||||
file->af_Buffers[ 1 ] = file->af_Buffers[ 0 ] + file->af_BufferSize;
|
||||
file->af_CurrentBuf = 0;
|
||||
file->af_SeekOffset = 0;
|
||||
file->af_PacketPending = FALSE;
|
||||
file->af_SeekPastEOF = FALSE;
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
file->af_SysBase = SysBase;
|
||||
file->af_DOSBase = DOSBase;
|
||||
#endif
|
||||
|
||||
/* this is the port used to get the packets we send out back.
|
||||
* It is initialized to PA_IGNORE, which means that no signal is
|
||||
* generated when a message comes in to the port. The signal bit
|
||||
* number is initialized to SIGB_SINGLE, which is the special bit
|
||||
* that can be used for one-shot signalling. The signal will never
|
||||
* be set, since the port is of type PA_IGNORE. We'll change the
|
||||
* type of the port later on to PA_SIGNAL whenever we need to wait
|
||||
* for a message to come in.
|
||||
*
|
||||
* The trick used here avoids the need to allocate an extra signal
|
||||
* bit for the port. It is quite efficient.
|
||||
*/
|
||||
|
||||
file->af_PacketPort.mp_MsgList.lh_Head = ( struct Node * ) &file->af_PacketPort.mp_MsgList.lh_Tail;
|
||||
file->af_PacketPort.mp_MsgList.lh_Tail = NULL;
|
||||
file->af_PacketPort.mp_MsgList.lh_TailPred = ( struct Node * ) &file->af_PacketPort.mp_MsgList.lh_Head;
|
||||
file->af_PacketPort.mp_Node.ln_Type = NT_MSGPORT;
|
||||
/* MH: Avoid problems with SnoopDos */
|
||||
file->af_PacketPort.mp_Node.ln_Name = NULL;
|
||||
file->af_PacketPort.mp_Flags = PA_IGNORE;
|
||||
file->af_PacketPort.mp_SigBit = SIGB_SINGLE;
|
||||
file->af_PacketPort.mp_SigTask = FindTask( NULL );
|
||||
|
||||
file->af_Packet.sp_Pkt.dp_Link = &file->af_Packet.sp_Msg;
|
||||
file->af_Packet.sp_Pkt.dp_Arg1 = fh->fh_Arg1;
|
||||
file->af_Packet.sp_Pkt.dp_Arg3 = file->af_BufferSize;
|
||||
file->af_Packet.sp_Pkt.dp_Res1 = 0;
|
||||
file->af_Packet.sp_Pkt.dp_Res2 = 0;
|
||||
file->af_Packet.sp_Msg.mn_Node.ln_Name = ( STRPTR ) &file->af_Packet.sp_Pkt;
|
||||
file->af_Packet.sp_Msg.mn_Node.ln_Type = NT_MESSAGE;
|
||||
file->af_Packet.sp_Msg.mn_Length = sizeof( struct StandardPacket );
|
||||
|
||||
if( mode == MODE_READ )
|
||||
{
|
||||
/* if we are in read mode, send out the first read packet to
|
||||
* the file system. While the application is getting ready to
|
||||
* read data, the file system will happily fill in this buffer
|
||||
* with DMA transfers, so that by the time the application
|
||||
* needs the data, it will be in the buffer waiting
|
||||
*/
|
||||
|
||||
file->af_Packet.sp_Pkt.dp_Type = ACTION_READ;
|
||||
file->af_BytesLeft = 0;
|
||||
|
||||
/* MH: We set the offset to the buffer not being filled, in
|
||||
* order to avoid special case code in SeekAsync. ReadAsync
|
||||
* isn't affected by this, since af_BytesLeft == 0.
|
||||
*/
|
||||
file->af_Offset = file->af_Buffers[ 1 ];
|
||||
|
||||
if( file->af_Handler )
|
||||
{
|
||||
AS_SendPacket( file, file->af_Buffers[ 0 ] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
file->af_Packet.sp_Pkt.dp_Type = ACTION_WRITE;
|
||||
file->af_BytesLeft = file->af_BufferSize;
|
||||
file->af_Offset = file->af_Buffers[ 0 ];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( closeIt )
|
||||
{
|
||||
Close( handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return( file );
|
||||
}
|
||||
//-------------------------------------
|
||||
// AS_SendPacket
|
||||
/* send out an async packet to the file system. */
|
||||
VOID
|
||||
AS_SendPacket( struct AsyncFile *file, APTR arg2 )
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
struct ExecBase *SysBase;
|
||||
|
||||
SysBase = file->af_SysBase;
|
||||
#endif
|
||||
|
||||
file->af_Packet.sp_Pkt.dp_Port = &file->af_PacketPort;
|
||||
file->af_Packet.sp_Pkt.dp_Arg2 = ( LONG ) arg2;
|
||||
PutMsg( file->af_Handler, &file->af_Packet.sp_Msg );
|
||||
file->af_PacketPending = TRUE;
|
||||
}
|
||||
//-------------------------------------
|
||||
// AS_WaitPacket
|
||||
/* this function waits for a packet to come back from the file system. If no
|
||||
* packet is pending, state from the previous packet is returned. This ensures
|
||||
* that once an error occurs, it state is maintained for the rest of the life
|
||||
* of the file handle.
|
||||
*
|
||||
* This function also deals with IO errors, bringing up the needed DOS
|
||||
* requesters to let the user retry an operation or cancel it.
|
||||
*/
|
||||
LONG
|
||||
AS_WaitPacket( AsyncFile *file )
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
struct ExecBase *SysBase = file->af_SysBase;
|
||||
struct DosLibrary *DOSBase = file->af_DOSBase;
|
||||
#endif
|
||||
LONG bytes;
|
||||
|
||||
if( file->af_PacketPending )
|
||||
{
|
||||
while( TRUE )
|
||||
{
|
||||
/* This enables signalling when a packet comes back to the port */
|
||||
file->af_PacketPort.mp_Flags = PA_SIGNAL;
|
||||
|
||||
/* Wait for the packet to come back, and remove it from the message
|
||||
* list. Since we know no other packets can come in to the port, we can
|
||||
* safely use Remove() instead of GetMsg(). If other packets could come in,
|
||||
* we would have to use GetMsg(), which correctly arbitrates access in such
|
||||
* a case
|
||||
*/
|
||||
Remove( ( struct Node * ) WaitPort( &file->af_PacketPort ) );
|
||||
|
||||
/* set the port type back to PA_IGNORE so we won't be bothered with
|
||||
* spurious signals
|
||||
*/
|
||||
file->af_PacketPort.mp_Flags = PA_IGNORE;
|
||||
|
||||
/* mark packet as no longer pending since we removed it */
|
||||
file->af_PacketPending = FALSE;
|
||||
|
||||
bytes = file->af_Packet.sp_Pkt.dp_Res1;
|
||||
|
||||
if( bytes >= 0 )
|
||||
{
|
||||
/* packet didn't report an error, so bye... */
|
||||
return( bytes );
|
||||
}
|
||||
|
||||
/* see if the user wants to try again... */
|
||||
if( ErrorReport( file->af_Packet.sp_Pkt.dp_Res2, REPORT_STREAM, file->af_File, NULL ) )
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* user wants to try again, resend the packet */
|
||||
AS_SendPacket( file,
|
||||
file->af_Buffers[ file->af_ReadMode ?
|
||||
file->af_CurrentBuf :
|
||||
1 - file->af_CurrentBuf ] );
|
||||
}
|
||||
}
|
||||
|
||||
/* last packet's error code, or 0 if packet was never sent */
|
||||
SetIoErr( file->af_Packet.sp_Pkt.dp_Res2 );
|
||||
|
||||
return( file->af_Packet.sp_Pkt.dp_Res1 );
|
||||
}
|
||||
//-------------------------------------
|
||||
// AS_RequeuePacket( AsyncFile *file )
|
||||
/* this function puts the packet back on the message list of our
|
||||
* message port.
|
||||
*/
|
||||
VOID
|
||||
AS_RequeuePacket( AsyncFile *file )
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
struct ExecBase *SysBase = file->af_SysBase;
|
||||
#endif
|
||||
|
||||
AddHead( &file->af_PacketPort.mp_MsgList, &file->af_Packet.sp_Msg.mn_Node );
|
||||
file->af_PacketPending = TRUE;
|
||||
}
|
||||
//-------------------------------------
|
||||
|
||||
//-------------------------------------
|
||||
// AsyncFile *OpenAsync()
|
||||
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
_LIBCALL AsyncFile *
|
||||
OpenAsync(
|
||||
_REG( a0 ) const STRPTR fileName,
|
||||
_REG( d0 ) OpenModes mode,
|
||||
_REG( d1 ) LONG bufferSize,
|
||||
_REG( a1 ) struct ExecBase *SysBase,
|
||||
_REG( a2 ) struct DosLibrary *DOSBase )
|
||||
#else
|
||||
_LIBCALL AsyncFile *
|
||||
OpenAsync(
|
||||
_REG( a0 ) const STRPTR fileName,
|
||||
_REG( d0 ) OpenModes mode,
|
||||
_REG( d1 ) LONG bufferSize )
|
||||
#endif
|
||||
{
|
||||
static const WORD PrivateOpenModes[] =
|
||||
{
|
||||
MODE_OLDFILE, MODE_NEWFILE, MODE_READWRITE
|
||||
};
|
||||
BPTR handle;
|
||||
AsyncFile *file = NULL;
|
||||
|
||||
if(( handle = Open( fileName, PrivateOpenModes[ mode ] ) ))
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
file = AS_OpenAsyncFH( handle, mode, bufferSize, TRUE, SysBase, DOSBase );
|
||||
#else
|
||||
file = AS_OpenAsyncFH( handle, mode, bufferSize, TRUE );
|
||||
#endif
|
||||
|
||||
if( !file )
|
||||
{
|
||||
Close( handle );
|
||||
}
|
||||
}
|
||||
|
||||
return( file );
|
||||
}
|
||||
//-------------------------------------
|
||||
// LONG CloseAsync(AsyncFile *file )
|
||||
_LIBCALL LONG
|
||||
CloseAsync( _REG( a0 ) AsyncFile *file )
|
||||
{
|
||||
LONG result;
|
||||
|
||||
if( file )
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
struct ExecBase *SysBase = file->af_SysBase;
|
||||
struct DosLibrary *DOSBase = file->af_DOSBase;
|
||||
#endif
|
||||
result = AS_WaitPacket( file );
|
||||
|
||||
if( result >= 0 )
|
||||
{
|
||||
if( !file->af_ReadMode )
|
||||
{
|
||||
/* this will flush out any pending data in the write buffer */
|
||||
if( file->af_BufferSize > file->af_BytesLeft )
|
||||
{
|
||||
result = Write(
|
||||
file->af_File,
|
||||
file->af_Buffers[ file->af_CurrentBuf ],
|
||||
file->af_BufferSize - file->af_BytesLeft );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( file->af_CloseFH )
|
||||
{
|
||||
Close( file->af_File );
|
||||
}
|
||||
|
||||
FreeVec(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef ASIO_NOEXTERNALS
|
||||
SetIoErr( ERROR_INVALID_LOCK );
|
||||
#endif
|
||||
result = -1;
|
||||
}
|
||||
|
||||
return( result );
|
||||
}
|
||||
//-------------------------------------
|
||||
// LONG WriteAsync( AsyncFile *file, APTR buffer, LONG numBytes )
|
||||
|
||||
_LIBCALL LONG
|
||||
WriteAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes )
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
struct ExecBase *SysBase = file->af_SysBase;
|
||||
#endif
|
||||
LONG totalBytes = 0;
|
||||
|
||||
/* this takes care of NIL: */
|
||||
if( !file->af_Handler )
|
||||
{
|
||||
file->af_Offset = file->af_Buffers[ 0 ];
|
||||
file->af_BytesLeft = file->af_BufferSize;
|
||||
return( numBytes );
|
||||
}
|
||||
|
||||
while( numBytes > file->af_BytesLeft )
|
||||
{
|
||||
if( file->af_BytesLeft )
|
||||
{
|
||||
CopyMem( buffer, file->af_Offset, file->af_BytesLeft );
|
||||
|
||||
numBytes -= file->af_BytesLeft;
|
||||
buffer = ( APTR ) ( ( ULONG ) buffer + file->af_BytesLeft );
|
||||
totalBytes += file->af_BytesLeft;
|
||||
}
|
||||
|
||||
if( AS_WaitPacket( file ) < 0 )
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* send the current buffer out to disk */
|
||||
AS_SendPacket( file, file->af_Buffers[ file->af_CurrentBuf ] );
|
||||
|
||||
file->af_CurrentBuf = 1 - file->af_CurrentBuf;
|
||||
file->af_Offset = file->af_Buffers[ file->af_CurrentBuf ];
|
||||
file->af_BytesLeft = file->af_BufferSize;
|
||||
}
|
||||
|
||||
CopyMem( buffer, file->af_Offset, numBytes );
|
||||
file->af_BytesLeft -= numBytes;
|
||||
file->af_Offset += numBytes;
|
||||
|
||||
return ( totalBytes + numBytes );
|
||||
}
|
||||
//-------------------------------------
|
||||
// LONG WriteCharAsync( AsyncFile *file, UBYTE ch )
|
||||
_CALL LONG
|
||||
WriteCharAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) UBYTE ch )
|
||||
{
|
||||
if( file->af_BytesLeft )
|
||||
{
|
||||
/* if there's any room left in the current buffer, directly write
|
||||
* the byte into it, updating counters and stuff.
|
||||
*/
|
||||
|
||||
*file->af_Offset = ch;
|
||||
--file->af_BytesLeft;
|
||||
++file->af_Offset;
|
||||
|
||||
/* one byte written */
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* there was no room in the current buffer, so call the main write
|
||||
* routine. This will effectively send the current buffer out to disk,
|
||||
* wait for the other buffer to come back, and then put the byte into
|
||||
* it.
|
||||
*/
|
||||
|
||||
{
|
||||
TEXT c;
|
||||
|
||||
c = ch; /* SAS/C workaround... */
|
||||
|
||||
return( WriteAsync( file, &c, 1 ) );
|
||||
}
|
||||
}
|
||||
//-------------------------------------
|
||||
// LONG ReadAsync( AsyncFile *file, APTR buffer, LONG numBytes )
|
||||
_LIBCALL LONG
|
||||
ReadAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes )
|
||||
{
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
struct ExecBase *SysBase = file->af_SysBase;
|
||||
#endif
|
||||
LONG totalBytes = 0;
|
||||
LONG bytesArrived;
|
||||
|
||||
/* if we need more bytes than there are in the current buffer, enter the
|
||||
* read loop
|
||||
*/
|
||||
|
||||
while( numBytes > file->af_BytesLeft )
|
||||
{
|
||||
/* drain buffer */
|
||||
CopyMem( file->af_Offset, buffer, file->af_BytesLeft );
|
||||
|
||||
numBytes -= file->af_BytesLeft;
|
||||
buffer = ( APTR ) ( ( ULONG ) buffer + file->af_BytesLeft );
|
||||
totalBytes += file->af_BytesLeft;
|
||||
file->af_BytesLeft = 0;
|
||||
|
||||
bytesArrived = AS_WaitPacket( file );
|
||||
|
||||
if( bytesArrived <= 0 )
|
||||
{
|
||||
if( bytesArrived == 0 )
|
||||
{
|
||||
return( totalBytes );
|
||||
}
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* ask that the buffer be filled */
|
||||
AS_SendPacket( file, file->af_Buffers[ 1 - file->af_CurrentBuf ] );
|
||||
|
||||
/* in case we tried to seek past EOF */
|
||||
if( file->af_SeekOffset > bytesArrived )
|
||||
{
|
||||
file->af_SeekOffset = bytesArrived;
|
||||
}
|
||||
|
||||
file->af_Offset = file->af_Buffers[ file->af_CurrentBuf ] + file->af_SeekOffset;
|
||||
file->af_CurrentBuf = 1 - file->af_CurrentBuf;
|
||||
file->af_BytesLeft = bytesArrived - file->af_SeekOffset;
|
||||
file->af_SeekOffset = 0;
|
||||
}
|
||||
|
||||
CopyMem( file->af_Offset, buffer, numBytes );
|
||||
file->af_BytesLeft -= numBytes;
|
||||
file->af_Offset += numBytes;
|
||||
|
||||
return( totalBytes + numBytes );
|
||||
}
|
||||
//-------------------------------------
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
#ifndef _ASYNC_H_
|
||||
#define _ASYNC_H_
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <exec/memory.h>
|
||||
#include <dos/dos.h>
|
||||
#include <dos/dosextens.h>
|
||||
|
||||
#include <clib/asyncio_protos.h>
|
||||
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
#ifdef _DCC
|
||||
#ifdef ASIO_SHARED_LIB
|
||||
#define _LIBCALL __geta4 _ASM _ARGS
|
||||
#else
|
||||
#define _LIBCALL _ASM _ARGS
|
||||
#endif
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#define _LIBCALL
|
||||
#else
|
||||
#ifdef __MAXON__
|
||||
#define _LIBCALL
|
||||
#else /* __SASC__ */
|
||||
#ifdef ASIO_SHARED_LIB
|
||||
#define _LIBCALL __saveds _ASM _ARGS
|
||||
#else
|
||||
#define _LIBCALL _ASM _ARGS
|
||||
#endif
|
||||
#endif
|
||||
#endif /* _ GNUC_ */
|
||||
#endif /* _DCC */
|
||||
|
||||
#define _CALL _ASM _ARGS
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef ASIO_NOEXTERNALS
|
||||
extern struct DosLibrary *DOSBase;
|
||||
extern struct ExecBase *SysBase;
|
||||
#endif
|
||||
|
||||
#ifdef ASIO_SHARED_LIB
|
||||
extern struct ExecBase *SysBase;
|
||||
extern struct Library *UtilityBase;
|
||||
extern struct DosLibrary *DOSBase;
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/* this macro lets us long-align structures on the stack */
|
||||
#define D_S(type,name) char a_##name[ sizeof( type ) + 3 ]; \
|
||||
type *name = ( type * ) ( ( LONG ) ( a_##name + 3 ) & ~3 );
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) ( ( a ) < ( b ) ? ( a ) : ( b ) )
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
#ifdef ASIO_NOEXTERNALS
|
||||
AsyncFile *
|
||||
AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt, struct ExecBase *SysBase, struct DosLibrary *DOSBase );
|
||||
#else
|
||||
AsyncFile *
|
||||
AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt );
|
||||
#endif
|
||||
VOID AS_SendPacket( AsyncFile *file, APTR arg2 );
|
||||
LONG AS_WaitPacket( AsyncFile *file );
|
||||
VOID AS_RequeuePacket( AsyncFile *file );
|
||||
VOID AS_RecordSyncFailure( AsyncFile *file );
|
||||
|
||||
#endif /* _ASYNC_H_ */
|
||||
@@ -0,0 +1,428 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
/* Define to use back slash as directory separator. */
|
||||
#undef BACK_SLASH
|
||||
|
||||
/* Target: standard I/O. */
|
||||
#undef BASIC
|
||||
|
||||
/* Define to use buffered debug output. */
|
||||
#undef BUFFERED_LOG
|
||||
|
||||
/* Define to allow sound clipping. */
|
||||
#undef CLIP_SOUND
|
||||
|
||||
/* Define to 1 if the `closedir' function returns void instead of `int'. */
|
||||
#undef CLOSEDIR_VOID
|
||||
|
||||
/* Define to allow console sound (keyboard clicks). */
|
||||
#define CONSOLE_SOUND 1
|
||||
|
||||
/* Define to activate crash menu after CIM instruction. */
|
||||
#define CRASH_MENU 1
|
||||
|
||||
/* Define to disable bitmap graphics emulation in CURSES target. */
|
||||
#undef CURSES_BASIC
|
||||
|
||||
/* Alternate config filename due to 8+3 fs limit. */
|
||||
#define DEFAULT_CFG_NAME "PROGDIR:Atari800.cfg"
|
||||
|
||||
/* Target: Windows with DirectX. */
|
||||
#undef DIRECTX
|
||||
|
||||
/* Target: DOS VGA. */
|
||||
#undef DOSVGA
|
||||
|
||||
/* Define to enable DOS style drives support. */
|
||||
#undef DOS_DRIVES
|
||||
|
||||
/* Target: Atari Falcon system. */
|
||||
#undef FALCON
|
||||
|
||||
/* Define to use m68k assembler CPU core for Falcon target. */
|
||||
#undef FALCON_CPUASM
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the `atexit' function. */
|
||||
#define HAVE_ATEXIT 1
|
||||
|
||||
/* Define to 1 if you have the `chmod' function. */
|
||||
#define HAVE_CHMOD 1
|
||||
|
||||
/* Define to 1 if you have the `clock' function. */
|
||||
#define HAVE_CLOCK 1
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file. */
|
||||
#undef HAVE_DIRECT_H
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `fdopen' function. */
|
||||
#define HAVE_FDOPEN 1
|
||||
|
||||
/* Define to 1 if you have the `fflush' function. */
|
||||
#define HAVE_FFLUSH 1
|
||||
|
||||
/* Define to 1 if you have the <file.h> header file. */
|
||||
#undef HAVE_FILE_H
|
||||
|
||||
/* Define to 1 if you have the `floor' function. */
|
||||
#define HAVE_FLOOR 1
|
||||
|
||||
/* Define to 1 if you have the `fstat' function. */
|
||||
#define HAVE_FSTAT 1
|
||||
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#undef HAVE_GETHOSTBYADDR
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#undef HAVE_INET_NTOA
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `png' library (-lpng). */
|
||||
/*#define HAVE_LIBPNG 1*/
|
||||
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
/*#define HAVE_LIBZ 1*/
|
||||
|
||||
/* Define to 1 if you have the `localtime' function. */
|
||||
#define HAVE_LOCALTIME 1
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
#define HAVE_MKDIR 1
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
#define HAVE_MKSTEMP 1
|
||||
|
||||
/* Define to 1 if you have the `mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the `modf' function. */
|
||||
#define HAVE_MODF 1
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
#undef HAVE_NANOSLEEP
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the `opendir' function. */
|
||||
#define HAVE_OPENDIR 1
|
||||
|
||||
/* Define to 1 if you have the `rename' function. */
|
||||
#define HAVE_RENAME 1
|
||||
|
||||
/* Define to 1 if you have the `rewind' function. */
|
||||
#define HAVE_REWIND 1
|
||||
|
||||
/* Define to 1 if you have the `rmdir' function. */
|
||||
#define HAVE_RMDIR 1
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the `stat' function. */
|
||||
#define HAVE_STAT 1
|
||||
|
||||
/* Define to 1 if `stat' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
#undef HAVE_STAT_EMPTY_STRING_BUG
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#define HAVE_STRRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the `strtol' function. */
|
||||
#define HAVE_STRTOL 1
|
||||
|
||||
/* Define to 1 if you have the `system' function. */
|
||||
//#define HAVE_SYSTEM 1
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
||||
#undef HAVE_SYS_SOUNDCARD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the `time' function. */
|
||||
#define HAVE_TIME 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the `tmpfile' function. */
|
||||
#define HAVE_TMPFILE 1
|
||||
|
||||
/* Define to 1 if you have the `tmpnam' function. */
|
||||
#define HAVE_TMPNAM 1
|
||||
|
||||
/* Define to 1 if you have the `uclock' function. */
|
||||
#define HAVE_UCLOCK 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the <unixio.h> header file. */
|
||||
#undef HAVE_UNIXIO_H
|
||||
|
||||
/* Define to 1 if you have the `unlink' function. */
|
||||
#define HAVE_UNLINK 1
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#define HAVE_USLEEP 1
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* define to enable sound interpolation */
|
||||
#define INTERPOLATE_SOUND 1
|
||||
|
||||
/* Define to use LINUX joystick. */
|
||||
#undef LINUX_JOYSTICK
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||
|
||||
/* Define to activate assembler in monitor. */
|
||||
#define MONITOR_ASSEMBLER 1
|
||||
|
||||
/* Define to activate BREAK command in monitor. */
|
||||
#undef MONITOR_BREAK
|
||||
|
||||
/* Define to activate user-defined breakpoints. */
|
||||
#undef MONITOR_BREAKPOINTS
|
||||
|
||||
/* Define to activate hints in disassembler. */
|
||||
#define MONITOR_HINTS 1
|
||||
|
||||
/* Target: X11 with Motif. */
|
||||
#undef MOTIF
|
||||
|
||||
/* Define to allow color changes inside a scanline. */
|
||||
#define NEW_CYCLE_EXACT 1
|
||||
|
||||
/* Define to use page-based attribute array. */
|
||||
#undef PAGED_ATTRIB
|
||||
|
||||
/* Target: Sony PlayStation 2. */
|
||||
#undef PS2
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to use R: device. */
|
||||
#undef R_IO_DEVICE
|
||||
|
||||
/* Target: SDL library. */
|
||||
#undef SDL
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* Define to allow serial in/out sound. */
|
||||
#define SERIO_SOUND 1
|
||||
|
||||
/* Target: X11 with shared memory extensions. */
|
||||
#undef SHM
|
||||
|
||||
/* Define to activate sound support. */
|
||||
#define SOUND 1
|
||||
#define SOUND_GAIN 2
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to allow stereo sound. */
|
||||
#define STEREO 1
|
||||
#define STEREO_SOUND 1
|
||||
|
||||
/* Save additional config file options. */
|
||||
#define SUPPORTS_ATARI_CONFIGSAVE 1
|
||||
|
||||
/* Additional config file options. */
|
||||
#define SUPPORTS_ATARI_CONFIGURE 1
|
||||
|
||||
/* Target: Linux with SVGALib. */
|
||||
#undef SVGALIB
|
||||
|
||||
/* Define to use Toshiba Joystick Mouse support. */
|
||||
#undef SVGA_JOYMOUSE
|
||||
|
||||
/* Define for drawing every 1/50 sec only 1/refresh of screen. */
|
||||
#undef SVGA_SPEEDUP
|
||||
|
||||
/* Alternate system-wide config file for non-Unix OS. */
|
||||
#undef SYSTEM_WIDE_CFG_FILE
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Define to use clock() instead of gettimeofday(). */
|
||||
#undef USE_CLOCK
|
||||
|
||||
/* Target: Curses-compatible library. */
|
||||
#undef USE_CURSES
|
||||
|
||||
/* Define for using cursor/ctrl keys for keyboard joystick. */
|
||||
#undef USE_CURSORBLOCK
|
||||
|
||||
/* Target: Ncurses library. */
|
||||
#undef USE_NCURSES
|
||||
|
||||
/* Define to use very slow computer support (faster -refresh). */
|
||||
#undef VERY_SLOW
|
||||
|
||||
/* Define to allow volume only sound. */
|
||||
#undef VOL_ONLY_SOUND
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#define WORDS_BIGENDIAN 1
|
||||
|
||||
/* Define if unaligned word access is ok. */
|
||||
#undef WORDS_UNALIGNED_OK
|
||||
|
||||
/* Target: Standard X11. */
|
||||
#undef X11
|
||||
|
||||
/* Target: X11 with XView. */
|
||||
#undef XVIEW
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
#undef inline
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
#undef volatile
|
||||
|
||||
#endif
|
||||
|
||||
/* Use Signed Samples in POKEY emulation */
|
||||
#define SIGNED_SAMPLES 1
|
||||
|
||||
/* Define two screen arrays used for switching */
|
||||
#define BITPL_SCR 1
|
||||
@@ -0,0 +1,322 @@
|
||||
/*
|
||||
* amiga.c - Amiga specific port code
|
||||
*
|
||||
* Copyright (c) 2000 Sebastian Bauer
|
||||
* Copyright (c) 2000-2003 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <exec/types.h>
|
||||
|
||||
#define ALL_REACTION_CLASSES
|
||||
#include <reaction/reaction.h>
|
||||
#include <reaction/reaction_macros.h>
|
||||
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
#include <proto/intuition.h>
|
||||
|
||||
#include "gui.h"
|
||||
#include "support.h"
|
||||
|
||||
struct Library *WindowBase;
|
||||
struct Library *LayoutBase;
|
||||
struct Library *ButtonBase;
|
||||
struct Library *ListBrowserBase;
|
||||
struct Library *TextEditorBase;
|
||||
struct Library *LabelBase;
|
||||
struct Library *StringBase;
|
||||
struct Library *ScrollerBase;
|
||||
struct Library *GetFileBase;
|
||||
struct Library *ChooserBase;
|
||||
struct Library *ClickTabBase;
|
||||
struct Library *CheckBoxBase;
|
||||
struct Library *GetScreenModeBase;
|
||||
|
||||
struct WindowIFace *IWindow;
|
||||
struct LayoutIFace *ILayout;
|
||||
struct ButtonIFace *IButton;
|
||||
struct ListBrowserIFace *IListBrowser;
|
||||
struct TextEditorIFace *ITextEditor;
|
||||
struct LabelIFace *ILabel;
|
||||
struct StringIFace *IString;
|
||||
struct ScrollerIFace *IScroller;
|
||||
struct GetFileIFace *IGetFile;
|
||||
struct ChooserIFace *IChooser;
|
||||
struct ClickTabIFace *IClickTab;
|
||||
struct CheckBoxIFace *ICheckBox;
|
||||
struct GetScreenModeIFace *IGetScreenMode;
|
||||
|
||||
#define LIBENTRY(name,version,base,iface) {name,version,(struct Library**)base,(struct Interface**) iface}
|
||||
static struct
|
||||
{
|
||||
STRPTR Name;
|
||||
ULONG Version;
|
||||
struct Library **Base;
|
||||
struct Interface **IFace;
|
||||
} libraries[] =
|
||||
{
|
||||
LIBENTRY("window.class",44,&WindowBase,&IWindow),
|
||||
LIBENTRY("gadgets/getfile.gadget",44,&GetFileBase, &IGetFile),
|
||||
LIBENTRY("gadgets/layout.gadget",44,&LayoutBase, &ILayout),
|
||||
LIBENTRY("gadgets/chooser.gadget",45,&ChooserBase, &IChooser),
|
||||
LIBENTRY("gadgets/clicktab.gadget",44,&ClickTabBase, &IClickTab),
|
||||
LIBENTRY("gadgets/button.gadget",44,&ButtonBase,&IButton),
|
||||
LIBENTRY("gadgets/listbrowser.gadget",44,&ListBrowserBase,&IListBrowser),
|
||||
LIBENTRY("gadgets/texteditor.gadget",50,&TextEditorBase,&ITextEditor),
|
||||
LIBENTRY("gadgets/string.gadget",44,&StringBase,&IString),
|
||||
LIBENTRY("gadgets/scroller.gadget",44,&ScrollerBase,&IScroller),
|
||||
LIBENTRY("gadgets/checkbox.gadget",44,&CheckBoxBase, &ICheckBox),
|
||||
LIBENTRY("gadgets/getscreenmode.gadget",44,&GetScreenModeBase, &IGetScreenMode),
|
||||
LIBENTRY("images/label.image",44,&LabelBase,&ILabel),
|
||||
};
|
||||
|
||||
/****************************************
|
||||
Close libraries
|
||||
*****************************************/
|
||||
static void CloseGUILibs(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0;i<sizeof(libraries)/sizeof(libraries[0]);i++)
|
||||
{
|
||||
CloseLibraryInterface(*libraries[i].Base,*libraries[i].IFace);
|
||||
*libraries[i].Base = NULL;
|
||||
*libraries[i].IFace = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************
|
||||
Open needed Libraries
|
||||
*****************************************/
|
||||
static int OpenGUILibs(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0;i<sizeof(libraries)/sizeof(libraries[0]);i++)
|
||||
{
|
||||
if (!(*libraries[i].Base = OpenLibraryInterface(libraries[i].Name,
|
||||
libraries[i].Version,
|
||||
libraries[i].IFace)))
|
||||
{
|
||||
printf("Unable to open %s version %ld\n",libraries[i].Name,libraries[i].Version);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
out:
|
||||
CloseGUILibs();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Get Attribute easily
|
||||
***********************************************************************/
|
||||
static ULONG xget(Object * obj, ULONG attribute)
|
||||
{
|
||||
ULONG x;
|
||||
IIntuition->GetAttr(attribute, obj, (ULONG*)&x);
|
||||
return (x);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Set attributes of a given object.
|
||||
Difference to RefreshSetGadgetAttrs() is that the parameters are all
|
||||
Objects.
|
||||
***********************************************************************/
|
||||
void RefreshSetObjectAttrsA(Object *o, Object *wo, struct TagItem *tags)
|
||||
{
|
||||
struct Gadget *g = (struct Gadget*)o;
|
||||
struct Window *w = (struct Window*)xget(wo,WINDOW_Window);
|
||||
|
||||
if (!o) return;
|
||||
|
||||
IIntuition->RefreshSetGadgetAttrsA(g,w,NULL,tags);
|
||||
}
|
||||
|
||||
void VARARGS68K RefreshSetObjectAttrs(Object *o, Object *wo, ...)
|
||||
{
|
||||
ULONG *tags;
|
||||
va_list args;
|
||||
|
||||
va_startlinear(args,wo);
|
||||
|
||||
tags = va_getlinearva(args,ULONG*);
|
||||
RefreshSetObjectAttrsA(o,wo,(struct TagItem *)tags);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/****** GUI ********/
|
||||
static Object *main_wnd;
|
||||
static Object *displaytype_chooser;
|
||||
static Object *screenmode_getscreenmode;
|
||||
//static Object *bestscreenmode_checkbox;
|
||||
|
||||
static int quitting;
|
||||
|
||||
enum
|
||||
{
|
||||
GID_QUIT = 1,
|
||||
GID_SAVE,
|
||||
GID_USE
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
Handle
|
||||
***********************************************************************/
|
||||
static int Handle(struct AtariConfig *config)
|
||||
{
|
||||
int rc = 0;
|
||||
ULONG result;
|
||||
UWORD code;
|
||||
|
||||
while ((result = RA_HandleInput(main_wnd, &code) ) != WMHI_LASTMSG )
|
||||
{
|
||||
switch (result & WMHI_CLASSMASK)
|
||||
{
|
||||
case WMHI_CLOSEWINDOW:
|
||||
rc = 1;
|
||||
break;
|
||||
|
||||
case WMHI_GADGETUP:
|
||||
switch (result & WMHI_GADGETMASK)
|
||||
{
|
||||
case GID_QUIT: rc = 1; quitting = 1; break;
|
||||
case GID_SAVE: rc = 1; break;
|
||||
case GID_USE: rc = 1; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*******************************
|
||||
Eventlloop
|
||||
********************************/
|
||||
static void Loop(struct AtariConfig *config)
|
||||
{
|
||||
int ready = 0;
|
||||
ULONG mainMask;
|
||||
|
||||
while (!ready)
|
||||
{
|
||||
ULONG mask;
|
||||
|
||||
IIntuition->GetAttr(WINDOW_SigMask, main_wnd, &mainMask);
|
||||
|
||||
mask = IExec->Wait(SIGBREAKF_CTRL_C | mainMask);
|
||||
|
||||
if (mask & mainMask)
|
||||
ready = Handle(config);
|
||||
|
||||
if (mask & SIGBREAKF_CTRL_C) ready = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Configure atari
|
||||
***********************************************************************/
|
||||
BOOL Configure(struct AtariConfig *config)
|
||||
{
|
||||
static char * const tabLabels[] = {"General","Graphics","Sound","Paths",NULL};
|
||||
static char * const screenTypeLabels[] = {"Custom","Window", "Sizeable Window", NULL};
|
||||
|
||||
if (!OpenGUILibs()) goto out;
|
||||
|
||||
main_wnd = (Object*)WindowObject,
|
||||
WA_Title, "Atari800",
|
||||
WA_Activate, TRUE,
|
||||
WA_DepthGadget, TRUE,
|
||||
WA_DragBar, TRUE,
|
||||
WA_CloseGadget, TRUE,
|
||||
WA_SizeGadget, TRUE,
|
||||
WA_IDCMP, IDCMP_INTUITICKS,
|
||||
// WINDOW_IDCMPHook, &idcmpHook,
|
||||
WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE,
|
||||
WINDOW_Position, WPOS_CENTERSCREEN,
|
||||
WINDOW_ParentGroup, VGroupObject,
|
||||
LAYOUT_SpaceOuter, TRUE,
|
||||
LAYOUT_DeferLayout, TRUE,
|
||||
|
||||
LAYOUT_AddChild, ClickTabObject,
|
||||
GA_Text, &tabLabels,
|
||||
CLICKTAB_PageGroup, PageObject,
|
||||
PAGE_Add, VGroupObject,
|
||||
EndGroup,
|
||||
|
||||
PAGE_Add, VGroupObject, /* Graphics */
|
||||
LAYOUT_AddChild, displaytype_chooser = ChooserObject,
|
||||
CHOOSER_LabelArray, screenTypeLabels,
|
||||
CHOOSER_Selected, 0,
|
||||
End,
|
||||
MemberLabel("Displaytype"),
|
||||
|
||||
LAYOUT_AddChild, screenmode_getscreenmode = GetScreenModeObject,
|
||||
End,
|
||||
MemberLabel("Screenmode"),
|
||||
CHILD_WeightedHeight, 0,
|
||||
|
||||
LAYOUT_AddChild, CheckBoxObject,
|
||||
CHECKBOX_Checked, config->UseBestID,
|
||||
End,
|
||||
MemberLabel("Use best screen mode"),
|
||||
EndGroup,
|
||||
CHILD_WeightedHeight, 0,
|
||||
|
||||
PAGE_Add, VGroupObject,
|
||||
LAYOUT_AddChild, CheckBoxObject,
|
||||
End,
|
||||
MemberLabel("Enable Sound"),
|
||||
EndGroup,
|
||||
|
||||
|
||||
PAGE_Add, VGroupObject, /* Sound */
|
||||
EndGroup,
|
||||
End, /* Page */
|
||||
End, /* Clicktab */
|
||||
LAYOUT_AddChild, HGroupObject,
|
||||
LAYOUT_AddChild, Button("Start & Save",GID_SAVE),
|
||||
LAYOUT_AddChild, Button("Start & Use",GID_USE),
|
||||
LAYOUT_AddChild, Button("Quit",GID_QUIT),
|
||||
EndGroup,
|
||||
CHILD_WeightedHeight, 0,
|
||||
EndGroup,
|
||||
EndWindow;
|
||||
|
||||
if (!main_wnd) goto out;
|
||||
|
||||
RA_OpenWindow(main_wnd);
|
||||
|
||||
Loop(config);
|
||||
|
||||
IIntuition->DisposeObject(main_wnd);
|
||||
CloseGUILibs();
|
||||
return quitting?FALSE:TRUE;
|
||||
|
||||
out:
|
||||
IIntuition->DisposeObject(main_wnd);
|
||||
CloseGUILibs();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef _GUI_H
|
||||
#define _GUI_H
|
||||
|
||||
#ifndef EXEC_TYPES_H
|
||||
#include <exec/types.h>
|
||||
#endif
|
||||
|
||||
struct AtariConfig
|
||||
{
|
||||
|
||||
/* Amiga */
|
||||
ULONG DisplayType;
|
||||
ULONG DisplayID;
|
||||
BOOL UseBestID;
|
||||
};
|
||||
|
||||
BOOL Configure(struct AtariConfig *config);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,107 @@
|
||||
# If Kickstart isn't defined, we don't run on AmigaOS
|
||||
ifndef Kickstart
|
||||
CROSS_COMPILE = ppc-amigaos-
|
||||
RM = rm -R
|
||||
MKDIR = mkdir -p
|
||||
else
|
||||
RM = delete all
|
||||
MKDIR = makedir
|
||||
endif
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
RANLIB = $(CROSS_COMPILE)ranlib
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
|
||||
# -------------------------------------------------------------
|
||||
|
||||
TARGET = Atari800
|
||||
VERSION = 2
|
||||
#CFLAGS = -O3 -I$(AHI_INCLUDE) -I. -I.. -Wall -use-dynld -DSUPPORTS_PLATFORM_CONFIGURE -DSUPPORTS_PLATFORM_CONFIGSAVE
|
||||
CFLAGS = -O3 -I$(AHI_INCLUDE) -I. -I.. -Wall -DSUPPORTS_PLATFORM_CONFIGURE -DSUPPORTS_PLATFORM_CONFIGSAVE
|
||||
#LIBS = -lm -lz -lpng -lAuto
|
||||
LIBS = -lm -lauto
|
||||
|
||||
AMIGASRCS=\
|
||||
amiga.c \
|
||||
gui.c \
|
||||
support.c
|
||||
|
||||
EMUSRCS= \
|
||||
afile.c \
|
||||
antic.c \
|
||||
artifact.c \
|
||||
atari.c \
|
||||
binload.c \
|
||||
cartridge.c \
|
||||
cassette.c \
|
||||
compfile.c \
|
||||
cfg.c \
|
||||
colours.c \
|
||||
colours_external.c \
|
||||
colours_pal.c \
|
||||
colours_ntsc.c \
|
||||
cpu.c \
|
||||
devices.c \
|
||||
esc.c \
|
||||
gtia.c \
|
||||
log.c \
|
||||
memory.c \
|
||||
monitor.c \
|
||||
pia.c \
|
||||
pokey.c \
|
||||
rtime.c \
|
||||
sio.c \
|
||||
util.c \
|
||||
pbi_proto80.c \
|
||||
input.c \
|
||||
statesav.c \
|
||||
ui_basic.c \
|
||||
ui.c \
|
||||
screen.c \
|
||||
cycle_map.c \
|
||||
pbi_mio.c \
|
||||
pbi_bb.c \
|
||||
pbi_scsi.c \
|
||||
pokeysnd.c \
|
||||
mzpokeysnd.c \
|
||||
remez.c \
|
||||
sndsave.c \
|
||||
pbi_xld.c \
|
||||
votrax.c \
|
||||
votraxsnd.c \
|
||||
xep80.c \
|
||||
xep80_fonts.c \
|
||||
pbi.c
|
||||
|
||||
|
||||
SRCS = $(AMIGASRCS) $(addprefix ../,$(EMUSRCS))
|
||||
|
||||
# -------------------------------------------------------------
|
||||
|
||||
OBJS = $(SRCS:%.c=ppc-amigaos-objs/amiga/%.o)
|
||||
AOBJS = $(ASRCS:%.S=ppc-amigaos-objs/amiga/%.o)
|
||||
|
||||
all: dirs $(TARGET)
|
||||
|
||||
dirs:
|
||||
-$(MKDIR) ppc-amigaos-objs ppc-amigaos-objs/amiga
|
||||
|
||||
# Rules for building
|
||||
$(TARGET): $(OBJS) $(AOBJS)
|
||||
$(CC) $(LINK) -o $@.debug $(OBJS) $(AOBJS) $(LIBS)
|
||||
$(STRIP) -R.comment -o $@ $@.debug
|
||||
|
||||
ppc-amigaos-objs/amiga/%.o: %.S
|
||||
$(CC) -Wa,-mregnames $(AFLAGS) -I$/home/sba/amigaos4/include -c $< -o $@
|
||||
|
||||
ppc-amigaos-objs/amiga/%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) $(TARGET) $(OBJS) ppc-amigaos-objs
|
||||
|
||||
.PHONY: revision
|
||||
revision:
|
||||
bumprev $(VERSION) $(TARGET)
|
||||
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* support.c - user interface support code
|
||||
*
|
||||
* Copyright (c) 2000 Sebastian Bauer
|
||||
* Copyright (c) 2000-2003 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define __USE_INLINE__
|
||||
#define DoSuperMethod IDoSuperMethod
|
||||
#define DoSuperMethodA IDoSuperMethodA
|
||||
#define DoMethod IDoMethod
|
||||
#define DoMethodA IDoMethodA
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <cybergraphx/cybergraphics.h>
|
||||
#include <libraries/gadtools.h>
|
||||
|
||||
#include <clib/alib_protos.h>
|
||||
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
#include <proto/graphics.h>
|
||||
#include <proto/cybergraphics.h>
|
||||
#include <proto/intuition.h>
|
||||
|
||||
/**************************************************************************
|
||||
Some general supports
|
||||
**************************************************************************/
|
||||
LONG StrLen( const STRPTR str)
|
||||
{
|
||||
if(str) return (LONG)strlen(str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
STRPTR StrCopy( const STRPTR str )
|
||||
{
|
||||
STRPTR dst;
|
||||
if( !str ) return NULL;
|
||||
if( !*str) return NULL;
|
||||
|
||||
dst = (STRPTR)AllocVec(strlen(str)+1,0);
|
||||
if(dst) strcpy(dst,str);
|
||||
return dst;
|
||||
}
|
||||
|
||||
STRPTR GetFullPath( STRPTR drw, STRPTR file)
|
||||
{
|
||||
WORD dl = StrLen(drw);
|
||||
WORD fl = StrLen( file );
|
||||
LONG length = dl + fl + 6;
|
||||
STRPTR fp = (STRPTR)AllocVec( length+1, 0 );
|
||||
|
||||
if( fp )
|
||||
{
|
||||
strcpy( fp, drw );
|
||||
|
||||
if( AddPart( fp, file, length )) return fp;
|
||||
else FreeVec( fp );
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
STRPTR AddSuffix(const STRPTR name, const STRPTR suf)
|
||||
{
|
||||
STRPTR str;
|
||||
if(!strstr(name,suf))
|
||||
{
|
||||
LONG len = StrLen(name)+StrLen(suf)+2;
|
||||
str = (STRPTR)AllocVec(len,0);
|
||||
if(str)
|
||||
{
|
||||
strcpy(str,name);
|
||||
strcat(str,suf);
|
||||
}
|
||||
} else str = StrCopy(name);
|
||||
return str;
|
||||
}
|
||||
|
||||
ULONG GetBestID( ULONG width, ULONG height, ULONG depth )
|
||||
{
|
||||
struct Screen *defscr;
|
||||
ULONG displayID;
|
||||
|
||||
if ((defscr = LockPubScreen(NULL)))
|
||||
{
|
||||
struct ViewPort *vp;
|
||||
|
||||
vp = &defscr->ViewPort;
|
||||
|
||||
displayID = BestModeID( BIDTAG_Depth,depth,
|
||||
BIDTAG_NominalWidth, width,
|
||||
BIDTAG_NominalHeight, height,
|
||||
BIDTAG_MonitorID, GetVPModeID( vp ) & MONITOR_ID_MASK,
|
||||
TAG_DONE);
|
||||
|
||||
if (CyberGfxBase)
|
||||
{
|
||||
if (IsCyberModeID(displayID))
|
||||
{
|
||||
struct DimensionInfo dims;
|
||||
|
||||
/* Get the normal dimensions of the returned displayID */
|
||||
if (GetDisplayInfoData(NULL,&dims,sizeof(dims),DTAG_DIMS,displayID) > 0)
|
||||
{
|
||||
ULONG modeWidth = dims.Nominal.MaxX - dims.Nominal.MinX + 1;
|
||||
ULONG modeHeight = dims.Nominal.MaxY - dims.Nominal.MinY + 1;
|
||||
|
||||
/* If dimensions differ to "much", try to get a better one via cybergfx calls */
|
||||
if (modeWidth > width * 4 / 3 || modeHeight > height * 4 / 3)
|
||||
{
|
||||
displayID = BestCModeIDTags(
|
||||
CYBRBIDTG_Depth, depth,
|
||||
CYBRBIDTG_NominalWidth, width,
|
||||
CYBRBIDTG_NominalHeight, height,
|
||||
CYBRBIDTG_MonitorID, GetVPModeID( vp ) & MONITOR_ID_MASK,
|
||||
TAG_DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UnlockPubScreen( NULL, defscr );
|
||||
} else displayID = INVALID_ID;
|
||||
|
||||
if (displayID == INVALID_ID)
|
||||
{
|
||||
displayID = BestModeID( BIDTAG_Depth,depth,
|
||||
BIDTAG_NominalWidth, width,
|
||||
BIDTAG_NominalHeight, height,
|
||||
TAG_DONE);
|
||||
}
|
||||
|
||||
return displayID;
|
||||
}
|
||||
|
||||
STRPTR GetDisplayName(ULONG displayid)
|
||||
{
|
||||
STATIC struct NameInfo DisplayNameInfo;
|
||||
STATIC char DisplayNameBuffer[256];
|
||||
|
||||
LONG i, v;
|
||||
|
||||
i = 0;
|
||||
v = GetDisplayInfoData(NULL, (UBYTE *) &DisplayNameInfo, sizeof(DisplayNameInfo),
|
||||
DTAG_NAME, displayid);
|
||||
|
||||
if(v > sizeof(struct QueryHeader))
|
||||
{
|
||||
for(; (i < sizeof(DisplayNameBuffer) - 1) && DisplayNameInfo.Name[i]; i++)
|
||||
DisplayNameBuffer[i] = DisplayNameInfo.Name[i];
|
||||
}
|
||||
|
||||
if(displayid == INVALID_ID)
|
||||
strcpy(DisplayNameBuffer, "InvalidID"/*GetMessage(MSG_INVALID)*/);
|
||||
else
|
||||
{
|
||||
if(i < sizeof(DisplayNameBuffer) - sizeof(" (0x00000000)"))
|
||||
{
|
||||
DisplayNameBuffer[i++] = ' ';
|
||||
DisplayNameBuffer[i++] = '(';
|
||||
DisplayNameBuffer[i++] = '0';
|
||||
DisplayNameBuffer[i++] = 'x';
|
||||
|
||||
for(v = 28; (v >= 0) && (!((displayid >> v) & 0xf)); v -= 4);
|
||||
|
||||
if(v < 0)
|
||||
DisplayNameBuffer[i++] = '0';
|
||||
|
||||
for(; (v >= 0); v -= 4)
|
||||
{
|
||||
if(((displayid >> v) & 0xf) > 9)
|
||||
DisplayNameBuffer[i++] = ((displayid >> v) & 0xf) + 'a' - 10;
|
||||
else
|
||||
DisplayNameBuffer[i++] = ((displayid >> v) & 0xf) + '0';
|
||||
}
|
||||
DisplayNameBuffer[i++] = ')';
|
||||
}
|
||||
|
||||
DisplayNameBuffer[i++] = 0;
|
||||
}
|
||||
|
||||
return DisplayNameBuffer;
|
||||
}
|
||||
|
||||
APTR FindUserData( struct Menu *menu, APTR userdata)
|
||||
{
|
||||
while(menu)
|
||||
{
|
||||
struct MenuItem *mi;
|
||||
|
||||
if(GTMENU_USERDATA( menu ) == userdata) return menu;
|
||||
|
||||
mi = menu->FirstItem;
|
||||
while(mi)
|
||||
{
|
||||
struct MenuItem *smi;
|
||||
|
||||
if(GTMENUITEM_USERDATA( mi ) == userdata) return mi;
|
||||
|
||||
smi = mi->SubItem;
|
||||
while(smi)
|
||||
{
|
||||
if(GTMENUITEM_USERDATA( smi ) == userdata) return smi;
|
||||
smi = smi->NextItem;
|
||||
}
|
||||
mi = mi->NextItem;
|
||||
}
|
||||
menu = menu->NextMenu;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
...
|
||||
**************************************************************************/
|
||||
struct Library *OpenLibraryInterface(STRPTR name, int version, void *interface_ptr)
|
||||
{
|
||||
struct Library *lib = OpenLibrary(name,version);
|
||||
struct Interface *iface;
|
||||
if (!lib) return NULL;
|
||||
|
||||
iface = GetInterface(lib,"main",1,NULL);
|
||||
if (!iface)
|
||||
{
|
||||
CloseLibrary(lib);
|
||||
return NULL;
|
||||
}
|
||||
*((struct Interface**)interface_ptr) = iface;
|
||||
return lib;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
...
|
||||
**************************************************************************/
|
||||
void CloseLibraryInterface(struct Library *lib, void *interface)
|
||||
{
|
||||
DropInterface(interface);
|
||||
CloseLibrary(lib);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef _SUPPORT_H_
|
||||
#define _SUPPORT_H_
|
||||
|
||||
#define InnerWidth(w) (w->Width - w->BorderLeft - w->BorderRight)
|
||||
#define InnerHeight(w) (w->Height - w->BorderTop - w->BorderBottom)
|
||||
|
||||
/* Some MUI Support Functions */
|
||||
#if 0
|
||||
LONG xget(Object *obj,ULONG attribute);
|
||||
char *getstr(Object *obj);
|
||||
BOOL getbool(Object *obj);
|
||||
|
||||
Object *MakeLabel(STRPTR str);
|
||||
Object *MakeLabel1(STRPTR str);
|
||||
Object *MakeLabel2(STRPTR str);
|
||||
Object *MakeLLabel(STRPTR str);
|
||||
Object *MakeLLabel1(STRPTR str);
|
||||
Object *MakeCheck(BOOL check);
|
||||
Object *MakeButton(STRPTR str);
|
||||
Object *MakeCycle(STRPTR *array);
|
||||
Object *MakeString(STRPTR def, LONG maxlen);
|
||||
Object *MakeImageButton(ULONG image);
|
||||
Object *MakeLV(APTR pool);
|
||||
|
||||
ULONG DoSuperNew(struct IClass *cl,Object *obj,ULONG tag1,...);
|
||||
|
||||
#define nnsetstring(obj,s) nnset(obj,MUIA_String_Contents,s)
|
||||
#endif
|
||||
|
||||
LONG StrLen( const STRPTR str);
|
||||
STRPTR StrCopy( const STRPTR str );
|
||||
STRPTR GetFullPath( STRPTR drw, STRPTR file);
|
||||
STRPTR AddSuffix(const STRPTR name, const STRPTR suf);
|
||||
ULONG GetBestID( ULONG width, ULONG height, ULONG depth );
|
||||
STRPTR GetDisplayName(ULONG displayid);
|
||||
APTR FindUserData( struct Menu *menu, APTR userdata);
|
||||
|
||||
struct Library *OpenLibraryInterface(STRPTR name, int version, void *interface_ptr);
|
||||
void CloseLibraryInterface(struct Library *lib, void *interface);
|
||||
|
||||
#endif /* _SUPPORT_H_ */
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* unixfunc.c - only required for the Maxon compiler
|
||||
*
|
||||
* Copyright (c) 2000 Sebastian Bauer
|
||||
* Copyright (c) 2000-2003 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef __MAXON__
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <pragma/dos_lib.h>
|
||||
#include <pragma/exec_lib.h>
|
||||
|
||||
int __open(const char *name, int mode,...)
|
||||
{
|
||||
BPTR fh;
|
||||
|
||||
if( mode & O_RDONLY )
|
||||
{
|
||||
fh = Open((STRPTR)name,MODE_OLDFILE);
|
||||
} else
|
||||
{
|
||||
if(mode & O_WRONLY)
|
||||
{
|
||||
fh = Open((STRPTR)name,MODE_NEWFILE);
|
||||
} else fh = Open((STRPTR)name, MODE_OLDFILE);
|
||||
}
|
||||
|
||||
if(!fh) fh = (BPTR)-1;
|
||||
|
||||
return (int)fh;
|
||||
}
|
||||
|
||||
int __close(int fh)
|
||||
{
|
||||
if(fh && fh != -1 ) Close((BPTR)fh);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __write(int fh, const void *buffer, unsigned int length)
|
||||
{
|
||||
return Write((BPTR)fh,(APTR)buffer,length);
|
||||
}
|
||||
|
||||
int __read(int fh, void *buffer, unsigned int length)
|
||||
{
|
||||
int count;
|
||||
|
||||
if (fh == -1) return 0;
|
||||
|
||||
count = Read((BPTR)fh,buffer,length);
|
||||
/* if(!count) count = - 1;*/
|
||||
return count;
|
||||
}
|
||||
|
||||
int unlink(const char *name)
|
||||
{
|
||||
DeleteFile((STRPTR)name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
long lseek(int fh, long rpos, int mode)
|
||||
{
|
||||
long origin = mode;
|
||||
Seek((BPTR)fh,rpos,origin);
|
||||
|
||||
return Seek((BPTR)fh,0,OFFSET_CURRENT);
|
||||
}
|
||||
|
||||
char *strdup(const char *s)
|
||||
{
|
||||
char *p = malloc(strlen(s)+1);
|
||||
if(p)
|
||||
{
|
||||
strcpy(p,s);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
char *getcwd(char *b, int size)
|
||||
{
|
||||
struct Process *p = (struct Process*)FindTask(NULL);
|
||||
NameFromLock(p->pr_CurrentDir, b, size);
|
||||
return b;
|
||||
}
|
||||
|
||||
int stat()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int readdir()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int closedir()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int opendir()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="name.nick.jubanka.colleen"
|
||||
android:installLocation="auto"
|
||||
android:versionCode="300"
|
||||
android:versionName="3.0">
|
||||
<uses-sdk
|
||||
android:minSdkVersion="4"
|
||||
android:targetSdkVersion="20"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
android:icon="@drawable/icon">
|
||||
<activity
|
||||
android:name="MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/MainTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".FileSelector"/>
|
||||
<activity android:name=".Preferences"/>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="colleen" default="help">
|
||||
|
||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||
It contains the path to the SDK. It should *NOT* be checked into
|
||||
Version Control Systems. -->
|
||||
<property file="local.properties" />
|
||||
|
||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||
'android' tool to add properties to it.
|
||||
This is the place to change some Ant specific build properties.
|
||||
Here are some properties you may want to change/update:
|
||||
|
||||
source.dir
|
||||
The name of the source directory. Default is 'src'.
|
||||
out.dir
|
||||
The name of the output directory. Default is 'bin'.
|
||||
|
||||
For other overridable properties, look at the beginning of the rules
|
||||
files in the SDK, at tools/ant/build.xml
|
||||
|
||||
Properties related to the SDK location or the project target should
|
||||
be updated using the 'android' tool with the 'update' action.
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems.
|
||||
|
||||
-->
|
||||
<property file="ant.properties" />
|
||||
|
||||
<!-- if sdk.dir was not set from one of the property file, then
|
||||
get it from the ANDROID_HOME env var.
|
||||
This must be done before we load project.properties since
|
||||
the proguard config can use sdk.dir -->
|
||||
<property environment="env" />
|
||||
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
|
||||
<isset property="env.ANDROID_HOME" />
|
||||
</condition>
|
||||
|
||||
<!-- The project.properties file is created and updated by the 'android'
|
||||
tool, as well as ADT.
|
||||
|
||||
This contains project specific properties such as project target, and library
|
||||
dependencies. Lower level build properties are stored in ant.properties
|
||||
(or in .classpath for Eclipse projects).
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems. -->
|
||||
<loadproperties srcFile="project.properties" />
|
||||
|
||||
<!-- quick check on sdk.dir -->
|
||||
<fail
|
||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
|
||||
unless="sdk.dir"
|
||||
/>
|
||||
|
||||
<!--
|
||||
Import per project custom build rules if present at the root of the project.
|
||||
This is the place to put custom intermediary targets such as:
|
||||
-pre-build
|
||||
-pre-compile
|
||||
-post-compile (This is typically used for code obfuscation.
|
||||
Compiled code location: ${out.classes.absolute.dir}
|
||||
If this is not done in place, override ${out.dex.input.absolute.dir})
|
||||
-post-package
|
||||
-post-build
|
||||
-pre-clean
|
||||
-->
|
||||
<import file="custom_rules.xml" optional="true" />
|
||||
|
||||
<!-- Import the actual build file.
|
||||
|
||||
To customize existing targets, there are two options:
|
||||
- Customize only one target:
|
||||
- copy/paste the target into this file, *before* the
|
||||
<import> task.
|
||||
- customize it to your needs.
|
||||
- Customize the whole content of build.xml
|
||||
- copy/paste the content of the rules files (minus the top node)
|
||||
into this file, replacing the <import> task.
|
||||
- customize to your needs.
|
||||
|
||||
***********************
|
||||
****** IMPORTANT ******
|
||||
***********************
|
||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||
in order to avoid having your file be overridden by tools such as "android update project"
|
||||
-->
|
||||
<!-- version-tag: 1 -->
|
||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,47 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := atari800
|
||||
|
||||
A800_CORE_OBJS := \
|
||||
afile.o \
|
||||
antic.o \
|
||||
atari.o \
|
||||
binload.o \
|
||||
cartridge.o \
|
||||
cassette.o \
|
||||
compfile.o \
|
||||
cfg.o \
|
||||
cpu.o \
|
||||
crc32.o \
|
||||
devices.o \
|
||||
emuos.o \
|
||||
esc.o \
|
||||
gtia.o \
|
||||
img_tape.o \
|
||||
log.o \
|
||||
memory.o \
|
||||
monitor.o \
|
||||
pbi.o \
|
||||
pia.o \
|
||||
pokey.o \
|
||||
rtime.o \
|
||||
sio.o \
|
||||
sysrom.o \
|
||||
util.o \
|
||||
@OBJS@
|
||||
A800_CORE_LIBS := @LIBS@
|
||||
|
||||
ANDROID_SRCS := platform.c \
|
||||
sound.c \
|
||||
graphics.c \
|
||||
jni.c \
|
||||
androidinput.c
|
||||
ANDROID_LIBS := -llog -lGLESv1_CM
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../..
|
||||
LOCAL_SRC_FILES := $(A800_CORE_OBJS:%.o=../../%.c) $(ANDROID_SRCS)
|
||||
LOCAL_LDLIBS := $(A800_CORE_LIBS) $(ANDROID_LIBS)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -0,0 +1 @@
|
||||
APP_PLATFORM := android-9
|
||||
@@ -0,0 +1,547 @@
|
||||
/*
|
||||
* androidinput.c - handle touch & keyboard events from android
|
||||
*
|
||||
* Copyright (C) 2010 Kostas Nakos
|
||||
* Copyright (C) 2010 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "input.h"
|
||||
#include "akey.h"
|
||||
#include "pokey.h"
|
||||
|
||||
#include "graphics.h"
|
||||
#include "androidinput.h"
|
||||
#include "keys.inc"
|
||||
|
||||
#define HIT_OPACITY 0.6f
|
||||
#define POTLIMIT 228
|
||||
|
||||
#define KBD_MAXKEYS (1 << 4)
|
||||
#define KBD_MASK (KBD_MAXKEYS - 1)
|
||||
|
||||
struct touchstate
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int s;
|
||||
};
|
||||
enum
|
||||
{
|
||||
PTRSTL = -1,
|
||||
PTRJOY = 0,
|
||||
PTRTRG,
|
||||
MAXPOINTERS
|
||||
};
|
||||
/* always: pointer 0 is joystick pointer, 1 is fire pointer */
|
||||
static struct touchstate prevtc[MAXPOINTERS];
|
||||
static int prevconptr;
|
||||
|
||||
int Android_Joyleft = TRUE;
|
||||
float Android_Splitpct = 0.5f;
|
||||
int Android_Split;
|
||||
|
||||
int Android_Paddle = FALSE;
|
||||
SWORD Android_POTX = 0;
|
||||
SWORD Android_POTY = 0;
|
||||
int Android_PlanetaryDefense = FALSE;
|
||||
UBYTE Android_ReversePddle = 0;
|
||||
|
||||
struct joy_overlay_state AndroidInput_JoyOvl;
|
||||
struct consolekey_overlay_state AndroidInput_ConOvl;
|
||||
|
||||
UWORD Android_PortStatus;
|
||||
UBYTE Android_TrigStatus;
|
||||
static int Android_Keyboard[KBD_MAXKEYS];
|
||||
static int key_head = 0, key_tail = 0;
|
||||
static int Android_key_control;
|
||||
static pthread_mutex_t key_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static key_last = AKEY_NONE;
|
||||
|
||||
static const int derot_lut[2][4] =
|
||||
{
|
||||
{ KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN }, /* derot left */
|
||||
{ KEY_LEFT, KEY_RIGHT, KEY_DOWN, KEY_UP } /* derot right */
|
||||
};
|
||||
UBYTE softjoymap[SOFTJOY_MAXKEYS + SOFTJOY_MAXACTIONS][2] =
|
||||
{
|
||||
{ KEY_LEFT, INPUT_STICK_LEFT },
|
||||
{ KEY_RIGHT, INPUT_STICK_RIGHT },
|
||||
{ KEY_UP, INPUT_STICK_FORWARD },
|
||||
{ KEY_DOWN, INPUT_STICK_BACK },
|
||||
{ '2', 0 },
|
||||
{ ACTION_NONE, AKEY_NONE },
|
||||
{ ACTION_NONE, AKEY_NONE },
|
||||
{ ACTION_NONE, AKEY_NONE }
|
||||
};
|
||||
int Android_SoftjoyEnable = TRUE;
|
||||
int Android_DerotateKeys = 0;
|
||||
|
||||
int Android_TouchEvent(int x1, int y1, int s1, int x2, int y2, int s2)
|
||||
{
|
||||
int joyptr; /* will point to joystick touch of input set */
|
||||
int tmpfire; /* flag: both pointers on fire side */
|
||||
int dx, dy, dx2, dy2;
|
||||
struct touchstate newtc[MAXPOINTERS];
|
||||
UBYTE newjoy, newtrig;
|
||||
struct joy_overlay_state *jovl;
|
||||
struct consolekey_overlay_state *covl;
|
||||
int conptr; /* will point to stolen ptr, PTRSTL otherwise */
|
||||
int i;
|
||||
float a, potx, poty;
|
||||
int ret = 0;
|
||||
|
||||
jovl = &AndroidInput_JoyOvl;
|
||||
covl = &AndroidInput_ConOvl;
|
||||
prevtc[PTRJOY].x = jovl->joyarea.l + ((jovl->joyarea.r - jovl->joyarea.l) >> 1);
|
||||
prevtc[PTRJOY].y = jovl->joyarea.t + ((jovl->joyarea.b - jovl->joyarea.t) >> 1);
|
||||
|
||||
/* establish joy ptr & fire ptr for new input */
|
||||
/* note: looks complicated & uses boolean magick but gets rid of a labyrinth of ifs :-) */
|
||||
if ((x1 >= Android_Split) ^ (x2 >= Android_Split)) { /* pointers on opposite sides */
|
||||
joyptr = (x1 < Android_Split) ^ Android_Joyleft;
|
||||
} else { /* both pointers either on joystick or on fire side */
|
||||
tmpfire = (x1 >= Android_Split) ^ (!Android_Joyleft); /* both pointers on fire side */
|
||||
dx = (x1 - prevtc[tmpfire].x); /* figure out which is closer to previous */
|
||||
dx2 = (x2 - prevtc[tmpfire].x);
|
||||
dy = (y1 - prevtc[tmpfire].y);
|
||||
dy2 = (y2 - prevtc[tmpfire].y);
|
||||
joyptr = ((dx2*dx2 + dy2*dy2) > (dx*dx + dy*dy)) ^ !tmpfire;
|
||||
s1 &= joyptr ^ (!tmpfire); /* unpress unrelated touch */
|
||||
s2 &= !(joyptr ^ (!tmpfire));
|
||||
}
|
||||
if (joyptr) {
|
||||
newtc[PTRTRG].x = x1; newtc[PTRTRG].y = y1; newtc[PTRTRG].s = s1;
|
||||
newtc[PTRJOY].x = x2; newtc[PTRJOY].y = y2; newtc[PTRJOY].s = s2;
|
||||
} else {
|
||||
newtc[PTRJOY].x = x1; newtc[PTRJOY].y = y1; newtc[PTRJOY].s = s1;
|
||||
newtc[PTRTRG].x = x2; newtc[PTRTRG].y = y2; newtc[PTRTRG].s = s2;
|
||||
}
|
||||
|
||||
if (newtc[PTRJOY].s || newtc[PTRTRG].s)
|
||||
ret = 1;
|
||||
|
||||
/* console keys */
|
||||
conptr = PTRSTL;
|
||||
covl->hitkey = CONK_NOKEY;
|
||||
if (covl->ovl_visible >= COVL_READY) { /* first a quick bounding box check */
|
||||
if (newtc[PTRJOY].s &&
|
||||
newtc[PTRJOY].x >= covl->bbox.l &&
|
||||
newtc[PTRJOY].x < covl->bbox.r &&
|
||||
newtc[PTRJOY].y >= covl->bbox.t &&
|
||||
newtc[PTRJOY].y < covl->bbox.b)
|
||||
conptr = PTRJOY; /* implicit: mask fire by joy pointer */
|
||||
else if (newtc[PTRTRG].s &&
|
||||
newtc[PTRTRG].x >= covl->bbox.l &&
|
||||
newtc[PTRTRG].x < covl->bbox.r &&
|
||||
newtc[PTRTRG].y >= covl->bbox.t &&
|
||||
newtc[PTRTRG].y < covl->bbox.b)
|
||||
conptr = PTRTRG;
|
||||
if (conptr != PTRSTL) { /* if bb is exact on top & bottom => check only horiz/lly */
|
||||
dy = covl->keycoo[i + 1] - newtc[conptr].y;
|
||||
for (i = 0; i < CONK_VERT_MAX; i += 8) {
|
||||
a = ((float) covl->keycoo[i + 6] - covl->keycoo[i ]) /
|
||||
((float) covl->keycoo[i + 1] - covl->keycoo[i + 7]);
|
||||
dx = covl->keycoo[i] + a * dy;
|
||||
if (newtc[conptr].x < dx) continue; /* off left edge */
|
||||
a = ((float) covl->keycoo[i + 4] - covl->keycoo[i + 2]) /
|
||||
((float) covl->keycoo[i + 3] - covl->keycoo[i + 5]);
|
||||
dx = covl->keycoo[i + 2] + a * dy;
|
||||
if (newtc[conptr].x > dx) continue; /* off right edge */
|
||||
covl->hitkey = i / 8; /* hit inside */
|
||||
break;
|
||||
}
|
||||
if (covl->hitkey != CONK_NOKEY) {
|
||||
covl->opacity = COVL_MAX_OPACITY;
|
||||
covl->statecnt = COVL_HOLD_TIME;
|
||||
covl->ovl_visible = COVL_READY;
|
||||
switch (covl->hitkey) {
|
||||
case CONK_START:
|
||||
INPUT_key_consol = INPUT_CONSOL_NONE ^ INPUT_CONSOL_START;
|
||||
break;
|
||||
case CONK_SELECT:
|
||||
INPUT_key_consol = INPUT_CONSOL_NONE ^ INPUT_CONSOL_SELECT;
|
||||
break;
|
||||
case CONK_OPTION:
|
||||
INPUT_key_consol = INPUT_CONSOL_NONE ^ INPUT_CONSOL_OPTION;
|
||||
break;
|
||||
case CONK_HELP:
|
||||
Keyboard_Enqueue(AKEY_HELP);
|
||||
break;
|
||||
/* RESET is handled at the overlay update */
|
||||
}
|
||||
} else {
|
||||
conptr = PTRSTL; /* didn't hit - let others handle it */
|
||||
}
|
||||
}
|
||||
if (prevconptr != PTRSTL && conptr == PTRSTL) { /* unpressed overlay key */
|
||||
if (Keyboard_Peek() == AKEY_HELP)
|
||||
Keyboard_Enqueue(AKEY_NONE);
|
||||
INPUT_key_consol = INPUT_CONSOL_NONE;
|
||||
covl->resetcnt = 0;
|
||||
}
|
||||
} else if (newtc[PTRJOY].s && newtc[PTRJOY].x > Android_ScreenW - covl->hotlen
|
||||
&& newtc[PTRJOY].y < covl->hotlen) {
|
||||
covl->ovl_visible = COVL_FADEIN; /* touched overlay hotspot */
|
||||
conptr = PTRJOY;
|
||||
} else if (newtc[PTRTRG].s && newtc[PTRTRG].x > Android_ScreenW - covl->hotlen
|
||||
&& newtc[PTRTRG].y < covl->hotlen) {
|
||||
covl->ovl_visible = COVL_FADEIN;
|
||||
conptr = PTRTRG;
|
||||
}
|
||||
if (conptr == PTRSTL)
|
||||
if (newtc[PTRJOY].s &&
|
||||
( (!prevtc[PTRJOY].s && newtc[PTRJOY].y < covl->hotlen) || /* menu area */
|
||||
prevconptr != PTRSTL) && /* still held */
|
||||
!(covl->ovl_visible != COVL_HIDDEN &&
|
||||
newtc[PTRJOY].x >= covl->bbox.l - COVL_SHADOW_OFF && /* outside bbox */
|
||||
newtc[PTRJOY].y <= covl->bbox.b + COVL_SHADOW_OFF) ) {
|
||||
conptr = PTRJOY; /* touched menu area */
|
||||
ret = 2;
|
||||
} else if (newtc[PTRTRG].s &&
|
||||
( (!prevtc[PTRTRG].s && newtc[PTRTRG].y < covl->hotlen) ||
|
||||
prevconptr != PTRSTL) &&
|
||||
!(covl->ovl_visible != COVL_HIDDEN &&
|
||||
newtc[PTRTRG].x >= covl->bbox.l - COVL_SHADOW_OFF &&
|
||||
newtc[PTRTRG].y <= covl->bbox.b + COVL_SHADOW_OFF) ) {
|
||||
conptr = PTRTRG;
|
||||
ret = 2;
|
||||
}
|
||||
|
||||
/* joystick */
|
||||
newjoy = INPUT_STICK_CENTRE;
|
||||
if (newtc[PTRJOY].s && conptr != PTRJOY) {
|
||||
if (!Android_Paddle) {
|
||||
dx2 = (jovl->joyarea.r - jovl->joyarea.l) >> 1;
|
||||
dy2 = (jovl->joyarea.b - jovl->joyarea.t) >> 1;
|
||||
dx = dx2 - dx2 * jovl->deadarea;
|
||||
dy = dy2 - dy2 * jovl->deadarea;
|
||||
dx2 = (jovl->joyarea.r - jovl->joyarea.l) * jovl->gracearea;
|
||||
}
|
||||
if (Android_Paddle) {
|
||||
potx = ((float) (newtc[PTRJOY].x - jovl->joyarea.l)) /
|
||||
((float) (jovl->joyarea.r - jovl->joyarea.l));
|
||||
poty = (float) newtc[PTRJOY].y / (float) Android_ScreenH;
|
||||
Android_POTX = POTLIMIT - (UBYTE) (potx * ((float) POTLIMIT) + 0.5f);
|
||||
Android_POTY = POTLIMIT - (UBYTE) (poty * ((float) POTLIMIT) + 0.5f);
|
||||
if (Android_ReversePddle & 1)
|
||||
Android_POTX = POTLIMIT - Android_POTX;
|
||||
if (Android_ReversePddle & 2)
|
||||
Android_POTY = POTLIMIT - Android_POTY;
|
||||
if (Android_POTX < 0) Android_POTX = 0;
|
||||
if (Android_POTY < 0) Android_POTY = 0;
|
||||
if (Android_POTX > POTLIMIT) Android_POTX = POTLIMIT;
|
||||
if (Android_POTY > POTLIMIT) Android_POTY = POTLIMIT;
|
||||
|
||||
jovl->joystick.x = newtc[PTRJOY].x;
|
||||
jovl->joystick.y = newtc[PTRJOY].y;
|
||||
jovl->stickopacity = HIT_OPACITY;
|
||||
if (!jovl->anchor) {
|
||||
dy = (jovl->joyarea.b - jovl->joyarea.t) >> 1;
|
||||
if (newtc[PTRJOY].y - dy < 0) newtc[PTRJOY].y -= newtc[PTRJOY].y - dy;
|
||||
if (newtc[PTRJOY].y + dy > Android_ScreenH)
|
||||
newtc[PTRJOY].y -= newtc[PTRJOY].y + dy - Android_ScreenH;
|
||||
jovl->joyarea.t = newtc[PTRJOY].y - dy;
|
||||
jovl->joyarea.b = newtc[PTRJOY].y + dy;
|
||||
jovl->areaopacitycur = jovl->areaopacityset;
|
||||
jovl->areaopacityfrm = 0;
|
||||
}
|
||||
} else if ( (newtc[PTRJOY].x >= jovl->joyarea.l - dx2 &&
|
||||
newtc[PTRJOY].x <= jovl->joyarea.r + dx2 &&
|
||||
newtc[PTRJOY].y >= jovl->joyarea.t - dx2 &&
|
||||
newtc[PTRJOY].y <= jovl->joyarea.b + dx2) ||
|
||||
jovl->anchor ) {
|
||||
|
||||
if (newtc[PTRJOY].x <= jovl->joyarea.l + dx) {
|
||||
newjoy &= INPUT_STICK_LEFT;
|
||||
} else if (newtc[PTRJOY].x >= jovl->joyarea.r - dx) {
|
||||
newjoy &= INPUT_STICK_RIGHT;
|
||||
}
|
||||
if (newtc[PTRJOY].y <= jovl->joyarea.t + dy) {
|
||||
newjoy &= INPUT_STICK_FORWARD;
|
||||
} else if (newtc[PTRJOY].y >= jovl->joyarea.b - dy) {
|
||||
newjoy &= INPUT_STICK_BACK;
|
||||
}
|
||||
|
||||
if (!jovl->anchor) {
|
||||
if (newtc[PTRJOY].x > jovl->joyarea.r) { /* grace area */
|
||||
dx = newtc[PTRJOY].x - jovl->joyarea.r;
|
||||
jovl->joyarea.l += dx;
|
||||
jovl->joyarea.r += dx;
|
||||
} else if (newtc[PTRJOY].x < jovl->joyarea.l) {
|
||||
dx = jovl->joyarea.l - newtc[PTRJOY].x;
|
||||
jovl->joyarea.r -= dx;
|
||||
jovl->joyarea.l -= dx;
|
||||
}
|
||||
if (newtc[PTRJOY].y > jovl->joyarea.b) {
|
||||
dy = newtc[PTRJOY].y - jovl->joyarea.b;
|
||||
jovl->joyarea.t += dy;
|
||||
jovl->joyarea.b += dy;
|
||||
} else if (newtc[PTRJOY].y < jovl->joyarea.t) {
|
||||
dy = jovl->joyarea.t - newtc[PTRJOY].y;
|
||||
jovl->joyarea.b -= dy;
|
||||
jovl->joyarea.t -= dy;
|
||||
}
|
||||
}
|
||||
|
||||
jovl->joystick.x = newtc[PTRJOY].x;
|
||||
jovl->joystick.y = newtc[PTRJOY].y;
|
||||
jovl->stickopacity = HIT_OPACITY;
|
||||
jovl->areaopacitycur = jovl->areaopacityset;
|
||||
jovl->areaopacityfrm = 0;
|
||||
} else {
|
||||
if (prevtc[PTRJOY].s) { /* drag area along */
|
||||
if (newtc[PTRJOY].x > jovl->joyarea.r) {
|
||||
dx = newtc[PTRJOY].x - jovl->joyarea.r;
|
||||
jovl->joyarea.l += dx;
|
||||
jovl->joyarea.r += dx;
|
||||
newjoy &= INPUT_STICK_RIGHT;
|
||||
} else if (newtc[PTRJOY].x < jovl->joyarea.l) {
|
||||
dx = jovl->joyarea.l - newtc[PTRJOY].x;
|
||||
jovl->joyarea.r -= dx;
|
||||
jovl->joyarea.l -= dx;
|
||||
newjoy &= INPUT_STICK_LEFT;
|
||||
} else if (newtc[PTRJOY].x <= jovl->joyarea.l + dx) {
|
||||
newjoy &= INPUT_STICK_LEFT;
|
||||
} else if (newtc[PTRJOY].x >= jovl->joyarea.r - dx) {
|
||||
newjoy &= INPUT_STICK_RIGHT;
|
||||
}
|
||||
if (newtc[PTRJOY].y > jovl->joyarea.b) {
|
||||
dy = newtc[PTRJOY].y - jovl->joyarea.b;
|
||||
jovl->joyarea.t += dy;
|
||||
jovl->joyarea.b += dy;
|
||||
newjoy &= INPUT_STICK_BACK;
|
||||
} else if (newtc[PTRJOY].y < jovl->joyarea.t) {
|
||||
dy = jovl->joyarea.t - newtc[PTRJOY].y;
|
||||
jovl->joyarea.b -= dy;
|
||||
jovl->joyarea.t -= dy;
|
||||
newjoy &= INPUT_STICK_FORWARD;
|
||||
} else if (newtc[PTRJOY].y <= jovl->joyarea.t + dy) {
|
||||
newjoy &= INPUT_STICK_FORWARD;
|
||||
} else if (newtc[PTRJOY].y >= jovl->joyarea.b - dy) {
|
||||
newjoy &= INPUT_STICK_BACK;
|
||||
}
|
||||
|
||||
jovl->joystick.x = newtc[PTRJOY].x;
|
||||
jovl->joystick.y = newtc[PTRJOY].y;
|
||||
jovl->stickopacity = HIT_OPACITY;
|
||||
} else { /* recenter area */
|
||||
dx = (jovl->joyarea.r - jovl->joyarea.l) >> 1;
|
||||
dy = (jovl->joyarea.b - jovl->joyarea.t) >> 1;
|
||||
if (Android_Joyleft) {
|
||||
if (newtc[PTRJOY].x + dx > Android_Split)
|
||||
newtc[PTRJOY].x = Android_Split - dx;
|
||||
} else {
|
||||
if (newtc[PTRJOY].x - dx < Android_Split)
|
||||
newtc[PTRJOY].x = Android_Split + dx;
|
||||
}
|
||||
if (newtc[PTRJOY].x - dx < 0) newtc[PTRJOY].x -= newtc[PTRJOY].x - dx;
|
||||
if (newtc[PTRJOY].y - dy < 0) newtc[PTRJOY].y -= newtc[PTRJOY].y - dy;
|
||||
if (newtc[PTRJOY].y + dy > Android_ScreenH)
|
||||
newtc[PTRJOY].y -= newtc[PTRJOY].y + dy - Android_ScreenH;
|
||||
jovl->joyarea.l = newtc[PTRJOY].x - dx;
|
||||
jovl->joyarea.r = newtc[PTRJOY].x + dx;
|
||||
jovl->joyarea.t = newtc[PTRJOY].y - dy;
|
||||
jovl->joyarea.b = newtc[PTRJOY].y + dy;
|
||||
}
|
||||
jovl->areaopacitycur = jovl->areaopacityset;
|
||||
jovl->areaopacityfrm = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* trigger */
|
||||
newtrig = 1;
|
||||
if ( (newtc[PTRTRG].s && conptr != PTRTRG) || /* normal trigger */
|
||||
(newtc[PTRJOY].s && conptr != PTRJOY && Android_PlanetaryDefense) ) {
|
||||
newtrig = 0;
|
||||
jovl->fire.x = newtc[PTRTRG].x;
|
||||
jovl->fire.y = newtc[PTRTRG].y;
|
||||
jovl->fireopacity = HIT_OPACITY;
|
||||
}
|
||||
|
||||
/* thread unsafe => "no" problem */
|
||||
if (!Android_Paddle){
|
||||
Android_PortStatus = 0xFFF0 | newjoy;
|
||||
Android_TrigStatus = 0xE | newtrig;
|
||||
} else {
|
||||
POKEY_POT_input[INPUT_mouse_port << 1] = Android_POTX;
|
||||
POKEY_POT_input[(INPUT_mouse_port << 1) + 1] = Android_POTY;
|
||||
INPUT_mouse_buttons = !newtrig;
|
||||
}
|
||||
|
||||
memcpy(prevtc, newtc, sizeof(struct touchstate) * MAXPOINTERS);
|
||||
prevconptr = conptr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Android_KeyEvent(int k, int s)
|
||||
{
|
||||
int i, shft;
|
||||
|
||||
if (Android_SoftjoyEnable) {
|
||||
for (i = 0; i < 4; i++)
|
||||
if (softjoymap[i][0] == k) {
|
||||
if (s)
|
||||
Android_PortStatus &= 0xFFF0 | softjoymap[i][1];
|
||||
else
|
||||
Android_PortStatus |= ~softjoymap[i][1];
|
||||
return;
|
||||
}
|
||||
if (softjoymap[SOFTJOY_FIRE][0] == k) {
|
||||
Android_TrigStatus = Android_TrigStatus & (~(s != 0)) | (s == 0);
|
||||
return;
|
||||
}
|
||||
for (i = SOFTJOY_ACTIONBASE; i < SOFTJOY_MAXKEYS + SOFTJOY_MAXACTIONS; i++)
|
||||
if (softjoymap[i][0] == k && softjoymap[i][1] != AKEY_NONE) {
|
||||
k = softjoymap[i][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Android_DerotateKeys && k <= KEY_UP && k >= KEY_RIGHT)
|
||||
k = derot_lut[Android_DerotateKeys - 1][KEY_UP - k];
|
||||
|
||||
switch (k) {
|
||||
case KEY_SHIFT:
|
||||
INPUT_key_shift = (s) ? AKEY_SHFT : 0;
|
||||
break;
|
||||
case KEY_CONTROL:
|
||||
Android_key_control = (s) ? AKEY_CTRL : 0;
|
||||
break;
|
||||
case KEY_FIRE:
|
||||
Android_TrigStatus = Android_TrigStatus & (~(s != 0)) | (s == 0);
|
||||
break;
|
||||
default:
|
||||
if (k >= STATIC_MAXKEYS)
|
||||
Log_print("Unmappable key %d", k);
|
||||
else {
|
||||
if (k == '+' || k == '<' || k == '>' || k == '*')
|
||||
shft = 0;
|
||||
else
|
||||
shft == INPUT_key_shift;
|
||||
Keyboard_Enqueue( (s) ? (skeyxlat[k] | Android_key_control | shft) : AKEY_NONE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Input_Initialize(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
memset(prevtc, 0, 2 * sizeof(struct touchstate));
|
||||
prevconptr = PTRSTL;
|
||||
|
||||
memset(&AndroidInput_JoyOvl, 0, sizeof(struct joy_overlay_state));
|
||||
AndroidInput_JoyOvl.ovl_visible = 1;
|
||||
AndroidInput_JoyOvl.areaopacitycur = AndroidInput_JoyOvl.areaopacityset = 0.25f;
|
||||
AndroidInput_JoyOvl.deadarea = 0.3f;
|
||||
AndroidInput_JoyOvl.gracearea = 0.3f;
|
||||
AndroidInput_JoyOvl.joyarea.t = AndroidInput_JoyOvl.joyarea.l = 10;
|
||||
AndroidInput_JoyOvl.joyarea.b = AndroidInput_JoyOvl.joyarea.r = 74;
|
||||
AndroidInput_JoyOvl.anchor = 0;
|
||||
|
||||
memset(&AndroidInput_ConOvl, 0, sizeof(struct consolekey_overlay_state));
|
||||
AndroidInput_ConOvl.hitkey = CONK_NOKEY;
|
||||
AndroidInput_ConOvl.opacity = COVL_MAX_OPACITY;
|
||||
AndroidInput_ConOvl.ovl_visible = COVL_READY;
|
||||
AndroidInput_ConOvl.statecnt = COVL_HOLD_TIME >> 1;
|
||||
|
||||
Android_PortStatus = 0xFFFF;
|
||||
Android_TrigStatus = 0xF;
|
||||
|
||||
for (i = 0; i < KBD_MAXKEYS; Android_Keyboard[i] = AKEY_NONE, i++);
|
||||
INPUT_key_consol = INPUT_CONSOL_NONE;
|
||||
INPUT_key_shift = FALSE;
|
||||
Android_key_control = 0;
|
||||
}
|
||||
|
||||
void Joy_Reposition(void)
|
||||
{
|
||||
int dx = 0, dy = 0;
|
||||
|
||||
if (Android_ScreenW == 0) return; /* we're going to get called again @ initgraphics() */
|
||||
if (Android_Joyleft) {
|
||||
if (AndroidInput_JoyOvl.joyarea.r > Android_Split)
|
||||
dx = -(AndroidInput_JoyOvl.joyarea.r - Android_Split);
|
||||
} else {
|
||||
if (AndroidInput_JoyOvl.joyarea.l < Android_Split)
|
||||
dx = Android_Split - AndroidInput_JoyOvl.joyarea.l;
|
||||
}
|
||||
if (AndroidInput_JoyOvl.joyarea.l < 0)
|
||||
dx = -AndroidInput_JoyOvl.joyarea.l;
|
||||
else if (AndroidInput_JoyOvl.joyarea.r > Android_ScreenW)
|
||||
dx = -(AndroidInput_JoyOvl.joyarea.r - Android_ScreenW);
|
||||
if (AndroidInput_JoyOvl.joyarea.t < 0)
|
||||
dy = -AndroidInput_JoyOvl.joyarea.t;
|
||||
else if (AndroidInput_JoyOvl.joyarea.b > Android_ScreenH)
|
||||
dy = -(AndroidInput_JoyOvl.joyarea.b - Android_ScreenH);
|
||||
|
||||
AndroidInput_JoyOvl.joyarea.l += dx;
|
||||
AndroidInput_JoyOvl.joyarea.r += dx;
|
||||
AndroidInput_JoyOvl.joyarea.t += dy;
|
||||
AndroidInput_JoyOvl.joyarea.b += dy;
|
||||
}
|
||||
|
||||
void Android_SplitCalc(void)
|
||||
{
|
||||
if (Android_Joyleft)
|
||||
Android_Split = Android_Splitpct * Android_ScreenW;
|
||||
else
|
||||
Android_Split = (1.0f - Android_Splitpct) * Android_ScreenW;
|
||||
}
|
||||
|
||||
void Keyboard_Enqueue(int key)
|
||||
{
|
||||
pthread_mutex_lock(&key_mutex);
|
||||
|
||||
if ((key_head + 1) & KBD_MASK == key_tail)
|
||||
key_head = key_tail; /* on overflow, discard previous keys */
|
||||
Android_Keyboard[key_head++] = key;
|
||||
key_head &= KBD_MASK;
|
||||
|
||||
pthread_mutex_unlock(&key_mutex);
|
||||
}
|
||||
|
||||
int Keyboard_Dequeue(void)
|
||||
{
|
||||
pthread_mutex_lock(&key_mutex);
|
||||
|
||||
if (key_head != key_tail) {
|
||||
key_last = Android_Keyboard[key_tail++];
|
||||
key_tail &= KBD_MASK;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&key_mutex);
|
||||
|
||||
return key_last;
|
||||
}
|
||||
|
||||
int Keyboard_Peek(void)
|
||||
{
|
||||
int tmp_key;
|
||||
|
||||
tmp_key = key_last;
|
||||
if (key_head != key_tail)
|
||||
tmp_key = Android_Keyboard[key_tail];
|
||||
return tmp_key;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
#include "atari.h"
|
||||
|
||||
struct RECT
|
||||
{
|
||||
int l;
|
||||
int t;
|
||||
union {
|
||||
int r;
|
||||
int w;
|
||||
};
|
||||
union {
|
||||
int b;
|
||||
int h;
|
||||
};
|
||||
};
|
||||
struct POINT
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
struct joy_overlay_state
|
||||
{
|
||||
int ovl_visible;
|
||||
|
||||
struct RECT joyarea;
|
||||
float areaopacitycur;
|
||||
float areaopacityset;
|
||||
int areaopacityfrm;
|
||||
int anchor;
|
||||
float deadarea;
|
||||
float gracearea;
|
||||
|
||||
struct POINT joystick;
|
||||
float stickopacity;
|
||||
|
||||
struct POINT fire;
|
||||
float fireopacity;
|
||||
int firewid;
|
||||
};
|
||||
|
||||
enum con_vst {
|
||||
COVL_HIDDEN = 0,
|
||||
COVL_FADEIN,
|
||||
COVL_READY,
|
||||
COVL_FADEOUT
|
||||
};
|
||||
enum con_key {
|
||||
CONK_NOKEY = -1,
|
||||
CONK_HELP = 0,
|
||||
CONK_START,
|
||||
CONK_SELECT,
|
||||
CONK_OPTION,
|
||||
CONK_RESET
|
||||
};
|
||||
struct consolekey_overlay_state
|
||||
{
|
||||
enum con_vst ovl_visible;
|
||||
|
||||
UWORD *keycoo;
|
||||
struct RECT bbox;
|
||||
float opacity;
|
||||
enum con_key hitkey;
|
||||
int statecnt;
|
||||
int resetcnt;
|
||||
int hotlen;
|
||||
|
||||
#define COVL_MAX_OPACITY 0.5f
|
||||
#define COVL_HOLD_TIME 150
|
||||
|
||||
#define RESET_SOFT 30
|
||||
#define RESET_HARD 60
|
||||
};
|
||||
|
||||
extern struct joy_overlay_state AndroidInput_JoyOvl;
|
||||
extern struct consolekey_overlay_state AndroidInput_ConOvl;
|
||||
|
||||
extern UWORD Android_PortStatus;
|
||||
extern UBYTE Android_TrigStatus;
|
||||
|
||||
enum
|
||||
{
|
||||
SOFTJOY_LEFT = 0,
|
||||
SOFTJOY_RIGHT,
|
||||
SOFTJOY_UP,
|
||||
SOFTJOY_DOWN,
|
||||
SOFTJOY_FIRE,
|
||||
SOFTJOY_MAXKEYS
|
||||
};
|
||||
#define SOFTJOY_MAXACTIONS 3
|
||||
#define SOFTJOY_ACTIONBASE SOFTJOY_MAXKEYS
|
||||
#define ACTION_NONE 0xFF
|
||||
extern UBYTE softjoymap[SOFTJOY_MAXKEYS + SOFTJOY_MAXACTIONS][2];
|
||||
|
||||
extern int Android_SoftjoyEnable;
|
||||
extern int Android_Joyleft;
|
||||
extern float Android_Splitpct;
|
||||
extern int Android_Split;
|
||||
extern int Android_DerotateKeys;
|
||||
extern int Android_Paddle;
|
||||
extern int Android_PlanetaryDefense;
|
||||
extern SWORD Android_POTX;
|
||||
extern SWORD Android_POTY;
|
||||
extern UBYTE Android_ReversePddle;
|
||||
|
||||
int Android_TouchEvent(int x1, int y1, int s1, int x2, int y2, int s2);
|
||||
void Android_KeyEvent(int k, int s);
|
||||
void Input_Initialize(void);
|
||||
void Keyboard_Enqueue(int key);
|
||||
int Keyboard_Dequeue(void);
|
||||
int Keyboard_Peek(void);
|
||||
void Android_SplitCalc(void);
|
||||
@@ -0,0 +1,480 @@
|
||||
/*
|
||||
* graphics.c - android drawing
|
||||
*
|
||||
* Copyright (C) 2010 Kostas Nakos
|
||||
* Copyright (C) 2010 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
|
||||
#include "atari.h"
|
||||
#include "screen.h"
|
||||
#include "colours.h"
|
||||
#include "akey.h"
|
||||
#include "cpu.h"
|
||||
|
||||
#include "androidinput.h"
|
||||
#include "graphics.h"
|
||||
|
||||
#define TEXTURE_WIDTH 512
|
||||
#define TEXTURE_HEIGHT 256
|
||||
|
||||
#define OPACITY_CUTOFF 0.05f
|
||||
#define OPACITY_STEP 0.02f
|
||||
#define OPACITY_FRMSTR 75
|
||||
|
||||
#define BORDER_PCT 0.05f
|
||||
|
||||
int Android_ScreenW = 0;
|
||||
int Android_ScreenH = 0;
|
||||
int Android_Aspect;
|
||||
int Android_CropScreen[] = {0, SCREEN_HEIGHT, SCANLINE_LEN, -SCREEN_HEIGHT};
|
||||
static struct RECT screenrect;
|
||||
static int screenclear;
|
||||
int Android_Bilinear;
|
||||
float Android_Joyscale = 0.15f;
|
||||
|
||||
extern int *ovl_texpix;
|
||||
extern int ovl_texw;
|
||||
extern int ovl_texh;
|
||||
|
||||
/* graphics conversion */
|
||||
static UWORD *palette = NULL;
|
||||
static UWORD *hicolor_screen = NULL;
|
||||
|
||||
/* standard gl textures */
|
||||
enum {
|
||||
TEX_SCREEN = 0,
|
||||
TEX_OVL,
|
||||
TEX_MAXNAMES
|
||||
};
|
||||
static GLuint texture[TEX_MAXNAMES];
|
||||
static UWORD conkey_vrt[CONK_VERT_MAX];
|
||||
static int conkey_lbl[CONK_VERT_MAX >> 2];
|
||||
static UWORD conkey_shadow[2 * 4];
|
||||
|
||||
void Android_PaletteUpdate(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!palette) {
|
||||
if ( !(palette = malloc(256 * sizeof(UWORD))) ) {
|
||||
Log_print("Cannot allocate memory for palette conversion.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
memset(palette, 0, 256 * sizeof(UWORD));
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
palette[i] = ( (Colours_GetR(i) & 0xf8) << 8 ) |
|
||||
( (Colours_GetG(i) & 0xfc) << 3 ) |
|
||||
( (Colours_GetB(i) & 0xf8) >> 3 );
|
||||
/* force full redraw */
|
||||
Screen_EntireDirty();
|
||||
}
|
||||
|
||||
int Android_InitGraphics(void)
|
||||
{
|
||||
const UWORD poly[] = { 0,16, 24,16, 32,0, 8,0 };
|
||||
int i, tmp, w, h;
|
||||
float tmp2, tmp3;
|
||||
struct RECT *r;
|
||||
|
||||
/* Allocate stuff */
|
||||
if (!hicolor_screen) {
|
||||
if ( !(hicolor_screen = malloc(TEXTURE_WIDTH * TEXTURE_HEIGHT * sizeof(UWORD))) ) {
|
||||
Log_print("Cannot allocate memory for hicolor screen.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
memset(hicolor_screen, 0, TEXTURE_WIDTH * TEXTURE_HEIGHT * sizeof(UWORD));
|
||||
|
||||
/* Setup GL */
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glGenTextures(TEX_MAXNAMES, texture);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 8);
|
||||
|
||||
/* overlays texture */
|
||||
glBindTexture(GL_TEXTURE_2D, texture[TEX_OVL]);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ovl_texw, ovl_texh, 0, GL_RGBA,
|
||||
GL_UNSIGNED_BYTE, ovl_texpix);
|
||||
|
||||
/* playfield texture */
|
||||
glBindTexture(GL_TEXTURE_2D, texture[TEX_SCREEN]);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
|
||||
Android_Bilinear ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
||||
Android_Bilinear ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, Android_CropScreen);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, TEXTURE_WIDTH, TEXTURE_HEIGHT, 0, GL_RGB,
|
||||
GL_UNSIGNED_SHORT_5_6_5, hicolor_screen);
|
||||
|
||||
/* Setup view for console key polygons */
|
||||
glLoadIdentity();
|
||||
glOrthof(0, Android_ScreenW, Android_ScreenH, 0, 0, 1);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
/* Finsh GL init with an error check */
|
||||
if (glGetError() != GL_NO_ERROR) {
|
||||
Log_print("Cannot initialize OpenGL");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Console keys' polygons */
|
||||
tmp2 = ((float) (Android_ScreenW >> 1)) / ((float) 4.5f * poly[4]);
|
||||
tmp3 = ((float) Android_ScreenH) / ((float) 14 * poly[1]);
|
||||
if (tmp2 > tmp3)
|
||||
tmp2 = tmp3;
|
||||
if (tmp2 < 2.0f)
|
||||
tmp2 = 2.0f;
|
||||
for (i = 0; i < CONK_VERT_MAX; i += 2) {
|
||||
/* generate & scale */
|
||||
conkey_vrt[i ] = poly[i % 8] * tmp2 +
|
||||
((i > 7) ? (conkey_vrt[(i / 8 - 1) * 8 + 2] + 4) : 0);
|
||||
conkey_vrt[i + 1] = poly[(i + 1) % 8] * tmp2;
|
||||
}
|
||||
tmp = Android_ScreenW - conkey_vrt[CONK_VERT_MAX - 4];
|
||||
for (i = 0; i < CONK_VERT_MAX; i += 2) {
|
||||
/* translate */
|
||||
conkey_vrt[i ] += tmp;
|
||||
conkey_vrt[i + 1] += 4;
|
||||
}
|
||||
for (i = 0; i < CONK_VERT_MAX; i += 8) {
|
||||
conkey_lbl[i >> 2] = conkey_vrt[i] + 6;
|
||||
conkey_lbl[(i >> 2) + 1] = Android_ScreenH - (conkey_vrt[i + 1] - 1);
|
||||
}
|
||||
AndroidInput_ConOvl.keycoo = conkey_vrt;
|
||||
AndroidInput_ConOvl.bbox.l = conkey_vrt[0];
|
||||
AndroidInput_ConOvl.bbox.b = conkey_vrt[1];
|
||||
AndroidInput_ConOvl.bbox.r = conkey_vrt[CONK_VERT_MAX - 4];
|
||||
AndroidInput_ConOvl.bbox.t = conkey_vrt[CONK_VERT_MAX - 3];
|
||||
AndroidInput_ConOvl.hotlen = 0.1f *
|
||||
(Android_ScreenW < Android_ScreenH ? Android_ScreenW : Android_ScreenH);
|
||||
r = &(AndroidInput_ConOvl.bbox);
|
||||
conkey_shadow[0] = r->l - COVL_SHADOW_OFF;
|
||||
conkey_shadow[1] = r->b + COVL_SHADOW_OFF;
|
||||
conkey_shadow[2] = r->r;
|
||||
conkey_shadow[3] = r->b + COVL_SHADOW_OFF;
|
||||
conkey_shadow[4] = r->r;
|
||||
conkey_shadow[5] = r->t - COVL_SHADOW_OFF;
|
||||
conkey_shadow[6] = r->l - COVL_SHADOW_OFF;
|
||||
conkey_shadow[7] = r->t - COVL_SHADOW_OFF;
|
||||
|
||||
/* Scale joystick overlays */
|
||||
Joyovl_Scale();
|
||||
Joy_Reposition();
|
||||
|
||||
/* Aspect correct scaling */
|
||||
memset(&screenrect, 0, sizeof(struct RECT));
|
||||
if ( ((Android_ScreenW > Android_ScreenH) + 1) & Android_Aspect) {
|
||||
w = Android_CropScreen[2];
|
||||
h = -Android_CropScreen[3];
|
||||
/* fit horizontally */
|
||||
tmp2 = ((float) Android_ScreenW) / ((float) w);
|
||||
screenrect.h = tmp2 * h;
|
||||
if (screenrect.h > Android_ScreenH) {
|
||||
/* fit vertically */
|
||||
tmp2 = ((float) Android_ScreenH) / ((float) h);
|
||||
screenrect.h = Android_ScreenH;
|
||||
}
|
||||
screenrect.w = tmp2 * w;
|
||||
/* center */
|
||||
tmp = (Android_ScreenW - screenrect.r + 1) / 2;
|
||||
screenrect.l += tmp;
|
||||
h = Android_ScreenH;
|
||||
if (Android_ScreenH > Android_ScreenW)
|
||||
h >>= 1; /* assume keyboard takes up half the height in portrait */
|
||||
tmp = (h - screenrect.b + 1) / 2;
|
||||
if (tmp < 0)
|
||||
tmp = 0;
|
||||
tmp = (Android_ScreenH - h) + tmp;
|
||||
screenrect.t += tmp;
|
||||
screenclear = TRUE;
|
||||
} else {
|
||||
screenrect.t = screenrect.l = 0;
|
||||
screenrect.w = Android_ScreenW;
|
||||
screenrect.h = Android_ScreenH;
|
||||
screenclear = FALSE;
|
||||
}
|
||||
|
||||
/* Initialize palette */
|
||||
Android_PaletteUpdate();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void Joyovl_Scale(void)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
tmp = ( (Android_ScreenW > Android_ScreenH) ?
|
||||
Android_ScreenW : Android_ScreenH ) * Android_Joyscale;
|
||||
if (!Android_Paddle) {
|
||||
AndroidInput_JoyOvl.joyarea.r = AndroidInput_JoyOvl.joyarea.l + tmp;
|
||||
AndroidInput_JoyOvl.joyarea.b = AndroidInput_JoyOvl.joyarea.t + tmp;
|
||||
} else {
|
||||
if (!Android_PlanetaryDefense) {
|
||||
AndroidInput_JoyOvl.joyarea.l = Android_Joyleft ? BORDER_PCT * Android_ScreenW : Android_Split;
|
||||
AndroidInput_JoyOvl.joyarea.r = Android_Joyleft ? Android_Split : (1.0f - BORDER_PCT) * Android_ScreenW;
|
||||
AndroidInput_JoyOvl.joyarea.b = AndroidInput_JoyOvl.joyarea.t + 8 + (tmp >> 3);
|
||||
} else {
|
||||
AndroidInput_JoyOvl.joyarea.l = AndroidInput_JoyOvl.joyarea.t = 0;
|
||||
AndroidInput_JoyOvl.joyarea.r = Android_ScreenW;
|
||||
AndroidInput_JoyOvl.joyarea.b = Android_ScreenH;
|
||||
}
|
||||
}
|
||||
AndroidInput_JoyOvl.firewid = tmp >> 3;
|
||||
}
|
||||
|
||||
void Android_ConvertScreen(void)
|
||||
{
|
||||
int x, y;
|
||||
UBYTE *src, *src_line;
|
||||
UWORD *dst, *dst_line;
|
||||
#ifdef DIRTYRECT
|
||||
UBYTE *dirty, *dirty_line;
|
||||
#endif
|
||||
|
||||
#ifdef DIRTYRECT
|
||||
dirty_line = Screen_dirty + SCANLINE_START / 8;
|
||||
#endif
|
||||
src_line = ((UBYTE *) Screen_atari) + SCANLINE_START;
|
||||
dst_line = hicolor_screen;
|
||||
|
||||
for (y = 0; y < SCREEN_HEIGHT; y++) {
|
||||
#ifdef DIRTYRECT
|
||||
dirty = dirty_line;
|
||||
#else
|
||||
src = src_line;
|
||||
dst = dst_line;
|
||||
#endif
|
||||
for (x = 0; x < SCANLINE_LEN; x += 8) {
|
||||
#ifdef DIRTYRECT
|
||||
if (*dirty) {
|
||||
src = src_line + x;
|
||||
dst = dst_line + x;
|
||||
do {
|
||||
#endif
|
||||
*dst++ = palette[*src++]; *dst++ = palette[*src++];
|
||||
*dst++ = palette[*src++]; *dst++ = palette[*src++];
|
||||
*dst++ = palette[*src++]; *dst++ = palette[*src++];
|
||||
*dst++ = palette[*src++]; *dst++ = palette[*src++];
|
||||
#ifdef DIRTYRECT
|
||||
*dirty++ = 0;
|
||||
x += 8;
|
||||
} while (*dirty && x < SCANLINE_LEN);
|
||||
}
|
||||
dirty++;
|
||||
#endif
|
||||
}
|
||||
#ifdef DIRTYRECT
|
||||
dirty_line += SCREEN_WIDTH / 8;
|
||||
#endif
|
||||
src_line += SCREEN_WIDTH;
|
||||
dst_line += SCANLINE_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
void Android_Render(void)
|
||||
{
|
||||
const static int crop_joy[] = {0, 0, 64, 64};
|
||||
const static int crop_fire[] = {65, 0, 16, 15};
|
||||
const static int crop_lbl[][4] = { {65, 64, 40, -9},
|
||||
{65, 24, 40, -9},
|
||||
{65, 34, 40, -9},
|
||||
{65, 44, 40, -9},
|
||||
{65, 54, 40, -9} };
|
||||
const static int crop_all[] = {0, 64, 128, -64};
|
||||
const struct RECT *r;
|
||||
const struct POINT *p;
|
||||
int i;
|
||||
|
||||
if (screenclear)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
/* --------------------- playfield --------------------- */
|
||||
glBindTexture(GL_TEXTURE_2D, texture[TEX_SCREEN]);
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, SCANLINE_LEN, SCREEN_HEIGHT, GL_RGB,
|
||||
GL_UNSIGNED_SHORT_5_6_5, hicolor_screen);
|
||||
r = &screenrect;
|
||||
glDrawTexiOES(r->l, r->t, 0, r->w, r->h);
|
||||
if (glGetError() != GL_NO_ERROR) Log_print("OpenGL error at playfield");
|
||||
|
||||
/* --------------------- overlays --------------------- */
|
||||
glEnable(GL_BLEND); /* enable blending */
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
|
||||
glBindTexture(GL_TEXTURE_2D, texture[TEX_OVL]);
|
||||
|
||||
if (!AndroidInput_JoyOvl.ovl_visible) goto ck; /*!*/
|
||||
|
||||
/* joystick area */
|
||||
glColor4f(1.0f, 1.0f, 1.0f, AndroidInput_JoyOvl.areaopacitycur);
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop_joy);
|
||||
r = &AndroidInput_JoyOvl.joyarea;
|
||||
glDrawTexiOES(r->l, Android_ScreenH - r->b, 0, r->r - r->l, r->b - r->t);
|
||||
if (glGetError() != GL_NO_ERROR) Log_print("OpenGL error at joy area");
|
||||
|
||||
/* stick */
|
||||
if (AndroidInput_JoyOvl.stickopacity >= OPACITY_CUTOFF) {
|
||||
glColor4f(1.0f, 1.0f, 1.0f, AndroidInput_JoyOvl.stickopacity);
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop_fire);
|
||||
p = &AndroidInput_JoyOvl.joystick;
|
||||
i = AndroidInput_JoyOvl.firewid;
|
||||
glDrawTexiOES(p->x - i, Android_ScreenH - (p->y + i), 0, i << 1, i << 1);
|
||||
if (glGetError() != GL_NO_ERROR) Log_print("OpenGL error at stick");
|
||||
}
|
||||
|
||||
/* fire */
|
||||
if (AndroidInput_JoyOvl.fireopacity >= OPACITY_CUTOFF) {
|
||||
glColor4f(1.0f, 1.0f, 1.0f, AndroidInput_JoyOvl.fireopacity);
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop_fire);
|
||||
p = &AndroidInput_JoyOvl.fire;
|
||||
i = AndroidInput_JoyOvl.firewid;
|
||||
glDrawTexiOES(p->x - i, Android_ScreenH - (p->y + i), 0, i << 1, i << 1);
|
||||
if (glGetError() != GL_NO_ERROR) Log_print("OpenGL error at fire");
|
||||
}
|
||||
/* glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop_all);
|
||||
glDrawTexiOES(0, 0, 0, 128, 64);
|
||||
*/
|
||||
|
||||
/* console keys */
|
||||
ck: if (AndroidInput_ConOvl.ovl_visible) {
|
||||
glDisable(GL_TEXTURE_2D); /* disable texturing */
|
||||
|
||||
glColor4f(0.0f, 0.0f, 0.0f, AndroidInput_ConOvl.opacity * 0.7);
|
||||
glVertexPointer(2, GL_SHORT, 0, conkey_shadow);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
|
||||
glColor4f(0.5f, 0.9f, 1.0f, AndroidInput_ConOvl.opacity);
|
||||
glVertexPointer(2, GL_SHORT, 0, conkey_vrt);
|
||||
for (i = 0; i < (CONK_VERT_MAX >> 1); i += 4)
|
||||
glDrawArrays(GL_LINE_LOOP, i, 4);
|
||||
if (AndroidInput_ConOvl.hitkey >= 0) {
|
||||
glColor4f(0.34f, 0.67f, 1.0f, AndroidInput_ConOvl.opacity);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, AndroidInput_ConOvl.hitkey << 2, 4);
|
||||
}
|
||||
glEnable(GL_TEXTURE_2D); /* enable texturing */
|
||||
|
||||
glColor4f(1.0f, 1.0f, 1.0f, AndroidInput_ConOvl.opacity);
|
||||
for (i = 0; i < CONK_VERT_MAX >> 2; i += 2) {
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop_lbl[i >> 1]);
|
||||
glDrawTexiOES(conkey_lbl[i], conkey_lbl[i + 1], 0, 40, 9);
|
||||
}
|
||||
if (glGetError() != GL_NO_ERROR) Log_print("OpenGL error at console overlay");
|
||||
}
|
||||
|
||||
glDisable(GL_BLEND); /* disable blending */
|
||||
}
|
||||
|
||||
void Update_Overlays(void)
|
||||
{
|
||||
struct joy_overlay_state *s;
|
||||
struct consolekey_overlay_state *c;
|
||||
|
||||
s = &AndroidInput_JoyOvl;
|
||||
c = &AndroidInput_ConOvl;
|
||||
|
||||
/* joy et co. */
|
||||
if (s->fireopacity > OPACITY_CUTOFF)
|
||||
s->fireopacity -= 0.05f;
|
||||
else
|
||||
s->fireopacity = 0.0f;
|
||||
if (s->stickopacity > OPACITY_CUTOFF) {
|
||||
s->stickopacity -= 0.05f;
|
||||
s->areaopacityfrm = 0;
|
||||
s->areaopacitycur = s->areaopacityset;
|
||||
} else {
|
||||
s->stickopacity = 0.0f;
|
||||
s->areaopacityfrm++;
|
||||
if (s->areaopacityfrm > OPACITY_FRMSTR) {
|
||||
if (s->areaopacitycur > OPACITY_CUTOFF)
|
||||
s->areaopacitycur -= OPACITY_STEP;
|
||||
else {
|
||||
s->areaopacitycur = OPACITY_CUTOFF;
|
||||
s->areaopacityfrm--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* console keys */
|
||||
switch (c->ovl_visible) {
|
||||
case COVL_READY:
|
||||
if (c->hitkey == CONK_NOKEY)
|
||||
if (!c->statecnt--)
|
||||
c->ovl_visible = COVL_FADEOUT;
|
||||
break;
|
||||
case COVL_FADEOUT:
|
||||
if (c->opacity > OPACITY_CUTOFF)
|
||||
c->opacity -= 2 * OPACITY_STEP;
|
||||
else {
|
||||
c->ovl_visible = COVL_HIDDEN;
|
||||
c->opacity = 0.0f;
|
||||
}
|
||||
break;
|
||||
case COVL_FADEIN:
|
||||
if (c->opacity < COVL_MAX_OPACITY)
|
||||
c->opacity += 4 * OPACITY_STEP;
|
||||
else {
|
||||
c->ovl_visible = COVL_READY;
|
||||
c->opacity = COVL_MAX_OPACITY;
|
||||
c->statecnt = COVL_HOLD_TIME;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (c->hitkey == CONK_RESET) {
|
||||
if (c->resetcnt >= RESET_HARD) {
|
||||
Atari800_Coldstart();
|
||||
} else if (c->resetcnt >= RESET_SOFT) {
|
||||
Atari800_Warmstart();
|
||||
CPU_cim_encountered = FALSE;
|
||||
}
|
||||
c->resetcnt++;
|
||||
} else {
|
||||
c->resetcnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Android_ExitGraphics(void)
|
||||
{
|
||||
if (hicolor_screen)
|
||||
free(hicolor_screen);
|
||||
hicolor_screen = NULL;
|
||||
|
||||
if (palette)
|
||||
free(palette);
|
||||
palette = NULL;
|
||||
|
||||
glDeleteTextures(TEX_MAXNAMES, texture);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#define CONK_VERT_MAX (2 * 4 * 5)
|
||||
#define COVL_SHADOW_OFF 10
|
||||
|
||||
#define SCREEN_WIDTH 384
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define DEAD_WIDTH 48
|
||||
#define SCANLINE_START (DEAD_WIDTH / 2)
|
||||
#define SCANLINE_END (SCREEN_WIDTH - DEAD_WIDTH / 2)
|
||||
#define SCANLINE_LEN (SCREEN_WIDTH - DEAD_WIDTH)
|
||||
|
||||
extern int Android_ScreenW;
|
||||
extern int Android_ScreenH;
|
||||
extern int Android_Aspect;
|
||||
extern int Android_Bilinear;
|
||||
extern int Android_CropScreen[];
|
||||
extern float Android_Joyscale;
|
||||
|
||||
int Android_InitGraphics(void);
|
||||
void Android_ExitGraphics(void);
|
||||
|
||||
void Android_ConvertScreen(void);
|
||||
void Android_PaletteUpdate(void);
|
||||
void Android_Render(void);
|
||||
void Update_Overlays(void);
|
||||
void Joyovl_Scale(void);
|
||||
@@ -0,0 +1,722 @@
|
||||
/*
|
||||
* jni.c - native functions exported to java
|
||||
*
|
||||
* Copyright (C) 2014 Kostas Nakos
|
||||
* Copyright (C) 2014 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <pthread.h>
|
||||
#include <jni.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "atari.h"
|
||||
#include "input.h"
|
||||
#include "afile.h"
|
||||
#include "screen.h"
|
||||
#include "cpu.h"
|
||||
#include "antic.h"
|
||||
#include "../../memory.h" /* override system header */
|
||||
#include "sio.h"
|
||||
#include "sysrom.h"
|
||||
#include "akey.h"
|
||||
#include "devices.h"
|
||||
#include "cartridge.h"
|
||||
|
||||
#include "graphics.h"
|
||||
#include "androidinput.h"
|
||||
|
||||
#define PD2012_FNAME "PD2012.com"
|
||||
|
||||
/* exports/imports */
|
||||
int *ovl_texpix;
|
||||
int ovl_texw;
|
||||
int ovl_texh;
|
||||
extern void SoundThread_Update(void *buf, int offs, int len);
|
||||
extern void Android_SoundInit(int rate, int sizems, int bit16, int hq, int disableOSL);
|
||||
extern void Sound_Exit(void);
|
||||
extern void Sound_Pause(void);
|
||||
extern void Sound_Continue(void);
|
||||
extern int Android_osl_sound;
|
||||
|
||||
struct audiothread {
|
||||
UBYTE *sndbuf;
|
||||
jbyteArray sndarray;
|
||||
};
|
||||
static pthread_key_t audiothread_data;
|
||||
|
||||
static char devb_url[512];
|
||||
|
||||
|
||||
static void JNICALL NativeGetOverlays(JNIEnv *env, jobject this)
|
||||
{
|
||||
jclass cls;
|
||||
jfieldID fid;
|
||||
jintArray arr;
|
||||
jboolean cp;
|
||||
|
||||
cls = (*env)->GetObjectClass(env, this);
|
||||
|
||||
fid = (*env)->GetFieldID(env, cls, "OVL_TEXW", "I");
|
||||
ovl_texw = (*env)->GetIntField(env, this, fid);
|
||||
|
||||
fid = (*env)->GetFieldID(env, cls, "OVL_TEXH", "I");
|
||||
ovl_texh = (*env)->GetIntField(env, this, fid);
|
||||
|
||||
ovl_texpix = malloc(ovl_texw * ovl_texh * sizeof(int));
|
||||
if (ovl_texpix == NULL) Log_print("Cannot allocate memory for overlays");
|
||||
|
||||
fid = (*env)->GetFieldID(env, cls, "_pix", "[I");
|
||||
arr = (*env)->GetObjectField(env, this, fid);
|
||||
(*env)->GetIntArrayRegion(env, arr, 0, ovl_texw * ovl_texh, ovl_texpix);
|
||||
|
||||
Log_print("Overlays texture initialized: %dx%d", ovl_texw, ovl_texh);
|
||||
}
|
||||
|
||||
static void JNICALL NativeResize(JNIEnv *env, jobject this, jint w, jint h)
|
||||
{
|
||||
Log_print("Screen resize: %dx%d", w, h);
|
||||
Android_ScreenW = w;
|
||||
Android_ScreenH = h;
|
||||
Android_SplitCalc();
|
||||
Android_InitGraphics();
|
||||
}
|
||||
|
||||
static void JNICALL NativeClearDevB(JNIEnv *env, jobject this)
|
||||
{
|
||||
dev_b_status.ready = FALSE;
|
||||
memset(devb_url, 0, sizeof(devb_url));
|
||||
}
|
||||
|
||||
static jstring JNICALL NativeInit(JNIEnv *env, jobject this)
|
||||
{
|
||||
int ac = 1;
|
||||
char av = '\0';
|
||||
char *avp = &av;
|
||||
|
||||
pthread_key_create(&audiothread_data, NULL);
|
||||
pthread_setspecific(audiothread_data, NULL);
|
||||
|
||||
NativeClearDevB(env, this);
|
||||
|
||||
Atari800_Initialise(&ac, &avp);
|
||||
|
||||
return (*env)->NewStringUTF(env, Atari800_TITLE);
|
||||
}
|
||||
|
||||
static jobjectArray JNICALL NativeGetDrvFnames(JNIEnv *env, jobject this)
|
||||
{
|
||||
jobjectArray arr;
|
||||
int i;
|
||||
char tmp[FILENAME_MAX + 3], fname[FILENAME_MAX];
|
||||
jstring str;
|
||||
|
||||
arr = (*env)->NewObjectArray(env, 4, (*env)->FindClass(env, "java/lang/String"), NULL);
|
||||
for (i = 0; i < 4; i++) {
|
||||
Util_splitpath(SIO_filename[i], NULL, fname);
|
||||
sprintf(tmp, "D%d:%s", i + 1, fname);
|
||||
str = (*env)->NewStringUTF(env, tmp);
|
||||
(*env)->SetObjectArrayElement(env, arr, i, str);
|
||||
(*env)->DeleteLocalRef(env, str);
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
static void JNICALL NativeUnmountAll(JNIEnv *env, jobject this)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= 4; i++)
|
||||
SIO_DisableDrive(i);
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativeIsDisk(JNIEnv *env, jobject this, jstring img)
|
||||
{
|
||||
const jbyte *img_utf = NULL;
|
||||
int type;
|
||||
|
||||
img_utf = (*env)->GetStringUTFChars(env, img, NULL);
|
||||
type = AFILE_DetectFileType(img_utf);
|
||||
(*env)->ReleaseStringUTFChars(env, img, img_utf);
|
||||
switch (type) {
|
||||
case AFILE_ATR:
|
||||
case AFILE_ATX:
|
||||
case AFILE_XFD:
|
||||
case AFILE_ATR_GZ:
|
||||
case AFILE_XFD_GZ:
|
||||
case AFILE_DCM:
|
||||
case AFILE_PRO:
|
||||
return JNI_TRUE;
|
||||
default:
|
||||
return JNI_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativeSaveState(JNIEnv *env, jobject this, jstring fname)
|
||||
{
|
||||
const jbyte *fname_utf = NULL;
|
||||
int ret;
|
||||
|
||||
fname_utf = (*env)->GetStringUTFChars(env, fname, NULL);
|
||||
ret = StateSav_SaveAtariState(fname_utf, "wb", TRUE);
|
||||
Log_print("Saved state %s with return %d", fname_utf, ret);
|
||||
(*env)->ReleaseStringUTFChars(env, fname, fname_utf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static jint JNICALL NativeRunAtariProgram(JNIEnv *env, jobject this,
|
||||
jstring img, jint drv, jint reboot)
|
||||
{
|
||||
static char const * const cart_descriptions[CARTRIDGE_LAST_SUPPORTED + 1] = {
|
||||
NULL,
|
||||
CARTRIDGE_STD_8_DESC,
|
||||
CARTRIDGE_STD_16_DESC,
|
||||
CARTRIDGE_OSS_034M_16_DESC,
|
||||
CARTRIDGE_5200_32_DESC,
|
||||
CARTRIDGE_DB_32_DESC,
|
||||
CARTRIDGE_5200_EE_16_DESC,
|
||||
CARTRIDGE_5200_40_DESC,
|
||||
CARTRIDGE_WILL_64_DESC,
|
||||
CARTRIDGE_EXP_64_DESC,
|
||||
CARTRIDGE_DIAMOND_64_DESC,
|
||||
CARTRIDGE_SDX_64_DESC,
|
||||
CARTRIDGE_XEGS_32_DESC,
|
||||
CARTRIDGE_XEGS_07_64_DESC,
|
||||
CARTRIDGE_XEGS_128_DESC,
|
||||
CARTRIDGE_OSS_M091_16_DESC,
|
||||
CARTRIDGE_5200_NS_16_DESC,
|
||||
CARTRIDGE_ATRAX_128_DESC,
|
||||
CARTRIDGE_BBSB_40_DESC,
|
||||
CARTRIDGE_5200_8_DESC,
|
||||
CARTRIDGE_5200_4_DESC,
|
||||
CARTRIDGE_RIGHT_8_DESC,
|
||||
CARTRIDGE_WILL_32_DESC,
|
||||
CARTRIDGE_XEGS_256_DESC,
|
||||
CARTRIDGE_XEGS_512_DESC,
|
||||
CARTRIDGE_XEGS_1024_DESC,
|
||||
CARTRIDGE_MEGA_16_DESC,
|
||||
CARTRIDGE_MEGA_32_DESC,
|
||||
CARTRIDGE_MEGA_64_DESC,
|
||||
CARTRIDGE_MEGA_128_DESC,
|
||||
CARTRIDGE_MEGA_256_DESC,
|
||||
CARTRIDGE_MEGA_512_DESC,
|
||||
CARTRIDGE_MEGA_1024_DESC,
|
||||
CARTRIDGE_SWXEGS_32_DESC,
|
||||
CARTRIDGE_SWXEGS_64_DESC,
|
||||
CARTRIDGE_SWXEGS_128_DESC,
|
||||
CARTRIDGE_SWXEGS_256_DESC,
|
||||
CARTRIDGE_SWXEGS_512_DESC,
|
||||
CARTRIDGE_SWXEGS_1024_DESC,
|
||||
CARTRIDGE_PHOENIX_8_DESC,
|
||||
CARTRIDGE_BLIZZARD_16_DESC,
|
||||
CARTRIDGE_ATMAX_128_DESC,
|
||||
CARTRIDGE_ATMAX_1024_DESC,
|
||||
CARTRIDGE_SDX_128_DESC,
|
||||
CARTRIDGE_OSS_8_DESC,
|
||||
CARTRIDGE_OSS_043M_16_DESC,
|
||||
CARTRIDGE_BLIZZARD_4_DESC,
|
||||
CARTRIDGE_AST_32_DESC,
|
||||
CARTRIDGE_ATRAX_SDX_64_DESC,
|
||||
CARTRIDGE_ATRAX_SDX_128_DESC,
|
||||
CARTRIDGE_TURBOSOFT_64_DESC,
|
||||
CARTRIDGE_TURBOSOFT_128_DESC,
|
||||
CARTRIDGE_ULTRACART_32_DESC,
|
||||
CARTRIDGE_LOW_BANK_8_DESC,
|
||||
CARTRIDGE_SIC_128_DESC,
|
||||
CARTRIDGE_SIC_256_DESC,
|
||||
CARTRIDGE_SIC_512_DESC,
|
||||
CARTRIDGE_STD_2_DESC,
|
||||
CARTRIDGE_STD_4_DESC,
|
||||
CARTRIDGE_RIGHT_4_DESC,
|
||||
CARTRIDGE_BLIZZARD_32_DESC,
|
||||
CARTRIDGE_MEGAMAX_2048_DESC,
|
||||
CARTRIDGE_THECART_128M_DESC,
|
||||
CARTRIDGE_MEGA_4096_DESC,
|
||||
CARTRIDGE_MEGA_2048_DESC,
|
||||
CARTRIDGE_THECART_32M_DESC,
|
||||
CARTRIDGE_THECART_64M_DESC,
|
||||
CARTRIDGE_XEGS_8F_64_DESC
|
||||
};
|
||||
|
||||
const jbyte *img_utf = NULL;
|
||||
int ret = 0, r, kb, i, cnt = 0;
|
||||
jclass cls, scls;
|
||||
jfieldID fid;
|
||||
jobjectArray arr, xarr;
|
||||
jstring str;
|
||||
char tmp[128];
|
||||
|
||||
if (reboot) {
|
||||
NativeUnmountAll(env, this);
|
||||
CARTRIDGE_Remove();
|
||||
}
|
||||
|
||||
img_utf = (*env)->GetStringUTFChars(env, img, NULL);
|
||||
r = AFILE_OpenFile(img_utf, reboot, drv, FALSE);
|
||||
if ((r & 0xFF) == AFILE_ROM && (r >> 8) != 0) {
|
||||
kb = r >> 8;
|
||||
scls = (*env)->FindClass(env, "java/lang/String");
|
||||
cls = (*env)->GetObjectClass(env, this);
|
||||
fid = (*env)->GetFieldID(env, cls, "_cartTypes", "[[Ljava/lang/String;");
|
||||
for (i = 1; i <= CARTRIDGE_LAST_SUPPORTED; i++)
|
||||
if (CARTRIDGE_kb[i] == kb) cnt++;
|
||||
xarr = (*env)->NewObjectArray(env, 2, scls, NULL);
|
||||
arr = (*env)->NewObjectArray(env, cnt, (*env)->GetObjectClass(env, xarr), NULL);
|
||||
for (cnt = 0, i = 1; i <= CARTRIDGE_LAST_SUPPORTED; i++)
|
||||
if (CARTRIDGE_kb[i] == kb) {
|
||||
sprintf(tmp, "%d", i);
|
||||
str = (*env)->NewStringUTF(env, tmp);
|
||||
(*env)->SetObjectArrayElement(env, xarr, 0, str);
|
||||
(*env)->DeleteLocalRef(env, str);
|
||||
str = (*env)->NewStringUTF(env, cart_descriptions[i]);
|
||||
(*env)->SetObjectArrayElement(env, xarr, 1, str);
|
||||
(*env)->DeleteLocalRef(env, str);
|
||||
(*env)->SetObjectArrayElement(env, arr, cnt++, xarr);
|
||||
(*env)->DeleteLocalRef(env, xarr);
|
||||
xarr = (*env)->NewObjectArray(env, 2, scls, NULL);
|
||||
}
|
||||
(*env)->SetObjectField(env, this, fid, arr);
|
||||
ret = -2;
|
||||
} else if (r == AFILE_ERROR) {
|
||||
Log_print("Cannot start image: %s", img_utf);
|
||||
ret = -1;
|
||||
} else
|
||||
CPU_cim_encountered = FALSE;
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, img, img_utf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void JNICALL NativeBootCartType(JNIEnv *env, jobject this, jint kb)
|
||||
{
|
||||
CARTRIDGE_SetTypeAutoReboot(&CARTRIDGE_main, kb);
|
||||
Atari800_Coldstart();
|
||||
}
|
||||
|
||||
static void JNICALL NativeExit(JNIEnv *env, jobject this)
|
||||
{
|
||||
Atari800_Exit(FALSE);
|
||||
}
|
||||
|
||||
static jint JNICALL NativeRunFrame(JNIEnv *env, jobject this)
|
||||
{
|
||||
static int old_cim = FALSE;
|
||||
int ret = 0;
|
||||
|
||||
do {
|
||||
INPUT_key_code = PLATFORM_Keyboard();
|
||||
|
||||
if (!CPU_cim_encountered)
|
||||
Atari800_Frame();
|
||||
else
|
||||
Atari800_display_screen = TRUE;
|
||||
|
||||
if (Atari800_display_screen || CPU_cim_encountered)
|
||||
PLATFORM_DisplayScreen();
|
||||
|
||||
if (!old_cim && CPU_cim_encountered)
|
||||
ret = 1;
|
||||
|
||||
old_cim = CPU_cim_encountered;
|
||||
} while (!Atari800_display_screen);
|
||||
|
||||
if (dev_b_status.ready && devb_url[0] == '\0')
|
||||
if (strlen(dev_b_status.url)) {
|
||||
strncpy(devb_url, dev_b_status.url, sizeof(devb_url));
|
||||
Log_print("Received b: device URL: %s", devb_url);
|
||||
ret |= 2;
|
||||
} else
|
||||
Log_print("Device b: signalled with zero-length url");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void JNICALL NativeSoundInit(JNIEnv *env, jobject this, jint size)
|
||||
{
|
||||
jclass cls;
|
||||
jfieldID fid;
|
||||
jintArray arr;
|
||||
struct audiothread *at;
|
||||
|
||||
Log_print("Audio init with buffer size %d", size);
|
||||
|
||||
if (pthread_getspecific(audiothread_data))
|
||||
Log_print("Audiothread data already allocated for current thread");
|
||||
at = (struct audiothread *) malloc(sizeof(struct audiothread));
|
||||
|
||||
cls = (*env)->GetObjectClass(env, this);
|
||||
fid = (*env)->GetFieldID(env, cls, "_buffer", "[B");
|
||||
arr = (*env)->GetObjectField(env, this, fid);
|
||||
at->sndarray = (*env)->NewGlobalRef(env, arr);
|
||||
|
||||
at->sndbuf = malloc(size);
|
||||
if (!at->sndbuf) Log_print("Cannot allocate memory for sound buffer");
|
||||
|
||||
pthread_setspecific(audiothread_data, at);
|
||||
}
|
||||
|
||||
static void JNICALL NativeSoundUpdate(JNIEnv *env, jobject this, jint offset, jint length)
|
||||
{
|
||||
struct audiothread *at;
|
||||
|
||||
if ( !(at = (struct audiothread *) pthread_getspecific(audiothread_data)) )
|
||||
return;
|
||||
SoundThread_Update(at->sndbuf, offset, length);
|
||||
(*env)->SetByteArrayRegion(env, at->sndarray, offset, length, at->sndbuf + offset);
|
||||
}
|
||||
|
||||
static void JNICALL NativeSoundExit(JNIEnv *env, jobject this)
|
||||
{
|
||||
struct audiothread *at;
|
||||
|
||||
Log_print("Audio exit");
|
||||
|
||||
if ( !(at = (struct audiothread *) pthread_getspecific(audiothread_data)) )
|
||||
return;
|
||||
|
||||
(*env)->DeleteGlobalRef(env, at->sndarray);
|
||||
if (at->sndbuf)
|
||||
free(at->sndbuf);
|
||||
|
||||
free(at);
|
||||
pthread_setspecific(audiothread_data, NULL);
|
||||
}
|
||||
|
||||
static void JNICALL NativeKey(JNIEnv *env, jobject this, int k, int s)
|
||||
{
|
||||
Android_KeyEvent(k, s);
|
||||
}
|
||||
|
||||
static int JNICALL NativeTouch(JNIEnv *env, jobject this, int x1, int y1, int s1,
|
||||
int x2, int y2, int s2)
|
||||
{
|
||||
return Android_TouchEvent(x1, y1, s1, x2, y2, s2);
|
||||
}
|
||||
|
||||
|
||||
static void JNICALL NativePrefGfx(JNIEnv *env, jobject this, int aspect, jboolean bilinear,
|
||||
int artifact, int frameskip, jboolean collisions, int crophoriz,
|
||||
int cropvert)
|
||||
{
|
||||
Android_Aspect = aspect;
|
||||
Android_Bilinear = bilinear;
|
||||
ANTIC_artif_mode = artifact;
|
||||
ANTIC_UpdateArtifacting();
|
||||
if (frameskip == 0) {
|
||||
Atari800_refresh_rate = 1;
|
||||
Atari800_auto_frameskip = TRUE;
|
||||
} else {
|
||||
Atari800_auto_frameskip = FALSE;
|
||||
Atari800_refresh_rate = frameskip;
|
||||
}
|
||||
Atari800_collisions_in_skipped_frames = collisions;
|
||||
Android_CropScreen[0] = (SCANLINE_LEN - crophoriz) / 2;
|
||||
Android_CropScreen[2] = crophoriz;
|
||||
Android_CropScreen[1] = SCREEN_HEIGHT - (SCREEN_HEIGHT - cropvert) / 2;
|
||||
Android_CropScreen[3] = -cropvert;
|
||||
Screen_visible_x1 = SCANLINE_START + Android_CropScreen[0];
|
||||
Screen_visible_x2 = Screen_visible_x1 + crophoriz;
|
||||
Screen_visible_y1 = SCREEN_HEIGHT - Android_CropScreen[1];
|
||||
Screen_visible_y2 = Screen_visible_y1 + cropvert;
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativePrefMachine(JNIEnv *env, jobject this, int nummac, jboolean ntsc)
|
||||
{
|
||||
struct tSysConfig {
|
||||
int type;
|
||||
int ram;
|
||||
};
|
||||
static const struct tSysConfig machine[] = {
|
||||
{ Atari800_MACHINE_800, 16 },
|
||||
{ Atari800_MACHINE_800, 48 },
|
||||
{ Atari800_MACHINE_800, 52 },
|
||||
{ Atari800_MACHINE_800, 16 },
|
||||
{ Atari800_MACHINE_800, 48 },
|
||||
{ Atari800_MACHINE_800, 52 },
|
||||
{ Atari800_MACHINE_XLXE, 16 },
|
||||
{ Atari800_MACHINE_XLXE, 64 },
|
||||
{ Atari800_MACHINE_XLXE, 128 },
|
||||
{ Atari800_MACHINE_XLXE, 192 },
|
||||
{ Atari800_MACHINE_XLXE, MEMORY_RAM_320_RAMBO },
|
||||
{ Atari800_MACHINE_XLXE, MEMORY_RAM_320_COMPY_SHOP },
|
||||
{ Atari800_MACHINE_XLXE, 576 },
|
||||
{ Atari800_MACHINE_XLXE, 1088 },
|
||||
{ Atari800_MACHINE_5200, 16 }
|
||||
};
|
||||
|
||||
Atari800_SetMachineType(machine[nummac].type);
|
||||
MEMORY_ram_size = machine[nummac].ram;
|
||||
/* Temporary hack to allow choosing OS rev. A/B and XL/XE features.
|
||||
Delete after adding proper support for choosing system settings. */
|
||||
if (nummac < 3)
|
||||
SYSROM_os_versions[Atari800_MACHINE_800] = ntsc ? SYSROM_A_NTSC : SYSROM_A_PAL;
|
||||
else if (nummac >= 3 && nummac < 6)
|
||||
/* If no OSB NTSC ROM present, try the "custom" 400/800 ROM. */
|
||||
SYSROM_os_versions[Atari800_MACHINE_800] =
|
||||
SYSROM_roms[SYSROM_B_NTSC].filename[0] == '\0' ?
|
||||
SYSROM_800_CUSTOM :
|
||||
SYSROM_B_NTSC;
|
||||
else if (Atari800_machine_type == Atari800_MACHINE_XLXE) {
|
||||
Atari800_builtin_basic = TRUE;
|
||||
Atari800_keyboard_leds = FALSE;
|
||||
Atari800_f_keys = FALSE;
|
||||
Atari800_jumper = FALSE;
|
||||
Atari800_builtin_game = FALSE;
|
||||
Atari800_keyboard_detached = FALSE;
|
||||
}
|
||||
/* End of hack */
|
||||
|
||||
Atari800_SetTVMode(ntsc ? Atari800_TV_NTSC : Atari800_TV_PAL);
|
||||
CPU_cim_encountered = FALSE;
|
||||
return Atari800_InitialiseMachine();
|
||||
}
|
||||
|
||||
static void JNICALL NativePrefEmulation(JNIEnv *env, jobject this, jboolean basic, jboolean speed,
|
||||
jboolean disk, jboolean sector, jboolean browser)
|
||||
{
|
||||
Atari800_disable_basic = basic;
|
||||
Screen_show_atari_speed = speed;
|
||||
Screen_show_disk_led = disk;
|
||||
Screen_show_sector_counter = sector;
|
||||
Devices_enable_b_patch = browser;
|
||||
Devices_UpdatePatches();
|
||||
}
|
||||
|
||||
static void JNICALL NativePrefSoftjoy(JNIEnv *env, jobject this, jboolean softjoy, int up, int down,
|
||||
int left, int right, int fire, int derotkeys, jobjectArray actions)
|
||||
{
|
||||
int i;
|
||||
jobject obj;
|
||||
const char *str;
|
||||
char *sep;
|
||||
UBYTE act, akey;
|
||||
|
||||
Android_SoftjoyEnable = softjoy;
|
||||
softjoymap[SOFTJOY_UP][0] = up;
|
||||
softjoymap[SOFTJOY_DOWN][0] = down;
|
||||
softjoymap[SOFTJOY_LEFT][0] = left;
|
||||
softjoymap[SOFTJOY_RIGHT][0] = right;
|
||||
softjoymap[SOFTJOY_FIRE][0] = fire;
|
||||
Android_DerotateKeys = derotkeys;
|
||||
|
||||
for (i = 0; i < SOFTJOY_MAXACTIONS; i++) {
|
||||
obj = (*env)->GetObjectArrayElement(env, actions, i);
|
||||
str = (*env)->GetStringUTFChars(env, obj, NULL);
|
||||
sep = strchr(str, ',');
|
||||
act = ACTION_NONE;
|
||||
akey = AKEY_NONE;
|
||||
if (sep) {
|
||||
act = atoi(str);
|
||||
akey = atoi(sep + 1);
|
||||
}
|
||||
softjoymap[SOFTJOY_ACTIONBASE + i][0] = act;
|
||||
softjoymap[SOFTJOY_ACTIONBASE + i][1] = akey;
|
||||
(*env)->ReleaseStringUTFChars(env, obj, str);
|
||||
(*env)->DeleteLocalRef(env, obj);
|
||||
}
|
||||
}
|
||||
|
||||
static void config_PD(void)
|
||||
{
|
||||
INPUT_mouse_mode = INPUT_MOUSE_PAD;
|
||||
Android_Splitpct = 1.0f;
|
||||
AndroidInput_JoyOvl.ovl_visible = FALSE;
|
||||
Android_PlanetaryDefense = TRUE;
|
||||
Android_Paddle = TRUE;
|
||||
Android_ReversePddle = 3;
|
||||
}
|
||||
|
||||
static void JNICALL NativePrefJoy(JNIEnv *env, jobject this, jboolean visible, int size, int opacity,
|
||||
jboolean righth, int deadband, jboolean midx, int anchor, int anchorx,
|
||||
int anchory, int grace, jboolean paddle, jboolean plandef)
|
||||
{
|
||||
AndroidInput_JoyOvl.ovl_visible = visible;
|
||||
AndroidInput_JoyOvl.areaopacityset = 0.01f * opacity;
|
||||
Android_Joyscale = 0.01f * size;
|
||||
Android_Joyleft = !righth;
|
||||
Android_Splitpct = 0.01f * midx;
|
||||
AndroidInput_JoyOvl.deadarea = 0.01f * deadband;
|
||||
AndroidInput_JoyOvl.gracearea = 0.02f * grace;
|
||||
AndroidInput_JoyOvl.anchor = anchor;
|
||||
if (anchor) {
|
||||
AndroidInput_JoyOvl.joyarea.l = anchorx;
|
||||
AndroidInput_JoyOvl.joyarea.t = anchory;
|
||||
}
|
||||
Android_Paddle = paddle;
|
||||
INPUT_mouse_mode = paddle ? INPUT_MOUSE_PAD : INPUT_MOUSE_OFF;
|
||||
Android_PlanetaryDefense = FALSE;
|
||||
Android_ReversePddle = 0;
|
||||
if (plandef)
|
||||
config_PD();
|
||||
|
||||
Android_SplitCalc();
|
||||
Joyovl_Scale();
|
||||
Joy_Reposition();
|
||||
}
|
||||
|
||||
static void JNICALL NativePrefSound(JNIEnv *env, jobject this, int mixrate, int bufsizems,
|
||||
jboolean sound16bit, jboolean hqpokey, jboolean disableOSL)
|
||||
{
|
||||
Android_SoundInit(mixrate, bufsizems, sound16bit, hqpokey, disableOSL);
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativeSetROMPath(JNIEnv *env, jobject this, jstring path)
|
||||
{
|
||||
const jbyte *utf = NULL;
|
||||
jboolean ret = JNI_FALSE;
|
||||
|
||||
utf = (*env)->GetStringUTFChars(env, path, NULL);
|
||||
SYSROM_FindInDir(utf, FALSE);
|
||||
Log_print("sysrom %s %d", utf, SYSROM_FindInDir(utf, FALSE));
|
||||
ret |= chdir(utf);
|
||||
Log_print("sysrom %s %d", utf, SYSROM_FindInDir(utf, FALSE));
|
||||
ret |= Atari800_InitialiseMachine();
|
||||
(*env)->ReleaseStringUTFChars(env, path, utf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static jstring JNICALL NativeGetJoypos(JNIEnv *env, jobject this)
|
||||
{
|
||||
char tmp[16];
|
||||
sprintf(tmp, "%d %d", AndroidInput_JoyOvl.joyarea.l, AndroidInput_JoyOvl.joyarea.t);
|
||||
return (*env)->NewStringUTF(env, tmp);
|
||||
}
|
||||
|
||||
static jstring JNICALL NativeGetURL(JNIEnv *env, jobject this)
|
||||
{
|
||||
return (*env)->NewStringUTF(env, dev_b_status.url);
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativeBootPD(JNIEnv *env, jobject this, jobjectArray img, jint sz)
|
||||
{
|
||||
FILE *fp;
|
||||
void *src;
|
||||
|
||||
fp = fopen(PD2012_FNAME, "wb");
|
||||
if (!fp) {
|
||||
Log_print("ERROR: Cannot open PD2012 for write");
|
||||
return FALSE;
|
||||
}
|
||||
src = (*env)->GetByteArrayElements(env, img, NULL);
|
||||
fwrite(src, 1, sz, fp);
|
||||
fclose(fp);
|
||||
(*env)->ReleaseByteArrayElements(env, img, src, JNI_ABORT);
|
||||
|
||||
config_PD();
|
||||
NativeUnmountAll(env, this);
|
||||
CARTRIDGE_Remove();
|
||||
return AFILE_OpenFile(PD2012_FNAME, TRUE, 1, FALSE);
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativeOSLSound(JNIEnv *env, jobject this)
|
||||
{
|
||||
return Android_osl_sound;
|
||||
}
|
||||
|
||||
static jboolean JNICALL NativeOSLSoundPause(JNIEnv *env, jobject this, jboolean pause)
|
||||
{
|
||||
if (pause)
|
||||
Sound_Pause();
|
||||
else
|
||||
Sound_Continue();
|
||||
}
|
||||
|
||||
static void JNICALL NativeOSLSoundInit(JNIEnv *env, jobject this)
|
||||
{
|
||||
Sound_Initialise(0, NULL);
|
||||
}
|
||||
|
||||
static void JNICALL NativeOSLSoundExit(JNIEnv *env, jobject this)
|
||||
{
|
||||
Sound_Exit();
|
||||
}
|
||||
|
||||
|
||||
jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved)
|
||||
{
|
||||
JNINativeMethod main_methods[] = {
|
||||
{ "NativeExit", "()V", NativeExit },
|
||||
{ "NativeRunAtariProgram", "(Ljava/lang/String;II)I", NativeRunAtariProgram },
|
||||
{ "NativePrefGfx", "(IZIIZII)V", NativePrefGfx },
|
||||
{ "NativePrefMachine", "(IZ)Z", NativePrefMachine },
|
||||
{ "NativePrefEmulation", "(ZZZZZ)V", NativePrefEmulation },
|
||||
{ "NativePrefSoftjoy", "(ZIIIIII[Ljava/lang/String;)V", NativePrefSoftjoy },
|
||||
{ "NativePrefJoy", "(ZIIZIIZIIIZZ)V", NativePrefJoy },
|
||||
{ "NativePrefSound", "(IIZZZ)V", NativePrefSound },
|
||||
{ "NativeSetROMPath", "(Ljava/lang/String;)Z", NativeSetROMPath },
|
||||
{ "NativeGetJoypos", "()Ljava/lang/String;", NativeGetJoypos },
|
||||
{ "NativeInit", "()Ljava/lang/String;", NativeInit },
|
||||
{ "NativeGetURL", "()Ljava/lang/String;", NativeGetURL },
|
||||
{ "NativeClearDevB", "()V", NativeClearDevB },
|
||||
{ "NativeBootCartType", "(I)V", NativeBootCartType },
|
||||
};
|
||||
JNINativeMethod view_methods[] = {
|
||||
{ "NativeTouch", "(IIIIII)I", NativeTouch },
|
||||
{ "NativeKey", "(II)V", NativeKey },
|
||||
};
|
||||
JNINativeMethod snd_methods[] = {
|
||||
{ "NativeSoundInit", "(I)V", NativeSoundInit },
|
||||
{ "NativeSoundUpdate", "(II)V", NativeSoundUpdate },
|
||||
{ "NativeSoundExit", "()V", NativeSoundExit },
|
||||
{ "NativeOSLSound", "()Z", NativeOSLSound },
|
||||
{ "NativeOSLSoundInit", "()V", NativeOSLSoundInit },
|
||||
{ "NativeOSLSoundExit", "()V", NativeOSLSoundExit },
|
||||
{ "NativeOSLSoundPause", "(Z)V", NativeOSLSoundPause },
|
||||
};
|
||||
JNINativeMethod render_methods[] = {
|
||||
{ "NativeRunFrame", "()I", NativeRunFrame },
|
||||
{ "NativeGetOverlays", "()V", NativeGetOverlays },
|
||||
{ "NativeResize", "(II)V", NativeResize },
|
||||
};
|
||||
JNINativeMethod fsel_methods[] = {
|
||||
{ "NativeIsDisk", "(Ljava/lang/String;)Z", NativeIsDisk },
|
||||
{ "NativeRunAtariProgram", "(Ljava/lang/String;II)I", NativeRunAtariProgram },
|
||||
{ "NativeGetDrvFnames", "()[Ljava/lang/String;", NativeGetDrvFnames },
|
||||
{ "NativeUnmountAll", "()V", NativeUnmountAll },
|
||||
};
|
||||
JNINativeMethod pref_methods[] = {
|
||||
{ "NativeSaveState", "(Ljava/lang/String;)Z", NativeSaveState },
|
||||
{ "NativeBootPD", "([BI)Z", NativeBootPD },
|
||||
{ "NativeOSLSound", "()Z", NativeOSLSound },
|
||||
};
|
||||
JNIEnv *env;
|
||||
jclass cls;
|
||||
|
||||
if ((*jvm)->GetEnv(jvm, (void **) &env, JNI_VERSION_1_2))
|
||||
return JNI_ERR;
|
||||
|
||||
cls = (*env)->FindClass(env, "name/nick/jubanka/colleen/MainActivity");
|
||||
(*env)->RegisterNatives(env, cls, main_methods, sizeof(main_methods)/sizeof(JNINativeMethod));
|
||||
cls = (*env)->FindClass(env, "name/nick/jubanka/colleen/A800view");
|
||||
(*env)->RegisterNatives(env, cls, view_methods, sizeof(view_methods)/sizeof(JNINativeMethod));
|
||||
cls = (*env)->FindClass(env, "name/nick/jubanka/colleen/AudioThread");
|
||||
(*env)->RegisterNatives(env, cls, snd_methods, sizeof(snd_methods)/sizeof(JNINativeMethod));
|
||||
cls = (*env)->FindClass(env, "name/nick/jubanka/colleen/A800Renderer");
|
||||
(*env)->RegisterNatives(env, cls, render_methods, sizeof(render_methods)/sizeof(JNINativeMethod));
|
||||
cls = (*env)->FindClass(env, "name/nick/jubanka/colleen/FileSelector");
|
||||
(*env)->RegisterNatives(env, cls, fsel_methods, sizeof(fsel_methods)/sizeof(JNINativeMethod));
|
||||
cls = (*env)->FindClass(env, "name/nick/jubanka/colleen/Preferences");
|
||||
(*env)->RegisterNatives(env, cls, pref_methods, sizeof(pref_methods)/sizeof(JNINativeMethod));
|
||||
|
||||
return JNI_VERSION_1_2;
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
#define STATIC_MAXKEYS 256
|
||||
|
||||
#define KEY_SHIFT 256
|
||||
#define KEY_CONTROL 257
|
||||
#define KEY_BACKSPACE 255
|
||||
#define KEY_UP 254
|
||||
#define KEY_DOWN 253
|
||||
#define KEY_LEFT 252
|
||||
#define KEY_RIGHT 251
|
||||
#define KEY_FIRE 250
|
||||
#define KEY_ENTER 249
|
||||
#define KEY_ESCAPE 248
|
||||
#define KEY_BREAK 242
|
||||
|
||||
static const SWORD skeyxlat[STATIC_MAXKEYS] = {
|
||||
[0 ... (STATIC_MAXKEYS - 1)] = AKEY_NONE,
|
||||
|
||||
['0'] = AKEY_0,
|
||||
['1'] = AKEY_1,
|
||||
['2'] = AKEY_2,
|
||||
['3'] = AKEY_3,
|
||||
['4'] = AKEY_4,
|
||||
['5'] = AKEY_5,
|
||||
['6'] = AKEY_6,
|
||||
['7'] = AKEY_7,
|
||||
['8'] = AKEY_8,
|
||||
['9'] = AKEY_9,
|
||||
|
||||
['a'] = AKEY_a,
|
||||
['b'] = AKEY_b,
|
||||
['c'] = AKEY_c,
|
||||
['d'] = AKEY_d,
|
||||
['e'] = AKEY_e,
|
||||
['f'] = AKEY_f,
|
||||
['g'] = AKEY_g,
|
||||
['h'] = AKEY_h,
|
||||
['i'] = AKEY_i,
|
||||
['j'] = AKEY_j,
|
||||
['k'] = AKEY_k,
|
||||
['l'] = AKEY_l,
|
||||
['m'] = AKEY_m,
|
||||
['n'] = AKEY_n,
|
||||
['o'] = AKEY_o,
|
||||
['p'] = AKEY_p,
|
||||
['q'] = AKEY_q,
|
||||
['r'] = AKEY_r,
|
||||
['s'] = AKEY_s,
|
||||
['t'] = AKEY_t,
|
||||
['u'] = AKEY_u,
|
||||
['v'] = AKEY_v,
|
||||
['w'] = AKEY_w,
|
||||
['x'] = AKEY_x,
|
||||
['y'] = AKEY_y,
|
||||
['z'] = AKEY_z,
|
||||
|
||||
['A'] = AKEY_A,
|
||||
['B'] = AKEY_B,
|
||||
['C'] = AKEY_C,
|
||||
['D'] = AKEY_D,
|
||||
['E'] = AKEY_E,
|
||||
['F'] = AKEY_F,
|
||||
['G'] = AKEY_G,
|
||||
['H'] = AKEY_H,
|
||||
['I'] = AKEY_I,
|
||||
['J'] = AKEY_J,
|
||||
['K'] = AKEY_K,
|
||||
['L'] = AKEY_L,
|
||||
['M'] = AKEY_M,
|
||||
['N'] = AKEY_N,
|
||||
['O'] = AKEY_O,
|
||||
['P'] = AKEY_P,
|
||||
['Q'] = AKEY_Q,
|
||||
['R'] = AKEY_R,
|
||||
['S'] = AKEY_S,
|
||||
['T'] = AKEY_T,
|
||||
['U'] = AKEY_U,
|
||||
['V'] = AKEY_V,
|
||||
['W'] = AKEY_W,
|
||||
['X'] = AKEY_X,
|
||||
['Y'] = AKEY_Y,
|
||||
['Z'] = AKEY_Z,
|
||||
|
||||
['\e'] = AKEY_ESCAPE,
|
||||
['~'] = AKEY_ESCAPE,
|
||||
['\t'] = AKEY_TAB,
|
||||
['\n'] = AKEY_RETURN,
|
||||
[' '] = AKEY_SPACE,
|
||||
['!'] = AKEY_EXCLAMATION,
|
||||
['\"'] = AKEY_DBLQUOTE,
|
||||
['#'] = AKEY_HASH,
|
||||
['$'] = AKEY_DOLLAR,
|
||||
['%'] = AKEY_PERCENT,
|
||||
['&'] = AKEY_AMPERSAND,
|
||||
['\''] = AKEY_QUOTE,
|
||||
['@'] = AKEY_AT,
|
||||
['('] = AKEY_PARENLEFT,
|
||||
[')'] = AKEY_PARENRIGHT,
|
||||
['<'] = AKEY_LESS,
|
||||
['>'] = AKEY_GREATER,
|
||||
['='] = AKEY_EQUAL,
|
||||
['?'] = AKEY_QUESTION,
|
||||
['-'] = AKEY_MINUS,
|
||||
['+'] = AKEY_PLUS,
|
||||
['*'] = AKEY_ASTERISK,
|
||||
['/'] = AKEY_SLASH,
|
||||
[':'] = AKEY_COLON,
|
||||
[';'] = AKEY_SEMICOLON,
|
||||
[','] = AKEY_COMMA,
|
||||
['.'] = AKEY_FULLSTOP,
|
||||
['_'] = AKEY_UNDERSCORE,
|
||||
['['] = AKEY_BRACKETLEFT,
|
||||
[']'] = AKEY_BRACKETRIGHT,
|
||||
['^'] = AKEY_CIRCUMFLEX,
|
||||
['\\'] = AKEY_BACKSLASH,
|
||||
['|'] = AKEY_BAR,
|
||||
['`'] = AKEY_CAPSTOGGLE,
|
||||
['{'] = AKEY_ATARI,
|
||||
|
||||
[KEY_BACKSPACE] = AKEY_BACKSPACE,
|
||||
[KEY_UP ] = AKEY_UP,
|
||||
[KEY_DOWN ] = AKEY_DOWN,
|
||||
[KEY_LEFT ] = AKEY_LEFT,
|
||||
[KEY_RIGHT ] = AKEY_RIGHT,
|
||||
[KEY_ENTER ] = AKEY_RETURN,
|
||||
[KEY_ESCAPE ] = AKEY_ESCAPE,
|
||||
[KEY_BREAK ] = AKEY_BREAK,
|
||||
|
||||
|
||||
|
||||
/* unmapped codes
|
||||
#define AKEY_HELP 0x11
|
||||
#define AKEY_DELETE_CHAR 0xb4
|
||||
#define AKEY_DELETE_LINE 0x74
|
||||
#define AKEY_INSERT_CHAR 0xb7
|
||||
#define AKEY_INSERT_LINE 0x77
|
||||
#define AKEY_SETTAB 0x6c
|
||||
#define AKEY_CLRTAB 0xac
|
||||
*/
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* platform.c - platform interface implementation for android
|
||||
*
|
||||
* Copyright (C) 2010 Kostas Nakos
|
||||
* Copyright (C) 2010 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "atari.h"
|
||||
#include "cpu.h"
|
||||
#include "input.h"
|
||||
#include "devices.h"
|
||||
|
||||
#include "graphics.h"
|
||||
#include "androidinput.h"
|
||||
|
||||
int PLATFORM_Initialise(int *argc, char *argv[])
|
||||
{
|
||||
/* Android_InitGraphics() is deferred until GL surface is created */
|
||||
/* Sound_Initialise() not needed */
|
||||
Log_print("Core init");
|
||||
|
||||
Input_Initialize();
|
||||
|
||||
Devices_enable_h_patch = FALSE;
|
||||
INPUT_direct_mouse = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int PLATFORM_Exit(int run_monitor)
|
||||
{
|
||||
if (CPU_cim_encountered) {
|
||||
Log_print("CIM encountered");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Log_print("Core_exit");
|
||||
|
||||
Android_ExitGraphics();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int PLATFORM_Keyboard(void)
|
||||
{
|
||||
return Keyboard_Dequeue();
|
||||
}
|
||||
|
||||
void PLATFORM_DisplayScreen(void)
|
||||
{
|
||||
Android_ConvertScreen();
|
||||
Android_Render();
|
||||
Update_Overlays();
|
||||
}
|
||||
|
||||
void PLATFORM_PaletteUpdate(void)
|
||||
{
|
||||
Android_PaletteUpdate();
|
||||
}
|
||||
|
||||
int PLATFORM_PORT(int num)
|
||||
{
|
||||
return (Android_PortStatus >> (num << 3)) & 0xFF;
|
||||
}
|
||||
|
||||
int PLATFORM_TRIG(int num)
|
||||
{
|
||||
return (Android_TrigStatus >> num) & 0x1;
|
||||
}
|
||||
@@ -0,0 +1,381 @@
|
||||
/*
|
||||
* sound.c - android sound
|
||||
*
|
||||
* Copyright (C) 2014 Kostas Nakos
|
||||
* Copyright (C) 2014 Atari800 development team (see DOC/CREDITS)
|
||||
*
|
||||
* This file is part of the Atari800 emulator project which emulates
|
||||
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
|
||||
*
|
||||
* Atari800 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.
|
||||
*
|
||||
* Atari800 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 Atari800; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <SLES/OpenSLES.h>
|
||||
#include <SLES/OpenSLES_Android.h>
|
||||
|
||||
#include "pokeysnd.h"
|
||||
#include "log.h"
|
||||
|
||||
static int at_sixteenbit = 0;
|
||||
static int snd_bufsizems = 0;
|
||||
static int snd_mixrate = 0;
|
||||
|
||||
#define OSL_BUFSIZE_MS 10
|
||||
static void *osl_handle;
|
||||
int Android_osl_sound;
|
||||
static int osl_disable = 0;
|
||||
static int osl_bufnum = 0;
|
||||
static int osl_bufszbytes = 0;
|
||||
static UBYTE *osl_soundbuf = NULL;
|
||||
static UBYTE **osl_soundbufptr = NULL;
|
||||
static ULONG osl_lastplayedindex = 0;
|
||||
static volatile ULONG osl_lastindex = 0;
|
||||
static int osl_nextbufindex = 0;
|
||||
|
||||
static SLObjectItf osl_engine = NULL,
|
||||
osl_mixer = NULL,
|
||||
osl_player = NULL;
|
||||
static SLEngineItf osl_engineif = NULL;
|
||||
static SLPlayItf osl_playif = NULL;
|
||||
static SLAndroidSimpleBufferQueueItf osl_bufqif = NULL;
|
||||
|
||||
static SLresult SLAPIENTRY (*osl_slCreateEngine) (
|
||||
SLObjectItf *pEngine,
|
||||
SLuint32 numOptions,
|
||||
const SLEngineOption *pEngineOptions,
|
||||
SLuint32 numInterfaces,
|
||||
const SLInterfaceID *pInterfaceIds,
|
||||
const SLboolean * pInterfaceRequired
|
||||
) = NULL;
|
||||
static SLAPIENTRY const SLInterfaceID *osl_SL_IID_VOLUME;
|
||||
static SLAPIENTRY const SLInterfaceID *osl_SL_IID_ANDROIDSIMPLEBUFFERQUEUE;
|
||||
static SLAPIENTRY const SLInterfaceID *osl_SL_IID_ENGINE;
|
||||
static SLAPIENTRY const SLInterfaceID *osl_SL_IID_PLAY;
|
||||
|
||||
#define CHECK_OSL(command, errmsg) \
|
||||
if ( (res = command) != SL_RESULT_SUCCESS ) { \
|
||||
Log_print("ERROR: OSL: Cannot " errmsg " (%08X)", res); \
|
||||
return FALSE; \
|
||||
} else \
|
||||
(void) 0
|
||||
#define GET_SYMBOL(var, sname) \
|
||||
var = dlsym(osl_handle, sname); \
|
||||
errstr = dlerror(); \
|
||||
if (errstr) { \
|
||||
Log_print("ERROR: Cannot resolve " sname ": %s", errstr); \
|
||||
return FALSE; \
|
||||
} else \
|
||||
(void) 0
|
||||
|
||||
void Sound_Continue(void);
|
||||
|
||||
/* Legacy AudioThread functions */
|
||||
|
||||
void Android_SoundInit(int rate, int bufsizems, int bit16, int hq, int disableOSL)
|
||||
{
|
||||
Log_print("SoundInit for android initializing with %dHz, %d bufsize, OSL %s",
|
||||
rate, bufsizems, (disableOSL) ? "off" : "on");
|
||||
POKEYSND_bienias_fix = 0;
|
||||
POKEYSND_enable_new_pokey = hq;
|
||||
at_sixteenbit = bit16;
|
||||
snd_bufsizems = bufsizems;
|
||||
snd_mixrate = rate;
|
||||
osl_bufnum = snd_bufsizems / OSL_BUFSIZE_MS;
|
||||
osl_bufszbytes = OSL_BUFSIZE_MS * (at_sixteenbit ? 2 : 1) * snd_mixrate / 1000;
|
||||
osl_disable = disableOSL;
|
||||
if (disableOSL)
|
||||
Android_osl_sound = FALSE;
|
||||
Log_print("Initializing POKEY");
|
||||
POKEYSND_Init(POKEYSND_FREQ_17_EXACT, rate, 1, bit16 ? POKEYSND_BIT16 : 0);
|
||||
Log_print("POKEY init done");
|
||||
}
|
||||
|
||||
void SoundThread_Update(void *buf, int offs, int len)
|
||||
{
|
||||
POKEYSND_Process(buf + offs, len >> at_sixteenbit);
|
||||
}
|
||||
|
||||
|
||||
/* Native sound helpers */
|
||||
|
||||
static int OSL_grab_functions(void)
|
||||
{
|
||||
const char *errstr;
|
||||
|
||||
dlerror();
|
||||
|
||||
GET_SYMBOL(osl_slCreateEngine, "slCreateEngine");
|
||||
GET_SYMBOL(osl_SL_IID_VOLUME, "SL_IID_VOLUME");
|
||||
GET_SYMBOL(osl_SL_IID_ANDROIDSIMPLEBUFFERQUEUE, "SL_IID_ANDROIDSIMPLEBUFFERQUEUE");
|
||||
GET_SYMBOL(osl_SL_IID_ENGINE, "SL_IID_ENGINE");
|
||||
GET_SYMBOL(osl_SL_IID_PLAY, "SL_IID_PLAY");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int OSL_load(void)
|
||||
{
|
||||
osl_handle = dlopen("libOpenSLES.so", RTLD_LAZY);
|
||||
if (! osl_handle) {
|
||||
Log_print("Cannot dlopen OSL");
|
||||
return FALSE;
|
||||
}
|
||||
if ( OSL_grab_functions() ) {
|
||||
Log_print("Open SL ES found and bound");
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void OSL_process(SLAndroidSimpleBufferQueueItf bufqif, void *ctx)
|
||||
{
|
||||
SLAndroidSimpleBufferQueueState st;
|
||||
|
||||
if ( (*bufqif)->GetState(bufqif, &st) != SL_RESULT_SUCCESS ) {
|
||||
Log_print("ERROR: Cannot get queue state");
|
||||
return;
|
||||
}
|
||||
osl_lastindex = st.index;
|
||||
}
|
||||
|
||||
static int OSL_init(void)
|
||||
{
|
||||
SLresult res;
|
||||
|
||||
const SLInterfaceID mixids[] = { *osl_SL_IID_VOLUME };
|
||||
const SLboolean mixreq[] = { SL_BOOLEAN_FALSE };
|
||||
|
||||
SLDataLocator_AndroidSimpleBufferQueue dlsbq = {
|
||||
.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE,
|
||||
.numBuffers = osl_bufnum
|
||||
};
|
||||
SLDataFormat_PCM dfpcm = {
|
||||
.formatType = SL_DATAFORMAT_PCM,
|
||||
.numChannels = 1,
|
||||
.samplesPerSec = (snd_mixrate == 44100) ? SL_SAMPLINGRATE_44_1 :
|
||||
(snd_mixrate == 22050) ? SL_SAMPLINGRATE_22_05 :
|
||||
(snd_mixrate == 11025) ? SL_SAMPLINGRATE_11_025:
|
||||
0,
|
||||
.bitsPerSample = (at_sixteenbit) ? SL_PCMSAMPLEFORMAT_FIXED_16 : SL_PCMSAMPLEFORMAT_FIXED_8,
|
||||
.containerSize = (at_sixteenbit) ? SL_PCMSAMPLEFORMAT_FIXED_16 : SL_PCMSAMPLEFORMAT_FIXED_8,
|
||||
.channelMask = SL_SPEAKER_FRONT_CENTER,
|
||||
.endianness = SL_BYTEORDER_LITTLEENDIAN
|
||||
};
|
||||
SLDataSource dsrc = {
|
||||
.pLocator = &dlsbq,
|
||||
.pFormat = &dfpcm
|
||||
};
|
||||
SLDataLocator_OutputMix dlmix = {
|
||||
.locatorType = SL_DATALOCATOR_OUTPUTMIX,
|
||||
.outputMix = NULL
|
||||
};
|
||||
SLDataSink dsnk = {
|
||||
.pLocator = &dlmix,
|
||||
.pFormat = NULL
|
||||
};
|
||||
const SLInterfaceID apids[] = { *osl_SL_IID_ANDROIDSIMPLEBUFFERQUEUE };
|
||||
const SLboolean apreq[] = { SL_BOOLEAN_TRUE };
|
||||
|
||||
if (dfpcm.samplesPerSec == 0) {
|
||||
Log_print("ERROR: Incorrect mixrate %d", snd_mixrate);
|
||||
return FALSE;
|
||||
}
|
||||
/* engine */
|
||||
CHECK_OSL( osl_slCreateEngine(&osl_engine, 0, NULL, 0, NULL, NULL), "create engine");
|
||||
CHECK_OSL( (*osl_engine)->Realize(osl_engine, SL_BOOLEAN_FALSE), "realize engine");
|
||||
CHECK_OSL( (*osl_engine)->GetInterface(osl_engine, *osl_SL_IID_ENGINE, &osl_engineif), "get engine i/f");
|
||||
|
||||
/* mixer */
|
||||
CHECK_OSL( (*osl_engineif)->CreateOutputMix(osl_engineif, &osl_mixer, 1, mixids, mixreq), "create mixer");
|
||||
CHECK_OSL( (*osl_mixer)->Realize(osl_mixer, SL_BOOLEAN_FALSE), "realize mixer");
|
||||
dlmix.outputMix = osl_mixer;
|
||||
|
||||
/* player */
|
||||
CHECK_OSL( (*osl_engineif)->CreateAudioPlayer(osl_engineif, &osl_player, &dsrc, &dsnk, 1, apids, apreq), "create player");
|
||||
CHECK_OSL( (*osl_player)->Realize(osl_player, SL_BOOLEAN_FALSE), "realize player");
|
||||
CHECK_OSL( (*osl_player)->GetInterface(osl_player, *osl_SL_IID_PLAY, &osl_playif), "get player i/f");
|
||||
CHECK_OSL( (*osl_player)->GetInterface(osl_player, *osl_SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &osl_bufqif), "get buffer queue i/f");
|
||||
|
||||
/* register callback */
|
||||
CHECK_OSL( (*osl_bufqif)->RegisterCallback(osl_bufqif, OSL_process, NULL), "register callback");
|
||||
|
||||
Log_print("OpenSL ES initialized successfully");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void OSL_stop_playback(void)
|
||||
{
|
||||
SLuint32 playstate;
|
||||
|
||||
(*osl_playif)->SetPlayState(osl_playif, SL_PLAYSTATE_STOPPED);
|
||||
Log_print("Waiting for OSL player to finish");
|
||||
do {
|
||||
usleep(50000);
|
||||
(*osl_playif)->GetPlayState(osl_playif, &playstate);
|
||||
} while (playstate != SL_PLAYSTATE_STOPPED);
|
||||
Log_print("Playback finished");
|
||||
}
|
||||
|
||||
static void OSL_teardown(void)
|
||||
{
|
||||
if (osl_playif) {
|
||||
OSL_stop_playback();
|
||||
(*osl_player)->Destroy(osl_player);
|
||||
osl_player = NULL;
|
||||
osl_playif = NULL;
|
||||
osl_bufqif = NULL;
|
||||
}
|
||||
|
||||
if (osl_mixer) {
|
||||
(*osl_mixer)->Destroy(osl_mixer);
|
||||
osl_mixer = NULL;
|
||||
}
|
||||
|
||||
if (osl_engine) {
|
||||
(*osl_engine)->Destroy(osl_engine);
|
||||
osl_engine = NULL;
|
||||
osl_engineif = NULL;
|
||||
}
|
||||
Log_print("OpenSL teardown complete");
|
||||
}
|
||||
|
||||
static void OSL_buf_free(void)
|
||||
{
|
||||
if (osl_soundbufptr) {
|
||||
free(osl_soundbufptr);
|
||||
osl_soundbufptr = NULL;
|
||||
}
|
||||
if (osl_soundbuf) {
|
||||
free(osl_soundbuf);
|
||||
osl_soundbuf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int OSL_buf_alloc(void)
|
||||
{
|
||||
UBYTE *ptr;
|
||||
int i;
|
||||
|
||||
if (osl_soundbuf || osl_soundbufptr) {
|
||||
Log_print("WARNING: Sound buffers already allocated. Freeing.");
|
||||
OSL_buf_free();
|
||||
}
|
||||
if (! ( osl_soundbufptr = (UBYTE **) malloc(osl_bufnum * sizeof(void *)) ) ) {
|
||||
Log_print("ERROR: Cannot allocate sound buffer pointers (%d)", osl_bufnum);
|
||||
return FALSE;
|
||||
}
|
||||
if (! ( osl_soundbuf = (UBYTE *) malloc(osl_bufnum * osl_bufszbytes) ) ) {
|
||||
Log_print("ERROR: Cannot allocate sound buffer for %d buffers of %d bytes each", osl_bufnum, osl_bufszbytes);
|
||||
return FALSE;
|
||||
}
|
||||
memset(osl_soundbuf, 0, osl_bufnum * osl_bufszbytes);
|
||||
for (ptr = osl_soundbuf, i = 0; i < osl_bufnum; i++, ptr += osl_bufszbytes)
|
||||
osl_soundbufptr[i] = ptr;
|
||||
|
||||
Log_print("Allocated OK sound buffer for %d buffers %dms each, %d bits at %dHz",
|
||||
osl_bufnum, OSL_BUFSIZE_MS, (at_sixteenbit) ? 16 : 8, snd_mixrate);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int OSL_start_playback(void)
|
||||
{
|
||||
SLresult res;
|
||||
int i;
|
||||
|
||||
Sound_Continue();
|
||||
|
||||
for (i = 0; i < osl_bufnum; i++) {
|
||||
if (! osl_bufqif) return FALSE;
|
||||
CHECK_OSL( (*osl_bufqif)->Enqueue(osl_bufqif, osl_soundbufptr[i], osl_bufszbytes), "enqueue init buffer");
|
||||
}
|
||||
|
||||
osl_nextbufindex = 0;
|
||||
osl_lastindex = osl_lastplayedindex = 0;
|
||||
|
||||
Log_print("Buffer queue bootstrap OK");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Platform interface. Used only with SL sound */
|
||||
|
||||
void Sound_Exit(void)
|
||||
{
|
||||
Log_print("Sound exit");
|
||||
|
||||
OSL_teardown();
|
||||
OSL_buf_free();
|
||||
if (osl_handle) {
|
||||
dlclose(osl_handle);
|
||||
osl_handle = NULL;
|
||||
}
|
||||
Android_osl_sound = FALSE;
|
||||
}
|
||||
|
||||
int Sound_Initialise(int *argc, char *argv[])
|
||||
{
|
||||
Android_osl_sound = TRUE;
|
||||
|
||||
if (
|
||||
osl_disable ||
|
||||
! OSL_load() ||
|
||||
! OSL_init() ||
|
||||
! OSL_buf_alloc() ||
|
||||
! OSL_start_playback()
|
||||
)
|
||||
{
|
||||
Android_osl_sound = FALSE;
|
||||
Sound_Exit();
|
||||
Log_print("Using legacy AudioThread");
|
||||
} else
|
||||
Log_print("Using OpenSL ES sound");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Sound_Update(void)
|
||||
{
|
||||
SLresult res;
|
||||
|
||||
while (osl_lastplayedindex < osl_lastindex) {
|
||||
if (! osl_soundbufptr) return;
|
||||
POKEYSND_Process(osl_soundbufptr[osl_nextbufindex], osl_bufszbytes >> at_sixteenbit);
|
||||
if (! osl_bufqif) return;
|
||||
res = (*osl_bufqif)->Enqueue(osl_bufqif, osl_soundbufptr[osl_nextbufindex], osl_bufszbytes);
|
||||
if (res != SL_RESULT_SUCCESS) {
|
||||
Log_print("Cannot enqueue buffer #%d (%08X)", osl_nextbufindex, res);
|
||||
return;
|
||||
}
|
||||
osl_nextbufindex = (osl_nextbufindex + 1) % osl_bufnum;
|
||||
osl_lastplayedindex++;
|
||||
}
|
||||
}
|
||||
|
||||
void Sound_Pause(void)
|
||||
{
|
||||
Log_print("OSL pausing sound");
|
||||
if (! osl_playif) return;
|
||||
(*osl_playif)->SetPlayState(osl_playif, SL_PLAYSTATE_PAUSED);
|
||||
}
|
||||
|
||||
void Sound_Continue(void)
|
||||
{
|
||||
Log_print("OSL resuming sound");
|
||||
if (! osl_playif) return;
|
||||
(*osl_playif)->SetPlayState(osl_playif, SL_PLAYSTATE_PLAYING);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-20
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user