C++17 for 6502

Started by TurboXray, 11/03/2016, 03:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TurboXray

So, this video popped up: https://youtu.be/zBkNBP00wJE.
He writes C++17 code to write a C64 game. The point of the video was showing how advance code could be written with zero overhead, and used a limited processor environment like the 6502 to demonstrate this. To get 6502 instruction output, he just translates the x86 (set to 386 IIRC) to 65x. But the overall idea is kind of interesting.

elmer

Quote from: TurboXray on 11/03/2016, 03:10 PMSo, this video popped up: https://youtu.be/zBkNBP00wJE.
He writes C++17 code to write a C64 game. The point of the video was showing how advance code could be written with zero overhead, and used a limited processor environment like the 6502 to demonstrate this. To get 6502 instruction output, he just translates the x86 (set to 386 IIRC) to 65x. But the overall idea is kind of interesting.
I've got to say that the idea of just translating from another processor certainly could have its merits.

It might well end up with considerably faster code than HuC if the other processor wasn't some complex modern 32-bit behemoth.

I probably *should* watch through the whole thing, but my eyes glazed-over when he started to get into the arcane syntax of all these newer C++ features that have been added to help remove the code-bloat.

It's all got to the point where you're supposed to gyrate your code around into something that only the original author can read in order to push the compiler into being as clever as the programmer thinks that he's being.

If code isn't clear and readable, then IMHO, it's not maintainable.

Many years ago it was said that C++ had become so complex and arcane that most programmers only used 20% of its capabilities. The big problem being that they all used a different 20%!

Since then, C++ has only added on more and more "clever" features.

It's no wonder that the F35 fighter can't fly half the time!