Q:

What are the "Screen Holes" in Apple II graphics?

I've read the term screen holes many times in the context of Apple II graphics.
From what I understand, it has something to do with the interleaving storage of graphics (or was it text) and that some programmers use this space for other things.
However, I can't seem to find an explanation of what they really are, why they are used or how important they are (if at all).
Can someone explain what they are or at least point me to a good reference?
Thanks

A:

1. What are screen holes?
The Apple II video architecture is based around a text display of 40 columns by 24 rows. Woz had already built an ARPANET terminal for a TV, and said in his book iWoz that "Forty columns was the limit of American TVs".
To map those 40 column rows into memory sequentially would for various reasons have increased the chip count - something Woz strove to minimize. He could have mapped 40 columns to 64 bytes and wasted 24 bytes per row, but every byte was precious back then. As a compromise he mapped 3 rows to each 128 byte block, leaving 8 bytes unused in each of the 8 blocks - the screen holes.
This decision wasn't made in isolation. The larger design includes the video scanner which reads this memory (refreshing DRAM in the process) and passes it to the video generation circuit. The logic of the scanner imposes further order on the mapping: each of the three rows in one 128-byte block resides on a different third of the screen. Figure 5.4 from Sather's Understanding the Apple //e:

Sather's books have an excellent discussion on the how the bytes in memory map to the display for each video mode. Here are the address ranges for TEXT/LORES page 1 memory from Figure 5.5.
      TOP/         MIDDLE/      BOTTOM/      (SCREEN HOLES)
BASE  FIRST 40     SECOND 40    THIRD 40     UNUSED 8
ADDR  #  RANGE     #  RANGE     #  RANGE     RANGE
$400  00 $400-427  08 $428-44F  16 $450-477  $478-47F
$480  01 $480-4A7  09 $4A8-4CF  17 $4D0-4F7  $4F8-4FF
$500  02 $500-527  10 $528-54F  18 $550-577  $578-57F
$580  03 $580-5A7  11 $5A8-5CF  19 $5D0-5F7  $5F8-5FF
$600  04 $600-627  12 $628-64F  20 $650-677  $678-67F
$680  05 $680-6A7  13 $6A8-6CF  21 $6D0-6F7  $6F8-6FF
$700  06 $700-727  14 $728-74F  22 $750-777  $778-77F
$780  07 $780-7A7  15 $7A8-7CF  23 $7D0-7F7  $7F8-7FF

TEXT/LORES page 2 follows the same pattern - just add $400 to the addresses. In fact HIRES pages 1 and 2 also follow exactly the same pattern, but repeated 8 times each from $2000 and $4000.
In summary, screen holes are sections of video memory that are not displayed. Technically they exist in all video modes and in both Main and Auxilliary memory, but the term "screen holes" usually refers to those in Main TEXT page 1, which have special significance as discussed next.
2. What are screen holes used for?
Early Apple II's didn't always have 64k of RAM, and so low memory was special because it was always present. The 8 screen holes in TEXT page 1 must have seemed a natural fit for use by cards in the 8 expansion slots. The 1979 version of The Apple II Reference Manual has the following section reserving the screen hole locations for exclusive use by the system and expansion card firmware:

PERIPHERAL SLOT SCRATCHPAD RAM
Each of the eight peripheral slots has reserved for it 8 locations in
  ihe Apple's RAM memory. These 64 locations are actually in memory
  pages $04 through $07, inside the area reserved for the Text and
  Low-Resolution Graphics video display. The contents of these
  locations, however, are not displayed on the screen, and their
  contents are not changed by normal screen operations The peripheral
  cards can use these locations for temporary storage of data while the
  cards are in operation. These "scratchpad" locations have the
  following addresses:

Table 26: I/O Scratchpad RAM Addresses

Base  Slot Number
Addr  1     2     3     4     5     6     7
$0478 $0479 $047A $047B $047C $047D $047E $047F
$04F8 $04F9 $04FA $04FB $04FC $04FD $04FE $04FF
$0578 $0579 $057A $057B $057C $057D $057E $057F
$05F8 $05F9 $05FA $05FB $05FC $05FD $0SFE $05FF
$0678 $0679 $067A $067B $067C $067D $067E $067F
$06F8 $06F9 $06FA $06FB $06FC $06FD $06FE $06FF
$0778 $0779 $077A $077B $077C $077D $077E $077F
$07F8 $07F9 $07FA $07FB $07FC $07FD $07FE $07FF

Slot 0 does not have any scratchpad RAM addresses reserved for it. The
  Base Address locations are used by Apple DOS 3.2 and are also shared
  by all peripheral cards.

Both the Apple //c and the Apple IIgs firmware for built-in devices uses the screen holes. In addition the Apple //c uses several areas in Auxilliary memory including the Aux TEXT page 1 screen hole at $0478-$047F as documented in Table B-4 of The Apple IIc Technical Reference Manual.

A:

The book Inside the Apple //e by Gary B. Little provides excellent explanations for why "screenholes" exist in the Apple II memory map, and how they are used, by convention.
The memory for each page of the display is a 1024-byte block, but each character on the 40x24 text display uses 1-byte, for a total of 960 bytes. This leaves an unused 64 bytes in the display memory block. These unused (for display data) "screenholes" are dispersed across the 1024-byte block as 8 separate 8-byte holes. The base addresses for the 8 holes are $478, $4F8, $578, $5F8, $678, $6F8, $778, and $7F8.
By convention, each of these holes may be utilized as "scratch pad" RAM by each of the 7 peripheral cards. The convention is necessary so that other software does not stomp on these memory addresses. It is specifically set aside as peripheral "scratch pad" where each card gets 8 bytes, plus there is 8 bytes taken for DOS use. The addresses available to each card are based on which slot it occupies, and the 8 addresses assigned to the card are computed using, 's' as the slot number, thusly:  $478 + s, $4F8 + s, $578 + s, $5F8 + s, $678 + s, $6F8 + s, $778 + s, and $7F8 + s.

