scsicdrom: Move inquiry info to class fields.

Like scsihd.
This commit is contained in:
joevt 2024-03-09 23:58:39 -08:00 committed by dingusdev
parent 6a30ef7017
commit 9cf91328c1
2 changed files with 8 additions and 7 deletions

View File

@ -32,10 +32,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
using namespace std;
static char cdrom_vendor_sony_id[] = "SONY ";
static char cdu8003a_product_id[] = "CD-ROM CDU-8003A";
static char cdu8003a_revision_id[] = "1.9a";
ScsiCdrom::ScsiCdrom(std::string name, int my_id) : CdromDrive(), ScsiDevice(name, my_id)
{
}
@ -221,9 +217,9 @@ void ScsiCdrom::inquiry() {
this->data_buf[5] = 0;
this->data_buf[6] = 0;
this->data_buf[7] = 0x18; // supports synchronous xfers and linked commands
std::memcpy(&this->data_buf[8], cdrom_vendor_sony_id, 8);
std::memcpy(&this->data_buf[16], cdu8003a_product_id, 16);
std::memcpy(&this->data_buf[32], cdu8003a_revision_id, 4);
std::memcpy(&this->data_buf[8], vendor_info, 8);
std::memcpy(&this->data_buf[16], prod_info, 16);
std::memcpy(&this->data_buf[32], rev_info, 4);
this->bytes_out = 36;
this->msg_buf[0] = ScsiMessage::COMMAND_COMPLETE;

View File

@ -53,6 +53,11 @@ private:
bool eject_allowed = true;
int bytes_out = 0;
uint8_t data_buf[2048] = {};
//inquiry info
char vendor_info[9] = "SONY ";
char prod_info[17] = "CD-ROM CDU-8003A";
char rev_info[5] = "1.9a";
};
#endif // SCSI_CDROM_H