Changes

AMSDOS Memory Map

4 bytes added, 13 April
/* Extended Disk Parameter Block (DPB,CSA,ALT) for Drive A/B */
AMSDOS uses two memory blocks. The first is always at BE40h..BE7Fh (on the 464 this region was used as Stack). The second is allocated from User RAM, typically located at A700h..ABFFh (unless other expansion ROMs with higher ROM bank number have already allocated RAM at that locations).
== AMSDOS RAM 1 (always at BE40h..BE7Fh) ==
BE40 2 Pointer to CP/M DPH for Drive A and drive B (A910h) (CPM:AE58h) (see below)
BE42 2 Pointer to XPDB for Drive A and drive B (A890h) (CPM:ADD8h)
BE44 2 Delay for Motor Spin-up in 1/50 seconds (0032h)
BE46 2 Delay for Motor Spin-down in 1/50 seconds (00FAh)
48h 2 Checksum accross [05h..47h]
== Disk Parameter Header (DPH) for Drive A/B == 00h 2 XLT Skew Factor Translation (physical-to-logical sector) (not used) 02h 2 TRACK Current Track (misused as DIRNUM by AMSDOS) 04h 2 SECTOR Current Sector 06h 2 DIRNUM Current Directory Number 08h 2 DIRBUF Pointer to Directory Buffer (A930h) 0Ah 2 DPB Pointer to DPB/XDPB (A890h/A8D0h for Drive A/B) Drive Param Block 0Ch 2 CSV Pointer to CSA (A8A9h/A8E9h for Drive A/B) Checksums 0Eh 2 ALV Pointer to ALT (A8B9h/A8F9h for Drive A/B) Allocation Table == Extended Disk Parameter Block (DPBXDPB,CSA,ALT) for Drive A/B ==
00h 2 SPT Records per Track (CPM/Data=36, IBM=32)
02h 1 BSH Block Shift (3) (records per block = 1 SHL N)
29h 23 ALT Block Allocation Table (23x8bit = 184bit) (only 180bit used)
== Disk Parameter Header (DPH) for Drive A/B == 00h 2 XLT Skew Factor Translation (physical-to-logical sector) (not used) 02h 2 TRACK Current Track (misused as DIRNUM by AMSDOS) 04h 2 SECTOR Current Sector 06h 2 DIRNUM Current Directory Number 08h 2 DIRBUF Pointer to Directory Buffer (A930h) 0Ah 2 DPB Pointer to DPB/XDPB (A890h/A8D0h for Drive A/B) Drive Param Block 0Ch 2 CSV Pointer to CSA (A8A9h/A8E9h for Drive A/B) Checksums 0Eh 2 ALV Pointer to ALT (A8B9h/A8F9h for Drive A/B) Allocation Table == Finding the XDPB for a drive ===
The 2 byte pointer at &BE40 points to a list of DPH structures, 1 per drive, listed in order.
In most AMSTRAD dos there is space for 2 only.
To get the XDPB for a drive (this works on [[VDOS]], [[X-DDOS]], [[AMSDOS]] and [[ParadosParaDOS]]:
;; A = drive
491
edits