aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2012-07-12 01:18:01 +0300
committernotaz2012-07-18 23:56:53 +0300
commitf3a78e7ea779e6187d571056e0c97823b09a7bb0 (patch)
treeceac684e32c7d85bafce316fdb23d3b103437905
parent9b470ab7ede4edfa4d933a434f45a563302d7de7 (diff)
downloadpcsx_rearmed-f3a78e7ea779e6187d571056e0c97823b09a7bb0.tar.gz
pcsx_rearmed-f3a78e7ea779e6187d571056e0c97823b09a7bb0.tar.bz2
pcsx_rearmed-f3a78e7ea779e6187d571056e0c97823b09a7bb0.zip
misc: setup GPU if logos are skipped
some games rely on the state BIOS leaves
-rw-r--r--libpcsxcore/misc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c
index 034e5e0..2fe5600 100644
--- a/libpcsxcore/misc.c
+++ b/libpcsxcore/misc.c
@@ -142,6 +142,28 @@ int GetCdromFile(u8 *mdir, u8 *time, s8 *filename) {
return 0;
}
+static const unsigned int gpu_ctl_def[] = {
+ 0x00000000, 0x01000000, 0x03000000, 0x04000000,
+ 0x05000800, 0x06c60260, 0x0703fc10, 0x08000027,
+};
+
+static const unsigned int gpu_data_def[] = {
+ 0xe100360b, 0xe2000000, 0xe3000800, 0xe4077e7f,
+ 0xe5001000, 0xe6000000,
+ 0x02000000, 0x00000000, 0x01ff03ff,
+};
+
+static void fake_bios_gpu_setup(void)
+{
+ int i;
+
+ for (i = 0; i < sizeof(gpu_ctl_def) / sizeof(gpu_ctl_def[0]); i++)
+ GPU_writeStatus(gpu_ctl_def[i]);
+
+ for (i = 0; i < sizeof(gpu_data_def) / sizeof(gpu_data_def[0]); i++)
+ GPU_writeData(gpu_data_def[i]);
+}
+
int LoadCdrom() {
EXE_HEADER tmpHead;
struct iso_directory_record *dir;
@@ -149,7 +171,12 @@ int LoadCdrom() {
u8 mdir[4096];
s8 exename[256];
+ // not the best place to do it, but since BIOS boot logo killer
+ // is just below, do it here
+ fake_bios_gpu_setup();
+
if (!Config.HLE) {
+ // skip BIOS logos
psxRegs.pc = psxRegs.GPR.n.ra;
return 0;
}