mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-12 11:29:29 +00:00
scsicdrom: Move test_unit_ready.
Make it a separate method like scsihd.
This commit is contained in:
parent
05da1708eb
commit
a605c435b6
|
@ -60,7 +60,7 @@ void ScsiCdrom::process_command()
|
||||||
|
|
||||||
switch (cmd[0]) {
|
switch (cmd[0]) {
|
||||||
case ScsiCommand::TEST_UNIT_READY:
|
case ScsiCommand::TEST_UNIT_READY:
|
||||||
this->switch_phase(ScsiPhase::STATUS);
|
this->test_unit_ready();
|
||||||
break;
|
break;
|
||||||
case ScsiCommand::REWIND:
|
case ScsiCommand::REWIND:
|
||||||
this->illegal_command(cmd);
|
this->illegal_command(cmd);
|
||||||
|
@ -198,6 +198,12 @@ void ScsiCdrom::read(const uint32_t lba, uint16_t nblocks, const uint8_t cmd_len
|
||||||
this->switch_phase(ScsiPhase::DATA_IN);
|
this->switch_phase(ScsiPhase::DATA_IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ScsiCdrom::test_unit_ready()
|
||||||
|
{
|
||||||
|
this->switch_phase(ScsiPhase::STATUS);
|
||||||
|
return ScsiError::NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
void ScsiCdrom::inquiry() {
|
void ScsiCdrom::inquiry() {
|
||||||
int page_num = cmd_buf[2];
|
int page_num = cmd_buf[2];
|
||||||
int alloc_len = cmd_buf[4];
|
int alloc_len = cmd_buf[4];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
DingusPPC - The Experimental PowerPC Macintosh emulator
|
DingusPPC - The Experimental PowerPC Macintosh emulator
|
||||||
Copyright (C) 2018-23 divingkatae and maximum
|
Copyright (C) 2018-24 divingkatae and maximum
|
||||||
(theweirdo) spatium
|
(theweirdo) spatium
|
||||||
|
|
||||||
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
||||||
|
@ -46,6 +46,7 @@ public:
|
||||||
virtual bool get_more_data() override;
|
virtual bool get_more_data() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
int test_unit_ready();
|
||||||
void read(uint32_t lba, uint16_t nblocks, uint8_t cmd_len);
|
void read(uint32_t lba, uint16_t nblocks, uint8_t cmd_len);
|
||||||
void inquiry();
|
void inquiry();
|
||||||
void mode_sense();
|
void mode_sense();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user