Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Hex Address Date: Tue, 06 Jul 1999 07:19:26 +0100 Organization: Sony Computer Entertainment Europe Lines: 28 Message-ID: <37819FEE.68D96A@scee.sony.co.uk> References: <378101A3.41A07762@aol.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.51 [en] (Win95; I) X-Accept-Language: en Omar Metwally wrote: > > What hex addresses are there to load images into? I know it starts at > (0x80090000), but I don't know the consecutive memory addresses or the > maximum hex address. If possible, someone please write the first 8 > addresses or so. Thanks. Main Ram starts at 0x8000-0000 and finishes at 0x801f-ffff (the dashes are in there for legibility). The kernel and other bits and pieces take up all the space from 0x8000-0000 to 0x8008-ffff. The stack is right at the top, and obviously varies in size depending on your program structure. You can find out exactly what memory areas your code uses by generating a map file when you link (it's a gcc option). This gives you an idea of where to put your graphics/sounds data. Note - the startup code built into every program assumes that the memory from the end of your program to the end of memory (minus some area for the stack) is to be used for the Heap (the area where you can malloc memory from). So if you're planning on loading TIMs and sound files more than once from main memory, put your graphics/sound BEFORE your code, so that they don't get corrupted if you do mallocs. On the other hand, if you just load all your TIMs and sounds in at the start just once, then put them AFTER your code and load them up first thing. This gives you a bigger area to malloc from. James -- == James_Russell@scee.sony.co.uk ph: +44 (171) 447-1626 - fax: 390 4324 == Tools and Middleware Licensing Manager - Sony Computer Entertainment Europe A student who changes the course of history is probably taking an exam.