ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/scsi.cpp
(Generate patch)

Comparing BasiliskII/src/scsi.cpp (file contents):
Revision 1.1.1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.5 by cebix, 2002-01-26T18:10:13Z

# Line 1 | Line 1
1   /*
2   *  scsi.cpp - SCSI Manager
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2002 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 96 | Line 96 | static int16 exec_tib(uint32 tib)
96                  uint32 ptr = ReadMacInt32(tib); tib += 4;
97                  uint32 len = ReadMacInt32(tib); tib += 4;
98  
99 <                D(bug(" %d %08x %d\n", cmd, ptr, len));
99 > #if DEBUG
100 >                const char *cmd_str;
101 >                switch (cmd) {
102 >                        case scInc:   cmd_str = "INC  "; break;
103 >                        case scNoInc: cmd_str = "NOINC"; break;
104 >                        case scAdd:   cmd_str = "ADD  "; break;
105 >                        case scMove:  cmd_str = "MOVE "; break;
106 >                        case scLoop:  cmd_str = "LOOP "; break;
107 >                        case scNop:   cmd_str = "NOP  "; break;
108 >                        case scStop:  cmd_str = "STOP "; break;
109 >                        case scComp:  cmd_str = "COMP "; break;
110 >                        default:      cmd_str = "???  "; break;
111 >                }
112 >                D(bug(" %s(%d) %08x %d\n", cmd_str, cmd, ptr, len));
113 > #endif
114  
115                  switch (cmd) {
116                          case scInc:
# Line 218 | Line 232 | int16 SCSISelect(int id)
232  
233   int16 SCSICmd(int cmd_length, uint8 *cmd)
234   {
235 <        D(bug("SCSICmd len %d, cmd %08x%08x%08x\n", cmd_length, ntohl(0[(uint32 *)cmd]), ntohl(1[(uint32 *)cmd]), ntohl(2[(uint32 *)cmd])));
235 > #if DEBUG
236 >        switch (cmd_length) {
237 >                case 6:
238 >                        D(bug("SCSICmd len 6, cmd %02x %02x %02x %02x %02x %02x\n", cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5]));
239 >                        break;
240 >                case 10:
241 >                        D(bug("SCSICmd len 10, cmd %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5], cmd[6], cmd[7], cmd[8], cmd[9]));
242 >                        break;
243 >                case 12:
244 >                        D(bug("SCSICmd len 12, cmd %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5], cmd[6], cmd[7], cmd[8], cmd[9], cmd[10], cmd[11]));
245 >                        break;
246 >                default:
247 >                        D(bug("SCSICmd bogus length %d\n", cmd_length));
248 >                        break;
249 >        }
250 > #endif
251 >
252          if (phase != PH_SELECTED)
253                  return scPhaseErr;
254  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines