Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: GsLinkObject4 Confusion - Currently: Direct Hardware Access is Naughty Date: Tue, 01 Sep 1998 12:12:22 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 90 Message-ID: <35EBD696.85171D6A@hinge.mistral.co.uk> References: <35EB1C38.3CAF@funnytown.com> NNTP-Posting-Host: d3-s13-169-telehouse.mistral.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) Gerrit Goossen wrote: > Craig wrote: > > > >Ok, I'll re-phrase that. Doing GTE inline in Code Warrior or GNU C > >is easy. However, Sony will jump on your balls for doing it when you > >are working on the Yaroze, as the information to do it has either been: > >1) Reverse engineered by someone very talented.... or > >2) Ripped off from a pro-developers documentation / compiler setup. > >either way, you're violating the Yaroze license and could concievably > >get your yaroze membership revoked. > > Maybe I misunderstood Mario at the SCEA chat on Sat., but my license > only says that *I* can't reverese engineer the PSX. > > For Ex: I can't sit down with a PlayStation executable, then tinker with > a hex-editor and the MW Debugger to figure out what each opcode for the > R3000 does. However, there would be nothing wrong with me downloading > the R3000 manual and reading descriptions of what the opcodes do. You're more than welcome to do bit's of your code in Assembler. The R3000is pretty well documented everywhere so no worries on that count. > As for the GTE and the info I found (please refer to the URL posted > previously) came from a third-party. If someone bought a grey-station > and reversed engineered it (against their grey-station's license [?]) > and posted it online, I can't be held responsible for it because I don't > know where it came from. I know them. They didn't. The folk's you're talking about all have ripped offversions of the Pro-Dev kit. How do you think Rasky managed to write a complete emulation of the Playstation on the PC? He reversed all the code? I doubt it. > >> FWIW, I've been able to speed up my gouraud fogging from over 400 hsyncs > >> for 500 primitives to under 250 hsyncs. It's still too slow, but I'm > >> making progress. If anyone's interested in the code that does this, say > >> the word and I'll be happy to post it here. (*Especially* if you think > >> you might be able to help me speed it up. There's *plenty* of room for > >> optimization. ;) > > > >Tips:1) Pre-transform all the vertices into the scratch pad, then do a lookup in there > >when generating the output shading levels. Just save the transformed screen facing > >Z distance (to save space if you've got lots of vertices, shift down and use a byte > >for each screen to vertex distance). > > Too many verticies to fit in the scratch pad (and lots of extra overhead > since I'm only using a couple hundred from a several thousand vertex > array at a time.) Hmm. I'm sure there'd still be a way round it... > >2) Keep the calculation in a tight loop with the correct code address alignment > >to fit into the I-cache. > >3) In a second loop (still kept tight and I-cache aligned), just do lookups > >to fill in the shading details in the TMD. > > There's plenty of room for improvement... splitting up into smaller > loops is a idea :) > > >I guarantee you'll get better performance using this than you're getting now > >I've got some environment mapping code that can do better than you're > >getting from your fog code WITHOUT inlining the GTE commands at all, > > You're the man! Of course, I'm much less of a man, and knowing it can be > done is only half the battle... Sarcasm - I love it ;) > Are you saying that Crash Bandicoot was written completely with the Must be - no one hit's the hardware direct and gets release approval fromSony. > libraries? The full libraries must be *nice*! :) They simply let you do your own thing in terms of render engines. It's notnearly as easy as using the yaroze library....although I personally think they made a mistake in not providing a simple GsSortPoly() function (I made that up by the way, there is no such function even in the pro libs). > - Gerrit Craig.