2020-08-28 14:18:02 +00:00
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// SCSI Target Emulator RaSCSI (*^..^*)
|
|
|
|
|
// for Raspberry Pi
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp)
|
|
|
|
|
// Copyright (C) 2014-2020 GIMONS
|
2021-03-08 01:29:30 +00:00
|
|
|
|
// Copyright (C) akuker
|
2020-08-28 14:18:02 +00:00
|
|
|
|
//
|
2021-03-08 01:29:30 +00:00
|
|
|
|
// Licensed under the BSD 3-Clause License.
|
|
|
|
|
// See LICENSE file in the project root folder.
|
2020-08-28 14:18:02 +00:00
|
|
|
|
//
|
2021-03-08 01:29:30 +00:00
|
|
|
|
// [ SCSI NEC "Genuine" Hard Disk]
|
2020-08-28 14:18:02 +00:00
|
|
|
|
//
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "scsihd.h"
|
|
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
|
//
|
|
|
|
|
// SCSI hard disk (PC-9801-55 NEC genuine /Anex86/T98Next)
|
|
|
|
|
//
|
|
|
|
|
//===========================================================================
|
|
|
|
|
class SCSIHD_NEC : public SCSIHD
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// Basic Functions
|
2021-03-08 01:29:30 +00:00
|
|
|
|
SCSIHD_NEC(); // Constructor
|
2021-07-26 18:33:36 +00:00
|
|
|
|
BOOL Open(const Filepath& path, BOOL attn = TRUE); // Open
|
2020-08-28 14:18:02 +00:00
|
|
|
|
|
|
|
|
|
// commands
|
2021-07-26 18:33:36 +00:00
|
|
|
|
int Inquiry(const DWORD *cdb, BYTE *buf, DWORD major, DWORD minor); // INQUIRY command
|
2020-08-28 14:18:02 +00:00
|
|
|
|
|
|
|
|
|
// Internal processing
|
2021-07-26 18:33:36 +00:00
|
|
|
|
int AddError(BOOL change, BYTE *buf); // Add error
|
|
|
|
|
int AddFormat(BOOL change, BYTE *buf); // Add format
|
|
|
|
|
int AddDrive(BOOL change, BYTE *buf); // Add drive
|
2020-08-28 14:18:02 +00:00
|
|
|
|
|
|
|
|
|
private:
|
2021-03-08 01:29:30 +00:00
|
|
|
|
int cylinders; // Number of cylinders
|
|
|
|
|
int heads; // Number of heads
|
|
|
|
|
int sectors; // Number of sectors
|
|
|
|
|
int sectorsize; // Sector size
|
|
|
|
|
off64_t imgoffset; // Image offset
|
|
|
|
|
off64_t imgsize; // Image size
|
2020-08-28 14:18:02 +00:00
|
|
|
|
};
|