Power Button Uzebox v1.2
-
- Posts: 2
- Joined: Mon Feb 01, 2016 5:06 am
Power Button Uzebox v1.2
I just finished assembly on my uzebox v1.2 and everything works as expected except for the power button. This seems to have no function as the unit starts automatically on being plugged in and does not seem to turn the unit off once powered either. Is this normal?
Re: Power Button Uzebox v1.2
Yes it is normal as the kernel doesn't yet do anything with the power button. It is funny after all these years that detail only had attention a couple times.
I'd assume it would be rather small and trivial to add something that runs around the time game pads are read(where it checks for the button combination for softreset). A bit too lazy to check which pins to write the real code and all that, should probably be in assembly anyway. So as pseudocode I would say
gives us power button functionality as we would expect.
I'd assume it would be rather small and trivial to add something that runs around the time game pads are read(where it checks for the button combination for softreset). A bit too lazy to check which pins to write the real code and all that, should probably be in assembly anyway. So as pseudocode I would say
Code: Select all
if(PowerButtonDown()){
while(PowerButtonDown());//wait for release
SetLedOff();//turn off LED
TurnAD725Off();//turn off display
TurnSDOff();//don't let SD drain too much power
TurnESP8266Off();//this module drinks the power
TurnSPIRamOff();//low power the expansion ram
//essentially the machine is as low power as can be and looks turned off now
while(!PowerButtonDown());//pushed again
while(PowerButtonDown());//released
SoftReset();//reset the machine to appear as a cold boot
}
Re: Power Button Uzebox v1.2
Eh, naturally throw in some debounce delay in there since it is a physical contact button.
-
- Posts: 2
- Joined: Mon Feb 01, 2016 5:06 am
Re: Power Button Uzebox v1.2
Thanks D3thAdd3r!