mirror of
https://github.com/extremscorner/not64.git
synced 2024-05-29 01:07:58 -04:00
This commit is contained in:
parent
deb6357eda
commit
1b85d78c76
|
@ -4,15 +4,14 @@ CC =powerpc-eabi-gcc
|
|||
CXX =powerpc-eabi-g++
|
||||
AS =powerpc-eabi-as
|
||||
|
||||
CFLAGS = -g -Ofast -Wall $(MACHDEP) $(INCLUDE) \
|
||||
CFLAGS = -g -Ofast -mrvl -Wall $(INCLUDE) \
|
||||
-fno-exceptions -Wno-unused-parameter -pipe \
|
||||
-DUSE_GUI -DWII -DGLN64_GX -DUSE_EXPANSION \
|
||||
-DUSE_RECOMP_CACHE -DPPC_DYNAREC -DFASTMEM -DMENU_V2\
|
||||
-DRELEASE #-DSHOW_DEBUG #-DPRINTGECKO #-DPROFILE #-DDEBUGON #-DUSE_TLB_CACHE \
|
||||
#-DNO_BT -DUSE_ROM_CACHE_L1 -DPRINTGECKO -DGLN64_SDLOG -DEMBEDDED_FONTS -DUSE_EXPANSION -DSHOW_STATS
|
||||
|
||||
MACHDEP = -DGEKKO -mrvl -msdata
|
||||
LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref
|
||||
LDFLAGS = -mrvl -Wl,-Map,$(notdir $@).map -Wl,--cref
|
||||
|
||||
INCLUDE = -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libfat/libogc/include
|
||||
LIBPATHS = -L$(DEVKITPRO)/libogc/lib/wii -L$(DEVKITPRO)/libfat/libogc/lib/wii
|
||||
|
|
|
@ -35,14 +35,6 @@
|
|||
/* DVD Globals */
|
||||
int dvd_init = 0;
|
||||
|
||||
/* Worked out manually from my original Disc */
|
||||
#define ZELDA_BONUS_ID "D43U01"
|
||||
#define ZELDA_CLCTR_ID "PZLP01"
|
||||
#define ZELDA_BONUS_OOT 0x54FBEEF4ULL
|
||||
#define ZELDA_BONUS_MQ 0x52CCC5FCULL
|
||||
#define ZELDA_CLCTR_OOT 0x3B9D1FC0ULL
|
||||
#define ZELDA_CLCTR_MM 0x0C4E1FC0ULL
|
||||
#define ZELDA_SIZE 0x2000000
|
||||
#define ZELDA_OOT_NAME "Zelda - Ocarina of Time"
|
||||
#define ZELDA_MQ_NAME "Zelda - Ocarina of Time Master Quest"
|
||||
#define ZELDA_MM_NAME "Zelda - Majoras Mask"
|
||||
|
@ -67,33 +59,48 @@ int fileBrowser_DVD_readDir(fileBrowser_file* ffile, fileBrowser_file** dir){
|
|||
dvd_init = 1;
|
||||
}
|
||||
|
||||
if (!memcmp((void*)0x80000000, ZELDA_BONUS_ID, 6)) { //OoT+MQ bonus disc support.
|
||||
if (!memcmp((void*)0x80000000, "D43U01", 6)) { //OoT+MQ bonus disc support.
|
||||
num_entries = 2;
|
||||
*dir = malloc( num_entries * sizeof(fileBrowser_file) );
|
||||
strcpy( (*dir)[0].name, ZELDA_OOT_NAME);
|
||||
(*dir)[0].discoffset = ZELDA_BONUS_OOT;
|
||||
(*dir)[0].discoffset = 0x54FBEEF4ULL;
|
||||
(*dir)[0].offset = 0;
|
||||
(*dir)[0].size = ZELDA_SIZE;
|
||||
(*dir)[0].size = 0x2000000;
|
||||
(*dir)[0].attr = 0;
|
||||
strcpy( (*dir)[1].name, ZELDA_MQ_NAME);
|
||||
(*dir)[1].discoffset = ZELDA_BONUS_MQ;
|
||||
(*dir)[1].discoffset = 0x52CCC5FCULL;
|
||||
(*dir)[1].offset = 0;
|
||||
(*dir)[1].size = ZELDA_SIZE;
|
||||
(*dir)[1].size = 0x2000000;
|
||||
(*dir)[1].attr = 0;
|
||||
return num_entries;
|
||||
}
|
||||
else if (!memcmp((void*)0x80000000, ZELDA_CLCTR_ID, 6)) { //Zelda Collectors disc support.
|
||||
else if (!memcmp((void*)0x80000000, "D43E01", 6)) {
|
||||
num_entries = 2;
|
||||
*dir = malloc( num_entries * sizeof(fileBrowser_file) );
|
||||
strcpy( (*dir)[0].name, ZELDA_OOT_NAME);
|
||||
(*dir)[0].discoffset = ZELDA_CLCTR_OOT;
|
||||
(*dir)[0].discoffset = 0x550569D8ULL;
|
||||
(*dir)[0].offset = 0;
|
||||
(*dir)[0].size = ZELDA_SIZE;
|
||||
(*dir)[0].size = 0x2000000;
|
||||
(*dir)[0].attr = 0;
|
||||
strcpy( (*dir)[1].name, ZELDA_MQ_NAME);
|
||||
(*dir)[1].discoffset = 0x52FBC1E0ULL;
|
||||
(*dir)[1].offset = 0;
|
||||
(*dir)[1].size = 0x2000000;
|
||||
(*dir)[1].attr = 0;
|
||||
return num_entries;
|
||||
}
|
||||
else if (!memcmp((void*)0x80000000, "PZLP01", 6)) { //Zelda Collectors disc support.
|
||||
num_entries = 2;
|
||||
*dir = malloc( num_entries * sizeof(fileBrowser_file) );
|
||||
strcpy( (*dir)[0].name, ZELDA_OOT_NAME);
|
||||
(*dir)[0].discoffset = 0x3B9D1FC0ULL;
|
||||
(*dir)[0].offset = 0;
|
||||
(*dir)[0].size = 0x2000000;
|
||||
(*dir)[0].attr = 0;
|
||||
strcpy( (*dir)[1].name, ZELDA_MM_NAME);
|
||||
(*dir)[1].discoffset = ZELDA_CLCTR_MM;
|
||||
(*dir)[1].discoffset = 0x0C4E1FC0ULL;
|
||||
(*dir)[1].offset = 0;
|
||||
(*dir)[1].size = ZELDA_SIZE;
|
||||
(*dir)[1].size = 0x2000000;
|
||||
(*dir)[1].attr = 0;
|
||||
return num_entries;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ static unsigned int freq;
|
|||
static AESNDPB *voice;
|
||||
|
||||
char audioEnabled;
|
||||
char scalePitch;
|
||||
|
||||
static void aesnd_callback(AESNDPB *pb, uint32_t state)
|
||||
{
|
||||
|
@ -100,7 +101,9 @@ EXPORT void CALL AiLenChanged(void)
|
|||
length -= len;
|
||||
} while (length > 0);
|
||||
|
||||
AESND_SetVoiceFrequency(voice, freq * (Timers.vis / VILimit));
|
||||
if (scalePitch)
|
||||
AESND_SetVoiceFrequency(voice, freq * (Timers.vis / VILimit));
|
||||
|
||||
IRQ_Restore(level);
|
||||
}
|
||||
}
|
||||
|
@ -120,6 +123,7 @@ EXPORT BOOL CALL InitiateAudio(AUDIO_INFO Audio_Info)
|
|||
|
||||
AESND_SetVoiceFormat(voice, VOICE_STEREO16);
|
||||
AESND_SetVoiceStream(voice, true);
|
||||
AESND_SetVoiceLoop(voice, true);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -148,5 +152,5 @@ void pauseAudio(void) {
|
|||
|
||||
void resumeAudio(void) {
|
||||
AESND_SetVoiceFrequency(voice, freq);
|
||||
AESND_Pause(false);
|
||||
AESND_Pause(!audioEnabled);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#define KB (1024)
|
||||
|
||||
// MEM2 begins at MEM2_LO, the Starlet's Dedicated Memory begins at MEM2_HI
|
||||
#define MEM2_LO ((char*)0x90080000)
|
||||
#define MEM2_LO ((char*)0x90000000)
|
||||
#define MEM2_HI ((char*)0x933E0000)
|
||||
#define MEM2_SIZE (MEM2_HI - MEM2_LO)
|
||||
|
||||
|
@ -102,7 +102,7 @@
|
|||
+ FONT_SIZE + FLASHRAM_SIZE \
|
||||
+ SRAM_SIZE + MEMPACK_SIZE \
|
||||
+ BLOCKS_SIZE + RECOMPMETA_SIZE)
|
||||
#if MEM2_USED_SIZE > (0x933E0000-0x90080000)
|
||||
#if MEM2_USED_SIZE > (0x933E0000-0x90000000)
|
||||
#error Too much MEM2 used!
|
||||
#endif
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ void Config_LoadConfig()
|
|||
OGL.fullscreenHeight = 480;
|
||||
OGL.windowedWidth = 640;
|
||||
OGL.windowedHeight = 480;
|
||||
OGL.forceBilinear = 0;
|
||||
OGL.forceBilinear = glN64_use2xSaiTextures;
|
||||
OGL.enable2xSaI = glN64_use2xSaiTextures;
|
||||
OGL.fog = 1;
|
||||
OGL.textureBitDepth = 1; // normal (16 & 32 bits)
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
#include "Combiner.h"
|
||||
#include "Types.h"
|
||||
|
||||
FrameBufferInfo frameBuffer;
|
||||
FrameBufferInfo frameBuffer;
|
||||
|
||||
extern GXRModeObj *vmode, *rmode;
|
||||
|
||||
#ifdef __GX__
|
||||
extern heap_cntrl* GXtexCache;
|
||||
|
@ -214,9 +216,11 @@ void FrameBuffer_SaveBuffer( u32 address, u16 size, u16 width, u16 height )
|
|||
#else // !__GX__
|
||||
//Note: texture realWidth and realHeight should be multiple of 2!
|
||||
GX_SetTexCopySrc(OGL.GXorigX, OGL.GXorigY,(u16) current->texture->realWidth,(u16) current->texture->realHeight);
|
||||
GX_SetTexCopyDst((u16) current->texture->realWidth,(u16) current->texture->realHeight, current->texture->GXtexfmt, GX_FALSE);
|
||||
GX_SetTexCopyDst((u16) current->texture->realWidth,(u16) current->texture->realHeight, current->texture->GXtexfmt, GX_FALSE);
|
||||
GX_SetCopyFilter(GX_FALSE, NULL, GX_FALSE, NULL);
|
||||
if (current->texture->GXtexture) GX_CopyTex(current->texture->GXtexture, GX_FALSE);
|
||||
GX_PixModeSync();
|
||||
GX_PixModeSync();
|
||||
GX_SetCopyFilter(GX_FALSE, NULL, GX_TRUE, rmode->vfilter);
|
||||
#endif // __GX__
|
||||
|
||||
*(u32*)&RDRAM[current->startAddress] = current->startAddress;
|
||||
|
@ -325,9 +329,11 @@ void FrameBuffer_SaveBuffer( u32 address, u16 size, u16 width, u16 height )
|
|||
#else // !__GX__
|
||||
//Note: texture realWidth and realHeight should be multiple of 2!
|
||||
GX_SetTexCopySrc((u16) OGL.GXorigX, (u16) OGL.GXorigY,(u16) current->texture->realWidth,(u16) current->texture->realHeight);
|
||||
GX_SetTexCopyDst((u16) current->texture->realWidth,(u16) current->texture->realHeight, current->texture->GXtexfmt, GX_FALSE);
|
||||
GX_SetTexCopyDst((u16) current->texture->realWidth,(u16) current->texture->realHeight, current->texture->GXtexfmt, GX_FALSE);
|
||||
GX_SetCopyFilter(GX_FALSE, NULL, GX_FALSE, NULL);
|
||||
if (current->texture->GXtexture) GX_CopyTex(current->texture->GXtexture, GX_FALSE);
|
||||
GX_PixModeSync();
|
||||
GX_PixModeSync();
|
||||
GX_SetCopyFilter(GX_FALSE, NULL, GX_TRUE, rmode->vfilter);
|
||||
#endif // __GX__
|
||||
|
||||
*(u32*)&RDRAM[current->startAddress] = current->startAddress;
|
||||
|
|
|
@ -90,7 +90,7 @@ static inline u8 GXcastf32u8(register f32 in)
|
|||
return rval;
|
||||
}
|
||||
|
||||
static inline u8 GXcastf32u16(register f32 in)
|
||||
static inline u16 GXcastf32u16(register f32 in)
|
||||
{
|
||||
u16 rval;
|
||||
asm("psq_st%U0%X0 %1,%0,1,3" : "=m"(rval) : "f"(in) : "memory");
|
||||
|
|
|
@ -1420,7 +1420,7 @@ void OGL_DrawRect( int ulx, int uly, int lrx, int lry, float *color )
|
|||
OGL_UpdateViewport();
|
||||
glEnable( GL_SCISSOR_TEST );
|
||||
#else // !__GX__
|
||||
GX_SetScissor((u32) 0,(u32) 0,(u32) OGL.width+1,(u32) OGL.height+1); //Disable Scissor
|
||||
GX_SetScissor((u32) 0,(u32) 0,(u32) OGL.width,(u32) OGL.height); //Disable Scissor
|
||||
GX_SetCullMode (GX_CULL_NONE);
|
||||
Mtx44 GXprojection;
|
||||
guMtxIdentity(GXprojection);
|
||||
|
@ -1992,7 +1992,8 @@ void OGL_GXinitDlist()
|
|||
// VIDEO_WaitVSync();
|
||||
|
||||
OGL.frameBufferTextures = glN64_useFrameBufferTextures;
|
||||
OGL.enable2xSaI = glN64_use2xSaiTextures;
|
||||
OGL.enable2xSaI = glN64_use2xSaiTextures;
|
||||
OGL.forceBilinear = glN64_use2xSaiTextures;
|
||||
|
||||
// init primeDepthZtex, Ztexture, AlphaCompare, and Texture Clamping
|
||||
TextureCache_UpdatePrimDepthZtex( 1.0f );
|
||||
|
@ -2077,12 +2078,12 @@ void OGL_GXclearEFB()
|
|||
GX_SetAlphaCompare(GX_ALWAYS,0,GX_AOP_AND,GX_ALWAYS,0);
|
||||
GX_SetFog(GX_FOG_NONE,0.1,1.0,0.0,1.0,(GXColor){0,0,0,255});
|
||||
GX_SetViewport((f32) OGL.GXorigX,(f32) OGL.GXorigY,(f32) OGL.GXwidth,(f32) OGL.GXheight, 0.0f, 1.0f);
|
||||
GX_SetScissor((u32) 0,(u32) 0,(u32) OGL.width+1,(u32) OGL.height+1); //Disable Scissor
|
||||
GX_SetScissor((u32) 0,(u32) 0,(u32) OGL.width,(u32) OGL.height); //Disable Scissor
|
||||
// GX_SetScissor(0,0,rmode->fbWidth,rmode->efbHeight);
|
||||
GX_SetCullMode (GX_CULL_NONE);
|
||||
Mtx44 GXprojection;
|
||||
guMtxIdentity(GXprojection);
|
||||
guOrtho(GXprojection, 0, OGL.height-1, 0, OGL.width-1, 0.0f, 1.0f);
|
||||
guOrtho(GXprojection, 0, OGL.height, 0, OGL.width, 0.0f, 1.0f);
|
||||
GX_LoadProjectionMtx(GXprojection, GX_ORTHOGRAPHIC);
|
||||
GX_LoadPosMtxImm(OGL.GXmodelViewIdent,GX_PNMTX0);
|
||||
|
||||
|
@ -2095,13 +2096,13 @@ void OGL_GXclearEFB()
|
|||
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
f32 ZmaxDepth = (f32) -0xFFFFFF/0x1000000;
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GX_Position3f32(-1.0f, -1.0f, ZmaxDepth);
|
||||
GX_Position3f32(0.0f, 0.0f, ZmaxDepth);
|
||||
GX_Color4u8(OGL.GXclearColor.r, OGL.GXclearColor.g, OGL.GXclearColor.b, OGL.GXclearColor.a);
|
||||
GX_Position3f32((f32) OGL.width+1, -1.0f, ZmaxDepth);
|
||||
GX_Position3f32((f32) OGL.width, 0.0f, ZmaxDepth);
|
||||
GX_Color4u8(OGL.GXclearColor.r, OGL.GXclearColor.g, OGL.GXclearColor.b, OGL.GXclearColor.a);
|
||||
GX_Position3f32((f32) OGL.width+1,(f32) OGL.height+1, ZmaxDepth);
|
||||
GX_Position3f32((f32) OGL.width,(f32) OGL.height, ZmaxDepth);
|
||||
GX_Color4u8(OGL.GXclearColor.r, OGL.GXclearColor.g, OGL.GXclearColor.b, OGL.GXclearColor.a);
|
||||
GX_Position3f32(-1.0f,(f32) OGL.height+1, ZmaxDepth);
|
||||
GX_Position3f32(0.0f,(f32) OGL.height, ZmaxDepth);
|
||||
GX_Color4u8(OGL.GXclearColor.r, OGL.GXclearColor.g, OGL.GXclearColor.b, OGL.GXclearColor.a);
|
||||
GX_End();
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ Graphics::Graphics(GXRModeObj *rmode)
|
|||
|
||||
VIDEO_Init();
|
||||
vmode = VIDEO_GetPreferredMode(&vmode_phys);
|
||||
vmode->viWidth = 720;
|
||||
vmode->viXOrigin = 0;
|
||||
VIDEO_SetTrapFilter(trapFilter);
|
||||
VIDEO_Configure(vmode);
|
||||
|
||||
|
@ -76,7 +78,6 @@ void Graphics::init()
|
|||
{
|
||||
|
||||
f32 yscale;
|
||||
u32 xfbHeight;
|
||||
void *gpfifo = NULL;
|
||||
GXColor background = {0, 0, 0, 0xff};
|
||||
|
||||
|
@ -86,20 +87,13 @@ void Graphics::init()
|
|||
|
||||
GX_SetViewport(0,0,vmode->fbWidth,vmode->efbHeight,0,1);
|
||||
yscale = GX_GetYScaleFactor(vmode->efbHeight,vmode->xfbHeight);
|
||||
xfbHeight = GX_SetDispCopyYScale(yscale);
|
||||
GX_SetDispCopyYScale(yscale);
|
||||
GX_SetScissor(0,0,vmode->fbWidth,vmode->efbHeight);
|
||||
GX_SetDispCopySrc(0,0,vmode->fbWidth,vmode->efbHeight);
|
||||
GX_SetDispCopyDst(vmode->fbWidth,xfbHeight);
|
||||
GX_SetCopyFilter(vmode->aa,vmode->sample_pattern,deFlicker,vmode->vfilter);
|
||||
GX_SetFieldMode(vmode->field_rendering,((vmode->viHeight==2*vmode->xfbHeight)?GX_ENABLE:GX_DISABLE));
|
||||
|
||||
if (vmode->aa)
|
||||
GX_SetPixelFmt(GX_PF_RGB565_Z16, GX_ZC_LINEAR);
|
||||
else
|
||||
GX_SetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR);
|
||||
GX_SetDispCopyDst(vmode->fbWidth,vmode->xfbHeight);
|
||||
GX_SetCopyFilter(GX_FALSE,NULL,GX_TRUE,vmode->vfilter);
|
||||
|
||||
GX_SetCullMode(GX_CULL_NONE);
|
||||
GX_SetDispCopyGamma(GX_GM_1_0);
|
||||
|
||||
GX_InvVtxCache();
|
||||
GX_InvalidateTexAll();
|
||||
|
@ -223,8 +217,8 @@ void Graphics::loadModelView()
|
|||
|
||||
void Graphics::loadOrthographic()
|
||||
{
|
||||
if(screenMode) guOrtho(currentProjectionMtx, 0, 479, -104, 743, 0, 700);
|
||||
else guOrtho(currentProjectionMtx, 0, 479, 0, 639, 0, 700);
|
||||
if(screenMode) guOrtho(currentProjectionMtx, 0, 480, -104, 744, 0, 700);
|
||||
else guOrtho(currentProjectionMtx, 0, 480, 0, 640, 0, 700);
|
||||
GX_LoadProjectionMtx(currentProjectionMtx, GX_ORTHOGRAPHIC);
|
||||
}
|
||||
|
||||
|
|
|
@ -212,11 +212,11 @@ void IplFont::drawInit(GXColor fontColor)
|
|||
// guMtxTransApply (GXmodelView2D, GXmodelView2D, 0.0F, 0.0F, -5.0F);
|
||||
GX_LoadPosMtxImm(GXmodelView2D,GX_PNMTX0);
|
||||
if(screenMode && menuActive)
|
||||
guOrtho(GXprojection2D, 0, 479, -104, 743, 0, 700);
|
||||
guOrtho(GXprojection2D, 0, 480, -104, 744, 0, 700);
|
||||
else if(screenMode == SCREENMODE_16x9_PILLARBOX)
|
||||
guOrtho(GXprojection2D, 0, 479, -104, 743, 0, 700);
|
||||
guOrtho(GXprojection2D, 0, 480, -104, 744, 0, 700);
|
||||
else
|
||||
guOrtho(GXprojection2D, 0, 479, 0, 639, 0, 700);
|
||||
guOrtho(GXprojection2D, 0, 480, 0, 640, 0, 700);
|
||||
GX_LoadProjectionMtx(GXprojection2D, GX_ORTHOGRAPHIC);
|
||||
// GX_SetViewport (0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ int init_dvd() {
|
|||
else {
|
||||
read_cmd = NORMAL;
|
||||
}
|
||||
dvd_read_id();
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ unsigned int MALLOC_MEM2 = 0;
|
|||
#include <ogc/conf.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
extern "C" {
|
||||
extern u32 __di_check_ahbprot(void);
|
||||
#include <di/di.h>
|
||||
}
|
||||
#include "../gc_memory/MEM2.h"
|
||||
|
@ -100,6 +99,7 @@ static CONTROL_INFO control_info;
|
|||
static RSP_INFO rsp_info;
|
||||
|
||||
extern char audioEnabled;
|
||||
extern char scalePitch;
|
||||
extern char printToScreen;
|
||||
extern char showFPSonScreen;
|
||||
extern char printToSD;
|
||||
|
@ -122,7 +122,6 @@ char menuActive;
|
|||
char saveStateDevice;
|
||||
char autoSave;
|
||||
char screenMode = 0;
|
||||
char deFlicker;
|
||||
char trapFilter;
|
||||
char padAutoAssign;
|
||||
char padType[4];
|
||||
|
@ -143,12 +142,12 @@ static struct {
|
|||
char min, max;
|
||||
} OPTIONS[] =
|
||||
{ { "Audio", &audioEnabled, AUDIO_DISABLE, AUDIO_ENABLE },
|
||||
{ "ScalePitch", &scalePitch, SCALEPITCH_DISABLE, SCALEPITCH_ENABLE },
|
||||
{ "FPS", &showFPSonScreen, FPS_HIDE, FPS_SHOW },
|
||||
// { "Debug", &printToScreen, DEBUG_HIDE, DEBUG_SHOW },
|
||||
{ "FBTex", &glN64_useFrameBufferTextures, GLN64_FBTEX_DISABLE, GLN64_FBTEX_ENABLE },
|
||||
{ "2xSaI", &glN64_use2xSaiTextures, GLN64_2XSAI_DISABLE, GLN64_2XSAI_ENABLE },
|
||||
{ "ScreenMode", &screenMode, SCREENMODE_4x3, SCREENMODE_16x9_PILLARBOX },
|
||||
{ "DeFlicker", &deFlicker, DEFLICKER_DISABLE, DEFLICKER_ENABLE },
|
||||
{ "TrapFilter", &trapFilter, TRAPFILTER_DISABLE, TRAPFILTER_ENABLE },
|
||||
{ "Core", ((char*)&dynacore)+3, DYNACORE_INTERPRETER, DYNACORE_PURE_INTERP },
|
||||
{ "NativeDevice", &nativeSaveDevice, NATIVESAVEDEVICE_SD, NATIVESAVEDEVICE_CARDB },
|
||||
|
@ -201,12 +200,6 @@ u16 readWPAD(void);
|
|||
int main(int argc, char* argv[]){
|
||||
/* INITIALIZE */
|
||||
#ifdef HW_RVL
|
||||
if (!__di_check_ahbprot()) {
|
||||
s32 preferred = IOS_GetPreferredVersion();
|
||||
if (preferred == 58 || preferred == 61)
|
||||
IOS_ReloadIOS(preferred);
|
||||
}
|
||||
|
||||
DI_UseCache(false);
|
||||
DI_Init(); // first
|
||||
#endif
|
||||
|
@ -231,6 +224,7 @@ int main(int argc, char* argv[]){
|
|||
|
||||
// Default Settings
|
||||
audioEnabled = 1; // Audio
|
||||
scalePitch = 1;
|
||||
#ifdef RELEASE
|
||||
showFPSonScreen = 0; // Show FPS on Screen
|
||||
#else
|
||||
|
@ -246,7 +240,6 @@ int main(int argc, char* argv[]){
|
|||
creditsScrolling = 0; // Normal menu for now
|
||||
dynacore = 1; // Dynarec
|
||||
screenMode = 0; // Stretch FB horizontally
|
||||
deFlicker = 1;
|
||||
trapFilter = 0;
|
||||
padAutoAssign = PADAUTOASSIGN_AUTOMATIC;
|
||||
padType[0] = PADTYPE_NONE;
|
||||
|
@ -444,7 +437,7 @@ int loadROM(fileBrowser_file* rom){
|
|||
|
||||
gfx_set_fb(xfb[0], xfb[1]);
|
||||
if (screenMode == SCREENMODE_16x9_PILLARBOX)
|
||||
gfx_set_window( 78, 0, 483, 480);
|
||||
gfx_set_window( 80, 0, 480, 480);
|
||||
else
|
||||
gfx_set_window( 0, 0, 640, 480);
|
||||
|
||||
|
|
|
@ -34,6 +34,13 @@ enum audioEnabled
|
|||
AUDIO_ENABLE
|
||||
};
|
||||
|
||||
extern char scalePitch;
|
||||
enum scalePitch
|
||||
{
|
||||
SCALEPITCH_DISABLE=0,
|
||||
SCALEPITCH_ENABLE
|
||||
};
|
||||
|
||||
extern char showFPSonScreen;
|
||||
enum showFPSonScreen
|
||||
{
|
||||
|
@ -107,13 +114,6 @@ enum screenMode
|
|||
SCREENMODE_16x9_PILLARBOX
|
||||
};
|
||||
|
||||
extern char deFlicker;
|
||||
enum deFlicker
|
||||
{
|
||||
DEFLICKER_DISABLE=0,
|
||||
DEFLICKER_ENABLE
|
||||
};
|
||||
|
||||
extern char trapFilter;
|
||||
enum trapFilter
|
||||
{
|
||||
|
|
|
@ -355,7 +355,13 @@ void fileBrowserFrame_Error(fileBrowser_file* dir, int error_code)
|
|||
FRAME_BUTTONS[i].button->setActive(false);
|
||||
for (int i = 1; i<NUM_FILE_SLOTS; i++)
|
||||
FRAME_BUTTONS[i+2].buttonString = FRAME_STRINGS[2];
|
||||
if(error_code == SMB_NETINITERR) {
|
||||
if(error_code == NO_HW_ACCESS) {
|
||||
sprintf(feedback_string,"DVDX v2 not found");
|
||||
}
|
||||
else if(error_code == NO_DISC) {
|
||||
sprintf(feedback_string,"NO Disc Inserted");
|
||||
}
|
||||
else if(error_code == SMB_NETINITERR) {
|
||||
sprintf(feedback_string,"Network not yet initialized");
|
||||
}
|
||||
else if(error_code == SMB_SMBCFGERR) {
|
||||
|
|
|
@ -163,11 +163,8 @@ void Func_Settings()
|
|||
void Func_Credits()
|
||||
{
|
||||
char CreditsInfo[512] = "";
|
||||
#ifdef HW_RVL
|
||||
strcat(CreditsInfo,"Wii64 Beta 1.1 'Honey'\n");
|
||||
#else
|
||||
strcat(CreditsInfo,"Cube64 Beta 1.1 'Honey'\n");
|
||||
#endif
|
||||
strcat(CreditsInfo,"Not64 Beta 1.1 'Honey'\n");
|
||||
strcat(CreditsInfo,"Modified by Extrems' Corner.org\n");
|
||||
strcat(CreditsInfo,"\n");
|
||||
strcat(CreditsInfo,"Wii64 Team: www.emulatemii.com\n");
|
||||
strcat(CreditsInfo,"tehpola - core\n");
|
||||
|
@ -175,9 +172,8 @@ void Func_Credits()
|
|||
strcat(CreditsInfo,"emu_kidid - general coding\n");
|
||||
strcat(CreditsInfo,"\n");
|
||||
strcat(CreditsInfo,"Special Thanks To:\n");
|
||||
strcat(CreditsInfo," drmr - for menu graphics\n");
|
||||
strcat(CreditsInfo,"drmr - for menu graphics\n");
|
||||
strcat(CreditsInfo,"Hacktarux - for Mupen64\n");
|
||||
strcat(CreditsInfo,"Wintermute/Shagkur - devkitPro/libOGC\n");
|
||||
#ifdef HW_RVL
|
||||
strcat(CreditsInfo,"Team Twiizers - for Wii homebrew\n");
|
||||
#endif
|
||||
|
|
|
@ -76,6 +76,11 @@ void Func_ToggleButtonLoad();
|
|||
|
||||
void Func_DisableAudioYes();
|
||||
void Func_DisableAudioNo();
|
||||
void Func_SpeedLimitOff();
|
||||
void Func_SpeedLimitVi();
|
||||
void Func_SpeedLimitFps();
|
||||
void Func_ScalePitchYes();
|
||||
void Func_ScalePitchNo();
|
||||
|
||||
void Func_AutoSaveNativeYes();
|
||||
void Func_AutoSaveNativeNo();
|
||||
|
@ -84,14 +89,14 @@ void Func_DeleteSaves();
|
|||
void Func_ReturnFromSettingsFrame();
|
||||
|
||||
|
||||
#define NUM_FRAME_BUTTONS 38
|
||||
#define NUM_FRAME_BUTTONS 43
|
||||
#define NUM_TAB_BUTTONS 5
|
||||
#define FRAME_BUTTONS settingsFrameButtons
|
||||
#define FRAME_STRINGS settingsFrameStrings
|
||||
#define NUM_FRAME_TEXTBOXES 13
|
||||
#define NUM_FRAME_TEXTBOXES 15
|
||||
#define FRAME_TEXTBOXES settingsFrameTextBoxes
|
||||
|
||||
static char FRAME_STRINGS[37][23] =
|
||||
static char FRAME_STRINGS[41][23] =
|
||||
{ "General",
|
||||
"Video",
|
||||
"Input",
|
||||
|
@ -128,9 +133,13 @@ static char FRAME_STRINGS[37][23] =
|
|||
"Default",
|
||||
//Strings for Audio tab [31]
|
||||
"Disable Audio",
|
||||
"Speed Limit",
|
||||
"Scale Pitch",
|
||||
"Yes",
|
||||
"No",
|
||||
//Strings for Saves tab [34]
|
||||
"VI",
|
||||
"FPS",
|
||||
//Strings for Saves tab [38]
|
||||
"Auto Save Native Saves",
|
||||
"Copy Saves",
|
||||
"Delete Saves"};
|
||||
|
@ -189,13 +198,18 @@ struct ButtonInfo
|
|||
{ NULL, BTN_A_NRM, FRAME_STRINGS[10], 360.0, 310.0, 70.0, 56.0, 28, 31, 29, 29, Func_SaveButtonsUSB, Func_ReturnFromSettingsFrame }, // Save Button Configs to USB
|
||||
{ NULL, BTN_A_NRM, FRAME_STRINGS[30], 295.0, 380.0, 135.0, 56.0, 29, 2, -1, -1, Func_ToggleButtonLoad, Func_ReturnFromSettingsFrame }, // Toggle Button Load Slot
|
||||
//Buttons for Audio Tab (starts at button[32])
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[32], 345.0, 100.0, 75.0, 56.0, 3, 3, 33, 33, Func_DisableAudioYes, Func_ReturnFromSettingsFrame }, // Disable Audio: Yes
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[33], 440.0, 100.0, 75.0, 56.0, 3, 3, 32, 32, Func_DisableAudioNo, Func_ReturnFromSettingsFrame }, // Disable Audio: No
|
||||
//Buttons for Saves Tab (starts at button[34])
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[32], 375.0, 100.0, 75.0, 56.0, 4, 36, 35, 35, Func_AutoSaveNativeYes, Func_ReturnFromSettingsFrame }, // Auto Save Native: Yes
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[33], 470.0, 100.0, 75.0, 56.0, 4, 36, 34, 34, Func_AutoSaveNativeNo, Func_ReturnFromSettingsFrame }, // Auto Save Native: No
|
||||
{ NULL, BTN_A_NRM, FRAME_STRINGS[35], 365.0, 170.0, 190.0, 56.0, 34, 37, -1, -1, Func_CopySaves, Func_ReturnFromSettingsFrame }, // Copy Saves
|
||||
{ NULL, BTN_A_NRM, FRAME_STRINGS[36], 365.0, 240.0, 190.0, 56.0, 36, 4, -1, -1, Func_DeleteSaves, Func_ReturnFromSettingsFrame }, // Delete Saves
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[34], 345.0, 100.0, 75.0, 56.0, 3, 35, 33, 33, Func_DisableAudioYes, Func_ReturnFromSettingsFrame }, // Disable Audio: Yes
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[35], 440.0, 100.0, 75.0, 56.0, 3, 36, 32, 32, Func_DisableAudioNo, Func_ReturnFromSettingsFrame }, // Disable Audio: No
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[21], 250.0, 170.0, 75.0, 56.0, 32, 37, 36, 35, Func_SpeedLimitOff, Func_ReturnFromSettingsFrame }, // Speed Limit: Off
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[36], 345.0, 170.0, 75.0, 56.0, 32, 37, 34, 36, Func_SpeedLimitVi, Func_ReturnFromSettingsFrame }, // Speed Limit: VI
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[37], 440.0, 170.0, 75.0, 56.0, 33, 38, 35, 34, Func_SpeedLimitFps, Func_ReturnFromSettingsFrame }, // Speed Limit: FPS
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[34], 345.0, 240.0, 75.0, 56.0, 35, 3, 38, 38, Func_ScalePitchYes, Func_ReturnFromSettingsFrame }, // Scale Pitch: Yes
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[35], 440.0, 240.0, 75.0, 56.0, 36, 3, 37, 37, Func_ScalePitchNo, Func_ReturnFromSettingsFrame }, // Scale Pitch: No
|
||||
//Buttons for Saves Tab (starts at button[39])
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[34], 375.0, 100.0, 75.0, 56.0, 4, 41, 40, 40, Func_AutoSaveNativeYes, Func_ReturnFromSettingsFrame }, // Auto Save Native: Yes
|
||||
{ NULL, BTN_A_SEL, FRAME_STRINGS[35], 470.0, 100.0, 75.0, 56.0, 4, 41, 39, 39, Func_AutoSaveNativeNo, Func_ReturnFromSettingsFrame }, // Auto Save Native: No
|
||||
{ NULL, BTN_A_NRM, FRAME_STRINGS[39], 365.0, 170.0, 190.0, 56.0, 39, 42, -1, -1, Func_CopySaves, Func_ReturnFromSettingsFrame }, // Copy Saves
|
||||
{ NULL, BTN_A_NRM, FRAME_STRINGS[40], 365.0, 240.0, 190.0, 56.0, 41, 4, -1, -1, Func_DeleteSaves, Func_ReturnFromSettingsFrame }, // Delete Saves
|
||||
};
|
||||
|
||||
struct TextBoxInfo
|
||||
|
@ -224,8 +238,10 @@ struct TextBoxInfo
|
|||
{ NULL, FRAME_STRINGS[29], 155.0, 408.0, 1.0, true }, // 2xSai: On/Off
|
||||
//TextBoxes for Audio Tab (starts at textBox[11])
|
||||
{ NULL, FRAME_STRINGS[31], 210.0, 128.0, 1.0, true }, // Disable Audio: Yes/No
|
||||
//TextBoxes for Saves Tab (starts at textBox[12])
|
||||
{ NULL, FRAME_STRINGS[34], 200.0, 128.0, 1.0, true }, // Auto Save Native Save: Yes/No
|
||||
{ NULL, FRAME_STRINGS[32], 150.0, 198.0, 1.0, true }, // Speed Limit: Off/VI/FPS
|
||||
{ NULL, FRAME_STRINGS[33], 210.0, 268.0, 1.0, true }, // Scale Pitch: Yes/No
|
||||
//TextBoxes for Saves Tab (starts at textBox[14])
|
||||
{ NULL, FRAME_STRINGS[38], 200.0, 128.0, 1.0, true }, // Auto Save Native Save: Yes/No
|
||||
};
|
||||
|
||||
SettingsFrame::SettingsFrame()
|
||||
|
@ -372,15 +388,20 @@ void SettingsFrame::activateSubmenu(int submenu)
|
|||
{
|
||||
FRAME_BUTTONS[i].button->setVisible(true);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_DOWN, FRAME_BUTTONS[32].button);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_UP, FRAME_BUTTONS[32].button);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_UP, FRAME_BUTTONS[37].button);
|
||||
FRAME_BUTTONS[i].button->setActive(true);
|
||||
}
|
||||
for (int i = 11; i < 12; i++)
|
||||
for (int i = 11; i < 14; i++)
|
||||
FRAME_TEXTBOXES[i].textBox->setVisible(true);
|
||||
FRAME_BUTTONS[3].button->setSelected(true);
|
||||
if (audioEnabled == AUDIO_DISABLE) FRAME_BUTTONS[32].button->setSelected(true);
|
||||
else FRAME_BUTTONS[33].button->setSelected(true);
|
||||
for (int i = 32; i < 34; i++)
|
||||
if (Timers.limitVIs == LIMITVIS_NONE) FRAME_BUTTONS[34].button->setSelected(true);
|
||||
else if (Timers.limitVIs == LIMITVIS_WAIT_FOR_VI) FRAME_BUTTONS[35].button->setSelected(true);
|
||||
else FRAME_BUTTONS[36].button->setSelected(true);
|
||||
if (scalePitch == SCALEPITCH_ENABLE) FRAME_BUTTONS[37].button->setSelected(true);
|
||||
else FRAME_BUTTONS[38].button->setSelected(true);
|
||||
for (int i = 32; i < 39; i++)
|
||||
{
|
||||
FRAME_BUTTONS[i].button->setVisible(true);
|
||||
FRAME_BUTTONS[i].button->setActive(true);
|
||||
|
@ -391,16 +412,16 @@ void SettingsFrame::activateSubmenu(int submenu)
|
|||
for (int i = 0; i < NUM_TAB_BUTTONS; i++)
|
||||
{
|
||||
FRAME_BUTTONS[i].button->setVisible(true);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_DOWN, FRAME_BUTTONS[34].button);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_UP, FRAME_BUTTONS[37].button);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_DOWN, FRAME_BUTTONS[39].button);
|
||||
FRAME_BUTTONS[i].button->setNextFocus(menu::Focus::DIRECTION_UP, FRAME_BUTTONS[42].button);
|
||||
FRAME_BUTTONS[i].button->setActive(true);
|
||||
}
|
||||
for (int i = 12; i < 13; i++)
|
||||
for (int i = 14; i < 15; i++)
|
||||
FRAME_TEXTBOXES[i].textBox->setVisible(true);
|
||||
FRAME_BUTTONS[4].button->setSelected(true);
|
||||
if (autoSave == AUTOSAVE_ENABLE) FRAME_BUTTONS[34].button->setSelected(true);
|
||||
else FRAME_BUTTONS[35].button->setSelected(true);
|
||||
for (int i = 34; i < NUM_FRAME_BUTTONS; i++)
|
||||
if (autoSave == AUTOSAVE_ENABLE) FRAME_BUTTONS[39].button->setSelected(true);
|
||||
else FRAME_BUTTONS[40].button->setSelected(true);
|
||||
for (int i = 39; i < NUM_FRAME_BUTTONS; i++)
|
||||
{
|
||||
FRAME_BUTTONS[i].button->setVisible(true);
|
||||
FRAME_BUTTONS[i].button->setActive(true);
|
||||
|
@ -713,7 +734,7 @@ void Func_ScreenForce16_9()
|
|||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[19].button->setSelected(true);
|
||||
screenMode = SCREENMODE_16x9_PILLARBOX;
|
||||
gfx_set_window( 78, 0, 483, 480);
|
||||
gfx_set_window( 80, 0, 480, 480);
|
||||
}
|
||||
|
||||
void Func_CpuFramebufferOn()
|
||||
|
@ -887,19 +908,59 @@ void Func_DisableAudioNo()
|
|||
audioEnabled = AUDIO_ENABLE;
|
||||
}
|
||||
|
||||
void Func_AutoSaveNativeYes()
|
||||
void Func_SpeedLimitOff()
|
||||
{
|
||||
for (int i = 34; i <= 35; i++)
|
||||
for (int i = 34; i <= 36; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[34].button->setSelected(true);
|
||||
Timers.limitVIs = LIMITVIS_NONE;
|
||||
}
|
||||
|
||||
void Func_SpeedLimitVi()
|
||||
{
|
||||
for (int i = 34; i <= 36; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[35].button->setSelected(true);
|
||||
Timers.limitVIs = LIMITVIS_WAIT_FOR_VI;
|
||||
}
|
||||
|
||||
void Func_SpeedLimitFps()
|
||||
{
|
||||
for (int i = 34; i <= 36; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[36].button->setSelected(true);
|
||||
Timers.limitVIs = LIMITVIS_WAIT_FOR_FRAME;
|
||||
}
|
||||
|
||||
void Func_ScalePitchYes()
|
||||
{
|
||||
for (int i = 37; i <= 38; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[37].button->setSelected(true);
|
||||
scalePitch = SCALEPITCH_ENABLE;
|
||||
}
|
||||
|
||||
void Func_ScalePitchNo()
|
||||
{
|
||||
for (int i = 37; i <= 38; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[38].button->setSelected(true);
|
||||
scalePitch = SCALEPITCH_DISABLE;
|
||||
}
|
||||
|
||||
void Func_AutoSaveNativeYes()
|
||||
{
|
||||
for (int i = 39; i <= 40; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[39].button->setSelected(true);
|
||||
autoSave = AUTOSAVE_ENABLE;
|
||||
}
|
||||
|
||||
void Func_AutoSaveNativeNo()
|
||||
{
|
||||
for (int i = 34; i <= 35; i++)
|
||||
for (int i = 39; i <= 40; i++)
|
||||
FRAME_BUTTONS[i].button->setSelected(false);
|
||||
FRAME_BUTTONS[35].button->setSelected(true);
|
||||
FRAME_BUTTONS[40].button->setSelected(true);
|
||||
autoSave = AUTOSAVE_DISABLE;
|
||||
}
|
||||
|
||||
|
@ -918,11 +979,3 @@ void Func_ReturnFromSettingsFrame()
|
|||
menu::Gui::getInstance().menuLogo->setLocation(580.0, 70.0, -50.0);
|
||||
pMenuContext->setActiveFrame(MenuContext::FRAME_MAIN);
|
||||
}
|
||||
|
||||
/*extern timers Timers;
|
||||
|
||||
void Func_ToggleVILimit()
|
||||
{
|
||||
Timers.limitVIs = (Timers.limitVIs+1) % 3;
|
||||
FRAME_BUTTONS[2].buttonString = FRAME_STRINGS[Timers.limitVIs + 4];
|
||||
}*/
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <gctypes.h>
|
||||
|
||||
#define GQR0 912
|
||||
#define GQR1 913
|
||||
#define GQR2 914
|
||||
#define GQR3 915
|
||||
|
@ -30,26 +31,6 @@ extern "C" {
|
|||
|
||||
#define __set_gqr(_reg,_val) asm volatile("mtspr %0,%1" : : "i"(_reg), "b"(_val))
|
||||
|
||||
// does a default init
|
||||
static inline void CAST_Init()
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"li 3,0x0004\n\
|
||||
oris 3,3,0x0004\n\
|
||||
mtspr 916,3\n\
|
||||
li 3,0x0005\n\
|
||||
oris 3,3,0x0005\n\
|
||||
mtspr 917,3\n\
|
||||
li 3,0x0006\n\
|
||||
oris 3,3,0x0006\n\
|
||||
mtspr 918,3\n\
|
||||
li 3,0x0007\n\
|
||||
oris 3,3,0x0007\n\
|
||||
mtspr 919,3\n"
|
||||
: : : "r3"
|
||||
);
|
||||
}
|
||||
|
||||
static inline void CAST_SetGQR2(u32 type,u32 scale)
|
||||
{
|
||||
register u32 val = (((((scale)<<8)|(type))<<16)|(((scale)<<8)|(type)));
|
||||
|
@ -62,31 +43,6 @@ static inline void CAST_SetGQR3(u32 type,u32 scale)
|
|||
__set_gqr(GQR3,val);
|
||||
}
|
||||
|
||||
static inline void CAST_SetGQR4(u32 type,u32 scale)
|
||||
{
|
||||
register u32 val = (((((scale)<<8)|(type))<<16)|(((scale)<<8)|(type)));
|
||||
__set_gqr(GQR4,val);
|
||||
}
|
||||
|
||||
static inline void CAST_SetGQR5(u32 type,u32 scale)
|
||||
{
|
||||
register u32 val = (((((scale)<<8)|(type))<<16)|(((scale)<<8)|(type)));
|
||||
__set_gqr(GQR5,val);
|
||||
}
|
||||
|
||||
static inline void CAST_SetGQR6(u32 type,u32 scale)
|
||||
{
|
||||
register u32 val = (((((scale)<<8)|(type))<<16)|(((scale)<<8)|(type)));
|
||||
__set_gqr(GQR6,val);
|
||||
}
|
||||
|
||||
static inline void CAST_SetGQR7(u32 type,u32 scale)
|
||||
{
|
||||
register u32 val = (((((scale)<<8)|(type))<<16)|(((scale)<<8)|(type)));
|
||||
__set_gqr(GQR7,val);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
/* */
|
||||
/* cast from int to float */
|
||||
|
|
|
@ -99,7 +99,7 @@ inline unsigned int dyna_run(PowerPC_func* func, unsigned int (*code)(void)){
|
|||
: "=r" (naddr), "=r" (link_branch), "=r" (return_addr),
|
||||
"=r" (last_func)
|
||||
: "r" (code)
|
||||
: "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "22");
|
||||
: "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "22");
|
||||
|
||||
link_branch = link_branch == return_addr ? NULL : link_branch - 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue