Visit multilingualization of Squeak page if you are interested in it.
Squeak/Zaurus was used as the platform for an experimental project "Personal Digital Assistant for guests", conducted by a large company that has many theme parks and whose name begins with 'W' (or 'D'). In the following, I'll call the project as "The Project." If you are curious why we used Squeak/Zaurus, refer a section on the merits of Squeak/Zaurus (or "why Java is not as good as Squeak?").
If you don't want to read a detailed explanation, jump to the download section.
If you just want to see the demos, check the demo section.
Besides it inherits much things from Smalltalk, it has been rapidly developed by the user community. As a conseqence, we can say it is a new programming system.
Using an Open Source Software on the embedded systems has huge advantage. If you want to build a reasonably large software system, it is normal that you use the software layers, such as operation system, window system, or virtual machine, written by the other people. In such case, there are almost always some glitches or features you need to extend. If you cannot modify those layers, you have to write complex workaround. This is sometimes too painful on a limited hardware. Even if the source code of the all of those layers are available, it is virtually impossible to fix those glitches if there are unnecessarily many layers. For example, some say "the combination of Linux, X and GTK combination is perfect on my PDA and you can modify everything," but can you really modify the X server to fit your specific needs in that situation?
Squeak VM and the Squeak library are completely open. To say more, because VM is written in Squeak itself. So, the obstacle to build your own system is very small.
Yes, the Zaurus OS is an unmodifiable layer in Squeak/Zaurus equation. However, Sharp people gave us great help to write many features depending on the OS and those features are now built into the Squeak VM.
Squeak VM is easy to port and has ported to tons of platforms, and because most of the library and VM are written in Squeak, the behavior of VM is very similar from one platform to another. You can expect your application runs just same on the other platforms. In The Project, two programmer used Windows and Mac and worked separetely and the integrated system just worked on Zaurus.
In The Project, the application has to check the various peripherals while it is in the main event loop. By writing everything by ourselves, it was very easy to write such system.
Considering that existing Java GUI framework on PDA, AWT is too hard to port and Swing is too large. Also, writing your own GUI framework in Java is hard. Can you implement a GUI framework which is aware of the number of memory copy for graphic bitmap without changing the VM?
There are memory management systems in which the management overhead takes large portion of memory, the request size is rounded up to power of two (in this case 256k!), the fragmentation problem, or the garbage collector algorithm uses the semispace and twice of size of memory is used, or all garbage will not be collected, etc.
In Squeak, the management area for a QVGA image is only 12 words. Of course, the Squeak garbage collector is from from the above problems. You can build an application in Squeak by taking the advantage of this compact representation of objects and with the knowledge of implementation details.
Furthermore, the requirement of minimum memory size should be considered. Although the memory is getting cheap in desktop environment, there are VMs on which a tiny application that does simple animation requires 20-30MB memory. Such VM cannot applicable for high end PDA.
Have you ever thought that large part of your program can be considered as "applying a kind of function to a kind of collection?" Squeak has rich Collection class library which represents the "kind of collection" and block closures that represents "kind of function" and you can write such program in natural way.
This is not well known fact, but Squeak does have the compile time error check. You can't write a program that accesses to non-existing instance variable or uninitialized temporary variable, or non-existing method. Note that the Squeak compiler (or Compiler) does not only error check, but also it suggests the possible correct program. If the method only has simple spelling errors, once you compile the method, you can semi-automatically rewrite the method to correct one. After all, the Squeak compiler can check the most of classes of errors that the people expect what the Java compilers do.
However, after all, the compile time check and simple uninitialized variable error check is not the difficult part of the debugging. The real bugs are more difficult to fix and those bugs are the real problem. The Squeak is really powerful to find and fix those errors.
In most of the programming languages that support the exceptions, when run time error happens during the program execution, the exception is going to *drop* down to the bottom of stack and the valuable information stored in the stack is lost when the exception is caught. So, the programmer can do is merely print out the calling sequence. The typical behavior of the programmer is that after encountering an error, the programmer begins to insert printf() in arbitrary places and hope the same error happens again. Sounds kludge?
On the other hand, when an error occurs, whole information stored in the stack is completely kept and a program called debugger (or Debugger) starts on the top of the stack. Because of this mechanism, the debugger can refer to all the information in stack and heap and the programmer can finely investigate the reason of the error. If the programmer rewrite the method in the debugger, the rewritten method can be started from the context.
In The Project, we handed many units to the guests and let them use the PDA. In such case, we encountered many errors we didn't expect during the office room test (This kind of things happen). Some of the error turned out to be "tricky," which only occurs very special conditions, but we managed to retrieve those unit and managed to find out the reason of the error by using the debugger running on the PDA. If we used some other language like Java, it would be virtually impossible to find out what was happend on those units.
Anyway, don't you think that it is stupid to say "the professional way of debugging is inserting printf() at arbitrary places..." at the beginning of 21st century? How can you use printf() for a tricky bugs on PDA working in a field test?
Some people might say "if you use a language that has compile time type check, there will no such tricky errors." But is this true? In a language like ML, it might be true for a certain extent, but languages like C, C++, or Java, you must have had tons of variety of run time errors. Some error might triggered by some timing issue of hardware or user input, The consensus of the Squeakers is that for the run time errors occurs in Squeak program, there are virtually no such errors that the Java or C compiler can find.
KVM is targeted to the hardware with tenth of kilo bytes memory and the special libraries such as GUI are provided. As a VM for very, very limited hardware, KVM is well-designed programming system. However, the programming style is restricted non-OO style and the libraries are very different from the ones that are used on the desktop environments. The marketing catch phrase WORA is not true here. In the future the memory capacity on the cell phones will be a few MB range and KVM is a framework which would not scale for those platforms.
In the other words, KVM is a system for current hardware, Squeak is a system for the future hardware.
As a matter fact, Squeak runs on the models with 2MB DRAM, but what it can do is very limited.
Squeak system consists of two parts. One is called the virtual machine (VM) and the other is called the virtual image. The VM is a normal Zaurus OS application (called MORE soft) and the image is a file which contains platform independent code and data.
The VM is a MORE soft whose "MORE soft application identifier" is "wtii." As for the image file, you can use any image files approximately smaller than 3.5MB.
The Squeak code for the Squeak/Zaurus specific functions are available as a tar.gz archive of file outs. Check this out.
You have to have enough flash memory space to store the VM and the image. The size of the VM is about 400k and typical size of the image is more than 1MB. Make sure you have enough space on internal flash memory or external memory.
It is very unlikely that Squeak causes any data loss or corruption and I haven't seen any. However, I recommend you make a backup before the installation.
If you want the content menu to show up, press the "KINOU" button first and then touch (and hold) in a window. You can also do this by putting the pen around the border between the window and its scrollbar.
On the portlait screen of MI-E1, you can use the built in hardware keyboard. Note that there are some characters that you cannot enter by the built in keyboard.
When you touch the application keys, the application will come up. However, because Squeak doesn't release the working memory while running, Zaurus may hang up when you are going to use the application.
But, please don't be afraid of soft reset. The data of embedded applications will not be lost by Squeak's hang or soft reset. Even I did soft reset my Zaurus which is used for the development thousands times, I've never lost any data.
For some reasons, the VM that supports the instant on is another binary. If you want to use the VM to use your Zaurus as a true Squeak machine, use wtii010126i.ZAC as the VM. When you invoke WTIIQVGA.IMA on this VM, a menu item called "suspend" will appear in the background menu. When you choose this item, the Squeak terminates and when you invoke the VM next time, the system resumes the state just before the suspend.
Those features are used by The Project to create a "Squeak
machine." Try to create your own Squeak machine by using those functions.
Download
For ICRUISE, MI-C1, MI-P10, MI-TR1, and MI-E1, download wtii010126.ZAC and WTIIQVGA.ZAC by the Zaurus web
browser. You can install those files to either the internal
or the external memory. If you want to use the camera, you
should install both of them to the internal memory. If you
want to copy the image file from PC, or you just don't have
enough space in internal memory, it would be nice to install
the VM to internal and the image to external.
On MI-E1, the image on the SD card can be used if you
switch the "card configuration" to SD card.
Demos
When you invoke the Squeak, a list that contains
"WTIIQVGA.IMA"as its element. Select
the file and you will see the Squeak screen.
There are two workspaces in the initial image in which a number of descriptions for the demos.
The demos are separated by
"----------"line. You can execute those demos by "doing it" each separated descriptions.
If you have trouble with those demos, I recommend to press the "CHUDAN" button and generate the interrupt. This should result in a small pink window and the Squeak process comes back normally.
Hako2 start. "puzzle game". The purpose of the game is to move the biggest piece ("Musume") to the bottom-center position.
Hakoiri Musume is originally written by Seki-san (m_seki@mva.biglobe.ne.jp) and enhanced by me.
SimpleDraw open. "simple drawing tool". You can draw by the pen.
You can invoke the menu for the drawing tool by pressing "KINOU" prior to a pen-down. The item "fill" fill the shape around the point you touch next, the item "color" is for the color palette, and "save and quit" is for saving the specified rectangle to a GIF file named "WTIIDRAW.GIF".
A MORE soft on 2MB model can use only 800k memory space including data and stack area. With this small memory, Squeak merely can load a small image file, and after you open a couple of windows, the process will stuck because of the shortage of memory.
The initial files in the package maintain this convention. However, the files Squeak will use should be able to have more liberal file names. If four characters out of 8+3 file name is fixed, it is desiastraous.
So I decided that Squeak/Zaurus can manipulate all files including the system files. Please beware not delete or rename the system files. Basically, the files not displayed in "Paso-con data" aren't related to Squeak/Zaurus. I recommend you check "Paso-con data" screen first, and not touch the other files.