Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: Gerrit Goossen Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: GsLinkObject4 Confusion - Currently: Direct Hardware Access is Naughty Date: Mon, 31 Aug 1998 17:57:18 -0400 Organization: SCEA News Server Lines: 83 Message-ID: <35EB1C38.3CAF@funnytown.com> NNTP-Posting-Host: 38.165.241.13 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01-C-MACOS8 (Macintosh; I; PPC) 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. 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. Obviously it's not my goal to piss off Sony, as they do have that handy "We can revoke your Yaroze membership for any reason" clause, but they basically would be revoking my license for no reason other than trying to learn how to do cool stuff on the PSX? (Afterall, I'm not sharing info with non-yaroze members or trying to make a profit off anything.) It's understandable that they'd exclude "hacky" demos from CDs though... >> 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.) >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... ----- James wrote: > >Gerrit Goossen wrote: >> >> >You cann't use GTE inline from the Yaroze version of CW. Or the >> >Yaroze GNU either. > >>SCEE will not accept any programs for submission (ie, for a coverdisk) which do not use the official >>Yaroze libraries for _all_ hardware interface code. While this is mostly to prevent developers from >>trying to push the limits of the PSX by talking directly to the hardware (which invariably brings >>about compatibility problems with the different versions of the PSX), in the case of the GTE this is >>because there are many timing and ordering complications involved. Inlining GTE instructions in >>assembler is not allowed to the extent that professional developers aren't supposed to do it either. Are you saying that Crash Bandicoot was written completely with the libraries? The full libraries must be *nice*! :) - Gerrit