Yes, the SoftReset() function does that. The function does not return (so calling it you should end up in the bootloader provided you hold a button down if it is in "Game" mode - normally you might add it to an "Exit" or similar menu entry in the game, it may feel a bit quirky at first, but it is likely an easy thing to realize that it just needs a little longer push for a proper return to the loader).
Uzebox Bootloader V5
Re: New bootloader
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: New bootloader
So, SoftReset() will reboot the Uzebox? The user would need to hold the B button to have the bootloader trigger then?
In this case, what is still in RAM? When you reflash a game does that also wipe whatever is in RAM?
In this case, what is still in RAM? When you reflash a game does that also wipe whatever is in RAM?
Re: New bootloader
Yes, SoftReset() does a reboot using the watchdog (the START + SELECT + B + Y combo actually calls that). Any button can be held down to enter the bootloader (if you release all buttons fast, then if the bootloader was in "Game" mode, it will see that no button is held, so will restart the game). In the new bootloader I can add some small tweaks to shorten the required button press (currently you would have to hold it for nearly a second which is due to that I wait first for power & sync stabilization and only read the controllers then), theoretically it can be shortened down to as low as about 50ms.nicksen782 wrote: ↑Sat Nov 18, 2017 1:15 am So, SoftReset() will reboot the Uzebox? The user would need to hold the B button to have the bootloader trigger then?
In this case, what is still in RAM? When you reflash a game does that also wipe whatever is in RAM?
When you soft-reset, the first thing happening is the bootloader starting. The old bootloader is a C program, it wipes the .bss area by the C init, and sets up the stack at 0x10FF, so those parts are overwritten. The new bootloader wipes nearly all the RAM. If you mean the new game load API, then you can most reasonably expect a complete wipe happening, so passing any information to a newly booted game is only possible by EEPROM or SD Card (for example like Emuze which can manage stuff in the EEPROM, thus affecting other games).
Re: New bootloader
I made another minor upgrade (V.5.0.08):
Now soft-reset is smoother as the bootloader now starts sampling the controller as soon as possible to see whether anything is held down. So an user-triggered soft-reset will extremely likely end up within the game selector menu (you would have to tap the button very slightly to achieve a reset returning to the game).
By the way the bootloader's controller handling is also based off of the experiment with Flight of a Dragon where I made it capable to support wireless SNES controllers. So it should also be capable to work with those, enabling a pathway to slowly transition towards supporting those proper.
Anything else? Alec: What do you think about the capability of requesting burning a new game? (Currently it is in) I really need some more feedback before propagating this to master (and maybe Alec towards the actual kits), this is a rather significant transition.
Now soft-reset is smoother as the bootloader now starts sampling the controller as soon as possible to see whether anything is held down. So an user-triggered soft-reset will extremely likely end up within the game selector menu (you would have to tap the button very slightly to achieve a reset returning to the game).
By the way the bootloader's controller handling is also based off of the experiment with Flight of a Dragon where I made it capable to support wireless SNES controllers. So it should also be capable to work with those, enabling a pathway to slowly transition towards supporting those proper.
Anything else? Alec: What do you think about the capability of requesting burning a new game? (Currently it is in) I really need some more feedback before propagating this to master (and maybe Alec towards the actual kits), this is a rather significant transition.
Re: New bootloader
My vote is to keep game loading support in there, and have a strong policy/warnings in place so people don't abuse it.
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: New bootloader
Alec did say this earlier. It would be nice but could be a concern. What if the game could request the game to flash but instead of flashing it could already be selected by the bootloader?
I could be open to the idea of "game" that could flash a new bootloader but there would need to be safeties in place.
Re: New bootloader
I think you should leave it in, and then have a dialog box asking "Are you sure you want to flash example.uze?" It would make sure it's not trying to flash something you don't want, but it would still look good at the same time.
EDIT: Is it possible to have the bootloader draw a dialog box right on top of the running game? Like have the bootloader be called without clearing the screen?
EDIT: Is it possible to have the bootloader draw a dialog box right on top of the running game? Like have the bootloader be called without clearing the screen?