Path: chuka.playstation.co.uk!news From: Developer Support Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: TIM Files Date: Tue, 27 May 1997 09:52:24 +0100 Organization: Sony Computer Entertainment Europe Lines: 74 Message-ID: <338AA0C8.6478@interactive.sony.com> References: <01bc6a20$ed0421e0$98a1cdcd@default> Reply-To: N/A-Use-Newsgroup NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Nelson Santos wrote: > > Hi all. > > I wrote the following small program to extract some information about a > certain TIM file I want to display: > > //----------------------------------------- > #include > > #define PICTURE 0x80110000 > > void main(void) > { > GsIMAGE Image; > GsGetTimInfo((u_long *)PICTURE,&Image); > printf("Pixel Mode: %u\n",Image.pmode); > printf(" Pixel X: %u\n",Image.px); > printf(" Pixel Y: %u\n",Image.py); > printf(" Pixel *: %x\n",Image.pixel); > printf(" CLUT CX: %u\n",Image.cx); > printf(" CLUT CY: %u\n",Image.cy); > printf(" CLUT CW: %u\n",Image.cw); > printf(" CLUT CH: %u\n",Image.ch); > printf(" CLUT *: %x\n",Image.clut); > } > //----------------------------------------- > > This is the output produced: > > Pixel Mode: 16 > Pixel X: 22540 > Pixel Y: 2 > Pixel *: 80110010 > CLUT CX: 17 > CLUT CY: 4294963200 > CLUT CW: 8192 > CLUT CH: 0 > CLUT *: 2000 > > Aside from "Pixel Mode" and "Pixel *", the rest of these values make NO > SENSE to me. "Pixel Mode", according to the Library Reference Page 30, > should be between 0 and 4. I'm getting 16. I'm assuming this means 16 bit > and there is an error in the Library Reference. > > HELP! Please clarify the rest of these numbers for me! Thanks! > > Nelson. Really cannot see why this is happening. Possible reasons: (a) TIM not loaded into memory properly, or conflict with program (b) total lack of program initialisation To be honest I don't think these are right at all. I suspect that the TIM has not gone intact into memory. Try making your
into a function and calling it after program initialisation (eg using a sampl code program as shell). The only other possible source of error: when there is a lot of output to the siocons terminal, some characters can become garbled and lost. Yours would show a far more serious case of this than I've seen, however. If all this still doesn't help, look at the <2d2> sample code. In you'll find macro, this is called from the program as is and prints completely correct values to the terminal. Lewis