Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Scrolling backgrounds Date: Thu, 09 Jul 1998 09:15:19 +0100 Organization: Sony Computer Entertainment Europe Lines: 45 Message-ID: <35A47C17.4266BE24@scee.sony.co.uk> References: <6nvfvm$9o1@chuka.playstation.co.uk> <35A34842.A7B6E58C@scee.sony.co.uk> <35a3f513.14718586@news.scea.sony.com> NNTP-Posting-Host: camfw01.millennium.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Jamin Frederick wrote: > > On Wed, 08 Jul 1998 11:21:54 +0100, James Russell > wrote: > > >I guess you're calculating the next line in main ram and loading it with LoadImage, > >then performing a MoveImage to scroll it? > > > At the start, wouldn't this be a slow way to do it -- getting a line > from main RAM (load to video), and then moveimage before anything even > happens? I thought main -> video blitting should not generally be > done during gameplay, too slow? According to Colin (who knows so much about the PSX internals that I think if you opened up a PSX you'd see a miniature clone of him doing all the work), you can do about 8 full-screen LoadImages in one frame. It's not too slow for one line then. > So which and how many GPU commands can you call before you MUST call > DrawSync(0)? AFAIK, The internals have a queue of 64 commands - that means you can add 64 things in. Adding a command is just a matter of inserting it onto the end of the queue and going back to your program. The GPU is always checking to see if there's something to do in the queue, so it just processes new commands as they are inserted. HOWEVER, if the queue is full, then the function to add a GPU command to the queue will block until there is a space free. So you don't have to _ever_ call DrawSync(0) - that's just used if the drawing time will go over one frame, because if you just wait for a VSync(0) you might swap the buffers while the GPU is still busy drawing! > Similarly, is making many more moveimages than necessary going to slow > down performance, than if just block blitting were done instead? It > seems like doing a line-by-line thing might clog things up, especially > if loading all the time from main mem. I think one big MoveImage is going to be slightly faster than lots of little MoveImages, but I don't want to quote any statistics. It shouldn't be too hard to make a test program and compare the speed. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe A diagnostic is someone who doesn't know if there are two Gods.