if (busy && !select && !rs->databusoutput) {
if (countbits(rs->data_write) != 1) {
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi: invalid arbitration scsi id mask! (%02x)\n"), rs->data_write);
+ write_log(_T("raw_scsi: invalid arbitration scsi id mask! (%02x) %08x\n"), rs->data_write, M68K_GETPC);
#endif
return;
}
rs->bus_phase = SCSI_SIGNAL_PHASE_ARBIT;
rs->initiator_id = getbit(rs->data_write);
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi: arbitration initiator id %d (%02x)\n"), rs->initiator_id, rs->data_write);
+ write_log(_T("raw_scsi: arbitration initiator id %d (%02x) %08x\n"), rs->initiator_id, rs->data_write, M68K_GETPC);
#endif
} else if (!busy && select) {
if (countbits(rs->data_write) > 2 || rs->data_write == 0) {
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi: invalid scsi id selected mask (%02x)\n"), rs->data_write);
+ write_log(_T("raw_scsi: invalid scsi id selected mask (%02x) %08x\n"), rs->data_write, M68K_GETPC);
#endif
return;
}
rs->initiator_id = -1;
rs->bus_phase = SCSI_SIGNAL_PHASE_SELECT_1;
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi: selected scsi id mask (%02x)\n"), rs->data_write);
+ write_log(_T("raw_scsi: selected scsi id mask (%02x) %08x\n"), rs->data_write, M68K_GETPC);
#endif
raw_scsi_set_signal_phase(rs, busy, select, atn);
}
rs->target_id = i;
rs->target = rs->device[rs->target_id];
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi: selected id %d\n"), rs->target_id);
+ write_log(_T("raw_scsi: selected id %d %08x\n"), rs->target_id, M68K_GETPC);
#endif
rs->io |= SCSI_IO_BUSY;
}
if (i == rs->initiator_id)
continue;
if ((rs->data_write & (1 << i)) && !rs->device[i]) {
- write_log(_T("raw_scsi: selected non-existing id %d\n"), i);
+ write_log(_T("raw_scsi: selected non-existing id %d %08x\n"), i, M68K_GETPC);
}
}
}
break;
case SCSI_SIGNAL_PHASE_ARBIT:
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi: arbitration\n"));
+ write_log(_T("raw_scsi: arbitration %08x\n"), M68K_GETPC);
#endif
v = rs->data_write;
break;
case SCSI_SIGNAL_PHASE_DATA_IN:
#if RAW_SCSI_DEBUG > 2
scsi_receive_data(sd, &v, false);
- write_log(_T("raw_scsi: read data byte %02x (%d/%d)\n"), v, sd->offset, sd->data_len);
+ write_log(_T("raw_scsi: read data byte %02x (%d/%d) %08x\n"), v, sd->offset, sd->data_len, M68K_GETPC);
#endif
if (scsi_receive_data(sd, &v, next)) {
#if RAW_SCSI_DEBUG
case SCSI_SIGNAL_PHASE_STATUS:
#if RAW_SCSI_DEBUG
if (!nodebug || next)
- write_log(_T("raw_scsi: status byte read %02x. Next=%d\n"), sd->status, next);
+ write_log(_T("raw_scsi: status byte read %02x. Next=%d PC=%08x\n"), sd->status, next, M68K_GETPC);
#endif
v = sd->status;
if (next) {
case SCSI_SIGNAL_PHASE_MESSAGE_IN:
#if RAW_SCSI_DEBUG
if (!nodebug || next)
- write_log(_T("raw_scsi: message byte read %02x. Next=%d\n"), sd->status, next);
+ write_log(_T("raw_scsi: message byte read %02x. Next=%d PC=%08x\n"), sd->status, next, M68K_GETPC);
#endif
v = sd->status;
rs->status = v;
break;
default:
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi_get_data but bus phase is %d!\n"), rs->bus_phase);
+ write_log(_T("raw_scsi_get_data but bus phase is %d %08x!\n"), rs->bus_phase, M68K_GETPC);
#endif
break;
}
sd->cmd[sd->offset++] = data;
len = scsicmdsizes[sd->cmd[0] >> 5];
#if RAW_SCSI_DEBUG > 1
- write_log(_T("raw_scsi: got command byte %02x (%d/%d)\n"), data, sd->offset, len);
+ write_log(_T("raw_scsi: got command byte %02x (%d/%d) %08x\n"), data, sd->offset, len, M68K_GETPC);
#endif
if (sd->offset >= len) {
if (rs->msglun >= 0) {
break;
case SCSI_SIGNAL_PHASE_DATA_OUT:
#if RAW_SCSI_DEBUG > 2
- write_log(_T("raw_scsi: write data byte %02x (%d/%d)\n"), data, sd->offset, sd->data_len);
+ write_log(_T("raw_scsi: write data byte %02x (%d/%d) %08x\n"), data, sd->offset, sd->data_len, M68K_GETPC);
#endif
if (scsi_send_data(sd, data)) {
#if RAW_SCSI_DEBUG
sd->msgout[sd->offset++] = data;
len = getmsglen(sd->msgout, sd->offset);
#if RAW_SCSI_DEBUG
- write_log(_T("raw_scsi_put_data got message %02x (%d/%d)\n"), data, sd->offset, len);
+ write_log(_T("raw_scsi_put_data got message %02x (%d/%d) %08x\n"), data, sd->offset, len, M68K_GETPC);
#endif
if (sd->offset >= len) {
#if RAW_SCSI_DEBUG