Flashpath for Linux

This description is based on the disassembled sys-driver and the log-files.

Write Control Sector 512 bytes (sector 2)
01h b 1 02h Sector to write. Value always 02H. This is actual the sector it self.
02h b 1 03h Starting sector of where data should be read or written in the following read/write operation. Value always 03H.
03h b 1 ++ Counter or sequence number. Increments on each write operation to this sector. Initial value is 00H and should be incremented before the write operation.
04h b 1 0-3 Disk drive number. For 'fd0' (A) the value is 00H and 01H for drive 'fd1' (B). I don't know why this information is passed to the microcontroller as it can't use it for anything.
05h b 8 FLASHPTH The text 'FLASHPTH'. I guess that the internal microcontroller check on this.
0Dh b 1 ++ Error counter. Increments on each read/write error. Maybe a 'retry' counter.
0Dh b 1 10h Number of data sectors (i guess). The value is always 10H which is 16 in decimal. Could be something else.
0Eh w 2 0014h ???? no idea. The value is always 0014h.
10h b 1 [03h]+1 Counter or sequence. The value is always [3]+1.
11h b 1 03h Copy of [2] the data starting sector. Always 03h.
12h b 1 01h ???? no idea. Always 01H.
13h 1 26h ?? Bank number or checksum.
word ptr [bx] = offset 14h
word ptr [bx+2] = offset 16h
DX = ticks (18.2 times/sec or 55ms) FFFFh = one hour
Assume that the pc has been running for a half hour. DX = 8000h and CX = 0000h and AX = 0100h.
1233h * 80000100h = 91980123300h -> 919:8012:3300h
[bx] = 8000 + 8012 = 1:0012 (here is a carry)
[bx+2] = 0000 + 1 (carry)
; ### save some data to write block
; AX = 0100, 0A00 or 8000
; DX,CX = system timer from int1A
;CX = high order word of tick count
;DX = low order word of tick count
sub_58	proc	near
	push	cx
	push	dx
	mov	[bx],dx		; bx->data_87 or data_88
	mov	[bx+2],cx	; cx always 0016 ???
	mov	cx,1233h ; 4659 decimal
	mul	cx			; dx:ax = reg * ax
	add	[bx],dx
	adc	word ptr [bx+2],0
	pop	dx
	pop	cx
sub_58	endp
14h b 1 36h ?? Bank number or checksum. See above.
15h b 1 16h ???? no idea. Always 16H.
16h b 1 00h ???? no idea. Always 00H.
17h b 1 7Ah Checksum like [13h]
18h b 1 35h Checksum like [14h]
19h b 1 16h Checksum like [15h]
1Ah b 1 00h Checksum like [16h]
1Bh b 1 00h ???? no idea. Always 00H.
1Ch b 1 01h ???? no idea. Always 01H.
1Dh 4 00000000 ???? no idea. Always 00H.
21h b 1 01h ???? no idea. Always 01H.
22h b 1 01h ???? no idea. Always 01H.
23h 475 Not used. Fill with 00H.
44h b 1 Command register
02 sets up the memory window for a read
03 gets some information about sector mapping in the data sector
0A causes the read sector to contain information about the card in it.
0F sends some setup information to the disk