docs(amiga): complete AmigaOS 3.1/3.2 developer reference — 172 files across 17 sections

Comprehensive technical documentation covering:
- Hardware: OCS/ECS/AGA custom chip registers, Copper & Blitter deep dives
- Boot sequence: cold boot through startup-sequence
- Binary format: HUNK executable spec, relocation, debug info
- Linking & ABI: .fd files, LVO tables, register calling conventions
- Exec kernel: tasks, interrupts, memory, signals, semaphores
- AmigaDOS: file I/O, FFS/OFS layout, CLI/Shell scripting
- Graphics: planar bitmaps, Copper programming, HAM/EHB modes
- Intuition: screens, windows, IDCMP, BOOPSI
- Devices: trackdisk, SCSI, serial, timer, audio, keyboard
- Libraries: utility, expansion, IFFParse, locale, ARexx
- Networking: bsdsocket API, SANA-II, TCP/IP stack comparison
- Toolchain: GCC, vasm/vlink, SAS/C, NDK, debugging
- Reverse engineering: IDA/Ghidra setup, compiler fingerprints, case studies
- CPU & MMU: 68040/060 emulation libs, PMMU, cache management
- Driver development: SANA-II, Picasso96/RTG, AHI audio

All files include breadcrumb navigation. No local paths or proprietary content.
This commit is contained in:
Ilia Sharin 2026-04-23 12:16:52 -04:00
parent f07a368bf1
commit 21751c0025
172 changed files with 19701 additions and 0 deletions

12
14_references/README.md Normal file
View file

@ -0,0 +1,12 @@
[← Home](../README.md)
# References — Quick Lookup Tables
## Section Index
| File | Description |
|---|---|
| [custom_chip_registers.md](custom_chip_registers.md) | Complete custom chip register map |
| [exec_lvo_table.md](exec_lvo_table.md) | exec.library LVO offset table |
| [dos_lvo_table.md](dos_lvo_table.md) | dos.library LVO offset table |
| [error_codes.md](error_codes.md) | Complete DOS error code reference |

View file

@ -0,0 +1,160 @@
[← Home](../README.md) · [References](README.md)
# Custom Chip Register Map
## Overview
All Amiga custom chip registers are memory-mapped at base address `$DFF000`. This is the complete register map for OCS/ECS/AGA.
---
## Register Table
| Offset | Name | R/W | Description |
|---|---|---|---|
| `$000` | `BLTDDAT` | R | Blitter destination early read |
| `$002` | `DMACONR` | R | DMA control read |
| `$004` | `VPOSR` | R | Beam position (V high bits + LOF) |
| `$006` | `VHPOSR` | R | Beam position (V low + H) |
| `$008` | `DSKDATR` | R | Disk data early read |
| `$00A` | `JOY0DAT` | R | Joystick/mouse port 0 |
| `$00C` | `JOY1DAT` | R | Joystick/mouse port 1 |
| `$00E` | `CLXDAT` | R | Collision detection |
| `$010` | `ADKCONR` | R | Audio/disk control read |
| `$012` | `POT0DAT` | R | Pot port 0 data |
| `$014` | `POT1DAT` | R | Pot port 1 data |
| `$016` | `POTGOR` | R | Pot port data read |
| `$018` | `SERDATR` | R | Serial port data + status |
| `$01A` | `DSKBYTR` | R | Disk data byte + status |
| `$01C` | `INTENAR` | R | Interrupt enable read |
| `$01E` | `INTREQR` | R | Interrupt request read |
| `$020` | `DSKPTH` | W | Disk DMA pointer (high) |
| `$022` | `DSKPTL` | W | Disk DMA pointer (low) |
| `$024` | `DSKLEN` | W | Disk DMA length |
| `$026` | `DSKDAT` | W | Disk DMA data write |
| `$028` | `REFPTR` | W | Refresh pointer |
| `$02A` | `VPOSW` | W | Beam position write (V) |
| `$02C` | `VHPOSW` | W | Beam position write (H) |
| `$02E` | `COPCON` | W | Copper control |
| `$030` | `SERDAT` | W | Serial port data write |
| `$032` | `SERPER` | W | Serial port period/control |
| `$034` | `POTGO` | W | Pot port control |
| `$036` | `JOYTEST` | W | Joystick counter test |
| `$038` | `STREQU` | S | Short frame strobe (ECS) |
| `$03A` | `STRVBL` | S | Vertical blank strobe (ECS) |
| `$03C` | `STRHOR` | S | Horizontal sync strobe (ECS) |
| `$03E` | `STRLONG` | S | Long frame strobe (ECS) |
| `$040` | `BLTCON0` | W | Blitter control 0 |
| `$042` | `BLTCON1` | W | Blitter control 1 |
| `$044` | `BLTAFWM` | W | Blitter A first word mask |
| `$046` | `BLTALWM` | W | Blitter A last word mask |
| `$048` | `BLTCPTH` | W | Blitter C pointer (high) |
| `$04A` | `BLTCPTL` | W | Blitter C pointer (low) |
| `$04C` | `BLTBPTH` | W | Blitter B pointer (high) |
| `$04E` | `BLTBPTL` | W | Blitter B pointer (low) |
| `$050` | `BLTAPTH` | W | Blitter A pointer (high) |
| `$052` | `BLTAPTL` | W | Blitter A pointer (low) |
| `$054` | `BLTDPTH` | W | Blitter D pointer (high) |
| `$056` | `BLTDPTL` | W | Blitter D pointer (low) |
| `$058` | `BLTSIZE` | W | Blitter size (starts blit) |
| `$05A` | `BLTCON0L` | W | Blitter control 0 (lower bits, ECS) |
| `$05C` | `BLTSIZV` | W | Blitter V size (ECS) |
| `$05E` | `BLTSIZH` | W | Blitter H size (ECS, starts blit) |
| `$060` | `BLTCMOD` | W | Blitter C modulo |
| `$062` | `BLTBMOD` | W | Blitter B modulo |
| `$064` | `BLTAMOD` | W | Blitter A modulo |
| `$066` | `BLTDMOD` | W | Blitter D modulo |
| `$070` | `BLTCDAT` | W | Blitter C data |
| `$072` | `BLTBDAT` | W | Blitter B data |
| `$074` | `BLTADAT` | W | Blitter A data |
| `$078` | `SPRHDAT` | W | Ext sprite data (ECS) |
| `$07C` | `DENISEID` | R | Denise/Lisa chip ID (ECS/AGA) |
| `$07E` | `DSKSYNC` | W | Disk sync pattern |
| `$080``$08C` | `COP1LCH``COP2LCL` | W | Copper list 1/2 pointers |
| `$088` | `COPJMP1` | S | Copper jump strobe 1 |
| `$08A` | `COPJMP2` | S | Copper jump strobe 2 |
| `$08C` | `COPINS` | W | Copper instruction fetch |
| `$08E` | `DIWSTRT` | W | Display window start |
| `$090` | `DIWSTOP` | W | Display window stop |
| `$092` | `DDFSTRT` | W | Data fetch start |
| `$094` | `DDFSTOP` | W | Data fetch stop |
| `$096` | `DMACON` | W | DMA control write |
| `$098` | `CLXCON` | W | Collision control |
| `$09A` | `INTENA` | W | Interrupt enable |
| `$09C` | `INTREQ` | W | Interrupt request |
| `$09E` | `ADKCON` | W | Audio/disk control |
| `$0A0``$0D8` | `AUD03` | W | Audio channels (PTH/PTL/LEN/PER/VOL/DAT) |
| `$0E0``$0FE` | `BPL1PTH``BPL8PTL` | W | Bitplane pointers 18 |
| `$100` | `BPLCON0` | W | Bitplane control 0 |
| `$102` | `BPLCON1` | W | Bitplane control 1 (scroll) |
| `$104` | `BPLCON2` | W | Bitplane control 2 (priority) |
| `$106` | `BPLCON3` | W | Bitplane control 3 (AGA) |
| `$108` | `BPL1MOD` | W | Bitplane modulo (odd planes) |
| `$10A` | `BPL2MOD` | W | Bitplane modulo (even planes) |
| `$10C` | `BPLCON4` | W | Bitplane control 4 (AGA) |
| `$110``$11E` | `BPL1DAT``BPL8DAT` | W | Bitplane data |
| `$120``$13E` | `SPR0PTH``SPR7PTL` | W | Sprite pointers 07 |
| `$140``$17E` | `SPR0POS``SPR7DATB` | W | Sprite position/control/data |
| `$180``$1BE` | `COLOR00``COLOR31` | W | Colour palette registers |
| `$1C0` | `HTOTAL` | W | H total (ECS) |
| `$1C2` | `HSSTOP` | W | H sync stop (ECS) |
| `$1C4` | `HBSTRT` | W | H blank start (ECS) |
| `$1C6` | `HBSTOP` | W | H blank stop (ECS) |
| `$1C8` | `VTOTAL` | W | V total (ECS) |
| `$1CA` | `VSSTOP` | W | V sync stop (ECS) |
| `$1CC` | `VBSTRT` | W | V blank start (ECS) |
| `$1CE` | `VBSTOP` | W | V blank stop (ECS) |
| `$1DC` | `BEAMCON0` | W | Beam counter control (ECS) |
| `$1DE` | `HSSTRT` | W | H sync start (ECS) |
| `$1E0` | `VSSTRT` | W | V sync start (ECS) |
| `$1E4` | `DIWHIGH` | W | Display window high bits (ECS) |
| `$1FC` | `FMODE` | W | Fetch mode (AGA) |
---
## DMA Enable Bits (DMACON)
| Bit | Name | Description |
|---|---|---|
| 0 | `AUD0EN` | Audio channel 0 |
| 1 | `AUD1EN` | Audio channel 1 |
| 2 | `AUD2EN` | Audio channel 2 |
| 3 | `AUD3EN` | Audio channel 3 |
| 4 | `DSKEN` | Disk DMA |
| 5 | `SPREN` | Sprite DMA |
| 6 | `BLTEN` | Blitter DMA |
| 7 | `COPEN` | Copper DMA |
| 8 | `BPLEN` | Bitplane DMA |
| 9 | `DMAEN` | Master DMA enable |
| 10 | `BLTPRI` | Blitter priority (nasty) |
| 15 | `SET/CLR` | Set/clear control |
---
## Interrupt Bits (INTENA/INTREQ)
| Bit | Name | Description |
|---|---|---|
| 0 | `TBE` | Serial transmit buffer empty |
| 1 | `DSKBLK` | Disk block finished |
| 2 | `SOFT` | Software interrupt |
| 3 | `PORTS` | CIA-A (I/O ports, timers) |
| 4 | `COPER` | Copper |
| 5 | `VERTB` | Vertical blank |
| 6 | `BLIT` | Blitter finished |
| 7 | `AUD0` | Audio channel 0 |
| 8 | `AUD1` | Audio channel 1 |
| 9 | `AUD2` | Audio channel 2 |
| 10 | `AUD3` | Audio channel 3 |
| 11 | `RBF` | Serial receive buffer full |
| 12 | `DSKSYN` | Disk sync word found |
| 13 | `EXTER` | CIA-B (parallel, serial) |
| 14 | `INTEN` | Master interrupt enable |
| 15 | `SET/CLR` | Set/clear control |
---
## References
- HRM: *Amiga Hardware Reference Manual* — complete register descriptions
- NDK39: `hardware/custom.h`, `hardware/dmabits.h`, `hardware/intbits.h`

View file

@ -0,0 +1,169 @@
[← Home](../README.md) · [References](README.md)
# dos.library — LVO Offset Table
## Complete LVO Table (NDK 3.9, Public Functions)
| LVO | Bias | Function |
|---|---|---|
| 30 | 30 | Open |
| 36 | 36 | Close |
| 42 | 42 | Read |
| 48 | 48 | Write |
| 54 | 54 | Input |
| 60 | 60 | Output |
| 66 | 66 | Seek |
| 72 | 72 | DeleteFile |
| 78 | 78 | Rename |
| 84 | 84 | Lock |
| 90 | 90 | UnLock |
| 96 | 96 | DupLock |
| 102 | 102 | Examine |
| 108 | 108 | ExNext |
| 114 | 114 | Info |
| 120 | 120 | CreateDir |
| 126 | 126 | CurrentDir |
| 132 | 132 | IoErr |
| 138 | 138 | CreateProc |
| 144 | 144 | Exit |
| 150 | 150 | LoadSeg |
| 156 | 156 | UnLoadSeg |
| 162 | 162 | DeviceProc (private) |
| 168 | 168 | SetComment |
| 174 | 174 | SetProtection |
| 180 | 180 | DateStamp |
| 186 | 186 | Delay |
| 192 | 192 | WaitForChar |
| 198 | 198 | ParentDir |
| 204 | 204 | IsInteractive |
| 210 | 210 | Execute |
| 216 | 216 | AllocDosObject |
| 222 | 222 | FreeDosObject |
| 228 | 228 | DoPkt |
| 234 | 234 | SendPkt |
| 240 | 240 | WaitPkt |
| 246 | 246 | ReplyPkt |
| 252 | 252 | AbortPkt |
| 258 | 258 | LockRecord |
| 264 | 264 | LockRecords |
| 270 | 270 | UnLockRecord |
| 276 | 276 | UnLockRecords |
| 282 | 282 | SelectInput |
| 288 | 288 | SelectOutput |
| 294 | 294 | FGetC |
| 300 | 300 | FPutC |
| 306 | 306 | UnGetC |
| 312 | 312 | FRead |
| 318 | 318 | FWrite |
| 324 | 324 | FGets |
| 330 | 330 | FPuts |
| 336 | 336 | VFWritef |
| 342 | 342 | VFPrintf |
| 348 | 348 | Flush |
| 354 | 354 | SetVBuf |
| 360 | 360 | DupLockFromFH |
| 366 | 366 | OpenFromLock |
| 372 | 372 | ParentOfFH |
| 378 | 378 | ExamineFH |
| 384 | 384 | SetFileDate |
| 390 | 390 | NameFromLock |
| 396 | 396 | NameFromFH |
| 402 | 402 | SplitName |
| 408 | 408 | SameLock |
| 414 | 414 | SetMode |
| 420 | 420 | ExAll |
| 426 | 426 | ReadLink |
| 432 | 432 | MakeLink |
| 438 | 438 | ChangeMode |
| 444 | 444 | SetFileSize |
| 450 | 450 | SetIoErr |
| 456 | 456 | Fault |
| 462 | 462 | PrintFault |
| 468 | 468 | ErrorReport |
| 474 | 474 | Cli (private) |
| 480 | 480 | CreateNewProc |
| 486 | 486 | RunCommand |
| 492 | 492 | GetConsoleTask |
| 498 | 498 | SetConsoleTask |
| 504 | 504 | GetFileSysTask |
| 510 | 510 | SetFileSysTask |
| 516 | 516 | GetArgStr |
| 522 | 522 | SetArgStr |
| 528 | 528 | FindCliProc |
| 534 | 534 | MaxCli |
| 540 | 540 | SetCurrentDirName |
| 546 | 546 | GetCurrentDirName |
| 552 | 552 | SetProgramName |
| 558 | 558 | GetProgramName |
| 564 | 564 | SetPrompt |
| 570 | 570 | GetPrompt |
| 576 | 576 | SetProgramDir |
| 582 | 582 | GetProgramDir |
| 588 | 588 | SystemTagList |
| 594 | 594 | AssignLock |
| 600 | 600 | AssignLate |
| 606 | 606 | AssignPath |
| 612 | 612 | AssignAdd |
| 618 | 618 | RemAssignList |
| 624 | 624 | GetDeviceProc |
| 630 | 630 | FreeDeviceProc |
| 636 | 636 | LockDosList |
| 642 | 642 | UnLockDosList |
| 648 | 648 | AttemptLockDosList |
| 654 | 654 | RenameDosEntry |
| 660 | 660 | AddDosEntry |
| 666 | 666 | RemDosEntry |
| 672 | 672 | FindDosEntry |
| 678 | 678 | NextDosEntry |
| 684 | 684 | MakeDosEntry |
| 690 | 690 | FreeDosEntry |
| 696 | 696 | IsFileSystem |
| 702 | 702 | Format |
| 708 | 708 | Relabel |
| 714 | 714 | Inhibit |
| 720 | 720 | AddBuffers |
| 726 | 726 | CompareDates |
| 732 | 732 | DateToStr |
| 738 | 738 | StrToDate |
| 744 | 744 | InternalLoadSeg |
| 750 | 750 | InternalUnLoadSeg |
| 756 | 756 | NewLoadSeg |
| 762 | 762 | AddSegment |
| 768 | 768 | FindSegment |
| 774 | 774 | RemSegment |
| 780 | 780 | CheckSignal |
| 786 | 786 | ReadArgs |
| 792 | 792 | FindArg |
| 798 | 798 | ReadItem |
| 804 | 804 | StrToLong |
| 810 | 810 | MatchFirst |
| 816 | 816 | MatchNext |
| 822 | 822 | MatchEnd |
| 828 | 828 | ParsePattern |
| 834 | 834 | MatchPattern |
| 840 | 840 | FreeArgs |
| 846 | 846 | FilePart |
| 852 | 852 | PathPart |
| 858 | 858 | AddPart |
| 864 | 864 | StartNotify |
| 870 | 870 | EndNotify |
| 876 | 876 | SetVar |
| 882 | 882 | GetVar |
| 888 | 888 | DeleteVar |
| 894 | 894 | FindVar |
| 900 | 900 | CliInitNewcli (private) |
| 906 | 906 | CliInitRun (private) |
| 912 | 912 | WriteChars |
| 918 | 918 | PutStr |
| 924 | 924 | VPrintf |
| 930 | 930 | ParsePatternNoCase |
| 936 | 936 | MatchPatternNoCase |
| 942 | 942 | SameDevice (private) |
| 948 | 948 | ExAllEnd |
| 954 | 954 | SetOwner |
---
## References
- NDK39: `fd/dos_lib.fd`

View file

@ -0,0 +1,9 @@
[← Home](../README.md) · [References](README.md)
# DOS Error Codes — Complete Reference
Duplicate of `07_dos/error_handling.md` error table — see that file for the full list with descriptions.
This file is kept as a quick cross-reference entry point.
→ [Full error code table](../07_dos/error_handling.md)

View file

@ -0,0 +1,142 @@
[← Home](../README.md) · [References](README.md)
# exec.library — LVO Offset Table
## Complete LVO Table (NDK 3.9)
| LVO | Bias | Function |
|---|---|---|
| 30 | 30 | Supervisor |
| 36 | 36 | ExitIntr (private) |
| 42 | 42 | Schedule (private) |
| 48 | 48 | Reschedule (private) |
| 54 | 54 | Switch (private) |
| 60 | 60 | Dispatch (private) |
| 66 | 66 | Exception (private) |
| 72 | 72 | InitCode |
| 78 | 78 | InitStruct |
| 84 | 84 | MakeLibrary |
| 90 | 90 | MakeFunctions |
| 96 | 96 | FindResident |
| 102 | 102 | InitResident |
| 108 | 108 | Alert |
| 114 | 114 | Debug |
| 120 | 120 | Forbid |
| 126 | 126 | Permit |
| 132 | 132 | Disable |
| 138 | 138 | Enable |
| 144 | 144 | SetSR |
| 150 | 150 | SuperState |
| 156 | 156 | UserState |
| 162 | 162 | SetIntVector |
| 168 | 168 | AddIntServer |
| 174 | 174 | RemIntServer |
| 180 | 180 | Cause |
| 186 | 186 | Allocate |
| 192 | 192 | Deallocate |
| 198 | 198 | AllocMem |
| 204 | 204 | AllocAbs |
| 210 | 210 | FreeMem |
| 216 | 216 | AvailMem |
| 222 | 222 | AllocEntry |
| 228 | 228 | FreeEntry |
| 234 | 234 | Insert |
| 240 | 240 | AddHead |
| 246 | 246 | AddTail |
| 252 | 252 | Remove |
| 258 | 258 | RemHead |
| 264 | 264 | RemTail |
| 270 | 270 | Enqueue |
| 276 | 276 | FindName |
| 282 | 282 | AddTask |
| 288 | 288 | RemTask |
| 294 | 294 | FindTask |
| 300 | 300 | SetTaskPri |
| 306 | 306 | SetSignal |
| 312 | 312 | SetExcept |
| 318 | 318 | Wait |
| 324 | 324 | Signal |
| 330 | 330 | AllocSignal |
| 336 | 336 | FreeSignal |
| 342 | 342 | AllocTrap |
| 348 | 348 | FreeTrap |
| 354 | 354 | AddPort |
| 360 | 360 | RemPort |
| 366 | 366 | PutMsg |
| 372 | 372 | GetMsg |
| 378 | 378 | ReplyMsg |
| 384 | 384 | WaitPort |
| 390 | 390 | FindPort |
| 396 | 396 | AddLibrary |
| 402 | 402 | RemLibrary |
| 408 | 408 | OldOpenLibrary |
| 414 | 414 | CloseLibrary |
| 420 | 420 | SetFunction |
| 426 | 426 | SumLibrary |
| 432 | 432 | AddDevice |
| 438 | 438 | RemDevice |
| 444 | 444 | OpenDevice |
| 450 | 450 | CloseDevice |
| 456 | 456 | DoIO |
| 462 | 462 | SendIO |
| 468 | 468 | CheckIO |
| 474 | 474 | WaitIO |
| 480 | 480 | AbortIO |
| 486 | 486 | AddResource |
| 492 | 492 | RemResource |
| 498 | 498 | OpenResource |
| 504 | 504 | RawIOInit (private) |
| 510 | 510 | RawMayGetChar (private) |
| 516 | 516 | RawPutChar (private) |
| 522 | 522 | RawDoFmt |
| 528 | 528 | GetCC |
| 534 | 534 | TypeOfMem |
| 540 | 540 | Procure |
| 546 | 546 | Vacate |
| 552 | 552 | OpenLibrary |
| 558 | 558 | InitSemaphore |
| 564 | 564 | ObtainSemaphore |
| 570 | 570 | ReleaseSemaphore |
| 576 | 576 | AttemptSemaphore |
| 582 | 582 | ObtainSemaphoreList |
| 588 | 588 | ReleaseSemaphoreList |
| 594 | 594 | FindSemaphore |
| 600 | 600 | AddSemaphore |
| 606 | 606 | RemSemaphore |
| 612 | 612 | SumKickData |
| 618 | 618 | AddMemList |
| 624 | 624 | CopyMem |
| 630 | 630 | CopyMemQuick |
| 636 | 636 | CacheClearU |
| 642 | 642 | CacheClearE |
| 648 | 648 | CacheControl |
| 654 | 654 | CreateIORequest |
| 660 | 660 | DeleteIORequest |
| 666 | 666 | CreateMsgPort |
| 672 | 672 | DeleteMsgPort |
| 678 | 678 | ObtainSemaphoreShared |
| 684 | 684 | AllocVec |
| 690 | 690 | FreeVec |
| 696 | 696 | CreatePool |
| 702 | 702 | DeletePool |
| 708 | 708 | AllocPooled |
| 714 | 714 | FreePooled |
| 720 | 720 | AttemptSemaphoreShared |
| 726 | 726 | ColdReboot |
| 732 | 732 | StackSwap |
| 738 | 738 | ChildFree (private) |
| 744 | 744 | ChildOrphan (private) |
| 750 | 750 | ChildStatus (private) |
| 756 | 756 | ChildWait (private) |
| 762 | 762 | CachePreDMA |
| 768 | 768 | CachePostDMA |
| 774 | 774 | AddMemHandler |
| 780 | 780 | RemMemHandler |
| 786 | 786 | ObtainQuickVector |
---
## References
- NDK39: `fd/exec_lib.fd`
- Use `parse_fd.py` from `13_toolchain/fd_files.md` to regenerate