+DrTypo Posted May 17, 2012 Share Posted May 17, 2012 Hello, JagChris PM'ed me about a tidbit of information. He quoted BattleSphere developpers about a "Blitter Trick" that can speed things up quite of bit: Our little Blitter Trick™ has insured that even with lots of explosions going off at once, the framerate is really high. We're quite proud of this little 'hack' we came up with. Apparently, Crazyace and Chilly Willy have an inkling: I read that as reading the object processor ram using the blitter, and maybe using the mechanism for the 1/2 line switch to switch the linebuffer twice in a frame - this would effectively half the vertical resolution by duplicating the previous lines display , and by having no OP drawing in the 2nd line there would be much more b/w for blitter trickery Does anyone have some insight on this? What is this about? Thanks. Quote Link to comment Share on other sites More sharing options...
Chilly Willy Posted May 18, 2012 Share Posted May 18, 2012 Yeah, I told JagChris that if you repeated the line from the buffer, you have two savings: the first is that the display is half as tall (100 instead of 200, for example, where each display line actually occupies two TV scanlines), so you only have to render half as much data per screen; second, the OP is only fetching data on every other line, leaving more bandwidth for other things, like the blitter. So that's my guess behind the "blitter trick". Anyone used to the A8 platform and the way certain modes reuse data from the internal buffer rather than fetching more data would probably think of this. I did something similar on the 32X for my last version of Yeti3D - I used the line table to repeat every other line to make the display 112 lines tall, meaning I only had to render half the display. That really improved the performance of Yeti3D considerably. 4 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 18, 2012 Share Posted May 18, 2012 If you have free GPU RAM, you can use it to hold your source blit data. So read the image from GPU RAM and blit to main RAM, this does actually give you quite a speed boost in my testing with it. It also has the added benefit of making ZeroSquare cry Of course you only have 4K of GPU RAM to use, if you are using the GPU, less than that too... Unless your generating stuff to be blitted by the GPU and then pasting it to main RAM with the blitter.. 4 Quote Link to comment Share on other sites More sharing options...
+DrTypo Posted May 18, 2012 Author Share Posted May 18, 2012 Thanks for the feedback. It's clearly not about cutting vertical resolution in half. I'll duplicate the whole quote from the dev diaries that JagChris provided: Latest cut of Battlesphere™ is running just fine. Framerate is indeed up, thanks to the special hardware 'hack' devised by Scott and Myself. Nobody has thought of this little ditty before... it's too COOL! For what it's worth, this little trick would have easily made DOOM a 320x240 game at 20-30fps all the time.. This game is running so smooth now. Things are shaping up nice... ... in the 25-30fps just about all the time. Sure, flood the screen with ships, debris, explosions, and shots and we're down to 15 or so, but man does this thing haul... Heh heh, no one's gonna figure out the little magic trick it took to make that one happen.... Reminds me of the olden days of 800 programming where there things you could make the hardware do that the designers never dreamed of. This is so cool. Framerate is stilll very high. We run constantly over 20FPS, usually between 30-60fps, depending on the amount of action onscreen. Our little Blitter Trick™ has insured that even with lots of explosions going off at once, the framerate is really high. We're quite proud of this little 'hack' we came up with. It really works!! Not that we were anything but screaming fast before... the load management going on between the processors by our custom engines is no slouch. It's also 'generic' enough that we'll re-use most of it for our next Jag title. (bolded by JagChris) I guess it's more something like using GPU RAM to cache data. Something that improves blitter performance. Well maybe someone will figure this out again... or not. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 18, 2012 Share Posted May 18, 2012 Heh heh, no one's gonna figure out the little magic trick it took to make that one happen.... Things like that really get my back up. It is effectively like saying "heh everyone else is a complete idiot, only we have any brains, go us, we're awesome". I am all for people discovering cool stuff and being pleased with themselves, but massive self gratification like that winds me up. If I ever do that by all means bitchslap me! Back on topic, I do recall reading somewhere that for T2K apparently Mr Minter ran the Blitter backwards to get some of the effects or performance he used for that. Apparently he wasn't supposed to be able to do that, or it wasn't supposed to work, but it did. I could be blowing hot air, but I am sure I read that, possibly on here too, but it was many many years ago. 5 Quote Link to comment Share on other sites More sharing options...
Gaztee Posted May 18, 2012 Share Posted May 18, 2012 How can you trade mark a Blitter Trick?? Sure doesn't mind blowing his own trumpet, maybe he doubles as Ron Jermey's Cock, another big tool! And Link yeah you'd get a size 11 up yer ass, or more likely, get the your Mrs to beat you up 1 Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted May 18, 2012 Share Posted May 18, 2012 Anything claimed by the authors of Battlesphere should be taken not with a grain of salt, but with a whole salt shaker. They've been known to spread hype or plain wrong "facts" in the past to make themselves look good. Back on topic, I do recall reading somewhere that for T2K apparently Mr Minter ran the Blitter backwards to get some of the effects or performance he used for that. Apparently he wasn't supposed to be able to do that, or it wasn't supposed to work, but it did. I could be blowing hot air, but I am sure I read that, possibly on here too, but it was many many years ago.No you're right, I recall reading that as well. I think it's related to the "pixel shatter" zoom effect (e.g., the "Excellent !" banners). Usually, when doing a zoom, you read non-adjacent pixels (for example, for a 0.5x zoom, you'd read every other pixel, both horizontally and vertically) but write the pixels next to each other. If you do the reverse, you get the "shatter" effect, which is pretty much like a zoom except every source pixel is only written once, so there's hollow space between pixels when the zoom factor is larger than 1. It's a neat effect and trick 6 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 18, 2012 Share Posted May 18, 2012 Ahh, thanks for that Zero, that makes a lot of sense! Quote Link to comment Share on other sites More sharing options...
Atari_Owl Posted May 18, 2012 Share Posted May 18, 2012 (edited) I seem to remember the Tech ref actually suggests that a rotation can be done with the blitter by going from a block of adjacent pixels to non adjacent pixels obviously this is likely to leave holes if there is not a size reduction A2->A1 (or is it vice versa.. its been a while since i thought about it) It can run A2-> A1 or A1->A2 anyway Maybe MInter was responsible for that? OH and yes of course a GPU RAM cache substantially improves blitting speed Edited May 18, 2012 by Atari_Owl 1 Quote Link to comment Share on other sites More sharing options...
JagChris Posted May 18, 2012 Share Posted May 18, 2012 Has anyone tried the type of technique/trick suggested by Chilly Willy on the Jaguar? Quote Link to comment Share on other sites More sharing options...
JagChris Posted May 18, 2012 Share Posted May 18, 2012 Anything claimed by the authors of Battlesphere should be taken not with a grain of salt, but with a whole salt shaker. They've been known to spread hype or plain wrong "facts" in the past to make themselves look good. Perhaps. But we should keep an open mind about it and seriously look at it. OH and yes of course a GPU RAM cache substantially improves blitting speed If this suggestion or Chilly Willy's is able to make Doom run at 320x200 and 20-30fps fairly well then they would be likely candidates for what the trick is. Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted May 18, 2012 Share Posted May 18, 2012 (edited) Perhaps. But we should keep an open mind about it and seriously look at it.Look into what, exactly? The statement basically boils down to "we've found a neat trick involving the blitter, but we're not telling what it is or what it does.". It's so vague that it could be anything ; for all we known, it may already have been done before or rediscovered since. And about that "we"... should we assume that you've started coding for the Jaguar now? If so, congrats Edited May 18, 2012 by Zerosquare 8 Quote Link to comment Share on other sites More sharing options...
+DrTypo Posted May 18, 2012 Author Share Posted May 18, 2012 If this suggestion or Chilly Willy's is able to make Doom run at 320x200 and 20-30fps fairly well then they would be likely candidates for what the trick is. I don't think any of them is a candidate. Chilly Willy's trick sure isn't since he's talking about cutting vertical resolution in half (display ~100 lines instead of ~200). So this is not about running Doom in 320x200. Using GPU RAM as a cache? I'm not sure. It is is mentionned in the Jag Underground Dox from 1997. So it was most likely already known when Battlesphere was in developpement. Zerosquare's suggestion is a likely candidate. Anyway I'll try for time to time to torture the Blitter. If I find something, I'll tell you all of course. I mean I'll say: "Behold my superior intelligence!!! I found the Blitter Trick!!! But I won't tell you what it's about!!! Your puny littlle human brains would never understand!!!" 2 Quote Link to comment Share on other sites More sharing options...
JagChris Posted May 18, 2012 Share Posted May 18, 2012 You could call it the Blitter Boost 1 Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted May 18, 2012 Share Posted May 18, 2012 (edited) Using GPU RAM as a cache? I'm not sure. It is is mentionned in the Jag Underground Dox from 1997. So it was most likely already known when Battlesphere was in developpement.I'm not even sure I'd call that a "trick"; it seems pretty straightforward to me, given that the GPU RAM is the fastest RAM there is. Edited May 18, 2012 by Zerosquare 1 Quote Link to comment Share on other sites More sharing options...
Gaztee Posted May 18, 2012 Share Posted May 18, 2012 Your puny littlle human brains would never understand!!!" Somebody has been watching too much Big Bang Theory Quote Link to comment Share on other sites More sharing options...
Chilly Willy Posted May 18, 2012 Share Posted May 18, 2012 (edited) If this suggestion or Chilly Willy's is able to make Doom run at 320x200 and 20-30fps fairly well then they would be likely candidates for what the trick is. I don't think any of them is a candidate. Chilly Willy's trick sure isn't since he's talking about cutting vertical resolution in half (display ~100 lines instead of ~200). So this is not about running Doom in 320x200. Using GPU RAM as a cache? I'm not sure. It is is mentionned in the Jag Underground Dox from 1997. So it was most likely already known when Battlesphere was in developpement. Well, it would be 320x200, but every other line would be a repeat of the previous. Between drawing half the data and freeing half the bandwidth to other things, it's clearly not the blitter trick because you'd get BETTER than what they claimed for Doom. As to using GPU ram for a cache, I don't see that as possible on a game like Doom where even the floor/ceiling textures are 4K to begin with. Forget about wall textures. So that's not a candidate for the Blitter Trick either. Zerosquare's suggestion is a likely candidate. No, that can't be it either or they wouldn't claim it would speed up Doom. Drawing every other pixel isn't going to help Doom any. Anyway I'll try for time to time to torture the Blitter.If I find something, I'll tell you all of course. I mean I'll say: "Behold my superior intelligence!!! I found the Blitter Trick!!! But I won't tell you what it's about!!! Your puny littlle human brains would never understand!!!" EDIT: One thing I think maybe worth trying when I get around to it... Doom is primarily rendered as columns. That's not very fast on many systems, so turn it around - render Doom as ROWS at a 90 degree angle, then use the OP to flip it horizontal during display. Rendering rows with the blitter in Doom should be faster than rendering columns. However, that would make the OP use more bandwidth, so I'm not sure if the tradeoff is worth it. Edited May 18, 2012 by Chilly Willy 1 Quote Link to comment Share on other sites More sharing options...
Atari_Owl Posted May 19, 2012 Share Posted May 19, 2012 (edited) Theoretically one might render groups of 4 columns as rows to GPU ram and then blit that out as a column 4 pixels wide in phrase mode I havent thought if there'd be much benefit to that Hardly qualifies as a hack or really anything clever though Edited May 19, 2012 by Atari_Owl Quote Link to comment Share on other sites More sharing options...
Chilly Willy Posted May 19, 2012 Share Posted May 19, 2012 Yeah, there are all sorts of little things you can do, but I don't think we've covered anything that fits the post description. But like zerosquare said above, if/when it comes out, it's likely to be nothing. Quote Link to comment Share on other sites More sharing options...
Atari_Owl Posted May 19, 2012 Share Posted May 19, 2012 I thinl i must have been really tiired when i posted that it wouldnt work anyway Quote Link to comment Share on other sites More sharing options...
Atari_Owl Posted May 19, 2012 Share Posted May 19, 2012 it'd have to be blitted into the GPU as columns too, but thats ok as it would be in pixel mode anyway due to the scaling Quote Link to comment Share on other sites More sharing options...
Chilly Willy Posted May 19, 2012 Share Posted May 19, 2012 it'd have to be blitted into the GPU as columns too, but thats ok as it would be in pixel mode anyway due to the scaling I like that idea - cache four columns so that they can all be blitted at once to ram using the fast copy mode. Even though you're still rendering one column at a time, it's faster to render it to gpu ram than to system ram. If you ran Doom at 240 height, four columns will only take about 2KB for 16-bit/cry mode. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.