Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

HyperCard Stack File Format

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

Full name HyperCard Stack File Format
Description

HyperCard Stack file is a legacy file format used with the HyperCard application software. HyperCard was developed by Bill Atkinson for use on Apple Macintosh and Apple IIGS computers and was first released by Apple in 1987. Atkinson created HyperCard as a tool that non-programmers could use to write their own computer applications, and he likened it to an erector set for software (available through the Internet Archive). In her 1988 user guide, HyperCard Power (available through the Internet Archive), Carol Kaehler explains how the program was used to store information in documents referred to as stacks. Each HyperCard stack consisted of related cards, which could contain text, images, interactive elements, and sound. Kaehler provides a few examples of applications that could be constructed using HyperCard stacks, such as “an appointment calendar with cards for the various days, weeks, or months; a photo collection; an atlas; or even a library card catalog.” Mathew Laser in Arstechnica described his experience in this way: "I opened the app and read the instructions. HyperCard allowed you to create stacks of cards, which were visual pages on a Macintosh screen. You could insert fields into these cards that showed text, tables, or even images. You could install "buttons" that linked individual cards within the stack to each other and that played various sounds as the user clicked them, mostly notably a "boing" clip ... You could also turn your own pictures into buttons. Not only that, but HyperCard included a scripting language called "Hyper Talk" that a non-programmer like myself could easily learn. It allowed developers to insert commands like "go to" or "play sound" or "dissolve" into the components of a HyperCard array." The structure of HyperCard was based conceptually on physical card-filing systems, like Rolodex, or a flat-file database that used hyperlinks as navigation. This interlinked nature of HyperCard objects is often credited as a principal inspiration of the World Wide Web. Steve Sande describes the popularity of the HyperCard application: "Why was HyperCard so incredible? It made it possible for just about anyone to create their own Mac programs... Apple really wanted everybody to be able to create their own programs, so everything about HyperCard was as non-threatening as possible." See Notes for more information about the history of the HyperCard application.

There is no definitive specification for HyperCard stacks from Apple although a variety of reverse engineered and ad hoc documentation exists, some compiled with Bill Atkinson's participation. See Documentation for more information. Structurally, each HyperCard Stack file is composed of a sequence of blocks. Each block is identified by a four-character type code and a unique 4-byte block ID number in the block header. Pierre Lorenzi details the block structure but notes that while “this description covers nearly all the data of a stack[,]... it is not complete enough to update stacks and create new ones.” Each block follows the same basic layout: Block size including size, type and ID; Block type; Block ID number; Block data.

  • Stack Block (STAK): contains the parameters of the stack
  • Master Block (MAST): contains an index of all the blocks present in the file (excluding Stack Block, Master Block, Free Blocks, and Tail Block).
  • List Block (LIST): contains the ordered list of the cards in the stack
  • Page Block (PAGE)
  • Card Block (CARD)
  • Background Block (BKGD)
  • Bitmap Block (BMAP)
  • Style Block (STBL)
  • Font Block (FTBL)
  • Print Setting Block (PRNT)
  • Page Set-Up Block (PRST)
  • Report Template Block (PRFT)
  • Free Block (FREE)
  • Tail Block (TAIL): marks the end of the file with the words Nu är det slut, a Swedish saying meaning this is the end taken from a 1970's children's television show called Five Ants Are More Than Four Elephants. In HyperCard 1.x it used to be "That's all folks...", the closing line of Looney Tunes cartoons.

There remains some discrepancy over what blocks are required in a HyperCard stack file and what order these blocks must follow although sources agree that the stack must begin with STAK, then MAST and end with TAIL. In the The Definitive Guide to the HyperCard Stack File Format for HyperCard 2.0 to 2.4.1, Rebecca Bettencourt states: “The STAK, MAST, LIST, and PAGE blocks must appear first, in that order. The TAIL block must appear last. All other blocks may appear in any order. The order of the blocks is insignificant.” Pierre Lorenzi’s format description also agrees that all stacks must begin with STAK and MAST and end with TAIL but then states that all other blocks (including LIST and PAGE) can appear in any order. Comments welcome. Bettencourt also states that the STAK, MAST, LIST, STBL, FTBL, PRNT, PRST, and TAIL blocks are all non-repeatable, whereas the PAGE, BKGD, CARD, BMAP, FREE, and PRFT blocks can be repeated multiple times.

Hypercard stack files have no file extension (such as .tif or .pdf for TIFF or PDF files respectively) because file extensions were not used to associate a file to a Mac application until Mac OS X (released in 2001). Instead the type of a Macintosh file was identified by the 4-character code, such as ICON for an icon or PICT for a picture stored in the standard Macintosh image format. Mac applications, including HyperCard, used a resource file comprising a resource fork and data fork to determine how to open the file and its contents, among other actions. Chad Conrady gives a nice explanation of this in his 2020 blog post An Archivist’s Perspective on Legacy Files.

Production phase Thanks to its flexibility and low barrier to learn and implement, HyperCard stack files were used at multiple production stages. According to Wikipedia, it was used "for prototyping applications and sometimes even for version 1.0 implementations. Inside Apple, the QuickTime team was one of HyperCard's biggest customers" (initial state), as a demo platform for computer games (middle state) and a final deliverable for early electronic non-internet based publications including the Whole Earth Catalog and A Hard Day's Night by the Beatles, both published on CD-ROM (final state).

Local use Explanation of format description terms

LC experience or existing holdings

HyperCard stack files appear in several legacy Library of Congress collections including the Nina V. Fedoroff Papers in the Manuscript Division (mss85579_042_021). The Fedoroff Papers include HyperCard files that detail corn genetics, dubbed “Hypermaize cards”. For more information, see An Archivist’s Perspective on Legacy Files by Chad Conrady on The Signal blog, November 16, 2020.

The American Memory archive was originally created in HyperCard on CD-ROM between 1990 and 1994 before its migration to the internet.

LC preference HyperCard stack is an obsolete format and is not included in the Recommended Formats Statement.

Sustainability factors Explanation of format description terms

Disclosure No official documentation. Proprietary format designed by Bill Atkinson for Apple.
    Documentation According to hypercard.org, the HyperCard file format specifications were never officially published. In fact, in Macintosh Technical Notes 1987 (available through the Internet Archive), Chris Knepper wrote that “[t]he file format of a HyperCard stack is proprietary and will not be documented.” However, several resources have technical information about HyperCard's structure and format including hypercard.org; Rebecca Bettencourt's Definitive Guide to the HyperCard Stack File Format, which gives special thanks to HyperCard creator, Bill Atkinson; and HyperCard File Format from Pierre Lorenzi.
Adoption

HyperCard is now a legacy format, but it was extremely popular for creating interactive “hypermedia” databases and applications in the late 1980s and 1990s.

In Danny Goodman’s book, HyperCard Developer’s Guide published in 1988 and available through the Internet Archive, four categories of HyperCard stacks are described: (1) Information Publishing; (2) Information Management; (3) External Device Control; and (4) Utility Stack (p.3 - 15).

HyperCard was used to create a wide variety of software products, such as scientific databases, educational resources, video games, and interactive magazines. Some examples of published applications built using HyperCard stacks:

Though discontinued by Apple in 2004, the emulation of HyperCard has attracted a significant following, and a number of open source and commercial HyperCard clones are available for download or purchase.

The Internet Archive includes a large collection of historic HyperCard stacks demonstrating its popularity across a wide range of applications over the years.

    Licensing and patents According to Technical Note PT15: HyperCard and You: Economy Edition (1987, retired): “The HyperCard file format is available for licensing on a case-by-case basis. Since HyperCard has moved to Claris, developers should contact Claris for more information if you feel that your product is a substantial and important addition to HyperCard and the Macintosh”. Comments welcome.
Transparency A text-based format that is very transparent, being both human-readable with text editing tools such as a Hex editor and easily machine-processable. According to hypercard.org, “[a]ll text is encoded in the MacRoman text encoding, and many flags and data types are from the QuickDraw headers (QuickDraw was also initially written by HyperCard creator Bill Atkinson), or based on them. All data is stored in Big-Endian format."
Self-documentation

HyperCard stack files follow a block structure with a limited amount of embedded structural metadata such as the number of tables, backgrounds and cards in the stack as well as a stored checksum value of stack block. There are no descriptive metadata options.

File format version information is stored at offset 0x10 from the beginning of the STAK block: 0 - not a HyperCard stack; 1-7 - pre-release HyperCard 1.x; 8 - HyperCard 1.x; 9 - pre-release HyperCard 2.x; 10 - HyperCard 2.x. Further into the Stack block starting offset 0x60, the version of the HyperCard program used to create, last edit or compact the stack is stored. Hypercard.org explains the formatting of the version number: “Version Format: xx yy zz rr, xx: major, yy: minor, zz: state (80 final, 60 beta, 40 alpha, 20 development), rr: non-release.” So for example, “01 22 80 00” would represent version 1.2.2 final, and “02 20 60 44” is version 2.2 beta release 44.Comments welcome.

External dependencies

HyperCard stack files are intended to be used only on HyperCard in Mac Classic Environment (versus Mac OS X), System 6, System 7, Mac OS 8, Mac OS 9, Apple IIGS: GS/OS 5 and 6. Outside of the original classic Mac environment, HyperCard requires an emulator, such as Mini vMac or Sheepshaver to run.

HyperCard stacks can also be uploaded to the site, HyperCard Online, which publishes the stacks to the Internet Archive’s HyperCard Stacks collection, where they become usable through emulation. HyperCard Online currently accepts raw HyperCard stacks, Stuffit-Expander compatible files, and Macintosh disk images.

Technical protection considerations According to Pierre Lorenzi, encryption is possible. "When a stack is Private Access, a part of the Stack Block is encrypted (from offset 0x18 to 0x4A). To decrypt it, you must ask the user for a password." The hash or fixity value of the password is stored at offset 0x44 and is zero if there is no password. "If a stack has a password hash different from zero, the password must (theoretically) be asked to the user. A stack can have a password without being Private Access, that is, without being encrypted. The password given by the user is hashed, and if the result hash not equal to the hash in the stack, the stack can't be opened."

Quality and functionality factors Explanation of format description terms

Dataset
Beyond normal functionality HyperCard is similar to database management software (DBMS) because they have similar functionalities. There were differences, however, in terms of the capacities. Danny Goodman describes some characteristics in The Complete HyperCard Handbook (1988 and available through the Internet Archive). While HyperCard, like other data management software, allows users to design input forms, insert information on screen, and perform sorting or searching functions, it further allows users to “have total control over the appearance of your forms” (p.10). Forms in HyperCard can be many things, like “a rolodex-type file card, a calendar page, a weekly appointment book” (p.10). HyperCard is also compared with relational databases, because “information stored in one stack of HyperCard forms can be retrieved by forms in other stacks” (p.10). HyperCard is different from other relational databases and in Goodman’s opinion it “takes quite a large additional step”, because it “lets you zip over to other stacks to view the full context of related information” (p.10). Another big distinction between HyperCard and DBMS is that HyperCard does not generate tabular reports and perform basic analysis like most DBMS (p.11)

File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Mac OS file type ASCII: STAK
Hex: 53 54 41 4B
At offset 0x04 in the STAK block header. From hypercard.org.
Indicator for profile, level, version, etc. See note.  File format version information is stored at offset 0x10 from the beginning of the STAK block: 0 - not a HyperCard stack; 1-7 - pre-release HyperCard 1.x; 8 - HyperCard 1.x; 9 - pre-release HyperCard 2.x; 10 - HyperCard 2.x..
Pronom PUID fmt/1490
See http://www.nationalarchives.gov.uk/PRONOM/fmt/1490
Wikidata Title ID Q27996244
See https://www.wikidata.org/wiki/Q27996244

Notes Explanation of format description terms

General

HyperCard application software contained a built-in programming language, HyperTalk, that beginner programmers could use to design their own hypermedia software applications, including interactive books and games. A HyperCard stack file is made interactive by using HyperTalk script.

The creator of HyperCard talked about the language ancestors of HyperTalk with Danny Goodman in the book, The Complete HyperCard Handbook (1988) “...I really tried to make it English-like...It also borrows some concepts from SmallTalk - the inheritance concepts. If you send a message to the card and the card doesn’t understand it. It falls through the background of it. If the background doesn’t understand it, it falls through to the stack, and if the stack doesn’t understand it, it falls through to HyperCard….. HyperTalk has some background in Pascal just because that’s what I speak a lot of. HyperCard itself is about 80 percent Pascal and 20 percent Assembly language” (p.xxix). The Object Hierarchy is mentioned in Goodman’s other book, HyperCard Developer’s Guide (published in 1988 and also available through the Internet Archive). Figure 13-1 on page 210 includes a helpful diagram of the HyperTalk Object Hierarchy with HyperTalk at the top.

In HyperCard, each element functions as an object. The HyperCard Script Language Guide defines a HyperCard object as “An element of the HyperCard environment that has a script associated with it and that can send and receive messages. There are five kinds of HyperCard objects: buttons, fields, cards, backgrounds, and stacks.”

The functionality of HyperCard stacks could be extended through the use of External Commands (XCMDs) and External Functions (XFCNs). These commands were used in the creation of special advanced features. The HyperTalk Scripting Guide explains that "XCMDs or XFCNs can be used for serial port Input and output routines, custom search-and-replace routines, color graphics display routines, file input and output routines, and so on. A typical use for an XCMD would be as an interface for a driver, allowing HyperCard to control an external device such as a videodisc player." In the HyperCard Developer’s Guide, Danny Goodman mentions that “the XCMD or XFCN is not written in HyperTalk. Instead, it is written in Pascal, C, or Assembler and, after being processed through a compiler or assembler, attached to a stack as a resource” (p.456). They can communicate with the HyperCard stack, and are similar to a small program with machine language. They enable HyperCard to perform more efficiently, compared to using HyperTalk for complex commands. Goodman mentions that “an XCMD that starts out as thousands of lines of Pascal or C statements can execute faster than 20 lines of HyperTalk code (depending, of course, on the nature of the XCMD and HyperTalk code)” (p.456). A HyperTalk script calls the XCMD to execute the commands and functions, after which it gives the control back to HyperCard software (Goodman, 1988, p,456).

History

The impacts of HyperCard and HyperTalk on modern applications and hypermedia is significant and lasting. Steve Sande notes that "it’s fascinating to consider that the creator of the World Wide Web, Tim Berners-Lee, and the person behind hypertext transfer protocol (HTTP), Robert Cailliau, were both influenced by HyperCard. The creator of JavaScript, Brendan Eich, found the HyperTalk scripting language to be his inspiration. Even the Wiki concept (i.e., Wikipedia) found its roots in a HyperCard stack created by Wiki inventor Ward Cunningham. Are you familiar with AppleScript, the automation scripting language on the Mac? It is also based on HyperTalk."

In the book, Bringing Design to Software, Terry Winograd reports that, after its release, HyperCard was included free with all Macintosh computer systems, and it quickly became a “widespread standard” for software design. The final release of HyperCard (version 2.4.1) was published in 1998, and Apple discontinued sales of the products in 2004. Interim releases include HyperCard 2.0 in 1990 and 3.0 in 1998.


Format specifications Explanation of format description terms


Useful references

URLs


Last Updated: 12/14/2021