Path: chuka.playstation.co.uk!chuka.playstation.co.uk!chuka.playstation.co.uk!not-for-mail From: Lewis_Evans@Playstation.sony.com Newsgroups: scee.yaroze.programming.2d_graphics Subject: I can't stand it anymore! Date: 3 Jun 1998 13:44:03 +0100 Organization: Sony Computer Entertainment Europe - 119.SS5 Lines: 55 Sender: news@chuka.playstation.co.uk Message-ID: <6l3gej$qt11@emeka.playstation.co.uk> Reply-To: Lewis_Evans@Playstation.sony.com NNTP-Posting-Host: emeka.playstation.co.uk via smtpd (for [194.203.13.2]) with SMTP; 3 Jun 1998 12:50:14 UT by camsg001.camb.scee.sony.co.uk (8.9.0/8.9.0) with SMTP id NAA26037 for ; Wed, 3 Jun 1998 13:49:27 +0100 (BST) From: Lewis_Evans@Playstation.sony.com To: news@playstation.co.uk Content-Disposition: inline You can use linker options in the mapfile to make GNU output a mapfile for your program; this tells you exactly how much memory it uses, and where; then you can check if it's overwriting your data, which does look like the problem. PROGRAM_ADDRESS = 80140000 LINKER = -Xlinker -Map -Xlinker mapfile -Xlinker -Ttext -Xlinker $(PROGRAM_ADDRESS) If you put data at eg 0x80090000 - 0x8013ffff, and program at 80140000, then growth of program due to code addition is less troublesome. Lewis For the longest time I tried to load a TIM picture and printf its properties to the console. I always get noise, not proper data. I was so thankful when I stripped the code down to nothing but the loading code. Now I'm trying to put other code back in, and I finally think I figured out what was wrong... It seems that the allocation of all those ordering tables is OVERWRITING the data of the TIM files! I can't come up with any other explanation! I load the code at 0x80090000, then a 4-bit TIM at 0x800A0000, then a 8-bit TIM at 0x800B0000, then a 24-bit TIM at 0x800C0000 and it doesn't work. I comment out the global variables for the ordering tables stuff and it does work. I leave the code in, but I load a 4-bit TIM at 0x80090000, then a 8-bit TIM at 0x800A0000, then a 24-bit TIM at 0x800B0000 then the code at0x800D0000. and it works, kind of (it freezes 1/2-way through the code). WHAT THE HELL IS WRONG?! I will ask the stupid question. How do you load files into main memory and prevent them from being overwritten by the code allocating memory?