User Tools

Site Tools


x68000:writing_drivers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
x68000:writing_drivers [2014/07/11 00:47] eidisx68000:writing_drivers [2014/07/11 01:01] – [0x03 - IOCTL input] 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" and a pointer is 32 bits (long).   * All data types are CPU specific : M68K family. So, byte ordering is always "Big Endian" and a pointer is 32 bits (long).
- 
  
 ====== 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 "A"bort, "R"etry and "I"gnore line, and E_**** will show an appropriate error message. "Result status" member can be any combination of S_**** flags (ORed together), but only one E_**** can be set.+This list contains all acceptable values to fill the result status flags in the request packet header. S_**** flags will display (or hide) the "A"bort, "R"etry and "I"gnore line, and E_**** will show an appropriate error message. 
 + 
 +"Result status" member can be any combination of S_**** flags (ORed together), but only one E_**** can be set.
  
   * 0x1000 - S_ABORT : "A"bort the whole request.   * 0x1000 - S_ABORT : "A"bort the whole request.
Line 155: Line 155:
  
   
-Output parameters :+**Output parameters :**
  
 ^  Position  ^  Type  ^  Description  ^ ^  Position  ^  Type  ^  Description  ^
Line 220: Line 220:
  
 ^  Position  ^  Type  ^  Description  ^ ^  Position  ^  Type  ^  Description  ^
-|  14  |  Long  |  Pointer to a buffer that'll contain readed data from the unit. The driver is responsible of filling this buffer. +|  14  |  Long  |Pointer to a buffer that'll contain readed data from the unit. The driver is responsible of filling this buffer. 
-|  18  |  Long  |  Buffer size  |+|  18  |  Long  |Buffer size  |
   
 **Output parameters :** none **Output parameters :** none
Line 415: Line 415:
  
  
-BIOS Parameter Block (BPB)+====== 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://en.wikipedia.org/wiki/BIOS_parameter_block Starting from wikipedia : http://en.wikipedia.org/wiki/BIOS_parameter_block
 +
 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 :
 +
 +<file>
 struct bpb { struct bpb {
   UWORD bpb_nbyte; /* Bytes per sector */   UWORD bpb_nbyte; /* Bytes per sector */
Line 433: Line 439:
   ULONG bpb_huge; /* Size in sectors if bpb_nsize == 0 (32 bits) */   ULONG bpb_huge; /* Size in sectors if bpb_nsize == 0 (32 bits) */
 }; };
 +</file>
  
 See ? Only the "number of FAT" and "number of reserved sectors" members are swapped. See ? Only the "number of FAT" and "number of reserved sectors" members are swapped.
  
x68000/writing_drivers.txt · Last modified: 2019/08/27 20:45 by 127.0.0.1