amiga-bootcamp/02_boot_sequence/dos_boot.md
Ilia Sharin 21751c0025 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.
2026-04-23 12:17:35 -04:00

121 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[← Home](../README.md) · [Boot Sequence](README.md)
# DOS Boot — Bootstrap, Mount List, Startup-Sequence
## Overview
After the Kickstart ROM initialises the kernel and resident modules, `dos.library` takes over to mount filesystems and run the user's startup scripts.
---
## Boot Sequence Flow
```
Kickstart ROM init complete
dos.library creates initial CLI process
BootStrap module (strap) reads boot block from boot device
Boot block executed (OFS/FFS bootblock code)
Mount configured devices from MountList (DEVS:DOSDrivers/)
Execute S:Startup-Sequence
Execute S:User-Startup
LoadWB (start Workbench)
```
---
## Boot Block Format
The first 2 sectors (1024 bytes) of a bootable disk:
```
Offset Size Description
$000 4 Boot block ID: "DOS\0" (OFS), "DOS\1" (FFS), etc.
$004 4 Checksum (complement to zero)
$008 4 Root block pointer (usually 880)
$00C ... Boot code (up to 1012 bytes of 68000 code)
```
### Boot Block Types
| ID | Hex | Type |
|---|---|---|
| `DOS\0` | `444F5300` | OFS (Old File System) |
| `DOS\1` | `444F5301` | FFS (Fast File System) |
| `DOS\2` | `444F5302` | OFS + International |
| `DOS\3` | `444F5303` | FFS + International |
| `DOS\4` | `444F5304` | OFS + Dir Cache |
| `DOS\5` | `444F5305` | FFS + Dir Cache |
| `DOS\6` | `444F5306` | OFS + Long Filenames (OS 3.2) |
| `DOS\7` | `444F5307` | FFS + Long Filenames (OS 3.2) |
---
## Boot Priority
Devices are booted in priority order. Highest priority device boots first:
| Device | Default Priority | Description |
|---|---|---|
| DF0: | 5 | First floppy drive |
| DH0: | 0 | First hard disk partition |
| DH1: | 5 | Second partition |
| DF1: | 10 | Second floppy |
Set in mountlist: `BootPri = 0` or via HDToolBox.
---
## Startup-Sequence
Standard `S:Startup-Sequence` for OS 3.1:
```
C:SetPatch QUIET ; apply ROM patches
C:AddBuffers DH0: 50 ; filesystem buffers
C:Version >NIL:
FailAt 21
MakeDir RAM:T RAM:Clipboards RAM:ENV RAM:ENV/Sys
Copy >NIL: ENVARC: RAM:ENV ALL NOREQ
Assign >NIL: T: RAM:T
Assign >NIL: CLIPS: RAM:Clipboards
Assign >NIL: REXX: S:
Assign >NIL: PRINTERS: DEVS:Printers
Assign >NIL: KEYMAPS: DEVS:Keymaps
Assign >NIL: LOCALE: SYS:Locale
Assign >NIL: LIBS: SYS:Classes ADD
Assign >NIL: HELP: LOCALE:Help DEFER
C:IPrefs
ConClip >NIL:
; Launch Workbench:
LoadWB
EndCLI >NIL:
```
---
## Early Startup Control (Boot Menu)
Hold **both mouse buttons** during boot to access the Early Startup Control menu:
| Option | Description |
|---|---|
| Boot With No Startup-Sequence | Skip S:Startup-Sequence |
| Boot Standard | Normal boot |
| Boot With: [device list] | Select boot device |
| Display Mode: [NTSC/PAL] | Override display standard |
---
## References
- RKRM: Boot chapter
- NDK39: `dos/dosextens.h` — BootStrap