Path: chuka.playstation.co.uk!news From: "Max" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Have I mentioned this before... bgWorkArea? Date: Sun, 8 Jul 2001 16:44:44 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 122 Message-ID: <9i9vdn$g5p1@www.netyaroze-europe.com> References: <9i4n4l$b931@www.netyaroze-europe.com> <9i4sa2$b933@www.netyaroze-europe.com> <9i7ktj$dor5@www.netyaroze-europe.com> <9i81j1$dor7@www.netyaroze-europe.com> NNTP-Posting-Host: modem-222.ekto.dialup.pol.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Yeah, the floating point thing was crap.. guess I should check my facts before I babble cack :) I just remember one time I managed to get a float from it - just an error in calculation I guess. For now I have left out any complex explanations and just left it kind of open in my explanation of it in the tutorial. I have uploaded it to my yaroze web space for download if anyone is interested. Have a look and see if you can find anything wrong with it... the new stuff is the BG stuff. It comes in .zip and .rar flavours at http://www.netyaroze-europe.com/~leon17 Pretty much everthing that was said could make sense - the caching is a good one makes sense when you think about it - but thanks guys. I wonder if George Bain knows??? Max Alex Herbert wrote in message news:9i81j1$dor7@www.netyaroze-europe.com... > Hi Max, > > I tried to work this out before and some of it makes sense... sort of... > > If the bg is scrolled to the left a few pixels, an extra tile becomes > visible on the right hand side of the screen making a total of 21 titles > across, hence the first +1 in the formula. The same applies to the y-axis > which explains the second +1. > > I'm not sure about the third +1, but it seems to suggest an extra word is > needed per row of tiles. Can't imagine why - flags maybe? I first thought > this might be a typo and left it out without any obvious problems, until I > tried a high-res interlaced mode and the bottom 2 rows of tiles were getting > messed up. I put the +1 back in and it all worked fine. > > I'm guessing that the GPU primitive for a 16x16 tile is 6 words in length > and hence the *6. I'm not sure about the +4. Flags again, maybe? > > I think the *2 is needed for double buffering. The bgWorkArea will need to > hold 2 packet workspaces as normal - the one being drawn and the one being > prepared. Not sure about the last +2. > > Oh, and the library reference says the unit is 'long', so no idea why floats > would come into it. > > Alex > > > "Max" wrote in message > news:9i7ktj$dor5@www.netyaroze-europe.com... > > Hmm.. > > > > Its really the +1s and +1+1s and *6+4 etc that I don't understand besides > > this usually turns up a float value which is wierd considering the Yaroze > is > > a 32 bit integer machine and the value you get from this formula is always > > FAR bigger that you actually need. > > > > I don't think I'll ever figure this out :( > > > > Max > > > > Alex Herbert wrote in message > > news:9i4sa2$b933@www.netyaroze-europe.com... > > > Hi Max, > > > > > > According to the Library Reference (page 142): > > > > > > size=(((ScreenW/CellW+1)*(ScreenH/CellH+1+1)*6+4)*2+2) > > > > > > Hope this helps. > > > > > > Alex > > > > > > > > > > > > "Max" wrote in message > > > news:9i4n4l$b931@www.netyaroze-europe.com... > > > > Hey all, > > > > > > > > I've started up again on the 2D tutorial and I'm puzzling over this > > > > bgWorkArea size. Basically I have played around with it quite a bit. I > > > have > > > > 320 [16x16] tiles on the screen (20 tiles width x 16 tiles height) and > > my > > > > bgWorkArea is (20*16)*12 = 3840, now I get the 20*16 bit - the number > of > > > > tiles on the screen but 12 is just an arbitiary number I put in but it > > > won't > > > > work with anything less. I have also tried SCREEN_WIDTH (320) * > > > > SCREEN_HEIGHT (256) = 81920 (the number of pixels on the screen) but > > this > > > > number far outweighs what I actually need as a bare minimum... because > > it > > > > works with 3840. > > > > > > > > Can anyone tell me what the bgWorkArea size is actually mean to be? - > > > > please? > > > > > > > > Max > > > > > > > > > > > > > > > > > > > >