lronaldo / cpctelera

Astonishingly fast Amstrad CPC game engine for C developers
http://lronaldo.github.io/cpctelera/
GNU Lesser General Public License v3.0
229 stars 54 forks source link

Question about SDCC #105

Closed fraespre closed 4 years ago

fraespre commented 4 years ago

Why was the decision made to base CPCTelera on SDCC instead of Z88DK ?

Over time, I have the impression that Z88DK has evolved better and I think that they have a larger community.

lronaldo commented 4 years ago

Because it had better performance, greater compatibility, more possibilities and guaranteed support.

Some of these premises may have changed over time. However, in order to change from SDCC to Z88DK there has to be great medium and long term benefits, because the cost of changing everything is huge.

Moreover, remember that Z88DK only targets Z80. To support Amstrad CPC that's more than enough. However, there are several development groups using CPCtelera for other systems like Game Boy. SDCC exports to different embeded systems, whereas Z88DK does not.

Edit: Well, Z88DK did not export GBZ80 code, but it does now. Recent 2.0 release (03/02/2020) does. That's really nice of Z88DK. So, as stated before, some premises may change over time.

There will always be benefits and drawbacks. And decisions taken may not suit everyone's needs. However, as CPCtelera is free source and can easily be modified by anyone wanting to do so, there is always the possibility of creating forks using Z88DK or any other means if someone is interested.

fraespre commented 4 years ago

Firstly, thanks a lot for your quickly response.

I haven't any benefit for talk about z88dk :-D I'm a newcomer to the retro world, so I see current options with a fresh mind. I don't know what the stage was 6 years ago.

I agree with you that the change would be huge. May be, a possible way would be to manage this change as a final degree project between a little set of engineers.

As you have said, in the last release, z88dk has included support for GameBoy between other: https://www.z88dk.org/forum/viewtopic.php?id=11182

Anyway, I'm going to follow your courses about how to make a game using CPCTelera. As you guess, I'm z88dk developer, however your explanantions are totally helpful for me.

Best regards

lronaldo commented 4 years ago

Oh, man. Please, do not understand that I have anything against Z88DK. My previous comments are merely explanations on your question and considerations. Not near my intention to defend SDCC or Z88DK. In fact, SDCC and Z88DK have collaborated in recent years and they both have many things in common.

I'm not against Z88DK. It would be very nice if there was a way to have same source code for both compilers (other than implementing everything in C, which is not viable). At the start I considered having both (similar to cpc-dev-tool-chain) but that was discarded as not viable: it would have been impossible for me to maintain both versions of source code, examples and tool-chain considerations. So the obvious solution was to have one and, after testing both, I decided on SDCC. Back then, SDCC was much better, as I explained. Right now I should test both again to really have an updated idea. In fact, I had to edit my previous comment because I did not know that Z88DK was exporting to these platforms.

I already know some SDCC and Z88DK developers, and have consulted and collaborated with them. There is a great amount of work behind both projects. In my opinion, I personally think that it would probably be easier to develop an LLVM back to export to Z80. Moreover, it would beneffit from great knowadays compilers and tools such us GCC or CLANG. But I understand that these two projects have also a difficult position to decide in this sense, as they have great technical debt, like CPCtelera.

In any case, keep the discussion up. If you have interesting ideas, tests or comments to share, please do. Deciding on changing from SDCC to Z88DK is a tough decission to take at the moment, but that does not prevent us from discussing, learning and considering :).

fraespre commented 4 years ago

Thanks for your explanation.