Path: chuka.playstation.co.uk!news From: "Craig Graham" Newsgroups: scee.yaroze.programming.codewarrior Subject: Re: MWDebugIO Date: 2 Jul 1998 09:30:06 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 64 Message-ID: <01bda59b$bafd0560$f30b0a0a@Angela1.intelligent-group.com> References: <359A3B82.2267A83D@easynet.co.uk> <359A43E3.CD8101E3@hinge.mistral.co.uk> <359A4F13.6927AD1A@easynet.co.uk> <6ndqd5$sub14@chuka.playstation.co.uk> NNTP-Posting-Host: 194.131.235.3 X-Newsreader: Microsoft Internet News 4.70.1155 Steve Dunn wrote in article <6ndqd5$sub14@chuka.playstation.co.uk>... > Just a 'wild' (very wild) thought, don't know if it'll work or not... > > use __declspec( bss ) for all 'disposable' C structs created with > bin2hex, and then use __declspec( sbss ) for the rest of the unitialised > data... > > For instance... > __declspec(bss) char c[]={"1234567890"} ; (this would be the tim file as an > array) > __declspec(sbss) int nLives ; Don't do this. the bss is the uninitialised data segment (things are layed out in it by the linker, but no data is placed in it and I don't think it even appears in the PXE file - in fact, a bug in one revision of the CW linker was that the bss actually did appear in the final file, causing huge PXE's to be produced. They fixed that problem though, and I don't think it ever appeared in a Yaroze release of the compiler anyway. > Next thing to do is load all the disposable stuff into VRAM that's contained > in the bss section and (here comes the main bit I'm not sure about) tell the > psx that the heap starts at the 'start' of the bss section. > Something like this... > InitHeap( _fbss, newheapsize ) ; > > Another 'possible' alternative is to shuffle everything around (data, sdata, > sbss, and bss), so that '.data' is at the end, then init your heap all over > it when you've finished loading what was in it. Look in __rts_info_t__.h. > There lots of interesting pointers in there. I don't think __rts_info_t__.h appears in the Yaroze distribution Steve. Perhaps you're seeing things yes? > As I said, just a thought. Someones soon gonna come along and tell me I'm > talking a load of sh!t :) You're talking a load of shit. But the re-order the .data to the end is a good idea, only problem is in guaranteeing that the TIM's are at the end of the data section (link in the file with them in it last in the link order pane?). > Steve Stop being such a wuss and get the serial ARS support done - I might even give you a hand and do the PSX side libs if you're really lucky. Craig.