DummySCSIDevice.cc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #include "DummySCSIDevice.hh"
  2. #include "serialize.hh"
  3. namespace openmsx {
  4. void DummySCSIDevice::reset()
  5. {
  6. // do nothing
  7. }
  8. bool DummySCSIDevice::isSelected()
  9. {
  10. return false;
  11. }
  12. unsigned DummySCSIDevice::executeCmd(
  13. const byte* /*cdb*/, SCSI::Phase& /*phase*/, unsigned& /*blocks*/)
  14. {
  15. // do nothing
  16. return 0;
  17. }
  18. unsigned DummySCSIDevice::executingCmd(SCSI::Phase& /*phase*/, unsigned& /*blocks*/)
  19. {
  20. return 0;
  21. }
  22. byte DummySCSIDevice::getStatusCode()
  23. {
  24. return SCSI::ST_CHECK_CONDITION;
  25. }
  26. int DummySCSIDevice::msgOut(byte /*value*/)
  27. {
  28. return 0; // TODO: check if this is sane, but it doesn't seem to be used anyway
  29. }
  30. byte DummySCSIDevice::msgIn()
  31. {
  32. return 0; // TODO: check if this is sane, but it doesn't seem to be used anyway
  33. }
  34. void DummySCSIDevice::disconnect()
  35. {
  36. // do nothing
  37. }
  38. void DummySCSIDevice::busReset()
  39. {
  40. // do nothing
  41. }
  42. unsigned DummySCSIDevice::dataIn(unsigned& blocks)
  43. {
  44. blocks = 0;
  45. return 0;
  46. }
  47. unsigned DummySCSIDevice::dataOut(unsigned& blocks)
  48. {
  49. blocks = 0;
  50. return 0;
  51. }
  52. template<typename Archive>
  53. void DummySCSIDevice::serialize(Archive& /*ar*/, unsigned /*version*/)
  54. {
  55. // nothing
  56. }
  57. INSTANTIATE_SERIALIZE_METHODS(DummySCSIDevice);
  58. REGISTER_POLYMORPHIC_INITIALIZER(SCSIDevice, DummySCSIDevice, "DummySCSIDevice");
  59. } // namespace openmsx