Fix SCSI HD interface so it can be added to a bus.

This commit is contained in:
Maxim Poliakovski 2022-10-22 23:41:19 +02:00
parent aa1d23e08b
commit c2abc89a3b
2 changed files with 13 additions and 7 deletions

View File

@ -19,16 +19,17 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file Sander-Wozniak Machine 3 (SWIM3) emulation. */
/** @file Generic SCSI Hard Disk emulation. */
#include <fstream>
#include <limits>
#include <stdio.h>
#include <devices/deviceregistry.h>
#include <devices/common/scsi/scsi_hd.h>
#include <machines/machinebase.h>
#include <machines/machineproperties.h>
#include <devices/common/scsi/sc53c94.h>
#include <loguru.hpp>
#include <fstream>
#include <limits>
#include <stdio.h>
#define sector_size 512
@ -51,6 +52,11 @@ ScsiHardDisk::ScsiHardDisk() {
this->hdd_img.seekg(0, std::ios_base::beg);
}
void ScsiHardDisk::notify(ScsiMsg msg_type, int param)
{
LOG_F(INFO, "SCSI_HD: message of type %d received", msg_type);
}
int ScsiHardDisk::test_unit_ready() {
return 0x0;
}

View File

@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file SCSI hard drive support */
/** @file SCSI hard drive definitions. */
#ifndef SCSI_HD_H
#define SCSI_HD_H
@ -35,7 +35,7 @@ public:
ScsiHardDisk();
~ScsiHardDisk() = default;
virtual void notify(ScsiMsg msg_type, int param) = 0;
void notify(ScsiMsg msg_type, int param);
int test_unit_ready();
int req_sense(uint8_t alloc_len);