mirror of
https://github.com/alfishe/amiga-bootcamp.git
synced 2026-06-13 00:26:28 +00:00
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.
1.5 KiB
1.5 KiB
scsi.device — Hard Disk I/O
Overview
SCSI and IDE hard disks are accessed via scsi.device (A3000/A4000 built-in) or 2nd.scsi.device / ide.device (A1200/A600). The API is the same as trackdisk for basic read/write, with additional SCSI direct commands.
Opening
struct IOStdReq *scsi = CreateStdIO(port);
OpenDevice("scsi.device", 0, (struct IORequest *)scsi, 0);
/* unit 0 = first SCSI/IDE device */
Standard Commands
Same as trackdisk: CMD_READ, CMD_WRITE, CMD_UPDATE, TD_CHANGENUM, etc.
Direct SCSI Commands (HD_SCSICMD)
struct SCSICmd scsicmd;
UBYTE cdb[10]; /* SCSI CDB */
UBYTE sense[20]; /* sense data buffer */
UBYTE data[512]; /* data buffer */
/* Read 1 sector at LBA 0: */
cdb[0] = 0x28; /* READ(10) */
cdb[1] = 0;
cdb[2] = 0; cdb[3] = 0; cdb[4] = 0; cdb[5] = 0; /* LBA = 0 */
cdb[6] = 0;
cdb[7] = 0; cdb[8] = 1; /* transfer length = 1 sector */
cdb[9] = 0;
scsicmd.scsi_Data = (UWORD *)data;
scsicmd.scsi_Length = 512;
scsicmd.scsi_Command = cdb;
scsicmd.scsi_CmdLength = 10;
scsicmd.scsi_Flags = SCSIF_READ;
scsicmd.scsi_SenseData = sense;
scsicmd.scsi_SenseLength = sizeof(sense);
scsi->io_Command = HD_SCSICMD;
scsi->io_Data = &scsicmd;
scsi->io_Length = sizeof(scsicmd);
DoIO((struct IORequest *)scsi);
if (scsicmd.scsi_Status != 0) {
/* SCSI error — check sense data */
}
References
- NDK39:
devices/scsidisk.h - ADCD 2.1: scsi.device autodocs