Something went wrong. Try again.
A cycle-accurate Apple II and Apple IIgs emulator written in Zig, usable as both a program and a library.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442% SPDX-FileCopyrightText: 2026 Jeffrey C. Ollie <jeff@ocjtech.us>% 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 imageformat in the family that says what it is: a sixty-four byte header givingthe sector order, the write-protect tab, the DOS volume number and where inthe file the disk starts. It is one page long and unambiguous, and the fieldsnobody had thought through are marked as such rather than reserved for afuture 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 ProtocolConverter, which "always begins at address $C500" and "to ProDOS and Pascal1.3 ... appears to be a block device" (p. 20): every call it answers, withparameters and error codes. Appendix A is four fifths of the book and isApple's own listing of that firmware with comments and labels intact,including the eighteen pages of `PC.PACKET` that `src/cbus.zig` is builtfrom — the device raises REQ, the host answers with `/BSY`, and a packet ofsync, command mark, ids, contents and checksum crosses at thirty-two cyclesa byte with timing the listing itself calls critical. It prints no date; thepart number is its only marking. Being a scan, and one whose hex columns arethe worst case for OCR, every constant taken from it was checked against thebytes 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 seesthem, which is where the remaining switches — the A/D converter, thesmooth-scroll and character-download registers, the slot interrupt statusbytes — 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 builtfrom: 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 driverprotocol, down to the ROM code conventions of 6.3.1 and the `$CnFE` statusbyte that says how many volumes a card has and which of status, read andwrite it will do. The copy linked is an online transcription rather than ascan; it states no publication date of its own, and it carries a list of theprinted 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 — a1 kHz cycle a one, a 2 kHz cycle a zero, a ten second header — and theschematic, which is the only description of the card's logic and is what themodel 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: thespecification 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 theread-key and write-display routines, the "KBD/DSP Interface" drawing thatgives the PIA's chip selects, the refresh stalls, and the WozMonitor as a hex listing with Wozniak's comments — the primary source forthat 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 onesentence that matters is the whole of the hardware: data stored at`$C080 + $N0` appears on the printer's data lines and stays there until thenext 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 theline 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, whichmakes 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 debuggeris stepping through when an Apple ROM is loaded, and a 6502 opcode table onpage 100. Pages 133 and 134 have the rules for populating the three rows ofRAM with 4K and 16K chips and the five standard sets of memory selectblocks, 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. Itsaccount of peripheral-card I/O is what the host console card's firmware isbuilt on: how `PR#n` and `IN#n` point the output and input vectors CSW andKSW at a card's `$Cn00` page, and the rule a card uses to tell an output callfrom an input one -- "If both switches contain $Cn, then your subroutineshould 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-ondiagnostics and the boot. It is what says the ROM waits for retrace on theE VIA's CB2 flag — `VWAIT BIT CB2INT ; WAIT FOR RETRACE` — and names theregisters by Apple's equates, and reading it is how the Apple III modelwas 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 ofthe screen and what to do about them, the keyboard, the drive, and inappendix E the specifications — "2 MHz peak" for the clock — that themodel'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'sfour graphics modes — 280 dots "black and white dots only", 280 "in any of16 possible colors, with limitations", 560 black and white, 140 in sixteencolours — which is what says two of the modes carry a colour signal and twodo not, and the escape sequences and control codes the console driveranswers.},}
@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 aprogrammer: the S-bank and the switchable bank, the bank register, zeropage and stack relocation, and enhanced indirect addressing with itsX-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 isbuilt 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 iswhat settled how the machine's memory is sized: `SYSBANK` is the bankregister as the boot block left it, and `MEMSIZE` follows from that. Thedisk 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, theclocks, the video logic, the I/O slots and their timing, the keyboard andits code table, the Apple II emulation mode, the schematics. It is whatsettled the processor's speed — the screen takes the other phase of theclock while it draws, and the processor has the whole 2 MHz only while thescreen 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 a0.1 second 1 kHz tone, that the bank register's bit 6 is the Solid Applekey, and that the keyboard hands over uppercase codes with shift reportedbeside 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 setinto the video generator: its `LOADCHR` is the layout of the downloadcells in the screen holes — which page holds the code and which the image,and where each row goes — and `TCOLOR` is the foreground-and-backgroundbyte the colour text mode reads from the other text page. The Apple III'scharacter 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 addressesand what each bit of its BUSY register means, the control codes read at`$CN00` that work the addressable latch, the CMD/BSY handshake with itsresponse bytes and `$55`/`$AA` answers, the six command bytes and fourstatus bytes, and the pseudo-DMA — the driver's own comments on which bytesof the buffer page the false address of the exit branch touches are whatgave 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 itthat a IIe does not have. Vertical blanking on a IIe is something a programpolls at `$c019`; being able to route it to the interrupt line instead is aIIc feature, switched at `$c05a` and `$c05b`, and those are the addresses theIIe model uses for the enable it keeps switched off by default. The samemanual covers the mouse card firmware, which is the other way that interruptreached 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 theerror codes are all published in this chapter and in the technical note thatfollowed it, and this card's SmartPort side follows them. What is *not* in abook, and came out of the IIgs's own ROM instead, is the layout of the deviceinformation 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 toptwo bits are the extended and removable flags. `src/blockdevice.zig` citesboth.},}
@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 serviceprocedures with the format and debugger programs, and appendices on thehard disk assembly, its format and its firmware, with the schematics.What the ProFile model takes from it is what the driver's source leavesimplicit — that an Apple III's blocks are 512 bytes where a Lisa's are532, that reading block `$ffffff` returns the drive's status, and thebit-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 personusing the card rather than for a program — the two blocks of switches, thecable, and the command characters a terminal program sends to set the baudrate, the data format and the parity — but appendix C is the firmware, and itis the one that matters here: the Pascal 1.1 protocol, the bytes thatidentify the card as a serial device, and the entry points BASIC and Pascalcall 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 thebank switching, chapter 2 the built-in I/O and the soft switches that driveit, 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 thatsettles the default monitor comes from: on an ordinary colour set "80-columntext will be too blurry to read", which is why the eighty-column modes comeup in monochrome. Appendix A is the one that bears on the processor: it setsout where the 65C02 departs from the 6502, including the JMP indirect pagewrap that this emulator reproduces and a BIT immediate that behavesdifferently, which is one of the differences the split opcode tables accountfor. 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 diskinterface section is Apple's own statement of the same fifteen registersParker's article describes: which combination of CA0, CA1, CA2 and SELaddresses each one, what each answers, and which four of them can be writtenby holding LSTRB high. It is a Macintosh book and the drive is the same Sonymechanism, which makes it the source behind that article — and it agrees withit on all fifteen, so `src/disk35.zig`'s table is checked against twoindependent statements of it rather than one. It is also where thetachometer's rate comes from: "the TACH line produces 60 pulses for eachrotation of the drive motor", which this model had at fifty until the pagewas read. Two rules stated there are easy to miss and both matter: the IWMsits on the odd side of the data bus, so only odd-addressed byte accessesreach 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 volumewas read; the volume carries Apple's 1985 copyright, and the section runsfrom 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 — adestination, a source, "an eight-bit quantity, contained in the frame'sheader, that identifies" the protocol above, and the data — and the layersabove it. It describes the Manager rather than the wire, so the handshakeand the timings `src/localtalk.zig` needs come from Zilog's application noteinstead; this is cited for the shape of the frame. The values of the fourcontrol 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 theoriginal IIc but the revision after it: a `UniDisk 3.5` flag down the marginmarks every paragraph that applies only to the 32K-ROM machine. That is whatmakes it, and not the 1984 manual above, the source for what the later ROMsdo. Appendix F is the family differences: F.2 says that where the originalreserves `$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 bankswitch `memory8/apple2e.zig` implements. Section 11.5.5 is the diskcontroller unit, "also known as the Integrated Woz Machine", which is why aIIc'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 IIetechnical reference. #5 is where the identification bytes come from: "theAppleMouse II card is identified by a value of $20 at $Cn0C ('X-Y Pointingdevice, 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` looksfor five bytes rather than four. #3 is the mode byte, and is careful aboutwhat turning the mouse off does and does not do; #1 is the interruptenvironment a program has to keep around a mouse call; #4 is a firmware bugaffecting 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 registerexactly: bit 7 is the state of the IRQ line and reads zero when an interruptis pending, bits 0 and 6 always read as ones, a read clears the request, andinterrupts from more than one oscillator queue behind the register first in,first out. The interrupt register in `src/ensoniq.zig` is built from it. Italso describes, under the control register's interrupt-enable bit, an"interrupt table" that remembers an oscillator finishing while its interruptis disabled and delivers it if the bit is set later — "if the IE bit is azero, then when the oscillator completes its cycle the oscillator status willbe 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 tothe OIR". That is modelled: a bitmask rather than a queue, since a table hasone place per oscillator and one that finished twice while nobody waslistening 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 whatit does not: chapter 9 is the Apple Desktop Bus microcontroller and listsevery command the host can send it, which is what the ADB registers here arebuilt against. Chapters 6 and 7 are the disk port and the SmartPort, andpages 157 and 158 are the two pages that make an intelligent drive work onany machine and not just the one it was written for: the phase-linecombinations that enable and reset the bus, how the host hands out unitnumbers, 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 softswitch list, and appendix H is the clearest statement anywhere of whatshadowing is for. Beware which copy: theone commonly linked from the Cortland archive is the 1986 beta draft withchapters 2, 3, 5, 8 and 9 missing — including the one chapter that mattershere — and a 1987 scan may have no text layer at all. The HiRes scan at theInternet 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 theonly place that says plainly what the four registers at `$c0c0` are: atwenty-bit address counter in three bytes, low first, and a data registerthat steps the counter every time it is touched (p. 7). That last sentenceis what makes the card work at all, and what the RamFactor's manual says ofits own card in almost the same words — the two are the same idea, one in aslot with its firmware aboard and one soldered to the machine with itsdriver 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 ofthese fifteen bear directly on the sound chip. #11, "Ensoniq DOC Swap-ModeAnomaly", records that the output falls to the zero-crossing level for nolonger than one sample period "whenever a swap occurs from a higher-numberedoscillator to a lower-numbered one", and not the other way about — which`src/ensoniq.zig` reproduces without being told to, by scanning itsoscillators in the order the chip scans them. #23, "Toolbox Use of DOC RAM",explains that the Note Synthesizer runs a free-running oscillator over thefirst page of the sound RAM at zero volume purely as a clock, which is whatsettles that an oscillator interrupts at the end of its wavetable rather thanwhen it halts. And #19, "Multichannel Output with the Apple IIgs NoteSynthesizer", says what the top four bits of an Oscillator Control registerare for: a stereo card decodes three of them, even channels to the right andodd 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 inROM 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 the3.5-inch track format: the five speed zones and their sector counts, theaddress and data fields byte by byte, and the three-checksum nibblisingalgorithm — which it prints twice, for writing and for reading, in two formsthat 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 nothingof the memory expansion card or the IIc Plus. Chapter 11 is the hardware, andit is the source for the one chip a IIc Plus has that no other IIc does — themultidrive interface glue, "two ICs: a custom integrated circuit (the Mc7chip) and a 2 KB static RAM" (p. 327), whose pins Table 11-15 names and whoseRAM Table 11-24 addresses with A0 to A4 from the system and RAMA5 to RAMA10from the chip itself. `src/mig.zig` is built on those two tables; what they donot 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 builtaround it: the Mega II that is a IIe on one chip and gives the slow side its1 MHz, the shadowing of banks `$00` and `$01` into `$e0` and `$e1`, the VGCand its Super Hi-Res modes with a palette per scanline, the Ensoniq 5503 withits thirty-two oscillators, and ADB as a microcontroller rather than a port.`src/memory16/apple2gs.zig` is built against it throughout, and chapter 2 inparticular: the bank latch, the two clock domains and the whole of shadowingcome 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. Readthe [`_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 away 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 thatsettled how a 3.5-inch drive picks a head. Chapter 9 draws the floppyinterface of every machine in the family as a circuit, and in each of thosedrawings the disk chip's own `HDSEL` output is marked *n.c.* while the linethat 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 thehost, held across a whole side's worth of writing, rather than something thedrive latches when a register is read — which is what `src/disk35.zig` hadand what left half of every formatted disk blank. The book covers theMacintosh Plus through the IIfx, so it is also the last word on the SWIMwhere 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 heldbyte is not taken away while the shifter is empty was confirmed, afterSather's chapter established that the hold exists and how long it is. Readinga second implementation is the cheapest way to find out whether a rulederived from prose is the rule the hardware actually follows. It is also thereference 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 itssymbolic debugger are the measure other emulators are surveyed against in thebibliography 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 andEcho+ latched off the card's device selects), the chip-select bits on each6522'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 theparts on the card are named: a 400 dpi photograph of an assembled board onwhich every major chip is legible. It settles what the register lists onlyimply — 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`, andthe second speech socket beside it is empty — and dates the card by itssilkscreen, “© 1985 APPLIED ENGIN.” The rest is marketing copy. It is whattells `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-switchtable on printed page 4 gives the three the card has — Phasor (thesoftware-selectable default), Echo+ and Mockingboard — and which switchsettings choose them, which is what `src/phasor.zig`'s power-on mode andMockingboard compatibility are built to match. Most of the manual is aboutthe bundled COMPOSE, Sound Builder and text-to-speech software rather thanthe register interface, which it does not give; that comes from AppleWinbelow. It states no date and is a 2002 re-setting of the printed book; thecard 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 modelsApplied Engineering's memory expansion card rather than Apple's own: chapter6 is written for programmers and has the hardware in it. "RamFactor Hardware"is two pages and settles almost everything — the five registers and where theslot 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 amegabyte or less, that touching the data register steps the address, and thatthe 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: theidentification bytes at `$Cs00-$Cs07`, `$CsFA` and `$CsFB`, the screen holesthe firmware leaves the card and partition sizes in, the layout of thepartition table in the card's own first two hundred and fifty-six bytes, andthe SmartPort — which it calls the Protocol Converter, that being what Applecalled it first. The manual carries no date; the firmware says 1986. It doesnot say which bit of the bank select register is the bank, and the firmwaredoes: 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 selectregister at `$C073`, write-only, into which a program writes one of forty-eight64K bank numbers; that the IIe's own soft switches then work as they alwaysdid; and the three facts a faithful model turns on — that the video is alwaysdrawn from bank 0 whichever bank is selected ("Only Bank 0 contains the videoinformation ... this feature, unique to RamWorks, eliminates a screen flickerproblem"), which is why `videoByte` does not bank; that the register is zeroon power-up but a reset does not clear it, since the card cannot see the RESETline; and that writing it also fires the paddle strobe and it cannot be readback. The manual carries no date; RamWorks III was sold from about 1986. Itis a re-setting in AppleWorks rather than a scan, so its `$C073` was confirmedagainst 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 theSSI 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), notdriven through a 6522's ports like the sound chips, and its A/R line runs tothe first 6522's CA1. A reproduction of Sweet Micro's card rather than theoriginal drawing, so it is trusted for the wiring it shows and cross-checkedagainst 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. <https://www.apple.asimov.net/documentation/hardware/misc/passport_midi.pdf> ([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-selectaddresses — the 6840 at `$C0n0`–`$C0n7`, the 6850 at `$C0n8`/`$C0n9`, thedrum-sync line at the last two — and §4.3 the initialisation codes. §4.4reprints the 6840's register map and control-register bits (its Tables #1through #4), including the two addresses CR1 and CR3 share and the way aninterrupt flag is cleared only by reading the status register and then thetimer; §4.5 does the same for the 6850. The card's external clock frequencyit 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 chapter16, its instruction-by-instruction reference on pages 245 to 277. Note thatchapter has no entry for TAY, and the comment on that instruction says sorather than pointing at a page that does not discuss it.The [PDF](https://archive.org/download/6502um/6502UsersManual.pdf) is thecopy 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 builtfrom. Section 4 is the PacketPage architecture — the four-kilobyte internalspace the registers and frame buffers live in, reached through a pointer and adata 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`, andthe receive and transmit frame windows at `0x0400` and `0x0A00`. Section 4.10is the I/O-mode ports the Uthernet wires to a slot's device selects, and §5 theorder a driver transmits and receives in. Unlike the W5100 it has no TCP/IPstack, which is why the host end is a length of virtual wire rather than a setof 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 disagreementotherwise. Two cover every documented opcode and addressing mode of the 6502and the 65C02; one is Bruce Clark's decimal mode test, carried here withconfiguration options added; and one checks IRQ, NMI and BRK through afeedback register the host has to provide. Where the SingleStepTests corpuschecks one instruction at a time, these check what happens between them, andall four pass: see [What the corpus cannotsee](#what-the-corpus-cannot-see). The `.lst` listings are what the successaddresses are read out of and are the place to look when a run settlessomewhere else — note that the interrupt test's is `$06F5`, the `jmp *` ofthe success macro, and not the `jmp start` three bytes past it, which sitsunder 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, andthe statement of the convention every other implementation follows. A UDPsocket bound to any address with the address reusable, joined to themulticast group 239.192.76.84 on port 1954; four bytes of sender in frontof every frame, so that a node can tell its own frames from everyone else'swhen the group hands them back; and the reason it cannot just look at thenode number, which the file spells out — during address acquisitionanother 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 aGeneral Instrument data book, and the arithmetic `src/ay3.zig` is built on isstated there in a sentence: a tone generator works "by first counting downthe input clock by 16, then by further counting down the result by theprogrammed 12-bit Tone Period value". The noise generator does the same witha 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 toR15 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 andno text layer; the one at alldatasheet.com is the same pages behind achallenge 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/sSmartmodem — the modem that defined the set every terminal program of the erawent on to speak. It is the checkable statement of the commands, the resultcodes 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, andthe 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 overthe host's TCP rather than a phone line — no modem did that — which is zig65'sown. 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 escapecharacters, each with a second of silence before and after, so that thesequence occurring by chance in transmitted data does not drop the caller backto command mode. `src/modem.zig`'s escape follows it — the count and thetrailing guard exactly, the leading guard relaxed the way terminal programs andother 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 framegoes 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/CTSframe[s]", nor an enquiry for a node it is already answering for. Thebridge in `src/localtalk.zig` keeps the handshake off the network for thesame 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 theBCD digits of each counter and which bits of them are unused, Figure 1 theinterrupt register's bits, and the text the resets, the GO command and therollover status bit that SOS reads after every counter to know whether thechip was rippling while it looked. `src/mm58167.zig` is built from it andcites 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 driveris the reading of it that has been checked against the machine's softwarefor twenty years. What was taken from it, and is marked as its in thecode: which VIA each line is wired to — the blanking on the E VIA's CB1and CB2, the keyboard on its CA2, the interrupt status on its PA7 — whatthe 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 fourvideo mode bits, and that the sixteen addresses under the VIAs are RAMwhen the VIAs are hidden. Where MAME and the manuals differ — the bank anumber above the highest fitted selects — the manuals and the boot blockwon.},}
@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 whatis in each slot and then works through the 6522s, the AY-3-8913s, the SC-01and the SSI263s, stopping at the first failure and naming the component, thetest and the sub-test. Deliberately deeper than an emulator needs, and runagainst real cards as well as emulated ones, which makes it the betterauthority where it and a datasheet disagree — see [Auditing theMockingboard](#auditing-the-mockingboard) for the three 6522 faults it foundhere. 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 iswhat assembles the two of Dormann's tests that ship as source only, whoseauthor will not switch away from `as65`: see [Assembling the two Dormann doesnot 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 iswritten 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 theinterface address `--ethernet-interface` and `--localtalk-interface` name, inplace 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: abyte stream in, rendered pages out, keeping the printer's own state, geometryand 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 thesink the card's output drains into; `src/main.zig` sets it up in the frontend, and the library's cards, which take a writer and do not know a printeris 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 outof its own two kilobytes, using no RAM at all — not the zero page and not thestack — 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 behindit, and two whole-machine tests here run it across all nine memoryconfigurations: see [Testing the memory with nomemory](#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'sbank switching, the auxiliary memory soft switches, what reading a softswitch does as against writing it, and which ROM answers in the `$Cxxx`pages. Where the SingleStepTests corpus checks a processor and the WOZ setchecks a drive, this checks the machine between them, and it reports eachdifference 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. Bootedby a whole-machine test here: see [Auditing the machineitself](#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 emulationfrom OpenEmulator, written to explain it: what the composite signal is, howquadrature 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` isbuilt from it and cites it throughout; the constants there — the 17 taps, the50 dB sidelobes, the 2 MHz and 600 kHz bandwidths, the -33 degree colourburst 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 sixdecimal places. The author's full WebGL port is at<https://zellyn.github.io/apple2shader/>.
It is also where the *reason* the four-dots rule works comes from: an AppleII's dot clock is exactly four times the NTSC colour subcarrier, so a dot isa 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 isunusually good: it gives the chunks exactly, and then goes further and tellsan emulator author what to *do* with them — the four-bit window that putsback the noise a cleaned image had taken out of it, the rule for scaling thehead's position when it moves to a track of a different length, and what anempty 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 olderimages 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 developersin testing their implementations of floppy drives and drive controllercards", with a readme that puts them in order of difficulty: start with theSystem Masters, then the ordinary copy protections, then the cross-trackchecks. It is the closest thing a drive has to the processor's corpus, and itis 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 theopcode implementations. Chapters are organised by what the processor is doingrather than alphabetically, so LDA is under the data bus and LSR under shiftsand 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'spins and stops; this gives the address map, says which of the latched outputsa read reaches and which a write does, and places two signals the manualdescribes wrongly — `EN2X*`, which is not "an access to $C0nx" but the IWM'sdrive 2 select, and `RESET*`, whose "system reset or ROM address 14" turnsout 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 andcandid about what it is unsure of, and a claim taken from it is repeated herewith 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 tothe 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 andDrivers* says only that "the SCSI chip is identical to that used in theMacintosh Plus". This is the part in the Macintosh Plus, SE and II and in theApple II SCSI Card, and `src/ncr5380.zig` is built against Section 6 and theRegister Reference Chart in Appendix A7 throughout. Three things in it areeasy 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 thewhole of Section 6 is written in; that read and write are different registersat four of the eight addresses, and that one bit of the Initiator CommandRegister differs between its own two halves; and that the phase table'scolumns are printed in the opposite order to the register the chip comparesthem against. Its Appendix A2 is flowcharts and 6502 assembly and A3 is a65C02 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 hasanywhere to put. Chapter 6 is the hardware — the address decoding, thecontrol register bit by bit, the two output ports and the input port, thestrobe 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 pageimages 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 thanresolved: the entry for `DATARDY` says a read or write there turns the DATAREADY status *off*, where the entry for `STATUS` and the address-decode tableboth say it turns it on. Two against one, and a table of what the hardwaredoes 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 = {<https://llx.com/Neil/a2/adb.html> (<https://web.archive.org/web/20250125191932/https://llx.com/Neil/a2/adb.html>)}, annotation = {The only description anywhere of the microcontroller on the other side of aIIgs's ADB registers: which part it is — a Mitsubishi M50740 in a ROM 0 orROM 1 and an M50741 in a ROM 3 — its whole memory map, its interrupt vectorsand what each is wired to, the GLU registers as the microcontroller sees themrather than as the host does, and its instruction set, which is the 6502'swith 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 theMitsubishi data book and the Apple IIGS Hardware Reference, and from my owndisassemblies of the microcontroller ROM code", and he cannot guarantee it iscorrect. Worth repeating rather than quietly promoting to fact — it is adisassembler'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 Apple3.5-inch drive: what each one answers, what each control function does, andwhich of them the IIgs ROM uses that no Apple publication mentions. It isalso the source that says the hardware reference and the firmware referenceare both wrong about which bit of `$c031` selects the drive, which the ROMconfirms. `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 bypressing the eject button, 1 = disk not ejected"; the article marks thatregister as used by the IIgs ROM and documented in no publication availableto its author, and says only that he is "fairly certain" of it. The ROM hasit 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 itin the same table. A hedged sentence in a good article, and the hedge wasthe 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: AppliedEngineering's manual with the vendor changed, so it carries the samedescription of the card. What it states and the others do not is the soundrouting `src/phasor.zig`'s renderer follows — "chips 1 and 3 go to speakerchannel B, chips 2 and 4 to channel A" (printed 25), and that the card"speaks only through channel B", the second speech socket being leftunpopulated (printed 24). Schematic capture and PCB layout are credited toTom Arnold, whose Mockingboard clone schematic elsewhere in this list is wherethe 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 changedbetween 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 atRevision 4 — and chapter 8 has the video: the colour burst killer that madetext white from Revision 1 on (p. 8-5), the D7 delay that gave Hi-Res itsblue 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 thesixteen soft switches does inside the card rather than to the drive, how thesequencer ROM and its two flip flops turn bits into bytes, and what the partson the card are for. It is where the NE556 that keeps the drive turning for asecond after `$c088,x` is written down, and it says both what that second isfor and the one thing that cuts it short. `src/disk2.zig` cites it, and sodoes 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 separateshape: twenty thousand cases per opcode rather than ten, and eight signallines recorded per cycle rather than a direction. Fetched as a Zig dependencyrather 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 forevery 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 theirbit layout (the *Register Input Formats* table), the sixty-four phonemes, theframe and phoneme timing, and the Acknowledge/Request handshake. Read thenumbers off the PDF rather than the OCR — it is a scan. The data sheetdescribes 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 andthe 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 databook: the copy linked carries no date and no text layer, so it has to be readrather than grepped. `src/serial.zig` takes two things from it. The controlregister's low four bits are the baud rate table — fifteen rates from 50 to19,200, derived from a 1.8432 MHz crystal, and a sixteenth encoding meaningan external clock, which the card modelled here does not provide. And figure8 is the status register format, which is where the awkward part is: carrierdetect and data set ready are reported the wrong way up, a nought meaning theother end is there, and the parity, framing and overrun bits raise nointerrupt 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 section8.d.3 of it. That section gives the sixteen device select addresses a meaningfor each direction, which the Videoterm's did not need — "it is the readingof a particular address that will set a specific operating mode" — and setsout the mode control port bit by bit, including the two dot clocks, which iswhere 17.430 MHz is confirmed as the Videoterm's own crystal. It alsodescribes the attribute register: "the high nibble sets the attributes forcharacters with the high bit set. The lower nibble sets the attributes forcharacters with the high bit clear". Appendix F prints the firmware, and itsequates 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 hasa 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. Itgives the device select bit by bit — "the very lowest bit, bit 0, controlswhether a register is being accessed (0) or the contents of the register isbeing accessed (1) ... the next two bits, bits 2 and 3, determine which pagewill 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 arethe memory map: a kilobyte of firmware at `$C800`, five hundred and twelvebytes of screen memory at `$CC00`, and the paging that reaches the rest ofthe two kilobytes. Chapter 5 also walks the 6845's eighteen registers, andthe manual carries a full assembly listing of the firmware. The scan has atext 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 modelwas 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` isbuilt from. Table 1 is the sixty-four phonemes, their codes and their nominaldurations; Table 2 groups them by production feature (voiced, fricative, stop,nasal, pause), which is what the approximate voice leans on. "Mode 2 — PhonemeMode" (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 thechip's own ROM, so the voice is an approximation; the codes, durations andhandshake 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 thechip the Mockingboard and the Apple III carry. Table 2-5 is the peripheralcontrol register — which edge on each control line raises its flag, andthe "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 iswhat 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 ofaddressing modes `src/cpu16/addressing_modes.zig` is checked against. WDCcounts twenty-four of them against the W65C02S's thirteen, and this enum hastwenty-five, because 3.5.5 folds the long indirect jump in with the shortone: "with the Jump Long (JML) instruction, the Program Bank Register isloaded with the third byte of the pointer". Here `(Absolute)` and`[Absolute]` are separate, since the operand syntax differs and only one ofthem 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 embeddedEthernet controller": its TCP/IP stack is in silicon, so a driver opens asocket and moves bytes rather than building packets. Section 4 is the memorymap — 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), theinterrupt `Sn_IR`, the status `Sn_SR`, and the ring pointers. Section 5 is theexact order those commands are issued in, which is what the model has to matchfor a driver to work, and §6.2 is the indirect bus interface — a moderegister, a two-byte address, and a data register — that the Uthernet II wiresto 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 byfield, gives the six and two encoding and the sector skew tables, andexplains why a `.dsk` file has to be put through all of that before a drivecan 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 andthe subdirectories. All of it was checked against a real volume as well. Thescan 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 reachthirty-one registers, which is the whole difficulty. The IIgs hardwarereference declines to explain the chip and points at this manual instead, sothis is where `src/scc.zig` comes from: section 2.3.4, "Z85X30 RegisterAccess", states the two-step protocol exactly — a write to the commandregister while the pointer is zero sets the pointer, and the next accessreaches the register it names — and chapter 5 is every write and readregister in turn. Between them they settle the aliasing the file models: thepart has nine read registers and sixteen places to look for them, and whichsix of those places repeat another register is Zilog's map rather than aconvenience.},}