attempt to emulate vectest, but leave logging in because i want a better test case. remove postest printf since i found a few test cases.
This commit is contained in:
parent
d3915c5f8b
commit
20fe8c2e8a
|
@ -3406,10 +3406,10 @@ u16 FASTCALL _MMU_ARM9_read16(u32 adr)
|
||||||
return 0;
|
return 0;
|
||||||
//almost worthless for now
|
//almost worthless for now
|
||||||
//return (gfx3d_GetNumVertex());
|
//return (gfx3d_GetNumVertex());
|
||||||
case 0x04000630:
|
//case 0x04000630:
|
||||||
case 0x04000632:
|
//case 0x04000632:
|
||||||
case 0x04000634:
|
//case 0x04000634:
|
||||||
return gfx3d_glGetVecRes((adr & 0xF) >> 1);
|
// return gfx3d_glGetVecRes((adr & 0xF) >> 1);
|
||||||
// ============================================= 3D end
|
// ============================================= 3D end
|
||||||
case REG_IME :
|
case REG_IME :
|
||||||
return (u16)MMU.reg_IME[ARMCPU_ARM9];
|
return (u16)MMU.reg_IME[ARMCPU_ARM9];
|
||||||
|
|
|
@ -1501,7 +1501,9 @@ BOOL gfx3d_glBoxTest(u32 v)
|
||||||
|
|
||||||
BOOL gfx3d_glPosTest(u32 v)
|
BOOL gfx3d_glPosTest(u32 v)
|
||||||
{
|
{
|
||||||
printf("POSTEST\n");
|
//this is apparently tested by transformers decepticons and ultimate spiderman
|
||||||
|
|
||||||
|
//printf("POSTEST\n");
|
||||||
#ifdef TESTS_ENABLED
|
#ifdef TESTS_ENABLED
|
||||||
MMU_new.gxstat.tb = 1;
|
MMU_new.gxstat.tb = 1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1526,9 +1528,30 @@ BOOL gfx3d_glPosTest(u32 v)
|
||||||
|
|
||||||
void gfx3d_glVecTest(u32 v)
|
void gfx3d_glVecTest(u32 v)
|
||||||
{
|
{
|
||||||
printf("VECTEST\n");
|
|
||||||
GFX_DELAY(5);
|
GFX_DELAY(5);
|
||||||
//INFO("NDS_glVecTest\n");
|
|
||||||
|
printf("VECTEST\n");
|
||||||
|
|
||||||
|
CACHE_ALIGN float normal[4] = { normalTable[v&1023],
|
||||||
|
normalTable[(v>>10)&1023],
|
||||||
|
normalTable[(v>>20)&1023],
|
||||||
|
1};
|
||||||
|
|
||||||
|
MatrixMultVec4x4(mtxCurrent[2], normal);
|
||||||
|
|
||||||
|
s16 x = (s16)(normal[0]);
|
||||||
|
s16 y = (s16)(normal[1]);
|
||||||
|
s16 z = (s16)(normal[2]);
|
||||||
|
|
||||||
|
x = rand();
|
||||||
|
y = rand();
|
||||||
|
z = rand();
|
||||||
|
|
||||||
|
MMU_new.gxstat.tb = 0; // clear busy
|
||||||
|
T1WriteWord(MMU.MMU_MEM[0][0x40], 0x630, x);
|
||||||
|
T1WriteWord(MMU.MMU_MEM[0][0x40], 0x632, y);
|
||||||
|
T1WriteWord(MMU.MMU_MEM[0][0x40], 0x634, z);
|
||||||
|
|
||||||
}
|
}
|
||||||
//================================================================================= Geometry Engine
|
//================================================================================= Geometry Engine
|
||||||
//================================================================================= (end)
|
//================================================================================= (end)
|
||||||
|
|
Loading…
Reference in New Issue