dingusdev / dingusppc

An experimental emulator
GNU General Public License v3.0
200 stars 21 forks source link

Add support for the CUDA_RESTART_SYSTEM command #62

Closed mihaip closed 3 months ago

mihaip commented 7 months ago

There are cases where when it's necessary (e.g. given uninitialized NVRAM, the Beige G3 with the 10.2 install CD inserted will update the boot device and restart to boot from it).

Restart support was done by wrapping the ppc_exec function in a loop. This uncovered some cases where we were not fully tearing down state (removal of refresh intervals) or resetting it (MMU regions), but with those fixed, we are able to boot the 10.2 install CD to the spinner from an empty state.

maximumspatium commented 7 months ago

We need to properly reset each and every device attached to the particular machine.

mihaip commented 7 months ago

As implemented I destroy the machine object and create a new one, so all attached devices are also torn down. It ends up being more of a shutdown-and-then-startup (as opposed to a restart), though I'm not sure it makes a difference as far as the observed behavior of the guest OS.

maximumspatium commented 3 months ago

@mihaip Adding missing descructors deserves separate commits. New functionality needs its own commit. I'd appreciate it if you could split up this PR.

mihaip commented 3 months ago

@maximumspatium I've split out the destructors into separate commits, does that work for you (making each into a separate PR was going to be a lot of branch juggling). You can review each one independently, and as long as this is not squashed on merge, they will be preserved.