From: <pal...@us...> - 2004-10-31 22:35:14
|
Update of /cvsroot/gc-linux/libgx/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5696/src Modified Files: Makefile.am gu.c gx.c Log Message: Modified the PAL code so only PAL50 is 576 lines (thanks isobel) Index: Makefile.am =================================================================== RCS file: /cvsroot/gc-linux/libgx/src/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Makefile.am 22 Oct 2004 20:13:53 -0000 1.1.1.1 +++ Makefile.am 31 Oct 2004 22:34:59 -0000 1.2 @@ -1,5 +1,6 @@ AM_CCASFLAGS=-Wa,-mgekko -Wa,-mregnames -Wa,-gstabs+ - +AM_CFLAGS=-Wa,-mgekko -Wa,-mregnames -Wa,-gstabs+ + lib_LTLIBRARIES = libgx.la libgx_la_SOURCES=gx.c gu.c gx_asm.S gu_asm.S Index: gu.c =================================================================== RCS file: /cvsroot/gc-linux/libgx/src/gu.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- gu.c 22 Oct 2004 20:13:53 -0000 1.1.1.1 +++ gu.c 31 Oct 2004 22:35:00 -0000 1.2 @@ -222,7 +222,6 @@ c_guMtxRotTrig(mt,axis,sinA,cosA); } -#ifdef GEKKO void ps_guMtxRotRad(register Mtx mt,register const char axis,register f32 rad) { register f32 sinA,cosA; @@ -245,38 +244,36 @@ ps_guVecNormalize(axis); __asm__ __volatile__( - "psq_l %%f1,0(%1),0,0\n" + "psql %%f1,0(%1),0,0\n" "lfs %%f2,8(%1)\n" - "ps_merge00 %2,%2,%2\n" - "ps_muls0 %%f5,%%f1,%3\n" - "ps_muls0 %%f6,%%f2,%3\n" - "ps_muls1 %%f4,%%f5,%%f1\n" - "ps_muls0 %%f3,%%f5,%%f1\n" - "ps_muls0 %%f1,%%f1,%4\n" - "ps_muls0 %%f5,%%f5,%%f2\n" + "psmerge00 %2,%2,%2\n" + "psmuls0 %%f5,%%f1,%3\n" + "psmuls0 %%f6,%%f2,%3\n" + "psmuls1 %%f4,%%f5,%%f1\n" + "psmuls0 %%f3,%%f5,%%f1\n" + "psmuls0 %%f1,%%f1,%4\n" + "psmuls0 %%f5,%%f5,%%f2\n" "fnmsubs %%f7,%%f2,%4,%%f4\n" "fmadds %%f8,%%f2,%4,%%f4\n" - "ps_neg %%f10,%%f1\n" - "ps_sum0 %%f9,%%f5,%5,%%f1\n" - "ps_sum0 %%f3,%%f3,%%f7,%2\n" - "ps_sum1 %%f4,%2,%%f8,%%f4\n" - "ps_sum0 %%f7,%%f10,%5,%%f5\n" - "ps_sum0 %%f10,%%f5,%%f5,%%f10\n" - "psq_st %%f9,8(%0),0,0\n" - "ps_muls0 %%f6,%%f6,%%f2\n" - "psq_st %%f3,0(%0),0,0\n" - "ps_sum1 %%f5,%%f1,%%f10,%%f5\n" - "psq_st %%f4,16(%0),0,0\n" - "ps_sum0 %%f6,%%f6,%5,%2\n" - "psq_st %%f7,24(%0),0,0\n" - "psq_st %%f5,32(%0),0,0\n" - "psq_st %%f6,40(%0),0,0\n" + "psneg %%f10,%%f1\n" + "pssum0 %%f9,%%f5,%5,%%f1\n" + "pssum0 %%f3,%%f3,%%f7,%2\n" + "pssum1 %%f4,%2,%%f8,%%f4\n" + "pssum0 %%f7,%%f10,%5,%%f5\n" + "pssum0 %%f10,%%f5,%%f5,%%f10\n" + "psqst %%f9,8(%0),0,0\n" + "psmuls0 %%f6,%%f6,%%f2\n" + "psqst %%f3,0(%0),0,0\n" + "pssum1 %%f5,%%f1,%%f10,%%f5\n" + "psqst %%f4,16(%0),0,0\n" + "pssum0 %%f6,%%f6,%5,%2\n" + "psqst %%f7,24(%0),0,0\n" + "psqst %%f5,32(%0),0,0\n" + "psqst %%f6,40(%0),0,0\n" : "=r"(mt) : "r"(axis), "f"(cT), "f"(tT), "f"(sT), "f"(fc0) ); } -#endif - void c_guMtxRotTrig(Mtx mt,const char axis,f32 sinA,f32 cosA) { switch(axis) { Index: gx.c =================================================================== RCS file: /cvsroot/gc-linux/libgx/src/gx.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gx.c 24 Oct 2004 04:35:36 -0000 1.2 +++ gx.c 31 Oct 2004 22:35:00 -0000 1.3 @@ -687,7 +687,7 @@ { /* check horizontal timing to see if pal50/60 */ pInit->vType = ( *((u32*)(_viReg+2)) == 0x476901AD ) ? PAL60 : PAL50; - pInit->height = 576; + pInit->height = ((pInit->vType == PAL50) ? 576 : 480); } else { |