% SPDX-FileCopyrightText: 2026 Jeffrey C. Ollie % SPDX-License-Identifier: MIT % % The README's reference list, in BibTeX. Regenerate the README from it with % `zig build references`; do not edit that section of the README by hand. @reference{2img-2mg-disk-image-format-ca1995-0, year = {ca. 1995}, title = {2IMG (2MG) disk image format}, url = {https://apple2.org.za/gswv/a2zine/Docs/DiskImage_2MG_Info.txt}, annotation = {Written by the Apple II community rather than by Apple, and the only image format in the family that says what it is: a sixty-four byte header giving the sector order, the write-protect tab, the DOS volume number and where in the file the disk starts. It is one page long and unambiguous, and the fields nobody had thought through are marked as such rather than reserved for a future that never arrived. `src/twomg.zig` is built against it.}, } @reference{apple-computer-inc-nd-b-1, author = {Apple Computer, Inc.}, year = {n.d.-b}, title = {Apple IIc programmer's guide to the 3.5 ROM}, edition = {Part No. 030-1196-A}, url = {https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Computers/Apple%20II/Apple%20IIc/Manuals/Apple%20IIc%20Programmer%27s%20Guide%20to%20the%203.5%20ROM.pdf}, annotation = {Apple's supplement for the 32K ROM IIc — the machine whose version byte reads `$00`, and the one that gained the UniDisk 3.5. Chapter 3 is the Protocol Converter, which "always begins at address $C500" and "to ProDOS and Pascal 1.3 ... appears to be a block device" (p. 20): every call it answers, with parameters and error codes. Appendix A is four fifths of the book and is Apple's own listing of that firmware with comments and labels intact, including the eighteen pages of `PC.PACKET` that `src/cbus.zig` is built from — the device raises REQ, the host answers with `/BSY`, and a packet of sync, command mark, ids, contents and checksum crosses at thirty-two cycles a byte with timing the listing itself calls critical. It prints no date; the part number is its only marking. Being a scan, and one whose hex columns are the worst case for OCR, every constant taken from it was checked against the bytes of the ROM at the address the listing gives.}, } @reference{apple-computer-inc-nd-c-2, author = {Apple Computer, Inc.}, year = {n.d.-c}, title = {Apple III SOS device driver writer's guide}, url = {https://www.apple3.org/Documents/Manuals/Apple%20III%20SOS%20Device%20Driver%20Writer's%20Guide.PDF}, annotation = {Appendix D's table of the I/O page and the environment as a driver sees them, which is where the remaining switches — the A/D converter, the smooth-scroll and character-download registers, the slot interrupt status bytes — have their addresses confirmed.}, } @reference{apple-computer-inc-nd-d-3, author = {Apple Computer, Inc.}, year = {n.d.-d}, title = {ProDOS 8 technical reference manual}, url = {https://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/os/prodos/Apple%20ProDOS%208%20Technical%20Reference%20Manual.pdf}, annotation = {Chapter 6 is what `src/clockcard.zig` and `src/blockdevice.zig` are built from: 6.1 is the clock and calendar routine a card supplies — its signature, its two entry points and the string it writes — and 6.3 is the disk driver protocol, down to the ROM code conventions of 6.3.1 and the `$CnFE` status byte that says how many volumes a card has and which of status, read and write it will do. The copy linked is an online transcription rather than a scan; it states no publication date of its own, and it carries a list of the printed manual's errata at the end.}, } @reference{apple-computer-company-nd-4, author = {Apple Computer Company.}, year = {n.d.}, title = {Apple-1 cassette interface}, url = {http://www.bitsavers.org/pdf/apple/apple_I/Apple-1_Cassette_Interface.pdf}, annotation = {The leaflet for the ACI, the one card Apple made for the Apple-1: the `R` to `C` jumper that puts it in the `$Cxxx` block, the program at `C100` and its `*` prompt and `ssss.eeeeR` form, the tape format as Apple described it — a 1 kHz cycle a one, a 2 kHz cycle a zero, a ten second header — and the schematic, which is the only description of the card's logic and is what the model of it in `src/memory8/apple1.zig` is read from: the chip-select decode, the output flip-flop and the comparator gated into the PROM's A0. Undated; the Internet Archive's copy is catalogued as 1977.}, } @reference{apple-computer-company-1976-5, author = {Apple Computer Company.}, year = {1976}, title = {Apple-1 operation manual}, url = {https://archive.org/download/Apple-1_Operation_Manual_1976_Apple/Apple-1_Operation_Manual_1976_Apple.pdf}, annotation = {Twelve pages, and the whole of what Apple wrote about its first machine: the specification sheet with its 1.023 MHz clock and 0.960 MHz effective rate, the hardware notes with the PIA's four addresses described bit by bit and the read-key and write-display routines, the "KBD/DSP Interface" drawing that gives the PIA's chip selects, the refresh stalls, and the Woz Monitor as a hex listing with Wozniak's comments — the primary source for that program, against which `wozmon.bin` was checked line by line. `src/memory8/apple1.zig` is built from it.}, } @reference{apple-computer-inc-1977-6, author = {Apple Computer, Inc.}, year = {1977}, title = {Apple II parallel printer interface card installation and operating manual}, url = {https://archive.org/details/Apple_II_Parallel_Printer_Interface_Card_Installation_and_Operating_Manual}, annotation = {Twenty-odd pages for a card that is a latch and eight wires, and the one sentence that matters is the whole of the hardware: data stored at `$C080 + $N0` appears on the printer's data lines and stays there until the next store. The rest is the firmware Woz fitted into 256 bytes — line widths, tabs, an escape character for talking to the card — and the two behaviours `src/parallel.zig` reproduces: the high bit comes off, and the card adds the line feed the Apple does not send.}, } @reference{apple-computer-inc-1978-7, author = {Apple Computer, Inc.}, year = {1978}, title = {Apple II reference manual}, edition = {Part No. 030-0004-00}, url = {https://apple2history.org/dl/Apple_II_Redbook.pdf}, annotation = {Universally the Redbook. The original machine rather than the IIe, which makes it the match for the Apple II+ ROM this was being developed against. Section D has the memory map, the `$C0xx` addresses and the schematics; section C has an annotated listing of the Monitor, which is what the debugger is stepping through when an Apple ROM is loaded, and a 6502 opcode table on page 100. Pages 133 and 134 have the rules for populating the three rows of RAM with 4K and 16K chips and the five standard sets of memory select blocks, which is where `--memory` on an Apple II gets its sizes. `src/memory8/apple2plus.zig` and `src/disk2.zig` cite it.}, } @reference{apple-computer-inc-1979-7a, author = {Apple Computer, Inc.}, year = {1979}, title = {Apple II reference manual}, edition = {A2L0001A (030-0004-01)}, url = {https://archive.org/download/Apple_II_Reference_Manual_1979_Apple/Apple_II_Reference_Manual_1979_Apple.pdf}, annotation = {The second Redbook, covering the Apple II Plus and the Autostart ROM. Its account of peripheral-card I/O is what the host console card's firmware is built on: how `PR#n` and `IN#n` point the output and input vectors CSW and KSW at a card's `$Cn00` page, and the rule a card uses to tell an output call from an input one -- "If both switches contain $Cn, then your subroutine should assume that it is being called for output" (p. 95). `src/console.zig` cites it.}, } @reference{apple-computer-inc-1980-8, author = {Apple Computer, Inc.}, year = {1980}, title = {Apple III boot ROM listing}, edition = {Rev. 1}, type = {Assembly listing; D. T. Craig, Apple III Computer Information Doc. 085}, url = {https://www.apple3.org/Documents/SourceCode/DTCA3DOC-085_apple_3_boot_rom_listing.pdf}, annotation = {The Sara ROM's own source: the disk core routines, the power-on diagnostics and the boot. It is what says the ROM waits for retrace on the E VIA's CB2 flag — `VWAIT BIT CB2INT ; WAIT FOR RETRACE` — and names the registers by Apple's equates, and reading it is how the Apple III model was brought up: each stall in the diagnostics was a line in here.}, } @reference{apple-computer-inc-1981a-9, author = {Apple Computer, Inc.}, year = {1981a}, title = {Apple III owner's guide}, url = {https://www.apple3.org/Documents/Manuals/Apple%20III%20Owner's%20Guide.PDF}, annotation = {What the machine tells its owner: `RETRY` and `DIAGNOSTIC` in the corner of the screen and what to do about them, the keyboard, the drive, and in appendix E the specifications — "2 MHz peak" for the clock — that the model's constants are taken from.}, } @reference{apple-computer-inc-1981b-10, author = {Apple Computer, Inc.}, year = {1981b}, title = {Apple III standard device drivers manual}, url = {https://www.apple3.org/Documents/Manuals/Apple%20III%20Standard%20Device%20Drivers%20Manual.PDF}, annotation = {The console as a program sees it: chapter 3 lists the video generator's four graphics modes — 280 dots "black and white dots only", 280 "in any of 16 possible colors, with limitations", 560 black and white, 140 in sixteen colours — which is what says two of the modes carry a colour signal and two do not, and the escape sequences and control codes the console driver answers.}, } @reference{apple-computer-inc-1982a-11, author = {Apple Computer, Inc.}, year = {1982a}, title = {Apple III SOS reference manual: Vol. 1. How SOS works}, url = {https://www.apple3.org/Documents/Manuals/Apple%20III%20SOS%20Reference%20Manual%20Volume%201%20-%20How%20SOS%20Works.PDF}, annotation = {Chapter 2 is the one place Apple wrote the memory system down for a programmer: the S-bank and the switchable bank, the bank register, zero page and stack relocation, and enhanced indirect addressing with its X-bytes and bank pairs — "the X-byte can range from $80 (banks 0 and 1) to $8m (bank m), where m is the number of the highest bank", and the singular $8F that pairs the S-bank with bank 0. The Apple III model's banking is built from that chapter and cites it by page.}, } @reference{apple-computer-inc-1982b-12, author = {Apple Computer, Inc.}, year = {1982b}, title = {Apple III SOS 1.3 source code listing}, edition = {P. R. Santa-Maria, Assembler, 2006}, url = {https://www.apple3.org/Documents/SourceCode/Apple3_SOS_1.3.pdf}, annotation = {SOS itself, assembled. Its equates are the register map — `Z.REG`, `E.REG`, `B.REG`, and every switch in the I/O page — and its loader is what settled how the machine's memory is sized: `SYSBANK` is the bank register as the boot block left it, and `MEMSIZE` follows from that. The disk boot was traced against this listing line by line.}, } @reference{apple-computer-inc-1982c-13, author = {Apple Computer, Inc.}, year = {1982c}, title = {Apple III level 2 service reference manual}, url = {https://archive.org/download/Apple_III_Service_Reference_Manual-OCR-1982/Apple_III_Service_Reference_Manual-OCR-1982.pdf}, annotation = {Apple's own account of the hardware, for the technicians who fixed it: the memory system and its address decode, the two VIAs line by line, the clocks, the video logic, the I/O slots and their timing, the keyboard and its code table, the Apple II emulation mode, the schematics. It is what settled the processor's speed — the screen takes the other phase of the clock while it draws, and the processor has the whole 2 MHz only while the screen is off — that the VIAs run on the 1 MHz clock, that `$c500` to `$c7ff` is RAM whatever the I/O switch says, that the bell at `$c040` is a 0.1 second 1 kHz tone, that the bank register's bit 6 is the Solid Apple key, and that the keyboard hands over uppercase codes with shift reported beside them.}, } @reference{apple-computer-inc-1983a-14, author = {Apple Computer, Inc.}, year = {1983a}, title = {Apple III console driver 1.31 source code listing}, edition = {D. T. Craig, Ed., 1998}, url = {https://www.apple3.org/Documents/SourceCode/apple3_SRC_Console_Driver.pdf}, annotation = {SOS's console driver, which is the program that loads the character set into the video generator: its `LOADCHR` is the layout of the download cells in the screen holes — which page holds the code and which the image, and where each row goes — and `TCOLOR` is the foreground-and-background byte the colour text mode reads from the other text page. The Apple III's character download is that routine read backwards.}, } @reference{apple-computer-inc-1983b-15, author = {Apple Computer, Inc.}, year = {1983b}, title = {Apple III ProFile hard disk driver 1.30 source code listing}, edition = {D. T. Craig, Ed., 1998}, url = {https://www.apple3.org/Documents/SourceCode/apple3_SRC_Profile_Driver.pdf}, annotation = {The whole of the ProFile as an Apple III sees it: the card's four addresses and what each bit of its BUSY register means, the control codes read at `$CN00` that work the addressable latch, the CMD/BSY handshake with its response bytes and `$55`/`$AA` answers, the six command bytes and four status bytes, and the pseudo-DMA — the driver's own comments on which bytes of the buffer page the false address of the exit branch touches are what gave away how the ROM's page of `SBC #1 / BEQ` moves a block. `src/profile.zig` is built from it and cites it by page.}, } @reference{apple-computer-inc-1984a-16, author = {Apple Computer, Inc.}, year = {1984a}, title = {Apple IIc technical reference manual}, url = {https://archive.org/download/Apple_IIc_Technical_Reference_Manual/Apple_IIc_Technical_Reference_Manual.pdf}, annotation = {Not the machine this emulates, but the one that documents the piece of it that a IIe does not have. Vertical blanking on a IIe is something a program polls at `$c019`; being able to route it to the interrupt line instead is a IIc feature, switched at `$c05a` and `$c05b`, and those are the addresses the IIe model uses for the enable it keeps switched off by default. The same manual covers the mouse card firmware, which is the other way that interrupt reached a IIe.}, } @reference{apple-computer-inc-1984b-17, author = {Apple Computer, Inc.}, year = {1984b}, chapter = {SmartPort}, title = {Apple IIc technical reference manual}, annotation = {The call numbers, the shape of each parameter list, the status codes and the error codes are all published in this chapter and in the technical note that followed it, and this card's SmartPort side follows them. What is *not* in a book, and came out of the IIgs's own ROM instead, is the layout of the device information block: at `$ff58fd` its 3.5-inch drive's constant part reads `08 "DISK 3.5 " 01 c0 00 10`, which settles the order of the fields, that `$01` is the type of an Apple 3.5-inch disk, and that the subtype's top two bits are the extended and removable flags. `src/blockdevice.zig` cites both.}, } @reference{apple-computer-inc-1984c-18, author = {Apple Computer, Inc.}, year = {1984c}, title = {ProFile level II service manual}, edition = {Part No. 072-0116, update 1}, url = {https://www.apple3.org/Documents/Manuals/Profile_Level_2_Manual.pdf}, annotation = {The drive's own manual, for fixing it: troubleshooting, the service procedures with the format and debugger programs, and appendices on the hard disk assembly, its format and its firmware, with the schematics. What the ProFile model takes from it is what the driver's source leaves implicit — that an Apple III's blocks are 512 bytes where a Lisa's are 532, that reading block `$ffffff` returns the drive's status, and the bit-by-bit meaning of the four status bytes.}, } @reference{apple-computer-inc-1985a-19, author = {Apple Computer, Inc.}, year = {1985a}, title = {Apple II Super Serial Card user's manual}, edition = {Part No. 030-1258-C}, url = {https://archive.org/details/super-serial-card-user-manual}, annotation = {The card the ACIA in `src/serial.zig` sits on. Most of it is for the person using the card rather than for a program — the two blocks of switches, the cable, and the command characters a terminal program sends to set the baud rate, the data format and the parity — but appendix C is the firmware, and it is the one that matters here: the Pascal 1.1 protocol, the bytes that identify the card as a serial device, and the entry points BASIC and Pascal call it through. The scan carries no text layer.}, } @reference{apple-computer-inc-1985b-20, author = {Apple Computer, Inc.}, year = {1985b}, title = {Apple IIe technical reference manual}, url = {https://archive.org/details/Apple_IIe_Technical_Reference_Manual}, annotation = {The machine this emulates, and chapters 2, 4 and 7 are what `src/memory8/apple2e.zig` is built from: chapter 4 is the memory map and the bank switching, chapter 2 the built-in I/O and the soft switches that drive it, and chapter 7 the MMU and IOU that implement both. `src/screen.zig` and `src/video.zig` cite chapter 2 as well, and it is where the sentence that settles the default monitor comes from: on an ordinary colour set "80-column text will be too blurry to read", which is why the eighty-column modes come up in monochrome. Appendix A is the one that bears on the processor: it sets out where the 65C02 departs from the 6502, including the JMP indirect page wrap that this emulator reproduces and a BIT immediate that behaves differently, which is one of the differences the split opcode tables account for. The plain scan carries no text layer, so search the [`_text.pdf`](https://archive.org/download/Apple_IIe_Technical_Reference_Manual/Apple_IIe_Technical_Reference_Manual_text.pdf) instead; there is also a [PDF at applelogic.org](http://applelogic.org/files/AIIEREF.pdf) and the [plain scan](https://archive.org/download/Apple_IIe_Technical_Reference_Manual/Apple_IIe_Technical_Reference_Manual.pdf) itself.}, } @reference{apple-computer-inc-1985c-21, author = {Apple Computer, Inc.}, year = {1985c}, chapter = {The disk interface}, title = {Inside Macintosh}, edition = {Vol. 3, pp. III-33–III-38}, publisher = {Addison-Wesley.}, url = {https://vintageapple.org/inside_o/pdf/Inside_Macintosh_Volume_III_1985.pdf}, annotation = {Chapter 2 of Volume III is the Macintosh described part by part, and its disk interface section is Apple's own statement of the same fifteen registers Parker's article describes: which combination of CA0, CA1, CA2 and SEL addresses each one, what each answers, and which four of them can be written by holding LSTRB high. It is a Macintosh book and the drive is the same Sony mechanism, which makes it the source behind that article — and it agrees with it on all fifteen, so `src/disk35.zig`'s table is checked against two independent statements of it rather than one. It is also where the tachometer's rate comes from: "the TACH line produces 60 pulses for each rotation of the drive motor", which this model had at fifty until the page was read. Two rules stated there are easy to miss and both matter: the IWM sits on the odd side of the data bus, so only odd-addressed byte accesses reach it, and Q6 must be turned back off before the Disk Driver next runs. This was cited as undated from a three-page extract until the whole volume was read; the volume carries Apple's 1985 copyright, and the section runs from III-33 to III-38 rather than the III-34 to III-36 the extract holds. The [extract](https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Chips/IWM/Documentation/InsideMac_DiskRegisterInformation.pdf) is still the quickest way to the register tables themselves.}, } @reference{apple-computer-inc-1985d-22, author = {Apple Computer, Inc.}, year = {1985d}, chapter = {The AppleTalk Manager}, title = {Inside Macintosh}, edition = {Vol. 2, pp. II-261–II-346}, publisher = {Addison-Wesley.}, url = {https://vintageapple.org/inside_o/pdf/Inside_Macintosh_Volume_II_1985.pdf}, annotation = {The network from the software's side: what a frame is to the link layer — a destination, a source, "an eight-bit quantity, contained in the frame's header, that identifies" the protocol above, and the data — and the layers above it. It describes the Manager rather than the wire, so the handshake and the timings `src/localtalk.zig` needs come from Zilog's application note instead; this is cited for the shape of the frame. The values of the four control types are in neither and are taken from the firmware.}, } @reference{apple-computer-inc-1985e-23, author = {Apple Computer, Inc.}, year = {1985e}, title = {Apple IIc technical reference manual}, publisher = {Addison-Wesley.}, url = {https://archive.org/download/a2ctrm/Apple2cTechRef01.pdf}, annotation = {Apple's own reference for the machine, and the one that covers not just the original IIc but the revision after it: a `UniDisk 3.5` flag down the margin marks every paragraph that applies only to the 32K-ROM machine. That is what makes it, and not the 1984 manual above, the source for what the later ROMs do. Appendix F is the family differences: F.2 says that where the original reserves `$C020` through `$C02F`, "the Apple IIc with 32K of ROM uses `$C028` to switch in or out the extra 16K of ROM", and F.10 restates it as toggling "between its two 16K banks of memory" — which is the whole of the bank switch `memory8/apple2e.zig` implements. Section 11.5.5 is the disk controller unit, "also known as the Integrated Woz Machine", which is why a IIc's disk port is an IWM here and not a Disk II card.}, } @reference{apple-computer-inc-1985–1990-24, author = {Apple Computer, Inc.}, year = {1985–1990}, title = {Apple II technical notes: Mouse}, edition = {Nos. 1–7}, publisher = {Developer Technical Support.}, url = {https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Digitizers/Apple%20Mouse%20Interface%20Card/Documentation/Apple%20II%20Mouse%20Technical%20Notes.pdf}, annotation = {Seven short notes about the AppleMouse II card, revised between 1985 and 1990, and `src/mouse.zig` takes the shape of the card from them and from the IIe technical reference. #5 is where the identification bytes come from: "the AppleMouse II card is identified by a value of $20 at $Cn0C ('X-Y Pointing device, type zero') and a value of $D6 at $CnFB", and it says that the `$CnFB` byte is not part of the Pascal 1.1 protocol, which is why `identifiers` looks for five bytes rather than four. #3 is the mode byte, and is careful about what turning the mouse off does and does not do; #1 is the interrupt environment a program has to keep around a mouse call; #4 is a firmware bug affecting ServeMouse.}, } @reference{apple-computer-inc-1986-25, author = {Apple Computer, Inc.}, year = {1986}, title = {Ensoniq DOC ERS}, edition = {Rev. 1.0}, type = {Engineering specification, marked confidential}, url = {https://www.brutaldeluxe.fr/documentation/cortland/v4_13_EnsoniqDOC.pdf}, annotation = {Apple's own specification for the 5503, eleven typed pages dated June 25, 1986, and the one document that gives the Oscillator Interrupt register exactly: bit 7 is the state of the IRQ line and reads zero when an interrupt is pending, bits 0 and 6 always read as ones, a read clears the request, and interrupts from more than one oscillator queue behind the register first in, first out. The interrupt register in `src/ensoniq.zig` is built from it. It also describes, under the control register's interrupt-enable bit, an "interrupt table" that remembers an oscillator finishing while its interrupt is disabled and delivers it if the bit is set later — "if the IE bit is a zero, then when the oscillator completes its cycle the oscillator status will be passed to the an interrupt table, but will not be passed to the OIR. However if the IE bit is changed to a one then the interrupt will be sent to the OIR". That is modelled: a bitmask rather than a queue, since a table has one place per oscillator and one that finished twice while nobody was listening has one thing to say.}, } @reference{apple-computer-inc-1987a-26, author = {Apple Computer, Inc.}, year = {1987a}, title = {Apple IIgs firmware reference}, publisher = {Addison-Wesley.}, url = {https://archive.org/details/Apple_IIgs_Firmware_Reference_HiRes}, annotation = {The book the hardware reference keeps pointing at, and the one that has what it does not: chapter 9 is the Apple Desktop Bus microcontroller and lists every command the host can send it, which is what the ADB registers here are built against. Chapters 6 and 7 are the disk port and the SmartPort, and pages 157 and 158 are the two pages that make an intelligent drive work on any machine and not just the one it was written for: the phase-line combinations that enable and reset the bus, how the host hands out unit numbers, and how the last drive on the chain says that it is the last. Figure 6-1 on page 110 gives the order the drives go in. Appendix E is a soft switch list, and appendix H is the clearest statement anywhere of what shadowing is for. Beware which copy: the one commonly linked from the Cortland archive is the 1986 beta draft with chapters 2, 3, 5, 8 and 9 missing — including the one chapter that matters here — and a 1987 scan may have no text layer at all. The HiRes scan at the Internet Archive is complete and searchable, and its [text](https://archive.org/download/Apple_IIgs_Firmware_Reference_HiRes/Apple_IIgs_Firmware_Reference_HiRes_djvu.txt) is the copy to grep.}, } @reference{apple-computer-inc-1987b-27, author = {Apple Computer, Inc.}, year = {1987b}, title = {Apple IIc memory expansion card reference manual}, edition = {Part No. A2G0047}, url = {https://archive.org/download/apple-2c-memory-expansion-card-reference-manual/Apple2cMemoryExpansionCardReferenceManual.pdf}, annotation = {Forty pages on the card that goes in the connector inside a IIc, and the only place that says plainly what the four registers at `$c0c0` are: a twenty-bit address counter in three bytes, low first, and a data register that steps the counter every time it is touched (p. 7). That last sentence is what makes the card work at all, and what the RamFactor's manual says of its own card in almost the same words — the two are the same idea, one in a slot with its firmware aboard and one soldered to the machine with its driver in ROM.}, } @reference{apple-computer-inc-1987–1990-28, author = {Apple Computer, Inc.}, year = {1987–1990}, title = {Apple IIgs technical notes}, edition = {Nos. 11–25}, publisher = {Developer Technical Support.}, url = {https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Computers/Apple%20II/Apple%20IIGS/Documentation/Apple%20IIGS%20Technical%20Notes%2011-25.pdf}, annotation = {Short notes issued between editions of the two references above, and three of these fifteen bear directly on the sound chip. #11, "Ensoniq DOC Swap-Mode Anomaly", records that the output falls to the zero-crossing level for no longer than one sample period "whenever a swap occurs from a higher-numbered oscillator to a lower-numbered one", and not the other way about — which `src/ensoniq.zig` reproduces without being told to, by scanning its oscillators in the order the chip scans them. #23, "Toolbox Use of DOC RAM", explains that the Note Synthesizer runs a free-running oscillator over the first page of the sound RAM at zero volume purely as a clock, which is what settles that an oscillator interrupts at the end of its wavetable rather than when it halts. And #19, "Multichannel Output with the Apple IIgs Note Synthesizer", says what the top four bits of an Oscillator Control register are for: a stereo card decodes three of them, even channels to the right and odd to the left. The other twelve are toolbox and firmware matters, of which #25 is a correction list for the firmware reference above and #13 a bug in ROM 1.0's modem firmware.}, } @reference{apple-computer-inc-1988-29, author = {Apple Computer, Inc.}, year = {1988}, title = {SWIM chip user's reference}, url = {https://bitsavers.org/pdf/apple/disk/sony/SWIM_Chip_Users_Ref_198801.pdf}, annotation = {The chip that replaced the IWM, and the only Apple document that sets out the 3.5-inch track format: the five speed zones and their sector counts, the address and data fields byte by byte, and the three-checksum nibblising algorithm — which it prints twice, for writing and for reading, in two forms that do not agree. `src/disk35.zig` cites it, and follows the reading one.}, } @reference{apple-computer-inc-1989b-30, author = {Apple Computer, Inc.}, year = {1989b}, title = {Apple IIc technical reference manual}, edition = {2nd ed.}, publisher = {Addison-Wesley.}, url = {https://archive.org/download/AppleIIcTechnicalReference2ndEd/Apple%20IIc%20Technical%20Reference%202nd%20ed.pdf}, annotation = {The revised edition, and the only one that describes every IIc Apple shipped: the first edition (1985e) stops at the UniDisk 3.5 machine and knows nothing of the memory expansion card or the IIc Plus. Chapter 11 is the hardware, and it is the source for the one chip a IIc Plus has that no other IIc does — the multidrive interface glue, "two ICs: a custom integrated circuit (the Mc7 chip) and a 2 KB static RAM" (p. 327), whose pins Table 11-15 names and whose RAM Table 11-24 addresses with A0 to A4 from the system and RAMA5 to RAMA10 from the chip itself. `src/mig.zig` is built on those two tables; what they do not say — which address works which latch, and how the buffer's page moves — is read out of the ROM 5 firmware instead, and says so where it is.}, } @reference{apple-computer-inc-1989a-31, author = {Apple Computer, Inc.}, year = {1989a}, title = {Apple IIgs hardware reference: For Apple IIgs and 1 MB Apple IIgs}, edition = {2nd ed.}, publisher = {Addison-Wesley.}, url = {https://archive.org/details/Apple_IIgs_Hardware_Reference_HiRes}, annotation = {The machine the 16-bit core goes into, and the reference for everything built around it: the Mega II that is a IIe on one chip and gives the slow side its 1 MHz, the shadowing of banks `$00` and `$01` into `$e0` and `$e1`, the VGC and its Super Hi-Res modes with a palette per scanline, the Ensoniq 5503 with its thirty-two oscillators, and ADB as a microcontroller rather than a port. `src/memory16/apple2gs.zig` is built against it throughout, and chapter 2 in particular: the bank latch, the two clock domains and the whole of shadowing come from it. Chapters 2 and 3 say the same things from opposite ends — chapter 2 from the chips outward and chapter 3 from the address map inward — and the pair is often what settles a question neither one does alone. Read the [`_djvu.txt`](https://archive.org/stream/Apple_IIgs_Hardware_Reference_HiRes/Apple_IIgs_Hardware_Reference_HiRes_djvu.txt): the tables survive OCR well enough to be trusted, and it is searchable in a way the [PDF](https://archive.org/download/Apple_IIgs_Hardware_Reference_HiRes/Apple_IIgs_Hardware_Reference_HiRes.pdf) is not.}, } @reference{apple-computer-inc-1990-32, author = {Apple Computer, Inc.}, year = {1990}, title = {Guide to the Macintosh family hardware}, edition = {2nd ed.}, publisher = {Addison-Wesley.}, url = {https://vintageapple.org/inside_o/pdf/Guide_to_Macintosh_Family_Hardware_2nd_Edition_1990.pdf}, annotation = {The successor to *Inside Macintosh*'s hardware chapter, and the source that settled how a 3.5-inch drive picks a head. Chapter 9 draws the floppy interface of every machine in the family as a circuit, and in each of those drawings the disk chip's own `HDSEL` output is marked *n.c.* while the line that reaches the drive comes from a VIA pin instead (Figures 9-10 and 9-13, pp. 351 and 354). That is what says SEL is a plain latched output of the host, held across a whole side's worth of writing, rather than something the drive latches when a register is read — which is what `src/disk35.zig` had and what left half of every formatted disk blank. The book covers the Macintosh Plus through the IIfx, so it is also the last word on the SWIM where the SWIM chip's own reference is thin.}, } @reference{applewin-nd-33, author = {AppleWin.}, year = {n.d.}, title = {AppleWin}, type = {Computer software}, publisher = {GitHub.}, url = {https://github.com/AppleWin/AppleWin}, annotation = {Consulted rather than cited: its WOZ read path is where the rule that a held byte is not taken away while the shifter is empty was confirmed, after Sather's chapter established that the hold exists and how long it is. Reading a second implementation is the cheapest way to find out whether a rule derived from prose is the rule the hardware actually follows. It is also the reference for the 8-bit machines when it comes to what one *ought* to have: its cards, its save states — which are what suggested zig65's — and its symbolic debugger are the measure other emulators are surveyed against in the bibliography below. It is also the fullest written description of the **Phasor**'s native-mode register interface, which no manual gives: `Mockingboard.cpp` is where `src/phasor.zig` takes the mode encoding (Mockingboard, Phasor and Echo+ latched off the card's device selects), the chip-select bits on each 6522's port B, and the read-as-OR-sum of two chips selected at once.}, } @reference{applied-engineering-nd-a-34, author = {Applied Engineering.}, year = {n.d.-a}, title = {Phasor}, type = {Sales brochure}, url = {https://ae.applearchives.com/all_apple_iis/phasor/phasor_brochure.pdf}, annotation = {Applied Engineering's sales literature for the Phasor, and the one place the parts on the card are named: a 400 dpi photograph of an assembled board on which every major chip is legible. It settles what the register lists only imply — the four sound generators are GI `AY-3-8913`s in a two-by-two block, the two 6522s are Rockwell `R6522`s, the speech chip is an `SSI 263AP`, and the second speech socket beside it is empty — and dates the card by its silkscreen, “© 1985 APPLIED ENGIN.” The rest is marketing copy. It is what tells `src/phasor.zig` how many of each chip the card carries.}, } @reference{applied-engineering-nd-b-35, author = {Applied Engineering.}, year = {n.d.-b}, title = {Phasor user's manual}, edition = {Version 1.1}, url = {https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Audio/AE%20Phasor/Manuals/AE%20Phasor%20-%20User%27s%20Manual%20v1.1.pdf}, archiveurl = {https://web.archive.org/web/20260910054116/https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Audio/AE%20Phasor/Manuals/AE%20Phasor%20-%20User%27s%20Manual%20v1.1.pdf}, annotation = {The manual for the card, and the source for its modes: the option-switch table on printed page 4 gives the three the card has — Phasor (the software-selectable default), Echo+ and Mockingboard — and which switch settings choose them, which is what `src/phasor.zig`'s power-on mode and Mockingboard compatibility are built to match. Most of the manual is about the bundled COMPOSE, Sound Builder and text-to-speech software rather than the register interface, which it does not give; that comes from AppleWin below. It states no date and is a 2002 re-setting of the printed book; the card was sold from about 1986.}, } @reference{applied-engineering-nd-c-36, author = {Applied Engineering.}, year = {n.d.-c}, title = {RamFactor user's manual}, edition = {Version 1.5}, url = {https://garrettsworkshop.com/files/GR8RAM/ae_ramfactor_manual.pdf}, annotation = {What `src/ramfactor.zig` is built from, and the reason this project models Applied Engineering's memory expansion card rather than Apple's own: chapter 6 is written for programmers and has the hardware in it. "RamFactor Hardware" is two pages and settles almost everything — the five registers and where the slot puts them, that the three address bytes can be read as well as written, that the top nybble of the high one reads back as `$F` on a card of a megabyte or less, that touching the data register steps the address, and that the step is a ripple carry that a *write* trips as readily as a count does. The sections around it are what the card looks like from outside: the identification bytes at `$Cs00-$Cs07`, `$CsFA` and `$CsFB`, the screen holes the firmware leaves the card and partition sizes in, the layout of the partition table in the card's own first two hundred and fifty-six bytes, and the SmartPort — which it calls the Protocol Converter, that being what Apple called it first. The manual carries no date; the firmware says 1986. It does not say which bit of the bank select register is the bank, and the firmware does: see [A megabyte in a slot](#a-megabyte-in-a-slot).}, } @reference{applied-engineering-nd-d-37, author = {Applied Engineering.}, year = {n.d.-d}, title = {RamWorks III and RamWorks basic}, edition = {Version 1.41}, url = {https://archive.org/download/AE_RAMWorks_III_Basic_v1.41_Manual/AE_RAMWorks_III__Basic_v1.41_Manual.pdf}, annotation = {What the IIe's RamWorks model in `src/memory8/apple2e.zig` is built from. Chapter 7, "For Programmers Only...", is the whole of it: the bank select register at `$C073`, write-only, into which a program writes one of forty-eight 64K bank numbers; that the IIe's own soft switches then work as they always did; and the three facts a faithful model turns on — that the video is always drawn from bank 0 whichever bank is selected ("Only Bank 0 contains the video information ... this feature, unique to RamWorks, eliminates a screen flicker problem"), which is why `videoByte` does not bank; that the register is zero on power-up but a reset does not clear it, since the card cannot see the RESET line; and that writing it also fires the paddle strobe and it cannot be read back. The manual carries no date; RamWorks III was sold from about 1986. It is a re-setting in AppleWorks rather than a scan, so its `$C073` was confirmed against the page image before it reached the code.}, } @reference{arnold-t-2010-38, author = {Arnold, T.}, year = {2010}, title = {Mockingboard clone schematic}, edition = {Version 1.0}, type = {Schematic}, publisher = {ReActiveMicro.}, url = {https://wiki.reactivemicro.com/images/4/4a/Mockingboard_Schematic_Arnold.pdf}, annotation = {Where `src/mockingboard.zig` takes the speech chip's wiring from, which the SSI 263A data sheet cannot give: the chip is memory-mapped on the slot at `$Cn40` (its register-select the low address bits, its chip select A6), not driven through a 6522's ports like the sound chips, and its A/R line runs to the first 6522's CA1. A reproduction of Sweet Micro's card rather than the original drawing, so it is trusted for the wiring it shows and cross-checked against the chip data sheet.}, } @reference{bethke-b-borowicz-j-1985-39, author = {Bethke, B., & Borowicz, J.}, year = {1985}, title = {Passport MIDI interface user's manual}, edition = {1st ed.}, publisher = {Passport Designs. ([archived](https://web.archive.org/web/20240627012742/https://www.apple.asimov.net/documentation/hardware/misc/passport_midi.pdf))}, annotation = {What `src/mc6840.zig`, `src/mc6850.zig` and the Passport card in `src/slots.zig` are built from. §4.1 gives the card's sixteen device-select addresses — the 6840 at `$C0n0`–`$C0n7`, the 6850 at `$C0n8`/`$C0n9`, the drum-sync line at the last two — and §4.3 the initialisation codes. §4.4 reprints the 6840's register map and control-register bits (its Tables #1 through #4), including the two addresses CR1 and CR3 share and the way an interrupt flag is cleared only by reading the status register and then the timer; §4.5 does the same for the 6850. The card's external clock frequency it does not give, so the timers are modeled on the machine's own φ2 clock, which is what the ENABLE pin carries on the Apple bus.}, } @reference{carr-j-j-1984-40, author = {Carr, J. J.}, year = {1984}, title = {6502 user's manual}, publisher = {Reston Publishing.}, url = {https://archive.org/details/6502um}, annotation = {The source of the `(Carr, 1984, p. N)` citations, which all point into chapter 16, its instruction-by-instruction reference on pages 245 to 277. Note that chapter has no entry for TAY, and the comment on that instruction says so rather than pointing at a page that does not discuss it. The [PDF](https://archive.org/download/6502um/6502UsersManual.pdf) is the copy to search.}, } @reference{cirrus-logic-inc-2004-41, author = {Cirrus Logic, Inc.}, year = {2004}, title = {CS8900A Crystal LAN Ethernet controller}, edition = {No. DS271F3}, type = {Data sheet}, url = {https://datasheet.octopart.com/CS8900A-CQ3Z-Cirrus-Logic-datasheet-11602.pdf}, annotation = {The Ethernet chip on the original Uthernet, and what `src/cs8900.zig` is built from. Section 4 is the PacketPage architecture — the four-kilobyte internal space the registers and frame buffers live in, reached through a pointer and a data port — and §4.2 its map: the product code at `0x0000` that reads `0x630E` and says the chip is a CS8900A, the configuration and control registers at `0x0100` (RxCTL, LineCTL and the rest), the Individual Address at `0x0158`, and the receive and transmit frame windows at `0x0400` and `0x0A00`. Section 4.10 is the I/O-mode ports the Uthernet wires to a slot's device selects, and §5 the order a driver transmits and receives in. Unlike the W5100 it has no TCP/IP stack, which is why the host end is a length of virtual wire rather than a set of sockets.}, } @reference{dormann-k-2020-42, author = {Dormann, K.}, year = {2020}, title = {6502_65C02_functional_tests}, type = {Computer software}, publisher = {GitHub.}, url = {https://github.com/Klaus2m5/6502_65C02_functional_tests}, annotation = {Four test programs that exercise the processor from the inside and then stop — at a known address if everything agreed, at the point of disagreement otherwise. Two cover every documented opcode and addressing mode of the 6502 and the 65C02; one is Bruce Clark's decimal mode test, carried here with configuration options added; and one checks IRQ, NMI and BRK through a feedback register the host has to provide. Where the SingleStepTests corpus checks one instruction at a time, these check what happens between them, and all four pass: see [What the corpus cannot see](#what-the-corpus-cannot-see). The `.lst` listings are what the success addresses are read out of and are the place to look when a run settles somewhere else — note that the interrupt test's is `$06F5`, the `jmp *` of the success macro, and not the `jmp start` three bytes past it, which sits under the same banner and cannot be reached. Pinned to commit `7954e2d`.}, } @reference{fort-m-pratt-p-c-mitchelmore-r-2012-43, author = {Fort, M., Pratt, P. C., & Mitchelmore, R.}, year = {2012}, title = {LTOVRUDP.h}, type = {Source code}, publisher = {In *Mini vMac*. GitHub.}, url = {https://github.com/minivmac/minivmac/blob/master/src/LTOVRUDP.h}, annotation = {Where LocalTalk over UDP comes from: Mini vMac's own transport for it, and the statement of the convention every other implementation follows. A UDP socket bound to any address with the address reusable, joined to the multicast group 239.192.76.84 on port 1954; four bytes of sender in front of every frame, so that a node can tell its own frames from everyone else's when the group hands them back; and the reason it cannot just look at the node number, which the file spells out — during address acquisition another node legitimately sends from what this one thinks is its own. `src/ltoudp.zig` opens its socket the same way.}, } @reference{general-instrument-nd-44, author = {General Instrument.}, year = {n.d.}, title = {AY-3-8910/AY-3-8912/AY-3-8913 programmable sound generator}, edition = {pp. 5-18–5-23}, url = {https://map.grauw.nl/resources/sound/generalinstrument_ay-3-8910.pdf}, annotation = {The chip that makes the noise on a Mockingboard, as six pages out of a General Instrument data book, and the arithmetic `src/ay3.zig` is built on is stated there in a sentence: a tone generator works "by first counting down the input clock by 16, then by further counting down the result by the programmed 12-bit Tone Period value". The noise generator does the same with a five-bit period and the envelope counts the clock down by 256 instead, which is why the periods in a tune are the numbers they are. Registers R0 to R15 are set out here too, down to the four bits of R15 — hold, alternate, attack and continue — that pick the envelope shape. This copy has no date and no text layer; the one at alldatasheet.com is the same pages behind a challenge page.}, } @reference{hayes-microcomputer-products-1981, author = {Hayes Microcomputer Products, Inc.}, year = {1981}, title = {Hayes Stack Smartmodem owner's manual}, edition = {3rd ed.}, url = {https://sysovl.info/pages/blobs/hayes/sm300.pdf}, annotation = {The AT command set `src/modem.zig` answers, from the original 300 bit/s Smartmodem — the modem that defined the set every terminal program of the era went on to speak. It is the checkable statement of the commands, the result codes and the S-registers: `ATE`/`Q`/`V` for echo, quiet and verbose codes, `ATD` to dial, `ATH` to hang up, `ATO` to go back online, `ATZ` to reset, and the carriage-return, line-feed, escape and answer registers S3, S4, S2 and S0. What the modem does that this manual does not describe is dial its number over the host's TCP rather than a phone line — no modem did that — which is zig65's own. Filed in the manuals archive.}, } @reference{heatherington-d-a-1985, author = {Heatherington, D. A.}, year = {1985}, title = {Modem with improved escape sequence mechanism to prevent escape in response to random occurrence of escape character in transmitted data}, type = {U.S. Patent No. 4,549,302}, url = {https://patents.google.com/patent/US4549302A/en}, annotation = {The `+++` escape and its guard time, patented for Hayes: three escape characters, each with a second of silence before and after, so that the sequence occurring by chance in transmitted data does not drop the caller back to command mode. `src/modem.zig`'s escape follows it — the count and the trailing guard exactly, the leading guard relaxed the way terminal programs and other emulators relax it. Filed in the manuals archive.}, } @reference{lampmerchant-2021-45, author = {lampmerchant.}, year = {2021}, title = {ltoudp.py}, type = {Source code}, publisher = {In *TashTalk*. GitHub.}, url = {https://github.com/lampmerchant/tashtalk/blob/main/tashtalkd/daemon/protocol/ltoudp.py}, annotation = {The daemon that puts a real LocalTalk cable on the same multicast group, and so the clearest statement of what crosses and what does not: a frame goes out as the sender's tag and the frame without its last two bytes, which are the check sequence, and the daemon does "not retransmit RTS/CTS frame[s]", nor an enquiry for a node it is already answering for. The bridge in `src/localtalk.zig` keeps the handshake off the network for the same reason and answers the machine's requests to send itself.}, } @reference{national-semiconductor-1995-46, author = {National Semiconductor.}, year = {1995}, title = {MM58167B microprocessor real time clock}, type = {Data sheet}, url = {https://archive.org/download/MM58167/MM58167.pdf}, annotation = {The Apple III's clock chip. Table III is the register map, Table I the BCD digits of each counter and which bits of them are unused, Figure 1 the interrupt register's bits, and the text the resets, the GO command and the rollover status bit that SOS reads after every counter to know whether the chip was rippling while it looked. `src/mm58167.zig` is built from it and cites it by page.}, } @reference{mame-development-team-nd-47, author = {MAME Development Team}, year = {n.d.}, title = {apple3.cpp*, *apple3_m.cpp*, *apple3_v.cpp}, type = {Source code}, publisher = {In *MAME*. GitHub.}, annotation = {Where the manuals stop, the schematic starts, and MAME's Apple III driver is the reading of it that has been checked against the machine's software for twenty years. What was taken from it, and is marked as its in the code: which VIA each line is wired to — the blanking on the E VIA's CB1 and CB2, the keyboard on its CA2, the interrupt status on its PA7 — what the VIAs read at reset, the rule for which zero-page reads latch an X-byte (`Z ^ $0C00`) and where the stack goes (`Z ^ 1`), the meaning of the four video mode bits, and that the sixteen addresses under the VIAs are RAM when the VIAs are hidden. Where MAME and the manuals differ — the bank a number above the highest fitted selects — the manuals and the boot block won.}, } @reference{charlesworth-t-2026-48, author = {Charlesworth, T.}, year = {2026}, title = {mb-audit}, type = {Computer software}, publisher = {GitHub.}, url = {https://github.com/tomcw/mb-audit}, annotation = {A program that audits a Mockingboard from inside the machine: it finds what is in each slot and then works through the 6522s, the AY-3-8913s, the SC-01 and the SSI263s, stopping at the first failure and naming the component, the test and the sub-test. Deliberately deeper than an emulator needs, and run against real cards as well as emulated ones, which makes it the better authority where it and a datasheet disagree — see [Auditing the Mockingboard](#auditing-the-mockingboard) for the three 6522 faults it found here. Assembled with ACME.}, } @reference{ollie-j-c-2026a-49, author = {Ollie, J. C.}, year = {2026a}, title = {aigrette65}, type = {Computer software}, url = {https://git.jcollie.dev/jeff/aigrette65}, annotation = {An assembler for the 6502 and 65SC02 in the dialect of Frank Kingswood's `as65`, reimplemented from the outside with the original as an oracle. It is what assembles the two of Dormann's tests that ship as source only, whose author will not switch away from `as65`: see [Assembling the two Dormann does not ship](#assembling-the-two-dormann-does-not-ship).}, } @reference{ollie-j-c-2026b-50, author = {Ollie, J. C.}, year = {2026b}, title = {macaddress}, type = {Computer software}, url = {https://git.jcollie.dev/jeff/zig-macaddress}, annotation = {The user's own MAC-address parser, which `src/ethernet.zig` uses to read the `--mac` a fitted Ethernet card is given, in any of the notations a MAC is written in.}, } @reference{ollie-j-c-2026c-51, author = {Ollie, J. C.}, year = {2026c}, title = {z46}, type = {Computer software}, url = {https://git.jcollie.dev/jeff/z46}, annotation = {The user's own IPv4 and IPv6 parser, which `src/ethernet.zig` uses to read the interface address `--ethernet-interface` and `--localtalk-interface` name, in place of a hand-rolled dotted-quad reader.}, } @reference{ollie-j-c-2026d-51a, author = {Ollie, J. C.}, year = {2026d}, title = {imagewriter2}, type = {Computer software}, url = {https://git.jcollie.dev/jeff/imagewriter2}, annotation = {The user's own emulator of the Apple ImageWriter II dot-matrix printer: a byte stream in, rendered pages out, keeping the printer's own state, geometry and ROM fonts rather than filtering text into a picture. It is a `std.Io.Writer`, so `--imagewriter` hands it to the Super Serial Card as the sink the card's output drains into; `src/main.zig` sets it up in the front end, and the library's cards, which take a writer and do not know a printer is on the other end, are untouched.}, } @reference{black-a-ki3v-2026-52, author = {Black, A., & KI3V.}, year = {2026}, title = {appleII_deadtest}, edition = {Version 1.0.2}, type = {Computer software}, publisher = {GitHub.}, url = {https://github.com/misterblack1/appleII_deadtest}, annotation = {A diagnostic ROM that replaces the F8 ROM and runs a March-U memory test out of its own two kilobytes, using no RAM at all — not the zero page and not the stack — so that it can report on a machine whose first bank of memory is bad. It is what settled what an Apple II reads at an address with no RAM behind it, and two whole-machine tests here run it across all nine memory configurations: see [Testing the memory with no memory](#testing-the-memory-with-no-memory).}, } @reference{hunter-z-2025-53, author = {Hunter, Z.}, year = {2025}, title = {a2audit}, type = {Computer software}, publisher = {GitHub.}, url = {https://github.com/zellyn/a2audit}, annotation = {A bootable disk that audits an Apple II from the inside: the language card's bank switching, the auxiliary memory soft switches, what reading a soft switch does as against writing it, and which ROM answers in the `$Cxxx` pages. Where the SingleStepTests corpus checks a processor and the WOZ set checks a drive, this checks the machine between them, and it reports each difference as a code documented one for one in the repository's `v0/index.md` — which is what makes it readable by a test rather than only by eye. Booted by a whole-machine test here: see [Auditing the machine itself](#auditing-the-machine-itself).}, } @reference{hunter-z-nd-54, author = {Hunter, Z.}, year = {n.d.}, title = {Apple II NTSC emulation: OpenEmulator explainer}, type = {Observable notebook}, url = {https://observablehq.com/@zellyn/apple-ii-ntsc-emulation-openemulator-explainer}, annotation = {A stripped-down JavaScript implementation of Marc S. Ressl's NTSC emulation from OpenEmulator, written to explain it: what the composite signal is, how quadrature demodulation separates luminance from the two chrominance axes, how the Dolph-Chebyshev and Lanczos windows build the two low-pass filters, and the matrix chain that ends in red, green and blue. `src/ntsc.zig` is built from it and cites it throughout; the constants there — the 17 taps, the 50 dB sidelobes, the 2 MHz and 600 kHz bandwidths, the -33 degree colour burst and the decoding matrix — are all read off this rather than guessed at, and a test checks the filters it produces against the notebook's to six decimal places. The author's full WebGL port is at . It is also where the *reason* the four-dots rule works comes from: an Apple II's dot clock is exactly four times the NTSC colour subcarrier, so a dot is a quarter turn of the subcarrier's phase and four of them are one cycle.}, } @reference{morris-j-k-2018-55, author = {Morris, J. K.}, year = {2018}, title = {WOZ disk image reference 2.1}, publisher = {Applesauce.}, url = {https://applesaucefdc.com/woz/reference2/}, annotation = {The format that writes a disk down as its bits, and the reference is unusually good: it gives the chunks exactly, and then goes further and tells an emulator author what to *do* with them — the four-bit window that puts back the noise a cleaned image had taken out of it, the rule for scaling the head's position when it moves to a track of a different length, and what an empty quarter track should read as. `src/woz.zig` and the drive in `src/disk2.zig` are written from it, and [reference 1.0](https://applesaucefdc.com/woz/reference1/) covers the older images the same reader accepts.}, } @reference{morris-j-k-2021-56, author = {Morris, J. K.}, year = {2021}, title = {WOZ test images}, edition = {Version 1.4}, type = {Data set}, publisher = {Applesauce.}, url = {http://evolutioninteractive.com/applesauce/woz_images.zip}, annotation = {Forty-five 5.25-inch images "intended to assist Apple ][ emulator developers in testing their implementations of floppy drives and drive controller cards", with a readme that puts them in order of difficulty: start with the System Masters, then the ordinary copy protections, then the cross-track checks. It is the closest thing a drive has to the processor's corpus, and it is what this was built against.}, } @reference{mos-technology-inc-1976-57, author = {MOS Technology, Inc.}, year = {1976}, title = {MCS6500 family programming manual}, edition = {Publication 6500-50A}, url = {https://archive.org/details/6500-50a_mcs6500pgmmanjan76}, annotation = {The source of the `(MOS Technology, 1976, Section N.N, p. N)` citations in the opcode implementations. Chapters are organised by what the processor is doing rather than alphabetically, so LDA is under the data bus and LSR under shifts and rotates. The [PDF](https://archive.org/download/6500-50a_mcs6500pgmmanjan76/6500-50A_MCS6500pgmManJan76_text.pdf) is searchable, and there is [another scan](https://archive.org/details/MCS6500_Family_Programming_Manual) of the same publication, useful when one copy's OCR drops a heading.}, } @reference{mg-2018August1-58, author = {MG.}, year = {2018, August 1}, title = {Apple IIc Plus MIG chip}, publisher = {MG's Apple II Site.}, url = {http://apple2.guidero.us/doku.php/mg_notes/apple_iic/mig_chip}, annotation = {The only account of the custom chip in an Apple IIc Plus that is any good, and it corrects Apple's own. The IIc Technical Reference names the chip's pins and stops; this gives the address map, says which of the latched outputs a read reaches and which a write does, and places two signals the manual describes wrongly — `EN2X*`, which is not "an access to $C0nx" but the IWM's drive 2 select, and `RESET*`, whose "system reset or ROM address 14" turns out to mean that ROM address 14 is literally tied to the chip's reset line. It is one enthusiast's reverse engineering, written up as it was learned and candid about what it is unsure of, and a claim taken from it is repeated here with the hedge it carries. `src/mig.zig` cites it throughout.}, } @reference{ncr-corporation-1986-59, author = {NCR Corporation.}, year = {1986}, title = {NCR 5380-53C80 SCSI interface chip design manual}, edition = {SP-1051}, publisher = {NCR Microelectronics Division.}, url = {https://archive.org/download/bitsavers_ncrscsiSP1InterfaceChipDesignManualMar86_3176025/SP-1051_NCR_5380-53C80_SCSI_Interface_Chip_Design_Manual_Mar86.pdf}, annotation = {The manual every Apple book points at and none of them reproduces. *Guide to the Macintosh Family Hardware* draws the chip into a circuit and then says "see the manual for the NCR 5380"; the third edition of *Designing Cards and Drivers* says only that "the SCSI chip is identical to that used in the Macintosh Plus". This is the part in the Macintosh Plus, SE and II and in the Apple II SCSI Card, and `src/ncr5380.zig` is built against Section 6 and the Register Reference Chart in Appendix A7 throughout. Three things in it are easy to get wrong and each is quoted where it bites: that a one means *asserted* even though the bus is active low, which is the convention the whole of Section 6 is written in; that read and write are different registers at four of the eight addresses, and that one bit of the Initiator Command Register differs between its own two halves; and that the phase table's columns are printed in the opposite order to the register the chip compares them against. Its Appendix A2 is flowcharts and 6502 assembly and A3 is a 65C02 interface diagram, so it had an eight-bit machine's card in mind.}, } @reference{apple-computer-inc-1981-60, author = {Apple Computer, Inc.}, year = {1981}, title = {The Universal Parallel Interface Card: installation and operating manual}, edition = {A3L0009, 030-0255-A}, annotation = {The parallel card for the Apple III, and the second card that machine has anywhere to put. Chapter 6 is the hardware — the address decoding, the control register bit by bit, the two output ports and the input port, the strobe circuitry and the handshake — and its "Summary of Hardware Addresses" on printed page 42 is what `src/upic.zig` is built from, read off the page images rather than the scan's text. Chapters 4 and 5 give the SOS drivers' configuration blocks, which is where a card in a slot becomes a `.PRINTER` a program can open. It disagrees with itself once, and the disagreement is kept rather than resolved: the entry for `DATARDY` says a read or write there turns the DATA READY status *off*, where the entry for `STATUS` and the address-decode table both say it turns it on. Two against one, and a table of what the hardware does is worth more than a sentence about it, so the model sets it and says so.}, } @reference{parker-n-2020January5-61, author = {Parker, N.}, year = {2020, January 5}, title = {Inside the Apple IIGS ADB controller}, publisher = { ()}, annotation = {The only description anywhere of the microcontroller on the other side of a IIgs's ADB registers: which part it is — a Mitsubishi M50740 in a ROM 0 or ROM 1 and an M50741 in a ROM 3 — its whole memory map, its interrupt vectors and what each is wired to, the GLU registers as the microcontroller sees them rather than as the host does, and its instruction set, which is the 6502's with Mitsubishi's additions. `src/adb.zig` takes its address space from this. Its author is careful about what it is: the information "is taken from the Mitsubishi data book and the Apple IIGS Hardware Reference, and from my own disassemblies of the microcontroller ROM code", and he cannot guarantee it is correct. Worth repeating rather than quietly promoting to fact — it is a disassembler's reading of a part, and the best there is.}, } @reference{parker-n-1994February-62, author = {Parker, N.}, year = {1994, February}, title = {Controlling the 3.5 drive hardware on the Apple IIGS}, url = {https://archive.org/details/IWM-Floppy_Disk_IO_Controller-Controlling_the_3.5_Drive_Hardware_on_the_Apple_II}, annotation = {The only description anywhere of the fifteen registers inside an Apple 3.5-inch drive: what each one answers, what each control function does, and which of them the IIgs ROM uses that no Apple publication mentions. It is also the source that says the hardware reference and the firmware reference are both wrong about which bit of `$c031` selects the drive, which the ROM confirms. `src/disk35.zig` and `src/iwm.zig` cite it. It is wrong about one thing, and it is the one thing it says it might be. Register 12, the disk-switched bit, is given as "0 = user ejected disk by pressing the eject button, 1 = disk not ejected"; the article marks that register as used by the IIgs ROM and documented in no publication available to its author, and says only that he is "fairly certain" of it. The ROM has it the other way up — see `src/disk35.zig` for the routine at `$ff/5f3b` that settles it — while agreeing with him on the registers either side of it in the same table. A hedged sentence in a good article, and the hedge was the right one.}, } @reference{reactivemicro-com-2016-63, author = {ReActiveMicro.com.}, year = {2016}, title = {Phasor sound card}, edition = {Version 1.3}, url = {https://downloads.reactivemicro.com/Apple%20II%20Items/Hardware/Phasor/Phasor%20Manual%20v1.3.pdf}, archiveurl = {https://web.archive.org/web/20260910052935/https://downloads.reactivemicro.com/Apple%20II%20Items/Hardware/Phasor/Phasor%20Manual%20v1.3.pdf}, annotation = {ReActiveMicro's manual for its reproduction of the Phasor: Applied Engineering's manual with the vendor changed, so it carries the same description of the card. What it states and the others do not is the sound routing `src/phasor.zig`'s renderer follows — "chips 1 and 3 go to speaker channel B, chips 2 and 4 to channel A" (printed 25), and that the card "speaks only through channel B", the second speech socket being left unpopulated (printed 24). Schematic capture and PCB layout are credited to Tom Arnold, whose Mockingboard clone schematic elsewhere in this list is where the SSI 263A's wiring comes from.}, } @reference{sather-j-1983-64, author = {Sather, J.}, year = {1983}, title = {Understanding the Apple II}, publisher = {Quality Software.}, url = {https://archive.org/download/understanding_the_apple_ii/understanding_the_apple_ii.pdf}, annotation = {The Apple II and II Plus gate by gate, and the one account of what changed between the boards. Appendix G lists the revisions — what Revision 1 added, that a II Plus differs from a II in firmware alone, that 4K RAM went away at Revision 4 — and chapter 8 has the video: the colour burst killer that made text white from Revision 1 on (p. 8-5), the D7 delay that gave Hi-Res its blue and orange (p. 8-19), and the Revision 0 board that had neither. `src/memory8/apple2plus.zig` and `src/video.zig` are built against it.}, } @reference{sather-j-1985-65, author = {Sather, J.}, year = {1985}, title = {Understanding the Apple IIe}, publisher = {Quality Software.}, url = {https://archive.org/details/Understanding_the_Apple_IIe}, annotation = {Chapter 9 is the Disk II controller card, gate by gate: what each of the sixteen soft switches does inside the card rather than to the drive, how the sequencer ROM and its two flip flops turn bits into bytes, and what the parts on the card are for. It is where the NE556 that keeps the drive turning for a second after `$c088,x` is written down, and it says both what that second is for and the one thing that cuts it short. `src/disk2.zig` cites it, and so does the sequencer in `woz/src/sequencer.zig`. The [text](https://archive.org/download/Understanding_the_Apple_IIe/Understanding_the_Apple_IIe_djvu.txt) is the copy to grep.}, } @reference{singlesteptests-nd-66, author = {SingleStepTests.}, year = {n.d.}, title = {65816}, type = {Data set}, publisher = {GitHub.}, url = {https://github.com/SingleStepTests/65816}, annotation = {The 16-bit core's own corpus, a separate repository because it is a separate shape: twenty thousand cases per opcode rather than ten, and eight signal lines recorded per cycle rather than a direction. Fetched as a Zig dependency rather than committed.}, } @reference{singlesteptests-nd-67, author = {SingleStepTests.}, year = {n.d.}, title = {65x02}, type = {Data set}, publisher = {GitHub.}, url = {https://github.com/SingleStepTests/65x02}, annotation = {The test corpus for the 8-bit processors, ten thousand recorded cases for every opcode of every one of the five. Also fetched rather than committed.}, } @reference{silicon-systems-inc-nd-68, author = {Silicon Systems, Inc.}, year = {n.d.}, title = {SSI 263A phoneme speech synthesizer}, type = {Data sheet}, url = {http://www.visual6502.org/images/263P/SSI_263A_Data_Sheet.pdf}, annotation = {What `src/ssi263.zig` is built from: the five attribute registers and their bit layout (the *Register Input Formats* table), the sixty-four phonemes, the frame and phoneme timing, and the Acknowledge/Request handshake. Read the numbers off the PDF rather than the OCR — it is a scan. The data sheet describes the chip completely except for the one thing no data sheet gives, the phoneme-to-formant table, which is why the interface here is exact and the voice would be an approximation.}, } @reference{synertek-nd-69, author = {Synertek.}, year = {n.d.}, title = {SY6551 asynchronous communication interface adapter}, edition = {pp. 3-177–3-184}, url = {http://dunfield.classiccmp.org/r/6551.pdf}, annotation = {The ACIA behind the Super Serial Card, as eight pages out of a Synertek data book: the copy linked carries no date and no text layer, so it has to be read rather than grepped. `src/serial.zig` takes two things from it. The control register's low four bits are the baud rate table — fifteen rates from 50 to 19,200, derived from a 1.8432 MHz crystal, and a sixteenth encoding meaning an external clock, which the card modelled here does not provide. And figure 8 is the status register format, which is where the awkward part is: carrier detect and data set ready are reported the wrong way up, a nought meaning the other end is there, and the parity, framing and overrun bits raise no interrupt of their own.}, } @reference{videx-1983-70, author = {Videx.}, year = {1983}, title = {UltraTerm installation and operation manual}, url = {https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/80%20Column%20Cards/Videx%20UltraTerm/Manuals/Videx%20UltraTerm%20-%20Installation%20and%20Operation%20Manual.pdf}, annotation = {The later card's manual, and `src/ultraterm.zig` is written from section 8.d.3 of it. That section gives the sixteen device select addresses a meaning for each direction, which the Videoterm's did not need — "it is the reading of a particular address that will set a specific operating mode" — and sets out the mode control port bit by bit, including the two dot clocks, which is where 17.430 MHz is confirmed as the Videoterm's own crystal. It also describes the attribute register: "the high nibble sets the attributes for characters with the high bit set. The lower nibble sets the attributes for characters with the high bit clear". Appendix F prints the firmware, and its equates are what settle where the screen memory appears: `DISP0 EQU $CC00`, and `HPBANK EQU %10000000` for the bit that banks it away again. The scan has a text layer.}, } @reference{videx-1982January-71, author = {Videx.}, year = {1982, January}, title = {Videoterm installation and operation manual}, edition = {001053 VT-MAN-000}, url = {http://www.apple-iigs.info/doc/fichiers/videoterm.pdf}, annotation = {The card's own manual, and `src/videx.zig` is written from chapter 5. It gives the device select bit by bit — "the very lowest bit, bit 0, controls whether a register is being accessed (0) or the contents of the register is being accessed (1) ... the next two bits, bits 2 and 3, determine which page will be selected" — and is explicit that one access does all of it at once, which is why selecting a 6845 register also moves the window. Pages 5-12 are the memory map: a kilobyte of firmware at `$C800`, five hundred and twelve bytes of screen memory at `$CC00`, and the paging that reaches the rest of the two kilobytes. Chapter 5 also walks the 6845's eighteen registers, and the manual carries a full assembly listing of the firmware. The scan has a text layer and is searchable.}, } @reference{using-the-profile-with-the-apple-nd-72, year = {n.d.}, title = {Using the ProFile with the Apple ///}, type = {Instruction sheet}, url = {https://www.apple3.org/Documents/Manuals/Using%20the%20Original%20ProFile%20with%20the%20Apple3.pdf}, annotation = {Four pages that say where the ProFile's interface card goes — slot 4 — and how the utilities format the drive, which is the procedure the model was checked against.}, } @reference{votrax-international-inc-1980-73, author = {Votrax International, Inc.}, year = {1980}, title = {SC-01 phoneme speech synthesizer}, type = {Data sheet}, annotation = {The speech chip on the Sound/Speech Mockingboard, and what `src/sc01.zig` is built from. Table 1 is the sixty-four phonemes, their codes and their nominal durations; Table 2 groups them by production feature (voiced, fricative, stop, nasal, pause), which is what the approximate voice leans on. "Mode 2 — Phoneme Mode" (p. 14) is the handshake a driver follows: put the phoneme on P0–P5, wait for A/R high, strobe it in, and A/R goes low until the phoneme is done. What the data sheet does not give is the phoneme-to-formant table in the chip's own ROM, so the voice is an approximation; the codes, durations and handshake are exact. Filed in the manuals archive.}, } @reference{western-design-center-inc-2010-74, author = {Western Design Center, Inc.}, year = {2010}, title = {W65C22 (W65C22N and W65C22S) versatile interface adapter (VIA) datasheet}, url = {https://www.westerndesigncenter.com/wdc/documentation/w65c22.pdf}, annotation = {The 6522 as its current maker documents it, register for register the chip the Mockingboard and the Apple III carry. Table 2-5 is the peripheral control register — which edge on each control line raises its flag, and the "independent" input modes whose flags a port access does not clear — and Tables 2-2 and 2-3 say what a port reads on an input line, which is what let the Apple III's ROM find the values it was looking for.}, } @reference{western-design-center-inc-2018-75, author = {Western Design Center, Inc.}, year = {2018}, title = {W65C816S 8/16–bit microprocessor}, type = {Data sheet}, url = {https://archive.org/details/w65c816s_bm}, annotation = {The 16-bit processor's own data sheet, and section 3.5 is the list of addressing modes `src/cpu16/addressing_modes.zig` is checked against. WDC counts twenty-four of them against the W65C02S's thirteen, and this enum has twenty-five, because 3.5.5 folds the long indirect jump in with the short one: "with the Jump Long (JML) instruction, the Program Bank Register is loaded with the third byte of the pointer". Here `(Absolute)` and `[Absolute]` are separate, since the operand syntax differs and only one of them touches the program bank.}, } @reference{wiznet-co-inc-2011-76, author = {WIZnet Co., Inc.}, year = {2011}, title = {W5100 datasheet}, edition = {Version 1.1.6}, type = {Data sheet}, url = {https://cdn.sparkfun.com/assets/e/2/f/c/2/W5100_Datasheet_v1_1_6.pdf}, archiveurl = {https://web.archive.org/web/20260825153713/https://cdn.sparkfun.com/assets/e/2/f/c/2/W5100_Datasheet_v1_1_6.pdf}, annotation = {The WIZnet W5100 on the a2RetroSystems Uthernet II, and the whole of what `src/w5100.zig` is built from. The chip is a "hardwired TCP/IP embedded Ethernet controller": its TCP/IP stack is in silicon, so a driver opens a socket and moves bytes rather than building packets. Section 4 is the memory map — the common registers at `0x0000`, the four sockets' registers at `0x0400` upward, and the transmit and receive memories at `0x4000` and `0x6000` — and §4.2 is the socket registers a driver works: the mode `Sn_MR`, the command `Sn_CR` (OPEN, LISTEN, CONNECT, DISCON, CLOSE, SEND, RECV), the interrupt `Sn_IR`, the status `Sn_SR`, and the ring pointers. Section 5 is the exact order those commands are issued in, which is what the model has to match for a driver to work, and §6.2 is the indirect bus interface — a mode register, a two-byte address, and a data register — that the Uthernet II wires to four of a slot's device selects. `src/w5100.zig` cites it by section.}, } @reference{worth-d-lechner-p-1981-77, author = {Worth, D., & Lechner, P.}, year = {1981}, title = {Beneath Apple DOS}, publisher = {Quality Software.}, url = {https://archive.org/details/beneath-apple-dos}, annotation = {Where the shape of a disk comes from: chapter 3 lays out a track field by field, gives the six and two encoding and the sector skew tables, and explains why a `.dsk` file has to be put through all of that before a drive can read it. `src/disk2.zig` and `src/dos33.zig` cite it.}, } @reference{worth-d-lechner-p-1984-78, author = {Worth, D., & Lechner, P.}, year = {1984}, title = {Beneath Apple ProDOS}, publisher = {Quality Software.}, url = {http://www.apple-iigs.info/doc/fichiers/beneathprodos.pdf}, annotation = {The same pair on the newer filing system, and chapter 4 is where `src/prodos.zig` takes the layout from: the volume directory, the seedling, sapling and tree file structures a file grows through, the storage types and the subdirectories. All of it was checked against a real volume as well. The scan linked carries no text layer, so it has to be read rather than grepped.}, } @reference{zilog-inc-2001-79, author = {ZiLOG, Inc.}, year = {2001}, title = {SCC/ESCC user's manual}, edition = {UM010901-0601}, url = {https://www.alldatasheet.com/datasheet-pdf/view/96934/ZILOG/Z8530/+7W845UUGIxhbbCvYB+/datasheet.pdf}, annotation = {An Apple IIgs's two serial ports are a Z8530, and four addresses reach thirty-one registers, which is the whole difficulty. The IIgs hardware reference declines to explain the chip and points at this manual instead, so this is where `src/scc.zig` comes from: section 2.3.4, "Z85X30 Register Access", states the two-step protocol exactly — a write to the command register while the pointer is zero sets the pointer, and the next access reaches the register it names — and chapter 5 is every write and read register in turn. Between them they settle the aliasing the file models: the part has nine read registers and sixteen places to look for them, and which six of those places repeat another register is Zilog's map rather than a convenience.}, }