diff --git a/.gitattributes b/.gitattributes
index 694d1f5..3db5655 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,11 +1,14 @@
* text=auto
*.c text diff=c
+*.css text diff=css
*.h text diff=c
*.html text diff=html
*.java text diff=java
+*.js text diff=js
*.sample text
*.txt text
*.class binary
*.dll binary
+*.wasm binary
diff --git a/expressions.html b/expressions.html
deleted file mode 100644
index 47e09f5..0000000
--- a/expressions.html
+++ /dev/null
@@ -1,705 +0,0 @@
-
-
-
-
- Expression Evaluator
-
-
-
-
-Expression Evaluator
-
- The emulator is capable of evaluating expressions within breakpoint
- conditions and Go To prompts. These expressions inspect the current emulation
- state and can be used to dynamically process registers, variables and other
- data elements that may change from one invocation to the next.
-
-
- Expressions are organized into series of tokens with three main modes of
- significance:
-
-
-
- • Value
-
- Numeric value that can be used in computation. This may take the form of
- a literal number provided directly in the expression, or one of the
- named symbols that represent things in the CPU state, current
- instruction and/or current memory access.
-
-
-
- • Operator
-
- Modifies one or two values through a given operation. Unary operators
- modify only the value on their right, while binary operators consider the
- values on their left and right and produce a new value as the result.
-
-
-
- • Group
-
- Operand groups, mainly through the use of parentheses ()
,
- override the default order of operations. Anything enclosed in a group
- is processed before any operations adjacent to that group.
-
-
-
-
- Expressions are case-insensitive.
-
-
-
-
-Values
-
- Values come in two forms:
-
-
-
- • Literal
- Provided directly by the expression.
-
-
- • Symbol
- Refers to something in the current emulation state.
-
-
-
- Values may be one of four data types:
-
-
-
- • Signed Word
-
- 32-bit, two's complement integer.
-
-
-
- • Unsigned Word
-
- 32-bit, unsigned integer.
-
-
-
- • Float
-
- 32-bit floating short in IEEE-754 format.
-
-
-
- • Boolean
-
- 1-bit value representing whether a condition is true or false.
-
-
-
-
- Signed word and unsigned word are represented as sequences of character
- digits. A numeric token that begins with the characters 0x
- will be interpreted as hexadecimal, allowing letters A
through
- F
to be used as digits as well. If the given value can be
- represented in the signed word data type, the token is a signed word.
- Otherwise, if it can be represented in the unsigned word data type, the token
- is an unsigned word. If the value cannot be represented in either data type,
- a parsing error occurs.
-
-
- Floats, like words, are represented as sequences of character digits. They
- are distinguished from words by the presence of a dot .
- character somewhere within the sequence. Only one dot may be present in a
- float literal, and dots cannot be used in hexadecimal literals. If the given
- value cannot be represented in the float data type, a parsing error occurs.
- Float values in the expression evaluator are subjected to the following
- restrictions: if the value of any float literal or the result of any float
- operation is NaN, an infinity, a denormal number or negative zero, it will be
- changed to positive zero.
-
-
- Booleans are mechanically identical to signed words, but the semantics are
- slightly different. When used in a numeric operation, a boolean will use the
- value 0
if false or the value 1
if true. Boolean
- literals are specified with the named values true
and
- false
within the expression. In a boolean operation, any value
- that is zero is considered false, and any non-zero value is considered true.
-
-
- Operators exist for converting between data types (see Operators below). A
- Go To expression will only be valid if its final data type is signed word or
- unsigned word.
-
-
- The following symbols may be used for accessing information about the current
- instruction being executed:
-
-
-
- address
- Current memory access's address.
-
-
- break
-
- Identifies what type of break scenario is being considered. See below for
- a list of identifiers.
-
-
-
- code
- Current exception's exception code.
-
-
- cond
-
- Condition code for Bcond
and SETF
- instructions. See below for a list of conditions.
-
-
-
- disp
- Displacement offset for jumps and memory accesses.
-
-
-
- format
- Current instruction's encoding format.
-
-
- id
-
- Identifies which specific instruction is being executed, considering
- opcode
and, where applicable, subopcode
. See
- below for a list of identifiers.
-
-
-
- imm
- Immediate operand.
-
-
- opcode
- Current instruction's top-level opcode.
-
-
- reg1
- Source register index.
-
-
- reg2
- Destination register index.
-
-
- regid
-
- System register index in LDSR
and STSR
- instructions.
-
-
-
- size
- Number of bytes occupied by the current instruction.
-
-
- subopcode
- Current instruction's secondary opcode.
-
-
- type
- Data type of the current memory access.
-
-
- value
- Value read or to be written by the current memory access.
-
-
- vector
- Vector for TRAP
instructions.
-
-
-
- The following symbols may be used in conjunction with the break
- symbol:
-
-
-
exception
execute
read
write
-
-
- The following symbols may be used in conjunction with the cond
- symbol:
-
-
-
c
e
f
ge
gt
-
h
l
le
lt
n
-
nc
ne
nh
nl
nv
-
nz
p
t
v
z
-
-
- The following symbols may be used in conjunction with the id
- symbol:
-
-
-
illegal
add_imm
add_reg
addf.s
-
addi
and
andbsu
andi
-
andnbsu
bcond
caxi
cli
-
cmp_imm
cmp_reg
cmpf.s
cvt.sw
-
cvt.ws
div
divf.s
divu
-
halt
in.b
in.h
in.w
-
jal
jmp
jr
ld.b
-
ld.h
ld.w
ldsr
mov_imm
-
mov_reg
movbsu
movea
movhi
-
mpyhw
mul
mulf.s
mulu
-
not
notbsu
or
orbsu
-
ori
ornbsu
out.b
out.h
-
out.w
reti
rev
sar_imm
-
sar_reg
sch0bsd
sch0bsu
sch1bsd
-
sch1bsu
sei
setf
shl_imm
-
shl_reg
shr_imm
shr_reg
st.b
-
st.h
st.w
stsr
sub
-
subf.s
trap
trnc.sw
xb
-
xh
xor
xorbsu
xori
-
xornbsu
-
-
- The following symbols may be used to retrieve the contents of a CPU program
- register:
-
-
-
r0
r1
r2
r3
r4
-
r5
r6
r7
r8
r9
-
r10
r11
r12
r13
r14
-
r15
r16
r17
r18
r19
-
r20
r21
r22
r23
r24
-
r25
r26
r27
r28
r29
-
r30
r31
gp
hp
lp
-
sp
tp
-
-
- The following symbols may be used to retrieve the contents of a CPU system
- register:
-
-
-
adtre
chcw
ecr
eipc
-
eipsw
fepc
fepsw
pc
-
pir
psw
tkcw
sr29
-
sr30
sr31
-
-
-
-Operators
-
- Operators may apply to one (unary) or two (binary) values. All unary
- operators appear to the left of the value they modify (or another unary
- operator). Binary operators appear between the values they modify.
-
-
- Each operator considers the types of its operands in order to produce a new
- value of the appropriate type. If the operands of a binary operator have
- different types, one of the values will be converted to the other type before
- performing the operation. The conversion selects the "greater" of the two
- types, in the following order (higher is "greater"):
-
-
- ↑ Float
- Unsigned word
- Signed word
- ↓ Boolean
-
-
- For example, if an operation contains both a signed word and a float, the
- signed word value is converted to float before performing the operation.
-
-
- Operators have assigned precedence that specifies the order of operations.
- For example, in the expression 1 + 2 * 3
, the multiplication
- happens before the addition because it has higher precedence. Parentheses
- ()
may be used to encapsulate operations and guarantee that they
- are evaluated first regardless of the relative precedence of the adjacent
- operators. For example, in the expression (1 + 2) * 3
, the
- addition happens before the multiplication because it is enclosed in
- parentheses.
-
-
- The following operators may be used in expressions. Groups listed higher have
- higher precedence and happen before groups listed lower. Operators within
- groups have the same precedence and are processed according to the order in
- which they appear in the expression: right-to-left for unary operators,
- left-to-right for binary operators.
-
-
-
- Unary
- ~
- Not Bitwise
- Cannot be used with a float value.
-
-
- !
- Not Logical
- Always produces a boolean.
-
-
- -
- Negate
- Cannot be used with an unsigned word value.
-
-
- bool
- Cast to Boolean
-
-
-
- ceil
- Round Up
-
-
-
- float
- Cast to Float
-
-
-
- floor
- Round Down
-
-
-
- round
- Round to Nearest
-
-
-
- s8
, byte
- Cast to Signed Byte
- Result is of type signed word.
-
-
- s16
, halfword
- Cast to Signed Halfword
- Result is of type signed word.
-
-
- s32
, word
- Cast to Signed Word
-
-
-
- trunc
- Truncate
- Removes any fraction.
-
-
- u8
, ubyte
- Cast to Unsigned Byte
- Result is of type unsigned word.
-
-
- u16
, uhalfword
- Cast to Unsigned Halfword
- Result is of type unsigned word.
-
-
- u32
, uword
- Cast to Unsigned Word
-
-
-
- xfloat
- Reinterpret as Float
- The binary value is not modified.
-
-
- xs32
, xword
- Reinterpret as Signed Word
- The binary value is not modified.
-
-
- xu32
, xuword
- Reinterpret as Unsgned Word
- The binary value is not modified.
-
-
- Binary
- /
- Divide
- Zero divisor yields zero as result.
-
-
- *
- Multiply
-
-
-
- %
- Remainder
- Zero divisor yields zero as result.
-
-
- +
- Add
-
-
-
- -
- Subtract
-
-
-
- <<
- Shift Left
- Cannot be used with float values.
-
-
- >>
- Shift Right Arithmetic
- Cannot be used with float values.
-
-
- >>>
- Shift Right Logical
- Cannot be used with float values.
-
-
- >
- Greater
- Always produces a boolean.
-
-
- >=
- Greater or Equal
- Always produces a boolean.
-
-
- <
- Less
- Always produces a boolean.
-
-
- <=
- Less or Equal
- Always produces a boolean.
-
-
- ==
- Equal
- Always produces a boolean.
-
-
- !=
- Not Equal
- Always produces a boolean.
-
-
- &
- And Bitwise
- Cannot be used with float values.
-
-
- ^
- Exclusive Or Bitwise
- Cannot be used with float values.
-
-
- |
- Or Bitwise
- Cannot be used with float values.
-
-
- &&
- And Logical
- If left is true, returns right; else returns left.
-
-
- ^^
- Exclusive Or Logical
- If only one operand is true, returns the truthy value.
-
-
- ||
- Or Logical
- If left is true, returns left; else returns right.
-
-
-
-
-
-Memory Read
-
- A value can be read from the memory bus of the emulation state. This is done
- by enclosing the part of the expression that represents the address in square
- brackets []
. This functions in an identical manner to
- parentheses ()
, but will additionally perform the read
- operation.
-
-
- Under most circumstances, a signed word read is performed. Certain operators
- can be placed in front of the group to alter how the read is performed:
-
-
-
- • float
- Behaves like xfloat
instead.
-
-
- • s8
, u8
- Performs a byte read of the specified signedness.
-
-
- • s16
, u16
- Performs a halfword read of the specified signedness.
-
-
-
- Reads are subjected to the alginment restrictions of the Virtual Boy's CPU:
- the lowest bit of the address is ignored for halfword reads, and the lowest
- two bits of the address are ignored for word reads.
-
-
-
-
-
-
diff --git a/images/app_icon.png b/images/app_icon.png
deleted file mode 100644
index 3ad6e8b..0000000
Binary files a/images/app_icon.png and /dev/null differ
diff --git a/jni/linux/classfile_constants.h b/jni/linux/classfile_constants.h
deleted file mode 100644
index fa8c38f..0000000
--- a/jni/linux/classfile_constants.h
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
- * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef CLASSFILE_CONSTANTS_H
-#define CLASSFILE_CONSTANTS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Classfile version number for this information */
-#define JVM_CLASSFILE_MAJOR_VERSION 59
-#define JVM_CLASSFILE_MINOR_VERSION 0
-
-/* Flags */
-
-enum {
- JVM_ACC_PUBLIC = 0x0001,
- JVM_ACC_PRIVATE = 0x0002,
- JVM_ACC_PROTECTED = 0x0004,
- JVM_ACC_STATIC = 0x0008,
- JVM_ACC_FINAL = 0x0010,
- JVM_ACC_SYNCHRONIZED = 0x0020,
- JVM_ACC_SUPER = 0x0020,
- JVM_ACC_VOLATILE = 0x0040,
- JVM_ACC_BRIDGE = 0x0040,
- JVM_ACC_TRANSIENT = 0x0080,
- JVM_ACC_VARARGS = 0x0080,
- JVM_ACC_NATIVE = 0x0100,
- JVM_ACC_INTERFACE = 0x0200,
- JVM_ACC_ABSTRACT = 0x0400,
- JVM_ACC_STRICT = 0x0800,
- JVM_ACC_SYNTHETIC = 0x1000,
- JVM_ACC_ANNOTATION = 0x2000,
- JVM_ACC_ENUM = 0x4000,
- JVM_ACC_MODULE = 0x8000
-};
-
-#define JVM_ACC_PUBLIC_BIT 0
-#define JVM_ACC_PRIVATE_BIT 1
-#define JVM_ACC_PROTECTED_BIT 2
-#define JVM_ACC_STATIC_BIT 3
-#define JVM_ACC_FINAL_BIT 4
-#define JVM_ACC_SYNCHRONIZED_BIT 5
-#define JVM_ACC_SUPER_BIT 5
-#define JVM_ACC_VOLATILE_BIT 6
-#define JVM_ACC_BRIDGE_BIT 6
-#define JVM_ACC_TRANSIENT_BIT 7
-#define JVM_ACC_VARARGS_BIT 7
-#define JVM_ACC_NATIVE_BIT 8
-#define JVM_ACC_INTERFACE_BIT 9
-#define JVM_ACC_ABSTRACT_BIT 10
-#define JVM_ACC_STRICT_BIT 11
-#define JVM_ACC_SYNTHETIC_BIT 12
-#define JVM_ACC_ANNOTATION_BIT 13
-#define JVM_ACC_ENUM_BIT 14
-
-/* Used in newarray instruction. */
-
-enum {
- JVM_T_BOOLEAN = 4,
- JVM_T_CHAR = 5,
- JVM_T_FLOAT = 6,
- JVM_T_DOUBLE = 7,
- JVM_T_BYTE = 8,
- JVM_T_SHORT = 9,
- JVM_T_INT = 10,
- JVM_T_LONG = 11
-};
-
-/* Constant Pool Entries */
-
-enum {
- JVM_CONSTANT_Utf8 = 1,
- JVM_CONSTANT_Unicode = 2, /* unused */
- JVM_CONSTANT_Integer = 3,
- JVM_CONSTANT_Float = 4,
- JVM_CONSTANT_Long = 5,
- JVM_CONSTANT_Double = 6,
- JVM_CONSTANT_Class = 7,
- JVM_CONSTANT_String = 8,
- JVM_CONSTANT_Fieldref = 9,
- JVM_CONSTANT_Methodref = 10,
- JVM_CONSTANT_InterfaceMethodref = 11,
- JVM_CONSTANT_NameAndType = 12,
- JVM_CONSTANT_MethodHandle = 15, // JSR 292
- JVM_CONSTANT_MethodType = 16, // JSR 292
- JVM_CONSTANT_Dynamic = 17,
- JVM_CONSTANT_InvokeDynamic = 18,
- JVM_CONSTANT_Module = 19,
- JVM_CONSTANT_Package = 20,
- JVM_CONSTANT_ExternalMax = 20
-};
-
-/* JVM_CONSTANT_MethodHandle subtypes */
-enum {
- JVM_REF_getField = 1,
- JVM_REF_getStatic = 2,
- JVM_REF_putField = 3,
- JVM_REF_putStatic = 4,
- JVM_REF_invokeVirtual = 5,
- JVM_REF_invokeStatic = 6,
- JVM_REF_invokeSpecial = 7,
- JVM_REF_newInvokeSpecial = 8,
- JVM_REF_invokeInterface = 9
-};
-
-/* StackMapTable type item numbers */
-
-enum {
- JVM_ITEM_Top = 0,
- JVM_ITEM_Integer = 1,
- JVM_ITEM_Float = 2,
- JVM_ITEM_Double = 3,
- JVM_ITEM_Long = 4,
- JVM_ITEM_Null = 5,
- JVM_ITEM_UninitializedThis = 6,
- JVM_ITEM_Object = 7,
- JVM_ITEM_Uninitialized = 8
-};
-
-/* Type signatures */
-
-enum {
- JVM_SIGNATURE_SLASH = '/',
- JVM_SIGNATURE_DOT = '.',
- JVM_SIGNATURE_SPECIAL = '<',
- JVM_SIGNATURE_ENDSPECIAL = '>',
- JVM_SIGNATURE_ARRAY = '[',
- JVM_SIGNATURE_BYTE = 'B',
- JVM_SIGNATURE_CHAR = 'C',
- JVM_SIGNATURE_CLASS = 'L',
- JVM_SIGNATURE_ENDCLASS = ';',
- JVM_SIGNATURE_ENUM = 'E',
- JVM_SIGNATURE_FLOAT = 'F',
- JVM_SIGNATURE_DOUBLE = 'D',
- JVM_SIGNATURE_FUNC = '(',
- JVM_SIGNATURE_ENDFUNC = ')',
- JVM_SIGNATURE_INT = 'I',
- JVM_SIGNATURE_LONG = 'J',
- JVM_SIGNATURE_SHORT = 'S',
- JVM_SIGNATURE_VOID = 'V',
- JVM_SIGNATURE_BOOLEAN = 'Z'
-};
-
-/* Opcodes */
-
-enum {
- JVM_OPC_nop = 0,
- JVM_OPC_aconst_null = 1,
- JVM_OPC_iconst_m1 = 2,
- JVM_OPC_iconst_0 = 3,
- JVM_OPC_iconst_1 = 4,
- JVM_OPC_iconst_2 = 5,
- JVM_OPC_iconst_3 = 6,
- JVM_OPC_iconst_4 = 7,
- JVM_OPC_iconst_5 = 8,
- JVM_OPC_lconst_0 = 9,
- JVM_OPC_lconst_1 = 10,
- JVM_OPC_fconst_0 = 11,
- JVM_OPC_fconst_1 = 12,
- JVM_OPC_fconst_2 = 13,
- JVM_OPC_dconst_0 = 14,
- JVM_OPC_dconst_1 = 15,
- JVM_OPC_bipush = 16,
- JVM_OPC_sipush = 17,
- JVM_OPC_ldc = 18,
- JVM_OPC_ldc_w = 19,
- JVM_OPC_ldc2_w = 20,
- JVM_OPC_iload = 21,
- JVM_OPC_lload = 22,
- JVM_OPC_fload = 23,
- JVM_OPC_dload = 24,
- JVM_OPC_aload = 25,
- JVM_OPC_iload_0 = 26,
- JVM_OPC_iload_1 = 27,
- JVM_OPC_iload_2 = 28,
- JVM_OPC_iload_3 = 29,
- JVM_OPC_lload_0 = 30,
- JVM_OPC_lload_1 = 31,
- JVM_OPC_lload_2 = 32,
- JVM_OPC_lload_3 = 33,
- JVM_OPC_fload_0 = 34,
- JVM_OPC_fload_1 = 35,
- JVM_OPC_fload_2 = 36,
- JVM_OPC_fload_3 = 37,
- JVM_OPC_dload_0 = 38,
- JVM_OPC_dload_1 = 39,
- JVM_OPC_dload_2 = 40,
- JVM_OPC_dload_3 = 41,
- JVM_OPC_aload_0 = 42,
- JVM_OPC_aload_1 = 43,
- JVM_OPC_aload_2 = 44,
- JVM_OPC_aload_3 = 45,
- JVM_OPC_iaload = 46,
- JVM_OPC_laload = 47,
- JVM_OPC_faload = 48,
- JVM_OPC_daload = 49,
- JVM_OPC_aaload = 50,
- JVM_OPC_baload = 51,
- JVM_OPC_caload = 52,
- JVM_OPC_saload = 53,
- JVM_OPC_istore = 54,
- JVM_OPC_lstore = 55,
- JVM_OPC_fstore = 56,
- JVM_OPC_dstore = 57,
- JVM_OPC_astore = 58,
- JVM_OPC_istore_0 = 59,
- JVM_OPC_istore_1 = 60,
- JVM_OPC_istore_2 = 61,
- JVM_OPC_istore_3 = 62,
- JVM_OPC_lstore_0 = 63,
- JVM_OPC_lstore_1 = 64,
- JVM_OPC_lstore_2 = 65,
- JVM_OPC_lstore_3 = 66,
- JVM_OPC_fstore_0 = 67,
- JVM_OPC_fstore_1 = 68,
- JVM_OPC_fstore_2 = 69,
- JVM_OPC_fstore_3 = 70,
- JVM_OPC_dstore_0 = 71,
- JVM_OPC_dstore_1 = 72,
- JVM_OPC_dstore_2 = 73,
- JVM_OPC_dstore_3 = 74,
- JVM_OPC_astore_0 = 75,
- JVM_OPC_astore_1 = 76,
- JVM_OPC_astore_2 = 77,
- JVM_OPC_astore_3 = 78,
- JVM_OPC_iastore = 79,
- JVM_OPC_lastore = 80,
- JVM_OPC_fastore = 81,
- JVM_OPC_dastore = 82,
- JVM_OPC_aastore = 83,
- JVM_OPC_bastore = 84,
- JVM_OPC_castore = 85,
- JVM_OPC_sastore = 86,
- JVM_OPC_pop = 87,
- JVM_OPC_pop2 = 88,
- JVM_OPC_dup = 89,
- JVM_OPC_dup_x1 = 90,
- JVM_OPC_dup_x2 = 91,
- JVM_OPC_dup2 = 92,
- JVM_OPC_dup2_x1 = 93,
- JVM_OPC_dup2_x2 = 94,
- JVM_OPC_swap = 95,
- JVM_OPC_iadd = 96,
- JVM_OPC_ladd = 97,
- JVM_OPC_fadd = 98,
- JVM_OPC_dadd = 99,
- JVM_OPC_isub = 100,
- JVM_OPC_lsub = 101,
- JVM_OPC_fsub = 102,
- JVM_OPC_dsub = 103,
- JVM_OPC_imul = 104,
- JVM_OPC_lmul = 105,
- JVM_OPC_fmul = 106,
- JVM_OPC_dmul = 107,
- JVM_OPC_idiv = 108,
- JVM_OPC_ldiv = 109,
- JVM_OPC_fdiv = 110,
- JVM_OPC_ddiv = 111,
- JVM_OPC_irem = 112,
- JVM_OPC_lrem = 113,
- JVM_OPC_frem = 114,
- JVM_OPC_drem = 115,
- JVM_OPC_ineg = 116,
- JVM_OPC_lneg = 117,
- JVM_OPC_fneg = 118,
- JVM_OPC_dneg = 119,
- JVM_OPC_ishl = 120,
- JVM_OPC_lshl = 121,
- JVM_OPC_ishr = 122,
- JVM_OPC_lshr = 123,
- JVM_OPC_iushr = 124,
- JVM_OPC_lushr = 125,
- JVM_OPC_iand = 126,
- JVM_OPC_land = 127,
- JVM_OPC_ior = 128,
- JVM_OPC_lor = 129,
- JVM_OPC_ixor = 130,
- JVM_OPC_lxor = 131,
- JVM_OPC_iinc = 132,
- JVM_OPC_i2l = 133,
- JVM_OPC_i2f = 134,
- JVM_OPC_i2d = 135,
- JVM_OPC_l2i = 136,
- JVM_OPC_l2f = 137,
- JVM_OPC_l2d = 138,
- JVM_OPC_f2i = 139,
- JVM_OPC_f2l = 140,
- JVM_OPC_f2d = 141,
- JVM_OPC_d2i = 142,
- JVM_OPC_d2l = 143,
- JVM_OPC_d2f = 144,
- JVM_OPC_i2b = 145,
- JVM_OPC_i2c = 146,
- JVM_OPC_i2s = 147,
- JVM_OPC_lcmp = 148,
- JVM_OPC_fcmpl = 149,
- JVM_OPC_fcmpg = 150,
- JVM_OPC_dcmpl = 151,
- JVM_OPC_dcmpg = 152,
- JVM_OPC_ifeq = 153,
- JVM_OPC_ifne = 154,
- JVM_OPC_iflt = 155,
- JVM_OPC_ifge = 156,
- JVM_OPC_ifgt = 157,
- JVM_OPC_ifle = 158,
- JVM_OPC_if_icmpeq = 159,
- JVM_OPC_if_icmpne = 160,
- JVM_OPC_if_icmplt = 161,
- JVM_OPC_if_icmpge = 162,
- JVM_OPC_if_icmpgt = 163,
- JVM_OPC_if_icmple = 164,
- JVM_OPC_if_acmpeq = 165,
- JVM_OPC_if_acmpne = 166,
- JVM_OPC_goto = 167,
- JVM_OPC_jsr = 168,
- JVM_OPC_ret = 169,
- JVM_OPC_tableswitch = 170,
- JVM_OPC_lookupswitch = 171,
- JVM_OPC_ireturn = 172,
- JVM_OPC_lreturn = 173,
- JVM_OPC_freturn = 174,
- JVM_OPC_dreturn = 175,
- JVM_OPC_areturn = 176,
- JVM_OPC_return = 177,
- JVM_OPC_getstatic = 178,
- JVM_OPC_putstatic = 179,
- JVM_OPC_getfield = 180,
- JVM_OPC_putfield = 181,
- JVM_OPC_invokevirtual = 182,
- JVM_OPC_invokespecial = 183,
- JVM_OPC_invokestatic = 184,
- JVM_OPC_invokeinterface = 185,
- JVM_OPC_invokedynamic = 186,
- JVM_OPC_new = 187,
- JVM_OPC_newarray = 188,
- JVM_OPC_anewarray = 189,
- JVM_OPC_arraylength = 190,
- JVM_OPC_athrow = 191,
- JVM_OPC_checkcast = 192,
- JVM_OPC_instanceof = 193,
- JVM_OPC_monitorenter = 194,
- JVM_OPC_monitorexit = 195,
- JVM_OPC_wide = 196,
- JVM_OPC_multianewarray = 197,
- JVM_OPC_ifnull = 198,
- JVM_OPC_ifnonnull = 199,
- JVM_OPC_goto_w = 200,
- JVM_OPC_jsr_w = 201,
- JVM_OPC_MAX = 201
-};
-
-/* Opcode length initializer, use with something like:
- * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
- */
-#define JVM_OPCODE_LENGTH_INITIALIZER { \
- 1, /* nop */ \
- 1, /* aconst_null */ \
- 1, /* iconst_m1 */ \
- 1, /* iconst_0 */ \
- 1, /* iconst_1 */ \
- 1, /* iconst_2 */ \
- 1, /* iconst_3 */ \
- 1, /* iconst_4 */ \
- 1, /* iconst_5 */ \
- 1, /* lconst_0 */ \
- 1, /* lconst_1 */ \
- 1, /* fconst_0 */ \
- 1, /* fconst_1 */ \
- 1, /* fconst_2 */ \
- 1, /* dconst_0 */ \
- 1, /* dconst_1 */ \
- 2, /* bipush */ \
- 3, /* sipush */ \
- 2, /* ldc */ \
- 3, /* ldc_w */ \
- 3, /* ldc2_w */ \
- 2, /* iload */ \
- 2, /* lload */ \
- 2, /* fload */ \
- 2, /* dload */ \
- 2, /* aload */ \
- 1, /* iload_0 */ \
- 1, /* iload_1 */ \
- 1, /* iload_2 */ \
- 1, /* iload_3 */ \
- 1, /* lload_0 */ \
- 1, /* lload_1 */ \
- 1, /* lload_2 */ \
- 1, /* lload_3 */ \
- 1, /* fload_0 */ \
- 1, /* fload_1 */ \
- 1, /* fload_2 */ \
- 1, /* fload_3 */ \
- 1, /* dload_0 */ \
- 1, /* dload_1 */ \
- 1, /* dload_2 */ \
- 1, /* dload_3 */ \
- 1, /* aload_0 */ \
- 1, /* aload_1 */ \
- 1, /* aload_2 */ \
- 1, /* aload_3 */ \
- 1, /* iaload */ \
- 1, /* laload */ \
- 1, /* faload */ \
- 1, /* daload */ \
- 1, /* aaload */ \
- 1, /* baload */ \
- 1, /* caload */ \
- 1, /* saload */ \
- 2, /* istore */ \
- 2, /* lstore */ \
- 2, /* fstore */ \
- 2, /* dstore */ \
- 2, /* astore */ \
- 1, /* istore_0 */ \
- 1, /* istore_1 */ \
- 1, /* istore_2 */ \
- 1, /* istore_3 */ \
- 1, /* lstore_0 */ \
- 1, /* lstore_1 */ \
- 1, /* lstore_2 */ \
- 1, /* lstore_3 */ \
- 1, /* fstore_0 */ \
- 1, /* fstore_1 */ \
- 1, /* fstore_2 */ \
- 1, /* fstore_3 */ \
- 1, /* dstore_0 */ \
- 1, /* dstore_1 */ \
- 1, /* dstore_2 */ \
- 1, /* dstore_3 */ \
- 1, /* astore_0 */ \
- 1, /* astore_1 */ \
- 1, /* astore_2 */ \
- 1, /* astore_3 */ \
- 1, /* iastore */ \
- 1, /* lastore */ \
- 1, /* fastore */ \
- 1, /* dastore */ \
- 1, /* aastore */ \
- 1, /* bastore */ \
- 1, /* castore */ \
- 1, /* sastore */ \
- 1, /* pop */ \
- 1, /* pop2 */ \
- 1, /* dup */ \
- 1, /* dup_x1 */ \
- 1, /* dup_x2 */ \
- 1, /* dup2 */ \
- 1, /* dup2_x1 */ \
- 1, /* dup2_x2 */ \
- 1, /* swap */ \
- 1, /* iadd */ \
- 1, /* ladd */ \
- 1, /* fadd */ \
- 1, /* dadd */ \
- 1, /* isub */ \
- 1, /* lsub */ \
- 1, /* fsub */ \
- 1, /* dsub */ \
- 1, /* imul */ \
- 1, /* lmul */ \
- 1, /* fmul */ \
- 1, /* dmul */ \
- 1, /* idiv */ \
- 1, /* ldiv */ \
- 1, /* fdiv */ \
- 1, /* ddiv */ \
- 1, /* irem */ \
- 1, /* lrem */ \
- 1, /* frem */ \
- 1, /* drem */ \
- 1, /* ineg */ \
- 1, /* lneg */ \
- 1, /* fneg */ \
- 1, /* dneg */ \
- 1, /* ishl */ \
- 1, /* lshl */ \
- 1, /* ishr */ \
- 1, /* lshr */ \
- 1, /* iushr */ \
- 1, /* lushr */ \
- 1, /* iand */ \
- 1, /* land */ \
- 1, /* ior */ \
- 1, /* lor */ \
- 1, /* ixor */ \
- 1, /* lxor */ \
- 3, /* iinc */ \
- 1, /* i2l */ \
- 1, /* i2f */ \
- 1, /* i2d */ \
- 1, /* l2i */ \
- 1, /* l2f */ \
- 1, /* l2d */ \
- 1, /* f2i */ \
- 1, /* f2l */ \
- 1, /* f2d */ \
- 1, /* d2i */ \
- 1, /* d2l */ \
- 1, /* d2f */ \
- 1, /* i2b */ \
- 1, /* i2c */ \
- 1, /* i2s */ \
- 1, /* lcmp */ \
- 1, /* fcmpl */ \
- 1, /* fcmpg */ \
- 1, /* dcmpl */ \
- 1, /* dcmpg */ \
- 3, /* ifeq */ \
- 3, /* ifne */ \
- 3, /* iflt */ \
- 3, /* ifge */ \
- 3, /* ifgt */ \
- 3, /* ifle */ \
- 3, /* if_icmpeq */ \
- 3, /* if_icmpne */ \
- 3, /* if_icmplt */ \
- 3, /* if_icmpge */ \
- 3, /* if_icmpgt */ \
- 3, /* if_icmple */ \
- 3, /* if_acmpeq */ \
- 3, /* if_acmpne */ \
- 3, /* goto */ \
- 3, /* jsr */ \
- 2, /* ret */ \
- 99, /* tableswitch */ \
- 99, /* lookupswitch */ \
- 1, /* ireturn */ \
- 1, /* lreturn */ \
- 1, /* freturn */ \
- 1, /* dreturn */ \
- 1, /* areturn */ \
- 1, /* return */ \
- 3, /* getstatic */ \
- 3, /* putstatic */ \
- 3, /* getfield */ \
- 3, /* putfield */ \
- 3, /* invokevirtual */ \
- 3, /* invokespecial */ \
- 3, /* invokestatic */ \
- 5, /* invokeinterface */ \
- 5, /* invokedynamic */ \
- 3, /* new */ \
- 2, /* newarray */ \
- 3, /* anewarray */ \
- 1, /* arraylength */ \
- 1, /* athrow */ \
- 3, /* checkcast */ \
- 3, /* instanceof */ \
- 1, /* monitorenter */ \
- 1, /* monitorexit */ \
- 0, /* wide */ \
- 4, /* multianewarray */ \
- 3, /* ifnull */ \
- 3, /* ifnonnull */ \
- 5, /* goto_w */ \
- 5 /* jsr_w */ \
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* CLASSFILE_CONSTANTS */
diff --git a/jni/linux/jawt.h b/jni/linux/jawt.h
deleted file mode 100644
index 2079b0b..0000000
--- a/jni/linux/jawt.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JAWT_H_
-#define _JAVASOFT_JAWT_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * AWT native interface.
- *
- * The AWT native interface allows a native C or C++ application a means
- * by which to access native structures in AWT. This is to facilitate moving
- * legacy C and C++ applications to Java and to target the needs of the
- * developers who need to do their own native rendering to canvases
- * for performance or other reasons.
- *
- * Conversely it also provides mechanisms for an application which already
- * has a native window to provide that to AWT for AWT rendering.
- *
- * Since every platform may be different in its native data structures
- * and APIs for windowing systems the application must necessarily
- * provided per-platform source and compile and deliver per-platform
- * native code to use this API.
- *
- * These interfaces are not part of the Java SE specification and
- * a VM is not required to implement this API. However it is strongly
- * recommended that all implementations which support headful AWT
- * also support these interfaces.
- *
- */
-
-/*
- * AWT Native Drawing Surface (JAWT_DrawingSurface).
- *
- * For each platform, there is a native drawing surface structure. This
- * platform-specific structure can be found in jawt_md.h. It is recommended
- * that additional platforms follow the same model. It is also recommended
- * that VMs on all platforms support the existing structures in jawt_md.h.
- *
- *******************
- * EXAMPLE OF USAGE:
- *******************
- *
- * In Win32, a programmer wishes to access the HWND of a canvas to perform
- * native rendering into it. The programmer has declared the paint() method
- * for their canvas subclass to be native:
- *
- *
- * MyCanvas.java:
- *
- * import java.awt.*;
- *
- * public class MyCanvas extends Canvas {
- *
- * static {
- * System.loadLibrary("mylib");
- * }
- *
- * public native void paint(Graphics g);
- * }
- *
- *
- * myfile.c:
- *
- * #include "jawt_md.h"
- * #include
- *
- * JNIEXPORT void JNICALL
- * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
- * {
- * JAWT awt;
- * JAWT_DrawingSurface* ds;
- * JAWT_DrawingSurfaceInfo* dsi;
- * JAWT_Win32DrawingSurfaceInfo* dsi_win;
- * jboolean result;
- * jint lock;
- *
- * // Get the AWT. Request version 9 to access features in that release.
- * awt.version = JAWT_VERSION_9;
- * result = JAWT_GetAWT(env, &awt);
- * assert(result != JNI_FALSE);
- *
- * // Get the drawing surface
- * ds = awt.GetDrawingSurface(env, canvas);
- * assert(ds != NULL);
- *
- * // Lock the drawing surface
- * lock = ds->Lock(ds);
- * assert((lock & JAWT_LOCK_ERROR) == 0);
- *
- * // Get the drawing surface info
- * dsi = ds->GetDrawingSurfaceInfo(ds);
- *
- * // Get the platform-specific drawing info
- * dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
- *
- * //////////////////////////////
- * // !!! DO PAINTING HERE !!! //
- * //////////////////////////////
- *
- * // Free the drawing surface info
- * ds->FreeDrawingSurfaceInfo(dsi);
- *
- * // Unlock the drawing surface
- * ds->Unlock(ds);
- *
- * // Free the drawing surface
- * awt.FreeDrawingSurface(ds);
- * }
- *
- */
-
-/*
- * JAWT_Rectangle
- * Structure for a native rectangle.
- */
-typedef struct jawt_Rectangle {
- jint x;
- jint y;
- jint width;
- jint height;
-} JAWT_Rectangle;
-
-struct jawt_DrawingSurface;
-
-/*
- * JAWT_DrawingSurfaceInfo
- * Structure for containing the underlying drawing information of a component.
- */
-typedef struct jawt_DrawingSurfaceInfo {
- /*
- * Pointer to the platform-specific information. This can be safely
- * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
- * JAWT_X11DrawingSurfaceInfo on Linux and Solaris. On Mac OS X this is a
- * pointer to a NSObject that conforms to the JAWT_SurfaceLayers
- * protocol. See jawt_md.h for details.
- */
- void* platformInfo;
- /* Cached pointer to the underlying drawing surface */
- struct jawt_DrawingSurface* ds;
- /* Bounding rectangle of the drawing surface */
- JAWT_Rectangle bounds;
- /* Number of rectangles in the clip */
- jint clipSize;
- /* Clip rectangle array */
- JAWT_Rectangle* clip;
-} JAWT_DrawingSurfaceInfo;
-
-#define JAWT_LOCK_ERROR 0x00000001
-#define JAWT_LOCK_CLIP_CHANGED 0x00000002
-#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004
-#define JAWT_LOCK_SURFACE_CHANGED 0x00000008
-
-/*
- * JAWT_DrawingSurface
- * Structure for containing the underlying drawing information of a component.
- * All operations on a JAWT_DrawingSurface MUST be performed from the same
- * thread as the call to GetDrawingSurface.
- */
-typedef struct jawt_DrawingSurface {
- /*
- * Cached reference to the Java environment of the calling thread.
- * If Lock(), Unlock(), GetDrawingSurfaceInfo() or
- * FreeDrawingSurfaceInfo() are called from a different thread,
- * this data member should be set before calling those functions.
- */
- JNIEnv* env;
- /* Cached reference to the target object */
- jobject target;
- /*
- * Lock the surface of the target component for native rendering.
- * When finished drawing, the surface must be unlocked with
- * Unlock(). This function returns a bitmask with one or more of the
- * following values:
- *
- * JAWT_LOCK_ERROR - When an error has occurred and the surface could not
- * be locked.
- *
- * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
- *
- * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
- *
- * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
- */
- jint (JNICALL *Lock)
- (struct jawt_DrawingSurface* ds);
- /*
- * Get the drawing surface info.
- * The value returned may be cached, but the values may change if
- * additional calls to Lock() or Unlock() are made.
- * Lock() must be called before this can return a valid value.
- * Returns NULL if an error has occurred.
- * When finished with the returned value, FreeDrawingSurfaceInfo must be
- * called.
- */
- JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
- (struct jawt_DrawingSurface* ds);
- /*
- * Free the drawing surface info.
- */
- void (JNICALL *FreeDrawingSurfaceInfo)
- (JAWT_DrawingSurfaceInfo* dsi);
- /*
- * Unlock the drawing surface of the target component for native rendering.
- */
- void (JNICALL *Unlock)
- (struct jawt_DrawingSurface* ds);
-} JAWT_DrawingSurface;
-
-/*
- * JAWT
- * Structure for containing native AWT functions.
- */
-typedef struct jawt {
- /*
- * Version of this structure. This must always be set before
- * calling JAWT_GetAWT(). It affects the functions returned.
- * Must be one of the known pre-defined versions.
- */
- jint version;
- /*
- * Return a drawing surface from a target jobject. This value
- * may be cached.
- * Returns NULL if an error has occurred.
- * Target must be a java.awt.Component (should be a Canvas
- * or Window for native rendering).
- * FreeDrawingSurface() must be called when finished with the
- * returned JAWT_DrawingSurface.
- */
- JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
- (JNIEnv* env, jobject target);
- /*
- * Free the drawing surface allocated in GetDrawingSurface.
- */
- void (JNICALL *FreeDrawingSurface)
- (JAWT_DrawingSurface* ds);
- /*
- * Since 1.4
- * Locks the entire AWT for synchronization purposes
- */
- void (JNICALL *Lock)(JNIEnv* env);
- /*
- * Since 1.4
- * Unlocks the entire AWT for synchronization purposes
- */
- void (JNICALL *Unlock)(JNIEnv* env);
- /*
- * Since 1.4
- * Returns a reference to a java.awt.Component from a native
- * platform handle. On Windows, this corresponds to an HWND;
- * on Solaris and Linux, this is a Drawable. For other platforms,
- * see the appropriate machine-dependent header file for a description.
- * The reference returned by this function is a local
- * reference that is only valid in this environment.
- * This function returns a NULL reference if no component could be
- * found with matching platform information.
- */
- jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
-
- /**
- * Since 9
- * Creates a java.awt.Frame placed in a native container. Container is
- * referenced by the native platform handle. For example on Windows this
- * corresponds to an HWND. For other platforms, see the appropriate
- * machine-dependent header file for a description. The reference returned
- * by this function is a local reference that is only valid in this
- * environment. This function returns a NULL reference if no frame could be
- * created with matching platform information.
- */
- jobject (JNICALL *CreateEmbeddedFrame) (JNIEnv *env, void* platformInfo);
-
- /**
- * Since 9
- * Moves and resizes the embedded frame. The new location of the top-left
- * corner is specified by x and y parameters relative to the native parent
- * component. The new size is specified by width and height.
- *
- * The embedded frame should be created by CreateEmbeddedFrame() method, or
- * this function will not have any effect.
- *
- * java.awt.Component.setLocation() and java.awt.Component.setBounds() for
- * EmbeddedFrame really don't move it within the native parent. These
- * methods always locate the embedded frame at (0, 0) for backward
- * compatibility. To allow moving embedded frames this method was
- * introduced, and it works just the same way as setLocation() and
- * setBounds() for usual, non-embedded components.
- *
- * Using usual get/setLocation() and get/setBounds() together with this new
- * method is not recommended.
- */
- void (JNICALL *SetBounds) (JNIEnv *env, jobject embeddedFrame,
- jint x, jint y, jint w, jint h);
- /**
- * Since 9
- * Synthesize a native message to activate or deactivate an EmbeddedFrame
- * window depending on the value of parameter doActivate, if "true"
- * activates the window; otherwise, deactivates the window.
- *
- * The embedded frame should be created by CreateEmbeddedFrame() method, or
- * this function will not have any effect.
- */
- void (JNICALL *SynthesizeWindowActivation) (JNIEnv *env,
- jobject embeddedFrame, jboolean doActivate);
-} JAWT;
-
-/*
- * Get the AWT native structure. This function returns JNI_FALSE if
- * an error occurs.
- */
-_JNI_IMPORT_OR_EXPORT_
-jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
-
-/*
- * Specify one of these constants as the JAWT.version
- * Specifying an earlier version will limit the available functions to
- * those provided in that earlier version of JAWT.
- * See the "Since" note on each API. Methods with no "Since"
- * may be presumed to be present in JAWT_VERSION_1_3.
- */
-#define JAWT_VERSION_1_3 0x00010003
-#define JAWT_VERSION_1_4 0x00010004
-#define JAWT_VERSION_1_7 0x00010007
-#define JAWT_VERSION_9 0x00090000
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !_JAVASOFT_JAWT_H_ */
diff --git a/jni/linux/jdwpTransport.h b/jni/linux/jdwpTransport.h
deleted file mode 100644
index cdbd04d..0000000
--- a/jni/linux/jdwpTransport.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Java Debug Wire Protocol Transport Service Provider Interface.
- */
-
-#ifndef JDWPTRANSPORT_H
-#define JDWPTRANSPORT_H
-
-#include "jni.h"
-
-enum {
- JDWPTRANSPORT_VERSION_1_0 = 0x00010000,
- JDWPTRANSPORT_VERSION_1_1 = 0x00010001
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct jdwpTransportNativeInterface_;
-
-struct _jdwpTransportEnv;
-
-#ifdef __cplusplus
-typedef _jdwpTransportEnv jdwpTransportEnv;
-#else
-typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
-#endif /* __cplusplus */
-
-/*
- * Errors. Universal errors with JVMTI/JVMDI equivalents keep the
- * values the same.
- */
-typedef enum {
- JDWPTRANSPORT_ERROR_NONE = 0,
- JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
- JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
- JDWPTRANSPORT_ERROR_INTERNAL = 113,
- JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
- JDWPTRANSPORT_ERROR_IO_ERROR = 202,
- JDWPTRANSPORT_ERROR_TIMEOUT = 203,
- JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
-} jdwpTransportError;
-
-
-/*
- * Structure to define capabilities
- */
-typedef struct {
- unsigned int can_timeout_attach :1;
- unsigned int can_timeout_accept :1;
- unsigned int can_timeout_handshake :1;
- unsigned int reserved3 :1;
- unsigned int reserved4 :1;
- unsigned int reserved5 :1;
- unsigned int reserved6 :1;
- unsigned int reserved7 :1;
- unsigned int reserved8 :1;
- unsigned int reserved9 :1;
- unsigned int reserved10 :1;
- unsigned int reserved11 :1;
- unsigned int reserved12 :1;
- unsigned int reserved13 :1;
- unsigned int reserved14 :1;
- unsigned int reserved15 :1;
-} JDWPTransportCapabilities;
-
-
-/*
- * Structures to define packet layout.
- *
- * See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
- */
-
-#define JDWP_HEADER_SIZE 11
-
-enum {
- /*
- * If additional flags are added that apply to jdwpCmdPacket,
- * then debugLoop.c: reader() will need to be updated to
- * accept more than JDWPTRANSPORT_FLAGS_NONE.
- */
- JDWPTRANSPORT_FLAGS_NONE = 0x0,
- JDWPTRANSPORT_FLAGS_REPLY = 0x80
-};
-
-typedef struct {
- jint len;
- jint id;
- jbyte flags;
- jbyte cmdSet;
- jbyte cmd;
- jbyte *data;
-} jdwpCmdPacket;
-
-typedef struct {
- jint len;
- jint id;
- jbyte flags;
- jshort errorCode;
- jbyte *data;
-} jdwpReplyPacket;
-
-typedef struct {
- union {
- jdwpCmdPacket cmd;
- jdwpReplyPacket reply;
- } type;
-} jdwpPacket;
-
-/*
- * JDWP functions called by the transport.
- */
-typedef struct jdwpTransportCallback {
- void *(*alloc)(jint numBytes); /* Call this for all allocations */
- void (*free)(void *buffer); /* Call this for all deallocations */
-} jdwpTransportCallback;
-
-typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm,
- jdwpTransportCallback *callback,
- jint version,
- jdwpTransportEnv** env);
-
-/*
- * JDWP transport configuration from the agent.
- */
-typedef struct jdwpTransportConfiguration {
- /* Field added in JDWPTRANSPORT_VERSION_1_1: */
- const char* allowed_peers; /* Peers allowed for connection */
-} jdwpTransportConfiguration;
-
-
-/* Function Interface */
-
-struct jdwpTransportNativeInterface_ {
- /* 1 : RESERVED */
- void *reserved1;
-
- /* 2 : Get Capabilities */
- jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
- JDWPTransportCapabilities *capabilities_ptr);
-
- /* 3 : Attach */
- jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
- const char* address,
- jlong attach_timeout,
- jlong handshake_timeout);
-
- /* 4: StartListening */
- jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
- const char* address,
- char** actual_address);
-
- /* 5: StopListening */
- jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
-
- /* 6: Accept */
- jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
- jlong accept_timeout,
- jlong handshake_timeout);
-
- /* 7: IsOpen */
- jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
-
- /* 8: Close */
- jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
-
- /* 9: ReadPacket */
- jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
- jdwpPacket *pkt);
-
- /* 10: Write Packet */
- jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
- const jdwpPacket* pkt);
-
- /* 11: GetLastError */
- jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
- char** error);
-
- /* 12: SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
- jdwpTransportError (JNICALL *SetTransportConfiguration)(jdwpTransportEnv* env,
- jdwpTransportConfiguration *config);
-};
-
-
-/*
- * Use inlined functions so that C++ code can use syntax such as
- * env->Attach("mymachine:5000", 10*1000, 0);
- *
- * rather than using C's :-
- *
- * (*env)->Attach(env, "mymachine:5000", 10*1000, 0);
- */
-struct _jdwpTransportEnv {
- const struct jdwpTransportNativeInterface_ *functions;
-#ifdef __cplusplus
-
- jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
- return functions->GetCapabilities(this, capabilities_ptr);
- }
-
- jdwpTransportError Attach(const char* address, jlong attach_timeout,
- jlong handshake_timeout) {
- return functions->Attach(this, address, attach_timeout, handshake_timeout);
- }
-
- jdwpTransportError StartListening(const char* address,
- char** actual_address) {
- return functions->StartListening(this, address, actual_address);
- }
-
- jdwpTransportError StopListening(void) {
- return functions->StopListening(this);
- }
-
- jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
- return functions->Accept(this, accept_timeout, handshake_timeout);
- }
-
- jboolean IsOpen(void) {
- return functions->IsOpen(this);
- }
-
- jdwpTransportError Close(void) {
- return functions->Close(this);
- }
-
- jdwpTransportError ReadPacket(jdwpPacket *pkt) {
- return functions->ReadPacket(this, pkt);
- }
-
- jdwpTransportError WritePacket(const jdwpPacket* pkt) {
- return functions->WritePacket(this, pkt);
- }
-
- jdwpTransportError GetLastError(char** error) {
- return functions->GetLastError(this, error);
- }
-
- /* SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
- jdwpTransportError SetTransportConfiguration(jdwpTransportEnv* env,
- return functions->SetTransportConfiguration(this, config);
- }
-
-#endif /* __cplusplus */
-};
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* JDWPTRANSPORT_H */
diff --git a/jni/linux/jni.h b/jni/linux/jni.h
deleted file mode 100644
index aa0cdf5..0000000
--- a/jni/linux/jni.h
+++ /dev/null
@@ -1,1987 +0,0 @@
-/*
- * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * We used part of Netscape's Java Runtime Interface (JRI) as the starting
- * point of our design and implementation.
- */
-
-/******************************************************************************
- * Java Runtime Interface
- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
- *****************************************************************************/
-
-#ifndef _JAVASOFT_JNI_H_
-#define _JAVASOFT_JNI_H_
-
-#include
-#include
-
-/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
- and jlong */
-
-#include "jni_md.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * JNI Types
- */
-
-#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
-
-typedef unsigned char jboolean;
-typedef unsigned short jchar;
-typedef short jshort;
-typedef float jfloat;
-typedef double jdouble;
-
-typedef jint jsize;
-
-#ifdef __cplusplus
-
-class _jobject {};
-class _jclass : public _jobject {};
-class _jthrowable : public _jobject {};
-class _jstring : public _jobject {};
-class _jarray : public _jobject {};
-class _jbooleanArray : public _jarray {};
-class _jbyteArray : public _jarray {};
-class _jcharArray : public _jarray {};
-class _jshortArray : public _jarray {};
-class _jintArray : public _jarray {};
-class _jlongArray : public _jarray {};
-class _jfloatArray : public _jarray {};
-class _jdoubleArray : public _jarray {};
-class _jobjectArray : public _jarray {};
-
-typedef _jobject *jobject;
-typedef _jclass *jclass;
-typedef _jthrowable *jthrowable;
-typedef _jstring *jstring;
-typedef _jarray *jarray;
-typedef _jbooleanArray *jbooleanArray;
-typedef _jbyteArray *jbyteArray;
-typedef _jcharArray *jcharArray;
-typedef _jshortArray *jshortArray;
-typedef _jintArray *jintArray;
-typedef _jlongArray *jlongArray;
-typedef _jfloatArray *jfloatArray;
-typedef _jdoubleArray *jdoubleArray;
-typedef _jobjectArray *jobjectArray;
-
-#else
-
-struct _jobject;
-
-typedef struct _jobject *jobject;
-typedef jobject jclass;
-typedef jobject jthrowable;
-typedef jobject jstring;
-typedef jobject jarray;
-typedef jarray jbooleanArray;
-typedef jarray jbyteArray;
-typedef jarray jcharArray;
-typedef jarray jshortArray;
-typedef jarray jintArray;
-typedef jarray jlongArray;
-typedef jarray jfloatArray;
-typedef jarray jdoubleArray;
-typedef jarray jobjectArray;
-
-#endif
-
-typedef jobject jweak;
-
-typedef union jvalue {
- jboolean z;
- jbyte b;
- jchar c;
- jshort s;
- jint i;
- jlong j;
- jfloat f;
- jdouble d;
- jobject l;
-} jvalue;
-
-struct _jfieldID;
-typedef struct _jfieldID *jfieldID;
-
-struct _jmethodID;
-typedef struct _jmethodID *jmethodID;
-
-/* Return values from jobjectRefType */
-typedef enum _jobjectType {
- JNIInvalidRefType = 0,
- JNILocalRefType = 1,
- JNIGlobalRefType = 2,
- JNIWeakGlobalRefType = 3
-} jobjectRefType;
-
-
-#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
-
-/*
- * jboolean constants
- */
-
-#define JNI_FALSE 0
-#define JNI_TRUE 1
-
-/*
- * possible return values for JNI functions.
- */
-
-#define JNI_OK 0 /* success */
-#define JNI_ERR (-1) /* unknown error */
-#define JNI_EDETACHED (-2) /* thread detached from the VM */
-#define JNI_EVERSION (-3) /* JNI version error */
-#define JNI_ENOMEM (-4) /* not enough memory */
-#define JNI_EEXIST (-5) /* VM already created */
-#define JNI_EINVAL (-6) /* invalid arguments */
-
-/*
- * used in ReleaseScalarArrayElements
- */
-
-#define JNI_COMMIT 1
-#define JNI_ABORT 2
-
-/*
- * used in RegisterNatives to describe native method name, signature,
- * and function pointer.
- */
-
-typedef struct {
- char *name;
- char *signature;
- void *fnPtr;
-} JNINativeMethod;
-
-/*
- * JNI Native Method Interface.
- */
-
-struct JNINativeInterface_;
-
-struct JNIEnv_;
-
-#ifdef __cplusplus
-typedef JNIEnv_ JNIEnv;
-#else
-typedef const struct JNINativeInterface_ *JNIEnv;
-#endif
-
-/*
- * JNI Invocation Interface.
- */
-
-struct JNIInvokeInterface_;
-
-struct JavaVM_;
-
-#ifdef __cplusplus
-typedef JavaVM_ JavaVM;
-#else
-typedef const struct JNIInvokeInterface_ *JavaVM;
-#endif
-
-struct JNINativeInterface_ {
- void *reserved0;
- void *reserved1;
- void *reserved2;
-
- void *reserved3;
- jint (JNICALL *GetVersion)(JNIEnv *env);
-
- jclass (JNICALL *DefineClass)
- (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
- jsize len);
- jclass (JNICALL *FindClass)
- (JNIEnv *env, const char *name);
-
- jmethodID (JNICALL *FromReflectedMethod)
- (JNIEnv *env, jobject method);
- jfieldID (JNICALL *FromReflectedField)
- (JNIEnv *env, jobject field);
-
- jobject (JNICALL *ToReflectedMethod)
- (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
-
- jclass (JNICALL *GetSuperclass)
- (JNIEnv *env, jclass sub);
- jboolean (JNICALL *IsAssignableFrom)
- (JNIEnv *env, jclass sub, jclass sup);
-
- jobject (JNICALL *ToReflectedField)
- (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
-
- jint (JNICALL *Throw)
- (JNIEnv *env, jthrowable obj);
- jint (JNICALL *ThrowNew)
- (JNIEnv *env, jclass clazz, const char *msg);
- jthrowable (JNICALL *ExceptionOccurred)
- (JNIEnv *env);
- void (JNICALL *ExceptionDescribe)
- (JNIEnv *env);
- void (JNICALL *ExceptionClear)
- (JNIEnv *env);
- void (JNICALL *FatalError)
- (JNIEnv *env, const char *msg);
-
- jint (JNICALL *PushLocalFrame)
- (JNIEnv *env, jint capacity);
- jobject (JNICALL *PopLocalFrame)
- (JNIEnv *env, jobject result);
-
- jobject (JNICALL *NewGlobalRef)
- (JNIEnv *env, jobject lobj);
- void (JNICALL *DeleteGlobalRef)
- (JNIEnv *env, jobject gref);
- void (JNICALL *DeleteLocalRef)
- (JNIEnv *env, jobject obj);
- jboolean (JNICALL *IsSameObject)
- (JNIEnv *env, jobject obj1, jobject obj2);
- jobject (JNICALL *NewLocalRef)
- (JNIEnv *env, jobject ref);
- jint (JNICALL *EnsureLocalCapacity)
- (JNIEnv *env, jint capacity);
-
- jobject (JNICALL *AllocObject)
- (JNIEnv *env, jclass clazz);
- jobject (JNICALL *NewObject)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jobject (JNICALL *NewObjectV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jobject (JNICALL *NewObjectA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jclass (JNICALL *GetObjectClass)
- (JNIEnv *env, jobject obj);
- jboolean (JNICALL *IsInstanceOf)
- (JNIEnv *env, jobject obj, jclass clazz);
-
- jmethodID (JNICALL *GetMethodID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
- jobject (JNICALL *CallObjectMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jobject (JNICALL *CallObjectMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jobject (JNICALL *CallObjectMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
- jboolean (JNICALL *CallBooleanMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jboolean (JNICALL *CallBooleanMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jboolean (JNICALL *CallBooleanMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
- jbyte (JNICALL *CallByteMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jbyte (JNICALL *CallByteMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jbyte (JNICALL *CallByteMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jchar (JNICALL *CallCharMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jchar (JNICALL *CallCharMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jchar (JNICALL *CallCharMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jshort (JNICALL *CallShortMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jshort (JNICALL *CallShortMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jshort (JNICALL *CallShortMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jint (JNICALL *CallIntMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jint (JNICALL *CallIntMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jint (JNICALL *CallIntMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jlong (JNICALL *CallLongMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jlong (JNICALL *CallLongMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jlong (JNICALL *CallLongMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jfloat (JNICALL *CallFloatMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jfloat (JNICALL *CallFloatMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jfloat (JNICALL *CallFloatMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jdouble (JNICALL *CallDoubleMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jdouble (JNICALL *CallDoubleMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jdouble (JNICALL *CallDoubleMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- void (JNICALL *CallVoidMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- void (JNICALL *CallVoidMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- void (JNICALL *CallVoidMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
- jobject (JNICALL *CallNonvirtualObjectMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jobject (JNICALL *CallNonvirtualObjectMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jobject (JNICALL *CallNonvirtualObjectMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue * args);
-
- jboolean (JNICALL *CallNonvirtualBooleanMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jboolean (JNICALL *CallNonvirtualBooleanMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jboolean (JNICALL *CallNonvirtualBooleanMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue * args);
-
- jbyte (JNICALL *CallNonvirtualByteMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jbyte (JNICALL *CallNonvirtualByteMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jbyte (JNICALL *CallNonvirtualByteMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jchar (JNICALL *CallNonvirtualCharMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jchar (JNICALL *CallNonvirtualCharMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jchar (JNICALL *CallNonvirtualCharMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jshort (JNICALL *CallNonvirtualShortMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jshort (JNICALL *CallNonvirtualShortMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jshort (JNICALL *CallNonvirtualShortMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jint (JNICALL *CallNonvirtualIntMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jint (JNICALL *CallNonvirtualIntMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jint (JNICALL *CallNonvirtualIntMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jlong (JNICALL *CallNonvirtualLongMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jlong (JNICALL *CallNonvirtualLongMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jlong (JNICALL *CallNonvirtualLongMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jfloat (JNICALL *CallNonvirtualFloatMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jfloat (JNICALL *CallNonvirtualFloatMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jfloat (JNICALL *CallNonvirtualFloatMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jdouble (JNICALL *CallNonvirtualDoubleMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jdouble (JNICALL *CallNonvirtualDoubleMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jdouble (JNICALL *CallNonvirtualDoubleMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- void (JNICALL *CallNonvirtualVoidMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- void (JNICALL *CallNonvirtualVoidMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- void (JNICALL *CallNonvirtualVoidMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue * args);
-
- jfieldID (JNICALL *GetFieldID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
- jobject (JNICALL *GetObjectField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jboolean (JNICALL *GetBooleanField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jbyte (JNICALL *GetByteField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jchar (JNICALL *GetCharField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jshort (JNICALL *GetShortField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jint (JNICALL *GetIntField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jlong (JNICALL *GetLongField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jfloat (JNICALL *GetFloatField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jdouble (JNICALL *GetDoubleField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
-
- void (JNICALL *SetObjectField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
- void (JNICALL *SetBooleanField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
- void (JNICALL *SetByteField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
- void (JNICALL *SetCharField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
- void (JNICALL *SetShortField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
- void (JNICALL *SetIntField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
- void (JNICALL *SetLongField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
- void (JNICALL *SetFloatField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
- void (JNICALL *SetDoubleField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
-
- jmethodID (JNICALL *GetStaticMethodID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
- jobject (JNICALL *CallStaticObjectMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jobject (JNICALL *CallStaticObjectMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jobject (JNICALL *CallStaticObjectMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jboolean (JNICALL *CallStaticBooleanMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jboolean (JNICALL *CallStaticBooleanMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jboolean (JNICALL *CallStaticBooleanMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jbyte (JNICALL *CallStaticByteMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jbyte (JNICALL *CallStaticByteMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jbyte (JNICALL *CallStaticByteMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jchar (JNICALL *CallStaticCharMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jchar (JNICALL *CallStaticCharMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jchar (JNICALL *CallStaticCharMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jshort (JNICALL *CallStaticShortMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jshort (JNICALL *CallStaticShortMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jshort (JNICALL *CallStaticShortMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jint (JNICALL *CallStaticIntMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jint (JNICALL *CallStaticIntMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jint (JNICALL *CallStaticIntMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jlong (JNICALL *CallStaticLongMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jlong (JNICALL *CallStaticLongMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jlong (JNICALL *CallStaticLongMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jfloat (JNICALL *CallStaticFloatMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jfloat (JNICALL *CallStaticFloatMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jfloat (JNICALL *CallStaticFloatMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jdouble (JNICALL *CallStaticDoubleMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jdouble (JNICALL *CallStaticDoubleMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jdouble (JNICALL *CallStaticDoubleMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- void (JNICALL *CallStaticVoidMethod)
- (JNIEnv *env, jclass cls, jmethodID methodID, ...);
- void (JNICALL *CallStaticVoidMethodV)
- (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
- void (JNICALL *CallStaticVoidMethodA)
- (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
-
- jfieldID (JNICALL *GetStaticFieldID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
- jobject (JNICALL *GetStaticObjectField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jboolean (JNICALL *GetStaticBooleanField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jbyte (JNICALL *GetStaticByteField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jchar (JNICALL *GetStaticCharField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jshort (JNICALL *GetStaticShortField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jint (JNICALL *GetStaticIntField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jlong (JNICALL *GetStaticLongField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jfloat (JNICALL *GetStaticFloatField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jdouble (JNICALL *GetStaticDoubleField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
-
- void (JNICALL *SetStaticObjectField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
- void (JNICALL *SetStaticBooleanField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
- void (JNICALL *SetStaticByteField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
- void (JNICALL *SetStaticCharField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
- void (JNICALL *SetStaticShortField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
- void (JNICALL *SetStaticIntField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
- void (JNICALL *SetStaticLongField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
- void (JNICALL *SetStaticFloatField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
- void (JNICALL *SetStaticDoubleField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
-
- jstring (JNICALL *NewString)
- (JNIEnv *env, const jchar *unicode, jsize len);
- jsize (JNICALL *GetStringLength)
- (JNIEnv *env, jstring str);
- const jchar *(JNICALL *GetStringChars)
- (JNIEnv *env, jstring str, jboolean *isCopy);
- void (JNICALL *ReleaseStringChars)
- (JNIEnv *env, jstring str, const jchar *chars);
-
- jstring (JNICALL *NewStringUTF)
- (JNIEnv *env, const char *utf);
- jsize (JNICALL *GetStringUTFLength)
- (JNIEnv *env, jstring str);
- const char* (JNICALL *GetStringUTFChars)
- (JNIEnv *env, jstring str, jboolean *isCopy);
- void (JNICALL *ReleaseStringUTFChars)
- (JNIEnv *env, jstring str, const char* chars);
-
-
- jsize (JNICALL *GetArrayLength)
- (JNIEnv *env, jarray array);
-
- jobjectArray (JNICALL *NewObjectArray)
- (JNIEnv *env, jsize len, jclass clazz, jobject init);
- jobject (JNICALL *GetObjectArrayElement)
- (JNIEnv *env, jobjectArray array, jsize index);
- void (JNICALL *SetObjectArrayElement)
- (JNIEnv *env, jobjectArray array, jsize index, jobject val);
-
- jbooleanArray (JNICALL *NewBooleanArray)
- (JNIEnv *env, jsize len);
- jbyteArray (JNICALL *NewByteArray)
- (JNIEnv *env, jsize len);
- jcharArray (JNICALL *NewCharArray)
- (JNIEnv *env, jsize len);
- jshortArray (JNICALL *NewShortArray)
- (JNIEnv *env, jsize len);
- jintArray (JNICALL *NewIntArray)
- (JNIEnv *env, jsize len);
- jlongArray (JNICALL *NewLongArray)
- (JNIEnv *env, jsize len);
- jfloatArray (JNICALL *NewFloatArray)
- (JNIEnv *env, jsize len);
- jdoubleArray (JNICALL *NewDoubleArray)
- (JNIEnv *env, jsize len);
-
- jboolean * (JNICALL *GetBooleanArrayElements)
- (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
- jbyte * (JNICALL *GetByteArrayElements)
- (JNIEnv *env, jbyteArray array, jboolean *isCopy);
- jchar * (JNICALL *GetCharArrayElements)
- (JNIEnv *env, jcharArray array, jboolean *isCopy);
- jshort * (JNICALL *GetShortArrayElements)
- (JNIEnv *env, jshortArray array, jboolean *isCopy);
- jint * (JNICALL *GetIntArrayElements)
- (JNIEnv *env, jintArray array, jboolean *isCopy);
- jlong * (JNICALL *GetLongArrayElements)
- (JNIEnv *env, jlongArray array, jboolean *isCopy);
- jfloat * (JNICALL *GetFloatArrayElements)
- (JNIEnv *env, jfloatArray array, jboolean *isCopy);
- jdouble * (JNICALL *GetDoubleArrayElements)
- (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
-
- void (JNICALL *ReleaseBooleanArrayElements)
- (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
- void (JNICALL *ReleaseByteArrayElements)
- (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
- void (JNICALL *ReleaseCharArrayElements)
- (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
- void (JNICALL *ReleaseShortArrayElements)
- (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
- void (JNICALL *ReleaseIntArrayElements)
- (JNIEnv *env, jintArray array, jint *elems, jint mode);
- void (JNICALL *ReleaseLongArrayElements)
- (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
- void (JNICALL *ReleaseFloatArrayElements)
- (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
- void (JNICALL *ReleaseDoubleArrayElements)
- (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
-
- void (JNICALL *GetBooleanArrayRegion)
- (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
- void (JNICALL *GetByteArrayRegion)
- (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
- void (JNICALL *GetCharArrayRegion)
- (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
- void (JNICALL *GetShortArrayRegion)
- (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
- void (JNICALL *GetIntArrayRegion)
- (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
- void (JNICALL *GetLongArrayRegion)
- (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
- void (JNICALL *GetFloatArrayRegion)
- (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
- void (JNICALL *GetDoubleArrayRegion)
- (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
-
- void (JNICALL *SetBooleanArrayRegion)
- (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
- void (JNICALL *SetByteArrayRegion)
- (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
- void (JNICALL *SetCharArrayRegion)
- (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
- void (JNICALL *SetShortArrayRegion)
- (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
- void (JNICALL *SetIntArrayRegion)
- (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
- void (JNICALL *SetLongArrayRegion)
- (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
- void (JNICALL *SetFloatArrayRegion)
- (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
- void (JNICALL *SetDoubleArrayRegion)
- (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
-
- jint (JNICALL *RegisterNatives)
- (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
- jint nMethods);
- jint (JNICALL *UnregisterNatives)
- (JNIEnv *env, jclass clazz);
-
- jint (JNICALL *MonitorEnter)
- (JNIEnv *env, jobject obj);
- jint (JNICALL *MonitorExit)
- (JNIEnv *env, jobject obj);
-
- jint (JNICALL *GetJavaVM)
- (JNIEnv *env, JavaVM **vm);
-
- void (JNICALL *GetStringRegion)
- (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
- void (JNICALL *GetStringUTFRegion)
- (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
-
- void * (JNICALL *GetPrimitiveArrayCritical)
- (JNIEnv *env, jarray array, jboolean *isCopy);
- void (JNICALL *ReleasePrimitiveArrayCritical)
- (JNIEnv *env, jarray array, void *carray, jint mode);
-
- const jchar * (JNICALL *GetStringCritical)
- (JNIEnv *env, jstring string, jboolean *isCopy);
- void (JNICALL *ReleaseStringCritical)
- (JNIEnv *env, jstring string, const jchar *cstring);
-
- jweak (JNICALL *NewWeakGlobalRef)
- (JNIEnv *env, jobject obj);
- void (JNICALL *DeleteWeakGlobalRef)
- (JNIEnv *env, jweak ref);
-
- jboolean (JNICALL *ExceptionCheck)
- (JNIEnv *env);
-
- jobject (JNICALL *NewDirectByteBuffer)
- (JNIEnv* env, void* address, jlong capacity);
- void* (JNICALL *GetDirectBufferAddress)
- (JNIEnv* env, jobject buf);
- jlong (JNICALL *GetDirectBufferCapacity)
- (JNIEnv* env, jobject buf);
-
- /* New JNI 1.6 Features */
-
- jobjectRefType (JNICALL *GetObjectRefType)
- (JNIEnv* env, jobject obj);
-
- /* Module Features */
-
- jobject (JNICALL *GetModule)
- (JNIEnv* env, jclass clazz);
-};
-
-/*
- * We use inlined functions for C++ so that programmers can write:
- *
- * env->FindClass("java/lang/String")
- *
- * in C++ rather than:
- *
- * (*env)->FindClass(env, "java/lang/String")
- *
- * in C.
- */
-
-struct JNIEnv_ {
- const struct JNINativeInterface_ *functions;
-#ifdef __cplusplus
-
- jint GetVersion() {
- return functions->GetVersion(this);
- }
- jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
- jsize len) {
- return functions->DefineClass(this, name, loader, buf, len);
- }
- jclass FindClass(const char *name) {
- return functions->FindClass(this, name);
- }
- jmethodID FromReflectedMethod(jobject method) {
- return functions->FromReflectedMethod(this,method);
- }
- jfieldID FromReflectedField(jobject field) {
- return functions->FromReflectedField(this,field);
- }
-
- jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
- return functions->ToReflectedMethod(this, cls, methodID, isStatic);
- }
-
- jclass GetSuperclass(jclass sub) {
- return functions->GetSuperclass(this, sub);
- }
- jboolean IsAssignableFrom(jclass sub, jclass sup) {
- return functions->IsAssignableFrom(this, sub, sup);
- }
-
- jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
- return functions->ToReflectedField(this,cls,fieldID,isStatic);
- }
-
- jint Throw(jthrowable obj) {
- return functions->Throw(this, obj);
- }
- jint ThrowNew(jclass clazz, const char *msg) {
- return functions->ThrowNew(this, clazz, msg);
- }
- jthrowable ExceptionOccurred() {
- return functions->ExceptionOccurred(this);
- }
- void ExceptionDescribe() {
- functions->ExceptionDescribe(this);
- }
- void ExceptionClear() {
- functions->ExceptionClear(this);
- }
- void FatalError(const char *msg) {
- functions->FatalError(this, msg);
- }
-
- jint PushLocalFrame(jint capacity) {
- return functions->PushLocalFrame(this,capacity);
- }
- jobject PopLocalFrame(jobject result) {
- return functions->PopLocalFrame(this,result);
- }
-
- jobject NewGlobalRef(jobject lobj) {
- return functions->NewGlobalRef(this,lobj);
- }
- void DeleteGlobalRef(jobject gref) {
- functions->DeleteGlobalRef(this,gref);
- }
- void DeleteLocalRef(jobject obj) {
- functions->DeleteLocalRef(this, obj);
- }
-
- jboolean IsSameObject(jobject obj1, jobject obj2) {
- return functions->IsSameObject(this,obj1,obj2);
- }
-
- jobject NewLocalRef(jobject ref) {
- return functions->NewLocalRef(this,ref);
- }
- jint EnsureLocalCapacity(jint capacity) {
- return functions->EnsureLocalCapacity(this,capacity);
- }
-
- jobject AllocObject(jclass clazz) {
- return functions->AllocObject(this,clazz);
- }
- jobject NewObject(jclass clazz, jmethodID methodID, ...) {
- va_list args;
- jobject result;
- va_start(args, methodID);
- result = functions->NewObjectV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jobject NewObjectV(jclass clazz, jmethodID methodID,
- va_list args) {
- return functions->NewObjectV(this,clazz,methodID,args);
- }
- jobject NewObjectA(jclass clazz, jmethodID methodID,
- const jvalue *args) {
- return functions->NewObjectA(this,clazz,methodID,args);
- }
-
- jclass GetObjectClass(jobject obj) {
- return functions->GetObjectClass(this,obj);
- }
- jboolean IsInstanceOf(jobject obj, jclass clazz) {
- return functions->IsInstanceOf(this,obj,clazz);
- }
-
- jmethodID GetMethodID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetMethodID(this,clazz,name,sig);
- }
-
- jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jobject result;
- va_start(args,methodID);
- result = functions->CallObjectMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jobject CallObjectMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallObjectMethodV(this,obj,methodID,args);
- }
- jobject CallObjectMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallObjectMethodA(this,obj,methodID,args);
- }
-
- jboolean CallBooleanMethod(jobject obj,
- jmethodID methodID, ...) {
- va_list args;
- jboolean result;
- va_start(args,methodID);
- result = functions->CallBooleanMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallBooleanMethodV(this,obj,methodID,args);
- }
- jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallBooleanMethodA(this,obj,methodID, args);
- }
-
- jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jbyte result;
- va_start(args,methodID);
- result = functions->CallByteMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jbyte CallByteMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallByteMethodV(this,obj,methodID,args);
- }
- jbyte CallByteMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallByteMethodA(this,obj,methodID,args);
- }
-
- jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jchar result;
- va_start(args,methodID);
- result = functions->CallCharMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jchar CallCharMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallCharMethodV(this,obj,methodID,args);
- }
- jchar CallCharMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallCharMethodA(this,obj,methodID,args);
- }
-
- jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jshort result;
- va_start(args,methodID);
- result = functions->CallShortMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jshort CallShortMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallShortMethodV(this,obj,methodID,args);
- }
- jshort CallShortMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallShortMethodA(this,obj,methodID,args);
- }
-
- jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jint result;
- va_start(args,methodID);
- result = functions->CallIntMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jint CallIntMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallIntMethodV(this,obj,methodID,args);
- }
- jint CallIntMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallIntMethodA(this,obj,methodID,args);
- }
-
- jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jlong result;
- va_start(args,methodID);
- result = functions->CallLongMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jlong CallLongMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallLongMethodV(this,obj,methodID,args);
- }
- jlong CallLongMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallLongMethodA(this,obj,methodID,args);
- }
-
- jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jfloat result;
- va_start(args,methodID);
- result = functions->CallFloatMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallFloatMethodV(this,obj,methodID,args);
- }
- jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallFloatMethodA(this,obj,methodID,args);
- }
-
- jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jdouble result;
- va_start(args,methodID);
- result = functions->CallDoubleMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallDoubleMethodV(this,obj,methodID,args);
- }
- jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallDoubleMethodA(this,obj,methodID,args);
- }
-
- void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- va_start(args,methodID);
- functions->CallVoidMethodV(this,obj,methodID,args);
- va_end(args);
- }
- void CallVoidMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- functions->CallVoidMethodV(this,obj,methodID,args);
- }
- void CallVoidMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- functions->CallVoidMethodA(this,obj,methodID,args);
- }
-
- jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jobject result;
- va_start(args,methodID);
- result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
- methodID,args);
- }
- jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jboolean result;
- va_start(args,methodID);
- result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
- methodID,args);
- }
- jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
- methodID, args);
- }
-
- jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jbyte result;
- va_start(args,methodID);
- result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualByteMethodV(this,obj,clazz,
- methodID,args);
- }
- jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualByteMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jchar result;
- va_start(args,methodID);
- result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualCharMethodV(this,obj,clazz,
- methodID,args);
- }
- jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualCharMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jshort result;
- va_start(args,methodID);
- result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualShortMethodV(this,obj,clazz,
- methodID,args);
- }
- jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualShortMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jint result;
- va_start(args,methodID);
- result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualIntMethodV(this,obj,clazz,
- methodID,args);
- }
- jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualIntMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jlong result;
- va_start(args,methodID);
- result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualLongMethodV(this,obj,clazz,
- methodID,args);
- }
- jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualLongMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jfloat result;
- va_start(args,methodID);
- result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
- jmethodID methodID,
- va_list args) {
- return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
- methodID,args);
- }
- jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
- jmethodID methodID,
- const jvalue * args) {
- return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jdouble result;
- va_start(args,methodID);
- result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
- jmethodID methodID,
- va_list args) {
- return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
- methodID,args);
- }
- jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
- jmethodID methodID,
- const jvalue * args) {
- return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
- methodID,args);
- }
-
- void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- va_start(args,methodID);
- functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
- va_end(args);
- }
- void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
- jmethodID methodID,
- va_list args) {
- functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
- }
- void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
- jmethodID methodID,
- const jvalue * args) {
- functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
- }
-
- jfieldID GetFieldID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetFieldID(this,clazz,name,sig);
- }
-
- jobject GetObjectField(jobject obj, jfieldID fieldID) {
- return functions->GetObjectField(this,obj,fieldID);
- }
- jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
- return functions->GetBooleanField(this,obj,fieldID);
- }
- jbyte GetByteField(jobject obj, jfieldID fieldID) {
- return functions->GetByteField(this,obj,fieldID);
- }
- jchar GetCharField(jobject obj, jfieldID fieldID) {
- return functions->GetCharField(this,obj,fieldID);
- }
- jshort GetShortField(jobject obj, jfieldID fieldID) {
- return functions->GetShortField(this,obj,fieldID);
- }
- jint GetIntField(jobject obj, jfieldID fieldID) {
- return functions->GetIntField(this,obj,fieldID);
- }
- jlong GetLongField(jobject obj, jfieldID fieldID) {
- return functions->GetLongField(this,obj,fieldID);
- }
- jfloat GetFloatField(jobject obj, jfieldID fieldID) {
- return functions->GetFloatField(this,obj,fieldID);
- }
- jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
- return functions->GetDoubleField(this,obj,fieldID);
- }
-
- void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
- functions->SetObjectField(this,obj,fieldID,val);
- }
- void SetBooleanField(jobject obj, jfieldID fieldID,
- jboolean val) {
- functions->SetBooleanField(this,obj,fieldID,val);
- }
- void SetByteField(jobject obj, jfieldID fieldID,
- jbyte val) {
- functions->SetByteField(this,obj,fieldID,val);
- }
- void SetCharField(jobject obj, jfieldID fieldID,
- jchar val) {
- functions->SetCharField(this,obj,fieldID,val);
- }
- void SetShortField(jobject obj, jfieldID fieldID,
- jshort val) {
- functions->SetShortField(this,obj,fieldID,val);
- }
- void SetIntField(jobject obj, jfieldID fieldID,
- jint val) {
- functions->SetIntField(this,obj,fieldID,val);
- }
- void SetLongField(jobject obj, jfieldID fieldID,
- jlong val) {
- functions->SetLongField(this,obj,fieldID,val);
- }
- void SetFloatField(jobject obj, jfieldID fieldID,
- jfloat val) {
- functions->SetFloatField(this,obj,fieldID,val);
- }
- void SetDoubleField(jobject obj, jfieldID fieldID,
- jdouble val) {
- functions->SetDoubleField(this,obj,fieldID,val);
- }
-
- jmethodID GetStaticMethodID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetStaticMethodID(this,clazz,name,sig);
- }
-
- jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
- ...) {
- va_list args;
- jobject result;
- va_start(args,methodID);
- result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
- va_list args) {
- return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
- }
- jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
- const jvalue *args) {
- return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
- }
-
- jboolean CallStaticBooleanMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jboolean result;
- va_start(args,methodID);
- result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jboolean CallStaticBooleanMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
- }
- jboolean CallStaticBooleanMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
- }
-
- jbyte CallStaticByteMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jbyte result;
- va_start(args,methodID);
- result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jbyte CallStaticByteMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticByteMethodV(this,clazz,methodID,args);
- }
- jbyte CallStaticByteMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticByteMethodA(this,clazz,methodID,args);
- }
-
- jchar CallStaticCharMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jchar result;
- va_start(args,methodID);
- result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jchar CallStaticCharMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticCharMethodV(this,clazz,methodID,args);
- }
- jchar CallStaticCharMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticCharMethodA(this,clazz,methodID,args);
- }
-
- jshort CallStaticShortMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jshort result;
- va_start(args,methodID);
- result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jshort CallStaticShortMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticShortMethodV(this,clazz,methodID,args);
- }
- jshort CallStaticShortMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticShortMethodA(this,clazz,methodID,args);
- }
-
- jint CallStaticIntMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jint result;
- va_start(args,methodID);
- result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jint CallStaticIntMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticIntMethodV(this,clazz,methodID,args);
- }
- jint CallStaticIntMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticIntMethodA(this,clazz,methodID,args);
- }
-
- jlong CallStaticLongMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jlong result;
- va_start(args,methodID);
- result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jlong CallStaticLongMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticLongMethodV(this,clazz,methodID,args);
- }
- jlong CallStaticLongMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticLongMethodA(this,clazz,methodID,args);
- }
-
- jfloat CallStaticFloatMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jfloat result;
- va_start(args,methodID);
- result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jfloat CallStaticFloatMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
- }
- jfloat CallStaticFloatMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
- }
-
- jdouble CallStaticDoubleMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jdouble result;
- va_start(args,methodID);
- result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jdouble CallStaticDoubleMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
- }
- jdouble CallStaticDoubleMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
- }
-
- void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
- va_list args;
- va_start(args,methodID);
- functions->CallStaticVoidMethodV(this,cls,methodID,args);
- va_end(args);
- }
- void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
- va_list args) {
- functions->CallStaticVoidMethodV(this,cls,methodID,args);
- }
- void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
- const jvalue * args) {
- functions->CallStaticVoidMethodA(this,cls,methodID,args);
- }
-
- jfieldID GetStaticFieldID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetStaticFieldID(this,clazz,name,sig);
- }
- jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticObjectField(this,clazz,fieldID);
- }
- jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticBooleanField(this,clazz,fieldID);
- }
- jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticByteField(this,clazz,fieldID);
- }
- jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticCharField(this,clazz,fieldID);
- }
- jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticShortField(this,clazz,fieldID);
- }
- jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticIntField(this,clazz,fieldID);
- }
- jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticLongField(this,clazz,fieldID);
- }
- jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticFloatField(this,clazz,fieldID);
- }
- jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticDoubleField(this,clazz,fieldID);
- }
-
- void SetStaticObjectField(jclass clazz, jfieldID fieldID,
- jobject value) {
- functions->SetStaticObjectField(this,clazz,fieldID,value);
- }
- void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
- jboolean value) {
- functions->SetStaticBooleanField(this,clazz,fieldID,value);
- }
- void SetStaticByteField(jclass clazz, jfieldID fieldID,
- jbyte value) {
- functions->SetStaticByteField(this,clazz,fieldID,value);
- }
- void SetStaticCharField(jclass clazz, jfieldID fieldID,
- jchar value) {
- functions->SetStaticCharField(this,clazz,fieldID,value);
- }
- void SetStaticShortField(jclass clazz, jfieldID fieldID,
- jshort value) {
- functions->SetStaticShortField(this,clazz,fieldID,value);
- }
- void SetStaticIntField(jclass clazz, jfieldID fieldID,
- jint value) {
- functions->SetStaticIntField(this,clazz,fieldID,value);
- }
- void SetStaticLongField(jclass clazz, jfieldID fieldID,
- jlong value) {
- functions->SetStaticLongField(this,clazz,fieldID,value);
- }
- void SetStaticFloatField(jclass clazz, jfieldID fieldID,
- jfloat value) {
- functions->SetStaticFloatField(this,clazz,fieldID,value);
- }
- void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
- jdouble value) {
- functions->SetStaticDoubleField(this,clazz,fieldID,value);
- }
-
- jstring NewString(const jchar *unicode, jsize len) {
- return functions->NewString(this,unicode,len);
- }
- jsize GetStringLength(jstring str) {
- return functions->GetStringLength(this,str);
- }
- const jchar *GetStringChars(jstring str, jboolean *isCopy) {
- return functions->GetStringChars(this,str,isCopy);
- }
- void ReleaseStringChars(jstring str, const jchar *chars) {
- functions->ReleaseStringChars(this,str,chars);
- }
-
- jstring NewStringUTF(const char *utf) {
- return functions->NewStringUTF(this,utf);
- }
- jsize GetStringUTFLength(jstring str) {
- return functions->GetStringUTFLength(this,str);
- }
- const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
- return functions->GetStringUTFChars(this,str,isCopy);
- }
- void ReleaseStringUTFChars(jstring str, const char* chars) {
- functions->ReleaseStringUTFChars(this,str,chars);
- }
-
- jsize GetArrayLength(jarray array) {
- return functions->GetArrayLength(this,array);
- }
-
- jobjectArray NewObjectArray(jsize len, jclass clazz,
- jobject init) {
- return functions->NewObjectArray(this,len,clazz,init);
- }
- jobject GetObjectArrayElement(jobjectArray array, jsize index) {
- return functions->GetObjectArrayElement(this,array,index);
- }
- void SetObjectArrayElement(jobjectArray array, jsize index,
- jobject val) {
- functions->SetObjectArrayElement(this,array,index,val);
- }
-
- jbooleanArray NewBooleanArray(jsize len) {
- return functions->NewBooleanArray(this,len);
- }
- jbyteArray NewByteArray(jsize len) {
- return functions->NewByteArray(this,len);
- }
- jcharArray NewCharArray(jsize len) {
- return functions->NewCharArray(this,len);
- }
- jshortArray NewShortArray(jsize len) {
- return functions->NewShortArray(this,len);
- }
- jintArray NewIntArray(jsize len) {
- return functions->NewIntArray(this,len);
- }
- jlongArray NewLongArray(jsize len) {
- return functions->NewLongArray(this,len);
- }
- jfloatArray NewFloatArray(jsize len) {
- return functions->NewFloatArray(this,len);
- }
- jdoubleArray NewDoubleArray(jsize len) {
- return functions->NewDoubleArray(this,len);
- }
-
- jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
- return functions->GetBooleanArrayElements(this,array,isCopy);
- }
- jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
- return functions->GetByteArrayElements(this,array,isCopy);
- }
- jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
- return functions->GetCharArrayElements(this,array,isCopy);
- }
- jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
- return functions->GetShortArrayElements(this,array,isCopy);
- }
- jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
- return functions->GetIntArrayElements(this,array,isCopy);
- }
- jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
- return functions->GetLongArrayElements(this,array,isCopy);
- }
- jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
- return functions->GetFloatArrayElements(this,array,isCopy);
- }
- jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
- return functions->GetDoubleArrayElements(this,array,isCopy);
- }
-
- void ReleaseBooleanArrayElements(jbooleanArray array,
- jboolean *elems,
- jint mode) {
- functions->ReleaseBooleanArrayElements(this,array,elems,mode);
- }
- void ReleaseByteArrayElements(jbyteArray array,
- jbyte *elems,
- jint mode) {
- functions->ReleaseByteArrayElements(this,array,elems,mode);
- }
- void ReleaseCharArrayElements(jcharArray array,
- jchar *elems,
- jint mode) {
- functions->ReleaseCharArrayElements(this,array,elems,mode);
- }
- void ReleaseShortArrayElements(jshortArray array,
- jshort *elems,
- jint mode) {
- functions->ReleaseShortArrayElements(this,array,elems,mode);
- }
- void ReleaseIntArrayElements(jintArray array,
- jint *elems,
- jint mode) {
- functions->ReleaseIntArrayElements(this,array,elems,mode);
- }
- void ReleaseLongArrayElements(jlongArray array,
- jlong *elems,
- jint mode) {
- functions->ReleaseLongArrayElements(this,array,elems,mode);
- }
- void ReleaseFloatArrayElements(jfloatArray array,
- jfloat *elems,
- jint mode) {
- functions->ReleaseFloatArrayElements(this,array,elems,mode);
- }
- void ReleaseDoubleArrayElements(jdoubleArray array,
- jdouble *elems,
- jint mode) {
- functions->ReleaseDoubleArrayElements(this,array,elems,mode);
- }
-
- void GetBooleanArrayRegion(jbooleanArray array,
- jsize start, jsize len, jboolean *buf) {
- functions->GetBooleanArrayRegion(this,array,start,len,buf);
- }
- void GetByteArrayRegion(jbyteArray array,
- jsize start, jsize len, jbyte *buf) {
- functions->GetByteArrayRegion(this,array,start,len,buf);
- }
- void GetCharArrayRegion(jcharArray array,
- jsize start, jsize len, jchar *buf) {
- functions->GetCharArrayRegion(this,array,start,len,buf);
- }
- void GetShortArrayRegion(jshortArray array,
- jsize start, jsize len, jshort *buf) {
- functions->GetShortArrayRegion(this,array,start,len,buf);
- }
- void GetIntArrayRegion(jintArray array,
- jsize start, jsize len, jint *buf) {
- functions->GetIntArrayRegion(this,array,start,len,buf);
- }
- void GetLongArrayRegion(jlongArray array,
- jsize start, jsize len, jlong *buf) {
- functions->GetLongArrayRegion(this,array,start,len,buf);
- }
- void GetFloatArrayRegion(jfloatArray array,
- jsize start, jsize len, jfloat *buf) {
- functions->GetFloatArrayRegion(this,array,start,len,buf);
- }
- void GetDoubleArrayRegion(jdoubleArray array,
- jsize start, jsize len, jdouble *buf) {
- functions->GetDoubleArrayRegion(this,array,start,len,buf);
- }
-
- void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
- const jboolean *buf) {
- functions->SetBooleanArrayRegion(this,array,start,len,buf);
- }
- void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
- const jbyte *buf) {
- functions->SetByteArrayRegion(this,array,start,len,buf);
- }
- void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
- const jchar *buf) {
- functions->SetCharArrayRegion(this,array,start,len,buf);
- }
- void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
- const jshort *buf) {
- functions->SetShortArrayRegion(this,array,start,len,buf);
- }
- void SetIntArrayRegion(jintArray array, jsize start, jsize len,
- const jint *buf) {
- functions->SetIntArrayRegion(this,array,start,len,buf);
- }
- void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
- const jlong *buf) {
- functions->SetLongArrayRegion(this,array,start,len,buf);
- }
- void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
- const jfloat *buf) {
- functions->SetFloatArrayRegion(this,array,start,len,buf);
- }
- void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
- const jdouble *buf) {
- functions->SetDoubleArrayRegion(this,array,start,len,buf);
- }
-
- jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
- jint nMethods) {
- return functions->RegisterNatives(this,clazz,methods,nMethods);
- }
- jint UnregisterNatives(jclass clazz) {
- return functions->UnregisterNatives(this,clazz);
- }
-
- jint MonitorEnter(jobject obj) {
- return functions->MonitorEnter(this,obj);
- }
- jint MonitorExit(jobject obj) {
- return functions->MonitorExit(this,obj);
- }
-
- jint GetJavaVM(JavaVM **vm) {
- return functions->GetJavaVM(this,vm);
- }
-
- void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
- functions->GetStringRegion(this,str,start,len,buf);
- }
- void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
- functions->GetStringUTFRegion(this,str,start,len,buf);
- }
-
- void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
- return functions->GetPrimitiveArrayCritical(this,array,isCopy);
- }
- void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
- functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
- }
-
- const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
- return functions->GetStringCritical(this,string,isCopy);
- }
- void ReleaseStringCritical(jstring string, const jchar *cstring) {
- functions->ReleaseStringCritical(this,string,cstring);
- }
-
- jweak NewWeakGlobalRef(jobject obj) {
- return functions->NewWeakGlobalRef(this,obj);
- }
- void DeleteWeakGlobalRef(jweak ref) {
- functions->DeleteWeakGlobalRef(this,ref);
- }
-
- jboolean ExceptionCheck() {
- return functions->ExceptionCheck(this);
- }
-
- jobject NewDirectByteBuffer(void* address, jlong capacity) {
- return functions->NewDirectByteBuffer(this, address, capacity);
- }
- void* GetDirectBufferAddress(jobject buf) {
- return functions->GetDirectBufferAddress(this, buf);
- }
- jlong GetDirectBufferCapacity(jobject buf) {
- return functions->GetDirectBufferCapacity(this, buf);
- }
- jobjectRefType GetObjectRefType(jobject obj) {
- return functions->GetObjectRefType(this, obj);
- }
-
- /* Module Features */
-
- jobject GetModule(jclass clazz) {
- return functions->GetModule(this, clazz);
- }
-
-#endif /* __cplusplus */
-};
-
-/*
- * optionString may be any option accepted by the JVM, or one of the
- * following:
- *
- * -D= Set a system property.
- * -verbose[:class|gc|jni] Enable verbose output, comma-separated. E.g.
- * "-verbose:class" or "-verbose:gc,class"
- * Standard names include: gc, class, and jni.
- * All nonstandard (VM-specific) names must begin
- * with "X".
- * vfprintf extraInfo is a pointer to the vfprintf hook.
- * exit extraInfo is a pointer to the exit hook.
- * abort extraInfo is a pointer to the abort hook.
- */
-typedef struct JavaVMOption {
- char *optionString;
- void *extraInfo;
-} JavaVMOption;
-
-typedef struct JavaVMInitArgs {
- jint version;
-
- jint nOptions;
- JavaVMOption *options;
- jboolean ignoreUnrecognized;
-} JavaVMInitArgs;
-
-typedef struct JavaVMAttachArgs {
- jint version;
-
- char *name;
- jobject group;
-} JavaVMAttachArgs;
-
-/* These will be VM-specific. */
-
-#define JDK1_2
-#define JDK1_4
-
-/* End VM-specific. */
-
-struct JNIInvokeInterface_ {
- void *reserved0;
- void *reserved1;
- void *reserved2;
-
- jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
-
- jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
-
- jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
-
- jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
-
- jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
-};
-
-struct JavaVM_ {
- const struct JNIInvokeInterface_ *functions;
-#ifdef __cplusplus
-
- jint DestroyJavaVM() {
- return functions->DestroyJavaVM(this);
- }
- jint AttachCurrentThread(void **penv, void *args) {
- return functions->AttachCurrentThread(this, penv, args);
- }
- jint DetachCurrentThread() {
- return functions->DetachCurrentThread(this);
- }
-
- jint GetEnv(void **penv, jint version) {
- return functions->GetEnv(this, penv, version);
- }
- jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
- return functions->AttachCurrentThreadAsDaemon(this, penv, args);
- }
-#endif
-};
-
-#ifdef _JNI_IMPLEMENTATION_
-#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
-#else
-#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
-#endif
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetDefaultJavaVMInitArgs(void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
-
-/* Defined by native libraries. */
-JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *vm, void *reserved);
-
-JNIEXPORT void JNICALL
-JNI_OnUnload(JavaVM *vm, void *reserved);
-
-#define JNI_VERSION_1_1 0x00010001
-#define JNI_VERSION_1_2 0x00010002
-#define JNI_VERSION_1_4 0x00010004
-#define JNI_VERSION_1_6 0x00010006
-#define JNI_VERSION_1_8 0x00010008
-#define JNI_VERSION_9 0x00090000
-#define JNI_VERSION_10 0x000a0000
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVASOFT_JNI_H_ */
diff --git a/jni/linux/jvmti.h b/jni/linux/jvmti.h
deleted file mode 100644
index eaba8b9..0000000
--- a/jni/linux/jvmti.h
+++ /dev/null
@@ -1,2625 +0,0 @@
-/*
- * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
- /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
-
- /* Include file for the Java(tm) Virtual Machine Tool Interface */
-
-#ifndef _JAVA_JVMTI_H_
-#define _JAVA_JVMTI_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
- JVMTI_VERSION_1 = 0x30010000,
- JVMTI_VERSION_1_0 = 0x30010000,
- JVMTI_VERSION_1_1 = 0x30010100,
- JVMTI_VERSION_1_2 = 0x30010200,
- JVMTI_VERSION_9 = 0x30090000,
- JVMTI_VERSION_11 = 0x300B0000,
-
- JVMTI_VERSION = 0x30000000 + (15 * 0x10000) + ( 0 * 0x100) + 0 /* version: 15.0.0 */
-};
-
-JNIEXPORT jint JNICALL
-Agent_OnLoad(JavaVM *vm, char *options, void *reserved);
-
-JNIEXPORT jint JNICALL
-Agent_OnAttach(JavaVM* vm, char* options, void* reserved);
-
-JNIEXPORT void JNICALL
-Agent_OnUnload(JavaVM *vm);
-
- /* Forward declaration of the environment */
-
-struct _jvmtiEnv;
-
-struct jvmtiInterface_1_;
-
-#ifdef __cplusplus
-typedef _jvmtiEnv jvmtiEnv;
-#else
-typedef const struct jvmtiInterface_1_ *jvmtiEnv;
-#endif /* __cplusplus */
-
-/* Derived Base Types */
-
-typedef jobject jthread;
-typedef jobject jthreadGroup;
-typedef jlong jlocation;
-struct _jrawMonitorID;
-typedef struct _jrawMonitorID *jrawMonitorID;
-typedef struct JNINativeInterface_ jniNativeInterface;
-
- /* Constants */
-
-
- /* Thread State Flags */
-
-enum {
- JVMTI_THREAD_STATE_ALIVE = 0x0001,
- JVMTI_THREAD_STATE_TERMINATED = 0x0002,
- JVMTI_THREAD_STATE_RUNNABLE = 0x0004,
- JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400,
- JVMTI_THREAD_STATE_WAITING = 0x0080,
- JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010,
- JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020,
- JVMTI_THREAD_STATE_SLEEPING = 0x0040,
- JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100,
- JVMTI_THREAD_STATE_PARKED = 0x0200,
- JVMTI_THREAD_STATE_SUSPENDED = 0x100000,
- JVMTI_THREAD_STATE_INTERRUPTED = 0x200000,
- JVMTI_THREAD_STATE_IN_NATIVE = 0x400000,
- JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000,
- JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000,
- JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000
-};
-
- /* java.lang.Thread.State Conversion Masks */
-
-enum {
- JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT,
- JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0,
- JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED,
- JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE,
- JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER,
- JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY,
- JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
-};
-
- /* Thread Priority Constants */
-
-enum {
- JVMTI_THREAD_MIN_PRIORITY = 1,
- JVMTI_THREAD_NORM_PRIORITY = 5,
- JVMTI_THREAD_MAX_PRIORITY = 10
-};
-
- /* Heap Filter Flags */
-
-enum {
- JVMTI_HEAP_FILTER_TAGGED = 0x4,
- JVMTI_HEAP_FILTER_UNTAGGED = 0x8,
- JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10,
- JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20
-};
-
- /* Heap Visit Control Flags */
-
-enum {
- JVMTI_VISIT_OBJECTS = 0x100,
- JVMTI_VISIT_ABORT = 0x8000
-};
-
- /* Heap Reference Enumeration */
-
-typedef enum {
- JVMTI_HEAP_REFERENCE_CLASS = 1,
- JVMTI_HEAP_REFERENCE_FIELD = 2,
- JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3,
- JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4,
- JVMTI_HEAP_REFERENCE_SIGNERS = 5,
- JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6,
- JVMTI_HEAP_REFERENCE_INTERFACE = 7,
- JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8,
- JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9,
- JVMTI_HEAP_REFERENCE_SUPERCLASS = 10,
- JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21,
- JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22,
- JVMTI_HEAP_REFERENCE_MONITOR = 23,
- JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24,
- JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25,
- JVMTI_HEAP_REFERENCE_THREAD = 26,
- JVMTI_HEAP_REFERENCE_OTHER = 27
-} jvmtiHeapReferenceKind;
-
- /* Primitive Type Enumeration */
-
-typedef enum {
- JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90,
- JVMTI_PRIMITIVE_TYPE_BYTE = 66,
- JVMTI_PRIMITIVE_TYPE_CHAR = 67,
- JVMTI_PRIMITIVE_TYPE_SHORT = 83,
- JVMTI_PRIMITIVE_TYPE_INT = 73,
- JVMTI_PRIMITIVE_TYPE_LONG = 74,
- JVMTI_PRIMITIVE_TYPE_FLOAT = 70,
- JVMTI_PRIMITIVE_TYPE_DOUBLE = 68
-} jvmtiPrimitiveType;
-
- /* Heap Object Filter Enumeration */
-
-typedef enum {
- JVMTI_HEAP_OBJECT_TAGGED = 1,
- JVMTI_HEAP_OBJECT_UNTAGGED = 2,
- JVMTI_HEAP_OBJECT_EITHER = 3
-} jvmtiHeapObjectFilter;
-
- /* Heap Root Kind Enumeration */
-
-typedef enum {
- JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
- JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
- JVMTI_HEAP_ROOT_MONITOR = 3,
- JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
- JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
- JVMTI_HEAP_ROOT_THREAD = 6,
- JVMTI_HEAP_ROOT_OTHER = 7
-} jvmtiHeapRootKind;
-
- /* Object Reference Enumeration */
-
-typedef enum {
- JVMTI_REFERENCE_CLASS = 1,
- JVMTI_REFERENCE_FIELD = 2,
- JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
- JVMTI_REFERENCE_CLASS_LOADER = 4,
- JVMTI_REFERENCE_SIGNERS = 5,
- JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
- JVMTI_REFERENCE_INTERFACE = 7,
- JVMTI_REFERENCE_STATIC_FIELD = 8,
- JVMTI_REFERENCE_CONSTANT_POOL = 9
-} jvmtiObjectReferenceKind;
-
- /* Iteration Control Enumeration */
-
-typedef enum {
- JVMTI_ITERATION_CONTINUE = 1,
- JVMTI_ITERATION_IGNORE = 2,
- JVMTI_ITERATION_ABORT = 0
-} jvmtiIterationControl;
-
- /* Class Status Flags */
-
-enum {
- JVMTI_CLASS_STATUS_VERIFIED = 1,
- JVMTI_CLASS_STATUS_PREPARED = 2,
- JVMTI_CLASS_STATUS_INITIALIZED = 4,
- JVMTI_CLASS_STATUS_ERROR = 8,
- JVMTI_CLASS_STATUS_ARRAY = 16,
- JVMTI_CLASS_STATUS_PRIMITIVE = 32
-};
-
- /* Event Enable/Disable */
-
-typedef enum {
- JVMTI_ENABLE = 1,
- JVMTI_DISABLE = 0
-} jvmtiEventMode;
-
- /* Extension Function/Event Parameter Types */
-
-typedef enum {
- JVMTI_TYPE_JBYTE = 101,
- JVMTI_TYPE_JCHAR = 102,
- JVMTI_TYPE_JSHORT = 103,
- JVMTI_TYPE_JINT = 104,
- JVMTI_TYPE_JLONG = 105,
- JVMTI_TYPE_JFLOAT = 106,
- JVMTI_TYPE_JDOUBLE = 107,
- JVMTI_TYPE_JBOOLEAN = 108,
- JVMTI_TYPE_JOBJECT = 109,
- JVMTI_TYPE_JTHREAD = 110,
- JVMTI_TYPE_JCLASS = 111,
- JVMTI_TYPE_JVALUE = 112,
- JVMTI_TYPE_JFIELDID = 113,
- JVMTI_TYPE_JMETHODID = 114,
- JVMTI_TYPE_CCHAR = 115,
- JVMTI_TYPE_CVOID = 116,
- JVMTI_TYPE_JNIENV = 117
-} jvmtiParamTypes;
-
- /* Extension Function/Event Parameter Kinds */
-
-typedef enum {
- JVMTI_KIND_IN = 91,
- JVMTI_KIND_IN_PTR = 92,
- JVMTI_KIND_IN_BUF = 93,
- JVMTI_KIND_ALLOC_BUF = 94,
- JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
- JVMTI_KIND_OUT = 96,
- JVMTI_KIND_OUT_BUF = 97
-} jvmtiParamKind;
-
- /* Timer Kinds */
-
-typedef enum {
- JVMTI_TIMER_USER_CPU = 30,
- JVMTI_TIMER_TOTAL_CPU = 31,
- JVMTI_TIMER_ELAPSED = 32
-} jvmtiTimerKind;
-
- /* Phases of execution */
-
-typedef enum {
- JVMTI_PHASE_ONLOAD = 1,
- JVMTI_PHASE_PRIMORDIAL = 2,
- JVMTI_PHASE_START = 6,
- JVMTI_PHASE_LIVE = 4,
- JVMTI_PHASE_DEAD = 8
-} jvmtiPhase;
-
- /* Version Interface Types */
-
-enum {
- JVMTI_VERSION_INTERFACE_JNI = 0x00000000,
- JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000
-};
-
- /* Version Masks */
-
-enum {
- JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000,
- JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000,
- JVMTI_VERSION_MASK_MINOR = 0x0000FF00,
- JVMTI_VERSION_MASK_MICRO = 0x000000FF
-};
-
- /* Version Shifts */
-
-enum {
- JVMTI_VERSION_SHIFT_MAJOR = 16,
- JVMTI_VERSION_SHIFT_MINOR = 8,
- JVMTI_VERSION_SHIFT_MICRO = 0
-};
-
- /* Verbose Flag Enumeration */
-
-typedef enum {
- JVMTI_VERBOSE_OTHER = 0,
- JVMTI_VERBOSE_GC = 1,
- JVMTI_VERBOSE_CLASS = 2,
- JVMTI_VERBOSE_JNI = 4
-} jvmtiVerboseFlag;
-
- /* JLocation Format Enumeration */
-
-typedef enum {
- JVMTI_JLOCATION_JVMBCI = 1,
- JVMTI_JLOCATION_MACHINEPC = 2,
- JVMTI_JLOCATION_OTHER = 0
-} jvmtiJlocationFormat;
-
- /* Resource Exhaustion Flags */
-
-enum {
- JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001,
- JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002,
- JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004
-};
-
- /* Errors */
-
-typedef enum {
- JVMTI_ERROR_NONE = 0,
- JVMTI_ERROR_INVALID_THREAD = 10,
- JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
- JVMTI_ERROR_INVALID_PRIORITY = 12,
- JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
- JVMTI_ERROR_THREAD_SUSPENDED = 14,
- JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
- JVMTI_ERROR_INVALID_OBJECT = 20,
- JVMTI_ERROR_INVALID_CLASS = 21,
- JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
- JVMTI_ERROR_INVALID_METHODID = 23,
- JVMTI_ERROR_INVALID_LOCATION = 24,
- JVMTI_ERROR_INVALID_FIELDID = 25,
- JVMTI_ERROR_INVALID_MODULE = 26,
- JVMTI_ERROR_NO_MORE_FRAMES = 31,
- JVMTI_ERROR_OPAQUE_FRAME = 32,
- JVMTI_ERROR_TYPE_MISMATCH = 34,
- JVMTI_ERROR_INVALID_SLOT = 35,
- JVMTI_ERROR_DUPLICATE = 40,
- JVMTI_ERROR_NOT_FOUND = 41,
- JVMTI_ERROR_INVALID_MONITOR = 50,
- JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
- JVMTI_ERROR_INTERRUPT = 52,
- JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
- JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
- JVMTI_ERROR_FAILS_VERIFICATION = 62,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
- JVMTI_ERROR_INVALID_TYPESTATE = 65,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
- JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
- JVMTI_ERROR_NAMES_DONT_MATCH = 69,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED = 72,
- JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
- JVMTI_ERROR_UNMODIFIABLE_MODULE = 80,
- JVMTI_ERROR_NOT_AVAILABLE = 98,
- JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
- JVMTI_ERROR_NULL_POINTER = 100,
- JVMTI_ERROR_ABSENT_INFORMATION = 101,
- JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
- JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
- JVMTI_ERROR_NATIVE_METHOD = 104,
- JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
- JVMTI_ERROR_OUT_OF_MEMORY = 110,
- JVMTI_ERROR_ACCESS_DENIED = 111,
- JVMTI_ERROR_WRONG_PHASE = 112,
- JVMTI_ERROR_INTERNAL = 113,
- JVMTI_ERROR_UNATTACHED_THREAD = 115,
- JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
- JVMTI_ERROR_MAX = 116
-} jvmtiError;
-
- /* Event IDs */
-
-typedef enum {
- JVMTI_MIN_EVENT_TYPE_VAL = 50,
- JVMTI_EVENT_VM_INIT = 50,
- JVMTI_EVENT_VM_DEATH = 51,
- JVMTI_EVENT_THREAD_START = 52,
- JVMTI_EVENT_THREAD_END = 53,
- JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
- JVMTI_EVENT_CLASS_LOAD = 55,
- JVMTI_EVENT_CLASS_PREPARE = 56,
- JVMTI_EVENT_VM_START = 57,
- JVMTI_EVENT_EXCEPTION = 58,
- JVMTI_EVENT_EXCEPTION_CATCH = 59,
- JVMTI_EVENT_SINGLE_STEP = 60,
- JVMTI_EVENT_FRAME_POP = 61,
- JVMTI_EVENT_BREAKPOINT = 62,
- JVMTI_EVENT_FIELD_ACCESS = 63,
- JVMTI_EVENT_FIELD_MODIFICATION = 64,
- JVMTI_EVENT_METHOD_ENTRY = 65,
- JVMTI_EVENT_METHOD_EXIT = 66,
- JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
- JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
- JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
- JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
- JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
- JVMTI_EVENT_MONITOR_WAIT = 73,
- JVMTI_EVENT_MONITOR_WAITED = 74,
- JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
- JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
- JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
- JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
- JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
- JVMTI_EVENT_OBJECT_FREE = 83,
- JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
- JVMTI_EVENT_SAMPLED_OBJECT_ALLOC = 86,
- JVMTI_MAX_EVENT_TYPE_VAL = 86
-} jvmtiEvent;
-
-
- /* Pre-Declarations */
-struct _jvmtiThreadInfo;
-typedef struct _jvmtiThreadInfo jvmtiThreadInfo;
-struct _jvmtiMonitorStackDepthInfo;
-typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo;
-struct _jvmtiThreadGroupInfo;
-typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo;
-struct _jvmtiFrameInfo;
-typedef struct _jvmtiFrameInfo jvmtiFrameInfo;
-struct _jvmtiStackInfo;
-typedef struct _jvmtiStackInfo jvmtiStackInfo;
-struct _jvmtiHeapReferenceInfoField;
-typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField;
-struct _jvmtiHeapReferenceInfoArray;
-typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray;
-struct _jvmtiHeapReferenceInfoConstantPool;
-typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool;
-struct _jvmtiHeapReferenceInfoStackLocal;
-typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal;
-struct _jvmtiHeapReferenceInfoJniLocal;
-typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal;
-struct _jvmtiHeapReferenceInfoReserved;
-typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved;
-union _jvmtiHeapReferenceInfo;
-typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo;
-struct _jvmtiHeapCallbacks;
-typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks;
-struct _jvmtiClassDefinition;
-typedef struct _jvmtiClassDefinition jvmtiClassDefinition;
-struct _jvmtiMonitorUsage;
-typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage;
-struct _jvmtiLineNumberEntry;
-typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry;
-struct _jvmtiLocalVariableEntry;
-typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry;
-struct _jvmtiParamInfo;
-typedef struct _jvmtiParamInfo jvmtiParamInfo;
-struct _jvmtiExtensionFunctionInfo;
-typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo;
-struct _jvmtiExtensionEventInfo;
-typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo;
-struct _jvmtiTimerInfo;
-typedef struct _jvmtiTimerInfo jvmtiTimerInfo;
-struct _jvmtiAddrLocationMap;
-typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap;
-
- /* Function Types */
-
-typedef void (JNICALL *jvmtiStartFunction)
- (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg);
-
-typedef jint (JNICALL *jvmtiHeapIterationCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data);
-
-typedef jint (JNICALL *jvmtiHeapReferenceCallback)
- (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data);
-
-typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
- (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data);
-
-typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data);
-
-typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data);
-
-typedef jint (JNICALL *jvmtiReservedCallback)
- ();
-
-typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
- (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
- (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
- (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data);
-
-typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
- (jvmtiEnv* jvmti_env, ...);
-
-typedef void (JNICALL *jvmtiExtensionEvent)
- (jvmtiEnv* jvmti_env, ...);
-
-
- /* Structure Types */
-struct _jvmtiThreadInfo {
- char* name;
- jint priority;
- jboolean is_daemon;
- jthreadGroup thread_group;
- jobject context_class_loader;
-};
-struct _jvmtiMonitorStackDepthInfo {
- jobject monitor;
- jint stack_depth;
-};
-struct _jvmtiThreadGroupInfo {
- jthreadGroup parent;
- char* name;
- jint max_priority;
- jboolean is_daemon;
-};
-struct _jvmtiFrameInfo {
- jmethodID method;
- jlocation location;
-};
-struct _jvmtiStackInfo {
- jthread thread;
- jint state;
- jvmtiFrameInfo* frame_buffer;
- jint frame_count;
-};
-struct _jvmtiHeapReferenceInfoField {
- jint index;
-};
-struct _jvmtiHeapReferenceInfoArray {
- jint index;
-};
-struct _jvmtiHeapReferenceInfoConstantPool {
- jint index;
-};
-struct _jvmtiHeapReferenceInfoStackLocal {
- jlong thread_tag;
- jlong thread_id;
- jint depth;
- jmethodID method;
- jlocation location;
- jint slot;
-};
-struct _jvmtiHeapReferenceInfoJniLocal {
- jlong thread_tag;
- jlong thread_id;
- jint depth;
- jmethodID method;
-};
-struct _jvmtiHeapReferenceInfoReserved {
- jlong reserved1;
- jlong reserved2;
- jlong reserved3;
- jlong reserved4;
- jlong reserved5;
- jlong reserved6;
- jlong reserved7;
- jlong reserved8;
-};
-union _jvmtiHeapReferenceInfo {
- jvmtiHeapReferenceInfoField field;
- jvmtiHeapReferenceInfoArray array;
- jvmtiHeapReferenceInfoConstantPool constant_pool;
- jvmtiHeapReferenceInfoStackLocal stack_local;
- jvmtiHeapReferenceInfoJniLocal jni_local;
- jvmtiHeapReferenceInfoReserved other;
-};
-struct _jvmtiHeapCallbacks {
- jvmtiHeapIterationCallback heap_iteration_callback;
- jvmtiHeapReferenceCallback heap_reference_callback;
- jvmtiPrimitiveFieldCallback primitive_field_callback;
- jvmtiArrayPrimitiveValueCallback array_primitive_value_callback;
- jvmtiStringPrimitiveValueCallback string_primitive_value_callback;
- jvmtiReservedCallback reserved5;
- jvmtiReservedCallback reserved6;
- jvmtiReservedCallback reserved7;
- jvmtiReservedCallback reserved8;
- jvmtiReservedCallback reserved9;
- jvmtiReservedCallback reserved10;
- jvmtiReservedCallback reserved11;
- jvmtiReservedCallback reserved12;
- jvmtiReservedCallback reserved13;
- jvmtiReservedCallback reserved14;
- jvmtiReservedCallback reserved15;
-};
-struct _jvmtiClassDefinition {
- jclass klass;
- jint class_byte_count;
- const unsigned char* class_bytes;
-};
-struct _jvmtiMonitorUsage {
- jthread owner;
- jint entry_count;
- jint waiter_count;
- jthread* waiters;
- jint notify_waiter_count;
- jthread* notify_waiters;
-};
-struct _jvmtiLineNumberEntry {
- jlocation start_location;
- jint line_number;
-};
-struct _jvmtiLocalVariableEntry {
- jlocation start_location;
- jint length;
- char* name;
- char* signature;
- char* generic_signature;
- jint slot;
-};
-struct _jvmtiParamInfo {
- char* name;
- jvmtiParamKind kind;
- jvmtiParamTypes base_type;
- jboolean null_ok;
-};
-struct _jvmtiExtensionFunctionInfo {
- jvmtiExtensionFunction func;
- char* id;
- char* short_description;
- jint param_count;
- jvmtiParamInfo* params;
- jint error_count;
- jvmtiError* errors;
-};
-struct _jvmtiExtensionEventInfo {
- jint extension_event_index;
- char* id;
- char* short_description;
- jint param_count;
- jvmtiParamInfo* params;
-};
-struct _jvmtiTimerInfo {
- jlong max_value;
- jboolean may_skip_forward;
- jboolean may_skip_backward;
- jvmtiTimerKind kind;
- jlong reserved1;
- jlong reserved2;
-};
-struct _jvmtiAddrLocationMap {
- const void* start_address;
- jlocation location;
-};
-
-typedef struct {
- unsigned int can_tag_objects : 1;
- unsigned int can_generate_field_modification_events : 1;
- unsigned int can_generate_field_access_events : 1;
- unsigned int can_get_bytecodes : 1;
- unsigned int can_get_synthetic_attribute : 1;
- unsigned int can_get_owned_monitor_info : 1;
- unsigned int can_get_current_contended_monitor : 1;
- unsigned int can_get_monitor_info : 1;
- unsigned int can_pop_frame : 1;
- unsigned int can_redefine_classes : 1;
- unsigned int can_signal_thread : 1;
- unsigned int can_get_source_file_name : 1;
- unsigned int can_get_line_numbers : 1;
- unsigned int can_get_source_debug_extension : 1;
- unsigned int can_access_local_variables : 1;
- unsigned int can_maintain_original_method_order : 1;
- unsigned int can_generate_single_step_events : 1;
- unsigned int can_generate_exception_events : 1;
- unsigned int can_generate_frame_pop_events : 1;
- unsigned int can_generate_breakpoint_events : 1;
- unsigned int can_suspend : 1;
- unsigned int can_redefine_any_class : 1;
- unsigned int can_get_current_thread_cpu_time : 1;
- unsigned int can_get_thread_cpu_time : 1;
- unsigned int can_generate_method_entry_events : 1;
- unsigned int can_generate_method_exit_events : 1;
- unsigned int can_generate_all_class_hook_events : 1;
- unsigned int can_generate_compiled_method_load_events : 1;
- unsigned int can_generate_monitor_events : 1;
- unsigned int can_generate_vm_object_alloc_events : 1;
- unsigned int can_generate_native_method_bind_events : 1;
- unsigned int can_generate_garbage_collection_events : 1;
- unsigned int can_generate_object_free_events : 1;
- unsigned int can_force_early_return : 1;
- unsigned int can_get_owned_monitor_stack_depth_info : 1;
- unsigned int can_get_constant_pool : 1;
- unsigned int can_set_native_method_prefix : 1;
- unsigned int can_retransform_classes : 1;
- unsigned int can_retransform_any_class : 1;
- unsigned int can_generate_resource_exhaustion_heap_events : 1;
- unsigned int can_generate_resource_exhaustion_threads_events : 1;
- unsigned int can_generate_early_vmstart : 1;
- unsigned int can_generate_early_class_hook_events : 1;
- unsigned int can_generate_sampled_object_alloc_events : 1;
- unsigned int : 4;
- unsigned int : 16;
- unsigned int : 16;
- unsigned int : 16;
- unsigned int : 16;
- unsigned int : 16;
-} jvmtiCapabilities;
-
-
- /* Event Definitions */
-
-typedef void (JNICALL *jvmtiEventReserved)(void);
-
-
-typedef void (JNICALL *jvmtiEventBreakpoint)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location);
-
-typedef void (JNICALL *jvmtiEventClassFileLoadHook)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jclass class_being_redefined,
- jobject loader,
- const char* name,
- jobject protection_domain,
- jint class_data_len,
- const unsigned char* class_data,
- jint* new_class_data_len,
- unsigned char** new_class_data);
-
-typedef void (JNICALL *jvmtiEventClassLoad)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jclass klass);
-
-typedef void (JNICALL *jvmtiEventClassPrepare)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jclass klass);
-
-typedef void (JNICALL *jvmtiEventCompiledMethodLoad)
- (jvmtiEnv *jvmti_env,
- jmethodID method,
- jint code_size,
- const void* code_addr,
- jint map_length,
- const jvmtiAddrLocationMap* map,
- const void* compile_info);
-
-typedef void (JNICALL *jvmtiEventCompiledMethodUnload)
- (jvmtiEnv *jvmti_env,
- jmethodID method,
- const void* code_addr);
-
-typedef void (JNICALL *jvmtiEventDataDumpRequest)
- (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)
- (jvmtiEnv *jvmti_env,
- const char* name,
- const void* address,
- jint length);
-
-typedef void (JNICALL *jvmtiEventException)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jobject exception,
- jmethodID catch_method,
- jlocation catch_location);
-
-typedef void (JNICALL *jvmtiEventExceptionCatch)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jobject exception);
-
-typedef void (JNICALL *jvmtiEventFieldAccess)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jclass field_klass,
- jobject object,
- jfieldID field);
-
-typedef void (JNICALL *jvmtiEventFieldModification)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jclass field_klass,
- jobject object,
- jfieldID field,
- char signature_type,
- jvalue new_value);
-
-typedef void (JNICALL *jvmtiEventFramePop)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jboolean was_popped_by_exception);
-
-typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)
- (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventGarbageCollectionStart)
- (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventMethodEntry)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method);
-
-typedef void (JNICALL *jvmtiEventMethodExit)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jboolean was_popped_by_exception,
- jvalue return_value);
-
-typedef void (JNICALL *jvmtiEventMonitorContendedEnter)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object);
-
-typedef void (JNICALL *jvmtiEventMonitorContendedEntered)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object);
-
-typedef void (JNICALL *jvmtiEventMonitorWait)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jlong timeout);
-
-typedef void (JNICALL *jvmtiEventMonitorWaited)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jboolean timed_out);
-
-typedef void (JNICALL *jvmtiEventNativeMethodBind)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- void* address,
- void** new_address_ptr);
-
-typedef void (JNICALL *jvmtiEventObjectFree)
- (jvmtiEnv *jvmti_env,
- jlong tag);
-
-typedef void (JNICALL *jvmtiEventResourceExhausted)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jint flags,
- const void* reserved,
- const char* description);
-
-typedef void (JNICALL *jvmtiEventSampledObjectAlloc)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jclass object_klass,
- jlong size);
-
-typedef void (JNICALL *jvmtiEventSingleStep)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location);
-
-typedef void (JNICALL *jvmtiEventThreadEnd)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread);
-
-typedef void (JNICALL *jvmtiEventThreadStart)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread);
-
-typedef void (JNICALL *jvmtiEventVMDeath)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env);
-
-typedef void (JNICALL *jvmtiEventVMInit)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread);
-
-typedef void (JNICALL *jvmtiEventVMObjectAlloc)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jclass object_klass,
- jlong size);
-
-typedef void (JNICALL *jvmtiEventVMStart)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env);
-
- /* Event Callback Structure */
-
-typedef struct {
- /* 50 : VM Initialization Event */
- jvmtiEventVMInit VMInit;
- /* 51 : VM Death Event */
- jvmtiEventVMDeath VMDeath;
- /* 52 : Thread Start */
- jvmtiEventThreadStart ThreadStart;
- /* 53 : Thread End */
- jvmtiEventThreadEnd ThreadEnd;
- /* 54 : Class File Load Hook */
- jvmtiEventClassFileLoadHook ClassFileLoadHook;
- /* 55 : Class Load */
- jvmtiEventClassLoad ClassLoad;
- /* 56 : Class Prepare */
- jvmtiEventClassPrepare ClassPrepare;
- /* 57 : VM Start Event */
- jvmtiEventVMStart VMStart;
- /* 58 : Exception */
- jvmtiEventException Exception;
- /* 59 : Exception Catch */
- jvmtiEventExceptionCatch ExceptionCatch;
- /* 60 : Single Step */
- jvmtiEventSingleStep SingleStep;
- /* 61 : Frame Pop */
- jvmtiEventFramePop FramePop;
- /* 62 : Breakpoint */
- jvmtiEventBreakpoint Breakpoint;
- /* 63 : Field Access */
- jvmtiEventFieldAccess FieldAccess;
- /* 64 : Field Modification */
- jvmtiEventFieldModification FieldModification;
- /* 65 : Method Entry */
- jvmtiEventMethodEntry MethodEntry;
- /* 66 : Method Exit */
- jvmtiEventMethodExit MethodExit;
- /* 67 : Native Method Bind */
- jvmtiEventNativeMethodBind NativeMethodBind;
- /* 68 : Compiled Method Load */
- jvmtiEventCompiledMethodLoad CompiledMethodLoad;
- /* 69 : Compiled Method Unload */
- jvmtiEventCompiledMethodUnload CompiledMethodUnload;
- /* 70 : Dynamic Code Generated */
- jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
- /* 71 : Data Dump Request */
- jvmtiEventDataDumpRequest DataDumpRequest;
- /* 72 */
- jvmtiEventReserved reserved72;
- /* 73 : Monitor Wait */
- jvmtiEventMonitorWait MonitorWait;
- /* 74 : Monitor Waited */
- jvmtiEventMonitorWaited MonitorWaited;
- /* 75 : Monitor Contended Enter */
- jvmtiEventMonitorContendedEnter MonitorContendedEnter;
- /* 76 : Monitor Contended Entered */
- jvmtiEventMonitorContendedEntered MonitorContendedEntered;
- /* 77 */
- jvmtiEventReserved reserved77;
- /* 78 */
- jvmtiEventReserved reserved78;
- /* 79 */
- jvmtiEventReserved reserved79;
- /* 80 : Resource Exhausted */
- jvmtiEventResourceExhausted ResourceExhausted;
- /* 81 : Garbage Collection Start */
- jvmtiEventGarbageCollectionStart GarbageCollectionStart;
- /* 82 : Garbage Collection Finish */
- jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
- /* 83 : Object Free */
- jvmtiEventObjectFree ObjectFree;
- /* 84 : VM Object Allocation */
- jvmtiEventVMObjectAlloc VMObjectAlloc;
- /* 85 */
- jvmtiEventReserved reserved85;
- /* 86 : Sampled Object Allocation */
- jvmtiEventSampledObjectAlloc SampledObjectAlloc;
-} jvmtiEventCallbacks;
-
-
- /* Function Interface */
-
-typedef struct jvmtiInterface_1_ {
-
- /* 1 : RESERVED */
- void *reserved1;
-
- /* 2 : Set Event Notification Mode */
- jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env,
- jvmtiEventMode mode,
- jvmtiEvent event_type,
- jthread event_thread,
- ...);
-
- /* 3 : Get All Modules */
- jvmtiError (JNICALL *GetAllModules) (jvmtiEnv* env,
- jint* module_count_ptr,
- jobject** modules_ptr);
-
- /* 4 : Get All Threads */
- jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env,
- jint* threads_count_ptr,
- jthread** threads_ptr);
-
- /* 5 : Suspend Thread */
- jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env,
- jthread thread);
-
- /* 6 : Resume Thread */
- jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env,
- jthread thread);
-
- /* 7 : Stop Thread */
- jvmtiError (JNICALL *StopThread) (jvmtiEnv* env,
- jthread thread,
- jobject exception);
-
- /* 8 : Interrupt Thread */
- jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env,
- jthread thread);
-
- /* 9 : Get Thread Info */
- jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env,
- jthread thread,
- jvmtiThreadInfo* info_ptr);
-
- /* 10 : Get Owned Monitor Info */
- jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env,
- jthread thread,
- jint* owned_monitor_count_ptr,
- jobject** owned_monitors_ptr);
-
- /* 11 : Get Current Contended Monitor */
- jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env,
- jthread thread,
- jobject* monitor_ptr);
-
- /* 12 : Run Agent Thread */
- jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env,
- jthread thread,
- jvmtiStartFunction proc,
- const void* arg,
- jint priority);
-
- /* 13 : Get Top Thread Groups */
- jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env,
- jint* group_count_ptr,
- jthreadGroup** groups_ptr);
-
- /* 14 : Get Thread Group Info */
- jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env,
- jthreadGroup group,
- jvmtiThreadGroupInfo* info_ptr);
-
- /* 15 : Get Thread Group Children */
- jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env,
- jthreadGroup group,
- jint* thread_count_ptr,
- jthread** threads_ptr,
- jint* group_count_ptr,
- jthreadGroup** groups_ptr);
-
- /* 16 : Get Frame Count */
- jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env,
- jthread thread,
- jint* count_ptr);
-
- /* 17 : Get Thread State */
- jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env,
- jthread thread,
- jint* thread_state_ptr);
-
- /* 18 : Get Current Thread */
- jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env,
- jthread* thread_ptr);
-
- /* 19 : Get Frame Location */
- jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jmethodID* method_ptr,
- jlocation* location_ptr);
-
- /* 20 : Notify Frame Pop */
- jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env,
- jthread thread,
- jint depth);
-
- /* 21 : Get Local Variable - Object */
- jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jobject* value_ptr);
-
- /* 22 : Get Local Variable - Int */
- jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jint* value_ptr);
-
- /* 23 : Get Local Variable - Long */
- jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jlong* value_ptr);
-
- /* 24 : Get Local Variable - Float */
- jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jfloat* value_ptr);
-
- /* 25 : Get Local Variable - Double */
- jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jdouble* value_ptr);
-
- /* 26 : Set Local Variable - Object */
- jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jobject value);
-
- /* 27 : Set Local Variable - Int */
- jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jint value);
-
- /* 28 : Set Local Variable - Long */
- jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jlong value);
-
- /* 29 : Set Local Variable - Float */
- jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jfloat value);
-
- /* 30 : Set Local Variable - Double */
- jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jdouble value);
-
- /* 31 : Create Raw Monitor */
- jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env,
- const char* name,
- jrawMonitorID* monitor_ptr);
-
- /* 32 : Destroy Raw Monitor */
- jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 33 : Raw Monitor Enter */
- jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 34 : Raw Monitor Exit */
- jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 35 : Raw Monitor Wait */
- jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env,
- jrawMonitorID monitor,
- jlong millis);
-
- /* 36 : Raw Monitor Notify */
- jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 37 : Raw Monitor Notify All */
- jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 38 : Set Breakpoint */
- jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env,
- jmethodID method,
- jlocation location);
-
- /* 39 : Clear Breakpoint */
- jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env,
- jmethodID method,
- jlocation location);
-
- /* 40 : Get Named Module */
- jvmtiError (JNICALL *GetNamedModule) (jvmtiEnv* env,
- jobject class_loader,
- const char* package_name,
- jobject* module_ptr);
-
- /* 41 : Set Field Access Watch */
- jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 42 : Clear Field Access Watch */
- jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 43 : Set Field Modification Watch */
- jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 44 : Clear Field Modification Watch */
- jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 45 : Is Modifiable Class */
- jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env,
- jclass klass,
- jboolean* is_modifiable_class_ptr);
-
- /* 46 : Allocate */
- jvmtiError (JNICALL *Allocate) (jvmtiEnv* env,
- jlong size,
- unsigned char** mem_ptr);
-
- /* 47 : Deallocate */
- jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env,
- unsigned char* mem);
-
- /* 48 : Get Class Signature */
- jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env,
- jclass klass,
- char** signature_ptr,
- char** generic_ptr);
-
- /* 49 : Get Class Status */
- jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env,
- jclass klass,
- jint* status_ptr);
-
- /* 50 : Get Source File Name */
- jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env,
- jclass klass,
- char** source_name_ptr);
-
- /* 51 : Get Class Modifiers */
- jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env,
- jclass klass,
- jint* modifiers_ptr);
-
- /* 52 : Get Class Methods */
- jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env,
- jclass klass,
- jint* method_count_ptr,
- jmethodID** methods_ptr);
-
- /* 53 : Get Class Fields */
- jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env,
- jclass klass,
- jint* field_count_ptr,
- jfieldID** fields_ptr);
-
- /* 54 : Get Implemented Interfaces */
- jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env,
- jclass klass,
- jint* interface_count_ptr,
- jclass** interfaces_ptr);
-
- /* 55 : Is Interface */
- jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env,
- jclass klass,
- jboolean* is_interface_ptr);
-
- /* 56 : Is Array Class */
- jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env,
- jclass klass,
- jboolean* is_array_class_ptr);
-
- /* 57 : Get Class Loader */
- jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env,
- jclass klass,
- jobject* classloader_ptr);
-
- /* 58 : Get Object Hash Code */
- jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env,
- jobject object,
- jint* hash_code_ptr);
-
- /* 59 : Get Object Monitor Usage */
- jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env,
- jobject object,
- jvmtiMonitorUsage* info_ptr);
-
- /* 60 : Get Field Name (and Signature) */
- jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr);
-
- /* 61 : Get Field Declaring Class */
- jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- jclass* declaring_class_ptr);
-
- /* 62 : Get Field Modifiers */
- jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- jint* modifiers_ptr);
-
- /* 63 : Is Field Synthetic */
- jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- jboolean* is_synthetic_ptr);
-
- /* 64 : Get Method Name (and Signature) */
- jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env,
- jmethodID method,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr);
-
- /* 65 : Get Method Declaring Class */
- jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env,
- jmethodID method,
- jclass* declaring_class_ptr);
-
- /* 66 : Get Method Modifiers */
- jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env,
- jmethodID method,
- jint* modifiers_ptr);
-
- /* 67 : RESERVED */
- void *reserved67;
-
- /* 68 : Get Max Locals */
- jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env,
- jmethodID method,
- jint* max_ptr);
-
- /* 69 : Get Arguments Size */
- jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env,
- jmethodID method,
- jint* size_ptr);
-
- /* 70 : Get Line Number Table */
- jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env,
- jmethodID method,
- jint* entry_count_ptr,
- jvmtiLineNumberEntry** table_ptr);
-
- /* 71 : Get Method Location */
- jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env,
- jmethodID method,
- jlocation* start_location_ptr,
- jlocation* end_location_ptr);
-
- /* 72 : Get Local Variable Table */
- jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env,
- jmethodID method,
- jint* entry_count_ptr,
- jvmtiLocalVariableEntry** table_ptr);
-
- /* 73 : Set Native Method Prefix */
- jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env,
- const char* prefix);
-
- /* 74 : Set Native Method Prefixes */
- jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env,
- jint prefix_count,
- char** prefixes);
-
- /* 75 : Get Bytecodes */
- jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env,
- jmethodID method,
- jint* bytecode_count_ptr,
- unsigned char** bytecodes_ptr);
-
- /* 76 : Is Method Native */
- jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env,
- jmethodID method,
- jboolean* is_native_ptr);
-
- /* 77 : Is Method Synthetic */
- jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env,
- jmethodID method,
- jboolean* is_synthetic_ptr);
-
- /* 78 : Get Loaded Classes */
- jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env,
- jint* class_count_ptr,
- jclass** classes_ptr);
-
- /* 79 : Get Classloader Classes */
- jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env,
- jobject initiating_loader,
- jint* class_count_ptr,
- jclass** classes_ptr);
-
- /* 80 : Pop Frame */
- jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env,
- jthread thread);
-
- /* 81 : Force Early Return - Object */
- jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env,
- jthread thread,
- jobject value);
-
- /* 82 : Force Early Return - Int */
- jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env,
- jthread thread,
- jint value);
-
- /* 83 : Force Early Return - Long */
- jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env,
- jthread thread,
- jlong value);
-
- /* 84 : Force Early Return - Float */
- jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env,
- jthread thread,
- jfloat value);
-
- /* 85 : Force Early Return - Double */
- jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env,
- jthread thread,
- jdouble value);
-
- /* 86 : Force Early Return - Void */
- jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env,
- jthread thread);
-
- /* 87 : Redefine Classes */
- jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env,
- jint class_count,
- const jvmtiClassDefinition* class_definitions);
-
- /* 88 : Get Version Number */
- jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env,
- jint* version_ptr);
-
- /* 89 : Get Capabilities */
- jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env,
- jvmtiCapabilities* capabilities_ptr);
-
- /* 90 : Get Source Debug Extension */
- jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env,
- jclass klass,
- char** source_debug_extension_ptr);
-
- /* 91 : Is Method Obsolete */
- jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env,
- jmethodID method,
- jboolean* is_obsolete_ptr);
-
- /* 92 : Suspend Thread List */
- jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env,
- jint request_count,
- const jthread* request_list,
- jvmtiError* results);
-
- /* 93 : Resume Thread List */
- jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env,
- jint request_count,
- const jthread* request_list,
- jvmtiError* results);
-
- /* 94 : Add Module Reads */
- jvmtiError (JNICALL *AddModuleReads) (jvmtiEnv* env,
- jobject module,
- jobject to_module);
-
- /* 95 : Add Module Exports */
- jvmtiError (JNICALL *AddModuleExports) (jvmtiEnv* env,
- jobject module,
- const char* pkg_name,
- jobject to_module);
-
- /* 96 : Add Module Opens */
- jvmtiError (JNICALL *AddModuleOpens) (jvmtiEnv* env,
- jobject module,
- const char* pkg_name,
- jobject to_module);
-
- /* 97 : Add Module Uses */
- jvmtiError (JNICALL *AddModuleUses) (jvmtiEnv* env,
- jobject module,
- jclass service);
-
- /* 98 : Add Module Provides */
- jvmtiError (JNICALL *AddModuleProvides) (jvmtiEnv* env,
- jobject module,
- jclass service,
- jclass impl_class);
-
- /* 99 : Is Modifiable Module */
- jvmtiError (JNICALL *IsModifiableModule) (jvmtiEnv* env,
- jobject module,
- jboolean* is_modifiable_module_ptr);
-
- /* 100 : Get All Stack Traces */
- jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env,
- jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr,
- jint* thread_count_ptr);
-
- /* 101 : Get Thread List Stack Traces */
- jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env,
- jint thread_count,
- const jthread* thread_list,
- jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr);
-
- /* 102 : Get Thread Local Storage */
- jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env,
- jthread thread,
- void** data_ptr);
-
- /* 103 : Set Thread Local Storage */
- jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env,
- jthread thread,
- const void* data);
-
- /* 104 : Get Stack Trace */
- jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env,
- jthread thread,
- jint start_depth,
- jint max_frame_count,
- jvmtiFrameInfo* frame_buffer,
- jint* count_ptr);
-
- /* 105 : RESERVED */
- void *reserved105;
-
- /* 106 : Get Tag */
- jvmtiError (JNICALL *GetTag) (jvmtiEnv* env,
- jobject object,
- jlong* tag_ptr);
-
- /* 107 : Set Tag */
- jvmtiError (JNICALL *SetTag) (jvmtiEnv* env,
- jobject object,
- jlong tag);
-
- /* 108 : Force Garbage Collection */
- jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
-
- /* 109 : Iterate Over Objects Reachable From Object */
- jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env,
- jobject object,
- jvmtiObjectReferenceCallback object_reference_callback,
- const void* user_data);
-
- /* 110 : Iterate Over Reachable Objects */
- jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env,
- jvmtiHeapRootCallback heap_root_callback,
- jvmtiStackReferenceCallback stack_ref_callback,
- jvmtiObjectReferenceCallback object_ref_callback,
- const void* user_data);
-
- /* 111 : Iterate Over Heap */
- jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env,
- jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data);
-
- /* 112 : Iterate Over Instances Of Class */
- jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env,
- jclass klass,
- jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data);
-
- /* 113 : RESERVED */
- void *reserved113;
-
- /* 114 : Get Objects With Tags */
- jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env,
- jint tag_count,
- const jlong* tags,
- jint* count_ptr,
- jobject** object_result_ptr,
- jlong** tag_result_ptr);
-
- /* 115 : Follow References */
- jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env,
- jint heap_filter,
- jclass klass,
- jobject initial_object,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data);
-
- /* 116 : Iterate Through Heap */
- jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env,
- jint heap_filter,
- jclass klass,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data);
-
- /* 117 : RESERVED */
- void *reserved117;
-
- /* 118 : RESERVED */
- void *reserved118;
-
- /* 119 : RESERVED */
- void *reserved119;
-
- /* 120 : Set JNI Function Table */
- jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env,
- const jniNativeInterface* function_table);
-
- /* 121 : Get JNI Function Table */
- jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env,
- jniNativeInterface** function_table);
-
- /* 122 : Set Event Callbacks */
- jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env,
- const jvmtiEventCallbacks* callbacks,
- jint size_of_callbacks);
-
- /* 123 : Generate Events */
- jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env,
- jvmtiEvent event_type);
-
- /* 124 : Get Extension Functions */
- jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env,
- jint* extension_count_ptr,
- jvmtiExtensionFunctionInfo** extensions);
-
- /* 125 : Get Extension Events */
- jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env,
- jint* extension_count_ptr,
- jvmtiExtensionEventInfo** extensions);
-
- /* 126 : Set Extension Event Callback */
- jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env,
- jint extension_event_index,
- jvmtiExtensionEvent callback);
-
- /* 127 : Dispose Environment */
- jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
-
- /* 128 : Get Error Name */
- jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env,
- jvmtiError error,
- char** name_ptr);
-
- /* 129 : Get JLocation Format */
- jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env,
- jvmtiJlocationFormat* format_ptr);
-
- /* 130 : Get System Properties */
- jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env,
- jint* count_ptr,
- char*** property_ptr);
-
- /* 131 : Get System Property */
- jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env,
- const char* property,
- char** value_ptr);
-
- /* 132 : Set System Property */
- jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env,
- const char* property,
- const char* value_ptr);
-
- /* 133 : Get Phase */
- jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env,
- jvmtiPhase* phase_ptr);
-
- /* 134 : Get Current Thread CPU Timer Information */
- jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env,
- jvmtiTimerInfo* info_ptr);
-
- /* 135 : Get Current Thread CPU Time */
- jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env,
- jlong* nanos_ptr);
-
- /* 136 : Get Thread CPU Timer Information */
- jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env,
- jvmtiTimerInfo* info_ptr);
-
- /* 137 : Get Thread CPU Time */
- jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env,
- jthread thread,
- jlong* nanos_ptr);
-
- /* 138 : Get Timer Information */
- jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env,
- jvmtiTimerInfo* info_ptr);
-
- /* 139 : Get Time */
- jvmtiError (JNICALL *GetTime) (jvmtiEnv* env,
- jlong* nanos_ptr);
-
- /* 140 : Get Potential Capabilities */
- jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env,
- jvmtiCapabilities* capabilities_ptr);
-
- /* 141 : RESERVED */
- void *reserved141;
-
- /* 142 : Add Capabilities */
- jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env,
- const jvmtiCapabilities* capabilities_ptr);
-
- /* 143 : Relinquish Capabilities */
- jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env,
- const jvmtiCapabilities* capabilities_ptr);
-
- /* 144 : Get Available Processors */
- jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env,
- jint* processor_count_ptr);
-
- /* 145 : Get Class Version Numbers */
- jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env,
- jclass klass,
- jint* minor_version_ptr,
- jint* major_version_ptr);
-
- /* 146 : Get Constant Pool */
- jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env,
- jclass klass,
- jint* constant_pool_count_ptr,
- jint* constant_pool_byte_count_ptr,
- unsigned char** constant_pool_bytes_ptr);
-
- /* 147 : Get Environment Local Storage */
- jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env,
- void** data_ptr);
-
- /* 148 : Set Environment Local Storage */
- jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env,
- const void* data);
-
- /* 149 : Add To Bootstrap Class Loader Search */
- jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env,
- const char* segment);
-
- /* 150 : Set Verbose Flag */
- jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env,
- jvmtiVerboseFlag flag,
- jboolean value);
-
- /* 151 : Add To System Class Loader Search */
- jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env,
- const char* segment);
-
- /* 152 : Retransform Classes */
- jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env,
- jint class_count,
- const jclass* classes);
-
- /* 153 : Get Owned Monitor Stack Depth Info */
- jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env,
- jthread thread,
- jint* monitor_info_count_ptr,
- jvmtiMonitorStackDepthInfo** monitor_info_ptr);
-
- /* 154 : Get Object Size */
- jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env,
- jobject object,
- jlong* size_ptr);
-
- /* 155 : Get Local Instance */
- jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jobject* value_ptr);
-
- /* 156 : Set Heap Sampling Interval */
- jvmtiError (JNICALL *SetHeapSamplingInterval) (jvmtiEnv* env,
- jint sampling_interval);
-
-} jvmtiInterface_1;
-
-struct _jvmtiEnv {
- const struct jvmtiInterface_1_ *functions;
-#ifdef __cplusplus
-
-
- jvmtiError Allocate(jlong size,
- unsigned char** mem_ptr) {
- return functions->Allocate(this, size, mem_ptr);
- }
-
- jvmtiError Deallocate(unsigned char* mem) {
- return functions->Deallocate(this, mem);
- }
-
- jvmtiError GetThreadState(jthread thread,
- jint* thread_state_ptr) {
- return functions->GetThreadState(this, thread, thread_state_ptr);
- }
-
- jvmtiError GetCurrentThread(jthread* thread_ptr) {
- return functions->GetCurrentThread(this, thread_ptr);
- }
-
- jvmtiError GetAllThreads(jint* threads_count_ptr,
- jthread** threads_ptr) {
- return functions->GetAllThreads(this, threads_count_ptr, threads_ptr);
- }
-
- jvmtiError SuspendThread(jthread thread) {
- return functions->SuspendThread(this, thread);
- }
-
- jvmtiError SuspendThreadList(jint request_count,
- const jthread* request_list,
- jvmtiError* results) {
- return functions->SuspendThreadList(this, request_count, request_list, results);
- }
-
- jvmtiError ResumeThread(jthread thread) {
- return functions->ResumeThread(this, thread);
- }
-
- jvmtiError ResumeThreadList(jint request_count,
- const jthread* request_list,
- jvmtiError* results) {
- return functions->ResumeThreadList(this, request_count, request_list, results);
- }
-
- jvmtiError StopThread(jthread thread,
- jobject exception) {
- return functions->StopThread(this, thread, exception);
- }
-
- jvmtiError InterruptThread(jthread thread) {
- return functions->InterruptThread(this, thread);
- }
-
- jvmtiError GetThreadInfo(jthread thread,
- jvmtiThreadInfo* info_ptr) {
- return functions->GetThreadInfo(this, thread, info_ptr);
- }
-
- jvmtiError GetOwnedMonitorInfo(jthread thread,
- jint* owned_monitor_count_ptr,
- jobject** owned_monitors_ptr) {
- return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr);
- }
-
- jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread,
- jint* monitor_info_count_ptr,
- jvmtiMonitorStackDepthInfo** monitor_info_ptr) {
- return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr);
- }
-
- jvmtiError GetCurrentContendedMonitor(jthread thread,
- jobject* monitor_ptr) {
- return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr);
- }
-
- jvmtiError RunAgentThread(jthread thread,
- jvmtiStartFunction proc,
- const void* arg,
- jint priority) {
- return functions->RunAgentThread(this, thread, proc, arg, priority);
- }
-
- jvmtiError SetThreadLocalStorage(jthread thread,
- const void* data) {
- return functions->SetThreadLocalStorage(this, thread, data);
- }
-
- jvmtiError GetThreadLocalStorage(jthread thread,
- void** data_ptr) {
- return functions->GetThreadLocalStorage(this, thread, data_ptr);
- }
-
- jvmtiError GetTopThreadGroups(jint* group_count_ptr,
- jthreadGroup** groups_ptr) {
- return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr);
- }
-
- jvmtiError GetThreadGroupInfo(jthreadGroup group,
- jvmtiThreadGroupInfo* info_ptr) {
- return functions->GetThreadGroupInfo(this, group, info_ptr);
- }
-
- jvmtiError GetThreadGroupChildren(jthreadGroup group,
- jint* thread_count_ptr,
- jthread** threads_ptr,
- jint* group_count_ptr,
- jthreadGroup** groups_ptr) {
- return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr);
- }
-
- jvmtiError GetStackTrace(jthread thread,
- jint start_depth,
- jint max_frame_count,
- jvmtiFrameInfo* frame_buffer,
- jint* count_ptr) {
- return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr);
- }
-
- jvmtiError GetAllStackTraces(jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr,
- jint* thread_count_ptr) {
- return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr);
- }
-
- jvmtiError GetThreadListStackTraces(jint thread_count,
- const jthread* thread_list,
- jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr) {
- return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr);
- }
-
- jvmtiError GetFrameCount(jthread thread,
- jint* count_ptr) {
- return functions->GetFrameCount(this, thread, count_ptr);
- }
-
- jvmtiError PopFrame(jthread thread) {
- return functions->PopFrame(this, thread);
- }
-
- jvmtiError GetFrameLocation(jthread thread,
- jint depth,
- jmethodID* method_ptr,
- jlocation* location_ptr) {
- return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr);
- }
-
- jvmtiError NotifyFramePop(jthread thread,
- jint depth) {
- return functions->NotifyFramePop(this, thread, depth);
- }
-
- jvmtiError ForceEarlyReturnObject(jthread thread,
- jobject value) {
- return functions->ForceEarlyReturnObject(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnInt(jthread thread,
- jint value) {
- return functions->ForceEarlyReturnInt(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnLong(jthread thread,
- jlong value) {
- return functions->ForceEarlyReturnLong(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnFloat(jthread thread,
- jfloat value) {
- return functions->ForceEarlyReturnFloat(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnDouble(jthread thread,
- jdouble value) {
- return functions->ForceEarlyReturnDouble(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnVoid(jthread thread) {
- return functions->ForceEarlyReturnVoid(this, thread);
- }
-
- jvmtiError FollowReferences(jint heap_filter,
- jclass klass,
- jobject initial_object,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data) {
- return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data);
- }
-
- jvmtiError IterateThroughHeap(jint heap_filter,
- jclass klass,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data) {
- return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data);
- }
-
- jvmtiError GetTag(jobject object,
- jlong* tag_ptr) {
- return functions->GetTag(this, object, tag_ptr);
- }
-
- jvmtiError SetTag(jobject object,
- jlong tag) {
- return functions->SetTag(this, object, tag);
- }
-
- jvmtiError GetObjectsWithTags(jint tag_count,
- const jlong* tags,
- jint* count_ptr,
- jobject** object_result_ptr,
- jlong** tag_result_ptr) {
- return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr);
- }
-
- jvmtiError ForceGarbageCollection() {
- return functions->ForceGarbageCollection(this);
- }
-
- jvmtiError IterateOverObjectsReachableFromObject(jobject object,
- jvmtiObjectReferenceCallback object_reference_callback,
- const void* user_data) {
- return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data);
- }
-
- jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback,
- jvmtiStackReferenceCallback stack_ref_callback,
- jvmtiObjectReferenceCallback object_ref_callback,
- const void* user_data) {
- return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data);
- }
-
- jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data) {
- return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data);
- }
-
- jvmtiError IterateOverInstancesOfClass(jclass klass,
- jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data) {
- return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data);
- }
-
- jvmtiError GetLocalObject(jthread thread,
- jint depth,
- jint slot,
- jobject* value_ptr) {
- return functions->GetLocalObject(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalInstance(jthread thread,
- jint depth,
- jobject* value_ptr) {
- return functions->GetLocalInstance(this, thread, depth, value_ptr);
- }
-
- jvmtiError GetLocalInt(jthread thread,
- jint depth,
- jint slot,
- jint* value_ptr) {
- return functions->GetLocalInt(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalLong(jthread thread,
- jint depth,
- jint slot,
- jlong* value_ptr) {
- return functions->GetLocalLong(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalFloat(jthread thread,
- jint depth,
- jint slot,
- jfloat* value_ptr) {
- return functions->GetLocalFloat(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalDouble(jthread thread,
- jint depth,
- jint slot,
- jdouble* value_ptr) {
- return functions->GetLocalDouble(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError SetLocalObject(jthread thread,
- jint depth,
- jint slot,
- jobject value) {
- return functions->SetLocalObject(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalInt(jthread thread,
- jint depth,
- jint slot,
- jint value) {
- return functions->SetLocalInt(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalLong(jthread thread,
- jint depth,
- jint slot,
- jlong value) {
- return functions->SetLocalLong(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalFloat(jthread thread,
- jint depth,
- jint slot,
- jfloat value) {
- return functions->SetLocalFloat(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalDouble(jthread thread,
- jint depth,
- jint slot,
- jdouble value) {
- return functions->SetLocalDouble(this, thread, depth, slot, value);
- }
-
- jvmtiError SetBreakpoint(jmethodID method,
- jlocation location) {
- return functions->SetBreakpoint(this, method, location);
- }
-
- jvmtiError ClearBreakpoint(jmethodID method,
- jlocation location) {
- return functions->ClearBreakpoint(this, method, location);
- }
-
- jvmtiError SetFieldAccessWatch(jclass klass,
- jfieldID field) {
- return functions->SetFieldAccessWatch(this, klass, field);
- }
-
- jvmtiError ClearFieldAccessWatch(jclass klass,
- jfieldID field) {
- return functions->ClearFieldAccessWatch(this, klass, field);
- }
-
- jvmtiError SetFieldModificationWatch(jclass klass,
- jfieldID field) {
- return functions->SetFieldModificationWatch(this, klass, field);
- }
-
- jvmtiError ClearFieldModificationWatch(jclass klass,
- jfieldID field) {
- return functions->ClearFieldModificationWatch(this, klass, field);
- }
-
- jvmtiError GetAllModules(jint* module_count_ptr,
- jobject** modules_ptr) {
- return functions->GetAllModules(this, module_count_ptr, modules_ptr);
- }
-
- jvmtiError GetNamedModule(jobject class_loader,
- const char* package_name,
- jobject* module_ptr) {
- return functions->GetNamedModule(this, class_loader, package_name, module_ptr);
- }
-
- jvmtiError AddModuleReads(jobject module,
- jobject to_module) {
- return functions->AddModuleReads(this, module, to_module);
- }
-
- jvmtiError AddModuleExports(jobject module,
- const char* pkg_name,
- jobject to_module) {
- return functions->AddModuleExports(this, module, pkg_name, to_module);
- }
-
- jvmtiError AddModuleOpens(jobject module,
- const char* pkg_name,
- jobject to_module) {
- return functions->AddModuleOpens(this, module, pkg_name, to_module);
- }
-
- jvmtiError AddModuleUses(jobject module,
- jclass service) {
- return functions->AddModuleUses(this, module, service);
- }
-
- jvmtiError AddModuleProvides(jobject module,
- jclass service,
- jclass impl_class) {
- return functions->AddModuleProvides(this, module, service, impl_class);
- }
-
- jvmtiError IsModifiableModule(jobject module,
- jboolean* is_modifiable_module_ptr) {
- return functions->IsModifiableModule(this, module, is_modifiable_module_ptr);
- }
-
- jvmtiError GetLoadedClasses(jint* class_count_ptr,
- jclass** classes_ptr) {
- return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr);
- }
-
- jvmtiError GetClassLoaderClasses(jobject initiating_loader,
- jint* class_count_ptr,
- jclass** classes_ptr) {
- return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr);
- }
-
- jvmtiError GetClassSignature(jclass klass,
- char** signature_ptr,
- char** generic_ptr) {
- return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr);
- }
-
- jvmtiError GetClassStatus(jclass klass,
- jint* status_ptr) {
- return functions->GetClassStatus(this, klass, status_ptr);
- }
-
- jvmtiError GetSourceFileName(jclass klass,
- char** source_name_ptr) {
- return functions->GetSourceFileName(this, klass, source_name_ptr);
- }
-
- jvmtiError GetClassModifiers(jclass klass,
- jint* modifiers_ptr) {
- return functions->GetClassModifiers(this, klass, modifiers_ptr);
- }
-
- jvmtiError GetClassMethods(jclass klass,
- jint* method_count_ptr,
- jmethodID** methods_ptr) {
- return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr);
- }
-
- jvmtiError GetClassFields(jclass klass,
- jint* field_count_ptr,
- jfieldID** fields_ptr) {
- return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr);
- }
-
- jvmtiError GetImplementedInterfaces(jclass klass,
- jint* interface_count_ptr,
- jclass** interfaces_ptr) {
- return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr);
- }
-
- jvmtiError GetClassVersionNumbers(jclass klass,
- jint* minor_version_ptr,
- jint* major_version_ptr) {
- return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr);
- }
-
- jvmtiError GetConstantPool(jclass klass,
- jint* constant_pool_count_ptr,
- jint* constant_pool_byte_count_ptr,
- unsigned char** constant_pool_bytes_ptr) {
- return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr);
- }
-
- jvmtiError IsInterface(jclass klass,
- jboolean* is_interface_ptr) {
- return functions->IsInterface(this, klass, is_interface_ptr);
- }
-
- jvmtiError IsArrayClass(jclass klass,
- jboolean* is_array_class_ptr) {
- return functions->IsArrayClass(this, klass, is_array_class_ptr);
- }
-
- jvmtiError IsModifiableClass(jclass klass,
- jboolean* is_modifiable_class_ptr) {
- return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr);
- }
-
- jvmtiError GetClassLoader(jclass klass,
- jobject* classloader_ptr) {
- return functions->GetClassLoader(this, klass, classloader_ptr);
- }
-
- jvmtiError GetSourceDebugExtension(jclass klass,
- char** source_debug_extension_ptr) {
- return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr);
- }
-
- jvmtiError RetransformClasses(jint class_count,
- const jclass* classes) {
- return functions->RetransformClasses(this, class_count, classes);
- }
-
- jvmtiError RedefineClasses(jint class_count,
- const jvmtiClassDefinition* class_definitions) {
- return functions->RedefineClasses(this, class_count, class_definitions);
- }
-
- jvmtiError GetObjectSize(jobject object,
- jlong* size_ptr) {
- return functions->GetObjectSize(this, object, size_ptr);
- }
-
- jvmtiError GetObjectHashCode(jobject object,
- jint* hash_code_ptr) {
- return functions->GetObjectHashCode(this, object, hash_code_ptr);
- }
-
- jvmtiError GetObjectMonitorUsage(jobject object,
- jvmtiMonitorUsage* info_ptr) {
- return functions->GetObjectMonitorUsage(this, object, info_ptr);
- }
-
- jvmtiError GetFieldName(jclass klass,
- jfieldID field,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr) {
- return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr);
- }
-
- jvmtiError GetFieldDeclaringClass(jclass klass,
- jfieldID field,
- jclass* declaring_class_ptr) {
- return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr);
- }
-
- jvmtiError GetFieldModifiers(jclass klass,
- jfieldID field,
- jint* modifiers_ptr) {
- return functions->GetFieldModifiers(this, klass, field, modifiers_ptr);
- }
-
- jvmtiError IsFieldSynthetic(jclass klass,
- jfieldID field,
- jboolean* is_synthetic_ptr) {
- return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr);
- }
-
- jvmtiError GetMethodName(jmethodID method,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr) {
- return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr);
- }
-
- jvmtiError GetMethodDeclaringClass(jmethodID method,
- jclass* declaring_class_ptr) {
- return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr);
- }
-
- jvmtiError GetMethodModifiers(jmethodID method,
- jint* modifiers_ptr) {
- return functions->GetMethodModifiers(this, method, modifiers_ptr);
- }
-
- jvmtiError GetMaxLocals(jmethodID method,
- jint* max_ptr) {
- return functions->GetMaxLocals(this, method, max_ptr);
- }
-
- jvmtiError GetArgumentsSize(jmethodID method,
- jint* size_ptr) {
- return functions->GetArgumentsSize(this, method, size_ptr);
- }
-
- jvmtiError GetLineNumberTable(jmethodID method,
- jint* entry_count_ptr,
- jvmtiLineNumberEntry** table_ptr) {
- return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr);
- }
-
- jvmtiError GetMethodLocation(jmethodID method,
- jlocation* start_location_ptr,
- jlocation* end_location_ptr) {
- return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr);
- }
-
- jvmtiError GetLocalVariableTable(jmethodID method,
- jint* entry_count_ptr,
- jvmtiLocalVariableEntry** table_ptr) {
- return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr);
- }
-
- jvmtiError GetBytecodes(jmethodID method,
- jint* bytecode_count_ptr,
- unsigned char** bytecodes_ptr) {
- return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr);
- }
-
- jvmtiError IsMethodNative(jmethodID method,
- jboolean* is_native_ptr) {
- return functions->IsMethodNative(this, method, is_native_ptr);
- }
-
- jvmtiError IsMethodSynthetic(jmethodID method,
- jboolean* is_synthetic_ptr) {
- return functions->IsMethodSynthetic(this, method, is_synthetic_ptr);
- }
-
- jvmtiError IsMethodObsolete(jmethodID method,
- jboolean* is_obsolete_ptr) {
- return functions->IsMethodObsolete(this, method, is_obsolete_ptr);
- }
-
- jvmtiError SetNativeMethodPrefix(const char* prefix) {
- return functions->SetNativeMethodPrefix(this, prefix);
- }
-
- jvmtiError SetNativeMethodPrefixes(jint prefix_count,
- char** prefixes) {
- return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes);
- }
-
- jvmtiError CreateRawMonitor(const char* name,
- jrawMonitorID* monitor_ptr) {
- return functions->CreateRawMonitor(this, name, monitor_ptr);
- }
-
- jvmtiError DestroyRawMonitor(jrawMonitorID monitor) {
- return functions->DestroyRawMonitor(this, monitor);
- }
-
- jvmtiError RawMonitorEnter(jrawMonitorID monitor) {
- return functions->RawMonitorEnter(this, monitor);
- }
-
- jvmtiError RawMonitorExit(jrawMonitorID monitor) {
- return functions->RawMonitorExit(this, monitor);
- }
-
- jvmtiError RawMonitorWait(jrawMonitorID monitor,
- jlong millis) {
- return functions->RawMonitorWait(this, monitor, millis);
- }
-
- jvmtiError RawMonitorNotify(jrawMonitorID monitor) {
- return functions->RawMonitorNotify(this, monitor);
- }
-
- jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) {
- return functions->RawMonitorNotifyAll(this, monitor);
- }
-
- jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) {
- return functions->SetJNIFunctionTable(this, function_table);
- }
-
- jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) {
- return functions->GetJNIFunctionTable(this, function_table);
- }
-
- jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks,
- jint size_of_callbacks) {
- return functions->SetEventCallbacks(this, callbacks, size_of_callbacks);
- }
-
- jvmtiError SetEventNotificationMode(jvmtiEventMode mode,
- jvmtiEvent event_type,
- jthread event_thread,
- ...) {
- return functions->SetEventNotificationMode(this, mode, event_type, event_thread);
- }
-
- jvmtiError GenerateEvents(jvmtiEvent event_type) {
- return functions->GenerateEvents(this, event_type);
- }
-
- jvmtiError GetExtensionFunctions(jint* extension_count_ptr,
- jvmtiExtensionFunctionInfo** extensions) {
- return functions->GetExtensionFunctions(this, extension_count_ptr, extensions);
- }
-
- jvmtiError GetExtensionEvents(jint* extension_count_ptr,
- jvmtiExtensionEventInfo** extensions) {
- return functions->GetExtensionEvents(this, extension_count_ptr, extensions);
- }
-
- jvmtiError SetExtensionEventCallback(jint extension_event_index,
- jvmtiExtensionEvent callback) {
- return functions->SetExtensionEventCallback(this, extension_event_index, callback);
- }
-
- jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) {
- return functions->GetPotentialCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) {
- return functions->AddCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) {
- return functions->RelinquishCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) {
- return functions->GetCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
- return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr);
- }
-
- jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) {
- return functions->GetCurrentThreadCpuTime(this, nanos_ptr);
- }
-
- jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
- return functions->GetThreadCpuTimerInfo(this, info_ptr);
- }
-
- jvmtiError GetThreadCpuTime(jthread thread,
- jlong* nanos_ptr) {
- return functions->GetThreadCpuTime(this, thread, nanos_ptr);
- }
-
- jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) {
- return functions->GetTimerInfo(this, info_ptr);
- }
-
- jvmtiError GetTime(jlong* nanos_ptr) {
- return functions->GetTime(this, nanos_ptr);
- }
-
- jvmtiError GetAvailableProcessors(jint* processor_count_ptr) {
- return functions->GetAvailableProcessors(this, processor_count_ptr);
- }
-
- jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) {
- return functions->AddToBootstrapClassLoaderSearch(this, segment);
- }
-
- jvmtiError AddToSystemClassLoaderSearch(const char* segment) {
- return functions->AddToSystemClassLoaderSearch(this, segment);
- }
-
- jvmtiError GetSystemProperties(jint* count_ptr,
- char*** property_ptr) {
- return functions->GetSystemProperties(this, count_ptr, property_ptr);
- }
-
- jvmtiError GetSystemProperty(const char* property,
- char** value_ptr) {
- return functions->GetSystemProperty(this, property, value_ptr);
- }
-
- jvmtiError SetSystemProperty(const char* property,
- const char* value_ptr) {
- return functions->SetSystemProperty(this, property, value_ptr);
- }
-
- jvmtiError GetPhase(jvmtiPhase* phase_ptr) {
- return functions->GetPhase(this, phase_ptr);
- }
-
- jvmtiError DisposeEnvironment() {
- return functions->DisposeEnvironment(this);
- }
-
- jvmtiError SetEnvironmentLocalStorage(const void* data) {
- return functions->SetEnvironmentLocalStorage(this, data);
- }
-
- jvmtiError GetEnvironmentLocalStorage(void** data_ptr) {
- return functions->GetEnvironmentLocalStorage(this, data_ptr);
- }
-
- jvmtiError GetVersionNumber(jint* version_ptr) {
- return functions->GetVersionNumber(this, version_ptr);
- }
-
- jvmtiError GetErrorName(jvmtiError error,
- char** name_ptr) {
- return functions->GetErrorName(this, error, name_ptr);
- }
-
- jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag,
- jboolean value) {
- return functions->SetVerboseFlag(this, flag, value);
- }
-
- jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
- return functions->GetJLocationFormat(this, format_ptr);
- }
-
- jvmtiError SetHeapSamplingInterval(jint sampling_interval) {
- return functions->SetHeapSamplingInterval(this, sampling_interval);
- }
-
-#endif /* __cplusplus */
-};
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVA_JVMTI_H_ */
diff --git a/jni/linux/jvmticmlr.h b/jni/linux/jvmticmlr.h
deleted file mode 100644
index c2106d3..0000000
--- a/jni/linux/jvmticmlr.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This header file defines the data structures sent by the VM
- * through the JVMTI CompiledMethodLoad callback function via the
- * "void * compile_info" parameter. The memory pointed to by the
- * compile_info parameter may not be referenced after returning from
- * the CompiledMethodLoad callback. These are VM implementation
- * specific data structures that may evolve in future releases. A
- * JVMTI agent should interpret a non-NULL compile_info as a pointer
- * to a region of memory containing a list of records. In a typical
- * usage scenario, a JVMTI agent would cast each record to a
- * jvmtiCompiledMethodLoadRecordHeader, a struct that represents
- * arbitrary information. This struct contains a kind field to indicate
- * the kind of information being passed, and a pointer to the next
- * record. If the kind field indicates inlining information, then the
- * agent would cast the record to a jvmtiCompiledMethodLoadInlineRecord.
- * This record contains an array of PCStackInfo structs, which indicate
- * for every pc address what are the methods on the invocation stack.
- * The "methods" and "bcis" fields in each PCStackInfo struct specify a
- * 1-1 mapping between these inlined methods and their bytecode indices.
- * This can be used to derive the proper source lines of the inlined
- * methods.
- */
-
-#ifndef _JVMTI_CMLR_H_
-#define _JVMTI_CMLR_H_
-
-enum {
- JVMTI_CMLR_MAJOR_VERSION_1 = 0x00000001,
- JVMTI_CMLR_MINOR_VERSION_0 = 0x00000000,
-
- JVMTI_CMLR_MAJOR_VERSION = 0x00000001,
- JVMTI_CMLR_MINOR_VERSION = 0x00000000
-
- /*
- * This comment is for the "JDK import from HotSpot" sanity check:
- * version: 1.0.0
- */
-};
-
-typedef enum {
- JVMTI_CMLR_DUMMY = 1,
- JVMTI_CMLR_INLINE_INFO = 2
-} jvmtiCMLRKind;
-
-/*
- * Record that represents arbitrary information passed through JVMTI
- * CompiledMethodLoadEvent void pointer.
- */
-typedef struct _jvmtiCompiledMethodLoadRecordHeader {
- jvmtiCMLRKind kind; /* id for the kind of info passed in the record */
- jint majorinfoversion; /* major and minor info version values. Init'ed */
- jint minorinfoversion; /* to current version value in jvmtiExport.cpp. */
-
- struct _jvmtiCompiledMethodLoadRecordHeader* next;
-} jvmtiCompiledMethodLoadRecordHeader;
-
-/*
- * Record that gives information about the methods on the compile-time
- * stack at a specific pc address of a compiled method. Each element in
- * the methods array maps to same element in the bcis array.
- */
-typedef struct _PCStackInfo {
- void* pc; /* the pc address for this compiled method */
- jint numstackframes; /* number of methods on the stack */
- jmethodID* methods; /* array of numstackframes method ids */
- jint* bcis; /* array of numstackframes bytecode indices */
-} PCStackInfo;
-
-/*
- * Record that contains inlining information for each pc address of
- * an nmethod.
- */
-typedef struct _jvmtiCompiledMethodLoadInlineRecord {
- jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */
- jint numpcs; /* number of pc descriptors in this nmethod */
- PCStackInfo* pcinfo; /* array of numpcs pc descriptors */
-} jvmtiCompiledMethodLoadInlineRecord;
-
-/*
- * Dummy record used to test that we can pass records with different
- * information through the void pointer provided that they can be cast
- * to a jvmtiCompiledMethodLoadRecordHeader.
- */
-
-typedef struct _jvmtiCompiledMethodLoadDummyRecord {
- jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */
- char message[50];
-} jvmtiCompiledMethodLoadDummyRecord;
-
-#endif
diff --git a/jni/linux/linux/jawt_md.h b/jni/linux/linux/jawt_md.h
deleted file mode 100644
index 2ba3a8e..0000000
--- a/jni/linux/linux/jawt_md.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include
-#include
-#include "jawt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * X11-specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
-typedef struct jawt_X11DrawingSurfaceInfo {
- Drawable drawable;
- Display* display;
- VisualID visualID;
- Colormap colormapID;
- int depth;
- /*
- * Since 1.4
- * Returns a pixel value from a set of RGB values.
- * This is useful for paletted color (256 color) modes.
- */
- int (JNICALL *GetAWTColor)(JAWT_DrawingSurface* ds,
- int r, int g, int b);
-} JAWT_X11DrawingSurfaceInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
diff --git a/jni/linux/linux/jni_md.h b/jni/linux/linux/jni_md.h
deleted file mode 100644
index 6e583da..0000000
--- a/jni/linux/linux/jni_md.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#ifndef __has_attribute
- #define __has_attribute(x) 0
-#endif
-
-#ifndef JNIEXPORT
- #if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
- #ifdef ARM
- #define JNIEXPORT __attribute__((externally_visible,visibility("default")))
- #else
- #define JNIEXPORT __attribute__((visibility("default")))
- #endif
- #else
- #define JNIEXPORT
- #endif
-#endif
-
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
- #ifdef ARM
- #define JNIIMPORT __attribute__((externally_visible,visibility("default")))
- #else
- #define JNIIMPORT __attribute__((visibility("default")))
- #endif
-#else
- #define JNIIMPORT
-#endif
-
-#define JNICALL
-
-typedef int jint;
-#ifdef _LP64
-typedef long jlong;
-#else
-typedef long long jlong;
-#endif
-
-typedef signed char jbyte;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
diff --git a/jni/windows/classfile_constants.h b/jni/windows/classfile_constants.h
deleted file mode 100644
index 7988ab8..0000000
--- a/jni/windows/classfile_constants.h
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
- * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-#ifndef CLASSFILE_CONSTANTS_H
-#define CLASSFILE_CONSTANTS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Classfile version number for this information */
-#define JVM_CLASSFILE_MAJOR_VERSION 58
-#define JVM_CLASSFILE_MINOR_VERSION 0
-
-/* Flags */
-
-enum {
- JVM_ACC_PUBLIC = 0x0001,
- JVM_ACC_PRIVATE = 0x0002,
- JVM_ACC_PROTECTED = 0x0004,
- JVM_ACC_STATIC = 0x0008,
- JVM_ACC_FINAL = 0x0010,
- JVM_ACC_SYNCHRONIZED = 0x0020,
- JVM_ACC_SUPER = 0x0020,
- JVM_ACC_VOLATILE = 0x0040,
- JVM_ACC_BRIDGE = 0x0040,
- JVM_ACC_TRANSIENT = 0x0080,
- JVM_ACC_VARARGS = 0x0080,
- JVM_ACC_NATIVE = 0x0100,
- JVM_ACC_INTERFACE = 0x0200,
- JVM_ACC_ABSTRACT = 0x0400,
- JVM_ACC_STRICT = 0x0800,
- JVM_ACC_SYNTHETIC = 0x1000,
- JVM_ACC_ANNOTATION = 0x2000,
- JVM_ACC_ENUM = 0x4000,
- JVM_ACC_MODULE = 0x8000
-};
-
-#define JVM_ACC_PUBLIC_BIT 0
-#define JVM_ACC_PRIVATE_BIT 1
-#define JVM_ACC_PROTECTED_BIT 2
-#define JVM_ACC_STATIC_BIT 3
-#define JVM_ACC_FINAL_BIT 4
-#define JVM_ACC_SYNCHRONIZED_BIT 5
-#define JVM_ACC_SUPER_BIT 5
-#define JVM_ACC_VOLATILE_BIT 6
-#define JVM_ACC_BRIDGE_BIT 6
-#define JVM_ACC_TRANSIENT_BIT 7
-#define JVM_ACC_VARARGS_BIT 7
-#define JVM_ACC_NATIVE_BIT 8
-#define JVM_ACC_INTERFACE_BIT 9
-#define JVM_ACC_ABSTRACT_BIT 10
-#define JVM_ACC_STRICT_BIT 11
-#define JVM_ACC_SYNTHETIC_BIT 12
-#define JVM_ACC_ANNOTATION_BIT 13
-#define JVM_ACC_ENUM_BIT 14
-
-/* Used in newarray instruction. */
-
-enum {
- JVM_T_BOOLEAN = 4,
- JVM_T_CHAR = 5,
- JVM_T_FLOAT = 6,
- JVM_T_DOUBLE = 7,
- JVM_T_BYTE = 8,
- JVM_T_SHORT = 9,
- JVM_T_INT = 10,
- JVM_T_LONG = 11
-};
-
-/* Constant Pool Entries */
-
-enum {
- JVM_CONSTANT_Utf8 = 1,
- JVM_CONSTANT_Unicode = 2, /* unused */
- JVM_CONSTANT_Integer = 3,
- JVM_CONSTANT_Float = 4,
- JVM_CONSTANT_Long = 5,
- JVM_CONSTANT_Double = 6,
- JVM_CONSTANT_Class = 7,
- JVM_CONSTANT_String = 8,
- JVM_CONSTANT_Fieldref = 9,
- JVM_CONSTANT_Methodref = 10,
- JVM_CONSTANT_InterfaceMethodref = 11,
- JVM_CONSTANT_NameAndType = 12,
- JVM_CONSTANT_MethodHandle = 15, // JSR 292
- JVM_CONSTANT_MethodType = 16, // JSR 292
- JVM_CONSTANT_Dynamic = 17,
- JVM_CONSTANT_InvokeDynamic = 18,
- JVM_CONSTANT_Module = 19,
- JVM_CONSTANT_Package = 20,
- JVM_CONSTANT_ExternalMax = 20
-};
-
-/* JVM_CONSTANT_MethodHandle subtypes */
-enum {
- JVM_REF_getField = 1,
- JVM_REF_getStatic = 2,
- JVM_REF_putField = 3,
- JVM_REF_putStatic = 4,
- JVM_REF_invokeVirtual = 5,
- JVM_REF_invokeStatic = 6,
- JVM_REF_invokeSpecial = 7,
- JVM_REF_newInvokeSpecial = 8,
- JVM_REF_invokeInterface = 9
-};
-
-/* StackMapTable type item numbers */
-
-enum {
- JVM_ITEM_Top = 0,
- JVM_ITEM_Integer = 1,
- JVM_ITEM_Float = 2,
- JVM_ITEM_Double = 3,
- JVM_ITEM_Long = 4,
- JVM_ITEM_Null = 5,
- JVM_ITEM_UninitializedThis = 6,
- JVM_ITEM_Object = 7,
- JVM_ITEM_Uninitialized = 8
-};
-
-/* Type signatures */
-
-enum {
- JVM_SIGNATURE_SLASH = '/',
- JVM_SIGNATURE_DOT = '.',
- JVM_SIGNATURE_SPECIAL = '<',
- JVM_SIGNATURE_ENDSPECIAL = '>',
- JVM_SIGNATURE_ARRAY = '[',
- JVM_SIGNATURE_BYTE = 'B',
- JVM_SIGNATURE_CHAR = 'C',
- JVM_SIGNATURE_CLASS = 'L',
- JVM_SIGNATURE_ENDCLASS = ';',
- JVM_SIGNATURE_ENUM = 'E',
- JVM_SIGNATURE_FLOAT = 'F',
- JVM_SIGNATURE_DOUBLE = 'D',
- JVM_SIGNATURE_FUNC = '(',
- JVM_SIGNATURE_ENDFUNC = ')',
- JVM_SIGNATURE_INT = 'I',
- JVM_SIGNATURE_LONG = 'J',
- JVM_SIGNATURE_SHORT = 'S',
- JVM_SIGNATURE_VOID = 'V',
- JVM_SIGNATURE_BOOLEAN = 'Z'
-};
-
-/* Opcodes */
-
-enum {
- JVM_OPC_nop = 0,
- JVM_OPC_aconst_null = 1,
- JVM_OPC_iconst_m1 = 2,
- JVM_OPC_iconst_0 = 3,
- JVM_OPC_iconst_1 = 4,
- JVM_OPC_iconst_2 = 5,
- JVM_OPC_iconst_3 = 6,
- JVM_OPC_iconst_4 = 7,
- JVM_OPC_iconst_5 = 8,
- JVM_OPC_lconst_0 = 9,
- JVM_OPC_lconst_1 = 10,
- JVM_OPC_fconst_0 = 11,
- JVM_OPC_fconst_1 = 12,
- JVM_OPC_fconst_2 = 13,
- JVM_OPC_dconst_0 = 14,
- JVM_OPC_dconst_1 = 15,
- JVM_OPC_bipush = 16,
- JVM_OPC_sipush = 17,
- JVM_OPC_ldc = 18,
- JVM_OPC_ldc_w = 19,
- JVM_OPC_ldc2_w = 20,
- JVM_OPC_iload = 21,
- JVM_OPC_lload = 22,
- JVM_OPC_fload = 23,
- JVM_OPC_dload = 24,
- JVM_OPC_aload = 25,
- JVM_OPC_iload_0 = 26,
- JVM_OPC_iload_1 = 27,
- JVM_OPC_iload_2 = 28,
- JVM_OPC_iload_3 = 29,
- JVM_OPC_lload_0 = 30,
- JVM_OPC_lload_1 = 31,
- JVM_OPC_lload_2 = 32,
- JVM_OPC_lload_3 = 33,
- JVM_OPC_fload_0 = 34,
- JVM_OPC_fload_1 = 35,
- JVM_OPC_fload_2 = 36,
- JVM_OPC_fload_3 = 37,
- JVM_OPC_dload_0 = 38,
- JVM_OPC_dload_1 = 39,
- JVM_OPC_dload_2 = 40,
- JVM_OPC_dload_3 = 41,
- JVM_OPC_aload_0 = 42,
- JVM_OPC_aload_1 = 43,
- JVM_OPC_aload_2 = 44,
- JVM_OPC_aload_3 = 45,
- JVM_OPC_iaload = 46,
- JVM_OPC_laload = 47,
- JVM_OPC_faload = 48,
- JVM_OPC_daload = 49,
- JVM_OPC_aaload = 50,
- JVM_OPC_baload = 51,
- JVM_OPC_caload = 52,
- JVM_OPC_saload = 53,
- JVM_OPC_istore = 54,
- JVM_OPC_lstore = 55,
- JVM_OPC_fstore = 56,
- JVM_OPC_dstore = 57,
- JVM_OPC_astore = 58,
- JVM_OPC_istore_0 = 59,
- JVM_OPC_istore_1 = 60,
- JVM_OPC_istore_2 = 61,
- JVM_OPC_istore_3 = 62,
- JVM_OPC_lstore_0 = 63,
- JVM_OPC_lstore_1 = 64,
- JVM_OPC_lstore_2 = 65,
- JVM_OPC_lstore_3 = 66,
- JVM_OPC_fstore_0 = 67,
- JVM_OPC_fstore_1 = 68,
- JVM_OPC_fstore_2 = 69,
- JVM_OPC_fstore_3 = 70,
- JVM_OPC_dstore_0 = 71,
- JVM_OPC_dstore_1 = 72,
- JVM_OPC_dstore_2 = 73,
- JVM_OPC_dstore_3 = 74,
- JVM_OPC_astore_0 = 75,
- JVM_OPC_astore_1 = 76,
- JVM_OPC_astore_2 = 77,
- JVM_OPC_astore_3 = 78,
- JVM_OPC_iastore = 79,
- JVM_OPC_lastore = 80,
- JVM_OPC_fastore = 81,
- JVM_OPC_dastore = 82,
- JVM_OPC_aastore = 83,
- JVM_OPC_bastore = 84,
- JVM_OPC_castore = 85,
- JVM_OPC_sastore = 86,
- JVM_OPC_pop = 87,
- JVM_OPC_pop2 = 88,
- JVM_OPC_dup = 89,
- JVM_OPC_dup_x1 = 90,
- JVM_OPC_dup_x2 = 91,
- JVM_OPC_dup2 = 92,
- JVM_OPC_dup2_x1 = 93,
- JVM_OPC_dup2_x2 = 94,
- JVM_OPC_swap = 95,
- JVM_OPC_iadd = 96,
- JVM_OPC_ladd = 97,
- JVM_OPC_fadd = 98,
- JVM_OPC_dadd = 99,
- JVM_OPC_isub = 100,
- JVM_OPC_lsub = 101,
- JVM_OPC_fsub = 102,
- JVM_OPC_dsub = 103,
- JVM_OPC_imul = 104,
- JVM_OPC_lmul = 105,
- JVM_OPC_fmul = 106,
- JVM_OPC_dmul = 107,
- JVM_OPC_idiv = 108,
- JVM_OPC_ldiv = 109,
- JVM_OPC_fdiv = 110,
- JVM_OPC_ddiv = 111,
- JVM_OPC_irem = 112,
- JVM_OPC_lrem = 113,
- JVM_OPC_frem = 114,
- JVM_OPC_drem = 115,
- JVM_OPC_ineg = 116,
- JVM_OPC_lneg = 117,
- JVM_OPC_fneg = 118,
- JVM_OPC_dneg = 119,
- JVM_OPC_ishl = 120,
- JVM_OPC_lshl = 121,
- JVM_OPC_ishr = 122,
- JVM_OPC_lshr = 123,
- JVM_OPC_iushr = 124,
- JVM_OPC_lushr = 125,
- JVM_OPC_iand = 126,
- JVM_OPC_land = 127,
- JVM_OPC_ior = 128,
- JVM_OPC_lor = 129,
- JVM_OPC_ixor = 130,
- JVM_OPC_lxor = 131,
- JVM_OPC_iinc = 132,
- JVM_OPC_i2l = 133,
- JVM_OPC_i2f = 134,
- JVM_OPC_i2d = 135,
- JVM_OPC_l2i = 136,
- JVM_OPC_l2f = 137,
- JVM_OPC_l2d = 138,
- JVM_OPC_f2i = 139,
- JVM_OPC_f2l = 140,
- JVM_OPC_f2d = 141,
- JVM_OPC_d2i = 142,
- JVM_OPC_d2l = 143,
- JVM_OPC_d2f = 144,
- JVM_OPC_i2b = 145,
- JVM_OPC_i2c = 146,
- JVM_OPC_i2s = 147,
- JVM_OPC_lcmp = 148,
- JVM_OPC_fcmpl = 149,
- JVM_OPC_fcmpg = 150,
- JVM_OPC_dcmpl = 151,
- JVM_OPC_dcmpg = 152,
- JVM_OPC_ifeq = 153,
- JVM_OPC_ifne = 154,
- JVM_OPC_iflt = 155,
- JVM_OPC_ifge = 156,
- JVM_OPC_ifgt = 157,
- JVM_OPC_ifle = 158,
- JVM_OPC_if_icmpeq = 159,
- JVM_OPC_if_icmpne = 160,
- JVM_OPC_if_icmplt = 161,
- JVM_OPC_if_icmpge = 162,
- JVM_OPC_if_icmpgt = 163,
- JVM_OPC_if_icmple = 164,
- JVM_OPC_if_acmpeq = 165,
- JVM_OPC_if_acmpne = 166,
- JVM_OPC_goto = 167,
- JVM_OPC_jsr = 168,
- JVM_OPC_ret = 169,
- JVM_OPC_tableswitch = 170,
- JVM_OPC_lookupswitch = 171,
- JVM_OPC_ireturn = 172,
- JVM_OPC_lreturn = 173,
- JVM_OPC_freturn = 174,
- JVM_OPC_dreturn = 175,
- JVM_OPC_areturn = 176,
- JVM_OPC_return = 177,
- JVM_OPC_getstatic = 178,
- JVM_OPC_putstatic = 179,
- JVM_OPC_getfield = 180,
- JVM_OPC_putfield = 181,
- JVM_OPC_invokevirtual = 182,
- JVM_OPC_invokespecial = 183,
- JVM_OPC_invokestatic = 184,
- JVM_OPC_invokeinterface = 185,
- JVM_OPC_invokedynamic = 186,
- JVM_OPC_new = 187,
- JVM_OPC_newarray = 188,
- JVM_OPC_anewarray = 189,
- JVM_OPC_arraylength = 190,
- JVM_OPC_athrow = 191,
- JVM_OPC_checkcast = 192,
- JVM_OPC_instanceof = 193,
- JVM_OPC_monitorenter = 194,
- JVM_OPC_monitorexit = 195,
- JVM_OPC_wide = 196,
- JVM_OPC_multianewarray = 197,
- JVM_OPC_ifnull = 198,
- JVM_OPC_ifnonnull = 199,
- JVM_OPC_goto_w = 200,
- JVM_OPC_jsr_w = 201,
- JVM_OPC_MAX = 201
-};
-
-/* Opcode length initializer, use with something like:
- * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
- */
-#define JVM_OPCODE_LENGTH_INITIALIZER { \
- 1, /* nop */ \
- 1, /* aconst_null */ \
- 1, /* iconst_m1 */ \
- 1, /* iconst_0 */ \
- 1, /* iconst_1 */ \
- 1, /* iconst_2 */ \
- 1, /* iconst_3 */ \
- 1, /* iconst_4 */ \
- 1, /* iconst_5 */ \
- 1, /* lconst_0 */ \
- 1, /* lconst_1 */ \
- 1, /* fconst_0 */ \
- 1, /* fconst_1 */ \
- 1, /* fconst_2 */ \
- 1, /* dconst_0 */ \
- 1, /* dconst_1 */ \
- 2, /* bipush */ \
- 3, /* sipush */ \
- 2, /* ldc */ \
- 3, /* ldc_w */ \
- 3, /* ldc2_w */ \
- 2, /* iload */ \
- 2, /* lload */ \
- 2, /* fload */ \
- 2, /* dload */ \
- 2, /* aload */ \
- 1, /* iload_0 */ \
- 1, /* iload_1 */ \
- 1, /* iload_2 */ \
- 1, /* iload_3 */ \
- 1, /* lload_0 */ \
- 1, /* lload_1 */ \
- 1, /* lload_2 */ \
- 1, /* lload_3 */ \
- 1, /* fload_0 */ \
- 1, /* fload_1 */ \
- 1, /* fload_2 */ \
- 1, /* fload_3 */ \
- 1, /* dload_0 */ \
- 1, /* dload_1 */ \
- 1, /* dload_2 */ \
- 1, /* dload_3 */ \
- 1, /* aload_0 */ \
- 1, /* aload_1 */ \
- 1, /* aload_2 */ \
- 1, /* aload_3 */ \
- 1, /* iaload */ \
- 1, /* laload */ \
- 1, /* faload */ \
- 1, /* daload */ \
- 1, /* aaload */ \
- 1, /* baload */ \
- 1, /* caload */ \
- 1, /* saload */ \
- 2, /* istore */ \
- 2, /* lstore */ \
- 2, /* fstore */ \
- 2, /* dstore */ \
- 2, /* astore */ \
- 1, /* istore_0 */ \
- 1, /* istore_1 */ \
- 1, /* istore_2 */ \
- 1, /* istore_3 */ \
- 1, /* lstore_0 */ \
- 1, /* lstore_1 */ \
- 1, /* lstore_2 */ \
- 1, /* lstore_3 */ \
- 1, /* fstore_0 */ \
- 1, /* fstore_1 */ \
- 1, /* fstore_2 */ \
- 1, /* fstore_3 */ \
- 1, /* dstore_0 */ \
- 1, /* dstore_1 */ \
- 1, /* dstore_2 */ \
- 1, /* dstore_3 */ \
- 1, /* astore_0 */ \
- 1, /* astore_1 */ \
- 1, /* astore_2 */ \
- 1, /* astore_3 */ \
- 1, /* iastore */ \
- 1, /* lastore */ \
- 1, /* fastore */ \
- 1, /* dastore */ \
- 1, /* aastore */ \
- 1, /* bastore */ \
- 1, /* castore */ \
- 1, /* sastore */ \
- 1, /* pop */ \
- 1, /* pop2 */ \
- 1, /* dup */ \
- 1, /* dup_x1 */ \
- 1, /* dup_x2 */ \
- 1, /* dup2 */ \
- 1, /* dup2_x1 */ \
- 1, /* dup2_x2 */ \
- 1, /* swap */ \
- 1, /* iadd */ \
- 1, /* ladd */ \
- 1, /* fadd */ \
- 1, /* dadd */ \
- 1, /* isub */ \
- 1, /* lsub */ \
- 1, /* fsub */ \
- 1, /* dsub */ \
- 1, /* imul */ \
- 1, /* lmul */ \
- 1, /* fmul */ \
- 1, /* dmul */ \
- 1, /* idiv */ \
- 1, /* ldiv */ \
- 1, /* fdiv */ \
- 1, /* ddiv */ \
- 1, /* irem */ \
- 1, /* lrem */ \
- 1, /* frem */ \
- 1, /* drem */ \
- 1, /* ineg */ \
- 1, /* lneg */ \
- 1, /* fneg */ \
- 1, /* dneg */ \
- 1, /* ishl */ \
- 1, /* lshl */ \
- 1, /* ishr */ \
- 1, /* lshr */ \
- 1, /* iushr */ \
- 1, /* lushr */ \
- 1, /* iand */ \
- 1, /* land */ \
- 1, /* ior */ \
- 1, /* lor */ \
- 1, /* ixor */ \
- 1, /* lxor */ \
- 3, /* iinc */ \
- 1, /* i2l */ \
- 1, /* i2f */ \
- 1, /* i2d */ \
- 1, /* l2i */ \
- 1, /* l2f */ \
- 1, /* l2d */ \
- 1, /* f2i */ \
- 1, /* f2l */ \
- 1, /* f2d */ \
- 1, /* d2i */ \
- 1, /* d2l */ \
- 1, /* d2f */ \
- 1, /* i2b */ \
- 1, /* i2c */ \
- 1, /* i2s */ \
- 1, /* lcmp */ \
- 1, /* fcmpl */ \
- 1, /* fcmpg */ \
- 1, /* dcmpl */ \
- 1, /* dcmpg */ \
- 3, /* ifeq */ \
- 3, /* ifne */ \
- 3, /* iflt */ \
- 3, /* ifge */ \
- 3, /* ifgt */ \
- 3, /* ifle */ \
- 3, /* if_icmpeq */ \
- 3, /* if_icmpne */ \
- 3, /* if_icmplt */ \
- 3, /* if_icmpge */ \
- 3, /* if_icmpgt */ \
- 3, /* if_icmple */ \
- 3, /* if_acmpeq */ \
- 3, /* if_acmpne */ \
- 3, /* goto */ \
- 3, /* jsr */ \
- 2, /* ret */ \
- 99, /* tableswitch */ \
- 99, /* lookupswitch */ \
- 1, /* ireturn */ \
- 1, /* lreturn */ \
- 1, /* freturn */ \
- 1, /* dreturn */ \
- 1, /* areturn */ \
- 1, /* return */ \
- 3, /* getstatic */ \
- 3, /* putstatic */ \
- 3, /* getfield */ \
- 3, /* putfield */ \
- 3, /* invokevirtual */ \
- 3, /* invokespecial */ \
- 3, /* invokestatic */ \
- 5, /* invokeinterface */ \
- 5, /* invokedynamic */ \
- 3, /* new */ \
- 2, /* newarray */ \
- 3, /* anewarray */ \
- 1, /* arraylength */ \
- 1, /* athrow */ \
- 3, /* checkcast */ \
- 3, /* instanceof */ \
- 1, /* monitorenter */ \
- 1, /* monitorexit */ \
- 0, /* wide */ \
- 4, /* multianewarray */ \
- 3, /* ifnull */ \
- 3, /* ifnonnull */ \
- 5, /* goto_w */ \
- 5 /* jsr_w */ \
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* CLASSFILE_CONSTANTS */
diff --git a/jni/windows/jawt.h b/jni/windows/jawt.h
deleted file mode 100644
index 1294f2f..0000000
--- a/jni/windows/jawt.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-#ifndef _JAVASOFT_JAWT_H_
-#define _JAVASOFT_JAWT_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * AWT native interface.
- *
- * The AWT native interface allows a native C or C++ application a means
- * by which to access native structures in AWT. This is to facilitate moving
- * legacy C and C++ applications to Java and to target the needs of the
- * developers who need to do their own native rendering to canvases
- * for performance or other reasons.
- *
- * Conversely it also provides mechanisms for an application which already
- * has a native window to provide that to AWT for AWT rendering.
- *
- * Since every platform may be different in its native data structures
- * and APIs for windowing systems the application must necessarily
- * provided per-platform source and compile and deliver per-platform
- * native code to use this API.
- *
- * These interfaces are not part of the Java SE specification and
- * a VM is not required to implement this API. However it is strongly
- * recommended that all implementations which support headful AWT
- * also support these interfaces.
- *
- */
-
-/*
- * AWT Native Drawing Surface (JAWT_DrawingSurface).
- *
- * For each platform, there is a native drawing surface structure. This
- * platform-specific structure can be found in jawt_md.h. It is recommended
- * that additional platforms follow the same model. It is also recommended
- * that VMs on all platforms support the existing structures in jawt_md.h.
- *
- *******************
- * EXAMPLE OF USAGE:
- *******************
- *
- * In Win32, a programmer wishes to access the HWND of a canvas to perform
- * native rendering into it. The programmer has declared the paint() method
- * for their canvas subclass to be native:
- *
- *
- * MyCanvas.java:
- *
- * import java.awt.*;
- *
- * public class MyCanvas extends Canvas {
- *
- * static {
- * System.loadLibrary("mylib");
- * }
- *
- * public native void paint(Graphics g);
- * }
- *
- *
- * myfile.c:
- *
- * #include "jawt_md.h"
- * #include
- *
- * JNIEXPORT void JNICALL
- * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
- * {
- * JAWT awt;
- * JAWT_DrawingSurface* ds;
- * JAWT_DrawingSurfaceInfo* dsi;
- * JAWT_Win32DrawingSurfaceInfo* dsi_win;
- * jboolean result;
- * jint lock;
- *
- * // Get the AWT. Request version 9 to access features in that release.
- * awt.version = JAWT_VERSION_9;
- * result = JAWT_GetAWT(env, &awt);
- * assert(result != JNI_FALSE);
- *
- * // Get the drawing surface
- * ds = awt.GetDrawingSurface(env, canvas);
- * assert(ds != NULL);
- *
- * // Lock the drawing surface
- * lock = ds->Lock(ds);
- * assert((lock & JAWT_LOCK_ERROR) == 0);
- *
- * // Get the drawing surface info
- * dsi = ds->GetDrawingSurfaceInfo(ds);
- *
- * // Get the platform-specific drawing info
- * dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
- *
- * //////////////////////////////
- * // !!! DO PAINTING HERE !!! //
- * //////////////////////////////
- *
- * // Free the drawing surface info
- * ds->FreeDrawingSurfaceInfo(dsi);
- *
- * // Unlock the drawing surface
- * ds->Unlock(ds);
- *
- * // Free the drawing surface
- * awt.FreeDrawingSurface(ds);
- * }
- *
- */
-
-/*
- * JAWT_Rectangle
- * Structure for a native rectangle.
- */
-typedef struct jawt_Rectangle {
- jint x;
- jint y;
- jint width;
- jint height;
-} JAWT_Rectangle;
-
-struct jawt_DrawingSurface;
-
-/*
- * JAWT_DrawingSurfaceInfo
- * Structure for containing the underlying drawing information of a component.
- */
-typedef struct jawt_DrawingSurfaceInfo {
- /*
- * Pointer to the platform-specific information. This can be safely
- * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
- * JAWT_X11DrawingSurfaceInfo on Linux and Solaris. On Mac OS X this is a
- * pointer to a NSObject that conforms to the JAWT_SurfaceLayers
- * protocol. See jawt_md.h for details.
- */
- void* platformInfo;
- /* Cached pointer to the underlying drawing surface */
- struct jawt_DrawingSurface* ds;
- /* Bounding rectangle of the drawing surface */
- JAWT_Rectangle bounds;
- /* Number of rectangles in the clip */
- jint clipSize;
- /* Clip rectangle array */
- JAWT_Rectangle* clip;
-} JAWT_DrawingSurfaceInfo;
-
-#define JAWT_LOCK_ERROR 0x00000001
-#define JAWT_LOCK_CLIP_CHANGED 0x00000002
-#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004
-#define JAWT_LOCK_SURFACE_CHANGED 0x00000008
-
-/*
- * JAWT_DrawingSurface
- * Structure for containing the underlying drawing information of a component.
- * All operations on a JAWT_DrawingSurface MUST be performed from the same
- * thread as the call to GetDrawingSurface.
- */
-typedef struct jawt_DrawingSurface {
- /*
- * Cached reference to the Java environment of the calling thread.
- * If Lock(), Unlock(), GetDrawingSurfaceInfo() or
- * FreeDrawingSurfaceInfo() are called from a different thread,
- * this data member should be set before calling those functions.
- */
- JNIEnv* env;
- /* Cached reference to the target object */
- jobject target;
- /*
- * Lock the surface of the target component for native rendering.
- * When finished drawing, the surface must be unlocked with
- * Unlock(). This function returns a bitmask with one or more of the
- * following values:
- *
- * JAWT_LOCK_ERROR - When an error has occurred and the surface could not
- * be locked.
- *
- * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
- *
- * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
- *
- * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
- */
- jint (JNICALL *Lock)
- (struct jawt_DrawingSurface* ds);
- /*
- * Get the drawing surface info.
- * The value returned may be cached, but the values may change if
- * additional calls to Lock() or Unlock() are made.
- * Lock() must be called before this can return a valid value.
- * Returns NULL if an error has occurred.
- * When finished with the returned value, FreeDrawingSurfaceInfo must be
- * called.
- */
- JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
- (struct jawt_DrawingSurface* ds);
- /*
- * Free the drawing surface info.
- */
- void (JNICALL *FreeDrawingSurfaceInfo)
- (JAWT_DrawingSurfaceInfo* dsi);
- /*
- * Unlock the drawing surface of the target component for native rendering.
- */
- void (JNICALL *Unlock)
- (struct jawt_DrawingSurface* ds);
-} JAWT_DrawingSurface;
-
-/*
- * JAWT
- * Structure for containing native AWT functions.
- */
-typedef struct jawt {
- /*
- * Version of this structure. This must always be set before
- * calling JAWT_GetAWT(). It affects the functions returned.
- * Must be one of the known pre-defined versions.
- */
- jint version;
- /*
- * Return a drawing surface from a target jobject. This value
- * may be cached.
- * Returns NULL if an error has occurred.
- * Target must be a java.awt.Component (should be a Canvas
- * or Window for native rendering).
- * FreeDrawingSurface() must be called when finished with the
- * returned JAWT_DrawingSurface.
- */
- JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
- (JNIEnv* env, jobject target);
- /*
- * Free the drawing surface allocated in GetDrawingSurface.
- */
- void (JNICALL *FreeDrawingSurface)
- (JAWT_DrawingSurface* ds);
- /*
- * Since 1.4
- * Locks the entire AWT for synchronization purposes
- */
- void (JNICALL *Lock)(JNIEnv* env);
- /*
- * Since 1.4
- * Unlocks the entire AWT for synchronization purposes
- */
- void (JNICALL *Unlock)(JNIEnv* env);
- /*
- * Since 1.4
- * Returns a reference to a java.awt.Component from a native
- * platform handle. On Windows, this corresponds to an HWND;
- * on Solaris and Linux, this is a Drawable. For other platforms,
- * see the appropriate machine-dependent header file for a description.
- * The reference returned by this function is a local
- * reference that is only valid in this environment.
- * This function returns a NULL reference if no component could be
- * found with matching platform information.
- */
- jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
-
- /**
- * Since 9
- * Creates a java.awt.Frame placed in a native container. Container is
- * referenced by the native platform handle. For example on Windows this
- * corresponds to an HWND. For other platforms, see the appropriate
- * machine-dependent header file for a description. The reference returned
- * by this function is a local reference that is only valid in this
- * environment. This function returns a NULL reference if no frame could be
- * created with matching platform information.
- */
- jobject (JNICALL *CreateEmbeddedFrame) (JNIEnv *env, void* platformInfo);
-
- /**
- * Since 9
- * Moves and resizes the embedded frame. The new location of the top-left
- * corner is specified by x and y parameters relative to the native parent
- * component. The new size is specified by width and height.
- *
- * The embedded frame should be created by CreateEmbeddedFrame() method, or
- * this function will not have any effect.
- *
- * java.awt.Component.setLocation() and java.awt.Component.setBounds() for
- * EmbeddedFrame really don't move it within the native parent. These
- * methods always locate the embedded frame at (0, 0) for backward
- * compatibility. To allow moving embedded frames this method was
- * introduced, and it works just the same way as setLocation() and
- * setBounds() for usual, non-embedded components.
- *
- * Using usual get/setLocation() and get/setBounds() together with this new
- * method is not recommended.
- */
- void (JNICALL *SetBounds) (JNIEnv *env, jobject embeddedFrame,
- jint x, jint y, jint w, jint h);
- /**
- * Since 9
- * Synthesize a native message to activate or deactivate an EmbeddedFrame
- * window depending on the value of parameter doActivate, if "true"
- * activates the window; otherwise, deactivates the window.
- *
- * The embedded frame should be created by CreateEmbeddedFrame() method, or
- * this function will not have any effect.
- */
- void (JNICALL *SynthesizeWindowActivation) (JNIEnv *env,
- jobject embeddedFrame, jboolean doActivate);
-} JAWT;
-
-/*
- * Get the AWT native structure. This function returns JNI_FALSE if
- * an error occurs.
- */
-_JNI_IMPORT_OR_EXPORT_
-jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
-
-/*
- * Specify one of these constants as the JAWT.version
- * Specifying an earlier version will limit the available functions to
- * those provided in that earlier version of JAWT.
- * See the "Since" note on each API. Methods with no "Since"
- * may be presumed to be present in JAWT_VERSION_1_3.
- */
-#define JAWT_VERSION_1_3 0x00010003
-#define JAWT_VERSION_1_4 0x00010004
-#define JAWT_VERSION_1_7 0x00010007
-#define JAWT_VERSION_9 0x00090000
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !_JAVASOFT_JAWT_H_ */
diff --git a/jni/windows/jdwpTransport.h b/jni/windows/jdwpTransport.h
deleted file mode 100644
index 7ecc505..0000000
--- a/jni/windows/jdwpTransport.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/*
- * Java Debug Wire Protocol Transport Service Provider Interface.
- */
-
-#ifndef JDWPTRANSPORT_H
-#define JDWPTRANSPORT_H
-
-#include "jni.h"
-
-enum {
- JDWPTRANSPORT_VERSION_1_0 = 0x00010000,
- JDWPTRANSPORT_VERSION_1_1 = 0x00010001
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct jdwpTransportNativeInterface_;
-
-struct _jdwpTransportEnv;
-
-#ifdef __cplusplus
-typedef _jdwpTransportEnv jdwpTransportEnv;
-#else
-typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
-#endif /* __cplusplus */
-
-/*
- * Errors. Universal errors with JVMTI/JVMDI equivalents keep the
- * values the same.
- */
-typedef enum {
- JDWPTRANSPORT_ERROR_NONE = 0,
- JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
- JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
- JDWPTRANSPORT_ERROR_INTERNAL = 113,
- JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
- JDWPTRANSPORT_ERROR_IO_ERROR = 202,
- JDWPTRANSPORT_ERROR_TIMEOUT = 203,
- JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
-} jdwpTransportError;
-
-
-/*
- * Structure to define capabilities
- */
-typedef struct {
- unsigned int can_timeout_attach :1;
- unsigned int can_timeout_accept :1;
- unsigned int can_timeout_handshake :1;
- unsigned int reserved3 :1;
- unsigned int reserved4 :1;
- unsigned int reserved5 :1;
- unsigned int reserved6 :1;
- unsigned int reserved7 :1;
- unsigned int reserved8 :1;
- unsigned int reserved9 :1;
- unsigned int reserved10 :1;
- unsigned int reserved11 :1;
- unsigned int reserved12 :1;
- unsigned int reserved13 :1;
- unsigned int reserved14 :1;
- unsigned int reserved15 :1;
-} JDWPTransportCapabilities;
-
-
-/*
- * Structures to define packet layout.
- *
- * See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
- */
-
-#define JDWP_HEADER_SIZE 11
-
-enum {
- /*
- * If additional flags are added that apply to jdwpCmdPacket,
- * then debugLoop.c: reader() will need to be updated to
- * accept more than JDWPTRANSPORT_FLAGS_NONE.
- */
- JDWPTRANSPORT_FLAGS_NONE = 0x0,
- JDWPTRANSPORT_FLAGS_REPLY = 0x80
-};
-
-typedef struct {
- jint len;
- jint id;
- jbyte flags;
- jbyte cmdSet;
- jbyte cmd;
- jbyte *data;
-} jdwpCmdPacket;
-
-typedef struct {
- jint len;
- jint id;
- jbyte flags;
- jshort errorCode;
- jbyte *data;
-} jdwpReplyPacket;
-
-typedef struct {
- union {
- jdwpCmdPacket cmd;
- jdwpReplyPacket reply;
- } type;
-} jdwpPacket;
-
-/*
- * JDWP functions called by the transport.
- */
-typedef struct jdwpTransportCallback {
- void *(*alloc)(jint numBytes); /* Call this for all allocations */
- void (*free)(void *buffer); /* Call this for all deallocations */
-} jdwpTransportCallback;
-
-typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm,
- jdwpTransportCallback *callback,
- jint version,
- jdwpTransportEnv** env);
-
-/*
- * JDWP transport configuration from the agent.
- */
-typedef struct jdwpTransportConfiguration {
- /* Field added in JDWPTRANSPORT_VERSION_1_1: */
- const char* allowed_peers; /* Peers allowed for connection */
-} jdwpTransportConfiguration;
-
-
-/* Function Interface */
-
-struct jdwpTransportNativeInterface_ {
- /* 1 : RESERVED */
- void *reserved1;
-
- /* 2 : Get Capabilities */
- jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
- JDWPTransportCapabilities *capabilities_ptr);
-
- /* 3 : Attach */
- jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
- const char* address,
- jlong attach_timeout,
- jlong handshake_timeout);
-
- /* 4: StartListening */
- jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
- const char* address,
- char** actual_address);
-
- /* 5: StopListening */
- jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
-
- /* 6: Accept */
- jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
- jlong accept_timeout,
- jlong handshake_timeout);
-
- /* 7: IsOpen */
- jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
-
- /* 8: Close */
- jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
-
- /* 9: ReadPacket */
- jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
- jdwpPacket *pkt);
-
- /* 10: Write Packet */
- jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
- const jdwpPacket* pkt);
-
- /* 11: GetLastError */
- jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
- char** error);
-
- /* 12: SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
- jdwpTransportError (JNICALL *SetTransportConfiguration)(jdwpTransportEnv* env,
- jdwpTransportConfiguration *config);
-};
-
-
-/*
- * Use inlined functions so that C++ code can use syntax such as
- * env->Attach("mymachine:5000", 10*1000, 0);
- *
- * rather than using C's :-
- *
- * (*env)->Attach(env, "mymachine:5000", 10*1000, 0);
- */
-struct _jdwpTransportEnv {
- const struct jdwpTransportNativeInterface_ *functions;
-#ifdef __cplusplus
-
- jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
- return functions->GetCapabilities(this, capabilities_ptr);
- }
-
- jdwpTransportError Attach(const char* address, jlong attach_timeout,
- jlong handshake_timeout) {
- return functions->Attach(this, address, attach_timeout, handshake_timeout);
- }
-
- jdwpTransportError StartListening(const char* address,
- char** actual_address) {
- return functions->StartListening(this, address, actual_address);
- }
-
- jdwpTransportError StopListening(void) {
- return functions->StopListening(this);
- }
-
- jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
- return functions->Accept(this, accept_timeout, handshake_timeout);
- }
-
- jboolean IsOpen(void) {
- return functions->IsOpen(this);
- }
-
- jdwpTransportError Close(void) {
- return functions->Close(this);
- }
-
- jdwpTransportError ReadPacket(jdwpPacket *pkt) {
- return functions->ReadPacket(this, pkt);
- }
-
- jdwpTransportError WritePacket(const jdwpPacket* pkt) {
- return functions->WritePacket(this, pkt);
- }
-
- jdwpTransportError GetLastError(char** error) {
- return functions->GetLastError(this, error);
- }
-
- /* SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
- jdwpTransportError SetTransportConfiguration(jdwpTransportEnv* env,
- return functions->SetTransportConfiguration(this, config);
- }
-
-#endif /* __cplusplus */
-};
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* JDWPTRANSPORT_H */
diff --git a/jni/windows/jni.h b/jni/windows/jni.h
deleted file mode 100644
index 9b4980e..0000000
--- a/jni/windows/jni.h
+++ /dev/null
@@ -1,1987 +0,0 @@
-/*
- * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/*
- * We used part of Netscape's Java Runtime Interface (JRI) as the starting
- * point of our design and implementation.
- */
-
-/******************************************************************************
- * Java Runtime Interface
- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
- *****************************************************************************/
-
-#ifndef _JAVASOFT_JNI_H_
-#define _JAVASOFT_JNI_H_
-
-#include
-#include
-
-/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
- and jlong */
-
-#include "jni_md.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * JNI Types
- */
-
-#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
-
-typedef unsigned char jboolean;
-typedef unsigned short jchar;
-typedef short jshort;
-typedef float jfloat;
-typedef double jdouble;
-
-typedef jint jsize;
-
-#ifdef __cplusplus
-
-class _jobject {};
-class _jclass : public _jobject {};
-class _jthrowable : public _jobject {};
-class _jstring : public _jobject {};
-class _jarray : public _jobject {};
-class _jbooleanArray : public _jarray {};
-class _jbyteArray : public _jarray {};
-class _jcharArray : public _jarray {};
-class _jshortArray : public _jarray {};
-class _jintArray : public _jarray {};
-class _jlongArray : public _jarray {};
-class _jfloatArray : public _jarray {};
-class _jdoubleArray : public _jarray {};
-class _jobjectArray : public _jarray {};
-
-typedef _jobject *jobject;
-typedef _jclass *jclass;
-typedef _jthrowable *jthrowable;
-typedef _jstring *jstring;
-typedef _jarray *jarray;
-typedef _jbooleanArray *jbooleanArray;
-typedef _jbyteArray *jbyteArray;
-typedef _jcharArray *jcharArray;
-typedef _jshortArray *jshortArray;
-typedef _jintArray *jintArray;
-typedef _jlongArray *jlongArray;
-typedef _jfloatArray *jfloatArray;
-typedef _jdoubleArray *jdoubleArray;
-typedef _jobjectArray *jobjectArray;
-
-#else
-
-struct _jobject;
-
-typedef struct _jobject *jobject;
-typedef jobject jclass;
-typedef jobject jthrowable;
-typedef jobject jstring;
-typedef jobject jarray;
-typedef jarray jbooleanArray;
-typedef jarray jbyteArray;
-typedef jarray jcharArray;
-typedef jarray jshortArray;
-typedef jarray jintArray;
-typedef jarray jlongArray;
-typedef jarray jfloatArray;
-typedef jarray jdoubleArray;
-typedef jarray jobjectArray;
-
-#endif
-
-typedef jobject jweak;
-
-typedef union jvalue {
- jboolean z;
- jbyte b;
- jchar c;
- jshort s;
- jint i;
- jlong j;
- jfloat f;
- jdouble d;
- jobject l;
-} jvalue;
-
-struct _jfieldID;
-typedef struct _jfieldID *jfieldID;
-
-struct _jmethodID;
-typedef struct _jmethodID *jmethodID;
-
-/* Return values from jobjectRefType */
-typedef enum _jobjectType {
- JNIInvalidRefType = 0,
- JNILocalRefType = 1,
- JNIGlobalRefType = 2,
- JNIWeakGlobalRefType = 3
-} jobjectRefType;
-
-
-#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
-
-/*
- * jboolean constants
- */
-
-#define JNI_FALSE 0
-#define JNI_TRUE 1
-
-/*
- * possible return values for JNI functions.
- */
-
-#define JNI_OK 0 /* success */
-#define JNI_ERR (-1) /* unknown error */
-#define JNI_EDETACHED (-2) /* thread detached from the VM */
-#define JNI_EVERSION (-3) /* JNI version error */
-#define JNI_ENOMEM (-4) /* not enough memory */
-#define JNI_EEXIST (-5) /* VM already created */
-#define JNI_EINVAL (-6) /* invalid arguments */
-
-/*
- * used in ReleaseScalarArrayElements
- */
-
-#define JNI_COMMIT 1
-#define JNI_ABORT 2
-
-/*
- * used in RegisterNatives to describe native method name, signature,
- * and function pointer.
- */
-
-typedef struct {
- char *name;
- char *signature;
- void *fnPtr;
-} JNINativeMethod;
-
-/*
- * JNI Native Method Interface.
- */
-
-struct JNINativeInterface_;
-
-struct JNIEnv_;
-
-#ifdef __cplusplus
-typedef JNIEnv_ JNIEnv;
-#else
-typedef const struct JNINativeInterface_ *JNIEnv;
-#endif
-
-/*
- * JNI Invocation Interface.
- */
-
-struct JNIInvokeInterface_;
-
-struct JavaVM_;
-
-#ifdef __cplusplus
-typedef JavaVM_ JavaVM;
-#else
-typedef const struct JNIInvokeInterface_ *JavaVM;
-#endif
-
-struct JNINativeInterface_ {
- void *reserved0;
- void *reserved1;
- void *reserved2;
-
- void *reserved3;
- jint (JNICALL *GetVersion)(JNIEnv *env);
-
- jclass (JNICALL *DefineClass)
- (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
- jsize len);
- jclass (JNICALL *FindClass)
- (JNIEnv *env, const char *name);
-
- jmethodID (JNICALL *FromReflectedMethod)
- (JNIEnv *env, jobject method);
- jfieldID (JNICALL *FromReflectedField)
- (JNIEnv *env, jobject field);
-
- jobject (JNICALL *ToReflectedMethod)
- (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
-
- jclass (JNICALL *GetSuperclass)
- (JNIEnv *env, jclass sub);
- jboolean (JNICALL *IsAssignableFrom)
- (JNIEnv *env, jclass sub, jclass sup);
-
- jobject (JNICALL *ToReflectedField)
- (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
-
- jint (JNICALL *Throw)
- (JNIEnv *env, jthrowable obj);
- jint (JNICALL *ThrowNew)
- (JNIEnv *env, jclass clazz, const char *msg);
- jthrowable (JNICALL *ExceptionOccurred)
- (JNIEnv *env);
- void (JNICALL *ExceptionDescribe)
- (JNIEnv *env);
- void (JNICALL *ExceptionClear)
- (JNIEnv *env);
- void (JNICALL *FatalError)
- (JNIEnv *env, const char *msg);
-
- jint (JNICALL *PushLocalFrame)
- (JNIEnv *env, jint capacity);
- jobject (JNICALL *PopLocalFrame)
- (JNIEnv *env, jobject result);
-
- jobject (JNICALL *NewGlobalRef)
- (JNIEnv *env, jobject lobj);
- void (JNICALL *DeleteGlobalRef)
- (JNIEnv *env, jobject gref);
- void (JNICALL *DeleteLocalRef)
- (JNIEnv *env, jobject obj);
- jboolean (JNICALL *IsSameObject)
- (JNIEnv *env, jobject obj1, jobject obj2);
- jobject (JNICALL *NewLocalRef)
- (JNIEnv *env, jobject ref);
- jint (JNICALL *EnsureLocalCapacity)
- (JNIEnv *env, jint capacity);
-
- jobject (JNICALL *AllocObject)
- (JNIEnv *env, jclass clazz);
- jobject (JNICALL *NewObject)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jobject (JNICALL *NewObjectV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jobject (JNICALL *NewObjectA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jclass (JNICALL *GetObjectClass)
- (JNIEnv *env, jobject obj);
- jboolean (JNICALL *IsInstanceOf)
- (JNIEnv *env, jobject obj, jclass clazz);
-
- jmethodID (JNICALL *GetMethodID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
- jobject (JNICALL *CallObjectMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jobject (JNICALL *CallObjectMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jobject (JNICALL *CallObjectMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
- jboolean (JNICALL *CallBooleanMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jboolean (JNICALL *CallBooleanMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jboolean (JNICALL *CallBooleanMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
- jbyte (JNICALL *CallByteMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jbyte (JNICALL *CallByteMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jbyte (JNICALL *CallByteMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jchar (JNICALL *CallCharMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jchar (JNICALL *CallCharMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jchar (JNICALL *CallCharMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jshort (JNICALL *CallShortMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jshort (JNICALL *CallShortMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jshort (JNICALL *CallShortMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jint (JNICALL *CallIntMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jint (JNICALL *CallIntMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jint (JNICALL *CallIntMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jlong (JNICALL *CallLongMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jlong (JNICALL *CallLongMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jlong (JNICALL *CallLongMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jfloat (JNICALL *CallFloatMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jfloat (JNICALL *CallFloatMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jfloat (JNICALL *CallFloatMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- jdouble (JNICALL *CallDoubleMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- jdouble (JNICALL *CallDoubleMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- jdouble (JNICALL *CallDoubleMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
- void (JNICALL *CallVoidMethod)
- (JNIEnv *env, jobject obj, jmethodID methodID, ...);
- void (JNICALL *CallVoidMethodV)
- (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
- void (JNICALL *CallVoidMethodA)
- (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
- jobject (JNICALL *CallNonvirtualObjectMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jobject (JNICALL *CallNonvirtualObjectMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jobject (JNICALL *CallNonvirtualObjectMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue * args);
-
- jboolean (JNICALL *CallNonvirtualBooleanMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jboolean (JNICALL *CallNonvirtualBooleanMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jboolean (JNICALL *CallNonvirtualBooleanMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue * args);
-
- jbyte (JNICALL *CallNonvirtualByteMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jbyte (JNICALL *CallNonvirtualByteMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jbyte (JNICALL *CallNonvirtualByteMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jchar (JNICALL *CallNonvirtualCharMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jchar (JNICALL *CallNonvirtualCharMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jchar (JNICALL *CallNonvirtualCharMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jshort (JNICALL *CallNonvirtualShortMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jshort (JNICALL *CallNonvirtualShortMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jshort (JNICALL *CallNonvirtualShortMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jint (JNICALL *CallNonvirtualIntMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jint (JNICALL *CallNonvirtualIntMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jint (JNICALL *CallNonvirtualIntMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jlong (JNICALL *CallNonvirtualLongMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jlong (JNICALL *CallNonvirtualLongMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jlong (JNICALL *CallNonvirtualLongMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jfloat (JNICALL *CallNonvirtualFloatMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jfloat (JNICALL *CallNonvirtualFloatMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jfloat (JNICALL *CallNonvirtualFloatMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- jdouble (JNICALL *CallNonvirtualDoubleMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- jdouble (JNICALL *CallNonvirtualDoubleMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- jdouble (JNICALL *CallNonvirtualDoubleMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue *args);
-
- void (JNICALL *CallNonvirtualVoidMethod)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
- void (JNICALL *CallNonvirtualVoidMethodV)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- va_list args);
- void (JNICALL *CallNonvirtualVoidMethodA)
- (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
- const jvalue * args);
-
- jfieldID (JNICALL *GetFieldID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
- jobject (JNICALL *GetObjectField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jboolean (JNICALL *GetBooleanField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jbyte (JNICALL *GetByteField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jchar (JNICALL *GetCharField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jshort (JNICALL *GetShortField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jint (JNICALL *GetIntField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jlong (JNICALL *GetLongField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jfloat (JNICALL *GetFloatField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
- jdouble (JNICALL *GetDoubleField)
- (JNIEnv *env, jobject obj, jfieldID fieldID);
-
- void (JNICALL *SetObjectField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
- void (JNICALL *SetBooleanField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
- void (JNICALL *SetByteField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
- void (JNICALL *SetCharField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
- void (JNICALL *SetShortField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
- void (JNICALL *SetIntField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
- void (JNICALL *SetLongField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
- void (JNICALL *SetFloatField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
- void (JNICALL *SetDoubleField)
- (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
-
- jmethodID (JNICALL *GetStaticMethodID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
- jobject (JNICALL *CallStaticObjectMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jobject (JNICALL *CallStaticObjectMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jobject (JNICALL *CallStaticObjectMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jboolean (JNICALL *CallStaticBooleanMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jboolean (JNICALL *CallStaticBooleanMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jboolean (JNICALL *CallStaticBooleanMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jbyte (JNICALL *CallStaticByteMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jbyte (JNICALL *CallStaticByteMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jbyte (JNICALL *CallStaticByteMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jchar (JNICALL *CallStaticCharMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jchar (JNICALL *CallStaticCharMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jchar (JNICALL *CallStaticCharMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jshort (JNICALL *CallStaticShortMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jshort (JNICALL *CallStaticShortMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jshort (JNICALL *CallStaticShortMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jint (JNICALL *CallStaticIntMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jint (JNICALL *CallStaticIntMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jint (JNICALL *CallStaticIntMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jlong (JNICALL *CallStaticLongMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jlong (JNICALL *CallStaticLongMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jlong (JNICALL *CallStaticLongMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jfloat (JNICALL *CallStaticFloatMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jfloat (JNICALL *CallStaticFloatMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jfloat (JNICALL *CallStaticFloatMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- jdouble (JNICALL *CallStaticDoubleMethod)
- (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
- jdouble (JNICALL *CallStaticDoubleMethodV)
- (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
- jdouble (JNICALL *CallStaticDoubleMethodA)
- (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
- void (JNICALL *CallStaticVoidMethod)
- (JNIEnv *env, jclass cls, jmethodID methodID, ...);
- void (JNICALL *CallStaticVoidMethodV)
- (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
- void (JNICALL *CallStaticVoidMethodA)
- (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
-
- jfieldID (JNICALL *GetStaticFieldID)
- (JNIEnv *env, jclass clazz, const char *name, const char *sig);
- jobject (JNICALL *GetStaticObjectField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jboolean (JNICALL *GetStaticBooleanField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jbyte (JNICALL *GetStaticByteField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jchar (JNICALL *GetStaticCharField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jshort (JNICALL *GetStaticShortField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jint (JNICALL *GetStaticIntField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jlong (JNICALL *GetStaticLongField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jfloat (JNICALL *GetStaticFloatField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
- jdouble (JNICALL *GetStaticDoubleField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID);
-
- void (JNICALL *SetStaticObjectField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
- void (JNICALL *SetStaticBooleanField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
- void (JNICALL *SetStaticByteField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
- void (JNICALL *SetStaticCharField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
- void (JNICALL *SetStaticShortField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
- void (JNICALL *SetStaticIntField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
- void (JNICALL *SetStaticLongField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
- void (JNICALL *SetStaticFloatField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
- void (JNICALL *SetStaticDoubleField)
- (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
-
- jstring (JNICALL *NewString)
- (JNIEnv *env, const jchar *unicode, jsize len);
- jsize (JNICALL *GetStringLength)
- (JNIEnv *env, jstring str);
- const jchar *(JNICALL *GetStringChars)
- (JNIEnv *env, jstring str, jboolean *isCopy);
- void (JNICALL *ReleaseStringChars)
- (JNIEnv *env, jstring str, const jchar *chars);
-
- jstring (JNICALL *NewStringUTF)
- (JNIEnv *env, const char *utf);
- jsize (JNICALL *GetStringUTFLength)
- (JNIEnv *env, jstring str);
- const char* (JNICALL *GetStringUTFChars)
- (JNIEnv *env, jstring str, jboolean *isCopy);
- void (JNICALL *ReleaseStringUTFChars)
- (JNIEnv *env, jstring str, const char* chars);
-
-
- jsize (JNICALL *GetArrayLength)
- (JNIEnv *env, jarray array);
-
- jobjectArray (JNICALL *NewObjectArray)
- (JNIEnv *env, jsize len, jclass clazz, jobject init);
- jobject (JNICALL *GetObjectArrayElement)
- (JNIEnv *env, jobjectArray array, jsize index);
- void (JNICALL *SetObjectArrayElement)
- (JNIEnv *env, jobjectArray array, jsize index, jobject val);
-
- jbooleanArray (JNICALL *NewBooleanArray)
- (JNIEnv *env, jsize len);
- jbyteArray (JNICALL *NewByteArray)
- (JNIEnv *env, jsize len);
- jcharArray (JNICALL *NewCharArray)
- (JNIEnv *env, jsize len);
- jshortArray (JNICALL *NewShortArray)
- (JNIEnv *env, jsize len);
- jintArray (JNICALL *NewIntArray)
- (JNIEnv *env, jsize len);
- jlongArray (JNICALL *NewLongArray)
- (JNIEnv *env, jsize len);
- jfloatArray (JNICALL *NewFloatArray)
- (JNIEnv *env, jsize len);
- jdoubleArray (JNICALL *NewDoubleArray)
- (JNIEnv *env, jsize len);
-
- jboolean * (JNICALL *GetBooleanArrayElements)
- (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
- jbyte * (JNICALL *GetByteArrayElements)
- (JNIEnv *env, jbyteArray array, jboolean *isCopy);
- jchar * (JNICALL *GetCharArrayElements)
- (JNIEnv *env, jcharArray array, jboolean *isCopy);
- jshort * (JNICALL *GetShortArrayElements)
- (JNIEnv *env, jshortArray array, jboolean *isCopy);
- jint * (JNICALL *GetIntArrayElements)
- (JNIEnv *env, jintArray array, jboolean *isCopy);
- jlong * (JNICALL *GetLongArrayElements)
- (JNIEnv *env, jlongArray array, jboolean *isCopy);
- jfloat * (JNICALL *GetFloatArrayElements)
- (JNIEnv *env, jfloatArray array, jboolean *isCopy);
- jdouble * (JNICALL *GetDoubleArrayElements)
- (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
-
- void (JNICALL *ReleaseBooleanArrayElements)
- (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
- void (JNICALL *ReleaseByteArrayElements)
- (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
- void (JNICALL *ReleaseCharArrayElements)
- (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
- void (JNICALL *ReleaseShortArrayElements)
- (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
- void (JNICALL *ReleaseIntArrayElements)
- (JNIEnv *env, jintArray array, jint *elems, jint mode);
- void (JNICALL *ReleaseLongArrayElements)
- (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
- void (JNICALL *ReleaseFloatArrayElements)
- (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
- void (JNICALL *ReleaseDoubleArrayElements)
- (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
-
- void (JNICALL *GetBooleanArrayRegion)
- (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
- void (JNICALL *GetByteArrayRegion)
- (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
- void (JNICALL *GetCharArrayRegion)
- (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
- void (JNICALL *GetShortArrayRegion)
- (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
- void (JNICALL *GetIntArrayRegion)
- (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
- void (JNICALL *GetLongArrayRegion)
- (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
- void (JNICALL *GetFloatArrayRegion)
- (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
- void (JNICALL *GetDoubleArrayRegion)
- (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
-
- void (JNICALL *SetBooleanArrayRegion)
- (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
- void (JNICALL *SetByteArrayRegion)
- (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
- void (JNICALL *SetCharArrayRegion)
- (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
- void (JNICALL *SetShortArrayRegion)
- (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
- void (JNICALL *SetIntArrayRegion)
- (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
- void (JNICALL *SetLongArrayRegion)
- (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
- void (JNICALL *SetFloatArrayRegion)
- (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
- void (JNICALL *SetDoubleArrayRegion)
- (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
-
- jint (JNICALL *RegisterNatives)
- (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
- jint nMethods);
- jint (JNICALL *UnregisterNatives)
- (JNIEnv *env, jclass clazz);
-
- jint (JNICALL *MonitorEnter)
- (JNIEnv *env, jobject obj);
- jint (JNICALL *MonitorExit)
- (JNIEnv *env, jobject obj);
-
- jint (JNICALL *GetJavaVM)
- (JNIEnv *env, JavaVM **vm);
-
- void (JNICALL *GetStringRegion)
- (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
- void (JNICALL *GetStringUTFRegion)
- (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
-
- void * (JNICALL *GetPrimitiveArrayCritical)
- (JNIEnv *env, jarray array, jboolean *isCopy);
- void (JNICALL *ReleasePrimitiveArrayCritical)
- (JNIEnv *env, jarray array, void *carray, jint mode);
-
- const jchar * (JNICALL *GetStringCritical)
- (JNIEnv *env, jstring string, jboolean *isCopy);
- void (JNICALL *ReleaseStringCritical)
- (JNIEnv *env, jstring string, const jchar *cstring);
-
- jweak (JNICALL *NewWeakGlobalRef)
- (JNIEnv *env, jobject obj);
- void (JNICALL *DeleteWeakGlobalRef)
- (JNIEnv *env, jweak ref);
-
- jboolean (JNICALL *ExceptionCheck)
- (JNIEnv *env);
-
- jobject (JNICALL *NewDirectByteBuffer)
- (JNIEnv* env, void* address, jlong capacity);
- void* (JNICALL *GetDirectBufferAddress)
- (JNIEnv* env, jobject buf);
- jlong (JNICALL *GetDirectBufferCapacity)
- (JNIEnv* env, jobject buf);
-
- /* New JNI 1.6 Features */
-
- jobjectRefType (JNICALL *GetObjectRefType)
- (JNIEnv* env, jobject obj);
-
- /* Module Features */
-
- jobject (JNICALL *GetModule)
- (JNIEnv* env, jclass clazz);
-};
-
-/*
- * We use inlined functions for C++ so that programmers can write:
- *
- * env->FindClass("java/lang/String")
- *
- * in C++ rather than:
- *
- * (*env)->FindClass(env, "java/lang/String")
- *
- * in C.
- */
-
-struct JNIEnv_ {
- const struct JNINativeInterface_ *functions;
-#ifdef __cplusplus
-
- jint GetVersion() {
- return functions->GetVersion(this);
- }
- jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
- jsize len) {
- return functions->DefineClass(this, name, loader, buf, len);
- }
- jclass FindClass(const char *name) {
- return functions->FindClass(this, name);
- }
- jmethodID FromReflectedMethod(jobject method) {
- return functions->FromReflectedMethod(this,method);
- }
- jfieldID FromReflectedField(jobject field) {
- return functions->FromReflectedField(this,field);
- }
-
- jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
- return functions->ToReflectedMethod(this, cls, methodID, isStatic);
- }
-
- jclass GetSuperclass(jclass sub) {
- return functions->GetSuperclass(this, sub);
- }
- jboolean IsAssignableFrom(jclass sub, jclass sup) {
- return functions->IsAssignableFrom(this, sub, sup);
- }
-
- jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
- return functions->ToReflectedField(this,cls,fieldID,isStatic);
- }
-
- jint Throw(jthrowable obj) {
- return functions->Throw(this, obj);
- }
- jint ThrowNew(jclass clazz, const char *msg) {
- return functions->ThrowNew(this, clazz, msg);
- }
- jthrowable ExceptionOccurred() {
- return functions->ExceptionOccurred(this);
- }
- void ExceptionDescribe() {
- functions->ExceptionDescribe(this);
- }
- void ExceptionClear() {
- functions->ExceptionClear(this);
- }
- void FatalError(const char *msg) {
- functions->FatalError(this, msg);
- }
-
- jint PushLocalFrame(jint capacity) {
- return functions->PushLocalFrame(this,capacity);
- }
- jobject PopLocalFrame(jobject result) {
- return functions->PopLocalFrame(this,result);
- }
-
- jobject NewGlobalRef(jobject lobj) {
- return functions->NewGlobalRef(this,lobj);
- }
- void DeleteGlobalRef(jobject gref) {
- functions->DeleteGlobalRef(this,gref);
- }
- void DeleteLocalRef(jobject obj) {
- functions->DeleteLocalRef(this, obj);
- }
-
- jboolean IsSameObject(jobject obj1, jobject obj2) {
- return functions->IsSameObject(this,obj1,obj2);
- }
-
- jobject NewLocalRef(jobject ref) {
- return functions->NewLocalRef(this,ref);
- }
- jint EnsureLocalCapacity(jint capacity) {
- return functions->EnsureLocalCapacity(this,capacity);
- }
-
- jobject AllocObject(jclass clazz) {
- return functions->AllocObject(this,clazz);
- }
- jobject NewObject(jclass clazz, jmethodID methodID, ...) {
- va_list args;
- jobject result;
- va_start(args, methodID);
- result = functions->NewObjectV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jobject NewObjectV(jclass clazz, jmethodID methodID,
- va_list args) {
- return functions->NewObjectV(this,clazz,methodID,args);
- }
- jobject NewObjectA(jclass clazz, jmethodID methodID,
- const jvalue *args) {
- return functions->NewObjectA(this,clazz,methodID,args);
- }
-
- jclass GetObjectClass(jobject obj) {
- return functions->GetObjectClass(this,obj);
- }
- jboolean IsInstanceOf(jobject obj, jclass clazz) {
- return functions->IsInstanceOf(this,obj,clazz);
- }
-
- jmethodID GetMethodID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetMethodID(this,clazz,name,sig);
- }
-
- jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jobject result;
- va_start(args,methodID);
- result = functions->CallObjectMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jobject CallObjectMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallObjectMethodV(this,obj,methodID,args);
- }
- jobject CallObjectMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallObjectMethodA(this,obj,methodID,args);
- }
-
- jboolean CallBooleanMethod(jobject obj,
- jmethodID methodID, ...) {
- va_list args;
- jboolean result;
- va_start(args,methodID);
- result = functions->CallBooleanMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallBooleanMethodV(this,obj,methodID,args);
- }
- jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallBooleanMethodA(this,obj,methodID, args);
- }
-
- jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jbyte result;
- va_start(args,methodID);
- result = functions->CallByteMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jbyte CallByteMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallByteMethodV(this,obj,methodID,args);
- }
- jbyte CallByteMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallByteMethodA(this,obj,methodID,args);
- }
-
- jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jchar result;
- va_start(args,methodID);
- result = functions->CallCharMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jchar CallCharMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallCharMethodV(this,obj,methodID,args);
- }
- jchar CallCharMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallCharMethodA(this,obj,methodID,args);
- }
-
- jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jshort result;
- va_start(args,methodID);
- result = functions->CallShortMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jshort CallShortMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallShortMethodV(this,obj,methodID,args);
- }
- jshort CallShortMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallShortMethodA(this,obj,methodID,args);
- }
-
- jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jint result;
- va_start(args,methodID);
- result = functions->CallIntMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jint CallIntMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallIntMethodV(this,obj,methodID,args);
- }
- jint CallIntMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallIntMethodA(this,obj,methodID,args);
- }
-
- jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jlong result;
- va_start(args,methodID);
- result = functions->CallLongMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jlong CallLongMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallLongMethodV(this,obj,methodID,args);
- }
- jlong CallLongMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallLongMethodA(this,obj,methodID,args);
- }
-
- jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jfloat result;
- va_start(args,methodID);
- result = functions->CallFloatMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallFloatMethodV(this,obj,methodID,args);
- }
- jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallFloatMethodA(this,obj,methodID,args);
- }
-
- jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- jdouble result;
- va_start(args,methodID);
- result = functions->CallDoubleMethodV(this,obj,methodID,args);
- va_end(args);
- return result;
- }
- jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- return functions->CallDoubleMethodV(this,obj,methodID,args);
- }
- jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- return functions->CallDoubleMethodA(this,obj,methodID,args);
- }
-
- void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
- va_list args;
- va_start(args,methodID);
- functions->CallVoidMethodV(this,obj,methodID,args);
- va_end(args);
- }
- void CallVoidMethodV(jobject obj, jmethodID methodID,
- va_list args) {
- functions->CallVoidMethodV(this,obj,methodID,args);
- }
- void CallVoidMethodA(jobject obj, jmethodID methodID,
- const jvalue * args) {
- functions->CallVoidMethodA(this,obj,methodID,args);
- }
-
- jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jobject result;
- va_start(args,methodID);
- result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
- methodID,args);
- }
- jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jboolean result;
- va_start(args,methodID);
- result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
- methodID,args);
- }
- jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
- methodID, args);
- }
-
- jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jbyte result;
- va_start(args,methodID);
- result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualByteMethodV(this,obj,clazz,
- methodID,args);
- }
- jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualByteMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jchar result;
- va_start(args,methodID);
- result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualCharMethodV(this,obj,clazz,
- methodID,args);
- }
- jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualCharMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jshort result;
- va_start(args,methodID);
- result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualShortMethodV(this,obj,clazz,
- methodID,args);
- }
- jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualShortMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jint result;
- va_start(args,methodID);
- result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualIntMethodV(this,obj,clazz,
- methodID,args);
- }
- jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualIntMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jlong result;
- va_start(args,methodID);
- result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallNonvirtualLongMethodV(this,obj,clazz,
- methodID,args);
- }
- jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
- jmethodID methodID, const jvalue * args) {
- return functions->CallNonvirtualLongMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jfloat result;
- va_start(args,methodID);
- result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
- jmethodID methodID,
- va_list args) {
- return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
- methodID,args);
- }
- jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
- jmethodID methodID,
- const jvalue * args) {
- return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
- methodID,args);
- }
-
- jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jdouble result;
- va_start(args,methodID);
- result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
- methodID,args);
- va_end(args);
- return result;
- }
- jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
- jmethodID methodID,
- va_list args) {
- return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
- methodID,args);
- }
- jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
- jmethodID methodID,
- const jvalue * args) {
- return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
- methodID,args);
- }
-
- void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- va_start(args,methodID);
- functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
- va_end(args);
- }
- void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
- jmethodID methodID,
- va_list args) {
- functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
- }
- void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
- jmethodID methodID,
- const jvalue * args) {
- functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
- }
-
- jfieldID GetFieldID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetFieldID(this,clazz,name,sig);
- }
-
- jobject GetObjectField(jobject obj, jfieldID fieldID) {
- return functions->GetObjectField(this,obj,fieldID);
- }
- jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
- return functions->GetBooleanField(this,obj,fieldID);
- }
- jbyte GetByteField(jobject obj, jfieldID fieldID) {
- return functions->GetByteField(this,obj,fieldID);
- }
- jchar GetCharField(jobject obj, jfieldID fieldID) {
- return functions->GetCharField(this,obj,fieldID);
- }
- jshort GetShortField(jobject obj, jfieldID fieldID) {
- return functions->GetShortField(this,obj,fieldID);
- }
- jint GetIntField(jobject obj, jfieldID fieldID) {
- return functions->GetIntField(this,obj,fieldID);
- }
- jlong GetLongField(jobject obj, jfieldID fieldID) {
- return functions->GetLongField(this,obj,fieldID);
- }
- jfloat GetFloatField(jobject obj, jfieldID fieldID) {
- return functions->GetFloatField(this,obj,fieldID);
- }
- jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
- return functions->GetDoubleField(this,obj,fieldID);
- }
-
- void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
- functions->SetObjectField(this,obj,fieldID,val);
- }
- void SetBooleanField(jobject obj, jfieldID fieldID,
- jboolean val) {
- functions->SetBooleanField(this,obj,fieldID,val);
- }
- void SetByteField(jobject obj, jfieldID fieldID,
- jbyte val) {
- functions->SetByteField(this,obj,fieldID,val);
- }
- void SetCharField(jobject obj, jfieldID fieldID,
- jchar val) {
- functions->SetCharField(this,obj,fieldID,val);
- }
- void SetShortField(jobject obj, jfieldID fieldID,
- jshort val) {
- functions->SetShortField(this,obj,fieldID,val);
- }
- void SetIntField(jobject obj, jfieldID fieldID,
- jint val) {
- functions->SetIntField(this,obj,fieldID,val);
- }
- void SetLongField(jobject obj, jfieldID fieldID,
- jlong val) {
- functions->SetLongField(this,obj,fieldID,val);
- }
- void SetFloatField(jobject obj, jfieldID fieldID,
- jfloat val) {
- functions->SetFloatField(this,obj,fieldID,val);
- }
- void SetDoubleField(jobject obj, jfieldID fieldID,
- jdouble val) {
- functions->SetDoubleField(this,obj,fieldID,val);
- }
-
- jmethodID GetStaticMethodID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetStaticMethodID(this,clazz,name,sig);
- }
-
- jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
- ...) {
- va_list args;
- jobject result;
- va_start(args,methodID);
- result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
- va_list args) {
- return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
- }
- jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
- const jvalue *args) {
- return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
- }
-
- jboolean CallStaticBooleanMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jboolean result;
- va_start(args,methodID);
- result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jboolean CallStaticBooleanMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
- }
- jboolean CallStaticBooleanMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
- }
-
- jbyte CallStaticByteMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jbyte result;
- va_start(args,methodID);
- result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jbyte CallStaticByteMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticByteMethodV(this,clazz,methodID,args);
- }
- jbyte CallStaticByteMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticByteMethodA(this,clazz,methodID,args);
- }
-
- jchar CallStaticCharMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jchar result;
- va_start(args,methodID);
- result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jchar CallStaticCharMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticCharMethodV(this,clazz,methodID,args);
- }
- jchar CallStaticCharMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticCharMethodA(this,clazz,methodID,args);
- }
-
- jshort CallStaticShortMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jshort result;
- va_start(args,methodID);
- result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jshort CallStaticShortMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticShortMethodV(this,clazz,methodID,args);
- }
- jshort CallStaticShortMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticShortMethodA(this,clazz,methodID,args);
- }
-
- jint CallStaticIntMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jint result;
- va_start(args,methodID);
- result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jint CallStaticIntMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticIntMethodV(this,clazz,methodID,args);
- }
- jint CallStaticIntMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticIntMethodA(this,clazz,methodID,args);
- }
-
- jlong CallStaticLongMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jlong result;
- va_start(args,methodID);
- result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jlong CallStaticLongMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticLongMethodV(this,clazz,methodID,args);
- }
- jlong CallStaticLongMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticLongMethodA(this,clazz,methodID,args);
- }
-
- jfloat CallStaticFloatMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jfloat result;
- va_start(args,methodID);
- result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jfloat CallStaticFloatMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
- }
- jfloat CallStaticFloatMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
- }
-
- jdouble CallStaticDoubleMethod(jclass clazz,
- jmethodID methodID, ...) {
- va_list args;
- jdouble result;
- va_start(args,methodID);
- result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
- va_end(args);
- return result;
- }
- jdouble CallStaticDoubleMethodV(jclass clazz,
- jmethodID methodID, va_list args) {
- return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
- }
- jdouble CallStaticDoubleMethodA(jclass clazz,
- jmethodID methodID, const jvalue *args) {
- return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
- }
-
- void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
- va_list args;
- va_start(args,methodID);
- functions->CallStaticVoidMethodV(this,cls,methodID,args);
- va_end(args);
- }
- void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
- va_list args) {
- functions->CallStaticVoidMethodV(this,cls,methodID,args);
- }
- void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
- const jvalue * args) {
- functions->CallStaticVoidMethodA(this,cls,methodID,args);
- }
-
- jfieldID GetStaticFieldID(jclass clazz, const char *name,
- const char *sig) {
- return functions->GetStaticFieldID(this,clazz,name,sig);
- }
- jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticObjectField(this,clazz,fieldID);
- }
- jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticBooleanField(this,clazz,fieldID);
- }
- jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticByteField(this,clazz,fieldID);
- }
- jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticCharField(this,clazz,fieldID);
- }
- jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticShortField(this,clazz,fieldID);
- }
- jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticIntField(this,clazz,fieldID);
- }
- jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticLongField(this,clazz,fieldID);
- }
- jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticFloatField(this,clazz,fieldID);
- }
- jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
- return functions->GetStaticDoubleField(this,clazz,fieldID);
- }
-
- void SetStaticObjectField(jclass clazz, jfieldID fieldID,
- jobject value) {
- functions->SetStaticObjectField(this,clazz,fieldID,value);
- }
- void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
- jboolean value) {
- functions->SetStaticBooleanField(this,clazz,fieldID,value);
- }
- void SetStaticByteField(jclass clazz, jfieldID fieldID,
- jbyte value) {
- functions->SetStaticByteField(this,clazz,fieldID,value);
- }
- void SetStaticCharField(jclass clazz, jfieldID fieldID,
- jchar value) {
- functions->SetStaticCharField(this,clazz,fieldID,value);
- }
- void SetStaticShortField(jclass clazz, jfieldID fieldID,
- jshort value) {
- functions->SetStaticShortField(this,clazz,fieldID,value);
- }
- void SetStaticIntField(jclass clazz, jfieldID fieldID,
- jint value) {
- functions->SetStaticIntField(this,clazz,fieldID,value);
- }
- void SetStaticLongField(jclass clazz, jfieldID fieldID,
- jlong value) {
- functions->SetStaticLongField(this,clazz,fieldID,value);
- }
- void SetStaticFloatField(jclass clazz, jfieldID fieldID,
- jfloat value) {
- functions->SetStaticFloatField(this,clazz,fieldID,value);
- }
- void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
- jdouble value) {
- functions->SetStaticDoubleField(this,clazz,fieldID,value);
- }
-
- jstring NewString(const jchar *unicode, jsize len) {
- return functions->NewString(this,unicode,len);
- }
- jsize GetStringLength(jstring str) {
- return functions->GetStringLength(this,str);
- }
- const jchar *GetStringChars(jstring str, jboolean *isCopy) {
- return functions->GetStringChars(this,str,isCopy);
- }
- void ReleaseStringChars(jstring str, const jchar *chars) {
- functions->ReleaseStringChars(this,str,chars);
- }
-
- jstring NewStringUTF(const char *utf) {
- return functions->NewStringUTF(this,utf);
- }
- jsize GetStringUTFLength(jstring str) {
- return functions->GetStringUTFLength(this,str);
- }
- const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
- return functions->GetStringUTFChars(this,str,isCopy);
- }
- void ReleaseStringUTFChars(jstring str, const char* chars) {
- functions->ReleaseStringUTFChars(this,str,chars);
- }
-
- jsize GetArrayLength(jarray array) {
- return functions->GetArrayLength(this,array);
- }
-
- jobjectArray NewObjectArray(jsize len, jclass clazz,
- jobject init) {
- return functions->NewObjectArray(this,len,clazz,init);
- }
- jobject GetObjectArrayElement(jobjectArray array, jsize index) {
- return functions->GetObjectArrayElement(this,array,index);
- }
- void SetObjectArrayElement(jobjectArray array, jsize index,
- jobject val) {
- functions->SetObjectArrayElement(this,array,index,val);
- }
-
- jbooleanArray NewBooleanArray(jsize len) {
- return functions->NewBooleanArray(this,len);
- }
- jbyteArray NewByteArray(jsize len) {
- return functions->NewByteArray(this,len);
- }
- jcharArray NewCharArray(jsize len) {
- return functions->NewCharArray(this,len);
- }
- jshortArray NewShortArray(jsize len) {
- return functions->NewShortArray(this,len);
- }
- jintArray NewIntArray(jsize len) {
- return functions->NewIntArray(this,len);
- }
- jlongArray NewLongArray(jsize len) {
- return functions->NewLongArray(this,len);
- }
- jfloatArray NewFloatArray(jsize len) {
- return functions->NewFloatArray(this,len);
- }
- jdoubleArray NewDoubleArray(jsize len) {
- return functions->NewDoubleArray(this,len);
- }
-
- jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
- return functions->GetBooleanArrayElements(this,array,isCopy);
- }
- jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
- return functions->GetByteArrayElements(this,array,isCopy);
- }
- jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
- return functions->GetCharArrayElements(this,array,isCopy);
- }
- jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
- return functions->GetShortArrayElements(this,array,isCopy);
- }
- jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
- return functions->GetIntArrayElements(this,array,isCopy);
- }
- jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
- return functions->GetLongArrayElements(this,array,isCopy);
- }
- jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
- return functions->GetFloatArrayElements(this,array,isCopy);
- }
- jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
- return functions->GetDoubleArrayElements(this,array,isCopy);
- }
-
- void ReleaseBooleanArrayElements(jbooleanArray array,
- jboolean *elems,
- jint mode) {
- functions->ReleaseBooleanArrayElements(this,array,elems,mode);
- }
- void ReleaseByteArrayElements(jbyteArray array,
- jbyte *elems,
- jint mode) {
- functions->ReleaseByteArrayElements(this,array,elems,mode);
- }
- void ReleaseCharArrayElements(jcharArray array,
- jchar *elems,
- jint mode) {
- functions->ReleaseCharArrayElements(this,array,elems,mode);
- }
- void ReleaseShortArrayElements(jshortArray array,
- jshort *elems,
- jint mode) {
- functions->ReleaseShortArrayElements(this,array,elems,mode);
- }
- void ReleaseIntArrayElements(jintArray array,
- jint *elems,
- jint mode) {
- functions->ReleaseIntArrayElements(this,array,elems,mode);
- }
- void ReleaseLongArrayElements(jlongArray array,
- jlong *elems,
- jint mode) {
- functions->ReleaseLongArrayElements(this,array,elems,mode);
- }
- void ReleaseFloatArrayElements(jfloatArray array,
- jfloat *elems,
- jint mode) {
- functions->ReleaseFloatArrayElements(this,array,elems,mode);
- }
- void ReleaseDoubleArrayElements(jdoubleArray array,
- jdouble *elems,
- jint mode) {
- functions->ReleaseDoubleArrayElements(this,array,elems,mode);
- }
-
- void GetBooleanArrayRegion(jbooleanArray array,
- jsize start, jsize len, jboolean *buf) {
- functions->GetBooleanArrayRegion(this,array,start,len,buf);
- }
- void GetByteArrayRegion(jbyteArray array,
- jsize start, jsize len, jbyte *buf) {
- functions->GetByteArrayRegion(this,array,start,len,buf);
- }
- void GetCharArrayRegion(jcharArray array,
- jsize start, jsize len, jchar *buf) {
- functions->GetCharArrayRegion(this,array,start,len,buf);
- }
- void GetShortArrayRegion(jshortArray array,
- jsize start, jsize len, jshort *buf) {
- functions->GetShortArrayRegion(this,array,start,len,buf);
- }
- void GetIntArrayRegion(jintArray array,
- jsize start, jsize len, jint *buf) {
- functions->GetIntArrayRegion(this,array,start,len,buf);
- }
- void GetLongArrayRegion(jlongArray array,
- jsize start, jsize len, jlong *buf) {
- functions->GetLongArrayRegion(this,array,start,len,buf);
- }
- void GetFloatArrayRegion(jfloatArray array,
- jsize start, jsize len, jfloat *buf) {
- functions->GetFloatArrayRegion(this,array,start,len,buf);
- }
- void GetDoubleArrayRegion(jdoubleArray array,
- jsize start, jsize len, jdouble *buf) {
- functions->GetDoubleArrayRegion(this,array,start,len,buf);
- }
-
- void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
- const jboolean *buf) {
- functions->SetBooleanArrayRegion(this,array,start,len,buf);
- }
- void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
- const jbyte *buf) {
- functions->SetByteArrayRegion(this,array,start,len,buf);
- }
- void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
- const jchar *buf) {
- functions->SetCharArrayRegion(this,array,start,len,buf);
- }
- void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
- const jshort *buf) {
- functions->SetShortArrayRegion(this,array,start,len,buf);
- }
- void SetIntArrayRegion(jintArray array, jsize start, jsize len,
- const jint *buf) {
- functions->SetIntArrayRegion(this,array,start,len,buf);
- }
- void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
- const jlong *buf) {
- functions->SetLongArrayRegion(this,array,start,len,buf);
- }
- void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
- const jfloat *buf) {
- functions->SetFloatArrayRegion(this,array,start,len,buf);
- }
- void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
- const jdouble *buf) {
- functions->SetDoubleArrayRegion(this,array,start,len,buf);
- }
-
- jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
- jint nMethods) {
- return functions->RegisterNatives(this,clazz,methods,nMethods);
- }
- jint UnregisterNatives(jclass clazz) {
- return functions->UnregisterNatives(this,clazz);
- }
-
- jint MonitorEnter(jobject obj) {
- return functions->MonitorEnter(this,obj);
- }
- jint MonitorExit(jobject obj) {
- return functions->MonitorExit(this,obj);
- }
-
- jint GetJavaVM(JavaVM **vm) {
- return functions->GetJavaVM(this,vm);
- }
-
- void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
- functions->GetStringRegion(this,str,start,len,buf);
- }
- void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
- functions->GetStringUTFRegion(this,str,start,len,buf);
- }
-
- void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
- return functions->GetPrimitiveArrayCritical(this,array,isCopy);
- }
- void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
- functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
- }
-
- const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
- return functions->GetStringCritical(this,string,isCopy);
- }
- void ReleaseStringCritical(jstring string, const jchar *cstring) {
- functions->ReleaseStringCritical(this,string,cstring);
- }
-
- jweak NewWeakGlobalRef(jobject obj) {
- return functions->NewWeakGlobalRef(this,obj);
- }
- void DeleteWeakGlobalRef(jweak ref) {
- functions->DeleteWeakGlobalRef(this,ref);
- }
-
- jboolean ExceptionCheck() {
- return functions->ExceptionCheck(this);
- }
-
- jobject NewDirectByteBuffer(void* address, jlong capacity) {
- return functions->NewDirectByteBuffer(this, address, capacity);
- }
- void* GetDirectBufferAddress(jobject buf) {
- return functions->GetDirectBufferAddress(this, buf);
- }
- jlong GetDirectBufferCapacity(jobject buf) {
- return functions->GetDirectBufferCapacity(this, buf);
- }
- jobjectRefType GetObjectRefType(jobject obj) {
- return functions->GetObjectRefType(this, obj);
- }
-
- /* Module Features */
-
- jobject GetModule(jclass clazz) {
- return functions->GetModule(this, clazz);
- }
-
-#endif /* __cplusplus */
-};
-
-/*
- * optionString may be any option accepted by the JVM, or one of the
- * following:
- *
- * -D= Set a system property.
- * -verbose[:class|gc|jni] Enable verbose output, comma-separated. E.g.
- * "-verbose:class" or "-verbose:gc,class"
- * Standard names include: gc, class, and jni.
- * All nonstandard (VM-specific) names must begin
- * with "X".
- * vfprintf extraInfo is a pointer to the vfprintf hook.
- * exit extraInfo is a pointer to the exit hook.
- * abort extraInfo is a pointer to the abort hook.
- */
-typedef struct JavaVMOption {
- char *optionString;
- void *extraInfo;
-} JavaVMOption;
-
-typedef struct JavaVMInitArgs {
- jint version;
-
- jint nOptions;
- JavaVMOption *options;
- jboolean ignoreUnrecognized;
-} JavaVMInitArgs;
-
-typedef struct JavaVMAttachArgs {
- jint version;
-
- char *name;
- jobject group;
-} JavaVMAttachArgs;
-
-/* These will be VM-specific. */
-
-#define JDK1_2
-#define JDK1_4
-
-/* End VM-specific. */
-
-struct JNIInvokeInterface_ {
- void *reserved0;
- void *reserved1;
- void *reserved2;
-
- jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
-
- jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
-
- jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
-
- jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
-
- jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
-};
-
-struct JavaVM_ {
- const struct JNIInvokeInterface_ *functions;
-#ifdef __cplusplus
-
- jint DestroyJavaVM() {
- return functions->DestroyJavaVM(this);
- }
- jint AttachCurrentThread(void **penv, void *args) {
- return functions->AttachCurrentThread(this, penv, args);
- }
- jint DetachCurrentThread() {
- return functions->DetachCurrentThread(this);
- }
-
- jint GetEnv(void **penv, jint version) {
- return functions->GetEnv(this, penv, version);
- }
- jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
- return functions->AttachCurrentThreadAsDaemon(this, penv, args);
- }
-#endif
-};
-
-#ifdef _JNI_IMPLEMENTATION_
-#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
-#else
-#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
-#endif
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetDefaultJavaVMInitArgs(void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
-
-/* Defined by native libraries. */
-JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *vm, void *reserved);
-
-JNIEXPORT void JNICALL
-JNI_OnUnload(JavaVM *vm, void *reserved);
-
-#define JNI_VERSION_1_1 0x00010001
-#define JNI_VERSION_1_2 0x00010002
-#define JNI_VERSION_1_4 0x00010004
-#define JNI_VERSION_1_6 0x00010006
-#define JNI_VERSION_1_8 0x00010008
-#define JNI_VERSION_9 0x00090000
-#define JNI_VERSION_10 0x000a0000
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVASOFT_JNI_H_ */
diff --git a/jni/windows/jvmti.h b/jni/windows/jvmti.h
deleted file mode 100644
index f934510..0000000
--- a/jni/windows/jvmti.h
+++ /dev/null
@@ -1,2624 +0,0 @@
-/*
- * * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
- /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
-
- /* Include file for the Java(tm) Virtual Machine Tool Interface */
-
-#ifndef _JAVA_JVMTI_H_
-#define _JAVA_JVMTI_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
- JVMTI_VERSION_1 = 0x30010000,
- JVMTI_VERSION_1_0 = 0x30010000,
- JVMTI_VERSION_1_1 = 0x30010100,
- JVMTI_VERSION_1_2 = 0x30010200,
- JVMTI_VERSION_9 = 0x30090000,
- JVMTI_VERSION_11 = 0x300B0000,
-
- JVMTI_VERSION = 0x30000000 + (14 * 0x10000) + ( 0 * 0x100) + 0 /* version: 14.0.0 */
-};
-
-JNIEXPORT jint JNICALL
-Agent_OnLoad(JavaVM *vm, char *options, void *reserved);
-
-JNIEXPORT jint JNICALL
-Agent_OnAttach(JavaVM* vm, char* options, void* reserved);
-
-JNIEXPORT void JNICALL
-Agent_OnUnload(JavaVM *vm);
-
- /* Forward declaration of the environment */
-
-struct _jvmtiEnv;
-
-struct jvmtiInterface_1_;
-
-#ifdef __cplusplus
-typedef _jvmtiEnv jvmtiEnv;
-#else
-typedef const struct jvmtiInterface_1_ *jvmtiEnv;
-#endif /* __cplusplus */
-
-/* Derived Base Types */
-
-typedef jobject jthread;
-typedef jobject jthreadGroup;
-typedef jlong jlocation;
-struct _jrawMonitorID;
-typedef struct _jrawMonitorID *jrawMonitorID;
-typedef struct JNINativeInterface_ jniNativeInterface;
-
- /* Constants */
-
-
- /* Thread State Flags */
-
-enum {
- JVMTI_THREAD_STATE_ALIVE = 0x0001,
- JVMTI_THREAD_STATE_TERMINATED = 0x0002,
- JVMTI_THREAD_STATE_RUNNABLE = 0x0004,
- JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400,
- JVMTI_THREAD_STATE_WAITING = 0x0080,
- JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010,
- JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020,
- JVMTI_THREAD_STATE_SLEEPING = 0x0040,
- JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100,
- JVMTI_THREAD_STATE_PARKED = 0x0200,
- JVMTI_THREAD_STATE_SUSPENDED = 0x100000,
- JVMTI_THREAD_STATE_INTERRUPTED = 0x200000,
- JVMTI_THREAD_STATE_IN_NATIVE = 0x400000,
- JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000,
- JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000,
- JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000
-};
-
- /* java.lang.Thread.State Conversion Masks */
-
-enum {
- JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT,
- JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0,
- JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED,
- JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE,
- JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER,
- JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY,
- JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
-};
-
- /* Thread Priority Constants */
-
-enum {
- JVMTI_THREAD_MIN_PRIORITY = 1,
- JVMTI_THREAD_NORM_PRIORITY = 5,
- JVMTI_THREAD_MAX_PRIORITY = 10
-};
-
- /* Heap Filter Flags */
-
-enum {
- JVMTI_HEAP_FILTER_TAGGED = 0x4,
- JVMTI_HEAP_FILTER_UNTAGGED = 0x8,
- JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10,
- JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20
-};
-
- /* Heap Visit Control Flags */
-
-enum {
- JVMTI_VISIT_OBJECTS = 0x100,
- JVMTI_VISIT_ABORT = 0x8000
-};
-
- /* Heap Reference Enumeration */
-
-typedef enum {
- JVMTI_HEAP_REFERENCE_CLASS = 1,
- JVMTI_HEAP_REFERENCE_FIELD = 2,
- JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3,
- JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4,
- JVMTI_HEAP_REFERENCE_SIGNERS = 5,
- JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6,
- JVMTI_HEAP_REFERENCE_INTERFACE = 7,
- JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8,
- JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9,
- JVMTI_HEAP_REFERENCE_SUPERCLASS = 10,
- JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21,
- JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22,
- JVMTI_HEAP_REFERENCE_MONITOR = 23,
- JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24,
- JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25,
- JVMTI_HEAP_REFERENCE_THREAD = 26,
- JVMTI_HEAP_REFERENCE_OTHER = 27
-} jvmtiHeapReferenceKind;
-
- /* Primitive Type Enumeration */
-
-typedef enum {
- JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90,
- JVMTI_PRIMITIVE_TYPE_BYTE = 66,
- JVMTI_PRIMITIVE_TYPE_CHAR = 67,
- JVMTI_PRIMITIVE_TYPE_SHORT = 83,
- JVMTI_PRIMITIVE_TYPE_INT = 73,
- JVMTI_PRIMITIVE_TYPE_LONG = 74,
- JVMTI_PRIMITIVE_TYPE_FLOAT = 70,
- JVMTI_PRIMITIVE_TYPE_DOUBLE = 68
-} jvmtiPrimitiveType;
-
- /* Heap Object Filter Enumeration */
-
-typedef enum {
- JVMTI_HEAP_OBJECT_TAGGED = 1,
- JVMTI_HEAP_OBJECT_UNTAGGED = 2,
- JVMTI_HEAP_OBJECT_EITHER = 3
-} jvmtiHeapObjectFilter;
-
- /* Heap Root Kind Enumeration */
-
-typedef enum {
- JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
- JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
- JVMTI_HEAP_ROOT_MONITOR = 3,
- JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
- JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
- JVMTI_HEAP_ROOT_THREAD = 6,
- JVMTI_HEAP_ROOT_OTHER = 7
-} jvmtiHeapRootKind;
-
- /* Object Reference Enumeration */
-
-typedef enum {
- JVMTI_REFERENCE_CLASS = 1,
- JVMTI_REFERENCE_FIELD = 2,
- JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
- JVMTI_REFERENCE_CLASS_LOADER = 4,
- JVMTI_REFERENCE_SIGNERS = 5,
- JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
- JVMTI_REFERENCE_INTERFACE = 7,
- JVMTI_REFERENCE_STATIC_FIELD = 8,
- JVMTI_REFERENCE_CONSTANT_POOL = 9
-} jvmtiObjectReferenceKind;
-
- /* Iteration Control Enumeration */
-
-typedef enum {
- JVMTI_ITERATION_CONTINUE = 1,
- JVMTI_ITERATION_IGNORE = 2,
- JVMTI_ITERATION_ABORT = 0
-} jvmtiIterationControl;
-
- /* Class Status Flags */
-
-enum {
- JVMTI_CLASS_STATUS_VERIFIED = 1,
- JVMTI_CLASS_STATUS_PREPARED = 2,
- JVMTI_CLASS_STATUS_INITIALIZED = 4,
- JVMTI_CLASS_STATUS_ERROR = 8,
- JVMTI_CLASS_STATUS_ARRAY = 16,
- JVMTI_CLASS_STATUS_PRIMITIVE = 32
-};
-
- /* Event Enable/Disable */
-
-typedef enum {
- JVMTI_ENABLE = 1,
- JVMTI_DISABLE = 0
-} jvmtiEventMode;
-
- /* Extension Function/Event Parameter Types */
-
-typedef enum {
- JVMTI_TYPE_JBYTE = 101,
- JVMTI_TYPE_JCHAR = 102,
- JVMTI_TYPE_JSHORT = 103,
- JVMTI_TYPE_JINT = 104,
- JVMTI_TYPE_JLONG = 105,
- JVMTI_TYPE_JFLOAT = 106,
- JVMTI_TYPE_JDOUBLE = 107,
- JVMTI_TYPE_JBOOLEAN = 108,
- JVMTI_TYPE_JOBJECT = 109,
- JVMTI_TYPE_JTHREAD = 110,
- JVMTI_TYPE_JCLASS = 111,
- JVMTI_TYPE_JVALUE = 112,
- JVMTI_TYPE_JFIELDID = 113,
- JVMTI_TYPE_JMETHODID = 114,
- JVMTI_TYPE_CCHAR = 115,
- JVMTI_TYPE_CVOID = 116,
- JVMTI_TYPE_JNIENV = 117
-} jvmtiParamTypes;
-
- /* Extension Function/Event Parameter Kinds */
-
-typedef enum {
- JVMTI_KIND_IN = 91,
- JVMTI_KIND_IN_PTR = 92,
- JVMTI_KIND_IN_BUF = 93,
- JVMTI_KIND_ALLOC_BUF = 94,
- JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
- JVMTI_KIND_OUT = 96,
- JVMTI_KIND_OUT_BUF = 97
-} jvmtiParamKind;
-
- /* Timer Kinds */
-
-typedef enum {
- JVMTI_TIMER_USER_CPU = 30,
- JVMTI_TIMER_TOTAL_CPU = 31,
- JVMTI_TIMER_ELAPSED = 32
-} jvmtiTimerKind;
-
- /* Phases of execution */
-
-typedef enum {
- JVMTI_PHASE_ONLOAD = 1,
- JVMTI_PHASE_PRIMORDIAL = 2,
- JVMTI_PHASE_START = 6,
- JVMTI_PHASE_LIVE = 4,
- JVMTI_PHASE_DEAD = 8
-} jvmtiPhase;
-
- /* Version Interface Types */
-
-enum {
- JVMTI_VERSION_INTERFACE_JNI = 0x00000000,
- JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000
-};
-
- /* Version Masks */
-
-enum {
- JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000,
- JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000,
- JVMTI_VERSION_MASK_MINOR = 0x0000FF00,
- JVMTI_VERSION_MASK_MICRO = 0x000000FF
-};
-
- /* Version Shifts */
-
-enum {
- JVMTI_VERSION_SHIFT_MAJOR = 16,
- JVMTI_VERSION_SHIFT_MINOR = 8,
- JVMTI_VERSION_SHIFT_MICRO = 0
-};
-
- /* Verbose Flag Enumeration */
-
-typedef enum {
- JVMTI_VERBOSE_OTHER = 0,
- JVMTI_VERBOSE_GC = 1,
- JVMTI_VERBOSE_CLASS = 2,
- JVMTI_VERBOSE_JNI = 4
-} jvmtiVerboseFlag;
-
- /* JLocation Format Enumeration */
-
-typedef enum {
- JVMTI_JLOCATION_JVMBCI = 1,
- JVMTI_JLOCATION_MACHINEPC = 2,
- JVMTI_JLOCATION_OTHER = 0
-} jvmtiJlocationFormat;
-
- /* Resource Exhaustion Flags */
-
-enum {
- JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001,
- JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002,
- JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004
-};
-
- /* Errors */
-
-typedef enum {
- JVMTI_ERROR_NONE = 0,
- JVMTI_ERROR_INVALID_THREAD = 10,
- JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
- JVMTI_ERROR_INVALID_PRIORITY = 12,
- JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
- JVMTI_ERROR_THREAD_SUSPENDED = 14,
- JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
- JVMTI_ERROR_INVALID_OBJECT = 20,
- JVMTI_ERROR_INVALID_CLASS = 21,
- JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
- JVMTI_ERROR_INVALID_METHODID = 23,
- JVMTI_ERROR_INVALID_LOCATION = 24,
- JVMTI_ERROR_INVALID_FIELDID = 25,
- JVMTI_ERROR_INVALID_MODULE = 26,
- JVMTI_ERROR_NO_MORE_FRAMES = 31,
- JVMTI_ERROR_OPAQUE_FRAME = 32,
- JVMTI_ERROR_TYPE_MISMATCH = 34,
- JVMTI_ERROR_INVALID_SLOT = 35,
- JVMTI_ERROR_DUPLICATE = 40,
- JVMTI_ERROR_NOT_FOUND = 41,
- JVMTI_ERROR_INVALID_MONITOR = 50,
- JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
- JVMTI_ERROR_INTERRUPT = 52,
- JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
- JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
- JVMTI_ERROR_FAILS_VERIFICATION = 62,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
- JVMTI_ERROR_INVALID_TYPESTATE = 65,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
- JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
- JVMTI_ERROR_NAMES_DONT_MATCH = 69,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
- JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED = 72,
- JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
- JVMTI_ERROR_UNMODIFIABLE_MODULE = 80,
- JVMTI_ERROR_NOT_AVAILABLE = 98,
- JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
- JVMTI_ERROR_NULL_POINTER = 100,
- JVMTI_ERROR_ABSENT_INFORMATION = 101,
- JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
- JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
- JVMTI_ERROR_NATIVE_METHOD = 104,
- JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
- JVMTI_ERROR_OUT_OF_MEMORY = 110,
- JVMTI_ERROR_ACCESS_DENIED = 111,
- JVMTI_ERROR_WRONG_PHASE = 112,
- JVMTI_ERROR_INTERNAL = 113,
- JVMTI_ERROR_UNATTACHED_THREAD = 115,
- JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
- JVMTI_ERROR_MAX = 116
-} jvmtiError;
-
- /* Event IDs */
-
-typedef enum {
- JVMTI_MIN_EVENT_TYPE_VAL = 50,
- JVMTI_EVENT_VM_INIT = 50,
- JVMTI_EVENT_VM_DEATH = 51,
- JVMTI_EVENT_THREAD_START = 52,
- JVMTI_EVENT_THREAD_END = 53,
- JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
- JVMTI_EVENT_CLASS_LOAD = 55,
- JVMTI_EVENT_CLASS_PREPARE = 56,
- JVMTI_EVENT_VM_START = 57,
- JVMTI_EVENT_EXCEPTION = 58,
- JVMTI_EVENT_EXCEPTION_CATCH = 59,
- JVMTI_EVENT_SINGLE_STEP = 60,
- JVMTI_EVENT_FRAME_POP = 61,
- JVMTI_EVENT_BREAKPOINT = 62,
- JVMTI_EVENT_FIELD_ACCESS = 63,
- JVMTI_EVENT_FIELD_MODIFICATION = 64,
- JVMTI_EVENT_METHOD_ENTRY = 65,
- JVMTI_EVENT_METHOD_EXIT = 66,
- JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
- JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
- JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
- JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
- JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
- JVMTI_EVENT_MONITOR_WAIT = 73,
- JVMTI_EVENT_MONITOR_WAITED = 74,
- JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
- JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
- JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
- JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
- JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
- JVMTI_EVENT_OBJECT_FREE = 83,
- JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
- JVMTI_EVENT_SAMPLED_OBJECT_ALLOC = 86,
- JVMTI_MAX_EVENT_TYPE_VAL = 86
-} jvmtiEvent;
-
-
- /* Pre-Declarations */
-struct _jvmtiThreadInfo;
-typedef struct _jvmtiThreadInfo jvmtiThreadInfo;
-struct _jvmtiMonitorStackDepthInfo;
-typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo;
-struct _jvmtiThreadGroupInfo;
-typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo;
-struct _jvmtiFrameInfo;
-typedef struct _jvmtiFrameInfo jvmtiFrameInfo;
-struct _jvmtiStackInfo;
-typedef struct _jvmtiStackInfo jvmtiStackInfo;
-struct _jvmtiHeapReferenceInfoField;
-typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField;
-struct _jvmtiHeapReferenceInfoArray;
-typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray;
-struct _jvmtiHeapReferenceInfoConstantPool;
-typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool;
-struct _jvmtiHeapReferenceInfoStackLocal;
-typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal;
-struct _jvmtiHeapReferenceInfoJniLocal;
-typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal;
-struct _jvmtiHeapReferenceInfoReserved;
-typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved;
-union _jvmtiHeapReferenceInfo;
-typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo;
-struct _jvmtiHeapCallbacks;
-typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks;
-struct _jvmtiClassDefinition;
-typedef struct _jvmtiClassDefinition jvmtiClassDefinition;
-struct _jvmtiMonitorUsage;
-typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage;
-struct _jvmtiLineNumberEntry;
-typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry;
-struct _jvmtiLocalVariableEntry;
-typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry;
-struct _jvmtiParamInfo;
-typedef struct _jvmtiParamInfo jvmtiParamInfo;
-struct _jvmtiExtensionFunctionInfo;
-typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo;
-struct _jvmtiExtensionEventInfo;
-typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo;
-struct _jvmtiTimerInfo;
-typedef struct _jvmtiTimerInfo jvmtiTimerInfo;
-struct _jvmtiAddrLocationMap;
-typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap;
-
- /* Function Types */
-
-typedef void (JNICALL *jvmtiStartFunction)
- (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg);
-
-typedef jint (JNICALL *jvmtiHeapIterationCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data);
-
-typedef jint (JNICALL *jvmtiHeapReferenceCallback)
- (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data);
-
-typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
- (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data);
-
-typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data);
-
-typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data);
-
-typedef jint (JNICALL *jvmtiReservedCallback)
- ();
-
-typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
- (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
- (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
- (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
- (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data);
-
-typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
- (jvmtiEnv* jvmti_env, ...);
-
-typedef void (JNICALL *jvmtiExtensionEvent)
- (jvmtiEnv* jvmti_env, ...);
-
-
- /* Structure Types */
-struct _jvmtiThreadInfo {
- char* name;
- jint priority;
- jboolean is_daemon;
- jthreadGroup thread_group;
- jobject context_class_loader;
-};
-struct _jvmtiMonitorStackDepthInfo {
- jobject monitor;
- jint stack_depth;
-};
-struct _jvmtiThreadGroupInfo {
- jthreadGroup parent;
- char* name;
- jint max_priority;
- jboolean is_daemon;
-};
-struct _jvmtiFrameInfo {
- jmethodID method;
- jlocation location;
-};
-struct _jvmtiStackInfo {
- jthread thread;
- jint state;
- jvmtiFrameInfo* frame_buffer;
- jint frame_count;
-};
-struct _jvmtiHeapReferenceInfoField {
- jint index;
-};
-struct _jvmtiHeapReferenceInfoArray {
- jint index;
-};
-struct _jvmtiHeapReferenceInfoConstantPool {
- jint index;
-};
-struct _jvmtiHeapReferenceInfoStackLocal {
- jlong thread_tag;
- jlong thread_id;
- jint depth;
- jmethodID method;
- jlocation location;
- jint slot;
-};
-struct _jvmtiHeapReferenceInfoJniLocal {
- jlong thread_tag;
- jlong thread_id;
- jint depth;
- jmethodID method;
-};
-struct _jvmtiHeapReferenceInfoReserved {
- jlong reserved1;
- jlong reserved2;
- jlong reserved3;
- jlong reserved4;
- jlong reserved5;
- jlong reserved6;
- jlong reserved7;
- jlong reserved8;
-};
-union _jvmtiHeapReferenceInfo {
- jvmtiHeapReferenceInfoField field;
- jvmtiHeapReferenceInfoArray array;
- jvmtiHeapReferenceInfoConstantPool constant_pool;
- jvmtiHeapReferenceInfoStackLocal stack_local;
- jvmtiHeapReferenceInfoJniLocal jni_local;
- jvmtiHeapReferenceInfoReserved other;
-};
-struct _jvmtiHeapCallbacks {
- jvmtiHeapIterationCallback heap_iteration_callback;
- jvmtiHeapReferenceCallback heap_reference_callback;
- jvmtiPrimitiveFieldCallback primitive_field_callback;
- jvmtiArrayPrimitiveValueCallback array_primitive_value_callback;
- jvmtiStringPrimitiveValueCallback string_primitive_value_callback;
- jvmtiReservedCallback reserved5;
- jvmtiReservedCallback reserved6;
- jvmtiReservedCallback reserved7;
- jvmtiReservedCallback reserved8;
- jvmtiReservedCallback reserved9;
- jvmtiReservedCallback reserved10;
- jvmtiReservedCallback reserved11;
- jvmtiReservedCallback reserved12;
- jvmtiReservedCallback reserved13;
- jvmtiReservedCallback reserved14;
- jvmtiReservedCallback reserved15;
-};
-struct _jvmtiClassDefinition {
- jclass klass;
- jint class_byte_count;
- const unsigned char* class_bytes;
-};
-struct _jvmtiMonitorUsage {
- jthread owner;
- jint entry_count;
- jint waiter_count;
- jthread* waiters;
- jint notify_waiter_count;
- jthread* notify_waiters;
-};
-struct _jvmtiLineNumberEntry {
- jlocation start_location;
- jint line_number;
-};
-struct _jvmtiLocalVariableEntry {
- jlocation start_location;
- jint length;
- char* name;
- char* signature;
- char* generic_signature;
- jint slot;
-};
-struct _jvmtiParamInfo {
- char* name;
- jvmtiParamKind kind;
- jvmtiParamTypes base_type;
- jboolean null_ok;
-};
-struct _jvmtiExtensionFunctionInfo {
- jvmtiExtensionFunction func;
- char* id;
- char* short_description;
- jint param_count;
- jvmtiParamInfo* params;
- jint error_count;
- jvmtiError* errors;
-};
-struct _jvmtiExtensionEventInfo {
- jint extension_event_index;
- char* id;
- char* short_description;
- jint param_count;
- jvmtiParamInfo* params;
-};
-struct _jvmtiTimerInfo {
- jlong max_value;
- jboolean may_skip_forward;
- jboolean may_skip_backward;
- jvmtiTimerKind kind;
- jlong reserved1;
- jlong reserved2;
-};
-struct _jvmtiAddrLocationMap {
- const void* start_address;
- jlocation location;
-};
-
-typedef struct {
- unsigned int can_tag_objects : 1;
- unsigned int can_generate_field_modification_events : 1;
- unsigned int can_generate_field_access_events : 1;
- unsigned int can_get_bytecodes : 1;
- unsigned int can_get_synthetic_attribute : 1;
- unsigned int can_get_owned_monitor_info : 1;
- unsigned int can_get_current_contended_monitor : 1;
- unsigned int can_get_monitor_info : 1;
- unsigned int can_pop_frame : 1;
- unsigned int can_redefine_classes : 1;
- unsigned int can_signal_thread : 1;
- unsigned int can_get_source_file_name : 1;
- unsigned int can_get_line_numbers : 1;
- unsigned int can_get_source_debug_extension : 1;
- unsigned int can_access_local_variables : 1;
- unsigned int can_maintain_original_method_order : 1;
- unsigned int can_generate_single_step_events : 1;
- unsigned int can_generate_exception_events : 1;
- unsigned int can_generate_frame_pop_events : 1;
- unsigned int can_generate_breakpoint_events : 1;
- unsigned int can_suspend : 1;
- unsigned int can_redefine_any_class : 1;
- unsigned int can_get_current_thread_cpu_time : 1;
- unsigned int can_get_thread_cpu_time : 1;
- unsigned int can_generate_method_entry_events : 1;
- unsigned int can_generate_method_exit_events : 1;
- unsigned int can_generate_all_class_hook_events : 1;
- unsigned int can_generate_compiled_method_load_events : 1;
- unsigned int can_generate_monitor_events : 1;
- unsigned int can_generate_vm_object_alloc_events : 1;
- unsigned int can_generate_native_method_bind_events : 1;
- unsigned int can_generate_garbage_collection_events : 1;
- unsigned int can_generate_object_free_events : 1;
- unsigned int can_force_early_return : 1;
- unsigned int can_get_owned_monitor_stack_depth_info : 1;
- unsigned int can_get_constant_pool : 1;
- unsigned int can_set_native_method_prefix : 1;
- unsigned int can_retransform_classes : 1;
- unsigned int can_retransform_any_class : 1;
- unsigned int can_generate_resource_exhaustion_heap_events : 1;
- unsigned int can_generate_resource_exhaustion_threads_events : 1;
- unsigned int can_generate_early_vmstart : 1;
- unsigned int can_generate_early_class_hook_events : 1;
- unsigned int can_generate_sampled_object_alloc_events : 1;
- unsigned int : 4;
- unsigned int : 16;
- unsigned int : 16;
- unsigned int : 16;
- unsigned int : 16;
- unsigned int : 16;
-} jvmtiCapabilities;
-
-
- /* Event Definitions */
-
-typedef void (JNICALL *jvmtiEventReserved)(void);
-
-
-typedef void (JNICALL *jvmtiEventBreakpoint)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location);
-
-typedef void (JNICALL *jvmtiEventClassFileLoadHook)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jclass class_being_redefined,
- jobject loader,
- const char* name,
- jobject protection_domain,
- jint class_data_len,
- const unsigned char* class_data,
- jint* new_class_data_len,
- unsigned char** new_class_data);
-
-typedef void (JNICALL *jvmtiEventClassLoad)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jclass klass);
-
-typedef void (JNICALL *jvmtiEventClassPrepare)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jclass klass);
-
-typedef void (JNICALL *jvmtiEventCompiledMethodLoad)
- (jvmtiEnv *jvmti_env,
- jmethodID method,
- jint code_size,
- const void* code_addr,
- jint map_length,
- const jvmtiAddrLocationMap* map,
- const void* compile_info);
-
-typedef void (JNICALL *jvmtiEventCompiledMethodUnload)
- (jvmtiEnv *jvmti_env,
- jmethodID method,
- const void* code_addr);
-
-typedef void (JNICALL *jvmtiEventDataDumpRequest)
- (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)
- (jvmtiEnv *jvmti_env,
- const char* name,
- const void* address,
- jint length);
-
-typedef void (JNICALL *jvmtiEventException)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jobject exception,
- jmethodID catch_method,
- jlocation catch_location);
-
-typedef void (JNICALL *jvmtiEventExceptionCatch)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jobject exception);
-
-typedef void (JNICALL *jvmtiEventFieldAccess)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jclass field_klass,
- jobject object,
- jfieldID field);
-
-typedef void (JNICALL *jvmtiEventFieldModification)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location,
- jclass field_klass,
- jobject object,
- jfieldID field,
- char signature_type,
- jvalue new_value);
-
-typedef void (JNICALL *jvmtiEventFramePop)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jboolean was_popped_by_exception);
-
-typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)
- (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventGarbageCollectionStart)
- (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventMethodEntry)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method);
-
-typedef void (JNICALL *jvmtiEventMethodExit)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jboolean was_popped_by_exception,
- jvalue return_value);
-
-typedef void (JNICALL *jvmtiEventMonitorContendedEnter)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object);
-
-typedef void (JNICALL *jvmtiEventMonitorContendedEntered)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object);
-
-typedef void (JNICALL *jvmtiEventMonitorWait)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jlong timeout);
-
-typedef void (JNICALL *jvmtiEventMonitorWaited)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jboolean timed_out);
-
-typedef void (JNICALL *jvmtiEventNativeMethodBind)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- void* address,
- void** new_address_ptr);
-
-typedef void (JNICALL *jvmtiEventObjectFree)
- (jvmtiEnv *jvmti_env,
- jlong tag);
-
-typedef void (JNICALL *jvmtiEventResourceExhausted)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jint flags,
- const void* reserved,
- const char* description);
-
-typedef void (JNICALL *jvmtiEventSampledObjectAlloc)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jclass object_klass,
- jlong size);
-
-typedef void (JNICALL *jvmtiEventSingleStep)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jmethodID method,
- jlocation location);
-
-typedef void (JNICALL *jvmtiEventThreadEnd)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread);
-
-typedef void (JNICALL *jvmtiEventThreadStart)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread);
-
-typedef void (JNICALL *jvmtiEventVMDeath)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env);
-
-typedef void (JNICALL *jvmtiEventVMInit)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread);
-
-typedef void (JNICALL *jvmtiEventVMObjectAlloc)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env,
- jthread thread,
- jobject object,
- jclass object_klass,
- jlong size);
-
-typedef void (JNICALL *jvmtiEventVMStart)
- (jvmtiEnv *jvmti_env,
- JNIEnv* jni_env);
-
- /* Event Callback Structure */
-
-typedef struct {
- /* 50 : VM Initialization Event */
- jvmtiEventVMInit VMInit;
- /* 51 : VM Death Event */
- jvmtiEventVMDeath VMDeath;
- /* 52 : Thread Start */
- jvmtiEventThreadStart ThreadStart;
- /* 53 : Thread End */
- jvmtiEventThreadEnd ThreadEnd;
- /* 54 : Class File Load Hook */
- jvmtiEventClassFileLoadHook ClassFileLoadHook;
- /* 55 : Class Load */
- jvmtiEventClassLoad ClassLoad;
- /* 56 : Class Prepare */
- jvmtiEventClassPrepare ClassPrepare;
- /* 57 : VM Start Event */
- jvmtiEventVMStart VMStart;
- /* 58 : Exception */
- jvmtiEventException Exception;
- /* 59 : Exception Catch */
- jvmtiEventExceptionCatch ExceptionCatch;
- /* 60 : Single Step */
- jvmtiEventSingleStep SingleStep;
- /* 61 : Frame Pop */
- jvmtiEventFramePop FramePop;
- /* 62 : Breakpoint */
- jvmtiEventBreakpoint Breakpoint;
- /* 63 : Field Access */
- jvmtiEventFieldAccess FieldAccess;
- /* 64 : Field Modification */
- jvmtiEventFieldModification FieldModification;
- /* 65 : Method Entry */
- jvmtiEventMethodEntry MethodEntry;
- /* 66 : Method Exit */
- jvmtiEventMethodExit MethodExit;
- /* 67 : Native Method Bind */
- jvmtiEventNativeMethodBind NativeMethodBind;
- /* 68 : Compiled Method Load */
- jvmtiEventCompiledMethodLoad CompiledMethodLoad;
- /* 69 : Compiled Method Unload */
- jvmtiEventCompiledMethodUnload CompiledMethodUnload;
- /* 70 : Dynamic Code Generated */
- jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
- /* 71 : Data Dump Request */
- jvmtiEventDataDumpRequest DataDumpRequest;
- /* 72 */
- jvmtiEventReserved reserved72;
- /* 73 : Monitor Wait */
- jvmtiEventMonitorWait MonitorWait;
- /* 74 : Monitor Waited */
- jvmtiEventMonitorWaited MonitorWaited;
- /* 75 : Monitor Contended Enter */
- jvmtiEventMonitorContendedEnter MonitorContendedEnter;
- /* 76 : Monitor Contended Entered */
- jvmtiEventMonitorContendedEntered MonitorContendedEntered;
- /* 77 */
- jvmtiEventReserved reserved77;
- /* 78 */
- jvmtiEventReserved reserved78;
- /* 79 */
- jvmtiEventReserved reserved79;
- /* 80 : Resource Exhausted */
- jvmtiEventResourceExhausted ResourceExhausted;
- /* 81 : Garbage Collection Start */
- jvmtiEventGarbageCollectionStart GarbageCollectionStart;
- /* 82 : Garbage Collection Finish */
- jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
- /* 83 : Object Free */
- jvmtiEventObjectFree ObjectFree;
- /* 84 : VM Object Allocation */
- jvmtiEventVMObjectAlloc VMObjectAlloc;
- /* 85 */
- jvmtiEventReserved reserved85;
- /* 86 : Sampled Object Allocation */
- jvmtiEventSampledObjectAlloc SampledObjectAlloc;
-} jvmtiEventCallbacks;
-
-
- /* Function Interface */
-
-typedef struct jvmtiInterface_1_ {
-
- /* 1 : RESERVED */
- void *reserved1;
-
- /* 2 : Set Event Notification Mode */
- jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env,
- jvmtiEventMode mode,
- jvmtiEvent event_type,
- jthread event_thread,
- ...);
-
- /* 3 : Get All Modules */
- jvmtiError (JNICALL *GetAllModules) (jvmtiEnv* env,
- jint* module_count_ptr,
- jobject** modules_ptr);
-
- /* 4 : Get All Threads */
- jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env,
- jint* threads_count_ptr,
- jthread** threads_ptr);
-
- /* 5 : Suspend Thread */
- jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env,
- jthread thread);
-
- /* 6 : Resume Thread */
- jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env,
- jthread thread);
-
- /* 7 : Stop Thread */
- jvmtiError (JNICALL *StopThread) (jvmtiEnv* env,
- jthread thread,
- jobject exception);
-
- /* 8 : Interrupt Thread */
- jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env,
- jthread thread);
-
- /* 9 : Get Thread Info */
- jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env,
- jthread thread,
- jvmtiThreadInfo* info_ptr);
-
- /* 10 : Get Owned Monitor Info */
- jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env,
- jthread thread,
- jint* owned_monitor_count_ptr,
- jobject** owned_monitors_ptr);
-
- /* 11 : Get Current Contended Monitor */
- jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env,
- jthread thread,
- jobject* monitor_ptr);
-
- /* 12 : Run Agent Thread */
- jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env,
- jthread thread,
- jvmtiStartFunction proc,
- const void* arg,
- jint priority);
-
- /* 13 : Get Top Thread Groups */
- jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env,
- jint* group_count_ptr,
- jthreadGroup** groups_ptr);
-
- /* 14 : Get Thread Group Info */
- jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env,
- jthreadGroup group,
- jvmtiThreadGroupInfo* info_ptr);
-
- /* 15 : Get Thread Group Children */
- jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env,
- jthreadGroup group,
- jint* thread_count_ptr,
- jthread** threads_ptr,
- jint* group_count_ptr,
- jthreadGroup** groups_ptr);
-
- /* 16 : Get Frame Count */
- jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env,
- jthread thread,
- jint* count_ptr);
-
- /* 17 : Get Thread State */
- jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env,
- jthread thread,
- jint* thread_state_ptr);
-
- /* 18 : Get Current Thread */
- jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env,
- jthread* thread_ptr);
-
- /* 19 : Get Frame Location */
- jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jmethodID* method_ptr,
- jlocation* location_ptr);
-
- /* 20 : Notify Frame Pop */
- jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env,
- jthread thread,
- jint depth);
-
- /* 21 : Get Local Variable - Object */
- jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jobject* value_ptr);
-
- /* 22 : Get Local Variable - Int */
- jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jint* value_ptr);
-
- /* 23 : Get Local Variable - Long */
- jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jlong* value_ptr);
-
- /* 24 : Get Local Variable - Float */
- jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jfloat* value_ptr);
-
- /* 25 : Get Local Variable - Double */
- jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jdouble* value_ptr);
-
- /* 26 : Set Local Variable - Object */
- jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jobject value);
-
- /* 27 : Set Local Variable - Int */
- jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jint value);
-
- /* 28 : Set Local Variable - Long */
- jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jlong value);
-
- /* 29 : Set Local Variable - Float */
- jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jfloat value);
-
- /* 30 : Set Local Variable - Double */
- jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jint slot,
- jdouble value);
-
- /* 31 : Create Raw Monitor */
- jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env,
- const char* name,
- jrawMonitorID* monitor_ptr);
-
- /* 32 : Destroy Raw Monitor */
- jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 33 : Raw Monitor Enter */
- jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 34 : Raw Monitor Exit */
- jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 35 : Raw Monitor Wait */
- jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env,
- jrawMonitorID monitor,
- jlong millis);
-
- /* 36 : Raw Monitor Notify */
- jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 37 : Raw Monitor Notify All */
- jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env,
- jrawMonitorID monitor);
-
- /* 38 : Set Breakpoint */
- jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env,
- jmethodID method,
- jlocation location);
-
- /* 39 : Clear Breakpoint */
- jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env,
- jmethodID method,
- jlocation location);
-
- /* 40 : Get Named Module */
- jvmtiError (JNICALL *GetNamedModule) (jvmtiEnv* env,
- jobject class_loader,
- const char* package_name,
- jobject* module_ptr);
-
- /* 41 : Set Field Access Watch */
- jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 42 : Clear Field Access Watch */
- jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 43 : Set Field Modification Watch */
- jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 44 : Clear Field Modification Watch */
- jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env,
- jclass klass,
- jfieldID field);
-
- /* 45 : Is Modifiable Class */
- jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env,
- jclass klass,
- jboolean* is_modifiable_class_ptr);
-
- /* 46 : Allocate */
- jvmtiError (JNICALL *Allocate) (jvmtiEnv* env,
- jlong size,
- unsigned char** mem_ptr);
-
- /* 47 : Deallocate */
- jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env,
- unsigned char* mem);
-
- /* 48 : Get Class Signature */
- jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env,
- jclass klass,
- char** signature_ptr,
- char** generic_ptr);
-
- /* 49 : Get Class Status */
- jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env,
- jclass klass,
- jint* status_ptr);
-
- /* 50 : Get Source File Name */
- jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env,
- jclass klass,
- char** source_name_ptr);
-
- /* 51 : Get Class Modifiers */
- jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env,
- jclass klass,
- jint* modifiers_ptr);
-
- /* 52 : Get Class Methods */
- jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env,
- jclass klass,
- jint* method_count_ptr,
- jmethodID** methods_ptr);
-
- /* 53 : Get Class Fields */
- jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env,
- jclass klass,
- jint* field_count_ptr,
- jfieldID** fields_ptr);
-
- /* 54 : Get Implemented Interfaces */
- jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env,
- jclass klass,
- jint* interface_count_ptr,
- jclass** interfaces_ptr);
-
- /* 55 : Is Interface */
- jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env,
- jclass klass,
- jboolean* is_interface_ptr);
-
- /* 56 : Is Array Class */
- jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env,
- jclass klass,
- jboolean* is_array_class_ptr);
-
- /* 57 : Get Class Loader */
- jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env,
- jclass klass,
- jobject* classloader_ptr);
-
- /* 58 : Get Object Hash Code */
- jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env,
- jobject object,
- jint* hash_code_ptr);
-
- /* 59 : Get Object Monitor Usage */
- jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env,
- jobject object,
- jvmtiMonitorUsage* info_ptr);
-
- /* 60 : Get Field Name (and Signature) */
- jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr);
-
- /* 61 : Get Field Declaring Class */
- jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- jclass* declaring_class_ptr);
-
- /* 62 : Get Field Modifiers */
- jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- jint* modifiers_ptr);
-
- /* 63 : Is Field Synthetic */
- jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env,
- jclass klass,
- jfieldID field,
- jboolean* is_synthetic_ptr);
-
- /* 64 : Get Method Name (and Signature) */
- jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env,
- jmethodID method,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr);
-
- /* 65 : Get Method Declaring Class */
- jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env,
- jmethodID method,
- jclass* declaring_class_ptr);
-
- /* 66 : Get Method Modifiers */
- jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env,
- jmethodID method,
- jint* modifiers_ptr);
-
- /* 67 : RESERVED */
- void *reserved67;
-
- /* 68 : Get Max Locals */
- jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env,
- jmethodID method,
- jint* max_ptr);
-
- /* 69 : Get Arguments Size */
- jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env,
- jmethodID method,
- jint* size_ptr);
-
- /* 70 : Get Line Number Table */
- jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env,
- jmethodID method,
- jint* entry_count_ptr,
- jvmtiLineNumberEntry** table_ptr);
-
- /* 71 : Get Method Location */
- jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env,
- jmethodID method,
- jlocation* start_location_ptr,
- jlocation* end_location_ptr);
-
- /* 72 : Get Local Variable Table */
- jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env,
- jmethodID method,
- jint* entry_count_ptr,
- jvmtiLocalVariableEntry** table_ptr);
-
- /* 73 : Set Native Method Prefix */
- jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env,
- const char* prefix);
-
- /* 74 : Set Native Method Prefixes */
- jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env,
- jint prefix_count,
- char** prefixes);
-
- /* 75 : Get Bytecodes */
- jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env,
- jmethodID method,
- jint* bytecode_count_ptr,
- unsigned char** bytecodes_ptr);
-
- /* 76 : Is Method Native */
- jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env,
- jmethodID method,
- jboolean* is_native_ptr);
-
- /* 77 : Is Method Synthetic */
- jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env,
- jmethodID method,
- jboolean* is_synthetic_ptr);
-
- /* 78 : Get Loaded Classes */
- jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env,
- jint* class_count_ptr,
- jclass** classes_ptr);
-
- /* 79 : Get Classloader Classes */
- jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env,
- jobject initiating_loader,
- jint* class_count_ptr,
- jclass** classes_ptr);
-
- /* 80 : Pop Frame */
- jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env,
- jthread thread);
-
- /* 81 : Force Early Return - Object */
- jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env,
- jthread thread,
- jobject value);
-
- /* 82 : Force Early Return - Int */
- jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env,
- jthread thread,
- jint value);
-
- /* 83 : Force Early Return - Long */
- jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env,
- jthread thread,
- jlong value);
-
- /* 84 : Force Early Return - Float */
- jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env,
- jthread thread,
- jfloat value);
-
- /* 85 : Force Early Return - Double */
- jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env,
- jthread thread,
- jdouble value);
-
- /* 86 : Force Early Return - Void */
- jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env,
- jthread thread);
-
- /* 87 : Redefine Classes */
- jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env,
- jint class_count,
- const jvmtiClassDefinition* class_definitions);
-
- /* 88 : Get Version Number */
- jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env,
- jint* version_ptr);
-
- /* 89 : Get Capabilities */
- jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env,
- jvmtiCapabilities* capabilities_ptr);
-
- /* 90 : Get Source Debug Extension */
- jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env,
- jclass klass,
- char** source_debug_extension_ptr);
-
- /* 91 : Is Method Obsolete */
- jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env,
- jmethodID method,
- jboolean* is_obsolete_ptr);
-
- /* 92 : Suspend Thread List */
- jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env,
- jint request_count,
- const jthread* request_list,
- jvmtiError* results);
-
- /* 93 : Resume Thread List */
- jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env,
- jint request_count,
- const jthread* request_list,
- jvmtiError* results);
-
- /* 94 : Add Module Reads */
- jvmtiError (JNICALL *AddModuleReads) (jvmtiEnv* env,
- jobject module,
- jobject to_module);
-
- /* 95 : Add Module Exports */
- jvmtiError (JNICALL *AddModuleExports) (jvmtiEnv* env,
- jobject module,
- const char* pkg_name,
- jobject to_module);
-
- /* 96 : Add Module Opens */
- jvmtiError (JNICALL *AddModuleOpens) (jvmtiEnv* env,
- jobject module,
- const char* pkg_name,
- jobject to_module);
-
- /* 97 : Add Module Uses */
- jvmtiError (JNICALL *AddModuleUses) (jvmtiEnv* env,
- jobject module,
- jclass service);
-
- /* 98 : Add Module Provides */
- jvmtiError (JNICALL *AddModuleProvides) (jvmtiEnv* env,
- jobject module,
- jclass service,
- jclass impl_class);
-
- /* 99 : Is Modifiable Module */
- jvmtiError (JNICALL *IsModifiableModule) (jvmtiEnv* env,
- jobject module,
- jboolean* is_modifiable_module_ptr);
-
- /* 100 : Get All Stack Traces */
- jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env,
- jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr,
- jint* thread_count_ptr);
-
- /* 101 : Get Thread List Stack Traces */
- jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env,
- jint thread_count,
- const jthread* thread_list,
- jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr);
-
- /* 102 : Get Thread Local Storage */
- jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env,
- jthread thread,
- void** data_ptr);
-
- /* 103 : Set Thread Local Storage */
- jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env,
- jthread thread,
- const void* data);
-
- /* 104 : Get Stack Trace */
- jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env,
- jthread thread,
- jint start_depth,
- jint max_frame_count,
- jvmtiFrameInfo* frame_buffer,
- jint* count_ptr);
-
- /* 105 : RESERVED */
- void *reserved105;
-
- /* 106 : Get Tag */
- jvmtiError (JNICALL *GetTag) (jvmtiEnv* env,
- jobject object,
- jlong* tag_ptr);
-
- /* 107 : Set Tag */
- jvmtiError (JNICALL *SetTag) (jvmtiEnv* env,
- jobject object,
- jlong tag);
-
- /* 108 : Force Garbage Collection */
- jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
-
- /* 109 : Iterate Over Objects Reachable From Object */
- jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env,
- jobject object,
- jvmtiObjectReferenceCallback object_reference_callback,
- const void* user_data);
-
- /* 110 : Iterate Over Reachable Objects */
- jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env,
- jvmtiHeapRootCallback heap_root_callback,
- jvmtiStackReferenceCallback stack_ref_callback,
- jvmtiObjectReferenceCallback object_ref_callback,
- const void* user_data);
-
- /* 111 : Iterate Over Heap */
- jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env,
- jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data);
-
- /* 112 : Iterate Over Instances Of Class */
- jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env,
- jclass klass,
- jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data);
-
- /* 113 : RESERVED */
- void *reserved113;
-
- /* 114 : Get Objects With Tags */
- jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env,
- jint tag_count,
- const jlong* tags,
- jint* count_ptr,
- jobject** object_result_ptr,
- jlong** tag_result_ptr);
-
- /* 115 : Follow References */
- jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env,
- jint heap_filter,
- jclass klass,
- jobject initial_object,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data);
-
- /* 116 : Iterate Through Heap */
- jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env,
- jint heap_filter,
- jclass klass,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data);
-
- /* 117 : RESERVED */
- void *reserved117;
-
- /* 118 : RESERVED */
- void *reserved118;
-
- /* 119 : RESERVED */
- void *reserved119;
-
- /* 120 : Set JNI Function Table */
- jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env,
- const jniNativeInterface* function_table);
-
- /* 121 : Get JNI Function Table */
- jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env,
- jniNativeInterface** function_table);
-
- /* 122 : Set Event Callbacks */
- jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env,
- const jvmtiEventCallbacks* callbacks,
- jint size_of_callbacks);
-
- /* 123 : Generate Events */
- jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env,
- jvmtiEvent event_type);
-
- /* 124 : Get Extension Functions */
- jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env,
- jint* extension_count_ptr,
- jvmtiExtensionFunctionInfo** extensions);
-
- /* 125 : Get Extension Events */
- jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env,
- jint* extension_count_ptr,
- jvmtiExtensionEventInfo** extensions);
-
- /* 126 : Set Extension Event Callback */
- jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env,
- jint extension_event_index,
- jvmtiExtensionEvent callback);
-
- /* 127 : Dispose Environment */
- jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
-
- /* 128 : Get Error Name */
- jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env,
- jvmtiError error,
- char** name_ptr);
-
- /* 129 : Get JLocation Format */
- jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env,
- jvmtiJlocationFormat* format_ptr);
-
- /* 130 : Get System Properties */
- jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env,
- jint* count_ptr,
- char*** property_ptr);
-
- /* 131 : Get System Property */
- jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env,
- const char* property,
- char** value_ptr);
-
- /* 132 : Set System Property */
- jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env,
- const char* property,
- const char* value_ptr);
-
- /* 133 : Get Phase */
- jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env,
- jvmtiPhase* phase_ptr);
-
- /* 134 : Get Current Thread CPU Timer Information */
- jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env,
- jvmtiTimerInfo* info_ptr);
-
- /* 135 : Get Current Thread CPU Time */
- jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env,
- jlong* nanos_ptr);
-
- /* 136 : Get Thread CPU Timer Information */
- jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env,
- jvmtiTimerInfo* info_ptr);
-
- /* 137 : Get Thread CPU Time */
- jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env,
- jthread thread,
- jlong* nanos_ptr);
-
- /* 138 : Get Timer Information */
- jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env,
- jvmtiTimerInfo* info_ptr);
-
- /* 139 : Get Time */
- jvmtiError (JNICALL *GetTime) (jvmtiEnv* env,
- jlong* nanos_ptr);
-
- /* 140 : Get Potential Capabilities */
- jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env,
- jvmtiCapabilities* capabilities_ptr);
-
- /* 141 : RESERVED */
- void *reserved141;
-
- /* 142 : Add Capabilities */
- jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env,
- const jvmtiCapabilities* capabilities_ptr);
-
- /* 143 : Relinquish Capabilities */
- jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env,
- const jvmtiCapabilities* capabilities_ptr);
-
- /* 144 : Get Available Processors */
- jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env,
- jint* processor_count_ptr);
-
- /* 145 : Get Class Version Numbers */
- jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env,
- jclass klass,
- jint* minor_version_ptr,
- jint* major_version_ptr);
-
- /* 146 : Get Constant Pool */
- jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env,
- jclass klass,
- jint* constant_pool_count_ptr,
- jint* constant_pool_byte_count_ptr,
- unsigned char** constant_pool_bytes_ptr);
-
- /* 147 : Get Environment Local Storage */
- jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env,
- void** data_ptr);
-
- /* 148 : Set Environment Local Storage */
- jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env,
- const void* data);
-
- /* 149 : Add To Bootstrap Class Loader Search */
- jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env,
- const char* segment);
-
- /* 150 : Set Verbose Flag */
- jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env,
- jvmtiVerboseFlag flag,
- jboolean value);
-
- /* 151 : Add To System Class Loader Search */
- jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env,
- const char* segment);
-
- /* 152 : Retransform Classes */
- jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env,
- jint class_count,
- const jclass* classes);
-
- /* 153 : Get Owned Monitor Stack Depth Info */
- jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env,
- jthread thread,
- jint* monitor_info_count_ptr,
- jvmtiMonitorStackDepthInfo** monitor_info_ptr);
-
- /* 154 : Get Object Size */
- jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env,
- jobject object,
- jlong* size_ptr);
-
- /* 155 : Get Local Instance */
- jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env,
- jthread thread,
- jint depth,
- jobject* value_ptr);
-
- /* 156 : Set Heap Sampling Interval */
- jvmtiError (JNICALL *SetHeapSamplingInterval) (jvmtiEnv* env,
- jint sampling_interval);
-
-} jvmtiInterface_1;
-
-struct _jvmtiEnv {
- const struct jvmtiInterface_1_ *functions;
-#ifdef __cplusplus
-
-
- jvmtiError Allocate(jlong size,
- unsigned char** mem_ptr) {
- return functions->Allocate(this, size, mem_ptr);
- }
-
- jvmtiError Deallocate(unsigned char* mem) {
- return functions->Deallocate(this, mem);
- }
-
- jvmtiError GetThreadState(jthread thread,
- jint* thread_state_ptr) {
- return functions->GetThreadState(this, thread, thread_state_ptr);
- }
-
- jvmtiError GetCurrentThread(jthread* thread_ptr) {
- return functions->GetCurrentThread(this, thread_ptr);
- }
-
- jvmtiError GetAllThreads(jint* threads_count_ptr,
- jthread** threads_ptr) {
- return functions->GetAllThreads(this, threads_count_ptr, threads_ptr);
- }
-
- jvmtiError SuspendThread(jthread thread) {
- return functions->SuspendThread(this, thread);
- }
-
- jvmtiError SuspendThreadList(jint request_count,
- const jthread* request_list,
- jvmtiError* results) {
- return functions->SuspendThreadList(this, request_count, request_list, results);
- }
-
- jvmtiError ResumeThread(jthread thread) {
- return functions->ResumeThread(this, thread);
- }
-
- jvmtiError ResumeThreadList(jint request_count,
- const jthread* request_list,
- jvmtiError* results) {
- return functions->ResumeThreadList(this, request_count, request_list, results);
- }
-
- jvmtiError StopThread(jthread thread,
- jobject exception) {
- return functions->StopThread(this, thread, exception);
- }
-
- jvmtiError InterruptThread(jthread thread) {
- return functions->InterruptThread(this, thread);
- }
-
- jvmtiError GetThreadInfo(jthread thread,
- jvmtiThreadInfo* info_ptr) {
- return functions->GetThreadInfo(this, thread, info_ptr);
- }
-
- jvmtiError GetOwnedMonitorInfo(jthread thread,
- jint* owned_monitor_count_ptr,
- jobject** owned_monitors_ptr) {
- return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr);
- }
-
- jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread,
- jint* monitor_info_count_ptr,
- jvmtiMonitorStackDepthInfo** monitor_info_ptr) {
- return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr);
- }
-
- jvmtiError GetCurrentContendedMonitor(jthread thread,
- jobject* monitor_ptr) {
- return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr);
- }
-
- jvmtiError RunAgentThread(jthread thread,
- jvmtiStartFunction proc,
- const void* arg,
- jint priority) {
- return functions->RunAgentThread(this, thread, proc, arg, priority);
- }
-
- jvmtiError SetThreadLocalStorage(jthread thread,
- const void* data) {
- return functions->SetThreadLocalStorage(this, thread, data);
- }
-
- jvmtiError GetThreadLocalStorage(jthread thread,
- void** data_ptr) {
- return functions->GetThreadLocalStorage(this, thread, data_ptr);
- }
-
- jvmtiError GetTopThreadGroups(jint* group_count_ptr,
- jthreadGroup** groups_ptr) {
- return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr);
- }
-
- jvmtiError GetThreadGroupInfo(jthreadGroup group,
- jvmtiThreadGroupInfo* info_ptr) {
- return functions->GetThreadGroupInfo(this, group, info_ptr);
- }
-
- jvmtiError GetThreadGroupChildren(jthreadGroup group,
- jint* thread_count_ptr,
- jthread** threads_ptr,
- jint* group_count_ptr,
- jthreadGroup** groups_ptr) {
- return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr);
- }
-
- jvmtiError GetStackTrace(jthread thread,
- jint start_depth,
- jint max_frame_count,
- jvmtiFrameInfo* frame_buffer,
- jint* count_ptr) {
- return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr);
- }
-
- jvmtiError GetAllStackTraces(jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr,
- jint* thread_count_ptr) {
- return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr);
- }
-
- jvmtiError GetThreadListStackTraces(jint thread_count,
- const jthread* thread_list,
- jint max_frame_count,
- jvmtiStackInfo** stack_info_ptr) {
- return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr);
- }
-
- jvmtiError GetFrameCount(jthread thread,
- jint* count_ptr) {
- return functions->GetFrameCount(this, thread, count_ptr);
- }
-
- jvmtiError PopFrame(jthread thread) {
- return functions->PopFrame(this, thread);
- }
-
- jvmtiError GetFrameLocation(jthread thread,
- jint depth,
- jmethodID* method_ptr,
- jlocation* location_ptr) {
- return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr);
- }
-
- jvmtiError NotifyFramePop(jthread thread,
- jint depth) {
- return functions->NotifyFramePop(this, thread, depth);
- }
-
- jvmtiError ForceEarlyReturnObject(jthread thread,
- jobject value) {
- return functions->ForceEarlyReturnObject(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnInt(jthread thread,
- jint value) {
- return functions->ForceEarlyReturnInt(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnLong(jthread thread,
- jlong value) {
- return functions->ForceEarlyReturnLong(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnFloat(jthread thread,
- jfloat value) {
- return functions->ForceEarlyReturnFloat(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnDouble(jthread thread,
- jdouble value) {
- return functions->ForceEarlyReturnDouble(this, thread, value);
- }
-
- jvmtiError ForceEarlyReturnVoid(jthread thread) {
- return functions->ForceEarlyReturnVoid(this, thread);
- }
-
- jvmtiError FollowReferences(jint heap_filter,
- jclass klass,
- jobject initial_object,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data) {
- return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data);
- }
-
- jvmtiError IterateThroughHeap(jint heap_filter,
- jclass klass,
- const jvmtiHeapCallbacks* callbacks,
- const void* user_data) {
- return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data);
- }
-
- jvmtiError GetTag(jobject object,
- jlong* tag_ptr) {
- return functions->GetTag(this, object, tag_ptr);
- }
-
- jvmtiError SetTag(jobject object,
- jlong tag) {
- return functions->SetTag(this, object, tag);
- }
-
- jvmtiError GetObjectsWithTags(jint tag_count,
- const jlong* tags,
- jint* count_ptr,
- jobject** object_result_ptr,
- jlong** tag_result_ptr) {
- return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr);
- }
-
- jvmtiError ForceGarbageCollection() {
- return functions->ForceGarbageCollection(this);
- }
-
- jvmtiError IterateOverObjectsReachableFromObject(jobject object,
- jvmtiObjectReferenceCallback object_reference_callback,
- const void* user_data) {
- return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data);
- }
-
- jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback,
- jvmtiStackReferenceCallback stack_ref_callback,
- jvmtiObjectReferenceCallback object_ref_callback,
- const void* user_data) {
- return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data);
- }
-
- jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data) {
- return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data);
- }
-
- jvmtiError IterateOverInstancesOfClass(jclass klass,
- jvmtiHeapObjectFilter object_filter,
- jvmtiHeapObjectCallback heap_object_callback,
- const void* user_data) {
- return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data);
- }
-
- jvmtiError GetLocalObject(jthread thread,
- jint depth,
- jint slot,
- jobject* value_ptr) {
- return functions->GetLocalObject(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalInstance(jthread thread,
- jint depth,
- jobject* value_ptr) {
- return functions->GetLocalInstance(this, thread, depth, value_ptr);
- }
-
- jvmtiError GetLocalInt(jthread thread,
- jint depth,
- jint slot,
- jint* value_ptr) {
- return functions->GetLocalInt(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalLong(jthread thread,
- jint depth,
- jint slot,
- jlong* value_ptr) {
- return functions->GetLocalLong(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalFloat(jthread thread,
- jint depth,
- jint slot,
- jfloat* value_ptr) {
- return functions->GetLocalFloat(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError GetLocalDouble(jthread thread,
- jint depth,
- jint slot,
- jdouble* value_ptr) {
- return functions->GetLocalDouble(this, thread, depth, slot, value_ptr);
- }
-
- jvmtiError SetLocalObject(jthread thread,
- jint depth,
- jint slot,
- jobject value) {
- return functions->SetLocalObject(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalInt(jthread thread,
- jint depth,
- jint slot,
- jint value) {
- return functions->SetLocalInt(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalLong(jthread thread,
- jint depth,
- jint slot,
- jlong value) {
- return functions->SetLocalLong(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalFloat(jthread thread,
- jint depth,
- jint slot,
- jfloat value) {
- return functions->SetLocalFloat(this, thread, depth, slot, value);
- }
-
- jvmtiError SetLocalDouble(jthread thread,
- jint depth,
- jint slot,
- jdouble value) {
- return functions->SetLocalDouble(this, thread, depth, slot, value);
- }
-
- jvmtiError SetBreakpoint(jmethodID method,
- jlocation location) {
- return functions->SetBreakpoint(this, method, location);
- }
-
- jvmtiError ClearBreakpoint(jmethodID method,
- jlocation location) {
- return functions->ClearBreakpoint(this, method, location);
- }
-
- jvmtiError SetFieldAccessWatch(jclass klass,
- jfieldID field) {
- return functions->SetFieldAccessWatch(this, klass, field);
- }
-
- jvmtiError ClearFieldAccessWatch(jclass klass,
- jfieldID field) {
- return functions->ClearFieldAccessWatch(this, klass, field);
- }
-
- jvmtiError SetFieldModificationWatch(jclass klass,
- jfieldID field) {
- return functions->SetFieldModificationWatch(this, klass, field);
- }
-
- jvmtiError ClearFieldModificationWatch(jclass klass,
- jfieldID field) {
- return functions->ClearFieldModificationWatch(this, klass, field);
- }
-
- jvmtiError GetAllModules(jint* module_count_ptr,
- jobject** modules_ptr) {
- return functions->GetAllModules(this, module_count_ptr, modules_ptr);
- }
-
- jvmtiError GetNamedModule(jobject class_loader,
- const char* package_name,
- jobject* module_ptr) {
- return functions->GetNamedModule(this, class_loader, package_name, module_ptr);
- }
-
- jvmtiError AddModuleReads(jobject module,
- jobject to_module) {
- return functions->AddModuleReads(this, module, to_module);
- }
-
- jvmtiError AddModuleExports(jobject module,
- const char* pkg_name,
- jobject to_module) {
- return functions->AddModuleExports(this, module, pkg_name, to_module);
- }
-
- jvmtiError AddModuleOpens(jobject module,
- const char* pkg_name,
- jobject to_module) {
- return functions->AddModuleOpens(this, module, pkg_name, to_module);
- }
-
- jvmtiError AddModuleUses(jobject module,
- jclass service) {
- return functions->AddModuleUses(this, module, service);
- }
-
- jvmtiError AddModuleProvides(jobject module,
- jclass service,
- jclass impl_class) {
- return functions->AddModuleProvides(this, module, service, impl_class);
- }
-
- jvmtiError IsModifiableModule(jobject module,
- jboolean* is_modifiable_module_ptr) {
- return functions->IsModifiableModule(this, module, is_modifiable_module_ptr);
- }
-
- jvmtiError GetLoadedClasses(jint* class_count_ptr,
- jclass** classes_ptr) {
- return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr);
- }
-
- jvmtiError GetClassLoaderClasses(jobject initiating_loader,
- jint* class_count_ptr,
- jclass** classes_ptr) {
- return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr);
- }
-
- jvmtiError GetClassSignature(jclass klass,
- char** signature_ptr,
- char** generic_ptr) {
- return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr);
- }
-
- jvmtiError GetClassStatus(jclass klass,
- jint* status_ptr) {
- return functions->GetClassStatus(this, klass, status_ptr);
- }
-
- jvmtiError GetSourceFileName(jclass klass,
- char** source_name_ptr) {
- return functions->GetSourceFileName(this, klass, source_name_ptr);
- }
-
- jvmtiError GetClassModifiers(jclass klass,
- jint* modifiers_ptr) {
- return functions->GetClassModifiers(this, klass, modifiers_ptr);
- }
-
- jvmtiError GetClassMethods(jclass klass,
- jint* method_count_ptr,
- jmethodID** methods_ptr) {
- return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr);
- }
-
- jvmtiError GetClassFields(jclass klass,
- jint* field_count_ptr,
- jfieldID** fields_ptr) {
- return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr);
- }
-
- jvmtiError GetImplementedInterfaces(jclass klass,
- jint* interface_count_ptr,
- jclass** interfaces_ptr) {
- return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr);
- }
-
- jvmtiError GetClassVersionNumbers(jclass klass,
- jint* minor_version_ptr,
- jint* major_version_ptr) {
- return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr);
- }
-
- jvmtiError GetConstantPool(jclass klass,
- jint* constant_pool_count_ptr,
- jint* constant_pool_byte_count_ptr,
- unsigned char** constant_pool_bytes_ptr) {
- return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr);
- }
-
- jvmtiError IsInterface(jclass klass,
- jboolean* is_interface_ptr) {
- return functions->IsInterface(this, klass, is_interface_ptr);
- }
-
- jvmtiError IsArrayClass(jclass klass,
- jboolean* is_array_class_ptr) {
- return functions->IsArrayClass(this, klass, is_array_class_ptr);
- }
-
- jvmtiError IsModifiableClass(jclass klass,
- jboolean* is_modifiable_class_ptr) {
- return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr);
- }
-
- jvmtiError GetClassLoader(jclass klass,
- jobject* classloader_ptr) {
- return functions->GetClassLoader(this, klass, classloader_ptr);
- }
-
- jvmtiError GetSourceDebugExtension(jclass klass,
- char** source_debug_extension_ptr) {
- return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr);
- }
-
- jvmtiError RetransformClasses(jint class_count,
- const jclass* classes) {
- return functions->RetransformClasses(this, class_count, classes);
- }
-
- jvmtiError RedefineClasses(jint class_count,
- const jvmtiClassDefinition* class_definitions) {
- return functions->RedefineClasses(this, class_count, class_definitions);
- }
-
- jvmtiError GetObjectSize(jobject object,
- jlong* size_ptr) {
- return functions->GetObjectSize(this, object, size_ptr);
- }
-
- jvmtiError GetObjectHashCode(jobject object,
- jint* hash_code_ptr) {
- return functions->GetObjectHashCode(this, object, hash_code_ptr);
- }
-
- jvmtiError GetObjectMonitorUsage(jobject object,
- jvmtiMonitorUsage* info_ptr) {
- return functions->GetObjectMonitorUsage(this, object, info_ptr);
- }
-
- jvmtiError GetFieldName(jclass klass,
- jfieldID field,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr) {
- return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr);
- }
-
- jvmtiError GetFieldDeclaringClass(jclass klass,
- jfieldID field,
- jclass* declaring_class_ptr) {
- return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr);
- }
-
- jvmtiError GetFieldModifiers(jclass klass,
- jfieldID field,
- jint* modifiers_ptr) {
- return functions->GetFieldModifiers(this, klass, field, modifiers_ptr);
- }
-
- jvmtiError IsFieldSynthetic(jclass klass,
- jfieldID field,
- jboolean* is_synthetic_ptr) {
- return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr);
- }
-
- jvmtiError GetMethodName(jmethodID method,
- char** name_ptr,
- char** signature_ptr,
- char** generic_ptr) {
- return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr);
- }
-
- jvmtiError GetMethodDeclaringClass(jmethodID method,
- jclass* declaring_class_ptr) {
- return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr);
- }
-
- jvmtiError GetMethodModifiers(jmethodID method,
- jint* modifiers_ptr) {
- return functions->GetMethodModifiers(this, method, modifiers_ptr);
- }
-
- jvmtiError GetMaxLocals(jmethodID method,
- jint* max_ptr) {
- return functions->GetMaxLocals(this, method, max_ptr);
- }
-
- jvmtiError GetArgumentsSize(jmethodID method,
- jint* size_ptr) {
- return functions->GetArgumentsSize(this, method, size_ptr);
- }
-
- jvmtiError GetLineNumberTable(jmethodID method,
- jint* entry_count_ptr,
- jvmtiLineNumberEntry** table_ptr) {
- return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr);
- }
-
- jvmtiError GetMethodLocation(jmethodID method,
- jlocation* start_location_ptr,
- jlocation* end_location_ptr) {
- return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr);
- }
-
- jvmtiError GetLocalVariableTable(jmethodID method,
- jint* entry_count_ptr,
- jvmtiLocalVariableEntry** table_ptr) {
- return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr);
- }
-
- jvmtiError GetBytecodes(jmethodID method,
- jint* bytecode_count_ptr,
- unsigned char** bytecodes_ptr) {
- return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr);
- }
-
- jvmtiError IsMethodNative(jmethodID method,
- jboolean* is_native_ptr) {
- return functions->IsMethodNative(this, method, is_native_ptr);
- }
-
- jvmtiError IsMethodSynthetic(jmethodID method,
- jboolean* is_synthetic_ptr) {
- return functions->IsMethodSynthetic(this, method, is_synthetic_ptr);
- }
-
- jvmtiError IsMethodObsolete(jmethodID method,
- jboolean* is_obsolete_ptr) {
- return functions->IsMethodObsolete(this, method, is_obsolete_ptr);
- }
-
- jvmtiError SetNativeMethodPrefix(const char* prefix) {
- return functions->SetNativeMethodPrefix(this, prefix);
- }
-
- jvmtiError SetNativeMethodPrefixes(jint prefix_count,
- char** prefixes) {
- return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes);
- }
-
- jvmtiError CreateRawMonitor(const char* name,
- jrawMonitorID* monitor_ptr) {
- return functions->CreateRawMonitor(this, name, monitor_ptr);
- }
-
- jvmtiError DestroyRawMonitor(jrawMonitorID monitor) {
- return functions->DestroyRawMonitor(this, monitor);
- }
-
- jvmtiError RawMonitorEnter(jrawMonitorID monitor) {
- return functions->RawMonitorEnter(this, monitor);
- }
-
- jvmtiError RawMonitorExit(jrawMonitorID monitor) {
- return functions->RawMonitorExit(this, monitor);
- }
-
- jvmtiError RawMonitorWait(jrawMonitorID monitor,
- jlong millis) {
- return functions->RawMonitorWait(this, monitor, millis);
- }
-
- jvmtiError RawMonitorNotify(jrawMonitorID monitor) {
- return functions->RawMonitorNotify(this, monitor);
- }
-
- jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) {
- return functions->RawMonitorNotifyAll(this, monitor);
- }
-
- jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) {
- return functions->SetJNIFunctionTable(this, function_table);
- }
-
- jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) {
- return functions->GetJNIFunctionTable(this, function_table);
- }
-
- jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks,
- jint size_of_callbacks) {
- return functions->SetEventCallbacks(this, callbacks, size_of_callbacks);
- }
-
- jvmtiError SetEventNotificationMode(jvmtiEventMode mode,
- jvmtiEvent event_type,
- jthread event_thread,
- ...) {
- return functions->SetEventNotificationMode(this, mode, event_type, event_thread);
- }
-
- jvmtiError GenerateEvents(jvmtiEvent event_type) {
- return functions->GenerateEvents(this, event_type);
- }
-
- jvmtiError GetExtensionFunctions(jint* extension_count_ptr,
- jvmtiExtensionFunctionInfo** extensions) {
- return functions->GetExtensionFunctions(this, extension_count_ptr, extensions);
- }
-
- jvmtiError GetExtensionEvents(jint* extension_count_ptr,
- jvmtiExtensionEventInfo** extensions) {
- return functions->GetExtensionEvents(this, extension_count_ptr, extensions);
- }
-
- jvmtiError SetExtensionEventCallback(jint extension_event_index,
- jvmtiExtensionEvent callback) {
- return functions->SetExtensionEventCallback(this, extension_event_index, callback);
- }
-
- jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) {
- return functions->GetPotentialCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) {
- return functions->AddCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) {
- return functions->RelinquishCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) {
- return functions->GetCapabilities(this, capabilities_ptr);
- }
-
- jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
- return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr);
- }
-
- jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) {
- return functions->GetCurrentThreadCpuTime(this, nanos_ptr);
- }
-
- jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
- return functions->GetThreadCpuTimerInfo(this, info_ptr);
- }
-
- jvmtiError GetThreadCpuTime(jthread thread,
- jlong* nanos_ptr) {
- return functions->GetThreadCpuTime(this, thread, nanos_ptr);
- }
-
- jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) {
- return functions->GetTimerInfo(this, info_ptr);
- }
-
- jvmtiError GetTime(jlong* nanos_ptr) {
- return functions->GetTime(this, nanos_ptr);
- }
-
- jvmtiError GetAvailableProcessors(jint* processor_count_ptr) {
- return functions->GetAvailableProcessors(this, processor_count_ptr);
- }
-
- jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) {
- return functions->AddToBootstrapClassLoaderSearch(this, segment);
- }
-
- jvmtiError AddToSystemClassLoaderSearch(const char* segment) {
- return functions->AddToSystemClassLoaderSearch(this, segment);
- }
-
- jvmtiError GetSystemProperties(jint* count_ptr,
- char*** property_ptr) {
- return functions->GetSystemProperties(this, count_ptr, property_ptr);
- }
-
- jvmtiError GetSystemProperty(const char* property,
- char** value_ptr) {
- return functions->GetSystemProperty(this, property, value_ptr);
- }
-
- jvmtiError SetSystemProperty(const char* property,
- const char* value_ptr) {
- return functions->SetSystemProperty(this, property, value_ptr);
- }
-
- jvmtiError GetPhase(jvmtiPhase* phase_ptr) {
- return functions->GetPhase(this, phase_ptr);
- }
-
- jvmtiError DisposeEnvironment() {
- return functions->DisposeEnvironment(this);
- }
-
- jvmtiError SetEnvironmentLocalStorage(const void* data) {
- return functions->SetEnvironmentLocalStorage(this, data);
- }
-
- jvmtiError GetEnvironmentLocalStorage(void** data_ptr) {
- return functions->GetEnvironmentLocalStorage(this, data_ptr);
- }
-
- jvmtiError GetVersionNumber(jint* version_ptr) {
- return functions->GetVersionNumber(this, version_ptr);
- }
-
- jvmtiError GetErrorName(jvmtiError error,
- char** name_ptr) {
- return functions->GetErrorName(this, error, name_ptr);
- }
-
- jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag,
- jboolean value) {
- return functions->SetVerboseFlag(this, flag, value);
- }
-
- jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
- return functions->GetJLocationFormat(this, format_ptr);
- }
-
- jvmtiError SetHeapSamplingInterval(jint sampling_interval) {
- return functions->SetHeapSamplingInterval(this, sampling_interval);
- }
-
-#endif /* __cplusplus */
-};
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVA_JVMTI_H_ */
diff --git a/jni/windows/jvmticmlr.h b/jni/windows/jvmticmlr.h
deleted file mode 100644
index a9c88f3..0000000
--- a/jni/windows/jvmticmlr.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/*
- * This header file defines the data structures sent by the VM
- * through the JVMTI CompiledMethodLoad callback function via the
- * "void * compile_info" parameter. The memory pointed to by the
- * compile_info parameter may not be referenced after returning from
- * the CompiledMethodLoad callback. These are VM implementation
- * specific data structures that may evolve in future releases. A
- * JVMTI agent should interpret a non-NULL compile_info as a pointer
- * to a region of memory containing a list of records. In a typical
- * usage scenario, a JVMTI agent would cast each record to a
- * jvmtiCompiledMethodLoadRecordHeader, a struct that represents
- * arbitrary information. This struct contains a kind field to indicate
- * the kind of information being passed, and a pointer to the next
- * record. If the kind field indicates inlining information, then the
- * agent would cast the record to a jvmtiCompiledMethodLoadInlineRecord.
- * This record contains an array of PCStackInfo structs, which indicate
- * for every pc address what are the methods on the invocation stack.
- * The "methods" and "bcis" fields in each PCStackInfo struct specify a
- * 1-1 mapping between these inlined methods and their bytecode indices.
- * This can be used to derive the proper source lines of the inlined
- * methods.
- */
-
-#ifndef _JVMTI_CMLR_H_
-#define _JVMTI_CMLR_H_
-
-enum {
- JVMTI_CMLR_MAJOR_VERSION_1 = 0x00000001,
- JVMTI_CMLR_MINOR_VERSION_0 = 0x00000000,
-
- JVMTI_CMLR_MAJOR_VERSION = 0x00000001,
- JVMTI_CMLR_MINOR_VERSION = 0x00000000
-
- /*
- * This comment is for the "JDK import from HotSpot" sanity check:
- * version: 1.0.0
- */
-};
-
-typedef enum {
- JVMTI_CMLR_DUMMY = 1,
- JVMTI_CMLR_INLINE_INFO = 2
-} jvmtiCMLRKind;
-
-/*
- * Record that represents arbitrary information passed through JVMTI
- * CompiledMethodLoadEvent void pointer.
- */
-typedef struct _jvmtiCompiledMethodLoadRecordHeader {
- jvmtiCMLRKind kind; /* id for the kind of info passed in the record */
- jint majorinfoversion; /* major and minor info version values. Init'ed */
- jint minorinfoversion; /* to current version value in jvmtiExport.cpp. */
-
- struct _jvmtiCompiledMethodLoadRecordHeader* next;
-} jvmtiCompiledMethodLoadRecordHeader;
-
-/*
- * Record that gives information about the methods on the compile-time
- * stack at a specific pc address of a compiled method. Each element in
- * the methods array maps to same element in the bcis array.
- */
-typedef struct _PCStackInfo {
- void* pc; /* the pc address for this compiled method */
- jint numstackframes; /* number of methods on the stack */
- jmethodID* methods; /* array of numstackframes method ids */
- jint* bcis; /* array of numstackframes bytecode indices */
-} PCStackInfo;
-
-/*
- * Record that contains inlining information for each pc address of
- * an nmethod.
- */
-typedef struct _jvmtiCompiledMethodLoadInlineRecord {
- jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */
- jint numpcs; /* number of pc descriptors in this nmethod */
- PCStackInfo* pcinfo; /* array of numpcs pc descriptors */
-} jvmtiCompiledMethodLoadInlineRecord;
-
-/*
- * Dummy record used to test that we can pass records with different
- * information through the void pointer provided that they can be cast
- * to a jvmtiCompiledMethodLoadRecordHeader.
- */
-
-typedef struct _jvmtiCompiledMethodLoadDummyRecord {
- jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */
- char message[50];
-} jvmtiCompiledMethodLoadDummyRecord;
-
-#endif
diff --git a/jni/windows/win32/bridge/AccessBridgeCallbacks.h b/jni/windows/win32/bridge/AccessBridgeCallbacks.h
deleted file mode 100644
index 302b048..0000000
--- a/jni/windows/win32/bridge/AccessBridgeCallbacks.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/*
- * Header file defining callback typedefs for Windows routines
- * which are called from Java (responding to events, etc.).
- */
-
-#ifndef __AccessBridgeCallbacks_H__
-#define __AccessBridgeCallbacks_H__
-
-#include
-#include "AccessBridgePackages.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*AccessBridge_PropertyChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- wchar_t *property, wchar_t *oldValue, wchar_t *newValue);
-
-typedef void (*AccessBridge_JavaShutdownFP) (long vmID);
-typedef void (*AccessBridge_JavaShutdownFP) (long vmID);
-
-typedef void (*AccessBridge_FocusGainedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_FocusLostFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-
-typedef void (*AccessBridge_CaretUpdateFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-
-typedef void (*AccessBridge_MouseClickedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_MouseEnteredFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_MouseExitedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_MousePressedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_MouseReleasedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-
-typedef void (*AccessBridge_MenuCanceledFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_MenuDeselectedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_MenuSelectedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_PopupMenuCanceledFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_PopupMenuWillBecomeInvisibleFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_PopupMenuWillBecomeVisibleFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-
-typedef void (*AccessBridge_PropertyNameChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- wchar_t *oldName, wchar_t *newName);
-typedef void (*AccessBridge_PropertyDescriptionChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- wchar_t *oldDescription, wchar_t *newDescription);
-typedef void (*AccessBridge_PropertyStateChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- wchar_t *oldState, wchar_t *newState);
-typedef void (*AccessBridge_PropertyValueChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- wchar_t *oldValue, wchar_t *newValue);
-typedef void (*AccessBridge_PropertySelectionChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_PropertyTextChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_PropertyCaretChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- int oldPosition, int newPosition);
-typedef void (*AccessBridge_PropertyVisibleDataChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
-typedef void (*AccessBridge_PropertyChildChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source,
- JOBJECT64 oldChild, JOBJECT64 newChild);
-typedef void (*AccessBridge_PropertyActiveDescendentChangeFP) (long vmID, JOBJECT64 event,
- JOBJECT64 source,
- JOBJECT64 oldActiveDescendent,
- JOBJECT64 newActiveDescendent);
-
-typedef void (*AccessBridge_PropertyTableModelChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 src,
- wchar_t *oldValue, wchar_t *newValue);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/jni/windows/win32/bridge/AccessBridgeCalls.h b/jni/windows/win32/bridge/AccessBridgeCalls.h
deleted file mode 100644
index 8514fc5..0000000
--- a/jni/windows/win32/bridge/AccessBridgeCalls.h
+++ /dev/null
@@ -1,725 +0,0 @@
-/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/* Note: In addition to this header file AccessBridgeCalls.c must be compiled and
- * linked to your application. AccessBridgeCalls.c implements the Java Access
- * Bridge API and also hides the complexities associated with interfacing to the
- * associated Java Access Bridge DLL which is installed when Java is installed.
- *
- * AccessBridgeCalls.c is available for download from the OpenJDK repository using
- * the following link:
- *
- * http://hg.openjdk.java.net/jdk9/jdk9/jdk/raw-file/tip/src/jdk.accessibility/windows/native/bridge/AccessBridgeCalls.c
- *
- * Also note that the API is used in the jaccessinspector and jaccesswalker tools.
- * The source for those tools is available in the OpenJDK repository at these links:
- *
- * http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp
- * http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp
- *
- *
- */
-
-/*
- * Wrapper functions around calls to the AccessBridge DLL
- */
-
-#include
-#include
-#include "AccessBridgeCallbacks.h"
-#include "AccessBridgePackages.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define null NULL
-
- typedef JOBJECT64 AccessibleContext;
- typedef JOBJECT64 AccessibleText;
- typedef JOBJECT64 AccessibleValue;
- typedef JOBJECT64 AccessibleSelection;
- typedef JOBJECT64 Java_Object;
- typedef JOBJECT64 PropertyChangeEvent;
- typedef JOBJECT64 FocusEvent;
- typedef JOBJECT64 CaretEvent;
- typedef JOBJECT64 MouseEvent;
- typedef JOBJECT64 MenuEvent;
- typedef JOBJECT64 AccessibleTable;
- typedef JOBJECT64 AccessibleHyperlink;
- typedef JOBJECT64 AccessibleHypertext;
-
-
- typedef void (*Windows_runFP) ();
-
- typedef void (*SetPropertyChangeFP) (AccessBridge_PropertyChangeFP fp);
-
- typedef void (*SetJavaShutdownFP) (AccessBridge_JavaShutdownFP fp);
- typedef void (*SetFocusGainedFP) (AccessBridge_FocusGainedFP fp);
- typedef void (*SetFocusLostFP) (AccessBridge_FocusLostFP fp);
-
- typedef void (*SetCaretUpdateFP) (AccessBridge_CaretUpdateFP fp);
-
- typedef void (*SetMouseClickedFP) (AccessBridge_MouseClickedFP fp);
- typedef void (*SetMouseEnteredFP) (AccessBridge_MouseEnteredFP fp);
- typedef void (*SetMouseExitedFP) (AccessBridge_MouseExitedFP fp);
- typedef void (*SetMousePressedFP) (AccessBridge_MousePressedFP fp);
- typedef void (*SetMouseReleasedFP) (AccessBridge_MouseReleasedFP fp);
-
- typedef void (*SetMenuCanceledFP) (AccessBridge_MenuCanceledFP fp);
- typedef void (*SetMenuDeselectedFP) (AccessBridge_MenuDeselectedFP fp);
- typedef void (*SetMenuSelectedFP) (AccessBridge_MenuSelectedFP fp);
- typedef void (*SetPopupMenuCanceledFP) (AccessBridge_PopupMenuCanceledFP fp);
- typedef void (*SetPopupMenuWillBecomeInvisibleFP) (AccessBridge_PopupMenuWillBecomeInvisibleFP fp);
- typedef void (*SetPopupMenuWillBecomeVisibleFP) (AccessBridge_PopupMenuWillBecomeVisibleFP fp);
-
- typedef void (*SetPropertyNameChangeFP) (AccessBridge_PropertyNameChangeFP fp);
- typedef void (*SetPropertyDescriptionChangeFP) (AccessBridge_PropertyDescriptionChangeFP fp);
- typedef void (*SetPropertyStateChangeFP) (AccessBridge_PropertyStateChangeFP fp);
- typedef void (*SetPropertyValueChangeFP) (AccessBridge_PropertyValueChangeFP fp);
- typedef void (*SetPropertySelectionChangeFP) (AccessBridge_PropertySelectionChangeFP fp);
- typedef void (*SetPropertyTextChangeFP) (AccessBridge_PropertyTextChangeFP fp);
- typedef void (*SetPropertyCaretChangeFP) (AccessBridge_PropertyCaretChangeFP fp);
- typedef void (*SetPropertyVisibleDataChangeFP) (AccessBridge_PropertyVisibleDataChangeFP fp);
- typedef void (*SetPropertyChildChangeFP) (AccessBridge_PropertyChildChangeFP fp);
- typedef void (*SetPropertyActiveDescendentChangeFP) (AccessBridge_PropertyActiveDescendentChangeFP fp);
-
- typedef void (*SetPropertyTableModelChangeFP) (AccessBridge_PropertyTableModelChangeFP fp);
-
- typedef void (*ReleaseJavaObjectFP) (long vmID, Java_Object object);
-
- typedef BOOL (*GetVersionInfoFP) (long vmID, AccessBridgeVersionInfo *info);
-
- typedef BOOL (*IsJavaWindowFP) (HWND window);
- typedef BOOL (*IsSameObjectFP) (long vmID, JOBJECT64 obj1, JOBJECT64 obj2);
- typedef BOOL (*GetAccessibleContextFromHWNDFP) (HWND window, long *vmID, AccessibleContext *ac);
- typedef HWND (*getHWNDFromAccessibleContextFP) (long vmID, AccessibleContext ac);
-
- typedef BOOL (*GetAccessibleContextAtFP) (long vmID, AccessibleContext acParent,
- jint x, jint y, AccessibleContext *ac);
- typedef BOOL (*GetAccessibleContextWithFocusFP) (HWND window, long *vmID, AccessibleContext *ac);
- typedef BOOL (*GetAccessibleContextInfoFP) (long vmID, AccessibleContext ac, AccessibleContextInfo *info);
- typedef AccessibleContext (*GetAccessibleChildFromContextFP) (long vmID, AccessibleContext ac, jint i);
- typedef AccessibleContext (*GetAccessibleParentFromContextFP) (long vmID, AccessibleContext ac);
-
- /* begin AccessibleTable */
- typedef BOOL (*getAccessibleTableInfoFP) (long vmID, AccessibleContext ac, AccessibleTableInfo *tableInfo);
- typedef BOOL (*getAccessibleTableCellInfoFP) (long vmID, AccessibleTable accessibleTable,
- jint row, jint column, AccessibleTableCellInfo *tableCellInfo);
-
- typedef BOOL (*getAccessibleTableRowHeaderFP) (long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
- typedef BOOL (*getAccessibleTableColumnHeaderFP) (long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
-
- typedef AccessibleContext (*getAccessibleTableRowDescriptionFP) (long vmID, AccessibleContext acParent, jint row);
- typedef AccessibleContext (*getAccessibleTableColumnDescriptionFP) (long vmID, AccessibleContext acParent, jint column);
-
- typedef jint (*getAccessibleTableRowSelectionCountFP) (long vmID, AccessibleTable table);
- typedef BOOL (*isAccessibleTableRowSelectedFP) (long vmID, AccessibleTable table, jint row);
- typedef BOOL (*getAccessibleTableRowSelectionsFP) (long vmID, AccessibleTable table, jint count,
- jint *selections);
-
- typedef jint (*getAccessibleTableColumnSelectionCountFP) (long vmID, AccessibleTable table);
- typedef BOOL (*isAccessibleTableColumnSelectedFP) (long vmID, AccessibleTable table, jint column);
- typedef BOOL (*getAccessibleTableColumnSelectionsFP) (long vmID, AccessibleTable table, jint count,
- jint *selections);
-
- typedef jint (*getAccessibleTableRowFP) (long vmID, AccessibleTable table, jint index);
- typedef jint (*getAccessibleTableColumnFP) (long vmID, AccessibleTable table, jint index);
- typedef jint (*getAccessibleTableIndexFP) (long vmID, AccessibleTable table, jint row, jint column);
- /* end AccessibleTable */
-
- /* AccessibleRelationSet */
- typedef BOOL (*getAccessibleRelationSetFP) (long vmID, AccessibleContext accessibleContext,
- AccessibleRelationSetInfo *relationSetInfo);
-
- /* AccessibleHypertext */
- typedef BOOL (*getAccessibleHypertextFP)(long vmID, AccessibleContext accessibleContext,
- AccessibleHypertextInfo *hypertextInfo);
-
- typedef BOOL (*activateAccessibleHyperlinkFP)(long vmID, AccessibleContext accessibleContext,
- AccessibleHyperlink accessibleHyperlink);
-
- typedef jint (*getAccessibleHyperlinkCountFP)(const long vmID,
- const AccessibleContext accessibleContext);
-
- typedef BOOL (*getAccessibleHypertextExtFP) (const long vmID,
- const AccessibleContext accessibleContext,
- const jint nStartIndex,
- AccessibleHypertextInfo *hypertextInfo);
-
- typedef jint (*getAccessibleHypertextLinkIndexFP)(const long vmID,
- const AccessibleHypertext hypertext,
- const jint nIndex);
-
- typedef BOOL (*getAccessibleHyperlinkFP)(const long vmID,
- const AccessibleHypertext hypertext,
- const jint nIndex,
- AccessibleHyperlinkInfo *hyperlinkInfo);
-
-
- /* Accessible KeyBindings, Icons and Actions */
- typedef BOOL (*getAccessibleKeyBindingsFP)(long vmID, AccessibleContext accessibleContext,
- AccessibleKeyBindings *keyBindings);
-
- typedef BOOL (*getAccessibleIconsFP)(long vmID, AccessibleContext accessibleContext,
- AccessibleIcons *icons);
-
- typedef BOOL (*getAccessibleActionsFP)(long vmID, AccessibleContext accessibleContext,
- AccessibleActions *actions);
-
- typedef BOOL (*doAccessibleActionsFP)(long vmID, AccessibleContext accessibleContext,
- AccessibleActionsToDo *actionsToDo, jint *failure);
-
-
- /* AccessibleText */
-
- typedef BOOL (*GetAccessibleTextInfoFP) (long vmID, AccessibleText at, AccessibleTextInfo *textInfo, jint x, jint y);
- typedef BOOL (*GetAccessibleTextItemsFP) (long vmID, AccessibleText at, AccessibleTextItemsInfo *textItems, jint index);
- typedef BOOL (*GetAccessibleTextSelectionInfoFP) (long vmID, AccessibleText at, AccessibleTextSelectionInfo *textSelection);
- typedef BOOL (*GetAccessibleTextAttributesFP) (long vmID, AccessibleText at, jint index, AccessibleTextAttributesInfo *attributes);
- typedef BOOL (*GetAccessibleTextRectFP) (long vmID, AccessibleText at, AccessibleTextRectInfo *rectInfo, jint index);
- typedef BOOL (*GetAccessibleTextLineBoundsFP) (long vmID, AccessibleText at, jint index, jint *startIndex, jint *endIndex);
- typedef BOOL (*GetAccessibleTextRangeFP) (long vmID, AccessibleText at, jint start, jint end, wchar_t *text, short len);
-
- typedef BOOL (*GetCurrentAccessibleValueFromContextFP) (long vmID, AccessibleValue av, wchar_t *value, short len);
- typedef BOOL (*GetMaximumAccessibleValueFromContextFP) (long vmID, AccessibleValue av, wchar_t *value, short len);
- typedef BOOL (*GetMinimumAccessibleValueFromContextFP) (long vmID, AccessibleValue av, wchar_t *value, short len);
-
- typedef void (*AddAccessibleSelectionFromContextFP) (long vmID, AccessibleSelection as, int i);
- typedef void (*ClearAccessibleSelectionFromContextFP) (long vmID, AccessibleSelection as);
- typedef JOBJECT64 (*GetAccessibleSelectionFromContextFP) (long vmID, AccessibleSelection as, int i);
- typedef int (*GetAccessibleSelectionCountFromContextFP) (long vmID, AccessibleSelection as);
- typedef BOOL (*IsAccessibleChildSelectedFromContextFP) (long vmID, AccessibleSelection as, int i);
- typedef void (*RemoveAccessibleSelectionFromContextFP) (long vmID, AccessibleSelection as, int i);
- typedef void (*SelectAllAccessibleSelectionFromContextFP) (long vmID, AccessibleSelection as);
-
- /* Utility methods */
-
- typedef BOOL (*setTextContentsFP) (const long vmID, const AccessibleContext ac, const wchar_t *text);
- typedef AccessibleContext (*getParentWithRoleFP) (const long vmID, const AccessibleContext ac, const wchar_t *role);
- typedef AccessibleContext (*getParentWithRoleElseRootFP) (const long vmID, const AccessibleContext ac, const wchar_t *role);
- typedef AccessibleContext (*getTopLevelObjectFP) (const long vmID, const AccessibleContext ac);
- typedef int (*getObjectDepthFP) (const long vmID, const AccessibleContext ac);
- typedef AccessibleContext (*getActiveDescendentFP) (const long vmID, const AccessibleContext ac);
-
-
- typedef BOOL (*getVirtualAccessibleNameFP) (const long vmID, const AccessibleContext accessibleContext,
- wchar_t *name, int len);
-
- typedef BOOL (*requestFocusFP) (const long vmID, const AccessibleContext accessibleContext);
-
- typedef BOOL (*selectTextRangeFP) (const long vmID, const AccessibleContext accessibleContext,
- const int startIndex, const int endIndex);
-
- typedef BOOL (*getTextAttributesInRangeFP) (const long vmID, const AccessibleContext accessibleContext,
- const int startIndex, const int endIndex,
- AccessibleTextAttributesInfo *attributes, short *len);
-
- typedef int (*getVisibleChildrenCountFP) (const long vmID, const AccessibleContext accessibleContext);
-
- typedef BOOL (*getVisibleChildrenFP) (const long vmID, const AccessibleContext accessibleContext,
- const int startIndex, VisibleChildrenInfo *children);
-
- typedef BOOL (*setCaretPositionFP) (const long vmID, const AccessibleContext accessibleContext, const int position);
-
- typedef BOOL (*getCaretLocationFP) (long vmID, AccessibleContext ac, AccessibleTextRectInfo *rectInfo, jint index);
-
- typedef int (*getEventsWaitingFP) ();
-
- typedef struct AccessBridgeFPsTag {
- Windows_runFP Windows_run;
-
- SetPropertyChangeFP SetPropertyChange;
-
- SetJavaShutdownFP SetJavaShutdown;
- SetFocusGainedFP SetFocusGained;
- SetFocusLostFP SetFocusLost;
-
- SetCaretUpdateFP SetCaretUpdate;
-
- SetMouseClickedFP SetMouseClicked;
- SetMouseEnteredFP SetMouseEntered;
- SetMouseExitedFP SetMouseExited;
- SetMousePressedFP SetMousePressed;
- SetMouseReleasedFP SetMouseReleased;
-
- SetMenuCanceledFP SetMenuCanceled;
- SetMenuDeselectedFP SetMenuDeselected;
- SetMenuSelectedFP SetMenuSelected;
- SetPopupMenuCanceledFP SetPopupMenuCanceled;
- SetPopupMenuWillBecomeInvisibleFP SetPopupMenuWillBecomeInvisible;
- SetPopupMenuWillBecomeVisibleFP SetPopupMenuWillBecomeVisible;
-
- SetPropertyNameChangeFP SetPropertyNameChange;
- SetPropertyDescriptionChangeFP SetPropertyDescriptionChange;
- SetPropertyStateChangeFP SetPropertyStateChange;
- SetPropertyValueChangeFP SetPropertyValueChange;
- SetPropertySelectionChangeFP SetPropertySelectionChange;
- SetPropertyTextChangeFP SetPropertyTextChange;
- SetPropertyCaretChangeFP SetPropertyCaretChange;
- SetPropertyVisibleDataChangeFP SetPropertyVisibleDataChange;
- SetPropertyChildChangeFP SetPropertyChildChange;
- SetPropertyActiveDescendentChangeFP SetPropertyActiveDescendentChange;
-
- SetPropertyTableModelChangeFP SetPropertyTableModelChange;
-
- ReleaseJavaObjectFP ReleaseJavaObject;
- GetVersionInfoFP GetVersionInfo;
-
- IsJavaWindowFP IsJavaWindow;
- IsSameObjectFP IsSameObject;
- GetAccessibleContextFromHWNDFP GetAccessibleContextFromHWND;
- getHWNDFromAccessibleContextFP getHWNDFromAccessibleContext;
-
- GetAccessibleContextAtFP GetAccessibleContextAt;
- GetAccessibleContextWithFocusFP GetAccessibleContextWithFocus;
- GetAccessibleContextInfoFP GetAccessibleContextInfo;
- GetAccessibleChildFromContextFP GetAccessibleChildFromContext;
- GetAccessibleParentFromContextFP GetAccessibleParentFromContext;
-
- getAccessibleTableInfoFP getAccessibleTableInfo;
- getAccessibleTableCellInfoFP getAccessibleTableCellInfo;
-
- getAccessibleTableRowHeaderFP getAccessibleTableRowHeader;
- getAccessibleTableColumnHeaderFP getAccessibleTableColumnHeader;
-
- getAccessibleTableRowDescriptionFP getAccessibleTableRowDescription;
- getAccessibleTableColumnDescriptionFP getAccessibleTableColumnDescription;
-
- getAccessibleTableRowSelectionCountFP getAccessibleTableRowSelectionCount;
- isAccessibleTableRowSelectedFP isAccessibleTableRowSelected;
- getAccessibleTableRowSelectionsFP getAccessibleTableRowSelections;
-
- getAccessibleTableColumnSelectionCountFP getAccessibleTableColumnSelectionCount;
- isAccessibleTableColumnSelectedFP isAccessibleTableColumnSelected;
- getAccessibleTableColumnSelectionsFP getAccessibleTableColumnSelections;
-
- getAccessibleTableRowFP getAccessibleTableRow;
- getAccessibleTableColumnFP getAccessibleTableColumn;
- getAccessibleTableIndexFP getAccessibleTableIndex;
-
- getAccessibleRelationSetFP getAccessibleRelationSet;
-
- getAccessibleHypertextFP getAccessibleHypertext;
- activateAccessibleHyperlinkFP activateAccessibleHyperlink;
- getAccessibleHyperlinkCountFP getAccessibleHyperlinkCount;
- getAccessibleHypertextExtFP getAccessibleHypertextExt;
- getAccessibleHypertextLinkIndexFP getAccessibleHypertextLinkIndex;
- getAccessibleHyperlinkFP getAccessibleHyperlink;
-
- getAccessibleKeyBindingsFP getAccessibleKeyBindings;
- getAccessibleIconsFP getAccessibleIcons;
- getAccessibleActionsFP getAccessibleActions;
- doAccessibleActionsFP doAccessibleActions;
-
- GetAccessibleTextInfoFP GetAccessibleTextInfo;
- GetAccessibleTextItemsFP GetAccessibleTextItems;
- GetAccessibleTextSelectionInfoFP GetAccessibleTextSelectionInfo;
- GetAccessibleTextAttributesFP GetAccessibleTextAttributes;
- GetAccessibleTextRectFP GetAccessibleTextRect;
- GetAccessibleTextLineBoundsFP GetAccessibleTextLineBounds;
- GetAccessibleTextRangeFP GetAccessibleTextRange;
-
- GetCurrentAccessibleValueFromContextFP GetCurrentAccessibleValueFromContext;
- GetMaximumAccessibleValueFromContextFP GetMaximumAccessibleValueFromContext;
- GetMinimumAccessibleValueFromContextFP GetMinimumAccessibleValueFromContext;
-
- AddAccessibleSelectionFromContextFP AddAccessibleSelectionFromContext;
- ClearAccessibleSelectionFromContextFP ClearAccessibleSelectionFromContext;
- GetAccessibleSelectionFromContextFP GetAccessibleSelectionFromContext;
- GetAccessibleSelectionCountFromContextFP GetAccessibleSelectionCountFromContext;
- IsAccessibleChildSelectedFromContextFP IsAccessibleChildSelectedFromContext;
- RemoveAccessibleSelectionFromContextFP RemoveAccessibleSelectionFromContext;
- SelectAllAccessibleSelectionFromContextFP SelectAllAccessibleSelectionFromContext;
-
- setTextContentsFP setTextContents;
- getParentWithRoleFP getParentWithRole;
- getTopLevelObjectFP getTopLevelObject;
- getParentWithRoleElseRootFP getParentWithRoleElseRoot;
- getObjectDepthFP getObjectDepth;
- getActiveDescendentFP getActiveDescendent;
-
- getVirtualAccessibleNameFP getVirtualAccessibleName;
- requestFocusFP requestFocus;
- selectTextRangeFP selectTextRange;
- getTextAttributesInRangeFP getTextAttributesInRange;
- getVisibleChildrenCountFP getVisibleChildrenCount;
- getVisibleChildrenFP getVisibleChildren;
- setCaretPositionFP setCaretPosition;
- getCaretLocationFP getCaretLocation;
-
- getEventsWaitingFP getEventsWaiting;
-
- } AccessBridgeFPs;
-
-
- /**
- * Initialize the world
- */
- BOOL initializeAccessBridge();
- BOOL shutdownAccessBridge();
-
- /**
- * Window routines
- */
- BOOL IsJavaWindow(HWND window);
-
- // Returns the virtual machine ID and AccessibleContext for a top-level window
- BOOL GetAccessibleContextFromHWND(HWND target, long *vmID, AccessibleContext *ac);
-
- // Returns the HWND from the AccessibleContext of a top-level window
- HWND getHWNDFromAccessibleContext(long vmID, AccessibleContext ac);
-
-
- /**
- * Event handling routines
- */
- void SetJavaShutdown(AccessBridge_JavaShutdownFP fp);
- void SetFocusGained(AccessBridge_FocusGainedFP fp);
- void SetFocusLost(AccessBridge_FocusLostFP fp);
-
- void SetCaretUpdate(AccessBridge_CaretUpdateFP fp);
-
- void SetMouseClicked(AccessBridge_MouseClickedFP fp);
- void SetMouseEntered(AccessBridge_MouseEnteredFP fp);
- void SetMouseExited(AccessBridge_MouseExitedFP fp);
- void SetMousePressed(AccessBridge_MousePressedFP fp);
- void SetMouseReleased(AccessBridge_MouseReleasedFP fp);
-
- void SetMenuCanceled(AccessBridge_MenuCanceledFP fp);
- void SetMenuDeselected(AccessBridge_MenuDeselectedFP fp);
- void SetMenuSelected(AccessBridge_MenuSelectedFP fp);
- void SetPopupMenuCanceled(AccessBridge_PopupMenuCanceledFP fp);
- void SetPopupMenuWillBecomeInvisible(AccessBridge_PopupMenuWillBecomeInvisibleFP fp);
- void SetPopupMenuWillBecomeVisible(AccessBridge_PopupMenuWillBecomeVisibleFP fp);
-
- void SetPropertyNameChange(AccessBridge_PropertyNameChangeFP fp);
- void SetPropertyDescriptionChange(AccessBridge_PropertyDescriptionChangeFP fp);
- void SetPropertyStateChange(AccessBridge_PropertyStateChangeFP fp);
- void SetPropertyValueChange(AccessBridge_PropertyValueChangeFP fp);
- void SetPropertySelectionChange(AccessBridge_PropertySelectionChangeFP fp);
- void SetPropertyTextChange(AccessBridge_PropertyTextChangeFP fp);
- void SetPropertyCaretChange(AccessBridge_PropertyCaretChangeFP fp);
- void SetPropertyVisibleDataChange(AccessBridge_PropertyVisibleDataChangeFP fp);
- void SetPropertyChildChange(AccessBridge_PropertyChildChangeFP fp);
- void SetPropertyActiveDescendentChange(AccessBridge_PropertyActiveDescendentChangeFP fp);
-
- void SetPropertyTableModelChange(AccessBridge_PropertyTableModelChangeFP fp);
-
-
- /**
- * General routines
- */
- void ReleaseJavaObject(long vmID, Java_Object object);
- BOOL GetVersionInfo(long vmID, AccessBridgeVersionInfo *info);
- HWND GetHWNDFromAccessibleContext(long vmID, JOBJECT64 accesibleContext);
-
- /**
- * Accessible Context routines
- */
- BOOL GetAccessibleContextAt(long vmID, AccessibleContext acParent,
- jint x, jint y, AccessibleContext *ac);
- BOOL GetAccessibleContextWithFocus(HWND window, long *vmID, AccessibleContext *ac);
- BOOL GetAccessibleContextInfo(long vmID, AccessibleContext ac, AccessibleContextInfo *info);
- AccessibleContext GetAccessibleChildFromContext(long vmID, AccessibleContext ac, jint index);
- AccessibleContext GetAccessibleParentFromContext(long vmID, AccessibleContext ac);
-
- /**
- * Accessible Text routines
- */
- BOOL GetAccessibleTextInfo(long vmID, AccessibleText at, AccessibleTextInfo *textInfo, jint x, jint y);
- BOOL GetAccessibleTextItems(long vmID, AccessibleText at, AccessibleTextItemsInfo *textItems, jint index);
- BOOL GetAccessibleTextSelectionInfo(long vmID, AccessibleText at, AccessibleTextSelectionInfo *textSelection);
- BOOL GetAccessibleTextAttributes(long vmID, AccessibleText at, jint index, AccessibleTextAttributesInfo *attributes);
- BOOL GetAccessibleTextRect(long vmID, AccessibleText at, AccessibleTextRectInfo *rectInfo, jint index);
- BOOL GetAccessibleTextLineBounds(long vmID, AccessibleText at, jint index, jint *startIndex, jint *endIndex);
- BOOL GetAccessibleTextRange(long vmID, AccessibleText at, jint start, jint end, wchar_t *text, short len);
-
- /* begin AccessibleTable routines */
- BOOL getAccessibleTableInfo(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
-
- BOOL getAccessibleTableCellInfo(long vmID, AccessibleTable accessibleTable, jint row, jint column,
- AccessibleTableCellInfo *tableCellInfo);
-
- BOOL getAccessibleTableRowHeader(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
- BOOL getAccessibleTableColumnHeader(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
-
- AccessibleContext getAccessibleTableRowDescription(long vmID, AccessibleContext acParent, jint row);
- AccessibleContext getAccessibleTableColumnDescription(long vmID, AccessibleContext acParent, jint column);
-
- jint getAccessibleTableRowSelectionCount(long vmID, AccessibleTable table);
- BOOL isAccessibleTableRowSelected(long vmID, AccessibleTable table, jint row);
- BOOL getAccessibleTableRowSelections(long vmID, AccessibleTable table, jint count, jint *selections);
-
- jint getAccessibleTableColumnSelectionCount(long vmID, AccessibleTable table);
- BOOL isAccessibleTableColumnSelected(long vmID, AccessibleTable table, jint column);
- BOOL getAccessibleTableColumnSelections(long vmID, AccessibleTable table, jint count, jint *selections);
-
- jint getAccessibleTableRow(long vmID, AccessibleTable table, jint index);
- jint getAccessibleTableColumn(long vmID, AccessibleTable table, jint index);
- jint getAccessibleTableIndex(long vmID, AccessibleTable table, jint row, jint column);
- /* end AccessibleTable */
-
- /* ----- AccessibleRelationSet routines */
- BOOL getAccessibleRelationSet(long vmID, AccessibleContext accessibleContext,
- AccessibleRelationSetInfo *relationSetInfo);
-
- /* ----- AccessibleHypertext routines */
-
- /*
- * Returns hypertext information associated with a component.
- */
- BOOL getAccessibleHypertext(long vmID, AccessibleContext accessibleContext,
- AccessibleHypertextInfo *hypertextInfo);
-
- /*
- * Requests that a hyperlink be activated.
- */
- BOOL activateAccessibleHyperlink(long vmID, AccessibleContext accessibleContext,
- AccessibleHyperlink accessibleHyperlink);
-
- /*
- * Returns the number of hyperlinks in a component
- * Maps to AccessibleHypertext.getLinkCount.
- * Returns -1 on error.
- */
- jint getAccessibleHyperlinkCount(const long vmID,
- const AccessibleHypertext hypertext);
-
- /*
- * This method is used to iterate through the hyperlinks in a component. It
- * returns hypertext information for a component starting at hyperlink index
- * nStartIndex. No more than MAX_HYPERLINKS AccessibleHypertextInfo objects will
- * be returned for each call to this method.
- * Returns FALSE on error.
- */
- BOOL getAccessibleHypertextExt(const long vmID,
- const AccessibleContext accessibleContext,
- const jint nStartIndex,
- /* OUT */ AccessibleHypertextInfo *hypertextInfo);
-
- /*
- * Returns the index into an array of hyperlinks that is associated with
- * a character index in document; maps to AccessibleHypertext.getLinkIndex
- * Returns -1 on error.
- */
- jint getAccessibleHypertextLinkIndex(const long vmID,
- const AccessibleHypertext hypertext,
- const jint nIndex);
-
- /*
- * Returns the nth hyperlink in a document
- * Maps to AccessibleHypertext.getLink.
- * Returns FALSE on error
- */
- BOOL getAccessibleHyperlink(const long vmID,
- const AccessibleHypertext hypertext,
- const jint nIndex,
- /* OUT */ AccessibleHyperlinkInfo *hyperlinkInfo);
-
- /* Accessible KeyBindings, Icons and Actions */
-
- /*
- * Returns a list of key bindings associated with a component.
- */
- BOOL getAccessibleKeyBindings(long vmID, AccessibleContext accessibleContext,
- AccessibleKeyBindings *keyBindings);
-
- /*
- * Returns a list of icons associate with a component.
- */
- BOOL getAccessibleIcons(long vmID, AccessibleContext accessibleContext,
- AccessibleIcons *icons);
-
- /*
- * Returns a list of actions that a component can perform.
- */
- BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext,
- AccessibleActions *actions);
-
- /*
- * Request that a list of AccessibleActions be performed by a component.
- * Returns TRUE if all actions are performed. Returns FALSE
- * when the first requested action fails in which case "failure"
- * contains the index of the action that failed.
- */
- BOOL doAccessibleActions(long vmID, AccessibleContext accessibleContext,
- AccessibleActionsToDo *actionsToDo, jint *failure);
-
-
-
- /* Additional utility methods */
-
- /*
- * Returns whether two object references refer to the same object.
- */
- BOOL IsSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2);
-
- /**
- * Sets editable text contents. The AccessibleContext must implement AccessibleEditableText and
- * be editable. The maximum text length that can be set is MAX_STRING_SIZE - 1.
- * Returns whether successful
- */
- BOOL setTextContents (const long vmID, const AccessibleContext accessibleContext, const wchar_t *text);
-
- /**
- * Returns the Accessible Context with the specified role that is the
- * ancestor of a given object. The role is one of the role strings
- * defined in AccessBridgePackages.h
- * If there is no ancestor object that has the specified role,
- * returns (AccessibleContext)0.
- */
- AccessibleContext getParentWithRole (const long vmID, const AccessibleContext accessibleContext,
- const wchar_t *role);
-
- /**
- * Returns the Accessible Context with the specified role that is the
- * ancestor of a given object. The role is one of the role strings
- * defined in AccessBridgePackages.h. If an object with the specified
- * role does not exist, returns the top level object for the Java Window.
- * Returns (AccessibleContext)0 on error.
- */
- AccessibleContext getParentWithRoleElseRoot (const long vmID, const AccessibleContext accessibleContext,
- const wchar_t *role);
-
- /**
- * Returns the Accessible Context for the top level object in
- * a Java Window. This is same Accessible Context that is obtained
- * from GetAccessibleContextFromHWND for that window. Returns
- * (AccessibleContext)0 on error.
- */
- AccessibleContext getTopLevelObject (const long vmID, const AccessibleContext accessibleContext);
-
- /**
- * Returns how deep in the object hierarchy a given object is.
- * The top most object in the object hierarchy has an object depth of 0.
- * Returns -1 on error.
- */
- int getObjectDepth (const long vmID, const AccessibleContext accessibleContext);
-
- /**
- * Returns the Accessible Context of the current ActiveDescendent of an object.
- * This method assumes the ActiveDescendent is the component that is currently
- * selected in a container object.
- * Returns (AccessibleContext)0 on error or if there is no selection.
- */
- AccessibleContext getActiveDescendent (const long vmID, const AccessibleContext accessibleContext);
-
- /**
- /**
- * Accessible Value routines
- */
- BOOL GetCurrentAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len);
- BOOL GetMaximumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len);
- BOOL GetMinimumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len);
-
- /**
- * Accessible Selection routines
- */
- void AddAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);
- void ClearAccessibleSelectionFromContext(long vmID, AccessibleSelection as);
- JOBJECT64 GetAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);
- int GetAccessibleSelectionCountFromContext(long vmID, AccessibleSelection as);
- BOOL IsAccessibleChildSelectedFromContext(long vmID, AccessibleSelection as, int i);
- void RemoveAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);
- void SelectAllAccessibleSelectionFromContext(long vmID, AccessibleSelection as);
-
- /**
- * Additional methods for Teton
- */
-
- /**
- * Gets the AccessibleName for a component based upon the JAWS algorithm. Returns
- * whether successful.
- *
- * Bug ID 4916682 - Implement JAWS AccessibleName policy
- */
- BOOL getVirtualAccessibleName(const long vmID, const AccessibleContext accessibleContext,
- wchar_t *name, int len);
-
- /**
- * Request focus for a component. Returns whether successful.
- *
- * Bug ID 4944757 - requestFocus method needed
- */
- BOOL requestFocus(const long vmID, const AccessibleContext accessibleContext);
-
- /**
- * Selects text between two indices. Selection includes the text at the start index
- * and the text at the end index. Returns whether successful.
- *
- * Bug ID 4944758 - selectTextRange method needed
- */
- BOOL selectTextRange(const long vmID, const AccessibleContext accessibleContext, const int startIndex,
- const int endIndex);
-
- /**
- * Get text attributes between two indices. The attribute list includes the text at the
- * start index and the text at the end index. Returns whether successful;
- *
- * Bug ID 4944761 - getTextAttributes between two indices method needed
- */
- BOOL getTextAttributesInRange(const long vmID, const AccessibleContext accessibleContext,
- const int startIndex, const int endIndex,
- AccessibleTextAttributesInfo *attributes, short *len);
-
- /**
- * Returns the number of visible children of a component. Returns -1 on error.
- *
- * Bug ID 4944762- getVisibleChildren for list-like components needed
- */
- int getVisibleChildrenCount(const long vmID, const AccessibleContext accessibleContext);
-
- /**
- * Gets the visible children of an AccessibleContext. Returns whether successful.
- *
- * Bug ID 4944762- getVisibleChildren for list-like components needed
- */
- BOOL getVisibleChildren(const long vmID, const AccessibleContext accessibleContext,
- const int startIndex,
- VisibleChildrenInfo *visibleChildrenInfo);
-
- /**
- * Set the caret to a text position. Returns whether successful.
- *
- * Bug ID 4944770 - setCaretPosition method needed
- */
- BOOL setCaretPosition(const long vmID, const AccessibleContext accessibleContext,
- const int position);
-
- /**
- * Gets the text caret location
- */
- BOOL getCaretLocation(long vmID, AccessibleContext ac,
- AccessibleTextRectInfo *rectInfo, jint index);
-
- /**
- * Gets the number of events waiting to fire
- */
- int getEventsWaiting();
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/jni/windows/win32/bridge/AccessBridgePackages.h b/jni/windows/win32/bridge/AccessBridgePackages.h
deleted file mode 100644
index 1b2fc71..0000000
--- a/jni/windows/win32/bridge/AccessBridgePackages.h
+++ /dev/null
@@ -1,2215 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/*
- * Header file for packages of paramaters passed between Java Accessibility
- * and native Assistive Technologies
- */
-
-#ifndef __AccessBridgePackages_H__
-#define __AccessBridgePackages_H__
-
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef ACCESSBRIDGE_ARCH_LEGACY
-typedef jobject JOBJECT64;
-typedef HWND ABHWND64;
-#define ABHandleToLong
-#define ABLongToHandle
-#else
-typedef jlong JOBJECT64;
-typedef long ABHWND64;
-#define ABHandleToLong HandleToLong
-#define ABLongToHandle LongToHandle
-#endif
-
-#define MAX_BUFFER_SIZE 10240
-#define MAX_STRING_SIZE 1024
-#define SHORT_STRING_SIZE 256
-
- // object types
- typedef JOBJECT64 AccessibleContext;
- typedef JOBJECT64 AccessibleText;
- typedef JOBJECT64 AccessibleValue;
- typedef JOBJECT64 AccessibleSelection;
- typedef JOBJECT64 Java_Object;
- typedef JOBJECT64 PropertyChangeEvent;
- typedef JOBJECT64 FocusEvent;
- typedef JOBJECT64 CaretEvent;
- typedef JOBJECT64 MouseEvent;
- typedef JOBJECT64 MenuEvent;
- typedef JOBJECT64 AccessibleTable;
- typedef JOBJECT64 AccessibleHyperlink;
- typedef JOBJECT64 AccessibleHypertext;
-
- /**
- ******************************************************
- * Java event types
- ******************************************************
- */
-
-#define cPropertyChangeEvent (jlong) 1 // 1
-#define cFocusGainedEvent (jlong) 2 // 2
-#define cFocusLostEvent (jlong) 4 // 4
-#define cCaretUpdateEvent (jlong) 8 // 8
-#define cMouseClickedEvent (jlong) 16 // 10
-#define cMouseEnteredEvent (jlong) 32 // 20
-#define cMouseExitedEvent (jlong) 64 // 40
-#define cMousePressedEvent (jlong) 128 // 80
-#define cMouseReleasedEvent (jlong) 256 // 100
-#define cMenuCanceledEvent (jlong) 512 // 200
-#define cMenuDeselectedEvent (jlong) 1024 // 400
-#define cMenuSelectedEvent (jlong) 2048 // 800
-#define cPopupMenuCanceledEvent (jlong) 4096 // 1000
-#define cPopupMenuWillBecomeInvisibleEvent (jlong) 8192 // 2000
-#define cPopupMenuWillBecomeVisibleEvent (jlong) 16384 // 4000
-#define cJavaShutdownEvent (jlong) 32768 // 8000
-
- /**
- ******************************************************
- * Accessible Roles
- * Defines all AccessibleRoles in Local.US
- ******************************************************
- */
-
- /**
- * Object is used to alert the user about something.
- */
-#define ACCESSIBLE_ALERT L"alert"
-
- /**
- * The header for a column of data.
- */
-#define ACCESSIBLE_COLUMN_HEADER L"column header"
-
- /**
- * Object that can be drawn into and is used to trap
- * events.
- * see ACCESSIBLE_FRAME
- * see ACCESSIBLE_GLASS_PANE
- * see ACCESSIBLE_LAYERED_PANE
- */
-#define ACCESSIBLE_CANVAS L"canvas"
-
- /**
- * A list of choices the user can select from. Also optionally
- * allows the user to enter a choice of their own.
- */
-#define ACCESSIBLE_COMBO_BOX L"combo box"
-
- /**
- * An iconified internal frame in a DESKTOP_PANE.
- * see ACCESSIBLE_DESKTOP_PANE
- * see ACCESSIBLE_INTERNAL_FRAME
- */
-#define ACCESSIBLE_DESKTOP_ICON L"desktop icon"
-
- /**
- * A frame-like object that is clipped by a desktop pane. The
- * desktop pane, internal frame, and desktop icon objects are
- * often used to create multiple document interfaces within an
- * application.
- * see ACCESSIBLE_DESKTOP_ICON
- * see ACCESSIBLE_DESKTOP_PANE
- * see ACCESSIBLE_FRAME
- */
-#define ACCESSIBLE_INTERNAL_FRAME L"internal frame"
-
- /**
- * A pane that supports internal frames and
- * iconified versions of those internal frames.
- * see ACCESSIBLE_DESKTOP_ICON
- * see ACCESSIBLE_INTERNAL_FRAME
- */
-#define ACCESSIBLE_DESKTOP_PANE L"desktop pane"
-
- /**
- * A specialized pane whose primary use is inside a DIALOG
- * see ACCESSIBLE_DIALOG
- */
-#define ACCESSIBLE_OPTION_PANE L"option pane"
-
- /**
- * A top level window with no title or border.
- * see ACCESSIBLE_FRAME
- * see ACCESSIBLE_DIALOG
- */
-#define ACCESSIBLE_WINDOW L"window"
-
- /**
- * A top level window with a title bar, border, menu bar, etc. It is
- * often used as the primary window for an application.
- * see ACCESSIBLE_DIALOG
- * see ACCESSIBLE_CANVAS
- * see ACCESSIBLE_WINDOW
- */
-#define ACCESSIBLE_FRAME L"frame"
-
- /**
- * A top level window with title bar and a border. A dialog is similar
- * to a frame, but it has fewer properties and is often used as a
- * secondary window for an application.
- * see ACCESSIBLE_FRAME
- * see ACCESSIBLE_WINDOW
- */
-#define ACCESSIBLE_DIALOG L"dialog"
-
- /**
- * A specialized dialog that lets the user choose a color.
- */
-#define ACCESSIBLE_COLOR_CHOOSER L"color chooser"
-
-
- /**
- * A pane that allows the user to navigate through
- * and select the contents of a directory. May be used
- * by a file chooser.
- * see ACCESSIBLE_FILE_CHOOSER
- */
-#define ACCESSIBLE_DIRECTORY_PANE L"directory pane"
-
- /**
- * A specialized dialog that displays the files in the directory
- * and lets the user select a file, browse a different directory,
- * or specify a filename. May use the directory pane to show the
- * contents of a directory.
- * see ACCESSIBLE_DIRECTORY_PANE
- */
-#define ACCESSIBLE_FILE_CHOOSER L"file chooser"
-
- /**
- * An object that fills up space in a user interface. It is often
- * used in interfaces to tweak the spacing between components,
- * but serves no other purpose.
- */
-#define ACCESSIBLE_FILLER L"filler"
-
- /**
- * A hypertext anchor
- */
-#define ACCESSIBLE_HYPERLINK L"hyperlink"
-
- /**
- * A small fixed size picture, typically used to decorate components.
- */
-#define ACCESSIBLE_ICON L"icon"
-
- /**
- * An object used to present an icon or short string in an interface.
- */
-#define ACCESSIBLE_LABEL L"label"
-
- /**
- * A specialized pane that has a glass pane and a layered pane as its
- * children.
- * see ACCESSIBLE_GLASS_PANE
- * see ACCESSIBLE_LAYERED_PANE
- */
-#define ACCESSIBLE_ROOT_PANE L"root pane"
-
- /**
- * A pane that is guaranteed to be painted on top
- * of all panes beneath it.
- * see ACCESSIBLE_ROOT_PANE
- * see ACCESSIBLE_CANVAS
- */
-#define ACCESSIBLE_GLASS_PANE L"glass pane"
-
- /**
- * A specialized pane that allows its children to be drawn in layers,
- * providing a form of stacking order. This is usually the pane that
- * holds the menu bar as well as the pane that contains most of the
- * visual components in a window.
- * see ACCESSIBLE_GLASS_PANE
- * see ACCESSIBLE_ROOT_PANE
- */
-#define ACCESSIBLE_LAYERED_PANE L"layered pane"
-
- /**
- * An object that presents a list of objects to the user and allows the
- * user to select one or more of them. A list is usually contained
- * within a scroll pane.
- * see ACCESSIBLE_SCROLL_PANE
- * see ACCESSIBLE_LIST_ITEM
- */
-#define ACCESSIBLE_LIST L"list"
-
- /**
- * An object that presents an element in a list. A list is usually
- * contained within a scroll pane.
- * see ACCESSIBLE_SCROLL_PANE
- * see ACCESSIBLE_LIST
- */
-#define ACCESSIBLE_LIST_ITEM L"list item"
-
- /**
- * An object usually drawn at the top of the primary dialog box of
- * an application that contains a list of menus the user can choose
- * from. For example, a menu bar might contain menus for "File,"
- * "Edit," and "Help."
- * see ACCESSIBLE_MENU
- * see ACCESSIBLE_POPUP_MENU
- * see ACCESSIBLE_LAYERED_PANE
- */
-#define ACCESSIBLE_MENU_BAR L"menu bar"
-
- /**
- * A temporary window that is usually used to offer the user a
- * list of choices, and then hides when the user selects one of
- * those choices.
- * see ACCESSIBLE_MENU
- * see ACCESSIBLE_MENU_ITEM
- */
-#define ACCESSIBLE_POPUP_MENU L"popup menu"
-
- /**
- * An object usually found inside a menu bar that contains a list
- * of actions the user can choose from. A menu can have any object
- * as its children, but most often they are menu items, other menus,
- * or rudimentary objects such as radio buttons, check boxes, or
- * separators. For example, an application may have an "Edit" menu
- * that contains menu items for "Cut" and "Paste."
- * see ACCESSIBLE_MENU_BAR
- * see ACCESSIBLE_MENU_ITEM
- * see ACCESSIBLE_SEPARATOR
- * see ACCESSIBLE_RADIO_BUTTON
- * see ACCESSIBLE_CHECK_BOX
- * see ACCESSIBLE_POPUP_MENU
- */
-#define ACCESSIBLE_MENU L"menu"
-
- /**
- * An object usually contained in a menu that presents an action
- * the user can choose. For example, the "Cut" menu item in an
- * "Edit" menu would be an action the user can select to cut the
- * selected area of text in a document.
- * see ACCESSIBLE_MENU_BAR
- * see ACCESSIBLE_SEPARATOR
- * see ACCESSIBLE_POPUP_MENU
- */
-#define ACCESSIBLE_MENU_ITEM L"menu item"
-
- /**
- * An object usually contained in a menu to provide a visual
- * and logical separation of the contents in a menu. For example,
- * the "File" menu of an application might contain menu items for
- * "Open," "Close," and "Exit," and will place a separator between
- * "Close" and "Exit" menu items.
- * see ACCESSIBLE_MENU
- * see ACCESSIBLE_MENU_ITEM
- */
-#define ACCESSIBLE_SEPARATOR L"separator"
-
- /**
- * An object that presents a series of panels (or page tabs), one at a
- * time, through some mechanism provided by the object. The most common
- * mechanism is a list of tabs at the top of the panel. The children of
- * a page tab list are all page tabs.
- * see ACCESSIBLE_PAGE_TAB
- */
-#define ACCESSIBLE_PAGE_TAB_LIST L"page tab list"
-
- /**
- * An object that is a child of a page tab list. Its sole child is
- * the panel that is to be presented to the user when the user
- * selects the page tab from the list of tabs in the page tab list.
- * see ACCESSIBLE_PAGE_TAB_LIST
- */
-#define ACCESSIBLE_PAGE_TAB L"page tab"
-
- /**
- * A generic container that is often used to group objects.
- */
-#define ACCESSIBLE_PANEL L"panel"
-
- /**
- * An object used to indicate how much of a task has been completed.
- */
-#define ACCESSIBLE_PROGRESS_BAR L"progress bar"
-
- /**
- * A text object used for passwords, or other places where the
- * text contents is not shown visibly to the user
- */
-#define ACCESSIBLE_PASSWORD_TEXT L"password text"
-
- /**
- * An object the user can manipulate to tell the application to do
- * something.
- * see ACCESSIBLE_CHECK_BOX
- * see ACCESSIBLE_TOGGLE_BUTTON
- * see ACCESSIBLE_RADIO_BUTTON
- */
-#define ACCESSIBLE_PUSH_BUTTON L"push button"
-
- /**
- * A specialized push button that can be checked or unchecked, but
- * does not provide a separate indicator for the current state.
- * see ACCESSIBLE_PUSH_BUTTON
- * see ACCESSIBLE_CHECK_BOX
- * see ACCESSIBLE_RADIO_BUTTON
- */
-#define ACCESSIBLE_TOGGLE_BUTTON L"toggle button"
-
- /**
- * A choice that can be checked or unchecked and provides a
- * separate indicator for the current state.
- * see ACCESSIBLE_PUSH_BUTTON
- * see ACCESSIBLE_TOGGLE_BUTTON
- * see ACCESSIBLE_RADIO_BUTTON
- */
-#define ACCESSIBLE_CHECK_BOX L"check box"
-
- /**
- * A specialized check box that will cause other radio buttons in the
- * same group to become unchecked when this one is checked.
- * see ACCESSIBLE_PUSH_BUTTON
- * see ACCESSIBLE_TOGGLE_BUTTON
- * see ACCESSIBLE_CHECK_BOX
- */
-#define ACCESSIBLE_RADIO_BUTTON L"radio button"
-
- /**
- * The header for a row of data.
- */
-#define ACCESSIBLE_ROW_HEADER L"row header"
-
- /**
- * An object that allows a user to incrementally view a large amount
- * of information. Its children can include scroll bars and a viewport.
- * see ACCESSIBLE_SCROLL_BAR
- * see ACCESSIBLE_VIEWPORT
- */
-#define ACCESSIBLE_SCROLL_PANE L"scroll pane"
-
- /**
- * An object usually used to allow a user to incrementally view a
- * large amount of data. Usually used only by a scroll pane.
- * see ACCESSIBLE_SCROLL_PANE
- */
-#define ACCESSIBLE_SCROLL_BAR L"scroll bar"
-
- /**
- * An object usually used in a scroll pane. It represents the portion
- * of the entire data that the user can see. As the user manipulates
- * the scroll bars, the contents of the viewport can change.
- * see ACCESSIBLE_SCROLL_PANE
- */
-#define ACCESSIBLE_VIEWPORT L"viewport"
-
- /**
- * An object that allows the user to select from a bounded range. For
- * example, a slider might be used to select a number between 0 and 100.
- */
-#define ACCESSIBLE_SLIDER L"slider"
-
- /**
- * A specialized panel that presents two other panels at the same time.
- * Between the two panels is a divider the user can manipulate to make
- * one panel larger and the other panel smaller.
- */
-#define ACCESSIBLE_SPLIT_PANE L"split pane"
-
- /**
- * An object used to present information in terms of rows and columns.
- * An example might include a spreadsheet application.
- */
-#define ACCESSIBLE_TABLE L"table"
-
- /**
- * An object that presents text to the user. The text is usually
- * editable by the user as opposed to a label.
- * see ACCESSIBLE_LABEL
- */
-#define ACCESSIBLE_TEXT L"text"
-
- /**
- * An object used to present hierarchical information to the user.
- * The individual nodes in the tree can be collapsed and expanded
- * to provide selective disclosure of the tree's contents.
- */
-#define ACCESSIBLE_TREE L"tree"
-
- /**
- * A bar or palette usually composed of push buttons or toggle buttons.
- * It is often used to provide the most frequently used functions for an
- * application.
- */
-#define ACCESSIBLE_TOOL_BAR L"tool bar"
-
- /**
- * An object that provides information about another object. The
- * accessibleDescription property of the tool tip is often displayed
- * to the user in a small L"help bubble" when the user causes the
- * mouse to hover over the object associated with the tool tip.
- */
-#define ACCESSIBLE_TOOL_TIP L"tool tip"
-
- /**
- * An AWT component, but nothing else is known about it.
- * see ACCESSIBLE_SWING_COMPONENT
- * see ACCESSIBLE_UNKNOWN
- */
-#define ACCESSIBLE_AWT_COMPONENT L"awt component"
-
- /**
- * A Swing component, but nothing else is known about it.
- * see ACCESSIBLE_AWT_COMPONENT
- * see ACCESSIBLE_UNKNOWN
- */
-#define ACCESSIBLE_SWING_COMPONENT L"swing component"
-
- /**
- * The object contains some Accessible information, but its role is
- * not known.
- * see ACCESSIBLE_AWT_COMPONENT
- * see ACCESSIBLE_SWING_COMPONENT
- */
-#define ACCESSIBLE_UNKNOWN L"unknown"
-
- /**
- * A STATUS_BAR is an simple component that can contain
- * multiple labels of status information to the user.
- */
-#define ACCESSIBLE_STATUS_BAR L"status bar"
-
- /**
- * A DATE_EDITOR is a component that allows users to edit
- * java.util.Date and java.util.Time objects
- */
-#define ACCESSIBLE_DATE_EDITOR L"date editor"
-
- /**
- * A SPIN_BOX is a simple spinner component and its main use
- * is for simple numbers.
- */
-#define ACCESSIBLE_SPIN_BOX L"spin box"
-
- /**
- * A FONT_CHOOSER is a component that lets the user pick various
- * attributes for fonts.
- */
-#define ACCESSIBLE_FONT_CHOOSER L"font chooser"
-
- /**
- * A GROUP_BOX is a simple container that contains a border
- * around it and contains components inside it.
- */
-#define ACCESSIBLE_GROUP_BOX L"group box"
-
- /**
- * A text header
- */
-#define ACCESSIBLE_HEADER L"header"
-
- /**
- * A text footer
- */
-#define ACCESSIBLE_FOOTER L"footer"
-
- /**
- * A text paragraph
- */
-#define ACCESSIBLE_PARAGRAPH L"paragraph"
-
- /**
- * A ruler is an object used to measure distance
- */
-#define ACCESSIBLE_RULER L"ruler"
-
- /**
- * A role indicating the object acts as a formula for
- * calculating a value. An example is a formula in
- * a spreadsheet cell.
- */
-#define ACCESSIBLE_EDITBAR L"editbar"
-
- /**
- * A role indicating the object monitors the progress
- * of some operation.
- */
-#define PROGRESS_MONITOR L"progress monitor"
-
-
- /**
- ******************************************************
- * Accessibility event types
- ******************************************************
- */
-
-#define cPropertyNameChangeEvent (jlong) 1 // 1
-#define cPropertyDescriptionChangeEvent (jlong) 2 // 2
-#define cPropertyStateChangeEvent (jlong) 4 // 4
-#define cPropertyValueChangeEvent (jlong) 8 // 8
-#define cPropertySelectionChangeEvent (jlong) 16 // 10
-#define cPropertyTextChangeEvent (jlong) 32 // 20
-#define cPropertyCaretChangeEvent (jlong) 64 // 40
-#define cPropertyVisibleDataChangeEvent (jlong) 128 // 80
-#define cPropertyChildChangeEvent (jlong) 256 // 100
-#define cPropertyActiveDescendentChangeEvent (jlong) 512 // 200
-#define cPropertyTableModelChangeEvent (jlong) 1024 // 400
-
- /**
- ******************************************************
- * optional AccessibleContext interfaces
- *
- * This version of the bridge reuses the accessibleValue
- * field in the AccessibleContextInfo struct to represent
- * additional optional interfaces that are supported by
- * the Java AccessibleContext. This is backwardly compatable
- * because the old accessibleValue was set to the BOOL
- * value TRUE (i.e., 1) if the AccessibleValue interface is
- * supported.
- ******************************************************
- */
-
-#define cAccessibleValueInterface (jlong) 1 // 1 << 1 (TRUE)
-#define cAccessibleActionInterface (jlong) 2 // 1 << 2
-#define cAccessibleComponentInterface (jlong) 4 // 1 << 3
-#define cAccessibleSelectionInterface (jlong) 8 // 1 << 4
-#define cAccessibleTableInterface (jlong) 16 // 1 << 5
-#define cAccessibleTextInterface (jlong) 32 // 1 << 6
-#define cAccessibleHypertextInterface (jlong) 64 // 1 << 7
-
-
- /**
- ******************************************************
- * Accessibility information bundles
- ******************************************************
- */
-
- typedef struct AccessBridgeVersionInfoTag {
- wchar_t VMversion[SHORT_STRING_SIZE]; // output of "java -version"
- wchar_t bridgeJavaClassVersion[SHORT_STRING_SIZE]; // version of the AccessBridge.class
- wchar_t bridgeJavaDLLVersion[SHORT_STRING_SIZE]; // version of JavaAccessBridge.dll
- wchar_t bridgeWinDLLVersion[SHORT_STRING_SIZE]; // version of WindowsAccessBridge.dll
- } AccessBridgeVersionInfo;
-
-
- typedef struct AccessibleContextInfoTag {
- wchar_t name[MAX_STRING_SIZE]; // the AccessibleName of the object
- wchar_t description[MAX_STRING_SIZE]; // the AccessibleDescription of the object
-
- wchar_t role[SHORT_STRING_SIZE]; // localized AccesibleRole string
- wchar_t role_en_US[SHORT_STRING_SIZE]; // AccesibleRole string in the en_US locale
- wchar_t states[SHORT_STRING_SIZE]; // localized AccesibleStateSet string (comma separated)
- wchar_t states_en_US[SHORT_STRING_SIZE]; // AccesibleStateSet string in the en_US locale (comma separated)
-
- jint indexInParent; // index of object in parent
- jint childrenCount; // # of children, if any
-
- jint x; // screen coords in pixels
- jint y; // "
- jint width; // pixel width of object
- jint height; // pixel height of object
-
- BOOL accessibleComponent; // flags for various additional
- BOOL accessibleAction; // Java Accessibility interfaces
- BOOL accessibleSelection; // FALSE if this object doesn't
- BOOL accessibleText; // implement the additional interface
- // in question
-
- // BOOL accessibleValue; // old BOOL indicating whether AccessibleValue is supported
- BOOL accessibleInterfaces; // new bitfield containing additional interface flags
-
- } AccessibleContextInfo;
-
-
-
- // AccessibleText packages
- typedef struct AccessibleTextInfoTag {
- jint charCount; // # of characters in this text object
- jint caretIndex; // index of caret
- jint indexAtPoint; // index at the passsed in point
- } AccessibleTextInfo;
-
- typedef struct AccessibleTextItemsInfoTag {
- wchar_t letter;
- wchar_t word[SHORT_STRING_SIZE];
- wchar_t sentence[MAX_STRING_SIZE];
- } AccessibleTextItemsInfo;
-
- typedef struct AccessibleTextSelectionInfoTag {
- jint selectionStartIndex;
- jint selectionEndIndex;
- wchar_t selectedText[MAX_STRING_SIZE];
- } AccessibleTextSelectionInfo;
-
- typedef struct AccessibleTextRectInfoTag {
- jint x; // bounding rect of char at index
- jint y; // "
- jint width; // "
- jint height; // "
- } AccessibleTextRectInfo;
-
- // standard attributes for text; note: tabstops are not supported
- typedef struct AccessibleTextAttributesInfoTag {
- BOOL bold;
- BOOL italic;
- BOOL underline;
- BOOL strikethrough;
- BOOL superscript;
- BOOL subscript;
-
- wchar_t backgroundColor[SHORT_STRING_SIZE];
- wchar_t foregroundColor[SHORT_STRING_SIZE];
- wchar_t fontFamily[SHORT_STRING_SIZE];
- jint fontSize;
-
- jint alignment;
- jint bidiLevel;
-
- jfloat firstLineIndent;
- jfloat leftIndent;
- jfloat rightIndent;
- jfloat lineSpacing;
- jfloat spaceAbove;
- jfloat spaceBelow;
-
- wchar_t fullAttributesString[MAX_STRING_SIZE];
- } AccessibleTextAttributesInfo;
-
- /**
- ******************************************************
- * IPC management typedefs
- ******************************************************
- */
-
-#define cMemoryMappedNameSize 255
-
- /**
- * sent by the WindowsDLL -> the memory-mapped file is setup
- *
- */
- typedef struct MemoryMappedFileCreatedPackageTag {
-// HWND bridgeWindow; // redundant, but easier to get to here...
- ABHWND64 bridgeWindow; // redundant, but easier to get to here...
- char filename[cMemoryMappedNameSize];
- } MemoryMappedFileCreatedPackage;
-
-
-
-
- /**
- * sent when a new JavaVM attaches to the Bridge
- *
- */
- typedef struct JavaVMCreatedPackageTag {
- ABHWND64 bridgeWindow;
- long vmID;
- } JavaVMCreatedPackage;
-
- /**
- * sent when a JavaVM detatches from the Bridge
- *
- */
- typedef struct JavaVMDestroyedPackageTag {
- ABHWND64 bridgeWindow;
- } JavaVMDestroyedPackage;
-
- /**
- * sent when a new AT attaches to the Bridge
- *
- */
- typedef struct WindowsATCreatedPackageTag {
- ABHWND64 bridgeWindow;
- } WindowsATCreatedPackage;
-
- /**
- * sent when an AT detatches from the Bridge
- *
- */
- typedef struct WindowsATDestroyedPackageTag {
- ABHWND64 bridgeWindow;
- } WindowsATDestroyedPackage;
-
-
- /**
- * sent by JVM Bridges in response to a WindowsATCreate
- * message; saying "howdy, welcome to the neighborhood"
- *
- */
- typedef struct JavaVMPresentNotificationPackageTag {
- ABHWND64 bridgeWindow;
- long vmID;
- } JavaVMPresentNotificationPackage;
-
- /**
- * sent by AT Bridges in response to a JavaVMCreate
- * message; saying "howdy, welcome to the neighborhood"
- *
- */
- typedef struct WindowsATPresentNotificationPackageTag {
- ABHWND64 bridgeWindow;
- } WindowsATPresentNotificationPackage;
-
-
- /**
- ******************************************************
- * Core packages
- ******************************************************
- */
-
- typedef struct ReleaseJavaObjectPackageTag {
- long vmID;
- JOBJECT64 object;
- } ReleaseJavaObjectPackage;
-
- typedef struct GetAccessBridgeVersionPackageTag {
- long vmID; // can't get VM info w/out a VM!
- AccessBridgeVersionInfo rVersionInfo;
- } GetAccessBridgeVersionPackage;
-
- typedef struct IsSameObjectPackageTag {
- long vmID;
- JOBJECT64 obj1;
- JOBJECT64 obj2;
- jboolean rResult;
- } IsSameObjectPackage;
-
- /**
- ******************************************************
- * Windows packages
- ******************************************************
- */
-
- typedef struct IsJavaWindowPackageTag {
- jint window;
- jboolean rResult;
- } IsJavaWindowPackage;
-
- typedef struct GetAccessibleContextFromHWNDPackageTag {
- jint window;
- long rVMID;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleContextFromHWNDPackage;
-
- typedef struct GetHWNDFromAccessibleContextPackageTag {
- JOBJECT64 accessibleContext;
- ABHWND64 rHWND;
- } GetHWNDFromAccessibleContextPackage;
-
- /**
-******************************************************
-* AccessibleContext packages
-******************************************************
-*/
-
- typedef struct GetAccessibleContextAtPackageTag {
- jint x;
- jint y;
- long vmID;
- JOBJECT64 AccessibleContext; // look within this AC
- JOBJECT64 rAccessibleContext;
- } GetAccessibleContextAtPackage;
-
- typedef struct GetAccessibleContextWithFocusPackageTag {
- long rVMID;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleContextWithFocusPackage;
-
- typedef struct GetAccessibleContextInfoPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- AccessibleContextInfo rAccessibleContextInfo;
- } GetAccessibleContextInfoPackage;
-
- typedef struct GetAccessibleChildFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint childIndex;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleChildFromContextPackage;
-
- typedef struct GetAccessibleParentFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleParentFromContextPackage;
-
- /**
-******************************************************
-* AccessibleTable packages
-******************************************************
-*/
-
-#define MAX_TABLE_SELECTIONS 64
-
- // table information
- typedef struct AccessibleTableInfoTag {
- JOBJECT64 caption; // AccesibleContext
- JOBJECT64 summary; // AccessibleContext
- jint rowCount;
- jint columnCount;
- JOBJECT64 accessibleContext;
- JOBJECT64 accessibleTable;
- } AccessibleTableInfo;
-
- typedef struct GetAccessibleTableInfoPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- AccessibleTableInfo rTableInfo;
- } GetAccessibleTableInfoPackage;
-
- // table cell information
- typedef struct AccessibleTableCellInfoTag {
- JOBJECT64 accessibleContext;
- jint index;
- jint row;
- jint column;
- jint rowExtent;
- jint columnExtent;
- jboolean isSelected;
- } AccessibleTableCellInfo;
-
- typedef struct GetAccessibleTableCellInfoPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint row;
- jint column;
- AccessibleTableCellInfo rTableCellInfo;
- } GetAccessibleTableCellInfoPackage;
-
- typedef struct GetAccessibleTableRowHeaderPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- AccessibleTableInfo rTableInfo;
- } GetAccessibleTableRowHeaderPackage;
-
- typedef struct GetAccessibleTableColumnHeaderPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- AccessibleTableInfo rTableInfo;
- } GetAccessibleTableColumnHeaderPackage;
-
- typedef struct GetAccessibleTableRowDescriptionPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- jint row;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleTableRowDescriptionPackage;
-
- typedef struct GetAccessibleTableColumnDescriptionPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- jint column;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleTableColumnDescriptionPackage;
-
- typedef struct GetAccessibleTableRowSelectionCountPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint rCount;
- } GetAccessibleTableRowSelectionCountPackage;
-
- typedef struct IsAccessibleTableRowSelectedPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint row;
- jboolean rResult;
- } IsAccessibleTableRowSelectedPackage;
-
- typedef struct GetAccessibleTableRowSelectionsPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint count;
- jint rSelections[MAX_TABLE_SELECTIONS];
- } GetAccessibleTableRowSelectionsPackage;
-
- typedef struct GetAccessibleTableColumnSelectionCountPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint rCount;
- } GetAccessibleTableColumnSelectionCountPackage;
-
- typedef struct IsAccessibleTableColumnSelectedPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint column;
- jboolean rResult;
- } IsAccessibleTableColumnSelectedPackage;
-
- typedef struct GetAccessibleTableColumnSelectionsPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint count;
- jint rSelections[MAX_TABLE_SELECTIONS];
- } GetAccessibleTableColumnSelectionsPackage;
-
-
- typedef struct GetAccessibleTableRowPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint index;
- jint rRow;
- } GetAccessibleTableRowPackage;
-
- typedef struct GetAccessibleTableColumnPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint index;
- jint rColumn;
- } GetAccessibleTableColumnPackage;
-
- typedef struct GetAccessibleTableIndexPackageTag {
- long vmID;
- JOBJECT64 accessibleTable;
- jint row;
- jint column;
- jint rIndex;
- } GetAccessibleTableIndexPackage;
-
-
- /**
- ******************************************************
- * AccessibleRelationSet packages
- ******************************************************
- */
-
-#define MAX_RELATION_TARGETS 25
-#define MAX_RELATIONS 5
-
- typedef struct AccessibleRelationInfoTag {
- wchar_t key[SHORT_STRING_SIZE];
- jint targetCount;
- JOBJECT64 targets[MAX_RELATION_TARGETS]; // AccessibleContexts
- } AccessibleRelationInfo;
-
- typedef struct AccessibleRelationSetInfoTag {
- jint relationCount;
- AccessibleRelationInfo relations[MAX_RELATIONS];
- } AccessibleRelationSetInfo;
-
- typedef struct GetAccessibleRelationSetPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- AccessibleRelationSetInfo rAccessibleRelationSetInfo;
- } GetAccessibleRelationSetPackage;
-
- /**
- ******************************************************
- * AccessibleHypertext packagess
- ******************************************************
- */
-
-#define MAX_HYPERLINKS 64 // maximum number of hyperlinks returned
-
- // hyperlink information
- typedef struct AccessibleHyperlinkInfoTag {
- wchar_t text[SHORT_STRING_SIZE]; // the hyperlink text
- jint startIndex; //index in the hypertext document where the link begins
- jint endIndex; //index in the hypertext document where the link ends
- JOBJECT64 accessibleHyperlink; // AccessibleHyperlink object
- } AccessibleHyperlinkInfo;
-
- // hypertext information
- typedef struct AccessibleHypertextInfoTag {
- jint linkCount; // number of hyperlinks
- AccessibleHyperlinkInfo links[MAX_HYPERLINKS]; // the hyperlinks
- JOBJECT64 accessibleHypertext; // AccessibleHypertext object
- } AccessibleHypertextInfo;
-
- // struct for sending a message to get the hypertext for an AccessibleContext
- typedef struct GetAccessibleHypertextPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // AccessibleContext with hypertext
- AccessibleHypertextInfo rAccessibleHypertextInfo; // returned hypertext
- } GetAccessibleHypertextPackage;
-
- // struct for sending an message to activate a hyperlink
- typedef struct ActivateAccessibleHyperlinkPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // AccessibleContext containing the link
- JOBJECT64 accessibleHyperlink; // the link to activate
- BOOL rResult; // hyperlink activation return value
- } ActivateAccessibleHyperlinkPackage;
-
- // struct for sending a message to get the number of hyperlinks in a component
- typedef struct GetAccessibleHyperlinkCountPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // AccessibleContext containing AccessibleHypertext
- jint rLinkCount; // link count return value
- } GetAccessibleHyperlinkCountPackage;
-
- // struct for sending a message to get the hypertext for an AccessibleContext
- // starting at a specified index in the document
- typedef struct GetAccessibleHypertextExtPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // AccessibleContext with hypertext
- jint startIndex; // start index in document
- AccessibleHypertextInfo rAccessibleHypertextInfo; // returned hypertext
- BOOL rSuccess; // whether call succeeded
- } GetAccessibleHypertextExtPackage;
-
- // struct for sending a message to get the nth hyperlink in a document;
- // maps to AccessibleHypertext.getLink
- typedef struct GetAccessibleHyperlinkPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 hypertext; // AccessibleHypertext
- jint linkIndex; // hyperlink index
- AccessibleHyperlinkInfo rAccessibleHyperlinkInfo; // returned hyperlink
- } GetAccessibleHyperlinkPackage;
-
- // struct for sending a message to get the index into an array
- // of hyperlinks that is associated with a character index in a
- // document; maps to AccessibleHypertext.getLinkIndex
- typedef struct GetAccessibleHypertextLinkIndexPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 hypertext; // AccessibleHypertext
- jint charIndex; // character index in document
- jint rLinkIndex; // returned hyperlink index
- } GetAccessibleHypertextLinkIndexPackage;
-
- /**
- ******************************************************
- * Accessible Key Bindings packages
- ******************************************************
- */
-
-#define MAX_KEY_BINDINGS 10
-
- // keyboard character modifiers
-#define ACCESSIBLE_SHIFT_KEYSTROKE 1
-#define ACCESSIBLE_CONTROL_KEYSTROKE 2
-#define ACCESSIBLE_META_KEYSTROKE 4
-#define ACCESSIBLE_ALT_KEYSTROKE 8
-#define ACCESSIBLE_ALT_GRAPH_KEYSTROKE 16
-#define ACCESSIBLE_BUTTON1_KEYSTROKE 32
-#define ACCESSIBLE_BUTTON2_KEYSTROKE 64
-#define ACCESSIBLE_BUTTON3_KEYSTROKE 128
-#define ACCESSIBLE_FKEY_KEYSTROKE 256 // F key pressed, character contains 1-24
-#define ACCESSIBLE_CONTROLCODE_KEYSTROKE 512 // Control code key pressed, character contains control code.
-
-// The supported control code keys are:
-#define ACCESSIBLE_VK_BACK_SPACE 8
-#define ACCESSIBLE_VK_DELETE 127
-#define ACCESSIBLE_VK_DOWN 40
-#define ACCESSIBLE_VK_END 35
-#define ACCESSIBLE_VK_HOME 36
-#define ACCESSIBLE_VK_INSERT 155
-#define ACCESSIBLE_VK_KP_DOWN 225
-#define ACCESSIBLE_VK_KP_LEFT 226
-#define ACCESSIBLE_VK_KP_RIGHT 227
-#define ACCESSIBLE_VK_KP_UP 224
-#define ACCESSIBLE_VK_LEFT 37
-#define ACCESSIBLE_VK_PAGE_DOWN 34
-#define ACCESSIBLE_VK_PAGE_UP 33
-#define ACCESSIBLE_VK_RIGHT 39
-#define ACCESSIBLE_VK_UP 38
-
- // a key binding associates with a component
- typedef struct AccessibleKeyBindingInfoTag {
- jchar character; // the key character
- jint modifiers; // the key modifiers
- } AccessibleKeyBindingInfo;
-
- // all of the key bindings associated with a component
- typedef struct AccessibleKeyBindingsTag {
- int keyBindingsCount; // number of key bindings
- AccessibleKeyBindingInfo keyBindingInfo[MAX_KEY_BINDINGS];
- } AccessibleKeyBindings;
-
- // struct to get the key bindings associated with a component
- typedef struct GetAccessibleKeyBindingsPackageTag {
- long vmID; // the virtual machine id
- JOBJECT64 accessibleContext; // the component
- AccessibleKeyBindings rAccessibleKeyBindings; // the key bindings
- } GetAccessibleKeyBindingsPackage;
-
- /**
-******************************************************
-* AccessibleIcon packages
-******************************************************
-*/
-#define MAX_ICON_INFO 8
-
- // an icon assocated with a component
- typedef struct AccessibleIconInfoTag {
- wchar_t description[SHORT_STRING_SIZE]; // icon description
- jint height; // icon height
- jint width; // icon width
- } AccessibleIconInfo;
-
- // all of the icons associated with a component
- typedef struct AccessibleIconsTag {
- jint iconsCount; // number of icons
- AccessibleIconInfo iconInfo[MAX_ICON_INFO]; // the icons
- } AccessibleIcons;
-
- // struct to get the icons associated with a component
- typedef struct GetAccessibleIconsPackageTag {
- long vmID; // the virtual machine id
- JOBJECT64 accessibleContext; // the component
- AccessibleIcons rAccessibleIcons; // the icons
- } GetAccessibleIconsPackage;
-
-
- /**
-******************************************************
-* AccessibleAction packages
-******************************************************
-*/
-#define MAX_ACTION_INFO 256
-#define MAX_ACTIONS_TO_DO 32
-
- // an action assocated with a component
- typedef struct AccessibleActionInfoTag {
- wchar_t name[SHORT_STRING_SIZE]; // action name
- } AccessibleActionInfo;
-
- // all of the actions associated with a component
- typedef struct AccessibleActionsTag {
- jint actionsCount; // number of actions
- AccessibleActionInfo actionInfo[MAX_ACTION_INFO]; // the action information
- } AccessibleActions;
-
- // struct for requesting the actions associated with a component
- typedef struct GetAccessibleActionsPackageTag {
- long vmID;
- JOBJECT64 accessibleContext; // the component
- AccessibleActions rAccessibleActions; // the actions
- } GetAccessibleActionsPackage;
-
- // list of AccessibleActions to do
- typedef struct AccessibleActionsToDoTag {
- jint actionsCount; // number of actions to do
- AccessibleActionInfo actions[MAX_ACTIONS_TO_DO];// the accessible actions to do
- } AccessibleActionsToDo;
-
- // struct for sending an message to do one or more actions
- typedef struct DoAccessibleActionsPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // component to do the action
- AccessibleActionsToDo actionsToDo; // the accessible actions to do
- BOOL rResult; // action return value
- jint failure; // index of action that failed if rResult is FALSE
- } DoAccessibleActionsPackage;
-
- /**
-******************************************************
-* AccessibleText packages
-******************************************************
-*/
-
- typedef struct GetAccessibleTextInfoPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint x;
- jint y;
- AccessibleTextInfo rTextInfo;
- } GetAccessibleTextInfoPackage;
-
- typedef struct GetAccessibleTextItemsPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- AccessibleTextItemsInfo rTextItemsInfo;
- } GetAccessibleTextItemsPackage;
-
- typedef struct GetAccessibleTextSelectionInfoPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- AccessibleTextSelectionInfo rTextSelectionItemsInfo;
- } GetAccessibleTextSelectionInfoPackage;
-
- typedef struct GetAccessibleTextAttributeInfoPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- AccessibleTextAttributesInfo rAttributeInfo;
- } GetAccessibleTextAttributeInfoPackage;
-
- typedef struct GetAccessibleTextRectInfoPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- AccessibleTextRectInfo rTextRectInfo;
- } GetAccessibleTextRectInfoPackage;
-
- typedef struct GetCaretLocationPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- AccessibleTextRectInfo rTextRectInfo;
- } GetCaretLocationPackage;
-
- typedef struct GetAccessibleTextLineBoundsPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- jint rLineStart;
- jint rLineEnd;
- } GetAccessibleTextLineBoundsPackage;
-
- typedef struct GetAccessibleTextRangePackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint start;
- jint end;
- wchar_t rText[MAX_BUFFER_SIZE];
- } GetAccessibleTextRangePackage;
-
- /**
-******************************************************
-*
-* Utility method packages
-******************************************************
-*/
-
- typedef struct SetTextContentsPackageTag {
- long vmID;
- JOBJECT64 accessibleContext; // the text field
- wchar_t text[MAX_STRING_SIZE]; // the text
- BOOL rResult;
- } SetTextContentsPackage;
-
- typedef struct GetParentWithRolePackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- wchar_t role[SHORT_STRING_SIZE]; // one of Accessible Roles above
- JOBJECT64 rAccessibleContext;
- } GetParentWithRolePackage;
-
- typedef struct GetTopLevelObjectPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- JOBJECT64 rAccessibleContext;
- } GetTopLevelObjectPackage;
-
- typedef struct GetParentWithRoleElseRootPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- wchar_t role[SHORT_STRING_SIZE]; // one of Accessible Roles above
- JOBJECT64 rAccessibleContext;
- } GetParentWithRoleElseRootPackage;
-
- typedef struct GetObjectDepthPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- jint rResult;
- } GetObjectDepthPackage;
-
- typedef struct GetActiveDescendentPackageTag {
- long vmID;
- JOBJECT64 accessibleContext;
- JOBJECT64 rAccessibleContext;
- } GetActiveDescendentPackage;
-
- /**
-******************************************************
-* AccessibleValue packages
-******************************************************
-*/
-
- typedef struct GetCurrentAccessibleValueFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- wchar_t rValue[SHORT_STRING_SIZE];
- } GetCurrentAccessibleValueFromContextPackage;
-
- typedef struct GetMaximumAccessibleValueFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- wchar_t rValue[SHORT_STRING_SIZE];
- } GetMaximumAccessibleValueFromContextPackage;
-
- typedef struct GetMinimumAccessibleValueFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- wchar_t rValue[SHORT_STRING_SIZE];
- } GetMinimumAccessibleValueFromContextPackage;
-
-
- /**
-******************************************************
-* AccessibleSelection packages
-******************************************************
-*/
-
- typedef struct AddAccessibleSelectionFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- } AddAccessibleSelectionFromContextPackage;
-
- typedef struct ClearAccessibleSelectionFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- } ClearAccessibleSelectionFromContextPackage;
-
- typedef struct GetAccessibleSelectionFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- JOBJECT64 rAccessibleContext;
- } GetAccessibleSelectionFromContextPackage;
-
- typedef struct GetAccessibleSelectionCountFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint rCount;
- } GetAccessibleSelectionCountFromContextPackage;
-
- typedef struct IsAccessibleChildSelectedFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- jboolean rResult;
- } IsAccessibleChildSelectedFromContextPackage;
-
- typedef struct RemoveAccessibleSelectionFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- jint index;
- } RemoveAccessibleSelectionFromContextPackage;
-
- typedef struct SelectAllAccessibleSelectionFromContextPackageTag {
- long vmID;
- JOBJECT64 AccessibleContext;
- } SelectAllAccessibleSelectionFromContextPackage;
-
-
- /**
-******************************************************
-* Java Event Notification Registration packages
-******************************************************
-*/
-
- typedef struct AddJavaEventNotificationPackageTag {
- jlong type;
- //HWND DLLwindow;
- ABHWND64 DLLwindow;
- } AddJavaEventNotificationPackage;
-
- typedef struct RemoveJavaEventNotificationPackageTag {
- jlong type;
- //HWND DLLwindow;
- ABHWND64 DLLwindow;
- } RemoveJavaEventNotificationPackage;
-
-
- /**
-******************************************************
-* Accessibility Event Notification Registration packages
-******************************************************
-*/
-
- typedef struct AddAccessibilityEventNotificationPackageTag {
- jlong type;
- //HWND DLLwindow;
- ABHWND64 DLLwindow;
- } AddAccessibilityEventNotificationPackage;
-
- typedef struct RemoveAccessibilityEventNotificationPackageTag {
- jlong type;
- //HWND DLLwindow;
- ABHWND64 DLLwindow;
- } RemoveAccessibilityEventNotificationPackage;
-
-
- /**
-******************************************************
-* Accessibility Property Change Event packages
-******************************************************
-*/
-
- typedef struct PropertyCaretChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- jint oldPosition;
- jint newPosition;
- } PropertyCaretChangePackage;
-
- typedef struct PropertyDescriptionChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- wchar_t oldDescription[SHORT_STRING_SIZE];
- wchar_t newDescription[SHORT_STRING_SIZE];
- } PropertyDescriptionChangePackage;
-
- typedef struct PropertyNameChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- wchar_t oldName[SHORT_STRING_SIZE];
- wchar_t newName[SHORT_STRING_SIZE];
- } PropertyNameChangePackage;
-
- typedef struct PropertySelectionChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } PropertySelectionChangePackage;
-
- typedef struct PropertyStateChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- wchar_t oldState[SHORT_STRING_SIZE];
- wchar_t newState[SHORT_STRING_SIZE];
- } PropertyStateChangePackage;
-
- typedef struct PropertyTextChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } PropertyTextChangePackage;
-
- typedef struct PropertyValueChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- wchar_t oldValue[SHORT_STRING_SIZE];
- wchar_t newValue[SHORT_STRING_SIZE];
- } PropertyValueChangePackage;
-
- typedef struct PropertyVisibleDataChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } PropertyVisibleDataChangePackage;
-
- typedef struct PropertyChildChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- JOBJECT64 oldChildAccessibleContext;
- JOBJECT64 newChildAccessibleContext;
- } PropertyChildChangePackage;
-
- typedef struct PropertyActiveDescendentChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- JOBJECT64 oldActiveDescendentAccessibleContext;
- JOBJECT64 newActiveDescendentAccessibleContext;
- } PropertyActiveDescendentChangePackage;
-
-
- // String format for newValue is:
- // "type" one of "INSERT", "UPDATE" or "DELETE"
- // "firstRow"
- // "lastRow"
- // "firstColumn"
- // "lastColumn"
- //
- // oldValue is currently unused
- //
- typedef struct PropertyTableModelChangePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- wchar_t oldValue[SHORT_STRING_SIZE];
- wchar_t newValue[SHORT_STRING_SIZE];
- } PropertyTableModelChangePackage;
-
-
- /**
-******************************************************
-* Property Change Event packages
-******************************************************
-*/
-
- /*
- typedef struct PropertyChangePackageTag {
- long vmID;
- jobject Event;
- jobject AccessibleContextSource;
- char propertyName[SHORT_STRING_SIZE];
- char oldValue[SHORT_STRING_SIZE]; // PropertyChangeEvent().getOldValue().toString()
- char newValue[SHORT_STRING_SIZE]; // PropertyChangeEvent().getNewValue().toString()
- } PropertyChangePackage;
- */
-
- /*
- * Java shutdown event package
- */
- typedef struct JavaShutdownPackageTag {
- long vmID;
- } JavaShutdownPackage;
-
-
- /**
-******************************************************
-* Focus Event packages
-******************************************************
-*/
-
- typedef struct FocusGainedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } FocusGainedPackage;
-
- typedef struct FocusLostPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } FocusLostPackage;
-
-
- /**
-******************************************************
-* Caret Event packages
-******************************************************
-*/
-
- typedef struct CaretUpdatePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } CaretUpdatePackage;
-
-
- /**
-******************************************************
-* Mouse Event packages
-******************************************************
-*/
-
- typedef struct MouseClickedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MouseClickedPackage;
-
- typedef struct MouseEnteredPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MouseEnteredPackage;
-
- typedef struct MouseExitedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MouseExitedPackage;
-
- typedef struct MousePressedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MousePressedPackage;
-
- typedef struct MouseReleasedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MouseReleasedPackage;
-
-
- /**
-******************************************************
-* Menu/PopupMenu Event packages
-******************************************************
-*/
-
- typedef struct MenuCanceledPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MenuCanceledPackage;
-
- typedef struct MenuDeselectedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MenuDeselectedPackage;
-
- typedef struct MenuSelectedPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } MenuSelectedPackage;
-
-
- typedef struct PopupMenuCanceledPackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } PopupMenuCanceledPackage;
-
- typedef struct PopupMenuWillBecomeInvisiblePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } PopupMenuWillBecomeInvisiblePackage;
-
- typedef struct PopupMenuWillBecomeVisiblePackageTag {
- long vmID;
- JOBJECT64 Event;
- JOBJECT64 AccessibleContextSource;
- } PopupMenuWillBecomeVisiblePackage;
-
- /**
-******************************************************
-* Additional methods for Teton
-******************************************************
-*/
-
- /**
- * Gets the AccessibleName for a component based upon the JAWS algorithm. Returns
- * whether successful.
- *
- * Bug ID 4916682 - Implement JAWS AccessibleName policy
- */
- typedef struct GetVirtualAccessibleNamePackageTag {
- long vmID;
- AccessibleContext accessibleContext;
- wchar_t rName[MAX_STRING_SIZE];
- int len;
- } GetVirtualAccessibleNamePackage;
-
- /**
- * Request focus for a component. Returns whether successful;
- *
- * Bug ID 4944757 - requestFocus method needed
- */
- typedef struct RequestFocusPackageTag {
- long vmID;
- AccessibleContext accessibleContext;
- } RequestFocusPackage;
-
- /**
- * Selects text between two indices. Selection includes the text at the start index
- * and the text at the end index. Returns whether successful;
- *
- * Bug ID 4944758 - selectTextRange method needed
- */
- typedef struct SelectTextRangePackageTag {
- long vmID;
- AccessibleContext accessibleContext;
- jint startIndex;
- jint endIndex;
- } SelectTextRangePackage;
-
- /**
- * Gets the number of contiguous characters with the same attributes.
- *
- * Bug ID 4944761 - getTextAttributes between two indices method needed
- */
- typedef struct GetTextAttributesInRangePackageTag {
- long vmID;
- AccessibleContext accessibleContext;
- jint startIndex; // start index (inclusive)
- jint endIndex; // end index (inclusive)
- AccessibleTextAttributesInfo attributes; // character attributes to match
- short rLength; // number of contiguous characters with matching attributes
- } GetTextAttributesInRangePackage;
-
-#define MAX_VISIBLE_CHILDREN 256
-
- // visible children information
- typedef struct VisibleChildenInfoTag {
- int returnedChildrenCount; // number of children returned
- AccessibleContext children[MAX_VISIBLE_CHILDREN]; // the visible children
- } VisibleChildrenInfo;
-
- // struct for sending a message to get the number of visible children
- typedef struct GetVisibleChildrenCountPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // AccessibleContext of parent component
- jint rChildrenCount; // visible children count return value
- } GetVisibleChildrenCountPackage;
-
- // struct for sending a message to get the hypertext for an AccessibleContext
- // starting at a specified index in the document
- typedef struct GetVisibleChildrenPackageTag {
- long vmID; // the virtual machine ID
- JOBJECT64 accessibleContext; // AccessibleContext of parent component
- jint startIndex; // start index for retrieving children
- VisibleChildrenInfo rVisibleChildrenInfo; // returned info
- BOOL rSuccess; // whether call succeeded
- } GetVisibleChildrenPackage;
-
- /**
- * Set the caret to a text position. Returns whether successful;
- *
- * Bug ID 4944770 - setCaretPosition method needed
- */
- typedef struct SetCaretPositionPackageTag {
- long vmID;
- AccessibleContext accessibleContext;
- jint position;
- } SetCaretPositionPackage;
-
-
- /**
- ******************************************************
- * Wrapping up all of the packages
- ******************************************************
- */
-
- /**
- * What is the type of this package
- */
- typedef enum PackageType {
-
- cMemoryMappedFileCreatedPackage = 0x11000,
-
- // many of these will go away...
- cJavaVMCreatedPackage = 0x10000,
- cJavaVMDestroyedPackage,
- cWindowsATCreatedPackage,
- cWindowsATDestroyedPackage,
- cJavaVMPresentNotificationPackage,
- cWindowsATPresentNotificationPackage,
-
- cReleaseJavaObjectPackage = 1,
- cGetAccessBridgeVersionPackage = 2,
-
- cGetAccessibleContextFromHWNDPackage = 0x10,
- cIsJavaWindowPackage,
- cGetHWNDFromAccessibleContextPackage,
-
- cGetAccessibleContextAtPackage = 0x100,
- cGetAccessibleContextWithFocusPackage,
- cGetAccessibleContextInfoPackage,
- cGetAccessibleChildFromContextPackage,
- cGetAccessibleParentFromContextPackage,
- cIsSameObjectPackage,
-
- cGetAccessibleTextInfoPackage = 0x200,
- cGetAccessibleTextItemsPackage,
- cGetAccessibleTextSelectionInfoPackage,
- cGetAccessibleTextAttributeInfoPackage,
- cGetAccessibleTextRectInfoPackage,
- cGetAccessibleTextLineBoundsPackage,
- cGetAccessibleTextRangePackage,
-
- cGetCurrentAccessibleValueFromContextPackage = 0x300,
- cGetMaximumAccessibleValueFromContextPackage,
- cGetMinimumAccessibleValueFromContextPackage,
-
- cAddAccessibleSelectionFromContextPackage = 0x400,
- cClearAccessibleSelectionFromContextPackage,
- cGetAccessibleSelectionFromContextPackage,
- cGetAccessibleSelectionCountFromContextPackage,
- cIsAccessibleChildSelectedFromContextPackage,
- cRemoveAccessibleSelectionFromContextPackage,
- cSelectAllAccessibleSelectionFromContextPackage,
-
- cAddJavaEventNotificationPackage = 0x900,
- cRemoveJavaEventNotificationPackage,
- cAddAccessibilityEventNotificationPackage,
- cRemoveAccessibilityEventNotificationPackage,
-
- cPropertyChangePackage = 0x1000,
-
- cJavaShutdownPackage = 0x1010,
- cFocusGainedPackage,
- cFocusLostPackage,
-
- cCaretUpdatePackage = 0x1020,
-
- cMouseClickedPackage = 0x1030,
- cMouseEnteredPackage,
- cMouseExitedPackage,
- cMousePressedPackage,
- cMouseReleasedPackage,
-
- cMenuCanceledPackage = 0x1040,
- cMenuDeselectedPackage,
- cMenuSelectedPackage,
- cPopupMenuCanceledPackage,
- cPopupMenuWillBecomeInvisiblePackage,
- cPopupMenuWillBecomeVisiblePackage,
-
- cPropertyCaretChangePackage = 0x1100,
- cPropertyDescriptionChangePackage,
- cPropertyNameChangePackage,
- cPropertySelectionChangePackage,
- cPropertyStateChangePackage,
- cPropertyTextChangePackage,
- cPropertyValueChangePackage,
- cPropertyVisibleDataChangePackage,
- cPropertyChildChangePackage,
- cPropertyActiveDescendentChangePackage,
-
-
- // AccessibleTable
- cGetAccessibleTableInfoPackage = 0x1200,
- cGetAccessibleTableCellInfoPackage,
-
- cGetAccessibleTableRowHeaderPackage,
- cGetAccessibleTableColumnHeaderPackage,
-
- cGetAccessibleTableRowDescriptionPackage,
- cGetAccessibleTableColumnDescriptionPackage,
-
- cGetAccessibleTableRowSelectionCountPackage,
- cIsAccessibleTableRowSelectedPackage,
- cGetAccessibleTableRowSelectionsPackage,
-
- cGetAccessibleTableColumnSelectionCountPackage,
- cIsAccessibleTableColumnSelectedPackage,
- cGetAccessibleTableColumnSelectionsPackage,
-
- cGetAccessibleTableRowPackage,
- cGetAccessibleTableColumnPackage,
- cGetAccessibleTableIndexPackage,
-
- cPropertyTableModelChangePackage,
-
-
- // AccessibleRelationSet
- cGetAccessibleRelationSetPackage = 0x1300,
-
- // AccessibleHypertext
- cGetAccessibleHypertextPackage = 0x1400,
- cActivateAccessibleHyperlinkPackage,
- cGetAccessibleHyperlinkCountPackage,
- cGetAccessibleHypertextExtPackage,
- cGetAccessibleHypertextLinkIndexPackage,
- cGetAccessibleHyperlinkPackage,
-
- // Accessible KeyBinding, Icon and Action
- cGetAccessibleKeyBindingsPackage = 0x1500,
- cGetAccessibleIconsPackage,
- cGetAccessibleActionsPackage,
- cDoAccessibleActionsPackage,
-
- // Utility methods
- cSetTextContentsPackage = 0x1600,
- cGetParentWithRolePackage,
- cGetTopLevelObjectPackage,
- cGetParentWithRoleElseRootPackage,
- cGetObjectDepthPackage,
- cGetActiveDescendentPackage,
-
- // Additional methods for Teton
- cGetVirtualAccessibleNamePackage = 0x1700,
- cRequestFocusPackage,
- cSelectTextRangePackage,
- cGetTextAttributesInRangePackage,
- cGetSameTextAttributesInRangePackage,
- cGetVisibleChildrenCountPackage,
- cGetVisibleChildrenPackage,
- cSetCaretPositionPackage,
- cGetCaretLocationPackage
-
-
- } PackageType;
-
-
- /**
- * Union of all package contents
- */
- typedef union AllPackagesTag {
-
- // Initial Rendezvous packages
- MemoryMappedFileCreatedPackage memoryMappedFileCreatedPackage;
-
- JavaVMCreatedPackage javaVMCreatedPackage;
- JavaVMDestroyedPackage javaVMDestroyedPackage;
- WindowsATCreatedPackage windowsATCreatedPackage;
- WindowsATDestroyedPackage windowsATDestroyedPackage;
- JavaVMPresentNotificationPackage javaVMPresentNotificationPackage;
- WindowsATPresentNotificationPackage windowsATPresentNotificationPackage;
-
- // Core packages
- ReleaseJavaObjectPackage releaseJavaObject;
- GetAccessBridgeVersionPackage getAccessBridgeVersion;
-
- // Window packages
- GetAccessibleContextFromHWNDPackage getAccessibleContextFromHWND;
- GetHWNDFromAccessibleContextPackage getHWNDFromAccessibleContext;
-
- // AccessibleContext packages
- GetAccessibleContextAtPackage getAccessibleContextAt;
- GetAccessibleContextWithFocusPackage getAccessibleContextWithFocus;
- GetAccessibleContextInfoPackage getAccessibleContextInfo;
- GetAccessibleChildFromContextPackage getAccessibleChildFromContext;
- GetAccessibleParentFromContextPackage getAccessibleParentFromContext;
-
- // AccessibleText packages
- GetAccessibleTextInfoPackage getAccessibleTextInfo;
- GetAccessibleTextItemsPackage getAccessibleTextItems;
- GetAccessibleTextSelectionInfoPackage getAccessibleTextSelectionInfo;
- GetAccessibleTextAttributeInfoPackage getAccessibleTextAttributeInfo;
- GetAccessibleTextRectInfoPackage getAccessibleTextRectInfo;
- GetAccessibleTextLineBoundsPackage getAccessibleTextLineBounds;
- GetAccessibleTextRangePackage getAccessibleTextRange;
-
- // AccessibleValue packages
- GetCurrentAccessibleValueFromContextPackage getCurrentAccessibleValueFromContext;
- GetMaximumAccessibleValueFromContextPackage getMaximumAccessibleValueFromContext;
- GetMinimumAccessibleValueFromContextPackage getMinimumAccessibleValueFromContext;
-
- // AccessibleSelection packages
- AddAccessibleSelectionFromContextPackage addAccessibleSelectionFromContext;
- ClearAccessibleSelectionFromContextPackage clearAccessibleSelectionFromContext;
- GetAccessibleSelectionFromContextPackage getAccessibleSelectionFromContext;
- GetAccessibleSelectionCountFromContextPackage getAccessibleSelectionCountFromContext;
- IsAccessibleChildSelectedFromContextPackage isAccessibleChildSelectedFromContext;
- RemoveAccessibleSelectionFromContextPackage removeAccessibleSelectionFromContext;
- SelectAllAccessibleSelectionFromContextPackage selectAllAccessibleSelectionFromContext;
-
- // Event Notification Registration packages
- AddJavaEventNotificationPackage addJavaEventNotification;
- RemoveJavaEventNotificationPackage removeJavaEventNotification;
- AddAccessibilityEventNotificationPackage addAccessibilityEventNotification;
- RemoveAccessibilityEventNotificationPackage removeAccessibilityEventNotification;
-
- // Event contents packages
- // PropertyChangePackage propertyChange;
- PropertyCaretChangePackage propertyCaretChangePackage;
- PropertyDescriptionChangePackage propertyDescriptionChangePackage;
- PropertyNameChangePackage propertyNameChangePackage;
- PropertySelectionChangePackage propertySelectionChangePackage;
- PropertyStateChangePackage propertyStateChangePackage;
- PropertyTextChangePackage propertyTextChangePackage;
- PropertyValueChangePackage propertyValueChangePackage;
- PropertyVisibleDataChangePackage propertyVisibleDataChangePackage;
- PropertyChildChangePackage propertyChildChangePackage;
- PropertyActiveDescendentChangePackage propertyActiveDescendentChangePackage;
-
- PropertyTableModelChangePackage propertyTableModelChangePackage;
-
- JavaShutdownPackage JavaShutdown;
- FocusGainedPackage focusGained;
- FocusLostPackage focusLost;
-
- CaretUpdatePackage caretUpdate;
-
- MouseClickedPackage mouseClicked;
- MouseEnteredPackage mouseEntered;
- MouseExitedPackage mouseExited;
- MousePressedPackage mousePressed;
- MouseReleasedPackage mouseReleased;
-
- MenuCanceledPackage menuCanceled;
- MenuDeselectedPackage menuDeselected;
- MenuSelectedPackage menuSelected;
- PopupMenuCanceledPackage popupMenuCanceled;
- PopupMenuWillBecomeInvisiblePackage popupMenuWillBecomeInvisible;
- PopupMenuWillBecomeVisiblePackage popupMenuWillBecomeVisible;
-
- // AccessibleRelationSet
- GetAccessibleRelationSetPackage getAccessibleRelationSet;
-
- // AccessibleHypertext
- GetAccessibleHypertextPackage _getAccessibleHypertext;
- ActivateAccessibleHyperlinkPackage _activateAccessibleHyperlink;
- GetAccessibleHyperlinkCountPackage _getAccessibleHyperlinkCount;
- GetAccessibleHypertextExtPackage _getAccessibleHypertextExt;
- GetAccessibleHypertextLinkIndexPackage _getAccessibleHypertextLinkIndex;
- GetAccessibleHyperlinkPackage _getAccessibleHyperlink;
-
- // Accessible KeyBinding, Icon and Action
- GetAccessibleKeyBindingsPackage getAccessibleKeyBindings;
- GetAccessibleIconsPackage getAccessibleIcons;
- GetAccessibleActionsPackage getAccessibleActions;
- DoAccessibleActionsPackage doAccessibleActions;
-
- // utility methods
- SetTextContentsPackage _setTextContents;
- GetParentWithRolePackage _getParentWithRole;
- GetTopLevelObjectPackage _getTopLevelObject;
- GetParentWithRoleElseRootPackage _getParentWithRoleElseRoot;
- GetObjectDepthPackage _getObjectDepth;
- GetActiveDescendentPackage _getActiveDescendent;
-
- // Additional methods for Teton
- GetVirtualAccessibleNamePackage _getVirtualAccessibleName;
- RequestFocusPackage _requestFocus;
- SelectTextRangePackage _selectTextRange;
- GetTextAttributesInRangePackage _getTextAttributesInRange;
- GetVisibleChildrenCountPackage _getVisibleChildrenCount;
- GetVisibleChildrenPackage _getVisibleChildren;
- SetCaretPositionPackage _setCaretPosition;
-
- } AllPackages;
-
-
- /**
- * Union of all Java-initiated package contents
- */
- typedef union JavaInitiatedPackagesTag {
-
- // Initial Rendezvous packages
- JavaVMCreatedPackage javaVMCreatedPackage;
- JavaVMDestroyedPackage javaVMDestroyedPackage;
- JavaVMPresentNotificationPackage javaVMPresentNotificationPackage;
-
- // Event contents packages
- PropertyCaretChangePackage propertyCaretChangePackage;
- PropertyDescriptionChangePackage propertyDescriptionChangePackage;
- PropertyNameChangePackage propertyNameChangePackage;
- PropertySelectionChangePackage propertySelectionChangePackage;
- PropertyStateChangePackage propertyStateChangePackage;
- PropertyTextChangePackage propertyTextChangePackage;
- PropertyValueChangePackage propertyValueChangePackage;
- PropertyVisibleDataChangePackage propertyVisibleDataChangePackage;
- PropertyChildChangePackage propertyChildChangePackage;
- PropertyActiveDescendentChangePackage propertyActiveDescendentChangePackage;
-
- PropertyTableModelChangePackage propertyTableModelChangePackage;
-
- JavaShutdownPackage JavaShutdown;
- FocusGainedPackage focusGained;
- FocusLostPackage focusLost;
-
- CaretUpdatePackage caretUpdate;
-
- MouseClickedPackage mouseClicked;
- MouseEnteredPackage mouseEntered;
- MouseExitedPackage mouseExited;
- MousePressedPackage mousePressed;
- MouseReleasedPackage mouseReleased;
-
- MenuCanceledPackage menuCanceled;
- MenuDeselectedPackage menuDeselected;
- MenuSelectedPackage menuSelected;
- PopupMenuCanceledPackage popupMenuCanceled;
- PopupMenuWillBecomeInvisiblePackage popupMenuWillBecomeInvisible;
- PopupMenuWillBecomeVisiblePackage popupMenuWillBecomeVisible;
-
- } JavaInitiatedPackages;
-
-
- /**
- * Union of all Windows-initiated package contents
- */
- typedef union WindowsInitiatedPackagesTag {
-
- // Initial Rendezvous packages
- MemoryMappedFileCreatedPackage memoryMappedFileCreatedPackage;
-
- WindowsATCreatedPackage windowsATCreatedPackage;
- WindowsATDestroyedPackage windowsATDestroyedPackage;
- WindowsATPresentNotificationPackage windowsATPresentNotificationPackage;
-
- // Core packages
- ReleaseJavaObjectPackage releaseJavaObject;
- GetAccessBridgeVersionPackage getAccessBridgeVersion;
-
- // Window packages
- GetAccessibleContextFromHWNDPackage getAccessibleContextFromHWND;
- GetHWNDFromAccessibleContextPackage getHWNDFromAccessibleContext;
-
- // AccessibleContext packages
- GetAccessibleContextAtPackage getAccessibleContextAt;
- GetAccessibleContextWithFocusPackage getAccessibleContextWithFocus;
- GetAccessibleContextInfoPackage getAccessibleContextInfo;
- GetAccessibleChildFromContextPackage getAccessibleChildFromContext;
- GetAccessibleParentFromContextPackage getAccessibleParentFromContext;
-
- // AccessibleText packages
- GetAccessibleTextInfoPackage getAccessibleTextInfo;
- GetAccessibleTextItemsPackage getAccessibleTextItems;
- GetAccessibleTextSelectionInfoPackage getAccessibleTextSelectionInfo;
- GetAccessibleTextAttributeInfoPackage getAccessibleTextAttributeInfo;
- GetAccessibleTextRectInfoPackage getAccessibleTextRectInfo;
- GetAccessibleTextLineBoundsPackage getAccessibleTextLineBounds;
- GetAccessibleTextRangePackage getAccessibleTextRange;
-
- // AccessibleValue packages
- GetCurrentAccessibleValueFromContextPackage getCurrentAccessibleValueFromContext;
- GetMaximumAccessibleValueFromContextPackage getMaximumAccessibleValueFromContext;
- GetMinimumAccessibleValueFromContextPackage getMinimumAccessibleValueFromContext;
-
- // AccessibleSelection packages
- AddAccessibleSelectionFromContextPackage addAccessibleSelectionFromContext;
- ClearAccessibleSelectionFromContextPackage clearAccessibleSelectionFromContext;
- GetAccessibleSelectionFromContextPackage getAccessibleSelectionFromContext;
- GetAccessibleSelectionCountFromContextPackage getAccessibleSelectionCountFromContext;
- IsAccessibleChildSelectedFromContextPackage isAccessibleChildSelectedFromContext;
- RemoveAccessibleSelectionFromContextPackage removeAccessibleSelectionFromContext;
- SelectAllAccessibleSelectionFromContextPackage selectAllAccessibleSelectionFromContext;
-
- // Event Notification Registration packages
- AddJavaEventNotificationPackage addJavaEventNotification;
- RemoveJavaEventNotificationPackage removeJavaEventNotification;
- AddAccessibilityEventNotificationPackage addAccessibilityEventNotification;
- RemoveAccessibilityEventNotificationPackage removeAccessibilityEventNotification;
-
- // AccessibleTable
- GetAccessibleTableInfoPackage _getAccessibleTableInfo;
- GetAccessibleTableCellInfoPackage _getAccessibleTableCellInfo;
-
- GetAccessibleTableRowHeaderPackage _getAccessibleTableRowHeader;
- GetAccessibleTableColumnHeaderPackage _getAccessibleTableColumnHeader;
-
- GetAccessibleTableRowDescriptionPackage _getAccessibleTableRowDescription;
- GetAccessibleTableColumnDescriptionPackage _getAccessibleTableColumnDescription;
-
- GetAccessibleTableRowSelectionCountPackage _getAccessibleTableRowSelectionCount;
- IsAccessibleTableRowSelectedPackage _isAccessibleTableRowSelected;
- GetAccessibleTableRowSelectionsPackage _getAccessibleTableRowSelections;
-
- GetAccessibleTableColumnSelectionCountPackage _getAccessibleTableColumnSelectionCount;
- IsAccessibleTableColumnSelectedPackage _isAccessibleTableColumnSelected;
- GetAccessibleTableColumnSelectionsPackage _getAccessibleTableColumnSelections;
-
- GetAccessibleTableRowPackage _getAccessibleTableRow;
- GetAccessibleTableColumnPackage _getAccessibleTableColumn;
- GetAccessibleTableIndexPackage _getAccessibleTableIndex;
-
- // AccessibleRelationSet
- GetAccessibleRelationSetPackage _getAccessibleRelationSet;
-
- // Accessible KeyBindings, Icons and Actions
- GetAccessibleKeyBindingsPackage _getAccessibleKeyBindings;
- GetAccessibleIconsPackage _getAccessibleIcons;
- GetAccessibleActionsPackage _getAccessibleActions;
- DoAccessibleActionsPackage _doAccessibleActions;
-
-
- IsSameObjectPackage _isSameObject;
-
- // utility methods
- SetTextContentsPackage _setTextContents;
- GetParentWithRolePackage _getParentWithRole;
- GetTopLevelObjectPackage _getTopLevelObject;
- GetParentWithRoleElseRootPackage _getParentWithRoleElseRoot;
- GetObjectDepthPackage _getObjectDepth;
- GetActiveDescendentPackage _getActiveDescendent;
-
- // Additional methods for Teton
- GetVirtualAccessibleNamePackage _getVirtualAccessibleName;
- RequestFocusPackage _requestFocus;
- SelectTextRangePackage _selectTextRange;
- GetTextAttributesInRangePackage _getTextAttributesInRange;
- GetVisibleChildrenCountPackage _getVisibleChildrenCount;
- GetVisibleChildrenPackage _getVisibleChildren;
- SetCaretPositionPackage _setCaretPosition;
-
-
- } WindowsInitiatedPackages;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/jni/windows/win32/jawt_md.h b/jni/windows/win32/jawt_md.h
deleted file mode 100644
index 66e7256..0000000
--- a/jni/windows/win32/jawt_md.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include
-#include "jawt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Win32-specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
-typedef struct jawt_Win32DrawingSurfaceInfo {
- /* Native window, DDB, or DIB handle */
- union {
- HWND hwnd;
- HBITMAP hbitmap;
- void* pbits;
- };
- /*
- * This HDC should always be used instead of the HDC returned from
- * BeginPaint() or any calls to GetDC().
- */
- HDC hdc;
- HPALETTE hpalette;
-} JAWT_Win32DrawingSurfaceInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
diff --git a/jni/windows/win32/jni_md.h b/jni/windows/win32/jni_md.h
deleted file mode 100644
index 7f5000e..0000000
--- a/jni/windows/win32/jni_md.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#define JNIEXPORT __declspec(dllexport)
-#define JNIIMPORT __declspec(dllimport)
-#define JNICALL __stdcall
-
-// 'long' is always 32 bit on windows so this matches what jdk expects
-typedef long jint;
-typedef __int64 jlong;
-typedef signed char jbyte;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
diff --git a/license.txt b/license.txt
index 003a32a..76323fa 100644
--- a/license.txt
+++ b/license.txt
@@ -1,4 +1,4 @@
-Copyright (C) 2020 Planet Virtual Boy
+Copyright (C) 2021 Planet Virtual Boy
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/locale/en-US.txt b/locale/en-US.txt
deleted file mode 100644
index 59c3043..0000000
--- a/locale/en-US.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-# Locale
-locale {
- id en-US
- name English (United States)
-}
-
-# Main window
-app {
-
- debug {
- (menu) Debug
- breakpoints Breakpoints
- console Console
- cpu CPU
- memory Memory
- # VIP section
- bg_maps BG Maps
- characters Characters
- frame_buffers Frame buffers
- objects Objects
- worlds Worlds
- }
-
- file {
- (menu) File
- debug_mode Debug mode
- exit Exit
- game_mode Game mode
- load_rom Load ROM...
- new_window New window
- }
-
- title {
- default PVB Emulator
- mixed {ctrl.number} {ctrl.filename} - {app.title.default}
- number {ctrl.number} {app.title.default}
- rom {ctrl.filename} - {app.title.default}
- }
-
-}
-
-# BG Maps window
-bg_maps {
- address Address
- cell Cell
- character Character
- generic Generic
- grid Grid
- hflip H-Flip
- index Index
- map Map
- palette Palette
- scale Scale
- title BG Maps
- vflip V-Flip
-}
-
-# Breakpoints window
-breakpoints {
- address Address
- condition Condition
- default_name New breakpoint
- delete Delete
- enabled Enabled
- exception Exception
- execute Execute
- name Name
- new New
- read Read
- title Breakpoints
- type Type
- write Write
-
- error {
- badliteral_a Error:{err.position}: Unable to process address "{err.text}"
- badliteral_c Error:{err.position}: Unable to process literal "{err.text}"
- badoperand Error:{err.position}: Invalid operand to operator "{err.text}"
- badtoken Error:{err.position}: Unrecognized token "{err.text}"
- earlyeof Error:{err.position}: Unexpected end of input
- invalid Error:{err.position}: Token "{err.text}" cannot appear here
- nesting Error:{err.position}: Expected "{err.other}", but found "{err.text}"
- unexpected Error:{err.position}: Unexpected "{err.text}"
- }
-
-}
-
-# Characters window
-characters {
- address Address
- grid Grid
- index Index
- mirror Mirror
- Palette Palette
- scale Scale
- title Characters
- wide Wide
-}
-
-# Console window
-console {
- title Console
-}
-
-# Emulation core
-core {
- java Java
- linux-x86 Linux (32-bit)
- linux-x86_64 Linux (64-bit)
- native Native
- windows-x86 Windows (32-bit)
- windows-x86_64 Windows (64-bit)
-}
-
-# CPU window
-cpu {
- float Float
- hex Hex
- jump_from From
- jump_to To
- signed Signed
- title CPU
- unsigned Unsigned
-}
-
-# File dialog
-dialog {
- ext_isx ISX modules (*.isx)
- ext_vb Virtual Boy ROMs (*.vb)
- load Load
- load_rom Load ROM
- load_rom_error Unable to load the selected ROM file.
- load_rom_notvb The selected file does not appear to be a Virtual Boy ROM.
-}
-
-# Memory window
-memory {
- title Memory
-}
-
-# Palettes
-palette {
- Generic Generic
- gplt0 BG 0
- gplt1 BG 1
- gplt2 BG 2
- gplt3 BG 3
- jplt0 OBJ 0
- jplt1 OBJ 1
- jplt2 OBJ 2
- jplt3 OBJ 3
-}
diff --git a/makefile b/makefile
deleted file mode 100644
index ea8540a..0000000
--- a/makefile
+++ /dev/null
@@ -1,167 +0,0 @@
-# Java include directory pathnames
-# The Windows files need to be copied from a Windows JDK installation
-include_linux = jni/linux
-include_windows = jni/windows
-
-# Default goal
-.PHONY: default
-default:
- @echo $(include_linux)
- @echo "Planet Virtual Boy Emulator"
- @echo " https://www.planetvb.com/"
- @echo " December 26, 2020"
- @echo
- @echo "Intended build environment: Debian i386 or amd64"
- @echo " gcc-multilib"
- @echo " mingw-w64"
- @echo " openjdk-15-jdk"
- @echo
- @echo "Usage: make "
- @echo " Package recipes:"
- @echo " build Compiles the native modules and desktop application"
- @echo " clean Deletes all output files"
- @echo " core Check the native core library for style errors"
- @echo " desktop Compiles the Java desktop application"
- @echo " native Builds all native modules"
- @echo " pack Bundles everything in a .jar file"
- @echo " release Produces a .jar and deletes all intermediate files"
- @echo " Native recipes:"
- @echo " lin32 Builds native module linux_x86"
- @echo " lin64 Builds native module linux_x86-64"
- @echo " win32 Builds native module windows_x86"
- @echo " win64 Builds native module windows_x86-64"
- @echo
-
-
-
-###############################################################################
-# Package Recipes #
-###############################################################################
-
-# Perform a full build process of the native modules and desktop application
-.PHONY: build
-build:
- @make -s core
- @make -s desktop
- @make -s native
-
-# Delete all output files
-.PHONY: clean
-clean: clean_most
- @rm -f pvbemu_*.jar
-
-# Check the native core library for style errors
-.PHONY: core
-core:
- @echo " Checking native core library for style errors"
- $(eval coreargs = -c -Isrc/core/include -Werror -Wall -Wextra -Wpedantic \
- -fno-strict-aliasing -fsyntax-only src/core/vue.c)
- @gcc -std=c90 $(coreargs)
- @gcc -std=c90 -D VUE_BIGENDIAN $(coreargs)
- @gcc -std=c99 $(coreargs)
- @gcc -std=c99 -D VUE_BIGENDIAN $(coreargs)
- @gcc -std=c11 $(coreargs)
- @gcc -std=c11 -D VUE_BIGENDIAN $(coreargs)
-
-# Compile the Java desktop application
-.PHONY: desktop
-desktop: clean_desktop
- @echo " Compiling Java desktop application"
- @javac -sourcepath src/desktop --release 10 -Xlint:unchecked \
- -Xlint:deprecation -h src/desktop/vue -d . src/desktop/Main.java
-
-# Build all native modules
-.PHONY: native
-native:
- @make -s lin32
- @make -s lin64
- @make -s win32
- @make -s win64
-
-# Package the release into a .jar file
-.PHONY: pack
-pack:
- $(eval jarname = "pvbemu_`date +%Y%m%d`.jar")
- @echo " Bundling into $(jarname)"
- @jar -cfe $(jarname) Main *.class license.txt \
- app images locale native util vue
-
-# Performs a full build and packages it into a .jar
-.PHONY: release
-release:
- @make -s build
- @make -s pack
- @echo " Removing temporary files"
- @make -s clean_most
-
-# Delete only Java .class files
-.PHONY: clean_desktop
-clean_desktop:
- @rm -r -f *.class app util vue
-
-# Delete everything but the .jar
-.PHONY: clean_most
-clean_most: clean_desktop
- @rm -f src/desktop/vue/vue_NativeVue.h native/*.dll native/*.so
-
-
-
-###############################################################################
-# Native Recipes #
-###############################################################################
-
-# JNI header file
-src/desktop/vue/vue_NativeVue.h: src/desktop/vue/NativeVue.java
- @javac -h src/desktop/vue -sourcepath src/desktop -d . \
- src/desktop/vue/NativeVue.java
- @sleep 3
-
-# linux_x86
-.PHONY: lin32_pre
-lin32_pre: src/desktop/vue/vue_NativeVue.h
- $(eval name = linux_x86)
- $(eval prefix = `uname -m`-linux-gnu-)
- $(eval include = -I$(include_linux) -I$(include_linux)/linux)
- $(eval gccargs = -m32 -lm)
- $(eval ext = .so)
-.PHONY: lin32
-lin32: lin32_pre native_common
-
-# linux_x86-64
-.PHONY: lin64_pre
-lin64_pre: src/desktop/vue/vue_NativeVue.h
- $(eval name = linux_x86-64)
- $(eval prefix = `uname -m`-linux-gnu-)
- $(eval include = -I$(include_linux) -I$(include_linux)/linux)
- $(eval gccargs = -m64 -lm)
- $(eval ext = .so)
-.PHONY: lin64
-lin64: lin64_pre native_common
-
-# windows_x86
-.PHONY: win32_pre
-win32_pre: src/desktop/vue/vue_NativeVue.h
- $(eval name = windows_x86)
- $(eval prefix = i686-w64-mingw32-)
- $(eval include = -I$(include_windows) -I$(include_windows)/win32)
- $(eval ext = .dll)
-.PHONY: win32
-win32: win32_pre native_common
-
-# windows_x86-64
-.PHONY: win64_pre
-win64_pre: src/desktop/vue/vue_NativeVue.h
- $(eval name = windows_x86-64)
- $(eval prefix = x86_64-w64-mingw32-)
- $(eval include = -I$(include_windows) -I$(include_windows)/win32)
- $(eval ext = .dll)
-.PHONY: win64
-win64: win64_pre native_common
-
-# Common recipe for building native modules
-.PHONY: native_common
-native_common:
- @echo " Building native module $(name)"
- @$(prefix)gcc $(include) -Isrc/core/include $(gccargs) -s -shared -O2 \
- -fno-strict-aliasing -fPIC -Werror \
- -o native/$(name)$(ext) src/desktop/vue/NativeVue.c src/core/vue.c
diff --git a/native/.gitignore b/native/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/src/core/cpu.c b/src/core/cpu.c
deleted file mode 100644
index 1418cdc..0000000
--- a/src/core/cpu.c
+++ /dev/null
@@ -1,1261 +0,0 @@
-/* This file is included through vue.c and cannot be built directly. */
-#ifdef VUEAPI
-
-
-
-/*****************************************************************************
- * Constants *
- *****************************************************************************/
-
-/* Stages */
-#define CPU_FATAL -1
-#define CPU_FETCH 0
-#define CPU_EXECUTE 1
-#define CPU_EXCEPTION 2
-#define CPU_HALT 3
-#define CPU_CLEAR 4
-#define CPU_DUMP 5
-#define CPU_RESTORE 6
-
-/* Intermediate instruction IDs */
-#define BITSTRING -2
-#define FLOATENDO -3
-
-/* Opcode lookup table */
-static const int8_t LOOKUP_OPCODE[] = {
- VUE_MOV_REG, 1, VUE_ADD_REG, 1, VUE_SUB , 1, VUE_CMP_REG, 1,
- VUE_SHL_REG, 1, VUE_SHR_REG, 1, VUE_JMP , 1, VUE_SAR_REG, 1,
- VUE_MUL , 1, VUE_DIV , 1, VUE_MULU , 1, VUE_DIVU , 1,
- VUE_OR , 1, VUE_AND , 1, VUE_XOR , 1, VUE_NOT , 1,
- VUE_MOV_IMM,-2, VUE_ADD_IMM,-2, VUE_SETF , 2, VUE_CMP_IMM,-2,
- VUE_SHL_IMM, 2, VUE_SHR_IMM, 2, VUE_CLI , 2, VUE_SAR_IMM, 2,
- VUE_TRAP , 2, VUE_RETI , 2, VUE_HALT , 2, VUE_ILLEGAL, 0,
- VUE_LDSR , 2, VUE_STSR , 2, VUE_SEI , 2, BITSTRING , 2,
- VUE_BCOND , 3, VUE_BCOND , 3, VUE_BCOND , 3, VUE_BCOND , 3,
- VUE_BCOND , 3, VUE_BCOND , 3, VUE_BCOND , 3, VUE_BCOND , 3,
- VUE_MOVEA ,-5, VUE_ADDI ,-5, VUE_JR , 4, VUE_JAL , 4,
- VUE_ORI , 5, VUE_ANDI , 5, VUE_XORI , 5, VUE_MOVHI , 5,
- VUE_LD_B , 6, VUE_LD_H , 6, VUE_ILLEGAL, 0, VUE_LD_W , 6,
- VUE_ST_B , 6, VUE_ST_H , 6, VUE_ILLEGAL, 0, VUE_ST_W , 6,
- VUE_IN_B , 6, VUE_IN_H , 6, VUE_CAXI , 6, VUE_IN_W , 6,
- VUE_OUT_B , 6, VUE_OUT_H , 6, FLOATENDO , 7, VUE_OUT_W , 6
-};
-
-/* Bit string lookup table */
-static const int8_t LOOKUP_BITSTRING[] = {
- VUE_SCH0BSU, VUE_SCH0BSD, VUE_SCH1BSU, VUE_SCH1BSD,
- VUE_ILLEGAL, VUE_ILLEGAL, VUE_ILLEGAL, VUE_ILLEGAL,
- VUE_ORBSU , VUE_ANDBSU , VUE_XORBSU , VUE_MOVBSU ,
- VUE_ORNBSU , VUE_ANDNBSU, VUE_XORNBSU, VUE_XORNBSU
-};
-
-/* Floating-point and Nintendo lookup table */
-static const int8_t LOOKUP_FLOATENDO[] = {
- VUE_CMPF_S , VUE_ILLEGAL, VUE_CVT_WS , VUE_CVT_SW ,
- VUE_ADDF_S , VUE_SUBF_S , VUE_MULF_S , VUE_DIVF_S ,
- VUE_XB , VUE_XH , VUE_REV , VUE_TRNC_SW,
- VUE_MPYHW , VUE_ILLEGAL, VUE_ILLEGAL, VUE_ILLEGAL
-};
-
-/* Instruction cycle counts */
-static const int8_t CYCLES[] = {
- 1, 1, 28, 1, 1, 1, 1, 1, 1, 26, 12, 1, 1, 10, 14, 16,
- 38, 44, 36, 1, 5, 5, 5, 3, 3, 3, 5, 5, 5, 8, 1, 1,
- 1, 1, 1, 9, 13, 30, 13, 1, 1, 1, 1, 1, 1, 4, 4, 4,
- 10, 22, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 4, 4,
- 4, 8, 1, 28, 15, 14, 6, 1, 1, 1, 1, 1
-};
-
-
-
-/*****************************************************************************
- * Instruction Helpers *
- *****************************************************************************/
-
-/* Integer addition */
-static int32_t cpuAdd(Vue *vue, int left, int right) {
- int32_t result = left + right;
- vue->cpu.psw_cy = (uint32_t) result < (uint32_t) left ? 1 : 0;
- vue->cpu.psw_s = result >> 31 & 1;
- vue->cpu.psw_ov = (~(left ^ right) & (left ^ result)) >> 31 & 1;
- vue->cpu.psw_z = result ? 0 : 1;
- return result;
-}
-
-/* Bitwise operation */
-static void cpuBitwise(Vue *vue, int32_t result) {
- vue->cpu.program[vue->cpu.inst.reg2] = result;
- vue->cpu.psw_ov = 0;
- vue->cpu.psw_s = result >> 31 & 1;
- vue->cpu.psw_z = result ? 0 : 1;
-}
-
-/* Reinterpret integer bits as a float promoted to double */
-#define cpuFloat(x) ((double) *(float *)&(x))
-
-/* Determine whether the floating-point operands are reserved values */
-static vbool cpuFloatReserved(Vue *vue, vbool left) {
- int32_t exponent; /* Operand exponent */
- int32_t operand; /* Current operand */
- int x; /* Iterator */
-
- /* Operands */
- int32_t operands[2];
- operands[0] = vue->cpu.program[vue->cpu.inst.reg2];
- operands[1] = vue->cpu.program[vue->cpu.inst.reg1];
-
- /* Process both operands */
- for (x = left ^ 1; x < 2; x++) {
- operand = operands[x];
- exponent = operand & 0x7F800000;
-
- /* Check for a reserved operand */
- if (!(
- exponent == 0x7F800000 || /* Indefinite */
- (exponent == 0 && (operand & 0x007FFFFF) != 0) /* Denormal */
- )) continue;
-
- /* The value is a reserved operand */
- vue->cpu.exception = 0xFF60;
- vue->cpu.psw_fro = 1;
- return VUE_TRUE;
- }
-
- /* Neither operand is a reserved value */
- return VUE_FALSE;
-}
-
-/* Convert a floating short to word */
-static void cpuFloatConvert(Vue *vue, vbool round) {
- int32_t bits; /* Number of bits to shift */
- int32_t digits; /* Significant digits */
- int32_t result; /* Output value */
- int32_t sign; /* Sign of the result */
-
- /* Reserved operand */
- if (cpuFloatReserved(vue, VUE_FALSE))
- return;
-
- /* Parse the floating-point value */
- result = vue->cpu.program[vue->cpu.inst.reg1];
- bits = (result >> 23 & 0xFF) - 150;
- digits = (result & 0x007FFFFF) | 0x00800000;
- sign = result & 0x80000000;
-
- /* Maximum negative word value */
- if (result == (int32_t) 0xCF000000) {
- digits = (int32_t) 0x80000000;
- sign = 0;
- }
-
- /* Invalid operation (word overflow) */
- else if (bits >= 8) {
- vue->cpu.exception = 0xFF70;
- return;
- }
-
- /* Zero */
- else if ((result & 0x7FFFFFFF) == 0)
- digits = 0;
-
- /* No significant digits are shifted out */
- else if (bits >= 0)
- digits <<= bits;
-
- /* All significant digits are shifted out */
- else if (bits < -24) {
- vue->cpu.psw_fpr = 1; /* The implicit leading 1 was lost */
- digits = 0;
- }
-
- /* Some significant digits are shifted out */
- else {
- result = 1 << (-bits - 1); /* Position of the "one half" bit */
- if (digits & ((result << 1) - 1)) /* The lost bits are not all zero */
- vue->cpu.psw_fpr = 1;
- if (round && (digits & result)) /* The "one half" bit is set */
- digits += result;
- digits = digits >> -bits;
- }
-
- /* Common processing */
- result = sign ? -digits : digits;
- vue->cpu.program[vue->cpu.inst.reg2] = result;
- vue->cpu.psw_ov = 0;
- vue->cpu.psw_s = result >> 31 & 1;
- vue->cpu.psw_z = result ? 0 : 1;
-}
-
-/* Floating-point result */
-static void cpuFloatResult(Vue *vue, vbool compare, double full) {
- int32_t bits = 0x7F7FFFFF; /* Binary representation of result */
- float result = *(float *)&bits; /* Operation output */
-
- /* Overflow */
- if (full > result || full < -result) {
- vue->cpu.exception = 0xFF64;
- vue->cpu.psw_fov = 1;
- return;
- }
-
- /* Process the result */
- result = (float) full;
- bits = *(int32_t *)&result;
-
- /* Underflow */
- if ((bits & 0x7F800000) == 0 && (bits & 0x007FFFFF) != 0) {
- bits = 0;
- result = 0;
- vue->cpu.psw_fud = 1;
- }
-
- /* Operations other than compare */
- if (!compare) {
- vue->cpu.program[vue->cpu.inst.reg2] = bits;
- if (result != full) /* Precision degradation */
- vue->cpu.psw_fpr = 1;
- }
-
- /* Common processing */
- vue->cpu.psw_cy = vue->cpu.psw_s = bits >> 31 & 1;
- vue->cpu.psw_ov = 0;
- vue->cpu.psw_z = bits ? 0 : 1;
-}
-
-/* Read a system register */
-static int32_t cpuGetSystemRegister(Vue *vue, int32_t index) {
- switch (index) {
- case VUE_ADTRE: return vue->cpu.adtre;
- case VUE_EIPC : return vue->cpu.eipc;
- case VUE_EIPSW: return vue->cpu.eipsw;
- case VUE_FEPC : return vue->cpu.fepc;
- case VUE_FEPSW: return vue->cpu.fepsw;
- case VUE_ECR : return vue->cpu.ecr_fecc << 16 | vue->cpu.ecr_eicc;
- case VUE_PIR : return 0x00005346;
- case VUE_TKCW : return 0x000000E0;
- case VUE_CHCW : return vue->cpu.chcw_ice << 1;
- case 29 : return vue->cpu.sr29;
- case 30 : return 0x00000004;
- case 31 : return vue->cpu.sr31;
- case VUE_PSW : return
- vue->cpu.psw_i << 16 | vue->cpu.psw_fov << 6 |
- vue->cpu.psw_np << 15 | vue->cpu.psw_fud << 5 |
- vue->cpu.psw_ep << 14 | vue->cpu.psw_fpr << 4 |
- vue->cpu.psw_ae << 13 | vue->cpu.psw_cy << 3 |
- vue->cpu.psw_id << 12 | vue->cpu.psw_ov << 2 |
- vue->cpu.psw_fro << 9 | vue->cpu.psw_s << 1 |
- vue->cpu.psw_fiv << 8 | vue->cpu.psw_z |
- vue->cpu.psw_fzd << 7
- ;
-
- /* Remaining cases to encourage tableswitch */
- case 8: case 9: case 10: case 11: case 12: case 13: case 14:
- case 15: case 16: case 17: case 18: case 19: case 20: case 21:
- case 22: case 23: case 26: case 27: case 28:
- return 0;
- }
- return 1; /* Unreachable */
-}
-
-/* Proxy for IN and LD */
-#define cpuIN_LD(vue, type) \
- if (!cpuRead(vue, vue->cpu.program[vue->cpu.inst.reg1] + \
- vue->cpu.inst.disp, type, -1)) \
- vue->cpu.program[vue->cpu.inst.reg2] = vue->cpu.access.value
-
-/* Transfer program to another address */
-static void cpuJump(Vue *vue, int32_t address) {
- int level;
- if (address != vue->cpu.pc) {
- level = vue->cpu.psw_np ? 2 : vue->cpu.psw_ep;
- vue->cpu.jumpFrom[level] = vue->cpu.pc;
- vue->cpu.jumpTo [level] = address;
- }
- vue->cpu.pc = address - vue->cpu.inst.size;
-}
-
-/* Proxy for OUT and ST */
-#define cpuOUT_ST(vue, type) \
- cpuWrite(vue, vue->cpu.program[vue->cpu.inst.reg1] + \
- vue->cpu.inst.disp, type, vue->cpu.program[vue->cpu.inst.reg2])
-
-/* Perform a bus read */
-static vbool cpuRead(Vue *vue, int32_t address, int8_t type, int8_t fetch) {
-
- /* Perform the operation */
- vue->cpu.access.address = address;
- vue->cpu.access.fetch = fetch;
- vue->cpu.access.type = type;
- vue->cpu.access.value = vueRead(vue, address, type);
-
- /* There is no application callback */
- if (vue->onRead == NULL)
- return VUE_FALSE;
-
- /* Call the application callback */
- vue->breakCode = vue->onRead(vue, &vue->cpu.access);
- return vue->breakCode != 0;
-}
-
-/* Write a system register */
-static int32_t cpuSetSystemRegister(Vue *vue, int32_t index, int32_t value,
- vbool debug) {
- switch (index) {
- case VUE_ADTRE: return vue->cpu.adtre = value & 0xFFFFFFFE;
- case VUE_EIPC : return vue->cpu.eipc = value & 0xFFFFFFFE;
- case VUE_EIPSW: return vue->cpu.eipsw = value & 0x000FF3FF;
- case VUE_FEPC : return vue->cpu.fepc = value & 0xFFFFFFFE;
- case VUE_FEPSW: return vue->cpu.fepsw = value & 0x000FF3FF;
- case 29 : return vue->cpu.sr29 = value;
- case 31 : return vue->cpu.sr31 =
- debug || value >= 0 ? value : -value;
-
- case VUE_CHCW :
- vue->cpu.chcw_cen = value >> 20 & 0x00000FFF;
- vue->cpu.chcw_cec = value >> 8 & 0x00000FFF;
- vue->cpu.chcw_sa = value >> 8 & 0x00FFFFFF;
- vue->cpu.chcw_icr = value >> 5 & 1;
- vue->cpu.chcw_icd = value >> 4 & 1;
- vue->cpu.chcw_ice = value >> 1 & 1;
- vue->cpu.chcw_icc = value & 1;
-
- /* Only one of ICC, ICD or ICR is set */
- value &= 0x00000031;
- if ((value & (value - 1)) == 0) {
- /* Clear */
- /* Dump */
- /* Restore */
- }
-
- return vue->cpu.chcw_ice << 1;
-
- case VUE_ECR:
- if (debug) {
- vue->cpu.ecr_fecc = value >> 16 & 0xFFFF;
- vue->cpu.ecr_eicc = value & 0xFFFF;
- }
- return vue->cpu.ecr_fecc << 16 | vue->cpu.ecr_eicc;
-
- case VUE_PSW :
- vue->cpu.psw_i = value >> 16 & 15;
- vue->cpu.psw_np = value >> 15 & 1;
- vue->cpu.psw_ep = value >> 14 & 1;
- vue->cpu.psw_ae = value >> 13 & 1;
- vue->cpu.psw_id = value >> 12 & 1;
- vue->cpu.psw_fro = value >> 9 & 1;
- vue->cpu.psw_fiv = value >> 8 & 1;
- vue->cpu.psw_fzd = value >> 7 & 1;
- vue->cpu.psw_fov = value >> 6 & 1;
- vue->cpu.psw_fud = value >> 5 & 1;
- vue->cpu.psw_fpr = value >> 4 & 1;
- vue->cpu.psw_cy = value >> 3 & 1;
- vue->cpu.psw_ov = value >> 2 & 1;
- vue->cpu.psw_s = value >> 1 & 1;
- vue->cpu.psw_z = value & 1;
- return value & 0x000FF3FF;
-
- /* Remaining cases to encourage tableswitch */
- case 6: case 7: case 8: case 9: case 10: case 11: case 12:
- case 13: case 14: case 15: case 16: case 17: case 18: case 19:
- case 20: case 21: case 22: case 23: case 26: case 27: case 28:
- case 30:
- return 0;
- }
- return 1; /* Unreachable */
-}
-
-/* Arithmetic shift right */
-static void cpuShiftArithmetic(Vue *vue, int32_t value, int32_t bits) {
- bits &= 31;
-
- /* Nothing to do */
- if (bits == 0)
- vue->cpu.psw_cy = 0;
-
- /* Perform the operation */
- else {
- vue->cpu.psw_cy = value >> (bits - 1) & 1;
- value >>= bits;
- bits = 32 - bits;
- value = SIGN_EXTEND(bits, value);
- }
-
- /* Common processing */
- cpuBitwise(vue, value);
-}
-
-/* Logical shift left */
-static void cpuShiftLeft(Vue *vue, int32_t value, int32_t bits) {
- bits &= 31;
-
- /* Nothing to do */
- if (bits == 0)
- vue->cpu.psw_cy = 0;
-
- /* Perform the operation */
- else {
- vue->cpu.psw_cy = value >> (32 - bits) & 1;
- value <<= bits;
- }
-
- /* Commmon processing */
- cpuBitwise(vue, value);
-}
-
-/* Logical shift right */
-static void cpuShiftRight(Vue *vue, int32_t value, int32_t bits) {
- bits &= 31;
-
- /* Nothing to do */
- if (bits == 0)
- vue->cpu.psw_cy = 0;
-
- /* Perform the operation */
- else {
- vue->cpu.psw_cy = value >> (bits - 1) & 1;
- value = value >> bits & ~((uint32_t) 0xFFFFFFFF << (32 - bits));
- }
-
- /* Commmon processing */
- cpuBitwise(vue, value);
-}
-
-/* Integer subtraction */
-static int32_t cpuSubtract(Vue *vue, int left, int right) {
- int32_t result = left - right;
- vue->cpu.psw_cy = (uint32_t) result > (uint32_t) left ? 1 : 0;
- vue->cpu.psw_s = result >> 31 & 1;
- vue->cpu.psw_ov = ((left ^ right) & (left ^ result)) >> 31 & 1;
- vue->cpu.psw_z = result ? 0 : 1;
- return result;
-}
-
-/* Test a condition */
-static int8_t cpuTestCondition(Vue *vue, int32_t condition) {
- switch (condition) {
- case 0: return vue->cpu.psw_ov;
- case 1: return vue->cpu.psw_cy;
- case 2: return vue->cpu.psw_z;
- case 3: return vue->cpu.psw_cy | vue->cpu.psw_z;
- case 4: return vue->cpu.psw_s;
- case 5: return 1;
- case 6: return vue->cpu.psw_ov ^ vue->cpu.psw_s;
- case 7: return (vue->cpu.psw_ov ^ vue->cpu.psw_s) | vue->cpu.psw_z;
- }
- return cpuTestCondition(vue, condition & 7) ^ 1;
-}
-
-/* Perform a bus write */
-static vbool cpuWrite(Vue *vue, int32_t address, int8_t type, int32_t value) {
-
- /* Prepare the operation */
- vue->cpu.access.address = address;
- vue->cpu.access.fetch = -1;
- vue->cpu.access.type = type;
- vue->cpu.access.value = value;
-
- /* Application callback */
- if (vue->onWrite != NULL) {
- vue->breakCode = vue->onWrite(vue, &vue->cpu.access);
- if (vue->breakCode != 0)
- return VUE_TRUE;
- if (vue->cpu.access.type == VUE_CANCEL)
- return VUE_FALSE;
- }
-
- /* Perform the operation */
- vueWrite(vue, vue->cpu.access.address,
- vue->cpu.access.type, vue->cpu.access.value);
- return VUE_FALSE;
-}
-
-
-
-/*****************************************************************************
- * Instruction Functions *
- *****************************************************************************/
-
-/* Add Immediate */
-#define cpuADD_IMM(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = cpuAdd(vue, \
- vue->cpu.program[vue->cpu.inst.reg2], vue->cpu.inst.imm)
-
-/* Add Register */
-#define cpuADD_REG(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = cpuAdd(vue, \
- vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Add Floating Short */
-#define cpuADDF_S(vue) \
- if (!cpuFloatReserved(vue, VUE_TRUE)) cpuFloatResult(vue, VUE_FALSE, \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg2]) + \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg1]))
-
-/* Add Immediate */
-#define cpuADDI(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = cpuAdd(vue, \
- vue->cpu.program[vue->cpu.inst.reg1], vue->cpu.inst.imm)
-
-/* And */
-#define cpuAND(vue) \
- cpuBitwise(vue, vue->cpu.program[vue->cpu.inst.reg2] & \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* And Immediate */
-#define cpuANDI(vue) \
- cpuBitwise(vue, vue->cpu.program[vue->cpu.inst.reg1] & \
- vue->cpu.inst.imm)
-
-/* Branch on Condition */
-static void cpuBCOND(Vue *vue) {
- if (!cpuTestCondition(vue, vue->cpu.inst.cond & 15))
- return;
- vue->cpu.cycles = 2;
- cpuJump(vue, vue->cpu.pc + vue->cpu.inst.disp);
-}
-
-/* Compare and Exchange Interlocked */
-static void cpuCAXI(Vue *vue) {
- int32_t address =
- vue->cpu.program[vue->cpu.inst.reg1] + vue->cpu.inst.disp;
- int32_t left = vue->cpu.program[vue->cpu.inst.reg2];
- int32_t lock; /* Value of lock word */
-
- /* Retrieve the lock word */
- if (cpuRead(vue, address, VUE_S32, -1))
- return;
- lock = vue->cpu.access.value;
-
- /* Compare and exchange */
- if (lock == left)
- vue->cpu.access.value = vue->cpu.program[30];
- if (cpuWrite(vue, address, VUE_S32, vue->cpu.access.value))
- return;
-
- /* Update CPU state */
- cpuSubtract(vue, left, lock);
- vue->cpu.program[vue->cpu.inst.reg2] = lock;
-}
-
-/* Clear Interrupt Disable Flag */
-#define cpuCLI(vue) \
- vue->cpu.psw_id = 0
-
-/* Compare Immediate */
-#define cpuCMP_IMM(vue) \
- cpuSubtract(vue, \
- vue->cpu.program[vue->cpu.inst.reg2], vue->cpu.inst.imm)
-
-/* Compare Register */
-#define cpuCMP_REG(vue) \
- cpuSubtract(vue, \
- vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Compare Floating Short */
-#define cpuCMPF_S(vue) \
- if (!cpuFloatReserved(vue, VUE_TRUE)) cpuFloatResult(vue, VUE_TRUE, \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg2]) - \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg1]))
-
-/* Convert Short Floating to Word */
-#define cpuCVT_SW(vue) \
- cpuFloatConvert(vue, VUE_TRUE)
-
-/* Convert Word Integer to Short */
-static void cpuCVT_WS(Vue *vue) {
- int32_t bits = vue->cpu.program[vue->cpu.inst.reg1];
- float result = (float) bits;
- vue->cpu.program[vue->cpu.inst.reg2] = *(int32_t *)&result;
- if (result != bits) /* Precision degradation */
- vue->cpu.psw_fpr = 1;
- vue->cpu.psw_cy = vue->cpu.psw_s = bits >> 31 & 1;
- vue->cpu.psw_ov = 0;
- vue->cpu.psw_z = bits ? 0 : 1;
-}
-
-/* Divide */
-static void cpuDIV(Vue *vue) {
- int32_t left = vue->cpu.program[vue->cpu.inst.reg2];
- int32_t right = vue->cpu.program[vue->cpu.inst.reg1];
- int32_t result;
-
- /* Zero division */
- if (right == 0) {
- vue->cpu.exception = 0xFF80;
- return;
- }
-
- /* Special case */
- if ((left == (int32_t) 0x80000000) && (right == (int32_t) 0xFFFFFFFF)) {
- vue->cpu.program[30] = 0;
- vue->cpu.program[vue->cpu.inst.reg2] = 0x80000000;
- vue->cpu.psw_ov = 1;
- vue->cpu.psw_s = 1;
- vue->cpu.psw_z = 0;
- return;
- }
-
- /* Regular case */
- result = left / right;
- vue->cpu.program[30] = left % right;
- vue->cpu.program[vue->cpu.inst.reg2] = result;
- vue->cpu.psw_ov = 0;
- vue->cpu.psw_s = result >> 31 & 1;
- vue->cpu.psw_z = result ? 0 : 1;
-}
-
-/* Divide Floating Short */
-static void cpuDIVF_S(Vue *vue) {
- int32_t left = vue->cpu.program[vue->cpu.inst.reg2];
- int32_t right = vue->cpu.program[vue->cpu.inst.reg1];
-
- /* Reserved operand */
- if (cpuFloatReserved(vue, VUE_TRUE))
- return;
-
- /* An exception has occurred */
- if (!right) {
- vue->cpu.exception = left ? 0xFF68 : 0xFF70;
- return;
- }
-
- /* Perform the operation */
- cpuFloatResult(vue, VUE_FALSE, cpuFloat(left) / cpuFloat(right));
-}
-
-/* Divide Unsigned */
-static void cpuDIVU(Vue *vue) {
- uint32_t left = vue->cpu.program[vue->cpu.inst.reg2];
- uint32_t right = vue->cpu.program[vue->cpu.inst.reg1];
- uint32_t result;
-
- /* Zero division */
- if (right == 0) {
- vue->cpu.exception = 0xFF80;
- return;
- }
-
- /* Regular case */
- result = left / right;
- vue->cpu.program[30] = left % right;
- vue->cpu.program[vue->cpu.inst.reg2] = result;
- vue->cpu.psw_ov = 0;
- vue->cpu.psw_s = result >> 31 & 1;
- vue->cpu.psw_z = result ? 0 : 1;
-}
-
-/* Halt */
-#define cpuHALT(vue) \
- vue->cpu.stage = CPU_HALT; vue->cpu.inst.size = 0
-
-/* Input Byte from Port */
-#define cpuIN_B(vue) cpuIN_LD(vue, VUE_U8)
-
-/* Input Halfword from Port */
-#define cpuIN_H(vue) cpuIN_LD(vue, VUE_U16)
-
-/* Input Word from Port */
-#define cpuIN_W(vue) cpuIN_LD(vue, VUE_S32)
-
-/* Jump and Link */
-#define cpuJAL(vue) \
- vue->cpu.program[31] = vue->cpu.pc + 4; \
- cpuJump(vue, vue->cpu.pc + vue->cpu.inst.disp)
-
-/* Jump Register */
-#define cpuJMP(vue) \
- cpuJump(vue, vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Jump Relative */
-#define cpuJR(vue) \
- cpuJump(vue, vue->cpu.pc + vue->cpu.inst.disp)
-
-/* Load Byte */
-#define cpuLD_B(vue) cpuIN_LD(vue, VUE_S8)
-
-/* Load Halfword */
-#define cpuLD_H(vue) cpuIN_LD(vue, VUE_S16)
-
-/* Load Word */
-#define cpuLD_W(vue) cpuIN_LD(vue, VUE_S32)
-
-/* Load to System Register */
-#define cpuLDSR(vue) \
- cpuSetSystemRegister(vue, vue->cpu.inst.imm & 31, \
- vue->cpu.program[vue->cpu.inst.reg2], VUE_FALSE)
-
-/* Move Immediate */
-#define cpuMOV_IMM(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = vue->cpu.inst.imm
-
-/* Move Register */
-#define cpuMOV_REG(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = \
- vue->cpu.program[vue->cpu.inst.reg1]
-
-/* Multiply Halfword */
-static void cpuMPYHW(Vue *vue) {
- int32_t right = vue->cpu.program[vue->cpu.inst.reg1];
- vue->cpu.program[vue->cpu.inst.reg2] *= SIGN_EXTEND(17, right);
-}
-
-/* Multiply */
-static void cpuMUL(Vue *vue) {
- int64_t full = (int64_t) vue->cpu.program[vue->cpu.inst.reg2] *
- (int64_t) vue->cpu.program[vue->cpu.inst.reg1];
- int32_t lower = (int32_t) full;
- vue->cpu.program[30] = (int32_t) (full >> 32);
- vue->cpu.program[vue->cpu.inst.reg2] = lower;
- vue->cpu.psw_ov = (int64_t) lower != full ? 1 : 0;
- vue->cpu.psw_s = lower >> 31 & 1;
- vue->cpu.psw_z = lower ? 0 : 1;
-}
-
-/* Multiply Floating Short */
-#define cpuMULF_S(vue) \
- if (!cpuFloatReserved(vue, VUE_TRUE)) cpuFloatResult(vue, VUE_FALSE, \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg2]) * \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg1]))
-
-/* Multiply Unsigned */
-static void cpuMULU(Vue *vue) {
- uint64_t full = (uint64_t)(uint32_t) vue->cpu.program[vue->cpu.inst.reg2] *
- (uint64_t)(uint32_t) vue->cpu.program[vue->cpu.inst.reg1];
- int32_t lower = (int32_t) full;
- vue->cpu.program[30] = (int32_t) (full >> 32);
- vue->cpu.program[vue->cpu.inst.reg2] = lower;
- vue->cpu.psw_ov = full > (uint32_t) 0xFFFFFFFF ? 1 : 0;
- vue->cpu.psw_s = lower >> 31 & 1;
- vue->cpu.psw_z = lower ? 0 : 1;
-}
-
-/* Add */
-#define cpuMOVEA(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = \
- vue->cpu.program[vue->cpu.inst.reg1] + vue->cpu.inst.imm
-
-/* Add */
-#define cpuMOVHI(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = \
- vue->cpu.program[vue->cpu.inst.reg1] + (vue->cpu.inst.imm << 16)
-
-/* Not */
-#define cpuNOT(vue) \
- cpuBitwise(vue, ~vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Output Byte to Port */
-#define cpuOUT_B(vue) cpuOUT_ST(vue, VUE_U8)
-
-/* Output Halfword to Port */
-#define cpuOUT_H(vue) cpuOUT_ST(vue, VUE_U16)
-
-/* Output Word to Port */
-#define cpuOUT_W(vue) cpuOUT_ST(vue, VUE_S32)
-
-/* Or */
-#define cpuOR(vue) \
- cpuBitwise(vue, vue->cpu.program[vue->cpu.inst.reg2] | \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Or Immediate */
-#define cpuORI(vue) \
- cpuBitwise(vue, vue->cpu.program[vue->cpu.inst.reg1] | \
- vue->cpu.inst.imm)
-
-/* Return from Trap or Interrupt */
-static void cpuRETI(Vue *vue) {
- if (vue->cpu.psw_np) {
- vue->cpu.pc = vue->cpu.fepc;
- cpuSetSystemRegister(vue, VUE_PSW, vue->cpu.fepsw, VUE_FALSE);
- } else {
- vue->cpu.pc = vue->cpu.eipc;
- cpuSetSystemRegister(vue, VUE_PSW, vue->cpu.eipsw, VUE_FALSE);
- }
-}
-
-/* Shift Arithmetic Right by Immediate */
-#define cpuSAR_IMM(vue) \
- cpuShiftArithmetic(vue, vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.inst.imm)
-
-/* Shift Arithmetic Right by Register */
-#define cpuSAR_REG(vue) \
- cpuShiftArithmetic(vue, vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Set Interrupt Disable Flag */
-#define cpuSEI(vue) \
- vue->cpu.psw_id = 1
-
-/* Set Flag Condition */
-#define cpuSETF(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = \
- cpuTestCondition(vue, vue->cpu.inst.imm & 15)
-
-/* Shift Logical Left by Immediate */
-#define cpuSHL_IMM(vue) \
- cpuShiftLeft(vue, vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.inst.imm)
-
-/* Shift Logical Left by Register */
-#define cpuSHL_REG(vue) \
- cpuShiftLeft(vue, vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Shift Logical Right by Immediate */
-#define cpuSHR_IMM(vue) \
- cpuShiftRight(vue, vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.inst.imm)
-
-/* Shift Logical Right by Register */
-#define cpuSHR_REG(vue) \
- cpuShiftRight(vue, vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Reverse Bits in Word */
-static void cpuREV(Vue *vue) {
- int32_t value = vue->cpu.program[vue->cpu.inst.reg1];
- value = (value >> 16 & 0x0000FFFF) | value << 16;
- value = (value >> 8 & 0x00FF00FF) | (value << 8 & 0xFF00FF00);
- value = (value >> 4 & 0x0F0F0F0F) | (value << 4 & 0xF0F0F0F0);
- value = (value >> 2 & 0x33333333) | (value << 2 & 0xCCCCCCCC);
- value = (value >> 1 & 0x55555555) | (value << 1 & 0xAAAAAAAA);
- vue->cpu.program[vue->cpu.inst.reg2] = value;
-}
-
-/* Store Byte */
-#define cpuST_B(vue) cpuOUT_ST(vue, VUE_S8)
-
-/* Store Halfword */
-#define cpuST_H(vue) cpuOUT_ST(vue, VUE_S16)
-
-/* Store Word */
-#define cpuST_W(vue) cpuOUT_ST(vue, VUE_S32)
-
-/* Store Contents of System Register */
-#define cpuSTSR(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = \
- cpuGetSystemRegister(vue, vue->cpu.inst.imm & 31)
-
-/* Subtract */
-#define cpuSUB(vue) \
- vue->cpu.program[vue->cpu.inst.reg2] = cpuSubtract(vue, \
- vue->cpu.program[vue->cpu.inst.reg2], \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Subtract Floating Short */
-#define cpuSUBF_S(vue) \
- if (!cpuFloatReserved(vue, VUE_TRUE)) cpuFloatResult(vue, VUE_FALSE, \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg2]) - \
- cpuFloat(vue->cpu.program[vue->cpu.inst.reg1]))
-
-/* Trap */
-#define cpuTRAP(vue) \
- vue->cpu.exception = 0xFFA0 | (vue->cpu.inst.imm & 15); \
- vue->cpu.pc += 2
-
-/* Truncate Short Floating to Word */
-#define cpuTRNC_SW(vue) \
- cpuFloatConvert(vue, VUE_FALSE)
-
-/* Exchange Byte */
-static void cpuXB(Vue *vue) {
- int32_t value = vue->cpu.program[vue->cpu.inst.reg2];
- vue->cpu.program[vue->cpu.inst.reg2] =
- (value & 0xFFFF0000) | (value >> 8 & 0xFF) | (value & 0xFF) << 8;
-}
-
-/* Exchange Halfword */
-static void cpuXH(Vue *vue) {
- int32_t value = vue->cpu.program[vue->cpu.inst.reg2];
- vue->cpu.program[vue->cpu.inst.reg2] =
- (value >> 16 & 0xFFFF) | value << 16;
-}
-
-/* Exclusive Or */
-#define cpuXOR(vue) \
- cpuBitwise(vue, vue->cpu.program[vue->cpu.inst.reg2] ^ \
- vue->cpu.program[vue->cpu.inst.reg1])
-
-/* Exclusive Or Immediate */
-#define cpuXORI(vue) \
- cpuBitwise(vue, vue->cpu.program[vue->cpu.inst.reg1] ^ \
- vue->cpu.inst.imm)
-
-
-
-/*****************************************************************************
- * Stage Functions *
- *****************************************************************************/
-
-/* Decode an instruction from its binary encoding */
-static void cpuDecode(VueInstruction *inst) {
- int8_t extend; /* Sign-extend the immediate operand */
- int32_t x; /* Working variable */
-
- /* Configure instance fields */
- inst->opcode = inst->bits >> 26 & 63;
- x = inst->opcode << 1;
- inst->id = LOOKUP_OPCODE[x ];
- extend = LOOKUP_OPCODE[x + 1];
- inst->format = extend < 0 ? -extend : extend;
- inst->size = inst->format < 4 ? 2 : 4;
-
- /* Decode by format */
- switch (inst->format) {
- case 1:
- inst->reg2 = inst->bits >> 21 & 31;
- inst->reg1 = inst->bits >> 16 & 31;
- break;
- case 2:
- x = inst->bits >> 16 & 31;
- inst->reg2 = inst->bits >> 21 & 31;
- inst->imm = extend < 0 ? SIGN_EXTEND(5, x) : x;
- if (inst->id == BITSTRING) {
- inst->id = x >= 16 ? VUE_ILLEGAL : LOOKUP_BITSTRING[x];
- inst->subopcode = x;
- }
- if (inst->id == VUE_SETF)
- inst->cond = x & 15;
- break;
- case 3:
- x = inst->bits >> 16 & 0x1FF;
- inst->opcode = 0x20;
- inst->cond = inst->bits >> 25 & 15;
- inst->disp = SIGN_EXTEND(9, x);
- break;
- case 4:
- x = inst->bits & 0x3FFFFFF;
- inst->disp = SIGN_EXTEND(26, x);
- break;
- case 5:
- x = inst->bits & 0xFFFF;
- inst->reg2 = inst->bits >> 21 & 31;
- inst->reg1 = inst->bits >> 16 & 31;
- inst->imm = extend < 0 ? SIGN_EXTEND(16, x) : x;
- break;
- case 6:
- x = inst->bits & 0xFFFF;
- inst->reg2 = inst->bits >> 21 & 31;
- inst->reg1 = inst->bits >> 16 & 31;
- inst->disp = SIGN_EXTEND(16, x);
- break;
- case 7:
- inst->reg2 = inst->bits >> 21 & 31;
- inst->reg1 = inst->bits >> 16 & 31;
- inst->subopcode = inst->bits >> 10 & 63;
- inst->id = inst->subopcode >= 16 ? VUE_ILLEGAL :
- LOOKUP_FLOATENDO[inst->subopcode];
- break;
- }
-
-}
-
-/* Operations for exception stage */
-static vbool cpuException(Vue *vue) {
- vbool isIRQ; /* The exception is an interrupt */
- int32_t psw; /* Current value of PSW */
-
- /* Application callback */
- if (vue->onException != NULL) {
- vue->breakCode = vue->onException(vue, vue->cpu.exception);
- if (vue->breakCode != 0)
- return VUE_TRUE;
- }
-
- /* Configure working variables */
- vue->cpu.exception &= 0xFFFF;
- isIRQ = (vue->cpu.exception & 0xFF00) == 0xFE00;
- psw = cpuGetSystemRegister(vue, VUE_PSW);
-
- /* Fatal exception */
- if (vue->cpu.psw_np != 0) {
- vueWrite(vue, 0x00000000, VUE_S32, 0xFFFF0000 | vue->cpu.exception);
- vueWrite(vue, 0x00000004, VUE_S32, psw);
- vueWrite(vue, 0x00000008, VUE_S32, vue->cpu.pc);
- vue->cpu.stage = CPU_FATAL;
- return VUE_TRUE;
- }
-
- /* Duplexed exception */
- if (vue->cpu.psw_ep != 0) {
- vue->cpu.ecr_fecc = vue->cpu.exception;
- vue->cpu.fepc = vue->cpu.pc;
- vue->cpu.fepsw = psw;
- vue->cpu.psw_np = 1;
- vue->cpu.pc = 0xFFFFFFD0;
- }
-
- /* Regular exception */
- else {
- vue->cpu.ecr_eicc = vue->cpu.exception;
- vue->cpu.eipc = vue->cpu.pc;
- vue->cpu.eipsw = psw;
- vue->cpu.psw_ep = 1;
- vue->cpu.pc = 0xFFFF0000 | (vue->cpu.exception & 0xFFF0);
- if (vue->cpu.pc == (int32_t) 0xFFFFFF70) /* FIV */
- vue->cpu.pc = 0xFFFFFF60;
- }
-
- /* Interrupt */
- if (isIRQ) {
- psw = vue->cpu.exception >> 4 & 15;
- vue->cpu.psw_i = psw < 15 ? psw : 15;
- if (vue->cpu.stage == CPU_HALT)
- vue->cpu.pc += 2;
- }
-
- /* Common processing */
- vue->cpu.cycles = 0; /* TODO: Determine the actual number */
- vue->cpu.exception = 0;
- vue->cpu.psw_ae = 0;
- vue->cpu.psw_id = 1;
- vue->cpu.stage = CPU_FETCH;
- return VUE_FALSE;
-}
-
-/* Check for an exception or interrupt */
-static vbool cpuTestException(Vue *vue) {
- int32_t level; /* Interrupt level */
-
- /* Check for an interrupt */
- if (vue->cpu.irq != 0 && (vue->cpu.exception |
- vue->cpu.psw_id | vue->cpu.psw_ep | vue->cpu.psw_np) == 0) {
- for (level = 4; level >= 0; level--)
- if ((vue->cpu.irq >> level & 1) != 0)
- break;
- vue->cpu.exception = 0xFE00 | level << 4;
- }
-
- /* There is no exception */
- if (vue->cpu.exception == 0) /* No further processing */
- return vue->cpu.stage == CPU_HALT && vue->cpu.cycles == 0;
-
- /* An exception has occurred */
- vue->cpu.cycles = 0;
- vue->cpu.stage = CPU_EXCEPTION;
- return VUE_FALSE;
-}
-
-/* Operations for execute stage */
-static vbool cpuExecute(Vue *vue) {
-
- /* Application callback */
- if (vue->onExecute != NULL) {
- vue->breakCode = vue->onExecute(vue, &vue->cpu.inst);
- if (vue->breakCode != 0)
- return VUE_TRUE;
- }
-
- /* Processing by instruction ID */
- switch (vue->cpu.inst.id) {
- case VUE_ADD_IMM: cpuADD_IMM(vue); break;
- case VUE_ADD_REG: cpuADD_REG(vue); break;
- case VUE_ADDF_S : cpuADDF_S (vue); break;
- case VUE_ADDI : cpuADDI (vue); break;
- case VUE_AND : cpuAND (vue); break;
- /*case VUE_ANDBSU : cpuANDBSU (vue); break;*/
- case VUE_ANDI : cpuANDI (vue); break;
- /*case VUE_ANDNBSU: cpuANDNBSU(vue); break;*/
- case VUE_BCOND : cpuBCOND (vue); break;
- case VUE_CAXI : cpuCAXI (vue); break;
- case VUE_CLI : cpuCLI (vue); break;
- case VUE_CMP_IMM: cpuCMP_IMM(vue); break;
- case VUE_CMP_REG: cpuCMP_REG(vue); break;
- case VUE_CMPF_S : cpuCMPF_S (vue); break;
- case VUE_CVT_SW : cpuCVT_SW (vue); break;
- case VUE_CVT_WS : cpuCVT_WS (vue); break;
- case VUE_DIV : cpuDIV (vue); break;
- case VUE_DIVF_S : cpuDIVF_S (vue); break;
- case VUE_DIVU : cpuDIVU (vue); break;
- case VUE_HALT : cpuHALT (vue); break;
- case VUE_IN_B : cpuIN_B (vue); break;
- case VUE_IN_H : cpuIN_H (vue); break;
- case VUE_IN_W : cpuIN_W (vue); break;
- case VUE_JAL : cpuJAL (vue); break;
- case VUE_JMP : cpuJMP (vue); break;
- case VUE_JR : cpuJR (vue); break;
- case VUE_LD_B : cpuLD_B (vue); break;
- case VUE_LD_H : cpuLD_H (vue); break;
- case VUE_LD_W : cpuLD_W (vue); break;
- case VUE_LDSR : cpuLDSR (vue); break;
- case VUE_MOV_IMM: cpuMOV_IMM(vue); break;
- case VUE_MOV_REG: cpuMOV_REG(vue); break;
- /*case VUE_MOVBSU : cpuMOVBSU (vue); break;*/
- case VUE_MOVEA : cpuMOVEA (vue); break;
- case VUE_MOVHI : cpuMOVHI (vue); break;
- case VUE_MPYHW : cpuMPYHW (vue); break;
- case VUE_MUL : cpuMUL (vue); break;
- case VUE_MULF_S : cpuMULF_S (vue); break;
- case VUE_MULU : cpuMULU (vue); break;
- case VUE_NOT : cpuNOT (vue); break;
- /*case VUE_NOTBSU : cpuNOTBSU (vue); break;*/
- case VUE_OR : cpuOR (vue); break;
- /*case VUE_ORBSU : cpuORBSU (vue); break;*/
- case VUE_ORI : cpuORI (vue); break;
- /*case VUE_ORNBSU : cpuORNBSU (vue); break;*/
- case VUE_OUT_B : cpuOUT_B (vue); break;
- case VUE_OUT_H : cpuOUT_H (vue); break;
- case VUE_OUT_W : cpuOUT_W (vue); break;
- case VUE_RETI : cpuRETI (vue); break;
- case VUE_REV : cpuREV (vue); break;
- case VUE_SAR_IMM: cpuSAR_IMM(vue); break;
- case VUE_SAR_REG: cpuSAR_REG(vue); break;
- /*case VUE_SCH0BSD: cpuSCH0BSD(vue); break;*/
- /*case VUE_SCH0BSU: cpuSCH0BSU(vue); break;*/
- /*case VUE_SCH1BSD: cpuSCH1BSD(vue); break;*/
- /*case VUE_SCH1BSU: cpuSCH1BSU(vue); break;*/
- case VUE_SEI : cpuSEI (vue); break;
- case VUE_SETF : cpuSETF (vue); break;
- case VUE_SHL_IMM: cpuSHL_IMM(vue); break;
- case VUE_SHL_REG: cpuSHL_REG(vue); break;
- case VUE_SHR_IMM: cpuSHR_IMM(vue); break;
- case VUE_SHR_REG: cpuSHR_REG(vue); break;
- case VUE_ST_B : cpuST_B (vue); break;
- case VUE_ST_H : cpuST_H (vue); break;
- case VUE_ST_W : cpuST_W (vue); break;
- case VUE_STSR : cpuSTSR (vue); break;
- case VUE_SUB : cpuSUB (vue); break;
- case VUE_SUBF_S : cpuSUBF_S (vue); break;
- case VUE_TRAP : cpuTRAP (vue); break;
- case VUE_TRNC_SW: cpuTRNC_SW(vue); break;
- case VUE_XB : cpuXB (vue); break;
- case VUE_XH : cpuXH (vue); break;
- case VUE_XOR : cpuXOR (vue); break;
- /*case VUE_XORBSU : cpuXORBSU (vue); break;*/
- case VUE_XORI : cpuXORI (vue); break;
- /*case VUE_XORNBSU: cpuXORNBSU(vue); break;*/
- default: /* Invalid instruction */
- vue->cpu.exception = 0xFF90;
- }
-
- /* An application break was requested */
- if (vue->breakCode != 0)
- return VUE_TRUE;
-
- /* Common processing */
- if (vue->cpu.exception == 0) {
- vue->cpu.cycles += CYCLES[vue->cpu.inst.id];
- vue->cpu.pc += vue->cpu.inst.size;
- }
- vue->cpu.program[0] = 0;
- cpuTestException(vue);
- if (vue->cpu.stage == CPU_EXECUTE)
- vue->cpu.stage = CPU_FETCH;
- return VUE_FALSE;
-}
-
-/* Determine the size of an instruction given its opcode */
-static int32_t cpuSize(int32_t opcode) {
- int32_t ret = LOOKUP_OPCODE[opcode << 1 | 1];
- return (ret < 0 ? -ret : ret) < 4 ? 2 : 4;
-}
-
-/* Operations for fetch stage */
-static vbool cpuFetch(Vue *vue) {
-
- /* Entering the fetch stage */
- if (vue->cpu.fetch == -1)
- vue->cpu.fetch = 0;
-
- /* Read the bits from the bus */
- if (cpuRead(vue, vue->cpu.pc + (vue->cpu.fetch << 1),
- VUE_U16, vue->cpu.fetch))
- return VUE_TRUE;
- /* TODO: Determine how many cycles this takes */
-
- /* First unit */
- if (vue->cpu.fetch == 0) {
- vue->cpu.inst.bits = vue->cpu.access.value << 16;
- if (cpuSize(vue->cpu.access.value >> 10) == 4) {
- vue->cpu.fetch = 1;
- return VUE_FALSE;
- }
- }
-
- /* Second unit */
- else {
- vue->cpu.inst.bits |= vue->cpu.access.value;
- vue->cpu.fetch = -1;
- }
-
- /* Decode the instruction and advance to execute stage */
- cpuDecode(&vue->cpu.inst);
- vue->cpu.stage = CPU_EXECUTE;
- return VUE_FALSE;
-}
-
-
-
-/*****************************************************************************
-* Internal Functions *
-******************************************************************************/
-
-/* Process the simulation */
-static void cpuEmulate(Vue *vue, uint32_t cycles) {
-
- /* The CPU is in fatal halt status */
- if (vue->cpu.stage == CPU_FATAL)
- return;
-
- /* Process for the given number of cycles */
- for (;;) {
-
- /* The next stage occurs after the given number of cycles */
- if (vue->cpu.cycles > cycles) {
- vue->cpu.cycles -= cycles;
- return;
- }
-
- /* Processing by stage */
- cycles -= vue->cpu.cycles;
- vue->cpu.cycles = 0;
- switch (vue->cpu.stage) {
- case CPU_EXCEPTION: if (cpuException(vue)) return; break;
- case CPU_EXECUTE : if (cpuExecute (vue)) return; break;
- case CPU_FETCH : if (cpuFetch (vue)) return; break;
- case CPU_HALT : cpuTestException(vue); return;
- }
-
- }
-
-}
-
-/* System reset */
-static void cpuReset(Vue *vue) {
- int32_t x;
-
- /* Configure instance fields */
- vue->cpu.cycles = 0;
- vue->cpu.exception = 0;
- vue->cpu.fetch = -1;
- vue->cpu.irq = 0;
- vue->cpu.stage = CPU_FETCH;
-
- /* Clear all registers (hardware only sets ECR, PC and PSW) */
- for (x = 0; x < 32; x++) {
- vue->cpu.program[x] = 0;
- cpuSetSystemRegister(vue, x, 0, VUE_TRUE);
- }
-
- /* Configure jump history */
- for (x = 0; x < 3; x++)
- vue->cpu.jumpFrom[x] = vue->cpu.jumpTo[x] = 0xFFFFFFF0;
-
- /* Configure registers */
- vue->cpu.ecr_eicc = 0xFFF0;
- vue->cpu.pc = 0xFFFFFFF0;
- vue->cpu.psw_np = 1;
-}
-
-/* Determine the number of CPU cycles until a breakpoint could trigger */
-static uint32_t cpuUntil(Vue *vue, uint32_t cycles) {
- return vue->cpu.stage == CPU_FATAL || vue->cpu.stage == CPU_HALT ?
- cycles : cycles < vue->cpu.cycles ? cycles : vue->cpu.cycles;
-}
-
-
-
-#endif
diff --git a/src/core/gamepak.c b/src/core/gamepak.c
deleted file mode 100644
index 01a39f6..0000000
--- a/src/core/gamepak.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* This file is included through vue.c and cannot be built directly. */
-#ifdef VUEAPI
-
-/*****************************************************************************
- * Module Functions *
- *****************************************************************************/
-
-/* System reset */
-static void pakReset(Vue *vue) {
- vue->pak.wcr_exp1w = 0;
- vue->pak.wcr_rom1w = 0;
-}
-
-#endif
diff --git a/src/core/include/vue.h b/src/core/include/vue.h
deleted file mode 100644
index 35e5cb7..0000000
--- a/src/core/include/vue.h
+++ /dev/null
@@ -1,295 +0,0 @@
-#ifndef __VUE_H__
-#define __VUE_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* API management */
-#ifndef VUEAPI
-#define VUEAPI extern
-#endif
-
-/* Header includes */
-#include
-#include
-
-
-
-/*****************************************************************************
- * Constants *
- *****************************************************************************/
-
-/* Boolean values */
-#define VUE_FALSE 0
-#define VUE_TRUE 1
-
-/* Memory access types */
-#define VUE_S8 0
-#define VUE_U8 1
-#define VUE_S16 2
-#define VUE_U16 3
-#define VUE_S32 4
-#define VUE_CANCEL 5
-
-/* System register indexes */
-#define VUE_ADTRE 25
-#define VUE_CHCW 24
-#define VUE_ECR 4
-#define VUE_EIPC 0
-#define VUE_EIPSW 1
-#define VUE_FEPC 2
-#define VUE_FEPSW 3
-#define VUE_PIR 6
-#define VUE_PSW 5
-#define VUE_TKCW 7
-
-/* Non-standard register indexes */
-#define VUE_PC -1
-#define VUE_JUMP_FROM -2
-#define VUE_JUMP_TO -3
-
-/* Program register indexes */
-#define VUE_GP 4
-#define VUE_HP 2
-#define VUE_LP 31
-#define VUE_SP 3
-#define VUE_TP 5
-
-/* Instruction IDs */
-#define VUE_ILLEGAL -1
-#define VUE_ADD_IMM 0
-#define VUE_ADD_REG 1
-#define VUE_ADDF_S 2
-#define VUE_ADDI 3
-#define VUE_AND 4
-#define VUE_ANDBSU 5
-#define VUE_ANDI 6
-#define VUE_ANDNBSU 7
-#define VUE_BCOND 8
-#define VUE_CAXI 9
-#define VUE_CLI 10
-#define VUE_CMP_IMM 11
-#define VUE_CMP_REG 12
-#define VUE_CMPF_S 13
-#define VUE_CVT_SW 14
-#define VUE_CVT_WS 15
-#define VUE_DIV 16
-#define VUE_DIVF_S 17
-#define VUE_DIVU 18
-#define VUE_HALT 19
-#define VUE_IN_B 20
-#define VUE_IN_H 21
-#define VUE_IN_W 22
-#define VUE_JAL 23
-#define VUE_JMP 24
-#define VUE_JR 25
-#define VUE_LD_B 26
-#define VUE_LD_H 27
-#define VUE_LD_W 28
-#define VUE_LDSR 29
-#define VUE_MOV_IMM 30
-#define VUE_MOV_REG 31
-#define VUE_MOVBSU 32
-#define VUE_MOVEA 33
-#define VUE_MOVHI 34
-#define VUE_MPYHW 35
-#define VUE_MUL 36
-#define VUE_MULF_S 37
-#define VUE_MULU 38
-#define VUE_NOT 39
-#define VUE_NOTBSU 40
-#define VUE_OR 41
-#define VUE_ORBSU 42
-#define VUE_ORI 43
-#define VUE_ORNBSU 44
-#define VUE_OUT_B 45
-#define VUE_OUT_H 46
-#define VUE_OUT_W 47
-#define VUE_RETI 48
-#define VUE_REV 49
-#define VUE_SAR_IMM 50
-#define VUE_SAR_REG 51
-#define VUE_SCH0BSD 52
-#define VUE_SCH0BSU 53
-#define VUE_SCH1BSD 54
-#define VUE_SCH1BSU 55
-#define VUE_SEI 56
-#define VUE_SETF 57
-#define VUE_SHL_IMM 58
-#define VUE_SHL_REG 59
-#define VUE_SHR_IMM 60
-#define VUE_SHR_REG 61
-#define VUE_ST_B 62
-#define VUE_ST_H 63
-#define VUE_ST_W 64
-#define VUE_STSR 65
-#define VUE_SUB 66
-#define VUE_SUBF_S 67
-#define VUE_TRAP 68
-#define VUE_TRNC_SW 69
-#define VUE_XB 70
-#define VUE_XH 71
-#define VUE_XOR 72
-#define VUE_XORBSU 73
-#define VUE_XORI 74
-#define VUE_XORNBSU 75
-
-
-
-/*****************************************************************************
- * Types *
- *****************************************************************************/
-
-/* Forward references */
-typedef struct Vue Vue;
-
-/* Boolean */
-typedef int vbool;
-
-/* Access state */
-typedef struct {
- uint32_t address; /* CPU bus address */
- int32_t value; /* Value read/to write */
- int8_t fetch; /* Index of machine code unit */
- int8_t type; /* Data type */
-} VueAccess;
-
-/* Instruction state */
-typedef struct {
- int32_t bits; /* Binary encoding */
- int32_t disp; /* Displacement for jumps and branches */
- int32_t imm; /* Immediate operand */
- uint8_t cond; /* Condition for Bcond */
- int8_t format; /* Binary format */
- int8_t id; /* Library-specific identifier */
- uint8_t opcode; /* Instruction opcode */
- uint8_t reg1; /* Source/right register */
- uint8_t reg2; /* Destination/left register */
- uint8_t size; /* Number of bytes in encoding */
- uint8_t subopcode; /* Instruction subopcode */
-} VueInstruction;
-
-/* Breakpoint handler callbacks */
-typedef int32_t (*VueOnAccess )(Vue *, VueAccess *);
-typedef int32_t (*VueOnException)(Vue *, uint16_t );
-typedef int32_t (*VueOnExecute )(Vue *, VueInstruction *);
-typedef int32_t (*VueOnFrame )(Vue * );
-
-/* Emulation state */
-struct Vue {
- void *tag; /* Application reference */
- int32_t breakCode; /* Application break code */
- uint8_t wram[0x10000]; /* System memory */
-
- /* Breakpoint handlers */
- VueOnException onException;
- VueOnExecute onExecute;
- VueOnFrame onFrame;
- VueOnAccess onRead;
- VueOnAccess onWrite;
-
- /* CPU state */
- struct {
- VueAccess access; /* Access state */
- VueInstruction inst; /* Instruction state */
- uint32_t cycles; /* Cycles until next stage */
- int32_t jumpFrom[3]; /* Source PCs of most recent jumps */
- int32_t jumpTo [3]; /* Destination PCs of most recent jumps */
- uint16_t exception; /* Exception code */
- uint16_t irq; /* Interrupt lines */
- int fetch; /* Fetch unit index */
- int stage; /* Current processing stage */
-
- /* Program registers */
- int32_t program[32];
-
- /* System registers */
- int32_t adtre; /* Address Trap Register for Execution */
- int32_t eipc; /* Exception/interrupt PC */
- int32_t eipsw; /* Exception/interrupt PSW */
- int32_t fepc; /* Duplexed exception PC */
- int32_t fepsw; /* Duplexed exception PSW */
- int32_t pc; /* Program Counter */
- int32_t sr29; /* System register 29 */
- int32_t sr31; /* System register 31 */
-
- /* Program Status Word */
- int8_t psw_ae; /* Address Trap Enable */
- int8_t psw_ep; /* Exception Pending */
- int8_t psw_id; /* Interrupt Disable */
- int8_t psw_cy; /* Carry */
- int8_t psw_fiv; /* Floating Reserved Operand */
- int8_t psw_fov; /* Floating Overflow */
- int8_t psw_fpr; /* Floating Precision */
- int8_t psw_fro; /* Floating Reserved Operand */
- int8_t psw_fud; /* Floating Underflow */
- int8_t psw_fzd; /* Floating Zero Divide */
- int8_t psw_i; /* Interrupt Level */
- int8_t psw_np; /* NMI Pending */
- int8_t psw_ov; /* Overflow */
- int8_t psw_s; /* Sign */
- int8_t psw_z; /* Zero */
-
- /* Cache Control Word */
- uint16_t chcw_cec; /* Clear Entry Count */
- uint16_t chcw_cen; /* Clear Entry Number */
- int8_t chcw_icc; /* Instruction Cache Clear */
- int8_t chcw_icd; /* Instruction Cache Dump */
- int8_t chcw_ice; /* Instruction Cache Enable */
- int8_t chcw_icr; /* Instruction Cache Restore */
- int32_t chcw_sa; /* Spill-Out Base Address */
-
- /* Exception Cause Register */
- uint16_t ecr_eicc; /* Exception/Interrupt Cause Code */
- uint16_t ecr_fecc; /* Fatal Error Cause Code */
- } cpu;
-
- /* Game pak state */
- struct {
- uint8_t *ram; /* Cartridge SRAM */
- uint32_t ramSize; /* Number of bytes in cartridge SRAM */
- uint8_t *rom; /* Cartridge ROM */
- uint32_t romSize; /* Number of bytes in cartridge ROM */
- int8_t wcr_exp1w; /* Expansion one-wait mode */
- int8_t wcr_rom1w; /* ROM one-wait mode */
- } pak;
-
- /* VIP state */
- struct {
- uint8_t vram[0x40000]; /* Video memory */
- } vip;
-
-};
-
-
-
-/*****************************************************************************
- * Function Prototypes *
- *****************************************************************************/
-
-VUEAPI uint32_t vueEmulate (Vue *vue, uint32_t maxCycles);
-VUEAPI int32_t vueGetBreakCode (Vue *vue);
-VUEAPI uint16_t vueGetExceptionCode (Vue *vue);
-VUEAPI int32_t vueGetRegister (Vue *vue, int32_t index, vbool system);
-VUEAPI void* vueGetTag (Vue *vue);
-VUEAPI void vueInitialize (Vue *vue);
-VUEAPI VueOnException vueOnException (Vue *vue, VueOnException callback);
-VUEAPI VueOnExecute vueOnExecute (Vue *vue, VueOnExecute callback);
-VUEAPI VueOnFrame vueOnFrame (Vue *vue, VueOnFrame callback);
-VUEAPI VueOnAccess vueOnRead (Vue *vue, VueOnAccess callback);
-VUEAPI VueOnAccess vueOnWrite (Vue *vue, VueOnAccess callback);
-VUEAPI int32_t vueRead (Vue *vue, uint32_t address, int32_t type);
-VUEAPI vbool vueReadBytes (Vue *vue, uint32_t address, uint8_t *dest, uint32_t length);
-VUEAPI void vueReset (Vue *vue);
-VUEAPI int32_t vueSetRegister (Vue *vue, int32_t index, vbool system, int32_t value);
-VUEAPI vbool vueSetROM (Vue *vue, uint8_t *rom, uint32_t size);
-VUEAPI void* vueSetTag (Vue *vue, void *tag);
-VUEAPI void vueWrite (Vue *vue, uint32_t address, int32_t type, int32_t value);
-VUEAPI vbool vueWriteBytes (Vue *vue, uint32_t address, uint8_t *src, uint32_t length);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __VUE_H__ */
diff --git a/src/core/vip.c b/src/core/vip.c
deleted file mode 100644
index b60b69f..0000000
--- a/src/core/vip.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/* This file is included through vue.c and cannot be built directly. */
-#ifdef VUEAPI
-
-
-
-/*****************************************************************************
-* Internal Functions *
-******************************************************************************/
-
-/* Process the simulation */
-static void vipEmulate(Vue *vue, uint32_t cycles) {
- vue = vue;
- cycles = cycles;
-}
-
-/* Read an I/O register */
-static int32_t vipReadRegister(Vue *vue, int32_t address) {
-vue=vue;
- /* Process by register */
- switch (address & ~1) {
- case 0x0005F800: break; /* INTPND */
- case 0x0005F802: break; /* INTENB */
- case 0x0005F804: break; /* INTCLR */
- case 0x0005F820: break; /* DPSTTS */
- case 0x0005F822: break; /* DPCTRL */
- case 0x0005F824: break; /* BRTA */
- case 0x0005F826: break; /* BRTB */
- case 0x0005F828: break; /* BRTC */
- case 0x0005F82A: break; /* REST */
- case 0x0005F82E: break; /* FRMCYC */
- case 0x0005F830: break; /* CTA */
- case 0x0005F840: break; /* XPSTTS */
- case 0x0005F842: break; /* XPCTRL */
- case 0x0005F844: break; /* VER */
- case 0x0005F848: break; /* SPT0 */
- case 0x0005F84A: break; /* SPT1 */
- case 0x0005F84C: break; /* SPT2 */
- case 0x0005F84E: break; /* SPT3 */
- case 0x0005F860: break; /* GPLT0 */
- case 0x0005F862: break; /* GPLT1 */
- case 0x0005F864: break; /* GPLT2 */
- case 0x0005F866: break; /* GPLT3 */
- case 0x0005F868: break; /* JPLT0 */
- case 0x0005F86A: break; /* JPLT1 */
- case 0x0005F86C: break; /* JPLT2 */
- case 0x0005F86E: break; /* JPLT3 */
- case 0x0005F870: break; /* BKCOL */
- }
-
- /* Unmapped */
- return 0;
-}
-
-/* Read an I/O register */
-static void vipWriteRegister(Vue *vue, int32_t address, int32_t value) {
-vue=vue;
-value=value;
- /* Process by register */
- switch (address & ~1) {
- case 0x0005F800: break; /* INTPND */
- case 0x0005F802: break; /* INTENB */
- case 0x0005F804: break; /* INTCLR */
- case 0x0005F820: break; /* DPSTTS */
- case 0x0005F822: break; /* DPCTRL */
- case 0x0005F824: break; /* BRTA */
- case 0x0005F826: break; /* BRTB */
- case 0x0005F828: break; /* BRTC */
- case 0x0005F82A: break; /* REST */
- case 0x0005F82E: break; /* FRMCYC */
- case 0x0005F830: break; /* CTA */
- case 0x0005F840: break; /* XPSTTS */
- case 0x0005F842: break; /* XPCTRL */
- case 0x0005F844: break; /* VER */
- case 0x0005F848: break; /* SPT0 */
- case 0x0005F84A: break; /* SPT1 */
- case 0x0005F84C: break; /* SPT2 */
- case 0x0005F84E: break; /* SPT3 */
- case 0x0005F860: break; /* GPLT0 */
- case 0x0005F862: break; /* GPLT1 */
- case 0x0005F864: break; /* GPLT2 */
- case 0x0005F866: break; /* GPLT3 */
- case 0x0005F868: break; /* JPLT0 */
- case 0x0005F86A: break; /* JPLT1 */
- case 0x0005F86C: break; /* JPLT2 */
- case 0x0005F86E: break; /* JPLT3 */
- case 0x0005F870: break; /* BKCOL */
- }
-
-}
-
-/* Read a value from the CPU bus */
-static int32_t vipRead(Vue *vue, int32_t address, int32_t type) {
- int32_t value; /* Register value */
- address &= 0x0007FFFF;
-
- /* VRAM */
- if (address < 0x00040000)
- return readBuffer(vue->vip.vram, 0x40000, address, type);
-
- /* Mirrors of character memory */
- if (address >= 0x00078000)
- return readBuffer(vue->vip.vram, 0x40000,
- (address - 0x00078000) >> 13 << 15 | 0x00006000 |
- (address & 0x00001FFF),
- type);
-
- /* I/O register or unmapped */
- value = vipReadRegister(vue, address);
- if (type < 2 && (address & 1) == 1)
- value >>= 8;
- switch (type) {
- case VUE_S8 : return SIGN_EXTEND(value, 8);
- case VUE_U8 : return value & 0x000000FF;
- case VUE_S16: return SIGN_EXTEND(value, 16);
- case VUE_S32: return value | vipReadRegister(vue, address + 2) << 16;
- }
- return value; /* U16 */
-}
-
-/* Read bytes from the CPU bus */
-static void vipReadBytes(Vue *vue, int address, uint8_t *dest, int length) {
- int32_t count, size, value; /* Working variables */
- address &= 0x0007FFFF;
-
- /* Perform the operation */
- while (length > 0) {
-
- /* VRAM */
- if (address < 0x00040000) {
- count = 0x00040000 - address;
- if (length < count)
- count = length;
- readBytes(vue->vip.vram, 0x40000, address, dest, count);
- }
-
- /* Mirrors of character memory */
- else if (address >= 0x00078000) {
- count = 0x2000 - (address & 0x1FFF);
- if (length < count)
- count = length;
- readBytes(vue->vip.vram, 0x40000,
- (address - 0x00078000) >> 13 << 15 | 0x00006000 |
- (address & 0x00001FFF),
- dest, count);
- }
-
- /* I/O register or unmapped */
- else {
- count = 0x00078000 - address;
- if (length < count)
- count = length;
-
- /* Read all registers in the range */
- while (count > 0) {
- value = vipReadRegister(vue, address);
-
- /* Odd address */
- if ((address & 1) == 1) {
- *dest = value >> 8;
- address++;
- count --;
- length --;
- dest ++;
- continue;
- }
-
- /* Even address */
- size = count == 1 ? 1 : 2;
- *dest = value;
- if (size == 2)
- dest[1] = value >> 8;
- address += size;
- count -= size;
- length -= size;
- dest += size;
- }
-
- continue;
- }
-
- /* Advance to the next region */
- address += count;
- length -= count;
- dest += count;
- }
-
-}
-
-/* System reset */
-static void vipReset(Vue *vue) {
- vue = vue;
-}
-
-/* Determine the number of CPU cycles until a breakpoint could trigger */
-static uint32_t vipUntil(Vue *vue, uint32_t cycles) {
- vue = vue;
- return cycles;
-}
-
-/* Write a value to the CPU bus */
-static void vipWrite(Vue *vue, int32_t address, int32_t type, int32_t value) {
- address &= 0x0007FFFF;
-
- /* VRAM */
- if (address < 0x00040000) {
- writeBuffer(vue->vip.vram, 0x40000, address, type, value);
- return;
- }
-
- /* Mirrors of character memory */
- if (address >= 0x00078000) {
- writeBuffer(vue->vip.vram, 0x40000,
- (address - 0x00078000) >> 13 << 15 | 0x00006000 |
- (address & 0x00001FFF),
- type, value);
- return;
- }
-
- /* I/O register or unmapped */
- if (type < 2 && (address & 1) == 1)
- value <<= 8;
- vipWriteRegister(vue, address, value);
- if (type == VUE_S32)
- vipWriteRegister(vue, address + 2, value >> 16);
-}
-
-/* Write bytes to the CPU bus */
-static void vipWriteBytes(Vue *vue, int address, uint8_t *src, int length) {
- int32_t count, size, value; /* Working variables */
- address &= 0x0007FFFF;
-
- /* Perform the operation */
- while (length > 0) {
-
- /* VRAM */
- if (address < 0x00040000) {
- count = 0x00040000 - address;
- if (length < count)
- count = length;
- writeBytes(vue->vip.vram, 0x40000, address, src, count);
- }
-
- /* Mirrors of character memory */
- else if (address >= 0x00078000) {
- count = 0x2000 - (address & 0x1FFF);
- if (length < count)
- count = length;
- writeBytes(vue->vip.vram, 0x40000,
- (address - 0x00078000) >> 13 << 15 | 0x00006000 |
- (address & 0x00001FFF),
- src, count);
- }
-
- /* I/O register or unmapped */
- else {
- count = 0x00078000 - address;
- if (length < count)
- count = length;
-
- /* Read all registers in the range */
- while (count > 0) {
- value = *src;
-
- /* Odd address */
- if ((address & 1) == 1) {
- vipWriteRegister(vue, address, value << 8);
- address++;
- count --;
- length --;
- src ++;
- continue;
- }
-
- /* Even address */
- size = count == 1 ? 1 : 2;
- if (size == 2)
- value |= src[1] << 8;
- vipWriteRegister(vue, address, value);
- address += size;
- count -= size;
- length -= size;
- src += size;
- }
-
- continue;
- }
-
- /* Advance to the next region */
- address += count;
- length -= count;
- src += count;
- }
-
-}
-
-
-
-#endif
diff --git a/src/core/vue.c b/src/core/vue.c
deleted file mode 100644
index 89e123c..0000000
--- a/src/core/vue.c
+++ /dev/null
@@ -1,458 +0,0 @@
-#define VUEAPI
-#include
-
-
-
-/*****************************************************************************
- * Macros *
- *****************************************************************************/
-
-/* Sign-extend a value */
-#define SIGN_EXTEND(bits, value) \
- ((value) & 1 << (bits - 1) ? (value) | (~(1 << bits) + 1) : (value))
-
-
-
-/*****************************************************************************
- * Constants *
- *****************************************************************************/
-
-/* Memory access type sizes */
-static const uint32_t TYPE_SIZES[] = { 1, 1, 2, 2, 4 };
-
-
-
-/*****************************************************************************
- * Module Functions *
- *****************************************************************************/
-
-/* Read a value from a byte buffer */
-static int32_t readBuffer(uint8_t *data, uint32_t datlen, uint32_t address,
- int32_t type) {
- uint32_t size = TYPE_SIZES[type]; /* Size of data type */
- int32_t value = 0;
-
- /* Error checking */
- if (data == NULL)
- return 0;
-
- /* Common processing */
- address &= (~size + 1) & (datlen - 1);
-
- /* The host is little-endian */
- #ifndef VUE_BIGENDIAN
- switch (type) {
- case VUE_S8 : value = *( int8_t *)&data[address]; break;
- case VUE_U8 : value = *(uint8_t *)&data[address]; break;
- case VUE_S16: value = *( int16_t *)&data[address]; break;
- case VUE_U16: value = *(uint16_t *)&data[address]; break;
- case VUE_S32: value = *( int32_t *)&data[address]; break;
- }
-
- /* The host is big-endian */
- #else
- switch (type) {
- case VUE_S32: value =
- data[address + 3] << 24 |
- (data[address + 2] & 0xFF) << 16;
- /* Fallthrough */
- case VUE_S16: /* Fallthrough */
- case VUE_U16: value |=
- (data[address + 1] & 0xFF) << 8;
- /* Fallthrough */
- case VUE_S8 : /* Fallthrough */
- case VUE_U8 : value |=
- data[address ] & 0xFF;
- }
-
- /* Sign-extend the value if appropriate */
- if ((type & 1) == 0) {
- size <<= 3;
- value = SIGN_EXTEND(size, value);
- }
- #endif
-
- return value;
-}
-
-/* Read bytes from a byte buffer */
-static void readBytes(uint8_t *data, uint32_t datlen, uint32_t address,
- uint8_t *dest, uint32_t length) {
-
- /* The source does not exist */
- if (data == NULL) {
- while (length--)
- *dest++ = 0;
- return;
- }
-
- /* Transfer bytes from the source as a circular buffer */
- while (length--)
- *dest++ = data[address++ & (datlen - 1)];
-}
-
-/* Write a value to a byte buffer */
-static void writeBuffer(uint8_t *data, uint32_t datlen, uint32_t address,
- int32_t type, int32_t value) {
- uint32_t size = TYPE_SIZES[type]; /* Size of data type */
-
- /* Error checking */
- if (data == NULL)
- return;
-
- /* Common processing */
- address &= (~size + 1) & (datlen - 1);
-
- /* The host is big-endian */
- #ifdef VUE_BIGENDIAN
- switch (type) {
- case VUE_S32:
- value = (value >> 16 & 0x0000FFFF) | value << 16;
- /* Fallthrough */
- case VUE_S16: /* Fallthrough */
- case VUE_U16:
- value = (value >> 8 & 0x00FF00FF) | (value << 8 & 0xFF00FF00);
- }
- #endif
-
- /* Processing by data type */
- switch (type) {
- case VUE_S8 : /* Fallthrough */
- case VUE_U8 : *(int8_t *)&data[address] = (int8_t ) value; break;
- case VUE_S16: /* Fallthrough */
- case VUE_U16: *(int16_t *)&data[address] = (int16_t ) value; break;
- case VUE_S32: *(int32_t *)&data[address] = (int32_t ) value; break;
- }
-
-}
-
-/* Write bytes to a byte buffer */
-static void writeBytes(uint8_t *data, uint32_t datlen, uint32_t address,
- uint8_t *src, uint32_t length) {
-
- /* The destination does not exist */
- if (data == NULL)
- return;
-
- /* Transfer bytes to the destination as a circular buffer */
- while (length--)
- data[address++ & (datlen - 1)] = *src++;
-}
-
-
-
-/*****************************************************************************
- * Component Includes *
- *****************************************************************************/
-
-#include "cpu.c"
-#include "gamepak.c"
-#include "vip.c"
-
-
-
-/*****************************************************************************
- * Library Functions *
- *****************************************************************************/
-
-/* Process the simulation */
-uint32_t vueEmulate(Vue *vue, uint32_t maxCycles) {
- uint32_t cycles; /* Number of cycles to process */
-
- /* Process up to the given number of cycles */
- do {
-
- /* Determine the number of cycles where no breakpoint will occur */
- cycles = maxCycles; /* min(maxCycles, nextFrameCycles) */
- cycles = cpuUntil (vue, cycles);
- /*cycles = padUntil (vue, cycles);*/
- /*cycles = linkUntil (vue, cycles);*/
- /*cycles = timerUntil(vue, cycles);*/
- cycles = vipUntil (vue, cycles);
-
- /* Process all system components */
- vue->breakCode = 0;
- cpuEmulate (vue, cycles);
- /*padEmulate (vue, cycles);*/
- /*pakEmulate (vue, cycles);*/
- /*linkEmulate (vue, cycles);*/
- /*timerEmulate(vue, cycles);*/
- vipEmulate (vue, cycles);
- /*vsuEmulate (vue, cycles);*/
- maxCycles -= cycles;
- } while (vue->breakCode == 0 && maxCycles != 0);
-
- /* A break condition has occurred */
- return maxCycles;
-}
-
-/* Retrieve the most recent applicaiton break code */
-int32_t vueGetBreakCode(Vue *vue) {
- return vue == NULL ? 0 : vue->breakCode;
-}
-
-/* Retrieve the most recent exception code */
-uint16_t vueGetExceptionCode(Vue *vue) {
- return vue == NULL ? 0 : vue->cpu.exception;
-}
-
-/* Retrieve the value of a register */
-int32_t vueGetRegister(Vue *vue, int32_t index, vbool system) {
-
- /* Error checking */
- if (vue == NULL)
- return 0;
-
- /* Non-indexed registers */
- if (system && index < 0) switch (index) {
- case VUE_JUMP_FROM:
- return vue->cpu.jumpFrom[vue->cpu.psw_np ? 2 : vue->cpu.psw_ep];
- case VUE_JUMP_TO :
- return vue->cpu.jumpTo [vue->cpu.psw_np ? 2 : vue->cpu.psw_ep];
- case VUE_PC : return vue->cpu.pc;
- }
-
- /* Indexed registers */
- return
- index < 0 || index > 31 ? 0 :
- system ? cpuGetSystemRegister(vue, index) :
- vue->cpu.program[index]
- ;
-}
-
-/* Retrieve the application reference */
-void* vueGetTag(Vue *vue) {
- return vue == NULL ? NULL : vue->tag;
-}
-
-/* Prepare an emulation state context for use */
-void vueInitialize(Vue *vue) {
- if (vue == NULL)
- return;
- vue->onException = NULL;
- vue->onExecute = NULL;
- vue->onFrame = NULL;
- vue->onRead = NULL;
- vue->onWrite = NULL;
- vue->pak.ram = NULL;
- vue->pak.rom = NULL;
- vueReset(vue);
-}
-
-/* Specify an exception breakpoint callback */
-VueOnException vueOnException(Vue *vue, VueOnException callback) {
- VueOnException ret;
- if (vue == NULL)
- return NULL;
- ret = vue->onException;
- vue->onException = callback;
- return ret;
-}
-
-/* Specify an execute breakpoint callback */
-VueOnExecute vueOnExecute(Vue *vue, VueOnExecute callback) {
- VueOnExecute ret;
- if (vue == NULL)
- return NULL;
- ret = vue->onExecute;
- vue->onExecute = callback;
- return ret;
-}
-
-/* Specify a frame breakpoint callback */
-VueOnFrame vueOnFrame(Vue *vue, VueOnFrame callback) {
- VueOnFrame ret;
- if (vue == NULL)
- return NULL;
- ret = vue->onFrame;
- vue->onFrame = callback;
- return ret;
-}
-
-/* Specify a read breakpoint callback */
-VueOnAccess vueOnRead(Vue *vue, VueOnAccess callback) {
- VueOnAccess ret;
- if (vue == NULL)
- return NULL;
- ret = vue->onRead;
- vue->onRead = callback;
- return ret;
-}
-
-/* Specify a write breakpoint callback */
-VueOnAccess vueOnWrite(Vue *vue, VueOnAccess callback) {
- VueOnAccess ret;
- if (vue == NULL)
- return NULL;
- ret = vue->onWrite;
- vue->onWrite = callback;
- return ret;
-}
-
-/* Read a value from the CPU bus */
-int32_t vueRead(Vue *vue, uint32_t address, int32_t type) {
-
- /* Error checking */
- if (vue == NULL || type < 0 || type > 4)
- return 0;
-
- /* Perform the operation */
- switch (address >> 24 & 7) {
- case 0: return vipRead (vue , address,type);
- case 5: return readBuffer(vue->wram , 0x10000,address,type);
- case 6: return readBuffer(vue->pak.ram,vue->pak.ramSize,address,type);
- case 7: return readBuffer(vue->pak.rom,vue->pak.romSize,address,type);
- }
- return 0;
-}
-
-/* Read bytes from the CPU bus */
-vbool vueReadBytes(Vue *vue, uint32_t address, uint8_t *dest, uint32_t length){
- uint32_t count; /* Bytes to read in one iteration */
-
- /* Error checking */
- if (vue == NULL || dest == NULL)
- return VUE_FALSE;
-
- /* Perform the operation */
- while (length > 0) {
- count = 0x01000000 - (address & 0x00FFFFFF);
- if (length < count)
- count = length;
- switch (address >> 24 & 7) {
- case 0: vipReadBytes(vue ,
- address, dest, count); break;
- case 5: readBytes(vue->wram , 0x10000,
- address, dest, count); break;
- case 6: readBytes(vue->pak.ram, vue->pak.ramSize,
- address, dest, count); break;
- case 7: readBytes(vue->pak.rom, vue->pak.romSize,
- address, dest, count); break;
- default:
- for (address += count, length -= count; count--;)
- *dest++ = 0;
- continue;
- }
- address += count;
- length -= count;
- dest += count;
- }
- return VUE_TRUE;
-}
-
-/* Initialize all system components */
-void vueReset(Vue *vue) {
- uint32_t x; /* Iterator */
-
- /* Error checking */
- if (vue == NULL)
- return;
-
- /* Reset state */
- cpuReset(vue);
- pakReset(vue);
- for (x = 0; x < 0x10000; x++)
- vue->wram[x] = 0;
-}
-
-/* Specify a value for a register */
-int32_t vueSetRegister(Vue *vue, int32_t index, vbool system, int32_t value) {
-
- /* Error checking */
- if (vue == NULL)
- return 0;
-
- /* PC */
- if (index == VUE_PC && system) {
- if (vue->cpu.stage == CPU_EXECUTE || vue->cpu.stage == CPU_FETCH) {
- vue->cpu.fetch = -1;
- vue->cpu.stage = CPU_FETCH;
- }
- return vue->cpu.pc = value & 0xFFFFFFFE;
- }
-
- /* Other */
- return
- index < 0 || index > 31 ? 0 :
- system ? cpuSetSystemRegister(vue, index, value, VUE_TRUE) :
- index == 0 ? 0 : (vue->cpu.program[index] = value)
- ;
-}
-
-/* Specify a new ROM buffer */
-vbool vueSetROM(Vue *vue, uint8_t *rom, uint32_t size) {
-
- /* Error checking */
- if (
- vue == NULL ||
- rom == NULL ||
- size < 1024 || size > 0x01000000 ||
- (size & (size - 1)) != 0
- ) return VUE_FALSE;
-
- /* Accept the new ROM buffer */
- vue->pak.rom = rom;
- vue->pak.romSize = size;
- return VUE_TRUE;
-}
-
-/* Specify a new application reference */
-void* vueSetTag(Vue *vue, void *tag) {
- void *ret;
- if (vue == NULL)
- return NULL;
- ret = vue->tag;
- vue->tag = tag;
- return ret;
-}
-
-/* Write a value to the CPU bus */
-void vueWrite(Vue *vue, uint32_t address, int32_t type, int32_t value) {
-
- /* Error checking */
- if (vue == NULL)
- return;
-
- /* Perform the operation */
- switch (address >> 24 & 7) {
- case 0: vipWrite(vue ,
- address, type, value); break;
- case 5: writeBuffer(vue->wram , 0x10000,
- address, type, value); break;
- case 6: writeBuffer(vue->pak.ram, vue->pak.ramSize,
- address, type, value); break;
- case 7: writeBuffer(vue->pak.rom, vue->pak.romSize,
- address, type, value); break;
- }
-
-}
-
-/* Write bytes to the CPU bus */
-vbool vueWriteBytes(Vue *vue, uint32_t address, uint8_t *src, uint32_t length){
- uint32_t count; /* Bytes to write in one iteration */
-
- /* Error checking */
- if (vue == NULL || src == NULL)
- return VUE_FALSE;
-
- /* Perform the operation */
- while (length > 0) {
- count = 0x01000000 - (address & 0x00FFFFFF);
- if (length < count)
- count = length;
- switch (address >> 24 & 7) {
- case 0: vipWriteBytes(vue ,
- address, src, count); break;
- case 5: writeBytes(vue->wram , 0x10000,
- address, src, count); break;
- case 6: writeBytes(vue->pak.ram, vue->pak.ramSize,
- address, src, count); break;
- case 7: writeBytes(vue->pak.rom, vue->pak.ramSize,
- address, src, count); break;
- }
- address += count;
- length -= count;
- src += count;
- }
- return VUE_TRUE;
-}
diff --git a/src/desktop/Main.java b/src/desktop/Main.java
deleted file mode 100644
index 2aa4ec5..0000000
--- a/src/desktop/Main.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Java imports
-import java.io.*;
-
-// Project imports
-import app.*;
-import util.*;
-import vue.*;
-
-// Desktop application primary class
-public class Main {
-
- // Program entry point
- public static void main(String[] args) {
-
- // Configure Swing look-and-feel
- Util.setSystemLAF();
-
- // Load the native module, if available
- for (String filename : Util.listFiles("native")) {
- File file = null;
-
- // Skip any file that isn't a shared object library
- if (!filename.endsWith(".dll") && !filename.endsWith(".so"))
- continue;
-
- // Write the contents of the native object file
- FileOutputStream stream = null;
- try {
- file = File.createTempFile("native", "." + filename);
- stream = new FileOutputStream(file);
- stream.write(Util.fileRead("native/" + filename));
- } catch (Exception e) { file = null; }
- try { stream.close(); } catch (Exception e) { }
-
- // Load the native object file into the JVM
- try {
- System.load(file.getAbsolutePath());
- Vue.setNativeID(filename.substring(0,
- filename.lastIndexOf(".")));
- break;
- }
- catch (Error e) { }
- }
-
- // Use the native module
- boolean useNative = false;
- for (String arg : args)
- if (arg.trim().toLowerCase().equals("native"))
- useNative = true;
-
- // Begin application operations
- new App(useNative);
- }
-
-}
diff --git a/src/desktop/app/App.java b/src/desktop/app/App.java
deleted file mode 100644
index 128c923..0000000
--- a/src/desktop/app/App.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// Top-level software state manager
-public class App {
-
- // Instance fields
- private boolean useNative; // Produce native core contexts
- private Localizer.Locale[] locales; // Language translations
- private ArrayList windows; // Application windows
-
- // Configuration fields
- Util.Font fntDialog; // Dialog font
- Util.Font fntMono; // Monospaced font
- int hexDigitWidth; // Width in pixels of one hex digit
- Localizer localizer; // UI localization manager
- int[][] rgbBase; // Base anaglyph filter colors
- int rgbClear; // Transparent pixel color
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Anaglyph presets
- static final int[] RED = { 0xFF, 0x00, 0x00 };
- static final int[] CYAN = { 0x00, 0xC6, 0xF0 };
- static final int[] GREEN = { 0x00, 0xB4, 0x00 };
- static final int[] MAGENTA = { 0xC8, 0x00, 0xFF };
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public App(boolean useNative) {
-
- // Configure instance fields
- localizer = new Localizer();
- windows = new ArrayList();
-
- // Configure config fields
- fntDialog = new Util.Font(new JLabel().getFont());
- fntMono = new Util.Font(new Font(Util.fontFamily(new String[]
- { "Consolas", Font.MONOSPACED } ), Font.PLAIN, 14));
- hexDigitWidth = hexDigitWidth();
- rgbBase = new int[][] {
- Arrays.copyOf(GREEN , 4),
- Arrays.copyOf(MAGENTA, 4),
- Arrays.copyOf(RED , 4)
- };
- rgbClear = 0x555555;
-
- // Additional processing
- setUseNative(useNative);
- initLocales();
- addWindow();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a new program window
- void addWindow() {
- windows.add(new MainWindow(this));
- windowsChanged();
- }
-
- // Determine whether the native module is in use
- boolean getUseNative() {
- return useNative;
- }
-
- // Retrieve a list of registered locales
- Localizer.Locale[] listLocales() {
- var ret = new Localizer.Locale[locales.length];
- System.arraycopy(locales, 0, ret, 0, locales.length);
- return ret;
- }
-
- // Determine the number of a window in the collection
- int numberOf(MainWindow window) {
- return windows.indexOf(window) + 1;
- }
-
- // Remove a program window
- void removeWindow(MainWindow window) {
- windows.remove(window);
- windowsChanged();
- }
-
- // Specify whether using the native module
- boolean setUseNative(boolean useNative) {
- return this.useNative = useNative && Vue.getNativeID() != null;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Calculate the maximum hexadecimal digit width
- private int hexDigitWidth() {
- int width = 0;
- for (var digit : "0123456789ABCDEFabcdef".toCharArray())
- width = Math.max(width, fntMono.metrics.charWidth(digit));
- return width;
- }
-
- // Load and parse all locale translations
- private void initLocales() {
-
- // Process all locale files
- var locales = new HashMap();
- for (String file : Util.listFiles("locale")) {
-
- // Process the file
- try {
- var locale = Localizer.parse(Util.textRead("locale/" + file));
- String key = locale.id.toLowerCase();
-
- // Register the locale
- if (locales.containsKey(key)) throw new RuntimeException(
- "Locale with ID '" + locale.id + "' already registered");
- locales.put(key, locale);
-
- // The locale matches the one in the config
- if (key.equals("en-us"))
- localizer.setLocale(locale);
- }
-
- // Could not process the file
- catch (Exception e) {
- System.err.println("Error parsing locale " +
- file + ": " + e.getMessage());
- }
-
- }
-
- // Produce the list of registered locales
- this.locales = locales.values().toArray(
- new Localizer.Locale[locales.size()]);
- Arrays.sort(this.locales);
-
- // Select a default locale
- if (localizer.getLocale() != null || this.locales.length == 0)
- return;
- var locale = locales.get("en-us");
- localizer.setLocale(locale != null ? locale : this.locales[0]);
- }
-
- // A window has been added to or removed from the program state
- private void windowsChanged() {
- int count = windows.size();
- for (int x = 0; x < count; x++)
- windows.get(x).windowsChanged(x + 1, count == 1);
- }
-
-}
diff --git a/src/desktop/app/BGMapsWindow.java b/src/desktop/app/BGMapsWindow.java
deleted file mode 100644
index aa26540..0000000
--- a/src/desktop/app/BGMapsWindow.java
+++ /dev/null
@@ -1,512 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import java.util.*;
-import javax.swing.*;
-import javax.swing.border.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// VIP backgrounds window
-class BGMapsWindow extends ChildWindow {
-
- // Instance fields
- private int cellIndex; // Current cell index
- private int character; // Cell character index
- private Point dragging; // Most recent pattern mouse position
- private boolean generic; // Use the generic palette
- private boolean grid; // Draw a grid around characters
- private boolean hFlip; // Cell is flipped horizontally
- private int mapIndex; // Current BG map index
- private int palette; // Palette index
- private int[] pix; // Image buffer
- private int scale; // Display scale
- private boolean vFlip; // Cell is flipped vertically
- private BufferedImage image; // BG map graphic
-
- // UI components
- private JCheckBox chkGeneric; // Generic colors check box
- private JCheckBox chkGrid; // Grid check box
- private JCheckBox chkHFlip; // H-flip check box
- private JCheckBox chkVFlip; // V-flip check box
- private UComboBox cmbPalette; // Palette drop-down
- private UPanel client; // Client area
- private UPanel panCell; // Cell panel
- private UPanel panMap; // BG map panel
- private JScrollPane scrControls; // Controls panel
- private JScrollPane scrMap; // BG map container
- private JSlider sldScale; // Scale slider
- private JSpinner spnCellIndex; // Cell index spinner
- private JSpinner spnCharacter; // Character spinner
- private JSpinner spnMapIndex; // BG map index spinner
- private JTextField txtCellAddress; // Cell address text box
- private JTextField txtMapAddress; // BG map address text box
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- BGMapsWindow(MainWindow parent) {
- super(parent, "bg_maps.title");
-
- // Configure instance fields
- generic = false;
- image = new BufferedImage(512, 512, BufferedImage.TYPE_INT_RGB);
- pix = new int[512 * 512];
- scale = 2;
-
- // Configure client area
- client = new UPanel(new BorderLayout());
- client.setBackground(SystemColor.control);
- client.setFocusable(true);
- client.setPreferredSize(new Dimension(480, 360));
- client.addComponentListener(Util.onResize(e->onResize()));
-
- // Configure controls panel
- var ctrls = new UPanel(new GridBagLayout());
- ctrls.setBackground(SystemColor.control);
- ctrls.addMouseListener(
- Util.onMouse(e->client.requestFocus(), null));
- scrControls = new JScrollPane(ctrls,
- JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
- JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- scrControls.setBorder(null);
- scrControls.getVerticalScrollBar().setUnitIncrement(20);
- client.add(scrControls, BorderLayout.WEST);
-
- // BG Map controls
- label(ctrls, "bg_maps.map", true);
- spnMapIndex = spinner(ctrls, 0, 15, 0, true);
- spnMapIndex.addChangeListener(e->
- setMap((Integer) spnMapIndex.getValue()));
- label(ctrls, "bg_maps.address", false);
- txtMapAddress = textBox(ctrls);
- txtMapAddress.addFocusListener(Util.onFocus(null,
- e->onAddress(txtMapAddress)));
-
- // Cell controls container
- var cell = new UPanel(new GridBagLayout());
- cell.setBorder(new TitledBorder(""));
- parent.app.localizer.add(cell, "bg_maps.cell");
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 2, 2, 2);
- ctrls.add(cell, gbc);
-
- // Cell controls
- label(cell, "bg_maps.index", true);
- spnCellIndex = spinner(cell, 0, 4095, 0, true);
- spnCellIndex.addChangeListener(e->
- setCell((Integer) spnCellIndex.getValue()));
- label(cell, "bg_maps.address", false);
- txtCellAddress = textBox(cell);
- txtCellAddress.addFocusListener(Util.onFocus(null,
- e->onAddress(txtCellAddress)));
- label(cell, "bg_maps.character", false);
- spnCharacter = spinner(cell, 0, 2047, 0, false);
- spnCharacter.addChangeListener(e->onEdit());
- label(cell, "bg_maps.palette", false);
- cmbPalette = select(cell, new String[] {
- "palette.gplt0", "palette.gplt1", "palette.gplt2", "palette.gplt3"
- });
- cmbPalette.addActionListener(e->onEdit());
- label(cell, "bg_maps.hflip", false);
- chkHFlip = checkBox(cell);
- chkHFlip.addActionListener(e->onEdit());
- label(cell, "bg_maps.vflip", false);
- chkVFlip = checkBox(cell);
- chkVFlip.addActionListener(e->onEdit());
-
- // Cell panel
- panCell = new UPanel();
- panCell.setOpaque(false);
- panCell.setPreferredSize(new Dimension(96, 96));
- panCell.addPaintListener((g,w,h)->onPaintCell(g, w, h));
- gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.CENTER;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(2, 2, 2, 2);
- cell.add(panCell, gbc);
- terminator(cell);
-
- // Fill the extra space above the view controls
- var spacer = new UPanel();
- spacer.setOpaque(false);
- gbc = new GridBagConstraints();
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.weighty = 1;
- ctrls.add(spacer, gbc);
-
- // View controls
- label(ctrls, "bg_maps.grid", false);
- chkGrid = checkBox(ctrls);
- chkGrid.addActionListener(e->{
- grid = chkGrid.isSelected(); onView(); });
- label(ctrls, "bg_maps.generic", false);
- chkGeneric = checkBox(ctrls);
- chkGeneric.setSelected(generic);
- chkGeneric.addActionListener(e->{
- generic = chkGeneric.isSelected(); refresh(); });
- label(ctrls, "bg_maps.scale", false);
- sldScale = slider(ctrls, 1, 10, scale);
- sldScale.addChangeListener(e->{
- scale = sldScale.getValue(); onView(); });
- terminator(ctrls);
-
- // Configure BG map panel
- panMap = new UPanel();
- panMap.setBackground(SystemColor.control);
- panMap.addMouseListener(
- Util.onMouse(e->onMouse(e), e->onMouse(e)));
- panMap.addMouseMotionListener(
- Util.onMouseMove(null, e->onMouse(e)));
- panMap.addPaintListener((g,w,h)->onPaintMap(g, w, h));
- scrMap = new JScrollPane(panMap);
- client.add(scrMap, BorderLayout.CENTER);
-
- // Configure component
- setContentPane(client);
- setCell(0);
- onView();
- pack();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the display
- void refresh() {
-
- // Update BG map graphic
- int src = 0x00020000 | mapIndex << 13;
- for (int index = 0; index < 4096; index++, src += 2) {
- int bits = parent.vram[src] & 0xFF | parent.vram[src + 1] << 8;
- var pal = parent.palettes[generic ? MainWindow.GENERIC :
- MainWindow.GPLT0 + (bits >> 14 & 3)][MainWindow.RED];
- parent.drawCharacter(
- bits & 0x07FF, (bits & 0x2000) != 0, (bits & 0x1000) != 0, pal,
- pix, index >> 6 << 12 | (index & 63) << 3, 512
- );
- }
- image.setRGB(0, 0, 512, 512, pix, 0, 512);
-
- // Update display;
- panCell.repaint();
- panMap .repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Event Handlers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Address text boxes commit
- private void onAddress(JTextField src) {
- int address;
-
- // Parse the given address
- try { address = (int) Long.parseLong(src.getText(), 16); }
- catch (Exception e) {
- setMap(mapIndex);
- return;
- }
-
- // Restrict address range
- if ((address >> 24 & 7) != 0) {
- setMap(mapIndex);
- return;
- }
- address &= 0x0007FFFF;
-
- // Check if the address is in BG map memory
- if (address < 0x00020000 || address >= 0x00040000) {
- setMap(mapIndex);
- return;
- }
-
- // Update the map and character indexes
- address -= 0x00020000;
- mapIndex = address >> 13;
- setCell((address & 0x00001FFE) >> 1);
- }
-
- // A cell value has changed
- private void onEdit() {
-
- // Process cell properties
- character = (Integer) spnCharacter.getValue();
- hFlip = chkHFlip.isSelected();
- palette = cmbPalette.getSelectedIndex();
- vFlip = chkVFlip.isSelected();
-
- // Update VRAM state
- parent.vue.write(
- 0x00020000 | mapIndex << 13 | cellIndex << 1, Vue.U16,
- palette << 14 | (hFlip ? 0x2000 : 0) |
- (vFlip ? 0x1000 : 0) | character
- );
- parent.refreshDebug(false);
- }
-
- // BG map panel mouse
- private void onMouse(MouseEvent e) {
- int id = e.getID();
-
- // Mouse release
- if (id == MouseEvent.MOUSE_RELEASED) {
- if (e.getButton() == MouseEvent.BUTTON1)
- dragging = null;
- return;
- }
-
- // Mouse press
- if (id == MouseEvent.MOUSE_PRESSED) {
- client.requestFocus();
- if (e.getButton() != MouseEvent.BUTTON1)
- return;
- dragging = e.getPoint();
- }
-
- // Not dragging
- if (dragging == null)
- return;
-
- // Working variables
- int grid = this.grid ? 1 : 0;
- int size = 8 * scale + grid;
- int col = e.getX() / size;
- int row = e.getY() / size;
-
- // The pixel is not within a cell
- if (col >= 64 || row >= 64)
- return;
-
- // Calculate the index of the selected cell
- setCell(row << 6 | col);
- }
-
- // Cell panel paint
- private void onPaintCell(Graphics2D g, int width, int height) {
- int scale = Math.max(1, Math.min(width >> 3, height >> 3));
- int x = (width - (scale << 3) + 1) >> 1;
- int y = (height - (scale << 3) + 1) >> 1;
- int ix = (cellIndex & 63) << 3;
- int iy = cellIndex >> 6 << 3;
- g.drawImage(image,
- x, y, x + scale * 8, y + scale * 8,
- ix, iy, ix + 8 , iy + 8 ,
- null);
- }
-
- // BG map panel paint
- private void onPaintMap(Graphics2D g, int width, int height) {
-
- // Drawing with a grid
- if (grid) {
-
- int scale = 8 * this.scale;
- for (int y = 0, z = 0; y < 64; y++)
- for (int x = 0; x < 64; x++, z++) {
- int ix = (z & 63) << 3;
- int iy = z >> 6 << 3;
- int ox = x * (scale + 1);
- int oy = y * (scale + 1);
- g.drawImage(image,
- ox, oy, ox + scale, oy + scale,
- ix, iy, ix + 8 , iy + 8 ,
- null);
- }
- }
-
- // Not drawing with a grid
- else g.drawImage(image, 0, 0, 512 * scale, 512 * scale, null);
-
- // Highlight the selected cell
- int size = 8 * scale + (grid ? 1 : 0);
- int X = (cellIndex & 63) * size;
- int Y = (cellIndex >> 6) * size;
- int light = SystemColor.textHighlight.getRGB() & 0x00FFFFFF;
- g.setColor(new Color(0xD0000000 | light, true));
- g.drawRect(X , Y , 8 * scale - 1, 8 * scale - 1);
- g.setColor(new Color(0x90000000 | light, true));
- g.drawRect(X + 1, Y + 1, 8 * scale - 3, 8 * scale - 3);
- g.setColor(new Color(0x50000000 | light, true));
- g.fillRect(X + 2, Y + 2, 8 * scale - 4, 8 * scale - 4);
-
- }
-
- // Window resize
- private void onResize() {
- var viewport = scrControls.getViewport();
- int inner = viewport.getView().getPreferredSize().width;
- int outer = viewport.getExtentSize().width;
-
- // Size the controls container to match the inner component
- if (inner != outer) {
- scrControls.setPreferredSize(new Dimension(
- scrControls.getPreferredSize().width + inner - outer, 0));
- scrControls.revalidate();
- scrControls.repaint();
- }
-
- }
-
- // View control changed
- private void onView() {
- int grid = this.grid ? 1 : 0;
- int size = 8 * scale + grid;
- int pref = size * 64 - grid;
- scrMap.getVerticalScrollBar().setUnitIncrement(8 * scale + grid);
- panMap.setPreferredSize(new Dimension(pref, pref));
- panMap.revalidate();
- panMap.repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a check box to the controls panel
- private JCheckBox checkBox(UPanel panel) {
- var chk = new JCheckBox();
- chk.setBorder(null);
- chk.setFocusable(false);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(chk, gbc);
- return chk;
- }
-
- // Add a label to the controls panel
- private void label(UPanel panel, String key, boolean top) {
- var lbl = new JLabel();
- parent.app.localizer.add(lbl, key);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(top ? 2 : 0, 2, 2, 2);
- panel.add(lbl, gbc);
- }
-
- // Update controls
- private void refreshLite() {
- int mapAddr = mapIndex << 13 | 0x00020000;
- int cellAddr = mapAddr | cellIndex << 1;
-
- int bits = parent.vram[cellAddr] & 0xFF | parent.vram[cellAddr+1] << 8;
- character = bits & 0x07FF;
- hFlip = (bits & 0x2000) != 0;
- palette = bits >> 14 & 3;
- vFlip = (bits & 0x1000) != 0;
-
- chkHFlip .setSelected(hFlip);
- chkVFlip .setSelected(vFlip);
- cmbPalette .setSelectedIndex(palette);
- spnCellIndex .setValue(cellIndex);
- spnCharacter .setValue(character);
- spnMapIndex .setValue(mapIndex);
- txtMapAddress .setText(String.format("%08X", mapAddr ));
- txtCellAddress.setText(String.format("%08X", cellAddr));
-
- panCell.repaint();
- panMap .repaint();
- }
-
- // Add a combo box to the controls panel
- private UComboBox select(UPanel panel, String[] options) {
- var cmb = new UComboBox();
- parent.app.localizer.add(cmb, options);
- cmb.setSelectedIndex(0);
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(cmb, gbc);
- return cmb;
- }
-
- // Specify the current cell index
- private void setCell(int index) {
- cellIndex = index;
- refreshLite();
- }
-
- // Specify the current BG map index
- private void setMap(int index) {
- mapIndex = index;
- refreshLite();
- }
-
- // Add a slider to the controls panel
- private JSlider slider(UPanel panel, int min, int max, int value) {
- var sld = new JSlider(min, max, value);
- sld.setFocusable(false);
- sld.setPreferredSize(new Dimension(0, sld.getPreferredSize().height));
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 1, 2);
- panel.add(sld, gbc);
- return sld;
- }
-
- // Add a spinner to the controls panel
- private JSpinner spinner(UPanel panel, int min, int max, int value,
- boolean top) {
- var spn = new JSpinner(new SpinnerNumberModel(value, min, max, 1));
- var txt = new JSpinner.NumberEditor(spn, "#");
- txt.getTextField().addActionListener(e->client.requestFocus());
- spn.setEditor(txt);
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(top ? 2 : 0, 0, 2, 2);
- gbc.weightx = 1;
- panel.add(spn, gbc);
- return spn;
- }
-
- // Terminate a controls container
- private void terminator(UPanel panel) {
- var spacer = new UPanel();
- spacer.setOpaque(false);
- spacer.setPreferredSize(new Dimension(0, 0));
- var gbc = new GridBagConstraints();
- gbc.gridheight = GridBagConstraints.REMAINDER;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- panel.add(spacer, gbc);
- }
-
- // Add a text box to the controls panel
- private JTextField textBox(UPanel panel) {
- var txt = new JTextField();
- txt.setFont(parent.app.fntMono);
- txt.addActionListener(e->client.requestFocus());
- var size = txt.getPreferredSize();
- txt.setPreferredSize(new Dimension(
- parent.app.hexDigitWidth * 8 + 2 + size.width, size.height));
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(txt, gbc);
- return txt;
- }
-
-}
diff --git a/src/desktop/app/BreakpointsWindow.java b/src/desktop/app/BreakpointsWindow.java
deleted file mode 100644
index 22e6eba..0000000
--- a/src/desktop/app/BreakpointsWindow.java
+++ /dev/null
@@ -1,613 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// Memory viewer and hex editor window
-class BreakpointsWindow extends ChildWindow {
-
- // Private fields
- private ArrayList- items; // List items
- private int selectedIndex; // Selected list item
-
- // UI components
- private JButton btnDelete; // Delete button
- private JButton btnNew; // New button
- private JCheckBox chkEnabled; // Enabled check box
- private JCheckBox chkException; // Exception check box
- private JCheckBox chkExecute; // Execute check box
- private JCheckBox chkRead; // Read check box
- private JCheckBox chkWrite; // Write check box
- private UPanel client; // Client area
- private JLabel errAddress; // Address error text
- private JLabel errCondition; // Condition error text
- private UPanel lstBreakpoints; // Breakpoint list
- private UPanel spacer; // List termination spacer
- private JTextField txtAddress; // Address text box
- private JTextField txtCondition; // Condition text box
- private JTextField txtName; // Name text box
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Address error keys
- private static final String[] KEYS_ADDRESS = {
- null , // NONE
- "breakpoints.error.badliteral_a", // BADLITERAL
- null , // BADOPERAND
- null , // BADTOKEN
- "breakpoints.error.earlyeof" , // EARLYEOF
- null , // INVALID
- null , // NESTING
- "breakpoints.error.unexpected" // UNEXPECTED
- };
-
- // Condition error keys
- private static final String[] KEYS_CONDITION = {
- null , // NONE
- "breakpoints.error.badliteral_c", // BADLITERAL
- "breakpoints.error.badoperand" , // BADOPERAND
- "breakpoints.error.badtoken" , // BADTOKEN
- "breakpoints.error.earlyeof" , // EARLYEOF
- "breakpoints.error.invalid" , // INVALID
- "breakpoints.error.nesting" , // NESTING
- "breakpoints.error.unexpected" // UNEXPECTED
- };
-
- // List constraints
- private static final GridBagConstraints ENABLED;
- private static final GridBagConstraints NAME;
- private static final GridBagConstraints SPACER;
- private static final GridBagConstraints STATUS;
-
- // Static initializer
- static {
- ENABLED = new GridBagConstraints();
- ENABLED.anchor = GridBagConstraints.CENTER;
- ENABLED.insets = new Insets(1, 2, 1, 2);
- NAME = new GridBagConstraints();
- NAME.fill = GridBagConstraints.HORIZONTAL;
- NAME.gridwidth = GridBagConstraints.REMAINDER;
- NAME.insets = new Insets(1, 0, 1, 2);
- NAME.weightx = 1;
- SPACER = new GridBagConstraints();
- SPACER.fill = GridBagConstraints.BOTH;
- SPACER.gridheight = GridBagConstraints.REMAINDER;
- SPACER.gridwidth = GridBagConstraints.REMAINDER;
- SPACER.weighty = 1;
- STATUS = new GridBagConstraints();
- STATUS.fill = GridBagConstraints.BOTH;
- STATUS.insets = new Insets(0, 0, 0, 2);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // Text box commit
- private interface Commit {
- void run();
- }
-
- // List item
- private class Item {
- Breakpoint breakpoint;
- JCheckBox chkEnabled;
- JLabel lblName;
- JLabel lblStatus;
-
- // Constructor
- Item(Breakpoint brk) {
- var that = this;
- breakpoint = brk;
- brk.setFetch(false);
- chkEnabled = new JCheckBox();
- chkEnabled.setBorder(null);
- chkEnabled.setFocusable(false);
- chkEnabled.addActionListener(e->onEnabled(that));
- parent.app.localizer.add(chkEnabled,"null","breakpoints.enabled");
- lblName = new JLabel(brk.getName());
- lblStatus = new JLabel("", SwingConstants.CENTER);
- refresh(null, null);
- }
-
- // Update the display
- void refresh(Instruction inst, Access acc) {
- if (
- breakpoint.getAddressError ().code != Breakpoint.NONE ||
- breakpoint.getConditionError().code != Breakpoint.NONE
- ) lblStatus.setText("\u00d7"); // Times symbol
- else if (breakpoint.any() && breakpoint.evaluate(inst, acc))
- lblStatus.setText("\u2605"); // Star
- else lblStatus.setText(" ");
- int lineHeight = parent.app.fntDialog.metrics.getHeight();
- lblStatus.setPreferredSize(new Dimension(lineHeight, lineHeight));
- }
-
- // Specify whether or not the item has focus
- void setFocused(boolean focused) {
- var color = focused ? SystemColor.textHighlightText :
- SystemColor.windowText;
- lblStatus.setForeground(color);
- lblName .setForeground(color);
- }
-
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- BreakpointsWindow(MainWindow parent) {
- super(parent, "breakpoints.title");
-
- // Configure instance fields
- items = new ArrayList
- ();
- selectedIndex = -1;
-
- // Configure client area
- client = new UPanel(new BorderLayout());
- client.setBackground(SystemColor.control);
- client.setFocusable(true);
- client.setPreferredSize(new Dimension(320, 240));
-
- // Configure breakpoint list
- lstBreakpoints = new UPanel(new GridBagLayout());
- lstBreakpoints.setFocusable(true);
- lstBreakpoints.setBackground(SystemColor.window);
- lstBreakpoints.addFocusListener(Util.onFocus(
- e->lstBreakpoints.repaint(), e->lstBreakpoints.repaint()));
- lstBreakpoints.addMouseListener(Util.onMouse(e->onMouseDown(e), null));
- lstBreakpoints.addPaintListener((g,w,h)->onPaint(g, w, h));
- var scr = new JScrollPane(lstBreakpoints);
- scr.getVerticalScrollBar().setUnitIncrement(
- parent.app.fntDialog.metrics.getHeight());
- client.add(scr, BorderLayout.CENTER);
- spacer = new UPanel();
- spacer.setOpaque(false);
- lstBreakpoints.add(spacer, SPACER);
-
- // Configure properties pane
- var props = new UPanel(new GridBagLayout());
- props.setBackground(SystemColor.control);
- props.addMouseListener(
- Util.onMouse(e->client.requestFocus(), null));
- client.add(props, BorderLayout.SOUTH);
-
- // Configure properties
- label(props, "breakpoints.name", 2);
- txtName = textBox(props, false, 2, ()->onName());
- //label(props, "breakpoints.enabled", 0);
- //chkEnabled = checkBox(props, null, true);
- chkEnabled = new JCheckBox();
- chkEnabled.addActionListener(e->onEnabled(null));
- label(props, "breakpoints.type", 0);
- chkExecute = checkBox(props, "breakpoints.execute" , false);
- chkExecute .addActionListener(e->onType(chkExecute ));
- chkRead = checkBox(props, "breakpoints.read" , false);
- chkRead .addActionListener(e->onType(chkRead ));
- chkWrite = checkBox(props, "breakpoints.write" , false);
- chkWrite .addActionListener(e->onType(chkWrite ));
- chkException = checkBox(props, "breakpoints.exception", true );
- chkException.addActionListener(e->onType(chkException));
- label(props, "breakpoints.address", 0);
- txtAddress = textBox(props, true, 0, ()->onAddress());
- errAddress = error(props);
- label(props, "breakpoints.condition", 0);
- txtCondition = textBox(props, true, 0, ()->onCondition());
- errCondition = error(props);
-
- // Configure buttons
- var buttons = new UPanel(new GridBagLayout());
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- props.add(buttons, gbc);
- var fill = new UPanel();
- fill.setOpaque(false);
- fill.addMouseListener(Util.onMouse(e->onDebug(e), null));
- gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.weightx = 1;
- buttons.add(fill, gbc);
- btnDelete = button(buttons, "breakpoints.delete", false);
- btnDelete.setEnabled(false);
- btnDelete.addActionListener(e->onDelete());
- btnNew = button(buttons, "breakpoints.new", true);
- btnNew.addActionListener(e->onNew());
-
- // Configure component
- setContentPane(client);
- pack();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the display
- void refresh() {
- var inst = new Instruction(parent.vue.read(
- parent.vue.getRegister(Vue.PC, true), Vue.S32));
- var acc = inst.access(parent.vue);
- for (var item : items)
- item.refresh(inst, acc);
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Event Handlers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Address text box commit
- private void onAddress() {
- if (selectedIndex == -1)
- return;
- var item = items.get(selectedIndex);
- item.breakpoint.setAddresses(txtAddress.getText());
- checkErrors(item);
- item.refresh(null, null);
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- }
-
- // Condition text box commit
- private void onCondition() {
- if (selectedIndex == -1)
- return;
- var item = items.get(selectedIndex);
- item.breakpoint.setCondition(txtCondition.getText());
- checkErrors(item);
- item.refresh(null, null);
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- }
-
- // Debug interaction
- private void onDebug(MouseEvent e) {
- client.requestFocus();
- if (
- selectedIndex == -1 ||
- e.getButton() != MouseEvent.BUTTON1 ||
- (e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == 0
- ) return;
- var brk = items.get(selectedIndex).breakpoint;
- System.out.println("Address");
- System.out.println(brk.getAddresses());
- System.out.println(brk.debugRanges());
- System.out.println("Condition");
- System.out.println(brk.getCondition());
- System.out.println(brk.debugTokens());
- System.out.println();
- }
-
- // Delete button click
- private void onDelete() {
- var item = items.remove(selectedIndex);
- parent.vue.remove(item.breakpoint);
- lstBreakpoints.remove(item.chkEnabled);
- lstBreakpoints.remove(item.lblName);
- lstBreakpoints.remove(item.lblStatus);
- lstBreakpoints.revalidate();
- selectedIndex = -1;
- select(-1);
- }
-
- // Enabled check box toggle
- private void onEnabled(Item item) {
- boolean enabled;
-
- // Clicked from the properties pane
- if (item == null) {
- enabled = chkEnabled.isSelected();
- item = items.get(selectedIndex);
- item.chkEnabled.setSelected(enabled);
- client.requestFocus();
- }
-
- // Clicked from the breakpoints list
- else {
- enabled = item.chkEnabled.isSelected();
- if (items.indexOf(item) == selectedIndex)
- chkEnabled.setSelected(enabled);
- lstBreakpoints.requestFocus();
- }
-
- // Common processing
- item.breakpoint.setEnabled(enabled);
- item.refresh(null, null);
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- }
-
- // List mouse press
- private void onMouseDown(MouseEvent e) {
- int count = items.size();
-
- // Left clicking
- if (count > 0 && e.getButton() == MouseEvent.BUTTON1) {
- int newIndex = e.getY() / items.get(0).lblStatus.getHeight();
- if (newIndex < count)
- select(newIndex);
- }
-
- // Update layout
- lstBreakpoints.requestFocus();
- lstBreakpoints.repaint();
- }
-
- // Name text box commit
- private void onName() {
- if (selectedIndex == -1)
- return;
- var item = items.get(selectedIndex);
- item.lblName.setText(item.breakpoint.setName(txtName.getText()));
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- item.refresh(null, null);
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- }
-
- // New button click
- private void onNew() {
-
- var brk = parent.vue.breakpoint();
- brk.setEnabled(true);
- brk.setName (parent.app.localizer.get("breakpoints.default_name"));
-
- var item = new Item(brk);
- item.chkEnabled.setSelected(true);
- item.lblName .setText(brk.getName());
- items.add(item);
-
- int count = items.size();
- boolean first = count == 1;
- lstBreakpoints.remove(spacer);
- lstBreakpoints.add(item.chkEnabled, ENABLED);
- lstBreakpoints.add(item.lblStatus , STATUS );
- lstBreakpoints.add(item.lblName , NAME );
- lstBreakpoints.add(spacer , SPACER );
-
- select(count - 1);
- lstBreakpoints.requestFocus();
- lstBreakpoints.revalidate();
- }
-
- // List paint
- private void onPaint(Graphics2D g, int width, int height) {
-
- // There is no selected item
- if (selectedIndex == -1)
- return;
-
- // Select the display colors
- var item = items.get(selectedIndex);
- if (lstBreakpoints.isFocusOwner()) {
- g.setColor(SystemColor.textHighlight);
- item.setFocused(true);
- } else {
- g.setColor(SystemColor.control);
- item.setFocused(false);
- }
-
- // Draw the selection background
- height = item.lblStatus.getHeight();
- g.fillRect(0, selectedIndex * height, width, height);
- }
-
- // Type check box toggle
- private void onType(JCheckBox chk) {
- var item = items.get(selectedIndex);
- var brk = item.breakpoint;
- boolean selected = chk.isSelected();
-
- // Configure controls
- if (chk == chkException)
- brk.setException(selected);
- else if (chk == chkExecute )
- brk.setExecute (selected);
- else if (chk == chkRead )
- brk.setRead (selected);
- else if (chk == chkWrite )
- brk.setWrite (selected);
-
- // Common processing
- item.refresh(null, null);
- client.requestFocus();
- lstBreakpoints.revalidate();
- lstBreakpoints.repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a button to the form
- private JButton button(UPanel panel, String key, boolean last) {
- var btn = new JButton();
- if (key != null)
- parent.app.localizer.add(btn, key);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(0, 0, 2, 2);
- if (last)
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- panel.add(btn, gbc);
- return btn;
- }
-
- // Add a check box to the form
- private JCheckBox checkBox(UPanel panel, String key, boolean last) {
- var chk = new JCheckBox();
- if (key != null)
- parent.app.localizer.add(chk, key);
- chk.setBorder(null);
- chk.setEnabled(false);
- chk.setFocusable(false);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(0, 0, 2, last ? 2 : 6);
- if (last)
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- panel.add(chk, gbc);
- return chk;
- }
-
- // Check for errors in the selected breakpoint
- private void checkErrors(Item item) {
- var brk = item.breakpoint;
- var loc = parent.app.localizer;
-
- // Check for address errors
- var err = brk.getAddressError();
- if (err.code != Breakpoint.NONE) {
- loc.add(errAddress, KEYS_ADDRESS[err.code]);
- loc.put(errAddress, "err.position",
- Integer.toString(err.position));
- loc.put(errAddress, "err.text", err.text);
- errAddress.setVisible(true);
- } else errAddress.setVisible(false);
-
- // Check for condition errors
- err = brk.getConditionError();
- if (err.code != Breakpoint.NONE) {
- loc.add(errCondition, KEYS_CONDITION[err.code]);
- loc.put(errCondition, "err.position",
- Integer.toString(err.position));
- loc.put(errCondition, "err.text", err.text);
- if (err.code == Breakpoint.NESTING)
- loc.put(errCondition, "err.other",
- err.text.equals(")") ? "]" : ")");
- errCondition.setVisible(true);
- } else errCondition.setVisible(false);
-
- }
-
- // Add an error label to the form
- private JLabel error(UPanel panel) {
- var lbl = new JLabel();
- lbl.setForeground(Color.red);
- lbl.setVisible(false);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.CENTER;
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridx = 1;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(lbl, gbc);
- return lbl;
- }
-
- // Add a label to the form
- private void label(UPanel panel, String key, int top) {
- var lbl = new JLabel();
- if (key != null)
- parent.app.localizer.add(lbl, key);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(top, 2, 2, 4);
- panel.add(lbl, gbc);
- }
-
- // Select a particular list item
- private void select(int newIndex) {
- boolean enabled = newIndex != -1;
-
- // The existing selection was de-selected
- if (selectedIndex != -1 && newIndex != selectedIndex)
- items.get(selectedIndex).setFocused(false);
-
- // Selecting a new list item
- if (newIndex != -1)
- items.get(newIndex).setFocused(true);
-
- // Configure instance fields
- selectedIndex = newIndex;
-
- // Update control properties
- if (enabled) {
- var brk = items.get(selectedIndex).breakpoint;
- chkEnabled .setSelected(brk.isEnabled ());
- chkExecute .setSelected(brk.getExecute ());
- chkRead .setSelected(brk.getRead ());
- chkWrite .setSelected(brk.getWrite ());
- chkException.setSelected(brk.getException());
- txtAddress .setText (brk.getAddresses());
- txtCondition.setText (brk.getCondition());
- txtName .setText (brk.getName ());
- }
-
- // Clear control properties
- else {
- chkEnabled .setSelected(false);
- chkExecute .setSelected(false);
- chkRead .setSelected(false);
- chkWrite .setSelected(false);
- chkException.setSelected(false);
- errAddress .setText(""); errAddress .setVisible(false);
- errCondition.setText(""); errCondition.setVisible(false);
- txtAddress .setText("");
- txtCondition.setText("");
- txtName .setText("");
- }
-
- // Enable or disable controls
- btnDelete .setEnabled(enabled);
- chkEnabled .setEnabled(enabled);
- chkExecute .setEnabled(enabled);
- chkException.setEnabled(enabled);
- chkRead .setEnabled(enabled);
- chkWrite .setEnabled(enabled);
- txtAddress .setEnabled(enabled);
- txtCondition.setEnabled(enabled);
- txtName .setEnabled(enabled);
-
- // Common processing
- if (selectedIndex != -1)
- checkErrors(items.get(selectedIndex));
- lstBreakpoints.repaint();
- }
-
- // Add a text box to the form
- private JTextField textBox(UPanel panel, boolean mono, int top,
- Commit handler) {
- var txt = new JTextField();
- txt.setEnabled(false);
- if (mono)
- txt.setFont(parent.app.fntMono);
- txt.addActionListener(e->client.requestFocus());
- txt.addFocusListener (Util.onFocus(null, e->handler.run()));
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.CENTER;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(top, 0, 2, 2);
- gbc.weightx = 1;
- panel.add(txt, gbc);
- return txt;
- }
-
-}
diff --git a/src/desktop/app/CPUWindow.java b/src/desktop/app/CPUWindow.java
deleted file mode 100644
index c93cd1e..0000000
--- a/src/desktop/app/CPUWindow.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// CPU window
-class CPUWindow extends ChildWindow {
-
- // Instance fields
- MainWindow parent; // Containing window
-
- // UI components
- private DisassemblerPane panDasm; // Disassembler client
- private RegisterList lstProgram; // Program register list
- private RegisterList lstSystem; // System register list
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- CPUWindow(MainWindow parent) {
- super(parent, "cpu.title");
-
- // Configure instance fields
- this.parent = parent;
-
- // Configure child panes
- panDasm = new DisassemblerPane(this);
- lstSystem = new RegisterList(this, true);
- lstProgram = new RegisterList(this, false);
-
- // Configure layout
- var inner = Util.splitPane(JSplitPane.VERTICAL_SPLIT);
- inner.setTopComponent(lstSystem);
- inner.setBottomComponent(lstProgram);
- var outer = Util.splitPane(JSplitPane.HORIZONTAL_SPLIT);
- outer.setLeftComponent(panDasm);
- outer.setRightComponent(inner);
- outer.setResizeWeight(1);
-
- // Configure component
- var client = getContentPane();
- client.add(outer);
- client.setPreferredSize(new Dimension(480, 300));
- pack();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the display
- void refresh(boolean seekToPC) {
- panDasm .refresh(seekToPC);
- lstSystem .refresh();
- lstProgram.refresh();
- }
-
-}
diff --git a/src/desktop/app/CharactersWindow.java b/src/desktop/app/CharactersWindow.java
deleted file mode 100644
index d49026d..0000000
--- a/src/desktop/app/CharactersWindow.java
+++ /dev/null
@@ -1,612 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-
-// VIP characters window
-class CharactersWindow extends ChildWindow {
-
- // Instance fields
- private int color; // Selected color index
- private Point dragging; // Most recent pattern mouse position
- private int index; // Current character index
- private boolean grid; // Draw a grid around characters
- private int palette; // Palette index
- private int[] pix; // Image buffer
- private int scale; // Display scale
- private int wide; // Number of characters per row
- private BufferedImage image; // Character graphics
-
- // UI components
- private JCheckBox chkGrid; // Grid check box
- private UPanel client; // Client area
- private UComboBox cmbPalette; // Palette drop-down
- private UPanel panCharacters; // Characters panel
- private UPanel panPalette; // Palette panel
- private UPanel panPattern; // Pattern panel
- private JScrollPane scrCharacters; // Characters container
- private JScrollPane scrControls; // Controls panel
- private JScrollBar scrWidth; // Width template scroll bar
- private JSlider sldScale; // Scale slider
- private JSpinner spnIndex; // Index spinner
- private JSpinner spnWide; // Wide spinner
- private JTextField txtAddress; // Address text box
- private JTextField txtMirror; // Mirror text box
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- CharactersWindow(MainWindow parent) {
- super(parent, "characters.title");
-
- // Configure instance fields
- color = 0;
- grid = true;
- image = new BufferedImage(256, 512, BufferedImage.TYPE_INT_RGB);
- pix = new int[256 * 512];
- scale = 3;
-
- // Template scroll bar to check control width in the current LAF
- scrWidth = new JScrollBar(JScrollBar.VERTICAL);
-
- // Configure client area
- client = new UPanel(new BorderLayout());
- client.setBackground(SystemColor.control);
- client.setFocusable(true);
- client.setPreferredSize(new Dimension(480, 360));
- client.addComponentListener(Util.onResize(e->onResize()));
-
- // Configure controls panel
- var ctrls = new UPanel(new GridBagLayout());
- ctrls.setBackground(SystemColor.control);
- ctrls.addMouseListener(
- Util.onMouse(e->client.requestFocus(), null));
- scrControls = new JScrollPane(ctrls,
- JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
- JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- scrControls.setBorder(null);
- scrControls.getVerticalScrollBar().setUnitIncrement(20);
- client.add(scrControls, BorderLayout.WEST);
-
- // Character controls
- label(ctrls, "characters.index", true);
- spnIndex = spinner(ctrls, 0, 2047, 0, true);
- spnIndex.addChangeListener(e->
- setIndex((Integer) spnIndex.getValue()));
- label(ctrls, "characters.address", false);
- txtAddress = textBox(ctrls);
- txtAddress.addFocusListener(Util.onFocus(null,
- e->onAddress(txtAddress)));
- label(ctrls, "characters.mirror", false);
- txtMirror = textBox(ctrls);
- txtMirror.addFocusListener(Util.onFocus(null,
- e->onAddress(txtMirror)));
-
- // Pattern panel
- panPattern = new UPanel();
- panPattern.setOpaque(false);
- panPattern.setPreferredSize(new Dimension(96, 96));
- panPattern.addMouseListener(
- Util.onMouse(e->onMousePattern(e), e->onMousePattern(e)));
- panPattern.addMouseMotionListener(
- Util.onMouseMove(null, e->onMousePattern(e)));
- panPattern.addPaintListener((g,w,h)->onPaintPattern(g, w, h));
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.CENTER;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(4, 2, 2, 2);
- ctrls.add(panPattern, gbc);
-
- // Palette panel
- panPalette = new UPanel();
- panPalette.setOpaque(false);
- panPalette.setPreferredSize(new Dimension(0, 20 + 6));
- panPalette.addMouseListener(
- Util.onMouse(e->onMouseDownPalette(e), null));
- panPalette.addPaintListener((g,w,h)->onPaintPalette(g, w, h));
- gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 2, 4, 2);
- ctrls.add(panPalette, gbc);
-
- // Fill the extra space above the view controls
- var spacer = new UPanel();
- spacer.setOpaque(false);
- gbc = new GridBagConstraints();
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.weighty = 1;
- ctrls.add(spacer, gbc);
-
- // View controls
- label(ctrls, "characters.grid", false);
- chkGrid = checkBox(ctrls);
- chkGrid.setSelected(grid);
- chkGrid.addActionListener(e->{
- grid = chkGrid.isSelected(); onView(); });
- label(ctrls, "characters.wide", false);
- spnWide = spinner(ctrls, 0, 2048, 0, false);
- spnWide.addChangeListener(e->{
- wide = (Integer) spnWide.getValue(); onView(); });
- label(ctrls, "characters.palette", false);
- cmbPalette = select(ctrls, new String[] { "palette.generic",
- "palette.gplt0", "palette.gplt1", "palette.gplt2", "palette.gplt3",
- "palette.jplt0", "palette.jplt1", "palette.jplt2", "palette.jplt3"
- });
- cmbPalette.addActionListener(e->{
- palette = cmbPalette.getSelectedIndex(); repaint(); });
- label(ctrls, "characters.scale", false);
- sldScale = slider(ctrls, 1, 10, scale);
- sldScale.addChangeListener(e->{
- scale = sldScale.getValue(); onView(); });
-
- // Terminate the list of controls
- spacer = new UPanel();
- spacer.setOpaque(false);
- spacer.setPreferredSize(new Dimension(0, 0));
- gbc = new GridBagConstraints();
- gbc.gridheight = GridBagConstraints.REMAINDER;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- ctrls.add(spacer, gbc);
-
- // Configure characters panel
- panCharacters = new UPanel();
- panCharacters.setBackground(SystemColor.control);
- panCharacters.addMouseListener(
- Util.onMouse(e->onMouseCharacters(e), e->onMouseCharacters(e)));
- panCharacters.addMouseMotionListener(
- Util.onMouseMove(null, e->onMouseCharacters(e)));
- panCharacters.addPaintListener((g,w,h)->onPaintCharacters(g, w, h));
- scrCharacters = new JScrollPane(panCharacters);
- client.add(scrCharacters, BorderLayout.CENTER);
-
- // Configure component
- setContentPane(client);
- setIndex(0);
- onView();
- pack();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the display
- void refresh() {
-
- // Update characters graphic
- var pal = parent.palettes[palette][MainWindow.RED];
- for (int index = 0; index < 2048; index++)
- parent.drawCharacter(index, false, false, pal, pix,
- index >> 5 << 11 | (index & 31) << 3, 256);
- image.setRGB(0, 0, 256, 512, pix, 0, 256);
-
- // Update display;
- panCharacters.repaint();
- panPattern .repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Event Handlers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Address and Mirror text box commit
- private void onAddress(JTextField src) {
- int address;
-
- // Parse the given address
- try { address = (int) Long.parseLong(src.getText(), 16); }
- catch (Exception e) {
- setIndex(index);
- return;
- }
-
- // Restrict address range
- if ((address >> 24 & 7) != 0) {
- setIndex(index);
- return;
- }
- address &= 0x0007FFFF;
-
- // Character memory
- if ((address & 0x00066000) == 0x00006000)
- index = address >> 15 << 9 | address >> 4 & 511;
-
- // Mirror of character memory
- else if (address >= 0x00078000)
- index = address - 0x00078000 >> 4;
-
- // Common processing
- setIndex(index);
- }
-
- // Characters mouse
- private void onMouseCharacters(MouseEvent e) {
- int id = e.getID();
-
- // Mouse release
- if (id == MouseEvent.MOUSE_RELEASED) {
- if (e.getButton() == MouseEvent.BUTTON1)
- dragging = null;
- return;
- }
-
- // Mouse press
- if (id == MouseEvent.MOUSE_PRESSED) {
- client.requestFocus();
- if (e.getButton() != MouseEvent.BUTTON1)
- return;
- dragging = e.getPoint();
- }
-
- // Not dragging
- if (dragging == null)
- return;
-
- // Working variables
- int grid = this.grid ? 1 : 0;
- int size = 8 * scale + grid;
- int wide = this.wide != 0 ? this.wide :
- Math.max(1, (panCharacters.getWidth() + grid) / size);
- int col = e.getX() / size;
- int row = e.getY() / size;
-
- // The pixel is not within a character
- if (col >= wide || row >= (2047 + wide) / wide)
- return;
-
- // Calculate the index of the selected character
- int index = row * wide + col;
- if (index < 2048)
- setIndex(index);
- }
-
- // Palette mouse button press
- private void onMouseDownPalette(MouseEvent e) {
-
- // Common processing
- client.requestFocus();
-
- // Only consider left clicks
- if (e.getButton() != MouseEvent.BUTTON1)
- return;
-
- // Working variables
- int height = panPalette.getHeight();
- int width = panPalette.getWidth();
- int size = Math.max(1, Math.min((width - 18) / 4, height - 6));
- int left = (width - size * 4 - 18) / 2;
- int top = (height - size - 6) / 2;
- int x = e.getX() - left - 3;
- int y = e.getY() - top - 3;
-
- // The click was not on top of a color
- if (
- x < 0 || x >= (size + 4) * 4 ||
- x % (size + 4) >= size ||
- y < 0 || y >= size
- ) return;
-
- // Select the clicked color
- color = x / (size + 4);
- panPalette.repaint();
- }
-
- // Pattern mouse
- private void onMousePattern(MouseEvent e) {
- int id = e.getID();
- int scale = Math.max(1, Math.min(
- panPattern.getWidth () >> 3,
- panPattern.getHeight() >> 3
- ));
-
- // Mouse release
- if (id == MouseEvent.MOUSE_RELEASED) {
- if (e.getButton() == MouseEvent.BUTTON1)
- dragging = null;
- return;
- }
-
- // Mouse press
- if (id == MouseEvent.MOUSE_PRESSED) {
- client.requestFocus();
- if (e.getButton() != MouseEvent.BUTTON1)
- return;
- dragging = e.getPoint();
- dragging.x = dragging.x / scale - (dragging.x < 0 ? 1 : 0);
- dragging.y = dragging.y / scale - (dragging.y < 0 ? 1 : 0);
- }
-
- // Not dragging
- if (dragging == null)
- return;
-
- // Retrieve the current point
- var pos = e.getPoint();
- pos.x = pos.x / scale - (pos.x < 0 ? 1 : 0);
- pos.y = pos.y / scale - (pos.y < 0 ? 1 : 0);
-
- // Draw a line segment (adapted from Wikipedia)
- int dx = Math.abs(pos.x - dragging.x);
- int sx = dragging.x < pos.x ? 1 : -1;
- int dy = -Math.abs(pos.y - dragging.y);
- int sy = dragging.y < pos.y ? 1 : -1;
- int err = dx + dy;
- int addr = index >> 9 << 15 | 0x00006000 | (index & 511) << 4;
- for (;;) {
-
- // Draw the current pixel
- if ((dragging.x&7) == dragging.x && (dragging.y&7) == dragging.y) {
- int b = addr | dragging.y << 1 | dragging.x >> 2;
- int bit = (dragging.x & 3) << 1;
- parent.vram[b] = (byte)
- (parent.vram[b] & ~(3 << bit) | color << bit);
- }
-
- // The last pixel has been drawn
- if (dragging.x == pos.x && dragging.y == pos.y)
- break;
-
- // Advance to the next pixel
- int e2 = err << 1;
- if (e2 >= dy)
- { err += dy; dragging.x += sx; }
- if (e2 <= dx)
- { err += dx; dragging.y += sy; }
- }
-
- // Update VRAM state
- parent.vue.writeBytes(addr, parent.vram, addr, 16);
- parent.refreshDebug(false);
- }
-
- // Characters paint
- private void onPaintCharacters(Graphics2D g, int width, int height) {
- int grid = this.grid ? 1 : 0;
- int size = scale * 8 + grid;
- int wide = this.wide != 0 ? this.wide :
- Math.max(1, (width + grid) / size);
- int tall = (2047 + wide) / wide;
-
- // Draw all characters
- for (int Y = 0, y = 0, z = 0; y < tall; y++, Y += size)
- for (int X = 0, x = 0; x < wide; x++, z++, X += size) {
- if (z == 2048)
- break;
- int ix = (z & 31) << 3;
- int iy = z >> 5 << 3;
- g.drawImage(image,
- X, Y, X + size - grid, Y + size - grid,
- ix, iy, ix + 8 , iy + 8 ,
- null);
- }
-
- // Highlight the selected character
- int X = index % wide * size;
- int Y = index / wide * size;
- int light = SystemColor.textHighlight.getRGB() & 0x00FFFFFF;
- g.setColor(new Color(0xD0000000 | light, true));
- g.drawRect(X , Y , 8 * scale - 1, 8 * scale - 1);
- g.setColor(new Color(0x90000000 | light, true));
- g.drawRect(X + 1, Y + 1, 8 * scale - 3, 8 * scale - 3);
- g.setColor(new Color(0x50000000 | light, true));
- g.fillRect(X + 2, Y + 2, 8 * scale - 4, 8 * scale - 4);
- }
-
- // Palette paint
- private void onPaintPalette(Graphics2D g, int width, int height) {
- int size = Math.max(1, Math.min((width - 18) / 4, height - 6));
- int left = (width - size * 4 - 18) / 2;
- var pal = parent.palettes[palette][MainWindow.RED];
- int top = (height - size - 6) / 2;
-
- // Draw the color picker
- for (int x = 0; x < 4; x++, left += size + 4) {
-
- // The current color is selected
- if (x == color) {
- g.setColor(SystemColor.textHighlight);
- g.fillRect(left , top , size + 6, size + 6);
- g.setColor(SystemColor.control);
- g.fillRect(left + 2, top + 2, size + 2, size + 2);
- }
-
- // Draw the color area
- g.setColor(new Color(pal[x]));
- g.fillRect(left + 3, top + 3, size , size );
- }
-
- }
-
- // Pattern paint
- private void onPaintPattern(Graphics2D g, int width, int height) {
- int scale = Math.max(1, Math.min(width >> 3, height >> 3));
- int x = (width - (scale << 3) + 1) >> 1;
- int y = (height - (scale << 3) + 1) >> 1;
- int ix = (index & 31) << 3;
- int iy = index >> 5 << 3;
- g.drawImage(image,
- x, y, x + scale * 8, y + scale * 8,
- ix, iy, ix + 8 , iy + 8 ,
- null);
- }
-
- // Window resize
- private void onResize() {
- var viewport = scrControls.getViewport();
- int inner = viewport.getView().getPreferredSize().width;
- int outer = viewport.getExtentSize().width;
-
- // Size the controls container to match the inner component
- if (inner != outer) {
- scrControls.setPreferredSize(new Dimension(
- scrControls.getPreferredSize().width + inner - outer, 0));
- scrControls.revalidate();
- scrControls.repaint();
- }
-
- // The number of characters per row is dynamic
- if (wide == 0) {
- var bar = scrWidth.getPreferredSize().width;
- var border = scrCharacters.getBorder();
- int grid = this.grid ? 1 : 0;
- var insets = border == null ? new Insets(0, 0, 0, 0) :
- border.getBorderInsets(scrCharacters);
- var size = new Dimension(
- scrCharacters.getWidth () - insets.left - insets.right,
- scrCharacters.getHeight() - insets.top - insets.bottom
- );
-
- // Calculate the dimensions without the vertical scroll bar
- int wide = Math.max(1, (size.width + grid) / (8 * scale + grid));
- int height = (2047 + wide) / wide * (8 * scale + grid) - grid;
-
- // Calculate the dimensions with the vertical scroll bar
- if (height > size.height) {
- wide = Math.max(1, (size.width-bar+grid) / (8 * scale + grid));
- height = (2047 + wide) / wide * (8 * scale + grid) - grid;
- }
-
- // Configure the component
- panCharacters.setPreferredSize(
- new Dimension(wide * (8 * scale + grid) - grid, height));
- panCharacters.revalidate();
- panCharacters.repaint();
- }
-
- }
-
- // View control changed
- private void onView() {
-
- // Number of characters per row is dynamic: defer to resize processing
- if (wide == 0) {
- onResize();
- return;
- }
-
- // Calculate the space occupied by the character images
- int grid = this.grid ? 1 : 0;
- panCharacters.setPreferredSize(new Dimension(
- wide * (scale * 8 + grid) - grid,
- (2047 + wide) / wide * (scale * 8 + grid) - grid
- ));
- scrCharacters.getVerticalScrollBar().setUnitIncrement(8*scale+grid);
- panCharacters.revalidate();
- panCharacters.repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a check box to the controls panel
- private JCheckBox checkBox(UPanel panel) {
- var chk = new JCheckBox();
- chk.setBorder(null);
- chk.setFocusable(false);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(chk, gbc);
- return chk;
- }
-
- // Add a label to the controls panel
- private void label(UPanel panel, String key, boolean top) {
- var lbl = new JLabel();
- parent.app.localizer.add(lbl, key);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(top ? 2 : 0, 2, 2, 2);
- panel.add(lbl, gbc);
- }
-
- // Add a combo box to the controls panel
- private UComboBox select(UPanel panel, String[] options) {
- var cmb = new UComboBox();
- parent.app.localizer.add(cmb, options);
- cmb.setSelectedIndex(0);
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(cmb, gbc);
- return cmb;
- }
-
- // Specify the current character index
- private void setIndex(int index) {
- this.index = index;
- spnIndex.setValue(index);
- txtAddress.setText(String.format("%08X",
- index >> 9 << 15 | 0x00006000 | (index & 511) << 4));
- txtMirror .setText(String.format("%08X",
- index << 4 | 0x00078000));
- repaint();
- }
-
- // Add a slider to the controls panel
- private JSlider slider(UPanel panel, int min, int max, int value) {
- var sld = new JSlider(min, max, value);
- sld.setFocusable(false);
- sld.setPreferredSize(new Dimension(0, sld.getPreferredSize().height));
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 1, 2);
- panel.add(sld, gbc);
- return sld;
- }
-
- // Add a spinner to the controls panel
- private JSpinner spinner(UPanel panel, int min, int max, int value,
- boolean top) {
- var spn = new JSpinner(new SpinnerNumberModel(value, min, max, 1));
- var txt = new JSpinner.NumberEditor(spn, "#");
- txt.getTextField().addActionListener(e->client.requestFocus());
- spn.setEditor(txt);
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(top ? 2 : 0, 0, 2, 2);
- gbc.weightx = 1;
- panel.add(spn, gbc);
- return spn;
- }
-
- // Add a text box to the controls panel
- private JTextField textBox(UPanel panel) {
- var txt = new JTextField();
- txt.setFont(parent.app.fntMono);
- txt.addActionListener(e->client.requestFocus());
- var size = txt.getPreferredSize();
- txt.setPreferredSize(new Dimension(
- parent.app.hexDigitWidth * 8 + 2 + size.width, size.height));
- var gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 0, 2, 2);
- panel.add(txt, gbc);
- return txt;
- }
-
-}
diff --git a/src/desktop/app/ChildWindow.java b/src/desktop/app/ChildWindow.java
deleted file mode 100644
index f60423b..0000000
--- a/src/desktop/app/ChildWindow.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-
-// Child window
-class ChildWindow extends JInternalFrame {
-
- // Instance fields
- MainWindow parent; // Parent application window
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- ChildWindow(MainWindow parent, String key) {
- super();
-
- // Configure instanece fields
- this.parent = parent;
-
- // Configure component
- parent.app.localizer.add(this, key);
- addInternalFrameListener(Util.onClose2(e->setVisible(false)));
- setClosable(true);
- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
- setMaximizable(true);
- setResizable(true);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Show or hide the component
- public void setVisible(boolean visible) {
-
- // Making visible
- if (visible) {
-
- // Not currently visible: center in parent
- if (!isVisible()) {
- var parent = getParent().getParent();
- setLocation(
- Math.max(0, (parent.getWidth () - getWidth ()) / 2),
- Math.max(0, (parent.getHeight() - getHeight()) / 2)
- );
- }
-
- // Already visible: bring to front
- else {
- moveToFront();
- try { setSelected(true); } catch (Exception e) { }
- }
-
- }
-
- // Change visibility
- super.setVisible(visible);
- }
-
-}
diff --git a/src/desktop/app/ConsoleWindow.java b/src/desktop/app/ConsoleWindow.java
deleted file mode 100644
index 9c6391e..0000000
--- a/src/desktop/app/ConsoleWindow.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import javax.swing.*;
-
-// Console window
-class ConsoleWindow extends ChildWindow {
-
- // Instance fields
- private boolean shown; // Component has been visible
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- ConsoleWindow(MainWindow parent) {
- super(parent, "console.title");
- getContentPane().setPreferredSize(new Dimension(384, 224));
- pack();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Show the component on the first transition to debug mode
- void firstShow() {
- if (!shown)
- setVisible(shown = true);
- }
-
-}
diff --git a/src/desktop/app/Disassembler.java b/src/desktop/app/Disassembler.java
deleted file mode 100644
index 8ef80d9..0000000
--- a/src/desktop/app/Disassembler.java
+++ /dev/null
@@ -1,386 +0,0 @@
-package app;
-
-// Project imports
-import vue.*;
-
-// Instruction disassembler
-class Disassembler {
- private Disassembler() { } // Cannot be instantiated
- static { setDefaults(); } // Initialize to default settings
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Global Settings //
- ///////////////////////////////////////////////////////////////////////////
-
- static boolean bcondCombine; // Merge Bcond condition into mnemonic
- static boolean bcondNames; // Use symbolic condition names for Bcond
- static boolean condCaps; // Uppercase condition mnemonics
- static boolean destLast; // Destination register last
- static boolean dispDest; // Resolve jump destination addresses
- static boolean dispInside; // Load/store displacement inside brackets
- static boolean hexCaps; // Upercase hexadecimal
- static int hexMode; // Hexadecimal decoration
- static boolean immNumber; // Use number sign with immediate values
- static boolean jmpBrackets; // Square brackets around JMP
- static boolean jumpAddress; // Use jump destination addresses
- static boolean lower; // Use L instead of C in conditions
- static boolean mnemonicCaps; // Uppercase mnemonics
- static boolean programCaps; // Uppercase program register names
- static boolean programNames; // Use symbolic program register names
- static boolean setfCombine; // Merge SETF condition into mnemonic
- static boolean setfNames; // Use symbolic condition names for SETF
- static boolean systemCaps; // Uppercase system register names
- static boolean systemNames; // Use symbolic system register names
- static boolean zero; // Use Z instead of E in conditions
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Hexadecimal decorations
- static final int DOLLAR = 0;
- static final int H = 1;
- static final int ZEROX = 2;
-
- // Condition mneonics
- static final String[] CONDITIONS = {
- "V" , "C" , "E" , "NH", "N", "T", "LT", "LE",
- "NV", "NC", "NE", "H" , "P", "F", "GE", "GT"
- };
-
- // Mnemonics
- static final String[] MNEMONICS = {
- "---" , "ADD" , "ADD" , "ADDF.S", "ADDI" , "AND" ,
- "ANDBSU" , "ANDI" , "ANDNBSU", "Bcond" , "CAXI" , "CLI" ,
- "CMP" , "CMP" , "CMPF.S" , "CVT.SW", "CVT.WS" , "DIV" ,
- "DIVF.S" , "DIVU" , "HALT" , "IN.B" , "IN.H" , "IN.W" ,
- "JAL" , "JMP" , "JR" , "LD.B" , "LD.H" , "LD.W" ,
- "LDSR" , "MOV" , "MOV" , "MOVBSU", "MOVEA" , "MOVHI" ,
- "MPYHW" , "MUL" , "MULF.S" , "MULU" , "NOT" , "NOTBSU" ,
- "OR" , "ORBSU" , "ORI" , "ORNBSU", "OUT.B" , "OUT.H" ,
- "OUT.W" , "RETI" , "REV" , "SAR" , "SAR" , "SCH0BSD",
- "SCH0BSU", "SCH1BSD", "SCH1BSU", "SEI" , "SETF" , "SHL" ,
- "SHL" , "SHR" , "SHR" , "ST.B" , "ST.H" , "ST.W" ,
- "STSR" , "SUB" , "SUBF.S" , "TRAP" , "TRNC.SW", "XB" ,
- "XH" , "XOR" , "XORBSU" , "XORI" , "XORNBSU"
- };
-
- // Program register names
- private static final String[] PROGRAMS = {
- null, null, "hp", "sp", "gp", "tp", null, null,
- null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, "lp"
- };
-
- // System register names
- private static final String[] SYSTEMS = {
- "EIPC", "EIPSW", "FEPC", "FEPSW", "ECR", "PSW", "PIR", "TKCW",
- null , null , null , null , null , null , null , null ,
- null , null , null , null , null , null , null , null ,
- "CHCW", "ADTRE", null , null , null , null , null , null
- };
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // One row of output
- static class Row {
- String address; // Bus address
- String bytes; // Encoded bytes in bus order
- String mnemonic; // Instruction mnemonic
- String operands; // Instruction operands, if any
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Static Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Reset all settings to their default values
- static void setDefaults() {
- bcondCombine = true;
- bcondNames = true;
- condCaps = true;
- destLast = true;
- dispDest = true;
- dispInside = false;
- hexCaps = true;
- hexMode = ZEROX;
- immNumber = false;
- jmpBrackets = true;
- jumpAddress = true;
- lower = true;
- mnemonicCaps = true;
- programCaps = false;
- programNames = true;
- setfCombine = false;
- setfNames = true;
- systemCaps = true;
- systemNames = true;
- zero = false;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Represent an instruction as text fields
- static void disassemble(int address, Instruction inst, Row row) {
-
- // Address
- String x = hexCaps ? "X" : "x";
- row.address = String.format("%08" + x, address);
-
- // Bytes
- x = "%02" + x;
- row.bytes = inst.size == 2 ?
- String.format(x + " " + x,
- inst.bits >> 16 & 0xFF,
- inst.bits >> 24 & 0xFF
- ) : String.format(x + " " + x + " " + x + " " + x,
- inst.bits >> 16 & 0xFF,
- inst.bits >> 24 & 0xFF,
- inst.bits & 0xFF,
- inst.bits >> 8 & 0xFF
- )
- ;
-
- // Bcond mnemonic
- if (inst.id == Vue.BCOND && bcondCombine) {
- row.mnemonic = "B" + CONDITIONS[inst.cond];
- if (lower && (inst.cond & 7) == 1)
- row.mnemonic = inst.cond == 1 ? "BL" : "BNL";
- if (zero && (inst.cond & 7) == 2)
- row.mnemonic = inst.cond == 2 ? "BZ" : "BNZ";
- if ( (inst.cond & 7) == 5)
- row.mnemonic = inst.cond == 5 ? "BR" : "NOP";
- }
-
- // SETF mnemonic
- else if (inst.id == Vue.SETF && setfCombine)
- row.mnemonic = "SETF" + CONDITIONS[inst.imm];
-
- // All other mnemonics
- else row.mnemonic = MNEMONICS[inst.id + 1];
-
- // Adjust mnemonic case
- if (!mnemonicCaps)
- row.mnemonic = row.mnemonic.toLowerCase();
-
- // Operands by format
- row.operands = null;
- if (inst.id != Vue.ILLEGAL) switch (inst.format) {
- case 1: // Fallthrough
- case 7: row.operands = formatI_VII(inst ); break;
- case 2: row.operands = formatII (inst ); break;
- case 3: row.operands = formatIII (inst, address); break;
- case 4: row.operands = destination(inst, address); break;
- case 5: row.operands = formatV (inst ); break;
- case 6: row.operands = formatVI (inst ); break;
- }
-
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Format the destination of a branch or jump
- private static String destination(Instruction inst, int address) {
- return !dispDest ? toHex(inst.disp, 1, false) :
- String.format("%08" + (hexCaps ? "X" : "x"), address + inst.disp);
- }
-
- // Operands for Format I and Format VII
- private static String formatI_VII(Instruction inst) {
- String reg1 = program(inst.reg1);
- String reg2 = program(inst.reg2);
-
- // One-operand instructions
- switch (inst.id) {
- case Vue.JMP:
- return String.format(jmpBrackets ? "[%s]" : "%s", reg1);
- case Vue.XB: // Fallthrough
- case Vue.XH:
- return reg2;
- }
-
- // Generic
- return String.format("%s, %s",
- destLast ? reg1 : reg2,
- destLast ? reg2 : reg1
- );
- }
-
- // Operands for Format II
- private static String formatII(Instruction inst) {
-
- // Bit string
- if (inst.opcode == 0b011111)
- return null;
-
- // Zero- or one-operand instructions
- switch (inst.id) {
-
- // Zero-operand
- case Vue.CLI : // Fallthrough
- case Vue.HALT: // Fallthrough
- case Vue.RETI: // Fallthrough
- case Vue.SEI :
- return null;
-
- // One-operand
- case Vue.TRAP:
- return Integer.toString(inst.imm);
- }
-
- // Combined SETF
- String reg2 = program(inst.reg2);
- if (inst.id == Vue.SETF && setfCombine)
- return reg2;
-
- // Two-operand instructions
- String imm = String.format("%s%d", immNumber ? "#" : "", inst.imm);
- switch (inst.id) {
- case Vue.LDSR: // Fallthrough
- case Vue.STSR:
- if (!systemNames || SYSTEMS[inst.imm] == null)
- break;
- imm = SYSTEMS[inst.imm];
- if (!systemCaps)
- imm = imm.toLowerCase();
- break;
- case Vue.SETF:
- if (!setfNames)
- break;
- imm = CONDITIONS[inst.imm];
- if (!condCaps)
- imm = imm.toLowerCase();
- break;
- }
-
- // LDSR
- if (inst.id == Vue.LDSR) {
- String temp = imm;
- imm = reg2;
- reg2 = temp;
- }
-
- // Generic
- return String.format("%s, %s",
- destLast ? imm : reg2,
- destLast ? reg2 : imm
- );
- }
-
- // Operands for Format III
- private static String formatIII(Instruction inst, int address) {
-
- // NOP
- if (bcondCombine && inst.cond == 13)
- return null;
-
- // Format destination
- String dest = destination(inst, address);
-
- // One-operand notation
- if (bcondCombine)
- return dest;
-
- // Two-operand notation
- String cond = bcondNames ?
- CONDITIONS[inst.cond] : Integer.toString(inst.cond);
- if (bcondNames && !condCaps)
- cond = cond.toLowerCase();
- return String.format("%s, %s", cond, dest);
- }
-
- // Operands for Format V
- private static String formatV(Instruction inst) {
- String reg1 = program(inst.reg1);
- String reg2 = program(inst.reg2);
- String imm = toHex(
- inst.id == Vue.MOVEA ? inst.imm & 0xFFFF : inst.imm,
- inst.id == Vue.ADDI ? 1 : 4,
- immNumber
- );
- return String.format("%s, %s, %s",
- destLast ? imm : reg2,
- reg1,
- destLast ? reg2 : imm
- );
- }
-
- // Operands for Format VI
- private static String formatVI(Instruction inst) {
- String src = program(inst.reg1);
- String dest = program(inst.reg2);
-
- // Data operand
- src = inst.disp == 0 ? String.format("[%s]", src) :
- dispInside ? String.format(
- "[%s %s %s]",
- src,
- inst.disp < 0 ? "-" : "+",
- toHex(Math.abs(inst.disp), 1, false)
- ) : String.format(
- "%s[%s]",
- toHex(inst.disp, 1, false),
- src
- )
- ;
-
- // Write instruction
- switch (inst.id) {
- case Vue.OUT_B: // Fallthrough
- case Vue.OUT_H: // Fallthrough
- case Vue.OUT_W: // Fallthrough
- case Vue.ST_B : // Fallthrough
- case Vue.ST_H : // Fallthrough
- case Vue.ST_W :
- String temp = src;
- src = dest;
- dest = temp;
- }
-
- // Format operands
- return String.format("%s, %s",
- destLast ? src : dest,
- destLast ? dest : src
- );
- }
-
- // Format a program register
- private static String program(int index) {
- String ret = programNames ? PROGRAMS[index] : null;
- if (ret == null)
- ret = "r" + index;
- return programCaps ? ret.toUpperCase() : ret;
- }
-
- // Represent an immediate value as hexadecimal
- private static String toHex(int value, int digits, boolean number) {
- return String.format(
- "%s%s%s%0" + digits + (hexCaps ? "X" : "x") + "%s",
- number ? "#" : "",
- value < 0 ? "-" : "",
- hexMode == DOLLAR ? "$" : hexMode == ZEROX ? "0x" : "",
- value < 0 ? -value : value,
- hexMode == H ? "h" : ""
- );
- }
-
-}
diff --git a/src/desktop/app/DisassemblerPane.java b/src/desktop/app/DisassemblerPane.java
deleted file mode 100644
index 4b23c63..0000000
--- a/src/desktop/app/DisassemblerPane.java
+++ /dev/null
@@ -1,405 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// Disassembler UI
-class DisassemblerPane extends JScrollPane {
-
- // Instance fields
- private int address; // Address of top row of output
- private CPUWindow parent; // Containing CPU window
- private boolean showBytes; // Display the bytes column
- private boolean shown; // Component has been shown
- private int[] widths; // Column widths
-
- // UI components
- private UPanel client; // Client area
- private ArrayList
rows; // Disassembler output
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // One row of disassembler output
- private class Row extends Disassembler.Row {
- Instruction inst; // Decoded instruction
- JLabel[] labels; // Display text
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- DisassemblerPane(CPUWindow parent) {
- super(VERTICAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_AS_NEEDED);
-
- // Configure instance fields
- this.parent = parent;
- rows = new ArrayList();
- showBytes = true;
- widths = new int[5];
-
- // Configure client area
- client = new UPanel();
- client.setBackground(SystemColor.window);
- client.setFocusable(true);
- client.addFocusListener(
- Util.onFocus(e->client.repaint(), e->client.repaint()));
- client.addKeyListener(Util.onKey(e->onKeyDown(e), null));
- client.addMouseListener(Util.onMouse(e->client.requestFocus(), null));
- client.addMouseWheelListener(e->onMouseWheel(e));
- client.addPaintListener((g,w,h)->onPaint(g, w, h));
-
- // Configure component
- setViewportView(client);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the display
- void refresh(boolean seekToPC) {
- if (seekToPC) {
- int pc = parent.parent.vue.getRegister(Vue.PC, true);
- if (!isVisible(pc))
- seek(pc, tall(false) / 3);
- }
- client.repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Event Handlers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Key down
- private void onKeyDown(KeyEvent e) {
- int code = e.getKeyCode();
- int count = tall(false);
- int mods = e.getModifiersEx();
- var vue = parent.parent.vue;
- boolean alt = (mods & InputEvent.ALT_DOWN_MASK ) != 0;
- boolean ctrl = (mods & InputEvent.CTRL_DOWN_MASK) != 0;
-
- // No Alt combinations
- if (alt) return;
-
- // Goto
- if (ctrl && code == KeyEvent.VK_G) {
- String text = JOptionPane.showInputDialog(
- this, "Goto:", "Goto", JOptionPane.PLAIN_MESSAGE);
- Object eval = vue.evaluate(text);
- int addr = 0;
- if (eval instanceof Integer)
- addr = (Integer) eval;
- else if (eval instanceof Long)
- addr = (int) (long) (Long) eval;
- else return;
- if (!isVisible(addr))
- seek(addr, count / 3);
- return;
- }
-
- // Processing by key code
- int pc = vue.getRegister(Vue.PC, true);
- var step = parent.parent.brkStep;
- switch (code) {
- case KeyEvent.VK_UP : seek(address, 1); break;
- case KeyEvent.VK_DOWN : seek(address, -1); break;
- case KeyEvent.VK_PAGE_UP : seek(address, count); break;
- case KeyEvent.VK_PAGE_DOWN: seek(address, -count); break;
-
- // Single Step
- case KeyEvent.VK_F11:
- step.setCondition("!fetch&&pc!=" + pc);
- step.setEnabled(true);
- vue.emulate(20000000);
- if (step.evaluate())
- step.setEnabled(false);
- parent.parent.refreshDebug(true);
- break;
-
- // Run to Next
- case KeyEvent.VK_F12:
- step.setCondition("!fetch&&pc==" +
- (pc + Instruction.size(vue.read(pc, Vue.U16) >> 10)));
- step.setEnabled(true);
- vue.emulate(20000000);
- if (step.evaluate())
- step.setEnabled(false);
- parent.parent.refreshDebug(true);
- break;
- }
-
- }
-
- // Mouse wheel
- private void onMouseWheel(MouseWheelEvent e) {
- seek(address, -e.getUnitsToScroll());
- }
-
- // Client paint
- private void onPaint(Graphics2D g, int width, int height) {
- var vue = parent.parent.vue;
- int pc = vue.getRegister(Vue.PC, true);
-
- // The view is being shown for the first time
- if (!shown) {
- shown = true;
- seek(pc, tall(false) / 3);
- return;
- }
-
- // Configure working variables
- int address = this.address;
- int count = tall(true);
- var data = new byte[count * 4];
- int lineHeight = parent.parent.app.fntMono.metrics.getHeight();
- int offset = 0;
-
- // Disassemble from the current address
- vue.readBytes(address, data, 0, data.length);
- widths[3] = widths[4] = 0;
- for (int y = 0; y < count; y++) {
- var row = y < rows.size() ? rows.get(y) : addRow();
- var color = SystemColor.windowText;
-
- // Disassemble the instruction
- row.inst.decode(data, offset);
- Disassembler.disassemble(address, row.inst, row);
- updateRow(row);
-
- // Highlight PC
- if (address == pc) {
- Color bg = SystemColor.control;
- if (client.isFocusOwner()) {
- bg = SystemColor.textHighlight;
- color = SystemColor.textHighlightText;
- }
- g.setColor(bg);
- g.fillRect(
- 0, y * lineHeight,
- width, lineHeight
- );
- }
-
- // Configure label text color
- for (var label : row.labels)
- label.setForeground(color);
-
- // Advance to the next instruction
- int size = address + 2 == pc ? 2 : row.inst.size;
- address += size;
- offset += size;
- }
-
- // Configure all rows
- for (int y = 0; y < rows.size(); y++) {
- var row = rows.get(y);
- int top = y * lineHeight;
-
- // Configure all labels
- for (int z = 0, x = 0; z < 5; z++) {
- var label = row.labels[z];
-
- // The label is not part of the output
- if (y >= count || widths[z] == 0) {
- label.setVisible(false);
- continue;
- }
-
- // Configure the label
- label.setLocation(x, top);
- label.setSize(label.getPreferredSize());
- x += widths[z] + lineHeight;
- }
-
- }
-
- // Update the client's size
- var size = client.getPreferredSize();
- width = -lineHeight + 1;
- for (int x = 0; x < 5; x++)
- if (widths[x] != 0 && (x != 2 || showBytes))
- width += lineHeight + widths[x];
- if (width == size.width)
- return;
- client.setPreferredSize(new Dimension(width, 0));
- revalidate();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Create a new row object
- private Row addRow() {
- var row = new Row();
- row.inst = new Instruction();
- row.labels = new JLabel[5];
-
- // Initialize columns
- for (int x = 0; x < 5; x++) {
- var label = row.labels[x] = new JLabel();
- if (x != 4)
- label.setFont(parent.parent.app.fntMono);
- client.add(label);
- }
-
- rows.add(row);
- return row;
- }
-
- // Determine whether the instruction at an address is in the client view
- private boolean isVisible(int target) {
- int count = Math.max(1, tall(false));
- var data = new byte[count * 4];
- int offset = 0;
- var vue = parent.parent.vue;
- int pc = vue.getRegister(Vue.PC, true);
- target &= 0xFFFFFFFE;
-
- // Load enough bytes to represent every fully visible instruction
- vue.readBytes(address, data, 0, data.length);
-
- // Iterate through instructions
- for (int x = 0, address = this.address; x < count; x++) {
-
- // Determine the instruction's size
- int size = address + 2 == pc ? 2 :
- Instruction.size(data[offset + 1] >> 2 & 0x3F);
-
- // The current instruction is the target
- if (address == target || size == 4 && address + 2 == target)
- return true;
-
- // Advance to the next instruction
- address += size;
- offset += size;
- }
-
- // The instruction is not visible in the view
- return false;
- }
-
- // Determine the address of the top row of output
- private void seek(int target, int row) {
- var data = new byte[(Math.abs(row) + 9) * 4];
- int offset = 0;
- var vue = parent.parent.vue;
- int pc = vue.getRegister(Vue.PC, true);
- target &= 0xFFFFFFFE;
-
- // Scrolling down
- if (row <= 0) {
-
- // Load bytes starting up to 8 instructions prior to the target
- address = target - 32;
- vue.readBytes(address, data, 0, data.length);
-
- // Iterate through instructions
- for (boolean found = false;;) {
-
- // Determine the instruction's size
- int size = address + 2 == pc ? 2 :
- Instruction.size(data[offset + 1] >> 2 & 0x3F);
-
- // The current instruction is the target
- if (address == target || size == 4 && address + 2 == target)
- found = true;
- if (found && row++ == 0)
- break;
-
- // Advance to the next instruction
- address += size;
- offset += size;
- }
-
- }
-
- // Scrolling up
- else {
-
- // Load bytes starting up to 8 instructions prior to the top row
- address = target - data.length + 4;
- vue.readBytes(address, data, 0, data.length);
-
- // Iterate through instructions
- var addresses = new int[row]; // Circular buffer
- for (int index = 0;;) {
-
- // Determine the instruction's size
- int size = pc == address + 2 ? 2 :
- Instruction.size(data[offset + 1] >> 2 & 63);
-
- // The current instruction is the target
- if (address == target || size == 4 && address + 2 == target) {
- address = addresses[index];
- break;
- }
-
- // Advance to the next instruction
- addresses[index] = address;
- if (++index == row)
- index = 0;
- address += size;
- offset += size;
- }
-
- }
-
- // Common processing
- client.repaint();
- }
-
- // Determine how many rows of output are visible
- private int tall(boolean partial) {
- int lineHeight = parent.parent.app.fntMono.metrics.getHeight();
- return Math.max(1, (client.getHeight() +
- (partial ? lineHeight - 1 : 0)
- ) / lineHeight);
- }
-
- // Update a row with its text and measure the column widths
- private void updateRow(Row row) {
-
- for (int x = 0; x < 5; x++) {
- var label = row.labels[x];
-
- String text = null;
- switch (x) {
- case 0: text = row.address ; break;
- case 1: text = row.bytes ; break;
- case 2: text = row.mnemonic; break;
- case 3: text = row.operands; break;
- }
-
- if (text != null) {
- label.setText(text);
- label.setVisible(x == 1 ? showBytes : true);
- widths[x] = Math.max(widths[x],label.getPreferredSize().width);
- } else label.setVisible(false);
- }
-
- }
-
-}
diff --git a/src/desktop/app/MainWindow.java b/src/desktop/app/MainWindow.java
deleted file mode 100644
index dd51f8e..0000000
--- a/src/desktop/app/MainWindow.java
+++ /dev/null
@@ -1,477 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.image.*;
-import java.io.*;
-import javax.swing.*;
-import javax.swing.filechooser.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// Main application window
-class MainWindow extends JFrame {
-
- // Instance fields
- App app; // Containing application
- Breakpoint brkStep; // Single step internal breakpoint
- int[][][] palettes; // Raster palettes
- byte[] vram; // Snapshot of VIP memory
- Vue vue; // Emulation core context
-
- // Private fields
- private boolean debugMode; // Window is in debug mode
- private int number; // Window number within application
- private boolean only; // This is the only application window
- private File pwd; // Most recent working directory
- private ROM rom; // Currently loaded ROM
- private File romFile; // Currently loaded ROM file
-
- // UI components
- private UPanel client; // Common client container
- private JDesktopPane desktop; // Container for child windows
- private JMenu mnuDebug; // Debug menu
- private UPanel video; // Video output
- private JMenuItem mnuFileDebugMode; // File -> Debug mode
- private JMenuItem mnuFileGameMode; // File -> Game mode
-
- // Child windows
- private BGMapsWindow bgMaps;
- private BreakpointsWindow breakpoints;
- private CharactersWindow characters;
- private ConsoleWindow console;
- private CPUWindow cpu;
- private MemoryWindow memory;
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Palette indexes
- static final int GENERIC = 0;
- static final int GPLT0 = 1;
- static final int GPLT1 = 2;
- static final int GPLT2 = 3;
- static final int GPLT3 = 4;
- static final int JPLT0 = 5;
- static final int JPLT1 = 6;
- static final int JPLT2 = 7;
- static final int JPLT3 = 8;
- static final int LEFT = 0;
- static final int RIGHT = 1;
- static final int RED = 2;
-
- // Application icon
- private static final BufferedImage APPICON;
-
- // Static initializer
- static {
- APPICON = Util.imageRead("images/app_icon.png");
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- MainWindow(App app) {
- super();
-
- // Configure instance fields
- this.app = app;
- palettes = new int[9][3][4];
- pwd = Util.PWD;
- vram = new byte[0x40000];
- vue = Vue.create(app.getUseNative());
- System.out.println("Native: " +
- (vue.isNative() ? Vue.getNativeID() : "No"));
-
- // Configure video pane
- video = new UPanel();
- video.setPreferredSize(new Dimension(384, 224));
- video.setFocusable(true);
- video.addPaintListener((g,w,h)->onPaintVideo(g, w, h));
-
- // Configure client area
- client = new UPanel(new BorderLayout());
- client.add(video, BorderLayout.CENTER);
-
- // Configure window
- addWindowListener(Util.onClose(e->onClose()));
- setContentPane(client);
- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
- setIconImage(APPICON);
- setJMenuBar(initMenus());
- app.localizer.add(this, "app.title.default");
-
- // Configure child windows
- desktop = new JDesktopPane();
- desktop.setBackground(SystemColor.controlShadow);
- desktop.add(bgMaps = new BGMapsWindow (this));
- desktop.add(breakpoints = new BreakpointsWindow(this));
- desktop.add(characters = new CharactersWindow (this));
- desktop.add(console = new ConsoleWindow (this));
- desktop.add(cpu = new CPUWindow (this));
- desktop.add(memory = new MemoryWindow (this));
-
- // Configure internal breakpoints
- brkStep = vue.breakpoint();
- brkStep.setRead(true);
-
- // Display window
- refreshDebug(true);
- pack();
- setLocationRelativeTo(null);
- setVisible(true);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Menu Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Produce the window's menu bar
- private JMenuBar initMenus() {
- var bar = new JMenuBar();
- var loc = app.localizer;
- bar.add(initMenuFile (loc));
- bar.add(initMenuDebug(loc));
- return bar;
- }
-
- // Initialize the Debug menu
- private JMenu initMenuDebug(Localizer loc) {
- mnuDebug = new JMenu();
- loc.add(mnuDebug, "app.debug.(menu)");
- mnuDebug.setVisible(false);
-
- var mnuDebugBreakpoints = new JMenuItem();
- loc.add(mnuDebugBreakpoints, "app.debug.breakpoints");
- mnuDebugBreakpoints.addActionListener(e->breakpoints.setVisible(true));
- mnuDebug.add(mnuDebugBreakpoints);
-
- var mnuDebugConsole = new JMenuItem();
- loc.add(mnuDebugConsole, "app.debug.console");
- mnuDebugConsole.addActionListener(e->console.setVisible(true));
- mnuDebug.add(mnuDebugConsole);
-
- var mnuDebugCPU = new JMenuItem();
- loc.add(mnuDebugCPU, "app.debug.cpu");
- mnuDebugCPU.addActionListener(e->cpu.setVisible(true));
- mnuDebug.add(mnuDebugCPU);
-
- var mnuDebugMemory = new JMenuItem();
- loc.add(mnuDebugMemory, "app.debug.memory");
- mnuDebugMemory.addActionListener(e->memory.setVisible(true));
- mnuDebug.add(mnuDebugMemory);
-
- mnuDebug.addSeparator();
-
- var mnuDebugBGMaps = new JMenuItem();
- loc.add(mnuDebugBGMaps, "app.debug.bg_maps");
- mnuDebugBGMaps.addActionListener(e->bgMaps.setVisible(true));
- mnuDebug.add(mnuDebugBGMaps);
-
- var mnuDebugCharacters = new JMenuItem();
- loc.add(mnuDebugCharacters, "app.debug.characters");
- mnuDebugCharacters.addActionListener(e->characters.setVisible(true));
- mnuDebug.add(mnuDebugCharacters);
-
- var mnuDebugFrameBuffers = new JMenuItem();
- mnuDebugFrameBuffers.setEnabled(false);
- loc.add(mnuDebugFrameBuffers, "app.debug.frame_buffers");
- mnuDebug.add(mnuDebugFrameBuffers);
-
- var mnuDebugObjects = new JMenuItem();
- mnuDebugObjects.setEnabled(false);
- loc.add(mnuDebugObjects, "app.debug.objects");
- mnuDebug.add(mnuDebugObjects);
-
- var mnuDebugWorlds = new JMenuItem();
- mnuDebugWorlds.setEnabled(false);
- loc.add(mnuDebugWorlds, "app.debug.worlds");
- mnuDebug.add(mnuDebugWorlds);
-
- return mnuDebug;
- }
-
- // Initialize the File menu
- private JMenu initMenuFile(Localizer loc) {
- var mnuFile = new JMenu();
- loc.add(mnuFile, "app.file.(menu)");
-
- var mnuFileLoadRom = new JMenuItem();
- loc.add(mnuFileLoadRom, "app.file.load_rom");
- mnuFileLoadRom.addActionListener(e->onLoadROM());
- mnuFile.add(mnuFileLoadRom);
-
- mnuFileDebugMode = new JMenuItem();
- loc.add(mnuFileDebugMode, "app.file.debug_mode");
- mnuFileDebugMode.addActionListener(e->onDebugMode(true));
- mnuFile.add(mnuFileDebugMode);
-
- mnuFileGameMode = new JMenuItem();
- loc.add(mnuFileGameMode, "app.file.game_mode");
- mnuFileGameMode.addActionListener(e->onDebugMode(false));
- mnuFileGameMode.setVisible(false);
- mnuFile.add(mnuFileGameMode);
-
- mnuFile.addSeparator();
-
- var mnuFileNewWindow = new JMenuItem();
- loc.add(mnuFileNewWindow, "app.file.new_window");
- mnuFileNewWindow.addActionListener(e->onNewWindow());
- mnuFile.add(mnuFileNewWindow);
-
- var mnuFileExit = new JMenuItem();
- loc.add(mnuFileExit, "app.file.exit");
- mnuFileExit.addActionListener(e->onClose());
- mnuFile.add(mnuFileExit);
-
- return mnuFile;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Draw a character into a pixel buffer
- void drawCharacter(int index, boolean hFlip, boolean vFlip, int[] palette,
- int[] buffer, int offset, int stride) {
- int addr = index >> 9 << 15 | 0x00006000 | (index & 511) << 4;
-
- for (int y = 0; y < 8; y++, offset += stride - 8)
- for (int x = 0; x < 8; x++, offset += 1 ) {
- int ix = hFlip ? 7 - x : x;
- int iy = vFlip ? 7 - y : y;
- int b = addr | iy << 1 | ix >> 2;
- int bit = (ix & 3) << 1;
- buffer[offset] = palette[vram[b] >> bit & 3];
- }
-
- }
-
- // Refresh all debug views
- void refreshDebug(boolean seekToPC) {
- vue.readBytes(0x00000000, vram, 0, vram.length);
- refreshPalettes();
- refreshDebugLite(seekToPC);
- }
-
- // Refresh all debug views without retrieving video memory
- void refreshDebugLite(boolean seekToPC) {
- bgMaps .refresh();
- breakpoints.refresh();
- characters .refresh();
- cpu .refresh(seekToPC);
- memory .refresh();
- }
-
- // A window has been added to or removed from the program state
- void windowsChanged(int number, boolean only) {
- this.number = number;
- this.only = only;
- app.localizer.put(this, "ctrl.number", "" + number);
- updateTitle();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Event Handlers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Window close, File -> Exit
- private void onClose() {
- app.removeWindow(this);
- cpu.dispose();
- dispose();
- vue.dispose();
- }
-
- // File -> Debug mode, File -> Game mode
- private void onDebugMode(boolean debugMode) {
- this.debugMode = debugMode;
- mnuFileDebugMode.setVisible(!debugMode);
- mnuFileGameMode .setVisible( debugMode);
-
- // Transition to debug mode
- if (debugMode) {
- client.remove(video);
- client.add(desktop, BorderLayout.CENTER);
- console.setContentPane(video);
- console.firstShow();
- mnuDebug.setVisible(true);
- }
-
- // Transition to game mode
- else {
- client.remove(desktop);
- client.add(video, BorderLayout.CENTER);
- mnuDebug.setVisible(false);
- }
-
- client.revalidate();
- client.repaint();
- }
-
- // File -> Load ROM
- private void onLoadROM() {
- var loc = app.localizer;
-
- // Prompt the user to select a file
- var dlgFile = new JFileChooser(pwd);
- dlgFile.addChoosableFileFilter(new FileNameExtensionFilter(
- loc.get("dialog.ext_vb"), "vb"));
- dlgFile.addChoosableFileFilter(new FileNameExtensionFilter(
- loc.get("dialog.ext_isx"), "isx"));
- dlgFile.setAcceptAllFileFilterUsed(true);
- dlgFile.setDialogTitle(loc.get("dialog.load_rom"));
- int option = dlgFile.showDialog(this, loc.get("dialog.load"));
-
- // The user did not select a file
- var file = dlgFile.getSelectedFile();
- if (option != JFileChooser.APPROVE_OPTION || file == null)
- return;
-
- // Update the current directory
- pwd = file.getParentFile();
-
- // Read the file
- var data = Util.fileRead(file);
- if (data == null) {
- JOptionPane.showMessageDialog(this,
- loc.get("dialog.load_rom_error"),
- loc.get("dialog.load_rom"),
- JOptionPane.ERROR_MESSAGE
- );
- return;
- }
-
- // Process the ROM
- ROM rom = null;
- try { rom = new ROM(data); }
- catch (Exception e) {
- JOptionPane.showMessageDialog(this,
- loc.get("dialog.load_rom_notvb"),
- loc.get("dialog.load_rom"),
- JOptionPane.ERROR_MESSAGE
- );
- return;
- }
-
- // Update instance fields
- this.rom = rom;
- romFile = file;
- loc.put(this, "ctrl.filename", file.getName());
- updateTitle();
-
- // Update the emulation state
- var bytes = rom.toByteArray();
- // Pause emulation
- vue.setROM(bytes, 0, bytes.length);
- vue.reset();
- refreshDebug(true);
- // Resume emulation
- }
-
- // File -> New window
- private void onNewWindow() {
- app.addWindow();
- }
-
- // Video paint
- private void onPaintVideo(Graphics2D g, int width, int height) {
- int scale = Math.max(1, Math.min(width / 384, height / 224));
-
- g.translate(
- Math.max(0, (width - scale * 384) / 2),
- Math.max(0, (height - scale * 224) / 2)
- );
- g.scale(scale, scale);
-
- g.setColor(Color.black);
- g.fillRect(0, 0, 384, 224);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the palette composites
- private void refreshPalettes() {
-
- // Process brightness levels
- int[] brt = { 0,
- vue.read(0x0005F824, Vue.U8),
- vue.read(0x0005F826, Vue.U8),
- vue.read(0x0005F828, Vue.U8)
- };
- brt[3] += brt[0] + brt[1];
- for (int x = 1; x < 4; x++)
- brt[x] = (Math.min(127, brt[x]) * 510 + 127) / 254 << 1;
-
- // Process all palettes
- var pal = new int[4];
- for (int x = 0; x < 9; x++) {
-
- // Generic palette
- if (x == GENERIC) {
- pal[1] = 0x55 << 1;
- pal[2] = 0xAA << 1;
- pal[3] = 0xFF << 1;
- }
-
- // Palette from emulation state
- else {
- int bits = vue.read(0x0005F860 + (x - 1 << 1), Vue.U8);
- pal[1] = brt[bits >> 2 & 3];
- pal[2] = brt[bits >> 4 & 3];
- pal[3] = brt[bits >> 6 ];
- }
-
- // Process colors
- for (int y = 0; y < 3; y++) {
- var base = app.rgbBase[y];
- var dest = palettes[x][y];
- dest[0] = 0xFF000000 | app.rgbClear;
- for (int z = 1; z < 4; z++) {
- dest[z] = 0xFF000000;
- for (int w = 0, bits = 16; w < 3; w++, bits -= 8)
- dest[z] |= (pal[z] * base[w] + 255) / 510 << bits;
- }
- }
-
- }
-
- }
-
- // Separate the RGB components of a color
- private static int[] split(int rgb) {
- return new int[] { rgb >> 16 & 0xFF, rgb >> 8 & 0xFF, rgb & 0xFF };
- }
-
- // Update the window title
- private void updateTitle() {
- app.localizer.add(this,
- only ? romFile != null ?
- "app.title.rom" :
- "app.title.default"
- : romFile != null ?
- "app.title.mixed" :
- "app.title.number"
- );
- }
-
-}
diff --git a/src/desktop/app/MemoryWindow.java b/src/desktop/app/MemoryWindow.java
deleted file mode 100644
index 5eec8de..0000000
--- a/src/desktop/app/MemoryWindow.java
+++ /dev/null
@@ -1,248 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-
-// Memory viewer and hex editor window
-class MemoryWindow extends ChildWindow {
-
- // Private fields
- private int address; // Address of top row
-
- // UI components
- private UPanel client; // Client area
- private ArrayList rows; // Rows of text
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // One row of output
- private class Row {
- JLabel address; // Address (row header)
- JLabel[] bytes; // Hexadecimal bytes
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- MemoryWindow(MainWindow parent) {
- super(parent, "memory.title");
-
- // Configure instance fields
- address = 0x00000000;
- rows = new ArrayList();
-
- // Configure client area
- client = new UPanel();
- client.addComponentListener(Util.onResize(e->onResize()));
- client.addKeyListener(Util.onKey(e->onKeyDown(e), null));
- client.addMouseWheelListener(e->onWheel(e));
- client.setBackground(SystemColor.window);
- client.setFocusable(true);
- client.setPreferredSize(new Dimension(480, 360));
-
- // Configure component
- var content = new UPanel(new BorderLayout());
- content.setBorder(new JScrollPane().getBorder());
- content.add(client, BorderLayout.CENTER);
- setContentPane(content);
- pack();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Update the display
- void refresh() {
-
- // The element is not ready
- if (client == null)
- return;
-
- // Configure working variables
- int height = client.getHeight();
- int lineHeight = parent.app.fntMono.metrics.getHeight();
- int count = (height + lineHeight - 1) / lineHeight;
- var data = new byte[count * 16];
-
- // Retrieve all visible bytes from the emulation context
- parent.vue.readBytes(address, data, 0, data.length);
-
- // Update visible rows
- for (int x = 0; x < count; x++) {
- Row row;
- if (x < rows.size())
- row = rows.get(x); // Retrieve row from collection
- else row = createRow(); // Produce a new row
- update(row, x * lineHeight, address + x * 16, data, x * 16);
- setVisible(row, true);
- }
-
- // Hide any rows that are not visible
- for (int x = count; x < rows.size(); x++)
- setVisible(rows.get(x), false);
-
- // Finalize layout
- client.revalidate();
- client.repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Event Handlers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Key down
- private void onKeyDown(KeyEvent e) {
- int code = e.getKeyCode();
- int mods = e.getModifiersEx();
- boolean alt = (mods & InputEvent.ALT_DOWN_MASK ) != 0;
- boolean ctrl = (mods & InputEvent.CTRL_DOWN_MASK) != 0;
- int tall = Math.max(1, tall(false));
-
- // No Alt combinations
- if (alt) return;
-
- // Goto
- if (ctrl && code == KeyEvent.VK_G) {
- String text = JOptionPane.showInputDialog(
- this, "Goto:", "Goto", JOptionPane.PLAIN_MESSAGE);
- Object eval = parent.vue.evaluate(text);
- int addr = 0;
- if (eval instanceof Integer)
- addr = (Integer) eval;
- else if (eval instanceof Long)
- addr = (int) (long) (Long) eval;
- else return;
- setAddress(addr);
- return;
- }
-
- // Seek
- switch (code) {
- case KeyEvent.VK_UP : setAddress(address - 16); break;
- case KeyEvent.VK_DOWN : setAddress(address + 16); break;
- case KeyEvent.VK_PAGE_UP : setAddress(address - tall * 16); break;
- case KeyEvent.VK_PAGE_DOWN: setAddress(address + tall * 16); break;
- }
-
- }
-
- // Client resize
- private void onResize() {
- refresh();
- }
-
- // Mouse wheel
- private void onWheel(MouseWheelEvent e) {
- int amount = e.getUnitsToScroll();
- int mods = e.getModifiersEx();
- boolean alt = (mods & InputEvent.ALT_DOWN_MASK ) != 0;
- boolean ctrl = (mods & InputEvent.CTRL_DOWN_MASK) != 0;
-
- // No Alt or Ctrl combinations
- if (amount == 0 || alt || ctrl)
- return;
-
- // Seek
- setAddress(address + 16 * amount);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a new row of output
- private Row createRow() {
- var font = parent.app.fntMono;
- var row = new Row();
-
- // Address label
- row.address = new JLabel();
- row.address.setFont(font);
- row.address.setForeground(SystemColor.windowText);
- row.address.setVisible(false);
- client.add(row.address);
-
- // Byte labels
- row.bytes = new JLabel[16];
- for (int x = 0; x < row.bytes.length; x++) {
- var label = row.bytes[x] = new JLabel();
- label.setFont(font);
- label.setForeground(SystemColor.windowText);
- label.setHorizontalAlignment(SwingConstants.CENTER);
- label.setVisible(false);
- client.add(label);
- }
-
- // Add the row to the collection
- rows.add(row);
- return row;
- }
-
- // Measure the minimum column widths for a row
- private void measure(Row row, int[] widths) {
- widths[0] = Math.max(widths[0], row.address.getPreferredSize().width);
- for (int x = 0; x < 16; x++)
- widths[1] = Math.max(widths[1],
- row.bytes[x].getPreferredSize().width);
- }
-
- // Specify the address of the top row of output
- private void setAddress(int address) {
- this.address = address & 0xFFFFFFF0;
- refresh();
- }
-
- // Show or hide a row
- private void setVisible(Row row, boolean visible) {
- row.address.setVisible(visible);
- for (var label : row.bytes)
- label.setVisible(visible);
- }
-
- // Determine how many rows of output are visible
- private int tall(boolean partial) {
- int lineHeight = parent.app.fntMono.metrics.getHeight();
- return (client.getHeight() + (partial?lineHeight-1:0)) / lineHeight;
- }
-
- // Update the text of a row
- private void update(Row row, int y, int address, byte[] data, int offset) {
- int hexDigitWidth = parent.app.hexDigitWidth;
- int lineHeight = parent.app.fntMono.metrics.getHeight();
-
- // Update address
- row.address.setBounds(0, y, 8 * hexDigitWidth, lineHeight);
- row.address.setText(String.format("%08X", address));
-
- // Update bytes
- for (int z = 0, x = 10 * hexDigitWidth; z < 16; z++) {
- var label = row.bytes[z];
- label.setBounds(x, y, 2 * hexDigitWidth, lineHeight);
- label.setText(String.format("%02X", data[offset++] & 0xFF));
- x += hexDigitWidth * (z == 7 ? 4 : 3);
- }
-
- }
-
-}
diff --git a/src/desktop/app/ROM.java b/src/desktop/app/ROM.java
deleted file mode 100644
index d72aa6a..0000000
--- a/src/desktop/app/ROM.java
+++ /dev/null
@@ -1,254 +0,0 @@
-package app;
-
-// Java imports
-import java.nio.charset.*;
-import java.util.*;
-
-// Cartridge ROM module
-public class ROM {
-
- // Instance fields
- private byte[] data; // Binary data
- private int format; // File format of loaded file
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Formats
- public static final int RAW = 0;
- public static final int ISX = 1;
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // ISX code segments
- private static class Code {
- int address; // CPU address
- int offset; // Position within file
- int size; // Number of bytes
- Code(int o, int a, int s) { address = a; offset = o; size = s; }
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- ROM(byte[] data) {
-
- // Attempt to decode as ISX
- try { isxDecode(data); return; } catch (Exception e) { }
-
- // Attempt to decode as raw
- try { rawDecode(data); return; } catch (Exception e) { }
-
- // Unable to identify the file contents
- throw new RuntimeException();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Retrieve the game code from the ROM header
- public String getGameCode() {
- var bytes = new byte[4];
- System.arraycopy(data, data.length - 517, bytes, 0, 4);
- return new String(bytes, StandardCharsets.ISO_8859_1);
- }
-
- // Retrieve the file format of the loaded ROM file
- public int getFormat() {
- return format;
- }
-
- // Retrieve the maker code from the ROM header
- public String getMaker() {
- var bytes = new byte[2];
- System.arraycopy(data, data.length - 519, bytes, 0, 2);
- return new String(bytes, StandardCharsets.ISO_8859_1);
- }
-
- // Retrieve the number of bytes in the ROM data
- public int getSize() {
- return data.length;
- }
-
- // Retrieve the game title from the ROM header
- public String getTitle() {
- return ShiftJIS.decode(data, data.length - 544, 20).trim();
- }
-
- // Retrieve the version number from the ROM header
- public int getVersion() {
- return data[data.length - 513] & 0xFF;
- }
-
- // Produce a byte array containing the ROM contents
- public byte[] toByteArray() {
- var ret = new byte[data.length];
- System.arraycopy(data, 0, ret, 0, data.length);
- return ret;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Decode the file data as ISX
- private void isxDecode(byte[] data) {
- var codes = isxParse(data); // ISX code segments
- int head = -1; // Latest address in bottom half of ROM address space
- int tail = -1; // Earliest address in upper half of ROM address space
-
- // Process all code segments
- for (var code : codes) {
- int end = code.address + code.size - 1;
- int start = code.address;
- boolean isHead = end >= 0; // Lower half of CPU address range
- boolean isTail = start < 0; // Upper half of CPU address range
-
- // The segment spans the middle of the ROM address space
- if (isHead && isTail) {
- head = 0x7FFFFF;
- tail = 0x800000;
- break;
- }
-
- // Track the segment's position within the ROM address space
- end &= 0x00FFFFFF;
- start &= 0x00FFFFFF;
- if (isHead && (head == -1 || head < end )) head = end;
- if (isTail && (tail == -1 || tail > start)) tail = start;
- }
-
- // Determine the required ROM size
- int size = 1024;
- int minSize = (head == -1 ? 0 : head + 1) +
- (tail == -1 ? 0 : 0x01000000 - tail);
- if (minSize == 0 || tail == -1 &&
- (minSize < 1024 || (minSize - 1 & minSize) != 0))
- throw new RuntimeException();
- for (; size < minSize; size <<= 1);
-
- // Transfer the code segments into the ROM buffer
- this.data = new byte[size];
- for (var code : codes)
- System.arraycopy(
- data , code.offset,
- this.data, code.address & size - 1,
- code.size
- );
-
- // The ROM is valid
- format = ISX;
- }
-
- // Parse the code records from the ISX data
- private Code[] isxParse(byte[] data) {
- int count;
- int offset = 0;
- var ret = new ArrayList();
-
- // Check for an extended ISX header
- if (readInt(data, 0, 3) == 0x585349) // ASCII "ISX"
- offset = 32;
-
- // Process records
- while (offset != data.length)
- switch (data[offset++] & 0xFF) {
-
- // SNES code
- case 0x01:
- if ((data[offset++] & 0xFF) >= 0x80) // Bank
- offset++; // BankHigh
- offset += 2; // Address
- offset += 2 + readInt(data, offset, 2); // Data
- break;
-
- // SNES range
- case 0x03:
- // Count, { Bank, StartAddress, EndAddress, Type }
- offset += 2 + readInt(data, offset, 2) * 6;
- break;
-
- // SNES symbol
- case 0x04:
- count = readInt(data, offset, 2); offset += 2;
- for (; count > 0; count--) // Name, Flags, Bank, Address
- offset += 5 + readInt(data, offset, 1);
- break;
-
- // Virtual Boy code
- case 0x11:
- int address = readInt(data, offset, 4); offset += 4;
- int size = readInt(data, offset, 4); offset += 4;
- if ((address & 0x07000000) != 0x07000000 || size < 0 ||
- (address & 0x00FFFFFF) + size > 0x01000000)
- throw new RuntimeException();
- ret.add(new Code(offset, address, size));
- offset += size;
- break;
-
- // Virtual Boy range
- case 0x13:
- // Count, { StartAddress, EndAddress, Type }
- offset += 2 + readInt(data, offset, 2) * 9;
- break;
-
- // Virtual Boy symbol
- case 0x14:
- count = readInt(data, offset, 2); offset += 2;
- for (; count > 0; count--) // Name, Flags, Address
- offset += 7 + readInt(data, offset, 1);
- break;
-
- // System
- case 0x20: case 0x21: case 0x22:
- offset += 4 + readInt(data, offset, 4); // Debug, undocumented
- break;
-
- // Invalid record type
- default:
- throw new RuntimeException();
- }
-
- return ret.toArray(new Code[ret.size()]);
- }
-
- // Decode the file as raw
- private void rawDecode(byte[] data) {
-
- // Validate length
- if (
- data.length < 1024 || // Exception handlers and ROM header
- data.length > 0x00FFFFFF || // 24-bit bus width
- (data.length & data.length - 1) != 0 // Must be a power of 2
- ) throw new RuntimeException();
-
- // The ROM is valid
- this.data = data;
- format = RAW;
- }
-
- // Read an integer from a byte array
- private static int readInt(byte[] data, int offset, int size) {
- int ret = 0;
- for (size--; size >= 0; size--)
- ret = ret << 8 | data[offset + size] & 0xFF;
- return ret;
- }
-
-}
diff --git a/src/desktop/app/Register.java b/src/desktop/app/Register.java
deleted file mode 100644
index b2d1569..0000000
--- a/src/desktop/app/Register.java
+++ /dev/null
@@ -1,521 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// Register list item
-class Register {
-
- // Instance fields
- private boolean expandable; // The expansion area can be shown
- private boolean expanded; // The expanded area is being shown
- private int index; // Register index
- private int mode; // Display mode for program registers
- private String name; // Register name
- private RegisterList parent; // Containing register list
- private int type; // Expansion controls type
- private int value; // Current register value
-
- // UI components
- UPanel expansion; // Expansion container
- JLabel btnExpand; // Expand button
- UPanel indent; // Expansion area indentation
- JLabel lblName; // Register name
- JTextField txtValue; // Register value
- ArrayList controls; // Expansion controls
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Modes
- static final int FLOAT = 3;
- static final int HEX = 0;
- static final int SIGNED = 1;
- static final int UNSIGNED = 2;
-
- // Types
- static final int PLAIN = -2;
- static final int PROGRAM = -3;
-
- // Expand button labels
- static final String COLLAPSE = "-";
- static final String EXPAND = "+";
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- Register(RegisterList parent, String name, int index, int type) {
- parent.add(index, this);
-
- // Configure instance fields
- controls = new ArrayList();
- expandable = type != PLAIN && index != 0;
- this.index = index;
- mode = HEX;
- this.name = name;
- this.parent = parent;
- this.type = type;
-
- // Click handler for expand and name controls
- MouseListener expand = !expandable ? null : Util.onMouse(e->{
- if (e.getButton() == 1) setExpanded(!expanded); }, null);
-
- // Expand button
- btnExpand = new JLabel(expandable ? EXPAND : "");
- btnExpand.setHorizontalAlignment(SwingConstants.CENTER);
- if (expandable)
- btnExpand.addMouseListener(expand);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.NORTH;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- parent.add(gbc, btnExpand);
-
- // Name label
- lblName = new JLabel(" ");
- if (expandable)
- lblName.addMouseListener(expand);
- gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.NORTH;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.weightx = 1;
- parent.add(gbc, lblName);
-
- // Value text box
- txtValue = new JTextField();
- txtValue.setBorder(null);
- txtValue.setOpaque(false);
- txtValue.setText("00000000");
- gbc = new GridBagConstraints();
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 4, 0, 0);
- parent.add(gbc, txtValue);
-
- // Value changed
- txtValue.addActionListener(e->parent.requestFocus());
- txtValue.addFocusListener(Util.onFocus(null, e->{
- String text = txtValue.getText();
- int val = value;
- try { switch (mode) {
- case HEX : val = (int) Long.parseLong(text, 16); break;
- case SIGNED : // Fallthrough
- case UNSIGNED: val = (int) Long.parseLong(text, 10); break;
- case FLOAT : val =
- Float.floatToIntBits(Float.parseFloat(text) ); break;
- }} catch (Exception x) { }
- setValue(val);
- }));
-
- // Expansion controls
- switch (type) {
- case PROGRAM : initProgram(); break;
- case Vue.CHCW: initCHCW (); break;
- case Vue.ECR : initECR (); break;
- case Vue.PC : initPC (); break;
- case Vue.PIR : initPIR (); break;
- case Vue.PSW : initPSW (); break;
- case Vue.TKCW: initTKCW (); break;
- default: configure(); return;
- }
-
- // Expansion indentation
- if (index != Vue.PC) {
- indent = new UPanel();
- indent.setOpaque(false);
- indent.setPreferredSize(new Dimension(0, 0));
- indent.setVisible(false);
- gbc = new GridBagConstraints();
- parent.add(gbc, indent);
- }
-
- // Expansion area
- expansion.setOpaque(false);
- expansion.setVisible(false);
- gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.WEST;
- if (index == Vue.PC)
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 4, 0, 0);
- gbc.weightx = 1;
- parent.add(gbc, expansion);
-
- // Handling for PSW
- if (index == Vue.PSW && type == Vue.PSW)
- setExpanded(true);
-
- // Apply application settings
- configure();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Expansion Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Expansion controls for CHCW
- private void initCHCW() {
- expansion = new UPanel(new GridBagLayout());
- addCheckBox("ICE", 1, false, true);
- }
-
- // Expansion controls for ECR
- private void initECR() {
- expansion = new UPanel(new GridBagLayout());
- addTextBox("EICC", 0, 16, false, true);
- addTextBox("FECC", 16, 16, false, true);
- }
-
- // Expansion controls for program registers
- private void initProgram() {
- expansion = new UPanel(new GridBagLayout());
- var group = new ButtonGroup();
- group.add(addRadioButton("cpu.hex" , HEX ));
- group.add(addRadioButton("cpu.signed" , SIGNED ));
- group.add(addRadioButton("cpu.unsigned", UNSIGNED));
- group.add(addRadioButton("cpu.float" , FLOAT ));
- }
-
- // Expansion controls for PC
- private void initPC() {
- expansion = new UPanel(new GridBagLayout());
-
- // Configure controls
- for (int x = 0; x < 2; x++) {
-
- // Indentation
- indent = new UPanel();
- indent.setOpaque(false);
- indent.setPreferredSize(new Dimension(0, 0));
- var gbc = new GridBagConstraints();
- gbc.weightx = 1;
- expansion.add(indent, gbc);
-
- // Name label
- var label = new JLabel();
- parent.parent.parent.app.localizer.add(label,
- x == 0 ? "cpu.jump_from" : "cpu.jump_to" );
- gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.NORTHWEST;
- expansion.add(label, gbc);
- controls.add(label);
-
- // Value text box
- var txt = new JTextField();
- txt.addActionListener(e->parent.requestFocus());
- txt.addFocusListener(Util.onFocus(null,
- e->txt.setText((String) txt.getClientProperty("text"))));
- txt.putClientProperty("index",
- x == 0 ? Vue.JUMP_FROM : Vue.JUMP_TO);
- txt.setBorder(null);
- txt.setOpaque(false);
- gbc = new GridBagConstraints();
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 4, 0, 0);
- expansion.add(txt, gbc);
- controls.add(txt);
- }
-
- }
-
- // Expansion controls for PSW
- private void initPSW() {
- expansion = new UPanel(new GridBagLayout());
- addCheckBox("Z" , 0, false, false);
- addCheckBox("FRO", 9, false, true );
- addCheckBox("S" , 1, false, false);
- addCheckBox("FIV", 8, false, true );
- addCheckBox("OV" , 2, false, false);
- addCheckBox("FZD", 7, false, true );
- addCheckBox("CY" , 3, false, false);
- addCheckBox("FOV", 6, false, true );
- addCheckBox("EP" , 14, false, false);
- addCheckBox("FUD", 5, false, true );
- addCheckBox("NP" , 15, false, false);
- addCheckBox("FPR", 4, false, true );
- addCheckBox("AE" , 13, false, true );
- addCheckBox("ID" , 12, false, false);
- addTextBox ("I" , 16, 4, false, false);
- }
-
- // Expansion controls for PIR
- private void initPIR() {
- expansion = new UPanel(new GridBagLayout());
- addTextBox("PT", 0, 16, true, true);
- }
-
- // Expansion controls for TKCW
- private void initTKCW() {
- expansion = new UPanel(new GridBagLayout());
- addCheckBox("OTM", 8, true, false);
- addCheckBox("FVT", 5, true, true );
- addCheckBox("FIT", 7, true, false);
- addCheckBox("FUT", 4, true, true );
- addCheckBox("FZT", 6, true, false);
- addCheckBox("FPT", 3, true, true );
- addCheckBox("RDI", 2, true, false);
- addTextBox ("RD", 0, 2, true, false);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Apply configuration settings
- void configure() {
- String name = null;
-
- // System register
- if (type != PROGRAM) {
- name = this.name;
- if (!Disassembler.systemCaps)
- name = name.toLowerCase();
- }
-
- // Program register
- else {
- if (Disassembler.programNames)
- name = this.name;
- if (name == null)
- name = "r" + index;
- if (Disassembler.programCaps)
- name = name.toUpperCase();
- }
-
- // Name label
- lblName.setText(name);
-
- // Expand button
- var size = btnExpand.getPreferredSize();
- var metrics = parent.parent.parent.app.fntDialog.metrics;
- size.width = 4 + Math.max(
- metrics.stringWidth(EXPAND), metrics.stringWidth(COLLAPSE));
- btnExpand.setPreferredSize(size);
-
- // Value text box
- var fntMono = parent.parent.parent.app.fntMono;
- int hexDigitWidth = parent.parent.parent.app.hexDigitWidth;
- txtValue.setFont(fntMono);
- txtValue.setPreferredSize(new Dimension(
- hexDigitWidth * 8 + 4, fntMono.metrics.getHeight()));
-
- // Expansion controls
- for (var ctrl : controls) {
- if (!(ctrl instanceof JTextField))
- continue;
- if (type == Vue.PC || (Boolean) ctrl.getClientProperty("hex"))
- ((JTextField) ctrl).setFont(fntMono);
- int digits = type == Vue.PC ? 8 :
- (Integer) ctrl.getClientProperty("digits");
- size = ctrl.getPreferredSize();
- size.width = digits * hexDigitWidth + 4;
- ctrl.setPreferredSize(size);
- }
- }
-
- // Refresh controls
- void refresh() {
- var vue = parent.parent.parent.vue;
-
- // Value text box
- value = vue.getRegister(index, type != PROGRAM);
- txtValue.setText(
- type != PROGRAM || mode == HEX ?
- String.format("%08X", value) :
- mode == SIGNED ? Integer.toString(value) :
- mode == UNSIGNED ? Long.toString(value & 0xFFFFFFFFL) :
- Float.toString(Float.intBitsToFloat(value))
- );
-
- // Expansion controls
- for (var control : controls) {
-
- // Check box
- if (control instanceof JCheckBox) {
- var ctrl = (JCheckBox) control;
- int bit = (Integer) ctrl.getClientProperty("bit");
- ctrl.setSelected((value & 1 << bit) != 0);
- }
-
- // Text box
- if (control instanceof JTextField) {
- var ctrl = (JTextField) control;
- int digits; // Maximum digits that can be displayed
- boolean hex; // The value is hexadecimal
- int val; // The value to be displayed
-
- // Jump history
- if (type == Vue.PC) {
- digits = 8;
- hex = true;
- val = vue.getRegister((Integer)
- ctrl.getClientProperty("index"), true);
- }
-
- // All other values
- else {
- int bit = (Integer) ctrl.getClientProperty("bit" );
- digits = (Integer) ctrl.getClientProperty("digits");
- hex = (Boolean) ctrl.getClientProperty("hex");
- int width = (Integer) ctrl.getClientProperty("width");
- val = value >> bit & (1 << width) - 1;
- }
-
- // Update the text
- String text = !hex ? Integer.toString(val) : String.format(
- "%0" + digits + (Disassembler.hexCaps ? "X" : "x"), val);
- ctrl.putClientProperty("text", text);
- ctrl.setText(text);
- }
-
- }
-
- }
-
- // Specify whether the expansion area is expanded
- void setExpanded(boolean expanded) {
-
- // Error checking
- if (!expandable)
- return;
-
- // Update controls
- this.expanded = expanded;
- btnExpand.setText(expanded ? "-" : "+");
- if (type != Vue.PC)
- indent.setVisible(expanded);
- expansion.setVisible(expanded);
- parent.revalidate();
- }
-
- // Change the display mode of a program register
- void setMode(int mode) {
- this.mode = mode;
- txtValue.setFont(mode!=HEX ? null : parent.parent.parent.app.fntMono);
- refresh();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a check box to the expansion area
- private void addCheckBox(String name, int bit, boolean readOnly,
- boolean last) {
- int mask = 1 << bit;
-
- // Configure control
- var ctrl = new JCheckBox(name);
- ctrl.putClientProperty("bit", bit);
- ctrl.setBorder(null);
- ctrl.setEnabled(!readOnly);
- ctrl.setFocusable(false);
- ctrl.setOpaque(false);
- controls.add(ctrl);
-
- // Event handler
- ctrl.addItemListener(e->setValue(
- e.getStateChange() == ItemEvent.SELECTED ?
- value | mask : value & ~mask
- ));
-
- // Configure expansion area
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.NORTHWEST;
- gbc.gridwidth = last ? GridBagConstraints.REMAINDER : 2;
- gbc.insets = new Insets(0, 4, 0, 4);
- expansion.add(ctrl, gbc);
- }
-
- // Add a radio button to the expansion area
- private JRadioButton addRadioButton(String key, int mode) {
-
- // Configure control
- var ctrl = new JRadioButton();
- parent.parent.parent.app.localizer.add(ctrl, key);
- ctrl.setBorder(null);
- ctrl.setFocusable(false);
- ctrl.setOpaque(false);
- ctrl.setSelected(mode == HEX);
- controls.add(ctrl);
-
- // Event handler
- ctrl.addItemListener(e->{
- if (e.getStateChange() == ItemEvent.SELECTED) setMode(mode); });
-
- // Configure expansion area
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.NORTHWEST;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 4, 0, 0);
- expansion.add(ctrl, gbc);
-
- return ctrl;
- }
-
- // Add a text box to the expansion area
- private void addTextBox(String name, int bit, int width, boolean readOnly,
- boolean hex) {
- int mask = (1 << width) - 1;
-
- // Configure control
- var ctrl = new JTextField();
- ctrl.putClientProperty("bit", bit);
- ctrl.putClientProperty("digits",
- Integer.toString(mask, hex ? 16 : 10).length());
- ctrl.putClientProperty("hex", hex);
- ctrl.putClientProperty("width", width);
- ctrl.setBorder(null);
- ctrl.setEnabled(!readOnly);
- ctrl.setOpaque(false);
- controls.add(ctrl);
-
- // Event handlers
- ctrl.addActionListener(e->parent.requestFocus());
- ctrl.addFocusListener(Util.onFocus(null, e->{
- int val = value >> bit & mask;
- try { val = Integer.parseInt(ctrl.getText(), hex ? 16 : 10); }
- catch (Exception x) { }
- setValue(value & ~(mask << bit) | (val & mask) << bit);
- }));
-
- // Configure expansion area
- var label = new JLabel(name);
- label.setEnabled(!readOnly);
- var gbc = new GridBagConstraints();
- gbc.anchor = GridBagConstraints.NORTHWEST;
- gbc.insets = new Insets(0, 4, 0, 4);
- expansion.add(label, gbc);
- gbc = new GridBagConstraints();
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(0, 4, 0, 4);
- expansion.add(ctrl , gbc);
- }
-
- // Update the register value
- private void setValue(int value) {
- parent.parent.parent.vue.setRegister(index, type != PROGRAM, value);
- refresh();
- if (index == Vue.PSW && type == Vue.PSW)
- parent.registers.get(Vue.PC).refresh();
- }
-
-}
\ No newline at end of file
diff --git a/src/desktop/app/RegisterList.java b/src/desktop/app/RegisterList.java
deleted file mode 100644
index af2be81..0000000
--- a/src/desktop/app/RegisterList.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package app;
-
-// Java imports
-import java.awt.*;
-import java.util.*;
-import javax.swing.*;
-
-// Project imports
-import util.*;
-import vue.*;
-
-// List of CPU registers
-class RegisterList extends JScrollPane {
-
- // Package fields
- CPUWindow parent; // Containing CPU window
- HashMap registers; // Register items
-
- // Private fields
- private boolean shown; // Component has been shown
-
- // UI components
- private UPanel client; // Client area
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- RegisterList(CPUWindow parent, boolean system) {
- super(VERTICAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED);
-
- // Configure instance fields
- this.parent = parent;
- registers = new HashMap();
- shown = true;
-
- // Configure client area
- client = new UPanel(new GridBagLayout()) {
- public Dimension getPreferredSize() {
- var ret = super.getPreferredSize();
- if (!shown) ret.height = system ? getInitialHeight() : 0;
- return ret;
- }
- public void paintComponent(Graphics g) {
- shown = true;
- super.paintComponent(g);
- }
- };
- client.addMouseListener(Util.onMouse(e->client.requestFocus(), null));
- client.setBackground(SystemColor.window);
- client.setFocusable(true);
-
- // Initialize system registers
- if (system) {
- new Register(this, "PC" , Vue.PC , Vue.PC );
- new Register(this, "PSW" , Vue.PSW , Vue.PSW );
- new Register(this, "EIPC" , Vue.EIPC , Register.PLAIN);
- new Register(this, "EIPSW", Vue.EIPSW, Vue.PSW );
- new Register(this, "FEPC" , Vue.FEPC , Register.PLAIN);
- new Register(this, "FEPSW", Vue.FEPSW, Vue.PSW );
- new Register(this, "ECR" , Vue.ECR , Vue.ECR );
- new Register(this, "ADTRE", Vue.ADTRE, Register.PLAIN);
- new Register(this, "CHCW" , Vue.CHCW , Vue.CHCW );
- new Register(this, "PIR" , Vue.PIR , Vue.PIR );
- new Register(this, "TKCW" , Vue.TKCW , Vue.TKCW );
- new Register(this, "29" , 29, Register.PLAIN);
- new Register(this, "30" , 30, Register.PLAIN);
- new Register(this, "31" , 31, Register.PLAIN);
- }
-
- // Initialize program registers
- else for (int x = 0; x < 32; x++) {
- String name = null;
- switch (x) {
- case Vue.GP: name = "gp"; break;
- case Vue.HP: name = "hp"; break;
- case Vue.LP: name = "lp"; break;
- case Vue.SP: name = "sp"; break;
- case Vue.TP: name = "tp"; break;
- }
- new Register(this, name, x, Register.PROGRAM);
- }
-
- // List terminator
- var spacer = new UPanel();
- spacer.setOpaque(false);
- spacer.setPreferredSize(new Dimension(0, 0));
- var gbc = new GridBagConstraints();
- gbc.gridheight = GridBagConstraints.REMAINDER;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.weighty = 1;
- client.add(spacer, gbc);
-
- // Configure component
- shown = false;
- setViewportView(client);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Draw the component
- public void paintComponent(Graphics g) {
- if (!shown) {
- shown = true;
- revalidate();
- }
- super.paintComponent(g);
- }
-
- // Transfer focus to the client area
- public void requestFocus() {
- client.requestFocus();
- }
-
- // Recalculate layout
- public void revalidate() {
- if (client != null)
- client.revalidate();
- super.revalidate();
- repaint();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a register component to the client area
- void add(GridBagConstraints gbc, JComponent comp) {
- client.add(comp, gbc);
- }
-
- // Associate a register with its index
- void add(int index, Register register) {
- registers.put(index, register);
- }
-
- // Apply configuration settings
- void configure2() {
-
- // Configure registers
- for (var reg : registers.values())
- reg.configure();
-
- // Configure component
- getVerticalScrollBar().setUnitIncrement(
- parent.parent.app.fntMono.metrics.getHeight());
- }
-
- // Update the display
- void refresh() {
- for (var reg : registers.values())
- reg.refresh();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Determine the initial height upon first show
- private int getInitialHeight() {
- int height = 0;
- var layout = (GridBagLayout) client.getLayout();
- int ret = 0;
- int row = 0;
-
- // Process controls until the target row is found
- for (var control : client.getComponents()) {
- var ctrl = (JComponent) control;
-
- // Track the tallest control on the row
- if (ctrl.isVisible())
- height = Math.max(height, ctrl.getPreferredSize().height);
-
- // This is not the last control on the row
- if (layout.getConstraints(control).gridwidth !=
- GridBagConstraints.REMAINDER)
- continue;
-
- // Advance to the next row
- ret += height;
- height = 0;
- row++;
-
- // The target row has been reached
- if (row == 4)
- break;
- }
-
- return ret;
- }
-
-}
diff --git a/src/desktop/app/ShiftJIS.java b/src/desktop/app/ShiftJIS.java
deleted file mode 100644
index d4b53da..0000000
--- a/src/desktop/app/ShiftJIS.java
+++ /dev/null
@@ -1,1243 +0,0 @@
-package app;
-
-// Mappings provided by Unicode:
-// https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
-
-// Java imports
-import java.util.*;
-
-// Decoder for Shift-JIS strings
-class ShiftJIS {
- private ShiftJIS() { } // Cannot be instantiated
-
- // Character mappings from Shift-JIS to Unicode
- private static final int[] MAPDATA = {
- 0x00200020, 0x00210021, 0x00220022, 0x00230023, 0x00240024, 0x00250025,
- 0x00260026, 0x00270027, 0x00280028, 0x00290029, 0x002A002A, 0x002B002B,
- 0x002C002C, 0x002D002D, 0x002E002E, 0x002F002F, 0x00300030, 0x00310031,
- 0x00320032, 0x00330033, 0x00340034, 0x00350035, 0x00360036, 0x00370037,
- 0x00380038, 0x00390039, 0x003A003A, 0x003B003B, 0x003C003C, 0x003D003D,
- 0x003E003E, 0x003F003F, 0x00400040, 0x00410041, 0x00420042, 0x00430043,
- 0x00440044, 0x00450045, 0x00460046, 0x00470047, 0x00480048, 0x00490049,
- 0x004A004A, 0x004B004B, 0x004C004C, 0x004D004D, 0x004E004E, 0x004F004F,
- 0x00500050, 0x00510051, 0x00520052, 0x00530053, 0x00540054, 0x00550055,
- 0x00560056, 0x00570057, 0x00580058, 0x00590059, 0x005A005A, 0x005B005B,
- 0x005C00A5, 0x005D005D, 0x005E005E, 0x005F005F, 0x00600060, 0x00610061,
- 0x00620062, 0x00630063, 0x00640064, 0x00650065, 0x00660066, 0x00670067,
- 0x00680068, 0x00690069, 0x006A006A, 0x006B006B, 0x006C006C, 0x006D006D,
- 0x006E006E, 0x006F006F, 0x00700070, 0x00710071, 0x00720072, 0x00730073,
- 0x00740074, 0x00750075, 0x00760076, 0x00770077, 0x00780078, 0x00790079,
- 0x007A007A, 0x007B007B, 0x007C007C, 0x007D007D, 0x007E203E, 0x81403000,
- 0x81413001, 0x81423002, 0x8143FF0C, 0x8144FF0E, 0x814530FB, 0x8146FF1A,
- 0x8147FF1B, 0x8148FF1F, 0x8149FF01, 0x814A309B, 0x814B309C, 0x814C00B4,
- 0x814DFF40, 0x814E00A8, 0x814FFF3E, 0x8150FFE3, 0x8151FF3F, 0x815230FD,
- 0x815330FE, 0x8154309D, 0x8155309E, 0x81563003, 0x81574EDD, 0x81583005,
- 0x81593006, 0x815A3007, 0x815B30FC, 0x815C2015, 0x815D2010, 0x815EFF0F,
- 0x815F005C, 0x8160301C, 0x81612016, 0x8162FF5C, 0x81632026, 0x81642025,
- 0x81652018, 0x81662019, 0x8167201C, 0x8168201D, 0x8169FF08, 0x816AFF09,
- 0x816B3014, 0x816C3015, 0x816DFF3B, 0x816EFF3D, 0x816FFF5B, 0x8170FF5D,
- 0x81713008, 0x81723009, 0x8173300A, 0x8174300B, 0x8175300C, 0x8176300D,
- 0x8177300E, 0x8178300F, 0x81793010, 0x817A3011, 0x817BFF0B, 0x817C2212,
- 0x817D00B1, 0x817E00D7, 0x818000F7, 0x8181FF1D, 0x81822260, 0x8183FF1C,
- 0x8184FF1E, 0x81852266, 0x81862267, 0x8187221E, 0x81882234, 0x81892642,
- 0x818A2640, 0x818B00B0, 0x818C2032, 0x818D2033, 0x818E2103, 0x818FFFE5,
- 0x8190FF04, 0x819100A2, 0x819200A3, 0x8193FF05, 0x8194FF03, 0x8195FF06,
- 0x8196FF0A, 0x8197FF20, 0x819800A7, 0x81992606, 0x819A2605, 0x819B25CB,
- 0x819C25CF, 0x819D25CE, 0x819E25C7, 0x819F25C6, 0x81A025A1, 0x81A125A0,
- 0x81A225B3, 0x81A325B2, 0x81A425BD, 0x81A525BC, 0x81A6203B, 0x81A73012,
- 0x81A82192, 0x81A92190, 0x81AA2191, 0x81AB2193, 0x81AC3013, 0x81B82208,
- 0x81B9220B, 0x81BA2286, 0x81BB2287, 0x81BC2282, 0x81BD2283, 0x81BE222A,
- 0x81BF2229, 0x81C82227, 0x81C92228, 0x81CA00AC, 0x81CB21D2, 0x81CC21D4,
- 0x81CD2200, 0x81CE2203, 0x81DA2220, 0x81DB22A5, 0x81DC2312, 0x81DD2202,
- 0x81DE2207, 0x81DF2261, 0x81E02252, 0x81E1226A, 0x81E2226B, 0x81E3221A,
- 0x81E4223D, 0x81E5221D, 0x81E62235, 0x81E7222B, 0x81E8222C, 0x81F0212B,
- 0x81F12030, 0x81F2266F, 0x81F3266D, 0x81F4266A, 0x81F52020, 0x81F62021,
- 0x81F700B6, 0x81FC25EF, 0x824FFF10, 0x8250FF11, 0x8251FF12, 0x8252FF13,
- 0x8253FF14, 0x8254FF15, 0x8255FF16, 0x8256FF17, 0x8257FF18, 0x8258FF19,
- 0x8260FF21, 0x8261FF22, 0x8262FF23, 0x8263FF24, 0x8264FF25, 0x8265FF26,
- 0x8266FF27, 0x8267FF28, 0x8268FF29, 0x8269FF2A, 0x826AFF2B, 0x826BFF2C,
- 0x826CFF2D, 0x826DFF2E, 0x826EFF2F, 0x826FFF30, 0x8270FF31, 0x8271FF32,
- 0x8272FF33, 0x8273FF34, 0x8274FF35, 0x8275FF36, 0x8276FF37, 0x8277FF38,
- 0x8278FF39, 0x8279FF3A, 0x8281FF41, 0x8282FF42, 0x8283FF43, 0x8284FF44,
- 0x8285FF45, 0x8286FF46, 0x8287FF47, 0x8288FF48, 0x8289FF49, 0x828AFF4A,
- 0x828BFF4B, 0x828CFF4C, 0x828DFF4D, 0x828EFF4E, 0x828FFF4F, 0x8290FF50,
- 0x8291FF51, 0x8292FF52, 0x8293FF53, 0x8294FF54, 0x8295FF55, 0x8296FF56,
- 0x8297FF57, 0x8298FF58, 0x8299FF59, 0x829AFF5A, 0x829F3041, 0x82A03042,
- 0x82A13043, 0x82A23044, 0x82A33045, 0x82A43046, 0x82A53047, 0x82A63048,
- 0x82A73049, 0x82A8304A, 0x82A9304B, 0x82AA304C, 0x82AB304D, 0x82AC304E,
- 0x82AD304F, 0x82AE3050, 0x82AF3051, 0x82B03052, 0x82B13053, 0x82B23054,
- 0x82B33055, 0x82B43056, 0x82B53057, 0x82B63058, 0x82B73059, 0x82B8305A,
- 0x82B9305B, 0x82BA305C, 0x82BB305D, 0x82BC305E, 0x82BD305F, 0x82BE3060,
- 0x82BF3061, 0x82C03062, 0x82C13063, 0x82C23064, 0x82C33065, 0x82C43066,
- 0x82C53067, 0x82C63068, 0x82C73069, 0x82C8306A, 0x82C9306B, 0x82CA306C,
- 0x82CB306D, 0x82CC306E, 0x82CD306F, 0x82CE3070, 0x82CF3071, 0x82D03072,
- 0x82D13073, 0x82D23074, 0x82D33075, 0x82D43076, 0x82D53077, 0x82D63078,
- 0x82D73079, 0x82D8307A, 0x82D9307B, 0x82DA307C, 0x82DB307D, 0x82DC307E,
- 0x82DD307F, 0x82DE3080, 0x82DF3081, 0x82E03082, 0x82E13083, 0x82E23084,
- 0x82E33085, 0x82E43086, 0x82E53087, 0x82E63088, 0x82E73089, 0x82E8308A,
- 0x82E9308B, 0x82EA308C, 0x82EB308D, 0x82EC308E, 0x82ED308F, 0x82EE3090,
- 0x82EF3091, 0x82F03092, 0x82F13093, 0x834030A1, 0x834130A2, 0x834230A3,
- 0x834330A4, 0x834430A5, 0x834530A6, 0x834630A7, 0x834730A8, 0x834830A9,
- 0x834930AA, 0x834A30AB, 0x834B30AC, 0x834C30AD, 0x834D30AE, 0x834E30AF,
- 0x834F30B0, 0x835030B1, 0x835130B2, 0x835230B3, 0x835330B4, 0x835430B5,
- 0x835530B6, 0x835630B7, 0x835730B8, 0x835830B9, 0x835930BA, 0x835A30BB,
- 0x835B30BC, 0x835C30BD, 0x835D30BE, 0x835E30BF, 0x835F30C0, 0x836030C1,
- 0x836130C2, 0x836230C3, 0x836330C4, 0x836430C5, 0x836530C6, 0x836630C7,
- 0x836730C8, 0x836830C9, 0x836930CA, 0x836A30CB, 0x836B30CC, 0x836C30CD,
- 0x836D30CE, 0x836E30CF, 0x836F30D0, 0x837030D1, 0x837130D2, 0x837230D3,
- 0x837330D4, 0x837430D5, 0x837530D6, 0x837630D7, 0x837730D8, 0x837830D9,
- 0x837930DA, 0x837A30DB, 0x837B30DC, 0x837C30DD, 0x837D30DE, 0x837E30DF,
- 0x838030E0, 0x838130E1, 0x838230E2, 0x838330E3, 0x838430E4, 0x838530E5,
- 0x838630E6, 0x838730E7, 0x838830E8, 0x838930E9, 0x838A30EA, 0x838B30EB,
- 0x838C30EC, 0x838D30ED, 0x838E30EE, 0x838F30EF, 0x839030F0, 0x839130F1,
- 0x839230F2, 0x839330F3, 0x839430F4, 0x839530F5, 0x839630F6, 0x839F0391,
- 0x83A00392, 0x83A10393, 0x83A20394, 0x83A30395, 0x83A40396, 0x83A50397,
- 0x83A60398, 0x83A70399, 0x83A8039A, 0x83A9039B, 0x83AA039C, 0x83AB039D,
- 0x83AC039E, 0x83AD039F, 0x83AE03A0, 0x83AF03A1, 0x83B003A3, 0x83B103A4,
- 0x83B203A5, 0x83B303A6, 0x83B403A7, 0x83B503A8, 0x83B603A9, 0x83BF03B1,
- 0x83C003B2, 0x83C103B3, 0x83C203B4, 0x83C303B5, 0x83C403B6, 0x83C503B7,
- 0x83C603B8, 0x83C703B9, 0x83C803BA, 0x83C903BB, 0x83CA03BC, 0x83CB03BD,
- 0x83CC03BE, 0x83CD03BF, 0x83CE03C0, 0x83CF03C1, 0x83D003C3, 0x83D103C4,
- 0x83D203C5, 0x83D303C6, 0x83D403C7, 0x83D503C8, 0x83D603C9, 0x84400410,
- 0x84410411, 0x84420412, 0x84430413, 0x84440414, 0x84450415, 0x84460401,
- 0x84470416, 0x84480417, 0x84490418, 0x844A0419, 0x844B041A, 0x844C041B,
- 0x844D041C, 0x844E041D, 0x844F041E, 0x8450041F, 0x84510420, 0x84520421,
- 0x84530422, 0x84540423, 0x84550424, 0x84560425, 0x84570426, 0x84580427,
- 0x84590428, 0x845A0429, 0x845B042A, 0x845C042B, 0x845D042C, 0x845E042D,
- 0x845F042E, 0x8460042F, 0x84700430, 0x84710431, 0x84720432, 0x84730433,
- 0x84740434, 0x84750435, 0x84760451, 0x84770436, 0x84780437, 0x84790438,
- 0x847A0439, 0x847B043A, 0x847C043B, 0x847D043C, 0x847E043D, 0x8480043E,
- 0x8481043F, 0x84820440, 0x84830441, 0x84840442, 0x84850443, 0x84860444,
- 0x84870445, 0x84880446, 0x84890447, 0x848A0448, 0x848B0449, 0x848C044A,
- 0x848D044B, 0x848E044C, 0x848F044D, 0x8490044E, 0x8491044F, 0x849F2500,
- 0x84A02502, 0x84A1250C, 0x84A22510, 0x84A32518, 0x84A42514, 0x84A5251C,
- 0x84A6252C, 0x84A72524, 0x84A82534, 0x84A9253C, 0x84AA2501, 0x84AB2503,
- 0x84AC250F, 0x84AD2513, 0x84AE251B, 0x84AF2517, 0x84B02523, 0x84B12533,
- 0x84B2252B, 0x84B3253B, 0x84B4254B, 0x84B52520, 0x84B6252F, 0x84B72528,
- 0x84B82537, 0x84B9253F, 0x84BA251D, 0x84BB2530, 0x84BC2525, 0x84BD2538,
- 0x84BE2542, 0x889F4E9C, 0x88A05516, 0x88A15A03, 0x88A2963F, 0x88A354C0,
- 0x88A4611B, 0x88A56328, 0x88A659F6, 0x88A79022, 0x88A88475, 0x88A9831C,
- 0x88AA7A50, 0x88AB60AA, 0x88AC63E1, 0x88AD6E25, 0x88AE65ED, 0x88AF8466,
- 0x88B082A6, 0x88B19BF5, 0x88B26893, 0x88B35727, 0x88B465A1, 0x88B56271,
- 0x88B65B9B, 0x88B759D0, 0x88B8867B, 0x88B998F4, 0x88BA7D62, 0x88BB7DBE,
- 0x88BC9B8E, 0x88BD6216, 0x88BE7C9F, 0x88BF88B7, 0x88C05B89, 0x88C15EB5,
- 0x88C26309, 0x88C36697, 0x88C46848, 0x88C595C7, 0x88C6978D, 0x88C7674F,
- 0x88C84EE5, 0x88C94F0A, 0x88CA4F4D, 0x88CB4F9D, 0x88CC5049, 0x88CD56F2,
- 0x88CE5937, 0x88CF59D4, 0x88D05A01, 0x88D15C09, 0x88D260DF, 0x88D3610F,
- 0x88D46170, 0x88D56613, 0x88D66905, 0x88D770BA, 0x88D8754F, 0x88D97570,
- 0x88DA79FB, 0x88DB7DAD, 0x88DC7DEF, 0x88DD80C3, 0x88DE840E, 0x88DF8863,
- 0x88E08B02, 0x88E19055, 0x88E2907A, 0x88E3533B, 0x88E44E95, 0x88E54EA5,
- 0x88E657DF, 0x88E780B2, 0x88E890C1, 0x88E978EF, 0x88EA4E00, 0x88EB58F1,
- 0x88EC6EA2, 0x88ED9038, 0x88EE7A32, 0x88EF8328, 0x88F0828B, 0x88F19C2F,
- 0x88F25141, 0x88F35370, 0x88F454BD, 0x88F554E1, 0x88F656E0, 0x88F759FB,
- 0x88F85F15, 0x88F998F2, 0x88FA6DEB, 0x88FB80E4, 0x88FC852D, 0x89409662,
- 0x89419670, 0x894296A0, 0x894397FB, 0x8944540B, 0x894553F3, 0x89465B87,
- 0x894770CF, 0x89487FBD, 0x89498FC2, 0x894A96E8, 0x894B536F, 0x894C9D5C,
- 0x894D7ABA, 0x894E4E11, 0x894F7893, 0x895081FC, 0x89516E26, 0x89525618,
- 0x89535504, 0x89546B1D, 0x8955851A, 0x89569C3B, 0x895759E5, 0x895853A9,
- 0x89596D66, 0x895A74DC, 0x895B958F, 0x895C5642, 0x895D4E91, 0x895E904B,
- 0x895F96F2, 0x8960834F, 0x8961990C, 0x896253E1, 0x896355B6, 0x89645B30,
- 0x89655F71, 0x89666620, 0x896766F3, 0x89686804, 0x89696C38, 0x896A6CF3,
- 0x896B6D29, 0x896C745B, 0x896D76C8, 0x896E7A4E, 0x896F9834, 0x897082F1,
- 0x8971885B, 0x89728A60, 0x897392ED, 0x89746DB2, 0x897575AB, 0x897676CA,
- 0x897799C5, 0x897860A6, 0x89798B01, 0x897A8D8A, 0x897B95B2, 0x897C698E,
- 0x897D53AD, 0x897E5186, 0x89805712, 0x89815830, 0x89825944, 0x89835BB4,
- 0x89845EF6, 0x89856028, 0x898663A9, 0x898763F4, 0x89886CBF, 0x89896F14,
- 0x898A708E, 0x898B7114, 0x898C7159, 0x898D71D5, 0x898E733F, 0x898F7E01,
- 0x89908276, 0x899182D1, 0x89928597, 0x89939060, 0x8994925B, 0x89959D1B,
- 0x89965869, 0x899765BC, 0x89986C5A, 0x89997525, 0x899A51F9, 0x899B592E,
- 0x899C5965, 0x899D5F80, 0x899E5FDC, 0x899F62BC, 0x89A065FA, 0x89A16A2A,
- 0x89A26B27, 0x89A36BB4, 0x89A4738B, 0x89A57FC1, 0x89A68956, 0x89A79D2C,
- 0x89A89D0E, 0x89A99EC4, 0x89AA5CA1, 0x89AB6C96, 0x89AC837B, 0x89AD5104,
- 0x89AE5C4B, 0x89AF61B6, 0x89B081C6, 0x89B16876, 0x89B27261, 0x89B34E59,
- 0x89B44FFA, 0x89B55378, 0x89B66069, 0x89B76E29, 0x89B87A4F, 0x89B997F3,
- 0x89BA4E0B, 0x89BB5316, 0x89BC4EEE, 0x89BD4F55, 0x89BE4F3D, 0x89BF4FA1,
- 0x89C04F73, 0x89C152A0, 0x89C253EF, 0x89C35609, 0x89C4590F, 0x89C55AC1,
- 0x89C65BB6, 0x89C75BE1, 0x89C879D1, 0x89C96687, 0x89CA679C, 0x89CB67B6,
- 0x89CC6B4C, 0x89CD6CB3, 0x89CE706B, 0x89CF73C2, 0x89D0798D, 0x89D179BE,
- 0x89D27A3C, 0x89D37B87, 0x89D482B1, 0x89D582DB, 0x89D68304, 0x89D78377,
- 0x89D883EF, 0x89D983D3, 0x89DA8766, 0x89DB8AB2, 0x89DC5629, 0x89DD8CA8,
- 0x89DE8FE6, 0x89DF904E, 0x89E0971E, 0x89E1868A, 0x89E24FC4, 0x89E35CE8,
- 0x89E46211, 0x89E57259, 0x89E6753B, 0x89E781E5, 0x89E882BD, 0x89E986FE,
- 0x89EA8CC0, 0x89EB96C5, 0x89EC9913, 0x89ED99D5, 0x89EE4ECB, 0x89EF4F1A,
- 0x89F089E3, 0x89F156DE, 0x89F2584A, 0x89F358CA, 0x89F45EFB, 0x89F55FEB,
- 0x89F6602A, 0x89F76094, 0x89F86062, 0x89F961D0, 0x89FA6212, 0x89FB62D0,
- 0x89FC6539, 0x8A409B41, 0x8A416666, 0x8A4268B0, 0x8A436D77, 0x8A447070,
- 0x8A45754C, 0x8A467686, 0x8A477D75, 0x8A4882A5, 0x8A4987F9, 0x8A4A958B,
- 0x8A4B968E, 0x8A4C8C9D, 0x8A4D51F1, 0x8A4E52BE, 0x8A4F5916, 0x8A5054B3,
- 0x8A515BB3, 0x8A525D16, 0x8A536168, 0x8A546982, 0x8A556DAF, 0x8A56788D,
- 0x8A5784CB, 0x8A588857, 0x8A598A72, 0x8A5A93A7, 0x8A5B9AB8, 0x8A5C6D6C,
- 0x8A5D99A8, 0x8A5E86D9, 0x8A5F57A3, 0x8A6067FF, 0x8A6186CE, 0x8A62920E,
- 0x8A635283, 0x8A645687, 0x8A655404, 0x8A665ED3, 0x8A6762E1, 0x8A6864B9,
- 0x8A69683C, 0x8A6A6838, 0x8A6B6BBB, 0x8A6C7372, 0x8A6D78BA, 0x8A6E7A6B,
- 0x8A6F899A, 0x8A7089D2, 0x8A718D6B, 0x8A728F03, 0x8A7390ED, 0x8A7495A3,
- 0x8A759694, 0x8A769769, 0x8A775B66, 0x8A785CB3, 0x8A79697D, 0x8A7A984D,
- 0x8A7B984E, 0x8A7C639B, 0x8A7D7B20, 0x8A7E6A2B, 0x8A806A7F, 0x8A8168B6,
- 0x8A829C0D, 0x8A836F5F, 0x8A845272, 0x8A85559D, 0x8A866070, 0x8A8762EC,
- 0x8A886D3B, 0x8A896E07, 0x8A8A6ED1, 0x8A8B845B, 0x8A8C8910, 0x8A8D8F44,
- 0x8A8E4E14, 0x8A8F9C39, 0x8A9053F6, 0x8A91691B, 0x8A926A3A, 0x8A939784,
- 0x8A94682A, 0x8A95515C, 0x8A967AC3, 0x8A9784B2, 0x8A9891DC, 0x8A99938C,
- 0x8A9A565B, 0x8A9B9D28, 0x8A9C6822, 0x8A9D8305, 0x8A9E8431, 0x8A9F7CA5,
- 0x8AA05208, 0x8AA182C5, 0x8AA274E6, 0x8AA34E7E, 0x8AA44F83, 0x8AA551A0,
- 0x8AA65BD2, 0x8AA7520A, 0x8AA852D8, 0x8AA952E7, 0x8AAA5DFB, 0x8AAB559A,
- 0x8AAC582A, 0x8AAD59E6, 0x8AAE5B8C, 0x8AAF5B98, 0x8AB05BDB, 0x8AB15E72,
- 0x8AB25E79, 0x8AB360A3, 0x8AB4611F, 0x8AB56163, 0x8AB661BE, 0x8AB763DB,
- 0x8AB86562, 0x8AB967D1, 0x8ABA6853, 0x8ABB68FA, 0x8ABC6B3E, 0x8ABD6B53,
- 0x8ABE6C57, 0x8ABF6F22, 0x8AC06F97, 0x8AC16F45, 0x8AC274B0, 0x8AC37518,
- 0x8AC476E3, 0x8AC5770B, 0x8AC67AFF, 0x8AC77BA1, 0x8AC87C21, 0x8AC97DE9,
- 0x8ACA7F36, 0x8ACB7FF0, 0x8ACC809D, 0x8ACD8266, 0x8ACE839E, 0x8ACF89B3,
- 0x8AD08ACC, 0x8AD18CAB, 0x8AD29084, 0x8AD39451, 0x8AD49593, 0x8AD59591,
- 0x8AD695A2, 0x8AD79665, 0x8AD897D3, 0x8AD99928, 0x8ADA8218, 0x8ADB4E38,
- 0x8ADC542B, 0x8ADD5CB8, 0x8ADE5DCC, 0x8ADF73A9, 0x8AE0764C, 0x8AE1773C,
- 0x8AE25CA9, 0x8AE37FEB, 0x8AE48D0B, 0x8AE596C1, 0x8AE69811, 0x8AE79854,
- 0x8AE89858, 0x8AE94F01, 0x8AEA4F0E, 0x8AEB5371, 0x8AEC559C, 0x8AED5668,
- 0x8AEE57FA, 0x8AEF5947, 0x8AF05B09, 0x8AF15BC4, 0x8AF25C90, 0x8AF35E0C,
- 0x8AF45E7E, 0x8AF55FCC, 0x8AF663EE, 0x8AF7673A, 0x8AF865D7, 0x8AF965E2,
- 0x8AFA671F, 0x8AFB68CB, 0x8AFC68C4, 0x8B406A5F, 0x8B415E30, 0x8B426BC5,
- 0x8B436C17, 0x8B446C7D, 0x8B45757F, 0x8B467948, 0x8B475B63, 0x8B487A00,
- 0x8B497D00, 0x8B4A5FBD, 0x8B4B898F, 0x8B4C8A18, 0x8B4D8CB4, 0x8B4E8D77,
- 0x8B4F8ECC, 0x8B508F1D, 0x8B5198E2, 0x8B529A0E, 0x8B539B3C, 0x8B544E80,
- 0x8B55507D, 0x8B565100, 0x8B575993, 0x8B585B9C, 0x8B59622F, 0x8B5A6280,
- 0x8B5B64EC, 0x8B5C6B3A, 0x8B5D72A0, 0x8B5E7591, 0x8B5F7947, 0x8B607FA9,
- 0x8B6187FB, 0x8B628ABC, 0x8B638B70, 0x8B6463AC, 0x8B6583CA, 0x8B6697A0,
- 0x8B675409, 0x8B685403, 0x8B6955AB, 0x8B6A6854, 0x8B6B6A58, 0x8B6C8A70,
- 0x8B6D7827, 0x8B6E6775, 0x8B6F9ECD, 0x8B705374, 0x8B715BA2, 0x8B72811A,
- 0x8B738650, 0x8B749006, 0x8B754E18, 0x8B764E45, 0x8B774EC7, 0x8B784F11,
- 0x8B7953CA, 0x8B7A5438, 0x8B7B5BAE, 0x8B7C5F13, 0x8B7D6025, 0x8B7E6551,
- 0x8B80673D, 0x8B816C42, 0x8B826C72, 0x8B836CE3, 0x8B847078, 0x8B857403,
- 0x8B867A76, 0x8B877AAE, 0x8B887B08, 0x8B897D1A, 0x8B8A7CFE, 0x8B8B7D66,
- 0x8B8C65E7, 0x8B8D725B, 0x8B8E53BB, 0x8B8F5C45, 0x8B905DE8, 0x8B9162D2,
- 0x8B9262E0, 0x8B936319, 0x8B946E20, 0x8B95865A, 0x8B968A31, 0x8B978DDD,
- 0x8B9892F8, 0x8B996F01, 0x8B9A79A6, 0x8B9B9B5A, 0x8B9C4EA8, 0x8B9D4EAB,
- 0x8B9E4EAC, 0x8B9F4F9B, 0x8BA04FA0, 0x8BA150D1, 0x8BA25147, 0x8BA37AF6,
- 0x8BA45171, 0x8BA551F6, 0x8BA65354, 0x8BA75321, 0x8BA8537F, 0x8BA953EB,
- 0x8BAA55AC, 0x8BAB5883, 0x8BAC5CE1, 0x8BAD5F37, 0x8BAE5F4A, 0x8BAF602F,
- 0x8BB06050, 0x8BB1606D, 0x8BB2631F, 0x8BB36559, 0x8BB46A4B, 0x8BB56CC1,
- 0x8BB672C2, 0x8BB772ED, 0x8BB877EF, 0x8BB980F8, 0x8BBA8105, 0x8BBB8208,
- 0x8BBC854E, 0x8BBD90F7, 0x8BBE93E1, 0x8BBF97FF, 0x8BC09957, 0x8BC19A5A,
- 0x8BC24EF0, 0x8BC351DD, 0x8BC45C2D, 0x8BC56681, 0x8BC6696D, 0x8BC75C40,
- 0x8BC866F2, 0x8BC96975, 0x8BCA7389, 0x8BCB6850, 0x8BCC7C81, 0x8BCD50C5,
- 0x8BCE52E4, 0x8BCF5747, 0x8BD05DFE, 0x8BD19326, 0x8BD265A4, 0x8BD36B23,
- 0x8BD46B3D, 0x8BD57434, 0x8BD67981, 0x8BD779BD, 0x8BD87B4B, 0x8BD97DCA,
- 0x8BDA82B9, 0x8BDB83CC, 0x8BDC887F, 0x8BDD895F, 0x8BDE8B39, 0x8BDF8FD1,
- 0x8BE091D1, 0x8BE1541F, 0x8BE29280, 0x8BE34E5D, 0x8BE45036, 0x8BE553E5,
- 0x8BE6533A, 0x8BE772D7, 0x8BE87396, 0x8BE977E9, 0x8BEA82E6, 0x8BEB8EAF,
- 0x8BEC99C6, 0x8BED99C8, 0x8BEE99D2, 0x8BEF5177, 0x8BF0611A, 0x8BF1865E,
- 0x8BF255B0, 0x8BF37A7A, 0x8BF45076, 0x8BF55BD3, 0x8BF69047, 0x8BF79685,
- 0x8BF84E32, 0x8BF96ADB, 0x8BFA91E7, 0x8BFB5C51, 0x8BFC5C48, 0x8C406398,
- 0x8C417A9F, 0x8C426C93, 0x8C439774, 0x8C448F61, 0x8C457AAA, 0x8C46718A,
- 0x8C479688, 0x8C487C82, 0x8C496817, 0x8C4A7E70, 0x8C4B6851, 0x8C4C936C,
- 0x8C4D52F2, 0x8C4E541B, 0x8C4F85AB, 0x8C508A13, 0x8C517FA4, 0x8C528ECD,
- 0x8C5390E1, 0x8C545366, 0x8C558888, 0x8C567941, 0x8C574FC2, 0x8C5850BE,
- 0x8C595211, 0x8C5A5144, 0x8C5B5553, 0x8C5C572D, 0x8C5D73EA, 0x8C5E578B,
- 0x8C5F5951, 0x8C605F62, 0x8C615F84, 0x8C626075, 0x8C636176, 0x8C646167,
- 0x8C6561A9, 0x8C6663B2, 0x8C67643A, 0x8C68656C, 0x8C69666F, 0x8C6A6842,
- 0x8C6B6E13, 0x8C6C7566, 0x8C6D7A3D, 0x8C6E7CFB, 0x8C6F7D4C, 0x8C707D99,
- 0x8C717E4B, 0x8C727F6B, 0x8C73830E, 0x8C74834A, 0x8C7586CD, 0x8C768A08,
- 0x8C778A63, 0x8C788B66, 0x8C798EFD, 0x8C7A981A, 0x8C7B9D8F, 0x8C7C82B8,
- 0x8C7D8FCE, 0x8C7E9BE8, 0x8C805287, 0x8C81621F, 0x8C826483, 0x8C836FC0,
- 0x8C849699, 0x8C856841, 0x8C865091, 0x8C876B20, 0x8C886C7A, 0x8C896F54,
- 0x8C8A7A74, 0x8C8B7D50, 0x8C8C8840, 0x8C8D8A23, 0x8C8E6708, 0x8C8F4EF6,
- 0x8C905039, 0x8C915026, 0x8C925065, 0x8C93517C, 0x8C945238, 0x8C955263,
- 0x8C9655A7, 0x8C97570F, 0x8C985805, 0x8C995ACC, 0x8C9A5EFA, 0x8C9B61B2,
- 0x8C9C61F8, 0x8C9D62F3, 0x8C9E6372, 0x8C9F691C, 0x8CA06A29, 0x8CA1727D,
- 0x8CA272AC, 0x8CA3732E, 0x8CA47814, 0x8CA5786F, 0x8CA67D79, 0x8CA7770C,
- 0x8CA880A9, 0x8CA9898B, 0x8CAA8B19, 0x8CAB8CE2, 0x8CAC8ED2, 0x8CAD9063,
- 0x8CAE9375, 0x8CAF967A, 0x8CB09855, 0x8CB19A13, 0x8CB29E78, 0x8CB35143,
- 0x8CB4539F, 0x8CB553B3, 0x8CB65E7B, 0x8CB75F26, 0x8CB86E1B, 0x8CB96E90,
- 0x8CBA7384, 0x8CBB73FE, 0x8CBC7D43, 0x8CBD8237, 0x8CBE8A00, 0x8CBF8AFA,
- 0x8CC09650, 0x8CC14E4E, 0x8CC2500B, 0x8CC353E4, 0x8CC4547C, 0x8CC556FA,
- 0x8CC659D1, 0x8CC75B64, 0x8CC85DF1, 0x8CC95EAB, 0x8CCA5F27, 0x8CCB6238,
- 0x8CCC6545, 0x8CCD67AF, 0x8CCE6E56, 0x8CCF72D0, 0x8CD07CCA, 0x8CD188B4,
- 0x8CD280A1, 0x8CD380E1, 0x8CD483F0, 0x8CD5864E, 0x8CD68A87, 0x8CD78DE8,
- 0x8CD89237, 0x8CD996C7, 0x8CDA9867, 0x8CDB9F13, 0x8CDC4E94, 0x8CDD4E92,
- 0x8CDE4F0D, 0x8CDF5348, 0x8CE05449, 0x8CE1543E, 0x8CE25A2F, 0x8CE35F8C,
- 0x8CE45FA1, 0x8CE5609F, 0x8CE668A7, 0x8CE76A8E, 0x8CE8745A, 0x8CE97881,
- 0x8CEA8A9E, 0x8CEB8AA4, 0x8CEC8B77, 0x8CED9190, 0x8CEE4E5E, 0x8CEF9BC9,
- 0x8CF04EA4, 0x8CF14F7C, 0x8CF24FAF, 0x8CF35019, 0x8CF45016, 0x8CF55149,
- 0x8CF6516C, 0x8CF7529F, 0x8CF852B9, 0x8CF952FE, 0x8CFA539A, 0x8CFB53E3,
- 0x8CFC5411, 0x8D40540E, 0x8D415589, 0x8D425751, 0x8D4357A2, 0x8D44597D,
- 0x8D455B54, 0x8D465B5D, 0x8D475B8F, 0x8D485DE5, 0x8D495DE7, 0x8D4A5DF7,
- 0x8D4B5E78, 0x8D4C5E83, 0x8D4D5E9A, 0x8D4E5EB7, 0x8D4F5F18, 0x8D506052,
- 0x8D51614C, 0x8D526297, 0x8D5362D8, 0x8D5463A7, 0x8D55653B, 0x8D566602,
- 0x8D576643, 0x8D5866F4, 0x8D59676D, 0x8D5A6821, 0x8D5B6897, 0x8D5C69CB,
- 0x8D5D6C5F, 0x8D5E6D2A, 0x8D5F6D69, 0x8D606E2F, 0x8D616E9D, 0x8D627532,
- 0x8D637687, 0x8D64786C, 0x8D657A3F, 0x8D667CE0, 0x8D677D05, 0x8D687D18,
- 0x8D697D5E, 0x8D6A7DB1, 0x8D6B8015, 0x8D6C8003, 0x8D6D80AF, 0x8D6E80B1,
- 0x8D6F8154, 0x8D70818F, 0x8D71822A, 0x8D728352, 0x8D73884C, 0x8D748861,
- 0x8D758B1B, 0x8D768CA2, 0x8D778CFC, 0x8D7890CA, 0x8D799175, 0x8D7A9271,
- 0x8D7B783F, 0x8D7C92FC, 0x8D7D95A4, 0x8D7E964D, 0x8D809805, 0x8D819999,
- 0x8D829AD8, 0x8D839D3B, 0x8D84525B, 0x8D8552AB, 0x8D8653F7, 0x8D875408,
- 0x8D8858D5, 0x8D8962F7, 0x8D8A6FE0, 0x8D8B8C6A, 0x8D8C8F5F, 0x8D8D9EB9,
- 0x8D8E514B, 0x8D8F523B, 0x8D90544A, 0x8D9156FD, 0x8D927A40, 0x8D939177,
- 0x8D949D60, 0x8D959ED2, 0x8D967344, 0x8D976F09, 0x8D988170, 0x8D997511,
- 0x8D9A5FFD, 0x8D9B60DA, 0x8D9C9AA8, 0x8D9D72DB, 0x8D9E8FBC, 0x8D9F6B64,
- 0x8DA09803, 0x8DA14ECA, 0x8DA256F0, 0x8DA35764, 0x8DA458BE, 0x8DA55A5A,
- 0x8DA66068, 0x8DA761C7, 0x8DA8660F, 0x8DA96606, 0x8DAA6839, 0x8DAB68B1,
- 0x8DAC6DF7, 0x8DAD75D5, 0x8DAE7D3A, 0x8DAF826E, 0x8DB09B42, 0x8DB14E9B,
- 0x8DB24F50, 0x8DB353C9, 0x8DB45506, 0x8DB55D6F, 0x8DB65DE6, 0x8DB75DEE,
- 0x8DB867FB, 0x8DB96C99, 0x8DBA7473, 0x8DBB7802, 0x8DBC8A50, 0x8DBD9396,
- 0x8DBE88DF, 0x8DBF5750, 0x8DC05EA7, 0x8DC1632B, 0x8DC250B5, 0x8DC350AC,
- 0x8DC4518D, 0x8DC56700, 0x8DC654C9, 0x8DC7585E, 0x8DC859BB, 0x8DC95BB0,
- 0x8DCA5F69, 0x8DCB624D, 0x8DCC63A1, 0x8DCD683D, 0x8DCE6B73, 0x8DCF6E08,
- 0x8DD0707D, 0x8DD191C7, 0x8DD27280, 0x8DD37815, 0x8DD47826, 0x8DD5796D,
- 0x8DD6658E, 0x8DD77D30, 0x8DD883DC, 0x8DD988C1, 0x8DDA8F09, 0x8DDB969B,
- 0x8DDC5264, 0x8DDD5728, 0x8DDE6750, 0x8DDF7F6A, 0x8DE08CA1, 0x8DE151B4,
- 0x8DE25742, 0x8DE3962A, 0x8DE4583A, 0x8DE5698A, 0x8DE680B4, 0x8DE754B2,
- 0x8DE85D0E, 0x8DE957FC, 0x8DEA7895, 0x8DEB9DFA, 0x8DEC4F5C, 0x8DED524A,
- 0x8DEE548B, 0x8DEF643E, 0x8DF06628, 0x8DF16714, 0x8DF267F5, 0x8DF37A84,
- 0x8DF47B56, 0x8DF57D22, 0x8DF6932F, 0x8DF7685C, 0x8DF89BAD, 0x8DF97B39,
- 0x8DFA5319, 0x8DFB518A, 0x8DFC5237, 0x8E405BDF, 0x8E4162F6, 0x8E4264AE,
- 0x8E4364E6, 0x8E44672D, 0x8E456BBA, 0x8E4685A9, 0x8E4796D1, 0x8E487690,
- 0x8E499BD6, 0x8E4A634C, 0x8E4B9306, 0x8E4C9BAB, 0x8E4D76BF, 0x8E4E6652,
- 0x8E4F4E09, 0x8E505098, 0x8E5153C2, 0x8E525C71, 0x8E5360E8, 0x8E546492,
- 0x8E556563, 0x8E56685F, 0x8E5771E6, 0x8E5873CA, 0x8E597523, 0x8E5A7B97,
- 0x8E5B7E82, 0x8E5C8695, 0x8E5D8B83, 0x8E5E8CDB, 0x8E5F9178, 0x8E609910,
- 0x8E6165AC, 0x8E6266AB, 0x8E636B8B, 0x8E644ED5, 0x8E654ED4, 0x8E664F3A,
- 0x8E674F7F, 0x8E68523A, 0x8E6953F8, 0x8E6A53F2, 0x8E6B55E3, 0x8E6C56DB,
- 0x8E6D58EB, 0x8E6E59CB, 0x8E6F59C9, 0x8E7059FF, 0x8E715B50, 0x8E725C4D,
- 0x8E735E02, 0x8E745E2B, 0x8E755FD7, 0x8E76601D, 0x8E776307, 0x8E78652F,
- 0x8E795B5C, 0x8E7A65AF, 0x8E7B65BD, 0x8E7C65E8, 0x8E7D679D, 0x8E7E6B62,
- 0x8E806B7B, 0x8E816C0F, 0x8E827345, 0x8E837949, 0x8E8479C1, 0x8E857CF8,
- 0x8E867D19, 0x8E877D2B, 0x8E8880A2, 0x8E898102, 0x8E8A81F3, 0x8E8B8996,
- 0x8E8C8A5E, 0x8E8D8A69, 0x8E8E8A66, 0x8E8F8A8C, 0x8E908AEE, 0x8E918CC7,
- 0x8E928CDC, 0x8E9396CC, 0x8E9498FC, 0x8E956B6F, 0x8E964E8B, 0x8E974F3C,
- 0x8E984F8D, 0x8E995150, 0x8E9A5B57, 0x8E9B5BFA, 0x8E9C6148, 0x8E9D6301,
- 0x8E9E6642, 0x8E9F6B21, 0x8EA06ECB, 0x8EA16CBB, 0x8EA2723E, 0x8EA374BD,
- 0x8EA475D4, 0x8EA578C1, 0x8EA6793A, 0x8EA7800C, 0x8EA88033, 0x8EA981EA,
- 0x8EAA8494, 0x8EAB8F9E, 0x8EAC6C50, 0x8EAD9E7F, 0x8EAE5F0F, 0x8EAF8B58,
- 0x8EB09D2B, 0x8EB17AFA, 0x8EB28EF8, 0x8EB35B8D, 0x8EB496EB, 0x8EB54E03,
- 0x8EB653F1, 0x8EB757F7, 0x8EB85931, 0x8EB95AC9, 0x8EBA5BA4, 0x8EBB6089,
- 0x8EBC6E7F, 0x8EBD6F06, 0x8EBE75BE, 0x8EBF8CEA, 0x8EC05B9F, 0x8EC18500,
- 0x8EC27BE0, 0x8EC35072, 0x8EC467F4, 0x8EC5829D, 0x8EC65C61, 0x8EC7854A,
- 0x8EC87E1E, 0x8EC9820E, 0x8ECA5199, 0x8ECB5C04, 0x8ECC6368, 0x8ECD8D66,
- 0x8ECE659C, 0x8ECF716E, 0x8ED0793E, 0x8ED17D17, 0x8ED28005, 0x8ED38B1D,
- 0x8ED48ECA, 0x8ED5906E, 0x8ED686C7, 0x8ED790AA, 0x8ED8501F, 0x8ED952FA,
- 0x8EDA5C3A, 0x8EDB6753, 0x8EDC707C, 0x8EDD7235, 0x8EDE914C, 0x8EDF91C8,
- 0x8EE0932B, 0x8EE182E5, 0x8EE25BC2, 0x8EE35F31, 0x8EE460F9, 0x8EE54E3B,
- 0x8EE653D6, 0x8EE75B88, 0x8EE8624B, 0x8EE96731, 0x8EEA6B8A, 0x8EEB72E9,
- 0x8EEC73E0, 0x8EED7A2E, 0x8EEE816B, 0x8EEF8DA3, 0x8EF09152, 0x8EF19996,
- 0x8EF25112, 0x8EF353D7, 0x8EF4546A, 0x8EF55BFF, 0x8EF66388, 0x8EF76A39,
- 0x8EF87DAC, 0x8EF99700, 0x8EFA56DA, 0x8EFB53CE, 0x8EFC5468, 0x8F405B97,
- 0x8F415C31, 0x8F425DDE, 0x8F434FEE, 0x8F446101, 0x8F4562FE, 0x8F466D32,
- 0x8F4779C0, 0x8F4879CB, 0x8F497D42, 0x8F4A7E4D, 0x8F4B7FD2, 0x8F4C81ED,
- 0x8F4D821F, 0x8F4E8490, 0x8F4F8846, 0x8F508972, 0x8F518B90, 0x8F528E74,
- 0x8F538F2F, 0x8F549031, 0x8F55914B, 0x8F56916C, 0x8F5796C6, 0x8F58919C,
- 0x8F594EC0, 0x8F5A4F4F, 0x8F5B5145, 0x8F5C5341, 0x8F5D5F93, 0x8F5E620E,
- 0x8F5F67D4, 0x8F606C41, 0x8F616E0B, 0x8F627363, 0x8F637E26, 0x8F6491CD,
- 0x8F659283, 0x8F6653D4, 0x8F675919, 0x8F685BBF, 0x8F696DD1, 0x8F6A795D,
- 0x8F6B7E2E, 0x8F6C7C9B, 0x8F6D587E, 0x8F6E719F, 0x8F6F51FA, 0x8F708853,
- 0x8F718FF0, 0x8F724FCA, 0x8F735CFB, 0x8F746625, 0x8F7577AC, 0x8F767AE3,
- 0x8F77821C, 0x8F7899FF, 0x8F7951C6, 0x8F7A5FAA, 0x8F7B65EC, 0x8F7C696F,
- 0x8F7D6B89, 0x8F7E6DF3, 0x8F806E96, 0x8F816F64, 0x8F8276FE, 0x8F837D14,
- 0x8F845DE1, 0x8F859075, 0x8F869187, 0x8F879806, 0x8F8851E6, 0x8F89521D,
- 0x8F8A6240, 0x8F8B6691, 0x8F8C66D9, 0x8F8D6E1A, 0x8F8E5EB6, 0x8F8F7DD2,
- 0x8F907F72, 0x8F9166F8, 0x8F9285AF, 0x8F9385F7, 0x8F948AF8, 0x8F9552A9,
- 0x8F9653D9, 0x8F975973, 0x8F985E8F, 0x8F995F90, 0x8F9A6055, 0x8F9B92E4,
- 0x8F9C9664, 0x8F9D50B7, 0x8F9E511F, 0x8F9F52DD, 0x8FA05320, 0x8FA15347,
- 0x8FA253EC, 0x8FA354E8, 0x8FA45546, 0x8FA55531, 0x8FA65617, 0x8FA75968,
- 0x8FA859BE, 0x8FA95A3C, 0x8FAA5BB5, 0x8FAB5C06, 0x8FAC5C0F, 0x8FAD5C11,
- 0x8FAE5C1A, 0x8FAF5E84, 0x8FB05E8A, 0x8FB15EE0, 0x8FB25F70, 0x8FB3627F,
- 0x8FB46284, 0x8FB562DB, 0x8FB6638C, 0x8FB76377, 0x8FB86607, 0x8FB9660C,
- 0x8FBA662D, 0x8FBB6676, 0x8FBC677E, 0x8FBD68A2, 0x8FBE6A1F, 0x8FBF6A35,
- 0x8FC06CBC, 0x8FC16D88, 0x8FC26E09, 0x8FC36E58, 0x8FC4713C, 0x8FC57126,
- 0x8FC67167, 0x8FC775C7, 0x8FC87701, 0x8FC9785D, 0x8FCA7901, 0x8FCB7965,
- 0x8FCC79F0, 0x8FCD7AE0, 0x8FCE7B11, 0x8FCF7CA7, 0x8FD07D39, 0x8FD18096,
- 0x8FD283D6, 0x8FD3848B, 0x8FD48549, 0x8FD5885D, 0x8FD688F3, 0x8FD78A1F,
- 0x8FD88A3C, 0x8FD98A54, 0x8FDA8A73, 0x8FDB8C61, 0x8FDC8CDE, 0x8FDD91A4,
- 0x8FDE9266, 0x8FDF937E, 0x8FE09418, 0x8FE1969C, 0x8FE29798, 0x8FE34E0A,
- 0x8FE44E08, 0x8FE54E1E, 0x8FE64E57, 0x8FE75197, 0x8FE85270, 0x8FE957CE,
- 0x8FEA5834, 0x8FEB58CC, 0x8FEC5B22, 0x8FED5E38, 0x8FEE60C5, 0x8FEF64FE,
- 0x8FF06761, 0x8FF16756, 0x8FF26D44, 0x8FF372B6, 0x8FF47573, 0x8FF57A63,
- 0x8FF684B8, 0x8FF78B72, 0x8FF891B8, 0x8FF99320, 0x8FFA5631, 0x8FFB57F4,
- 0x8FFC98FE, 0x904062ED, 0x9041690D, 0x90426B96, 0x904371ED, 0x90447E54,
- 0x90458077, 0x90468272, 0x904789E6, 0x904898DF, 0x90498755, 0x904A8FB1,
- 0x904B5C3B, 0x904C4F38, 0x904D4FE1, 0x904E4FB5, 0x904F5507, 0x90505A20,
- 0x90515BDD, 0x90525BE9, 0x90535FC3, 0x9054614E, 0x9055632F, 0x905665B0,
- 0x9057664B, 0x905868EE, 0x9059699B, 0x905A6D78, 0x905B6DF1, 0x905C7533,
- 0x905D75B9, 0x905E771F, 0x905F795E, 0x906079E6, 0x90617D33, 0x906281E3,
- 0x906382AF, 0x906485AA, 0x906589AA, 0x90668A3A, 0x90678EAB, 0x90688F9B,
- 0x90699032, 0x906A91DD, 0x906B9707, 0x906C4EBA, 0x906D4EC1, 0x906E5203,
- 0x906F5875, 0x907058EC, 0x90715C0B, 0x9072751A, 0x90735C3D, 0x9074814E,
- 0x90758A0A, 0x90768FC5, 0x90779663, 0x9078976D, 0x90797B25, 0x907A8ACF,
- 0x907B9808, 0x907C9162, 0x907D56F3, 0x907E53A8, 0x90809017, 0x90815439,
- 0x90825782, 0x90835E25, 0x908463A8, 0x90856C34, 0x9086708A, 0x90877761,
- 0x90887C8B, 0x90897FE0, 0x908A8870, 0x908B9042, 0x908C9154, 0x908D9310,
- 0x908E9318, 0x908F968F, 0x9090745E, 0x90919AC4, 0x90925D07, 0x90935D69,
- 0x90946570, 0x909567A2, 0x90968DA8, 0x909796DB, 0x9098636E, 0x90996749,
- 0x909A6919, 0x909B83C5, 0x909C9817, 0x909D96C0, 0x909E88FE, 0x909F6F84,
- 0x90A0647A, 0x90A15BF8, 0x90A24E16, 0x90A3702C, 0x90A4755D, 0x90A5662F,
- 0x90A651C4, 0x90A75236, 0x90A852E2, 0x90A959D3, 0x90AA5F81, 0x90AB6027,
- 0x90AC6210, 0x90AD653F, 0x90AE6574, 0x90AF661F, 0x90B06674, 0x90B168F2,
- 0x90B26816, 0x90B36B63, 0x90B46E05, 0x90B57272, 0x90B6751F, 0x90B776DB,
- 0x90B87CBE, 0x90B98056, 0x90BA58F0, 0x90BB88FD, 0x90BC897F, 0x90BD8AA0,
- 0x90BE8A93, 0x90BF8ACB, 0x90C0901D, 0x90C19192, 0x90C29752, 0x90C39759,
- 0x90C46589, 0x90C57A0E, 0x90C68106, 0x90C796BB, 0x90C85E2D, 0x90C960DC,
- 0x90CA621A, 0x90CB65A5, 0x90CC6614, 0x90CD6790, 0x90CE77F3, 0x90CF7A4D,
- 0x90D07C4D, 0x90D17E3E, 0x90D2810A, 0x90D38CAC, 0x90D48D64, 0x90D58DE1,
- 0x90D68E5F, 0x90D778A9, 0x90D85207, 0x90D962D9, 0x90DA63A5, 0x90DB6442,
- 0x90DC6298, 0x90DD8A2D, 0x90DE7A83, 0x90DF7BC0, 0x90E08AAC, 0x90E196EA,
- 0x90E27D76, 0x90E3820C, 0x90E48749, 0x90E54ED9, 0x90E65148, 0x90E75343,
- 0x90E85360, 0x90E95BA3, 0x90EA5C02, 0x90EB5C16, 0x90EC5DDD, 0x90ED6226,
- 0x90EE6247, 0x90EF64B0, 0x90F06813, 0x90F16834, 0x90F26CC9, 0x90F36D45,
- 0x90F46D17, 0x90F567D3, 0x90F66F5C, 0x90F7714E, 0x90F8717D, 0x90F965CB,
- 0x90FA7A7F, 0x90FB7BAD, 0x90FC7DDA, 0x91407E4A, 0x91417FA8, 0x9142817A,
- 0x9143821B, 0x91448239, 0x914585A6, 0x91468A6E, 0x91478CCE, 0x91488DF5,
- 0x91499078, 0x914A9077, 0x914B92AD, 0x914C9291, 0x914D9583, 0x914E9BAE,
- 0x914F524D, 0x91505584, 0x91516F38, 0x91527136, 0x91535168, 0x91547985,
- 0x91557E55, 0x915681B3, 0x91577CCE, 0x9158564C, 0x91595851, 0x915A5CA8,
- 0x915B63AA, 0x915C66FE, 0x915D66FD, 0x915E695A, 0x915F72D9, 0x9160758F,
- 0x9161758E, 0x9162790E, 0x91637956, 0x916479DF, 0x91657C97, 0x91667D20,
- 0x91677D44, 0x91688607, 0x91698A34, 0x916A963B, 0x916B9061, 0x916C9F20,
- 0x916D50E7, 0x916E5275, 0x916F53CC, 0x917053E2, 0x91715009, 0x917255AA,
- 0x917358EE, 0x9174594F, 0x9175723D, 0x91765B8B, 0x91775C64, 0x9178531D,
- 0x917960E3, 0x917A60F3, 0x917B635C, 0x917C6383, 0x917D633F, 0x917E63BB,
- 0x918064CD, 0x918165E9, 0x918266F9, 0x91835DE3, 0x918469CD, 0x918569FD,
- 0x91866F15, 0x918771E5, 0x91884E89, 0x918975E9, 0x918A76F8, 0x918B7A93,
- 0x918C7CDF, 0x918D7DCF, 0x918E7D9C, 0x918F8061, 0x91908349, 0x91918358,
- 0x9192846C, 0x919384BC, 0x919485FB, 0x919588C5, 0x91968D70, 0x91979001,
- 0x9198906D, 0x91999397, 0x919A971C, 0x919B9A12, 0x919C50CF, 0x919D5897,
- 0x919E618E, 0x919F81D3, 0x91A08535, 0x91A18D08, 0x91A29020, 0x91A34FC3,
- 0x91A45074, 0x91A55247, 0x91A65373, 0x91A7606F, 0x91A86349, 0x91A9675F,
- 0x91AA6E2C, 0x91AB8DB3, 0x91AC901F, 0x91AD4FD7, 0x91AE5C5E, 0x91AF8CCA,
- 0x91B065CF, 0x91B17D9A, 0x91B25352, 0x91B38896, 0x91B45176, 0x91B563C3,
- 0x91B65B58, 0x91B75B6B, 0x91B85C0A, 0x91B9640D, 0x91BA6751, 0x91BB905C,
- 0x91BC4ED6, 0x91BD591A, 0x91BE592A, 0x91BF6C70, 0x91C08A51, 0x91C1553E,
- 0x91C25815, 0x91C359A5, 0x91C460F0, 0x91C56253, 0x91C667C1, 0x91C78235,
- 0x91C86955, 0x91C99640, 0x91CA99C4, 0x91CB9A28, 0x91CC4F53, 0x91CD5806,
- 0x91CE5BFE, 0x91CF8010, 0x91D05CB1, 0x91D15E2F, 0x91D25F85, 0x91D36020,
- 0x91D4614B, 0x91D56234, 0x91D666FF, 0x91D76CF0, 0x91D86EDE, 0x91D980CE,
- 0x91DA817F, 0x91DB82D4, 0x91DC888B, 0x91DD8CB8, 0x91DE9000, 0x91DF902E,
- 0x91E0968A, 0x91E19EDB, 0x91E29BDB, 0x91E34EE3, 0x91E453F0, 0x91E55927,
- 0x91E67B2C, 0x91E7918D, 0x91E8984C, 0x91E99DF9, 0x91EA6EDD, 0x91EB7027,
- 0x91EC5353, 0x91ED5544, 0x91EE5B85, 0x91EF6258, 0x91F0629E, 0x91F162D3,
- 0x91F26CA2, 0x91F36FEF, 0x91F47422, 0x91F58A17, 0x91F69438, 0x91F76FC1,
- 0x91F88AFE, 0x91F98338, 0x91FA51E7, 0x91FB86F8, 0x91FC53EA, 0x924053E9,
- 0x92414F46, 0x92429054, 0x92438FB0, 0x9244596A, 0x92458131, 0x92465DFD,
- 0x92477AEA, 0x92488FBF, 0x924968DA, 0x924A8C37, 0x924B72F8, 0x924C9C48,
- 0x924D6A3D, 0x924E8AB0, 0x924F4E39, 0x92505358, 0x92515606, 0x92525766,
- 0x925362C5, 0x925463A2, 0x925565E6, 0x92566B4E, 0x92576DE1, 0x92586E5B,
- 0x925970AD, 0x925A77ED, 0x925B7AEF, 0x925C7BAA, 0x925D7DBB, 0x925E803D,
- 0x925F80C6, 0x926086CB, 0x92618A95, 0x9262935B, 0x926356E3, 0x926458C7,
- 0x92655F3E, 0x926665AD, 0x92676696, 0x92686A80, 0x92696BB5, 0x926A7537,
- 0x926B8AC7, 0x926C5024, 0x926D77E5, 0x926E5730, 0x926F5F1B, 0x92706065,
- 0x9271667A, 0x92726C60, 0x927375F4, 0x92747A1A, 0x92757F6E, 0x927681F4,
- 0x92778718, 0x92789045, 0x927999B3, 0x927A7BC9, 0x927B755C, 0x927C7AF9,
- 0x927D7B51, 0x927E84C4, 0x92809010, 0x928179E9, 0x92827A92, 0x92838336,
- 0x92845AE1, 0x92857740, 0x92864E2D, 0x92874EF2, 0x92885B99, 0x92895FE0,
- 0x928A62BD, 0x928B663C, 0x928C67F1, 0x928D6CE8, 0x928E866B, 0x928F8877,
- 0x92908A3B, 0x9291914E, 0x929292F3, 0x929399D0, 0x92946A17, 0x92957026,
- 0x9296732A, 0x929782E7, 0x92988457, 0x92998CAF, 0x929A4E01, 0x929B5146,
- 0x929C51CB, 0x929D558B, 0x929E5BF5, 0x929F5E16, 0x92A05E33, 0x92A15E81,
- 0x92A25F14, 0x92A35F35, 0x92A45F6B, 0x92A55FB4, 0x92A661F2, 0x92A76311,
- 0x92A866A2, 0x92A9671D, 0x92AA6F6E, 0x92AB7252, 0x92AC753A, 0x92AD773A,
- 0x92AE8074, 0x92AF8139, 0x92B08178, 0x92B18776, 0x92B28ABF, 0x92B38ADC,
- 0x92B48D85, 0x92B58DF3, 0x92B6929A, 0x92B79577, 0x92B89802, 0x92B99CE5,
- 0x92BA52C5, 0x92BB6357, 0x92BC76F4, 0x92BD6715, 0x92BE6C88, 0x92BF73CD,
- 0x92C08CC3, 0x92C193AE, 0x92C29673, 0x92C36D25, 0x92C4589C, 0x92C5690E,
- 0x92C669CC, 0x92C78FFD, 0x92C8939A, 0x92C975DB, 0x92CA901A, 0x92CB585A,
- 0x92CC6802, 0x92CD63B4, 0x92CE69FB, 0x92CF4F43, 0x92D06F2C, 0x92D167D8,
- 0x92D28FBB, 0x92D38526, 0x92D47DB4, 0x92D59354, 0x92D6693F, 0x92D76F70,
- 0x92D8576A, 0x92D958F7, 0x92DA5B2C, 0x92DB7D2C, 0x92DC722A, 0x92DD540A,
- 0x92DE91E3, 0x92DF9DB4, 0x92E04EAD, 0x92E14F4E, 0x92E2505C, 0x92E35075,
- 0x92E45243, 0x92E58C9E, 0x92E65448, 0x92E75824, 0x92E85B9A, 0x92E95E1D,
- 0x92EA5E95, 0x92EB5EAD, 0x92EC5EF7, 0x92ED5F1F, 0x92EE608C, 0x92EF62B5,
- 0x92F0633A, 0x92F163D0, 0x92F268AF, 0x92F36C40, 0x92F47887, 0x92F5798E,
- 0x92F67A0B, 0x92F77DE0, 0x92F88247, 0x92F98A02, 0x92FA8AE6, 0x92FB8E44,
- 0x92FC9013, 0x934090B8, 0x9341912D, 0x934291D8, 0x93439F0E, 0x93446CE5,
- 0x93456458, 0x934664E2, 0x93476575, 0x93486EF4, 0x93497684, 0x934A7B1B,
- 0x934B9069, 0x934C93D1, 0x934D6EBA, 0x934E54F2, 0x934F5FB9, 0x935064A4,
- 0x93518F4D, 0x93528FED, 0x93539244, 0x93545178, 0x9355586B, 0x93565929,
- 0x93575C55, 0x93585E97, 0x93596DFB, 0x935A7E8F, 0x935B751C, 0x935C8CBC,
- 0x935D8EE2, 0x935E985B, 0x935F70B9, 0x93604F1D, 0x93616BBF, 0x93626FB1,
- 0x93637530, 0x936496FB, 0x9365514E, 0x93665410, 0x93675835, 0x93685857,
- 0x936959AC, 0x936A5C60, 0x936B5F92, 0x936C6597, 0x936D675C, 0x936E6E21,
- 0x936F767B, 0x937083DF, 0x93718CED, 0x93729014, 0x937390FD, 0x9374934D,
- 0x93757825, 0x9376783A, 0x937752AA, 0x93785EA6, 0x9379571F, 0x937A5974,
- 0x937B6012, 0x937C5012, 0x937D515A, 0x937E51AC, 0x938051CD, 0x93815200,
- 0x93825510, 0x93835854, 0x93845858, 0x93855957, 0x93865B95, 0x93875CF6,
- 0x93885D8B, 0x938960BC, 0x938A6295, 0x938B642D, 0x938C6771, 0x938D6843,
- 0x938E68BC, 0x938F68DF, 0x939076D7, 0x93916DD8, 0x93926E6F, 0x93936D9B,
- 0x9394706F, 0x939571C8, 0x93965F53, 0x939775D8, 0x93987977, 0x93997B49,
- 0x939A7B54, 0x939B7B52, 0x939C7CD6, 0x939D7D71, 0x939E5230, 0x939F8463,
- 0x93A08569, 0x93A185E4, 0x93A28A0E, 0x93A38B04, 0x93A48C46, 0x93A58E0F,
- 0x93A69003, 0x93A7900F, 0x93A89419, 0x93A99676, 0x93AA982D, 0x93AB9A30,
- 0x93AC95D8, 0x93AD50CD, 0x93AE52D5, 0x93AF540C, 0x93B05802, 0x93B15C0E,
- 0x93B261A7, 0x93B3649E, 0x93B46D1E, 0x93B577B3, 0x93B67AE5, 0x93B780F4,
- 0x93B88404, 0x93B99053, 0x93BA9285, 0x93BB5CE0, 0x93BC9D07, 0x93BD533F,
- 0x93BE5F97, 0x93BF5FB3, 0x93C06D9C, 0x93C17279, 0x93C27763, 0x93C379BF,
- 0x93C47BE4, 0x93C56BD2, 0x93C672EC, 0x93C78AAD, 0x93C86803, 0x93C96A61,
- 0x93CA51F8, 0x93CB7A81, 0x93CC6934, 0x93CD5C4A, 0x93CE9CF6, 0x93CF82EB,
- 0x93D05BC5, 0x93D19149, 0x93D2701E, 0x93D35678, 0x93D45C6F, 0x93D560C7,
- 0x93D66566, 0x93D76C8C, 0x93D88C5A, 0x93D99041, 0x93DA9813, 0x93DB5451,
- 0x93DC66C7, 0x93DD920D, 0x93DE5948, 0x93DF90A3, 0x93E05185, 0x93E14E4D,
- 0x93E251EA, 0x93E38599, 0x93E48B0E, 0x93E57058, 0x93E6637A, 0x93E7934B,
- 0x93E86962, 0x93E999B4, 0x93EA7E04, 0x93EB7577, 0x93EC5357, 0x93ED6960,
- 0x93EE8EDF, 0x93EF96E3, 0x93F06C5D, 0x93F14E8C, 0x93F25C3C, 0x93F35F10,
- 0x93F48FE9, 0x93F55302, 0x93F68CD1, 0x93F78089, 0x93F88679, 0x93F95EFF,
- 0x93FA65E5, 0x93FB4E73, 0x93FC5165, 0x94405982, 0x94415C3F, 0x944297EE,
- 0x94434EFB, 0x9444598A, 0x94455FCD, 0x94468A8D, 0x94476FE1, 0x944879B0,
- 0x94497962, 0x944A5BE7, 0x944B8471, 0x944C732B, 0x944D71B1, 0x944E5E74,
- 0x944F5FF5, 0x9450637B, 0x9451649A, 0x945271C3, 0x94537C98, 0x94544E43,
- 0x94555EFC, 0x94564E4B, 0x945757DC, 0x945856A2, 0x945960A9, 0x945A6FC3,
- 0x945B7D0D, 0x945C80FD, 0x945D8133, 0x945E81BF, 0x945F8FB2, 0x94608997,
- 0x946186A4, 0x94625DF4, 0x9463628A, 0x946464AD, 0x94658987, 0x94666777,
- 0x94676CE2, 0x94686D3E, 0x94697436, 0x946A7834, 0x946B5A46, 0x946C7F75,
- 0x946D82AD, 0x946E99AC, 0x946F4FF3, 0x94705EC3, 0x947162DD, 0x94726392,
- 0x94736557, 0x9474676F, 0x947576C3, 0x9476724C, 0x947780CC, 0x947880BA,
- 0x94798F29, 0x947A914D, 0x947B500D, 0x947C57F9, 0x947D5A92, 0x947E6885,
- 0x94806973, 0x94817164, 0x948272FD, 0x94838CB7, 0x948458F2, 0x94858CE0,
- 0x9486966A, 0x94879019, 0x9488877F, 0x948979E4, 0x948A77E7, 0x948B8429,
- 0x948C4F2F, 0x948D5265, 0x948E535A, 0x948F62CD, 0x949067CF, 0x94916CCA,
- 0x9492767D, 0x94937B94, 0x94947C95, 0x94958236, 0x94968584, 0x94978FEB,
- 0x949866DD, 0x94996F20, 0x949A7206, 0x949B7E1B, 0x949C83AB, 0x949D99C1,
- 0x949E9EA6, 0x949F51FD, 0x94A07BB1, 0x94A17872, 0x94A27BB8, 0x94A38087,
- 0x94A47B48, 0x94A56AE8, 0x94A65E61, 0x94A7808C, 0x94A87551, 0x94A97560,
- 0x94AA516B, 0x94AB9262, 0x94AC6E8C, 0x94AD767A, 0x94AE9197, 0x94AF9AEA,
- 0x94B04F10, 0x94B17F70, 0x94B2629C, 0x94B37B4F, 0x94B495A5, 0x94B59CE9,
- 0x94B6567A, 0x94B75859, 0x94B886E4, 0x94B996BC, 0x94BA4F34, 0x94BB5224,
- 0x94BC534A, 0x94BD53CD, 0x94BE53DB, 0x94BF5E06, 0x94C0642C, 0x94C16591,
- 0x94C2677F, 0x94C36C3E, 0x94C46C4E, 0x94C57248, 0x94C672AF, 0x94C773ED,
- 0x94C87554, 0x94C97E41, 0x94CA822C, 0x94CB85E9, 0x94CC8CA9, 0x94CD7BC4,
- 0x94CE91C6, 0x94CF7169, 0x94D09812, 0x94D198EF, 0x94D2633D, 0x94D36669,
- 0x94D4756A, 0x94D576E4, 0x94D678D0, 0x94D78543, 0x94D886EE, 0x94D9532A,
- 0x94DA5351, 0x94DB5426, 0x94DC5983, 0x94DD5E87, 0x94DE5F7C, 0x94DF60B2,
- 0x94E06249, 0x94E16279, 0x94E262AB, 0x94E36590, 0x94E46BD4, 0x94E56CCC,
- 0x94E675B2, 0x94E776AE, 0x94E87891, 0x94E979D8, 0x94EA7DCB, 0x94EB7F77,
- 0x94EC80A5, 0x94ED88AB, 0x94EE8AB9, 0x94EF8CBB, 0x94F0907F, 0x94F1975E,
- 0x94F298DB, 0x94F36A0B, 0x94F47C38, 0x94F55099, 0x94F65C3E, 0x94F75FAE,
- 0x94F86787, 0x94F96BD8, 0x94FA7435, 0x94FB7709, 0x94FC7F8E, 0x95409F3B,
- 0x954167CA, 0x95427A17, 0x95435339, 0x9544758B, 0x95459AED, 0x95465F66,
- 0x9547819D, 0x954883F1, 0x95498098, 0x954A5F3C, 0x954B5FC5, 0x954C7562,
- 0x954D7B46, 0x954E903C, 0x954F6867, 0x955059EB, 0x95515A9B, 0x95527D10,
- 0x9553767E, 0x95548B2C, 0x95554FF5, 0x95565F6A, 0x95576A19, 0x95586C37,
- 0x95596F02, 0x955A74E2, 0x955B7968, 0x955C8868, 0x955D8A55, 0x955E8C79,
- 0x955F5EDF, 0x956063CF, 0x956175C5, 0x956279D2, 0x956382D7, 0x95649328,
- 0x956592F2, 0x9566849C, 0x956786ED, 0x95689C2D, 0x956954C1, 0x956A5F6C,
- 0x956B658C, 0x956C6D5C, 0x956D7015, 0x956E8CA7, 0x956F8CD3, 0x9570983B,
- 0x9571654F, 0x957274F6, 0x95734E0D, 0x95744ED8, 0x957557E0, 0x9576592B,
- 0x95775A66, 0x95785BCC, 0x957951A8, 0x957A5E03, 0x957B5E9C, 0x957C6016,
- 0x957D6276, 0x957E6577, 0x958065A7, 0x9581666E, 0x95826D6E, 0x95837236,
- 0x95847B26, 0x95858150, 0x9586819A, 0x95878299, 0x95888B5C, 0x95898CA0,
- 0x958A8CE6, 0x958B8D74, 0x958C961C, 0x958D9644, 0x958E4FAE, 0x958F64AB,
- 0x95906B66, 0x9591821E, 0x95928461, 0x9593856A, 0x959490E8, 0x95955C01,
- 0x95966953, 0x959798A8, 0x9598847A, 0x95998557, 0x959A4F0F, 0x959B526F,
- 0x959C5FA9, 0x959D5E45, 0x959E670D, 0x959F798F, 0x95A08179, 0x95A18907,
- 0x95A28986, 0x95A36DF5, 0x95A45F17, 0x95A56255, 0x95A66CB8, 0x95A74ECF,
- 0x95A87269, 0x95A99B92, 0x95AA5206, 0x95AB543B, 0x95AC5674, 0x95AD58B3,
- 0x95AE61A4, 0x95AF626E, 0x95B0711A, 0x95B1596E, 0x95B27C89, 0x95B37CDE,
- 0x95B47D1B, 0x95B596F0, 0x95B66587, 0x95B7805E, 0x95B84E19, 0x95B94F75,
- 0x95BA5175, 0x95BB5840, 0x95BC5E63, 0x95BD5E73, 0x95BE5F0A, 0x95BF67C4,
- 0x95C04E26, 0x95C1853D, 0x95C29589, 0x95C3965B, 0x95C47C73, 0x95C59801,
- 0x95C650FB, 0x95C758C1, 0x95C87656, 0x95C978A7, 0x95CA5225, 0x95CB77A5,
- 0x95CC8511, 0x95CD7B86, 0x95CE504F, 0x95CF5909, 0x95D07247, 0x95D17BC7,
- 0x95D27DE8, 0x95D38FBA, 0x95D48FD4, 0x95D5904D, 0x95D64FBF, 0x95D752C9,
- 0x95D85A29, 0x95D95F01, 0x95DA97AD, 0x95DB4FDD, 0x95DC8217, 0x95DD92EA,
- 0x95DE5703, 0x95DF6355, 0x95E06B69, 0x95E1752B, 0x95E288DC, 0x95E38F14,
- 0x95E47A42, 0x95E552DF, 0x95E65893, 0x95E76155, 0x95E8620A, 0x95E966AE,
- 0x95EA6BCD, 0x95EB7C3F, 0x95EC83E9, 0x95ED5023, 0x95EE4FF8, 0x95EF5305,
- 0x95F05446, 0x95F15831, 0x95F25949, 0x95F35B9D, 0x95F45CF0, 0x95F55CEF,
- 0x95F65D29, 0x95F75E96, 0x95F862B1, 0x95F96367, 0x95FA653E, 0x95FB65B9,
- 0x95FC670B, 0x96406CD5, 0x96416CE1, 0x964270F9, 0x96437832, 0x96447E2B,
- 0x964580DE, 0x964682B3, 0x9647840C, 0x964884EC, 0x96498702, 0x964A8912,
- 0x964B8A2A, 0x964C8C4A, 0x964D90A6, 0x964E92D2, 0x964F98FD, 0x96509CF3,
- 0x96519D6C, 0x96524E4F, 0x96534EA1, 0x9654508D, 0x96555256, 0x9656574A,
- 0x965759A8, 0x96585E3D, 0x96595FD8, 0x965A5FD9, 0x965B623F, 0x965C66B4,
- 0x965D671B, 0x965E67D0, 0x965F68D2, 0x96605192, 0x96617D21, 0x966280AA,
- 0x966381A8, 0x96648B00, 0x96658C8C, 0x96668CBF, 0x9667927E, 0x96689632,
- 0x96695420, 0x966A982C, 0x966B5317, 0x966C50D5, 0x966D535C, 0x966E58A8,
- 0x966F64B2, 0x96706734, 0x96717267, 0x96727766, 0x96737A46, 0x967491E6,
- 0x967552C3, 0x96766CA1, 0x96776B86, 0x96785800, 0x96795E4C, 0x967A5954,
- 0x967B672C, 0x967C7FFB, 0x967D51E1, 0x967E76C6, 0x96806469, 0x968178E8,
- 0x96829B54, 0x96839EBB, 0x968457CB, 0x968559B9, 0x96866627, 0x9687679A,
- 0x96886BCE, 0x968954E9, 0x968A69D9, 0x968B5E55, 0x968C819C, 0x968D6795,
- 0x968E9BAA, 0x968F67FE, 0x96909C52, 0x9691685D, 0x96924EA6, 0x96934FE3,
- 0x969453C8, 0x969562B9, 0x9696672B, 0x96976CAB, 0x96988FC4, 0x96994FAD,
- 0x969A7E6D, 0x969B9EBF, 0x969C4E07, 0x969D6162, 0x969E6E80, 0x969F6F2B,
- 0x96A08513, 0x96A15473, 0x96A2672A, 0x96A39B45, 0x96A45DF3, 0x96A57B95,
- 0x96A65CAC, 0x96A75BC6, 0x96A8871C, 0x96A96E4A, 0x96AA84D1, 0x96AB7A14,
- 0x96AC8108, 0x96AD5999, 0x96AE7C8D, 0x96AF6C11, 0x96B07720, 0x96B152D9,
- 0x96B25922, 0x96B37121, 0x96B4725F, 0x96B577DB, 0x96B69727, 0x96B79D61,
- 0x96B8690B, 0x96B95A7F, 0x96BA5A18, 0x96BB51A5, 0x96BC540D, 0x96BD547D,
- 0x96BE660E, 0x96BF76DF, 0x96C08FF7, 0x96C19298, 0x96C29CF4, 0x96C359EA,
- 0x96C4725D, 0x96C56EC5, 0x96C6514D, 0x96C768C9, 0x96C87DBF, 0x96C97DEC,
- 0x96CA9762, 0x96CB9EBA, 0x96CC6478, 0x96CD6A21, 0x96CE8302, 0x96CF5984,
- 0x96D05B5F, 0x96D16BDB, 0x96D2731B, 0x96D376F2, 0x96D47DB2, 0x96D58017,
- 0x96D68499, 0x96D75132, 0x96D86728, 0x96D99ED9, 0x96DA76EE, 0x96DB6762,
- 0x96DC52FF, 0x96DD9905, 0x96DE5C24, 0x96DF623B, 0x96E07C7E, 0x96E18CB0,
- 0x96E2554F, 0x96E360B6, 0x96E47D0B, 0x96E59580, 0x96E65301, 0x96E74E5F,
- 0x96E851B6, 0x96E9591C, 0x96EA723A, 0x96EB8036, 0x96EC91CE, 0x96ED5F25,
- 0x96EE77E2, 0x96EF5384, 0x96F05F79, 0x96F17D04, 0x96F285AC, 0x96F38A33,
- 0x96F48E8D, 0x96F59756, 0x96F667F3, 0x96F785AE, 0x96F89453, 0x96F96109,
- 0x96FA6108, 0x96FB6CB9, 0x96FC7652, 0x97408AED, 0x97418F38, 0x9742552F,
- 0x97434F51, 0x9744512A, 0x974552C7, 0x974653CB, 0x97475BA5, 0x97485E7D,
- 0x974960A0, 0x974A6182, 0x974B63D6, 0x974C6709, 0x974D67DA, 0x974E6E67,
- 0x974F6D8C, 0x97507336, 0x97517337, 0x97527531, 0x97537950, 0x975488D5,
- 0x97558A98, 0x9756904A, 0x97579091, 0x975890F5, 0x975996C4, 0x975A878D,
- 0x975B5915, 0x975C4E88, 0x975D4F59, 0x975E4E0E, 0x975F8A89, 0x97608F3F,
- 0x97619810, 0x976250AD, 0x97635E7C, 0x97645996, 0x97655BB9, 0x97665EB8,
- 0x976763DA, 0x976863FA, 0x976964C1, 0x976A66DC, 0x976B694A, 0x976C69D8,
- 0x976D6D0B, 0x976E6EB6, 0x976F7194, 0x97707528, 0x97717AAF, 0x97727F8A,
- 0x97738000, 0x97748449, 0x977584C9, 0x97768981, 0x97778B21, 0x97788E0A,
- 0x97799065, 0x977A967D, 0x977B990A, 0x977C617E, 0x977D6291, 0x977E6B32,
- 0x97806C83, 0x97816D74, 0x97827FCC, 0x97837FFC, 0x97846DC0, 0x97857F85,
- 0x978687BA, 0x978788F8, 0x97886765, 0x978983B1, 0x978A983C, 0x978B96F7,
- 0x978C6D1B, 0x978D7D61, 0x978E843D, 0x978F916A, 0x97904E71, 0x97915375,
- 0x97925D50, 0x97936B04, 0x97946FEB, 0x979585CD, 0x9796862D, 0x979789A7,
- 0x97985229, 0x9799540F, 0x979A5C65, 0x979B674E, 0x979C68A8, 0x979D7406,
- 0x979E7483, 0x979F75E2, 0x97A088CF, 0x97A188E1, 0x97A291CC, 0x97A396E2,
- 0x97A49678, 0x97A55F8B, 0x97A67387, 0x97A77ACB, 0x97A8844E, 0x97A963A0,
- 0x97AA7565, 0x97AB5289, 0x97AC6D41, 0x97AD6E9C, 0x97AE7409, 0x97AF7559,
- 0x97B0786B, 0x97B17C92, 0x97B29686, 0x97B37ADC, 0x97B49F8D, 0x97B54FB6,
- 0x97B6616E, 0x97B765C5, 0x97B8865C, 0x97B94E86, 0x97BA4EAE, 0x97BB50DA,
- 0x97BC4E21, 0x97BD51CC, 0x97BE5BEE, 0x97BF6599, 0x97C06881, 0x97C16DBC,
- 0x97C2731F, 0x97C37642, 0x97C477AD, 0x97C57A1C, 0x97C67CE7, 0x97C7826F,
- 0x97C88AD2, 0x97C9907C, 0x97CA91CF, 0x97CB9675, 0x97CC9818, 0x97CD529B,
- 0x97CE7DD1, 0x97CF502B, 0x97D05398, 0x97D16797, 0x97D26DCB, 0x97D371D0,
- 0x97D47433, 0x97D581E8, 0x97D68F2A, 0x97D796A3, 0x97D89C57, 0x97D99E9F,
- 0x97DA7460, 0x97DB5841, 0x97DC6D99, 0x97DD7D2F, 0x97DE985E, 0x97DF4EE4,
- 0x97E04F36, 0x97E14F8B, 0x97E251B7, 0x97E352B1, 0x97E45DBA, 0x97E5601C,
- 0x97E673B2, 0x97E7793C, 0x97E882D3, 0x97E99234, 0x97EA96B7, 0x97EB96F6,
- 0x97EC970A, 0x97ED9E97, 0x97EE9F62, 0x97EF66A6, 0x97F06B74, 0x97F15217,
- 0x97F252A3, 0x97F370C8, 0x97F488C2, 0x97F55EC9, 0x97F6604B, 0x97F76190,
- 0x97F86F23, 0x97F97149, 0x97FA7C3E, 0x97FB7DF4, 0x97FC806F, 0x984084EE,
- 0x98419023, 0x9842932C, 0x98435442, 0x98449B6F, 0x98456AD3, 0x98467089,
- 0x98478CC2, 0x98488DEF, 0x98499732, 0x984A52B4, 0x984B5A41, 0x984C5ECA,
- 0x984D5F04, 0x984E6717, 0x984F697C, 0x98506994, 0x98516D6A, 0x98526F0F,
- 0x98537262, 0x985472FC, 0x98557BED, 0x98568001, 0x9857807E, 0x9858874B,
- 0x985990CE, 0x985A516D, 0x985B9E93, 0x985C7984, 0x985D808B, 0x985E9332,
- 0x985F8AD6, 0x9860502D, 0x9861548C, 0x98628A71, 0x98636B6A, 0x98648CC4,
- 0x98658107, 0x986660D1, 0x986767A0, 0x98689DF2, 0x98694E99, 0x986A4E98,
- 0x986B9C10, 0x986C8A6B, 0x986D85C1, 0x986E8568, 0x986F6900, 0x98706E7E,
- 0x98717897, 0x98728155, 0x989F5F0C, 0x98A04E10, 0x98A14E15, 0x98A24E2A,
- 0x98A34E31, 0x98A44E36, 0x98A54E3C, 0x98A64E3F, 0x98A74E42, 0x98A84E56,
- 0x98A94E58, 0x98AA4E82, 0x98AB4E85, 0x98AC8C6B, 0x98AD4E8A, 0x98AE8212,
- 0x98AF5F0D, 0x98B04E8E, 0x98B14E9E, 0x98B24E9F, 0x98B34EA0, 0x98B44EA2,
- 0x98B54EB0, 0x98B64EB3, 0x98B74EB6, 0x98B84ECE, 0x98B94ECD, 0x98BA4EC4,
- 0x98BB4EC6, 0x98BC4EC2, 0x98BD4ED7, 0x98BE4EDE, 0x98BF4EED, 0x98C04EDF,
- 0x98C14EF7, 0x98C24F09, 0x98C34F5A, 0x98C44F30, 0x98C54F5B, 0x98C64F5D,
- 0x98C74F57, 0x98C84F47, 0x98C94F76, 0x98CA4F88, 0x98CB4F8F, 0x98CC4F98,
- 0x98CD4F7B, 0x98CE4F69, 0x98CF4F70, 0x98D04F91, 0x98D14F6F, 0x98D24F86,
- 0x98D34F96, 0x98D45118, 0x98D54FD4, 0x98D64FDF, 0x98D74FCE, 0x98D84FD8,
- 0x98D94FDB, 0x98DA4FD1, 0x98DB4FDA, 0x98DC4FD0, 0x98DD4FE4, 0x98DE4FE5,
- 0x98DF501A, 0x98E05028, 0x98E15014, 0x98E2502A, 0x98E35025, 0x98E45005,
- 0x98E54F1C, 0x98E64FF6, 0x98E75021, 0x98E85029, 0x98E9502C, 0x98EA4FFE,
- 0x98EB4FEF, 0x98EC5011, 0x98ED5006, 0x98EE5043, 0x98EF5047, 0x98F06703,
- 0x98F15055, 0x98F25050, 0x98F35048, 0x98F4505A, 0x98F55056, 0x98F6506C,
- 0x98F75078, 0x98F85080, 0x98F9509A, 0x98FA5085, 0x98FB50B4, 0x98FC50B2,
- 0x994050C9, 0x994150CA, 0x994250B3, 0x994350C2, 0x994450D6, 0x994550DE,
- 0x994650E5, 0x994750ED, 0x994850E3, 0x994950EE, 0x994A50F9, 0x994B50F5,
- 0x994C5109, 0x994D5101, 0x994E5102, 0x994F5116, 0x99505115, 0x99515114,
- 0x9952511A, 0x99535121, 0x9954513A, 0x99555137, 0x9956513C, 0x9957513B,
- 0x9958513F, 0x99595140, 0x995A5152, 0x995B514C, 0x995C5154, 0x995D5162,
- 0x995E7AF8, 0x995F5169, 0x9960516A, 0x9961516E, 0x99625180, 0x99635182,
- 0x996456D8, 0x9965518C, 0x99665189, 0x9967518F, 0x99685191, 0x99695193,
- 0x996A5195, 0x996B5196, 0x996C51A4, 0x996D51A6, 0x996E51A2, 0x996F51A9,
- 0x997051AA, 0x997151AB, 0x997251B3, 0x997351B1, 0x997451B2, 0x997551B0,
- 0x997651B5, 0x997751BD, 0x997851C5, 0x997951C9, 0x997A51DB, 0x997B51E0,
- 0x997C8655, 0x997D51E9, 0x997E51ED, 0x998051F0, 0x998151F5, 0x998251FE,
- 0x99835204, 0x9984520B, 0x99855214, 0x9986520E, 0x99875227, 0x9988522A,
- 0x9989522E, 0x998A5233, 0x998B5239, 0x998C524F, 0x998D5244, 0x998E524B,
- 0x998F524C, 0x9990525E, 0x99915254, 0x9992526A, 0x99935274, 0x99945269,
- 0x99955273, 0x9996527F, 0x9997527D, 0x9998528D, 0x99995294, 0x999A5292,
- 0x999B5271, 0x999C5288, 0x999D5291, 0x999E8FA8, 0x999F8FA7, 0x99A052AC,
- 0x99A152AD, 0x99A252BC, 0x99A352B5, 0x99A452C1, 0x99A552CD, 0x99A652D7,
- 0x99A752DE, 0x99A852E3, 0x99A952E6, 0x99AA98ED, 0x99AB52E0, 0x99AC52F3,
- 0x99AD52F5, 0x99AE52F8, 0x99AF52F9, 0x99B05306, 0x99B15308, 0x99B27538,
- 0x99B3530D, 0x99B45310, 0x99B5530F, 0x99B65315, 0x99B7531A, 0x99B85323,
- 0x99B9532F, 0x99BA5331, 0x99BB5333, 0x99BC5338, 0x99BD5340, 0x99BE5346,
- 0x99BF5345, 0x99C04E17, 0x99C15349, 0x99C2534D, 0x99C351D6, 0x99C4535E,
- 0x99C55369, 0x99C6536E, 0x99C75918, 0x99C8537B, 0x99C95377, 0x99CA5382,
- 0x99CB5396, 0x99CC53A0, 0x99CD53A6, 0x99CE53A5, 0x99CF53AE, 0x99D053B0,
- 0x99D153B6, 0x99D253C3, 0x99D37C12, 0x99D496D9, 0x99D553DF, 0x99D666FC,
- 0x99D771EE, 0x99D853EE, 0x99D953E8, 0x99DA53ED, 0x99DB53FA, 0x99DC5401,
- 0x99DD543D, 0x99DE5440, 0x99DF542C, 0x99E0542D, 0x99E1543C, 0x99E2542E,
- 0x99E35436, 0x99E45429, 0x99E5541D, 0x99E6544E, 0x99E7548F, 0x99E85475,
- 0x99E9548E, 0x99EA545F, 0x99EB5471, 0x99EC5477, 0x99ED5470, 0x99EE5492,
- 0x99EF547B, 0x99F05480, 0x99F15476, 0x99F25484, 0x99F35490, 0x99F45486,
- 0x99F554C7, 0x99F654A2, 0x99F754B8, 0x99F854A5, 0x99F954AC, 0x99FA54C4,
- 0x99FB54C8, 0x99FC54A8, 0x9A4054AB, 0x9A4154C2, 0x9A4254A4, 0x9A4354BE,
- 0x9A4454BC, 0x9A4554D8, 0x9A4654E5, 0x9A4754E6, 0x9A48550F, 0x9A495514,
- 0x9A4A54FD, 0x9A4B54EE, 0x9A4C54ED, 0x9A4D54FA, 0x9A4E54E2, 0x9A4F5539,
- 0x9A505540, 0x9A515563, 0x9A52554C, 0x9A53552E, 0x9A54555C, 0x9A555545,
- 0x9A565556, 0x9A575557, 0x9A585538, 0x9A595533, 0x9A5A555D, 0x9A5B5599,
- 0x9A5C5580, 0x9A5D54AF, 0x9A5E558A, 0x9A5F559F, 0x9A60557B, 0x9A61557E,
- 0x9A625598, 0x9A63559E, 0x9A6455AE, 0x9A65557C, 0x9A665583, 0x9A6755A9,
- 0x9A685587, 0x9A6955A8, 0x9A6A55DA, 0x9A6B55C5, 0x9A6C55DF, 0x9A6D55C4,
- 0x9A6E55DC, 0x9A6F55E4, 0x9A7055D4, 0x9A715614, 0x9A7255F7, 0x9A735616,
- 0x9A7455FE, 0x9A7555FD, 0x9A76561B, 0x9A7755F9, 0x9A78564E, 0x9A795650,
- 0x9A7A71DF, 0x9A7B5634, 0x9A7C5636, 0x9A7D5632, 0x9A7E5638, 0x9A80566B,
- 0x9A815664, 0x9A82562F, 0x9A83566C, 0x9A84566A, 0x9A855686, 0x9A865680,
- 0x9A87568A, 0x9A8856A0, 0x9A895694, 0x9A8A568F, 0x9A8B56A5, 0x9A8C56AE,
- 0x9A8D56B6, 0x9A8E56B4, 0x9A8F56C2, 0x9A9056BC, 0x9A9156C1, 0x9A9256C3,
- 0x9A9356C0, 0x9A9456C8, 0x9A9556CE, 0x9A9656D1, 0x9A9756D3, 0x9A9856D7,
- 0x9A9956EE, 0x9A9A56F9, 0x9A9B5700, 0x9A9C56FF, 0x9A9D5704, 0x9A9E5709,
- 0x9A9F5708, 0x9AA0570B, 0x9AA1570D, 0x9AA25713, 0x9AA35718, 0x9AA45716,
- 0x9AA555C7, 0x9AA6571C, 0x9AA75726, 0x9AA85737, 0x9AA95738, 0x9AAA574E,
- 0x9AAB573B, 0x9AAC5740, 0x9AAD574F, 0x9AAE5769, 0x9AAF57C0, 0x9AB05788,
- 0x9AB15761, 0x9AB2577F, 0x9AB35789, 0x9AB45793, 0x9AB557A0, 0x9AB657B3,
- 0x9AB757A4, 0x9AB857AA, 0x9AB957B0, 0x9ABA57C3, 0x9ABB57C6, 0x9ABC57D4,
- 0x9ABD57D2, 0x9ABE57D3, 0x9ABF580A, 0x9AC057D6, 0x9AC157E3, 0x9AC2580B,
- 0x9AC35819, 0x9AC4581D, 0x9AC55872, 0x9AC65821, 0x9AC75862, 0x9AC8584B,
- 0x9AC95870, 0x9ACA6BC0, 0x9ACB5852, 0x9ACC583D, 0x9ACD5879, 0x9ACE5885,
- 0x9ACF58B9, 0x9AD0589F, 0x9AD158AB, 0x9AD258BA, 0x9AD358DE, 0x9AD458BB,
- 0x9AD558B8, 0x9AD658AE, 0x9AD758C5, 0x9AD858D3, 0x9AD958D1, 0x9ADA58D7,
- 0x9ADB58D9, 0x9ADC58D8, 0x9ADD58E5, 0x9ADE58DC, 0x9ADF58E4, 0x9AE058DF,
- 0x9AE158EF, 0x9AE258FA, 0x9AE358F9, 0x9AE458FB, 0x9AE558FC, 0x9AE658FD,
- 0x9AE75902, 0x9AE8590A, 0x9AE95910, 0x9AEA591B, 0x9AEB68A6, 0x9AEC5925,
- 0x9AED592C, 0x9AEE592D, 0x9AEF5932, 0x9AF05938, 0x9AF1593E, 0x9AF27AD2,
- 0x9AF35955, 0x9AF45950, 0x9AF5594E, 0x9AF6595A, 0x9AF75958, 0x9AF85962,
- 0x9AF95960, 0x9AFA5967, 0x9AFB596C, 0x9AFC5969, 0x9B405978, 0x9B415981,
- 0x9B42599D, 0x9B434F5E, 0x9B444FAB, 0x9B4559A3, 0x9B4659B2, 0x9B4759C6,
- 0x9B4859E8, 0x9B4959DC, 0x9B4A598D, 0x9B4B59D9, 0x9B4C59DA, 0x9B4D5A25,
- 0x9B4E5A1F, 0x9B4F5A11, 0x9B505A1C, 0x9B515A09, 0x9B525A1A, 0x9B535A40,
- 0x9B545A6C, 0x9B555A49, 0x9B565A35, 0x9B575A36, 0x9B585A62, 0x9B595A6A,
- 0x9B5A5A9A, 0x9B5B5ABC, 0x9B5C5ABE, 0x9B5D5ACB, 0x9B5E5AC2, 0x9B5F5ABD,
- 0x9B605AE3, 0x9B615AD7, 0x9B625AE6, 0x9B635AE9, 0x9B645AD6, 0x9B655AFA,
- 0x9B665AFB, 0x9B675B0C, 0x9B685B0B, 0x9B695B16, 0x9B6A5B32, 0x9B6B5AD0,
- 0x9B6C5B2A, 0x9B6D5B36, 0x9B6E5B3E, 0x9B6F5B43, 0x9B705B45, 0x9B715B40,
- 0x9B725B51, 0x9B735B55, 0x9B745B5A, 0x9B755B5B, 0x9B765B65, 0x9B775B69,
- 0x9B785B70, 0x9B795B73, 0x9B7A5B75, 0x9B7B5B78, 0x9B7C6588, 0x9B7D5B7A,
- 0x9B7E5B80, 0x9B805B83, 0x9B815BA6, 0x9B825BB8, 0x9B835BC3, 0x9B845BC7,
- 0x9B855BC9, 0x9B865BD4, 0x9B875BD0, 0x9B885BE4, 0x9B895BE6, 0x9B8A5BE2,
- 0x9B8B5BDE, 0x9B8C5BE5, 0x9B8D5BEB, 0x9B8E5BF0, 0x9B8F5BF6, 0x9B905BF3,
- 0x9B915C05, 0x9B925C07, 0x9B935C08, 0x9B945C0D, 0x9B955C13, 0x9B965C20,
- 0x9B975C22, 0x9B985C28, 0x9B995C38, 0x9B9A5C39, 0x9B9B5C41, 0x9B9C5C46,
- 0x9B9D5C4E, 0x9B9E5C53, 0x9B9F5C50, 0x9BA05C4F, 0x9BA15B71, 0x9BA25C6C,
- 0x9BA35C6E, 0x9BA44E62, 0x9BA55C76, 0x9BA65C79, 0x9BA75C8C, 0x9BA85C91,
- 0x9BA95C94, 0x9BAA599B, 0x9BAB5CAB, 0x9BAC5CBB, 0x9BAD5CB6, 0x9BAE5CBC,
- 0x9BAF5CB7, 0x9BB05CC5, 0x9BB15CBE, 0x9BB25CC7, 0x9BB35CD9, 0x9BB45CE9,
- 0x9BB55CFD, 0x9BB65CFA, 0x9BB75CED, 0x9BB85D8C, 0x9BB95CEA, 0x9BBA5D0B,
- 0x9BBB5D15, 0x9BBC5D17, 0x9BBD5D5C, 0x9BBE5D1F, 0x9BBF5D1B, 0x9BC05D11,
- 0x9BC15D14, 0x9BC25D22, 0x9BC35D1A, 0x9BC45D19, 0x9BC55D18, 0x9BC65D4C,
- 0x9BC75D52, 0x9BC85D4E, 0x9BC95D4B, 0x9BCA5D6C, 0x9BCB5D73, 0x9BCC5D76,
- 0x9BCD5D87, 0x9BCE5D84, 0x9BCF5D82, 0x9BD05DA2, 0x9BD15D9D, 0x9BD25DAC,
- 0x9BD35DAE, 0x9BD45DBD, 0x9BD55D90, 0x9BD65DB7, 0x9BD75DBC, 0x9BD85DC9,
- 0x9BD95DCD, 0x9BDA5DD3, 0x9BDB5DD2, 0x9BDC5DD6, 0x9BDD5DDB, 0x9BDE5DEB,
- 0x9BDF5DF2, 0x9BE05DF5, 0x9BE15E0B, 0x9BE25E1A, 0x9BE35E19, 0x9BE45E11,
- 0x9BE55E1B, 0x9BE65E36, 0x9BE75E37, 0x9BE85E44, 0x9BE95E43, 0x9BEA5E40,
- 0x9BEB5E4E, 0x9BEC5E57, 0x9BED5E54, 0x9BEE5E5F, 0x9BEF5E62, 0x9BF05E64,
- 0x9BF15E47, 0x9BF25E75, 0x9BF35E76, 0x9BF45E7A, 0x9BF59EBC, 0x9BF65E7F,
- 0x9BF75EA0, 0x9BF85EC1, 0x9BF95EC2, 0x9BFA5EC8, 0x9BFB5ED0, 0x9BFC5ECF,
- 0x9C405ED6, 0x9C415EE3, 0x9C425EDD, 0x9C435EDA, 0x9C445EDB, 0x9C455EE2,
- 0x9C465EE1, 0x9C475EE8, 0x9C485EE9, 0x9C495EEC, 0x9C4A5EF1, 0x9C4B5EF3,
- 0x9C4C5EF0, 0x9C4D5EF4, 0x9C4E5EF8, 0x9C4F5EFE, 0x9C505F03, 0x9C515F09,
- 0x9C525F5D, 0x9C535F5C, 0x9C545F0B, 0x9C555F11, 0x9C565F16, 0x9C575F29,
- 0x9C585F2D, 0x9C595F38, 0x9C5A5F41, 0x9C5B5F48, 0x9C5C5F4C, 0x9C5D5F4E,
- 0x9C5E5F2F, 0x9C5F5F51, 0x9C605F56, 0x9C615F57, 0x9C625F59, 0x9C635F61,
- 0x9C645F6D, 0x9C655F73, 0x9C665F77, 0x9C675F83, 0x9C685F82, 0x9C695F7F,
- 0x9C6A5F8A, 0x9C6B5F88, 0x9C6C5F91, 0x9C6D5F87, 0x9C6E5F9E, 0x9C6F5F99,
- 0x9C705F98, 0x9C715FA0, 0x9C725FA8, 0x9C735FAD, 0x9C745FBC, 0x9C755FD6,
- 0x9C765FFB, 0x9C775FE4, 0x9C785FF8, 0x9C795FF1, 0x9C7A5FDD, 0x9C7B60B3,
- 0x9C7C5FFF, 0x9C7D6021, 0x9C7E6060, 0x9C806019, 0x9C816010, 0x9C826029,
- 0x9C83600E, 0x9C846031, 0x9C85601B, 0x9C866015, 0x9C87602B, 0x9C886026,
- 0x9C89600F, 0x9C8A603A, 0x9C8B605A, 0x9C8C6041, 0x9C8D606A, 0x9C8E6077,
- 0x9C8F605F, 0x9C90604A, 0x9C916046, 0x9C92604D, 0x9C936063, 0x9C946043,
- 0x9C956064, 0x9C966042, 0x9C97606C, 0x9C98606B, 0x9C996059, 0x9C9A6081,
- 0x9C9B608D, 0x9C9C60E7, 0x9C9D6083, 0x9C9E609A, 0x9C9F6084, 0x9CA0609B,
- 0x9CA16096, 0x9CA26097, 0x9CA36092, 0x9CA460A7, 0x9CA5608B, 0x9CA660E1,
- 0x9CA760B8, 0x9CA860E0, 0x9CA960D3, 0x9CAA60B4, 0x9CAB5FF0, 0x9CAC60BD,
- 0x9CAD60C6, 0x9CAE60B5, 0x9CAF60D8, 0x9CB0614D, 0x9CB16115, 0x9CB26106,
- 0x9CB360F6, 0x9CB460F7, 0x9CB56100, 0x9CB660F4, 0x9CB760FA, 0x9CB86103,
- 0x9CB96121, 0x9CBA60FB, 0x9CBB60F1, 0x9CBC610D, 0x9CBD610E, 0x9CBE6147,
- 0x9CBF613E, 0x9CC06128, 0x9CC16127, 0x9CC2614A, 0x9CC3613F, 0x9CC4613C,
- 0x9CC5612C, 0x9CC66134, 0x9CC7613D, 0x9CC86142, 0x9CC96144, 0x9CCA6173,
- 0x9CCB6177, 0x9CCC6158, 0x9CCD6159, 0x9CCE615A, 0x9CCF616B, 0x9CD06174,
- 0x9CD1616F, 0x9CD26165, 0x9CD36171, 0x9CD4615F, 0x9CD5615D, 0x9CD66153,
- 0x9CD76175, 0x9CD86199, 0x9CD96196, 0x9CDA6187, 0x9CDB61AC, 0x9CDC6194,
- 0x9CDD619A, 0x9CDE618A, 0x9CDF6191, 0x9CE061AB, 0x9CE161AE, 0x9CE261CC,
- 0x9CE361CA, 0x9CE461C9, 0x9CE561F7, 0x9CE661C8, 0x9CE761C3, 0x9CE861C6,
- 0x9CE961BA, 0x9CEA61CB, 0x9CEB7F79, 0x9CEC61CD, 0x9CED61E6, 0x9CEE61E3,
- 0x9CEF61F6, 0x9CF061FA, 0x9CF161F4, 0x9CF261FF, 0x9CF361FD, 0x9CF461FC,
- 0x9CF561FE, 0x9CF66200, 0x9CF76208, 0x9CF86209, 0x9CF9620D, 0x9CFA620C,
- 0x9CFB6214, 0x9CFC621B, 0x9D40621E, 0x9D416221, 0x9D42622A, 0x9D43622E,
- 0x9D446230, 0x9D456232, 0x9D466233, 0x9D476241, 0x9D48624E, 0x9D49625E,
- 0x9D4A6263, 0x9D4B625B, 0x9D4C6260, 0x9D4D6268, 0x9D4E627C, 0x9D4F6282,
- 0x9D506289, 0x9D51627E, 0x9D526292, 0x9D536293, 0x9D546296, 0x9D5562D4,
- 0x9D566283, 0x9D576294, 0x9D5862D7, 0x9D5962D1, 0x9D5A62BB, 0x9D5B62CF,
- 0x9D5C62FF, 0x9D5D62C6, 0x9D5E64D4, 0x9D5F62C8, 0x9D6062DC, 0x9D6162CC,
- 0x9D6262CA, 0x9D6362C2, 0x9D6462C7, 0x9D65629B, 0x9D6662C9, 0x9D67630C,
- 0x9D6862EE, 0x9D6962F1, 0x9D6A6327, 0x9D6B6302, 0x9D6C6308, 0x9D6D62EF,
- 0x9D6E62F5, 0x9D6F6350, 0x9D70633E, 0x9D71634D, 0x9D72641C, 0x9D73634F,
- 0x9D746396, 0x9D75638E, 0x9D766380, 0x9D7763AB, 0x9D786376, 0x9D7963A3,
- 0x9D7A638F, 0x9D7B6389, 0x9D7C639F, 0x9D7D63B5, 0x9D7E636B, 0x9D806369,
- 0x9D8163BE, 0x9D8263E9, 0x9D8363C0, 0x9D8463C6, 0x9D8563E3, 0x9D8663C9,
- 0x9D8763D2, 0x9D8863F6, 0x9D8963C4, 0x9D8A6416, 0x9D8B6434, 0x9D8C6406,
- 0x9D8D6413, 0x9D8E6426, 0x9D8F6436, 0x9D90651D, 0x9D916417, 0x9D926428,
- 0x9D93640F, 0x9D946467, 0x9D95646F, 0x9D966476, 0x9D97644E, 0x9D98652A,
- 0x9D996495, 0x9D9A6493, 0x9D9B64A5, 0x9D9C64A9, 0x9D9D6488, 0x9D9E64BC,
- 0x9D9F64DA, 0x9DA064D2, 0x9DA164C5, 0x9DA264C7, 0x9DA364BB, 0x9DA464D8,
- 0x9DA564C2, 0x9DA664F1, 0x9DA764E7, 0x9DA88209, 0x9DA964E0, 0x9DAA64E1,
- 0x9DAB62AC, 0x9DAC64E3, 0x9DAD64EF, 0x9DAE652C, 0x9DAF64F6, 0x9DB064F4,
- 0x9DB164F2, 0x9DB264FA, 0x9DB36500, 0x9DB464FD, 0x9DB56518, 0x9DB6651C,
- 0x9DB76505, 0x9DB86524, 0x9DB96523, 0x9DBA652B, 0x9DBB6534, 0x9DBC6535,
- 0x9DBD6537, 0x9DBE6536, 0x9DBF6538, 0x9DC0754B, 0x9DC16548, 0x9DC26556,
- 0x9DC36555, 0x9DC4654D, 0x9DC56558, 0x9DC6655E, 0x9DC7655D, 0x9DC86572,
- 0x9DC96578, 0x9DCA6582, 0x9DCB6583, 0x9DCC8B8A, 0x9DCD659B, 0x9DCE659F,
- 0x9DCF65AB, 0x9DD065B7, 0x9DD165C3, 0x9DD265C6, 0x9DD365C1, 0x9DD465C4,
- 0x9DD565CC, 0x9DD665D2, 0x9DD765DB, 0x9DD865D9, 0x9DD965E0, 0x9DDA65E1,
- 0x9DDB65F1, 0x9DDC6772, 0x9DDD660A, 0x9DDE6603, 0x9DDF65FB, 0x9DE06773,
- 0x9DE16635, 0x9DE26636, 0x9DE36634, 0x9DE4661C, 0x9DE5664F, 0x9DE66644,
- 0x9DE76649, 0x9DE86641, 0x9DE9665E, 0x9DEA665D, 0x9DEB6664, 0x9DEC6667,
- 0x9DED6668, 0x9DEE665F, 0x9DEF6662, 0x9DF06670, 0x9DF16683, 0x9DF26688,
- 0x9DF3668E, 0x9DF46689, 0x9DF56684, 0x9DF66698, 0x9DF7669D, 0x9DF866C1,
- 0x9DF966B9, 0x9DFA66C9, 0x9DFB66BE, 0x9DFC66BC, 0x9E4066C4, 0x9E4166B8,
- 0x9E4266D6, 0x9E4366DA, 0x9E4466E0, 0x9E45663F, 0x9E4666E6, 0x9E4766E9,
- 0x9E4866F0, 0x9E4966F5, 0x9E4A66F7, 0x9E4B670F, 0x9E4C6716, 0x9E4D671E,
- 0x9E4E6726, 0x9E4F6727, 0x9E509738, 0x9E51672E, 0x9E52673F, 0x9E536736,
- 0x9E546741, 0x9E556738, 0x9E566737, 0x9E576746, 0x9E58675E, 0x9E596760,
- 0x9E5A6759, 0x9E5B6763, 0x9E5C6764, 0x9E5D6789, 0x9E5E6770, 0x9E5F67A9,
- 0x9E60677C, 0x9E61676A, 0x9E62678C, 0x9E63678B, 0x9E6467A6, 0x9E6567A1,
- 0x9E666785, 0x9E6767B7, 0x9E6867EF, 0x9E6967B4, 0x9E6A67EC, 0x9E6B67B3,
- 0x9E6C67E9, 0x9E6D67B8, 0x9E6E67E4, 0x9E6F67DE, 0x9E7067DD, 0x9E7167E2,
- 0x9E7267EE, 0x9E7367B9, 0x9E7467CE, 0x9E7567C6, 0x9E7667E7, 0x9E776A9C,
- 0x9E78681E, 0x9E796846, 0x9E7A6829, 0x9E7B6840, 0x9E7C684D, 0x9E7D6832,
- 0x9E7E684E, 0x9E8068B3, 0x9E81682B, 0x9E826859, 0x9E836863, 0x9E846877,
- 0x9E85687F, 0x9E86689F, 0x9E87688F, 0x9E8868AD, 0x9E896894, 0x9E8A689D,
- 0x9E8B689B, 0x9E8C6883, 0x9E8D6AAE, 0x9E8E68B9, 0x9E8F6874, 0x9E9068B5,
- 0x9E9168A0, 0x9E9268BA, 0x9E93690F, 0x9E94688D, 0x9E95687E, 0x9E966901,
- 0x9E9768CA, 0x9E986908, 0x9E9968D8, 0x9E9A6922, 0x9E9B6926, 0x9E9C68E1,
- 0x9E9D690C, 0x9E9E68CD, 0x9E9F68D4, 0x9EA068E7, 0x9EA168D5, 0x9EA26936,
- 0x9EA36912, 0x9EA46904, 0x9EA568D7, 0x9EA668E3, 0x9EA76925, 0x9EA868F9,
- 0x9EA968E0, 0x9EAA68EF, 0x9EAB6928, 0x9EAC692A, 0x9EAD691A, 0x9EAE6923,
- 0x9EAF6921, 0x9EB068C6, 0x9EB16979, 0x9EB26977, 0x9EB3695C, 0x9EB46978,
- 0x9EB5696B, 0x9EB66954, 0x9EB7697E, 0x9EB8696E, 0x9EB96939, 0x9EBA6974,
- 0x9EBB693D, 0x9EBC6959, 0x9EBD6930, 0x9EBE6961, 0x9EBF695E, 0x9EC0695D,
- 0x9EC16981, 0x9EC2696A, 0x9EC369B2, 0x9EC469AE, 0x9EC569D0, 0x9EC669BF,
- 0x9EC769C1, 0x9EC869D3, 0x9EC969BE, 0x9ECA69CE, 0x9ECB5BE8, 0x9ECC69CA,
- 0x9ECD69DD, 0x9ECE69BB, 0x9ECF69C3, 0x9ED069A7, 0x9ED16A2E, 0x9ED26991,
- 0x9ED369A0, 0x9ED4699C, 0x9ED56995, 0x9ED669B4, 0x9ED769DE, 0x9ED869E8,
- 0x9ED96A02, 0x9EDA6A1B, 0x9EDB69FF, 0x9EDC6B0A, 0x9EDD69F9, 0x9EDE69F2,
- 0x9EDF69E7, 0x9EE06A05, 0x9EE169B1, 0x9EE26A1E, 0x9EE369ED, 0x9EE46A14,
- 0x9EE569EB, 0x9EE66A0A, 0x9EE76A12, 0x9EE86AC1, 0x9EE96A23, 0x9EEA6A13,
- 0x9EEB6A44, 0x9EEC6A0C, 0x9EED6A72, 0x9EEE6A36, 0x9EEF6A78, 0x9EF06A47,
- 0x9EF16A62, 0x9EF26A59, 0x9EF36A66, 0x9EF46A48, 0x9EF56A38, 0x9EF66A22,
- 0x9EF76A90, 0x9EF86A8D, 0x9EF96AA0, 0x9EFA6A84, 0x9EFB6AA2, 0x9EFC6AA3,
- 0x9F406A97, 0x9F418617, 0x9F426ABB, 0x9F436AC3, 0x9F446AC2, 0x9F456AB8,
- 0x9F466AB3, 0x9F476AAC, 0x9F486ADE, 0x9F496AD1, 0x9F4A6ADF, 0x9F4B6AAA,
- 0x9F4C6ADA, 0x9F4D6AEA, 0x9F4E6AFB, 0x9F4F6B05, 0x9F508616, 0x9F516AFA,
- 0x9F526B12, 0x9F536B16, 0x9F549B31, 0x9F556B1F, 0x9F566B38, 0x9F576B37,
- 0x9F5876DC, 0x9F596B39, 0x9F5A98EE, 0x9F5B6B47, 0x9F5C6B43, 0x9F5D6B49,
- 0x9F5E6B50, 0x9F5F6B59, 0x9F606B54, 0x9F616B5B, 0x9F626B5F, 0x9F636B61,
- 0x9F646B78, 0x9F656B79, 0x9F666B7F, 0x9F676B80, 0x9F686B84, 0x9F696B83,
- 0x9F6A6B8D, 0x9F6B6B98, 0x9F6C6B95, 0x9F6D6B9E, 0x9F6E6BA4, 0x9F6F6BAA,
- 0x9F706BAB, 0x9F716BAF, 0x9F726BB2, 0x9F736BB1, 0x9F746BB3, 0x9F756BB7,
- 0x9F766BBC, 0x9F776BC6, 0x9F786BCB, 0x9F796BD3, 0x9F7A6BDF, 0x9F7B6BEC,
- 0x9F7C6BEB, 0x9F7D6BF3, 0x9F7E6BEF, 0x9F809EBE, 0x9F816C08, 0x9F826C13,
- 0x9F836C14, 0x9F846C1B, 0x9F856C24, 0x9F866C23, 0x9F876C5E, 0x9F886C55,
- 0x9F896C62, 0x9F8A6C6A, 0x9F8B6C82, 0x9F8C6C8D, 0x9F8D6C9A, 0x9F8E6C81,
- 0x9F8F6C9B, 0x9F906C7E, 0x9F916C68, 0x9F926C73, 0x9F936C92, 0x9F946C90,
- 0x9F956CC4, 0x9F966CF1, 0x9F976CD3, 0x9F986CBD, 0x9F996CD7, 0x9F9A6CC5,
- 0x9F9B6CDD, 0x9F9C6CAE, 0x9F9D6CB1, 0x9F9E6CBE, 0x9F9F6CBA, 0x9FA06CDB,
- 0x9FA16CEF, 0x9FA26CD9, 0x9FA36CEA, 0x9FA46D1F, 0x9FA5884D, 0x9FA66D36,
- 0x9FA76D2B, 0x9FA86D3D, 0x9FA96D38, 0x9FAA6D19, 0x9FAB6D35, 0x9FAC6D33,
- 0x9FAD6D12, 0x9FAE6D0C, 0x9FAF6D63, 0x9FB06D93, 0x9FB16D64, 0x9FB26D5A,
- 0x9FB36D79, 0x9FB46D59, 0x9FB56D8E, 0x9FB66D95, 0x9FB76FE4, 0x9FB86D85,
- 0x9FB96DF9, 0x9FBA6E15, 0x9FBB6E0A, 0x9FBC6DB5, 0x9FBD6DC7, 0x9FBE6DE6,
- 0x9FBF6DB8, 0x9FC06DC6, 0x9FC16DEC, 0x9FC26DDE, 0x9FC36DCC, 0x9FC46DE8,
- 0x9FC56DD2, 0x9FC66DC5, 0x9FC76DFA, 0x9FC86DD9, 0x9FC96DE4, 0x9FCA6DD5,
- 0x9FCB6DEA, 0x9FCC6DEE, 0x9FCD6E2D, 0x9FCE6E6E, 0x9FCF6E2E, 0x9FD06E19,
- 0x9FD16E72, 0x9FD26E5F, 0x9FD36E3E, 0x9FD46E23, 0x9FD56E6B, 0x9FD66E2B,
- 0x9FD76E76, 0x9FD86E4D, 0x9FD96E1F, 0x9FDA6E43, 0x9FDB6E3A, 0x9FDC6E4E,
- 0x9FDD6E24, 0x9FDE6EFF, 0x9FDF6E1D, 0x9FE06E38, 0x9FE16E82, 0x9FE26EAA,
- 0x9FE36E98, 0x9FE46EC9, 0x9FE56EB7, 0x9FE66ED3, 0x9FE76EBD, 0x9FE86EAF,
- 0x9FE96EC4, 0x9FEA6EB2, 0x9FEB6ED4, 0x9FEC6ED5, 0x9FED6E8F, 0x9FEE6EA5,
- 0x9FEF6EC2, 0x9FF06E9F, 0x9FF16F41, 0x9FF26F11, 0x9FF3704C, 0x9FF46EEC,
- 0x9FF56EF8, 0x9FF66EFE, 0x9FF76F3F, 0x9FF86EF2, 0x9FF96F31, 0x9FFA6EEF,
- 0x9FFB6F32, 0x9FFC6ECC, 0x00A1FF61, 0x00A2FF62, 0x00A3FF63, 0x00A4FF64,
- 0x00A5FF65, 0x00A6FF66, 0x00A7FF67, 0x00A8FF68, 0x00A9FF69, 0x00AAFF6A,
- 0x00ABFF6B, 0x00ACFF6C, 0x00ADFF6D, 0x00AEFF6E, 0x00AFFF6F, 0x00B0FF70,
- 0x00B1FF71, 0x00B2FF72, 0x00B3FF73, 0x00B4FF74, 0x00B5FF75, 0x00B6FF76,
- 0x00B7FF77, 0x00B8FF78, 0x00B9FF79, 0x00BAFF7A, 0x00BBFF7B, 0x00BCFF7C,
- 0x00BDFF7D, 0x00BEFF7E, 0x00BFFF7F, 0x00C0FF80, 0x00C1FF81, 0x00C2FF82,
- 0x00C3FF83, 0x00C4FF84, 0x00C5FF85, 0x00C6FF86, 0x00C7FF87, 0x00C8FF88,
- 0x00C9FF89, 0x00CAFF8A, 0x00CBFF8B, 0x00CCFF8C, 0x00CDFF8D, 0x00CEFF8E,
- 0x00CFFF8F, 0x00D0FF90, 0x00D1FF91, 0x00D2FF92, 0x00D3FF93, 0x00D4FF94,
- 0x00D5FF95, 0x00D6FF96, 0x00D7FF97, 0x00D8FF98, 0x00D9FF99, 0x00DAFF9A,
- 0x00DBFF9B, 0x00DCFF9C, 0x00DDFF9D, 0x00DEFF9E, 0x00DFFF9F, 0xE0406F3E,
- 0xE0416F13, 0xE0426EF7, 0xE0436F86, 0xE0446F7A, 0xE0456F78, 0xE0466F81,
- 0xE0476F80, 0xE0486F6F, 0xE0496F5B, 0xE04A6FF3, 0xE04B6F6D, 0xE04C6F82,
- 0xE04D6F7C, 0xE04E6F58, 0xE04F6F8E, 0xE0506F91, 0xE0516FC2, 0xE0526F66,
- 0xE0536FB3, 0xE0546FA3, 0xE0556FA1, 0xE0566FA4, 0xE0576FB9, 0xE0586FC6,
- 0xE0596FAA, 0xE05A6FDF, 0xE05B6FD5, 0xE05C6FEC, 0xE05D6FD4, 0xE05E6FD8,
- 0xE05F6FF1, 0xE0606FEE, 0xE0616FDB, 0xE0627009, 0xE063700B, 0xE0646FFA,
- 0xE0657011, 0xE0667001, 0xE067700F, 0xE0686FFE, 0xE069701B, 0xE06A701A,
- 0xE06B6F74, 0xE06C701D, 0xE06D7018, 0xE06E701F, 0xE06F7030, 0xE070703E,
- 0xE0717032, 0xE0727051, 0xE0737063, 0xE0747099, 0xE0757092, 0xE07670AF,
- 0xE07770F1, 0xE07870AC, 0xE07970B8, 0xE07A70B3, 0xE07B70AE, 0xE07C70DF,
- 0xE07D70CB, 0xE07E70DD, 0xE08070D9, 0xE0817109, 0xE08270FD, 0xE083711C,
- 0xE0847119, 0xE0857165, 0xE0867155, 0xE0877188, 0xE0887166, 0xE0897162,
- 0xE08A714C, 0xE08B7156, 0xE08C716C, 0xE08D718F, 0xE08E71FB, 0xE08F7184,
- 0xE0907195, 0xE09171A8, 0xE09271AC, 0xE09371D7, 0xE09471B9, 0xE09571BE,
- 0xE09671D2, 0xE09771C9, 0xE09871D4, 0xE09971CE, 0xE09A71E0, 0xE09B71EC,
- 0xE09C71E7, 0xE09D71F5, 0xE09E71FC, 0xE09F71F9, 0xE0A071FF, 0xE0A1720D,
- 0xE0A27210, 0xE0A3721B, 0xE0A47228, 0xE0A5722D, 0xE0A6722C, 0xE0A77230,
- 0xE0A87232, 0xE0A9723B, 0xE0AA723C, 0xE0AB723F, 0xE0AC7240, 0xE0AD7246,
- 0xE0AE724B, 0xE0AF7258, 0xE0B07274, 0xE0B1727E, 0xE0B27282, 0xE0B37281,
- 0xE0B47287, 0xE0B57292, 0xE0B67296, 0xE0B772A2, 0xE0B872A7, 0xE0B972B9,
- 0xE0BA72B2, 0xE0BB72C3, 0xE0BC72C6, 0xE0BD72C4, 0xE0BE72CE, 0xE0BF72D2,
- 0xE0C072E2, 0xE0C172E0, 0xE0C272E1, 0xE0C372F9, 0xE0C472F7, 0xE0C5500F,
- 0xE0C67317, 0xE0C7730A, 0xE0C8731C, 0xE0C97316, 0xE0CA731D, 0xE0CB7334,
- 0xE0CC732F, 0xE0CD7329, 0xE0CE7325, 0xE0CF733E, 0xE0D0734E, 0xE0D1734F,
- 0xE0D29ED8, 0xE0D37357, 0xE0D4736A, 0xE0D57368, 0xE0D67370, 0xE0D77378,
- 0xE0D87375, 0xE0D9737B, 0xE0DA737A, 0xE0DB73C8, 0xE0DC73B3, 0xE0DD73CE,
- 0xE0DE73BB, 0xE0DF73C0, 0xE0E073E5, 0xE0E173EE, 0xE0E273DE, 0xE0E374A2,
- 0xE0E47405, 0xE0E5746F, 0xE0E67425, 0xE0E773F8, 0xE0E87432, 0xE0E9743A,
- 0xE0EA7455, 0xE0EB743F, 0xE0EC745F, 0xE0ED7459, 0xE0EE7441, 0xE0EF745C,
- 0xE0F07469, 0xE0F17470, 0xE0F27463, 0xE0F3746A, 0xE0F47476, 0xE0F5747E,
- 0xE0F6748B, 0xE0F7749E, 0xE0F874A7, 0xE0F974CA, 0xE0FA74CF, 0xE0FB74D4,
- 0xE0FC73F1, 0xE14074E0, 0xE14174E3, 0xE14274E7, 0xE14374E9, 0xE14474EE,
- 0xE14574F2, 0xE14674F0, 0xE14774F1, 0xE14874F8, 0xE14974F7, 0xE14A7504,
- 0xE14B7503, 0xE14C7505, 0xE14D750C, 0xE14E750E, 0xE14F750D, 0xE1507515,
- 0xE1517513, 0xE152751E, 0xE1537526, 0xE154752C, 0xE155753C, 0xE1567544,
- 0xE157754D, 0xE158754A, 0xE1597549, 0xE15A755B, 0xE15B7546, 0xE15C755A,
- 0xE15D7569, 0xE15E7564, 0xE15F7567, 0xE160756B, 0xE161756D, 0xE1627578,
- 0xE1637576, 0xE1647586, 0xE1657587, 0xE1667574, 0xE167758A, 0xE1687589,
- 0xE1697582, 0xE16A7594, 0xE16B759A, 0xE16C759D, 0xE16D75A5, 0xE16E75A3,
- 0xE16F75C2, 0xE17075B3, 0xE17175C3, 0xE17275B5, 0xE17375BD, 0xE17475B8,
- 0xE17575BC, 0xE17675B1, 0xE17775CD, 0xE17875CA, 0xE17975D2, 0xE17A75D9,
- 0xE17B75E3, 0xE17C75DE, 0xE17D75FE, 0xE17E75FF, 0xE18075FC, 0xE1817601,
- 0xE18275F0, 0xE18375FA, 0xE18475F2, 0xE18575F3, 0xE186760B, 0xE187760D,
- 0xE1887609, 0xE189761F, 0xE18A7627, 0xE18B7620, 0xE18C7621, 0xE18D7622,
- 0xE18E7624, 0xE18F7634, 0xE1907630, 0xE191763B, 0xE1927647, 0xE1937648,
- 0xE1947646, 0xE195765C, 0xE1967658, 0xE1977661, 0xE1987662, 0xE1997668,
- 0xE19A7669, 0xE19B766A, 0xE19C7667, 0xE19D766C, 0xE19E7670, 0xE19F7672,
- 0xE1A07676, 0xE1A17678, 0xE1A2767C, 0xE1A37680, 0xE1A47683, 0xE1A57688,
- 0xE1A6768B, 0xE1A7768E, 0xE1A87696, 0xE1A97693, 0xE1AA7699, 0xE1AB769A,
- 0xE1AC76B0, 0xE1AD76B4, 0xE1AE76B8, 0xE1AF76B9, 0xE1B076BA, 0xE1B176C2,
- 0xE1B276CD, 0xE1B376D6, 0xE1B476D2, 0xE1B576DE, 0xE1B676E1, 0xE1B776E5,
- 0xE1B876E7, 0xE1B976EA, 0xE1BA862F, 0xE1BB76FB, 0xE1BC7708, 0xE1BD7707,
- 0xE1BE7704, 0xE1BF7729, 0xE1C07724, 0xE1C1771E, 0xE1C27725, 0xE1C37726,
- 0xE1C4771B, 0xE1C57737, 0xE1C67738, 0xE1C77747, 0xE1C8775A, 0xE1C97768,
- 0xE1CA776B, 0xE1CB775B, 0xE1CC7765, 0xE1CD777F, 0xE1CE777E, 0xE1CF7779,
- 0xE1D0778E, 0xE1D1778B, 0xE1D27791, 0xE1D377A0, 0xE1D4779E, 0xE1D577B0,
- 0xE1D677B6, 0xE1D777B9, 0xE1D877BF, 0xE1D977BC, 0xE1DA77BD, 0xE1DB77BB,
- 0xE1DC77C7, 0xE1DD77CD, 0xE1DE77D7, 0xE1DF77DA, 0xE1E077DC, 0xE1E177E3,
- 0xE1E277EE, 0xE1E377FC, 0xE1E4780C, 0xE1E57812, 0xE1E67926, 0xE1E77820,
- 0xE1E8792A, 0xE1E97845, 0xE1EA788E, 0xE1EB7874, 0xE1EC7886, 0xE1ED787C,
- 0xE1EE789A, 0xE1EF788C, 0xE1F078A3, 0xE1F178B5, 0xE1F278AA, 0xE1F378AF,
- 0xE1F478D1, 0xE1F578C6, 0xE1F678CB, 0xE1F778D4, 0xE1F878BE, 0xE1F978BC,
- 0xE1FA78C5, 0xE1FB78CA, 0xE1FC78EC, 0xE24078E7, 0xE24178DA, 0xE24278FD,
- 0xE24378F4, 0xE2447907, 0xE2457912, 0xE2467911, 0xE2477919, 0xE248792C,
- 0xE249792B, 0xE24A7940, 0xE24B7960, 0xE24C7957, 0xE24D795F, 0xE24E795A,
- 0xE24F7955, 0xE2507953, 0xE251797A, 0xE252797F, 0xE253798A, 0xE254799D,
- 0xE25579A7, 0xE2569F4B, 0xE25779AA, 0xE25879AE, 0xE25979B3, 0xE25A79B9,
- 0xE25B79BA, 0xE25C79C9, 0xE25D79D5, 0xE25E79E7, 0xE25F79EC, 0xE26079E1,
- 0xE26179E3, 0xE2627A08, 0xE2637A0D, 0xE2647A18, 0xE2657A19, 0xE2667A20,
- 0xE2677A1F, 0xE2687980, 0xE2697A31, 0xE26A7A3B, 0xE26B7A3E, 0xE26C7A37,
- 0xE26D7A43, 0xE26E7A57, 0xE26F7A49, 0xE2707A61, 0xE2717A62, 0xE2727A69,
- 0xE2739F9D, 0xE2747A70, 0xE2757A79, 0xE2767A7D, 0xE2777A88, 0xE2787A97,
- 0xE2797A95, 0xE27A7A98, 0xE27B7A96, 0xE27C7AA9, 0xE27D7AC8, 0xE27E7AB0,
- 0xE2807AB6, 0xE2817AC5, 0xE2827AC4, 0xE2837ABF, 0xE2849083, 0xE2857AC7,
- 0xE2867ACA, 0xE2877ACD, 0xE2887ACF, 0xE2897AD5, 0xE28A7AD3, 0xE28B7AD9,
- 0xE28C7ADA, 0xE28D7ADD, 0xE28E7AE1, 0xE28F7AE2, 0xE2907AE6, 0xE2917AED,
- 0xE2927AF0, 0xE2937B02, 0xE2947B0F, 0xE2957B0A, 0xE2967B06, 0xE2977B33,
- 0xE2987B18, 0xE2997B19, 0xE29A7B1E, 0xE29B7B35, 0xE29C7B28, 0xE29D7B36,
- 0xE29E7B50, 0xE29F7B7A, 0xE2A07B04, 0xE2A17B4D, 0xE2A27B0B, 0xE2A37B4C,
- 0xE2A47B45, 0xE2A57B75, 0xE2A67B65, 0xE2A77B74, 0xE2A87B67, 0xE2A97B70,
- 0xE2AA7B71, 0xE2AB7B6C, 0xE2AC7B6E, 0xE2AD7B9D, 0xE2AE7B98, 0xE2AF7B9F,
- 0xE2B07B8D, 0xE2B17B9C, 0xE2B27B9A, 0xE2B37B8B, 0xE2B47B92, 0xE2B57B8F,
- 0xE2B67B5D, 0xE2B77B99, 0xE2B87BCB, 0xE2B97BC1, 0xE2BA7BCC, 0xE2BB7BCF,
- 0xE2BC7BB4, 0xE2BD7BC6, 0xE2BE7BDD, 0xE2BF7BE9, 0xE2C07C11, 0xE2C17C14,
- 0xE2C27BE6, 0xE2C37BE5, 0xE2C47C60, 0xE2C57C00, 0xE2C67C07, 0xE2C77C13,
- 0xE2C87BF3, 0xE2C97BF7, 0xE2CA7C17, 0xE2CB7C0D, 0xE2CC7BF6, 0xE2CD7C23,
- 0xE2CE7C27, 0xE2CF7C2A, 0xE2D07C1F, 0xE2D17C37, 0xE2D27C2B, 0xE2D37C3D,
- 0xE2D47C4C, 0xE2D57C43, 0xE2D67C54, 0xE2D77C4F, 0xE2D87C40, 0xE2D97C50,
- 0xE2DA7C58, 0xE2DB7C5F, 0xE2DC7C64, 0xE2DD7C56, 0xE2DE7C65, 0xE2DF7C6C,
- 0xE2E07C75, 0xE2E17C83, 0xE2E27C90, 0xE2E37CA4, 0xE2E47CAD, 0xE2E57CA2,
- 0xE2E67CAB, 0xE2E77CA1, 0xE2E87CA8, 0xE2E97CB3, 0xE2EA7CB2, 0xE2EB7CB1,
- 0xE2EC7CAE, 0xE2ED7CB9, 0xE2EE7CBD, 0xE2EF7CC0, 0xE2F07CC5, 0xE2F17CC2,
- 0xE2F27CD8, 0xE2F37CD2, 0xE2F47CDC, 0xE2F57CE2, 0xE2F69B3B, 0xE2F77CEF,
- 0xE2F87CF2, 0xE2F97CF4, 0xE2FA7CF6, 0xE2FB7CFA, 0xE2FC7D06, 0xE3407D02,
- 0xE3417D1C, 0xE3427D15, 0xE3437D0A, 0xE3447D45, 0xE3457D4B, 0xE3467D2E,
- 0xE3477D32, 0xE3487D3F, 0xE3497D35, 0xE34A7D46, 0xE34B7D73, 0xE34C7D56,
- 0xE34D7D4E, 0xE34E7D72, 0xE34F7D68, 0xE3507D6E, 0xE3517D4F, 0xE3527D63,
- 0xE3537D93, 0xE3547D89, 0xE3557D5B, 0xE3567D8F, 0xE3577D7D, 0xE3587D9B,
- 0xE3597DBA, 0xE35A7DAE, 0xE35B7DA3, 0xE35C7DB5, 0xE35D7DC7, 0xE35E7DBD,
- 0xE35F7DAB, 0xE3607E3D, 0xE3617DA2, 0xE3627DAF, 0xE3637DDC, 0xE3647DB8,
- 0xE3657D9F, 0xE3667DB0, 0xE3677DD8, 0xE3687DDD, 0xE3697DE4, 0xE36A7DDE,
- 0xE36B7DFB, 0xE36C7DF2, 0xE36D7DE1, 0xE36E7E05, 0xE36F7E0A, 0xE3707E23,
- 0xE3717E21, 0xE3727E12, 0xE3737E31, 0xE3747E1F, 0xE3757E09, 0xE3767E0B,
- 0xE3777E22, 0xE3787E46, 0xE3797E66, 0xE37A7E3B, 0xE37B7E35, 0xE37C7E39,
- 0xE37D7E43, 0xE37E7E37, 0xE3807E32, 0xE3817E3A, 0xE3827E67, 0xE3837E5D,
- 0xE3847E56, 0xE3857E5E, 0xE3867E59, 0xE3877E5A, 0xE3887E79, 0xE3897E6A,
- 0xE38A7E69, 0xE38B7E7C, 0xE38C7E7B, 0xE38D7E83, 0xE38E7DD5, 0xE38F7E7D,
- 0xE3908FAE, 0xE3917E7F, 0xE3927E88, 0xE3937E89, 0xE3947E8C, 0xE3957E92,
- 0xE3967E90, 0xE3977E93, 0xE3987E94, 0xE3997E96, 0xE39A7E8E, 0xE39B7E9B,
- 0xE39C7E9C, 0xE39D7F38, 0xE39E7F3A, 0xE39F7F45, 0xE3A07F4C, 0xE3A17F4D,
- 0xE3A27F4E, 0xE3A37F50, 0xE3A47F51, 0xE3A57F55, 0xE3A67F54, 0xE3A77F58,
- 0xE3A87F5F, 0xE3A97F60, 0xE3AA7F68, 0xE3AB7F69, 0xE3AC7F67, 0xE3AD7F78,
- 0xE3AE7F82, 0xE3AF7F86, 0xE3B07F83, 0xE3B17F88, 0xE3B27F87, 0xE3B37F8C,
- 0xE3B47F94, 0xE3B57F9E, 0xE3B67F9D, 0xE3B77F9A, 0xE3B87FA3, 0xE3B97FAF,
- 0xE3BA7FB2, 0xE3BB7FB9, 0xE3BC7FAE, 0xE3BD7FB6, 0xE3BE7FB8, 0xE3BF8B71,
- 0xE3C07FC5, 0xE3C17FC6, 0xE3C27FCA, 0xE3C37FD5, 0xE3C47FD4, 0xE3C57FE1,
- 0xE3C67FE6, 0xE3C77FE9, 0xE3C87FF3, 0xE3C97FF9, 0xE3CA98DC, 0xE3CB8006,
- 0xE3CC8004, 0xE3CD800B, 0xE3CE8012, 0xE3CF8018, 0xE3D08019, 0xE3D1801C,
- 0xE3D28021, 0xE3D38028, 0xE3D4803F, 0xE3D5803B, 0xE3D6804A, 0xE3D78046,
- 0xE3D88052, 0xE3D98058, 0xE3DA805A, 0xE3DB805F, 0xE3DC8062, 0xE3DD8068,
- 0xE3DE8073, 0xE3DF8072, 0xE3E08070, 0xE3E18076, 0xE3E28079, 0xE3E3807D,
- 0xE3E4807F, 0xE3E58084, 0xE3E68086, 0xE3E78085, 0xE3E8809B, 0xE3E98093,
- 0xE3EA809A, 0xE3EB80AD, 0xE3EC5190, 0xE3ED80AC, 0xE3EE80DB, 0xE3EF80E5,
- 0xE3F080D9, 0xE3F180DD, 0xE3F280C4, 0xE3F380DA, 0xE3F480D6, 0xE3F58109,
- 0xE3F680EF, 0xE3F780F1, 0xE3F8811B, 0xE3F98129, 0xE3FA8123, 0xE3FB812F,
- 0xE3FC814B, 0xE440968B, 0xE4418146, 0xE442813E, 0xE4438153, 0xE4448151,
- 0xE44580FC, 0xE4468171, 0xE447816E, 0xE4488165, 0xE4498166, 0xE44A8174,
- 0xE44B8183, 0xE44C8188, 0xE44D818A, 0xE44E8180, 0xE44F8182, 0xE45081A0,
- 0xE4518195, 0xE45281A4, 0xE45381A3, 0xE454815F, 0xE4558193, 0xE45681A9,
- 0xE45781B0, 0xE45881B5, 0xE45981BE, 0xE45A81B8, 0xE45B81BD, 0xE45C81C0,
- 0xE45D81C2, 0xE45E81BA, 0xE45F81C9, 0xE46081CD, 0xE46181D1, 0xE46281D9,
- 0xE46381D8, 0xE46481C8, 0xE46581DA, 0xE46681DF, 0xE46781E0, 0xE46881E7,
- 0xE46981FA, 0xE46A81FB, 0xE46B81FE, 0xE46C8201, 0xE46D8202, 0xE46E8205,
- 0xE46F8207, 0xE470820A, 0xE471820D, 0xE4728210, 0xE4738216, 0xE4748229,
- 0xE475822B, 0xE4768238, 0xE4778233, 0xE4788240, 0xE4798259, 0xE47A8258,
- 0xE47B825D, 0xE47C825A, 0xE47D825F, 0xE47E8264, 0xE4808262, 0xE4818268,
- 0xE482826A, 0xE483826B, 0xE484822E, 0xE4858271, 0xE4868277, 0xE4878278,
- 0xE488827E, 0xE489828D, 0xE48A8292, 0xE48B82AB, 0xE48C829F, 0xE48D82BB,
- 0xE48E82AC, 0xE48F82E1, 0xE49082E3, 0xE49182DF, 0xE49282D2, 0xE49382F4,
- 0xE49482F3, 0xE49582FA, 0xE4968393, 0xE4978303, 0xE49882FB, 0xE49982F9,
- 0xE49A82DE, 0xE49B8306, 0xE49C82DC, 0xE49D8309, 0xE49E82D9, 0xE49F8335,
- 0xE4A08334, 0xE4A18316, 0xE4A28332, 0xE4A38331, 0xE4A48340, 0xE4A58339,
- 0xE4A68350, 0xE4A78345, 0xE4A8832F, 0xE4A9832B, 0xE4AA8317, 0xE4AB8318,
- 0xE4AC8385, 0xE4AD839A, 0xE4AE83AA, 0xE4AF839F, 0xE4B083A2, 0xE4B18396,
- 0xE4B28323, 0xE4B3838E, 0xE4B48387, 0xE4B5838A, 0xE4B6837C, 0xE4B783B5,
- 0xE4B88373, 0xE4B98375, 0xE4BA83A0, 0xE4BB8389, 0xE4BC83A8, 0xE4BD83F4,
- 0xE4BE8413, 0xE4BF83EB, 0xE4C083CE, 0xE4C183FD, 0xE4C28403, 0xE4C383D8,
- 0xE4C4840B, 0xE4C583C1, 0xE4C683F7, 0xE4C78407, 0xE4C883E0, 0xE4C983F2,
- 0xE4CA840D, 0xE4CB8422, 0xE4CC8420, 0xE4CD83BD, 0xE4CE8438, 0xE4CF8506,
- 0xE4D083FB, 0xE4D1846D, 0xE4D2842A, 0xE4D3843C, 0xE4D4855A, 0xE4D58484,
- 0xE4D68477, 0xE4D7846B, 0xE4D884AD, 0xE4D9846E, 0xE4DA8482, 0xE4DB8469,
- 0xE4DC8446, 0xE4DD842C, 0xE4DE846F, 0xE4DF8479, 0xE4E08435, 0xE4E184CA,
- 0xE4E28462, 0xE4E384B9, 0xE4E484BF, 0xE4E5849F, 0xE4E684D9, 0xE4E784CD,
- 0xE4E884BB, 0xE4E984DA, 0xE4EA84D0, 0xE4EB84C1, 0xE4EC84C6, 0xE4ED84D6,
- 0xE4EE84A1, 0xE4EF8521, 0xE4F084FF, 0xE4F184F4, 0xE4F28517, 0xE4F38518,
- 0xE4F4852C, 0xE4F5851F, 0xE4F68515, 0xE4F78514, 0xE4F884FC, 0xE4F98540,
- 0xE4FA8563, 0xE4FB8558, 0xE4FC8548, 0xE5408541, 0xE5418602, 0xE542854B,
- 0xE5438555, 0xE5448580, 0xE54585A4, 0xE5468588, 0xE5478591, 0xE548858A,
- 0xE54985A8, 0xE54A856D, 0xE54B8594, 0xE54C859B, 0xE54D85EA, 0xE54E8587,
- 0xE54F859C, 0xE5508577, 0xE551857E, 0xE5528590, 0xE55385C9, 0xE55485BA,
- 0xE55585CF, 0xE55685B9, 0xE55785D0, 0xE55885D5, 0xE55985DD, 0xE55A85E5,
- 0xE55B85DC, 0xE55C85F9, 0xE55D860A, 0xE55E8613, 0xE55F860B, 0xE56085FE,
- 0xE56185FA, 0xE5628606, 0xE5638622, 0xE564861A, 0xE5658630, 0xE566863F,
- 0xE567864D, 0xE5684E55, 0xE5698654, 0xE56A865F, 0xE56B8667, 0xE56C8671,
- 0xE56D8693, 0xE56E86A3, 0xE56F86A9, 0xE57086AA, 0xE571868B, 0xE572868C,
- 0xE57386B6, 0xE57486AF, 0xE57586C4, 0xE57686C6, 0xE57786B0, 0xE57886C9,
- 0xE5798823, 0xE57A86AB, 0xE57B86D4, 0xE57C86DE, 0xE57D86E9, 0xE57E86EC,
- 0xE58086DF, 0xE58186DB, 0xE58286EF, 0xE5838712, 0xE5848706, 0xE5858708,
- 0xE5868700, 0xE5878703, 0xE58886FB, 0xE5898711, 0xE58A8709, 0xE58B870D,
- 0xE58C86F9, 0xE58D870A, 0xE58E8734, 0xE58F873F, 0xE5908737, 0xE591873B,
- 0xE5928725, 0xE5938729, 0xE594871A, 0xE5958760, 0xE596875F, 0xE5978778,
- 0xE598874C, 0xE599874E, 0xE59A8774, 0xE59B8757, 0xE59C8768, 0xE59D876E,
- 0xE59E8759, 0xE59F8753, 0xE5A08763, 0xE5A1876A, 0xE5A28805, 0xE5A387A2,
- 0xE5A4879F, 0xE5A58782, 0xE5A687AF, 0xE5A787CB, 0xE5A887BD, 0xE5A987C0,
- 0xE5AA87D0, 0xE5AB96D6, 0xE5AC87AB, 0xE5AD87C4, 0xE5AE87B3, 0xE5AF87C7,
- 0xE5B087C6, 0xE5B187BB, 0xE5B287EF, 0xE5B387F2, 0xE5B487E0, 0xE5B5880F,
- 0xE5B6880D, 0xE5B787FE, 0xE5B887F6, 0xE5B987F7, 0xE5BA880E, 0xE5BB87D2,
- 0xE5BC8811, 0xE5BD8816, 0xE5BE8815, 0xE5BF8822, 0xE5C08821, 0xE5C18831,
- 0xE5C28836, 0xE5C38839, 0xE5C48827, 0xE5C5883B, 0xE5C68844, 0xE5C78842,
- 0xE5C88852, 0xE5C98859, 0xE5CA885E, 0xE5CB8862, 0xE5CC886B, 0xE5CD8881,
- 0xE5CE887E, 0xE5CF889E, 0xE5D08875, 0xE5D1887D, 0xE5D288B5, 0xE5D38872,
- 0xE5D48882, 0xE5D58897, 0xE5D68892, 0xE5D788AE, 0xE5D88899, 0xE5D988A2,
- 0xE5DA888D, 0xE5DB88A4, 0xE5DC88B0, 0xE5DD88BF, 0xE5DE88B1, 0xE5DF88C3,
- 0xE5E088C4, 0xE5E188D4, 0xE5E288D8, 0xE5E388D9, 0xE5E488DD, 0xE5E588F9,
- 0xE5E68902, 0xE5E788FC, 0xE5E888F4, 0xE5E988E8, 0xE5EA88F2, 0xE5EB8904,
- 0xE5EC890C, 0xE5ED890A, 0xE5EE8913, 0xE5EF8943, 0xE5F0891E, 0xE5F18925,
- 0xE5F2892A, 0xE5F3892B, 0xE5F48941, 0xE5F58944, 0xE5F6893B, 0xE5F78936,
- 0xE5F88938, 0xE5F9894C, 0xE5FA891D, 0xE5FB8960, 0xE5FC895E, 0xE6408966,
- 0xE6418964, 0xE642896D, 0xE643896A, 0xE644896F, 0xE6458974, 0xE6468977,
- 0xE647897E, 0xE6488983, 0xE6498988, 0xE64A898A, 0xE64B8993, 0xE64C8998,
- 0xE64D89A1, 0xE64E89A9, 0xE64F89A6, 0xE65089AC, 0xE65189AF, 0xE65289B2,
- 0xE65389BA, 0xE65489BD, 0xE65589BF, 0xE65689C0, 0xE65789DA, 0xE65889DC,
- 0xE65989DD, 0xE65A89E7, 0xE65B89F4, 0xE65C89F8, 0xE65D8A03, 0xE65E8A16,
- 0xE65F8A10, 0xE6608A0C, 0xE6618A1B, 0xE6628A1D, 0xE6638A25, 0xE6648A36,
- 0xE6658A41, 0xE6668A5B, 0xE6678A52, 0xE6688A46, 0xE6698A48, 0xE66A8A7C,
- 0xE66B8A6D, 0xE66C8A6C, 0xE66D8A62, 0xE66E8A85, 0xE66F8A82, 0xE6708A84,
- 0xE6718AA8, 0xE6728AA1, 0xE6738A91, 0xE6748AA5, 0xE6758AA6, 0xE6768A9A,
- 0xE6778AA3, 0xE6788AC4, 0xE6798ACD, 0xE67A8AC2, 0xE67B8ADA, 0xE67C8AEB,
- 0xE67D8AF3, 0xE67E8AE7, 0xE6808AE4, 0xE6818AF1, 0xE6828B14, 0xE6838AE0,
- 0xE6848AE2, 0xE6858AF7, 0xE6868ADE, 0xE6878ADB, 0xE6888B0C, 0xE6898B07,
- 0xE68A8B1A, 0xE68B8AE1, 0xE68C8B16, 0xE68D8B10, 0xE68E8B17, 0xE68F8B20,
- 0xE6908B33, 0xE69197AB, 0xE6928B26, 0xE6938B2B, 0xE6948B3E, 0xE6958B28,
- 0xE6968B41, 0xE6978B4C, 0xE6988B4F, 0xE6998B4E, 0xE69A8B49, 0xE69B8B56,
- 0xE69C8B5B, 0xE69D8B5A, 0xE69E8B6B, 0xE69F8B5F, 0xE6A08B6C, 0xE6A18B6F,
- 0xE6A28B74, 0xE6A38B7D, 0xE6A48B80, 0xE6A58B8C, 0xE6A68B8E, 0xE6A78B92,
- 0xE6A88B93, 0xE6A98B96, 0xE6AA8B99, 0xE6AB8B9A, 0xE6AC8C3A, 0xE6AD8C41,
- 0xE6AE8C3F, 0xE6AF8C48, 0xE6B08C4C, 0xE6B18C4E, 0xE6B28C50, 0xE6B38C55,
- 0xE6B48C62, 0xE6B58C6C, 0xE6B68C78, 0xE6B78C7A, 0xE6B88C82, 0xE6B98C89,
- 0xE6BA8C85, 0xE6BB8C8A, 0xE6BC8C8D, 0xE6BD8C8E, 0xE6BE8C94, 0xE6BF8C7C,
- 0xE6C08C98, 0xE6C1621D, 0xE6C28CAD, 0xE6C38CAA, 0xE6C48CBD, 0xE6C58CB2,
- 0xE6C68CB3, 0xE6C78CAE, 0xE6C88CB6, 0xE6C98CC8, 0xE6CA8CC1, 0xE6CB8CE4,
- 0xE6CC8CE3, 0xE6CD8CDA, 0xE6CE8CFD, 0xE6CF8CFA, 0xE6D08CFB, 0xE6D18D04,
- 0xE6D28D05, 0xE6D38D0A, 0xE6D48D07, 0xE6D58D0F, 0xE6D68D0D, 0xE6D78D10,
- 0xE6D89F4E, 0xE6D98D13, 0xE6DA8CCD, 0xE6DB8D14, 0xE6DC8D16, 0xE6DD8D67,
- 0xE6DE8D6D, 0xE6DF8D71, 0xE6E08D73, 0xE6E18D81, 0xE6E28D99, 0xE6E38DC2,
- 0xE6E48DBE, 0xE6E58DBA, 0xE6E68DCF, 0xE6E78DDA, 0xE6E88DD6, 0xE6E98DCC,
- 0xE6EA8DDB, 0xE6EB8DCB, 0xE6EC8DEA, 0xE6ED8DEB, 0xE6EE8DDF, 0xE6EF8DE3,
- 0xE6F08DFC, 0xE6F18E08, 0xE6F28E09, 0xE6F38DFF, 0xE6F48E1D, 0xE6F58E1E,
- 0xE6F68E10, 0xE6F78E1F, 0xE6F88E42, 0xE6F98E35, 0xE6FA8E30, 0xE6FB8E34,
- 0xE6FC8E4A, 0xE7408E47, 0xE7418E49, 0xE7428E4C, 0xE7438E50, 0xE7448E48,
- 0xE7458E59, 0xE7468E64, 0xE7478E60, 0xE7488E2A, 0xE7498E63, 0xE74A8E55,
- 0xE74B8E76, 0xE74C8E72, 0xE74D8E7C, 0xE74E8E81, 0xE74F8E87, 0xE7508E85,
- 0xE7518E84, 0xE7528E8B, 0xE7538E8A, 0xE7548E93, 0xE7558E91, 0xE7568E94,
- 0xE7578E99, 0xE7588EAA, 0xE7598EA1, 0xE75A8EAC, 0xE75B8EB0, 0xE75C8EC6,
- 0xE75D8EB1, 0xE75E8EBE, 0xE75F8EC5, 0xE7608EC8, 0xE7618ECB, 0xE7628EDB,
- 0xE7638EE3, 0xE7648EFC, 0xE7658EFB, 0xE7668EEB, 0xE7678EFE, 0xE7688F0A,
- 0xE7698F05, 0xE76A8F15, 0xE76B8F12, 0xE76C8F19, 0xE76D8F13, 0xE76E8F1C,
- 0xE76F8F1F, 0xE7708F1B, 0xE7718F0C, 0xE7728F26, 0xE7738F33, 0xE7748F3B,
- 0xE7758F39, 0xE7768F45, 0xE7778F42, 0xE7788F3E, 0xE7798F4C, 0xE77A8F49,
- 0xE77B8F46, 0xE77C8F4E, 0xE77D8F57, 0xE77E8F5C, 0xE7808F62, 0xE7818F63,
- 0xE7828F64, 0xE7838F9C, 0xE7848F9F, 0xE7858FA3, 0xE7868FAD, 0xE7878FAF,
- 0xE7888FB7, 0xE7898FDA, 0xE78A8FE5, 0xE78B8FE2, 0xE78C8FEA, 0xE78D8FEF,
- 0xE78E9087, 0xE78F8FF4, 0xE7909005, 0xE7918FF9, 0xE7928FFA, 0xE7939011,
- 0xE7949015, 0xE7959021, 0xE796900D, 0xE797901E, 0xE7989016, 0xE799900B,
- 0xE79A9027, 0xE79B9036, 0xE79C9035, 0xE79D9039, 0xE79E8FF8, 0xE79F904F,
- 0xE7A09050, 0xE7A19051, 0xE7A29052, 0xE7A3900E, 0xE7A49049, 0xE7A5903E,
- 0xE7A69056, 0xE7A79058, 0xE7A8905E, 0xE7A99068, 0xE7AA906F, 0xE7AB9076,
- 0xE7AC96A8, 0xE7AD9072, 0xE7AE9082, 0xE7AF907D, 0xE7B09081, 0xE7B19080,
- 0xE7B2908A, 0xE7B39089, 0xE7B4908F, 0xE7B590A8, 0xE7B690AF, 0xE7B790B1,
- 0xE7B890B5, 0xE7B990E2, 0xE7BA90E4, 0xE7BB6248, 0xE7BC90DB, 0xE7BD9102,
- 0xE7BE9112, 0xE7BF9119, 0xE7C09132, 0xE7C19130, 0xE7C2914A, 0xE7C39156,
- 0xE7C49158, 0xE7C59163, 0xE7C69165, 0xE7C79169, 0xE7C89173, 0xE7C99172,
- 0xE7CA918B, 0xE7CB9189, 0xE7CC9182, 0xE7CD91A2, 0xE7CE91AB, 0xE7CF91AF,
- 0xE7D091AA, 0xE7D191B5, 0xE7D291B4, 0xE7D391BA, 0xE7D491C0, 0xE7D591C1,
- 0xE7D691C9, 0xE7D791CB, 0xE7D891D0, 0xE7D991D6, 0xE7DA91DF, 0xE7DB91E1,
- 0xE7DC91DB, 0xE7DD91FC, 0xE7DE91F5, 0xE7DF91F6, 0xE7E0921E, 0xE7E191FF,
- 0xE7E29214, 0xE7E3922C, 0xE7E49215, 0xE7E59211, 0xE7E6925E, 0xE7E79257,
- 0xE7E89245, 0xE7E99249, 0xE7EA9264, 0xE7EB9248, 0xE7EC9295, 0xE7ED923F,
- 0xE7EE924B, 0xE7EF9250, 0xE7F0929C, 0xE7F19296, 0xE7F29293, 0xE7F3929B,
- 0xE7F4925A, 0xE7F592CF, 0xE7F692B9, 0xE7F792B7, 0xE7F892E9, 0xE7F9930F,
- 0xE7FA92FA, 0xE7FB9344, 0xE7FC932E, 0xE8409319, 0xE8419322, 0xE842931A,
- 0xE8439323, 0xE844933A, 0xE8459335, 0xE846933B, 0xE847935C, 0xE8489360,
- 0xE849937C, 0xE84A936E, 0xE84B9356, 0xE84C93B0, 0xE84D93AC, 0xE84E93AD,
- 0xE84F9394, 0xE85093B9, 0xE85193D6, 0xE85293D7, 0xE85393E8, 0xE85493E5,
- 0xE85593D8, 0xE85693C3, 0xE85793DD, 0xE85893D0, 0xE85993C8, 0xE85A93E4,
- 0xE85B941A, 0xE85C9414, 0xE85D9413, 0xE85E9403, 0xE85F9407, 0xE8609410,
- 0xE8619436, 0xE862942B, 0xE8639435, 0xE8649421, 0xE865943A, 0xE8669441,
- 0xE8679452, 0xE8689444, 0xE869945B, 0xE86A9460, 0xE86B9462, 0xE86C945E,
- 0xE86D946A, 0xE86E9229, 0xE86F9470, 0xE8709475, 0xE8719477, 0xE872947D,
- 0xE873945A, 0xE874947C, 0xE875947E, 0xE8769481, 0xE877947F, 0xE8789582,
- 0xE8799587, 0xE87A958A, 0xE87B9594, 0xE87C9596, 0xE87D9598, 0xE87E9599,
- 0xE88095A0, 0xE88195A8, 0xE88295A7, 0xE88395AD, 0xE88495BC, 0xE88595BB,
- 0xE88695B9, 0xE88795BE, 0xE88895CA, 0xE8896FF6, 0xE88A95C3, 0xE88B95CD,
- 0xE88C95CC, 0xE88D95D5, 0xE88E95D4, 0xE88F95D6, 0xE89095DC, 0xE89195E1,
- 0xE89295E5, 0xE89395E2, 0xE8949621, 0xE8959628, 0xE896962E, 0xE897962F,
- 0xE8989642, 0xE899964C, 0xE89A964F, 0xE89B964B, 0xE89C9677, 0xE89D965C,
- 0xE89E965E, 0xE89F965D, 0xE8A0965F, 0xE8A19666, 0xE8A29672, 0xE8A3966C,
- 0xE8A4968D, 0xE8A59698, 0xE8A69695, 0xE8A79697, 0xE8A896AA, 0xE8A996A7,
- 0xE8AA96B1, 0xE8AB96B2, 0xE8AC96B0, 0xE8AD96B4, 0xE8AE96B6, 0xE8AF96B8,
- 0xE8B096B9, 0xE8B196CE, 0xE8B296CB, 0xE8B396C9, 0xE8B496CD, 0xE8B5894D,
- 0xE8B696DC, 0xE8B7970D, 0xE8B896D5, 0xE8B996F9, 0xE8BA9704, 0xE8BB9706,
- 0xE8BC9708, 0xE8BD9713, 0xE8BE970E, 0xE8BF9711, 0xE8C0970F, 0xE8C19716,
- 0xE8C29719, 0xE8C39724, 0xE8C4972A, 0xE8C59730, 0xE8C69739, 0xE8C7973D,
- 0xE8C8973E, 0xE8C99744, 0xE8CA9746, 0xE8CB9748, 0xE8CC9742, 0xE8CD9749,
- 0xE8CE975C, 0xE8CF9760, 0xE8D09764, 0xE8D19766, 0xE8D29768, 0xE8D352D2,
- 0xE8D4976B, 0xE8D59771, 0xE8D69779, 0xE8D79785, 0xE8D8977C, 0xE8D99781,
- 0xE8DA977A, 0xE8DB9786, 0xE8DC978B, 0xE8DD978F, 0xE8DE9790, 0xE8DF979C,
- 0xE8E097A8, 0xE8E197A6, 0xE8E297A3, 0xE8E397B3, 0xE8E497B4, 0xE8E597C3,
- 0xE8E697C6, 0xE8E797C8, 0xE8E897CB, 0xE8E997DC, 0xE8EA97ED, 0xE8EB9F4F,
- 0xE8EC97F2, 0xE8ED7ADF, 0xE8EE97F6, 0xE8EF97F5, 0xE8F0980F, 0xE8F1980C,
- 0xE8F29838, 0xE8F39824, 0xE8F49821, 0xE8F59837, 0xE8F6983D, 0xE8F79846,
- 0xE8F8984F, 0xE8F9984B, 0xE8FA986B, 0xE8FB986F, 0xE8FC9870, 0xE9409871,
- 0xE9419874, 0xE9429873, 0xE94398AA, 0xE94498AF, 0xE94598B1, 0xE94698B6,
- 0xE94798C4, 0xE94898C3, 0xE94998C6, 0xE94A98E9, 0xE94B98EB, 0xE94C9903,
- 0xE94D9909, 0xE94E9912, 0xE94F9914, 0xE9509918, 0xE9519921, 0xE952991D,
- 0xE953991E, 0xE9549924, 0xE9559920, 0xE956992C, 0xE957992E, 0xE958993D,
- 0xE959993E, 0xE95A9942, 0xE95B9949, 0xE95C9945, 0xE95D9950, 0xE95E994B,
- 0xE95F9951, 0xE9609952, 0xE961994C, 0xE9629955, 0xE9639997, 0xE9649998,
- 0xE96599A5, 0xE96699AD, 0xE96799AE, 0xE96899BC, 0xE96999DF, 0xE96A99DB,
- 0xE96B99DD, 0xE96C99D8, 0xE96D99D1, 0xE96E99ED, 0xE96F99EE, 0xE97099F1,
- 0xE97199F2, 0xE97299FB, 0xE97399F8, 0xE9749A01, 0xE9759A0F, 0xE9769A05,
- 0xE97799E2, 0xE9789A19, 0xE9799A2B, 0xE97A9A37, 0xE97B9A45, 0xE97C9A42,
- 0xE97D9A40, 0xE97E9A43, 0xE9809A3E, 0xE9819A55, 0xE9829A4D, 0xE9839A5B,
- 0xE9849A57, 0xE9859A5F, 0xE9869A62, 0xE9879A65, 0xE9889A64, 0xE9899A69,
- 0xE98A9A6B, 0xE98B9A6A, 0xE98C9AAD, 0xE98D9AB0, 0xE98E9ABC, 0xE98F9AC0,
- 0xE9909ACF, 0xE9919AD1, 0xE9929AD3, 0xE9939AD4, 0xE9949ADE, 0xE9959ADF,
- 0xE9969AE2, 0xE9979AE3, 0xE9989AE6, 0xE9999AEF, 0xE99A9AEB, 0xE99B9AEE,
- 0xE99C9AF4, 0xE99D9AF1, 0xE99E9AF7, 0xE99F9AFB, 0xE9A09B06, 0xE9A19B18,
- 0xE9A29B1A, 0xE9A39B1F, 0xE9A49B22, 0xE9A59B23, 0xE9A69B25, 0xE9A79B27,
- 0xE9A89B28, 0xE9A99B29, 0xE9AA9B2A, 0xE9AB9B2E, 0xE9AC9B2F, 0xE9AD9B32,
- 0xE9AE9B44, 0xE9AF9B43, 0xE9B09B4F, 0xE9B19B4D, 0xE9B29B4E, 0xE9B39B51,
- 0xE9B49B58, 0xE9B59B74, 0xE9B69B93, 0xE9B79B83, 0xE9B89B91, 0xE9B99B96,
- 0xE9BA9B97, 0xE9BB9B9F, 0xE9BC9BA0, 0xE9BD9BA8, 0xE9BE9BB4, 0xE9BF9BC0,
- 0xE9C09BCA, 0xE9C19BB9, 0xE9C29BC6, 0xE9C39BCF, 0xE9C49BD1, 0xE9C59BD2,
- 0xE9C69BE3, 0xE9C79BE2, 0xE9C89BE4, 0xE9C99BD4, 0xE9CA9BE1, 0xE9CB9C3A,
- 0xE9CC9BF2, 0xE9CD9BF1, 0xE9CE9BF0, 0xE9CF9C15, 0xE9D09C14, 0xE9D19C09,
- 0xE9D29C13, 0xE9D39C0C, 0xE9D49C06, 0xE9D59C08, 0xE9D69C12, 0xE9D79C0A,
- 0xE9D89C04, 0xE9D99C2E, 0xE9DA9C1B, 0xE9DB9C25, 0xE9DC9C24, 0xE9DD9C21,
- 0xE9DE9C30, 0xE9DF9C47, 0xE9E09C32, 0xE9E19C46, 0xE9E29C3E, 0xE9E39C5A,
- 0xE9E49C60, 0xE9E59C67, 0xE9E69C76, 0xE9E79C78, 0xE9E89CE7, 0xE9E99CEC,
- 0xE9EA9CF0, 0xE9EB9D09, 0xE9EC9D08, 0xE9ED9CEB, 0xE9EE9D03, 0xE9EF9D06,
- 0xE9F09D2A, 0xE9F19D26, 0xE9F29DAF, 0xE9F39D23, 0xE9F49D1F, 0xE9F59D44,
- 0xE9F69D15, 0xE9F79D12, 0xE9F89D41, 0xE9F99D3F, 0xE9FA9D3E, 0xE9FB9D46,
- 0xE9FC9D48, 0xEA409D5D, 0xEA419D5E, 0xEA429D64, 0xEA439D51, 0xEA449D50,
- 0xEA459D59, 0xEA469D72, 0xEA479D89, 0xEA489D87, 0xEA499DAB, 0xEA4A9D6F,
- 0xEA4B9D7A, 0xEA4C9D9A, 0xEA4D9DA4, 0xEA4E9DA9, 0xEA4F9DB2, 0xEA509DC4,
- 0xEA519DC1, 0xEA529DBB, 0xEA539DB8, 0xEA549DBA, 0xEA559DC6, 0xEA569DCF,
- 0xEA579DC2, 0xEA589DD9, 0xEA599DD3, 0xEA5A9DF8, 0xEA5B9DE6, 0xEA5C9DED,
- 0xEA5D9DEF, 0xEA5E9DFD, 0xEA5F9E1A, 0xEA609E1B, 0xEA619E1E, 0xEA629E75,
- 0xEA639E79, 0xEA649E7D, 0xEA659E81, 0xEA669E88, 0xEA679E8B, 0xEA689E8C,
- 0xEA699E92, 0xEA6A9E95, 0xEA6B9E91, 0xEA6C9E9D, 0xEA6D9EA5, 0xEA6E9EA9,
- 0xEA6F9EB8, 0xEA709EAA, 0xEA719EAD, 0xEA729761, 0xEA739ECC, 0xEA749ECE,
- 0xEA759ECF, 0xEA769ED0, 0xEA779ED4, 0xEA789EDC, 0xEA799EDE, 0xEA7A9EDD,
- 0xEA7B9EE0, 0xEA7C9EE5, 0xEA7D9EE8, 0xEA7E9EEF, 0xEA809EF4, 0xEA819EF6,
- 0xEA829EF7, 0xEA839EF9, 0xEA849EFB, 0xEA859EFC, 0xEA869EFD, 0xEA879F07,
- 0xEA889F08, 0xEA8976B7, 0xEA8A9F15, 0xEA8B9F21, 0xEA8C9F2C, 0xEA8D9F3E,
- 0xEA8E9F4A, 0xEA8F9F52, 0xEA909F54, 0xEA919F63, 0xEA929F5F, 0xEA939F60,
- 0xEA949F61, 0xEA959F66, 0xEA969F67, 0xEA979F6C, 0xEA989F6A, 0xEA999F77,
- 0xEA9A9F72, 0xEA9B9F76, 0xEA9C9F95, 0xEA9D9F9C, 0xEA9E9FA0, 0xEA9F582F,
- 0xEAA069C7, 0xEAA19059, 0xEAA27464, 0xEAA351DC, 0xEAA47199
- };
-
- // Mapping lookup table
- private static final HashMap MAP;
-
- // Static initializer
- static {
- MAP = new HashMap();
- for (int item : MAPDATA)
- MAP.put(item >>> 16, item & 0xFFFF);
- }
-
- // Decode a Shift-JIS string
- static String decode(byte[] data, int offset, int length) {
-
- // Error checking
- if (data == null || offset < 0 || length < 0 ||
- offset + length > data.length)
- return null;
-
- // Map bytes to the output string
- char[] ret = new char[length];
- int dest = 0;
- for (int src = 0; src < length;) {
- int value = data[offset + src++] & 0xFF;
-
- // Control character
- if (value < 32) {
- ret[dest++] = (char) value;
- continue;
- }
-
- // Single-byte character
- Integer mapped = MAP.get(value);
-
- // Double-byte character
- if (mapped == null && src < data.length) {
- mapped = MAP.get(value << 16 | data[offset + src] & 0xFF);
- if (mapped != null)
- src++;
- }
-
- // Invalid code point
- if (mapped == null) {
- ret[dest++] = '\uFFFD';
- continue;
- }
-
- // Valid code point
- ret[dest++] = (char) mapped.intValue();
- }
-
- return new String(ret, 0, dest);
- }
-
-}
diff --git a/src/desktop/util/FrameTimer.java b/src/desktop/util/FrameTimer.java
deleted file mode 100644
index a7eeef1..0000000
--- a/src/desktop/util/FrameTimer.java
+++ /dev/null
@@ -1,585 +0,0 @@
-package util;
-
-// Java imports
-import java.util.concurrent.*;
-import java.util.concurrent.locks.*;
-import javax.sound.sampled.*;
-
-// Background timer using either a realtime clock or audio for timing
-public class FrameTimer {
-
- // Instance fields
- private Callback callback; // Event handler
- private double rate; // Frame rate in seconds
- private int source; // Timing source
- private int state; // Operation state
-
- // Audio fields
- private int block; // Current byte buffer index
- private byte[][] blocks; // Reusable byte buffers
- private double buffer; // Buffer length in seconds
- private int channels; // Number channels
- private double delay; // Delay in seconds
- private int frames; // Audio frames per timer frame
- private SourceDataLine line; // Output line
- private int sampleRate; // Rate in samples per second
- private boolean written; // Samples have been written this frame
- private LinkedBlockingQueue queue; // Sample queue
-
- // Threading fields
- private Thread audio; // Background audio processing
- private CyclicBarrier cycAudio; // Synchronization with audio thread
- private CyclicBarrier cycTimer; // Synchronization with timer thread
- private ReentrantLock lock; // Allows callback to control the timer
- private Thread timer; // Background timer processing
-
- // Type for timer event handler
- public interface Callback {
- void onFrame(FrameTimer source);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Sources
- public static final int CLOCK = 0;
- public static final int AUDIO = 1;
-
- // States
- public static final int STOPPED = 0;
- public static final int RUNNING = 1;
- public static final int PAUSED = 2;
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public FrameTimer() {
- buffer = 0.05;
- cycAudio = new CyclicBarrier(2);
- cycTimer = new CyclicBarrier(2);
- channels = 2;
- delay = 0.1;
- lock = new ReentrantLock();
- queue = new LinkedBlockingQueue();
- rate = 1;
- sampleRate = 44100;
- state = STOPPED;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Retrieve the audio buffer size
- public synchronized double getBuffer() {
- return buffer;
- }
-
- // Retrieve the number of audio channels
- public synchronized int getChannels() {
- return channels;
- }
-
- // Retrieve the audio delay
- public synchronized double getDelay() {
- return delay;
- }
-
- // Calculate the number of audio frames per timer frame
- public synchronized int getFrames() {
- return audioFrames(rate);
- }
-
- // Retrieve the frame rate
- public synchronized double getRate() {
- return rate;
- }
-
- // Retrieve the audio sampling rate
- public synchronized int getSampleRate() {
- return sampleRate;
- }
-
- // Retrieve the timing source
- public synchronized int getSource() {
- return source;
- }
-
- // Retrieve the operation state
- public synchronized int getState() {
- return state;
- }
-
- // Pause the timer
- public synchronized boolean pause() {
- boolean isTimer = Thread.currentThread() == timer;
-
- // The timer thread already owns the lock
- if (isTimer && lock.isHeldByCurrentThread()) {
- if (state == RUNNING)
- state = PAUSED;
- return state == PAUSED;
- }
-
- // Obtain the lock
- lock.lock();
-
- // Invalid state
- if (state != RUNNING) {
- lock.unlock();
- return state == PAUSED;
- }
-
- // Configure state
- state = PAUSED;
-
- // Pause timer thread
- if (!isTimer) try {
- timer.interrupt();
- lock.unlock();
- cycTimer.await();
- } catch (Exception e) { }
-
- return true;
- }
-
- // Resume running the paused timer
- public synchronized boolean resume() {
- boolean isTimer = Thread.currentThread() == timer;
-
- // The timer thread already owns the lock
- if (isTimer && lock.isHeldByCurrentThread()) {
- if (state == PAUSED)
- state = RUNNING;
- return state == RUNNING;
- }
-
- // Obtain the lock
- lock.lock();
-
- // Invalid state
- if (state != PAUSED) {
- lock.unlock();
- return state == RUNNING;
- }
-
- // Configure state
- state = RUNNING;
-
- // Resume timer thread
- if (!isTimer) try {
- lock.unlock();
- cycTimer.await();
- } catch (Exception e) { }
-
- return true;
- }
-
- // Specify the audio buffer length
- public synchronized double setBuffer(double buffer) {
- return this.buffer = state == STOPPED && buffer > 0 ?
- buffer : this.buffer;
- }
-
- // Specify the callback handler
- public synchronized boolean setCallback(Callback callback) {
- if (state != STOPPED)
- return false;
- this.callback = callback;
- return true;
- }
-
- // Specify the number of audio channels
- public synchronized int setChannels(int channels) {
- return this.channels = state == STOPPED && (channels - 1 & ~1) != 0 ?
- channels : this.channels;
- }
-
- // Specify the audio delay
- public synchronized double setDelay(double delay) {
- return this.delay = state == STOPPED && delay > 0 ? delay : this.delay;
- }
-
- // Specify the frame rate
- public synchronized double setRate(double rate) {
- return this.rate = state == STOPPED && rate > 0 ? rate : this.rate;
- }
-
- // Specify the audio sampling rate
- public synchronized int setSampleRate(int sampleRate) {
- return this.sampleRate = state == STOPPED && sampleRate > 0 ?
- sampleRate : this.sampleRate;
- }
-
- // Begin timer operations
- public synchronized boolean start(int source) {
-
- // Error checking
- if (source != CLOCK && source != AUDIO || state != STOPPED ||
- callback == null || Thread.currentThread() == timer ||
- source == AUDIO && buffer > delay) {
- return false;
- }
-
- // Audio processing
- if (source == AUDIO) try {
-
- // Open the output line
- AudioFormat fmt =
- new AudioFormat(sampleRate, 16, channels, true, false);
- line = AudioSystem.getSourceDataLine(fmt);
- line.open(fmt);
-
- // Configure audio fields
- frames = audioFrames(rate);
- block = 0;
- blocks = new byte[(int) Math.ceil(delay / rate)]
- [frames * channels * 2];
- }
-
- // Could not open the audio line
- catch (Exception e) {
- line = null;
- return false;
- }
-
- // Configure state
- this.source = source;
- state = RUNNING;
-
- // Spawn and start timer thread
- cycTimer.reset();
- timer = new Thread(()->timer());
- timer.setDaemon(true);
- timer.start();
-
- // Spawn and start audio thread
- if (source == AUDIO) {
- cycAudio.reset();
- audio = new Thread(()->audio());
- audio.setDaemon(true);
- audio.start();
- }
-
- // Synchronize with timer thread
- try { cycTimer.await(); } catch (Exception e) { }
-
- return true;
- }
-
- // End timer operations
- public synchronized boolean stop() {
- boolean isTimer = Thread.currentThread() == timer;
-
- // The timer thread already owns the lock
- if (isTimer && lock.isHeldByCurrentThread())
- return true;
-
- // Obtain the lock
- lock.lock();
-
- // Invalid state
- if (state == STOPPED) {
- lock.unlock();
- return true;
- }
-
- // Configure state
- boolean paused = state == PAUSED;
- state = STOPPED;
-
- // Stop timer thread
- if (!isTimer) try {
- if (!paused) timer.interrupt();
- lock.unlock();
- if ( paused) cycTimer.await();
- cycTimer.await();
- } catch (Exception e) { }
-
- return true;
- }
-
- // Write audio samples as bytes to output
- public boolean write(byte[] samples, int offset) {
- int size = frames * channels * 2;
-
- // Error checking
- if (Thread.currentThread() != timer || state == STOPPED || written ||
- samples == null || offset < 0 || samples.length < offset + size)
- return false;
-
- // Add a new sample block to the queue
- block = (block + 1) % blocks.length;
- byte[] block = blocks[this.block];
- System.arraycopy(samples, offset, block, 0, size);
- queue.offer(block);
- return written = true;
- }
-
- // Write audio samples as shorts to output
- public boolean write(short[] samples, int offset) {
- int size = frames * channels;
-
- // Error checking
- if (Thread.currentThread() != timer || state == STOPPED || written ||
- samples == null || offset < 0 || samples.length < offset + size)
- return false;
-
- // Encode the samples as bytes
- block = (block + 1) % blocks.length;
- byte[] block = blocks[this.block];
- for (int src = 0, dest = 0; src < size; src++) {
- short sample = samples[offset + src];
- block[dest++] = (byte) sample;
- block[dest++] = (byte) (sample >> 8);
- }
- queue.offer(block);
- return written = true;
- }
-
- // Write audio samples as floats to output (range -1 to +1)
- public boolean write(float[] samples, int offset) {
- int size = frames * channels;
-
- // Error checking
- if (Thread.currentThread() != timer || state == STOPPED || written ||
- samples == null || offset < 0 || samples.length < offset + size)
- return false;
-
- // Encode the samples as bytes
- block = (block + 1) % blocks.length;
- byte[] block = blocks[this.block];
- for (int src = 0, dest = 0; src < size; src++) {
- short sample = (short) Math.round(32767 *
- Math.min(1, Math.max(-1, samples[offset + src])) );
- block[dest++] = (byte) sample;
- block[dest++] = (byte) (sample >> 8);
- }
- queue.offer(block);
- return written = true;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methds //
- ///////////////////////////////////////////////////////////////////////////
-
- // Calculate the number of audio sampling frames in some number of seconds
- private int audioFrames(double seconds) {
- return Math.max(1, (int) Math.round(seconds * sampleRate));
- }
-
- // Handler for pause operations -- invoked by timer thread
- private long onPause(long reference, boolean isCallback) {
-
- // Track the current time
- if (source == CLOCK)
- reference = System.nanoTime() - reference;
-
- // Pause audio thread
- else try {
- audio.interrupt();
- line.stop();
- cycAudio.await();
- } catch (Exception e) { }
-
- // Synchronization
- try {
- if (!isCallback)
- cycTimer.await(); // Synchronize with invoking thread
- else lock.unlock();
- cycTimer.await(); // Wait for resume() or stop()
- } catch (Exception e) { }
-
- // Calculate a new reference time
- if (source == CLOCK)
- reference = System.nanoTime() - reference;
-
- // Unpause audio thread
- else try { cycAudio.await(); } catch (Exception e) { }
-
- return reference;
- }
-
- // Handler for stop operations -- invoked by timer thread
- private int onStop(boolean paused, boolean isCallback) {
-
- // Stop the audio thread
- if (source == AUDIO) try {
- audio.interrupt();
- line.stop();
- cycAudio.await();
- } catch (Exception e) { }
-
- // Synchronization
- try {
- if (!isCallback || paused)
- cycTimer.await(); // Synchronize with invoking thread
- else lock.unlock();
- } catch (Exception e) { }
-
- // Cleanup
- blocks = null;
- timer = null;
- return 0;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Thread Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Audio thread entry point
- private void audio() {
-
- // Synchronize with timer thread
- try { cycAudio.await(); } catch (Exception e) { }
-
- // Initialize working variables
- byte[] block = new byte[audioFrames(delay ) * channels * 2];
- byte[] buffer = new byte[audioFrames(this.buffer) * channels * 2];
- int blockPos = 0;
- int bufferPos = -buffer.length; // Less than 0 means not full
-
- // Audio processing
- line.start();
- for (;;) {
-
- // Fill the buffer with samples, blocking until full
- while (bufferPos < 0) {
-
- // Load bytes from the current block
- if (blockPos < block.length) {
- int size = Math.min(block.length - blockPos, -bufferPos);
- System.arraycopy(block, blockPos, buffer,
- bufferPos + buffer.length, size);
- blockPos += size;
- bufferPos += size;
- }
-
- // Fetch a new sample block, blocking until one is available
- else try {
- block = queue.take();
- blockPos = 0;
- }
-
- // The timer state has changed
- catch (Exception e) {
- audio.interrupt(); // take() clears interrupt status
- break;
- }
-
- }
-
- // Send samples to the output, blocking until sent
- if (!audio.isInterrupted()) {
- bufferPos +=
- line.write(buffer, bufferPos, buffer.length - bufferPos);
- if (bufferPos == buffer.length)
- bufferPos = -buffer.length;
- }
-
- // Check for changes to the timer state
- if (state == RUNNING)
- continue;
- Thread.interrupted();
-
- // Timer has paused
- if (state == PAUSED) try {
- cycAudio.await(); // Synchronize with timer thread
- cycAudio.await(); // Wait for resume() or stop()
- } catch (Exception e) { }
-
- // Timer has stopped
- if (state == STOPPED) {
- try { line.close(); } catch (Exception e) { }
- try { cycAudio.await(); } catch (Exception e) { }
- audio = null;
- return;
- }
-
- // Resume playback
- line.start();
- }
-
- }
-
- // Timer thread entry point
- private int timer() {
-
- // Synchronize with other threads
- try {
- if (source == AUDIO)
- cycAudio.await(); // Synchronize with audio thread
- cycTimer.await(); // Synchronize with parent thread
- } catch (Exception e) { }
-
- // Initialize working variables
- byte[] empty = new byte[frames * channels * 2];
- long reference = source == AUDIO ? 0 : System.nanoTime();
- long target = source == AUDIO ? audioFrames(rate) :
- Math.max(1, (long) Math.round(rate * 1000000000L));
-
- // Timer processing
- for (boolean first = true;; first = false) {
- long current = source == CLOCK ? System.nanoTime() :
- line.getLongFramePosition();
- long remain = target - current + reference;
-
- // Processing on all frames but the first
- if (!first) {
-
- // Wait until the next frame interval
- if (remain > 0) try {
- if (source == AUDIO)
- remain = remain * 1000000000L / sampleRate;
- remain = Math.max(1000000, remain);
- Thread.sleep(remain / 1000000, (int) (remain % 1000000));
- continue;
- } catch (Exception e) { timer.interrupt(); }
-
- // Another thread configured the timer state
- if (Thread.interrupted()) {
- if (state == PAUSED)
- reference = onPause(reference, false);
- if (state == STOPPED)
- return onStop(false, false);
- continue;
- }
-
- }
-
- // Invoke the event callback
- written = false;
- callback.onFrame(this);
- if (source == AUDIO && !written)
- queue.offer(empty);
-
- // The callback configured the timer state
- if (lock.isHeldByCurrentThread()) {
- boolean paused = state == PAUSED;
- if (state == PAUSED)
- reference = onPause(reference, true);
- if (state == STOPPED)
- return onStop(paused, true);
- continue;
- }
-
- // Track processed frame time
- reference = current + remain;
- }
-
- }
-
-}
diff --git a/src/desktop/util/LEDataInputStream.java b/src/desktop/util/LEDataInputStream.java
deleted file mode 100644
index 20a5acd..0000000
--- a/src/desktop/util/LEDataInputStream.java
+++ /dev/null
@@ -1,249 +0,0 @@
-package util;
-
-// Java imports
-import java.io.*;
-
-// Little-endian implementation of DataInputStream
-public class LEDataInputStream extends FilterInputStream {
-
- // Instance fields
- private DataInputStream data; // Data-decoding stream
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public LEDataInputStream(InputStream stream) {
- super(stream = stream instanceof LEDataInputStream ?
- ((LEDataInputStream) stream).in : stream);
- data = stream instanceof DataInputStream ?
- (DataInputStream) stream : new DataInputStream(stream);
- }
-
- // Byte array constructor
- public LEDataInputStream(byte[] data) {
- this(new ByteArrayInputStream(data));
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Reads a boolean from the underlying input stream
- public boolean readBoolean() throws IOException {
- return data.readByte() != 0;
- }
-
- // Reads an array of booleans from the underlying input stream
- public boolean[] readBooleans(int count) throws IOException {
- return readBooleans(new boolean[count], 0, count);
- }
-
- // Reads an array of booleans from the underlying input stream
- public boolean[] readBooleans(boolean[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readBoolean();
- return v;
- }
-
- // Reads a byte from the underlying input stream
- public byte readByte() throws IOException {
- return data.readByte();
- }
-
- // Reads an array of bytes from the underlying input stream
- public byte[] readBytes(int count) throws IOException {
- return readBytes(new byte[count], 0, count);
- }
-
- // Reads an array of bytes from the underlying input stream
- public byte[] readBytes(byte[] v, int offset, int length)
- throws IOException {
- data.read(v, offset, length);
- return v;
- }
-
- // Reads a character from the underlying input stream
- public char readChar() throws IOException {
- return (char) Short.reverseBytes(data.readShort());
- }
-
- // Reads an array of characters from the underlying input stream
- public char[] readChars(int count) throws IOException {
- return readChars(new char[count], 0, count);
- }
-
- // Reads an array of characters from the underlying input stream
- public char[] readChars(char[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readChar();
- return v;
- }
-
- // Reads a double from the underlying input stream
- public double readDouble() throws IOException {
- return readDouble(false);
- }
-
- // Reads a double from the underlying input stream
- public double readDouble(boolean finite) throws IOException {
- long bits = readLong();
- double ret = Double.longBitsToDouble(bits);
- if (finite && !Double.isFinite(ret)) throw new RuntimeException(
- String.format("Non-finite double value 0x%016X", bits));
- return ret;
- }
-
- // Reads an array of doubles from the underlying input stream
- public double[] readDoubles(int count) throws IOException {
- return readDoubles(new double[count], 0, count, false);
- }
-
- // Reads an array of doubles from the underlying input stream
- public double[] readDoubles(int count, boolean finite) throws IOException {
- return readDoubles(new double[count], 0, count, finite);
- }
-
- // Reads an array of doubles from the underlying input stream
- public double[] readDoubles(double[] v, int offset, int length)
- throws IOException {
- return readDoubles(v, offset, length, false);
- }
-
- // Reads an array of doubles from the underlying input stream
- public double[] readDoubles(double[] v, int offset, int length,
- boolean finite) throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readDouble(finite);
- return v;
- }
-
- // Reads a float from the underlying input stream
- public float readFloat() throws IOException {
- return readFloat(false);
- }
-
- // Reads a float from the underlying input stream
- public float readFloat(boolean finite) throws IOException {
- int bits = readInt();
- float ret = Float.intBitsToFloat(bits);
- if (finite && !Float.isFinite(ret)) throw new RuntimeException(
- String.format("Non-finite float value 0x%08X", bits));
- return ret;
- }
-
- // Reads an array of floats from the underlying input stream
- public float[] readFloats(int count) throws IOException {
- return readFloats(new float[count], 0, count, false);
- }
-
- // Reads an array of floats from the underlying input stream
- public float[] readFloats(int count, boolean finite) throws IOException {
- return readFloats(new float[count], 0, count, finite);
- }
-
- // Reads an array of floats from the underlying input stream
- public float[] readFloats(float[] v, int offset, int length)
- throws IOException {
- return readFloats(v, offset, length, false);
- }
-
- // Reads an array of floats from the underlying input stream
- public float[] readFloats(float[] v, int offset, int length,
- boolean finite) throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readFloat(finite);
- return v;
- }
-
- // Reads an int from the underlying input stream
- public int readInt() throws IOException {
- return Integer.reverseBytes(data.readInt());
- }
-
- // Reads an array of ints from the underlying input stream
- public int[] readInts(int count) throws IOException {
- return readInts(new int[count], 0, count);
- }
-
- // Reads an array of ints from the underlying input stream
- public int[] readInts(int[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readInt();
- return v;
- }
-
- // Reads a long from the underlying input stream
- public long readLong() throws IOException {
- return Long.reverseBytes(data.readLong());
- }
-
- // Reads an array of longs from the underlying input stream
- public long[] readLongs(int count) throws IOException {
- return readLongs(new long[count], 0, count);
- }
-
- // Reads an array of longs from the underlying input stream
- public long[] readLongs(long[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readLong();
- return v;
- }
-
- // Reads a 24-bit integer from the underlying input stream
- public int readMiddle() throws IOException {
- int v = readShort() & 0xFFFF;
- return readByte() << 16 | v;
- }
-
- // Reads an array of 24-bit integers from the underlying input stream
- public int[] readMiddles(int count) throws IOException {
- return readMiddles(new int[count], 0, count);
- }
-
- // Reads an array of 24-bit integers from the underlying input stream
- public int[] readMiddles(int[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readMiddle();
- return v;
- }
-
- // Reads a short from the underlying input stream
- public short readShort() throws IOException {
- return Short.reverseBytes(data.readShort());
- }
-
- // Reads an array of shorts from the underlying input stream
- public short[] readShorts(int count) throws IOException {
- return readShorts(new short[count], 0, count);
- }
-
- // Reads an array of shorts from the underlying input stream
- public short[] readShorts(short[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- v[offset + x] = readShort();
- return v;
- }
-
- // Reads from the stream in a modified UTF-8 string
- public String readUTF() throws IOException {
- return data.readUTF();
- }
-
- // Advances forward in the stream some number of bytes
- public int skipBytes(int n) throws IOException {
- return data.skipBytes(n);
- }
-
-}
diff --git a/src/desktop/util/LEDataOutputStream.java b/src/desktop/util/LEDataOutputStream.java
deleted file mode 100644
index c3daa63..0000000
--- a/src/desktop/util/LEDataOutputStream.java
+++ /dev/null
@@ -1,218 +0,0 @@
-package util;
-
-// Java imports
-import java.io.*;
-import java.nio.charset.*;
-
-// Little-endian implementation of DataOutputStream
-public class LEDataOutputStream extends FilterOutputStream {
-
- // Instance fields
- private DataOutputStream data; // Data-encoding stream
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public LEDataOutputStream() {
- this(new ByteArrayOutputStream());
- }
-
- // Stream constructor
- public LEDataOutputStream(OutputStream stream) {
- super(stream = stream instanceof LEDataOutputStream ?
- ((LEDataOutputStream) stream).out : stream);
- data = stream instanceof DataOutputStream ?
- (DataOutputStream) stream : new DataOutputStream(stream);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Returns the current value of the underlying buffer
- public int size() {
- return out instanceof ByteArrayOutputStream ?
- ((ByteArrayOutputStream) out).size() : -1;
- }
-
- // Produce a byte array containing this stream's data
- public byte[] toByteArray() throws IOException {
- return out instanceof ByteArrayOutputStream ?
- ((ByteArrayOutputStream) out).toByteArray() : null;
- }
-
- // Writes a boolean to the underlying output stream as a 1-byte value
- public void writeBoolean(boolean v) throws IOException {
- data.writeBoolean(v);
- }
-
- // Writes an array of booleans to the underlying output stream
- public void writeBooleans(boolean[] v) throws IOException {
- writeBooleans(v, 0, v.length);
- }
-
- // Writes an array of booleans to the underlying output stream
- public void writeBooleans(boolean[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeBoolean(v[offset + x]);
- }
-
- // Writes out a byte to the underlying output stream as a 1-byte value
- public void writeByte(int v) throws IOException {
- data.writeByte(v);
- }
-
- // Writes out the string to the underlying output stream
- public void writeBytes(String s) throws IOException {
- data.writeBytes(s);
- }
-
- // Writes an array of bytes to the underlying output stream
- public void writeBytes(byte[] v) throws IOException {
- writeBytes(v, 0, v.length);
- }
-
- // Writes an array of bytes to the underlying output stream
- public void writeBytes(byte[] v, int offset, int length)
- throws IOException {
- data.write(v, offset, length);
- }
-
- // Writes a character to the underlying output stream as a 2-byte value
- public void writeChar(int v) throws IOException {
- data.writeChar(Short.reverseBytes((short) v));
- }
-
- // Writes a string to the underlying output stream
- public void writeChars(String s) throws IOException {
- writeChars(s.toCharArray());
- }
-
- // Writes an array of characters to the underlying output stream
- public void writeChars(char[] v) throws IOException {
- writeChars(v, 0, v.length);
- }
-
- // Writes an array of characters to the underlying output stream
- public void writeChars(char[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeChar(v[offset + x]);
- }
-
- // Converts the double argument to a long using doubleToLongBits
- public void writeDouble(double v) throws IOException {
- data.writeLong(Long.reverseBytes(Double.doubleToLongBits(v)));
- }
-
- // Writes an array of doubles to the underlying output stream
- public void writeDoubles(double[] v) throws IOException {
- writeDoubles(v, 0, v.length);
- }
-
- // Writes an array of doubles to the underlying output stream
- public void writeDoubles(double[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeDouble(v[offset + x]);
- }
-
- // Converts the float argument to an int using floatToIntBits
- public void writeFloat(float v) throws IOException {
- data.writeInt(Integer.reverseBytes(Float.floatToIntBits(v)));
- }
-
- // Writes an array of floats to the underlying output stream
- public void writeFloats(float[] v) throws IOException {
- writeFloats(v, 0, v.length);
- }
-
- // Writes an array of floats to the underlying output stream
- public void writeFloats(float[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeFloat(v[offset + x]);
- }
-
- // Writes an int to the underlying output stream as four bytes
- public void writeInt(int v) throws IOException {
- data.writeInt(Integer.reverseBytes(v));
- }
-
- // Writes an array of ints to the underlying output stream
- public void writeInts(int[] v) throws IOException {
- writeInts(v, 0, v.length);
- }
-
- // Writes an array of ints to the underlying output stream
- public void writeInts(int[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeInt(v[offset + x]);
- }
-
- // Writes an int to the underlying output stream as three bytes
- public void writeMiddle(int v) throws IOException {
- writeShort((short) v );
- writeByte ((byte ) (v >> 16));
- }
-
- // Writes an array of 24-bit integers to the underlying output stream
- public void writeMiddles(int[] v) throws IOException {
- writeMiddles(v, 0, v.length);
- }
-
- // Writes an array of 24-bit integers to the underlying output stream
- public void writeMiddles(int[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeMiddle(v[offset + x]);
- }
-
- // Writes a long to the underlying output stream as eight bytes
- public void writeLong(long v) throws IOException {
- data.writeLong(Long.reverseBytes(v));
- }
-
- // Writes an array of longs to the underlying output stream
- public void writeLong(long[] v) throws IOException {
- writeLongs(v, 0, v.length);
- }
-
- // Writes an array of longs to the underlying output stream
- public void writeLongs(long[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeLong(v[offset + x]);
- }
-
- // Writes a short to the underlying output stream as two bytes
- public void writeShort(int v) throws IOException {
- data.writeShort(Short.reverseBytes((short) v));
- }
-
- // Writes an array of shorts to the underlying output stream
- public void writeShorts(short[] v) throws IOException {
- writeShorts(v, 0, v.length);
- }
-
- // Writes an array of shorts to the underlying output stream
- public void writeShorts(short[] v, int offset, int length)
- throws IOException {
- for (int x = 0; x < length; x++)
- writeShort(v[offset + x]);
- }
-
- // Writes a string to the underlying output stream using modified UTF-8
- public void writeUTF(String str) throws IOException {
- data.writeUTF(str);
- }
-
-}
diff --git a/src/desktop/util/Localizer.java b/src/desktop/util/Localizer.java
deleted file mode 100644
index d7ff355..0000000
--- a/src/desktop/util/Localizer.java
+++ /dev/null
@@ -1,538 +0,0 @@
-package util;
-
-// Java imports
-import java.util.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.text.*;
-
-// UI display text manager
-public class Localizer {
-
- // Instance fields
- private HashMap controls; // Control mapping
- private Locale locale; // Current message store
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Class reference for JComboBox
- JComboBox JCOMBOBOX = new JComboBox();
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // Control settings
- private static class Control {
- String key; // Single-string dictionary key
- String[] keys; // Multiple-string dictionary key
- String tipKey; // Tooltip dictionary key
- HashMap tags; // Message overrides
- Control(String tipKey) {
- tags = new HashMap();
- this.tipKey = tipKey;
- }
- }
-
- // Locale container
- public static class Locale implements Comparable {
-
- // Public fields
- public final String id; // Unique identifier
- public final String name; // Display name
-
- // Private fields
- private HashMap messages; // Message dictionary
-
- // Constructor
- private Locale(HashMap messages) {
- id = messages.get("locale.id");
- this.messages = messages;
- name = messages.get("locale.name");
- }
-
- // Comparator
- public int compareTo(Locale o) {
- return id.compareTo(o.id);
- }
-
- // Represent this object as a string
- public String toString() {
- return id + " - " + name;
- }
-
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Static Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Parse a text file to produce a Locale object
- public static Locale parse(String text) {
- var chars = text.replaceAll("\\r\\n?", "\n").toCharArray();
- var ret = new HashMap(); // Output dictionary
- int start = 0; // Position of first character in key or value
- var stack = new Stack(); // Nested key chain
- int state = 0; // Current parsing context
-
- // Process all characters
- for (int x = 0, line = 1, col = 1; x < chars.length; x++, col++) {
- char c = chars[x];
- boolean end = x == chars.length - 1;
- String pos = line + ":" + col + ": ";
- boolean white = c == ' ' || c == '\t';
-
- // Processing for newline
- if (c == '\n') {
- col = 0;
- line++;
- }
-
- // Comment
- if (state == -1) {
- if (c == '\n' || end)
- state = 0;
- }
-
- // Pre-key
- else if (state == 0) {
-
- // Ignore leading whitespace
- if (white)
- continue;
-
- // The line is a comment
- if (c == '#') {
- state = -1;
- continue;
- }
-
- // End of input has been reached
- if (end)
- break;
-
- // The line is empty
- if (c == '\n')
- continue;
-
- // Proceed to key
- start = x;
- state = 1;
- }
-
- // Key
- else if (state == 1) {
-
- // Any non-whitespace character is valid in a key
- if (!white && c != '\n' && !end)
- continue;
-
- // Produce the key as a string
- String key = new String(chars, start, x - start).trim();
-
- // Close a key group
- if (key.equals("}")) {
-
- // Nesting error
- if (stack.size() == 0) throw new RuntimeException(
- pos + "Unexpected '}'");
-
- // Syntax error
- outer: for (int y = x; y < chars.length; y++) {
- char h = chars[y];
- if (h == '\n') break;
- if (h != ' ' && h != '\t') throw new RuntimeException(
- pos + "Newline expected");
- }
-
- // Proceed to key
- state = 0;
- stack.pop();
- continue;
- }
-
- // Curly braces are not valid in keys
- if (key.contains("{") || key.contains("}"))
- throw new RuntimeException(
- line + ": Curly braces are not allowed in keys");
-
- // Proceed to interim
- stack.push(key);
- state = 2;
- }
-
- // Post-key, pre-value
- if (state == 2) {
-
- // Ignore any whitespace between key and value
- if (white)
- continue;
-
- // No value is present
- if (c == '\n') throw new RuntimeException(
- pos + "Unexpected newline");
- if (end) throw new RuntimeException(
- pos + "Unexpected end of input");
-
- // Proceed to value
- start = x;
- state = 3;
- }
-
- // Value
- if (state == 3) {
-
- // Escape sequence
- if (c == '\\') {
-
- // EOF
- if (x == chars.length - 1)
- throw new RuntimeException(
- pos + "Unexpected end of input");
-
- // Cannot escape a newline
- if (chars[x + 1] == '\n')
- throw new RuntimeException(
- pos + "Unexpected newline");
-
- // Skip the next character
- x++;
- continue;
- }
-
- // The end of the value has not yet been reached
- if (c != '\n' && !end)
- continue;
-
- // Produce the value as a string
- if (end)
- x++;
- String value = new String(chars, start, x - start).trim();
- state = 0;
-
- // Open a key group
- if (value.equals("{")) {
- state = 0;
- continue;
- }
-
- // Check for nesting errors
- int depth = 0;
- for (int y = start; y < x; y++) {
- switch (chars[y]) {
- case '\\': y++; continue;
- case '{' : depth++; continue;
- case '}' : if (--depth == -1)
- throw new RuntimeException(
- (line - 1) + ": Unexpected '}'"
- );
- continue;
- }
- }
- if (depth != 0) throw new RuntimeException(
- pos + "'}' expected");
-
- // Produce the full key as a string
- var pkey = new StringBuilder();
- for (String item : stack)
- pkey.append((pkey.length() != 0 ? "." : "") + item);
- String key = pkey.toString();
-
- // Check for duplicate keys
- String lkey = key.toLowerCase();
- if (ret.get(lkey) != null) throw new RuntimeException(
- (line-1)+ ": Key '" + key + "' has already been defined.");
-
- // Add the pair to the dictionary
- ret.put(lkey, value);
- stack.pop();
- }
-
- }
-
- // Perform post-processing error checks
- if (state != 0 || !stack.empty()) throw new RuntimeException(
- "Unexpected end of input");
- if (!ret.containsKey("locale.id")) throw new RuntimeException(
- "Required key not found: 'locale.id'");
- if (!ret.containsKey("locale.name")) throw new RuntimeException(
- "Required key not found: 'locale.name'");
- ret.put("null", "");
- return new Locale(ret);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public Localizer() {
- controls = new HashMap();
- }
-
- // Parsing constructor
- public Localizer(String text) {
- this();
- setLocale(parse(text));
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a control to the collection
- public boolean add(Object control, Object key) {
- return add(control, key, null);
- }
-
- // Add a control with a tooltip to the collection
- public boolean add(Object control, Object key, String tipKey) {
- var ctrl = controls.get(control);
- if (ctrl == null)
- ctrl = new Control(tipKey);
-
- // Error checking
- if (control == null || key == null)
- return false;
-
- // Control takes a single string
- if (key instanceof String) {
-
- // Type validation
- if (!(
- control instanceof AbstractButton ||
- control instanceof JFrame ||
- control instanceof JInternalFrame ||
- control instanceof JLabel ||
- control instanceof JPanel || // TitledBorder
- control instanceof JTextComponent
- )) return false;
-
- // Configure key
- ctrl.key = (String) key;
- }
-
- // Control takes an array of strings
- else if (key instanceof String[]) {
-
- // Type validation
- if (!(
- JCOMBOBOX.getClass().isAssignableFrom(control.getClass())
- )) return false;
-
- // Configure keys
- String[] keys = (String[]) key;
- ctrl.keys = new String[keys.length];
- System.arraycopy(keys, 0, ctrl.keys, 0, keys.length);
- }
-
- // Invalid control type
- else return false;
-
- // Add the control to the collection
- controls.put(control, ctrl);
- update(control);
- return true;
- }
-
- // Remove all controls from being managed
- public void clearControls() {
- controls.clear();
- }
-
- // Evaluate the message for a given key
- public String get(String key) {
- return key == null ? null : evaluate(null, key);
- }
-
- // Retrieve the currently loaded locale
- public Locale getLocale() {
- return locale;
- }
-
- // Configure a control tag
- public String put(Object control, String key, String value) {
- var ctrl = controls.get(control);
-
- // Error checking
- if (ctrl == null || key == null)
- return null;
-
- // Update the control's tags
- key = key.toLowerCase();
- String ret = value == null ?
- ctrl.tags.remove(key) :
- ctrl.tags.put(key, value)
- ;
-
- // Refresh the text on the control
- update(control);
- return ret;
- }
-
- // Remove a control from the collection
- public boolean remove(Object control) {
- return controls.remove(control) != null;
- }
-
- // Specify a message dictionary
- public void setLocale(Locale locale) {
- this.locale = locale;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Process substitutions and escapes on a message for a given key
- private String evaluate(Control control, String key) {
-
- // No locale is loaded
- if (locale == null)
- return key;
-
- // Check that the key exists
- String ret = locale.messages.get(key.toLowerCase());
- if (ret == null)
- return key;
-
- // Perform all substitutions
- outer: for (;;) {
- var chars = ret.toCharArray();
- int start = 0;
-
- // Look for the first complete substitution
- for (int x = 0; x < chars.length; x++) {
- char c = chars[x];
-
- // Escape sequence
- if (c == '\\') {
- x++;
- continue;
- }
-
- // Begin substitution
- if (c == '{')
- start = x + 1;
-
- // Substitution has not yet ended
- if (c != '}')
- continue;
-
- // Determine the substitution
- key = new String(chars, start, x - start);
- String lkey = key.toLowerCase();
- String value = control == null ? null : control.tags.get(lkey);
- if (value == null)
- value = locale.messages.get(lkey);
- if (value == null)
- value = "\\{" + key + "\\}";
-
- // Apply the substitution to the message
- ret =
- new String(chars, 0, start - 1) +
- value +
- new String(chars, x + 1, chars.length - x - 1)
- ;
- continue outer;
- }
-
- // No further substitutions
- break;
- }
-
- // Unescape all escape sequences
- var chars = ret.toCharArray();
- int length = 0;
- for (int x = 0; x < chars.length; x++, length++) {
- char c = chars[x];
- if (c == '\\') switch (c = chars[++x]) {
- case 'n': c = '\n'; break;
- case 't': c = '\t'; break;
- }
- chars[length] = c;
- }
- return new String(chars, 0, length);
- }
-
- // Update the text for all controls
- private void update() {
- for (var control : controls.keySet())
- update(control);
- }
-
- // Update the text for a control
- private void update(Object control) {
- var ctrl = controls.get(control);
- String[] keys = ctrl.key==null ? ctrl.keys : new String[]{ctrl.key};
- String[] values = new String[keys.length];
-
- // Evaluate all messages
- for (int x = 0; x < keys.length; x++)
- values[x] = evaluate(ctrl, keys[x]);
-
- // Update the control's text
- if (control instanceof AbstractButton)
- ((AbstractButton) control).setText (values[0]);
- if (control instanceof JFrame)
- ((JFrame ) control).setTitle(values[0]);
- if (control instanceof JInternalFrame)
- ((JInternalFrame) control).setTitle(values[0]);
- if (control instanceof JLabel )
- ((JLabel ) control).setText (values[0]);
- if (control instanceof JTextComponent)
- ((JTextComponent) control).setText (values[0]);
-
- // JPanel must be wrapped in a TitledBorder
- if (control instanceof JPanel) {
- var border = ((JPanel) control).getBorder();
- if (border instanceof TitledBorder)
- ((TitledBorder) border).setTitle(values[0]);
- }
-
- // Replace the contents of a JComboBox without firing events
- if (JCOMBOBOX.getClass().isAssignableFrom(control.getClass())) {
-
- // The type is explicitly verified above
- @SuppressWarnings("unchecked")
- var box = (JComboBox) control;
-
- // Configure working variables
- var action = box.getActionListeners();
- int index = box.getSelectedIndex();
- var item = box.getItemListeners();
-
- // Remove event listeners
- for (var lst : action) box.removeActionListener(lst);
- for (var lst : item ) box.removeItemListener (lst);
-
- // Update contents
- box.setModel(new DefaultComboBoxModel(values));
- box.setSelectedIndex(index);
-
- // Restore event listeners
- for (var lst : action) box.addActionListener(lst);
- for (var lst : item ) box.addItemListener (lst);
- }
-
- // Update the control's tooltip text
- if (control instanceof JComponent)
- ((JComponent) control).setToolTipText(
- ctrl.tipKey == null ? null : evaluate(ctrl, ctrl.tipKey));
- }
-
-}
diff --git a/src/desktop/util/UComboBox.java b/src/desktop/util/UComboBox.java
deleted file mode 100644
index 011d87b..0000000
--- a/src/desktop/util/UComboBox.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package util;
-
-// Java imports
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-// Wrapper around JComboBox to enforce desired behaviors
-public class UComboBox extends JComboBox {
-
- // Instance fields
- private HashMap actionListeners;
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Empty item set
- private static final String[] EMPTY = new String[0];
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public UComboBox() {
- this(null);
- }
-
- // List constructor
- public UComboBox(String[] items) {
- super();
- actionListeners = new HashMap();
- setItems(items);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a listener to receive action events
- public void addActionListener(ActionListener l) {
-
- // Error checking
- if (l == null)
- return;
-
- // Wrap the event listener in a guard
- ActionListener L = e->{
-
- // Search the stack trace for an invocation not from Java itself
- var trace = Thread.currentThread().getStackTrace();
- for (int x = 2; x < trace.length; x++)
- if (trace[x].getModuleName() == null)
- return;
-
- // Call the event handler
- l.actionPerformed(e);
- };
-
- // Manage the collections
- actionListeners.put(l, L);
- super.addActionListener(L);
- }
-
- // Retrieve a list of the current action listeners
- public ActionListener[] getActionListeners() {
- return actionListeners.keySet().toArray(
- new ActionListener[actionListeners.size()]);
- }
-
- // Remove an action listener from the collection
- public void removeActionListener(ActionListener l) {
- var L = actionListeners.get(l);
- if (L == null)
- return;
- actionListeners.remove(l);
- super.removeActionListener(L);
- }
-
- // Update the items in the list
- public void setItems(String[] items) {
- int index = getSelectedIndex();
- setModel(new DefaultComboBoxModel(
- items != null ? items : EMPTY));
- setSelectedIndex(index);
- }
-
-}
diff --git a/src/desktop/util/UPanel.java b/src/desktop/util/UPanel.java
deleted file mode 100644
index 48906c1..0000000
--- a/src/desktop/util/UPanel.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package util;
-
-// Java imports
-import java.awt.*;
-import java.util.*;
-import javax.swing.*;
-
-// Wrapper around JPanel to work around a bug in GridBagLayout
-public class UPanel extends JPanel {
-
- // Instance fields
- private HashSet paintListeners;
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // Functional interface for paint events
- public interface PaintListener {
- void paint(Graphics2D g, int width, int height);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public UPanel() {
- this(null);
- }
-
- // Layout manager constructor
- public UPanel(LayoutManager layout) {
- super(layout);
- paintListeners = new HashSet();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add a listener to receive paint events
- public void addPaintListener(PaintListener l) {
- if (l != null)
- paintListeners.add(l);
- }
-
- // Retrieve a list of the current paint listeners
- public PaintListener[] getPaintListeners() {
- return paintListeners.toArray(
- new PaintListener[paintListeners.size()]);
- }
-
- // Retrieve the maximum size of the component
- public Dimension getMaximumSize() {
- var ret = super.getMaximumSize();
- return ret != null ? ret : new Dimension();
- }
-
- // Retrieve the minimum size of the component
- public Dimension getMinimumSize() {
- var ret = super.getMinimumSize();
- return ret != null ? ret : new Dimension();
- }
-
- // Retrieve the preferred size of the component
- public Dimension getPreferredSize() {
- var ret = super.getPreferredSize();
- return ret != null ? ret : new Dimension();
- }
-
- // Draw the component
- public void paintComponent(Graphics g) {
- super.paintComponent(g);
- var G = (Graphics2D) g;
- int width = getWidth();
- int height = getHeight();
- for (var lst : paintListeners)
- lst.paint(G, width, height);
- }
-
- // Remove a paint listener from the collection
- public void removePaintListener(PaintListener l) {
- paintListeners.remove(l);
- }
-
-}
diff --git a/src/desktop/util/Util.java b/src/desktop/util/Util.java
deleted file mode 100644
index d8a5143..0000000
--- a/src/desktop/util/Util.java
+++ /dev/null
@@ -1,395 +0,0 @@
-package util;
-
-// Java imports
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import java.io.*;
-import java.net.*;
-import java.nio.charset.*;
-import java.nio.file.*;
-import java.util.*;
-import javax.imageio.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.plaf.basic.*;
-
-// General utility methods
-public final class Util {
-
- // This class cannot be instantiated
- private Util() { }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // Event listener interfaces
- public interface OnClose { void call(WindowEvent e); }
- public interface OnClose2 { void call(InternalFrameEvent e); }
- public interface OnFocus { void call(FocusEvent e); }
- public interface OnKey { void call(KeyEvent e); }
- public interface OnMouse { void call(MouseEvent e); }
- public interface OnResize { void call(ComponentEvent e); }
- public interface OnVisible { void call(AncestorEvent e); }
-
- // Data class for byte-order marks
- private static class BOM {
- byte[] mark;
- Charset set;
- BOM(byte[] m, Charset s) { mark = m; set = s; }
- }
-
- // Font metrics wrapper
- public static class Font extends java.awt.Font {
- public final FontMetrics metrics;
- public Font(java.awt.Font font) {
- super(font);
- metrics = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB)
- .getGraphics().getFontMetrics(this);
- }
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Directory from which the JVM was initialized
- public static final File PWD = new File(System.getProperty("user.dir"));
-
- // Text file byte-order marks
- private static final BOM[] BOMS = {
- new BOM(new byte[] { -17, -69, -65 }, StandardCharsets.UTF_8 ),
- new BOM(new byte[] { - 2, - 1 }, StandardCharsets.UTF_16BE),
- new BOM(new byte[] { - 1, - 2 }, StandardCharsets.UTF_16LE),
- };
-
- // Available font families
- private static final String[] FONTS;
-
- // Filesystem state manager for the current .jar (if any)
- private static final FileSystem JARFS;
-
- // Static initializer
- static {
-
- // Font families
- var fonts = GraphicsEnvironment
- .getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
- Arrays.sort(fonts, String.CASE_INSENSITIVE_ORDER);
- FONTS = fonts;
-
- // .jar filesystem
- FileSystem fs = null;
- try {
- fs = FileSystems.newFileSystem(
- new URI("jar:" + Util.class.getProtectionDomain()
- .getCodeSource().getLocation().toString()),
- new HashMap(),
- Util.class.getClassLoader()
- );
- } catch (Exception e) { }
- JARFS = fs;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Static Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Apply an alpha value to a Color object
- public static Color alpha(Color color, float alpha) {
- int a = (int) Math.round(alpha * 255);
- return color == null || a < 0 || a > 255 ? null :
- new Color(color.getRGB() & 0x00FFFFFF | a << 24, true);
- }
-
- // Blend one color into another
- public static Color blend(Color front, Color back, float alpha) {
-
- // Error checking
- if (front == null || back == null ||
- !Float.isFinite(alpha) || alpha < 0 || alpha > 1)
- return null;
-
- // Decompose components
- var colors = new Color[] { front, back };
- var argb = new float[3][4];
- for (int x = 0; x < 2; x++) {
- int bits = colors[x].getRGB();
- for (int y = 3; y >= 0; y++, bits >>= 8)
- argb[x][y] = (bits & 0xFF) / 255.0f;
- }
-
- // Combine the colors
- argb[2][0] = argb[0][0] + argb[1][0] * (1 - argb[0][0]);
- for (int x = 1; x < 4; x++)
- argb[2][x] = (
- argb[0][x] * argb[0][0] +
- argb[1][x] * argb[1][0] * (1 - argb[0][0])
- ) / argb[2][0];
-
- // Produce the resulting Color object
- int bits = 0;
- for (int x = 0; x < 4; x++)
- bits = bits << 8 | (int) Math.round(argb[2][x] * 255);
- return new Color(bits, true);
- }
-
- // Read a file from disk
- public static byte[] fileRead(File file) {
- FileInputStream stream = null;
- byte[] data = null;
- try {
- stream = new FileInputStream(file);
- data = stream.readAllBytes();
- } catch (Exception e) { }
- try { stream.close(); } catch (Exception e) { }
- return data;
- }
-
- // Read a file, first from disk, then from .jar
- public static byte[] fileRead(String filename) {
- InputStream stream = null;
-
- // Open the file on disk
- try { stream = new FileInputStream(filename); }
-
- // File on disk could not be opened, so get resource from .jar
- catch (Exception e) {
- stream = Util.class.getResourceAsStream("/" + filename);
- if (stream == null)
- return null; // Resource in .jar could not be found
- }
-
- // Read the file data into memory
- byte[] data = null;
- try { data = stream.readAllBytes(); } catch (Exception e) { }
- try { stream.close(); } catch (Exception e) { }
- return data;
- }
-
- // Select a font family from a list, if avaiable
- public static String fontFamily(String[] families) {
- for (String family : families)
- if (Arrays.binarySearch(FONTS, family,
- String.CASE_INSENSITIVE_ORDER) >= 0)
- return family;
- return null;
- }
-
- // Read an image file as an icon
- public static Icon iconRead(String filename) {
- BufferedImage img = imageRead(filename);
- return img == null ? null : new ImageIcon(img);
- }
-
- // Read an image file by filename
- public static BufferedImage imageRead(String filename) {
- try { return
- ImageIO.read(new ByteArrayInputStream(fileRead(filename)));
- } catch (Exception e) { return null; }
- }
-
- // Read an image file by handle
- public static BufferedImage imageRead(File file) {
- try { return imageRead(file.getAbsolutePath()); }
- catch (Exception e) { return null; }
- }
-
- // Produce a list of files contained in a directory
- // If the directory is not found on disk, looks for it in the .jar
- public static String[] listFiles(String path) {
-
- // Check for the directory on disk
- var file = new File(path);
- if (file.exists() && file.isDirectory())
- return file.list();
-
- // Not executing out of a .jar
- if (JARFS == null)
- return null;
-
- // Check for the directory in the .jar
- try {
- var list = Files.list(JARFS.getPath("/" + path)).toArray();
- var ret = new String[list.length];
- for (int x = 0; x < list.length; x++) {
- path = "/" + ((Path) list[x]).toString();
- ret[x] = path.substring(path.lastIndexOf("/") + 1);
- }
- return ret;
- } catch (Exception e) { }
-
- // The directory was not found
- return null;
- }
-
- // Produce a list of available font family names
- public static String[] listFonts() {
- var ret = new String[FONTS.length];
- System.arraycopy(FONTS, 0, ret, 0, FONTS.length);
- return ret;
- }
-
- // Produce a WindowListener with a functional interface
- public static WindowListener onClose(OnClose close) {
- return new WindowListener() {
- public void windowActivated (WindowEvent e) { }
- public void windowClosed (WindowEvent e) { }
- public void windowDeactivated(WindowEvent e) { }
- public void windowDeiconified(WindowEvent e) { }
- public void windowIconified (WindowEvent e) { }
- public void windowOpened (WindowEvent e) { }
- public void windowClosing (WindowEvent e)
- { if (close != null) close.call(e); }
- };
- }
-
- // Produce an InternalFrameListener with a functional interface
- public static InternalFrameListener onClose2(OnClose2 close) {
- return new InternalFrameListener() {
- public void internalFrameActivated (InternalFrameEvent e) { }
- public void internalFrameClosed (InternalFrameEvent e) { }
- public void internalFrameDeactivated(InternalFrameEvent e) { }
- public void internalFrameDeiconified(InternalFrameEvent e) { }
- public void internalFrameIconified (InternalFrameEvent e) { }
- public void internalFrameOpened (InternalFrameEvent e) { }
- public void internalFrameClosing (InternalFrameEvent e)
- { if (close != null) close.call(e); }
- };
- }
-
- // Produce a FocusListener with functional interfaces
- public static FocusListener onFocus(OnFocus focus, OnFocus blur) {
- return new FocusListener() {
- public void focusGained(FocusEvent e)
- { if (focus != null) focus.call(e); }
- public void focusLost (FocusEvent e)
- { if (blur != null) blur .call(e); }
- };
- }
-
- // Produce a KeyListener with functional interfaces
- public static KeyListener onKey(OnKey down, OnKey up) {
- return new KeyListener() {
- public void keyTyped (KeyEvent e) { }
- public void keyPressed (KeyEvent e)
- { if (down != null) down.call(e); }
- public void keyReleased(KeyEvent e)
- { if (up != null) up .call(e); }
- };
- }
-
- // Produce a MouseMotionListener with a functional interface
- public static MouseMotionListener onMouseMove(OnMouse move, OnMouse drag) {
- return new MouseMotionListener() {
- public void mouseMoved (MouseEvent e)
- { if (move != null) move.call(e); }
- public void mouseDragged(MouseEvent e)
- { if (drag != null) drag.call(e); }
- };
- }
-
- // Produce a MouseListener with functional interfaces
- public static MouseListener onMouse(OnMouse down, OnMouse up) {
- return new MouseListener() {
- public void mouseClicked (MouseEvent e) { }
- public void mouseEntered (MouseEvent e) { }
- public void mouseExited (MouseEvent e) { }
- public void mousePressed (MouseEvent e)
- { if (down != null) down.call(e); }
- public void mouseReleased(MouseEvent e)
- { if (up != null) up .call(e); }
- };
- }
-
- // Produce a ComponentListener with a functional interface
- public static ComponentListener onResize(OnResize resize) {
- return new ComponentListener() {
- public void componentHidden (ComponentEvent e) { }
- public void componentMoved (ComponentEvent e) { }
- public void componentShown (ComponentEvent e) { }
- public void componentResized(ComponentEvent e)
- { if (resize != null) resize.call(e); }
- };
- }
-
- // Produce an AncestorListener using functional interfaces
- public static AncestorListener onVisible(OnVisible show, OnVisible hide) {
- return new AncestorListener() {
- public void ancestorMoved (AncestorEvent e) { }
- public void ancestorAdded (AncestorEvent e)
- { if (show != null) show.call(e); }
- public void ancestorRemoved(AncestorEvent e)
- { if (hide != null) hide.call(e); }
- };
- }
-
- // Configure the Swing look-and-feel with the system theme
- public static boolean setSystemLAF() {
- try {
- UIManager.setLookAndFeel(
- UIManager.getSystemLookAndFeelClassName());
- return true;
- } catch (Exception e) { return false; }
- }
-
- // Produce a JSplitPane with an un-styled divider
- public static JSplitPane splitPane(int orientation) {
- var split = new JSplitPane(orientation, null, null);
- split.setContinuousLayout(true);
- split.setDividerSize(2);
- split.setUI(new BasicSplitPaneUI() {
- public BasicSplitPaneDivider createDefaultDivider() {
- return new BasicSplitPaneDivider(this) {
- public void setBorder(Border b) { }
- };
- }
- });
- split.setBorder(null);
- return split;
- }
-
- // Read a text file, accounting for BOMs
- public static String textRead(String filename) {
-
- // Read the file
- byte[] data = fileRead(filename);
- if (data == null)
- return null;
-
- // Configure working variables
- byte[] mark = null;
- Charset set = StandardCharsets.ISO_8859_1; // Default charset
-
- // Check for a byte-order mark
- outer: for (BOM bom : BOMS) {
- if (data.length < bom.mark.length)
- continue;
- for (int x = 0; x < bom.mark.length; x++)
- if (data[x] != bom.mark[x])
- continue outer;
- mark = bom.mark;
- set = bom.set;
- break;
- }
-
- // Remove the byte-order mark from the data
- if (mark != null) {
- byte[] temp = new byte[data.length - mark.length];
- System.arraycopy(data, mark.length, temp, 0, temp.length);
- data = temp;
- }
-
- // Produce a string
- return new String(data, set);
- }
-
-}
diff --git a/src/desktop/util/XML.java b/src/desktop/util/XML.java
deleted file mode 100644
index 5d75b81..0000000
--- a/src/desktop/util/XML.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package util;
-
-// Java imports
-import java.io.*;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.w3c.dom.*;
-
-// Utility methods for managing XML documents
-public class XML {
-
- // This class cannot be instantiated
- private XML() { }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Parsing instance
- private static final DocumentBuilder XML_PARSER;
-
- // Static initializer
- static {
- DocumentBuilder parser = null;
- try { parser =
- DocumentBuilderFactory.newInstance().newDocumentBuilder();
- } catch (Exception e) { }
- XML_PARSER = parser;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Static Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Retrieve an attribute value from an XML element
- public static String attribute(Element element, String attribute) {
- return element.hasAttribute(attribute) ?
- element.getAttribute(attribute) : null;
- }
-
- // Retrieve the child elements of an XML node
- public static Element[] children(Node node) {
- var nodes = node.getChildNodes();
- int count = nodes.getLength();
- var ret = new ArrayList();
- for (int x = 0; x < count; x++) {
- node = nodes.item(x);
- if (node.getNodeType() == Node.ELEMENT_NODE)
- ret.add((Element) node);
- }
- return ret.toArray(new Element[ret.size()]);
- }
-
- // Retrieve the first node matching the given hierarchy
- public static Element element(Node node, String hierarchy) {
-
- // Error checking
- if (node == null || hierarchy == null)
- return null;
-
- // Propagate down the hierarchy
- outer: for (String name : hierarchy.split("\\.")) {
- var nodes = node.getChildNodes();
- int count = nodes.getLength();
- for (int x = 0; x < count; x++) {
- node = nodes.item(x);
- if (
- node.getNodeType() == Node.ELEMENT_NODE &&
- node.getNodeName().equals(name)
- ) continue outer;
- }
- return null;
- }
-
- return (Element) node;
- }
-
- // Retrieve all nodes matching the endpoint of a given hierarchy
- public static Element[] elements(Node node, String hierarchy) {
-
- // Find the first matching node
- node = element(node, hierarchy);
- if (node == null)
- return new Element[0];
-
- // Working variables
- var names = hierarchy.split("\\.");
- String name = names[names.length - 1];
- var ret = new ArrayList();
-
- // Include all siblings with the same tag name
- ret.add((Element) node);
- for (;;) {
- node = node.getNextSibling();
- if (node == null)
- break;
- if (
- node.getNodeType() == Node.ELEMENT_NODE &&
- node.getNodeName().equals(name)
- ) ret.add((Element) node);
- }
-
- return ret.toArray(new Element[ret.size()]);
- }
-
- // Read and parse an XML file
- public static Node read(String filename) {
- try { return XML_PARSER.parse(
- new ByteArrayInputStream(Util.fileRead(filename)));
- } catch (Exception e) { return null; }
- }
-
- // Retrieve the text content of an element
- public static String text(Node node) {
-
- // Error checking
- if (node == null)
- return null;
-
- // Find the child node called #text
- var nodes = node.getChildNodes();
- int count = nodes.getLength();
- for (int x = 0; x < count; x++) {
- node = nodes.item(x);
- if (node.getNodeType() != Node.TEXT_NODE)
- continue;
- String text = node.getNodeValue();
- return text == null ? "" : text.trim();
- }
- return "";
- }
-
-}
diff --git a/src/desktop/vue/Access.java b/src/desktop/vue/Access.java
deleted file mode 100644
index 1e1cfff..0000000
--- a/src/desktop/vue/Access.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package vue;
-
-// Access state
-public class Access {
-
- // Instance fields
- public int address; // CPU bus address
- public int fetch; // Index of machine code unit
- public int type; // Data type
- public int value; // Value read/to write
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- Access() { }
-
-}
diff --git a/src/desktop/vue/Breakpoint.c b/src/desktop/vue/Breakpoint.c
deleted file mode 100644
index 762eb64..0000000
--- a/src/desktop/vue/Breakpoint.c
+++ /dev/null
@@ -1,576 +0,0 @@
-// This file is included through NativeVue.c and cannot be built directly. */
-#ifdef NATIVEVUE
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Constants //
-///////////////////////////////////////////////////////////////////////////////
-
-// Hook flags
-#define BRK_EXCEPTION 0x00000001
-#define BRK_EXECUTE 0x00000002
-#define BRK_FRAME 0x00000004
-#define BRK_READ 0x00000008
-#define BRK_WRITE 0x00000010
-
-// Token types
-#define BRK_BOOL 0 /* Value types */
-#define BRK_SIGNED 1
-#define BRK_UNSIGNED 2
-#define BRK_FLOAT 3
-#define BRK_SYMBOL 4 /* Symbol types */
-#define BRK_PROREG 5
-#define BRK_SYSREG 6
-#define BRK_UNARY 7 /* Operator types */
-#define BRK_BINARY 8
-
-
-// Functional symbol IDs
-#define BRK_ADDRESS 0
-#define BRK_BREAK 1
-#define BRK_CODE 2
-#define BRK_COND 3
-#define BRK_DISP 4
-#define BRK_FETCH 5
-#define BRK_FORMAT 6
-#define BRK_ID 7
-#define BRK_IMM 8
-#define BRK_OPCODE 9
-#define BRK_REG1 10
-#define BRK_REG2 11
-#define BRK_REGID 12
-#define BRK_SIZE 13
-#define BRK_SUBOPCODE 14
-#define BRK_TYPE 15
-#define BRK_VALUE 16
-#define BRK_VECTOR 17
-
-// Evaluation operator IDs
-#define BRK_XS32 1 /* xs32, xword */
-#define BRK_XU32 2 /* xu32, xuword */
-#define BRK_XFLOAT 3 /* xfloat */
-#define BRK_READ8 4 /* [] */
-#define BRK_READ16 5 /* [] */
-#define BRK_READ32 6 /* [] */
-#define BRK_BOOL_ - 2 /* bool */
-#define BRK_S32 - 3 /* s32, word */
-#define BRK_U32 - 4 /* u32, uword */
-#define BRK_FLOAT_ - 5 /* float */
-#define BRK_ADD - 6 /* + */
-#define BRK_AND_B - 7 /* & */
-#define BRK_AND_L - 8 /* && */
-#define BRK_CEIL - 9 /* ceil */
-#define BRK_DIVIDE -10 /* / */
-#define BRK_EQUAL -11 /* == */
-#define BRK_FLOOR -12 /* floor */
-#define BRK_GREATER -13 /* > */
-#define BRK_GREQUAL -14 /* >= */
-#define BRK_LEFT_L -15 /* << */
-#define BRK_LEQUAL -16 /* <= */
-#define BRK_LESS -17 /* < */
-#define BRK_MULTIPLY -18 /* * */
-#define BRK_NEQUAL -19 /* != */
-#define BRK_NOT_B -20 /* ~ */
-#define BRK_NOT_L -21 /* ! */
-#define BRK_NEGATE -22 /* - */
-#define BRK_OR_B -23 /* | */
-#define BRK_OR_L -24 /* || */
-#define BRK_REMAINDER -25 /* % */
-#define BRK_RIGHT_A -26 /* >> */
-#define BRK_RIGHT_L -27 /* >>> */
-#define BRK_ROUND -28 /* round */
-#define BRK_S8 -29 /* s8, byte */
-#define BRK_S16 -30 /* s16, halfword */
-#define BRK_SUBTRACT -31 /* - */
-#define BRK_TRUNC -32 /* trunc */
-#define BRK_U8 -33 /* u8, ubyte */
-#define BRK_U16 -34 /* u16, uhalfword */
-#define BRK_XOR_B -36 /* ^ */
-#define BRK_XOR_L -37 /* ^^ */
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Internal Functions //
-///////////////////////////////////////////////////////////////////////////////
-
-// Adjust a float value as needed
-static int brkAdjust(float value) {
- int32_t bits = *(int32_t *)&value;
- int exp = bits & 0x7F800000;
- return
- (bits & 0x7FFFFFFF) == 0 || // Zero
- exp == 0x7F800000 || // Indefinite
- exp == 0 // Denormal
- ? 0 : bits;
-}
-
-// Evaluate a binary operator
-static int32_t brkEvalBinary(int32_t id, int32_t left, int32_t right) {
-
- // Processing by ID
- switch (id) {
-
- // Add
- case -BRK_ADD * 4 + BRK_BOOL:
- case -BRK_ADD * 4 + BRK_SIGNED:
- case -BRK_ADD * 4 + BRK_UNSIGNED:
- return left + right;
- case -BRK_ADD * 4 + BRK_FLOAT:
- return brkAdjust(*(float *)&left + *(float *)&right);
-
- // And Bitwise
- case -BRK_AND_B * 4 + BRK_BOOL:
- case -BRK_AND_B * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_AND_B * 4 + BRK_SIGNED:
- case -BRK_AND_B * 4 + BRK_UNSIGNED:
- return left & right;
-
- // And Logical
- case -BRK_AND_L * 4 + BRK_BOOL:
- case -BRK_AND_L * 4 + BRK_FLOAT:
- case -BRK_AND_L * 4 + BRK_SIGNED:
- case -BRK_AND_L * 4 + BRK_UNSIGNED:
- return left == 0 ? left : right;
-
- // Divide
- case -BRK_DIVIDE * 4 + BRK_BOOL:
- case -BRK_DIVIDE * 4 + BRK_SIGNED:
- return right == 0 ? 0 : left / right;
- case -BRK_DIVIDE * 4 + BRK_UNSIGNED:
- return right == 0 ? 0 : (uint32_t) left / right;
- case -BRK_DIVIDE * 4 + BRK_FLOAT:
- return right == 0 ? 0 :
- brkAdjust(*(float *)&left / *(float *)&right);
-
- // Equal
- case -BRK_EQUAL * 4 + BRK_BOOL:
- case -BRK_EQUAL * 4 + BRK_FLOAT:
- case -BRK_EQUAL * 4 + BRK_SIGNED:
- case -BRK_EQUAL * 4 + BRK_UNSIGNED:
- return left == right ? 1 : 0;
-
- // Greater
- case -BRK_GREATER * 4 + BRK_BOOL:
- case -BRK_GREATER * 4 + BRK_SIGNED:
- return left > right ? 1 : 0;
- case -BRK_GREATER * 4 + BRK_UNSIGNED:
- return (uint32_t) left > right ? 1 : 0;
- case -BRK_GREATER * 4 + BRK_FLOAT:
- return *(float *)&left > *(float *)&right ? 1 : 0;
-
- // Greater or Equal
- case -BRK_GREQUAL * 4 + BRK_BOOL:
- case -BRK_GREQUAL * 4 + BRK_SIGNED:
- return left >= right ? 1 : 0;
- case -BRK_GREQUAL * 4 + BRK_UNSIGNED:
- return (uint32_t) left >= right ? 1 : 0;
- case -BRK_GREQUAL * 4 + BRK_FLOAT:
- return *(float *)&left >= *(float *)&right ? 1 : 0;
-
- // Shift Left
- case -BRK_LEFT_L * 4 + BRK_BOOL:
- case -BRK_LEFT_L * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_LEFT_L * 4 + BRK_SIGNED:
- case -BRK_LEFT_L * 4 + BRK_UNSIGNED:
- return left << (right & 31);
-
- // Less or Equal
- case -BRK_LEQUAL * 4 + BRK_BOOL:
- case -BRK_LEQUAL * 4 + BRK_SIGNED:
- return left <= right ? 1 : 0;
- case -BRK_LEQUAL * 4 + BRK_UNSIGNED:
- return (uint32_t) left <= right ? 1 : 0;
- case -BRK_LEQUAL * 4 + BRK_FLOAT:
- return *(float *)&left <= *(float *)&right ? 1 : 0;
-
- // Less
- case -BRK_LESS * 4 + BRK_BOOL:
- case -BRK_LESS * 4 + BRK_SIGNED:
- return left < right ? 1 : 0;
- case -BRK_LESS * 4 + BRK_UNSIGNED:
- return (uint32_t) left < right ? 1 : 0;
- case -BRK_LESS * 4 + BRK_FLOAT:
- return *(float *)&left < *(float *)&right ? 1 : 0;
-
- // Multiply
- case -BRK_MULTIPLY * 4 + BRK_BOOL:
- case -BRK_MULTIPLY * 4 + BRK_SIGNED:
- return left * right;
- case -BRK_MULTIPLY * 4 + BRK_UNSIGNED:
- return (uint32_t) left * right;
- case -BRK_MULTIPLY * 4 + BRK_FLOAT:
- return brkAdjust(*(float *)&left * *(float *)&right);
-
- // Not Equal
- case -BRK_NEQUAL * 4 + BRK_BOOL:
- case -BRK_NEQUAL * 4 + BRK_FLOAT:
- case -BRK_NEQUAL * 4 + BRK_SIGNED:
- case -BRK_NEQUAL * 4 + BRK_UNSIGNED:
- return left != right ? 1 : 0;
-
- // Or Bitwise
- case -BRK_OR_B * 4 + BRK_BOOL:
- case -BRK_OR_B * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_OR_B * 4 + BRK_SIGNED:
- case -BRK_OR_B * 4 + BRK_UNSIGNED:
- return left | right;
-
- // Or Logical
- case -BRK_OR_L * 4 + BRK_BOOL:
- case -BRK_OR_L * 4 + BRK_FLOAT:
- case -BRK_OR_L * 4 + BRK_SIGNED:
- case -BRK_OR_L * 4 + BRK_UNSIGNED:
- return left != 0 ? left : right;
-
- // Remainder
- case -BRK_REMAINDER * 4 + BRK_BOOL:
- case -BRK_REMAINDER * 4 + BRK_SIGNED:
- return right == 0 ? 0 : left % right;
- case -BRK_REMAINDER * 4 + BRK_UNSIGNED:
- return right == 0 ? 0 : (uint32_t) left % right;
- case -BRK_REMAINDER * 4 + BRK_FLOAT:
- return right == 0 ? 0 :
- brkAdjust(fmodf(*(float *)&left, *(float *)&right));
-
- // Shift Right Arithmetic
- case -BRK_RIGHT_A * 4 + BRK_BOOL:
- case -BRK_RIGHT_A * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_RIGHT_A * 4 + BRK_SIGNED:
- case -BRK_RIGHT_A * 4 + BRK_UNSIGNED:
- return SIGN_EXTEND(left >> (right & 31), 32 - (right & 31));
-
- // Shift Right Logical
- case -BRK_RIGHT_L * 4 + BRK_BOOL:
- case -BRK_RIGHT_L * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_RIGHT_L * 4 + BRK_SIGNED:
- case -BRK_RIGHT_L * 4 + BRK_UNSIGNED:
- return left >> (right & 31) & ((int32_t) -1 << (right & 31));
-
- // Subtract
- case -BRK_SUBTRACT * 4 + BRK_BOOL:
- case -BRK_SUBTRACT * 4 + BRK_SIGNED:
- case -BRK_SUBTRACT * 4 + BRK_UNSIGNED:
- return left - right;
- case -BRK_SUBTRACT * 4 + BRK_FLOAT:
- return brkAdjust(*(float *)&left - *(float *)&right);
-
- // Exclusive Or Bitwise
- case -BRK_XOR_B * 4 + BRK_BOOL:
- case -BRK_XOR_B * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_XOR_B * 4 + BRK_SIGNED:
- case -BRK_XOR_B * 4 + BRK_UNSIGNED:
- return left ^ right;
-
- // Exclusive Or Logical
- case -BRK_XOR_L * 4 + BRK_BOOL:
- case -BRK_XOR_L * 4 + BRK_FLOAT:
- case -BRK_XOR_L * 4 + BRK_SIGNED:
- case -BRK_XOR_L * 4 + BRK_UNSIGNED:
- return left != 0 && right != 0 ? 0 : left != 0 ? left : right;
-
- }
-
- // Unreachable
- return 0;
-}
-
-// Evaluate a unary operator
-static int32_t brkEvalUnary(Vue *vue, int32_t id, int32_t operand) {
- float val; // Working variable
-
- // Processing by ID
- switch (id) {
-
- // Cast to Boolean
- case -BRK_BOOL_ * 4 + BRK_BOOL: // Removed by parser
- case -BRK_BOOL_ * 4 + BRK_FLOAT:
- case -BRK_BOOL_ * 4 + BRK_SIGNED:
- case -BRK_BOOL_ * 4 + BRK_UNSIGNED:
- return operand == 0 ? 0 : 1;
-
- // Round up
- case -BRK_CEIL * 4 + BRK_BOOL: // Removed by parser
- case -BRK_CEIL * 4 + BRK_FLOAT:
- case -BRK_CEIL * 4 + BRK_SIGNED: // Removed by parser
- case -BRK_CEIL * 4 + BRK_UNSIGNED: // Removed by parser
- return brkAdjust(ceilf(*(float *)&operand));
-
- // Cast to Float
- case -BRK_FLOAT_ * 4 + BRK_BOOL:
- case -BRK_FLOAT_ * 4 + BRK_FLOAT: // Removed by parser
- case -BRK_FLOAT_ * 4 + BRK_SIGNED:
- return brkAdjust(operand);
- case -BRK_FLOAT_ * 4 + BRK_UNSIGNED:
- return brkAdjust((uint32_t) operand);
-
- // Round down
- case -BRK_FLOOR * 4 + BRK_BOOL: // Removed by parser
- case -BRK_FLOOR * 4 + BRK_FLOAT:
- case -BRK_FLOOR * 4 + BRK_SIGNED: // Removed by parser
- case -BRK_FLOOR * 4 + BRK_UNSIGNED: // Removed by parser
- return brkAdjust(floorf(*(float *)&operand));
-
- // Bitwise Not
- case -BRK_NOT_B * 4 + BRK_BOOL:
- case -BRK_NOT_B * 4 + BRK_FLOAT: // Prevented by parser
- case -BRK_NOT_B * 4 + BRK_SIGNED:
- case -BRK_NOT_B * 4 + BRK_UNSIGNED:
- return ~operand;
-
- // Logical Not
- case -BRK_NOT_L * 4 + BRK_BOOL:
- case -BRK_NOT_L * 4 + BRK_FLOAT:
- case -BRK_NOT_L * 4 + BRK_SIGNED:
- case -BRK_NOT_L * 4 + BRK_UNSIGNED:
- return operand == 0 ? 1 : 0;
-
- // Negate
- case -BRK_NEGATE * 4 + BRK_BOOL:
- case -BRK_NEGATE * 4 + BRK_SIGNED:
- case -BRK_NEGATE * 4 + BRK_UNSIGNED: // Removed by parser
- return -operand;
- case -BRK_NEGATE * 4 + BRK_FLOAT:
- return brkAdjust(-*(float *)&operand);
-
- // Read Byte
- case BRK_READ8:
- return vueRead(vue, operand, VUE_S8);
-
- // Read Halfword
- case BRK_READ16:
- return vueRead(vue, operand, VUE_S16);
-
- // Read Word
- case BRK_READ32:
- return vueRead(vue, operand, VUE_S32);
-
- // Round to Nearest
- case -BRK_ROUND * 4 + BRK_BOOL: // Removed by parser
- case -BRK_ROUND * 4 + BRK_FLOAT:
- case -BRK_ROUND * 4 + BRK_SIGNED: // Removed by parser
- case -BRK_ROUND * 4 + BRK_UNSIGNED: // Removed by parser
- return brkAdjust(roundf(*(float *)&operand));
-
- // Cast to Signed Byte
- case -BRK_S8 * 4 + BRK_FLOAT:
- operand = brkEvalUnary(vue, -BRK_S32 * 4 + BRK_FLOAT, operand);
- // Fallthrough
- case -BRK_S8 * 4 + BRK_BOOL:
- case -BRK_S8 * 4 + BRK_SIGNED:
- case -BRK_S8 * 4 + BRK_UNSIGNED:
- return SIGN_EXTEND(operand, 8);
-
- // Cast to Signed Halfword
- case -BRK_S16 * 4 + BRK_FLOAT:
- operand = brkEvalUnary(vue, -BRK_S32 * 4 + BRK_FLOAT, operand);
- // Fallthrough
- case -BRK_S16 * 4 + BRK_BOOL:
- case -BRK_S16 * 4 + BRK_SIGNED:
- case -BRK_S16 * 4 + BRK_UNSIGNED:
- return SIGN_EXTEND(operand, 16);
-
- // Cast to Signed Word
- case -BRK_S32 * 4 + BRK_BOOL:
- case -BRK_S32 * 4 + BRK_SIGNED: // Removed by parser
- case -BRK_S32 * 4 + BRK_UNSIGNED:
- return operand;
- case -BRK_S32 * 4 + BRK_FLOAT:
- val = *(float *)&operand;
- return val >= -MAX_WORD && val < MAX_WORD ? (int32_t) val : 0;
-
- // Truncate
- case -BRK_TRUNC * 4 + BRK_BOOL: // Removed by parser
- case -BRK_TRUNC * 4 + BRK_FLOAT:
- case -BRK_TRUNC * 4 + BRK_SIGNED: // Removed by parser
- case -BRK_TRUNC * 4 + BRK_UNSIGNED: // Removed by parser
- return brkAdjust(truncf(*(float *)&operand));
-
- // Cast to Unsigned Byte
- case -BRK_U8 * 4 + BRK_FLOAT:
- operand = brkEvalUnary(vue, -BRK_S32 * 4 + BRK_FLOAT, operand);
- case -BRK_U8 * 4 + BRK_BOOL:
- case -BRK_U8 * 4 + BRK_SIGNED:
- case -BRK_U8 * 4 + BRK_UNSIGNED:
- return operand & 0xFF;
-
- // Cast to Unsigned Halfword
- case -BRK_U16 * 4 + BRK_FLOAT:
- operand = brkEvalUnary(vue, -BRK_S32 * 4 + BRK_FLOAT, operand);
- case -BRK_U16 * 4 + BRK_BOOL:
- case -BRK_U16 * 4 + BRK_SIGNED:
- case -BRK_U16 * 4 + BRK_UNSIGNED:
- return operand & 0xFFFF;
-
- // Cast to Unsigned Word
- case -BRK_U32 * 4 + BRK_BOOL:
- case -BRK_U32 * 4 + BRK_SIGNED:
- case -BRK_U32 * 4 + BRK_UNSIGNED: // Removed by parser
- return operand;
- case -BRK_U32 * 4 + BRK_FLOAT:
- val = *(float *)&operand;
- return val >= 0 && val < MAX_UWORD ? (uint32_t) val : 0;
-
- // Reinterpret as Float
- case BRK_XFLOAT:
- return brkAdjust(*(float *)&operand);
-
- // Reinterpret as Signed Word, Reinterpret as Unsigned Word
- //case BRK_XS32: // Removed by parser
- //case BRK_XU32: // Removed by parser
- }
-
- // Unreachable
- return 0;
-}
-
-// Evaluate the condition, returning only the computed value
-static int32_t brkEvaluate(Core *core, Breakpoint *brk) {
- int32_t *stack = core->stack;
- Vue *vue = &core->vue;
-
- // Process all tokens
- int size = 0;
- Token *tok;
- int32_t x, sym; // Working variables
- for (tok = &brk->tokens[x=0]; x < brk->numTokens; tok = &brk->tokens[++x])
- switch (tok->type) {
-
- // Binary operator
- case BRK_BINARY:
- stack[size - 2] =
- brkEvalBinary(tok->id, stack[size - 2], stack[size - 1]);
- size--;
- break;
-
- // Literal
- case BRK_BOOL:
- case BRK_FLOAT:
- case BRK_SIGNED:
- case BRK_UNSIGNED:
- stack[size++] = tok->id;
- break;
-
- // CPU register
- case BRK_PROREG:
- case BRK_SYSREG:
- stack[size++] = vueGetRegister(vue,tok->id,tok->type==BRK_SYSREG);
- break;
-
- // Unary operator
- case BRK_UNARY:
- stack[size - 1] = brkEvalUnary(vue, tok->id, stack[size - 1]);
- break;
-
- // Symbol
- case BRK_SYMBOL:
- sym = vue->cpu.inst.imm; // IMM, REGID, VECTOR
- switch (tok->id) {
- case BRK_ADDRESS : sym = vue->cpu.access.address; break;
- case BRK_BREAK : sym = core->breakType ; break;
- case BRK_CODE : sym = vue->cpu.exception ; break;
- case BRK_COND : sym = vue->cpu.inst.cond ; break;
- case BRK_DISP : sym = vue->cpu.inst.disp ; break;
- case BRK_FETCH : sym = vue->cpu.fetch ; break;
- case BRK_FORMAT : sym = vue->cpu.inst.format ; break;
- case BRK_ID : sym = vue->cpu.inst.id ; break;
- case BRK_OPCODE : sym = vue->cpu.inst.opcode ; break;
- case BRK_REG1 : sym = vue->cpu.inst.reg1 ; break;
- case BRK_REG2 : sym = vue->cpu.inst.reg2 ; break;
- case BRK_SIZE : sym = vue->cpu.inst.size ; break;
- case BRK_SUBOPCODE: sym = vue->cpu.inst.subopcode; break;
- case BRK_TYPE : sym = vue->cpu.access.type ; break;
- case BRK_VALUE : sym = vue->cpu.access.value ; break;
- }
- stack[size++] = sym;
- break;
-
- }
-
- // Return the remaining stack value
- return stack[0];
-}
-
-// Determine whether the breakpoint applies to a given address range
-static vbool brkInRange(Breakpoint *brk, uint32_t start, uint32_t end) {
-
- // Implicit inclusion
- if (brk->numRanges == 0)
- return VUE_TRUE;
-
- // Check all ranges
- for (int x = 0; x < brk->numRanges; x++) {
- uint32_t *range = &brk->ranges[x * 2];
- if (
- start - range[0] <= range[1] - range[0] ||
- range[0] - start <= end - start
- ) return VUE_TRUE;
- }
- return VUE_FALSE;
-}
-
-// Check for breakpoints
-static int32_t brkOnBreakpoint(Vue *vue, int32_t breakType) {
- Core *core = (Core *) vue->tag;
- uint32_t end = 0;
- vbool ranged = VUE_FALSE;
- uint32_t start = 0;
- core->breakType = breakType;
-
- // Processing for Execute
- if (breakType == BRK_EXECUTE) {
- ranged = VUE_TRUE;
- start = vue->cpu.pc;
- end = start + vue->cpu.inst.size - 1;
- }
-
- // Processing for Read and Write
- else if (breakType == BRK_READ || breakType == BRK_WRITE) {
- ranged = VUE_TRUE;
- start = vue->cpu.access.address;
- end = start + TYPE_SIZES[vue->cpu.access.type] - 1;
- }
-
- // Check all breakpoints
- int32_t fetch = breakType == BRK_READ && vue->cpu.fetch != -1 ? 1 : 0;
- for (int x = 0; x < core->numBreakpoints; x++) {
- Breakpoint *brk = &core->breakpoints[x];
- if (
- brk->enabled && (brk->fetch || !fetch) &&
- (breakType == 0 || (breakType & brk->hooks) != 0) &&
- (!ranged || brkInRange(brk, start, end)) &&
- (brk->numTokens == 0 || brkEvaluate(core, brk) != 0)
- ) return x + 1;
- }
- return 0;
-}
-
-// Check for exception breakpoints
-static int32_t brkOnException(Vue *vue, uint16_t code) {
- return brkOnBreakpoint(vue, BRK_EXCEPTION);
-}
-
-// Check for execute breakpoints
-static int32_t brkOnExecute(Vue *vue, VueInstruction *inst) {
- return brkOnBreakpoint(vue, BRK_EXECUTE);
-}
-
-// Check for frame breakpoints
-static int32_t brkOnFrame(Vue *vue) {
- return brkOnBreakpoint(vue, BRK_FRAME);
-}
-
-// Check for read breakpoints
-static int32_t brkOnRead(Vue *vue, VueAccess *acc) {
- return brkOnBreakpoint(vue, BRK_READ);
-}
-
-// Check for write breakpoints
-static int32_t brkOnWrite(Vue *vue, VueAccess *acc) {
- return brkOnBreakpoint(vue, BRK_WRITE);
-}
-
-
-
-#endif // NATIVEVUE
diff --git a/src/desktop/vue/Breakpoint.java b/src/desktop/vue/Breakpoint.java
deleted file mode 100644
index 59dca91..0000000
--- a/src/desktop/vue/Breakpoint.java
+++ /dev/null
@@ -1,2104 +0,0 @@
-package vue;
-
-// Java imports
-import java.util.*;
-
-// Breakpoint descriptor
-public class Breakpoint {
-
- // Instance fields
- private Error addressError; // Address parsing error
- private String addresses; // Un-processed address ranges
- private String condition; // Un-processed condition
- private Error conditionError; // Condition parsing error
- private int dataType; // Condition evaluation data type
- private int depth; // Stack size for condition evaluation
- private boolean fetch; // Breakpoint traps fetch reads
- private int hooks; // Applied breakpoint types
- private boolean isEnabled; // Breakpoint is active
- private String name; // Display name
- private int[][] ranges; // Applicable address ranges
- private Token[] tokens; // Condition tokens
- private Vue vue; // Containing emulation context
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Error codes
- public static final int NONE = 0; // Parsing was successful
- public static final int BADLITERAL = 1; // Primitive parse failed
- public static final int BADOPERAND = 2; // Operator/operand type mismatch
- public static final int BADTOKEN = 3; // No token matched
- public static final int EARLYEOF = 4; // Last token not value or close
- public static final int INVALID = 5; // Operator not allowed here
- public static final int NESTING = 6; // ()[] mismatch, underflow
- public static final int UNEXPECTED = 7; // Character not allowed here
-
- // Hook flags
- static final int EXCEPTION = 0x00000001;
- static final int EXECUTE = 0x00000002;
- static final int FRAME = 0x00000004;
- static final int READ = 0x00000008;
- static final int WRITE = 0x00000010;
-
- // Token types
- private static final int BOOL = 0; // Value types
- private static final int SIGNED = 1;
- private static final int UNSIGNED = 2;
- private static final int FLOAT = 3;
- private static final int SYMBOL = 4; // Symbol types
- private static final int PROREG = 5;
- private static final int SYSREG = 6;
- private static final int UNARY = 7; // Operator types
- private static final int BINARY = 8;
- private static final int OPEN = 9;
- private static final int CLOSE = 10;
-
- // Expected token modes adjacent to any given token
- // 0 = Value, unary or open expected, 1 = Binary or close expected
- private static final int MODES_AFTER = 0b10001111111;
- private static final int MODES_BEFORE = 0b10100000000;
-
- // Functional symbol IDs
- private static final int ADDRESS = 0;
- private static final int BREAK = 1;
- private static final int CODE = 2;
- private static final int COND = 3;
- private static final int DISP = 4;
- private static final int FETCH = 5;
- private static final int FORMAT = 6;
- private static final int ID = 7;
- private static final int IMM = 8;
- private static final int OPCODE = 9;
- private static final int REG1 = 10;
- private static final int REG2 = 11;
- private static final int REGID = 12;
- private static final int SIZE = 13;
- private static final int SUBOPCODE = 14;
- private static final int TYPE = 15;
- private static final int VALUE = 16;
- private static final int VECTOR = 17;
-
- // Evaluation operator IDs
- private static final int GROUP = 0; // ()
- private static final int XS32 = 1; // xs32, xword
- private static final int XU32 = 2; // xu32, xuword
- private static final int XFLOAT = 3; // xfloat
- private static final int READ8 = 4; // []
- private static final int READ16 = 5; // []
- private static final int READ32 = 6; // []
- private static final int BOOL_ = - 2; // bool
- private static final int S32 = - 3; // s32, word
- private static final int U32 = - 4; // u32, uword
- private static final int FLOAT_ = - 5; // float
- private static final int ADD = - 6; // +
- private static final int AND_B = - 7; // &
- private static final int AND_L = - 8; // &&
- private static final int CEIL = - 9; // ceil
- private static final int DIVIDE = -10; // /
- private static final int EQUAL = -11; // ==
- private static final int FLOOR = -12; // floor
- private static final int GREATER = -13; // >
- private static final int GREQUAL = -14; // >=
- private static final int LEFT_L = -15; // <<
- private static final int LEQUAL = -16; // <=
- private static final int LESS = -17; // <
- private static final int MULTIPLY = -18; // *
- private static final int NEQUAL = -19; // !=
- private static final int NOT_B = -20; // ~
- private static final int NOT_L = -21; // !
- private static final int NEGATE = -22; // -
- private static final int OR_B = -23; // |
- private static final int OR_L = -24; // ||
- private static final int REMAINDER = -25; // %
- private static final int RIGHT_A = -26; // >>
- private static final int RIGHT_L = -27; // >>>
- private static final int ROUND = -28; // round
- private static final int S8 = -29; // s8, byte
- private static final int S16 = -30; // s16, halfword
- private static final int SUBTRACT = -31; // -
- private static final int TRUNC = -32; // trunc
- private static final int U8 = -33; // u8, ubyte
- private static final int U16 = -34; // u16, uhalfword
- private static final int XOR_B = -36; // ^
- private static final int XOR_L = -37; // ^^
-
- // Integer-float conversion
- private static final float MAX_WORD = (float) Math.pow(2, 31);
- private static final float MAX_UWORD = (float) Math.pow(2, 32);
-
- // Token definitions
- private static final HashMap OPDEFS;
- private static final HashMap SYMDEFS;
-
- // Static initializer
- static {
- OPDEFS = new HashMap();
- SYMDEFS = new HashMap();
-
- // Operator definitions
- OPDEFS.put("(" , new Def( 0, OPEN , GROUP ));
- OPDEFS.put(")" , new Def( 0, CLOSE , GROUP ));
- OPDEFS.put("[" , new Def( 0, OPEN , READ32 ));
- OPDEFS.put("]" , new Def( 0, CLOSE , READ32 ));
- OPDEFS.put("~" , new Def( 1, UNARY , NOT_B ));
- OPDEFS.put("!" , new Def( 1, UNARY , NOT_L ));
- OPDEFS.put("-" , new Def( 1, UNARY , NEGATE ));
- OPDEFS.put("bool" , new Def( 1, UNARY , BOOL_ ));
- OPDEFS.put("byte" , new Def( 1, UNARY , S8 ));
- OPDEFS.put("ceil" , new Def( 1, UNARY , CEIL ));
- OPDEFS.put("float" , new Def( 1, UNARY , FLOAT_ ));
- OPDEFS.put("floor" , new Def( 1, UNARY , FLOOR ));
- OPDEFS.put("halfword" , new Def( 1, UNARY , S16 ));
- OPDEFS.put("round" , new Def( 1, UNARY , ROUND ));
- OPDEFS.put("s8" , new Def( 1, UNARY , S8 ));
- OPDEFS.put("s16" , new Def( 1, UNARY , S16 ));
- OPDEFS.put("s32" , new Def( 1, UNARY , S32 ));
- OPDEFS.put("trunc" , new Def( 1, UNARY , TRUNC ));
- OPDEFS.put("u8" , new Def( 1, UNARY , U8 ));
- OPDEFS.put("u16" , new Def( 1, UNARY , U16 ));
- OPDEFS.put("u32" , new Def( 1, UNARY , U32 ));
- OPDEFS.put("ubyte" , new Def( 1, UNARY , U8 ));
- OPDEFS.put("uhalfword", new Def( 1, UNARY , U16 ));
- OPDEFS.put("uword" , new Def( 1, UNARY , U32 ));
- OPDEFS.put("word" , new Def( 1, UNARY , S32 ));
- OPDEFS.put("xfloat" , new Def( 1, UNARY , XFLOAT ));
- OPDEFS.put("xs32" , new Def( 1, UNARY , XS32 ));
- OPDEFS.put("xu32" , new Def( 1, UNARY , XU32 ));
- OPDEFS.put("xuword" , new Def( 1, UNARY , XU32 ));
- OPDEFS.put("xword" , new Def( 1, UNARY , XS32 ));
- OPDEFS.put("/" , new Def( 2, BINARY, DIVIDE ));
- OPDEFS.put("*" , new Def( 2, BINARY, MULTIPLY ));
- OPDEFS.put("%" , new Def( 2, BINARY, REMAINDER));
- OPDEFS.put("+" , new Def( 3, BINARY, ADD ));
- OPDEFS.put("<<" , new Def( 4, BINARY, LEFT_L ));
- OPDEFS.put(">>" , new Def( 4, BINARY, RIGHT_A ));
- OPDEFS.put(">>>" , new Def( 4, BINARY, RIGHT_L ));
- OPDEFS.put(">" , new Def( 5, BINARY, GREATER ));
- OPDEFS.put(">=" , new Def( 5, BINARY, GREQUAL ));
- OPDEFS.put("<" , new Def( 5, BINARY, LESS ));
- OPDEFS.put("<=" , new Def( 5, BINARY, LEQUAL ));
- OPDEFS.put("==" , new Def( 6, BINARY, EQUAL ));
- OPDEFS.put("!=" , new Def( 6, BINARY, NEQUAL ));
- OPDEFS.put("&" , new Def( 7, BINARY, AND_B ));
- OPDEFS.put("^" , new Def( 8, BINARY, XOR_B ));
- OPDEFS.put("|" , new Def( 9, BINARY, OR_B ));
- OPDEFS.put("&&" , new Def(10, BINARY, AND_L ));
- OPDEFS.put("^^" , new Def(11, BINARY, XOR_L ));
- OPDEFS.put("||" , new Def(12, BINARY, OR_L ));
-
- // Boolean symbol definitions
- SYMDEFS.put("false", new Def(BOOL, 0));
- SYMDEFS.put("true" , new Def(BOOL, 1));
-
- // Break type symbl definitions
- SYMDEFS.put("exception", new Def(SIGNED, EXCEPTION));
- SYMDEFS.put("execute" , new Def(SIGNED, EXECUTE ));
- SYMDEFS.put("read" , new Def(SIGNED, READ ));
- SYMDEFS.put("write" , new Def(SIGNED, WRITE ));
-
- // Condition code symbol definitions
- SYMDEFS.put("c" , new Def(SIGNED, 1));
- SYMDEFS.put("e" , new Def(SIGNED, 2));
- SYMDEFS.put("f" , new Def(SIGNED, 13));
- SYMDEFS.put("ge", new Def(SIGNED, 14));
- SYMDEFS.put("gt", new Def(SIGNED, 15));
- SYMDEFS.put("h" , new Def(SIGNED, 11));
- SYMDEFS.put("l" , new Def(SIGNED, 1));
- SYMDEFS.put("le", new Def(SIGNED, 7));
- SYMDEFS.put("lt", new Def(SIGNED, 6));
- SYMDEFS.put("n" , new Def(SIGNED, 4));
- SYMDEFS.put("nc", new Def(SIGNED, 9));
- SYMDEFS.put("ne", new Def(SIGNED, 10));
- SYMDEFS.put("nh", new Def(SIGNED, 3));
- SYMDEFS.put("nl", new Def(SIGNED, 9));
- SYMDEFS.put("nv", new Def(SIGNED, 8));
- SYMDEFS.put("nz", new Def(SIGNED, 10));
- SYMDEFS.put("p" , new Def(SIGNED, 12));
- SYMDEFS.put("t" , new Def(SIGNED, 5));
- SYMDEFS.put("v" , new Def(SIGNED, 0));
- SYMDEFS.put("z" , new Def(SIGNED, 2));
-
- // Instruction ID symbol definitions
- SYMDEFS.put("illegal", new Def(SIGNED, Vue.ILLEGAL));
- SYMDEFS.put("add_imm", new Def(SIGNED, Vue.ADD_IMM));
- SYMDEFS.put("add_reg", new Def(SIGNED, Vue.ADD_REG));
- SYMDEFS.put("addf.s" , new Def(SIGNED, Vue.ADDF_S ));
- SYMDEFS.put("addi" , new Def(SIGNED, Vue.ADDI ));
- SYMDEFS.put("and" , new Def(SIGNED, Vue.AND ));
- SYMDEFS.put("andbsu" , new Def(SIGNED, Vue.ANDBSU ));
- SYMDEFS.put("andi" , new Def(SIGNED, Vue.ANDI ));
- SYMDEFS.put("andnbsu", new Def(SIGNED, Vue.ANDNBSU));
- SYMDEFS.put("bcond" , new Def(SIGNED, Vue.BCOND ));
- SYMDEFS.put("caxi" , new Def(SIGNED, Vue.CAXI ));
- SYMDEFS.put("cli" , new Def(SIGNED, Vue.CLI ));
- SYMDEFS.put("cmp_imm", new Def(SIGNED, Vue.CMP_IMM));
- SYMDEFS.put("cmp_reg", new Def(SIGNED, Vue.CMP_REG));
- SYMDEFS.put("cmpf.s" , new Def(SIGNED, Vue.CMPF_S ));
- SYMDEFS.put("cvt.sw" , new Def(SIGNED, Vue.CVT_SW ));
- SYMDEFS.put("cvt.ws" , new Def(SIGNED, Vue.CVT_WS ));
- SYMDEFS.put("div" , new Def(SIGNED, Vue.DIV ));
- SYMDEFS.put("divf.s" , new Def(SIGNED, Vue.DIVF_S ));
- SYMDEFS.put("divu" , new Def(SIGNED, Vue.DIVU ));
- SYMDEFS.put("halt" , new Def(SIGNED, Vue.HALT ));
- SYMDEFS.put("in.b" , new Def(SIGNED, Vue.IN_B ));
- SYMDEFS.put("in.h" , new Def(SIGNED, Vue.IN_H ));
- SYMDEFS.put("in.w" , new Def(SIGNED, Vue.IN_W ));
- SYMDEFS.put("jal" , new Def(SIGNED, Vue.JAL ));
- SYMDEFS.put("jmp" , new Def(SIGNED, Vue.JMP ));
- SYMDEFS.put("jr" , new Def(SIGNED, Vue.JR ));
- SYMDEFS.put("ld.b" , new Def(SIGNED, Vue.LD_B ));
- SYMDEFS.put("ld.h" , new Def(SIGNED, Vue.LD_H ));
- SYMDEFS.put("ld.w" , new Def(SIGNED, Vue.LD_W ));
- SYMDEFS.put("ldsr" , new Def(SIGNED, Vue.LDSR ));
- SYMDEFS.put("mov_imm", new Def(SIGNED, Vue.MOV_IMM));
- SYMDEFS.put("mov_reg", new Def(SIGNED, Vue.MOV_REG));
- SYMDEFS.put("movbsu" , new Def(SIGNED, Vue.MOVBSU ));
- SYMDEFS.put("movea" , new Def(SIGNED, Vue.MOVEA ));
- SYMDEFS.put("movhi" , new Def(SIGNED, Vue.MOVHI ));
- SYMDEFS.put("mpyhw" , new Def(SIGNED, Vue.MPYHW ));
- SYMDEFS.put("mul" , new Def(SIGNED, Vue.MUL ));
- SYMDEFS.put("mulf.s" , new Def(SIGNED, Vue.MULF_S ));
- SYMDEFS.put("mulu" , new Def(SIGNED, Vue.MULU ));
- SYMDEFS.put("not" , new Def(SIGNED, Vue.NOT ));
- SYMDEFS.put("notbsu" , new Def(SIGNED, Vue.NOTBSU ));
- SYMDEFS.put("or" , new Def(SIGNED, Vue.OR ));
- SYMDEFS.put("orbsu" , new Def(SIGNED, Vue.ORBSU ));
- SYMDEFS.put("ori" , new Def(SIGNED, Vue.ORI ));
- SYMDEFS.put("ornbsu" , new Def(SIGNED, Vue.ORNBSU ));
- SYMDEFS.put("out.b" , new Def(SIGNED, Vue.OUT_B ));
- SYMDEFS.put("out.h" , new Def(SIGNED, Vue.OUT_H ));
- SYMDEFS.put("out.w" , new Def(SIGNED, Vue.OUT_W ));
- SYMDEFS.put("reti" , new Def(SIGNED, Vue.RETI ));
- SYMDEFS.put("rev" , new Def(SIGNED, Vue.REV ));
- SYMDEFS.put("sar_imm", new Def(SIGNED, Vue.SAR_IMM));
- SYMDEFS.put("sar_reg", new Def(SIGNED, Vue.SAR_REG));
- SYMDEFS.put("sch0bsd", new Def(SIGNED, Vue.SCH0BSD));
- SYMDEFS.put("sch0bsu", new Def(SIGNED, Vue.SCH0BSU));
- SYMDEFS.put("sch1bsd", new Def(SIGNED, Vue.SCH1BSD));
- SYMDEFS.put("sch1bsu", new Def(SIGNED, Vue.SCH1BSU));
- SYMDEFS.put("sei" , new Def(SIGNED, Vue.SEI ));
- SYMDEFS.put("setf" , new Def(SIGNED, Vue.SETF ));
- SYMDEFS.put("shl_imm", new Def(SIGNED, Vue.SHL_IMM));
- SYMDEFS.put("shl_reg", new Def(SIGNED, Vue.SHL_REG));
- SYMDEFS.put("shr_imm", new Def(SIGNED, Vue.SHR_IMM));
- SYMDEFS.put("shr_reg", new Def(SIGNED, Vue.SHR_REG));
- SYMDEFS.put("st.b" , new Def(SIGNED, Vue.ST_B ));
- SYMDEFS.put("st.h" , new Def(SIGNED, Vue.ST_H ));
- SYMDEFS.put("st.w" , new Def(SIGNED, Vue.ST_W ));
- SYMDEFS.put("stsr" , new Def(SIGNED, Vue.STSR ));
- SYMDEFS.put("sub" , new Def(SIGNED, Vue.SUB ));
- SYMDEFS.put("subf.s" , new Def(SIGNED, Vue.SUBF_S ));
- SYMDEFS.put("trap" , new Def(SIGNED, Vue.TRAP ));
- SYMDEFS.put("trnc.sw", new Def(SIGNED, Vue.TRNC_SW));
- SYMDEFS.put("xb" , new Def(SIGNED, Vue.XB ));
- SYMDEFS.put("xh" , new Def(SIGNED, Vue.XH ));
- SYMDEFS.put("xor" , new Def(SIGNED, Vue.XOR ));
- SYMDEFS.put("xorbsu" , new Def(SIGNED, Vue.XORBSU ));
- SYMDEFS.put("xori" , new Def(SIGNED, Vue.XORI ));
- SYMDEFS.put("xornbsu", new Def(SIGNED, Vue.XORNBSU));
-
- // Functional symbol definitions
- SYMDEFS.put("address" , new Def(SYMBOL, ADDRESS ));
- SYMDEFS.put("break" , new Def(SYMBOL, BREAK ));
- SYMDEFS.put("code" , new Def(SYMBOL, CODE ));
- SYMDEFS.put("cond" , new Def(SYMBOL, COND ));
- SYMDEFS.put("disp" , new Def(SYMBOL, DISP ));
- SYMDEFS.put("fetch" , new Def(SYMBOL, FETCH ));
- SYMDEFS.put("format" , new Def(SYMBOL, FORMAT ));
- SYMDEFS.put("id" , new Def(SYMBOL, ID ));
- SYMDEFS.put("imm" , new Def(SYMBOL, IMM ));
- SYMDEFS.put("opcode" , new Def(SYMBOL, OPCODE ));
- SYMDEFS.put("reg1" , new Def(SYMBOL, REG1 ));
- SYMDEFS.put("reg2" , new Def(SYMBOL, REG2 ));
- SYMDEFS.put("regid" , new Def(SYMBOL, REGID ));
- SYMDEFS.put("size" , new Def(SYMBOL, SIZE ));
- SYMDEFS.put("subopcode", new Def(SYMBOL, SUBOPCODE));
- SYMDEFS.put("type" , new Def(SYMBOL, TYPE ));
- SYMDEFS.put("value" , new Def(SYMBOL, VALUE ));
- SYMDEFS.put("vector" , new Def(SYMBOL, VECTOR ));
-
- // Program register symbol definitions
- SYMDEFS.put("r0" , new Def(PROREG, 0));
- SYMDEFS.put("r1" , new Def(PROREG, 1));
- SYMDEFS.put("r2" , new Def(PROREG, 2));
- SYMDEFS.put("r3" , new Def(PROREG, 3));
- SYMDEFS.put("r4" , new Def(PROREG, 4));
- SYMDEFS.put("r5" , new Def(PROREG, 5));
- SYMDEFS.put("r6" , new Def(PROREG, 6));
- SYMDEFS.put("r7" , new Def(PROREG, 7));
- SYMDEFS.put("r8" , new Def(PROREG, 8));
- SYMDEFS.put("r9" , new Def(PROREG, 9));
- SYMDEFS.put("r10", new Def(PROREG, 10));
- SYMDEFS.put("r11", new Def(PROREG, 11));
- SYMDEFS.put("r12", new Def(PROREG, 12));
- SYMDEFS.put("r13", new Def(PROREG, 13));
- SYMDEFS.put("r14", new Def(PROREG, 14));
- SYMDEFS.put("r15", new Def(PROREG, 15));
- SYMDEFS.put("r16", new Def(PROREG, 16));
- SYMDEFS.put("r17", new Def(PROREG, 17));
- SYMDEFS.put("r18", new Def(PROREG, 18));
- SYMDEFS.put("r19", new Def(PROREG, 19));
- SYMDEFS.put("r20", new Def(PROREG, 20));
- SYMDEFS.put("r21", new Def(PROREG, 21));
- SYMDEFS.put("r22", new Def(PROREG, 22));
- SYMDEFS.put("r23", new Def(PROREG, 23));
- SYMDEFS.put("r24", new Def(PROREG, 24));
- SYMDEFS.put("r25", new Def(PROREG, 25));
- SYMDEFS.put("r26", new Def(PROREG, 26));
- SYMDEFS.put("r27", new Def(PROREG, 27));
- SYMDEFS.put("r28", new Def(PROREG, 28));
- SYMDEFS.put("r29", new Def(PROREG, 29));
- SYMDEFS.put("r30", new Def(PROREG, 30));
- SYMDEFS.put("r31", new Def(PROREG, 31));
- SYMDEFS.put("gp" , new Def(PROREG, Vue.GP));
- SYMDEFS.put("hp" , new Def(PROREG, Vue.HP));
- SYMDEFS.put("lp" , new Def(PROREG, Vue.LP));
- SYMDEFS.put("sp" , new Def(PROREG, Vue.SP));
- SYMDEFS.put("tp" , new Def(PROREG, Vue.TP));
-
- // System register symbol definitions
- SYMDEFS.put("adtre", new Def(SYSREG, Vue.ADTRE ));
- SYMDEFS.put("chcw" , new Def(SYSREG, Vue.CHCW ));
- SYMDEFS.put("ecr" , new Def(SYSREG, Vue.ECR ));
- SYMDEFS.put("eipc" , new Def(SYSREG, Vue.EIPC ));
- SYMDEFS.put("eipsw", new Def(SYSREG, Vue.EIPSW ));
- SYMDEFS.put("fepc" , new Def(SYSREG, Vue.FEPC ));
- SYMDEFS.put("fepsw", new Def(SYSREG, Vue.FEPSW ));
- SYMDEFS.put("pc" , new Def(SYSREG, Vue.PC ));
- SYMDEFS.put("pir" , new Def(SIGNED, 0x00005346));
- SYMDEFS.put("psw" , new Def(SYSREG, Vue.PSW ));
- SYMDEFS.put("tkcw" , new Def(SIGNED, 0x000000E0));
- SYMDEFS.put("sr29" , new Def(SYSREG, 29 ));
- SYMDEFS.put("sr30" , new Def(SIGNED, 0x00000004));
- SYMDEFS.put("sr31" , new Def(SYSREG, 31 ));
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Classes //
- ///////////////////////////////////////////////////////////////////////////
-
- // Operator or value definition
- private static class Def {
- int id; // Operator/symbol ID or literal value
- int precedence; // Operator precedence
- int type; // Token category
-
- // Default constructor
- Def() { }
-
- // Precedence constructor
- Def(int precedence, int type, int id) {
- this.id = id;
- this.precedence = precedence;
- this.type = type;
- }
-
- // Value constructor
- Def(int type, int id) {
- this(0, type, id);
- }
-
- }
-
- // Parsing error descriptor
- public static class Error {
- public final int code; // Error code
- public final int position; // Character position of error
- public final String text; // Offending token
-
- // Constructor
- private Error(int code, int position, String text) {
- this.code = code;
- this.position = position;
- this.text = text;
- }
-
- }
-
- // Expression token
- private static class Token extends Def {
- int dataType; // Effective type at runtime
- Token left; // Left node
- Token parent; // Parent node
- Token right; // Right node
- int start; // Character position in expression
- String text; // Display text
-
- // Constructor
- Token(int type, int start, String text) {
- dataType = type == PROREG || type == SYMBOL ||
- type == SYSREG ? SIGNED : type;
- this.start = start;
- this.text = text;
- this.type = type;
- }
-
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Package constructor
- public Breakpoint(Vue vue) {
- addressError = new Error(NONE, 0, "");
- addresses = "";
- condition = "";
- conditionError = new Error(NONE, 0, "");
- fetch = true;
- name = "";
- ranges = new int[0][];
- tokens = new Token[0];
- this.vue = vue;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Determine whether the breakpoint applies to any break scenarios
- public boolean any() {
- return hooks != 0;
- }
-
- // Evaluate the condition against the emulation context
- public boolean evaluate() {
- return evaluate(null, null);
- }
-
- // Evaluate the condition against the emulation context
- public boolean evaluate(Instruction inst, Access acc) {
-
- // Error checking
- if (vue == null || !isEnabled || hooks == 0)
- return false;
-
- // Working variables
- boolean applies = false;
- int pc = vue.getRegister(Vue.PC, true);
-
- // Resolve state objects
- if (inst == null)
- inst = new Instruction(vue.read(pc, Vue.S32));
- if (acc == null)
- acc = inst.access(vue);
-
- // Check whether the breakpoint applies to the current state
- if ((hooks & EXCEPTION) != 0)
- applies = applies || vue.getExceptionCode() != 0;
- if ((hooks & EXECUTE) != 0)
- applies = applies || inRange(pc, pc + inst.size - 1);
- if ((hooks & (READ | WRITE)) != 0 && acc != null) switch (inst.id) {
- case Vue.CAXI :
- case Vue.IN_B : case Vue.IN_H : case Vue.IN_W :
- case Vue.LD_B : case Vue.LD_H : case Vue.LD_W :
- case Vue.OUT_B: case Vue.OUT_H: case Vue.OUT_W:
- case Vue.ST_B : case Vue.ST_H : case Vue.ST_W :
- applies = applies || inRange(acc.address,
- acc.address + JavaVue.TYPE_SIZES[acc.type] - 1);
- }
- if (!applies)
- return false;
-
- // Evaluate the condition
- if (acc == null)
- acc = new Access();
- return isTrue(new int[depth], 0, inst, acc);
- }
-
- // Retrieve the most recent address text
- public String getAddresses() {
- return addresses;
- }
-
- // Retrieve the most recent condition text
- public String getCondition() {
- return condition;
- }
-
- // Retrieve the most recent address parsing error
- public Error getAddressError() {
- return addressError;
- }
-
- // Retrieve the most recent condition parsing error
- public Error getConditionError() {
- return conditionError;
- }
-
- // Determine whether the breakpoint hooks exceptions
- public boolean getException() {
- return (hooks & EXCEPTION) != 0;
- }
-
- // Determine whether the breakpoint hooks executions
- public boolean getExecute() {
- return (hooks & EXECUTE) != 0;
- }
-
- // Determine whether the breakpoint hooks fetch reads
- public boolean getFetch() {
- return fetch;
- }
-
- // Determine whether the breakpoint hooks reads
- public boolean getRead() {
- return (hooks & READ) != 0;
- }
-
- // Determine whether the breakpoint hooks writes
- public boolean getWrite() {
- return (hooks & WRITE) != 0;
- }
-
- // Retrieve the display name
- public String getName() {
- return name;
- }
-
- // Determine whether the breakpoint can be used
- boolean isActive() {
- return
- isEnabled &&
- addressError .code == NONE &&
- conditionError.code == NONE
- ;
- }
-
- // Determine whether the breakpoint is enabled
- public boolean isEnabled() {
- return isEnabled;
- }
-
- // Specify and parse a list of address ranges
- public boolean setAddresses(String addresses) {
- Integer first = null; // Value of first address
- int mode = 0; // Processing state
- var ranges = new ArrayList(); // Output
- int start = 0; // Position of address literal
- int x = 0; // Input position
-
- // Configure instance fields
- this.addresses = addresses == null ? addresses = "" : addresses;
-
- // Parse the input
- var chars = (addresses + " ").toCharArray();
- for (x = 0; x < chars.length; x++) {
- char c = chars[x];
- boolean white = c == ' ' || c == '\t';
- boolean digit =
- c >= '0' && c <= '9' ||
- c >= 'A' && c <= 'F' ||
- c >= 'a' && c <= 'f'
- ;
-
- // Before
- if (mode == 0) {
-
- // Ignore whitespace
- if (white)
- continue;
-
- // Begin an address
- if (digit) {
- start = x;
- mode = 1; // During
- continue;
- }
-
- }
-
- // During
- else if (mode == 1) {
-
- // Ignore digits
- if (digit)
- continue;
-
- // The end of the address has been found
- String text = new String(chars, start, x - start);
- int addr = 0;
- try { addr = (int) Long.parseLong(text, 16); }
-
- // Could not parse the address
- catch (Exception e) {
- addressError = new Error(BADLITERAL, start + 1, text);
- if (vue != null)
- vue.updateRanges(this);
- return false;
- }
-
- // Processed the first address
- if (first == null)
- first = addr;
-
- // Processed the second address
- else {
- ranges.add(new int[] { first, addr });
- first = null;
- }
-
- // Begin searching for a delimiter
- mode = 2; // After
- x--;
- continue;
- }
-
- // After
- else if (mode == 2) {
-
- // Ignore whitespace
- if (white)
- continue;
-
- // Begin searching for the second address
- if (c == '-' && first != null) {
- mode = 0; // Before
- continue;
- }
-
- // All addresses in the range have been processed
- if (c == ',') {
- if (first != null) {
- ranges.add(new int[] { first, first });
- first = null;
- }
- mode = 0; // Before
- continue;
- }
-
- }
-
- // Invalid character
- addressError = new Error(UNEXPECTED, x + 1, Character.toString(c));
- if (vue != null)
- vue.updateRanges(this);
- return false;
- } // x
-
- // Unexpected end of input
- if (mode == 0 && (ranges.size() > 0 || first != null)) {
- addressError = new Error(EARLYEOF, x + 1, "");
- if (vue != null)
- vue.updateRanges(this);
- return false;
- }
-
- // A one-address range was processed
- if (first != null)
- ranges.add(new int[] { first, first });
-
- // Parsing was successful
- this.ranges = ranges.toArray(new int[ranges.size()][]);
- addressError = new Error(NONE, 0, "");
- if (vue != null)
- vue.updateRanges(this);
- return true;
- }
-
- // Specify and parse a condition
- public boolean setCondition(String condition) {
-
- // Configure instance fields
- this.condition = condition == null ? condition = "" : condition;
- conditionError = new Error(NONE, 0, "");
- depth = 0;
- tokens = new Token[0];
-
- // Process the expression
- var tokens = parseTokens();
- if (tokens == null || !validate(tokens)) {
- if (vue != null)
- vue.updateTokens(this);
- return false;
- }
- tree(tokens);
-
- // Perform operator-specific pre-processing on the expression
- Token tok = tokens.size() == 0 ? null : transform(tokens.remove(0));
- if (conditionError.code != NONE) {
- if (vue != null)
- vue.updateTokens(this);
- return false;
- }
-
- // Produce an RPN-ordered list of tokens
- dataType = tok == null ? BOOL : tok.dataType;
- while (tok != null) {
-
- // Traverse to left child node
- if (tok.left != null) {
- tok = tok.left;
- tok.parent.left = null;
- continue;
- }
-
- // Traverse to right child node
- if (tok.right != null) {
- tok = tok.right;
- tok.parent.right = null;
- continue;
- }
-
- // No children: add node to output
- tokens.add(tok);
- tok = tok.parent;
- }
- this.tokens = tokens.toArray(new Token[tokens.size()]);
-
- // The expression was successfully parsed
- depth = depth();
- if (vue != null)
- vue.updateTokens(this);
- return true;
- }
-
- // Specify whether the breakpoint is enabled
- public void setEnabled(boolean enabled) {
- isEnabled = enabled;
- if (vue != null)
- vue.updateState(this);
- }
-
- // Specify whether the breakpoint hooks exceptions
- public void setException(boolean hook) {
- hooks = hook ? hooks | EXCEPTION : hooks & ~EXCEPTION;
- if (vue != null)
- vue.updateState(this);
- }
-
- // Specify whether the breakpoint hooks executions
- public void setExecute(boolean hook) {
- hooks = hook ? hooks | EXECUTE : hooks & ~EXECUTE;
- if (vue != null)
- vue.updateState(this);
- }
-
- // Specify whether the breakpoint hooks fetch reads
- public void setFetch(boolean fetch) {
- this.fetch = fetch;
- if (vue != null)
- vue.updateState(this);
- }
-
- // Specify the display name
- public String setName(String name) {
- return this.name = name == null ? "" : name;
- }
-
- // Specify whether the breakpoint hooks reads
- public void setRead(boolean hook) {
- hooks = hook ? hooks | READ : hooks & ~READ;
- if (vue != null)
- vue.updateState(this);
- }
-
- // Specify whether the breakpoint hooks reads
- public void setWrite(boolean hook) {
- hooks = hook ? hooks | WRITE : hooks & ~WRITE;
- if (vue != null)
- vue.updateState(this);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Determine whether the breakpoint applies to a break scenario
- boolean appliesTo(int breakType, boolean fetch) {
- return isActive() && (this.fetch || !fetch) &&
- (breakType == 0 || (breakType & hooks) != 0);
- }
-
- // Perform a typed evaluation of the condition expression
- Object evaluateTyped(int[]stack,int breakType,Instruction inst,Access acc){
- if (tokens.length == 0)
- return null;
- int value = evaluate(stack, breakType, inst, acc);
- switch (dataType) {
- case BOOL : return (Boolean) (value != 0);
- case FLOAT : return (Float ) Float.intBitsToFloat(value);
- case UNSIGNED: return (Long ) (value & 0xFFFFFFFFL);
- }
- return (Integer) value;
- }
-
- // Determine whether the breakpoint applies to a given address range
- boolean inRange(int start, int end) {
-
- // Implicit inclusion
- if (ranges.length == 0)
- return true;
-
- // Check all ranges
- for (var range : ranges)
- if (
- Integer.compareUnsigned(
- start - range[0], range[1] - range[0]) <= 0 ||
- Integer.compareUnsigned(
- range[0] - start , end - start ) <= 0
- ) return true;
- return false;
- }
-
- // Determine whether the breakpoint's condition is truthy
- boolean isTrue(int[] stack, int breakType, Instruction inst, Access acc) {
- return tokens.length == 0 ? true :
- evaluate(stack, breakType, inst, acc) != 0;
- }
-
- // Produce a one-dimensional array from the address ranges
- int[] flattenRanges() {
- var ret = new int[ranges.length * 2];
- for (int x = 0, y = 0; x < ranges.length; x++) {
- var range = ranges[x];
- ret[y++] = range[0];
- ret[y++] = range[1];
- }
- return ret;
- }
-
- // Produce a one-dimensional array from the condition tokens
- int[] flattenTokens() {
- var ret = new int[tokens.length * 2];
- for (int x = 0, y = 0; x < tokens.length; x++) {
- var token = tokens[x];
- ret[y++] = token.type;
- ret[y++] = token.id;
- }
- return ret;
- }
-
- // Retrieve the required condition evaluation stack size
- int getDepth() {
- return depth;
- }
-
- // Retrieve the breakpoint types this breakpoint applies to
- int getHooks() {
- return hooks;
- }
-
- // The breakpoint is being removed from its emulation context
- void remove() {
- vue = null;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Condition Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Determine whether a token is a literal
- private static boolean isLiteral(Token tok) {
- switch (tok.type) {
- case BOOL:
- case FLOAT:
- case SIGNED:
- case UNSIGNED: return true;
- }
- return false;
- }
-
- // Remove a token from a tree
- private static Token remove(Token tok) {
- if (tok.parent != null) {
- if (tok.parent.left == tok)
- tok.parent.left = tok.right;
- else tok.parent.right = tok.right;
- }
- tok.right.parent = tok.parent;
- return tok.right;
- }
-
- // Parse a literal
- private Token parseLiteral(char[] chars, int start) {
- boolean isFloat = chars[start] == '.'; // The figure is a float
- boolean isHex = false; // The figure is in hexadecimal
-
- // Process through the end of the expression
- for (int x = start + 1; x < chars.length; x++) {
- char c = chars[x];
-
- // The literal begins with "0x"
- if (c == 'x' || c == 'X') {
-
- // "x" cannot appear here
- if (isFloat || x != start + 1 || chars[start] != '0') {
- conditionError =
- new Error(UNEXPECTED, x + 1, Character.toString(c));
- return null;
- }
-
- // Configure as a hexadecimal integer
- isHex = true;
- continue;
- }
-
- // The literal contains "."
- if (c == '.') {
-
- // "." cannot appear here
- if (isHex || isFloat) {
- conditionError =
- new Error(UNEXPECTED, x + 1, Character.toString(c));
- return null;
- }
-
- // Configure as a float
- isFloat = true;
- continue;
- }
-
- // The character is part of the token
- if (
- c >= '0' && c <= '9' ||
- isHex && (c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F')
- ) continue;
-
- // Produce a new token
- var ret = new Token(SIGNED, start,
- new String(chars, start, x - start));
-
- // Parse the literal value
- try {
- if (isFloat) {
- ret.dataType = ret.type = FLOAT;
- ret.id = Float.floatToRawIntBits(
- adjust(Float.parseFloat(ret.text)));
- } else {
- long val = !isHex ? Long.parseLong(ret.text) :
- Long.parseLong(ret.text.substring(2), 16);
- if (val >= 0x80000000L && val <= 0xFFFFFFFFL)
- ret.dataType = ret.type = UNSIGNED;
- else if (val < 0x80000000 || val > 0x7FFFFFFF)
- throw new Exception();
- ret.id = (int) val;
- }
- return ret;
- }
-
- // Could not parse the value
- catch (Exception e) {
- conditionError = new Error(BADLITERAL, ret.start+1, ret.text);
- return null;
- }
-
- } // x
-
- return null; // Unreachable
- }
-
- // Parse an operator
- private Token parseOperator(char[] chars, int start) {
- int x; // Iterator
-
- // Locate the entire potential token
- for (x = start + 1; x < chars.length; x++) {
- char c = chars[x];
- if (
- c >= 'a' && c <= 'z' ||
- c >= 'A' && c <= 'Z' ||
- c >= '0' && c <= '9' ||
- c == ' ' || c == '\t'
- ) break;
- } // x
-
- // Find the longest operator within the token
- for (int y = x; y > start; y--) {
- String text = new String(chars, start, y - start);
- var def = OPDEFS.get(text);
-
- // An operator was found
- if (def != null) {
- var ret = new Token(def.type, start, text);
- ret.id = def.id;
- ret.precedence = def.precedence;
- return ret;
- }
-
- } // y
-
- // No operator was identified
- conditionError = new Error(BADTOKEN, start + 1,
- new String(chars, start, x - start));
- return null;
- }
-
- // Parse a symbol (which may be an operator)
- private Token parseSymbol(char[] chars, int start) {
-
- // Process through the end of the expression
- for (int x = start + 1; x < chars.length; x++) {
- char c = chars[x];
-
- // The character is part of the token
- if (
- c >= 'a' && c <= 'z' ||
- c >= 'A' && c <= 'Z' ||
- c >= '0' && c <= '9' ||
- c == '_' || c == '.'
- ) continue;
-
- // Produce a new token
- var ret = new Token(SYMBOL, start,
- new String(chars, start, x - start));
- String text = ret.text.toLowerCase();
-
- // The token is an operator or symbol
- var def = OPDEFS .get(text);
- if (def == null)
- def = SYMDEFS.get(text);
- if (def != null) {
- ret.id = def.id;
- ret.precedence = def.precedence;
- ret.type = def.type;
- if (def.type <= FLOAT)
- ret.dataType = def.type;
- return ret;
- }
-
- // The token is not recognized
- conditionError = new Error(BADTOKEN, ret.start + 1, ret.text);
- return null;
- } // x
-
- return null; // Unreachable
- }
-
- // Parse condition text into tokens
- private ArrayList parseTokens() {
- var tokens = new ArrayList();
-
- // Parse the expression
- var chars = (condition + " ").toCharArray();
- for (int x = 0; x < chars.length; x++) {
- char c = chars[x];
-
- // Ignore whitespace
- if (c == ' ' || c == '\t')
- continue;
-
- // Produce a token based on the first character
- Token tok =
- c >= '0' && c <= '9' || c == '.' ?
- parseLiteral(chars, x) :
- c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' ?
- parseSymbol (chars, x) :
- parseOperator (chars, x)
- ;
-
- // There was an error processing the token
- if (tok == null)
- return null;
-
- // Advance to the next token
- tokens.add(tok);
- x += tok.text.length() - 1;
- } // x
-
- return tokens;
- }
-
- // Perform implicit pre-processing operations
- private Token transform(Token tok) {
- var err = new Error(BADOPERAND, tok.start + 1, tok.text);
-
- // Transform child tokens
- if (
- tok.left != null && (tok.left = transform(tok.left )) == null ||
- tok.right != null && (tok.right = transform(tok.right)) == null
- ) return null;
-
- // Unary operators
- if (tok.type == UNARY) {
- int id = tok.id;
- boolean literal = isLiteral(tok.right);
- int newType = -1;
- tok.dataType = tok.right.dataType;
- tok.id = -tok.id * 4 + tok.dataType;
-
- // Process by ID
- switch (id) {
-
- // Cast to Boolean
- case BOOL_:
- if (tok.right.dataType == BOOL)
- return remove(tok);
- newType = BOOL;
- break;
-
- // Round Up
- case CEIL:
- if (tok.right.dataType != FLOAT)
- return remove(tok);
- break;
-
- // Cast to Float
- case FLOAT_:
- if (tok.right.dataType == FLOAT)
- return remove(tok);
- if (tok.right.type == UNARY && tok.right.id == READ32)
- tok.id = id = XFLOAT;
- newType = FLOAT;
- break;
-
- // Round Down
- case FLOOR:
- if (tok.right.dataType != FLOAT)
- return remove(tok);
- break;
-
- // Negate
- case NEGATE:
- if (tok.right.dataType != UNSIGNED)
- break;
- conditionError = err;
- return null;
-
- // Not Bitwise
- case NOT_B:
- if (tok.right.dataType != FLOAT)
- break;
- conditionError = err;
- return null;
-
- // Not Logical
- case NOT_L:
- break;
-
- // Round to Nearest
- case ROUND:
- if (tok.right.dataType != FLOAT)
- return remove(tok);
- break;
-
- // Cast to Signed Byte
- case S8:
- if (tok.right.type == UNARY && tok.right.id == READ32)
- tok.right.id = READ8;
- newType = SIGNED;
- break;
-
- // Cast to Signed Halfword
- case S16:
- if (tok.right.type == UNARY && tok.right.id == READ32)
- tok.right.id = READ16;
- newType = SIGNED;
- break;
-
- // Cast to Signed Word
- case S32:
- newType = SIGNED;
- break;
-
- // Truncate
- case TRUNC:
- if (tok.right.dataType != FLOAT)
- return remove(tok);
- break;
-
- // Cast to Unsigned Byte
- case U8:
- if (tok.right.type == UNARY && tok.right.id == READ32)
- tok.right.id = READ8;
- newType = UNSIGNED;
- break;
-
- // Cast to Unsigned Halfword
- case U16:
- if (tok.right.type == UNARY && tok.right.id == READ32)
- tok.right.id = READ16;
- newType = UNSIGNED;
- break;
-
- // Cast to Unsigned Word
- case U32:
- newType = UNSIGNED;
- break;
-
- // Reinterpret as Signed Word
- case XS32:
- tok.right.dataType = SIGNED;
- return remove(tok);
-
- // Reinterpret as Unsigned Word
- case XU32:
- tok.right.dataType = UNSIGNED;
- return remove(tok);
-
- // Reinterpret as Float
- case XFLOAT:
- newType = FLOAT;
- break;
- }
-
- // The operand is not a literal
- if (!literal) {
- if (newType != -1)
- tok.dataType = newType;
- return tok;
- }
-
- // Pre-process the literal operand
- tok.right.id = evalUnary(id, tok.right);
- if (newType != -1)
- tok.right.type = tok.right.dataType = newType;
- return remove(tok);
- }
-
- // Binary operators
- if (tok.type == BINARY) {
- int dataType = Math.max(tok.left.dataType, tok.right.dataType);
- int id = tok.id;
- boolean literal = isLiteral(tok.left) && isLiteral(tok.right);
- tok.dataType = dataType;
- tok.id = -id * 4 + tok.dataType;
-
- // Process by ID
- switch (id) {
-
- // Boolean logical operations
- case EQUAL : // Equal
- case GREATER: // Greater
- case GREQUAL: // Greater or Equal
- case LEQUAL : // Less or Equal
- case LESS : // Less
- case NEQUAL : // Not Equal
- tok.dataType = BOOL;
- break;
-
- // Non-boolean logical operations
- case AND_L: // And Logical
- case OR_L : // Or Logical
- case XOR_L: // Exclusive Or Logical
- break;
-
- // Bitwise operations
- case AND_B : // And Bitwise
- case LEFT_L : // Shift Left
- case OR_B : // Or Bitwise
- case RIGHT_A: // Shift Right Arithmetic
- case RIGHT_L: // Shift Right Logical
- case XOR_B : // Exclusive Or Bitwise
- if (tok.dataType == FLOAT) {
- conditionError = err;
- return null;
- }
- // Fallthrough
-
- // Arithmetic operations
- case ADD : // Add
- case DIVIDE : // Divide
- case MULTIPLY : // Multiply
- case REMAINDER: // Remainder
- case SUBTRACT : // Subtract
- if (tok.dataType == BOOL)
- tok.dataType = SIGNED;
- break;
- }
-
- // Convert operands
- for (int op = 0; op < 2; op++) {
- var top = op == 0 ? tok.left : tok.right;
-
- // The operand is already the result type
- if (top.dataType == dataType)
- continue;
-
- // Select the ID of the conversion operation
- int cvt = 0;
- switch (dataType) {
- case BOOL : cvt = BOOL_ ; break;
- case FLOAT : cvt = FLOAT_; break;
- case SIGNED : cvt = S32 ; break;
- case UNSIGNED: cvt = U32 ; break;
- }
-
- // Convert the literal operand directly
- if (isLiteral(top)) {
- top.id = evalUnary(cvt, top);
- top.type = top.dataType = dataType;
- }
-
- // Insert a conversion token
- else {
- var imp = new Token(UNARY, -1, "");
- switch (dataType) {
- case BOOL : imp.text = "bool" ; break;
- case FLOAT : imp.text = "float"; break;
- case SIGNED : imp.text = "s32" ; break;
- case UNSIGNED: imp.text = "u32" ; break;
- }
- imp.dataType = dataType;
- imp.id = -cvt * 4 + top.dataType;
- imp.parent = tok;
- imp.right = top;
- top.parent = imp;
- top = imp;
- }
-
- // Common processing
- if (op == 0)
- tok.left = top;
- else tok.right = top;
- }
-
- // Common processing
- if (literal) {
- tok.type = tok.dataType;
- tok.id = evalBinary(tok.id, tok.left.id, tok.right.id);
- tok.left = tok.right = null;
- }
- return tok;
- }
-
- // Value token
- return tok;
- }
-
- // Build an expression tree from a list of tokens
- private static void tree(ArrayList tokens) {
-
- // Process all operators
- while (tokens.size() > 1) {
- int end = tokens.size() - 1;
- int start = 0;
-
- // Locate the bounds of the innermost nested group
- for (int x = 0; x <= end; x++) {
- var tok = tokens.get(x);
- if (tok.type == OPEN)
- start = x + 1;
- if (tok.type != CLOSE)
- continue;
- end = x - 1;
- break;
- }
-
- // Apply unary operators
- for (int x = end; x >= start; x--) {
- var tok = tokens.get(x);
- if (tok.right != null || tok.type != UNARY)
- continue;
- tok.right = tokens.remove(x + 1);
- tok.right.parent = tok;
- end--;
- }
-
- // Apply binary operators
- while (start != end) {
- int index = -1;
- Token tok = null;
-
- // Locate the left-most operator with the highest precedence
- for (int x = start; x < end; x++) {
- var tik = tokens.get(x);
- if (tik.right != null || tik.type != BINARY ||
- tok != null && tik.precedence >= tok.precedence)
- continue;
- index = x;
- tok = tik;
- }
-
- // Apply the operator
- tok.right = tokens.remove(index + 1);
- tok.left = tokens.remove(index - 1);
- tok.left.parent = tok.right.parent = tok;
- end -= 2;
- }
-
- // There are no group operators
- if (tokens.size() == 1)
- break;
-
- // Apply the group operators
- tokens.remove(end + 1);
- if (tokens.remove(start - 1).id == READ32) {
- var tok = new Token(UNARY, -1, "[]");
- tok.id = READ32;
- tok.right = tokens.remove(start - 1);
- tok.right.parent = tok;
- tokens.add(start - 1, tok);
- }
-
- } // size
-
- }
-
- // Ensure a sequence of tokens is valid
- private boolean validate(ArrayList tokens) {
- int mode = 0;
- var stack = new Stack();
-
- // Validate all tokens
- for (var tok : tokens) {
-
- // Expected token mode mismatch
- if ((MODES_BEFORE >> tok.type & 1) != mode) {
-
- // The token is invalid
- if (tok.id != NEGATE) {
- conditionError = new Error(INVALID, tok.start+1, tok.text);
- return false;
- }
-
- // Convert negate to subtract
- tok.id = SUBTRACT;
- tok.precedence = 3;
- tok.type = BINARY;
- }
-
- // Nesting error
- if (tok.type == CLOSE &&
- (stack.empty() || stack.pop().id != tok.id)) {
- conditionError = new Error(NESTING, tok.start + 1, tok.text);
- return false;
- }
-
- // The token opens a group
- if (tok.type == OPEN)
- stack.push(tok);
-
- // The token is valid
- mode = MODES_AFTER >> tok.type & 1;
- continue;
- }
-
- // A group was not closed, or a binary operation was incomplete
- if (!stack.empty() || mode == 0 && tokens.size() != 0) {
- conditionError =
- new Error(EARLYEOF, condition.length(), "");
- return false;
- }
-
- // Successfully parsed the condition
- return true;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Evaluation Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Evaluate the condition, returning only the computed value
- private int evaluate(int[]stack,int breakType,Instruction inst,Access acc){
-
- // Process all tokens
- int size = 0;
- for (var tok : tokens) switch (tok.type) {
-
- // Binary operator
- case BINARY:
- stack[size - 2] =
- evalBinary(tok.id, stack[size - 2], stack[size - 1]);
- size--;
- break;
-
- // Literal
- case BOOL:
- case FLOAT:
- case SIGNED:
- case UNSIGNED:
- stack[size++] = tok.id;
- break;
-
- // CPU register
- case PROREG:
- case SYSREG:
- stack[size++] = vue.getRegister(tok.id, tok.type == SYSREG);
- break;
-
- // Unary operator
- case UNARY:
- stack[size - 1] = evalUnary(tok.id, stack[size - 1]);
- break;
-
- // Symbol
- case SYMBOL:
- int sym = inst.imm; // IMM, REGID, VECTOR
- switch (tok.id) {
- case ADDRESS : sym = acc.address ; break;
- case BREAK : sym = breakType ; break;
- case CODE : sym = vue.getExceptionCode(); break;
- case COND : sym = inst.cond ; break;
- case DISP : sym = inst.disp ; break;
- case FETCH : sym = acc.fetch ; break;
- case FORMAT : sym = inst.format ; break;
- case ID : sym = inst.id ; break;
- case OPCODE : sym = inst.opcode ; break;
- case REG1 : sym = inst.reg1 ; break;
- case REG2 : sym = inst.reg2 ; break;
- case SIZE : sym = inst.size ; break;
- case SUBOPCODE: sym = inst.subopcode ; break;
- case TYPE : sym = acc.type ; break;
- case VALUE : sym = acc.value ; break;
- }
- stack[size++] = sym;
- break;
-
- }
-
- // Return the remaining stack value
- return stack[0];
- }
-
- // Evaluate a unary operator given a token
- private int evalUnary(int id, Token tok) {
- return evalUnary(-id * 4 + tok.dataType, tok.id);
- }
-
- // Evaluate a unary operator
- private int evalUnary(int id, int operand) {
-
- // Processing by ID
- switch (id) {
-
- // Cast to Boolean
- case -BOOL_ * 4 + BOOL: // Removed by parser
- case -BOOL_ * 4 + FLOAT:
- case -BOOL_ * 4 + SIGNED:
- case -BOOL_ * 4 + UNSIGNED:
- return operand == 0 ? 0 : 1;
-
- // Round up
- case -CEIL * 4 + BOOL: // Removed by parser
- case -CEIL * 4 + FLOAT:
- case -CEIL * 4 + SIGNED: // Removed by parser
- case -CEIL * 4 + UNSIGNED: // Removed by parser
- return Float.floatToIntBits(adjust((float)
- Math.ceil(Float.intBitsToFloat(operand))));
-
- // Cast to Float
- case -FLOAT_ * 4 + BOOL:
- case -FLOAT_ * 4 + FLOAT: // Removed by parser
- case -FLOAT_ * 4 + SIGNED:
- return Float.floatToIntBits(adjust(operand));
- case -FLOAT_ * 4 + UNSIGNED:
- return Float.floatToIntBits(adjust(operand & 0xFFFFFFFFL));
-
- // Round down
- case -FLOOR * 4 + BOOL: // Removed by parser
- case -FLOOR * 4 + FLOAT:
- case -FLOOR * 4 + SIGNED: // Removed by parser
- case -FLOOR * 4 + UNSIGNED: // Removed by parser
- return Float.floatToIntBits(adjust((float)
- Math.floor(Float.intBitsToFloat(operand))));
-
- // Bitwise Not
- case -NOT_B * 4 + BOOL:
- case -NOT_B * 4 + FLOAT: // Prevented by parser
- case -NOT_B * 4 + SIGNED:
- case -NOT_B * 4 + UNSIGNED:
- return ~operand;
-
- // Logical Not
- case -NOT_L * 4 + BOOL:
- case -NOT_L * 4 + FLOAT:
- case -NOT_L * 4 + SIGNED:
- case -NOT_L * 4 + UNSIGNED:
- return operand == 0 ? 1 : 0;
-
- // Negate
- case -NEGATE * 4 + BOOL:
- case -NEGATE * 4 + SIGNED:
- case -NEGATE * 4 + UNSIGNED: // Removed by parser
- return -operand;
- case -NEGATE * 4 + FLOAT:
- return Float.floatToIntBits(adjust(
- -Float.intBitsToFloat(operand)));
-
- // Read Byte
- case READ8:
- return vue.read(operand, Vue.S8);
-
- // Read Halfword
- case READ16:
- return vue.read(operand, Vue.S16);
-
- // Read Word
- case READ32:
- return vue.read(operand, Vue.S32);
-
- // Round to Nearest
- case -ROUND * 4 + BOOL: // Removed by parser
- case -ROUND * 4 + FLOAT:
- case -ROUND * 4 + SIGNED: // Removed by parser
- case -ROUND * 4 + UNSIGNED: // Removed by parser
- return Float.floatToIntBits(adjust((float)
- Math.round(Float.intBitsToFloat(operand))));
-
- // Cast to Signed Byte
- case -S8 * 4 + FLOAT:
- operand = evalUnary(-S32 * 4 + FLOAT, operand);
- // Fallthrough
- case -S8 * 4 + BOOL:
- case -S8 * 4 + SIGNED:
- case -S8 * 4 + UNSIGNED:
- return operand << 24 >> 24;
-
- // Cast to Signed Halfword
- case -S16 * 4 + FLOAT:
- operand = evalUnary(-S32 * 4 + FLOAT, operand);
- // Fallthrough
- case -S16 * 4 + BOOL:
- case -S16 * 4 + SIGNED:
- case -S16 * 4 + UNSIGNED:
- return operand << 24 >> 24;
-
- // Cast to Signed Word
- case -S32 * 4 + BOOL:
- case -S32 * 4 + SIGNED: // Removed by parser
- case -S32 * 4 + UNSIGNED:
- return operand;
- case -S32 * 4 + FLOAT:
- float val = Float.intBitsToFloat(operand);
- return val >= -MAX_WORD && val < MAX_WORD ? (int) val : 0;
-
- // Truncate
- case -TRUNC * 4 + BOOL: // Removed by parser
- case -TRUNC * 4 + FLOAT:
- case -TRUNC * 4 + SIGNED: // Removed by parser
- case -TRUNC * 4 + UNSIGNED: // Removed by parser
- return Float.floatToIntBits(adjust(
- trunc(Float.intBitsToFloat(operand))));
-
- // Cast to Unsigned Byte
- case -U8 * 4 + FLOAT:
- operand = evalUnary(-S32 * 4 + FLOAT, operand);
- case -U8 * 4 + BOOL:
- case -U8 * 4 + SIGNED:
- case -U8 * 4 + UNSIGNED:
- return operand << 24 >>> 24;
-
- // Cast to Unsigned Halfword
- case -U16 * 4 + FLOAT:
- operand = evalUnary(-S32 * 4 + FLOAT, operand);
- case -U16 * 4 + BOOL:
- case -U16 * 4 + SIGNED:
- case -U16 * 4 + UNSIGNED:
- return operand << 16 >>> 16;
-
- // Cast to Unsigned Word
- case -U32 * 4 + BOOL:
- case -U32 * 4 + SIGNED:
- case -U32 * 4 + UNSIGNED: // Removed by parser
- return operand;
- case -U32 * 4 + FLOAT:
- float va1 = Float.intBitsToFloat(operand);
- return va1 >= 0 && va1 < MAX_UWORD ? (int) (long) va1 : 0;
-
- // Reinterpret as Float
- case XFLOAT:
- return Float.floatToIntBits(adjust(
- Float.intBitsToFloat(operand)));
-
- // Reinterpret as Signed Word, Reinterpret as Unsigned Word
- case XS32: // Removed by parser
- case XU32: // Removed by parser
- }
-
- // Unreachable
- return 0;
- }
-
- // Evaluate a binary operator
- private static int evalBinary(int id, int left, int right) {
-
- // Processing by ID
- switch (id) {
-
- // Add
- case -ADD * 4 + BOOL:
- case -ADD * 4 + SIGNED:
- case -ADD * 4 + UNSIGNED:
- return left + right;
- case -ADD * 4 + FLOAT:
- return Float.floatToIntBits(adjust(
- Float.intBitsToFloat(left ) +
- Float.intBitsToFloat(right)
- ));
-
- // And Bitwise
- case -AND_B * 4 + BOOL:
- case -AND_B * 4 + FLOAT: // Prevented by parser
- case -AND_B * 4 + SIGNED:
- case -AND_B * 4 + UNSIGNED:
- return left & right;
-
- // And Logical
- case -AND_L * 4 + BOOL:
- case -AND_L * 4 + FLOAT:
- case -AND_L * 4 + SIGNED:
- case -AND_L * 4 + UNSIGNED:
- return left == 0 ? left : right;
-
- // Divide
- case -DIVIDE * 4 + BOOL:
- case -DIVIDE * 4 + SIGNED:
- return right == 0 ? 0 : left / right;
- case -DIVIDE * 4 + UNSIGNED:
- return right == 0 ? 0 :
- (int) ((left & 0xFFFFFFFFL) / (right & 0xFFFFFFFFL));
- case -DIVIDE * 4 + FLOAT:
- return right == 0 ? 0 : Float.floatToIntBits(adjust(
- Float.intBitsToFloat(left ) /
- Float.intBitsToFloat(right)
- ));
-
- // Equal
- case -EQUAL * 4 + BOOL:
- case -EQUAL * 4 + FLOAT:
- case -EQUAL * 4 + SIGNED:
- case -EQUAL * 4 + UNSIGNED:
- return left == right ? 1 : 0;
-
- // Greater
- case -GREATER * 4 + BOOL:
- case -GREATER * 4 + SIGNED:
- return left > right ? 1 : 0;
- case -GREATER * 4 + UNSIGNED:
- return Integer.compareUnsigned(left, right) > 0 ? 1 : 0;
- case -GREATER * 4 + FLOAT:
- return Float.intBitsToFloat(left) >
- Float.intBitsToFloat(right) ? 1 : 0;
-
- // Greater or Equal
- case -GREQUAL * 4 + BOOL:
- case -GREQUAL * 4 + SIGNED:
- return left >= right ? 1 : 0;
- case -GREQUAL * 4 + UNSIGNED:
- return Integer.compareUnsigned(left, right) >= 0 ? 1 : 0;
- case -GREQUAL * 4 + FLOAT:
- return Float.intBitsToFloat(left) >=
- Float.intBitsToFloat(right) ? 1 : 0;
-
- // Shift Left
- case -LEFT_L * 4 + BOOL:
- case -LEFT_L * 4 + FLOAT: // Prevented by parser
- case -LEFT_L * 4 + SIGNED:
- case -LEFT_L * 4 + UNSIGNED:
- return left << (right & 31);
-
- // Less or Equal
- case -LEQUAL * 4 + BOOL:
- case -LEQUAL * 4 + SIGNED:
- return left <= right ? 1 : 0;
- case -LEQUAL * 4 + UNSIGNED:
- return Integer.compareUnsigned(left, right) <= 0 ? 1 : 0;
- case -LEQUAL * 4 + FLOAT:
- return Float.intBitsToFloat(left) <=
- Float.intBitsToFloat(right) ? 1 : 0;
-
- // Less
- case -LESS * 4 + BOOL:
- case -LESS * 4 + SIGNED:
- return left < right ? 1 : 0;
- case -LESS * 4 + UNSIGNED:
- return Integer.compareUnsigned(left, right) < 0 ? 1 : 0;
- case -LESS * 4 + FLOAT:
- return Float.intBitsToFloat(left) <
- Float.intBitsToFloat(right) ? 1 : 0;
-
- // Multiply
- case -MULTIPLY * 4 + BOOL:
- case -MULTIPLY * 4 + SIGNED:
- return left * right;
- case -MULTIPLY * 4 + UNSIGNED:
- return (int) ((left & 0xFFFFFFFFL) * (right & 0xFFFFFFFFL));
- case -MULTIPLY * 4 + FLOAT:
- return Float.floatToIntBits(adjust(
- Float.intBitsToFloat(left ) *
- Float.intBitsToFloat(right)
- ));
-
- // Not Equal
- case -NEQUAL * 4 + BOOL:
- case -NEQUAL * 4 + FLOAT:
- case -NEQUAL * 4 + SIGNED:
- case -NEQUAL * 4 + UNSIGNED:
- return left != right ? 1 : 0;
-
- // Or Bitwise
- case -OR_B * 4 + BOOL:
- case -OR_B * 4 + FLOAT: // Prevented by parser
- case -OR_B * 4 + SIGNED:
- case -OR_B * 4 + UNSIGNED:
- return left | right;
-
- // Or Logical
- case -OR_L * 4 + BOOL:
- case -OR_L * 4 + FLOAT:
- case -OR_L * 4 + SIGNED:
- case -OR_L * 4 + UNSIGNED:
- return left != 0 ? left : right;
-
- // Remainder
- case -REMAINDER * 4 + BOOL:
- case -REMAINDER * 4 + SIGNED:
- return right == 0 ? 0 : left % right;
- case -REMAINDER * 4 + UNSIGNED:
- return right == 0 ? 0 :
- (int) ((left & 0xFFFFFFFFL) % (right & 0xFFFFFFFFL));
- case -REMAINDER * 4 + FLOAT:
- return right == 0 ? 0 : Float.floatToIntBits(adjust(
- Float.intBitsToFloat(left ) %
- Float.intBitsToFloat(right)
- ));
-
- // Shift Right Arithmetic
- case -RIGHT_A * 4 + BOOL:
- case -RIGHT_A * 4 + FLOAT: // Prevented by parser
- case -RIGHT_A * 4 + SIGNED:
- case -RIGHT_A * 4 + UNSIGNED:
- return left >> (right & 31);
-
- // Shift Right Logical
- case -RIGHT_L * 4 + BOOL:
- case -RIGHT_L * 4 + FLOAT: // Prevented by parser
- case -RIGHT_L * 4 + SIGNED:
- case -RIGHT_L * 4 + UNSIGNED:
- return left >>> (right & 31);
-
- // Subtract
- case -SUBTRACT * 4 + BOOL:
- case -SUBTRACT * 4 + SIGNED:
- case -SUBTRACT * 4 + UNSIGNED:
- return left - right;
- case -SUBTRACT * 4 + FLOAT:
- return Float.floatToIntBits(adjust(
- Float.intBitsToFloat(left) -
- Float.intBitsToFloat(right)
- ));
-
- // Exclusive Or Bitwise
- case -XOR_B * 4 + BOOL:
- case -XOR_B * 4 + FLOAT: // Prevented by parser
- case -XOR_B * 4 + SIGNED:
- case -XOR_B * 4 + UNSIGNED:
- return left ^ right;
-
- // Exclusive Or Logical
- case -XOR_L * 4 + BOOL:
- case -XOR_L * 4 + FLOAT:
- case -XOR_L * 4 + SIGNED:
- case -XOR_L * 4 + UNSIGNED:
- return left != 0 && right != 0 ? 0 : left != 0 ? left : right;
-
- }
-
- // Unreachable
- return 0;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Adjust a float value as needed
- private static float adjust(float value) {
- int bits = Float.floatToRawIntBits(value);
- int exp = bits & 0x7F800000;
- return
- (bits & 0x7FFFFFFF) == 0 || // Zero
- exp == 0x7F800000 || // Indefinite
- exp == 0 // Denormal
- ? 0 : value;
- }
-
- // Determine the required stack size to evaluate the expression
- private int depth() {
-
- // Error checking
- if (conditionError.code != NONE)
- return 0;
-
- // Count the maximum size of the stack
- int max = 0;
- int size = 0;
- for (var tok : tokens) switch (tok.type) {
- case BINARY: size--; break;
- case UNARY : break;
- default : max = Math.max(max, ++size);
- }
- return max;
- }
-
- // Remove the fraction part of a float
- private static float trunc(float x) {
- return (float) (x < 0 ? Math.ceil(x) : Math.floor(x));
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Debugging Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Produce a string representation of the condition token list
- public String debugTokens() {
- var ret = new StringBuilder();
-
- // The condition was not successfully parsed
- if (conditionError.code != NONE)
- return "Error";
-
- // There is no condition
- if (tokens.length == 0)
- return "";
-
- // Determine the maximum width of the text fields
- int max = 0;
- for (var tok : tokens)
- max = Math.max(max, tok.text.length());
-
- // Output all tokens
- var last = tokens[tokens.length - 1];
- for (var tok : tokens) {
-
- // Text
- ret.append(String.format("%-" + max + "s ", tok.text));
-
- // Type
- String type = null;
- switch (tok.type) {
- case BINARY : type = "Binary" ; break;
- case BOOL : type = "Bool" ; break;
- case FLOAT : type = "Float" ; break;
- case PROREG : type = "ProReg" ; break;
- case SYSREG : type = "SysReg" ; break;
- case SIGNED : type = "Signed" ; break;
- case SYMBOL : type = "Symbol" ; break;
- case UNARY : type = "Unary" ; break;
- case UNSIGNED: type = "Unsigned"; break;
- default: type = Integer.toString(tok.type);
- }
- ret.append(String.format("%-8s ", type));
-
- // Data type
- switch (tok.dataType) {
- case BOOL : type = "Bool" ; break;
- case FLOAT : type = "Float" ; break;
- case SIGNED : type = "Signed" ; break;
- case UNSIGNED: type = "Unsigned"; break;
- default: type = Integer.toString(tok.dataType);
- }
- ret.append(String.format("%-8s ", type));
-
- // Operator
- if (tok.type == BINARY || tok.type == UNARY) {
- String id = Integer.toString(tok.id);
- switch (-tok.id / 4) {
- case 0 : id = "REINTERPRET"; break;
- case READ8 : id = "READ8" ; break;
- case READ16 : id = "READ16" ; break;
- case READ32 : id = "READ32" ; break;
- case ADD : id = "ADD" ; break;
- case AND_B : id = "AND_B" ; break;
- case AND_L : id = "AND_L" ; break;
- case BOOL_ : id = "BOOL_" ; break;
- case CEIL : id = "CEIL" ; break;
- case DIVIDE : id = "DIVIDE" ; break;
- case EQUAL : id = "EQUAL" ; break;
- case FLOAT_ : id = "FLOAT_" ; break;
- case FLOOR : id = "FLOOR" ; break;
- case GREATER : id = "GREATER" ; break;
- case GREQUAL : id = "GREQUAL" ; break;
- case LEFT_L : id = "LEFT_L" ; break;
- case LEQUAL : id = "LEQUAL" ; break;
- case LESS : id = "LESS" ; break;
- case MULTIPLY : id = "MULTIPLY" ; break;
- case NEQUAL : id = "NEQUAL" ; break;
- case NOT_B : id = "NOT_B" ; break;
- case NOT_L : id = "NOT_L" ; break;
- case NEGATE : id = "NEGATE" ; break;
- case OR_B : id = "OR_B" ; break;
- case OR_L : id = "OR_L" ; break;
- case REMAINDER: id = "REMAINDER" ; break;
- case RIGHT_A : id = "RIGHT_A" ; break;
- case RIGHT_L : id = "RIGHT_L" ; break;
- case ROUND : id = "ROUND" ; break;
- case S8 : id = "S8" ; break;
- case S16 : id = "S16" ; break;
- case S32 : id = "S32" ; break;
- case SUBTRACT : id = "SUBTRACT" ; break;
- case TRUNC : id = "TRUNC" ; break;
- case U8 : id = "U8" ; break;
- case U16 : id = "U16" ; break;
- case U32 : id = "U32" ; break;
- case XFLOAT : id = "XFLOAT" ; break;
- case XOR_B : id = "XOR_B" ; break;
- case XOR_L : id = "XOR_L" ; break;
- case XS32 : id = "XS32" ; break;
- case XU32 : id = "XU32" ; break;
- default: ret.append(Integer.toString(tok.id));
- }
- ret.append(String.format("%-11s", id));
- }
-
- // Symbol or literal
- else switch (tok.type) {
- case PROREG:
- case SYSREG:
- case SYMBOL:
- ret.append(Integer.toString(tok.id));
- break;
- case FLOAT:
- ret.append(String.format("%.6f",
- Float.intBitsToFloat(tok.id)));
- break;
- case BOOL:
- case SIGNED:
- ret.append(Integer.toString(tok.id));
- break;
- case UNSIGNED:
- ret.append(Long.toString(tok.id & 0xFFFFFFFFL));
- break;
- default: ret.append("Error");
- }
-
- // Advance to the next line
- if (tok != last)
- ret.append("\n");
- }
-
- return ret.toString();
- }
-
- // Produce a string representation of the internal address ranges
- public String debugRanges() {
- var ret = new StringBuilder();
-
- // The address ranges were not successfully parsed
- if (addressError.code != NONE)
- return "Error";
-
- // Process ranges
- for (int x = 0; x < ranges.length; x++) {
- var range = ranges[x];
- if (x > 0)
- ret.append("\n");
- ret.append(String.format("%08X", range[0]));
- if (range[0] != range[1])
- ret.append(String.format("-%08X", range[1]));
- }
- return ret.toString();
- }
-
-}
\ No newline at end of file
diff --git a/src/desktop/vue/CPU.java b/src/desktop/vue/CPU.java
deleted file mode 100644
index c9a7eca..0000000
--- a/src/desktop/vue/CPU.java
+++ /dev/null
@@ -1,1139 +0,0 @@
-package vue;
-
-// Java imports
-import java.util.*;
-
-// CPU state
-class CPU {
-
- // Private fields
- private JavaVue vue; // Emulation state
-
- // Package fields
- Access access; // Access state
- int cycles; // Cycles until next stage
- int exception; // Exception code
- int fetch; // Fetch unit index
- Instruction inst; // Instruction state
- int irq; // Interrupt lines
- int[] jumpFrom; // Source PCs of most recent jumps
- int[] jumpTo; // Destination PCs of most recent jumps
- int stage; // Current processing stage
-
- // Program registers
- int[] program;
-
- // System registers
- int adtre; // Address Trap Register for Execution
- int eipc; // Exception/interrupt PC
- int eipsw; // Exception/interrupt PSW
- int fepc; // Duplexed exception PC
- int fepsw; // Duplexed exception PSW
- int pc; // Program Counter
- int sr29; // System register 29
- int sr31; // System register 31
-
- // Program Status Word
- int psw_ae; // Address Trap Enable
- int psw_ep; // Exception Pending
- int psw_id; // Interrupt Disable
- int psw_cy; // Carry
- int psw_fiv; // Floating Reserved Operand
- int psw_fov; // Floating Overflow
- int psw_fpr; // Floating Precision
- int psw_fro; // Floating Reserved Operand
- int psw_fud; // Floating Underflow
- int psw_fzd; // Floating Zero Divide
- int psw_i; // Interrupt Level
- int psw_np; // NMI Pending
- int psw_ov; // Overflow
- int psw_s; // Sign
- int psw_z; // Zero
-
- // Cache Control Word
- int chcw_cec; // Clear Entry Count
- int chcw_cen; // Clear Entry Number
- int chcw_icc; // Instruction Cache Clear
- int chcw_icd; // Instruction Cache Dump
- int chcw_ice; // Instruction Cache Enable
- int chcw_icr; // Instruction Cache Restore
- int chcw_sa; // Spill-Out Base Address
-
- // Exception Cause Register
- int ecr_eicc; // Exception/Interrupt Cause Code
- int ecr_fecc; // Fatal Error Cause Code
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Stages
- static final int FATAL = -1;
- static final int FETCH = 0;
- static final int EXECUTE = 1;
- static final int EXCEPTION = 2;
- static final int HALT = 3;
- static final int CLEAR = 4;
- static final int DUMP = 5;
- static final int RESTORE = 6;
-
- // Instruction cycle counts
- private static final byte[] CYCLES = {
- 1, 1, 28, 1, 1, 1, 1, 1, 1, 26, 12, 1, 1, 10, 14, 16,
- 38, 44, 36, 1, 5, 5, 5, 3, 3, 3, 5, 5, 5, 8, 1, 1,
- 1, 1, 1, 9, 13, 30, 13, 1, 1, 1, 1, 1, 1, 4, 4, 4,
- 10, 22, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 4, 4,
- 4, 8, 1, 28, 15, 14, 6, 1, 1, 1, 1, 1
- };
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- CPU(JavaVue vue) {
- access = new Access();
- inst = new Instruction();
- jumpFrom = new int[3];
- jumpTo = new int[3];
- program = new int[32];
- this.vue = vue;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Process the simulation
- void emulate(int cycles) {
-
- // The CPU is in fatal halt status
- if (stage == FATAL)
- return;
-
- // Process for the given number of cycles
- for (;;) {
-
- // The next stage occurs after the given number of cycles
- if (this.cycles > cycles) {
- this.cycles -= cycles;
- return;
- }
-
- // Processing by stage
- cycles -= this.cycles;
- this.cycles = 0;
- switch (stage) {
- case EXCEPTION: if (exception()) return; break;
- case EXECUTE : if (execute ()) return; break;
- case FETCH : if (fetch ()) return; break;
- case HALT : testException(); return;
- }
-
- }
-
- }
-
- // Read a system register
- int getSystemRegister(int index) {
- switch (index) {
- case Vue.ADTRE: return adtre;
- case Vue.EIPC : return eipc;
- case Vue.EIPSW: return eipsw;
- case Vue.FEPC : return fepc;
- case Vue.FEPSW: return fepsw;
- case Vue.ECR : return ecr_fecc << 16 | ecr_eicc;
- case Vue.PIR : return 0x00005346;
- case Vue.TKCW : return 0x000000E0;
- case Vue.CHCW : return chcw_ice << 1;
- case 29 : return sr29;
- case 30 : return 0x00000004;
- case 31 : return sr31;
- case Vue.PSW : return
- psw_i << 16 | psw_fro << 9 | psw_fpr << 4 |
- psw_np << 15 | psw_fiv << 8 | psw_cy << 3 |
- psw_ep << 14 | psw_fzd << 7 | psw_ov << 2 |
- psw_ae << 13 | psw_fov << 6 | psw_s << 1 |
- psw_id << 12 | psw_fud << 5 | psw_z
- ;
-
- // Remaining cases to encourage tableswitch
- case 8: case 9: case 10: case 11: case 12: case 13: case 14:
- case 15: case 16: case 17: case 18: case 19: case 20: case 21:
- return 0;
- }
- return 1; // Unreachable
- }
-
- // System reset
- void reset() {
-
- // Configure instance fields
- cycles = 0;
- exception = 0;
- fetch = -1;
- irq = 0;
- stage = FETCH;
-
- // Clear all registers (hardware only sets ECR, PC and PSW)
- for (int x = 0; x < 32; x++) {
- program[x] = 0;
- setSystemRegister(x, 0, true);
- }
-
- // Configure jump histories
- Arrays.fill(jumpFrom, 0xFFFFFFF0);
- Arrays.fill(jumpTo , 0xFFFFFFF0);
-
- // Configure registers
- ecr_eicc = 0xFFF0;
- pc = 0xFFFFFFF0;
- psw_np = 1;
- }
-
- // Write a system register
- int setSystemRegister(int index, int value, boolean debug) {
- switch (index) {
- case Vue.ADTRE: return adtre = value & 0xFFFFFFFE;
- case Vue.EIPC : return eipc = value & 0xFFFFFFFE;
- case Vue.EIPSW: return eipsw = value & 0x000FF3FF;
- case Vue.FEPC : return fepc = value & 0xFFFFFFFE;
- case Vue.FEPSW: return fepsw = value & 0x000FF3FF;
- case 29 : return sr29 = value;
- case 31 : return sr31 = debug || value >= 0 ? value : -value;
-
- case Vue.ECR:
- if (debug) {
- ecr_fecc = value >> 16 & 0xFFFF;
- ecr_eicc = value & 0xFFFF;
- }
- return ecr_fecc << 16 | ecr_eicc;
-
- case Vue.CHCW :
- chcw_cen = value >> 20 & 0x00000FFF;
- chcw_cec = value >> 8 & 0x00000FFF;
- chcw_sa = value >> 8 & 0x00FFFFFF;
- chcw_icr = value >> 5 & 1;
- chcw_icd = value >> 4 & 1;
- chcw_ice = value >> 1 & 1;
- chcw_icc = value & 1;
-
- // Only one of ICC, ICD or ICR is set
- value &= 0x00000031;
- if ((value & value - 1) == 0) {
- // Clear
- // Dump
- // Restore
- }
-
- return chcw_ice << 1;
-
- case Vue.PSW :
- psw_i = value >> 16 & 15; psw_fov = value >> 6 & 1;
- psw_np = value >> 15 & 1; psw_fud = value >> 5 & 1;
- psw_ep = value >> 14 & 1; psw_fpr = value >> 4 & 1;
- psw_ae = value >> 13 & 1; psw_cy = value >> 3 & 1;
- psw_id = value >> 12 & 1; psw_ov = value >> 2 & 1;
- psw_fro = value >> 9 & 1; psw_s = value >> 1 & 1;
- psw_fiv = value >> 8 & 1; psw_z = value & 1;
- psw_fzd = value >> 7 & 1;
- return value & 0x000FF3FF;
-
- // Remaining cases to encourage tableswitch
- case 6: case 7: case 8: case 9: case 10: case 11: case 12:
- case 13: case 14: case 15: case 16: case 17: case 18: case 19:
- case 20: case 21: case 22: case 23: case 26: case 27: case 28:
- case 30:
- return 0;
- }
- return 1; // Unreachable
- }
-
- // Determine the number of CPU cycles until a breakpoint could trigger
- int until(int cycles) {
- return stage == FATAL || stage == HALT ?
- cycles : Math.min(cycles, this.cycles);
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Operations for exception stage
- private boolean exception() {
-
- // Check for breakpoints
- if (vue.onBreakpoint(Breakpoint.EXCEPTION))
- return true;
-
- // Configure working variables
- exception &= 0xFFFF;
- boolean isIRQ = (exception & 0xFF00) == 0xFE00;
- int psw = getSystemRegister(Vue.PSW);
-
- // Fatal exception
- if (psw_np != 0) {
- vue.write(0x00000000, Vue.S32, 0xFFFF0000 | exception);
- vue.write(0x00000004, Vue.S32, psw);
- vue.write(0x00000008, Vue.S32, pc);
- stage = FATAL;
- return true;
- }
-
- // Duplexed exception
- if (psw_ep != 0) {
- ecr_fecc = exception;
- fepc = pc;
- fepsw = psw;
- psw_np = 1;
- pc = 0xFFFFFFD0;
- }
-
- // Regular exception
- else {
- ecr_eicc = exception;
- eipc = pc;
- eipsw = psw;
- psw_ep = 1;
- pc = 0xFFFF0000 | exception & 0xFFF0;
- if (pc == 0xFFFFFF70) // FIV
- pc = 0xFFFFFF60;
- }
-
- // Interrupt
- if (isIRQ) {
- psw_i = Math.min(15, exception >> 4 & 15);
- if (stage == HALT)
- pc += 2;
- }
-
- // Common processing
- cycles = 0; // TODO: Determine the actual number
- exception = 0;
- psw_ae = 0;
- psw_id = 1;
- stage = FETCH;
- return false;
- }
-
- // Operations for execute stage
- private boolean execute() {
-
- // Check for breakpoints
- if (vue.onBreakpoint(Breakpoint.EXECUTE))
- return true;
-
- // Processing by instruction ID
- switch (inst.id) {
- case Vue.ADD_IMM: ADD_IMM(); break;
- case Vue.ADD_REG: ADD_REG(); break;
- case Vue.ADDF_S : ADDF_S (); break;
- case Vue.ADDI : ADDI (); break;
- case Vue.AND : AND (); break;
- //case Vue.ANDBSU : ANDBSU (); break;
- case Vue.ANDI : ANDI (); break;
- //case Vue.ANDNBSU: ANDNBSU(); break;
- case Vue.BCOND : BCOND (); break;
- case Vue.CAXI : CAXI (); break;
- case Vue.CLI : CLI (); break;
- case Vue.CMP_IMM: CMP_IMM(); break;
- case Vue.CMP_REG: CMP_REG(); break;
- case Vue.CMPF_S : CMPF_S (); break;
- case Vue.CVT_SW : CVT_SW (); break;
- case Vue.CVT_WS : CVT_WS (); break;
- case Vue.DIV : DIV (); break;
- case Vue.DIVF_S : DIVF_S (); break;
- case Vue.DIVU : DIVU (); break;
- case Vue.HALT : HALT (); break;
- case Vue.IN_B : IN_B (); break;
- case Vue.IN_H : IN_H (); break;
- case Vue.IN_W : IN_W (); break;
- case Vue.JAL : JAL (); break;
- case Vue.JMP : JMP (); break;
- case Vue.JR : JR (); break;
- case Vue.LD_B : LD_B (); break;
- case Vue.LD_H : LD_H (); break;
- case Vue.LD_W : LD_W (); break;
- case Vue.LDSR : LDSR (); break;
- case Vue.MOV_IMM: MOV_IMM(); break;
- case Vue.MOV_REG: MOV_REG(); break;
- //case Vue.MOVBSU : MOVBSU (); break;
- case Vue.MOVEA : MOVEA (); break;
- case Vue.MOVHI : MOVHI (); break;
- case Vue.MPYHW : MPYHW (); break;
- case Vue.MUL : MUL (); break;
- case Vue.MULF_S : MULF_S (); break;
- case Vue.MULU : MULU (); break;
- case Vue.NOT : NOT (); break;
- //case Vue.NOTBSU : NOTBSU (); break;
- case Vue.OR : OR (); break;
- //case Vue.ORBSU : ORBSU (); break;
- case Vue.ORI : ORI (); break;
- //case Vue.ORNBSU : ORNBSU (); break;
- case Vue.OUT_B : OUT_B (); break;
- case Vue.OUT_H : OUT_H (); break;
- case Vue.OUT_W : OUT_W (); break;
- case Vue.RETI : RETI (); break;
- case Vue.REV : REV (); break;
- case Vue.SAR_IMM: SAR_IMM(); break;
- case Vue.SAR_REG: SAR_REG(); break;
- //case Vue.SCH0BSD: SCH0BSD(); break;
- //case Vue.SCH0BSU: SCH0BSU(); break;
- //case Vue.SCH1BSD: SCH1BSD(); break;
- //case Vue.SCH1BSU: SCH1BSU(); break;
- case Vue.SEI : SEI (); break;
- case Vue.SETF : SETF (); break;
- case Vue.SHL_IMM: SHL_IMM(); break;
- case Vue.SHL_REG: SHL_REG(); break;
- case Vue.SHR_IMM: SHR_IMM(); break;
- case Vue.SHR_REG: SHR_REG(); break;
- case Vue.ST_B : ST_B (); break;
- case Vue.ST_H : ST_H (); break;
- case Vue.ST_W : ST_W (); break;
- case Vue.STSR : STSR (); break;
- case Vue.SUB : SUB (); break;
- case Vue.SUBF_S : SUBF_S (); break;
- case Vue.TRAP : TRAP (); break;
- case Vue.TRNC_SW: TRNC_SW(); break;
- case Vue.XB : XB (); break;
- case Vue.XH : XH (); break;
- case Vue.XOR : XOR (); break;
- //case Vue.XORBSU : XORBSU (); break;
- case Vue.XORI : XORI (); break;
- //case Vue.XORNBSU: XORNBSU(); break;
- default: // Invalid instruction
- exception = 0xFF90;
- }
-
- // An application break was requested
- if (vue.breakCode != 0)
- return true;
-
- // Common processing
- if (exception == 0) {
- cycles += CYCLES[inst.id];
- pc += inst.size;
- }
- program[0] = 0;
- testException();
- if (stage == EXECUTE)
- stage = FETCH;
- return false;
- }
-
- // Operations for fetch stage
- private boolean fetch() {
-
- // Entering the fetch stage
- if (fetch == -1)
- fetch = 0;
-
- // Read the bits from the bus
- if (read(pc + (fetch << 1), Vue.U16, fetch))
- return true;
- // TODO: Determine how many cycles this takes
-
- // First unit
- if (fetch == 0) {
- inst.bits = access.value;
- if (Instruction.size(access.value >> 10) == 4) {
- fetch = 1;
- return false;
- }
- }
-
- // Second unit
- else {
- inst.bits |= access.value << 16;
- fetch = -1;
- }
-
- // Decode the instruction and advance to execute stage
- inst.decode(inst.bits);
- stage = EXECUTE;
- return false;
- }
-
- // Perform a bus read
- private boolean read(int address, int type, int fetch) {
-
- // Perform the operation
- access.address = address;
- access.fetch = fetch;
- access.type = type;
- access.value = vue.read(address, type);
-
- // Check for breakpoints
- return vue.onBreakpoint(Breakpoint.READ);
- }
-
- // Test a condition
- private int testCondition(int condition) {
- switch (condition) {
- case 0: return psw_ov;
- case 1: return psw_cy;
- case 2: return psw_z;
- case 3: return psw_cy | psw_z;
- case 4: return psw_s;
- case 5: return 1;
- case 6: return psw_ov ^ psw_s;
- case 7: return psw_ov ^ psw_s | psw_z;
- }
- return testCondition(condition & 7) ^ 1;
- }
-
- // Check for an exception or interrupt
- private boolean testException() {
-
- // Check for an interrupt
- if (irq != 0 && (exception | psw_id | psw_ep | psw_np) == 0) {
- int level;
- for (level = 4; level >= 0; level--)
- if ((irq >> level & 1) != 0)
- break;
- exception = 0xFE00 | level << 4;
- }
-
- // There is no exception
- if (exception == 0)
- return stage == HALT && cycles == 0; // No further processing
-
- // An exception has occurred
- cycles = 0;
- stage = EXCEPTION;
- return false;
- }
-
- // Perform a bus write
- private boolean write(int address, int type, int value) {
-
- // Prepare the operation
- access.address = address;
- access.fetch = -1;
- access.type = type;
- access.value = value;
-
- // Check for breakpoints
- if (vue.onBreakpoint(Breakpoint.WRITE))
- return true;
-
- // Perform the operation
- if (access.type != Vue.CANCEL)
- vue.write(access.address, access.type, access.value);
- return false;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Instruction Helpers //
- ///////////////////////////////////////////////////////////////////////////
-
- // Integer addition
- private int add(int left, int right) {
- int result = left + right;
- psw_cy = Integer.compareUnsigned(result, left) < 0 ? 1 : 0;
- psw_s = result >>> 31;
- psw_ov = (~(left ^ right) & (left ^ result)) >>> 31;
- psw_z = result == 0 ? 1 : 0;
- return result;
- }
-
- // Bitwise operation
- private void bitwise(int result) {
- program[inst.reg2] = result;
- psw_ov = 0;
- psw_s = result >>> 31;
- psw_z = result == 0 ? 1 : 0;
- }
-
- // Convert a floating short to word
- private void floatConvert(boolean round) {
-
- // Reserved operand
- if (floatReserved(false))
- return;
-
- // Determine the value to convert
- float value = Float.intBitsToFloat(program[inst.reg1]);
- value = (float) (round ? Math.round(value) :
- value < 0 ? Math.ceil(value) : Math.floor(value));
-
- // Invalid operation
- if (value > 0x7FFFFFFF || value < 0x80000000) {
- exception = 0xFF70;
- return;
- }
-
- // Common processing
- int result = (int) value;
- if (result != value) // Precision degradation
- psw_fpr = 1;
- program[inst.reg2] = result;
- psw_ov = 0;
- psw_s = result >>> 31;
- psw_z = result == 0 ? 1 : 0;
- }
-
- // Determine whether the floating-point operands are reserved values
- private boolean floatReserved(boolean left) {
- for (int x = left ? 0 : 1; x < 2; x++) {
- int operand = program[x == 0 ? inst.reg2 : inst.reg1];
- int exponent = operand & 0x7F800000;
-
- // Check for a reserved operand
- if (!(
- exponent == 0x7F800000 || // Indefinite
- exponent == 0 && (operand & 0x007FFFFF) != 0 // Denormal
- )) continue;
-
- // The value is a reserved operand
- exception = 0xFF60;
- psw_fro = 1;
- return true;
- }
- return false;
- }
-
- // Floating-point result
- private void floatResult(boolean compare, double full) {
-
- // Overflow
- if (full > Float.MAX_VALUE || full < -Float.MAX_VALUE) {
- exception = 0xFF64;
- psw_fov = 1;
- return;
- }
-
- // Process the result
- float result = (float) full;
- int bits = Float.floatToRawIntBits(result);
-
- // Underflow
- if ((bits & 0x7F800000) == 0 && (bits & 0x007FFFFF) != 0) {
- bits = 0;
- result = 0;
- psw_fud = 1;
- }
-
- // Operations other than compare
- if (!compare) {
- program[inst.reg2] = bits;
- if (result != full) // Precision degradation
- psw_fpr = 1;
- }
-
- // Common processing
- psw_cy = psw_s = bits >>> 31;
- psw_ov = 0;
- psw_z = bits == 0 ? 1 : 0;
- }
-
- // Proxy for IN and LD
- private void IN_LD(int type) {
- if (!read(program[inst.reg1] + inst.disp, type, -1))
- program[inst.reg2] = access.value;
- }
-
- // Transfer program to another address
- private void jump(int address) {
- if (address != pc) {
- int level = psw_np != 0 ? 2 : psw_ep;
- jumpFrom[level] = pc;
- jumpTo [level] = address;
- }
- pc = address - inst.size;
- }
-
- // Proxy for OUT and ST
- private void OUT_ST(int type) {
- write(program[inst.reg1] + inst.disp, type, program[inst.reg2]);
- }
-
- // Arithmetic shift right
- private void shiftArithmetic(int value, int bits) {
- bits &= 31;
- psw_cy = bits == 0 ? 0 : value >> bits - 1 & 1;
- bitwise(value >> bits);
- }
-
- // Logical shift left
- private void shiftLeft(int value, int bits) {
- bits &= 31;
- psw_cy = bits == 0 ? 0 : value >> 32 - bits & 1;
- bitwise(value << bits);
- }
-
- // Logical shift right
- private void shiftRight(int value, int bits) {
- bits &= 31;
- psw_cy = bits == 0 ? 0 : value >> bits - 1 & 1;
- bitwise(value >>> bits);
- }
-
- // Integer subtraction
- private int subtract(int left, int right) {
- int result = left - right;
- psw_cy = Integer.compareUnsigned(result, left) > 0 ? 1 : 0;
- psw_s = result >>> 31;
- psw_ov = ((left ^ right) & (left ^ result)) >>> 31;
- psw_z = result == 0 ? 1 : 0;
- return result;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Instruction Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Add Immediate
- private void ADD_IMM() {
- program[inst.reg2] = add(program[inst.reg2], inst.imm);
- }
-
- // Add Register
- private void ADD_REG() {
- program[inst.reg2] = add(program[inst.reg2], program[inst.reg1]);
- }
-
- // Add Floating Short
- private void ADDF_S() {
- if (!floatReserved(true)) floatResult(false,
- (double) Float.intBitsToFloat(program[inst.reg2]) +
- (double) Float.intBitsToFloat(program[inst.reg1]));
- }
-
- // Add Immediate
- private void ADDI() {
- program[inst.reg2] = add(program[inst.reg1], inst.imm);
- }
-
- // And
- private void AND() {
- bitwise(program[inst.reg2] & program[inst.reg1]);
- }
-
- // And Immediate
- private void ANDI() {
- bitwise(program[inst.reg1] & inst.imm);
- }
-
- // Branch on Condition
- private void BCOND() {
- if (testCondition(inst.cond) == 0)
- return;
- cycles = 2;
- jump(pc + inst.disp);
- }
-
- // Compare and Exchange Interlocked
- private void CAXI() {
- int address = program[inst.reg1] + inst.disp;
- int left = program[inst.reg2];
-
- // Retrieve the lock word
- if (read(address, Vue.S32, -1))
- return;
- int lock = access.value;
-
- // Compare and exchange
- if (lock == left)
- access.value = program[30];
- if (write(address, Vue.S32, access.value))
- return;
-
- // Update CPU state
- subtract(left, lock);
- program[inst.reg2] = lock;
- }
-
- // Clear Interrupt Disable Flag
- private void CLI() {
- psw_id = 0;
- }
-
- // Compare Immediate
- private void CMP_IMM() {
- subtract(program[inst.reg2], inst.imm);
- }
-
- // Compare Register
- private void CMP_REG() {
- subtract(program[inst.reg2], program[inst.reg1]);
- }
-
- // Compare Floating Short
- private void CMPF_S() {
- if (!floatReserved(true)) floatResult(true,
- (double) Float.intBitsToFloat(program[inst.reg2]) -
- (double) Float.intBitsToFloat(program[inst.reg1]));
- }
-
- // Convert Short Floating to Word
- private void CVT_SW() {
- floatConvert(true);
- }
-
- // Convert Word Integer to Short
- private void CVT_WS() {
- int bits = program[inst.reg1];
- float result = (float) bits;
- program[inst.reg2] = Float.floatToRawIntBits(result);
- if (result != bits) // Precision degradation
- psw_fpr = 1;
- psw_cy = psw_s = bits >>> 31;
- psw_ov = 0;
- psw_z = bits == 0 ? 1 : 0;
- }
-
- // Divide
- private void DIV() {
- int left = program[inst.reg2];
- int right = program[inst.reg1];
-
- // Zero division
- if (right == 0) {
- exception = 0xFF80;
- return;
- }
-
- // Special case
- if (left == 0x80000000 && right == 0xFFFFFFFF) {
- program[30] = 0;
- program[inst.reg2] = 0x80000000;
- psw_ov = 1;
- psw_s = 1;
- psw_z = 0;
- return;
- }
-
- // Regular case
- int result = left / right;
- program[30] = left % right;
- program[inst.reg2] = result;
- psw_ov = 0;
- psw_s = result >>> 31;
- psw_z = result == 0 ? 1 : 0;
- }
-
- // Divide Floating Short
- private void DIVF_S() {
- int left = program[inst.reg2];
- int right = program[inst.reg1];
-
- // Reserved operand
- if (floatReserved(true))
- return;
-
- // An exception has occurred
- if (right == 0) {
- exception = left == 0 ? 0xFF70 : 0xFF68;
- return;
- }
-
- // Perform the operation
- floatResult(false,
- (double) Float.intBitsToFloat(left) /
- (double) Float.intBitsToFloat(right));
- }
-
- // Divide Unsigned
- private void DIVU() {
- long left = program[inst.reg2] & 0xFFFFFFFFL;
- long right = program[inst.reg1] & 0xFFFFFFFFL;
-
- // Zero division
- if (right == 0) {
- exception = 0xFF80;
- return;
- }
-
- // Regular case
- int result = (int) (left / right);
- program[30] = (int) (left % right);
- program[inst.reg2] = result;
- psw_ov = 0;
- psw_s = result >>> 31;
- psw_z = result == 0 ? 1 : 0;
- }
-
- // Halt
- private void HALT() {
- stage = HALT;
- inst.size = 0;
- }
-
- // Input Byte from Port
- private void IN_B() {
- IN_LD(Vue.U8);
- }
-
- // Input Halfword from Port
- private void IN_H() {
- IN_LD(Vue.U16);
- }
-
- // Input Word from Port
- private void IN_W() {
- IN_LD(Vue.S32);
- }
-
- // Jump and Link
- private void JAL() {
- program[31] = pc + 4;
- jump(pc + inst.disp);
- }
-
- // Jump Register
- private void JMP() {
- jump(program[inst.reg1]);
- }
-
- // Jump Relative
- private void JR() {
- jump(pc + inst.disp);
- }
-
- // Load Byte
- private void LD_B() {
- IN_LD(Vue.S8);
- }
-
- // Load Halfword
- private void LD_H() {
- IN_LD(Vue.S16);
- }
-
- // Load Word
- private void LD_W() {
- IN_LD(Vue.S32);
- }
-
- // Load to System Register
- private void LDSR() {
- setSystemRegister(inst.imm & 31, program[inst.reg2], false);
- }
-
- // Move Immediate
- private void MOV_IMM() {
- program[inst.reg2] = inst.imm;
- }
-
- // Move Register
- private void MOV_REG() {
- program[inst.reg2] = program[inst.reg1];
- }
-
- // Add
- private void MOVEA() {
- program[inst.reg2] = program[inst.reg1] + inst.imm;
- }
-
- // Add
- private void MOVHI() {
- program[inst.reg2] = program[inst.reg1] + (inst.imm << 16);
- }
-
- // Multiply Halfword
- private void MPYHW() {
- program[inst.reg2] *= program[inst.reg1] << 15 >> 15;
- }
-
- // Multiply
- private void MUL() {
- long full = (long) program[inst.reg2] * (long) program[inst.reg1];
- int result = (int) full;
- program[30] = (int) (full >> 32);
- program[inst.reg2] = result;
- psw_ov = (long) result != full ? 1 : 0;
- psw_s = result >>> 31;
- psw_z = result == 0 ? 1 : 0;
- }
-
- // Multiply Floating Short
- private void MULF_S() {
- if (!floatReserved(true)) floatResult(false,
- (double) Float.intBitsToFloat(program[inst.reg2]) *
- (double) Float.intBitsToFloat(program[inst.reg1]));
- }
-
- // Multiply Unsigned
- private void MULU() {
- long full = (program[inst.reg2] & 0xFFFFFFFFL) *
- (program[inst.reg1] & 0xFFFFFFFFL);
- int result = (int) full;
- program[30] = (int) (full >> 32);
- program[inst.reg2] = result;
- psw_ov = full > 0xFFFFFFFFL ? 1 : 0;
- psw_s = result >>> 31;
- psw_z = result == 0 ? 1 : 0;
- }
-
- // Not
- private void NOT() {
- bitwise(~program[inst.reg1]);
- }
-
- // Or
- private void OR() {
- bitwise(program[inst.reg2] | program[inst.reg1]);
- }
-
- // Or Immediate
- private void ORI() {
- bitwise(program[inst.reg1] | inst.imm);
- }
-
- // Output Byte to Port
- private void OUT_B() {
- OUT_ST(Vue.U8);
- }
-
- // Output Halfword to Port
- private void OUT_H() {
- OUT_ST(Vue.U16);
- }
-
- // Output Word to Port
- private void OUT_W() {
- OUT_ST(Vue.S32);
- }
-
- // Return from Trap or Interrupt
- private void RETI() {
- if (psw_np == 1) {
- pc = fepc;
- setSystemRegister(Vue.PSW, fepsw, false);
- } else {
- pc = eipc;
- setSystemRegister(Vue.PSW, eipsw, false);
- }
- }
-
- // Reverse Bits in Word
- private void REV() {
- int value = program[inst.reg1];
- value = value >> 16 & 0x0000FFFF | value << 16;
- value = value >> 8 & 0x00FF00FF | value << 8 & 0xFF00FF00;
- value = value >> 4 & 0x0F0F0F0F | value << 4 & 0xF0F0F0F0;
- value = value >> 2 & 0x33333333 | value << 2 & 0xCCCCCCCC;
- value = value >> 1 & 0x55555555 | value << 1 & 0xAAAAAAAA;
- program[inst.reg2] = value;
- }
-
- // Shift Arithmetic Right by Immediate
- private void SAR_IMM() {
- shiftArithmetic(program[inst.reg2], inst.imm);
- }
-
- // Shift Arithmetic Right by Register
- private void SAR_REG() {
- shiftArithmetic(program[inst.reg2], program[inst.reg1]);
- }
-
- // Set Interrupt Disable Flag
- private void SEI() {
- psw_id = 1;
- }
-
- // Set Flag Condition
- private void SETF() {
- program[inst.reg2] = testCondition(inst.imm & 15);
- }
-
- // Shift Logical Left by Immediate
- private void SHL_IMM() {
- shiftLeft(program[inst.reg2], inst.imm);
- }
-
- // Shift Logical Left by Register
- private void SHL_REG() {
- shiftLeft(program[inst.reg2], program[inst.reg1]);
- }
-
- // Shift Logical Right by Immediate
- private void SHR_IMM() {
- shiftRight(program[inst.reg2], inst.imm);
- }
-
- // Shift Logical Right by Register
- private void SHR_REG() {
- shiftRight(program[inst.reg2], program[inst.reg1]);
- }
-
- // Store Byte
- private void ST_B() {
- OUT_ST(Vue.S8);
- }
-
- // Store Halfword
- private void ST_H() {
- OUT_ST(Vue.S16);
- }
-
- // Store Word
- private void ST_W() {
- OUT_ST(Vue.S32);
- }
-
- // Store Contents of System Register
- private void STSR() {
- program[inst.reg2] = getSystemRegister(inst.imm & 31);
- }
-
- // Subtract
- private void SUB() {
- program[inst.reg2] = subtract(program[inst.reg2], program[inst.reg1]);
- }
-
- // Subtract Floating Short
- private void SUBF_S() {
- if (!floatReserved(true)) floatResult(false,
- (double) Float.intBitsToFloat(program[inst.reg2]) -
- (double) Float.intBitsToFloat(program[inst.reg1]));
- }
-
- // Trap
- private void TRAP() {
- exception = 0xFFA0 | inst.imm & 31;
- pc += 2;
- }
-
- // Truncate Short Floating to Word
- private void TRNC_SW() {
- floatConvert(false);
- }
-
- // Exchange Byte
- private void XB() {
- int value = program[inst.reg2];
- program[inst.reg2] = value & 0xFFFF0000 |
- value >> 8 & 0xFF | (value & 0xFF) << 8;
- }
-
- // Exchange Halfword
- private void XH() {
- int value = program[inst.reg2];
- program[inst.reg2] = value >> 16 & 0xFFFF | value << 16;
- }
-
- // Exclusive Or
- private void XOR() {
- bitwise(program[inst.reg2] ^ program[inst.reg1]);
- }
-
- // Exclusive Or Immediate
- private void XORI() {
- bitwise(program[inst.reg1] ^ inst.imm);
- }
-
-}
diff --git a/src/desktop/vue/GamePak.java b/src/desktop/vue/GamePak.java
deleted file mode 100644
index 5845a96..0000000
--- a/src/desktop/vue/GamePak.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package vue;
-
-// Simulation of the Game Pak
-class GamePak {
-
- // Package fields
- byte[] ram; // Cartridge SRAM
- byte[] rom; // Cartridge ROM
- int wcr_exp1w; // Expansion one-wait mode
- int wcr_rom1w; // ROM one-wait mode
-
- // Private fields
- private JavaVue vue; // Emulation state
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- GamePak(JavaVue vue) {
- this.vue = vue;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // System reset
- void reset() {
- wcr_exp1w = 0;
- wcr_rom1w = 0;
- }
-
-}
diff --git a/src/desktop/vue/Instruction.java b/src/desktop/vue/Instruction.java
deleted file mode 100644
index bdfbaab..0000000
--- a/src/desktop/vue/Instruction.java
+++ /dev/null
@@ -1,228 +0,0 @@
-package vue;
-
-// Instruction state and decoder
-public class Instruction {
-
- // Instruction fields
- public int bits; // Binary encoding
- public int cond; // Condition for Bcond
- public int disp; // Displacement for jumps and branches
- public int format; // Binary format
- public int id; // Library-specific identifier
- public int imm; // Immediate operand
- public int opcode; // Instruction opcode
- public int reg1; // Source/right register
- public int reg2; // Destination/left register
- public int size; // Number of bytes in encoding
- public int subopcode; // Instruction subopcode
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Intermediate instruction IDs
- private static final int BITSTRING = -2;
- private static final int FLOATENDO = -3;
-
- // Opcode lookup table
- private static final byte[] LOOKUP_OPCODE = {
- Vue.MOV_REG, 1, Vue.ADD_REG, 1, Vue.SUB , 1, Vue.CMP_REG, 1,
- Vue.SHL_REG, 1, Vue.SHR_REG, 1, Vue.JMP , 1, Vue.SAR_REG, 1,
- Vue.MUL , 1, Vue.DIV , 1, Vue.MULU , 1, Vue.DIVU , 1,
- Vue.OR , 1, Vue.AND , 1, Vue.XOR , 1, Vue.NOT , 1,
- Vue.MOV_IMM,-2, Vue.ADD_IMM,-2, Vue.SETF , 2, Vue.CMP_IMM,-2,
- Vue.SHL_IMM, 2, Vue.SHR_IMM, 2, Vue.CLI , 2, Vue.SAR_IMM, 2,
- Vue.TRAP , 2, Vue.RETI , 2, Vue.HALT , 2, Vue.ILLEGAL, 0,
- Vue.LDSR , 2, Vue.STSR , 2, Vue.SEI , 2, BITSTRING , 2,
- Vue.BCOND , 3, Vue.BCOND , 3, Vue.BCOND , 3, Vue.BCOND , 3,
- Vue.BCOND , 3, Vue.BCOND , 3, Vue.BCOND , 3, Vue.BCOND , 3,
- Vue.MOVEA ,-5, Vue.ADDI ,-5, Vue.JR , 4, Vue.JAL , 4,
- Vue.ORI , 5, Vue.ANDI , 5, Vue.XORI , 5, Vue.MOVHI , 5,
- Vue.LD_B , 6, Vue.LD_H , 6, Vue.ILLEGAL, 0, Vue.LD_W , 6,
- Vue.ST_B , 6, Vue.ST_H , 6, Vue.ILLEGAL, 0, Vue.ST_W , 6,
- Vue.IN_B , 6, Vue.IN_H , 6, Vue.CAXI , 6, Vue.IN_W , 6,
- Vue.OUT_B , 6, Vue.OUT_H , 6, FLOATENDO , 7, Vue.OUT_W , 6
- };
-
- // Bit string lookup table
- private static final byte[] LOOKUP_BITSTRING = {
- Vue.SCH0BSU, Vue.SCH0BSD, Vue.SCH1BSU, Vue.SCH1BSD,
- Vue.ILLEGAL, Vue.ILLEGAL, Vue.ILLEGAL, Vue.ILLEGAL,
- Vue.ORBSU , Vue.ANDBSU , Vue.XORBSU , Vue.MOVBSU ,
- Vue.ORNBSU , Vue.ANDNBSU, Vue.XORNBSU, Vue.XORNBSU
- };
-
- // Floating-point and Nintendo lookup table
- private static final byte[] LOOKUP_FLOATENDO = {
- Vue.CMPF_S , Vue.ILLEGAL, Vue.CVT_WS , Vue.CVT_SW ,
- Vue.ADDF_S , Vue.SUBF_S , Vue.MULF_S , Vue.DIVF_S ,
- Vue.XB , Vue.XH , Vue.REV , Vue.TRNC_SW,
- Vue.MPYHW , Vue.ILLEGAL, Vue.ILLEGAL, Vue.ILLEGAL
- };
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Static Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Determine the size of an instruction given its opcode
- public static int size(int opcode) {
- return Math.abs(LOOKUP_OPCODE[opcode << 1 | 1]) < 4 ? 2 : 4;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- public Instruction() { }
-
- // Decoding constructor
- public Instruction(int bits) {
- decode(bits);
- }
-
- // Cloning constructor
- Instruction(Instruction o) {
- this();
- bits = o.bits;
- cond = o.cond;
- disp = o.disp;
- format = o.format;
- id = o.id;
- imm = o.imm;
- opcode = o.opcode;
- reg1 = o.reg1;
- reg2 = o.reg2;
- size = o.size;
- subopcode = o.subopcode;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Produce an access descriptor from the current instruction state
- public Access access(Vue vue) {
- boolean read = false;
- var ret = new Access();
- ret.address = vue.getRegister(reg1, false) + disp;
- ret.fetch = vue.getFetch();
- ret.type = Vue.S32;
-
- // Configure descriptor by ID
- switch (id) {
- case Vue.CAXI : read = true; break;
- case Vue.IN_B : ret.type = Vue.U8 ; read = true; break;
- case Vue.IN_H : ret.type = Vue.U16; read = true; break;
- case Vue.IN_W : read = true; break;
- case Vue.LD_B : ret.type = Vue.S8 ; read = true; break;
- case Vue.LD_H : ret.type = Vue.S16; read = true; break;
- case Vue.LD_W : read = true; break;
- case Vue.OUT_B: ret.type = Vue.U8 ; break;
- case Vue.OUT_H: ret.type = Vue.U16; break;
- case Vue.OUT_W: break;
- case Vue.ST_B : ret.type = Vue.S8 ; break;
- case Vue.ST_H : ret.type = Vue.S16; break;
- case Vue.ST_W : break;
- // TODO: Bit strings
- default: return null;
- }
-
- // Read the value currently on the bus
- if (read)
- ret.value = vue.read(ret.address, ret.type);
-
- // Write a register to the bus
- else if (id != Vue.CAXI)
- vue.getRegister(reg2, false);
-
- // CAXI processing
- else {
- int value = vue.read(ret.address, Vue.S32);
- int compare = vue.getRegister(reg2, false);
- int exchange = vue.getRegister( 30, false);
- ret.value = value == compare ? value : exchange;
- }
-
- return ret;
- }
-
- // Decode an instruction from a byte array
- public Instruction decode(byte[] data, int offset) {
- return decode(
- (data[offset + 0] & 0xFF) |
- (data[offset + 1] & 0xFF) << 8 |
- (data[offset + 2] & 0xFF) << 16 |
- (data[offset + 3] & 0xFF) << 24
- );
- }
-
- // Decode an instruction from its binary encoding (swapped halfwords)
- public Instruction decode(int bits) {
- byte extend; // Sign-extend the immediate operand
- int x; // Working variable
-
- // Configure instance fields
- this.bits = bits = bits << 16 | bits >>> 16;
- opcode = bits >> 26 & 63;
- x = opcode << 1;
- id = LOOKUP_OPCODE[x ];
- extend = LOOKUP_OPCODE[x + 1];
- format = extend < 0 ? -extend : extend;
- size = format < 4 ? 2 : 4;
-
- // Decode by format
- switch (format) {
- case 1:
- reg2 = bits >> 21 & 31;
- reg1 = bits >> 16 & 31;
- break;
- case 2:
- reg2 = bits >> 21 & 31;
- imm = extend < 0 ? bits << 11 >> 27 : bits >> 16 & 31;
- if (id == BITSTRING) {
- id = imm >= 16 ? Vue.ILLEGAL : LOOKUP_BITSTRING[imm];
- subopcode = imm;
- }
- if (id == Vue.SETF)
- cond = imm & 15;
- break;
- case 3:
- opcode = 0x20;
- cond = bits >> 25 & 15;
- disp = bits << 7 >> 23;
- break;
- case 4:
- disp = bits << 6 >> 6;
- break;
- case 5:
- reg2 = bits >> 21 & 31;
- reg1 = bits >> 16 & 31;
- imm = extend < 0 ? bits << 16 >> 16 : bits & 0xFFFF;
- break;
- case 6:
- reg2 = bits >> 21 & 31;
- reg1 = bits >> 16 & 31;
- disp = bits << 16 >> 16;
- break;
- case 7:
- reg2 = bits >> 21 & 31;
- reg1 = bits >> 16 & 31;
- subopcode = bits >> 10 & 63;
- id = subopcode >= 16 ? Vue.ILLEGAL :
- LOOKUP_FLOATENDO[subopcode];
- break;
- }
-
- return this;
- }
-
-}
diff --git a/src/desktop/vue/JavaVue.java b/src/desktop/vue/JavaVue.java
deleted file mode 100644
index 8e48bfd..0000000
--- a/src/desktop/vue/JavaVue.java
+++ /dev/null
@@ -1,427 +0,0 @@
-package vue;
-
-// Java imports
-import java.util.*;
-
-// Java emulation core implementation
-class JavaVue extends Vue {
-
- // Package fields
- int breakCode; // Application breakpoint code
- int breakType; // Most recent breakpoint scenario
- int[] stack; // Breakpoint condition evaluation stack
- byte[] wram; // System WRAM
-
- // System components
- CPU cpu; // Processor
- GamePak pak; // Game pak
- VIP vip; // Video unit
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Memory access type sizes
- static final int[] TYPE_SIZES = { 1, 1, 2, 2, 4 };
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- JavaVue() {
-
- // Configure instance fields
- stack = new int[0];
- wram = new byte[0x10000];
-
- // Configure system components
- cpu = new CPU (this);
- pak = new GamePak(this);
- vip = new VIP (this);
-
- // Initialize state
- reset();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Release any used resources
- public void dispose() { }; // No action needed
-
- // Process the simulation
- public int emulate(int maxCycles) {
-
- // Process up to the given number of cycles
- do {
-
- // Determine the number of cycles where no breakpoint will occur
- int cycles = maxCycles; // min(maxCycles, nextFrameCycles)
- cycles = cpu .until(cycles);
- //cycles = pad .until(cycles);
- //cycles = link .until(cycles);
- //cycles = timer.until(cycles);
- cycles = vip .until(cycles);
-
- // Process all system components
- breakCode = 0;
- cpu .emulate(cycles);
- //pad .emulate(cycles);
- //link .emulate(cycles);
- //timer.emulate(cycles);
- vip .emulate(cycles);
- //vsu .emulate(cycles);
- maxCycles -= cycles;
- } while (breakCode == 0 && maxCycles != 0);
-
- // A break condition has occurred
- return maxCycles;
- }
-
- // Retrieve the most recent applicaiton break code
- public int getBreakCode() {
- return breakCode;
- }
-
- // Retrieve the most recent exception code
- public int getExceptionCode() {
- return cpu.exception;
- }
-
- // Retrieve a register value
- public int getRegister(int index, boolean system) {
-
- // Non-indexed registers
- if (system) switch (index) {
- case Vue.JUMP_FROM: return
- cpu.jumpFrom[cpu.psw_np != 0 ? 2 : cpu.psw_ep];
- case Vue.JUMP_TO : return
- cpu.jumpTo [cpu.psw_np != 0 ? 2 : cpu.psw_ep];
- case Vue.PC : return cpu.pc;
- }
-
- // Indexed registers
- return
- index < 0 || index > 31 ? 0 :
- system ? cpu.getSystemRegister(index) :
- cpu.program[index]
- ;
- }
-
- // Retrieve a copy of the ROM data
- public byte[] getROM() {
-
- // No ROM data
- if (pak.rom == null)
- return null;
-
- // Copy the ROM data
- var ret = new byte[pak.rom.length];
- System.arraycopy(pak.rom, 0, ret, 0, ret.length);
- return ret;
- }
-
- // Determine whether the context is native-backed
- public boolean isNative() {
- return false;
- }
-
- // Read a value from the CPU bus
- public int read(int address, int type) {
-
- // Error checking
- if (type < 0 || type > 4)
- return 0;
-
- // Perform the operation
- switch (address >> 24 & 7) {
- case 0: return vip.read ( address, type);
- case 5: return readBuffer(wram , address, type);
- case 6: return readBuffer(pak.ram, address, type);
- case 7: return readBuffer(pak.rom, address, type);
- }
- return 0;
- }
-
- // Read bytes from the CPU bus
- public boolean readBytes(int address, byte[] dest, int offset, int length){
-
- // Error checking
- if (
- dest == null ||
- offset < 0 ||
- length < 0 ||
- offset + length > dest.length
- ) return false;
-
- // Perform the operation
- while (length > 0) {
- int count = Math.min(length, 0x01000000 - (address & 0x00FFFFFF));
- switch (address >> 24 & 7) {
- case 0: vip.readBytes( address,dest,offset,count); break;
- case 5: readBytes(wram ,address,dest,offset,count); break;
- case 6: readBytes(pak.ram,address,dest,offset,count); break;
- case 7: readBytes(pak.rom,address,dest,offset,count); break;
- default: Arrays.fill(dest, offset, offset + count, (byte) 0);
- }
- address += count;
- length -= count;
- offset += count;
- }
- return true;
- }
-
- // Initialize all system components
- public void reset() {
- cpu.reset();
- pak.reset();
- Arrays.fill(wram, 0, 0x10000, (byte) 0);
- }
-
- // Specify a register value
- public int setRegister(int index, boolean system, int value) {
-
- // PC
- if (index == Vue.PC && system) {
- if (cpu.stage == CPU.EXECUTE || cpu.stage == CPU.FETCH) {
- cpu.fetch = -1;
- cpu.stage = CPU.FETCH;
- }
- return cpu.pc = value & 0xFFFFFFFE;
- }
-
- // Other
- return
- index < 0 || index > 31 ? 0 :
- system ? cpu.setSystemRegister(index, value, true) :
- index == 0 ? 0 : (cpu.program[index] = value)
- ;
- }
-
- // Provide new ROM data
- public boolean setROM(byte[] data, int offset, int length) {
-
- // Error checking
- if (
- data == null ||
- offset < 0 ||
- length < 1024 || length > 0x01000000 ||
- (length & length - 1) != 0 ||
- offset + length > data.length
- ) return false;
-
- // Accept the new ROM data
- pak.rom = new byte[length];
- System.arraycopy(data, offset, pak.rom, 0, length);
- return true;
- }
-
- // Write a value to the CPU bus
- public void write(int address, int type, int value) {
- switch (address >> 24 & 7) {
- case 0: vip.write ( address, type, value); break;
- case 5: writeBuffer(wram , address, type, value); break;
- case 6: writeBuffer(pak.ram, address, type, value); break;
- case 7: writeBuffer(pak.rom, address, type, value); break;
- }
- }
-
- // Write bytes to the CPU bus
- public boolean writeBytes(int address, byte[] src, int offset, int length){
-
- // Error checking
- if (
- src == null ||
- offset < 0 ||
- length < 0 ||
- offset + length > src.length
- ) return false;
-
- // Perform the operation
- while (length > 0) {
- int count = Math.min(length, 0x01000000 - (address & 0x00FFFFFF));
- switch (address >> 24 & 7) {
- case 0: vip.writeBytes( address,src,offset,count); break;
- case 5: writeBytes(wram ,address,src,offset,count); break;
- case 6: writeBytes(pak.ram,address,src,offset,count); break;
- case 7: writeBytes(pak.rom,address,src,offset,count); break;
- }
- address += count;
- length -= count;
- offset += count;
- }
- return true;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Retrieve the current state's breakpoint scenario
- int getBreakType() {
- return breakType;
- }
-
- // Retrieve the current instruction fetch index
- int getFetch() {
- return cpu.fetch;
- }
-
- // Check for breakpoints
- boolean onBreakpoint(int breakType) {
- int end = 0;
- boolean ranged = false;
- int start = 0;
- this.breakType = breakType;
-
- // Processing for Execute
- if (breakType == Breakpoint.EXECUTE) {
- ranged = true;
- start = cpu.pc;
- end = start + cpu.inst.size - 1;
- }
-
- // Processing for Read and Write
- else if (breakType==Breakpoint.READ || breakType==Breakpoint.WRITE) {
- ranged = true;
- start = cpu.access.address;
- end = start + TYPE_SIZES[cpu.access.type] - 1;
- }
-
- // Check all breakpoints
- int count = breakpoints.size();
- boolean fetch = breakType == Breakpoint.READ && cpu.fetch != -1;
- for (int x = 0; breakCode == 0 && x < count; x++) {
- var brk = breakpoints.get(x);
- if (
- brk.appliesTo(breakType, fetch) &&
- (!ranged || brk.inRange(start, end)) &&
- brk.isTrue(stack, breakType, cpu.inst, cpu.access)
- ) breakCode = x + 1;
- }
- return breakCode != 0;
- }
-
- // Read a value from a byte buffer
- static int readBuffer(byte[] data, int address, int type) {
-
- // Error checking
- if (data == null)
- return 0;
-
- // Processing by data type
- int size = TYPE_SIZES[type];
- int value = 0;
- address &= ~size + 1 & data.length - 1;
- switch (type) {
- case Vue.S32: value =
- data[address + 3] << 24 |
- (data[address + 2] & 0xFF) << 16;
- // Fallthrough
- case Vue.S16: // Fallthrough
- case Vue.U16: value |=
- (data[address + 1] & 0xFF) << 8;
- // Fallthrough
- case Vue.S8 : // Fallthrough
- case Vue.U8 : value |=
- data[address ] & 0xFF;
- }
-
- // Sign-extend the value if appropriate
- if ((type & 1) == 0) {
- size = 32 - (size << 3);
- value = value << size >> size;
- }
-
- return value;
- }
-
- // Read bytes from a byte buffer
- static void readBytes(byte[] data, int address, byte[] dest, int offset,
- int length) {
-
- // The source does not exist
- if (data == null) {
- Arrays.fill(dest, offset, offset + length, (byte) 0);
- return;
- }
-
- // Transfer bytes from the source as a circular buffer
- while (length > 0) {
- address &= data.length - 1;
- int count = Math.min(length, data.length - address);
- System.arraycopy(data, address, dest, offset, count);
- address += count;
- length -= count;
- offset += count;
- }
-
- }
-
- // A breakpoint's condition tokens have changed
- void updateTokens(Breakpoint brk) {
- super.updateTokens(brk);
- int depth = 0;
- for (var bre : breakpoints)
- depth = Math.max(depth, bre.getDepth());
- if (depth != stack.length)
- stack = new int[depth];
- }
-
- // Write a value to a byte buffer
- static void writeBuffer(byte[] data, int address, int type, int value) {
-
- // The destination does not exist
- if (data == null)
- return;
-
- // Processing by data type
- int size = TYPE_SIZES[type];
- address &= ~size + 1 & data.length - 1;
- switch (type) {
- case Vue.S32:
- data[address + 3] = (byte) (value >> 24);
- data[address + 2] = (byte) (value >> 16);
- // Fallthrough
- case Vue.S16: // Fallthrough
- case Vue.U16:
- data[address + 1] = (byte) (value >> 8);
- // Fallthrough
- case Vue.S8 : // Fallthrough
- case Vue.U8 : value |=
- data[address ] = (byte) value;
- }
-
- }
-
- // Write bytes to a byte buffer
- static void writeBytes(byte[] data, int address, byte[] src, int offset,
- int length) {
-
- // The destination does not exist
- if (data == null)
- return;
-
- // Transfer bytes to the destination as a circular buffer
- while (length > 0) {
- address &= data.length - 1;
- int count = Math.min(length, data.length - address);
- System.arraycopy(src, offset, data, address, count);
- address += count;
- length -= count;
- offset += count;
- }
-
- }
-
-}
diff --git a/src/desktop/vue/NativeVue.c b/src/desktop/vue/NativeVue.c
deleted file mode 100644
index d0a078f..0000000
--- a/src/desktop/vue/NativeVue.c
+++ /dev/null
@@ -1,348 +0,0 @@
-// Native-backed emulation core implementation
-
-#include
-#include
-#include
-#include
-#include
-#include "vue_NativeVue.h"
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Constants //
-///////////////////////////////////////////////////////////////////////////////
-
-// Memory access type sizes
-static const int TYPE_SIZES[] = { 1, 1, 2, 2, 4 };
-
-// Word data type limits
-#define MAX_WORD 2147483648.0f
-#define MAX_UWORD 4294967296.0f
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Types //
-///////////////////////////////////////////////////////////////////////////////
-
-// Breakpoint condition token
-typedef struct {
- int32_t type; // Token category
- int32_t id; // Operator or symbol ID, or literal value
-} Token;
-
-// Precompiled breakpoint
-typedef struct {
- int32_t enabled; // The breakpoint is enabled
- int32_t fetch; // Breakpoint traps fetch reads
- int32_t hooks; // Events hooked by the breakpoint
- int32_t numRanges; // Number of address ranges
- int32_t numTokens; // Number of condition tokens
- uint32_t *ranges; // Address ranges
- Token *tokens; // Condition tokens in RPN order
-} Breakpoint;
-
-// Core context state type
-typedef struct {
- Vue vue; // Context into the generic C library
- int32_t breakType; // Most recent breakpoint scenario
- int32_t numBreakpoints; // Number of breakpoints
- Breakpoint *breakpoints; // Application breakpoints
- int32_t *stack; // Expression stack for breakpoints
-} Core;
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Macros //
-///////////////////////////////////////////////////////////////////////////////
-
-/* Sign-extend a value */
-#define SIGN_EXTEND(bits, value) \
- ((value) & 1 << (bits - 1) ? (value) | (~(1 << bits) + 1) : (value))
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Component Includes //
-///////////////////////////////////////////////////////////////////////////////
-
-#define NATIVEVUE
-#include "Breakpoint.c"
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Constructors //
-///////////////////////////////////////////////////////////////////////////////
-
-// Native constructor
-JNIEXPORT jlong JNICALL Java_vue_NativeVue_construct
- (JNIEnv *env, jobject uve) {
- Core *mem[] = { NULL, NULL };
- Core *core = mem[0] = calloc(sizeof (Core), 1);
- Vue *vue = &core->vue;
- vueInitialize (vue);
- vueOnException(vue, &brkOnException);
- vueOnExecute (vue, &brkOnExecute );
- vueOnFrame (vue, &brkOnFrame );
- vueOnRead (vue, &brkOnRead );
- vueOnWrite (vue, &brkOnWrite );
- vueReset (vue);
- vueSetTag (vue, core);
- return *(jlong *)&core;
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Public Methods //
-///////////////////////////////////////////////////////////////////////////////
-
- // Produce a new breakpoint and add it to the collection
-JNIEXPORT void JNICALL Java_vue_NativeVue_breakpoint
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- core->numBreakpoints++;
- core->breakpoints =
- realloc(core->breakpoints,core->numBreakpoints * sizeof (Breakpoint));
- Breakpoint *brk = &core->breakpoints[core->numBreakpoints - 1];
- memset(brk, 0 ,sizeof (Breakpoint));
- brk->fetch = VUE_TRUE;
-}
-
-// Release any used resources
-JNIEXPORT void JNICALL Java_vue_NativeVue_dispose
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- Breakpoint *brk; // Handle to breakpoint
- int x; // Iterator
-
- // Delete breakpoints
- for (x = 0; x < core->numBreakpoints; x++) {
- brk = &core->breakpoints[x];
- free(brk->ranges);
- free(brk->tokens);
- }
-
- // Delete core
- free(core->breakpoints);
- free(core->stack );
- free(core->vue.pak.rom);
- free(core->vue.pak.ram);
- free(core);
-}
-
-// Process the simulation
-JNIEXPORT jint JNICALL Java_vue_NativeVue_emulate
- (JNIEnv *env, jobject vue, jlong handle, jint maxCycles) {
- Core *core = *(Core **)&handle;
- return vueEmulate(&core->vue, maxCycles);
-}
-
-// Retrieve the most recent exception code
-JNIEXPORT jint JNICALL Java_vue_NativeVue_getBreakCode
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- return vueGetBreakCode(&core->vue);
-}
-
-// Retrieve the most recent exception code
-JNIEXPORT jint JNICALL Java_vue_NativeVue_getExceptionCode
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- return vueGetExceptionCode(&core->vue);
-}
-
-// Retrieve a register value
-JNIEXPORT jint JNICALL Java_vue_NativeVue_getRegister
- (JNIEnv *env, jobject vue, jlong handle, jint index, jboolean system) {
- Core *core = *(Core **)&handle;
- return vueGetRegister(&core->vue, index, system);
-}
-
-// Retrieve a copy of the ROM data
-JNIEXPORT jbyteArray JNICALL Java_vue_NativeVue_getROM
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
-
- // No ROM data
- if (core->vue.pak.rom == NULL)
- return NULL;
-
- // Copy the ROM data
- jbyteArray ret = (*env)->NewByteArray(env, (jint)core->vue.pak.romSize);
- jbyte *elems = (*env)->GetByteArrayElements(env, ret, NULL);
- memcpy(elems, core->vue.pak.rom, core->vue.pak.romSize);
- (*env)->ReleaseByteArrayElements(env, ret, elems, 0);
- return ret;
-}
-
-// Read a value from the CPU bus
-JNIEXPORT jint JNICALL Java_vue_NativeVue_read
- (JNIEnv *env, jobject vue, jlong handle, jint address, jint type) {
- Core *core = *(Core **)&handle;
- return vueRead(&core->vue, address, type);
-}
-
-// Read bytes from the CPU bus
-JNIEXPORT jboolean JNICALL Java_vue_NativeVue_readBytes
- (JNIEnv *env, jobject vue, jlong handle, jint address, jbyteArray data,
- jint offset, jint length) {
-
- // Error checking
- if (
- data == NULL ||
- offset < 0 ||
- length < 0 ||
- offset + length > (*env)->GetArrayLength(env, data)
- ) return JNI_FALSE;
-
- // Perform the operation
- Core *core = *(Core **)&handle;
- jbyte *elems = (*env)->GetByteArrayElements(env, data, NULL);
- vueReadBytes(&core->vue, address, &elems[offset], length);
- (*env)->ReleaseByteArrayElements(env, data, elems, 0);
- return JNI_TRUE;
-}
-
-// Remove a breakpoint from the collection
-JNIEXPORT void JNICALL Java_vue_NativeVue_remove
- (JNIEnv *env, jobject vue, jlong handle, jint index) {
- Core *core = *(Core **)&handle;
- Breakpoint *brk = &core->breakpoints[index];
- free(brk->ranges);
- free(brk->tokens);
- memmove(brk, &core->breakpoints[index + 1],
- (core->numBreakpoints - index - 1) * sizeof (Breakpoint));
- core->numBreakpoints--;
-}
-
-// Initialize all system components
-JNIEXPORT void JNICALL Java_vue_NativeVue_reset
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- vueReset(&core->vue);
-}
-
-// Specify a register value
-JNIEXPORT jint JNICALL Java_vue_NativeVue_setRegister
- (JNIEnv *env, jobject vue, jlong handle, jint index, jboolean system,
- jint value) {
- Core *core = *(Core **)&handle;
- return vueSetRegister(&core->vue, index, system, value);
-}
-
-// Provide new ROM data
-JNIEXPORT jboolean JNICALL Java_vue_NativeVue_setROM
- (JNIEnv *env, jobject vue, jlong handle, jbyteArray data, jint offset,
- jint length) {
-
- // Error checking
- if (
- data == NULL ||
- offset < 0 ||
- length < 1024 || length > 0x01000000 ||
- (length & length - 1) != 0 ||
- offset + length > (*env)->GetArrayLength(env, data)
- ) return JNI_FALSE;
-
- // Accept the new ROM data
- uint8_t *rom = malloc(length);
- jbyte *elems = (*env)->GetByteArrayElements(env, data, NULL);
- memcpy(rom, &elems[offset], length);
- (*env)->ReleaseByteArrayElements(env, data, elems, 0);
-
- // Transfer the ROM data to the emulation state
- Core *core = *(Core **)&handle;
- free(core->vue.pak.rom);
- vueSetROM(&core->vue, rom, length);
- return JNI_TRUE;
-}
-
-// Write a value to the CPU bus
-JNIEXPORT void JNICALL Java_vue_NativeVue_write
- (JNIEnv *env, jobject vue, jlong handle, jint address, jint type,
- jint value) {
- Core *core = *(Core **)&handle;
- vueWrite(&core->vue, address, type, value);
-}
-
-// Write bytes to the CPU bus
-JNIEXPORT jboolean JNICALL Java_vue_NativeVue_writeBytes
- (JNIEnv *env, jobject vue, jlong handle, jint address, jbyteArray data,
- jint offset, jint length) {
-
- // Error checking
- if (
- data == NULL ||
- offset < 0 ||
- length < 0 ||
- offset + length > (*env)->GetArrayLength(env, data)
- ) return JNI_FALSE;
-
- // Perform the operation
- Core *core = *(Core **)&handle;
- jbyte *elems = (*env)->GetByteArrayElements(env, data, NULL);
- vueWriteBytes(&core->vue, address, &elems[offset], length);
- (*env)->ReleaseByteArrayElements(env, data, elems, 0);
- return JNI_TRUE;
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Package Methods //
-///////////////////////////////////////////////////////////////////////////////
-
-// Retrieve the current state's breakpoint scenario
-JNIEXPORT jint JNICALL Java_vue_NativeVue_getBreakType
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- return core->breakType;
-}
-
-// Retrieve the current instruction fetch index
-JNIEXPORT jint JNICALL Java_vue_NativeVue_getFetch
- (JNIEnv *env, jobject vue, jlong handle) {
- Core *core = *(Core **)&handle;
- return core->vue.cpu.fetch;
-}
-
-// A breakpoint's address ranges have changed
-JNIEXPORT void JNICALL Java_vue_NativeVue_updateRanges
- (JNIEnv *env, jobject vue, jlong handle, jint index, jintArray ranges) {
- Core *core = *(Core **)&handle;
- Breakpoint *brk = &core->breakpoints[index];
- brk->numRanges = (*env)->GetArrayLength(env, ranges);
- brk->ranges = realloc(brk->ranges, brk->numRanges * 8);
- jint *elems = (*env)->GetIntArrayElements(env, ranges, NULL);
- memcpy(brk->ranges, elems, brk->numRanges * 8);
- (*env)->ReleaseIntArrayElements(env, ranges, elems, 0);
-}
-
-// A breakpoint's enabled/hook state has changed
-JNIEXPORT void JNICALL Java_vue_NativeVue_updateState
- (JNIEnv *env, jobject vue, jlong handle, jint index, jboolean enabled,
- jboolean fetch, jint hooks) {
- Core *core = *(Core **)&handle;
- Breakpoint *brk = &core->breakpoints[index];
- brk->enabled = enabled;
- brk->fetch = fetch;
- brk->hooks = hooks;
-}
-
-// A breakpoint's condition tokens have changed
-JNIEXPORT void JNICALL Java_vue_NativeVue_updateTokens
- (JNIEnv *env, jobject vue, jlong handle, jint index, jintArray tokens,
- jint depth, jint maxDepth) {
- Core *core = *(Core **)&handle;
- core->stack = realloc(core->stack, maxDepth * 4);
- Breakpoint *brk = &core->breakpoints[index];
- brk->numTokens = (*env)->GetArrayLength(env, tokens) / 2;
- brk->tokens = realloc(brk->tokens, brk->numTokens * sizeof (Token));
- jint *elems = (*env)->GetIntArrayElements(env, tokens, NULL);
- memcpy(brk->tokens, elems, brk->numTokens * sizeof (Token));
- (*env)->ReleaseIntArrayElements(env, tokens, elems, 0);
-}
diff --git a/src/desktop/vue/NativeVue.java b/src/desktop/vue/NativeVue.java
deleted file mode 100644
index 40fd85b..0000000
--- a/src/desktop/vue/NativeVue.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package vue;
-
-// Native-backed emulation core implementation
-class NativeVue extends Vue {
-
- // Instance fields
- private long handle; // Context address in native memory
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- private native long construct();
- NativeVue() {
- handle = construct();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Produce a new breakpoint and add it to the collection
- private native void breakpoint(long handle);
- public Breakpoint breakpoint() {
- var brk = super.breakpoint();
- breakpoint(handle);
- return brk;
- }
-
- // Release any used resources
- private native void dispose(long handle);
- public void dispose()
- { dispose(handle); }
-
- // Process the simulation
- private native int emulate(long handle, int maxCycles);
- public int emulate(int maxCycles)
- { return emulate(handle, maxCycles); }
-
- // Retrieve the most recent application break code
- private native int getBreakCode(long handle);
- public int getBreakCode() { return getBreakCode(handle); }
-
- // Retrieve the most recent exception code
- private native int getExceptionCode(long handle);
- public int getExceptionCode() {
- return getExceptionCode(handle);
- }
-
- // Retrieve a register value
- private native int getRegister(long handle, int index, boolean system);
- public int getRegister(int index, boolean system)
- { return getRegister(handle, index, system); }
-
- // Retrieve a copy of the ROM data
- private native byte[] getROM(long handle);
- public byte[] getROM() { return getROM(handle); }
-
- // Determine whether the context is native-backed
- public boolean isNative() {
- return true;
- }
-
- // Read a value from the CPU bus
- private native int read(long handle, int address, int type);
- public int read(int address, int type)
- { return read(handle, address, type); }
-
- // Read bytes from the CPU bus
- private native boolean readBytes(long handle, int address, byte[] dest,
- int offset, int length);
- public boolean readBytes(int address, byte[] dest, int offset, int length)
- { return readBytes(handle, address, dest, offset, length); }
-
- // Remove a breakpoint from the collection
- private native void remove(long handle, int index);
- public boolean remove(Breakpoint brk) {
- int index = breakpoints.indexOf(brk);
- if (!super.remove(brk))
- return false;
- remove(handle, index);
- return true;
- }
-
- // Initialize all system components
- private native void reset(long handle);
- public void reset()
- { reset(handle); }
-
- // Specify a register value
- private native int setRegister(long handle, int index, boolean system,
- int value);
- public int setRegister(int index, boolean system, int value)
- { return setRegister(handle, index, system, value); }
-
- // Provide new ROM data
- private native boolean setROM(long handle, byte[] data, int offset,
- int length);
- public boolean setROM(byte[] data, int offset, int length)
- { return setROM(handle, data, offset, length); }
-
- // Write a value to the CPU bus
- private native void write(long handle, int address, int type, int value);
- public void write(int address, int type, int value)
- { write(handle, address, type, value); }
-
- // Write bytes to the CPU bus
- private native boolean writeBytes(long handle, int address, byte[] src,
- int offset, int length);
- public boolean writeBytes(int address, byte[] src, int offset, int length)
- { return writeBytes(handle, address, src, offset, length); }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Retrieve the current state's breakpoint scenario
- private native int getBreakType(long handle);
- int getBreakType() {
- return getBreakType(handle);
- }
-
- // Retrieve the current instruction fetch index
- private native int getFetch(long handle);
- int getFetch() {
- return getFetch(handle);
- }
-
- // A breakpoint's address ranges have changed
- private native void updateRanges(long handle, int index, int[] ranges);
- void updateRanges(Breakpoint brk) {
- super.updateRanges(brk);
- int index = breakpoints.indexOf(brk);
- if (index >= 0)
- updateRanges(handle, index, brk.flattenRanges());
- }
-
- // A breakpoint's enabled/hook state has changed
- private native void updateState(long handle, int index, boolean enabled,
- boolean fetch, int hooks);
- void updateState(Breakpoint brk) {
- super.updateState(brk);
- int index = breakpoints.indexOf(brk);
- updateState(handle, index,
- brk.isEnabled(), brk.getFetch(), brk.getHooks());
- }
-
- // A breakpoint's condition tokens have changed
- private native void updateTokens(long handle, int index, int[] tokens,
- int depth, int maxDepth);
- void updateTokens(Breakpoint brk) {
- super.updateTokens(brk);
- int index = breakpoints.indexOf(brk);
- if (index < 0)
- return;
- int maxDepth = 0;
- for (var bre : breakpoints)
- maxDepth = Math.max(maxDepth, bre.getDepth());
- updateTokens(handle, index, brk.flattenTokens(),
- brk.getDepth(), maxDepth);
- }
-
-}
diff --git a/src/desktop/vue/VIP.java b/src/desktop/vue/VIP.java
deleted file mode 100644
index 7c99342..0000000
--- a/src/desktop/vue/VIP.java
+++ /dev/null
@@ -1,309 +0,0 @@
-package vue;
-
-// Java imports
-import java.util.*;
-
-// VIP state
-class VIP {
-
- // Instance fields
- byte[] vram; // Video memory
-
- // Private fields
- private JavaVue vue; // Emulation state
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- VIP(JavaVue vue) {
- vram = new byte[0x40000];
- this.vue = vue;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Process the simulation
- void emulate(int cycles) {
-
- }
-
- // Read a value from the CPU bus
- int read(int address, int type) {
- address &= 0x0007FFFF;
-
- // VRAM
- if (address < 0x00040000)
- return JavaVue.readBuffer(vram, address, type);
-
- // Mirrors of character memory
- if (address >= 0x00078000)
- return JavaVue.readBuffer(vram,
- address - 0x00078000 >> 13 << 15 | 0x00006000 |
- address & 0x00001FFF,
- type);
-
- // I/O register or unmapped
- int value = readRegister(address);
- if (type < 2 && (address & 1) == 1)
- value >>= 8;
- switch (type) {
- case Vue.S8 : return value << 24 >> 24;
- case Vue.U8 : return value & 0x000000FF;
- case Vue.S16: return value << 16 >> 16;
- case Vue.S32: return value | readRegister(address + 2) << 16;
- }
- return value; // U16
- }
-
- // Read bytes from the CPU bus
- void readBytes(int address, byte[] dest, int offset, int length) {
- address &= 0x0007FFFF;
-
- // Perform the operation
- while (length > 0) {
- int count;
-
- // VRAM
- if (address < 0x00040000) {
- count = Math.min(length, 0x00040000 - address);
- JavaVue.readBytes(vram, address, dest, offset, count);
- }
-
- // Mirrors of character memory
- else if (address >= 0x00078000) {
- count = Math.min(length, 0x2000 - (address & 0x1FFF));
- JavaVue.readBytes(vram,
- address - 0x00078000 >> 13 << 15 | 0x00006000 |
- address & 0x00001FFF,
- dest, offset, count);
- }
-
- // I/O register or unmapped
- else {
- count = Math.min(length, 0x00078000 - address);
-
- // Read all registers in the range
- while (count > 0) {
- int value = readRegister(address);
-
- // Odd address
- if ((address & 1) == 1) {
- dest[offset] = (byte) (value >> 8);
- address++;
- count --;
- length --;
- offset ++;
- continue;
- }
-
- // Even address
- int size = count == 1 ? 1 : 2;
- dest[offset] = (byte) value;
- if (size == 2)
- dest[offset + 1] = (byte) (value >> 8);
- address += size;
- count -= size;
- length -= size;
- offset += size;
- }
-
- continue;
- }
-
- // Advance to the next region
- address += count;
- length -= count;
- offset += count;
- }
-
- }
-
- // System reset
- void reset() {
-
- }
-
- // Determine the number of CPU cycles until a breakpoint could trigger
- int until(int cycles) {
- return cycles;
- }
-
- // Write a value to the CPU bus
- void write(int address, int type, int value) {
- address &= 0x0007FFFF;
-
- // VRAM
- if (address < 0x00040000) {
- JavaVue.writeBuffer(vram, address, type, value);
- return;
- }
-
- // Mirrors of character memory
- if (address >= 0x00078000) {
- JavaVue.writeBuffer(vram,
- address - 0x00078000 >> 13 << 15 | 0x00006000 |
- address & 0x00001FFF,
- type, value);
- return;
- }
-
- // I/O register or unmapped
- if (type < 2 && (address & 1) == 1)
- value <<= 8;
- writeRegister(address, value);
- if (type == Vue.S32)
- writeRegister(address + 2, value >> 16);
- }
-
- // Write bytes to the CPU bus
- void writeBytes(int address, byte[] src, int offset, int length) {
- address &= 0x0007FFFF;
-
- // Perform the operation
- while (length > 0) {
- int count;
-
- // VRAM
- if (address < 0x00040000) {
- count = Math.min(length, 0x00040000 - address);
- JavaVue.writeBytes(vram, address, src, offset, count);
- }
-
- // Mirrors of character memory
- else if (address >= 0x00078000) {
- count = Math.min(length, 0x2000 - (address & 0x1FFF));
- JavaVue.writeBytes(vram,
- address - 0x00078000 >> 13 << 15 | 0x00006000 |
- address & 0x00001FFF,
- src, offset, count);
- }
-
- // I/O register or unmapped
- else {
- count = Math.min(length, 0x00078000 - address);
-
- // Write all registers in the range
- while (count > 0) {
- int value = src[offset] & 0xFF;
-
- // Odd address
- if ((address & 1) == 1) {
- writeRegister(address, value << 8);
- address++;
- count --;
- length --;
- offset ++;
- continue;
- }
-
- // Even address
- int size = count == 1 ? 1 : 2;
- if (size == 2)
- value |= src[offset + 1] << 8;
- writeRegister(address, value);
- address += size;
- count -= size;
- length -= size;
- offset += size;
- }
-
- continue;
- }
-
- // Advance to the next region
- address += count;
- length -= count;
- offset += count;
- }
-
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Private Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Read an I/O register
- private int readRegister(int address) {
-
- // Process by register
- switch (address & ~1) {
- case 0x0005F800: break; // INTPND
- case 0x0005F802: break; // INTENB
- case 0x0005F804: break; // INTCLR
- case 0x0005F820: break; // DPSTTS
- case 0x0005F822: break; // DPCTRL
- case 0x0005F824: break; // BRTA
- case 0x0005F826: break; // BRTB
- case 0x0005F828: break; // BRTC
- case 0x0005F82A: break; // REST
- case 0x0005F82E: break; // FRMCYC
- case 0x0005F830: break; // CTA
- case 0x0005F840: break; // XPSTTS
- case 0x0005F842: break; // XPCTRL
- case 0x0005F844: break; // VER
- case 0x0005F848: break; // SPT0
- case 0x0005F84A: break; // SPT1
- case 0x0005F84C: break; // SPT2
- case 0x0005F84E: break; // SPT3
- case 0x0005F860: break; // GPLT0
- case 0x0005F862: break; // GPLT1
- case 0x0005F864: break; // GPLT2
- case 0x0005F866: break; // GPLT3
- case 0x0005F868: break; // JPLT0
- case 0x0005F86A: break; // JPLT1
- case 0x0005F86C: break; // JPLT2
- case 0x0005F86E: break; // JPLT3
- case 0x0005F870: break; // BKCOL
- }
-
- // Unmapped
- return 0;
- }
-
- // Write an I/O register
- private void writeRegister(int address, int value) {
-
- // Process by register
- switch (address & ~1) {
- case 0x0005F800: break; // INTPND
- case 0x0005F802: break; // INTENB
- case 0x0005F804: break; // INTCLR
- case 0x0005F820: break; // DPSTTS
- case 0x0005F822: break; // DPCTRL
- case 0x0005F824: break; // BRTA
- case 0x0005F826: break; // BRTB
- case 0x0005F828: break; // BRTC
- case 0x0005F82A: break; // REST
- case 0x0005F82E: break; // FRMCYC
- case 0x0005F830: break; // CTA
- case 0x0005F840: break; // XPSTTS
- case 0x0005F842: break; // XPCTRL
- case 0x0005F844: break; // VER
- case 0x0005F848: break; // SPT0
- case 0x0005F84A: break; // SPT1
- case 0x0005F84C: break; // SPT2
- case 0x0005F84E: break; // SPT3
- case 0x0005F860: break; // GPLT0
- case 0x0005F862: break; // GPLT1
- case 0x0005F864: break; // GPLT2
- case 0x0005F866: break; // GPLT3
- case 0x0005F868: break; // JPLT0
- case 0x0005F86A: break; // JPLT1
- case 0x0005F86C: break; // JPLT2
- case 0x0005F86E: break; // JPLT3
- case 0x0005F870: break; // BKCOL
- }
-
- }
-
-}
diff --git a/src/desktop/vue/Vue.java b/src/desktop/vue/Vue.java
deleted file mode 100644
index 367d174..0000000
--- a/src/desktop/vue/Vue.java
+++ /dev/null
@@ -1,266 +0,0 @@
-package vue;
-
-// Java imports
-import java.util.*;
-
-// Template for emulation core implementations
-public abstract class Vue {
-
- // Instance fields
- ArrayList breakpoints; // Current breakpoints
-
- // Static fields
- private static String nativeID = null; // ID of loaded native library
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constants //
- ///////////////////////////////////////////////////////////////////////////
-
- // Memory access types
- public static final int S8 = 0;
- public static final int U8 = 1;
- public static final int S16 = 2;
- public static final int U16 = 3;
- public static final int S32 = 4;
- public static final int CANCEL = 5;
-
- // System register indexes
- public static final int ADTRE = 25;
- public static final int CHCW = 24;
- public static final int ECR = 4;
- public static final int EIPC = 0;
- public static final int EIPSW = 1;
- public static final int FEPC = 2;
- public static final int FEPSW = 3;
- public static final int PIR = 6;
- public static final int PSW = 5;
- public static final int TKCW = 7;
-
- // Non-standard register indexes
- public static final int PC = -1;
- public static final int JUMP_FROM = -2;
- public static final int JUMP_TO = -3;
-
- // Program register indexes
- public static final int GP = 4;
- public static final int HP = 2;
- public static final int LP = 31;
- public static final int SP = 3;
- public static final int TP = 5;
-
- // Instruction IDs
- public static final int ILLEGAL = -1;
- public static final int ADD_IMM = 0;
- public static final int ADD_REG = 1;
- public static final int ADDF_S = 2;
- public static final int ADDI = 3;
- public static final int AND = 4;
- public static final int ANDBSU = 5;
- public static final int ANDI = 6;
- public static final int ANDNBSU = 7;
- public static final int BCOND = 8;
- public static final int CAXI = 9;
- public static final int CLI = 10;
- public static final int CMP_IMM = 11;
- public static final int CMP_REG = 12;
- public static final int CMPF_S = 13;
- public static final int CVT_SW = 14;
- public static final int CVT_WS = 15;
- public static final int DIV = 16;
- public static final int DIVF_S = 17;
- public static final int DIVU = 18;
- public static final int HALT = 19;
- public static final int IN_B = 20;
- public static final int IN_H = 21;
- public static final int IN_W = 22;
- public static final int JAL = 23;
- public static final int JMP = 24;
- public static final int JR = 25;
- public static final int LD_B = 26;
- public static final int LD_H = 27;
- public static final int LD_W = 28;
- public static final int LDSR = 29;
- public static final int MOV_IMM = 30;
- public static final int MOV_REG = 31;
- public static final int MOVBSU = 32;
- public static final int MOVEA = 33;
- public static final int MOVHI = 34;
- public static final int MPYHW = 35;
- public static final int MUL = 36;
- public static final int MULF_S = 37;
- public static final int MULU = 38;
- public static final int NOT = 39;
- public static final int NOTBSU = 40;
- public static final int OR = 41;
- public static final int ORBSU = 42;
- public static final int ORI = 43;
- public static final int ORNBSU = 44;
- public static final int OUT_B = 45;
- public static final int OUT_H = 46;
- public static final int OUT_W = 47;
- public static final int RETI = 48;
- public static final int REV = 49;
- public static final int SAR_IMM = 50;
- public static final int SAR_REG = 51;
- public static final int SCH0BSD = 52;
- public static final int SCH0BSU = 53;
- public static final int SCH1BSD = 54;
- public static final int SCH1BSU = 55;
- public static final int SEI = 56;
- public static final int SETF = 57;
- public static final int SHL_IMM = 58;
- public static final int SHL_REG = 59;
- public static final int SHR_IMM = 60;
- public static final int SHR_REG = 61;
- public static final int ST_B = 62;
- public static final int ST_H = 63;
- public static final int ST_W = 64;
- public static final int STSR = 65;
- public static final int SUB = 66;
- public static final int SUBF_S = 67;
- public static final int TRAP = 68;
- public static final int TRNC_SW = 69;
- public static final int XB = 70;
- public static final int XH = 71;
- public static final int XOR = 72;
- public static final int XORBSU = 73;
- public static final int XORI = 74;
- public static final int XORNBSU = 75;
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Static Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Produce an emulation core context
- public static Vue create(boolean useNative) {
- return !useNative ? new JavaVue() :
- nativeID != null ? new NativeVue() : null;
- }
-
- // Retrieve the ID of the loaded native library, if any
- public static String getNativeID() {
- return nativeID;
- }
-
- // Specify the ID of the loaded native library
- public static void setNativeID(String nativeID) {
- Vue.nativeID = nativeID;
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Constructors //
- ///////////////////////////////////////////////////////////////////////////
-
- // Default constructor
- Vue() {
- breakpoints = new ArrayList();
- }
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Public Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Produce a new breakpoint and add it to the collection
- public Breakpoint breakpoint() {
- var brk = new Breakpoint(this);
- breakpoints.add(brk);
- return brk;
- }
-
- // Release any used resources
- public abstract void dispose();
-
- // Process the simulation
- public abstract int emulate(int maxCycles);
-
- // Evaluate an expression
- public Object evaluate(String expression) {
- var inst = new Instruction(read(getRegister(PC, true), S32));
- var brk = new Breakpoint(this);
- brk.setCondition(expression);
- brk.setEnabled (true);
- return brk.evaluateTyped(
- new int[brk.getDepth()], 0, inst, inst.access(this));
- }
-
- // Retrieve the most recent applicaiton break code
- public abstract int getBreakCode();
-
- // Retrieve the most recent exception code
- public abstract int getExceptionCode();
-
- // Retrieve a register value
- public abstract int getRegister(int index, boolean system);
-
- // Retrieve a copy of the ROM data
- public abstract byte[] getROM();
-
- // Determine whether the context is native-backed
- public abstract boolean isNative();
-
- // Produce an array of the current breakpoint collection
- public Breakpoint[] listBreakpoints() {
- return breakpoints.toArray(new Breakpoint[breakpoints.size()]);
- }
-
- // Read a value from the CPU bus
- public abstract int read(int address, int type);
-
- // Read bytes from the CPU bus
- public abstract boolean readBytes(int address, byte[] dest, int offset,
- int length);
-
- // Remove a breakpoint from the collection
- public boolean remove(Breakpoint brk) {
- if (!breakpoints.remove(brk))
- return false;
- brk.remove();
- return true;
- }
-
- // Initialize all system components
- public abstract void reset();
-
- // Specify a register value
- public abstract int setRegister(int index, boolean system, int value);
-
- // Provide new ROM data
- public abstract boolean setROM(byte[] data, int offset, int length);
-
- // Write a value to the CPU bus
- public abstract void write(int address, int type, int value);
-
- // Write bytes to the CPU bus
- public abstract boolean writeBytes(int address, byte[] src, int offset,
- int length);
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Package Methods //
- ///////////////////////////////////////////////////////////////////////////
-
- // Retrieve the current state's breakpoint scenario
- abstract int getBreakType();
-
- // Retrieve the current instruction fetch index
- abstract int getFetch();
-
- // A breakpoint's address ranges have changed
- void updateRanges(Breakpoint brk) { }
-
- // A breakpoint's enabled/hook state has changed
- void updateState(Breakpoint brk) { }
-
- // A breakpoint's condition tokens have changed
- void updateTokens(Breakpoint brk) { }
-
-}