Making real 256kb ROMs in SDCC

ページ 4/4
1 | 2 | 3 |

By geijoenr

Champion (352)

geijoenr さんの画像

05-06-2020, 20:41

Hi samsaga,
every solution has pros and cons, is usually a trade off. I looked at k5link and although is cool, it implements only a subset of what the sdcc linker does. As I use libraries and pretty much all command line options from the sdcc linker, getting k5link to do the what I need seemed much more work than changing the sdcc linker. After seeing that sdcc some has support (although broken) for banked calls, I though it would a good idea to attempt to fix it.
In the end it turned out that the amount of changes I had to in sdcc is quite small, so I am happy with the approach; the changes are clean and I think probably quite correct, so they could potentially be merged back to sdcc.

I always think you should adopt the solution that better fits your use case, work on it or contribute to it; and maybe later on somebody with a similar use case may benefit from it.

By salutte

Master (162)

salutte さんの画像

08-06-2020, 10:08

I agree that all solutions have pros and cons.

I still kinda like the pure-linker approach, and I'll clean and make a repository for it when I have time, but I don't want to rush and publish before it's somewhat well tested and documented, and currently I have very little available time.

About the method you listed in 2, I have a lot of trouble implementing this on a C programatically nice way. The big problem is that the linker can not add the current segment to the stack, there is simply no space for it, so an alternate stack is needed and this is very cumbersome to implement. As a mid-term alternative, the new version of the linker supports a macro named CALL(BANK, function(...)); where it calls a function that is on bank BANK, still the linker can not take care of this autonomously.

Probably it needs just a couple more refinements to make it nicer and I'll publish in a stand alone way. Any proposals for the name? I previously used sdcc_msx.... for which there are actually plenty. The linker supports now K5 and ASCII8, so I'd rather not call it K5linker.

By salutte

Master (162)

salutte さんの画像

08-06-2020, 10:09

maybe i could call it megarom_linker, because it is actually only capable to create files that target a megarom. It can not do neither disk images, and neither non-mapped rom images.

ページ 4/4
1 | 2 | 3 |