![]() | Products | Corporate | News | Support | Amiga World |
First impressions of the new Amiga SDKIt's been a long while since anything interesting relating to the Amiga has been released from Amiga, Inc., but finally, the next generation Amiga SDK is here--the first release is available for developers wanting to join the wave early.Was it worth the wait, and what have we been waiting for, exactly? That is exactly what we are going to find out through this column as we explore the various tools of the SDK and examine their strengths and features. The new Amiga SDK is an effort to move cross platform development one step further, extending a lot of the technologies we know from Sun's Java platform. Amiga, Inc. is introducing the VP, the Virtual Processor, and an associated bytecode format that can be compared to Sun's Java bytecode. However, VP bytecode is not tied to any language, like Java bytecode is tied to Java. In fact the SDK comes with tools to compile Java source files into VP bytecode. While the virtual processor can be targeted by any conceivable language, the Amiga SDK already does a good job at supporting today's more common languages, namely C/C++, and pJava.
![]() The Amiga environment running on top of Linux. The familiar Amiga bouncing ball is partly hidden under the tek rotator demo, while AmigaMPEGplayer is displaying a small MPEG video clip. (Click to zoom) The Tools The Amiga SDK contains several main tools and ships compilers for C/C++ and pJava. The C and C++ compilers are implemented based on GCC, the GNU C Compiler (www.gnu.org/software/gcc/); they fit on to the back end of the compiler to make it output VP code instead of code for an existing, physical processor. The GNU C Compiler is released under the GNU Public License, which states that modifications made to the code must be released with full source. You can download the source code to the changes made to GCC from www.amigadev.net. The pJava development environment is a Sun-certified set of development tools. The pJava version that ships with the Amiga SDK has proven to perform very well in a number of independent comparisons. pJava is short for Personal Java. Personal Java has its own web resource at http://java.sun.com/products/personaljava/. The SDK also supplies a broad range of interesting Application Programming Interfaces (APIs will be covered in future Amiga World articles). Interestingly enough, it ships with a POSIX (Portable Operating System Interface) API, so porting applications from UNIX and other POSIX compliant operating systems should not be too hard. In fact, looking at the submitted third party code at Amiga's www.amigadev.net, it's fair to say that the NG Amiga is already a success: Over 75 utilities are already posted there and it has the support of a lot of talented developers.
![]() Windows in the new environment need not have borders. As you can see, writing applications that are partially transparent is an easy task; the alpha bits of pixmaps (A) are manipulated just the same as R, G, and B. (Click to zoom.) The Digital Environment The Amiga SDK is sold as a software development kit, but also contains the Amiga runtime environment for Linux. This will soon be available for Windows. This means that you will be able to run current and future Amiga applications on your Linux or Windows box, at speeds that are likely to be quite similar to a 'Native Next Generation Amiga OS.' During this evaluation I tested the SDK on systems ranging from a Pentium II 200MHz to an AMD K7 750MHz, and it really seemed to perform well on both systems. Remember, while there is an "Amiga" in the pipeline-a real box with real hardware in it designed especially to run the Amiga DE-- part of the New Amiga thrill is the fact that the AmigaDE runs on a range of platforms. As a matter of fact the latest product description from Amiga, Inc. lists that the following processors are supported: x86, PowerPC, M Core, ARM, StrongARM, MIPS R3000, R4000, R5000, SH 3, SH4, and NEC V850. The Amiga DE will also run "hosted" on Linux, Embedded Linux, Windows 95, 98, 2000, NT, CE and QNX4, meaning that calls to the Amiga API are dispatched through the PII (Platform Isolation Interface) to the host OS' system functions.
![]() A selection of demos shipped with the SDK. These windows do real-time filtering of windows that are below the. (Click to zoom.) A lot of people are asking about backward compatibility to the classic Amiga operating systems, and Amiga, Inc. is promising this through software emulation. While this is valuable, it's not what's really exciting about the design that's been chosen for the NG Amiga. What is exciting is that Amiga, Inc. has around 40 platforms ready to run VP code. Given how the Amiga SDK aims at allowing you to write your code once and run it on platforms as low end as cell phones, it is likely there will be loaders for PalmPilots, WinCE-devices, games consoles such as PlayStation 2, Nintendo Gamecube, Dreamcast, Amiga Classic machines (equipped with AmigaOne hardware) and so on. Speed These notes on speed concerns are based on observations about the design of the Amiga Digital Environment, not of the current implementation. While the assumptions made could be true, chances are they are not implemented to their fullest extent in the current release of the SDK. As the SDK matures, more accurate and detailed speed tests will be discussed. Experience in the past with bytecode-compiled formats, such as Java, raises a concern: How does the system perform? In which ways will the design and implementation restrain me as a coder when it comes to what I will be able to get out of the computer? Modern Java environments do JIT (Just In Time) compilation of the bytecode into native code to speed up the execution, and a lot of environments do it really well; benchmarking shows they are competing with C/C++. Because VP code is converted to native code by the loader before run, this step can be compared to the Java JIT step. But we also note that the VP code will under no circumstances be interpreted, as might be the case for archaic Java implementations. Using VP code as the distributed binary format has a number of advantages, not only when it comes to binary portability. By choosing a loader that more closely fits the platform you're intending to run the VP code on, you'll get instant performance improvements, not only on the applications that you install after upgrading the loader, but also on applications already present on the system. Just imagine having a loader that does AMD 3DNow! optimizations, targets processors like the Altivec, and the optimizations will apply to all VP code that you run through that specific loader.
![]() A couple of 3D-demos from www.neoscientists.org running happily on a Pentium @ 200 MHz. The donut does around 15 fps on this machine, while the dino does around 25 fps on an AMD K7 750 MHz. Just wait until you see how Mesa performs on this platform!
Let's not get completely carried away. These kinds of platform specific optimizations might not ever reach the quality-level of hard-optimized code for those platforms, although they will likely come close. It will certainly be far better than no utilization of these resources, as with current binary formats. Hand-optimizing code for specific platforms is an easy task with the Amiga SDK design. By using a postfixed extension on your files, you can give an indication that a file has been optimized for a specific platform. Files ending with a .00 are native VP-code, other platforms are allocated other two-digit numbers as extensions. The loader will know which platform it's on and automatically get optimized code portions if they are available. If not, it will use the .00 native VP-code and do its best to create the code. Loadtimes are another thing that might worry people, but also here, the design of VP excels. Remember, the hard part of compilation has already been done at the time that the VP code is stored to disk. The compiler has already taken care of lexing, parsing, semantic analysis, translation, canonicalization, instruction selection and register allocation (even though it's targeting a virtual processor). This leaves you with the small piece of relocatable object code on the disk, which is VP code. I haven't yet done extensive testing with this, but I did convert a supplied VP example (the bubble sort) to ANSI C. Compiling it on Linux, made the executable file 12031 bytes. After stripping the symbols, the file was 3300 bytes, still a considerable size for a 20-line long bubble-sort program. The VP code-file, which is the Amiga equivalent of an executable, is 432 bytes. As you can see, this is a substantial reduction. So, even if there is a performance hit from the CPU having to convert the instructions from VP code to native code, the overall process could very well be one that is faster than loading and running native code, because of the reduced binary size. Documentation The Amiga SDK ships with a (roughly) 300 pages manual which is very informative written and fairly easy to read. The main portion of the documentation is shipped on the CD, so if the printed manual seems to only touch the surface of certain topics, chances are they will be further documented on the CD. Most of the documentation on the CD is in HTML format. Some is PDF, Adobe's Portable Document Format, and you need Adobe's Acrobat Reader to read it. Acrobat Reader is available as a free download for many different platforms at www.adobe.com. Conclusions Based on these initial observations of the SDK it seems clear that the overall design of the VP is quite sound, stable and functional. While there may be performance issues, it's probably not because of the overall design of the VP. The SDK represents a new approach to programming. As it grows it will certainly attract the attention of both small, "bedroom" programmers, who will appreciate its ease, and larger development companies who will recognize its great potential. Getting involved on the ground floor of the New Amiga will certainly be beneficial to hobbyists and professionals alike.
In the future we will cover in detail the many aspects of the Amiga SDK as
it grows and expands. In my next column I will focus on VP code.
|
© 1996 - 2000 Amiga Inc. | webmaster@amiga.com |