Ryzee119 / ogx360

Add modern xinput USB support to your Original Xbox :tv: :video_game:
405 stars 62 forks source link

Press Xbox button to power on console #88

Closed erfg12 closed 2 years ago

erfg12 commented 2 years ago

If we do the memory card power mod to the console, can we make the ogx360 send that same command the memory card power button does?

Ryzee119 commented 2 years ago

yes, you'll need to get the sync wire and wire it to one of the GPIO pins on the main arduino module.

Add some code to trigger the output. Probably here https://github.com/Ryzee119/ogx360/blob/cf04784d1f30a41834a44a1c2f05e8e6f0f3a593/Firmware/src/master.cpp#L134

The code could be like this. This would trigger pin 9 when you press L+R+BLACK+WHITE.

if (_usbd_c->duke.in.L > 0x20 && _usbd_c->duke.in.R > 0x20 &&
    _usbd_c->duke.in.BLACK > 0x20 && _usbd_c->duke.in.WHITE > 0x20)
{
    #define POWER_PIN 9
    digitalWrite(POWER_PIN, 0); //This may need to be 1?
    pinMode(POWER_PIN, OUTPUT);
    delay(100);
    pinMode(POWER_PIN, INPUT);
}

In anycase it is out of the scope of this project.