mirror of
https://github.com/dborth/fceugx.git
synced 2024-12-04 22:34:14 +01:00
wii u widescreen patch, report whether wii u CPU is full speed
This commit is contained in:
parent
2594fcba07
commit
917dae0650
@ -73,6 +73,7 @@ int ConfigRequested = 0;
|
||||
int ShutdownRequested = 0;
|
||||
int ResetRequested = 0;
|
||||
int ExitRequested = 0;
|
||||
bool isWiiVC = false;
|
||||
char appPath[1024] = { 0 };
|
||||
|
||||
int frameskip = 0;
|
||||
@ -387,6 +388,7 @@ int main(int argc, char *argv[])
|
||||
SYS_SetResetCallback(ResetCB);
|
||||
|
||||
WiiDRC_Init();
|
||||
isWiiVC = WiiDRC_Inited();
|
||||
WPAD_Init();
|
||||
WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownCB);
|
||||
DI_Init();
|
||||
|
@ -140,5 +140,13 @@ extern int fskip;
|
||||
extern int fskipc;
|
||||
extern int turbomode;
|
||||
extern bool romLoaded;
|
||||
|
||||
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
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <malloc.h>
|
||||
#include <ogc/texconv.h>
|
||||
#include <ogc/lwp_watchdog.h>
|
||||
#include <ogc/machine/processor.h>
|
||||
|
||||
#include "fceugx.h"
|
||||
#include "fceusupport.h"
|
||||
@ -592,6 +593,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);
|
||||
LWP_CreateThread (&vbthread, vbgetback, NULL, vbstack, TSTACK, 68);
|
||||
|
||||
|
@ -817,7 +817,7 @@ static void WindowCredits(void * ptr)
|
||||
creditsBoxImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||
creditsWindowBox.Append(&creditsBoxImg);
|
||||
|
||||
int numEntries = 27;
|
||||
int numEntries = 26;
|
||||
GuiText * txt[numEntries];
|
||||
|
||||
txt[i] = new GuiText("Credits", 30, (GXColor){0, 0, 0, 255});
|
||||
@ -871,26 +871,34 @@ static void WindowCredits(void * ptr)
|
||||
txt[i] = new GuiText("FreeTypeGX");
|
||||
txt[i]->SetPosition(40,y); i++;
|
||||
txt[i] = new GuiText("Armin Tamzarian");
|
||||
txt[i]->SetPosition(335,y); i++; y+=48;
|
||||
txt[i]->SetPosition(335,y); i++;
|
||||
|
||||
GuiText::SetPresets(18, (GXColor){0, 0, 0, 255}, 0, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP, ALIGN_CENTRE, ALIGN_TOP);
|
||||
char wiiDetails[30];
|
||||
char wiiInfo[20];
|
||||
|
||||
txt[i] = new GuiText("This software is open source and may be copied,");
|
||||
txt[i]->SetPosition(0,y); i++; y+=20;
|
||||
txt[i] = new GuiText("distributed, or modified under the terms of the");
|
||||
txt[i]->SetPosition(0,y); i++; y+=20;
|
||||
txt[i] = new GuiText("GNU General Public License (GPL) Version 2.");
|
||||
txt[i]->SetPosition(0,y); i++; y+=20;
|
||||
#ifdef HW_RVL
|
||||
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);
|
||||
#endif
|
||||
|
||||
char iosVersion[20];
|
||||
txt[i] = new GuiText(wiiDetails, 14, (GXColor){0, 0, 0, 255});
|
||||
txt[i]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
|
||||
txt[i]->SetPosition(-20, -46); i++;
|
||||
|
||||
#ifdef HW_RVL
|
||||
sprintf(iosVersion, "IOS: %d", IOS_GetVersion());
|
||||
#endif
|
||||
GuiText::SetPresets(12, (GXColor){0, 0, 0, 255}, 0, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP, ALIGN_CENTRE, ALIGN_BOTTOM);
|
||||
|
||||
txt[i] = new GuiText(iosVersion, 18, (GXColor){0, 0, 0, 255});
|
||||
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||
txt[i]->SetPosition(20,-20);
|
||||
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]);
|
||||
|
Loading…
Reference in New Issue
Block a user