00001 /* ES40 emulator. 00002 * Copyright (C) 2007-2008 by the ES40 Emulator Project 00003 * 00004 * WWW : http://sourceforge.net/projects/es40 00005 * E-mail : camiel@camicom.com 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation; either version 2 00010 * of the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 * 00021 * Although this is not required, the author would appreciate being notified of, 00022 * and receiving any modifications you may make to the source code that might serve 00023 * the general public. 00024 */ 00025 00038 #if !defined(__SCSIDEVICE__H__) 00039 #define __SCSIDEVICE__H__ 00040 00047 class CSCSIDevice 00048 { 00049 public: 00050 CSCSIDevice(void); 00051 virtual ~CSCSIDevice(void); 00052 00053 void scsi_register(int busno, class CSCSIBus* with, int target); 00054 00055 bool scsi_arbitrate(int bus); 00056 bool scsi_select(int bus, int target); 00057 virtual void scsi_select_me(int bus); 00058 void scsi_set_phase(int bus, int phase); 00059 int scsi_get_phase(int bus); 00060 void scsi_free(int bus); 00061 00062 virtual size_t scsi_expected_xfer_me(int bus); 00063 size_t scsi_expected_xfer(int bus); 00064 00065 virtual void* scsi_xfer_ptr_me(int bus, size_t bytes); 00066 void* scsi_xfer_ptr(int bus, size_t bytes); 00067 00068 virtual void scsi_xfer_done_me(int bus); 00069 void scsi_xfer_done(int bus); 00070 protected: 00071 class CSCSIBus* scsi_bus[10]; 00074 int scsi_initiator_id[10]; 00075 }; 00076 #endif