Waba Virtual Machine



This is an attempt to port the WabaVM to small cups of coffee, mainly those with an 68k processor. The home page and ultimate reference is www.wabasoft.com.
This is a very early release, you should consider it to be something like version 0.1 .

In a nutshell - what do I need?

Load everything that looks like an executable or string into your calc:
It's quite large, all files should occupy about 55k of your precious memory.
Now, make sure that you still have at least 60k of free RAM (30k for the unpacked WabaVM and 30k runtime heap). It is possible that the VM doesn't free some rescources if you have not enough memory! (Preferably you run this in an emulator.)
Now type 'waba()' to run the standard Welcome applet or better 'waba("Scribble")' to run the famous Scribble applet, which should look like this:

WabaVm Demo

Use the cursor keys to move the mouse pointer, diamond to click and ESC to leave. Also note that the VM automatically exits after about 100s (just in case the keys don't work, but why?).
A note for 92+ users: the usable screen is limited to 160x100 pixels.

I want my own applet!

I'm not going to tell you how to use Waba, you should read the docs of the original Waba. But I have to tell you how to get your classes into the calc.
Compile your program as it is described in the Waba docs, e.g. if you're in the waba\ui directory and want to compile the Welcome class yourself you have to write:
javac -g:none -classpath ..\.. Welcome.java
The option '-g:none' removes unnecessary symbolic information, the classpath '..\..' points to the Waba class path if you're in one of the core class directories.
Now you have to add some information that is needed for the VM on your calc:
class2string Welcome.class
This scans the class for the class and package name and writes it in front of the file, producing the file Welcome.str, which has now the following layout:
Note: the program class2string was originally intended to produce a string that is directly loadable into the calc, but since there's a nice tool in the TIGCC Tools Suite there's no need to do so. The program comes as a C source file and precompiled binary (done with lcc-win32).
Now make a real string:
ttbin2str -89s Welcome.str Welcome wabacore
Use the option -9xs if you have a 92+. Button.str is the output file of class2string, Button is the name of the class on the calc. Note that the name is not important, but is has to be one that does not already exist as a built-in command (e.g. Window!). All class strings must reside in the folder wabacore.
If everything worked you should be able to run this by typing (specify the package name if the class has one, here it is waba/ui):
waba("waba/ui/Welcome")

The underworld

This is a very early release of the WabaVM port, so you may wonder about some parts of the code I've written. I'm going to explain it a bit if I find enough time to do so.
However, if you're interested and find your way through this hell of patches you're contributions are welcome!

Licence

The WabaVM is licenced under the GPL, you should have received a copy of it.

The author

Stephan Effelsberg
www.dvz.fh-koeln.de/~b012414
b012414@dvz.fh-koeln.de