Merge pull request #1 from z0mb3/master

Support for FW 5.0.0
This commit is contained in:
dimok789 2016-03-02 17:06:53 +01:00
commit d0316ab885
5 changed files with 27 additions and 22 deletions

View File

@ -16,7 +16,7 @@ sd_loader_elf := ../sd_loader/sd_loader.elf
CFLAGS += -DUSE_SD_LOADER CFLAGS += -DUSE_SD_LOADER
ASFLAGS += -DUSE_SD_LOADER ASFLAGS += -DUSE_SD_LOADER
all: clean setup main532 all: clean setup main532 main500
sd_loader.h: $(sd_loader_elf) sd_loader.h: $(sd_loader_elf)
xxd -i $< | sed "s/unsigned/static const unsigned/g;s/loader/loader/g;s/build_//g" > $@ xxd -i $< | sed "s/unsigned/static const unsigned/g;s/loader/loader/g;s/build_//g" > $@

View File

@ -16,6 +16,17 @@
#elif ((VER == 500) || (VER == 510)) #elif ((VER == 500) || (VER == 510))
#define BAT_SETUP_HOOK_ADDR 0xFFF1D518 #define BAT_SETUP_HOOK_ADDR 0xFFF1D518
#define BAT_SET_NOP_ADDR_1 0xFFF0697C
#define BAT_SET_NOP_ADDR_2 0xFFF06A08
#define BAT_SET_NOP_ADDR_3 0xFFF003C8
#define BAT_SET_NOP_ADDR_4 0xFFF003CC
#define BAT_SET_NOP_ADDR_5 0xFFF1D600
#define BAT_SET_NOP_ADDR_6 0xFFF1D61C
#define BAT_SET_NOP_ADDR_7 0xFFF1D720
#define BAT_SET_NOP_ADDR_8 0xFFEE10B8
#define BAT_SET_NOP_ADDR_9 0xFFEE10BC
#elif ( (VER == 400) || (VER == 410) ) #elif ( (VER == 400) || (VER == 410) )
#define BAT_SETUP_HOOK_ADDR 0xFFF1AD00 #define BAT_SETUP_HOOK_ADDR 0xFFF1AD00
#else #else

View File

@ -27,9 +27,11 @@
#define ADDRESS_OSTitle_main_entry_ptr 0x1005CB00 #define ADDRESS_OSTitle_main_entry_ptr 0x1005CB00
#define ADDRESS_main_entry_hook 0x0101C15C #define ADDRESS_main_entry_hook 0x0101C15C
#define KERN_SYSCALL_TBL_5 0xFFEA9520 // works with browser #define KERN_SYSCALL_TBL_1 0xFFE84C70 // unknown
#define KERN_SYSCALL_TBL_2 0xFFE85070 // works with games
#define PREP_TITLE_HOOK_ADDR 0xFFF18534 #define KERN_SYSCALL_TBL_3 0xFFE85470 // works with loader
#define KERN_SYSCALL_TBL_4 0xFFEA9120 // works with home menu
#define KERN_SYSCALL_TBL_5 0xFFEA9520 // works with browser (previously KERN_SYSCALL_TBL)
#elif ( (VER == 400) || (VER == 410) ) #elif ( (VER == 400) || (VER == 410) )
#define ADDRESS_OSTitle_main_entry_ptr 0x1005A8C0 #define ADDRESS_OSTitle_main_entry_ptr 0x1005A8C0
#define ADDRESS_main_entry_hook 0x0101BD4C #define ADDRESS_main_entry_hook 0x0101BD4C

View File

@ -47,17 +47,6 @@ void InitSocketFunctionPointers(void)
unsigned int *funcPointer = 0; unsigned int *funcPointer = 0;
OSDynLoad_Acquire("nsysnet.rpl", &nsysnet_handle); OSDynLoad_Acquire("nsysnet.rpl", &nsysnet_handle);
unsigned int nn_ac_handle;
int(*ACInitialize)();
int(*ACGetStartupId) (unsigned int *id);
int(*ACConnectWithConfigId) (unsigned int id);
int(*ACGetAssignedAddress) (u32 * ip);
OSDynLoad_Acquire("nn_ac.rpl", &nn_ac_handle);
OSDynLoad_FindExport(nn_ac_handle, 0, "ACInitialize", &ACInitialize);
OSDynLoad_FindExport(nn_ac_handle, 0, "ACGetStartupId", &ACGetStartupId);
OSDynLoad_FindExport(nn_ac_handle, 0, "ACConnectWithConfigId",&ACConnectWithConfigId);
OSDynLoad_FindExport(nn_ac_handle, 0, "ACGetAssignedAddress",&ACGetAssignedAddress);
OS_FIND_EXPORT(nsysnet_handle, socket_lib_init); OS_FIND_EXPORT(nsysnet_handle, socket_lib_init);
OS_FIND_EXPORT(nsysnet_handle, socket); OS_FIND_EXPORT(nsysnet_handle, socket);
OS_FIND_EXPORT(nsysnet_handle, socketclose); OS_FIND_EXPORT(nsysnet_handle, socketclose);
@ -73,12 +62,6 @@ void InitSocketFunctionPointers(void)
OS_FIND_EXPORT(nsysnet_handle, inet_ntoa); OS_FIND_EXPORT(nsysnet_handle, inet_ntoa);
OS_FIND_EXPORT(nsysnet_handle, inet_aton); OS_FIND_EXPORT(nsysnet_handle, inet_aton);
unsigned int nn_startupid;
ACInitialize();
ACGetStartupId(&nn_startupid);
ACConnectWithConfigId(nn_startupid);
ACGetAssignedAddress(&hostIpAddress);
socket_lib_init(); socket_lib_init();
} }

View File

@ -25,6 +25,7 @@
***************************************************************************/ ***************************************************************************/
#include <unistd.h> #include <unistd.h>
#include <malloc.h> #include <malloc.h>
#include "common/common.h"
#include "dynamic_libs/ax_functions.h" #include "dynamic_libs/ax_functions.h"
#include "fs/CFile.hpp" #include "fs/CFile.hpp"
#include "SoundHandler.hpp" #include "SoundHandler.hpp"
@ -256,7 +257,15 @@ void SoundHandler::executeThread()
AXRegisterFrameCallback(NULL); AXRegisterFrameCallback(NULL);
AXQuit(); AXQuit();
for(u32 i = 0; i < MAX_DECODERS; ++i) // deleting the last voice from the decoder produced DSI errors on 5.0.0 so we skip it
// expecting same behaviour on every FW below 532
u32 delete_skip = 0;
if(OS_FIRMWARE < 532)
{
delete_skip = 1;
}
for(u32 i = 0; i < MAX_DECODERS - delete_skip; ++i)
{ {
delete voiceList[i]; delete voiceList[i];
voiceList[i] = NULL; voiceList[i] = NULL;