Difference between revisions of "AMSDOS Hidden RSX Functions"
From CPCWiki - THE Amstrad CPC encyclopedia!
(Created page with '== Message On/Off == chr(81h) MESSAGE_ON_OFF ;in: A=flag(00h=on, >=01h=off) (R,I,C);out:A=old == Set Drive Speed == chr(82h) SET_DRIVE_SPEED ;in: HL=ptr to 9 bytes …') |
(No difference)
|
Revision as of 17:17, 24 January 2010
Contents
Message On/Off
chr(81h) MESSAGE_ON_OFF ;in: A=flag(00h=on, >=01h=off) (R,I,C);out:A=old
Set Drive Speed
chr(82h) SET_DRIVE_SPEED ;in: HL=ptr to 9 bytes 00h 2 spin-up time in 1/50sec ticker ticks (usually 50) 02h 2 spin-down time in 1/50sec ticker ticks (usually 250) 04h 1 usually AFh, delay for chr(86h) function 05h 1 whatever? in 1ms units (usually 15 = 15ms) 06h 1 settletime AND steprate in 1ms units (usually 12 = 12ms) 07h 1 head unload time in 32ms units (usually 1 = 32ms) 08h 1 head load time, bit0=DMA disable (usually 16ms)
Set Disk Type
chr(83h) SET_DISK_TYPE ;in: A=type (0xh=IBM, 4xh=CPM, Cxh=DATA)
Read/Write Sector
chr(84h) READ_SECTOR ;in: E=drv, D=trk, C=sec, HL=dest chr(85h) WRITE_SECTOR ;in: E=drv, D=trk, C=sec, HL=src
Format Track
chr(86h) FORMAT_TRACK ;in: E=drv, D=trk, C=sec1, HL=ptr to 9x4 byte
Seek Track
chr(87h) SEEK_TRACK ;in: E=drv, D=trk, out: cy=1=okay
Test Drive
chr(88h) TEST_DRIVE ;in: A=drv, out: cy=1=okay
Set Retry Count
chr(89h) SET_RETRY_COUNT ;in: A=retry count (default=10) (01h..(1)00h)
Init
[C006h] INIT ;in/out: DE=LORAM, HL=HIRAM, CY=?
This the initialization function (called by KL_ROM_WALK, which is automatically done on power-up). The function is always found in the first entry of the RSX lists, ie. [C006h]=address, and [C004h]=name. Where known names are:
"CPM ROM" Amstrad AMSDOS and Vortex VDOS1.0 "V ROM" Vortex VDOS2.0 "Pdos" PARADOS "ROMDOS " KDS ROMDOS, Siren Software ROMDOS XL, and XL 4.0 "XDDOS ROM" Dobbertin X-DDOS 1.11 and X-DDOS 2.10 "RODOS ROM" Romantic Robot RODOS 2.11, 2.15, 2.19
The names are typically containing "invalid" characters like spaces or lowercase letters, so they can't be accidently used in BASIC as |NAME.
Notes
- AMSDOS supports only single-sided disks (the FDC supports two sides, but AMSDOS doesn't). All other DOS clones like VDOS, RODOS, ROMDOS, PARADOS, X-DDOS support double-sided disks. However, unknown if/how some/all/which of that clones allow to access the 2nd side via above functions (possibly/best by unused bits in the drive number, or by extending track number to 0..159 for 2x80 tracks)?
- The above chr(8xh) function vectors are usually at ROM7:C033h..C04Dh in AMSDOS, however, clones like VDOS, RODOS, ROMDOS, X-DDOS have the vectors arranged differently, so always use KL_FIND_COMMAND to obtain the function address.