Enter choice !GO AOL-1 Exiting at 17-Sep-86 20:30:52 Last message in forum: 5134 Last message you've read: 0 Thank you for visiting Apple User Groups One moment please... CompuServe AOL-1 Welcome To.... APPLES ONLINE (tm) (VOL. 1, #4) 1 Apples OnLine Editorial 2 User Groups and Newsletters ** NEW BMUG & WAP ARTICLES ** 3 Apples OnLine Magazine ** NEWLY UPDATED THREADS ** 4 Introducing MAUG (tm) 5 Visit the MAUG Forums 6 SPECIAL: All About the IIgs Enter choice !6 CompuServe AOL-347 *** SPECIAL COVERAGE *** THE APPLE IIgs COMPUTER 1 An Apple IIgs Overview "Apple II Forever!" 2 Hardware Heaven Inside the Apple IIgs 3 Developing on the IIgs "A Hacker's Guide" 4 Editorial Enter choice !1 CompuServe AOL-396 APPLE II FOREVER! Presenting The Apple IIgs by Neil Shapiro copyright (c) 1986 by MCU Inc. all rights reserved The Apple IIgs has arrived and the rumors can stop and the cheering can begin. At last, Apple Computer has addressed the issue of how to take the slogan of "Apple II Forever" and turn it into a reality. While the new machine may not prove to be all things to all people, it should not only appeal to the present audience of Apple II owners it should succeed in bringing Apple's "Two-line" of machines not only into this decade and beyond of personal computing but in widening the audience for such a machine. The color, the speed, the operating system, the built-in extras, the sound capability and much more will all contribute toward making the Apple IIgs not only a household word but a word heard in many schools and businesses as well. LET'S GET PHYSICAL Press for more ! CompuServe AOL-397 Apple has designed a whole new look for the IIgs. The system unit is a boxy-looking case not much bigger than the motherboard it contains. In order to save space and keep the footprint small, Apple floated the power supply above the left portion of the motherboard. The detached keyboard features 80 keys, both cursor direction keys and numeric keypad are included. The keyboard is very similar to that on the Mac Plus. The drive is a 800K 3.5" drive which looks, but for color, very similar to the present line of 3.5" drives. (A 5.25" drive is also available in the new color and can be used on the IIgs). The monitor is styled so as to match the system unit. The new "platinum" color of these units will be called light grey by most of us but by whatever name, the color is quite presentable. A lip on the bottom front of the system unit is where the "hood" meets the case and is how the case is popped open so as to get to the motherboard. On the motherboard are the familar I/O slots for plug-in cards. The two serial ports on the back of the system unit use the same connectors as in the Mac Plus. The joystick and drive ports are the same connectors as on the IIc. A new "Desktop Bus" connector allows for the keyboard to be plugged in while the mouse daisychains from off the keyboard. (The mouse can connect to either the left or right side of the keyboard). RGB and NTSC video connectors (again similar to the IIc) are also on the system unit. Press for more ! CompuServe AOL-400 ONWARD TO THE FUTURE.... The IIgs is far more than an Apple IIc or IIe in a jazzed-up new case. The new Apple IIgs is at the very forefront of personal computing technology and ability. Although (as explained below) the machine is capable of completely emulating earlier models; when it is run not as a IIe or as a IIc but as a rip-snorting and powerful Apple IIgs it is one mean machine. Here are the specs on the new machine (which we will examine in greater depth in the other articles in this issue of "Apples OnLine's" special Apple IIgs coverage): The heart of the Apple IIgs is, of course, a return to the pioneering technology and excitement that made the personal computing revolution a mixed sociological and technological wonderland. The brain of this new machine is the Western Digital 65SC816 CPU (Central Processing Unit). This is a 16-bit microprocessor which features a 24-bit address path, two clock speeds, and 6502 emulation. The 24-bit addressing means that up to 8 megabytes of RAM (Random Access Memory) may be installed via an expansion card. The fast clock speed of 2.8 MHz is 2.5 times as fast as the older 1 MHz clock speed (which may also be selected). The 2.5 figure is cut from 2.8 due to system overhead operations. Press for more ! CompuServe AOL-402 The Apple IIgs arrives configured with 256K RAM and also has a 128K ROM (Read-Only Memory). The ROM contains many built-in features which allow the Apple IIgs to do many of the things that Apple's Macintosh line of computers can do. (For more information on this see the article on developing on the Apple IIgs in this issue's special coverage section). There are both analog RGB and NTSC video outputs. The NTSC video output will hook to any such color monitor (such as Apple's existing Applemonitor //e and Amdek's Color-1 or the new AppleColor Composite monitors also announced with the IIgs). However, full use of the machine's new graphics will require the analog RGB to be utilized. Note that this is analog RGB, not digital. The Apple IIgs is simply capable of too many colors to be saddled with anything but an analog video interface. (Apple announced a new AppleColor RGB monitor compatible with the IIgs RGB video. Existing analog RGB monitors such as the Sony CPD-1310 may also be utilized). VIA GRAPHICS... The text display of the IIgs (in both 40 and 80 column modes) is designed as a three-area unit. The text itself, the background the text lies upon, and the border which reaches from the background edges to the screen display edges, all three of these may be a different color if the RGB video is used. There are 16 Press for more ! CompuServe AOL-405 possible colors to choose from in any combination of the three areas. All of the older graphic modes are present (see below) including Lo-Res, Hi-Res and Double Hi-Res. The Apple IIgs adds a new bit of jargon to Apple-ese; the word "Super-Res." Super-Res is a pixel-mapped graphic mode with astonishing capability. Super-Res may be displayed as either 320 by 200 pixels or as 640 by 200. While there may only be 16 colors displayed on each scan line, 256 colors are possible to display onscreen at once out of a possible palette of 4,096 colors. This Super-Res display is sharp enough that a Macintosh-style of user interface with pictorial icons and mouse-driven onscreen buttons becomes a possibility to implement. But what turns the possibility into sheer everyday reality for the IIgs is the built-in ROM Toolbox which allows for easy programmer access to the desktop interface which relies upon the use of the mouse, windowing and other such features. VIA SOUND! Sound? Did somebody ask if the machine does sound? The chip that governs sound generation within the Apple IIgs was developed by Ensoniq Inc. and licensed to Apple. Ensoniq is one of the world's foremost manufacturer of digital synthesizers. 32 oscillators, 15 independent voices; Press for more ! CompuServe AOL-407 the orchestration is about to begin. A built-in desk accessory called The Control Panel will allow the user to set such machine variable as display color, operating speed and the like. It will also allow configuring of the various ports and I/O slots. An enhanced monitor handles 16-bit and 24-bit addresses. It can do 32-bit arithmetic as well as assembly and disassembly (on both 65816 and 6502 instructions). Applesoft is still in ROM and allows for lower case and 80-column operation. A built-in clock with an internal battery will keep things silently ticking. Two built-in serial ports handle all serial devices and can be configured for AppleTalk networking all without the addition of any plug-in cards. A built-in disk port can work in conjunction with disk interfaces plugged into the I/O slots (up to six drives in use at one time) and there are seven I/O expansion slots (no AUX slot) as well as game ports (16- and 9-pin). ADDING ONTO THE PAST The first thing almost all of today's Apple II owners will want to hear is that Apple kept full compatibility with the older machines. The second thing is that an upgrade path is available. Although the gs has the capability to far outstrip the IIe and IIc in computing power, user interface, graphics and sound Press for more ! CompuServe AOL-409 -- the gs is still an Apple II. As a member of the Apple II family, the gs is compatible in just about every way that matters with the previous machines. The owner of an Apple IIgs will be able to run most of the software and hardware available for the Apple IIe and IIc. And, Apple has not forgotten the many Apple IIe owners who may want to upgrade. First, here's a brief rundown on some of the features that the gs has in common with earlier machines: The gs's 65SC816 CPU brain can give itself a partial lobotomy and emulate all of the older 6502's instruction set. This means that a program written for the Apple IIe or IIc (or even II+ or II) will not find any of the expected capabilities of the CPU either missing or different. Although the Apple IIgs can address far more memory in RAM than the earlier machines, and arrives configured with twice as much RAM as the older machines, the important Apple II "kernel" of 128K RAM at the bottom of the gs's memory map is read as two banks of 64K. So the gs's RAM operates in the same way as a IIe with an extended text card or as a factory-built IIc -- that 128K of RAM can be used by any Apple II program expecting to "see" it there. The ROM routines in the IIgs are far more powerful than the ROM routines in the older IIs. But the older ROMs are a subset of the newer ROMs. This means that Applesoft BASIC with lower-case and 80 column capability is still a Press for more ! CompuServe AOL-412 built-in. It also means that the monitor in ROM will do all that the older monitor could do (and far more). Text and graphics are also compatible with the IIe and IIc. Both 40 and 80 column text displays may be handled. The Lo-Res color graphics of 48 by 40 with 16 colors are supported; as are Hi-Res color graphics of 280 by 192, with 6 colors; and the Double Hi-Res graphics of 590 by 192 with 16 colors are also available. The IIgs has a number of built-in ports many of which can emulate similar built-in ports on the //c or add-on peripheral ports on the //e. Two built-in RS-232C ports allow for the connection of existing modems, printers and other such serial devices. A disk port identical to the one on the IIc is also present and can accept 5.25" or 3.5" disk drives. And, people who were shuddering over perhaps having to buy all new peripheral cards can rest easy: The seven expansion slots in the IIgs will accept hardware designed to plug into the Apple IIe. A game (joystick) capability is provided through both an older style 16-pin connector as well as a IIe and IIc style 9-pin connector. About the only such ports the IIgs may be said to lack are the audio cassette in and out (which the IIc does not have either) and the AUX slot found in the IIe. Press for more ! CompuServe AOL-414 THE DESKTOP EXPANDS One of the most exciting aspects of the machine is that, using its Super-Res graphics mode, it has the capability to run a graphics- and mouse-oriented operating system much like that of the Macintosh. The Apple IIGS has a "Finder" program very similar to the "Finder" which governs the iconographic layout of the Macintosh's screen. Icons, dialog boxes, onscreen push-buttons -- all of these are possible to implement on the Apple IIgs thanks to the fact that many of its ROM routines are based on algorithms and routines originally invented for and included in the Macintosh ROMs. The special routines which go under such names as the Toolbox, Quickdraw and the like are so similar to the Macintosh that many Mac programs will actually be able to be "ported" or moved to the Apple IIgs with a minimum of programming effort. Because the serial ports can work on AppleTalk networks there's no doubt that many Apple IIgs's will find themselves working in close harmony with Macs. Another aspect to the Apple IIgs/Mac connection is that Apple has announced a new SCSI hard disk drive and a special Apple II SCSI card ($129). The drive, called the Hard Disk 20SC ($1,299) will fit onto the Apple II (e or gs equipped with the new card) or plug right into the Mac. At present it is not possible to Press for more ! CompuServe AOL-416 use the same drive shared between the machines but that seems to be a likely development to look forward to. WHAT'LL IT COST? Apple has announced that present owners of the Apple IIe will be able to upgrade their machines to Apple IIgs status in January of 1987. The upgrade will swap the IIe board out for an Apple IIgs motherboard. So the upgraded machine will not have the detached keyboard of the gs but will be able to run all gs software. Price of the Apple IIgs upgrade was announced as $499. The price of the Apple IIgs itself was announced as $1795 including the main unit, a 3.5" disk drive and an AppleColor RGB monitor. The Apple IIgs alone is priced at $999. The Apple II gs is a machine that is right on time for many of today's computing needs. There is no doubt that Apple Computer has another winner. (For more on the Apple IIgs read the other articles in this issue's special section on the Apple IIgs.) Last page ! CompuServe AOL-347 *** SPECIAL COVERAGE *** THE APPLE IIgs COMPUTER 1 An Apple IIgs Overview "Apple II Forever!" 2 Hardware Heaven Inside the Apple IIgs 3 Developing on the IIgs "A Hacker's Guide" 4 Editorial Enter choice !2 CompuServe AOL-348 HARDWARE HEAVEN Inside The Apple IIgs by Neil Shapiro copyright (c) 1986 by MCU Inc. all rights reserved The design of the new Apple IIgs, from a hardware standpoint, was no easy challenge. Apple had to face two tough taskmasters -- their future customers and their present customers. The Apple IIgs had to be designed so as to be at the forefront of hardware possibility and power while still retaining the ability to use almost all of the existing Apple II hardware and software base. Many other companies have faced similar challenges and have thrown up their hands to opt for one choice over the other. Some manufacturers have deliberately crippled the capability of their new machines in order to remain compatible with their old hardware. Other companies have released machines which, while powerful in their own right, have left their loyal user base holding the short end of the stick of obsolescence. Apple Computer Inc. has shown for once and for all that a futuristic new Press for more ! CompuServe AOL-349 design need not neglect either the standards of the past nor the promises of the future. CHIP RUNDOWN As you no doubt expected, the new Apple IIgs uses many specially-designed integrated circuits. These ICs include not only the CPU itself but at least nine other specially designed LSI (Large Scale Integration) chips. The 65816 CPU (Western Design Center 65SC816) is a 16-bit chip ancestrally related to the previous 6502 CPU used in Apple II machines. This new CPU features 16-bit accumulator, 16-bit X and Y registers as well as relocatable zero page and stack. The CPU has a 24-bit internal address bus and 8-bit registers for both the data address bank and the program address bank. There are 11 new addressing modes (new from the 6502) and 36 new instructions for a total of 91 along with fast-block move instructions and complete 6502 and 65C02 emulation. Supporting the functionality and power of the CPU, Apple has designed a complement of new chips in this most powerful new addition to the Apple II family. Here's a very brief rundown on these new silicon additions: The Mega II chip provides for basic Apple II addressing and timing and works in conjunction with the following chip. Press for more ! CompuServe AOL-352 The Fast Processor Interface (FPI) handles the synchronization of the CPU processor with the Mega II chip. This is more complex than it may first appear as the Apple IIgs has both "fast" and "slow" RAM memory. Because the Apple IIgs emulates the older machines, it must be able to run at the older speed of 1 MHz. The CPU does have this capability. But what about the fact that such peripherals as Disk II controller cards and firmware with timing loops all expect the older, slower speed? Apple solved this dilemma by delegating 128K of the IIGs's memory as being "slow" memory that would always run at 1 MHz. But keep in mind that even in emulation mode the CPU may be run at 2.8 MHz. (This translates to 2.5 MHz after some internal routines are taken care of.) This means that even older Apple II programs are loaded into the "faster" memory. The Mega II chip governs the "slower" portions of memory while the FPI chip governs the "faster" part of the memory. "Fast" and "slow" are somewhat misleading. The actual RAM memory chips are all capable of the same speed. But it is the FPI and Mega II chips which determine the speed at which the memory segment in question will run. The Slotmaker chip is responsible for generating signals that are involved with addressing and controlling the expansion slots. The Video Generator Circuit (VGC) is the chip which provides the new Super-Res capabilities and so provides both video addressing and signal Press for more ! CompuServe AOL-354 generation. The Integrated Woz Machine (IWM) is a chip that was first introduced on the Macintosh and which controls both 5.25" and 3.5" disk drives. The Digital Oscillator Chip (DOC) and the Sound General Logic Unit (Sound GLU) work together to put the "S" in Apple IIgs. The DOC is a sampling sound generator made by Ensoniq; the Sound GLU connects the DOC to the system bus. Likewise, the Keyboard Microprocessor (a 50740A) and the Keyboard General Logic Unit (Key GLU) work in tandem. The Keyboard Microprocessor runs the new Apple Desktop Bus which allows for the mouse as well as the keyboard and future peripherals while the Key GLU connects that microprocessor to the system bus. THANKS FOR THE MEMORIES The Apple IIgs's CPU could address up to 16 megabytes of memory. Apple has chosen to make at least 8 megabytes of this space available for RAM expansion and 1 megabyte for ROM expansion. Minimum RAM for the IIgs is a respectable 256K. Programs that are written directly for the Apple IIgs can expect to use about 176K of that space as some space is taken for displays and the system firmware. Programs written for the Apple IIe or IIc, and run on the IIgs in emulation mode, will find home sweet home as, in emulation mode, the bottom 128K of memory is mapped out as one main Press for more ! CompuServe AOL-357 64K bank of memory and an auxilliary 64K bank just like old times. There is a reserved expansion slot in the Apple IIgs for additional RAM. If a program calls the in-ROM Memory Manager then all the memory on the card is available to the application. The program may reside and run in any portion of the expansion memory, given that the Memory Manager routines are used. This means that the RAM is "real" memory and can be used as far more than just a RAM disk. However, this memory arrangement means that older style memory cards are not going to be fully compatible with the Apple IIgs. An older style memory card will be able to be plugged into a gs slot. Once plugged in it will operate just as if it were in an Apple IIe or IIc when used in emulation mode. But you would not be able to use such a card as fully-utilized Apple IIgs memory. This means a new round of memory cards and Apple is making one style available now and one in the near future. Available right away is a card that utilizes 256K memory chips and which can grow the IIgs' expansion RAM space to 1 megabyte. When 1 megabit chips become available the card will also be sold in configurations allowing the expnded memory to reach 4 megabytes. (Still not yet up to the full 8 megabytes the machine could recognize). Press for more ! CompuServe AOL-359 SO SHOW ME SOMETHING! Anything the older Apple II's can do in the realm of text and display, the Apple IIgs can do also. All of the older display modes will work and almost all graphic-oriented software written for the older II line will run on the new machine. But the Apple IIgs adds Super-Res graphics and analog RGB to the list of video delights. Note that we are now speaking of analog RGB and not digital RGB. A digital RGB monitor (such as Apple's older RGB monitor or an IBM PC color monitor) will not work on the Apple IIgs. The digital RGB monitors, by their design, are not capable of producing nearly the wealth of glorious colors possible on the Apple IIgs. So, for full enjoyment of the IIgs, sooner or later most people will have to purchase a new color monitor. But, in the meantime, the IIgs will work with inexpensive NTSC color monitors and deliver almost all of the graphic features with somewhat less visual acuity. All of the Apple IIgs' various video modes take place on a display that is mapped out as three areas: colored text, colored background and colored border. Any of sixteen colors may be selected for these areas in any combination. The only proviso is that the user may not select the same color for both the text and the text background -- shades of the Invisible Man if he could! The colored text, however, only works with the analog RGB output. NTSC users will have to Press for more ! CompuServe AOL-362 be content with text displays of black and white and shades of grey. This is due to the fact that color fringing would otherwise result on NTSC monitors. Hold onto your eyeballs: Here comes SUPER-RES graphics! There are two forms of Super-Res graphics; 320 Super-Res and 640 Super-Res. The 320 Super-Res offers a resolution of 320 by 200 pixels (horizontal by vertical) and 640 Super-Res is 640 by 200. Unlike the Macintosh, this is not a bit-mapped screen. It is a pixel-mapped screen in that each dot on the display corresponds to a pixel and pixels are indivisible. In the 320 mode each pixel is referenced by 4 memory bits. In the 640 mode each pixel is composed of 2 bits. Pixel values select colors from color tables which are programmable and which are referred to as palettes. A palette is sixteen entries of 12-bits each specifying one of 4,096 possible colors. Because of this arrangement the 320 mode color selection is easy in that each pixel can select any of the 16 colors in a palette. But things get more complicated in 640 Super-Res. There are 2 bits associated with each pixel so each byte can reference four pixels which are side-by-side on the display. Each sixteen color palette (a palette more or less being whatever colors are defined as available for that line of pixels) has to be further subdivided into four groups of four colors each. The first four pixels in a line of such may select colors from Group 1, the second four from Press for more ! CompuServe AOL-365 Group 2 and so forth. This process repeats every sixteen pixels. Because of a process called dithering (remember how the older Apple II programs could achieve dozens of colors by mixing colors in adjacent pixels?) 640 Super-Res can display 16-color graphics on the same screen with 80-column text. As there may be 16 palettes in use at the same time, with 200 columns of pixels able to use any of the palettes there may be, in either Super-Res mode, a maximum of 256 colors on screen at the same time. SOUNDS LIKE TOMORROW The gs: Graphics and Sound. The Super-Res graphics are well matched by the super sound possibilities of the new machine thanks to Apple's taking a unique step in licensing a chip technology from an established musical instrument company. The Digital Oscillator Chip (DOC) is made by the Ensoniq Corporation. The Ensoniq people make many of the chips used in some of the most powerful digital synthesizers in the music world. The DOC contains 32 oscillators each of which can generate its own signal by stepping through a table of digitized sound samples. Because one of the oscillators is used as a timer for the DOC, and because each "voice" takes a mimimum of two oscillators, the Apple IIgs specifications say that the digitally synthesized sound can have up to 15 Press for more ! CompuServe AOL-367 voices. One of the most exciting aspects of the new Apple IIgs is that not only did Apple build a digital synthesizer into this new machine, it built into it a synthesizer with what musicians call "sampling" ability. Within the DOC is a single analog-to-digital conversion circuit. It is there so that an audio signal could be input into the DOC from the outside world. These inputs (called samples) can they be played back by the oscillators. In layman's terms this means that you can record such things as pots and pans falling, sounds of other instruments, even a human voice and then play it back from within your composition. It would also be possible to manipulate the various musical parameters of such recorded sounds so as to synthesize new sounds from them. The possibilities are limitless. The only thing that Apple seems to have left out of the actual case is a MIDI interface. MIDI (Musical Instrument Digital Interface) is the music industry's standard method for connecting electronic instruments. It seems likely that one of the first add-ons we are likely to see for this computer will be such a MIDI interface. At that point we would expect the Apple IIgs to become the world's foremost personal computer for music. INS AND OUTPUTS Press for more ! CompuServe AOL-370 There are seven I/O expansion slots on the Apple II gs's motherboard. These function in much the same manner as the expansion slots on the IIe. With the exception of diferences in the way that the Inhibit and Sync lines work (which is beyond the scope of this article) the slots may be said to be identical to those in the earlier machines. One difference, however, is that the Apple IIgs uses a technique called "shadowing" in order to keep full hardware compatibility with the world of the Apple II. The slots in the gs happen to use memory located in bank $E0 (hexadecimal numbering). But old-style Apple programs want to see the cards read and write to banks $00-01. Shadowing copies all reads and writes from bank $00 to bank $E0. The two serial ports on the IIgs can substitute for slots 1 and 2. The desk accessory Control Panel allows the user to configure these ports to his or her own needs. On default, serial port #1 is considered to be connected to a printer while serial port #2 is devoted to a modem. The firmware for each port roughly equates to that of Apple's own Super Serial Card (SSC). And, either port may be configured for AppleTalk. Unfortunately for us modem users, present telecommunications programs are among the least compatible of programs for the IIgs. This is because many, perhaps most, of these programs make calls directly to the SSC or other Press for more ! CompuServe AOL-373 hardware card. This means that these programs crash on the Apple IIgs if you use the built-in port with its different call locations. However, this problem only occurs when using the built-in modem port. If you plug a normal SSC card into slots 1 or 2 of the Apple IIgs then any of the popular Apple terminal programs will work (we tested "AE Pro,""Vidtex" and "Access II"). It will, obviously, be only a matter of time until all the terminal program manufacturers reconfigure their products so as to take full advantage of the Apple IIgs. Meanwhile, even if you do not have an extra SSC card (perhaps you were a IIc owner) you will still be able to telecommunicate with your Apple IIgs thanks to a built-in terminal emulation program which does recognize the built-in serial port. The built-in terminal emulation uses a control-character command set that is reminiscent of the command set used in native mode by the Hayes Micromodem Ie. While the command set is minimal, it will get you online. But, for the beginning of telecommunications with the Apple IIgs, we think that you will have to count on having an external modem and a Super Serial Card for any sort of work more complicated then reading and typing online. The built-in serial ports do go beyond the Super Serial Card in sophistication and offer features for future programs to use. Both input and Press for more ! CompuServe AOL-376 output buffering is supported. The default size of these buffers is 128K but an application can set its own limits. The serial port also supports spooling or background printing. Large chunks of information can be sent out the serial port while an application is running. The built in disk drive port is based on the IWM chip. This stands for Integrated Woz Machine and is, basically, an Apple II disk controller card with all of the electronics reduced to one device. In most respects it is identical to the disk port on the Apple IIc. Its firmware considers the drives connected to it (in a daisychain fashion) to be plugged into slots 5 or 6. SmartPort helps keep track of these various ports: SmartPort is in ROM and its routines allow applications to obtain information about the status of a device connected to a port; to reset a device; to read or write to a device as well as format the medium; and to send control signals to the device. The Game I/O is identical to the Apple IIe. There is a 16-pin DIP socket on the motherboard (as on the older II and II+ machines) and a 9-pin connector on the back panel. Both share the same signals of four inputs (for joystick or paddles), three button inputs, power and ground and the 16-pin DIP socket also has four single-bit outputs and a strobe bit. The Apple Desktop Bus is a serial interface (not considered an I/O port) whose function is to connect the keyboard and the mouse to the system bus. The Press for more ! CompuServe AOL-379 Apple Desktop Bus was designed with the expectation that there will be such peripherals as hand controls and graphic tablets which will be able to connect to this bus in a daisychain fashion. The mouse is more similar to the mouse on the Mousecard IIe than to the mouse on the IIc. It contains a microcontroller than can track the mouse's movements to plus or minus 63 increments. The Desktop Bus firmware supporting the mouse works pretty much like the Apple IIe Mousecard in that it has a passive mode which means the Apple IIgs can run non-interruptable software routines (such as timing loops) while still controlling the mouse. All in all, Apple has turned in a product that seems both an original use and modification to existing technologies as well as being a stunning collection of new technologies utilized in unique and well-designed methods. This is not a machine that will be outmoded anytime soon. Last page !T CompuServe TOP 1 Subscriber Assistance 2 Find a Topic 3 Communications/Bulletin Bds. 4 News/Weather/Sports 5 Travel 6 The Electronic MALL/Shopping 7 Money Matters/Markets 8 Entertainment/Games 9 Home/Health/Family 10 Reference/Education 11 Computers/Technology 12 Business/Other Interests Enter choice number !GO AOL-1 CompuServe AOL-1 Welcome To.... APPLES ONLINE (tm) (VOL. 1, #4) 1 Apples OnLine Editorial 2 User Groups and Newsletters ** NEW BMUG & WAP ARTICLES ** 3 Apples OnLine Magazine ** NEWLY UPDATED THREADS ** 4 Introducing MAUG (tm) 5 Visit the MAUG Forums 6 SPECIAL: All About the IIgs Enter choice !6 CompuServe AOL-347 *** SPECIAL COVERAGE *** THE APPLE IIgs COMPUTER 1 An Apple IIgs Overview "Apple II Forever!" 2 Hardware Heaven Inside the Apple IIgs 3 Developing on the IIgs "A Hacker's Guide" 4 Editorial Enter choice !3 CompuServe AOL-567 DEVELOPING SOFTWARE FOR THE APPLE IIGS by Bob Perez copyright (c) 1986 by Bob Perez all rights reserved Programmers will find the new Apple IIgs an enticing challenge, one which offers rewards typically associated with mastery of the most demanding disciplines. The sheer mass of documentation alone will intimidate all but the Truly Dedicated--thousands of pages of technical specifications, routine descriptions and assembly language source code were provided to seeded developers in the form of eleven bursting binders full of magic incantations and other wonderful secrets. But the incomparable satisfaction of producing that first working application with its windows, pull-down menus, and spectacular sound and 4096-color graphics surpassing any previously offered by Apple, will provide all the incentive needed to push further and deeper into the IIgs Grab-bag. Like the Macintosh before it, the IIgs will stimulate its own growth by attracting the hacker in all of us to explore, to experiment, and to wow our friends and peers--the machine is fun! This document touches on Press for more ! CompuServe AOL-569 some fundamental aspects of IIgs software development and isn't meant to be comprehensive or final. In fact, as I'm writing there are changes in the works to many of the development tools and to the machine itself, so treat most of this as a preliminary overview. NOT LIKE HIS MOTHER, NOT LIKE HIS FATHER Those familiar with the existing Apple II line of computers will find some familiar ground upon which to build their understanding of the new hardware, but will have to adjust to entirely new ways of thinking regarding software development. The IIgs emulates the IIe hardware in enough ways to provide a high degree of downward compatibility both conceptually and in practice. In theory, one could continue to use exactly the same methods and techniques used to produce Apple II software and experience almost no difficulty. In practice, however, IIgs programmers will want to take advantage of the many enhancements that distinguish this machine from its predecessors--the market eventually will demand it--and this will require adherence to a new regimen of programming practices. Macintosh developers won't feel entirely at home with the IIgs either, but they *will* feel like they're in a familiar place. Significant portions of any Macintosh program will require adaptation to run in the IIgs environment, but Press for more ! CompuServe AOL-571 the conversion will be less conceptual and more detail-oriented. Obviously, all of the color support will be new ground, and the amazing sound capabilities of the IIgs out-class even the Macintosh's fabulous audio circuits. The IIgs utilizes the same serial chip as the Macintosh (the Zilog 8530), which will cause some II developers headaches, but will make a lot of Macintosh developers happy. From the developer's standpoint, this is essentially a new machine with traits of each of its ancestors. At last, Apple has given substance to the ideal originally espoused by John Sculley that the Macintosh and Apple II lines should be consolidated into one cohesive family. The Apple IIgs provides a bridge between these two radically different worlds, a bond between two former suitors in competition for the attention of the industry and of Apple itself. The sight of Steve Wozniak appearing on the same stage with Jean-Louis Gassee to announce the IIgs provided a degree of irony and settled some old scores in Cupertino. There is peace again at Apple. FUNDAMENTALS: THE TOOLBOX The IIgs sports a whopping 128K of ROM (by comparison, the original Apple II came with about 4K of ROM and the original Macintosh was shipped with 64K of ROM), made up largely of a set of built-in assembly language Press for more ! CompuServe AOL-573 routines--collectively known as The ToolBox--designed to facilitate a consistent Desktop User Interface and to make programming the IIgs a lot easier. It turns out that these are related goals, as you can imagine how many applications would use windows if every individual programmer had to code them from scratch. This approach was inspired by the Macintosh ToolBox and is conceptually identical to it for the most part, with a couple of notable differences I'll document below. BANKS FOR THE MEMORY The ToolBox is made up of a series of interdependent Tools, each designed to manage specific territories within the IIgs environment. At the lowest level is the Memory Manager, whose job it is to manage the allocation of memory to anyone requesting it. Who can request memory? The operating system; an application program; or something somwhere in between, like a desk accessory (which lives in the system but can be called by your application and run contemporaneously with it). In this case, the operating system is a new, 16-bit version of ProDos (cleverly named ProDos16) designed to run fast and to support the special features of the IIgs. When the system requests a block of memory (to open up buffers for I/O processing, for example), it identifies itself (i.e., passes its UserID) and Press for more ! CompuServe AOL-576 states how much memory it wants. The Memory Manager looks around in the heap of available memory and "sets aside" a block fitting the desired size and returns a handle to the block. A handle is a 32 bit value consisting of the address of a pointer to the memory block. That is, the handle is a pointer to a pointer to the block. This double indirection will be quite familiar to Macintosh developers and works as follows: as a programmer, you want to have valid pointers to the memory blocks you've requested so that you can stuff whatever you've got into those blocks and get whatever you want out of them at any time. The Memory Manager on the other hand has the responsibility for allocating arbitrarily-sized blocks of memory at any given time and needs the flexibility to move blocks around in memory as needed in order to be able to fill a given request. If the Memory Manager has to move a block that you've obtained in order to make room for someone else's block, you're going to wind up with an invalid pointer unless something is done to explicitly update your pointer. Since the Memory Manager doesn't want to have to keep track of what you're doing and you don't want to keep track of what its doing, the compromise that's been worked out is to create block of Master Pointers that act as middlemen in the process. The Memory Manager knows where the Master Pointers are at all times and initializes each of them to point to an individual allocated memory block. When you're given a handle, it consists of a pointer to the Master Press for more ! CompuServe AOL-589 Pointer which points to your memory block. If the block has to be moved at some later time, the Memory Manager moves it and then simply updates the Master Pointer to point to the new location and doesn't bother to tell you about it. Since your handle always points to the Master Pointer, you are guaranteed to always have a valid route to your memory block. QUICKDRAW FOREVER The fundamental graphics Tool is QuickDraw II, a set of graphics primitives based on the Macintosh QuickDraw routines (which in turn were based on Lisa QuickPort routines). QuickDraw II defines a coordinate system into which your application (as well as the system itself) will ultimately draw. Routines exist to allow you to do line drawing, area fills, polygonal drawing and filling, and many, many other associated graphic procedures. The emphasis here is on "Quick" and the flexibility is there to create your own elaborate graphic scenarios by combining the available primitives in new and exciting ways. In true Apple II tradition, it's an open system, even customizable. YES, IT DOES WINDOWS The Window Manager is a Tool that draws heavily on the Memory Manager and QuickDraw II to create, maintain and dispose of windows. Windows are dynamic, Press for more ! CompuServe AOL-591 sizeable, moveable, objects which present data to the user. A typical window might contain text in a word processing application, or the playing field of an adventure game. Windows have a standard appearance (although you can customize them if you really feel the need), and present your user with a friendly, consistent environment. Using simple calls to the Window Manager Tool, you can create windows as needed without bothering with all of the details inherent in the allocation of memory and graphic maintenance (you don't have to redraw the window when it's moved, for example, the Window Manager does this for you). TOOLING AROUND Other Tools complement these fundamental building blocks in a number of ways. The Dialog Manager allows you to create Dialog boxes (special windows that ask questions of your user or present information to him or her). The Control Manager allows you to create buttons, check boxes, scroll-bars and other handy items to make user selections consistent and easy. The Menu Manager, Printing Manager, Sound Manager, and the rest of the Tools provide corresponding routines for management of these and other objects, and much of your application code will consist of calls to the various Tools. FOR A GOOD TIME, CALL.... Press for more ! CompuServe AOL-593 From the programmer's viewpoint, the Tools are quite consistent in their calling conventions and routine descriptors. Once you've learned how one Tool works, it's quite easy to begin to understand how the others work. How do you find and call a Tool? While many of them are in ROM, some remain in RAM at the time of this writing, but may wind up in future ROMs. This will be easily accomplished and totally transparent to the programmer, thanks to the notion of a Tool Locator. Macintosh developers will recognize the concept as the Trap Dispatcher. A set of internal memory tables is initialized at startup time to point to the various Tool locations in RAM or in ROM. When the programmer wishes to call on a specific Tool, he passes a toolset number to the Tool Locator which is used as a vector into the memory tables containing the actual Tool addresses. In this fashion, RAM routines can eventually find their way into ROM and all that has to be changed is the memory table address. As a programmer, you don't necessarily know or care whether the Tool's in RAM or in ROM. You pass the toolset number and let the Tool Locator figure out where to get it. THE MAIN() EVENT Another concept familiar to Macintosh developers is the idea of an event-driven application. IIgs applications (like Macintosh applications) are Press for more ! CompuServe AOL-597 not written in the usual, linear fashion ("first do this, then do that, then do the next thing", etc). Instead, the typical event-driven application consists of one simple, "infinite" loop that continues to cycle through itself over and over again, waiting for things to happen. C programmers use a while(true) or for(;;) loop, for example, as their main event loop. Things that can happen in your loop are called events and your code typically cases out on specific types of events as they occur. For example, you might have a routine called doMouse which gets called each time your application detects an event involving the mouse. The Window Manager helps you to update your windows by "posting" events involving your windows that you can watch for and handle as appropriate. Events are the essence of your IIgs application and as you might imagine, there is an Event Manager Tool to help manage the posting and reporting of events. ENOUGH THEORY. HOW DO I MAKE IT GO BEEP? During its development, the IIgs was code-named Cortland, and the development system that was given to seeded developers was known as the Cortland Programmer's Workshop, or just CPW (analagous to MPW for the Macintosh). I have no idea what the development system will be called now, so I'll continue to refer to it as CPW. CPW is a complete programming environment consisting of a 65816 assembler, a Press for more ! CompuServe AOL-599 C compiler, and a Pascal compiler. When it's complete, the system will consist of a wholly integrated environment within which you can code modules in any of the 3 available languages and link them together to make up a complete application. You could write the main body of your code, for example, in C, and then code all of the time-critical portions in assembly. You might want to borrow a friend's Fast Fourier Transformation routine that was compiled in Pascal and link it in. All of this and more is possible using CPW. The Editor is smart enough to drop you back into your source file at the right place when a compile or assembly fails, and a powerful scripting ability (a very sophisticated EXEC capability) allows you to customize your development process in an infinite number of interesting ways. SOME ASSEMBLY REQUIRED I said "when it's complete" because CPW is still under construction. The last version I received had a very pre-release C compiler and no Pascal, and all of the code I've written so far has been in assembly. The C is coming along rapidly now, though, and should be ready reasonably soon. Pascal hackers will have to swallow their pride and learn C or else hunker down and use assembly language. The 65816 assembler packaged with CPW is based on the ORCA/M assembler familiar to most Apple II assembly language programmers, with lots Press for more ! CompuServe AOL-601 of IIgs-specific enhancements. There are at least two books that I've seen on the bookshelves regarding 65816 assembly language, one by an Apple employee actually involved in the IIgs product development (David Eyes). If you're at all familiar with 6502 assembly language, you shouldn't have any trouble picking up the 65816 language. In fact, you'll love it. Some of the major improvements over the venerable--if ancient--6502 are: 1) A relocatable zero-page! Not only can you create your own "zero page" anywhere within the first 64K of RAM, you're allowed more than one page and can change its location at run time. It might not be obvious at first why you'd want to do this, but once you see someone set up a "zero-page" somewhere in memory and then start using "zero-page" mode to access locations therein, you'll see why they did it. 2) 16-bit registers. The X, Y, and A registers are all available now in16-bit sizes, allowing more efficient handling of word-sized data (no more kludges to create 16 bit counters, for example). 3) 24 bit addressing. This means that you can now directly access 16 MB of linear RAM without bank switching (8088 programmers can pick up their jaws now). 4) New instructions and addressing modes. Among the new instructions are MVN and MVP (that's Move Block Positive, not Most Valuable Player), which allow you Press for more ! CompuServe AOL-604 to do some quick, intelligent memory block moves (i.e., you don't have to worry about block overlapping); STZ, (Store Zero in memory); and a whole series of push and pull instructions for the registers. New addressing modes allow stack-relative addressing, making high-level language support a lot easier. The 65816 can switch into "emulation" mode and emulate completely the standard instruction set of a 65C02. There will be times when this is desirable, but for the most part you'll want to run in "native" mode since most existing software will run in this mode and several times faster at that. FINAL THOUGHTS Developing software for the Apple IIgs can be a frustrating experience if you're used to mature, completely debugged development tools. Still, the machine and its tools are surprisingly robust compared to other, similar undertakings (ask any Amiga developer for his views on this subject). As a new developer, you'll pay the price for being a pioneer, but you'll take part in a unique evolution of some historical significance in the microcomputer industry. And of course, you'll have a great time while you're at it. Remember, the best source of information for developing IIgs software will continue to be MAUG, and specifically, the Developer's Forum so check in regularly. I'll be Press for more ! CompuServe AOL-606 uploading source code and development tools from time to time and Apple will continue to have an official presence on the board. Enjoy! Last page !4 CompuServe AOL-382 Editorial "Compliments to the Chefs!" by Neil Shapiro copyright (c) 1986 by MCU Inc. all rights reserved The Apple IIgs has risen like Venus from a troubled sea of rumours and half-truths and now we can all see that her beauty is dazzling. Apple Computer has managed to not only bring the Apple II line back to the forefront of personal computing but, by this introduction, has stabilized and defined its complete product line and its corporate goals. The Apple IIgs is an answer to a very complex question. THE II WORLD WAITED Since the Apple II came out in 1977 there have been relatively few changes to the machine. The first new model, the Apple II+, substituted floating-point BASIC in ROM for integer BASIC. The Apple IIe built in lower case capability and an 80-column display and added a new and high-resolution graphic mode. The Press for more ! CompuServe AOL-383 IIe also drastically reduced the chip count in the machine with new LSI chips. The Apple IIc is basically an Apple IIe with most of the everyday peripheral ports built-in rather than on plug-in cards. While there were many other changes it is true that anyone who ever bought an Apple II of any flavor would quickly be able to use each of these similar machines. The Apple II line, from the standpoint of what it was capable of doing, was standing still. Some of this, according to industry reports and sources from within Apple, was due to the attitude of Apple's founder and then-CEO Steve Jobs toward the II line as compared to the Macintosh. The Macintosh was Jobs' "baby." He had contributed much to the design and inspiration behind that machine. To an outside observer, it was gradually becoming apparent that Apple was splitting itself into two separate companies under one roof. One of the Apple Computer Companies made Macintoshs. The other made Apple II computers. Each of these companies had its own marketing arm, its own research staff -- and its own funding. A corporate diagram of Apple began to look like some sort of businessman's nightmare about siamese twins. But one twin was doing far better than the other. The company was throwing more and more of its support behind the Macintosh, seemingly forgetful of the fact that the Apple II accounted for a great deal of its yearly earnings and Press for more ! CompuServe AOL-386 that the Apple II was already an established standard in such fields as education. Then, through boardroom politics worthy of a Dallas episode, Jobs was maneuvered out of the CEO spot (and later left the company) by the present CEO, John Sculley. At that point it became clear that one of Sculley's main tasks was to meld Apple Computer back into one company again, sharing one vision. The first indication of this was when the various different Mac and Apple II sections were all merged into sections with overall interest in all of Apple's products. The next indication that Sculley was going to give equal billing to all of Apple's products were the first leaks that a new Apple II was in the works. Following that, Steve Wozniak came back to Apple. Woz --inventor of the Apple II, both a millionaire entrepreneur of rock concerts and still a very private person -- he is a legend. When the legend returned it seemed safe to feel that there would still be more to the Apple II epic. And now we have the final proof, the most tangible evidence of all that Apple Computer is once again a company that proudly makes Apple II computers -- the Apple IIgs is here. Other articles in this issue of Apples OnLine detail the new machine. Suffice it to say here that we feel the Apple IIgs is presently the best Press for more ! CompuServe AOL-388 personal computer choice for anyone interested in color graphics, education, and many home uses as well as meeting the needs of many smaller businesses. Even better -- Apple did it without obsoleting their customer base. The new machine is perfectly compatible with the older machines so the vast realm of software and hardware for the Apple II is already obtainable for new IIgs purchasers. And, as the new features of the IIgs are taken advantage of by programmers, we can expect the IIgs to quickly develop its own advanced base of software and peripherals. THE MACINTOSH CONNECTION For all of the above, there is still no doubt that the Macintosh line of computers will remain Apple's premier product for business, desktop publishing and the general "power user." While the 640 Super-Res display of the Apple IIgs approaches the crystal-clear design and user interface of the Macintosh, the Mac still has the better resolution thanks not only to its bit-mapped screen but to its ultra-high resolution monitor. A person who wants to word process or spreadsheet five or six hours a day will still find the Macintosh display to be the best there is. The Macintosh's 68000 CPU is still faster and generally a superior CPU to Press for more ! CompuServe AOL-390 the 65SC816 in the Apple IIgs. Given the same type of programs, the Macintosh has to run them faster and with more capability. Of course, the Mac's display is black and white. This has (wrongly, I believe) kept many programmers from designing such things as educational and entertainment programs for the Mac. The one important field that the Apple IIgs may actually "take over" from the Macintosh in is that of education. There's no doubt that many schools will see the IIgs as the affordable way to upgrade their existing Apple II systems. But, overall, I expect that the Apple IIgs and the Macintosh will complement each other. For one thing, Apple has included ROM calls in the Apple IIgs that are very equivalent to ROM calls in the Macintosh. As detailed elsewhere in this issue, development on the IIgs is very similar to development on the Macintosh. Indeed, the two machines are so close that some programs could be "ported" right from the Mac to the IIgs, and vice versa. This means, to Mac people, that they may soon see numerous new education and entertainment programs developed for the IIgs showing up on their own machines. To people with the Apple IIgs it may mean that the software base for the IIgs Press for more ! CompuServe AOL-393 will literally explode into action as many Mac programmers quickly adapt existing product lines to run on the new machine. Apple has also been bringing their product lines together as far as being able to use the same peripherals. Such things as the AppleTalk network allowing Macs and Apple IIs to share peripherals and the new SCSI hard drive that can fit either a Mac or properly equipped IIgs seem the wave of the future. And, from the standpoint of the consumer audience for each machine, the larger that combined audience the lower the cost of the peripherals. All in all the new Apple IIgs not only validates the corporate slogan of "Apple II Forever" but it validates the faith and confidence that people have placed in Apple over the years. Whether you own a Mac or an Apple II, the new machine shows that Apple Computer is once again a healthy computer company in touch with its own roots and its customer base. And, if you are one of the many people hunting for a new computer, your choice has just been graciously expanded. 1986 also isn't going to be like 1984. Last page ! CompuServe AOL-347 *** SPECIAL COVERAGE *** THE APPLE IIgs COMPUTER 1 An Apple IIgs Overview "Apple II Forever!" 2 Hardware Heaven Inside the Apple IIgs 3 Developing on the IIgs "A Hacker's Guide" 4 Editorial