Path: chuka.playstation.co.uk!news From: "Nelson Santos" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: TIM Files Date: 27 May 1997 12:13:55 GMT Organization: Marconi Lines: 104 Message-ID: <01bc6a97$8048ec80$7ab113cc@default> References: <01bc6a20$ed0421e0$98a1cdcd@default> <338AAA1C.634F1584@micronetics.com> NNTP-Posting-Host: ppp-annex-0840.mtl.total.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Internet News 4.70.1161 > Hi Nelson, > > It doesn't look like you are skipping the header of the tim. > It is four bytes past the start of the file. If the tim is loaded at > 0x80110000 try pasing 0x80110004 to GsGetTimInfo or do > > GsGetTimInfo(((u_long *)PICTURE)+1,&Image); > > Regards > > Jim Yes, I realized that after I posted my message. Here are the new values after skipping the program header. (I also added the .pw and .ph to the list, they look correct). Pixel Mode: 2 Pixel X: 513 Pixel Y: 0 Pixel W: 320 Pixel H: 240 Pixel *: 80110014 CLUT CX: 17 CLUT CY: 4294963200 CLUT CW: 8192 CLUT CH: 0 CLUT *: 2000 As you can see, the pixel mode is now 2 instead of the 16 I got before. The pixel width and height are perfect at 320 and 240. The address of the pixel data of 80110014 seems ok. But the rest of the numbers still don't make any sense. I ran this exact same program with the MASCOTS2.TIM (those little cartoon girlies from the 2D demos) and this is what I got: Pixel Mode: 9 Pixel X: 640 Pixel Y: 320 Pixel W: 102 Pixel H: 120 Pixel *: 80110220 CLUT CX: 0 CLUT CY: 481 CLUT CW: 256 CLUT CH: 1 CLUT *: 80110014 Which looks perfect to me (except maybe the pixel mode of 9?). So maybe something is wrong with my PICTURE? I looked into this possibility and wrong this small program: #include #include "d:\yaroze\lib\pad.h" #define PICTURE 0x80110000 void main(void) { GsIMAGE Image; RECT Rect; GsOT OT[2]; GsOT_TAG OTTags[2][2]; PACKET Packet[2][24]; int Buffer; PadInit(); GsInitGraph(320,240,4,0,0); GsDefDispBuff(0,0,0,240); GsGetTimInfo((u_long *)(PICTURE+1),&Image); OT[0].length=1; OT[0].org=OTTags[0]; OT[1].length=1; OT[1].org=OTTags[1]; GsClearOt(0,0,&OT[0]); GsClearOt(0,0,&OT[1]); Rect.x = 0; Rect.y = 0; Rect.w = 320; Rect.h = 240; LoadImage(&Rect,Image.pixel); Rect.y = 240; LoadImage(&Rect,Image.pixel); while(PadRead(1) != PadSelect) { Buffer = GsGetActiveBuff(); GsSetWorkBase((PACKET *)Packet[Buffer]); GsClearOt(0,0,&OT[Buffer]); DrawSync(0); VSync(0); GsSwapDispBuff(); GsDrawOt(&OT[Buffer]); } } And it displays the PICTURE 100% perfectly. So, what's going on? (The picture by the way is the WIPEOUT title screen found on the "Playstation Picks" demo disk that originally came with the PSX.) Help! Nelson.