develop-01 9001 January 1990
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
develop The Apple Technical Journal COLOR SUITE: REALISTIC COLOR FOR REAL-WORLD APPLICATIONS ALL ABOUT THE PALETTE MANAGER BRAVING ONSCREEN GWORLDS ALSO: THE PERILS OF POSTSCRIPT COMPATIBILITY: RULES OF THE ROAD DEBUGGING DECLARATION ROMS APPLE II DEVELOPMENT DYNAMO Premier Issue January 1990
A cover with a colorful pixelated checkerboard-style image on the left and a column of bold uppercase cover-story headings on the right beneath the masthead.
Reading notes: Headline 'develop' is the masthead title; the cover-line text is in uppercase bold sans-serif and reading order runs top to bottom in the right column.
- Printed product names
- develop · The Apple Technical Journal
- Printed dates
- January 1990
- Languages
- English
PDF page 1
COLOR SUITE: REALISTIC COLOR FOR REAL-WORLD APPLICATIONS
d e v e l o p T h e A p p l e T e c h n i c a l J o u r n a l COLOR SUITE: REALISTIC COLOR FOR REAL-WORLD APPLICATIONS ALL ABOUT THE PALETTE MANAGER BRAVING ONSCREEN GWORLDS ALSO: THE PERILS OF POSTSCRIPT COMPATIBILITY: RULES OF THE ROAD DEBUGGING DECLARATION ROMS APPLE II DEVELOPMENT DYNAMO Pr em ier Issu e January 1990
Reading notes: Headline selection is inferred from the supplied copy; the copy does not indicate which line is the printed cover headline. The supplied copy gives no visual confirmation of layout, artwork, or reading order; the article list order is taken as supplied. The spaced-out masthead 'd e v e l o p' and the spaced 'Pr em ier Issu e' line are likely extraction artifacts of 'develop' and 'Premier Issue'; spelling was not altered. 'Apple II' and 'PostScript' appear as article subjects rather than clearly advertised products, so productNames is left empty. No advertised prices were present in the supplied copy.
- Printed dates
- January 1990
- Languages
- English
PDF page 2
__________________________________________________________________________________________________ RESOURCES Apple provides a wealth of information, products, and services to assist developers. The Apple Programmers and Developers Association (APDA) provides access to development tools to anyone who wants them. Qualified commercial and non-commercial developers may gain access to additional information and services through the Apple Partners and Associates programs. These programs are administered by Apple’s Developer Programs organization. In addition to automatically becoming APDA subscribers, Partners and Associates also have access to the information and services provided by Apple’s Developer Services organization. APDA APDA is an Apple-operated worldwide mail-order distribution service for developers. Serving as the sole source for non-retail development products created by Apple, APDA also offers an extensive selection of key third-party development tools, languages, and technical books. All Apple computer users worldwide are eligible to participate in APDA. In addition to commercial developers, APDA’s customers include in-house corporate developers, university professors and students, value-added resellers, and hobbyists. You do not need to be an Apple Partner or Associate to participate in APDA. Contact APDA at (800) 282-2732 (U.S.), or (408) 562-3910, or 20525 Mariani Ave., M/S 33G, Cupertino, CA 95014. Apple Associates Program The Apple Associates Program is a program designed to assist noncommercial developers by providing them with technical information and resources on a regular basis. Apple Partners Program The Apple Partners Program is Apple’s major developer support program. This program provides access—for U.S.-based developers—to marketing and technical information, to answers to development questions, and to the annual Worldwide Developers’ Conference. Apple Partners can also purchase, directly from Apple at special prices, a limited number of Apple systems for development purposes. Contact Developer Programs at (408) 974-4897; or 20525 Mariani Ave, M/S 75-2C, Cupertino, CA, 95014 for information or an application kit for either the Associates or the Partners program. Non-U.S. developers should contact the Apple office in their country for information about the developer programs they offer. Apple Developer University Apple Developer University is committed to teaching you skills that will help you create superior software products—whether you’ve just started programming in the Macintosh environment or whether you’re an expert. Our hands-on teaching approach offers you the most direct and responsive means of acquiring up-to-date development skills. And you can be confident that the programming languages, tools, and platforms taught at Apple Developer University are chosen because they are integral to Apple’s direction for the future. Contact the registrar at (408) 974-6215 to reserve your place or request a current catalog. You can also AppleLink Developer University at DEVUNIV. Apple, the Apple logo, Apple IIGS, AppleLink, A/UX, IIGS, HyperCard, LaserWriter, Mac, Macintosh, MPW, ProDOS, and SANE are registered trademarks of Apple Computer, Inc. APDA, APW, Finder, GS/Bug, MacroMaker, MultiFinder and QuickDraw are trademarks of Apple Computer, Inc. Unix is a registered trademark of AT&T. PostScript is a registered trademark of Adobe Systems, Incorporated. Motorola is a registered trademark of Motorola Corporation. Helvetica is a registered trademark of Linotype Company. Nu Bus is a trademark of Texas Instruments, Inc. Fast Font is a trademark of International Business Machines Corporation.
Reading notes: Layout, typography and column structure are inferred from the extracted text and cannot be confirmed visually. The phrase 'special prices' in the Apple Partners Program paragraph has no explicit amount, so no price was recorded. Telephone numbers, street addresses and page-level contact details were not treated as advertised products, prices or dates. Product names were taken from the trademark notice and body copy; the list includes trademark items that may not all be products being advertised.
- Printed product names
- Apple IIGS · AppleLink · A/UX · HyperCard · LaserWriter · Mac · Macintosh · MPW · ProDOS · SANE · APDA · APW · Finder · GS/Bug · MacroMaker · MultiFinder · QuickDraw · Nu Bus · Fast Font · PostScript · Unix · Helvetica
- Languages
- English
PDF page 3
CONTENTS Realistic Color for Real-World Applications Extensions to the Macintosh graphics system software and how to use them. 4 All About the Palette Manager The what, why, and how of the Palette Manager and how it works with 32-Bit QuickDraw. 22 Braving Offscreen Worlds Use the new offscreen calls to set up and to maintain your offscreen world. 28 The Perils of Postscript Mixing the models: Postscript and QuickDraw; tricks for the mix. 41 Compatibility: Rules of the Road An overview of the most critical System 7.0 compatibility issues. 50 Debugging Declaration ROMs Everything you need to know to build and to debug a NuBus declaration ROM. 75 Apple II Development Dynamo Produce fast, small, readable, reliable Apple II assembly-language code quickly and conveniently using Dynamo. 93 Apple II Q & A Questions and answers compiled by the Apple II Developer Technical Support group. 101 Macintosh Q & A Questions and answers compiled by the Macintosh Developer Technical Support group. 103 Index 106 ________________________________________________________________________________________ 1 E D I T O R I A L Editor in chief’s clothing Louella Pizzuti Developmental Editor Carol Westberg Editorial Assistant Susan Marsland Code Tester Charlie Springer Manager, Dev. Press David Krathwohl A R T & P R O D U C T I O N Designer Joss Parsey Technical Illustrator Cleo Huggins Production Creative Communications Center Printer Craftsman Press Circulation Management Dee Kiamy CONTENTS January 1990
Reading notes: Primary heading is taken from the first contents entry and may not be the document's main title
- Printed product names
- Macintosh · Palette Manager · 32-Bit QuickDraw · Postscript · QuickDraw · System 7.0 · NuBus · Apple II · Dynamo
- Printed dates
- January 1990
- Languages
- English
PDF page 4
Now that you're holding the first issue of develop, Apple's quarterly technical journal, you may want to know how and why it got to you.
Now that you’re holding the first issue of develop, Apple’s quarterly technical journal, you may want to know how and why it got to you. As a company, Apple tries to support third-party developers as much as possible: in addition to the tools and system software our engineers write to make your lives easier, we’ve got an entire department (the Apple Developer Group) of more than 300 people whose jobs consist of trying to help you be successful. We do that by lobbying for software and hardware changes that will make your development job easier and more productive, and by publishing marketing and technical information. Enter develop. This journal is intended to lead you into other reference materials like Inside Macintosh and the Apple IIGS Reference Manual ; it doesn’t try to replace or reword these books, it complements them and helps you figure out which sections you may need to study more carefully. Each article includes the author’s photo and a biography. This should help you understand the minds behind the madness (as well as help you spot these folks at trade shows). I like to think of develop as very heavily commented sample code. The text that surrounds the code explains and clarifies what the code does and why. We want you to understand and to use the code freely, so we’ve included a CD that contains the entire journal as well as applications built from the code in the articles. This should make it easier for you to find what you’re looking for, and for you to copy the code you’d like to use. Each quarter we’ll include the past issues and code, so if you’ve got one develop CD, you’ve got them all (as long as it’s the most recent one). Because we want the code to demonstrate what the text explains, you won’t see the latest breaking news here. What you will see is code that solves real problems in ways that we’ll strive to keep compatible in the future. All of the questions and answers (and many of the articles) come from the Apple Developer Technical Support group, so you know they’re more than just theoretical exercises. They’re questions or problems that real people have struggled with; hopefully publishing them here will help you solve your own problems before you lose too much sleep. _________________________________________________________________________________________ 2 S P I R I T G U I D E S T E C H N I C A L R E V I E W E R S Pete Alexander John Harvey Brian Bechtel Dave McGary Rick Blair Jean-Charles Mourey Rob Dearborn Andy Shebanow Matt Deatherage Jim Straus Chris Derossi Larry Rosenstein Tim Enwell Dave Weiner Dave Fung Gregg Williams Naresh Gupta Jon Zap Margery Cantor Lou Tomafsky d e v e l o p January 1990
Reading notes: Headline is taken as the opening sentence of the body text, as no separate primary heading is distinctly printed.
- Printed product names
- develop · Inside Macintosh · Apple IIGS Reference Manual
- Printed dates
- January 1990
- Languages
- English
PDF page 5
Just as the programming problems you face are many and varied, so too are the articles in this issue. Our color suite includes Bruce Leak talking about the changes he made to 32-Bit QuickDraw, Dave van Brink discussing the new and improved Palette Manager, and Guillermo Ortiz saving you time (and compatibility headaches) by explaining the new offscreen calls. Our other articles run the gamut from Dave Radcliffe’s compilation of compatibility strategies, to Eric Soldan describing his new 8-bit development system, to Mark Baumwell explaining exactly how to build and debug a declaration ROM, and finally to Scott “Zz” Zimmerman giving the scoop on how to mix PostScript and QuickDraw for a happy tomorrow. If you’re a Certified developer, Partner or Associate, you’ll be getting develop every quarter as a part of your developer package. If you are not in one of the above programs, you can subscribe to develop using the envelope and order form in the back of the journal. If you like develop, I’d love to hear about it, and if you don’t like it, I’d like to change it. So let me know what you think. What you like, what you hate, and what you’d like to see more of. I’ll listen and respond, and together we can make develop evolve into the journal we’ve all been waiting for. Louella Pizzuti Editor ________________________________________________________________________________________ 3 S U B S C R I P T I O N I N F O C O M M E N T S Send all letters and comments about develop Send all subscription enquiries to: develop Apple Computer, Inc. P.O. box 3721 Escondido, CA 92025 U.S.A. directly to the editor: Louella Pizzuti 20525 Mariani Ave M/S 75-3B Cupertino, CA 95014 U.S.A. AppleLink: Pizzuti1 EDITORIAL January 1990
Reading notes: Headline not identifiable in supplied copy; primary heading may be absent from extracted text
- Printed dates
- 1990 · January 1990
- Languages
- English
PDF page 6
REALISTIC COLOR FOR REAL-WORLD APPLICATIONS
4 ___________________________________________________________________________________ d e v e l o p January 1990 REALISTIC COLOR FOR REAL-WORLD APPLICATIONS BRUCE LEAK , our local pixel dealer, is one of our famous convertible-driving, shorts-wearing maniacal-laughing system software engineers. He has a MSEE from Stanford University and trained for this job at Sandcastles and Microsoft. Now he spends his nights and weekends changing how you see the world on your Macintosh (32-Bit QuickDraw is his 32-Bit QuickDraw, the new extension to the Macintosh graphics system software, enables the manipulation of 16- and 32-bit color data. This article gives details on the new offscreen pixMap support, the improved Palette Manager, color to grayscale conversion through luminosity mapping, and advanced dithering from 16 and 32 bits per pixel to lower bit depths.
Reading notes: Byline text 'BRUCE LEAK , our local pixel dealer...' is cut off mid-sentence at '(32-Bit' and the rest of the sentence is missing. Article body appears to be a truncated excerpt with unclear reading order between the intro and the technical summary.
- Printed product names
- 32-Bit QuickDraw · Macintosh
- Printed dates
- January 1990
- Languages
- English
PDF page 7
5 __________________________________________________________________________________ REALISTIC COLOR FOR REAL-WORLD APPLICATIONS January 1990 On the Macintosh, Apple’s graphics software (QD) lets a programmer work with a high-level graphics model that is independent of the physical display device. This gives Apple the option to take advantage of new features and technologies without requiring application developers to rewrite their code. 32-Bit QuickDraw extends QuickDraw to encompass the full range of displayable color. Although today’s monitors are typically capable of showing a full spectrum of color or grays, it is the video card and system software of a computer that control the number of colors or shades of gray on the screen. A 1-bit video card allows 2 colors or shades (typically black and white), 2 bits gives 4, 4 bits gives 16, 8 bits gives 256, and 24 bits gives over 16 million colors. Color QuickDraw always supported the description of nearly unlimited colors (2 48 ) but constrained images and screens to any 256 of the expressible colors. 32- Bit QuickDraw significantly increases the standard number of colors available for an application while maintaining speed and affordability. 32-Bit QuickDraw—which carries 24 bits of color information—consists of three files: • a General cdev that works more effectively with the system, whether the other pieces are installed or not • a Monitors cdev extended for 32-bit addressed video cards . • a 32-Bit QuickDraw Init file, which contains the new QuickDraw software NEW FUNCTIONALITY IN 32-BIT QUICKDRAW This is the laundry list of 32-Bit QuickDraw features. They are listed in relative order of importance, but some may be more important to you, depending on whether you’ve thought about them before. Support for 32-bit-per-pixel graphics The pixel data has 8 bits each in red, green, and blue and an 8-bit alpha channel. Only 24 of the 32 bits per pixel are used by QuickDraw. 24 bits per pixel—over 16 million colors—gives you pretty much the maximum number of colors the eye can distinguish. When the display mode of the graphics system supports this much color, you don’t have to restrict the application or user to a particular set or palette. Support for 16-bit-per-pixel graphics (1 alpha-5-5-5) The pixel data has 5 bits each in red, green, and blue and a 1-bit alpha channel. 16 bits per pixel—or over 32,000 colors—is considered by many to be sufficient for high-quality graphics. Because 16 bits per pixel requires less memory than 32 bits per pixel, displays can use less expensive hardware. specialty), and his days on the soccer field. If you have any questions (about anything) feel free to t call him tat home. tHe’s tat t(408)767-1739.• At the time of this writing, 32-Bit QuickDraw was installable as a set of files that could be dragged into the latest system folder. 32-Bit QuickDraw will be integrated into Apple’s System 7.0. •
Reading notes: Fine print at the bottom is garbled and reads out of order, so the final paragraph is uncertain. Some characters in the running text appear damaged, e.g. the stray letters around 'call him tat home'.
- Printed product names
- 32-Bit QuickDraw · Color QuickDraw · System 7.0
- Printed dates
- January 1990
- Languages
- English
PDF page 8
6 ___________________________________________________________________________________ d e v e l o p January 1990 Dithering of 32- and 16-bit images to lower color resolutions—1, 2, 4, and 8 Color dithering is similar to creating a color that looks like orange by placing red and yellow pixels close together. If the display is limited to a certain number of colors, the Macintosh can take images rich in color information and produce a close match at lower color resolutions, giving the appearance of more color by combining the limited number of colors in an effective manner. Gray-level representation with luminosity In grayscale mode, QuickDraw will map a color to its nearest luminance value or lightness. This produces superior images, even with 16 gray levels. It’s hard to imagine how good this can be without seeing it, so we’ll show you just how great it is in these next two pictures: 32-Bit QuickDraw takes an additional 100K of RAM, so we recommend you use it with at least two MB of memory. 32-Bit QuickDraw also requires Color QuickDraw, which is present on the SE/30 or Macintosh II family computers. •
Reading notes: Source text is spaced out and hyphenated across line breaks, so word boundaries are uncertain in places. Headline is not clearly identifiable; the top line reads as a masthead rather than a primary heading. Reading order of the two example pictures referenced in the copy is unclear.
- Printed product names
- Macintosh · QuickDraw · 32-Bit QuickDraw · Color QuickDraw · SE/30 · Macintosh II
- Printed dates
- January 1990
- Languages
- English
PDF page 9
7 __________________________________________________________________________________ REALISTIC COLOR FOR REAL-WORLD APPLICATIONS January 1990 An improved Palette Manager The Palette Manager now allows application developers to have more control over their color environment by improving multiple monitors support, supporting a highlight color as one of four colors in 2-bit mode, setting up a true grayscale look-up table on monochrome devices, and restoring the color environment when an application quits. The new Palette Manager also directly supports color table animation of pixel images in a device-independent manner (see “All About the Palette Manager” in this issue for details).
Reading notes: Line-break hyphenation and reading order around 'All About the Palette Manager' sidebar reference are uncertain
- Printed product names
- Palette Manager
- Printed dates
- January 1990
- Languages
- English
PDF page 10
8 ___________________________________________________________________________________ d e v e l o p January 1990 New offscreen support These new routines can isolate developers from device dependencies by extending offscreen pixMap support. Developers typically use offscreen support to buffer drawing for fast, seamless updates to the screen. Offscreen imaging is also convenient for custom rendering algorithms that assume a particular frame buffer configuration—since requiring a particular video display mode is not a user-friendly solution Improved graphics performance in all bit modes 32-Bit QuickDraw provides performance improvements in region-clipped pattern fills and bit blits, such as updating the desktop pattern or resizing a window. Improved rescaling of images to smaller sizes When 32-bit-per-pixel images are resized to smaller sizes, pixels are combined using an averaging technique to yield recognizable thumbnail-sized images—an important improvement for the postage stamp market. New routine to get regions from bitmaps Getting a bitmap from a region is easy—just paint the region. The new routine BitmapToRgn provides the inverse transformation. Alpha channel movement 32-Bit QuickDraw supports routines that use up to 24 bits of color. The additional 8 bits of information are typically used by application developers as an alpha channel or transparency mask. QuickDraw now moves the extra 8 bits around without adding functionality. Note that alpha channel memory may not actually be present on the video card. The new Monitors cdev The new cdev improves the Monitors interface and adds advanced features. Now developers can easily modify the cdev through a standard programming interface. Support for color PostScript printing Apple’s new LaserWriter 6.0 driver now offers a standard mechanism for printing the high-quality color that 32- Bit QuickDraw provides. Color Picker changes Most of the changes to the Color Picker are related to the user interface. In the former version of the Color Picker, if the where parameter was set to (0, 0), then the dialog was centered on the main device. For obvious reasons, this method did not work well if the main device was not a color device. In the new Color Picker, if you want the dialog centered on the best device—that is, the device with the highest bit depth, regardless of color support—then you must pass (–1, –1) as the where parameter. Compression for file formats 32-bit and 16-bit data are normally compressed when they are in PICT files so that storage on disk takes significantly less space than the original data.
Reading notes: Headline 'd e v e l o p' is letter-spaced and may be a masthead rather than a true headline. Column text is interleaved in extraction; reading order of multi-column body may be uncertain.
- Printed product names
- LaserWriter 6.0 · 32-Bit QuickDraw · BitmapToRgn · Monitors cdev
- Printed dates
- January 1990
- Languages
- English
PDF page 11
9 __________________________________________________________________________________ REALISTIC COLOR FOR REAL-WORLD APPLICATIONS January 1990 Support for very large frame buffers Video cards that require more than 1 MB of memory, such as a 1280 x 1024 x 8-bit deep card, now work in a standard way with the system. Changes in rowbyte restrictions 32-Bit QuickDraw relaxes the restriction that rowbytes be less than $2000. However, the new limit of $3FFE may still be a problem with large pixel maps at 32 bits per pixel. Early releases of the 32-Bit QuickDraw documentation incorrectly reported that rowbytes had a limit of $8000 . Not to mention, as you always expected... 32-Bit QuickDraw has implications for several familiar aspects of working with the Macintosh. PICT, the Macintosh graphics resource and file format, has been extended to support 16-bit and 32-bit data. The transfer modes that allow QuickDraw to blend different bitmaps and combine their colors interactively in different ways have been extended so that they work at, and between, all bit depths. Because images of any depth can be displayed at any depth, you have ultimate flexibility to respond to the requirements of the task at hand. Colors are mapped to an appropriate match when increasing or decreasing color depth of the display. WHAT YOU CAN DO WITH IT To begin with, you can’t use 32-Bit QuickDraw features if you don’t know they’re installed. To check for 32-Bit QuickDraw, your application should ensure that Color QuickDraw is present on the machine by calling SysEnvirons . Then, since 32-Bit QuickDraw internally uses trap number $AB03, check to see if this trap is available by comparing its trap address with that of the standard unimplemented trap $A89F . If the two are the same, trap $AB03 is unavailable, and 32-Bit QuickDraw is not present. You can use the following MPW C code fragment to test for Color QuickDraw and 32-Bit QuickDraw. If either test fails, tell the user. #define QD32Trap 0xAB03 #define UnImplTrap 0xA89F #define False 0 #define True 1 PutUpInformativeMessage() { printf("\n 32-Bit QuickDraw is not implemented."); }
Reading notes: Code fragment labeled MPW C is partially shown and may be truncated at the end.
- Printed product names
- 32-Bit QuickDraw · Color QuickDraw · PICT · SysEnvirons · Macintosh
- Printed dates
- January 1990
- Languages
- English