| 660 | } |
| 661 | |
| 662 | void SCSIST::LoadUnload() |
| 663 | { |
| 664 | /* |
| 665 | Table 176 - LOAD UNLOAD command |
| 666 | +=====-========-========-========-========-========-========-========-========+ |
| 667 | | Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| 668 | |Byte | | | | | | | | | |
| 669 | |=====+=======================================================================| |
| 670 | | 0 | Operation code (1Bh) | |
| 671 | |-----+-----------------------------------------------------------------------| |
| 672 | | 1 | Logical unit number | Reserved | Immed | |
| 673 | |-----+-----------------------------------------------------------------------| |
| 674 | | 2 | Reserved | |
| 675 | |-----+-----------------------------------------------------------------------| |
| 676 | | 3 | Reserved | |
| 677 | |-----+-----------------------------------------------------------------------| |
| 678 | | 4 | Reserved | EOT | Reten | Load | |
| 679 | |-----+-----------------------------------------------------------------------| |
| 680 | | 5 | Control | |
| 681 | +=============================================================================+ |
| 682 | */ |
| 683 | bool load = GetController()->GetCmd()[4] & 1; |
| 684 | bool eot = GetController()->GetCmd()[4] & 4; |
| 685 | if (load) { |
| 686 | file.rewind(); |
| 687 | } else if (eot) { |
| 688 | file.seek(0, SEEK_END); |
| 689 | } |
| 690 | if (load & eot){ |
| 691 | GetController()->Error(sense_key::illegal_request, asc::no_additional_sense_information, status::check_condition); |
| 692 | } |
| 693 | EnterStatusPhase(); |
| 694 | } |
| 695 | |
| 696 | void SCSIST::ReadPosition() |
| 697 | { |