mirror of
https://github.com/alfishe/amiga-bootcamp.git
synced 2026-06-13 00:26:28 +00:00
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:
parent
f07a368bf1
commit
21751c0025
172 changed files with 19701 additions and 0 deletions
74
08_graphics/display_modes.md
Normal file
74
08_graphics/display_modes.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
[← Home](../README.md) · [Graphics](README.md)
|
||||
|
||||
# Display Modes — Display Database, ModeID, Monitor Specs
|
||||
|
||||
## Overview
|
||||
|
||||
OS 3.0+ provides a **display database** that abstracts monitor/chipset capabilities. Applications query available modes by `ModeID` rather than hardcoding `HIRES`/`LACE` flags.
|
||||
|
||||
---
|
||||
|
||||
## ModeID Format
|
||||
|
||||
A ModeID is a ULONG:
|
||||
```
|
||||
bits 31–16: Monitor ID
|
||||
bits 15–0: Mode within that monitor
|
||||
```
|
||||
|
||||
| ModeID | Name | Resolution |
|
||||
|---|---|---|
|
||||
| `$00000000` | LORES | 320×256 (PAL) / 320×200 (NTSC) |
|
||||
| `$00008000` | HIRES | 640×256/200 |
|
||||
| `$00000004` | LORES-LACE | 320×512/400 |
|
||||
| `$00008004` | HIRES-LACE | 640×512/400 |
|
||||
| `$00080000` | SUPERHIRES | 1280×256 (ECS+) |
|
||||
| `$00080004` | SUPERHIRES-LACE | 1280×512 |
|
||||
| `$00039000` | DBLPAL-LORES | 320×256 (AGA scan-doubled) |
|
||||
| `$00039004` | DBLPAL-HIRES | 640×256 (AGA) |
|
||||
| `$00011000` | DBLNTSC-LORES | 320×200 (AGA) |
|
||||
|
||||
---
|
||||
|
||||
## Querying the Display Database
|
||||
|
||||
```c
|
||||
/* graphics.library 39+ */
|
||||
ULONG modeID = INVALID_ID;
|
||||
struct DisplayInfo di;
|
||||
struct DimensionInfo dims;
|
||||
|
||||
while ((modeID = NextDisplayInfo(modeID)) != INVALID_ID) {
|
||||
if (GetDisplayInfoData(NULL, (UBYTE *)&di, sizeof(di),
|
||||
DTAG_DISP, modeID)) {
|
||||
if (GetDisplayInfoData(NULL, (UBYTE *)&dims, sizeof(dims),
|
||||
DTAG_DIMS, modeID)) {
|
||||
Printf("ModeID $%08lx: %ldx%ld, %ld colours\n",
|
||||
modeID,
|
||||
dims.Nominal.MaxX - dims.Nominal.MinX + 1,
|
||||
dims.Nominal.MaxY - dims.Nominal.MinY + 1,
|
||||
1 << di.NotAvailable ? 0 : dims.MaxDepth);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Best Mode Selection
|
||||
|
||||
```c
|
||||
ULONG bestMode = BestModeIDA((struct TagItem[]){
|
||||
{ BIDTAG_NominalWidth, 640 },
|
||||
{ BIDTAG_NominalHeight, 480 },
|
||||
{ BIDTAG_Depth, 8 },
|
||||
{ TAG_DONE, 0 }
|
||||
});
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- NDK39: `graphics/displayinfo.h`, `graphics/modeid.h`
|
||||
- ADCD 2.1: `NextDisplayInfo`, `GetDisplayInfoData`, `BestModeIDA`
|
||||
Loading…
Add table
Add a link
Reference in a new issue