@krru,
post #1
Sam sobie odpowiem bo znalazłem opis na stronach AROSa i to nawet zadziałalo:
Na stronie https://en.wikibooks.org/wiki/Aros/Developer/Docs/Devices w rozdziale 4.4
opisano, co trzeba zaimplentować by takie najprostsze scsi.device zadziałało. Zacytuje:
4.4. A MINIMAL DISK COMMAND SUBSET
It is clear that to implement a full Amiga disk driver supporting removable media is a considerable task, and I don't even pretend to know all that is required. But if all you want is a simple hard disk driver, a very small subset of the commands is sufficient. To begin with, Expunge() can be stubbed out to always return zero, indicating a delayed expunge which will never get done. AbortIO() can be stubbed out to always return a nonzero result, indicating that it failed. Unit structures can be done away with; you can store anything in the "io_Unit" field of the I/O request. In my own device driver I just store the SCSI device number and a few flags there. You can just return I/O error #20 (general catch-all) for anything that went wrong, except possibly unimplemented commands. Quick I/O need not be done; just always clear IOF_QUICK and forget about it. Send all I/O requests to a single internal task for processing. Finally, the commands can be implemented as follows:
CMD_READ, CMD_WRITE: implement fully
TD_FORMAT: same as CMD_WRITE
TD_GETDRIVETYPE: return 3.5" drive
CMD_RESET, CMD_UPDATE,
CMD_CLEAR, CMD_STOP,
CMD_START, CMD_FLUSH,
TD_MOTOR, TD_SEEK,
TD_REMOVE, TD_CHANGENUM,
TD_CHANGESTATE,
TD_PROTSTATUS,
TD_ADDCHANGEINT,
TD_REMCHANGEINT: clear "io_Actual" and return
Others: reject with IOERR_NOCMD
The resulting driver works perfectly with fast and slow file systems, and all the disk edit/repair utilities I've tried it with. If you are bringing up a hard disk from scratch, you can always get a hack driver to work, then write a "proper" one with the hard disk running.