Before this commit, decaf was crashing, raising an ErrorExtensionNotPresent exception. This commit logs missing extensions before letting decaf quitting.
SAVEInitSaveDir wants to create a directory hierarchy under usr/save/...
on Linux the create_directory call will fail because it only lets you create one directory at a time, so use create_directories instead.
This was not a problem on Windows because the /std:c++latest compiler option causes create_directory to behave the same as create_directories.
This commit fixes NES and SNES vc games which were working on Windows but not Linux.
On a real coreinit.rpl it will try acquire callerModule from LR regardless
of whether moduleHandle is set, however that makes it difficult for our HLE
functions to call this function.
Previous behavior was to use a struct. This was causing be2_array
instantiations to use be2_struct for be2_array_item_type instead of be2_val.
The upshot of this was that on Linux builds, byte order would be reversed for
bitfields wrapped in be2_array because be2_struct doesn't do endian reversal.
When DECAF_USE_STDLAYOUT_BITFIELD is not defined, bitfields were already unions,
which is why this behavior did not manifest on Windows.
This commit resolves several programs which were working on Windows but not
Linux and also addresses issue #537 on github.
* This resolves several issues that I found relating to threads being
joined multiple times (because decaf::waitForExit() calls
decaf::shutdown() which in some cases results in the shutdown code for
some modules being called multiple times).
* I also ensured that stop() functions do not try to join threads
automatically - that's for join() to do.
* At this point, decaf-cli exits correctly both on RPX exit and on
timeout.
* This is performed by sending an IOS_Ioctl to /dev/ppc_app when the
Cafe kernel exit() function is called.
* Some minor changes were made in order to accomodate this, for example
there is a new MCP IPC enumeration holding possible ioctl commands for
ppc_app.
* For IOS/Cafe Kernel code in which the join() function performs
shutdown routines, the shutdown code was moved into a separate stop()
function so that the join() function actualy waits for the processes to
exit normally.
* This includes the IOS kernel/hardware/alarm/worker threads and the
Cafe Kernel thread.