void RSP_Init() { u8 test; u32 testAddress; // Calculate RDRAM size by intentionally causing an access violation #ifndef __LINUX__ __try { testAddress = 0; while (TRUE) { test = RDRAM[testAddress]; testAddress++; } } __except (EXCEPTION_EXECUTE_HANDLER) { RDRAMSize = testAddress; } #else // !__LINUX__ RDRAMSize = 1024 * 1024 * 8; #endif // __LINUX__ RSP.DList = 0; RSP.uc_start = RSP.uc_dstart = 0; gDP.loadTile = &gDP.tiles[7]; gSP.textureTile[0] = &gDP.tiles[0]; gSP.textureTile[1] = &gDP.tiles[1]; DepthBuffer_Init(); GBI_Init(); OGL_Start(); }
void RSP_Init() { RDRAMSize = 1024 * 1024 * 8; RSP.DList = 0; RSP.uc_start = RSP.uc_dstart = 0; gDP.loadTile = &gDP.tiles[7]; gSP.textureTile[0] = &gDP.tiles[0]; gSP.textureTile[1] = &gDP.tiles[1]; DepthBuffer_Init(); GBI_Init(); }
void RSP_Init(void) { unsigned i; char romname[21]; RDRAMSize = 1024 * 1024 * 8; __RSP.DList = 0; __RSP.uc_start = __RSP.uc_dstart = 0; __RSP.bLLE = false; for (i = 0; i < 20; ++i) romname[i] = gfx_info.HEADER[(32 + i) ^ 3]; romname[20] = 0; // remove all trailing spaces while (romname[strlen(romname) - 1] == ' ') romname[strlen(romname) - 1] = 0; strncpy(__RSP.romname, romname, 21); setDepthClearColor(); config.generalEmulation.hacks = 0; if (strstr(__RSP.romname, (const char *)"OgreBattle64") != NULL) config.generalEmulation.hacks |= hack_Ogre64; else if (strstr(__RSP.romname, (const char *)"MarioGolf64") != NULL || strstr(__RSP.romname, (const char *)"F1 POLE POSITION 64") != NULL ) config.generalEmulation.hacks |= hack_noDepthFrameBuffers; else if (strstr(__RSP.romname, (const char *)"CONKER BFD") != NULL || strstr(__RSP.romname, (const char *)"MICKEY USA") != NULL ) config.generalEmulation.hacks |= hack_blurPauseScreen; else if (strstr(__RSP.romname, (const char *)"MarioTennis") != NULL) config.generalEmulation.hacks |= hack_scoreboard; else if (strstr(__RSP.romname, (const char *)"Pilot Wings64") != NULL) config.generalEmulation.hacks |= hack_pilotWings; else if (strstr(__RSP.romname, (const char *)"THE LEGEND OF ZELDA") != NULL || strstr(__RSP.romname, (const char *)"ZELDA MASTER QUEST") != NULL ) config.generalEmulation.hacks |= hack_subscreen; else if (strstr(__RSP.romname, (const char *)"LEGORacers") != NULL) config.generalEmulation.hacks |= hack_legoRacers; else if (strstr(__RSP.romname, (const char *)"Blast") != NULL) config.generalEmulation.hacks |= hack_blastCorps; RSP_SetDefaultState(); DepthBuffer_Init(); GBI_Init(); }