Path: chuka.playstation.co.uk!news From: gil@snsys.com (Gil Jaysmith) Newsgroups: scea.yaroze.freetalk,scea.yaroze.programming.codewarrior,scee.yaroze.programming.codewarrior,scee.yaroze.freetalk Subject: Re: PSX-EXE image format Date: Wed, 10 Dec 1997 19:58:37 GMT Organization: SN Systems Lines: 27 Message-ID: <348ef301.1832079@news.playstation.co.uk> References: <348E3142.1E73@bmc.com> Reply-To: gil@snsys.com NNTP-Posting-Host: trish.snsys.com X-Newsreader: Forte Free Agent 1.11/32.235 Xref: chuka.playstation.co.uk scea.yaroze.freetalk:180 scea.yaroze.programming.codewarrior:254 scee.yaroze.programming.codewarrior:111 Kevin Holbrook wrote: >It also wouldn't be too terrible to support dynamic code loading, which >I assume is what the overlays mentioned in places for professional PS >development are for. Their format would be nice to know as well. Overlays aren't dynamically linked. It's just a mechanism where you place chunks of code at the same address and output them as different files. The linker fixes it up properly without particularly caring that it's just located two functions at the same address, and it's up to you to make sure that you've loaded the correct block of code into memory during game execution before you call any of the functions which are inside it. The format used for overlay files is pure binary, which I wouldn't regard as a particular trade secret. The reason is that the last thing you want, if you're using overlays to minimise RAM wastage, is for the overlay mechanism to require basically a runtime linker, which is what shared-object systems such as Unix and Win32 have lurking in memory at all times. I don't know whether you could do this with the GNU linker in one pass; our linker is customised to do this since it would be a pain for the developers to write ten extra linker scripts if they wanted ten overlays. So you'll probably need to link each overlay in a separate command. Don't see why the technique shouldn't be possible, though. - Gil