mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 20:29:46 +00:00
Heathrow: logging monitor sense status.
This commit is contained in:
parent
958d3ee96a
commit
fc44cdcc83
@ -25,6 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
#include <devices/ioctrl/macio.h>
|
#include <devices/ioctrl/macio.h>
|
||||||
#include <devices/serial/escc.h>
|
#include <devices/serial/escc.h>
|
||||||
#include <devices/sound/awacs.h>
|
#include <devices/sound/awacs.h>
|
||||||
|
#include <endianswap.h>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
#include <machines/machinebase.h>
|
#include <machines/machinebase.h>
|
||||||
|
|
||||||
@ -221,7 +222,7 @@ uint32_t HeathrowIC::mio_ctrl_read(uint32_t offset, int size) {
|
|||||||
break;
|
break;
|
||||||
case 0x38:
|
case 0x38:
|
||||||
LOG_F(9, "read from MIO:Feat_Ctrl register \n");
|
LOG_F(9, "read from MIO:Feat_Ctrl register \n");
|
||||||
res = this->feat_ctrl;
|
res = BYTESWAP_32(this->feat_ctrl);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_F(WARNING, "read from unknown MIO register at %x \n", offset);
|
LOG_F(WARNING, "read from unknown MIO register at %x \n", offset);
|
||||||
@ -261,8 +262,7 @@ void HeathrowIC::mio_ctrl_write(uint32_t offset, uint32_t value, int size) {
|
|||||||
LOG_F(WARNING, "Attempted to write %x to MIO:ID at %x; Address : %x \n", value, offset, ppc_state.pc);
|
LOG_F(WARNING, "Attempted to write %x to MIO:ID at %x; Address : %x \n", value, offset, ppc_state.pc);
|
||||||
break;
|
break;
|
||||||
case 0x38:
|
case 0x38:
|
||||||
LOG_F(9, "write %x to MIO:Feat_Ctrl register \n", value);
|
this->feature_control(BYTESWAP_32(value));
|
||||||
this->feat_ctrl = value;
|
|
||||||
break;
|
break;
|
||||||
case 0x3C:
|
case 0x3C:
|
||||||
LOG_F(9, "write %x to MIO:Aux_Ctrl register \n", value);
|
LOG_F(9, "write %x to MIO:Aux_Ctrl register \n", value);
|
||||||
@ -273,3 +273,16 @@ void HeathrowIC::mio_ctrl_write(uint32_t offset, uint32_t value, int size) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HeathrowIC::feature_control(const uint32_t value)
|
||||||
|
{
|
||||||
|
LOG_F(9, "write %x to MIO:Feat_Ctrl register \n", value);
|
||||||
|
|
||||||
|
this->feat_ctrl = value;
|
||||||
|
|
||||||
|
if (!(this->feat_ctrl & 1)) {
|
||||||
|
LOG_F(9, "Heathrow: Monitor sense enabled");
|
||||||
|
} else {
|
||||||
|
LOG_F(9, "Heathrow: Monitor sense disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -120,6 +120,8 @@ protected:
|
|||||||
uint32_t mio_ctrl_read(uint32_t offset, int size);
|
uint32_t mio_ctrl_read(uint32_t offset, int size);
|
||||||
void mio_ctrl_write(uint32_t offset, uint32_t value, int size);
|
void mio_ctrl_write(uint32_t offset, uint32_t value, int size);
|
||||||
|
|
||||||
|
void feature_control(const uint32_t value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t pci_cfg_hdr[256] = {
|
uint8_t pci_cfg_hdr[256] = {
|
||||||
0x6B,
|
0x6B,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user