As discussed in libretro#5357; controller_patcher is now optional. It's
off by default; though this could be changed with a simple makefile
tweak (ENABLE_CONTROLLER_PATCHER ?= 1, perhaps?)
To re-enable controller_patcher; append ENABLE_CONTROLLER_PATCHER=1 to
your usual make command.
controller_patcher was the only user of c++ constructors in the Wii U
port, so you'll need 26a006c in your tree otherwise you will have a
blackscreen on startup.
The old setup relied on there being at least one constructor *or* the
value of *__CTOR_LIST__ being NULL. Neither of these are guaranteed; and
having no C++ constructors actually resulted in a random value being
read (which passed the NULL check!). This new setup uses the
__CTOR_END__ symbol; which is a pointer to just after the end of the
list. When there are no constructors, it has the same value as
__CTOR_LIST__; so the while loop is never entered.
This fix also allows us to re-enable destructors; in case they're ever
needed.
Thanks for @gblues for finding the strcmp bug.
I've removed the opcode display since it's a bit unsafe - if the
exception handler causes a DSI; Cafe OS will take over and freeze up the
console. This is obviously not a good thing. There are possible
situations where memory is executable and not readable; so this is just
about covering all bases until a better solution can be implemented.
Maybe we can experiment a bit more once this handler isn't being used so
often ;)
Coreinit seems to get special handles, so adding a special case should
make its relative addresses actually become helpful again. Let's just
hope __PPCExit stays at 0x180!
Also added the violating opcode to the DSI message; may have to move it
in case it pushes stuff off the end of the screen.
Untested at time of commit. Hopefully this should make debugging #5357 a
bit easier...
this works if MSYS2 is installed in the default path
allow building RetroArch from the command pallete
Allow building, and starting RetroArch via vscode Tasks
use 3 whitespaces for tabs