| 320 | } |
| 321 | |
| 322 | void ScsiController::DataIn() |
| 323 | { |
| 324 | if (!IsDataIn()) { |
| 325 | // Minimum execution time |
| 326 | if (execstart > 0) { |
| 327 | Sleep(); |
| 328 | } |
| 329 | |
| 330 | // If the length is 0, go to the status phase |
| 331 | if (!HasValidLength()) { |
| 332 | Status(); |
| 333 | return; |
| 334 | } |
| 335 | |
| 336 | LogTrace("Data In phase"); |
| 337 | SetPhase(phase_t::datain); |
| 338 | |
| 339 | GetBus().SetMSG(false); |
| 340 | GetBus().SetCD(false); |
| 341 | GetBus().SetIO(true); |
| 342 | |
| 343 | ResetOffset(); |
| 344 | |
| 345 | return; |
| 346 | } |
| 347 | |
| 348 | Send(); |
| 349 | } |
| 350 | |
| 351 | void ScsiController::DataOut() |
| 352 | { |