Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Down Memory lane.... Date: Mon, 14 Sep 1998 14:35:44 +0100 Organization: Sony Computer Entertainment Europe Lines: 33 Message-ID: <35FD1BB0.15B97AD7@scee.sony.co.uk> References: <35FD0D0D.90E4A527@cwmail.com> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b1 [en] (Win95; I) X-Accept-Language: en To: caz.tones@mcmail.com Tones wrote: > > For example, say I've got the program which takes up (this is a silly > example by the way!!) 0.2 Megs, and I've put a sprite at address > 0x80100000 which is 65Kb in size, where would the next tim file sit if > it was 100Kb. If you place the sprite at 0x80100000 and it is 65K, then the next tim file would be at 0x80100000 + 65K = 0x80100000 + 0x10400 = 0x80110400. This can all get to a big hassle if your files change size all the time, but thankfully, there are a couple of utilities written by Yaroz-keteers to handle all this for you - They use a text file with a list of all your data files to check the sizes of each of the data files, then create both a SIOCONS 'auto' file and an C include-able file that you can use in your programs, with all the data files positioned correctly in memory. You can check out mine (called DATAMAN) at http://www.netyaroze-europe.com/~jruss1/ The other solution is to simply convert the data files into C source (so that they look like: char myData[] = { 0x12, 0x34, etc ) and include them in your program. Then you don't have to worry about addresses, but it means that it's harder to reclaim the area of memory used by the data if the only thing you're going to do is upload it to VRAM/SRAM. But it's a lot easier for debugging. For a program that converts raw data to C source code, check out RAW2SRC on the above page. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Alcoholism is not a disease, it's a goal.