X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fmisc.c;h=2fe5600a10127c1d3e9a3abbd921954be4ab810a;hp=38e6385fca60da273cec0b9234b10720730e0d44;hb=9ee0fd5b333039b1140d90f935aa9299825f1e42;hpb=5b8c000f969c365d48418781d8f88f9c58d65611 diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 38e6385f..2fe5600a 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -24,6 +24,7 @@ #include "misc.h" #include "cdrom.h" #include "mdec.h" +#include "gpu.h" #include "ppf.h" char CdromId[10] = ""; @@ -141,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; @@ -148,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; } @@ -576,6 +604,8 @@ int LoadState(const char *file) { gzread(f, gpufP, sizeof(GPUFreeze_t)); GPU_freeze(0, gpufP); free(gpufP); + if (HW_GPU_STATUS == 0) + HW_GPU_STATUS = GPU_readStatus(); // spu gzread(f, &Size, 4);