nn_boss: Large rework with various improvements

Lots of internal changes. On the surface this only fixes a crash in Mario & Sonic Rio 2016 (at least what I saw from my testing) but it may affect more games.

Summary of changes:
- Rewrite code to use newer cafeExportRegisterFunc
- Simplify code by merging namespaces and structs of the same types
- Correctly set ppc vtables for the virtual boss classes
- Fix some wrong function definitions and implement a little bit more of the boss API (mainly constructors and destructors)
This commit is contained in:
Exzap 2024-04-03 01:45:05 +02:00
parent 3e467e220e
commit 51072b510c
4 changed files with 1325 additions and 1388 deletions

File diff suppressed because it is too large Load Diff

View File

@ -44,6 +44,7 @@ const std::map<LogType, std::string> g_logging_window_mapping
{LogType::CoreinitThread, "Coreinit Thread"},
{LogType::NN_NFP, "nn::nfp"},
{LogType::NN_FP, "nn::fp"},
{LogType::NN_BOSS, "nn::boss"},
{LogType::GX2, "GX2"},
{LogType::SoundAPI, "Audio"},
{LogType::InputAPI, "Input"},

View File

@ -35,6 +35,7 @@ enum class LogType : sint32
NN_OLV = 23,
NN_NFP = 13,
NN_FP = 24,
NN_BOSS = 25,
TextureReadback = 29,

View File

@ -2232,6 +2232,7 @@ void MainWindow::RecreateMenu()
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::CoreinitThread), _("&Coreinit Thread API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::CoreinitThread));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::NN_NFP), _("&NN NFP"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::NN_NFP));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::NN_FP), _("&NN FP"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::NN_FP));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::NN_BOSS), _("&NN BOSS"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::NN_BOSS));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::GX2), _("&GX2 API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::GX2));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::SoundAPI), _("&Audio API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::SoundAPI));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::InputAPI), _("&Input API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::InputAPI));