mirror of
https://github.com/simple64/simple64.git
synced 2026-11-14 06:08:42 +01:00
update core
This commit is contained in:
1 parent
52ae1e9619
commit
3e1e785bd7
3 files changed
+27
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -1462,6 +1462,22 @@ void main_change_gb_cart(int control_id)
|
||||
}
|
||||
}
|
||||
|
||||
static const char* get_pif_path(m64p_system_type systemtype)
|
||||
{
|
||||
const char *filename;
|
||||
switch(systemtype)
|
||||
{
|
||||
case SYSTEM_PAL:
|
||||
filename = "pifdata_pal.bin";
|
||||
break;
|
||||
case SYSTEM_MPAL:
|
||||
case SYSTEM_NTSC:
|
||||
default:
|
||||
filename = "pifdata_ntsc.bin";
|
||||
break;
|
||||
}
|
||||
return ConfigGetSharedDataFilepath(filename);
|
||||
}
|
||||
|
||||
/*********************************************************************************************************
|
||||
* emulation thread - runs the core
|
||||
@@ -1504,6 +1520,17 @@ m64p_error main_run(void)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Load PIF */
|
||||
FILE* PifFile = fopen(get_pif_path(ROM_PARAMS.systemtype), "rb");
|
||||
if (PifFile != NULL)
|
||||
{
|
||||
unsigned char* pif_buffer = malloc(2048);
|
||||
size_t file_size = fread(pif_buffer, 1, 2048, PifFile);
|
||||
fclose(PifFile);
|
||||
open_pif(pif_buffer, file_size);
|
||||
free(pif_buffer);
|
||||
}
|
||||
|
||||
/* Seed MPK ID gen using current time */
|
||||
uint64_t mpk_seed = !netplay_is_init() ? (uint64_t)time(NULL) : 0;
|
||||
l_mpk_idgen = xoshiro256pp_seed(mpk_seed);
|
||||
|
||||
Reference in new issue
Block a user