wii u widescreen patch, report whether wii u CPU is full speed

This commit is contained in:
Daryl 2020-06-01 21:16:28 -06:00
parent 77708edcc1
commit bb341fed60
4 changed files with 50 additions and 16 deletions

View File

@ -815,7 +815,7 @@ static void WindowCredits(void * ptr)
creditsBoxImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
creditsWindowBox.Append(&creditsBoxImg);
int numEntries = 23;
int numEntries = 24;
GuiText * txt[numEntries];
txt[i] = new GuiText("Credits", 30, (GXColor){0, 0, 0, 255});
@ -860,26 +860,41 @@ static void WindowCredits(void * ptr)
txt[i] = new GuiText("FreeTypeGX");
txt[i]->SetPosition(60,y); i++;
txt[i] = new GuiText("Armin Tamzarian");
txt[i]->SetPosition(350,y); i++; y+=48;
txt[i]->SetPosition(350,y); i++;
GuiText::SetPresets(18, (GXColor){0, 0, 0, 255}, 0, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP, ALIGN_CENTRE, ALIGN_TOP);
txt[i] = new GuiText("Snes9x - Copyright (c) Snes9x Team 1996 - 2006");
txt[i]->SetPosition(0,y); i++; y+=20;
txt[i] = new GuiText("This software is open source and may be copied, distributed, or modified ");
txt[i]->SetPosition(0,y); i++; y+=20;
txt[i] = new GuiText("under the terms of the GNU General Public License (GPL) Version 2.");
txt[i]->SetPosition(0,y); i++; y+=20;
char iosVersion[90];
char wiiDetails[30];
char wiiInfo[20];
char controllerInfo[70];
#ifdef HW_RVL
snprintf(iosVersion, 90, "IOS: %ld / %s", IOS_GetVersion(), GetUSBControllerInfo());
if(!IsWiiU()) {
sprintf(wiiInfo, "Wii");
}
else if(IsWiiUFastCPU()) {
sprintf(wiiInfo, "vWii (1.215 GHz)");
}
else {
sprintf(wiiInfo, "vWii (729 MHz)");
}
sprintf(wiiDetails, "IOS: %d / %s", IOS_GetVersion(), wiiInfo);
sprintf(controllerInfo, GetUSBControllerInfo());
#endif
txt[i] = new GuiText(iosVersion, 18, (GXColor){0, 0, 0, 255});
txt[i] = new GuiText(controllerInfo, 14, (GXColor){0, 0, 0, 255});
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
txt[i]->SetPosition(20,-20);
txt[i]->SetPosition(20,-60); i++;
txt[i] = new GuiText(wiiDetails, 14, (GXColor){0, 0, 0, 255});
txt[i]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
txt[i]->SetPosition(-20,-60); i++;
GuiText::SetPresets(12, (GXColor){0, 0, 0, 255}, 0, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP, ALIGN_CENTRE, ALIGN_BOTTOM);
txt[i] = new GuiText("Snes9x - Copyright (c) Snes9x Team 1996 - 2006");
txt[i]->SetPosition(0,-44); i++;
txt[i] = new GuiText("This software is open source and may be copied, distributed, or modified ");
txt[i]->SetPosition(0,-32); i++;
txt[i] = new GuiText("under the terms of the GNU General Public License (GPL) Version 2.");
txt[i]->SetPosition(0,-20);
for(i=0; i < numEntries; i++)
creditsWindowBox.Append(txt[i]);

View File

@ -57,6 +57,7 @@ int ConfigRequested = 0;
int ShutdownRequested = 0;
int ResetRequested = 0;
int ExitRequested = 0;
bool isWiiVC = false;
char appPath[1024] = { 0 };
static int currentMode;
@ -423,6 +424,7 @@ int main(int argc, char *argv[])
SYS_SetResetCallback(ResetCB);
WiiDRC_Init();
isWiiVC = WiiDRC_Inited();
WPAD_Init();
WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownCB);
DI_Init();

View File

@ -137,5 +137,13 @@ extern int ShutdownRequested;
extern int ExitRequested;
extern char appPath[];
extern FreeTypeGX *fontSystem[];
extern bool isWiiVC;
static inline bool IsWiiU(void)
{
return ((*(vu16*)0xCD8005A0 == 0xCAFE) || isWiiVC);
}
static inline bool IsWiiUFastCPU(void)
{
return ((*(vu16*)0xCD8005A0 == 0xCAFE) && ((*(vu32*)0xCD8005B0 & 0x20) == 0));
}
#endif

View File

@ -18,6 +18,7 @@
#include <string.h>
#include <unistd.h>
#include <ogc/texconv.h>
#include <ogc/machine/processor.h>
#include "snes9xgx.h"
#include "menu.h"
@ -552,6 +553,14 @@ InitGCVideo ()
xfb[1] = (u32 *) MEM_K0_TO_K1 (xfb[1]);
GXRModeObj *rmode = FindVideoMode();
#ifdef HW_RVL
if (CONF_GetAspectRatio() == CONF_ASPECT_16_9 && (*(u32*)(0xCD8005A0) >> 16) == 0xCAFE) // Wii U
{
write32(0xd8006a0, 0x30000004), mask32(0xd8006a8, 0, 2);
}
#endif
SetupVideoMode(rmode);
#ifdef HW_RVL
InitLUTs(); // init LUTs for hq2x