Path: chuka.playstation.co.uk!news From: george_bain@playstation.sony.com (George Bain) Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Main ram to Vram Date: 27 Apr 1999 08:01:46 GMT Organization: Sony Computer Entertainment Europe Lines: 79 Message-ID: <7g3qta$7353@chuka.playstation.co.uk> References: <372472AE.67F50636@netcomuk.co.uk> NNTP-Posting-Host: camfw01.millennium.co.uk Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.8 (x86 32bit) Hi Chief! You do it all the time when loading in images... e.g LoadImage() - main to vram transfer. Also if you use the textures on the Boot CD you can overwrite any main memory previously used and do another LoadImage(). Regards, George@SCEE //-------------------------------------------------------------------------- // Function: ReadTIM() // Description: Read a TIM and CLUT(if 4 bit or 8 bit) and transfer to VRAM // Parameters: u_long *addr: address of TIM // Returns: GsIMAGE: address of tim image // Notes: N/A //-------------------------------------------------------------------------- GsIMAGE *ReadTIM( u_long *addr ) { static GsIMAGE tim; RECT rect; // skip id and initialize image structure addr ++; GsGetTimInfo(addr, &tim); // transfer pixel data to VRAM rect.x = tim.px; rect.y = tim.py; rect.w = tim.pw; rect.h = tim.ph; LoadImage(&rect, tim.pixel); DrawSync(0); // check if CLUT exists and transfer it to VRAM if( (tim.pmode >> 3) & 0x01 ) { rect.x = tim.cx; rect.y = tim.cy; rect.w = tim.cw; rect.h = tim.ch; LoadImage(&rect, tim.clut); } DrawSync(0); printf(" IMAGE - x:(%d), y:(%d), w:(%d), h:(%d) \n", tim.px, tim.py,tim.pw,tim.ph ); printf(" CLUT - x:(%d), y:(%d), w:(%d), h:(%d) \n", tim.cx, tim.cy,tim.cw,tim.ch ); printf(" image mode:%d \n", tim.pmode); printf(" tim addr: %p \n",&tim); return(&tim); }// end ReadTIM In article <372472AE.67F50636@netcomuk.co.uk>, mlambert@netcomuk.co.uk says... > >Hi, > When I asked about memory, George Bain suggested using main Ram >and transfering to Vram, does this mean that you can transfer Tims >between the two >giving more space for graphics? > If so, how do you do this? > > Cheers, > > The CHIEF >