Mac OS 8, Mac OS 9 and QuickTime¶
Mac OS 8¶
The Mac OS 8 Toolbox is declared too: the Appearance Manager
(<Appearance.h>), the Control Manager's embedding, keyboard focus and
control data calls with the Appearance control definitions
(<Controls.h>, <ControlDefinitions.h>), the Menu, Dialog and Window
Manager additions (menu command IDs, MenuEvent, StandardAlert,
AutoSizeDialog, window collapsing), the Collection Manager
(<Collections.h>) and the Contextual Menu Manager
(<ContextualMenu.h>).
- What Mac OS 8.0 and 8.1 ran on 68k Macs has its trap and selector,
read from the 68k glue in 8.1's AppearanceLib and 9.2.1's
CollectionsLib (
data/trapinfo-os8.json). The Contextual Menu Manager is trap 0xAA72 with selectors 1 to 4, as the Contextual Menu Extension installs it. - Mac OS 8.5 dropped 68k Macs, so its new calls (Appearance Manager 1.1,
Window Manager 2.0's
CreateNewWindow, window proxies and properties, the 32-bit control values, ...) are declared for PowerPC only. On 68k they are left out, so a call to one fails to compile. - The bevel button, image well, tab and disclosure triangle accessors
are inline calls to
GetControlDataandSetControlDataon 68k.
examples/appearance.c draws with the theme, builds a hierarchy of
Appearance controls and uses a Collection and menu command IDs. Built
fat, it runs on Mac OS 8.1 on both a 68k Mac (QEMU's q800) and a
Power Mac (SheepShaver). Appearance 1.0.1 in 8.1 has no auto-toggling
check boxes or radio buttons (kControlCheckBoxAutoToggleProc draws
an ordinary check box), so the example toggles its check box itself.
Mac OS 9¶
The calls new in Mac OS 8.5 to 9.2 are declared too: the HFS Plus API
(FSRef, Unicode names, forks, catalog iterators and bulk calls),
Icon Services, Folder Manager 9 (folder descriptors and routing), Power
Manager 2, Sound Manager 3.x (sound converters, output info), Display
Manager 2, anti-aliased text, the VM and resource-file additions, the
Thread Manager (<Threads.h>), Multiprocessing Services
(<Multiprocessing.h>), the Text Encoding and Unicode Converters
(<TextCommon.h>, <TextEncodingConverter.h>, <UnicodeConverter.h>),
URL Access (<URLAccess.h>) and the Keychain Manager (<Keychain.h>).
- Mac OS 9 still runs 68k applications in its emulator, and the
PowerPC glue in 9.2.1's InterfaceLib and its other libraries still
calls a 68k trap for many of these. Those calls have that trap and
selector on 68k (
data/trapinfo-os9.json;tools/retrap.pyattaches them to definitions that had none). The high-level HFS Plus calls (FSOpenFork,FSGetCatalogInfo, ...) are inline glue that fills in a parameter block and calls thePB...Synctrap, as 9.2.1's glue does. - The Thread Manager is trap 0xABF2 on 68k (System 7.5 and later, or the Thread Manager extension). Its callbacks are plain function pointers on PowerPC too, as in Apple's headers, not routine descriptors.
- Multiprocessing Services, the converters, URL Access and the Keychain live in PowerPC-only libraries, so they are declared for PowerPC only. On 68k a call to one fails to compile.
examples/macos9.c runs three cooperative threads, reads the System
Folder's Unicode name with FSFindFolder and FSGetCatalogInfo, plots
its icon with Icon Services and checks anti-aliased text on both CPUs,
and on PowerPC sums numbers in a preemptive MP task and converts Mac
Roman text to UTF-8 with the Text Encoding Converter. Built fat, it runs
on Mac OS 9.2.1 (QEMU's mac99) as PowerPC code, and its 68k build runs
there in the 68k emulator.
QuickTime¶
<Movies.h>, <ImageCompression.h>, <QuickTimeComponents.h>,
<MediaHandler.h>, <ImageCodec.h> and <MoviesFormat.h> declare the
QuickTime 1.5 API: the Movie Toolbox, the Image Compression Manager, the
movie controller, sequence grabber, standard compression, video
digitizer, media handler and codec component calls (677 calls), with
QuickTime's own 68k code (0xAAAA for the Movie Toolbox, 0xAAA3 for
the Image Compression Manager, _ComponentDispatch for components). On
PowerPC they import from QuickTimeLib. Thirteen 1992 names were renamed
or became macros before QuickTimeLib shipped (SetImageDescriptionExtension,
MCGetMovie, SCGetCompression, ...); those link on 68k only.
examples/quicktime.c lists the installed compressors, draws 30 frames
in a GWorld, compresses them with the Animation compressor into a new
movie file, opens the file again and plays it in a loop under the
standard movie controller. Its 68k build runs on System 7.1 with
QuickTime 1.5 (QEMU's q800), and built fat it runs as PowerPC code on
Mac OS 9.2.1 with QuickTime 5.
