thefox wrote:
Jarhmander wrote:
Thanks for the makefile, it will probably come in handy, so your intervention was useful, and I see I'm a bit rusty with makefiles. I might however make my own, there's a lot of features on that that I won't use.
I don't really understand this line of thinking. The makefile is 300 lines long, it's not gonna slow down your build cycle or bloat your project folder, so it doesn't really matter if some of the features go unused.
Of course the makefile isn't bloated, even if it was several thousand lines long I won't notice the difference when making the project (assuming there are not more dependencies in the 1000+ line makefile, otherwise it does take more time to rebuild the project of course). The thing is I prefer starting down and going up, starting with a near empty makefile, adding dependecies to the SOURCES var, letting the rules make object files, and then add recipes to make some "fancy" data generators (ex: bitmap to chr data, music data generator etc.). The makefile is small and I don't need to scroll through it. Usually, I even put my "make vars" in a separate file and I include it in the real makefile for that purpose, so I don't play with my makefile. Otherwise the makefile is perfectly fine, the only questionable thing is my attitude to prefer making my own makefiles
[WELL, I might just shut up, take that makefile and put the "make vars" in a separate file and I'll be happy].
thefox wrote:
Quote:
I think that a useful macro to use with that mapper is a one like NEWBANK, that pads the remaining space of the bank and set PC to $8000. That's not generalisable to other mappers though.
It's not really possible to do padding like that with CA65 because of the object+linker approach. In other words, in any given module, you don't know where in segment (bank) the linker will place your code (unless you put all of it in a single module, which is not "the right thing" to do with CA65+LD65).
That's right, normally you can't use absolute addresses with a linker (though I have a exception in mind, the mplink linker) and even then that's negating the use of a linker, so we need something to tell the linker to put code (or data) at some boundaries, which rainwarrior just wrote. I just didn't think enough before replying that, my apologies.
Thanks all for your help!