HackerTube

CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”

CppCon13 HN recommenders · recommended in 10 months, 2016–2024
YouTube
talk · intermediate · evergreen · 2016–2024 on HN

Jason Turner's CppCon 2016 talk builds a simple Commodore 64 game using C++17, showing how constexpr and const let a modern compiler produce tight 6502 code. He walks through assembly output to show abstractions being optimized away.

A perennial favorite, recommended as proof that expressive modern C++ can compile to efficient code even on tiny retro hardware.

12 comments from Hacker News

@MereInterest2017-02 · in “C++ on Embedded Systems”

Absolutely. There was a fantastic talk at CppCon last year, using C++17 to program a game for the Commodore 64. Using standard C++ idioms, the optimizer was easily able to make it compile down to efficient machine code. [1] ▶ this video

Strongly recommends View on HN
@dmit2016-10 · in “Twenty years later I wrote a Tetris again”

For those who haven't seen it, there is a wonderful talk by Jason Turner about writing a simple Pong clone for the Commodore 64 in modern C++: ▶ this video

Strongly recommends View on HN
@0xcde4c3db2023-02 · in “I learned to program a C64 in basic and compiled C (2020) [video]”

There's a great talk [1] in which C++17 features are used to build an efficient Pong clone on C64. As I recall, the author wound up writing an (obviously limited) x86-to-6502 translator to get around the lack of 6502 support. [1] ▶ this video

Recommends View on HN
@ciroduran2022-09 · in “8bitworkshop”

Creativity flourishes with the right restrictions. In this case, the graphics and sound limitations. Also, just because you're targeting old platforms doesn't mean you need to use old platform's tools. Modern tools make it so much easier to develop on these old platforms, check out this talk about coding in C++17 for the Commodore 64 ▶ this video

Recommends View on HN
@einpoklum2022-05 · in “Common libraries and data structures for C”

> Nor does it have any concern for the elegance of its design. It has a lot of inelegant facilities, which, when used under the hood, allow you to express your elegant abstractions. > Hence the common practice of using a small subset C++ and pretending it's just C with Extras. That's mostly failure to use C++. Since C++11, and especially with later updates to the standard, idiomatic C++ is very different from C - even if you're not using a lot of the standard library. I'll link to a talk already linked-to in another comment in this discussion: Rich code for tiny computers / Jason Turner, CppCon 2016 ▶ this video

Recommends View on HN