Merge branch 'master' of https://github.com/project64/project64
This commit is contained in:
commit
b10487ee07
|
@ -15607,12 +15607,15 @@ void Combine ()
|
||||||
left = cc_lookup[actual_combine>>24];
|
left = cc_lookup[actual_combine>>24];
|
||||||
right = cc_lookup[(actual_combine>>24)+1];
|
right = cc_lookup[(actual_combine>>24)+1];
|
||||||
|
|
||||||
while (1)
|
do {
|
||||||
{
|
|
||||||
last = current;
|
last = current;
|
||||||
current = left + ((right-left) >> 1);
|
current = left + ((right-left) >> 1);
|
||||||
if (current == last)
|
if (current == last)
|
||||||
|
{
|
||||||
|
FRDP("Warning! Could not initialize current_combiner to valid index.\n");
|
||||||
|
current_combine = ~0u; /* Debug uncertain case, and fix warning (cxd4). */
|
||||||
break; // can't be found!
|
break; // can't be found!
|
||||||
|
}
|
||||||
|
|
||||||
current_combine = color_cmb_list[current].key;
|
current_combine = color_cmb_list[current].key;
|
||||||
if (current_combine < actual_combine)
|
if (current_combine < actual_combine)
|
||||||
|
@ -15621,7 +15624,7 @@ void Combine ()
|
||||||
right = current;
|
right = current;
|
||||||
else
|
else
|
||||||
break; // found it!
|
break; // found it!
|
||||||
}
|
} while (1);
|
||||||
|
|
||||||
// Check if we didn't find it
|
// Check if we didn't find it
|
||||||
if (actual_combine != current_combine)
|
if (actual_combine != current_combine)
|
||||||
|
@ -15981,15 +15984,10 @@ void InitCombine ()
|
||||||
if (const char * extstr = strstr(extensions, "COMBINE")) {
|
if (const char * extstr = strstr(extensions, "COMBINE")) {
|
||||||
if (!strncmp(extstr, "COMBINE", 7)) {
|
if (!strncmp(extstr, "COMBINE", 7)) {
|
||||||
LOG ("extensions ");
|
LOG ("extensions ");
|
||||||
char strColorCombineExt[] = "grColorCombineExt";
|
|
||||||
cmb.grColorCombineExt = (GRCOLORCOMBINEEXT) grColorCombineExt;
|
cmb.grColorCombineExt = (GRCOLORCOMBINEEXT) grColorCombineExt;
|
||||||
char strAlphaCombineExt[] = "grAlphaCombineExt";
|
|
||||||
cmb.grAlphaCombineExt = (GRCOLORCOMBINEEXT)grAlphaCombineExt;
|
cmb.grAlphaCombineExt = (GRCOLORCOMBINEEXT)grAlphaCombineExt;
|
||||||
char strTexColorCombineExt[] = "grTexColorCombineExt";
|
|
||||||
cmb.grTexColorCombineExt = (GRTEXCOLORCOMBINEEXT)grTexColorCombineExt ;
|
cmb.grTexColorCombineExt = (GRTEXCOLORCOMBINEEXT)grTexColorCombineExt ;
|
||||||
char strTexAlphaCombineExt[] = "grTexAlphaCombineExt";
|
|
||||||
cmb.grTexAlphaCombineExt = (GRTEXCOLORCOMBINEEXT) grTexAlphaCombineExt ;
|
cmb.grTexAlphaCombineExt = (GRTEXCOLORCOMBINEEXT) grTexAlphaCombineExt ;
|
||||||
char strConstantColorValueExt[] = "grConstantColorValueExt";
|
|
||||||
cmb.grConstantColorValueExt = (GRCONSTANTCOLORVALUEEXT) grConstantColorValueExt;
|
cmb.grConstantColorValueExt = (GRCONSTANTCOLORVALUEEXT) grConstantColorValueExt;
|
||||||
if (cmb.grColorCombineExt && cmb.grAlphaCombineExt &&
|
if (cmb.grColorCombineExt && cmb.grAlphaCombineExt &&
|
||||||
cmb.grTexColorCombineExt && cmb.grTexAlphaCombineExt)
|
cmb.grTexColorCombineExt && cmb.grTexAlphaCombineExt)
|
||||||
|
@ -16012,12 +16010,15 @@ void InitCombine ()
|
||||||
void ColorCombinerToExtension ()
|
void ColorCombinerToExtension ()
|
||||||
{
|
{
|
||||||
wxUint32 ext_local, ext_local_a, ext_other, ext_other_a;
|
wxUint32 ext_local, ext_local_a, ext_other, ext_other_a;
|
||||||
|
|
||||||
switch (cmb.c_loc)
|
switch (cmb.c_loc)
|
||||||
{
|
{
|
||||||
case GR_COMBINE_LOCAL_ITERATED:
|
case GR_COMBINE_LOCAL_ITERATED:
|
||||||
ext_local = GR_CMBX_ITRGB;
|
ext_local = GR_CMBX_ITRGB;
|
||||||
ext_local_a = GR_CMBX_ITALPHA;
|
ext_local_a = GR_CMBX_ITALPHA;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid combiner locality %u.\n", cmb.c_loc);
|
||||||
case GR_COMBINE_LOCAL_CONSTANT:
|
case GR_COMBINE_LOCAL_CONSTANT:
|
||||||
ext_local = GR_CMBX_CONSTANT_COLOR;
|
ext_local = GR_CMBX_CONSTANT_COLOR;
|
||||||
ext_local_a = GR_CMBX_CONSTANT_ALPHA;
|
ext_local_a = GR_CMBX_CONSTANT_ALPHA;
|
||||||
|
@ -16033,6 +16034,8 @@ void ColorCombinerToExtension ()
|
||||||
ext_other = GR_CMBX_TEXTURE_RGB;
|
ext_other = GR_CMBX_TEXTURE_RGB;
|
||||||
ext_other_a = GR_CMBX_TEXTURE_ALPHA;
|
ext_other_a = GR_CMBX_TEXTURE_ALPHA;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid combiner flag %u.\n", cmb.c_oth);
|
||||||
case GR_COMBINE_OTHER_CONSTANT:
|
case GR_COMBINE_OTHER_CONSTANT:
|
||||||
ext_other = GR_CMBX_CONSTANT_COLOR;
|
ext_other = GR_CMBX_CONSTANT_COLOR;
|
||||||
ext_other_a = GR_CMBX_CONSTANT_ALPHA;
|
ext_other_a = GR_CMBX_CONSTANT_ALPHA;
|
||||||
|
@ -16378,6 +16381,8 @@ void TexColorCombinerToExtension (GrChipID_t tmu)
|
||||||
tc_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA;
|
tc_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA;
|
||||||
tc_ext_c_invert = 1;
|
tc_ext_c_invert = 1;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid combiner TMU factor %u.\n", tmu_fac);
|
||||||
case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR:
|
case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR:
|
||||||
tc_ext_c = GR_CMBX_DETAIL_FACTOR;
|
tc_ext_c = GR_CMBX_DETAIL_FACTOR;
|
||||||
tc_ext_c_invert = 1;
|
tc_ext_c_invert = 1;
|
||||||
|
@ -16472,6 +16477,8 @@ void TexColorCombinerToExtension (GrChipID_t tmu)
|
||||||
tc_ext_d = GR_CMBX_B;
|
tc_ext_d = GR_CMBX_B;
|
||||||
tc_ext_d_invert = 0;
|
tc_ext_d_invert = 0;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid combiner TMU function %u.\n", tmu_func);
|
||||||
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA:
|
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA:
|
||||||
tc_ext_a = GR_CMBX_LOCAL_TEXTURE_RGB;
|
tc_ext_a = GR_CMBX_LOCAL_TEXTURE_RGB;
|
||||||
tc_ext_a_mode = GR_FUNC_MODE_ZERO;
|
tc_ext_a_mode = GR_FUNC_MODE_ZERO;
|
||||||
|
@ -16555,6 +16562,8 @@ void TexAlphaCombinerToExtension (GrChipID_t tmu)
|
||||||
ta_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA;
|
ta_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA;
|
||||||
ta_ext_c_invert = 1;
|
ta_ext_c_invert = 1;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid combiner alpha factor %u.\n", tmu_a_fac);
|
||||||
case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR:
|
case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR:
|
||||||
ta_ext_c = GR_CMBX_DETAIL_FACTOR;
|
ta_ext_c = GR_CMBX_DETAIL_FACTOR;
|
||||||
ta_ext_c_invert = 1;
|
ta_ext_c_invert = 1;
|
||||||
|
@ -16618,6 +16627,8 @@ void TexAlphaCombinerToExtension (GrChipID_t tmu)
|
||||||
ta_ext_d = GR_CMBX_B;
|
ta_ext_d = GR_CMBX_B;
|
||||||
ta_ext_d_invert = 0;
|
ta_ext_d_invert = 0;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid combiner alpha coverage function %u.\n", tmu_a_func);
|
||||||
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL:
|
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL:
|
||||||
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA:
|
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA:
|
||||||
ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA;
|
ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA;
|
||||||
|
|
|
@ -705,7 +705,12 @@ int FindTextureBuffer(wxUint32 addr, wxUint16 width)
|
||||||
if (rdp.tbuff_tex->crc == 0)
|
if (rdp.tbuff_tex->crc == 0)
|
||||||
{
|
{
|
||||||
rdp.tbuff_tex->crc = CalcCRC(rdp.tbuff_tex);
|
rdp.tbuff_tex->crc = CalcCRC(rdp.tbuff_tex);
|
||||||
bCorrect = width == 1 || rdp.tbuff_tex->width == width || (rdp.tbuff_tex->width > 320 && rdp.tbuff_tex->width == width*2);
|
bCorrect =
|
||||||
|
(width == 1)
|
||||||
|
|| (rdp.tbuff_tex->width == width)
|
||||||
|
|| ( (rdp.tbuff_tex->width > 320)
|
||||||
|
&& (rdp.tbuff_tex->width == (wxUint32)width*2)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bCorrect = rdp.tbuff_tex->crc == CalcCRC(rdp.tbuff_tex);
|
bCorrect = rdp.tbuff_tex->crc == CalcCRC(rdp.tbuff_tex);
|
||||||
|
|
|
@ -861,11 +861,13 @@ void TexCache ()
|
||||||
|
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
|
int tmu_v[2];
|
||||||
|
|
||||||
|
tmu_v[0] = tmu_0;
|
||||||
|
tmu_v[1] = tmu_1;
|
||||||
for (int i=0; i<2; i++)
|
for (int i=0; i<2; i++)
|
||||||
{
|
{
|
||||||
int tmu;
|
const int tmu = tmu_v[i];
|
||||||
if (i==0) tmu=tmu_0;
|
|
||||||
else if (i==1) tmu=tmu_1;
|
|
||||||
|
|
||||||
if (tmu >= voodoo.num_tmu) continue;
|
if (tmu >= voodoo.num_tmu) continue;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,14 @@
|
||||||
#include "TexLoad16b.h"
|
#include "TexLoad16b.h"
|
||||||
#include "TexLoad32b.h"
|
#include "TexLoad32b.h"
|
||||||
|
|
||||||
wxUint32 LoadNone (wxUIntPtr dst, wxUIntPtr src, int wid_64, int height, int line, int /*real_width*/, int tile)
|
wxUint32 LoadNone(
|
||||||
|
wxUIntPtr /*dst*/,
|
||||||
|
wxUIntPtr /*src*/,
|
||||||
|
int /*wid_64*/,
|
||||||
|
int /*height*/,
|
||||||
|
int /*line*/,
|
||||||
|
int /*real_width*/,
|
||||||
|
int /*tile*/)
|
||||||
{
|
{
|
||||||
memset (texture, 0, 4096*4);
|
memset (texture, 0, 4096*4);
|
||||||
return (1 << 16) | GR_TEXFMT_ARGB_1555;
|
return (1 << 16) | GR_TEXFMT_ARGB_1555;
|
||||||
|
|
|
@ -1639,13 +1639,13 @@ static void rdp_setprimdepth()
|
||||||
static void rdp_setothermode()
|
static void rdp_setothermode()
|
||||||
{
|
{
|
||||||
#define F3DEX2_SETOTHERMODE(cmd,sft,len,data) { \
|
#define F3DEX2_SETOTHERMODE(cmd,sft,len,data) { \
|
||||||
rdp.cmd0 = (cmd<<24) | ((32-(sft)-(len))<<8) | (((len)-1)); \
|
rdp.cmd0 = (wxUint32)(((cmd)<<24) | ((32-(sft)-(len))<<8) | (((len)-1))); \
|
||||||
rdp.cmd1 = data; \
|
rdp.cmd1 = (wxUint32)(data); \
|
||||||
gfx_instruction[settings.ucode][cmd] (); \
|
gfx_instruction[settings.ucode][cmd] (); \
|
||||||
}
|
}
|
||||||
#define SETOTHERMODE(cmd,sft,len,data) { \
|
#define SETOTHERMODE(cmd,sft,len,data) { \
|
||||||
rdp.cmd0 = (cmd<<24) | ((sft)<<8) | (len); \
|
rdp.cmd0 = (wxUint32)(((cmd)<<24) | ((sft)<<8) | (len)); \
|
||||||
rdp.cmd1 = data; \
|
rdp.cmd1 = (wxUint32)(data); \
|
||||||
gfx_instruction[settings.ucode][cmd] (); \
|
gfx_instruction[settings.ucode][cmd] (); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3002,10 +3002,16 @@ input: FrameBufferModifyEntry *plist
|
||||||
size = size of the plist, max = 1024
|
size = size of the plist, max = 1024
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
EXPORT void CALL FBWList(FrameBufferModifyEntry *plist, wxUint32 size)
|
#ifdef RDP_LOGGING
|
||||||
|
EXPORT void CALL FBWList(FrameBufferModifyEntry* /*plist*/, wxUint32 size)
|
||||||
|
#else
|
||||||
|
EXPORT void CALL FBWList(FrameBufferModifyEntry* /*plist*/, wxUint32)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
LOG ("FBWList ()\n");
|
LOG ("FBWList ()\n");
|
||||||
|
#ifdef RDP_LOGGING
|
||||||
FRDP("FBWList. size: %d\n", size);
|
FRDP("FBWList. size: %d\n", size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3018,7 +3024,7 @@ val val
|
||||||
size 1 = wxUint8, 2 = wxUint16, 4 = wxUint32
|
size 1 = wxUint8, 2 = wxUint16, 4 = wxUint32
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
EXPORT void CALL FBWrite(wxUint32 addr, wxUint32 size)
|
EXPORT void CALL FBWrite(wxUint32 addr, wxUint32 /*size*/)
|
||||||
{
|
{
|
||||||
LOG ("FBWrite ()\n");
|
LOG ("FBWrite ()\n");
|
||||||
if (cpu_fb_ignore)
|
if (cpu_fb_ignore)
|
||||||
|
|
|
@ -99,6 +99,8 @@ static void uc9_draw_object (wxUint8 * addr, wxUint32 type)
|
||||||
{
|
{
|
||||||
wxUint32 textured, vnum, vsize;
|
wxUint32 textured, vnum, vsize;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
default: /* added to fix uninitialized variable warnings + debugging */
|
||||||
|
FRDP("Unknown geometric primitive type %u.\n", type);
|
||||||
case 0: //null
|
case 0: //null
|
||||||
textured = vnum = vsize = 0;
|
textured = vnum = vsize = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -264,6 +266,10 @@ static void uc9_fmlight ()
|
||||||
case 8:
|
case 8:
|
||||||
m = (M44*)rdp.combined;
|
m = (M44*)rdp.combined;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
m = NULL; /* allowing segfaults to debug in case of PJGlide64 bugs */
|
||||||
|
FRDP("Invalid FM light matrix ID %u.\n", mid);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
rdp.light[rdp.num_lights].r = (float)(((wxUint8*)gfx.DMEM)[(a+0)^3]) / 255.0f;
|
rdp.light[rdp.num_lights].r = (float)(((wxUint8*)gfx.DMEM)[(a+0)^3]) / 255.0f;
|
||||||
|
@ -400,6 +406,10 @@ static void uc9_mtxcat ()
|
||||||
s = (M44*)rdp.combined;
|
s = (M44*)rdp.combined;
|
||||||
LRDP("Comb * ");
|
LRDP("Comb * ");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid mutex S-coordinate: %u\n", S);
|
||||||
|
s = NULL; /* intentional segfault to alert for bugs in PJGlide64 (cxd4) */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
switch (T) {
|
switch (T) {
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -414,6 +424,10 @@ static void uc9_mtxcat ()
|
||||||
LRDP("Comb -> ");
|
LRDP("Comb -> ");
|
||||||
t = (M44*)rdp.combined;
|
t = (M44*)rdp.combined;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
FRDP("Invalid mutex T-coordinate: %u\n", T);
|
||||||
|
t = NULL; /* intentional segfault to alert for bugs in PJGlide64 (cxd4) */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
DECLAREALIGN16VAR(m[4][4]);
|
DECLAREALIGN16VAR(m[4][4]);
|
||||||
MulMatrices(*s, *t, m);
|
MulMatrices(*s, *t, m);
|
||||||
|
|
|
@ -213,7 +213,7 @@ int screen_width, screen_height;
|
||||||
|
|
||||||
static inline void opt_glCopyTexImage2D( GLenum target,
|
static inline void opt_glCopyTexImage2D( GLenum target,
|
||||||
GLint level,
|
GLint level,
|
||||||
GLenum internalFormat,
|
GLint internalFormat,
|
||||||
GLint x,
|
GLint x,
|
||||||
GLint y,
|
GLint y,
|
||||||
GLsizei width,
|
GLsizei width,
|
||||||
|
@ -352,7 +352,10 @@ static fb fbs[100];
|
||||||
static int nb_fb = 0;
|
static int nb_fb = 0;
|
||||||
static unsigned int curBufferAddr = 0;
|
static unsigned int curBufferAddr = 0;
|
||||||
|
|
||||||
struct TMU_USAGE { int min, max; } tmu_usage[2] = { {0xfffffff, 0}, {0xfffffff, 0} };
|
struct TMU_USAGE { unsigned long min, max; } tmu_usage[2] = {
|
||||||
|
{ 0x0FFFFFFFul, 0x00000000ul },
|
||||||
|
{ 0x0FFFFFFFul, 0x00000000ul },
|
||||||
|
};
|
||||||
|
|
||||||
struct texbuf_t {
|
struct texbuf_t {
|
||||||
FxU32 start, end;
|
FxU32 start, end;
|
||||||
|
@ -500,8 +503,8 @@ grClipWindow( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy )
|
||||||
maxy = th - maxy;
|
maxy = th - maxy;
|
||||||
miny = th - miny;
|
miny = th - miny;
|
||||||
FxU32 tmp = maxy; maxy = miny; miny = tmp;
|
FxU32 tmp = maxy; maxy = miny; miny = tmp;
|
||||||
if (maxx > width) maxx = width;
|
if ((FxI32)maxx > width) maxx = width;
|
||||||
if (maxy > height) maxy = height;
|
if ((FxI32)maxy > height) maxy = height;
|
||||||
if (int(minx) < 0) minx = 0;
|
if (int(minx) < 0) minx = 0;
|
||||||
if (int(miny) < 0) miny = 0;
|
if (int(miny) < 0) miny = 0;
|
||||||
if (maxx < minx) maxx = minx;
|
if (maxx < minx) maxx = minx;
|
||||||
|
@ -604,13 +607,15 @@ grSstWinOpenExt(
|
||||||
GrScreenRefresh_t refresh_rate,
|
GrScreenRefresh_t refresh_rate,
|
||||||
GrColorFormat_t color_format,
|
GrColorFormat_t color_format,
|
||||||
GrOriginLocation_t origin_location,
|
GrOriginLocation_t origin_location,
|
||||||
GrPixelFormat_t pixelformat,
|
GrPixelFormat_t /*pixelformat*/,
|
||||||
int nColBuffers,
|
int nColBuffers,
|
||||||
int nAuxBuffers)
|
int nAuxBuffers)
|
||||||
{
|
{
|
||||||
LOG("grSstWinOpenExt(%d, %d, %d, %d, %d, %d %d)\r\n", hWnd, screen_resolution, refresh_rate, color_format, origin_location, nColBuffers, nAuxBuffers);
|
LOG(
|
||||||
return grSstWinOpen(hWnd, screen_resolution, refresh_rate, color_format,
|
"grSstWinOpenExt(%d, %d, %d, %d, %d, %d %d)\r\n",
|
||||||
origin_location, nColBuffers, nAuxBuffers);
|
hWnd, screen_resolution, refresh_rate, color_format, origin_location, nColBuffers, nAuxBuffers);
|
||||||
|
return grSstWinOpen(
|
||||||
|
hWnd, screen_resolution, refresh_rate, color_format, origin_location, nColBuffers, nAuxBuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -1173,8 +1178,8 @@ grSstWinClose( GrContext_t context )
|
||||||
LOG("grSstWinClose(%d)\r\n", context);
|
LOG("grSstWinClose(%d)\r\n", context);
|
||||||
|
|
||||||
for (i=0; i<2; i++) {
|
for (i=0; i<2; i++) {
|
||||||
tmu_usage[i].min = 0xfffffff;
|
tmu_usage[i].min = 0x0FFFFFFFul;
|
||||||
tmu_usage[i].max = 0;
|
tmu_usage[i].max = 0x00000000ul;
|
||||||
invtex[i] = 0;
|
invtex[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1328,10 +1333,10 @@ FX_ENTRY void FX_CALL grTextureBufferExt( GrChipID_t tmu,
|
||||||
|
|
||||||
int rtmu = startAddress < grTexMinAddress(GR_TMU1)? 0 : 1;
|
int rtmu = startAddress < grTexMinAddress(GR_TMU1)? 0 : 1;
|
||||||
int size = pBufferWidth*pBufferHeight*2; //grTexFormatSize(fmt);
|
int size = pBufferWidth*pBufferHeight*2; //grTexFormatSize(fmt);
|
||||||
if (tmu_usage[rtmu].min > pBufferAddress)
|
if (tmu_usage[rtmu].min > pBufferAddress + 0)
|
||||||
tmu_usage[rtmu].min = pBufferAddress;
|
tmu_usage[rtmu].min = pBufferAddress + 0;
|
||||||
if (tmu_usage[rtmu].max < pBufferAddress+size)
|
if (tmu_usage[rtmu].max < pBufferAddress + size)
|
||||||
tmu_usage[rtmu].max = pBufferAddress+size;
|
tmu_usage[rtmu].max = pBufferAddress + size;
|
||||||
// printf("tmu %d usage now %gMb - %gMb\n",
|
// printf("tmu %d usage now %gMb - %gMb\n",
|
||||||
// rtmu, tmu_usage[rtmu].min/1024.0f, tmu_usage[rtmu].max/1024.0f);
|
// rtmu, tmu_usage[rtmu].min/1024.0f, tmu_usage[rtmu].max/1024.0f);
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
|
<ClCompile Include="Plugins\Plugin Base.cpp" />
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -197,6 +198,7 @@
|
||||||
<ClInclude Include="Multilanguage.h" />
|
<ClInclude Include="Multilanguage.h" />
|
||||||
<ClInclude Include="N64 System.h" />
|
<ClInclude Include="N64 System.h" />
|
||||||
<ClInclude Include="Plugin.h" />
|
<ClInclude Include="Plugin.h" />
|
||||||
|
<ClInclude Include="Plugins\Plugin Base.h" />
|
||||||
<ClInclude Include="Settings.h" />
|
<ClInclude Include="Settings.h" />
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="User Interface.h" />
|
<ClInclude Include="User Interface.h" />
|
||||||
|
|
|
@ -417,6 +417,9 @@
|
||||||
<ClCompile Include="3rd Party\zlib\zip.c">
|
<ClCompile Include="3rd Party\zlib\zip.c">
|
||||||
<Filter>Source Files\3rd Party Source\ZLib Source</Filter>
|
<Filter>Source Files\3rd Party Source\ZLib Source</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Plugins\Plugin Base.cpp">
|
||||||
|
<Filter>Source Files\Plugin Source</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="User Interface\Bitmaps\AboutScreenBottom.bmp">
|
<Image Include="User Interface\Bitmaps\AboutScreenBottom.bmp">
|
||||||
|
@ -839,5 +842,8 @@
|
||||||
<ClInclude Include="3rd Party\zlib\ZLIB.H">
|
<ClInclude Include="3rd Party\zlib\ZLIB.H">
|
||||||
<Filter>Header Files\3rd Party Headers\Zlib Headers</Filter>
|
<Filter>Header Files\3rd Party Headers\Zlib Headers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Plugins\Plugin Base.h">
|
||||||
|
<Filter>Header Files\Plugin Headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -167,12 +167,12 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
|
||||||
_makepath( SaveFile, drive, dir, fname, NULL );
|
_makepath( SaveFile, drive, dir, fname, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_Settings->SaveString(GameRunning_InstantSaveFile,SaveFile);
|
g_Settings->SaveString(GameRunning_InstantSaveFile, SaveFile);
|
||||||
|
|
||||||
char SaveDir[MAX_PATH];
|
char SaveDir[MAX_PATH];
|
||||||
_makepath( SaveDir, drive, dir, NULL, NULL );
|
_makepath( SaveDir, drive, dir, NULL, NULL );
|
||||||
g_Settings->SaveString(Directory_LastSave,SaveDir);
|
g_Settings->SaveString(Directory_LastSave,SaveDir);
|
||||||
g_System->SaveState();
|
g_BaseSystem->ExternalEvent(SysEvent_SaveMachineState);
|
||||||
}
|
}
|
||||||
g_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_SaveGame);
|
g_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_SaveGame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ BOOL IsNextInstructionMmx(DWORD PC) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case RSP_VECTOR_VADD:
|
case RSP_VECTOR_VADD:
|
||||||
|
case RSP_VECTOR_VSUB:
|
||||||
/* Requires no accumulator write! & No flags! */
|
/* Requires no accumulator write! & No flags! */
|
||||||
if (WriteToAccum(Low16BitAccum, CompilePC) == TRUE) {
|
if (WriteToAccum(Low16BitAccum, CompilePC) == TRUE) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1398,7 +1399,11 @@ void GetInstructionInfo(DWORD PC, OPCODE * RspOp, OPCODE_INFO * info) {
|
||||||
info->DestReg = RspOp->rt;
|
info->DestReg = RspOp->rt;
|
||||||
info->SourceReg0 = (DWORD)-1;
|
info->SourceReg0 = (DWORD)-1;
|
||||||
info->SourceReg1 = (DWORD)-1;
|
info->SourceReg1 = (DWORD)-1;
|
||||||
info->flags = COPO_MF_Instruction | GPR_Instruction | Load_Operation;
|
if (RspOp->rd == 0x4 || RspOp->rd == 0x7){
|
||||||
|
info->flags = InvalidOpcode;
|
||||||
|
} else{
|
||||||
|
info->flags = COPO_MF_Instruction | GPR_Instruction | Load_Operation;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSP_COP0_MT:
|
case RSP_COP0_MT:
|
||||||
|
@ -1421,16 +1426,25 @@ void GetInstructionInfo(DWORD PC, OPCODE * RspOp, OPCODE_INFO * info) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSP_VECTOR_VMULF:
|
case RSP_VECTOR_VMULF:
|
||||||
|
case RSP_VECTOR_VMULU:
|
||||||
case RSP_VECTOR_VMUDL:
|
case RSP_VECTOR_VMUDL:
|
||||||
case RSP_VECTOR_VMUDM:
|
case RSP_VECTOR_VMUDM:
|
||||||
case RSP_VECTOR_VMUDN:
|
case RSP_VECTOR_VMUDN:
|
||||||
case RSP_VECTOR_VMUDH:
|
case RSP_VECTOR_VMUDH:
|
||||||
|
case RSP_VECTOR_VABS:
|
||||||
|
case RSP_VECTOR_VAND:
|
||||||
|
case RSP_VECTOR_VOR:
|
||||||
|
case RSP_VECTOR_VXOR:
|
||||||
|
case RSP_VECTOR_VNAND:
|
||||||
|
case RSP_VECTOR_VNOR:
|
||||||
|
case RSP_VECTOR_VNXOR:
|
||||||
info->DestReg = RspOp->sa;
|
info->DestReg = RspOp->sa;
|
||||||
info->SourceReg0 = RspOp->rd;
|
info->SourceReg0 = RspOp->rd;
|
||||||
info->SourceReg1 = RspOp->rt;
|
info->SourceReg1 = RspOp->rt;
|
||||||
info->flags = VEC_Instruction | VEC_ResetAccum | Accum_Operation;
|
info->flags = VEC_Instruction | VEC_ResetAccum | Accum_Operation;
|
||||||
break;
|
break;
|
||||||
case RSP_VECTOR_VMACF:
|
case RSP_VECTOR_VMACF:
|
||||||
|
case RSP_VECTOR_VMACU:
|
||||||
case RSP_VECTOR_VMADL:
|
case RSP_VECTOR_VMADL:
|
||||||
case RSP_VECTOR_VMADM:
|
case RSP_VECTOR_VMADM:
|
||||||
case RSP_VECTOR_VMADN:
|
case RSP_VECTOR_VMADN:
|
||||||
|
@ -1440,23 +1454,13 @@ void GetInstructionInfo(DWORD PC, OPCODE * RspOp, OPCODE_INFO * info) {
|
||||||
info->SourceReg1 = RspOp->rt;
|
info->SourceReg1 = RspOp->rt;
|
||||||
info->flags = VEC_Instruction | VEC_Accumulate | Accum_Operation;
|
info->flags = VEC_Instruction | VEC_Accumulate | Accum_Operation;
|
||||||
break;
|
break;
|
||||||
case RSP_VECTOR_VABS:
|
|
||||||
case RSP_VECTOR_VADD:
|
case RSP_VECTOR_VADD:
|
||||||
case RSP_VECTOR_VADDC:
|
case RSP_VECTOR_VADDC:
|
||||||
case RSP_VECTOR_VSUB:
|
case RSP_VECTOR_VSUB:
|
||||||
case RSP_VECTOR_VSUBC:
|
case RSP_VECTOR_VSUBC:
|
||||||
case RSP_VECTOR_VAND:
|
|
||||||
case RSP_VECTOR_VOR:
|
|
||||||
case RSP_VECTOR_VXOR:
|
|
||||||
case RSP_VECTOR_VNXOR:
|
|
||||||
case RSP_VECTOR_VCR:
|
case RSP_VECTOR_VCR:
|
||||||
case RSP_VECTOR_VCH:
|
case RSP_VECTOR_VCH:
|
||||||
case RSP_VECTOR_VCL:
|
case RSP_VECTOR_VCL:
|
||||||
case RSP_VECTOR_VRCP:
|
|
||||||
case RSP_VECTOR_VRCPL:
|
|
||||||
case RSP_VECTOR_VRCPH:
|
|
||||||
case RSP_VECTOR_VRSQL:
|
|
||||||
case RSP_VECTOR_VRSQH:
|
|
||||||
case RSP_VECTOR_VLT:
|
case RSP_VECTOR_VLT:
|
||||||
case RSP_VECTOR_VEQ:
|
case RSP_VECTOR_VEQ:
|
||||||
case RSP_VECTOR_VGE:
|
case RSP_VECTOR_VGE:
|
||||||
|
@ -1468,19 +1472,22 @@ void GetInstructionInfo(DWORD PC, OPCODE * RspOp, OPCODE_INFO * info) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSP_VECTOR_VMOV:
|
case RSP_VECTOR_VMOV:
|
||||||
info->flags = InvalidOpcode;
|
case RSP_VECTOR_VRCP:
|
||||||
/* info->DestReg = RspOp->sa;
|
case RSP_VECTOR_VRCPL:
|
||||||
|
case RSP_VECTOR_VRCPH:
|
||||||
|
case RSP_VECTOR_VRSQL:
|
||||||
|
case RSP_VECTOR_VRSQH:
|
||||||
|
info->DestReg = RspOp->sa;
|
||||||
info->SourceReg0 = RspOp->rt;
|
info->SourceReg0 = RspOp->rt;
|
||||||
info->SourceReg1 = -1;
|
info->SourceReg1 = -1;
|
||||||
info->flags = VEC_Instruction; /* Assume reset? */
|
info->flags = VEC_Instruction | VEC_ResetAccum | Accum_Operation; /* Assume reset? */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSP_VECTOR_VMRG:
|
case RSP_VECTOR_VMRG:
|
||||||
info->flags = InvalidOpcode;
|
info->DestReg = RspOp->sa;
|
||||||
/* info->DestReg = RspOp->sa;
|
|
||||||
info->SourceReg0 = RspOp->rt;
|
info->SourceReg0 = RspOp->rt;
|
||||||
info->SourceReg1 = RspOp->rd;
|
info->SourceReg1 = RspOp->rd;
|
||||||
info->flags = VEC_Instruction; /* Assum reset? */
|
info->flags = VEC_Instruction | VEC_ResetAccum | Accum_Operation | Flag_Instruction; /* Assum reset? */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSP_VECTOR_VSAW:
|
case RSP_VECTOR_VSAW:
|
||||||
|
|
Loading…
Reference in New Issue