x68000:writing_drivers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
x68000:writing_drivers [2014/07/11 00:47] – eidis | x68000:writing_drivers [2014/07/11 01:04] – [0x05 - Read no wait] eidis | ||
---|---|---|---|
Line 13: | Line 13: | ||
**Note :** the following contains very hard stuff ! I might be confusing sometimes, sorry in advance. Don't hesitate to ask for help if you do not understand something. Thank you. | **Note :** the following contains very hard stuff ! I might be confusing sometimes, sorry in advance. Don't hesitate to ask for help if you do not understand something. Thank you. | ||
- | |||
**Terminology :** | **Terminology :** | ||
Line 21: | Line 20: | ||
* Char : 1 character = 1 byte | * Char : 1 character = 1 byte | ||
* All data types are CPU specific : M68K family. So, byte ordering is always "Big Endian" | * All data types are CPU specific : M68K family. So, byte ordering is always "Big Endian" | ||
- | |||
====== Compilation flags, libraries and startup code ====== | ====== Compilation flags, libraries and startup code ====== | ||
Line 89: | Line 87: | ||
**Command execution result flags :** | **Command execution result flags :** | ||
- | This list contains all acceptable values to fill the result status flags in the request packet header. S_**** flags will display (or hide) the " | + | This list contains all acceptable values to fill the result status flags in the request packet header. S_**** flags will display (or hide) the " |
+ | |||
+ | " | ||
* 0x1000 - S_ABORT : " | * 0x1000 - S_ABORT : " | ||
Line 155: | Line 155: | ||
- | Output parameters : | + | **Output parameters :** |
^ Position | ^ Position | ||
Line 220: | Line 220: | ||
^ Position | ^ Position | ||
- | | 14 | Long | Pointer to a buffer that' | + | | 14 | Long |Pointer to a buffer that' |
- | | 18 | Long | Buffer size | | + | | 18 | Long |Buffer size | |
**Output parameters :** none | **Output parameters :** none | ||
Line 227: | Line 227: | ||
===== 0x04 - Input (read) ===== | ===== 0x04 - Input (read) ===== | ||
- | Command ID : 0x04 (C_INPUT) | + | **Command ID :** 0x04 (C_INPUT) |
**Availability :** Block/ | **Availability :** Block/ | ||
Line 238: | Line 238: | ||
| 13 | Byte |Block device driver only. Media type. | | | 13 | Byte |Block device driver only. Media type. | | ||
| 14 | Long |Pointer to a buffer that' | | 14 | Long |Pointer to a buffer that' | ||
- | | 18 | Long |Block device driver : number of sector to read. A sector length is normally specified by the BPB. | + | | 18 | Long |Block device driver : number of sector to read. A sector length is normally specified by the BPB. | |
- | Character device driver : Buffer size. | | + | | | |Character device driver : Buffer size. | |
| 22 | Long |Block device driver only : logical start sector to read from. | | | 22 | Long |Block device driver only : logical start sector to read from. | | ||
Line 248: | Line 248: | ||
===== 0x05 - Read no wait ===== | ===== 0x05 - Read no wait ===== | ||
- | Command ID : 0x05 (C_NDREAD) | + | **Command ID :** 0x05 (C_NDREAD) |
**Availability :** Character | **Availability :** Character | ||
Line 415: | Line 415: | ||
- | BIOS Parameter Block (BPB) | + | ====== |
I will not explain this structure as there is plenty of informations about it on the internet. | I will not explain this structure as there is plenty of informations about it on the internet. | ||
+ | |||
Starting from wikipedia : http:// | Starting from wikipedia : http:// | ||
+ | |||
Just read everything you can about FAT12 and FAT16. 95% of these also apply to Human68k. | Just read everything you can about FAT12 and FAT16. 95% of these also apply to Human68k. | ||
- | Most of difference is the byte ordering, which is big endian instead of little endian. The structure is also a bit different. From my ddk.h file : | ||
- | Code: [Select] | ||
+ | Most of difference is the byte ordering, which is big endian instead of little endian. The structure is also a bit different. | ||
+ | |||
+ | From my ddk.h file : | ||
+ | |||
+ | < | ||
struct bpb { | struct bpb { | ||
UWORD bpb_nbyte; | UWORD bpb_nbyte; | ||
Line 433: | Line 439: | ||
ULONG bpb_huge; | ULONG bpb_huge; | ||
}; | }; | ||
+ | </ | ||
See ? Only the " | See ? Only the " | ||
x68000/writing_drivers.txt · Last modified: 2019/08/27 20:45 by 127.0.0.1