summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-09-19 02:46:23 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-09-19 02:46:23 +0000
commitf8843a7af4138d2abe1c084008d607c21127eae9 (patch)
tree7409c1f25ae5eaee40deab6fcf8f83fa04f8588e /libpcsxcore
parent111694051e4f2f22a8da02c7acaaecfed623703c (diff)
downloadpcsxr-f8843a7af4138d2abe1c084008d607c21127eae9.tar.gz
load net yaroze library if exists at startup.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@57379 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/psxmem.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c
index 2c47ed06..f46e7261 100644
--- a/libpcsxcore/psxmem.c
+++ b/libpcsxcore/psxmem.c
@@ -21,8 +21,6 @@
* PSX memory functions.
*/
-// TODO: Implement caches & cycle penalty.
-
#include "psxmem.h"
#include "r3000a.h"
#include "psxhw.h"
@@ -113,7 +111,8 @@ void psxMemReset() {
memset(psxM, 0, 0x00200000);
memset(psxP, 0, 0x00010000);
-
+
+ // Load BIOS
if (strcmp(Config.Bios, "HLE") != 0) {
sprintf(bios, "%s/%s", Config.BiosDir, Config.Bios);
f = fopen(bios, "rb");
@@ -127,7 +126,17 @@ void psxMemReset() {
fclose(f);
Config.HLE = FALSE;
}
- } else Config.HLE = TRUE;
+ } else Config.HLE = TRUE;
+
+ // Load Net Yaroze runtime library (if exists)
+ sprintf(bios, "%s/libps.exe", Config.BiosDir);
+ f = fopen(bios, "rb");
+
+ if (f != NULL) {
+ fseek(f, 0x800, SEEK_SET);
+ fread(psxM + 0x10000, 0x61000, 1, f);
+ fclose(f);
+ }
}
void psxMemShutdown() {