You will need KJVS classes (compiled with Visual J++ 6.0) in order to compile the conversion result.
KJVS is a Java virtual system -> it interprets some GFA Functions and procedures.
KG2J and KJVS are currently freeware IF:
You can see a conversion result on http://preverdy.free.fr/preverdy (KIKTRIS applet).
KG2J and KJVS states:
KG2J and KJVS are in alpha development phases and have limitations and some bugs: Files, windows, ressources, system accesses, memory accesses are not (fully) supported. A lot of GFA procedure and functions are not converted (or partially converted) by KG2V or partially emulated by KJVS. Check the list below:
GFA Keywords / Procedures (unsorted list) | Conversion status | Comments |
$ | ignored | "//" is added at the beginning of the line |
! | converted | |
~ | converted | |
Labels | partially converted | converted for DATA and for some GOTO statements |
REM | converted | |
LET | converted | |
LOCAL | converted | |
IF | converted | |
ELSE | converted | |
ENDIF | converted | |
FOR | converted | |
NEXT | converted | |
EXIT IF | converted | |
REPEAT | converted | |
UNTIL | converted | |
WHILE | converted | |
WEND | converted | |
DO | converted | |
LOOP | converted | |
PROCEDURE | partially converted | VAR is ignored |
FUNCTION | partially converted | VAR is ignored |
DIM | converted | Array sizes are incremented by 1 |
INC | converted | |
ADD | converted / emulated | |
DEC | converted | |
SUB | converted / emulated | |
MUL | converted / emulated | |
DIV | converted | |
RETURN | converted | |
ENDFUNC | converted | |
VOID | converted | |
ARRAYFILL | converted / emulated | |
PAUSE | converted / emulated | |
ON MENU | converted / partially emulated | Some events are not emulated |
ON MENU GOSUB | converted / emulated | |
ON MENU KEY GOSUB | converted / partially emulated | Some keys are not returned |
ON MENU BUTTON | converted / emulated | |
ON MENU IBOX GOSUB | not converted | |
ON MENU OBOX GOSUB | not converted | |
ON MENU MESSAGE GOSUB | converted / partially emulated | Some events are not emulated |
EVERY | converted / emulated | |
DATA | converted / emulated | |
RESTORE | converted / emulated | |
READ | converted / emulated | |
SETCOLOR | converted / partially emulated | |
COLOR | converted / emulated | |
LINE | converted / partially emulated | some GRAPHMODE modes are not emulated |
PLOT | converted / partially emulated | some GRAPHMODE modes are not emulated |
DRAW TO | partially converted / partially emulated | some GRAPHMODE modes are not emulated. DRAW TO [x1,y1][TO x2,y2] is not converted |
DRAW | converted / partially emulated | some GRAPHMODE modes are not emulated. DRAW [x1,y1][TO x2,y2] is not converted |
GRAPHMODE | converted / partially emulated | |
BOUNDARY | converted / emulated | |
BOX | converted / partially emulated | some GRAPHMODE modes are not emulated |
PBOX | converted / emulated | |
RBOX | converted / partially emulated | some GRAPHMODE modes are not emulated |
PRBOX | converted / emulated | |
CIRCLE | converted / partially emulated | some GRAPHMODE modes are not emulated |
PCIRCLE | converted / emulated | |
ELLIPSE | converted / partially emulated | some GRAPHMODE modes are not emulated |
PELLIPSE | converted / emulated | |
POLYLINE | converted / partially emulated | some GRAPHMODE modes are not emulated |
POLYFILL | converted / emulated | |
DEFFILL | converted / emulated | |
FILL | converted / emulated | |
BMOVE | converted / partially emulated | Only copy a complete screen to another screen |
SGET | converted / partially emulated | Data are not saved into the string variable (the string contain a screen descriptor) |
SPUT | converted / partially emulated | The string variable must contain a screen descriptor |
DEFTEXT | converted / partially emulated | Some text mode are not emulated. Fonte number is ignored |
TEXT | converted / partially emulated | some GRAPHMODE modes are not emulated. Text lengths, rotations, underlines are not emulated |
EVERY STOP | converted / emulated | |
EVERY CONT | converted / emulated | |
END | converted | |
EDIT | converted | |
STOP | converted | |
CLS | converted / emulated | |
SELECT | converted | |
CASE | converted | |
CONT | not converted | |
DEFAULT | converted | |
ENDSELECT | converted | |
RANDOMIZE | not needed | |
CLEAR | not converted | |
RESERVE | not converted | |
RESTORE | not converted | |
AFTER STOP | not converted | |
AFTER CONT | not converted | |
NEW | non relevant | |
LIST | non relevant | |
LLIST | non relevant | |
RUN | not converted | |
SYSTEM | not converted | |
QUIT | converted | |
TRON | non relevant | |
TROFF | non relevant | |
DUMP | not converted | |
CLIP OFF | not converted | |
VSYNC | not converted | |
MENU | converted / emulated | |
MENU OFF | converted / emulated | |
MENU KILL | converted / emulated | |
DEFBIT | not converted | |
DEFBYT | not converted | |
DEFINT | not converted | |
DEFWRD | not converted | |
DEFFLT | not converted | |
DEFSTR | not converted | |
DEFLIST | not converted | |
OPTIONBASE | not converted | |
POKE | converted / partially emulated | |
DPOKE | converted / partially emulated | |
LPOKE | converted / partially emulated | |
SPOKE | converted / partially emulated | |
SDPOKE | converted / partially emulated | |
SLPOKE | converted / partially emulated | |
BYTE{} | converted / partially emulated | |
CARD{} | converted / partially emulated | |
INT{} | converted / partially emulated | |
LONG{} | converted / partially emulated | |
FLOAT{} | converted / partially emulated | |
SINGLE{} | converted / not emulated | |
DOUBLE{} | converted / partially emulated | |
CHAR{} | converted / partially emulated | |
ABSOLUTE | not converted | |
CLR | converted | |
ERASE | not converted | |
SWAP | converted | |
QSORT | not converted | |
SSORT | partially converted / partially emulated | a SSORT call which contains an OFFSET or a WITH keyword is not converted / emulated |
INSERT | converted / emulated | |
DELETE | converted / emulated | |
SETTIME | not converted | |
INLINE | not converted | |
MFREE | not converted | |
MSHRINK | not converted | |
BCLR | converted / emulated | |
BSET | converted / emulated | |
BCHG | converted / emulated | |
BTST | converted / emulated | |
SHL | converted / emulated | |
SHR | converted / emulated | |
ROL | converted / emulated | |
ROR | converted / emulated | |
LSET | converted / emulated | |
RSET | converted / emulated | |
MID$ | converted / emulated | |
FORM INPUT | converted / emulated | |
converted / emulated | ||
PRINT AT | converted / emulated | |
WRITE | not converted | |
WRITE # | converted / emulated | |
LOCATE | converted / emulated | |
PRINTUSING | not converted | |
MODE | not converted | |
DEFNUM | not converted | |
CRSCOL | converted / emulated | |
CRSLIN | converted / emulated | |
TAB | converted / emulated | |
HTAB | converted / emulated | |
VTAB | converted / emulated | |
KEYPAD | not converted | |
KEYPRESS | converted / emulated | |
KEYDEF | not converted | |
CHDRIVE | converted / emulated | |
CHDIR | converted / emulated | |
DIR$ | converted / partially emulated | Only works with the current drive (else returns "") |
FILES | not converted | |
FSETDATA | not converted | |
MKDIR | converted / emulated | |
RMDIR | converted / emulated | |
OPEN | converted / partially emulated | Files only |
CLOSE | not converted | |
CLOSE # | converted / emulated | |
TOUCH | not converted | |
NAME | not converted | |
RENAME | not converted | |
KILL | converted / emulated | |
BLOAD | not converted | |
BSAVE | not converted | |
BGET # | converted / partially emulated | BGET #i, V:x,n does not fill arrays |
BPUT # | converted / partially emulated | BPUT #i, V:x,n does not manage arrays |
INPUT | converted / emulated | |
INPUT$ | not converted | |
PRINT # | converted / emulated | |
PRINT # USING | not converted | |
INPUT # | converted / emulated | |
LINE INPUT | converted / emulated | |
LINE INPUT # | converted / emulated | |
STORE # | converted / emulated | |
RECALL # | partially converted / partially emulated | RECALL #i,x$(),n TO m,x is not converted/emulated |
SEEK | not converted | |
RELSEEK | not converted | |
PUT | not converted | |
RECORD | not converted | |
OUT | not converted | |
MOUSE | converted / emulated | |
SETMOUSE | converted / partially emulated | Emulated on Sun JVM only |
HIDEM | converted / partially emulated | Emulated on Sun JVM only |
SHOWM | converted / partially emulated | Emulated on Sun JVM only |
LPRINT | not converted | |
HARDCOPY | not converted | |
SOUND | converted / emulated | Emulated on Sun JVM only |
WAVE | not converted | |
GOSUB | converted | |
DEFFN | not converted | |
FN | not converted | |
ONBREAK | not converted | |
ON BREAK CONT | not converted | |
ON BREAK GOSUB | not converted | |
ON ERROR | not converted | |
ON ERROR GOSUB | not converted | |
RESUME | not converted | |
RESUME NEXT | not converted | |
ERROR | not converted | |
AFTER | not converted | |
DELAY | not converted | |
NEWLOAD | not converted | |
SAVE | not converted | |
PSAVE | not converted | |
CHAIN | not converted | |
DEFMOUSE | converted / partially emulated | Emulated on Sun JVM only |
DEFMARK | not converted | |
DEFLINE | converted / partially emulated | Style is always ignored |
POLYMARK | not converted | |
POLYMARKOFFSET | not converted | |
CLIP | not converted | |
CLIPOFFSET | not converted | |
CLIPOFF | not converted | |
SETDRAW | not converted | |
SPRITE | not converted | |
GET | not converted | |
VSYNC | not converted | |
BITBLT | not converted | |
OPENW | converted / partially emulated | Window attributes are not fully managed / Windows cannot be moved and resized |
CLOSEW | converted / emulated | |
W_HAND | not converted | |
W_INDEX | not converted | |
CLEARW | converted / emulated | |
TITLEW | converted / emulated | |
INFOW | converted / emulated | |
TOPW | converted / emulated | |
FULLW | converted / emulated | |
RC_COPY | not converted | |
ALERT | converted / partially emulated | Symbols are not displayed, keyboard is not managed |
FILESELECT | converted / partially emulated | Emulated on Sun JVM only |
ACLIP | not converted | |
PSET | not converted | |
ALINE | not converted | |
HLINE | not converted | |
ARECT | not converted | |
APOLY | not converted | |
ACHAR | not converted | |
ATEXT | not converted | |
C: | not converted | |
MONITOR | not converted | |
CALL | not converted | |
RCAL | not converted | |
EXEC | not converted | |
FIELDGET | not converted | |
GOTO | partially converted | Only some GOTO can be converted (experimental) |
GFA Keywords / Functions (unsorted list) | Conversion status | Comments |
TYPE | not converted | |
ASC | converted / emulated | |
CHR$ | converted / emulated | |
STR$ | converted / partially emulated | STR$(x,y,z) is not correctly emulated |
BIN$ | converted / emulated | |
OCT$ | converted / emulated | |
HEX$ | converted / emulated | |
VAL | converted / emulated | |
VAL? | converted / emulated | |
CVI | converted / emulated | |
CVL | converted / emulated | |
CVS | converted / not emulated | Returns 0 |
CVF | converted / not emulated | Returns 0 |
CVD | converted / emulated | |
MKI$ | converted / emulated | |
MKL$ | converted / emulated | |
MKS$ | converted / not emulated | Returns "0000" |
MKF$ | converted / not emulated | Returns "000000" |
MKD$ | converted / emulated | |
CINT | converted | |
CFLOAT | converted | |
PEEK | converted / partially emulated | |
DPEEK | converted / partially emulated | |
LPEEK | converted / partially emulated | |
BYTE{} | converted / partially emulated | |
CARD{} | converted / partially emulated | |
INT{} | converted / partially emulated | |
LONG{} | converted / partially emulated | |
FLOAT{} | converted / partially emulated | |
SINGLE{} | converted / not emulated | |
DOUBLE{} | converted / partially emulated | |
CHAR{} | converted / partially emulated | |
VARPTR | converted / partially emulated | Returns only array descriptors and screen descriptors (screen objects) |
ARRPTR | not converted | |
TIMER | not converted | |
FRE | converted / emulated | |
BMOVE | not converted | |
MALLOC | converted / emulated | |
ABS | converted / emulated | |
SGN | converted / emulated | |
ODD | converted / emulated | |
EVEN | converted / emulated | |
INT | converted | |
TRUNC | converted | |
FIX | converted | |
FRAC | converted / emulated | |
ROUND | converted / emulated | |
MIN | converted | |
MAX | converted | |
SQR | converted | |
EXP | converted | |
LOG | converted | |
LOG10 | converted / emulated | |
SIN | converted | |
COS | converted | |
TAN | converted | |
ASIN | converted | |
ACOS | converted | |
ATAN | converted | |
DEG | converted | |
RAD | converted | |
SINQ | converted / emulated | |
COSQ | converted / emulated | |
RND | converted / emulated | |
RANDOM | converted / emulated | |
RAND | converted / emulated | |
PRED | converted / emulated | |
SUCC | converted / emulated | |
ADD | converted / emulated | |
SUB | converted / emulated | |
MUL | converted / emulated | |
DIV | converted / emulated | |
MOD | converted / emulated | |
AND | converted / emulated | |
OR | converted / emulated | |
XOR | converted / emulated | |
IMP | converted / emulated | |
EQV | converted / emulated | |
SWAP | converted / emulated | |
BYTE | converted / emulated | |
CARD | converted / emulated | |
WORD | converted / emulated | |
LEFT$ | converted / emulated | |
RIGTH$ | converted / emulated | |
MID$ | converted / emulated | |
LEN | converted / emulated | |
TRIM$ | converted / emulated | |
INSTR | converted / emulated | |
RINSTR | converted / emulated | |
STRING$ | converted / emulated | |
SPACE$ | converted / emulated | |
SPC | converted / emulated | |
UPPER$ | converted / emulated | |
INKEY$ | converted / emulated | |
POS | converted / partially emulated | Returns the same value as CRSCOL |
KEYTEST | not converted | |
KEYGET | not converted | |
KEYLKOO | not converted | |
DFREE | converted / not emulated | Returns always 0 |
DIR$ | not converted | |
FGETTADA | not converted | |
FSFITRS | not converted | |
FSNEXT | not converted | |
EXIST | converted / emulated | |
LOF | not converted | |
LOC | not converted | |
EOF | not converted | |
INP | converted / partially emulated | Only INP(2) |
INP? | not converted | |
OUT? | not converted | |
INPAUX$ | not converted | |
INPMID$ | not converted | |
STICK | converted / not emulated | Returns always 0 |
STRIG | converted / not emulated | Returns always 0 |
LPOS | not converted | |
ERR$ | converted / not emulated | Returns always 0 |
POINT | not converted | |
WINDTAB | not converted | |
RC_INTERSECT | converted / partially emulated | Do not currently modify x2, y2, w2, h2 values when returning false |
GEMDOS | converted / partially emulated | Only 25, 72, 73 |
BIOS | converted / partially emulated | Only BIOS(10) |
XBIOS | converted / partially emulated | Only XBIOS(2) (screen descriptor), XBIOS(3)(screen descriptor), XBIOS(4), XBIOS(5,x,y,z) (screen descriptors) |
L~A | not converted | |
CONTRL | converted / not emulated | |
INTIN | not converted | |
PTSIN | not converted | |
INTOUT | not converted | |
PTSOUT | not converted | |
WORK_OUT | converted / partially emulated | Only WORK_OUT(0) and WORK_OUT(1) |
V_OPNWK | not converted | |
V_CLSWK | not converted | |
V_OPNVWK | not converted | |
V_CLSVWK | not converted | |
V_CLRWK | not converted | |
V_UPDWK | not converted | |
VST_LOAD_FONTS | not converted | |
VST_UNLOAD_FONTS | not converted | |
VQT_EXTENT | not converted | |
VQT_NAME | not converted | |
RSRC_LOAD | converted / emulated | |
RSRC_GADDR | converted / emulated | Don't return address but index. Integer arrays are fully supported |
FORM_ALERT | converted / emulated | |
FORM_BUTTON | not converted | |
FORM_CENTER | converted / emulated | Only global variables are updated. Integer arrays are NOT supported |
FORM_DIAL | converted / partially emulated | Only foolowing codes: 0, 3 |
FORM_DO | converted / emulated | |
FORM_ERROR | not converted | |
FORM_KEYBD | not converted | |
OBJC_DRAW | converted / partially emulated | Only a few features and objects are emulated/displayed |
OB_STATE | converted / emulated | |
OB_FLAGS | converted / emulated | |
OB_TYPE | converted / emulated | |
OB_SPEC | converted / emulated | |
== | converted / emulated | |
OB_X | converted / emulated | |
OB_Y | converted / emulated | |
OB_H | converted / emulated | |
OB_W | converted / emulated | |
STE? | converted / not emulated | |
FATAL | converted / not emulated | |
APPL_INIT | converted / not emulated | |
APPL_EXIT | converted / not emulated | |
MENU_BAR | converted / emulated | |
MENU_ICHECK | converted / emulated | |
MENU_IENABLE | converted / emulated | |
MENU_REGISTER | not converted | |
MENU_TEXT | converted / emulated | |
MENU_TNORMAL | converted / not emulated | |
GRAF_MOUSE | converted / partially emulated | The pattern address is ignored |
WIND_GET | converted / partially emulated | only ~WIND_GET is converted. Only Codes 4, 5, 10 are emulated |
WIND_UPDATE | converted / not emulated | |
WIND_SET | converted / partially emulated | Only following codes: 1, 2, 3, 5, 8, 9, 10 |
WIND_CLOSE | converted / emulated | |
WIND_DELETE | converted / emulated | |
WIND_FIND | converted / emulated | |
WIND_CALC | converted / emulated | |
APPL_READ | converted / not emulated | |
APPL_WRITE | converted / not emulated | |
EVNT_MULTI | converted / partially emulated | Only a few events are managed |
GINTIN | converted / emulated | |
GINTOUT | converted / emulated | |
GEMSYS | converted / partially emulated | only GEMSYS (without parameters) and with Opcode=100 |
VDISYS | converted / not emulated | |
OBJC_FINDT | converted / emulated |
javac -cp ".";"KJVS.zip" YourJavaFileName.java
You may have some compilation warnings as: warning: unmappable character for encoding Cp1252
. This is due to not converted characters (code < 0x20). You can ignore these warnings at this point.
If you are lucky, you will not have compilation errors. In this case You should find in your directory these files: YourJavaFileName.class
and cYourJavaFileNameData.class
. If you have some compilation errors, modify the generated source code and try to compile again...
java -cp ".";"KJVS.zip" YourJavaFileName
jar cvf exemple.jar *.class *.rsc *.ttf
<html>
<body>
<center>
<applet
code=YourJavaFileName.class
name=exemple
archive=exemple.jar
width=640
height=400 VIEWASTEXT>
</applet>
</center>
</body>
</html>
Last page update: 2010/05/13 - Philippe REVERDY (preverdy@hotmail.com)