aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2014-12-21 20:31:42 +0200
committernotaz2014-12-21 20:35:29 +0200
commite7e1f57236744efe2e22ab1aa2f10f34787e431a (patch)
tree191d67644339c00cb0e4f3869de9de3f0660d7eb
parente06ee7f47a951fd8abe122969bedeb2983bf8dc2 (diff)
downloadpcsx_rearmed-e7e1f57236744efe2e22ab1aa2f10f34787e431a.tar.gz
pcsx_rearmed-e7e1f57236744efe2e22ab1aa2f10f34787e431a.tar.bz2
pcsx_rearmed-e7e1f57236744efe2e22ab1aa2f10f34787e431a.zip
psxbios: merge from pcsxr r90224-r90227
Author: weimingzhi psxbios: format()
-rw-r--r--libpcsxcore/psxbios.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index 04c959a..144a7b4 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -1025,6 +1025,26 @@ _start:
pc0 = ra;
}
+void psxBios_format() { // 0x41
+ if (strcmp(Ra0, "bu00:") == 0 && Config.Mcd1[0] != '\0')
+ {
+ CreateMcd(Config.Mcd1);
+ LoadMcd(1, Config.Mcd1);
+ v0 = 1;
+ }
+ else if (strcmp(Ra0, "bu10:") == 0 && Config.Mcd2[0] != '\0')
+ {
+ CreateMcd(Config.Mcd2);
+ LoadMcd(2, Config.Mcd2);
+ v0 = 1;
+ }
+ else
+ {
+ v0 = 0;
+ }
+ pc0 = ra;
+}
+
/*
* long Load(char *name, struct EXEC *header);
*/
@@ -2521,7 +2541,7 @@ void psxBiosInit() {
biosB0[0x3c] = psxBios_getchar;
//biosB0[0x3e] = psxBios_gets;
//biosB0[0x40] = psxBios_cd;
- //biosB0[0x41] = psxBios_format;
+ biosB0[0x41] = psxBios_format;
biosB0[0x42] = psxBios_firstfile;
biosB0[0x43] = psxBios_nextfile;
biosB0[0x44] = psxBios_rename;