This commit is contained in:
umjammer 2011-08-23 08:39:34 +00:00
commit a2139c12ea
22 changed files with 8109 additions and 0 deletions

118
appleii.txt Normal file
View File

@ -0,0 +1,118 @@
---- BD-J AppleII Emulator ----
Copyright (c) 2008 by umjammer
http://vavivavi.blogspot.com/
* ORIGINAL
AppleIIGo
http://www-personal.umich.edu/~mressl/appleiigo/
* LISENCE
GPL (AppleIIGo is GPL)
* TODO
.gz reader (why doesn't work???)
virtual keyboard (details)
* DONE
improve pad control
disk selection mode
virtual keyboard
.nib reader
* INSTALL
1. unpack bdjappleii-x.xx.rar
2. copy AVCHD directory into
(SD Card) /PRIVATE directory
(Memory Stick) / (ROOT) directory
(other USBz) i don't know... maybe / (ROOT) directory
3. copy APPLE2E.ROM into .../AVCHD directory
4. copy your .dsk image into .../AVCHD directory
5. modify .../AVCHD/appleii.properties
diskDrive1=your .dsk or .nib image
6. select AVCHD on your PS3 XMB Video Menu
* USAGE (SIXAXIS)
1. first you are in NORMAL MODE.
CIRCLE Right Pad Button
SQUARE Left Pad Button
UP Pad Up
DOWN Pad Down
LEFT Pad Left
RIGHT Pad Right
BLUE Button Goto VIRTUAL KEYBORD MODE
GREEN Button Restart
YELLOW Button Reset
2. VIRTUAL KEYBORD MODE
CIRCLE Push selected key
UP Key selection Up
DOWN Key selection Down
LEFT Key selection Left
RIGHT Key selection Right
BLUE Button Goto DISK DRIVE 1 MODE
GREEN Button Restart
3. DISK DRIVE 1 MODE
CIRCLE Select disk image
SQUARE Release disk image
UP Previous disk image
DOWN Next disk image
BLUE Button Goto DISK DRIVE 2 MODE
GREEN Button Restart
4. DISK DRIVE 2 MODE
CIRCLE Select disk image
SQUARE Release disk image
UP Previous disk image
DOWN Next disk image
BLUE Button Goto NORMAL MODE
GREEN Button Restart
* ROMz
http://apple2.org.za/gswv/a2zine/System/
ftp://ftp.apple.asimov.net/pub/apple_II/
* GAMEz
http://www.virtualapple.org/
* HISTORY
0.12 09-Oct-2008
improve pad control (i fogot keyReleased() method calling at base ;-P)
0.11 28-Sep-2008
source code more MVC separation
0.10 26-Sep-2008
virtual keyboard
add disk selection mode
.nib reader
0.00 15-Sep-2008
initial version

143
build.xml Normal file
View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="Windows-31J"?>
<!-- ////////////////////////////////////////////////////////////////////// -->
<!-- Copyright (c) 2008 by umjammer, All rights reserved. -->
<!-- -->
<!-- Written by umjammer -->
<!-- -->
<!-- BD-J Apple II -->
<!-- -->
<!-- @author umjammer -->
<!-- @version 0.00 080912 nsano initial version -->
<!-- -->
<!-- ////////////////////////////////////////////////////////////////////// -->
<project name="bdj Apple II" default="run" basedir=".">
<property file="local.properties" />
<property name="dir.build" value="build"/>
<property name="app.name" value="00000"/>
<property name="jar.name" value="${app.name}.jar"/>
<!-- class path definitions -->
<path id="project.class.path">
<fileset dir="${dir.bdj}/common">
<include name="*.jar" />
<include name="jmf/jmf.jar" />
<exclude name="javassist.jar" />
<exclude name="metouia.jar" />
<exclude name="nanoxml-2.2.3.jar" />
</fileset>
</path>
<path id="sign.class.path">
<fileset dir="${dir.sign}">
<include name="*.jar" />
</fileset>
</path>
<!-- target definitions -->
<!-- clean -->
<target name="clean" description="clear build enviroment">
<delete file="${jar.name}" failonerror="false" />
<delete dir="META-INF" failonerror="false" />
<delete dir="${dir.build}" failonerror="false" />
</target>
<!-- prepare -->
<target name="prepare" description="prepare build enviroment">
<mkdir dir="${dir.build}" />
</target>
<!-- javac -->
<target name="compile" depends="prepare" description="compile">
<javac debug="on"
destdir="${dir.build}"
source="1.3"
target="1.3"
deprecation="true">
<!--
<bootclasspath>
<pathelement location="${dir.bdj}/lib/basis.jar" />
</bootclasspath>
-->
<classpath refid="project.class.path" />
<src path="src/main/java" />
</javac>
</target>
<!-- jar -->
<target name="packaging" depends="compile" description="packaging">
<copy file="etc/bluray.MyXlet.perm" toFile="${dir.build}/${paem.file}" />
<copy toDir="${dir.build}">
<fileset dir="src/main/java">
<include name="**/*.properties" />
</fileset>
</copy>
<copy toDir="${dir.build}">
<fileset dir="src/main/resources" />
</copy>
<jar jarfile="${jar.name}">
<fileset dir="${dir.build}">
<exclude name="config" />
<exclude name="config/**/*" />
</fileset>
</jar>
</target>
<!-- sign -->
<target name="sign" depends="packaging" description="sign">
<java classname="net.java.bd.tools.security.BDSigner" fork="yes">
<classpath refid="sign.class.path" />
<arg line="-keystore ${dir.sign}/sig.ks" />
<arg value="${jar.name}" />
</java>
</target>
<!-- dist -->
<target name="dist" depends="sign" description="distribution">
<java jar="${dir.bdj}/common/hdcookbook/bdjo.jar" fork="yes">
<arg value="etc/bdjo.xml" />
<arg value="00000.bdjo" />
</java>
</target>
<!-- run -->
<target name="run" depends="" description="test">
<copy todir="${dir.build}">
<fileset dir="etc" >
<include name="config/**/*" />
</fileset>
</copy>
<copy toDir="${dir.bdj}/common">
<fileset dir="src/main/resources" />
<fileset dir="${dir.build}">
<include name="**/*.properties" />
</fileset>
</copy>
<java jar="${dir.bdj}/common/xletview.jar" fork="yes">
<!--
<jvmarg value="-Xprof"/>
-->
<jvmarg value="-Djava.ext.dirs=${dir.bdj}/common"/>
<classpath>
<pathelement location="${dir.build}" />
<path refid="project.class.path" />
</classpath>
<arg line="-xletPath ${dir.build}" />
<arg line="-xletClass vavi.apps.appleii.AppleIIApp" />
</java>
</target>
</project>
<!-- -->

43
etc/bdjo.xml Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bdjo>
<appCacheInfo>
<entries>
<language>*.*</language>
<name>00000</name>
<type>1</type>
</entries>
</appCacheInfo>
<applicationManagementTable>
<applications>
<applicationDescriptor>
<baseDirectory>00000</baseDirectory>
<binding>TITLE_BOUND_DISC_BOUND</binding>
<classpathExtension>/00000</classpathExtension>
<iconFlags>0x0</iconFlags>
<iconLocator></iconLocator>
<initialClassName>vavi.apps.appleii.AppleIIApp</initialClassName>
<priority>1</priority>
<profiles>
<majorVersion>1</majorVersion>
<microVersion>0</microVersion>
<minorVersion>0</minorVersion>
<profile>1</profile>
</profiles>
<visibility>V_11</visibility>
</applicationDescriptor>
<applicationId>0x4000</applicationId>
<controlCode>0x1</controlCode>
<organizationId>0x56789abc</organizationId>
<type>0x1</type>
</applications>
</applicationManagementTable>
<fileAccessInfo>.</fileAccessInfo>
<keyInterestTable>0xffe00000</keyInterestTable>
<terminalInfo>
<defaultFontFile>00000</defaultFontFile>
<initialHaviConfig>QHD_960_540</initialHaviConfig>
<menuCallMask>false</menuCallMask>
<titleSearchMask>false</titleSearchMask>
</terminalInfo>
<version>V_0200</version>
</bdjo>

12
etc/bluray.MyXlet.perm Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<n:permissionrequestfile xmlns:n="urn:BDA:bdmv;PRF" orgid="0x56789abc" appid="0x4000">
<file value="true"></file>
<applifecyclecontrol value="true"></applifecyclecontrol>
<servicesel value="true"></servicesel>
<userpreferences read="true" write="true"></userpreferences>
<bd-vfs value="true"></bd-vfs>
<network>
<host action="connect,resolve,listen">*</host>
</network>
<bd-bindingunitarea value="true" />
</n:permissionrequestfile>

28
etc/config/settings.txt Normal file
View File

@ -0,0 +1,28 @@
#Mind that paths can not contain backslash
#Make sure there are no spaces after the values
console.font=Helvetica
console.fontsize=10
console.height=200
console.show=true
console.width=500
console.x=0
console.y=0
extra.classpath=
file.applications=config/applications.xml
file.defaultbg=config/defaultbg.jpg
file.settings=config/settings.txt
font.sizeoffset=-2
path.config=config
remote.show=true
safearea.color=#ffee00
safearea.height=556
safearea.show=true
safearea.width=700
safearea.x=10
safearea.y=10
tv.center=true
tv.screenheight=576
tv.screenwidth=720
tv.x=0
tv.y=0

339
etc/gpl-2.0.txt Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, 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 Lesser 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 Street, 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 Lesser General
Public License instead of this License.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,369 @@
/*
* AppleIIGo
* The Java Apple II Emulator
* (C) 2006 by Marc S. Ressl(ressl@lonetree.com)
* Released under the GPL
*/
package vavi.apps.appleii;
/**
* AppleIIGo class<p>
* Connects EmAppleII, AppleCanvas
*/
public class AppleIIGo {
// Class instances
private EmAppleII apple;
private AppleDisplay display;
// private AppleSpeaker speaker;
private DiskII disk;
// Machine variables
private boolean isCpuPaused;
private boolean isCpuDebugEnabled;
/** */
public boolean isCpuDebugEnabled() {
return isCpuDebugEnabled;
}
// Keyboard variables
private boolean keyboardUppercaseOnly;
// Paddle variables
private boolean isPaddleInverted;
// Disk variables
private String diskDriveResource[] = new String[2];
public String getDiskDriveResource(int drive) {
return diskDriveResource[drive];
}
private boolean diskWritable;
/** */
public interface View {
/** */
void repaint();
/** */
Object getCharSet(int[] buffer, int w, int h, int s);
/** */
void flushCharSet(Object resource);
/** */
void setDisplayScaledSizeX(int w);
/** */
void setDisplayScaledSizeY(int h);
/** */
void debug(Throwable t);
/** */
void debug(String s);
}
/** */
public void setView(View view) {
this.view = view;
}
/** */
private View view;
/** */
public interface Dao {
/** */
String getParameter(String parameter);
/** */
void openInputStream(String resource);
/** */
void read(byte[] bytes, int offset, int length);
/** */
void closeInputStream();
}
/** */
public void setDao(Dao dao) {
this.dao = dao;
}
/** */
private Dao dao;
public void setKeyLatch(int key) {
if (key < 128) {
if (keyboardUppercaseOnly && (key >= 97) && (key <= 122)) {
key -= 32;
}
apple.setKeyLatch(key);
}
}
public void setButton(int button, boolean flag) {
apple.paddle.setButton(button, flag);
}
/** for key */
public void setPaddle(int paddle, int value) {
apple.paddle.setPaddlePos(paddle, value);
}
/** for mouse */
public void setPaddlePos(int x, int y) {
if (isPaddleInverted) {
apple.paddle.setPaddlePos(0, (int) (display.getScale() * (255 - y * 256 / 192)));
apple.paddle.setPaddlePos(1, (int) (display.getScale() * (255 - x * 256 / 280)));
} else {
apple.paddle.setPaddlePos(0, (int) (x * display.getScale() * 256 / 280));
apple.paddle.setPaddlePos(1, (int) (y * display.getScale() * 256 / 192));
}
}
public void setVolume(boolean up) {
// speaker.setVolume(speaker.getVolume() + (up ? 1 : -1));
}
public void toggleStatMode() {
setStatMode(!isStatMode);
}
public void toggleStepMode() {
apple.setStepMode(!apple.getStepMode());
}
public void stepInstructions(int step) {
apple.setStepMode(apple.getStepMode());
apple.stepInstructions(step);
}
public int[] getDisplayImageBuffer() {
return display.getDisplayImageBuffer();
}
public boolean isPaused() {
return display.isPaused();
}
private boolean isGlare;
private boolean isStatMode;
/**
* Set glare
*/
public void setGlare(boolean value) {
isGlare = value;
display.requestRefresh();
}
/**
* Get glare
*/
public boolean isGlare() {
return isGlare;
}
/**
* Set stat mode
*/
public void setStatMode(boolean value) {
isStatMode = value;
display.requestRefresh();
}
/**
* Get stat mode
*/
public boolean isStatMode() {
return isStatMode;
}
public String getStatInfo() {
StringBuffer statInfo = new StringBuffer();
statInfo.append(apple.getStatInfo()).append("\n").append(display.getStatInfo());
return statInfo.toString();
}
/**
* Parameters
*/
private String getParameter(String parameter, String defaultValue) {
String value = dao.getParameter(parameter);
if ((value == null) || (value.length() == 0)) {
return defaultValue;
}
return value;
}
/**
* On applet initialization
*/
public void init() {
System.err.println("init()");
// Activate listeners
// Initialize Apple II emulator
apple = new EmAppleII(view);
loadRom(getParameter("cpuRom", ""));
apple.setCpuSpeed(new Integer(getParameter("cpuSpeed", "1000")).intValue());
isCpuPaused = getParameter("cpuPaused", "false").equals("true");
isCpuDebugEnabled = getParameter("cpuDebugEnabled", "false").equals("true");
apple.setStepMode(getParameter("cpuStepMode", "false").equals("true"));
// Keyboard
keyboardUppercaseOnly = getParameter("keyboardUppercaseOnly", "true").equals("true");
// Display
display = new AppleDisplay(apple);
display.setScale(new Float(getParameter("displayScale", "1")).floatValue());
display.setRefreshRate(new Integer(getParameter("displayRefreshRate", "10")).intValue());
display.setColorMode(new Integer(getParameter("displayColorMode", "0")).intValue());
setStatMode(getParameter("displayStatMode", "false").equals("true"));
setGlare(getParameter("displayGlare", "false").equals("true"));
// Speaker
// speaker = new AppleSpeaker(apple);
// speaker.setVolume(new Integer(getAppletParameter("speakerVolume", "3")).intValue());
// Peripherals
disk = new DiskII();
apple.setPeripheral(disk, 6);
// Initialize disk drives
diskWritable = getParameter("diskWritable", "false").equals("true");
mountDisk(0, getParameter("diskDrive1", ""));
mountDisk(1, getParameter("diskDrive2", ""));
}
public void start() {
// Start CPU
if (!isCpuPaused) {
resume();
}
}
/**
* On applet destruction
*/
public void destroy() {
System.err.println("destroy()");
unmountDisk(0);
unmountDisk(1);
}
/**
* Pause emulator
*/
public void pause() {
System.err.println("pause()");
isCpuPaused = true;
apple.setPaused(isCpuPaused);
display.setPaused(isCpuPaused);
// speaker.setPaused(isCpuPaused);
}
/**
* Resume emulator
*/
public void resume() {
System.err.println("resume()");
isCpuPaused = false;
// speaker.setPaused(isCpuPaused);
display.setPaused(isCpuPaused);
apple.setPaused(isCpuPaused);
}
/**
* Restarts emulator
*/
public void restart() {
System.err.println("restart()");
apple.restart();
}
/**
* Resets emulator
*/
public void reset() {
System.err.println("reset()");
apple.reset();
}
/**
* Load ROM
*/
public void loadRom(String resource) {
System.err.println("loadRom(resource: " + resource + ")");
apple.loadRom(dao, resource);
}
/**
* Mount a disk
*/
public boolean mountDisk(int drive, String resource) {
System.err.println("mountDisk(drive: " + drive + ", resource: " + resource + ")");
if ((drive < 0) || (drive > 2)) {
return false;
}
try {
unmountDisk(drive);
diskDriveResource[drive] = resource;
System.err.println("mount: dirve: " + drive + ", " + resource);
disk.readDisk(dao, drive, resource, 254, false);
return true;
} catch (Throwable e) {
if (e instanceof IllegalStateException) {
System.err.println("mount: drive: " + drive + ": no disk");
} else {
e.printStackTrace(System.err);
}
return false;
}
}
/**
* Unmount a disk
*/
public void unmountDisk(int drive) {
System.err.println("unmount: drive: " + drive);
if ((drive < 0) || (drive > 2)) {
return;
}
if (!diskWritable) {
System.err.println("unmount: drive: " + drive + ", not writable");
return;
}
try {
disk.writeDisk(drive, diskDriveResource[drive]);
} catch (Throwable e) {
if (e instanceof NullPointerException) {
System.err.println("unmount: drive: " + drive + ": no disk");
} else {
e.printStackTrace(System.err);
}
}
}
/**
* Set color mode
*/
public void setColorMode(int value) {
System.err.println("setColorMode(value: " + value + ")");
display.setColorMode(value);
}
/**
* Get disk activity
*/
public boolean getDiskActivity() {
return (!isCpuPaused && disk.isMotorOn());
}
}
/* */

View File

@ -0,0 +1,519 @@
/*
* AppleIIGo
* Disk II Emulator
* (C) 2006 by Marc S. Ressl(ressl@lonetree.com)
* Released under the GPL
* Based on work by Doug Kwan
*/
package vavi.apps.appleii;
public class DiskII extends Peripheral {
// ROM (with boot wait cycle optimization)
private static final int[] rom = {
0xa2, 0x20, 0xa0, 0x00, 0xa2, 0x03, 0x86, 0x3c, 0x8a, 0x0a, 0x24, 0x3c, 0xf0, 0x10, 0x05, 0x3c,
0x49, 0xff, 0x29, 0x7e, 0xb0, 0x08, 0x4a, 0xd0, 0xfb, 0x98, 0x9d, 0x56, 0x03, 0xc8, 0xe8, 0x10,
0xe5, 0x20, 0x58, 0xff, 0xba, 0xbd, 0x00, 0x01, 0x0a, 0x0a, 0x0a, 0x0a, 0x85, 0x2b, 0xaa, 0xbd,
0x8e, 0xc0, 0xbd, 0x8c, 0xc0, 0xbd, 0x8a, 0xc0, 0xbd, 0x89, 0xc0, 0xa0, 0x50, 0xbd, 0x80, 0xc0,
0x98, 0x29, 0x03, 0x0a, 0x05, 0x2b, 0xaa, 0xbd, 0x81, 0xc0, 0xa9, 0x56, 0xa9, 0x00, 0xea, 0x88,
0x10, 0xeb, 0x85, 0x26, 0x85, 0x3d, 0x85, 0x41, 0xa9, 0x08, 0x85, 0x27, 0x18, 0x08, 0xbd, 0x8c,
0xc0, 0x10, 0xfb, 0x49, 0xd5, 0xd0, 0xf7, 0xbd, 0x8c, 0xc0, 0x10, 0xfb, 0xc9, 0xaa, 0xd0, 0xf3,
0xea, 0xbd, 0x8c, 0xc0, 0x10, 0xfb, 0xc9, 0x96, 0xf0, 0x09, 0x28, 0x90, 0xdf, 0x49, 0xad, 0xf0,
0x25, 0xd0, 0xd9, 0xa0, 0x03, 0x85, 0x40, 0xbd, 0x8c, 0xc0, 0x10, 0xfb, 0x2a, 0x85, 0x3c, 0xbd,
0x8c, 0xc0, 0x10, 0xfb, 0x25, 0x3c, 0x88, 0xd0, 0xec, 0x28, 0xc5, 0x3d, 0xd0, 0xbe, 0xa5, 0x40,
0xc5, 0x41, 0xd0, 0xb8, 0xb0, 0xb7, 0xa0, 0x56, 0x84, 0x3c, 0xbc, 0x8c, 0xc0, 0x10, 0xfb, 0x59,
0xd6, 0x02, 0xa4, 0x3c, 0x88, 0x99, 0x00, 0x03, 0xd0, 0xee, 0x84, 0x3c, 0xbc, 0x8c, 0xc0, 0x10,
0xfb, 0x59, 0xd6, 0x02, 0xa4, 0x3c, 0x91, 0x26, 0xc8, 0xd0, 0xef, 0xbc, 0x8c, 0xc0, 0x10, 0xfb,
0x59, 0xd6, 0x02, 0xd0, 0x87, 0xa0, 0x00, 0xa2, 0x56, 0xca, 0x30, 0xfb, 0xb1, 0x26, 0x5e, 0x00,
0x03, 0x2a, 0x5e, 0x00, 0x03, 0x2a, 0x91, 0x26, 0xc8, 0xd0, 0xee, 0xe6, 0x27, 0xe6, 0x3d, 0xa5,
0x3d, 0xcd, 0x00, 0x08, 0xa6, 0x2b, 0x90, 0xdb, 0x4c, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
};
// Constants
private static final int NUM_DRIVES = 2;
private static final int DOS_NUM_SECTORS = 16;
private static final int DOS_NUM_TRACKS = 35;
private static final int DOS_TRACK_BYTES = 256 * DOS_NUM_SECTORS;
private static final int RAW_TRACK_BYTES = 6656; // TODO 6250 ???
// Disk II direct access variables
private int drive = 0;
private boolean isMotorOn = false;
private byte[][][] disk = new byte[NUM_DRIVES][DOS_NUM_TRACKS][];
private boolean[] isWriteProtected = new boolean[NUM_DRIVES];
private int currPhysTrack;
private int currNibble;
// Caches
private int[] driveCurrPhysTrack = new int[NUM_DRIVES];
private byte[] realTrack;
/*
* Disk II emulation:
*
* C0xD, C0xE -> Read write protect
* C0xE, C0xC -> Read data from disk
* Write data to disk -> C0xF, C0xC
* Write data to disk -> C0xD, C0xC
*
* We use 'fast mode', i.e. no 65(C)02 clock reference
* We use simplified track handling (only adjacent phases)
*/
// Internal registers
private int latchAddress;
private int latchData;
private boolean writeMode;
// GCR encoding and decoding tables
private static final int[] gcrEncodingTable = {
0x96, 0x97, 0x9a, 0x9b, 0x9d, 0x9e, 0x9f, 0xa6,
0xa7, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb2, 0xb3,
0xb4, 0xb5, 0xb6, 0xb7, 0xb9, 0xba, 0xbb, 0xbc,
0xbd, 0xbe, 0xbf, 0xcb, 0xcd, 0xce, 0xcf, 0xd3,
0xd6, 0xd7, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde,
0xdf, 0xe5, 0xe6, 0xe7, 0xe9, 0xea, 0xeb, 0xec,
0xed, 0xee, 0xef, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6,
0xf7, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
// private int[] gcrDecodingTable = new int[256];
private int[] gcrSwapBit = {0, 2, 1, 3};
private int[] gcrBuffer = new int[256];
private int[] gcrBuffer2 = new int[86];
// Physical sector to DOS 3.3 logical sector table
private static final int[] gcrLogicalSector = {
0x0, 0x7, 0xe, 0x6, 0xd, 0x5, 0xc, 0x4,
0xb, 0x3, 0xa, 0x2, 0x9, 0x1, 0x8, 0xf
};
// Temporary variables for conversion
private byte[] gcrNibbles = new byte[RAW_TRACK_BYTES];
private int gcrNibblesPos;
/**
* Constructor
*/
public DiskII() {
readDisk(null, 0, null, 254, false);
readDisk(null, 1, null, 254, false);
}
/**
* I/O read
*
* @param address Address
*/
public int ioRead(int address) {
int phase;
switch (address & 0xf) {
case 0x0:
case 0x2:
case 0x4:
case 0x6:
// Q0, Q1, Q2, Q3 off
break;
case 0x1:
// Q0 on
phase = currPhysTrack & 3;
if (phase == 1) {
if (currPhysTrack > 0) {
currPhysTrack--;
}
} else if (phase == 3) {
if (currPhysTrack < ((2 * DOS_NUM_TRACKS) - 1)) {
currPhysTrack++;
}
}
realTrack = disk[drive][currPhysTrack >> 1];
break;
case 0x3:
// Q1 on
phase = currPhysTrack & 3;
if (phase == 2) {
if (currPhysTrack > 0) {
currPhysTrack--;
}
} else if (phase == 0) {
if (currPhysTrack < ((2 * DOS_NUM_TRACKS) - 1)) {
currPhysTrack++;
}
}
realTrack = disk[drive][currPhysTrack >> 1];
break;
case 0x5:
// Q2 on
phase = currPhysTrack & 3;
if (phase == 3) {
if (currPhysTrack > 0) {
currPhysTrack--;
}
} else if (phase == 1) {
if (currPhysTrack < ((2 * DOS_NUM_TRACKS) - 1)) {
currPhysTrack++;
}
}
realTrack = disk[drive][currPhysTrack >> 1];
break;
case 0x7:
// Q3 on
phase = currPhysTrack & 3;
if (phase == 0) {
if (currPhysTrack > 0) {
currPhysTrack--;
}
} else if (phase == 2) {
if (currPhysTrack < ((2 * DOS_NUM_TRACKS) - 1)) {
currPhysTrack++;
}
}
realTrack = disk[drive][currPhysTrack >> 1];
break;
case 0x8:
// Motor off
isMotorOn = false;
break;
case 0x9:
// Motor on
isMotorOn = true;
break;
case 0xa:
// Drive 1
driveCurrPhysTrack[drive] = currPhysTrack;
drive = 0;
currPhysTrack = driveCurrPhysTrack[drive];
realTrack = disk[drive][currPhysTrack >> 1];
break;
case 0xb:
// Drive 2
driveCurrPhysTrack[drive] = currPhysTrack;
drive = 1;
currPhysTrack = driveCurrPhysTrack[drive];
realTrack = disk[drive][currPhysTrack >> 1];
break;
case 0xc:
return ioLatchC();
case 0xd:
ioLatchD(0xff);
break;
case 0xe:
return ioLatchE();
case 0xf:
ioLatchF(0xff);
break;
}
return rand.nextInt(256);
}
/**
* I/O write
*
* @param address Address
*/
public void ioWrite(int address, int value) {
switch (address & 0xf) {
case 0x0:
case 0x1:
case 0x2:
case 0x3:
case 0x4:
case 0x5:
case 0x6:
case 0x7:
case 0x8:
case 0x9:
case 0xa:
case 0xb:
ioRead(address);
break;
case 0xc:
ioLatchC();
break;
case 0xd:
ioLatchD(value);
break;
case 0xe:
ioLatchE();
break;
case 0xf:
ioLatchF(value);
break;
}
}
/**
* Memory read
*
* @param address Address
*/
public int memoryRead(int address) {
return rom[address & 0xff];
}
/**
* Reset peripheral
*/
public void reset() {
ioRead(0x8);
}
/**
* Loads a disk
*
* @param resource filename
* @param drive Disk II drive
* @throws IllegalStateException
*/
public void readDisk(AppleIIGo.Dao dao, int drive, String resource, int volume, boolean isWriteProtected) {
byte[] track = new byte[RAW_TRACK_BYTES];
boolean isNib = false;
if (resource != null) {
dao.openInputStream(resource);
if (resource.toLowerCase().endsWith(".nib")) {
System.err.println("DRIVE[" + drive + "]: NIB");
isNib = true;
} else {
System.err.println("DRIVE[" + drive + "]: DSK");
}
}
for (int trackNum = 0; trackNum < DOS_NUM_TRACKS; trackNum++) {
disk[drive][trackNum] = new byte[RAW_TRACK_BYTES];
if (resource != null) {
if (isNib) {
dao.read(disk[drive][trackNum], 0, RAW_TRACK_BYTES);
} else {
dao.read(track, 0, DOS_TRACK_BYTES);
trackToNibbles(track, disk[drive][trackNum], volume, trackNum);
}
}
}
if (resource != null) {
dao.closeInputStream();
}
this.realTrack = disk[drive][currPhysTrack >> 1];
this.isWriteProtected[drive] = isWriteProtected;
}
/**
* Writes a disk
*
* @param resource filename
* @param drive Disk II drive
*/
public void writeDisk(int drive, String resource) {
}
/**
* Motor on indicator
*/
public boolean isMotorOn() {
return isMotorOn;
}
/**
* I/O read Latch C
*
* @param address Address
*/
private int ioLatchC() {
if (writeMode) {
// Write data: C0xD, C0xC
realTrack[currNibble] = (byte) latchData;
} else {
// Read data: C0xE, C0xC
latchData = (realTrack[currNibble] & 0xff);
}
currNibble++;
if (currNibble >= RAW_TRACK_BYTES) {
currNibble = 0;
}
latchAddress = 0xc;
return latchData;
}
/**
* I/O write Latch D
*
* @param address Address
*/
private void ioLatchD(int value) {
// Prepare write
writeMode = true;
latchData = value;
latchAddress = 0xd;
}
/**
* I/O read Latch E
*
* @param address Address
*/
private int ioLatchE() {
// Read write-protect: C0xD, C0xE
if (latchAddress == 0xd) {
latchAddress = 0xe;
return isWriteProtected[drive] ? 0x80 : 0x00;
}
writeMode = false;
latchAddress = 0xe;
return 0x3c;
}
/**
* I/O write Latch F
*
* @param address Address
*/
private void ioLatchF(int value) {
// Prepare write
writeMode = true;
latchData = value;
latchAddress = 0xf;
}
/*
* TRACK CONVERSION ROUTINES
*/
/**
* Writes a nibble
*
* @param value Value
*/
private final void gcrWriteNibble(int value) {
gcrNibbles[gcrNibblesPos] = (byte) value;
gcrNibblesPos++;
}
/**
* Writes sync bits
*
* @param length Number of bits
*/
private final void writeSync(int length) {
while(length > 0) {
length--;
gcrWriteNibble(0xff);
}
}
/**
* Write an FM encoded value, used in writing address fields
*
* @param value Value
*/
private final void encode44(int value) {
gcrWriteNibble((value >> 1) | 0xaa);
gcrWriteNibble(value | 0xaa);
}
/**
* Encode in 6:2
*
* @param track Sectorized track data
* @param offset Offset in this data
*/
private void encode62(byte[] track, int offset) {
// 86 * 3 = 258, so the first two byte are encoded twice
gcrBuffer2[0] = gcrSwapBit[track[offset + 1] & 0x03];
gcrBuffer2[1] = gcrSwapBit[track[offset] & 0x03];
// Save higher 6 bits in gcrBuffer and lower 2 bits in gcrBuffer2
for(int i = 255, j = 2; i >= 0; i--, j = j == 85 ? 0: j + 1) {
gcrBuffer2[j] = ((gcrBuffer2[j] << 2) | gcrSwapBit[track[offset + i] & 0x03]);
gcrBuffer[i] = (track[offset + i] & 0xff) >> 2;
}
// Clear off higher 2 bits of GCR_buffer2 set in the last call
for(int i = 0; i < 86; i++) {
gcrBuffer2[i] &= 0x3f;
}
}
/**
* Write address field
*
* @param track Sectorized track data
* @param offset Offset in this data
*/
private final void writeAddressField(int volumeNum, int trackNum, int sectorNum) {
// Write address mark
gcrWriteNibble(0xd5);
gcrWriteNibble(0xaa);
gcrWriteNibble(0x96);
// Write volume, trackNum, sector & checksum
encode44(volumeNum);
encode44(trackNum);
encode44(sectorNum);
encode44(volumeNum ^ trackNum ^ sectorNum);
// Write epilogue
gcrWriteNibble(0xde);
gcrWriteNibble(0xaa);
gcrWriteNibble(0xeb);
}
/**
* Write data field
*/
private void writeDataField() {
int last = 0;
int checksum;
// Write prologue
gcrWriteNibble(0xd5);
gcrWriteNibble(0xaa);
gcrWriteNibble(0xad);
// Write GCR encoded data
for (int i = 0x55; i >= 0; i--) {
checksum = last ^ gcrBuffer2[i];
gcrWriteNibble(gcrEncodingTable[checksum]);
last = gcrBuffer2[i];
}
for (int i = 0; i < 256; i++) {
checksum = last ^ gcrBuffer[i];
gcrWriteNibble(gcrEncodingTable[checksum]);
last = gcrBuffer[i];
}
// Write checksum
gcrWriteNibble(gcrEncodingTable[last]);
// Write epilogue
gcrWriteNibble(0xde);
gcrWriteNibble(0xaa);
gcrWriteNibble(0xeb);
}
/**
* Converts a track to nibbles
*/
private void trackToNibbles(byte[] track, byte[] nibbles, int volumeNum, int trackNum) {
this.gcrNibbles = nibbles;
gcrNibblesPos = 0;
for (int sectorNum = 0; sectorNum < DOS_NUM_SECTORS; sectorNum++) {
encode62(track, gcrLogicalSector[sectorNum] << 8);
writeSync(12);
writeAddressField(volumeNum, trackNum, sectorNum);
writeSync(8);
writeDataField();
}
writeSync(RAW_TRACK_BYTES - gcrNibblesPos);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,102 @@
/*
* AppleIIGo
* Apple II Emulator for J2ME
* (C) 2006 by Marc S. Ressl(ressl@lonetree.com)
* Released under the GPL
*/
package vavi.apps.appleii;
public class Paddle {
// Public variables
public static final int PADDLE_LOW = 0;
public static final int PADDLE_CENTER = 127;
public static final int PADDLE_HIGH = 255;
public static final int PADDLEMODE_DIRECT = 0;
public static final int PADDLEMODE_FILTERED = 1;
// Instances of other classes
private EmAppleII apple;
// Button variables
private int[] buttonRegister = new int[4];
// Paddle variables
// private int paddleMode;
private int[] paddleClockEvent = new int[4];
private int[] paddleClockInc = new int[4];
/**
* Paddle class constructor
*
* @param apple The EmAppleII instance
*/
public Paddle(EmAppleII apple) {
this.apple = apple;
setPaddlePos(0, PADDLE_CENTER);
setPaddlePos(1, PADDLE_CENTER);
setPaddlePos(2, PADDLE_CENTER);
setPaddlePos(3, PADDLE_CENTER);
}
/**
* Set button state
*
* @param button Paddle button
* @param state State
*/
public void setButton(int button, boolean pressed) {
buttonRegister[button] = (pressed ? 0x80 : 0x00);
}
/**
* Button register
*
* @param button Paddle button
*/
public int getButtonRegister(int button) {
return buttonRegister[button];
}
/**
* Set paddle position
*
* @param address Address
* @param value Value
*/
public void setPaddlePos(int paddle, int value) {
/*
* Magic formula, see ROM $FB1E-$FB2E,
* We calculate the numbers of cycles after which
* the RC circuit of a triggered paddle will discharge.
*/
paddleClockInc[paddle] = value * 11 + 8;
}
/**
* Trigger paddle register
*
* @param address Address
* @param value Value
*/
public void triggerRegister() {
paddleClockEvent[0] = apple.clock + paddleClockInc[0];
paddleClockEvent[1] = apple.clock + paddleClockInc[1];
paddleClockEvent[2] = apple.clock + paddleClockInc[2];
paddleClockEvent[3] = apple.clock + paddleClockInc[3];
}
/**
* Get paddle register
*
* @param address Address
* @param value Value
*/
public int getPaddleRegister(int paddle) {
return ((((paddleClockEvent[paddle] - apple.clock) & 0x7fffffff) < 0x40000000) ? 0x80 : 0x00);
}
}

View File

@ -0,0 +1,36 @@
/*
* AppleIIGo
* Slot interface
* (C) 2006 by Marc S. Ressl(ressl@lonetree.com)
* Released under the GPL
* Based on work by Steven E. Hugg
*/
package vavi.apps.appleii;
import java.util.Random;
public class Peripheral {
protected Random rand = new Random();
public Peripheral() {
}
public int ioRead(int address) {
return rand.nextInt(256);
}
public void ioWrite(int address, int value) {
}
public int memoryRead(int address) {
return 0;
}
public void memoryWrite(int address, int value) {
}
public void reset() {
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
src/main/resources/disk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,783 @@
/*
* $LastChangedDate: 2005-11-21 02:11:20 +0900 (ì? 21 11 2005) $
*
* Copyright 1990-2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package vavi.apps.appleii;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
/**
* This is a popup layer that handles a sub-popup within the text tfContext
*
* @author Amir Uval
*/
class VirtualKeyboard {
/** indicates whether the virtual keyboard is enabled */
public static boolean USE_VIRTUAL_KEYBOARD = true;
/** indicates whether the virtual keypad is enabled */
public static final boolean USE_VIRTUAL_KEYPAD = false;
/** indicates whether the virtual keyboard is opened automatically */
public static boolean USE_VIRTUAL_KEYBOARD_OPEN_AUTO = false;
/** instance of the virtual keyboard listener */
VirtualKeyboardListener vkl;
// keyboard dimensions
int kbX;
int kbY;
int kbWidth;
int kbHeight;
int fontW; // width of 'M'
int fontH; // height of 'M'
int buttonW; // width of keyboard
int buttonH; // height of keyboard
int fontWCenter; // placement of text inside button
int fontHTop; // placement of text inside button
int maxRows; // horizontal keyboard rows
int maxColumns; // vertical keyboard columns
int fullColumns; // number of columns that are completely full with keys
int currentChar = 0;
int currentKeyboard = 1; // abc
int textfieldHeight = 0; // height of text field area, including adornments
int candidateFieldHeight = 0; // height of candidate input field
char itemIndexWhenPressed;
char PRESS_OUT_OF_BOUNDS = 0;
/** array of all available keys n the keyboard */
char[][] keys;
boolean inMetaKeys = false; // traversal mode
boolean inShift = false;
int currentMeta = 0;
Image[] metaKeys = null;
boolean textKbd = false;
Font f;
static final int PRESSED = 0;
static final int RELEASED = 1;
/**
* Virtual Keyboard constructor.
*
* @param keys array of available keys for the keyboard
* @param vkl the virtual keyboard listener
* @param displayTextArea flag to indicate whether to display the text area
*/
public VirtualKeyboard(char[][] keys,
VirtualKeyboardListener vkl,
boolean displayTextArea,
int neededColumns,
int neededRows) throws VirtualKeyboardException {
textKbd = displayTextArea;
if (textKbd) {
PADDING = 1;
} else {
PADDING = 2;
}
currentKeyboard = 0;
this.vkl = vkl;
kbX = PADDING;
kbY = PADDING;
kbWidth = vkl.getAvailableWidth() - 2 * PADDING;
kbHeight = vkl.getAvailableHeight() - 2 * PADDING;
// f = Font.getFont(Font.MONOSPACED, // or SYSTEM
// Font.PLAIN,
// 36);
fontW = 36;// f.charWidth('M');
fontH = 36;// f.getHeight();
if (textKbd) {
textfieldHeight = fontH + 8 * PADDING;
buttonW = fontW + 8;
buttonH = fontH + 8;
fontHTop = (buttonH - fontH) / 2;
fontWCenter = buttonW / 2;
} else {
buttonW = fontW * 3;
buttonH = fontH * 3;
fontHTop = (buttonH - fontH) / 2;
fontWCenter = buttonW / 2;
}
candidateFieldHeight = 0;
maxRows = (kbHeight - PADDING) / (buttonH + PADDING);
if (textKbd) {
if (neededColumns == 0) {
maxColumns = (kbWidth - PADDING) / (buttonW + PADDING);
} else {
maxColumns = neededColumns;
}
kbWidth = maxColumns * (buttonW + PADDING) + PADDING + 1;
kbX = (vkl.getAvailableWidth() - kbWidth) / 2;
} else {
maxColumns = 7; // verify
kbWidth = maxColumns * (buttonW + PADDING) + PADDING + 1;
kbX = 0;
}
if (neededRows == 0) {
int tmpMax = 0; // will hold the longest keyboard.
for (int i = 0; i < keys.length; i++) {
if (tmpMax < keys[i].length)
tmpMax = keys[i].length;
}
neededRows = (tmpMax + maxColumns - 1) / maxColumns;
}
if (neededRows > maxRows) {
System.err.println("Keys list is too long for this size of screen.");
System.err.println("Please split your keyboard array to multiple arrays.");
// System.exit(0);
throw new VirtualKeyboardException("Keys list is too long for this size of screen.");
}
maxRows = neededRows;
int neededHeight = 0;
// do not require to account for meta keys for a canvas keyboard-hk
if (textKbd) {
neededHeight = maxRows * (buttonH + PADDING) + 4 * PADDING + // between the keys and the meta keys
IMAGE_SIZE + META_PADDING * 4 + textfieldHeight + candidateFieldHeight;
kbY = kbHeight - neededHeight - 4 * PADDING;
kbHeight = neededHeight;
} else {
neededHeight = maxRows * (buttonH + PADDING) + 3 * PADDING + textfieldHeight;
kbY = vkl.getAvailableHeight() - neededHeight;
kbHeight = neededHeight;
}
this.keys = keys;
if (textKbd)
currentKeyboard = 1; // lower case
else
currentKeyboard = 0;
fullColumns = keys[currentKeyboard].length / maxColumns;
// need not be displayed in the canvas mode
if (displayTextArea) { // hk
metaKeys = new Image[7];
metaKeys[OK_META_KEY] = createImage("/ok.png");
metaKeys[CANCEL_META_KEY] = createImage("/cancel.png");
metaKeys[BACKSPACE_META_KEY] = createImage("/backspace.png");
metaKeys[SHIFT_META_KEY] = createImage("/shift.png");
metaKeys[CAPS_META_KEY] = createImage("/caps.png");
metaKeys[MODE_META_KEY] = createImage("/mode.png");
// metaKeys[CNINPUT_META_KEY] = createImage("cn.png");
}
}
private Image createImage(String name) {
Image image = Toolkit.getDefaultToolkit().getImage(getClass().getResource(name));
return image;
}
/**
* Checks if the virtual keyboard is enabled.
*
* @return <code>true</code> if the virtual keyboard is enabled,
* <code>false</code> otherwise.
*/
static boolean isKeyboardEnabled() {
return USE_VIRTUAL_KEYBOARD;
}
/**
* Checks if the virtual keyboard is enabled.
*
* @return <code>true</code> if the virtual keyboard is enabled,
* <code>false</code> otherwise.
*/
static boolean isKeypadEnabled() {
return USE_VIRTUAL_KEYPAD;
}
/**
* Checks if the virtual keyboard is opened automatically.
*
* @return <code>true</code> if the virtual keyboard is opened
* automatically, <code>false</code> otherwise.
*/
static boolean isAutoOpen() {
return USE_VIRTUAL_KEYBOARD_OPEN_AUTO;
}
/**
* traverse the virtual keyboard according to key pressed.
*
* @param type type of keypress
* @param keyCode key code of key pressed
*/
void traverse(int type, int keyCode) {
System.err.println("VirtualK: keyCode=" + keyCode);
// Soft button means dismiss to the virtual keyboard
if (type == RELEASED && keyCode == 461) {
vkl.virtualKeyEntered(type, (char) 0);
return;
}
if (!inMetaKeys) {
if (type == RELEASED &&
keyCode != KeyEvent.VK_ENTER) {
// in this case we don't want to traverse on key release
} else {
switch (keyCode) {
case KeyEvent.VK_RIGHT:
currentChar++;
if (currentChar > keys[currentKeyboard].length - 1) {
currentChar = 0;
}
break;
case KeyEvent.VK_LEFT:
currentChar--;
if (currentChar < 0) {
currentChar = keys[currentKeyboard].length - 1;
}
break;
case KeyEvent.VK_UP:
currentChar = (currentChar - maxColumns);
if (currentChar < 0) {
currentChar = currentChar + (fullColumns + 1) * maxColumns;
if (currentChar > keys[currentKeyboard].length - 1) {
currentChar -= maxColumns;
}
}
break;
case KeyEvent.VK_DOWN:
currentChar = (currentChar + maxColumns);
if (currentChar > keys[currentKeyboard].length - 1) {
currentChar = (currentChar - maxColumns);
inMetaKeys = true;
}
break;
case KeyEvent.VK_ENTER:
// System.out.println("Key Selected - type :" + type + ", "
// + keys[currentKeyboard][currentChar]);
vkl.virtualKeyEntered(type, keys[currentKeyboard][currentChar]);
if (inShift && type == PRESSED) {
// shift is a one-shot upper case
inShift = false;
if (textKbd) {
currentKeyboard = 1;
vkl.virtualMetaKeyEntered(IM_CHANGED_KEY);
} // hk : still need a keyboard displayed
else {
currentKeyboard = 0;
}
}
break;
}
}
} else {
if (type != RELEASED) {
// meta keys
switch (keyCode) {
case KeyEvent.VK_RIGHT:
currentMeta++;
if (currentMeta > metaKeys.length - 1) {
currentMeta = 0;
}
break;
case KeyEvent.VK_LEFT:
currentMeta--;
if (currentMeta < 0) {
currentMeta = metaKeys.length - 1;
}
break;
case KeyEvent.VK_UP:
inMetaKeys = false;
break;
case KeyEvent.VK_DOWN:
inMetaKeys = false;
currentChar = (currentChar + maxColumns);
if (currentChar > keys[currentKeyboard].length - 1) {
currentChar = currentChar % maxColumns;
}
break;
case KeyEvent.VK_ENTER:
switch (currentMeta) {
case SHIFT_META_KEY: // "Shift" - one shot upper case
if (currentKeyboard == 1) { // lower case
currentKeyboard = 2;
vkl.virtualMetaKeyEntered(IM_CHANGED_KEY);
}
inShift = true;
inMetaKeys = false;
break;
case CAPS_META_KEY: // "CapsL" (caps lock)
if (currentKeyboard == 1) { // lower case
currentKeyboard = 2;
} else if (currentKeyboard == 2) { // upper case
currentKeyboard = 1;
}
vkl.virtualMetaKeyEntered(IM_CHANGED_KEY);
break;
case MODE_META_KEY: // "Mode"
currentKeyboard = (currentKeyboard + 1) % keys.length;
vkl.virtualMetaKeyEntered(IM_CHANGED_KEY);
break;
case BACKSPACE_META_KEY: // "backspace"
vkl.virtualMetaKeyEntered(BACKSPACE_META_KEY);
break;
case OK_META_KEY: // "ok"
vkl.virtualMetaKeyEntered(OK_META_KEY);
break;
case CANCEL_META_KEY: // "cancel"
vkl.virtualMetaKeyEntered(CANCEL_META_KEY);
break;
case CNINPUT_META_KEY: // "cn_input"
vkl.virtualMetaKeyEntered(CNINPUT_META_KEY);
break;
}
}
}
}
if (type != RELEASED) {
if (461 == keyCode) {
vkl.virtualMetaKeyEntered(BACKSPACE_META_KEY);
} else {
switch (keyCode) {
// Short cuts by number keys
case 461:
vkl.virtualMetaKeyEntered(CNINPUT_META_KEY);
break;
case KeyEvent.VK_ENTER:
currentKeyboard = (currentKeyboard + 1) % keys.length;
vkl.virtualMetaKeyEntered(IM_CHANGED_KEY);
break;
case KeyEvent.VK_NUMPAD2:
vkl.virtualMetaKeyEntered(CURSOR_UP_META_KEY);
break;
case KeyEvent.VK_NUMPAD4:
vkl.virtualMetaKeyEntered(CURSOR_LEFT_META_KEY);
break;
case KeyEvent.VK_NUMPAD6:
vkl.virtualMetaKeyEntered(CURSOR_RIGHT_META_KEY);
break;
case KeyEvent.VK_NUMPAD8:
vkl.virtualMetaKeyEntered(CURSOR_DOWN_META_KEY);
break;
case KeyEvent.VK_NUMPAD5:
vkl.virtualMetaKeyEntered(CNINPUT_SELECT_META_KEY);
break;
}
}
}
// triggers paint()
vkl.repaintVK();
}
/**
* paint the virtual keyboard on the screen
*
* @param g The graphics context to paint to
*/
protected void paint(Graphics g) {
int actualHeight = kbHeight + candidateFieldHeight;
g.setFont(f);
g.setColor(Color.lightGray);
g.fillRect(0, 0, kbWidth, actualHeight);
drawBorder(g, 0, 0, kbWidth - 1, actualHeight - 1);
if (candidateFieldHeight > 0) {
drawCandidateBar(g);
}
g.translate(0, candidateFieldHeight);
if (textfieldHeight > 0) {
drawTextField(g);
}
g.translate(0, textfieldHeight);
drawKeys(g);
g.translate(0, actualHeight - (IMAGE_SIZE + 4 * PADDING + 2 * META_PADDING) - textfieldHeight - candidateFieldHeight);
if (textKbd) {
drawMetaKeys(g);
}
}
/**
* Draw the text field of the virtual keyboard.
*
* @param g The graphics context to paint to
*/
void drawTextField(Graphics g) {
drawSunkedBorder(g, PADDING, PADDING, kbWidth - 2 * PADDING, textfieldHeight);
g.setClip(0, 0, kbWidth - 2 * PADDING, textfieldHeight);
g.translate(PADDING + 1, 0);
vkl.paintTextOnly(g, kbWidth, textfieldHeight);
g.translate(-PADDING - 1, 0);
g.setClip(0, 0, kbWidth, kbHeight);
}
void drawCandidateBar(Graphics g) {
g.setClip(0, 0, kbWidth - 2 * PADDING, candidateFieldHeight);
g.translate(PADDING + 1, 2 * PADDING);
vkl.paintCandidateBar(g, kbWidth - 3 * PADDING, candidateFieldHeight - 2 * PADDING);
g.translate(-PADDING - 1, -PADDING);
g.setClip(0, 0, kbWidth, kbHeight);
}
/**
* draw keyboard keys
*
* @param g The graphics context to paint to
*/
void drawKeys(Graphics g) {
int tmp;
if (!textKbd) {
currentKeyboard = 0;
}
for (int i = 0; i < maxRows; i++) {
for (int j = 0; j < maxColumns; j++) {
tmp = i * maxColumns + j;
if (tmp >= keys[currentKeyboard].length) {
// no more chars to draw
break;
}
if (currentChar == tmp && inMetaKeys == false) {
drawButton(g, j * (PADDING + buttonW) + PADDING, i * (PADDING + buttonH) + PADDING, buttonW, buttonH);
} else {
drawBeveledButton(g, j * (PADDING + buttonW) + PADDING, i * (PADDING + buttonH) + PADDING, buttonW, buttonH);
}
// g.setColor(DARK_GRAY);
g.setColor(TEXT_COLOR);
g.drawString("" + keys[currentKeyboard][tmp], j * (PADDING + buttonW) + PADDING + fontWCenter, i * (PADDING + buttonH) + PADDING + fontHTop);
}
}
}
/**
* draw keyboard meta keys
*
* @param g The graphics context to paint to
*/
void drawMetaKeys(Graphics g) {
int mkWidth = metaKeys.length * (IMAGE_SIZE + 3 * META_PADDING) + META_PADDING;
int currX = (kbWidth - mkWidth) / 2 + 2 * META_PADDING;
int currY = 0;
if (inMetaKeys) {
drawBorder(g, currX - 2 * META_PADDING, // x1
currY - 2 * META_PADDING, // y1
currX + mkWidth,
currY + IMAGE_SIZE + 2 * META_PADDING);
}
for (int i = 0; i < metaKeys.length; i++) {
if (currX + IMAGE_SIZE > kbWidth) {
currX = PADDING;
currY -= (IMAGE_SIZE + META_PADDING);
}
if (inMetaKeys && i == currentMeta) {
drawButton(g, currX, currY, IMAGE_SIZE + 2 * META_PADDING, IMAGE_SIZE + 2 * META_PADDING);
} else {
drawBeveledButton(g, currX, currY, IMAGE_SIZE + 2 * META_PADDING, IMAGE_SIZE + 2 * META_PADDING);
}
g.drawImage(metaKeys[i], currX + META_PADDING, currY + META_PADDING, null);
currX += (IMAGE_SIZE + 2 * META_PADDING + 2);
if (currX > kbWidth) {
currX = META_PADDING;
currY -= (IMAGE_SIZE + META_PADDING);
}
}
}
/**
* draw a border
*
* @param g The graphics context to paint to
* @param x1 x-coordinate of the button's location
* @param y1 y-coordinate of the button's location
* @param x2 the x-coordinate at the width of the border
* @param y2 the y-coordinate at the height of the border
*/
private void drawBorder(Graphics g, int x1, int y1, int x2, int y2) {
g.setColor(Color.gray);
g.drawLine(x1 + 2, y1 + 2, x1 + 2, y2 - 3); // left
g.drawLine(x1 + 2, y1 + 2, x2 - 2, y1 + 2); // top
g.drawLine(x1 + 2, y2 - 1, x2 - 1, y2 - 1); // bottom
g.drawLine(x2 - 1, y1 + 2, x2 - 1, y2 - 1); // right
g.setColor(Color.white);
g.drawRect(x1 + 1, y1 + 1, x2 - x1 - 3, y2 - y1 - 3);
}
/**
* draw a sunken border
*
* @param g The graphics context to paint to
* @param x1 x-coordinate of the button's location
* @param y1 y-coordinate of the button's location
* @param x2 the x-coordinate at the width of the border
* @param y2 the y-coordinate at the height of the border
*/
private void drawSunkedBorder(Graphics g, int x1, int y1, int x2, int y2) {
g.setColor(Color.white);
g.fillRect(x1 + 2, y1 + 2, x2 - x1 - 2, y2 - y1 - 2);
g.setColor(Color.gray);
g.drawLine(x1 + 2, y1 + 2, x1 + 2, y2 - 2); // left
g.drawLine(x1 + 2, y1 + 2, x2 - 2, y1 + 2); // top
g.setColor(Color.darkGray);
g.drawLine(x1 + 3, y1 + 3, x1 + 3, y2 - 3); // left
g.drawLine(x1 + 3, y1 + 3, x2 - 3, y1 + 3); // top
g.setColor(Color.lightGray);
g.drawLine(x1 + 3, y2 - 2, x2 - 2, y2 - 2); // bottom
g.drawLine(x2 - 2, y1 + 3, x2 - 2, y2 - 2); // right
}
/**
* draw a button
*
* @param g The graphics context to paint to
* @param x x-coordinate of the button's location
* @param y y-coordinate of the button's location
* @param w the width of the button
* @param h the height of the button
*/
private void drawButton(Graphics g, int x, int y, int w, int h) {
g.setColor(Color.gray);
g.drawLine(x + 1, y + h - 1, x + w, y + h - 1); // bottom
g.drawLine(x + w - 1, y + 1, x + w - 1, y + h); // right
g.setColor(Color.darkGray);
g.drawLine(x, y + h, x + w, y + h); // bottom
g.drawLine(x + w, y, x + w, y + h); // right
g.setColor(Color.white);
g.drawLine(x, y, x + w - 1, y);
g.drawLine(x, y, x, y + h - 1);
}
/**
* draw a beveled button
*
* @param g The graphics context to paint to
* @param x x-coordinate of the button's location
* @param y y-coordinate of the button's location
* @param w the width of the button
* @param h the height of the button
*/
private void drawBeveledButton(Graphics g, int x, int y, int w, int h) {
g.setColor(Color.gray);
g.drawLine(x + 1, y + h - 1, x + w, y + h - 1); // bottom
g.drawLine(x + w - 1, y + 1, x + w - 1, y + h); // right
g.setColor(Color.white);
g.drawLine(x, y + h, x + w, y + h); // bottom
g.drawLine(x + w, y, x + w, y + h); // right
g.setColor(Color.gray);
g.drawLine(x, y, x + w - 1, y);
g.drawLine(x, y, x, y + h - 1);
g.setColor(Color.white);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
}
/**
* Helper function to determine the itemIndex at the x,y position
*
* @param x,y pointer coordinates in menuLayer's space (0,0 means left-top
* corner) both value can be negative as menuLayer handles the
* pointer event outside its bounds
* @return menuItem's index since 0, or PRESS_OUT_OF_BOUNDS, PRESS_ON_TITLE
*
*/
private boolean isKeyAtPointerPosition(int x, int y) {
int tmpX, tmpY, tmp;
for (int i = 0; i < maxRows; i++) {
for (int j = 0; j < maxColumns; j++) {
tmp = i * maxColumns + j;
if (tmp >= keys[currentKeyboard].length) {
// no more chars to draw
break;
}
tmpX = x - (j * (PADDING + buttonW) + PADDING);
tmpY = y - (i * (PADDING + buttonH) + PADDING) - textfieldHeight;
if ((tmpX >= 0) && (tmpY >= 0) && (tmpX < buttonW) && (tmpY < buttonH)) {
currentChar = tmp;
inMetaKeys = false;
return true;
}
}
}
if (metaKeys == null) {
return false;
}
// Check for meta chars
int mkWidth = metaKeys.length * (IMAGE_SIZE + 3 * META_PADDING) + META_PADDING;
int currX = (kbWidth - mkWidth) / 2 + 2 * META_PADDING;
int currY = kbHeight - (IMAGE_SIZE + 6 * META_PADDING);
for (int i = 0; i < metaKeys.length; i++) {
if (currX + IMAGE_SIZE > kbWidth) {
currX = PADDING;
currY -= (IMAGE_SIZE + META_PADDING);
}
tmpX = x - currX;
tmpY = y - currY;
if ((tmpX >= 0) && (tmpY >= 0) && (tmpX < (IMAGE_SIZE + 2 * META_PADDING)) && (tmpY < (IMAGE_SIZE + 2 * META_PADDING))) {
currentMeta = i;
inMetaKeys = true;
return true;
}
currX += (IMAGE_SIZE + 2 * META_PADDING + 2);
if (currX > kbWidth) {
currX = META_PADDING;
currY -= (IMAGE_SIZE + META_PADDING);
}
}
return false;
}
/**
* Handle input from a pen tap. Parameters describe the type of pen event
* and the x,y location in the layer at which the event occurred. Important
* : the x,y location of the pen tap will already be translated into the
* coordinate space of the layer.
*
* @param type the type of pen event
* @param x the x coordinate of the event
* @param y the y coordinate of the event
*/
public boolean pointerInput(int type, int x, int y) {
switch (type) {
case PRESSED:
// dismiss the menu layer if the user pressed outside the menu
if (isKeyAtPointerPosition(x, y)) {
// press on valid key
traverse(type, KeyEvent.VK_ENTER);
vkl.repaintVK();
}
break;
case RELEASED:
if (isKeyAtPointerPosition(x, y)) {
traverse(type, KeyEvent.VK_ENTER);
vkl.repaintVK();
}
break;
}
// return true always as menuLayer will capture all of the pointer
// inputs
return true;
}
// ********* attributes ********* //
private final static Color TEXT_COLOR = Color.black;
/** padding between rows of buttons */
private int PADDING;
/** padding used by the meta keys */
private final static int META_PADDING = 2;
/** size of meta icons */
private final static int IMAGE_SIZE = 13;
// If you want to change the order of the buttons, just
// change the serial numbers here:
final static int OK_META_KEY = 0;
final static int CANCEL_META_KEY = 1;
final static int MODE_META_KEY = 2;
final static int BACKSPACE_META_KEY = 3;
final static int SHIFT_META_KEY = 4;
final static int CAPS_META_KEY = 5;
final static int CNINPUT_META_KEY = 6;
final static int CURSOR_UP_META_KEY = 7;
final static int CURSOR_DOWN_META_KEY = 8;
final static int CURSOR_LEFT_META_KEY = 9;
final static int CURSOR_RIGHT_META_KEY = 10;
final static int CNINPUT_SELECT_META_KEY = 11;
// When input method is changed, process this key to update UI
final static int IM_CHANGED_KEY = 99;
}
class VirtualKeyboardException extends Exception {
/**
* Constructs an <code>IOException</code> with <code>null</code> as its
* error detail message.
*/
public VirtualKeyboardException() {
super();
}
/**
* Constructs an <code>IOException</code> with the specified detail message.
* The error message string <code>s</code> can later be retrieved by the
* <code>{@link java.lang.Throwable#getMessage}</code> method of class
* <code>java.lang.Throwable</code>.
*
* @param s the detail message.
*/
public VirtualKeyboardException(String s) {
super(s);
}
}

View File

@ -0,0 +1,55 @@
/*
* $LastChangedDate: 2005-09-18 20:31:12 +0900 (, 18 9 2005) $
*
* Copyright 1990-2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package vavi.apps.appleii;
import java.awt.Graphics;
/**
* This interface should be implemented by a client that needs a popup keyboard.
* @author Amir Uval
*/
interface VirtualKeyboardListener {
/**
* key input callback
*/
public void virtualKeyEntered(int type, char c);
/**
* meta key event callback
*/
public void virtualMetaKeyEntered(int metaKey);
/**
* a callback used to draw the text entered by the virtual keyboard - on the
* keyboard text area.
* In KeyboardLayer, it is implemented by passing the call to
* TextField's paint(..)
*/
public void paintTextOnly(Graphics g, int width, int height);
public void paintCandidateBar(Graphics g, int width, int height);
/**
* should return the width of the owner Displayable
*/
public int getAvailableWidth();
/**
* should return the height of the owner Displayable
*/
public int getAvailableHeight();
/**
* should trigger a requestRepaint() call to schedule a
* paint() of the VirtualKeyboard
*/
public void repaintVK();
}

View File

@ -0,0 +1,391 @@
/*
* Copyright (c) 2008 by Naohide Sano, All rights reserved.
*
* Programmed by Naohide Sano
*/
package vavi.apps.appleii;
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dialog;
import java.awt.Graphics;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import junit.framework.TestCase;
/**
* VirtualKeyboardTest.
*
* @author <a href="mailto:vavivavi@yahoo.co.jp">Naohide Sano</a> (nsano)
* @version 0.00 080924 nsano initial version <br>
*/
public class VirtualKeyboardTest extends TestCase {
public void test01() throws Exception {
char[][] keys = null;
int neededColumns;
int neededRows;
keys = new char[4][];
// numerals
keys[0] = new char[23]; // numerals
for (char i=0; i<10; i++) { // 0..9
keys[0][i] = (char)(i+48);
}
keys[0][10] = '=';
keys[0][11] = '+';
keys[0][12] = '-';
keys[0][13] = '*';
keys[0][14] = '/';
keys[0][15] = '.';
keys[0][16] = ',';
keys[0][17] = '$';
keys[0][18] = '%';
keys[0][19] = '^';
keys[0][20] = '#';
keys[0][21] = '_';
keys[0][22] = ' ';
// Roman, lower case
keys[1] = new char[51]; // numerals
keys[1][0] = 'q';
keys[1][1] = 'w';
keys[1][2] = 'e';
keys[1][3] = 'r';
keys[1][4] = 't';
keys[1][5] = 'y';
keys[1][6] = 'u';
keys[1][7] = 'i';
keys[1][8] = 'o';
keys[1][9] = 'p';
keys[1][10] = '1';
keys[1][11] = '2';
keys[1][12] = '3';
keys[1][13] = '0';
keys[1][14] = '!';
keys[1][15] = '@';
keys[1][16] = '#';
keys[1][17] = 'a';
keys[1][18] = 's';
keys[1][19] = 'd';
keys[1][20] = 'f';
keys[1][21] = 'g';
keys[1][22] = 'h';
keys[1][23] = 'j';
keys[1][24] = 'k';
keys[1][25] = 'l';
keys[1][26] = ';';
keys[1][27] = '4';
keys[1][28] = '5';
keys[1][29] = '6';
keys[1][30] = '_';
keys[1][31] = '$';
keys[1][32] = '%';
keys[1][33] = '^';
keys[1][34] = 'z';
keys[1][35] = 'x';
keys[1][36] = 'c';
keys[1][37] = 'v';
keys[1][38] = 'b';
keys[1][39] = 'n';
keys[1][40] = 'm';
keys[1][41] = ',';
keys[1][42] = '.';
keys[1][43] = ' ';// space
keys[1][44] = '7';
keys[1][45] = '8';
keys[1][46] = '9';
keys[1][47] = '?';
keys[1][48] = '&';
keys[1][49] = '*';
keys[1][50] = '/';
// Roman, upper case
keys[2] = new char[51]; // numerals
keys[2][0] = 'Q';
keys[2][1] = 'W';
keys[2][2] = 'E';
keys[2][3] = 'R';
keys[2][4] = 'T';
keys[2][5] = 'Y';
keys[2][6] = 'U';
keys[2][7] = 'I';
keys[2][8] = 'O';
keys[2][9] = 'P';
keys[2][10] = '1';
keys[2][11] = '2';
keys[2][12] = '3';
keys[2][13] = '0';
keys[2][14] = '!';
keys[2][15] = '@';
keys[2][16] = '#';
keys[2][17] = 'A';
keys[2][18] = 'S';
keys[2][19] = 'D';
keys[2][20] = 'F';
keys[2][21] = 'G';
keys[2][22] = 'H';
keys[2][23] = 'J';
keys[2][24] = 'K';
keys[2][25] = 'L';
keys[2][26] = ';';
keys[2][27] = '4';
keys[2][28] = '5';
keys[2][29] = '6';
keys[2][30] = '_';
keys[2][31] = '$';
keys[2][32] = '%';
keys[2][33] = '^';
keys[2][34] = 'Z';
keys[2][35] = 'X';
keys[2][36] = 'C';
keys[2][37] = 'V';
keys[2][38] = 'B';
keys[2][39] = 'N';
keys[2][40] = 'M';
keys[2][41] = ',';
keys[2][42] = '.';
keys[2][43] = ' ';// space
keys[2][44] = '7';
keys[2][45] = '8';
keys[2][46] = '9';
keys[2][47] = '?';
keys[2][48] = '&';
keys[2][49] = '*';
keys[2][50] = '/';
// Symbol
keys[3] = new char[25]; // numerals
for (char i=0; i<15; i++) { // !../
keys[3][i] = (char)(i+33);
}
for (char i=0; i<7; i++) { // :..@
keys[3][i+15] = (char)(i+58);
}
keys[3][22] = '~'; // space
keys[3][23] = '^'; // space
keys[3][24] = ' '; // space
neededColumns = 17;
neededRows = 3;
VirtualKeyboardListener vkl = new VirtualKeyboardListener() {
public int getAvailableHeight() {
return 640;
}
public int getAvailableWidth() {
return 400;
}
public void paintCandidateBar(Graphics g, int width, int height) {
g.setColor(Color.pink);
g.fillRect(0, 0, width, height);
}
public void paintTextOnly(Graphics g, int width, int height) {
g.setColor(Color.blue);
g.fillRect(0, 0, width, height);
}
public void repaintVK() {
}
public void virtualKeyEntered(int type, char c) {
}
public void virtualMetaKeyEntered(int metaKey) {
}
};
Dialog dialog = new Dialog(null, true);
final VirtualKeyboard virtualKeyboard = new VirtualKeyboard(keys, vkl, true, neededColumns, neededRows);
Canvas canvas = new Canvas() {
public void paint(Graphics g) {
virtualKeyboard.paint(g);
super.paint(g);
}
};
canvas.setSize(640, 400);
dialog.add(canvas);
dialog.pack();
dialog.show();
}
public void $test02() throws Exception {
byte[][] bs = {
ok,
cancel,
backspace,
shift,
caps,
mode,
cn
};
String[] names = {
"ok.png",
"cancel.png",
"backspace.png",
"shift.png",
"caps.png",
"mode.png",
"cn.png"
};
for (int i = 0; i < names.length; i++) {
x(names[i], bs[i]);
}
}
private void x(String name, byte[] b) throws IOException {
OutputStream os = new FileOutputStream(name);
os.write(b, 0, b.length);
os.flush();
os.close();
}
/** backspace.png */
private byte[] backspace = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x45, (byte) 0x35, (byte) 0x14, (byte) 0x4e, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67,
(byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xb1, (byte) 0x8e, (byte) 0x7c, (byte) 0xfb, (byte) 0x51, (byte) 0x93, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x20, (byte) 0x63, (byte) 0x48, (byte) 0x52, (byte) 0x4d, (byte) 0x00, (byte) 0x00, (byte) 0x7a, (byte) 0x25, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0x83, (byte) 0x00, (byte) 0x00, (byte) 0xf9, (byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0xe6, (byte) 0x00, (byte) 0x00, (byte) 0x75,
(byte) 0x2e, (byte) 0x00, (byte) 0x00, (byte) 0xea, (byte) 0x5f, (byte) 0x00, (byte) 0x00, (byte) 0x3a, (byte) 0x97, (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x6f, (byte) 0x69, (byte) 0xe4, (byte) 0xc4, (byte) 0x2b, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x50, (byte) 0x4c, (byte) 0x54, (byte) 0x45, (byte) 0xe6, (byte) 0xe6, (byte) 0xe6, (byte) 0xcc, (byte) 0xcc, (byte) 0xcc, (byte) 0xa6, (byte) 0xa6, (byte) 0xa6, (byte) 0x80, (byte) 0x80, (byte) 0x80, (byte) 0xff,
(byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x1b, (byte) 0xff, (byte) 0xdb, (byte) 0xbb, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x74, (byte) 0x52, (byte) 0x4e, (byte) 0x53, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0xfb, (byte) 0xb6, (byte) 0x0e, (byte) 0x53, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x70, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54, (byte) 0x78, (byte) 0x9c, (byte) 0x62, (byte) 0x60, (byte) 0x41, (byte) 0x06, (byte) 0x00, (byte) 0x01, (byte) 0xc4, (byte) 0x80, (byte) 0xc2, (byte) 0x03, (byte) 0x08, (byte) 0x20,
(byte) 0x30, (byte) 0x8f, (byte) 0x11, (byte) 0x0a, (byte) 0x98, (byte) 0x01, (byte) 0x02, (byte) 0x08, (byte) 0xc4, (byte) 0x63, (byte) 0x64, (byte) 0x80, (byte) 0x02, (byte) 0x66, (byte) 0x80, (byte) 0x00, (byte) 0x62, (byte) 0x00, (byte) 0x73, (byte) 0x98, (byte) 0x81, (byte) 0x4c, (byte) 0x26, (byte) 0x20, (byte) 0x05, (byte) 0x10, (byte) 0x40, (byte) 0x0c, (byte) 0x10, (byte) 0x19, (byte) 0x66, (byte) 0x10, (byte) 0x87, (byte) 0x81, (byte) 0x19, (byte) 0x20, (byte) 0x80, (byte) 0x18,
(byte) 0x18, (byte) 0x61, (byte) 0x8a, (byte) 0x40, (byte) 0x04, (byte) 0x40, (byte) 0x00, (byte) 0x31, (byte) 0xb0, (byte) 0x80, (byte) 0x69, (byte) 0x26, (byte) 0x30, (byte) 0x97, (byte) 0x19, (byte) 0x20, (byte) 0x80, (byte) 0x80, (byte) 0xfa, (byte) 0x98, (byte) 0x19, (byte) 0xa0, (byte) 0xca, (byte) 0x18, (byte) 0x98, (byte) 0x01, (byte) 0x02, (byte) 0x08, (byte) 0x64, (byte) 0x26, (byte) 0x33, (byte) 0xdc, (byte) 0x4c, (byte) 0x80, (byte) 0x00, (byte) 0x02, (byte) 0xdb, (byte) 0x07,
(byte) 0xe3, (byte) 0x32, (byte) 0x03, (byte) 0x04, (byte) 0x10, (byte) 0xc4, (byte) 0x2d, (byte) 0xcc, (byte) 0x50, (byte) 0x00, (byte) 0x10, (byte) 0x40, (byte) 0xa8, (byte) 0x2e, (byte) 0x03, (byte) 0x08, (byte) 0x30, (byte) 0x00, (byte) 0x82, (byte) 0x47, (byte) 0x01, (byte) 0x63, (byte) 0x1f, (byte) 0x9e, (byte) 0x42, (byte) 0x65, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
/** cancel.png */
private byte[] cancel = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x06, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x05, (byte) 0xec, (byte) 0xd4, (byte) 0xea, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67,
(byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xaf, (byte) 0xc8, (byte) 0x37, (byte) 0x05, (byte) 0x8a, (byte) 0xe9, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x19, (byte) 0x74, (byte) 0x45, (byte) 0x58, (byte) 0x74, (byte) 0x53, (byte) 0x6f, (byte) 0x66, (byte) 0x74, (byte) 0x77, (byte) 0x61, (byte) 0x72, (byte) 0x65, (byte) 0x00, (byte) 0x41, (byte) 0x64, (byte) 0x6f, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x49, (byte) 0x6d, (byte) 0x61, (byte) 0x67,
(byte) 0x65, (byte) 0x52, (byte) 0x65, (byte) 0x61, (byte) 0x64, (byte) 0x79, (byte) 0x71, (byte) 0xc9, (byte) 0x65, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x05, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54, (byte) 0x78, (byte) 0xda, (byte) 0x62, (byte) 0xfc, (byte) 0xff, (byte) 0xff, (byte) 0x3f, (byte) 0x03, (byte) 0x08, (byte) 0x00, (byte) 0x04, (byte) 0x10, (byte) 0x03, (byte) 0x88, (byte) 0xc1, (byte) 0xc4, (byte) 0xc4, (byte) 0xf4, (byte) 0x1e, (byte) 0x20,
(byte) 0x80, (byte) 0x18, (byte) 0x61, (byte) 0x22, (byte) 0x00, (byte) 0x01, (byte) 0x04, (byte) 0xe6, (byte) 0x81, (byte) 0x38, (byte) 0x00, (byte) 0x01, (byte) 0x04, (byte) 0x93, (byte) 0xfa, (byte) 0x0f, (byte) 0xc2, (byte) 0x20, (byte) 0x36, (byte) 0x40, (byte) 0x00, (byte) 0x21, (byte) 0x94, (byte) 0x40, (byte) 0x01, (byte) 0x40, (byte) 0x00, (byte) 0xa1, (byte) 0x08, (byte) 0x00, (byte) 0x04, (byte) 0x10, (byte) 0x23, (byte) 0x50, (byte) 0x19, (byte) 0x9c, (byte) 0x03, (byte) 0x10,
(byte) 0x40, (byte) 0x2c, (byte) 0x50, (byte) 0x5a, (byte) 0x00, (byte) 0x88, (byte) 0x0d, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x45, (byte) 0x19, (byte) 0x40, (byte) 0x00, (byte) 0xc1, (byte) 0x4c, (byte) 0x05, (byte) 0xe1, (byte) 0x7a, (byte) 0x28, (byte) 0x0d, (byte) 0xc6, (byte) 0x20, (byte) 0x71, (byte) 0x80, (byte) 0x00, (byte) 0x02, (byte) 0xab, (byte) 0x64, (byte) 0x66, (byte) 0x66, (byte) 0x86, (byte) 0xab, (byte) 0x05, (byte) 0x99, (byte) 0x0b, (byte) 0x62, (byte) 0xfc,
(byte) 0xfd, (byte) 0xfb, (byte) 0x97, (byte) 0x01, (byte) 0x20, (byte) 0x80, (byte) 0x30, (byte) 0xac, (byte) 0x47, (byte) 0x06, (byte) 0x00, (byte) 0x01, (byte) 0x84, (byte) 0x53, (byte) 0x12, (byte) 0x20, (byte) 0x80, (byte) 0x60, (byte) 0xf6, (byte) 0x09, (byte) 0x20, (byte) 0xd9, (byte) 0x65, (byte) 0x00, (byte) 0xa2, (byte) 0x01, (byte) 0x02, (byte) 0x88, (byte) 0x09, (byte) 0xc9, (byte) 0x89, (byte) 0xfd, (byte) 0x40, (byte) 0xbc, (byte) 0x1f, (byte) 0xe4, (byte) 0x54, (byte) 0x90,
(byte) 0x00, (byte) 0x40, (byte) 0x00, (byte) 0xc1, (byte) 0x24, (byte) 0x1e, (byte) 0x00, (byte) 0xb1, (byte) 0x02, (byte) 0x10, (byte) 0x1f, (byte) 0x00, (byte) 0xe2, (byte) 0x05, (byte) 0x20, (byte) 0x01, (byte) 0x80, (byte) 0x00, (byte) 0x82, (byte) 0x79, (byte) 0xca, (byte) 0x01, (byte) 0xaa, (byte) 0x2b, (byte) 0x00, (byte) 0xca, (byte) 0x9f, (byte) 0x08, (byte) 0x10, (byte) 0x40, (byte) 0x38, (byte) 0x2d, (byte) 0x07, (byte) 0x08, (byte) 0x20, (byte) 0x26, (byte) 0x5c, (byte) 0xce,
(byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0xbc, (byte) 0x7e, (byte) 0xc1, (byte) 0x05, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0xec, (byte) 0x15, (byte) 0xb4, (byte) 0xe0, (byte) 0xfb, (byte) 0x8f, (byte) 0xe4, (byte) 0x35, (byte) 0x10, (byte) 0xbd, (byte) 0x1f, (byte) 0x2a, (byte) 0x56, (byte) 0x00, (byte) 0x0b, (byte) 0x52, (byte) 0x80, (byte) 0x00, (byte) 0x42, (byte) 0xd7, (byte) 0x04, (byte) 0xc2, (byte) 0x09, (byte) 0x50, (byte) 0x45, (byte) 0x30, (byte) 0xc5, (byte) 0x01,
(byte) 0xe8, (byte) 0xf1, (byte) 0x00, (byte) 0x10, (byte) 0x40, (byte) 0xd8, (byte) 0xdc, (byte) 0x7d, (byte) 0x01, (byte) 0x88, (byte) 0x3f, (byte) 0x40, (byte) 0xc3, (byte) 0xe8, (byte) 0x03, (byte) 0x34, (byte) 0x78, (byte) 0x50, (byte) 0x00, (byte) 0x40, (byte) 0x00, (byte) 0x21, (byte) 0xdb, (byte) 0x04, (byte) 0xb2, (byte) 0xe1, (byte) 0x3d, (byte) 0x10, (byte) 0xaf, (byte) 0x47, (byte) 0x0b, (byte) 0xf9, (byte) 0x7e, (byte) 0xa8, (byte) 0x8d, (byte) 0xeb, (byte) 0x61, (byte) 0x36,
(byte) 0x01, (byte) 0x04, (byte) 0x10, (byte) 0x59, (byte) 0x01, (byte) 0x01, (byte) 0x10, (byte) 0x60, (byte) 0x00, (byte) 0x1b, (byte) 0x87, (byte) 0x6f, (byte) 0x18, (byte) 0x70, (byte) 0x09, (byte) 0x02, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
/** caps.png */
private byte[] caps = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x45, (byte) 0x35, (byte) 0x14, (byte) 0x4e, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67,
(byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xb1, (byte) 0x8e, (byte) 0x7c, (byte) 0xfb, (byte) 0x51, (byte) 0x93, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x20, (byte) 0x63, (byte) 0x48, (byte) 0x52, (byte) 0x4d, (byte) 0x00, (byte) 0x00, (byte) 0x7a, (byte) 0x25, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0x83, (byte) 0x00, (byte) 0x00, (byte) 0xf9, (byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0xe6, (byte) 0x00, (byte) 0x00, (byte) 0x75,
(byte) 0x2e, (byte) 0x00, (byte) 0x00, (byte) 0xea, (byte) 0x5f, (byte) 0x00, (byte) 0x00, (byte) 0x3a, (byte) 0x97, (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x6f, (byte) 0x69, (byte) 0xe4, (byte) 0xc4, (byte) 0x2b, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x50, (byte) 0x4c, (byte) 0x54, (byte) 0x45, (byte) 0xe6, (byte) 0xe6, (byte) 0xe6, (byte) 0xcc, (byte) 0xcc, (byte) 0xcc, (byte) 0x7d, (byte) 0x7d, (byte) 0x7d, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xa0, (byte) 0xe5, (byte) 0xcc, (byte) 0x14, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x74, (byte) 0x52, (byte) 0x4e, (byte) 0x53, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0x40, (byte) 0x2a, (byte) 0xa9, (byte) 0xf4, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x65, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54, (byte) 0x78, (byte) 0x9c, (byte) 0x62, (byte) 0x60, (byte) 0x06, (byte) 0x03, (byte) 0x46, (byte) 0x08, (byte) 0x05, (byte) 0x10, (byte) 0x40, (byte) 0x0c, (byte) 0x10, (byte) 0x0e, (byte) 0x03,
(byte) 0x13, (byte) 0x98, (byte) 0x06, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x08, (byte) 0x87, (byte) 0x01, (byte) 0xc2, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x28, (byte) 0x07, (byte) 0xc2, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x18, (byte) 0x07, (byte) 0xcc, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x38, (byte) 0x07, (byte) 0xc4, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x46, (byte) 0x26, (byte) 0x26,
(byte) 0x26, (byte) 0xb0, (byte) 0x3e, (byte) 0x10, (byte) 0x00, (byte) 0x08, (byte) 0x20, (byte) 0x54, (byte) 0x53, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0xc2, (byte) 0x03, (byte) 0x89, (byte) 0x83, (byte) 0x18, (byte) 0x00, (byte) 0x01, (byte) 0x04, (byte) 0xb1, (byte) 0x0f, (byte) 0x06, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x22, (byte) 0x07, (byte) 0x02, (byte) 0x20, (byte) 0x06, (byte) 0x40, (byte) 0x00, (byte) 0xa1, (byte) 0xea, (byte) 0x03, (byte) 0x08, (byte) 0x20,
(byte) 0x54, (byte) 0x7d, (byte) 0x00, (byte) 0x01, (byte) 0x06, (byte) 0x00, (byte) 0x78, (byte) 0xe7, (byte) 0x01, (byte) 0x5d, (byte) 0x6f, (byte) 0x06, (byte) 0x04, (byte) 0xbf, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
/** mode.png */
private byte[] mode = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x06, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x05, (byte) 0xec, (byte) 0xd4, (byte) 0xea, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67,
(byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xaf, (byte) 0xc8, (byte) 0x37, (byte) 0x05, (byte) 0x8a, (byte) 0xe9, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x19, (byte) 0x74, (byte) 0x45, (byte) 0x58, (byte) 0x74, (byte) 0x53, (byte) 0x6f, (byte) 0x66, (byte) 0x74, (byte) 0x77, (byte) 0x61, (byte) 0x72, (byte) 0x65, (byte) 0x00, (byte) 0x41, (byte) 0x64, (byte) 0x6f, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x49, (byte) 0x6d, (byte) 0x61, (byte) 0x67,
(byte) 0x65, (byte) 0x52, (byte) 0x65, (byte) 0x61, (byte) 0x64, (byte) 0x79, (byte) 0x71, (byte) 0xc9, (byte) 0x65, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x3a, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54, (byte) 0x78, (byte) 0xda, (byte) 0x62, (byte) 0x60, (byte) 0x80, (byte) 0x00, (byte) 0x11, (byte) 0x80, (byte) 0x00, (byte) 0x82, (byte) 0xd2, (byte) 0x0c, (byte) 0x8b, (byte) 0x01, (byte) 0x02, (byte) 0x08, (byte) 0xc6, (byte) 0x60, (byte) 0x00, (byte) 0x08,
(byte) 0x20, (byte) 0x10, (byte) 0xba, (byte) 0x0c, (byte) 0x22, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x03, (byte) 0x01, (byte) 0x04, (byte) 0x10, (byte) 0x32, (byte) 0x3a, (byte) 0x09, (byte) 0x22, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x84, (byte) 0xe2, (byte) 0x81, (byte) 0xb8, (byte) 0x17, (byte) 0xc4, (byte) 0x00, (byte) 0x08, (byte) 0x20, (byte) 0x26, (byte) 0x20, (byte) 0x8e, (byte) 0x05, (byte) 0xe2, (byte) 0x8f, (byte) 0x20, (byte) 0x0e, (byte) 0x40, (byte) 0x00,
(byte) 0xa1, (byte) 0x20, (byte) 0x80, (byte) 0x00, (byte) 0x62, (byte) 0x06, (byte) 0xe2, (byte) 0x7d, (byte) 0x40, (byte) 0xdc, (byte) 0x0a, (byte) 0xc4, (byte) 0xff, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x26, (byte) 0xb8, (byte) 0x07, (byte) 0x88, (byte) 0xd5, (byte) 0xa1, (byte) 0xec, (byte) 0x7b, (byte) 0x30, (byte) 0x41, (byte) 0x80, (byte) 0x00, (byte) 0xc2, (byte) 0x8b, (byte) 0x00, (byte) 0x02, (byte) 0x88, (byte) 0x19, (byte) 0x89, (byte) 0x1d, (byte) 0x03, (byte) 0xc4,
(byte) 0x2f, (byte) 0x81, (byte) 0x78, (byte) 0x06, (byte) 0x10, (byte) 0x73, (byte) 0x03, (byte) 0xf1, (byte) 0x25, (byte) 0x80, (byte) 0x00, (byte) 0x42, (byte) 0xf6, (byte) 0x0c, (byte) 0xc8, (byte) 0xd8, (byte) 0x3a, (byte) 0x98, (byte) 0x4a, (byte) 0x80, (byte) 0x00, (byte) 0x02, (byte) 0x21, (byte) 0x5f, (byte) 0x28, (byte) 0xdd, (byte) 0x8b, (byte) 0x2c, (byte) 0x08, (byte) 0x10, (byte) 0x40, (byte) 0xcc, (byte) 0x50, (byte) 0x95, (byte) 0xb7, (byte) 0x80, (byte) 0xf8, (byte) 0x0b,
(byte) 0x10, (byte) 0x73, (byte) 0x01, (byte) 0xf1, (byte) 0x5b, (byte) 0x90, (byte) 0x04, (byte) 0x40, (byte) 0x00, (byte) 0xe1, (byte) 0x44, (byte) 0x00, (byte) 0x01, (byte) 0x84, (byte) 0x8c, (byte) 0x5c, (byte) 0x91, (byte) 0x1c, (byte) 0x72, (byte) 0x19, (byte) 0x20, (byte) 0x80, (byte) 0x98, (byte) 0xa0, (byte) 0x9c, (byte) 0x16, (byte) 0x20, (byte) 0x9e, (byte) 0x0e, (byte) 0x65, (byte) 0x5b, (byte) 0x00, (byte) 0xf1, (byte) 0x41, (byte) 0x80, (byte) 0x00, (byte) 0x62, (byte) 0x46,
(byte) 0xb2, (byte) 0xeb, (byte) 0x01, (byte) 0x10, (byte) 0xf3, (byte) 0x02, (byte) 0xb1, (byte) 0x39, (byte) 0x10, (byte) 0x2b, (byte) 0x03, (byte) 0x04, (byte) 0x10, (byte) 0xcc, (byte) 0x55, (byte) 0xcb, (byte) 0xa0, (byte) 0x21, (byte) 0x01, (byte) 0x73, (byte) 0x36, (byte) 0x8c, (byte) 0x6d, (byte) 0x05, (byte) 0xc4, (byte) 0x47, (byte) 0xd1, (byte) 0xed, (byte) 0x04, (byte) 0x08, (byte) 0x20, (byte) 0x64, (byte) 0xef, (byte) 0xec, (byte) 0xc1, (byte) 0x22, (byte) 0x0e, (byte) 0xf2,
(byte) 0x5e, (byte) 0x01, (byte) 0xba, (byte) 0x20, (byte) 0x40, (byte) 0x00, (byte) 0xc1, (byte) 0xbc, (byte) 0x19, (byte) 0x0c, (byte) 0xc4, (byte) 0x5a, (byte) 0x40, (byte) 0xfc, (byte) 0x03, (byte) 0x1a, (byte) 0x62, (byte) 0x3b, (byte) 0x81, (byte) 0x38, (byte) 0x10, (byte) 0x88, (byte) 0x25, (byte) 0x80, (byte) 0x58, (byte) 0x0d, (byte) 0x88, (byte) 0xef, (byte) 0x00, (byte) 0xf1, (byte) 0x63, (byte) 0x98, (byte) 0x26, (byte) 0x80, (byte) 0x00, (byte) 0x62, (byte) 0xc4, (byte) 0x62,
(byte) 0x3a, (byte) 0xc8, (byte) 0xa7, (byte) 0x4b, (byte) 0xa0, (byte) 0x6c, (byte) 0x71, (byte) 0x20, (byte) 0xae, (byte) 0x85, (byte) 0x6a, (byte) 0x02, (byte) 0x81, (byte) 0xab, (byte) 0x40, (byte) 0xbc, (byte) 0x1b, (byte) 0x20, (byte) 0x80, (byte) 0x98, (byte) 0xb0, (byte) 0x68, (byte) 0x78, (byte) 0x09, (byte) 0x8d, (byte) 0x7a, (byte) 0x06, (byte) 0x28, (byte) 0x9b, (byte) 0x1f, (byte) 0x88, (byte) 0xdf, (byte) 0x00, (byte) 0xf1, (byte) 0x7e, (byte) 0x20, (byte) 0x8e, (byte) 0x03,
(byte) 0x09, (byte) 0x02, (byte) 0x04, (byte) 0x10, (byte) 0xb2, (byte) 0x26, (byte) 0x7d, (byte) 0x68, (byte) 0xca, (byte) 0xdb, (byte) 0x0d, (byte) 0xc4, (byte) 0xc7, (byte) 0xa0, (byte) 0xc1, (byte) 0x89, (byte) 0x0c, (byte) 0x2e, (byte) 0xc2, (byte) 0x0c, (byte) 0x06, (byte) 0x08, (byte) 0x30, (byte) 0x00, (byte) 0x84, (byte) 0x8e, (byte) 0x2c, (byte) 0x30, (byte) 0x86, (byte) 0x31, (byte) 0xc1, (byte) 0x68, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45,
(byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
/** ok.png */
private byte[] ok = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x06, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x05, (byte) 0xec, (byte) 0xd4, (byte) 0xea, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67,
(byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xaf, (byte) 0xc8, (byte) 0x37, (byte) 0x05, (byte) 0x8a, (byte) 0xe9, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x19, (byte) 0x74, (byte) 0x45, (byte) 0x58, (byte) 0x74, (byte) 0x53, (byte) 0x6f, (byte) 0x66, (byte) 0x74, (byte) 0x77, (byte) 0x61, (byte) 0x72, (byte) 0x65, (byte) 0x00, (byte) 0x41, (byte) 0x64, (byte) 0x6f, (byte) 0x62, (byte) 0x65, (byte) 0x20, (byte) 0x49, (byte) 0x6d, (byte) 0x61, (byte) 0x67,
(byte) 0x65, (byte) 0x52, (byte) 0x65, (byte) 0x61, (byte) 0x64, (byte) 0x79, (byte) 0x71, (byte) 0xc9, (byte) 0x65, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x05, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54, (byte) 0x78, (byte) 0xda, (byte) 0x62, (byte) 0xf8, (byte) 0xff, (byte) 0xff, (byte) 0x3f, (byte) 0x03, (byte) 0x13, (byte) 0x13, (byte) 0x13, (byte) 0x03, (byte) 0x40, (byte) 0x00, (byte) 0x31, (byte) 0x31, (byte) 0x40, (byte) 0x01, (byte) 0x40, (byte) 0x00,
(byte) 0x31, (byte) 0x82, (byte) 0x78, (byte) 0x40, (byte) 0xe0, (byte) 0x00, (byte) 0x10, (byte) 0x40, (byte) 0x20, (byte) 0x61, (byte) 0x03, (byte) 0x10, (byte) 0x07, (byte) 0x20, (byte) 0x80, (byte) 0x18, (byte) 0xe0, (byte) 0x6a, (byte) 0x98, (byte) 0x98, (byte) 0xee, (byte) 0x83, (byte) 0x68, (byte) 0x80, (byte) 0x00, (byte) 0x62, (byte) 0x04, (byte) 0x09, (byte) 0x20, (byte) 0x03, (byte) 0x80, (byte) 0x00, (byte) 0x82, (byte) 0xe9, (byte) 0x01, (byte) 0x03, (byte) 0x80, (byte) 0x00,
(byte) 0x62, (byte) 0x42, (byte) 0x96, (byte) 0x01, (byte) 0x08, (byte) 0x20, (byte) 0x66, (byte) 0x46, (byte) 0x46, (byte) 0xc6, (byte) 0x7a, (byte) 0x90, (byte) 0x0a, (byte) 0x20, (byte) 0x7e, (byte) 0x00, (byte) 0x10, (byte) 0x40, (byte) 0x28, (byte) 0xfa, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0xd9, (byte) 0x54, (byte) 0x64, (byte) 0x7c, (byte) 0x1e, (byte) 0x44, (byte) 0x03, (byte) 0x04, (byte) 0x10, (byte) 0x4c, (byte) 0xd2, (byte) 0x00, (byte) 0x2a, (byte) 0xb8, (byte) 0x1f,
(byte) 0x59, (byte) 0x11, (byte) 0x40, (byte) 0x00, (byte) 0x81, (byte) 0x8d, (byte) 0x61, (byte) 0x66, (byte) 0x66, (byte) 0x06, (byte) 0x1b, (byte) 0x02, (byte) 0x35, (byte) 0x1b, (byte) 0x0e, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0xc5, (byte) 0x29, (byte) 0xc8, (byte) 0x00, (byte) 0x20, (byte) 0x80, (byte) 0x58, (byte) 0xb0, (byte) 0x88, (byte) 0x19, (byte) 0x80, (byte) 0x08, (byte) 0x80, (byte) 0x00, (byte) 0x62, (byte) 0xc2, (byte) 0x26, (byte) 0x08, (byte) 0x04, (byte) 0x17,
(byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x5d, (byte) 0xc2, (byte) 0x1f, (byte) 0x24, (byte) 0x08, (byte) 0x62, (byte) 0x00, (byte) 0x04, (byte) 0x10, (byte) 0xcc, (byte) 0xa8, (byte) 0xf7, (byte) 0x40, (byte) 0x2c, (byte) 0x80, (byte) 0xec, (byte) 0x00, (byte) 0x80, (byte) 0x00, (byte) 0x82, (byte) 0xe9, (byte) 0x58, (byte) 0x00, (byte) 0xc4, (byte) 0x8e, (byte) 0xc8, (byte) 0x5a, (byte) 0x01, (byte) 0x02, (byte) 0x08, (byte) 0x23, (byte) 0xc4, (byte) 0x60, (byte) 0x00, (byte) 0x20,
(byte) 0x80, (byte) 0x90, (byte) 0xfd, (byte) 0x42, (byte) 0x08, (byte) 0x80, (byte) 0xac, (byte) 0xea, (byte) 0x07, (byte) 0xe2, (byte) 0x8d, (byte) 0x00, (byte) 0x01, (byte) 0x84, (byte) 0x2b, (byte) 0xe8, (byte) 0x90, (byte) 0xb1, (byte) 0x01, (byte) 0x34, (byte) 0xb2, (byte) 0x60, (byte) 0x21, (byte) 0xc8, (byte) 0x00, (byte) 0x10, (byte) 0x40, (byte) 0x4c, (byte) 0x04, (byte) 0x4c, (byte) 0x86, (byte) 0x79, (byte) 0x46, (byte) 0x11, (byte) 0xe6, (byte) 0x4b, (byte) 0x10, (byte) 0x00,
(byte) 0x08, (byte) 0x20, (byte) 0x98, (byte) 0x4d, (byte) 0x0e, (byte) 0x40, (byte) 0xfc, (byte) 0x1f, (byte) 0x88, (byte) 0x0b, (byte) 0xa0, (byte) 0xa6, (byte) 0xd5, (byte) 0xc3, (byte) 0x22, (byte) 0x0a, (byte) 0x1b, (byte) 0x06, (byte) 0x08, (byte) 0x20, (byte) 0x64, (byte) 0xe7, (byte) 0x09, (byte) 0x00, (byte) 0xf1, (byte) 0x7b, (byte) 0x28, (byte) 0x5e, (byte) 0x8f, (byte) 0xcf, (byte) 0xc9, (byte) 0x00, (byte) 0x01, (byte) 0x84, (byte) 0x1e, (byte) 0x10, (byte) 0x06, (byte) 0x50,
(byte) 0xe7, (byte) 0x1c, (byte) 0xc0, (byte) 0x17, (byte) 0x22, (byte) 0x00, (byte) 0x01, (byte) 0x06, (byte) 0x00, (byte) 0x3b, (byte) 0x85, (byte) 0x3d, (byte) 0x34, (byte) 0xf3, (byte) 0xcf, (byte) 0x64, (byte) 0xe7, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
/** shift.png */
private byte[] shift = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x45, (byte) 0x35, (byte) 0x14, (byte) 0x4e, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67,
(byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xb1, (byte) 0x8e, (byte) 0x7c, (byte) 0xfb, (byte) 0x51, (byte) 0x93, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x20, (byte) 0x63, (byte) 0x48, (byte) 0x52, (byte) 0x4d, (byte) 0x00, (byte) 0x00, (byte) 0x7a, (byte) 0x25, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0x83, (byte) 0x00, (byte) 0x00, (byte) 0xf9, (byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0xe6, (byte) 0x00, (byte) 0x00, (byte) 0x75,
(byte) 0x2e, (byte) 0x00, (byte) 0x00, (byte) 0xea, (byte) 0x5f, (byte) 0x00, (byte) 0x00, (byte) 0x3a, (byte) 0x97, (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x6f, (byte) 0x69, (byte) 0xe4, (byte) 0xc4, (byte) 0x2b, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x50, (byte) 0x4c, (byte) 0x54, (byte) 0x45, (byte) 0xe6, (byte) 0xe6, (byte) 0xe6, (byte) 0xcc, (byte) 0xcc, (byte) 0xcc, (byte) 0x7d, (byte) 0x7d, (byte) 0x7d, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xa0, (byte) 0xe5, (byte) 0xcc, (byte) 0x14, (byte) 0x00,
(byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x74, (byte) 0x52, (byte) 0x4e, (byte) 0x53, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0x40, (byte) 0x2a, (byte) 0xa9, (byte) 0xf4, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x60, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54, (byte) 0x78, (byte) 0x9c, (byte) 0x62, (byte) 0x60, (byte) 0x06, (byte) 0x03, (byte) 0x46, (byte) 0x08, (byte) 0x05, (byte) 0x10, (byte) 0x40, (byte) 0x0c, (byte) 0x10, (byte) 0x0e, (byte) 0x03,
(byte) 0x13, (byte) 0x98, (byte) 0x06, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x08, (byte) 0x87, (byte) 0x01, (byte) 0xc2, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x28, (byte) 0x07, (byte) 0xc2, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x18, (byte) 0x07, (byte) 0xcc, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x38, (byte) 0x07, (byte) 0xc4, (byte) 0x05, (byte) 0x08, (byte) 0x20, (byte) 0x06, (byte) 0x46, (byte) 0x26, (byte) 0x26,
(byte) 0x26, (byte) 0xb0, (byte) 0x3e, (byte) 0x10, (byte) 0x00, (byte) 0x08, (byte) 0x20, (byte) 0x54, (byte) 0x53, (byte) 0x00, (byte) 0x02, (byte) 0x08, (byte) 0x95, (byte) 0x07, (byte) 0x10, (byte) 0x40, (byte) 0xa8, (byte) 0x3c, (byte) 0x80, (byte) 0x00, (byte) 0x42, (byte) 0xe5, (byte) 0x01, (byte) 0x04, (byte) 0x10, (byte) 0x2a, (byte) 0x0f, (byte) 0x20, (byte) 0x80, (byte) 0x20, (byte) 0x3c, (byte) 0x90, (byte) 0x79, (byte) 0x20, (byte) 0x06, (byte) 0x40, (byte) 0x80, (byte) 0x01,
(byte) 0x00, (byte) 0x74, (byte) 0xd7, (byte) 0x01, (byte) 0x49, (byte) 0x4a, (byte) 0xc4, (byte) 0x00, (byte) 0x8f, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
private byte[] cn = {
(byte) 0x89, (byte) 0x50, (byte) 0x4e, (byte) 0x47, (byte) 0x0d, (byte) 0x0a, (byte) 0x1a, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x49, (byte) 0x48, (byte) 0x44, (byte) 0x52, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x08, (byte) 0x02, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xfd, (byte) 0x89, (byte) 0x73, (byte) 0x2b, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x73,
(byte) 0x52, (byte) 0x47, (byte) 0x42, (byte) 0x00, (byte) 0xae, (byte) 0xce, (byte) 0x1c, (byte) 0xe9, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x67, (byte) 0x41, (byte) 0x4d, (byte) 0x41, (byte) 0x00, (byte) 0x00, (byte) 0xb1, (byte) 0x8f, (byte) 0x0b, (byte) 0xfc, (byte) 0x61, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x20, (byte) 0x63, (byte) 0x48, (byte) 0x52, (byte) 0x4d, (byte) 0x00, (byte) 0x00, (byte) 0x7a, (byte) 0x26, (byte) 0x00, (byte) 0x00,
(byte) 0x80, (byte) 0x84, (byte) 0x00, (byte) 0x00, (byte) 0xfa, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x80, (byte) 0xe8, (byte) 0x00, (byte) 0x00, (byte) 0x75, (byte) 0x30, (byte) 0x00, (byte) 0x00, (byte) 0xea, (byte) 0x60, (byte) 0x00, (byte) 0x00, (byte) 0x3a, (byte) 0x98, (byte) 0x00, (byte) 0x00, (byte) 0x17, (byte) 0x70, (byte) 0x9c, (byte) 0xba, (byte) 0x51, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x33, (byte) 0x49, (byte) 0x44, (byte) 0x41, (byte) 0x54,
(byte) 0x28, (byte) 0x53, (byte) 0x63, (byte) 0xfc, (byte) 0xff, (byte) 0xff, (byte) 0x3f, (byte) 0x03, (byte) 0x31, (byte) 0x00, (byte) 0xa8, (byte) 0x0e, (byte) 0x0d, (byte) 0x00, (byte) 0x75, (byte) 0x61, (byte) 0x11, (byte) 0x24, (byte) 0x4d, (byte) 0x1d, (byte) 0x1e, (byte) 0x9b, (byte) 0x21, (byte) 0x06, (byte) 0x41, (byte) 0xad, (byte) 0x40, (byte) 0xb6, (byte) 0x0b, (byte) 0x2b, (byte) 0x7b, (byte) 0xe0, (byte) 0xd5, (byte) 0xe1, (byte) 0xf2, (byte) 0x0a, (byte) 0x8a, (byte) 0x3f,
(byte) 0x90, (byte) 0x43, (byte) 0x87, (byte) 0x1a, (byte) 0xe1, (byte) 0x47, (byte) 0x35, (byte) 0xf3, (byte) 0x00, (byte) 0x1d, (byte) 0x23, (byte) 0x69, (byte) 0xa6, (byte) 0xf7, (byte) 0x74, (byte) 0x7d, (byte) 0x20, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x49, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0xae, (byte) 0x42, (byte) 0x60, (byte) 0x82
};
}
/* */