Masterclass Ever wondered what happens when an Amiga application doesn't know what to do? It doesn't just give up: it asks a Datatype for help. Datatypes and you With a new Datatype popping up on a coverdisk or Bulletin Board every few weeks, you may well be wondering what the heck they are and what they could mean for you. Datatypes were one of the few obvious improvements which came along with Workbench 3: you won't be able to use them on Workbench 2.04 or older systems, and therefore you'll need to buy a Workbench 3.1 upgrade kit (try Blittersoft 01908 261477 or Brian Fowler Computers 01392 499 755) which consists of new Kickstart ROMS and system software. The idea behind Datatypes is to divorce application programs from data formats. Rather than have an application, a paint program for example, worry about all the different file formats in existance let it know about Datatypes instead. The specific Datatype know's how to decode an image in IFF, GIF or JPEG format -- the application program only needs to know that it can ask the Datatype to do the conversion on it's behalf. This technique works very well, especially as when a new file format comes along it is only a matter of writing a new Datatype. If we happened to invented a new file format with built-in compression called PlopCrunch, then all we need to do is create a PlopCrunch Datatype for all the existing programs which support Datatypes can read the files. Normally what happens is that the application program will first of all try to use the loading routines which have been programmed into it: these will usually be faster and more flexible. If the application can't load the file in this way, it then asks the system if a Datatype is available. If so, the Datatype loads the file and passes the data to the application program. You can see this happening below in a grab of the Viewtek (VT) image viewing program in action. I have used the excellent SnoopDos utility to see what is going on behind the scenes. (grab1) Here you can see the VT program load, look for some defaults (unsuccessfully) and then load the image file called spheres.gif. The VT program already "knows" how to load GIF files and doesn't need to use a Datatype. (grab2) This time the image is stored in BMP format -- the BitMaP format which Windows uses. BMP is pretty sloppy in that it doesn't compress data, but if you deal with PCs you may may come across it. VT loads the file a few times but clearly doesn't have a clue how to deal with a BMP file, so it uses the BMP Datatype. The Datatype opens and then it loads the BMP file on VT's behalf. Another program which makes extensive use of Datatypes is Multiview: the viewing program which comes as standard with the system standard. Multiview doesn't know anything but datatypes, which makes it extremely flexible. Not only will Multiview load and display any image you have a Datatype for, but it will also load and play animations, sounds, text files and even AmigaGuide documents. Multview is a well kept secret and it pays to experiment with it, as it is a very powerful tool. Besides simple viewing programs likes Viewtek, some art programs such as Personal Paint also support Datatypes. Hopefully, with the Amiga's future looking bright thanks to Escom's marketing and pricing policies, more applications will be updated to make use of Datatypes and other OS3 specific features. If you feel like complaining that it is unfair of Datatypes not to work on OS2 or 1.3 then I'm afraid you won't get much sympathy. If you had a PC you would be falling over yourself to cough up the money for Windows 95, so do yourself a favour and get OS3.1 as soon as you can. Installing Datatypes An "Out of the box" system includes only a few datatypes: text, AmigaGuide, sound and some image formats are provided in order to give Multiview something to play with. Adding some new Datatypes is therefore a good idea, and only requires a few seconds work. There is no configuration to do: it's only a matter of copying some file. Each Datatype consists of two parts. The first with have a name ending in .datatype, for example. JPEG.datatype. This file must be copied into the Sys:classes/datatypes/ directory. The second file will be the one with an icon and it will be simply called JPEG or GIF or BMP or whatever. This file must be copied to the devs:datatypes directory. Here's a picture of Directory Opus at work, listing the various Datatypes which have been installed on my system. (dopus.iff) One of my favourites is the CDXL Datatype, which I can use to play snippits of video from old CDTV CDROMs. Now there was a file format which we should all have heard more about. (cdxl.iff, cdxlb.iff -- an image from the Heroic Age of Spaceflight CDROM for the CDTV, loaded via the CDXL datatype) Obtaining Datatypes Where do all the Datatypes come from? Most of them are written by Amiga users because they need them for a particular project: and then decide to make them public domain. The best place to find them is on the Aminet, either a CDROM or the Internet site. Look in the Aminet/util/dtype directory for the latest list. Here is the current contents of the Aminet archive at the time of writing. aiff_dtc.lha AIFF/AIFC datatype, v1.11 ams.lha Sun audio (.au) and X-Bitmap datatypes. AOM_Raw_dt40.2.lha Loads pics on American/World Vista Atlas binarydt_39.11.lha Ddisplays any binary file BMPdt404.lha Bmp picture datatype v40.4 for >= OS 3.0 cdt.lha Highlights c/c++ keywords clidt.lha V39.1 displays stdout of a cli-cmd DeBox_DT40.2.lha Loads debox images from CDTV/CD32 titles dfadt-391.lha Datatype for DFA. exeDT394.lha Executable datatype v39.4 for >= OS3.0 FontDT-1.0.lha DataType for Amiga fonts FontDT-1.1.lha DataType for Amiga fonts fpHSN_dt40.1.lha A datatype for MaxonMagic's .HSN samples fpVOC_dt40.2.lha Simply the best VOC datatype around! fpWAV_dt40.2.lha Simply the best WAV datatype around! GIFdatatype-39.lha GIF datatype for OS 3.0 and up icon_394.lha Icon datatype v39.4 for >= OS3.0 infoDT39.1.lha DataType for Amiga .info files jfif_dtc.lha New JFIF/JPEG datatype (OS 3.0+) jfif_FIX.lha Bugfix for JFIF/JPEG datatype (AGA) JpegDataType.lha A JPEG datatype, 3.0+ and '020+ required MacSND-dtc-107.lha DataType subclass for Mac sound resource mandt_v39.4.lha Unix manual page datatype v39.4 maudDTr1.lha Sounddatatype: MAUD IFF Format 32Bit/OS3 MREKO-1.0.lha DataTypes for KlondikeAGA cardsets MultiPrint.lha Datatype based printer driver V39.0beta PCX.datatype.lha PCX datatype V39.2 for Amiga OS 3.0 and picdt_42_1.lha C= Dataypes for Windows Icons, .BMP, Mac png_dt.lha PNG DataType v1.0 PostScriptDT.lha PostScript DataType V39.0 QRT_DT.lha Datatype for PovRay dump format (QRT) REKOdt392.lha Datatype for REKO cardsets, needs WB 3.0 smpDTr1.lha Sounddatatype: Samplevision 32Bit/OS3.0 SUNdt396.lha V 39.6 of datatype for Sun Raster images TargaDType.lha Datatype for Targa or TGA images, V 39.2 textdtpatch.lha Patches datatype to support searching tiff.dtype.lha TIFF datatype. Convert 24bit images TIFFDT.lha V40.3 to read TIFF files TPD.lha Tron's PCX DataType 39.7 tx16wDTr2.lha Sounddatatype: Yamaha TX16W 32Bit/OS3.0 WPGdtype.lha Datatype for wpg images, V 39.0 ZGIFDT39.16.lha The FASTEST gif.datatype there is. There is a great spirit of healthy competition to create the fastest and best quality datatypes, especially for images formats and especially for JPEG and GIF types, so it pays to keep a lookout for more up-to-date versions. You'll also be able to find Datatypes on many Bulletin Boards, as well as magazine coverdisks. At least now what they are for... John Kennedy Workbench backdrops Since the last plea, several generous readers have sent their Workbench backdrop into the office. Examining other people's screen shots is a great way to get ideas to smarten up your own system: remember even with no additional software you can still use the Preferences tools to give your system a totally unique Workbench display. The images this month are provided by Mick Pilgrim from Worksop and Wayne from the Tony Hancock Appreciation Society (details of which can be obtained from 426 Romford Road, Forest Gate, London, E7 8DF). Mick's (mick.iff) display uses a coloured backdrop picture (rather than a tiled pattern) in bold colours. He has used a very 1960's OCR-style font for the Icon names, and a Menu utility to provide a 3D appearance. Wayne (wayne.iff) has also used a single image for the backdrop (this time in more subtle colours) and pretty obviously he is a bit of a fan of Scala. Notice also the various utilities scattered around the display: a clock, calender, trashcan program and very sensibly a virus checker. Note that naming hard drives after girls' names is very sad. If you want the world to see what your Workbench looks like, send a grab on disk to the usual address. Remember to include details of any special utilities you have running, as well as how many colours your display takes up.