Pages about non-obfuscated programming

Page thumbnail

A 9-bit pitch technique

This article describes a new approach to representing pitch in C64 playroutines. The intended audience is people with a general understanding of C64 coding and SID playroutine design, although readers outside this somewhat narrow demographic may still find the article interesting. Read more.

Posted Monday 30-Mar-2015 22:44, 5 comments.

Page thumbnail

A case against syntax highlighting

Do you rely on syntax highlighting when developing software? If so, you may be shooting yourself in the foot. In this post, I will argue that syntax highlighting, while aesthetically seductive, moves focus from content to form, and discourages those who look at the code from trying to understand it. Read more.

Posted Sunday 26-Aug-2007 11:44, 199 comments.

Page thumbnail

An AVR Programmer for the C64

So there I was, tinkering away on a microcontroller project, when all of a sudden my AVR programmer stopped working. Read more.

Posted Friday 19-Jul-2024 06:35, 4 comments.

Page thumbnail

Craverly Heights in Dialog

In 2014, Ryan Veeder released a small text game called Craverly Heights, along with its Inform 7 source code. He has kindly allowed me to port this game to Dialog, and display the two implementations side by side in order to highlight similarities and differences between the two languages. Read more.

Posted Friday 10-Jan-2020 06:53, 1 comment.

Page thumbnail

Dialog

Dialog is a domain-specific language for creating works of interactive fiction. It is heavily inspired by Inform 7 (Graham Nelson et al. 2006) and Prolog (Alain Colmerauer et al. 1972). Read more.

(show 42 more files)

Posted Thursday 22-Nov-2018 21:18, 56 comments.

Page thumbnail

Faking Fissile Material

Hoo-ray! It turns out I'm the winner of the 2015 Underhanded C Contest! Check out my contribution below, and see if you can spot the sleight-of-hand. Read more.

Posted Wednesday 3-Feb-2016 21:56, 8 comments.

Page thumbnail

Field Sort

I've discovered a new, fast technique for sorting sprites by Y-position on the Commodore 64. While it doesn't beat the fastest routine known, it strikes a good balance between speed and memory usage, and it makes use of several interesting low-level programming tricks. To see how it works, please come with me down the rabbit hole of bleeding-edge C64 programming! Read more.

Posted Sunday 24-Sep-2017 21:00, 2 comments.

Page thumbnail

GCR decoding on the fly

The little routine presented here is, with all due humbleness, hands down the best code I ever wrote. It is esoteric and might not appeal to the masses, and it certainly has no commercial value. But in terms of personal satisfaction at a job well done, this is about as good as it gets. Here's why: Read more.

Posted Sunday 31-Mar-2013 14:40, 46 comments.

Page thumbnail

Getting numeric input (TI-83 assembly programming)

This is done in about the same way as getting string input. Start by putting the prompt at 821ch: Read more.

Posted in ancient times, 0 comments.

Page thumbnail

Getting string input (TI-83 assembly programming)

First of all, we put a prompt at 821ch. Max 16 chars. Read more.

Posted in ancient times, 5 comments.

Page thumbnail

Kernighan's lever

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? Read more.

Posted Tuesday 11-Dec-2012 21:33, 22 comments.

Page thumbnail

Leaky redaction

Yay! Third place in the 2008 Underhanded C Contest. Read more.

Posted Wednesday 14-Oct-2009 19:34, 3 comments.

Page thumbnail

Making 8-bit Music From Scratch at the Commodore 64 BASIC Prompt

In this video, I make 8-bit SID music on a Commodore 64 without any software apart from the built-in BASIC interpreter. This involves poking numbers into memory and hardware registers and writing machine code in decimal. Read more.

Posted Friday 27-Sep-2024 08:28, 7 comments.

Page thumbnail

Massively Interleaved Sprite Crunch

This article describes the inner workings of Massively Interleaved Sprite Crunch (MISC), a new C64 demo effect introduced in my demo Lunatico. Read more.

Posted Monday 19-Dec-2016 21:22, 13 comments.

Page thumbnail

Obsessbook

This is my contribution to the 6th Underhanded C Contest. The results were announced yesterday, and I was pleased to find that my solution was among the few mentioned explicitly on the result page. Before you check out the official results, you might want to study my code below, and see if you can spot the covert behaviour. Read more.

Posted Wednesday 1-Oct-2014 11:11, 1 comment.

Page thumbnail

Plasma

Plasma is a small (637 lines of source code) tool for compiling and concatenating propeller assembly language (PASM) and binary data. It extends PASM with some new features, most notably ARM-like constant pools. Read more.

Posted Monday 11-May-2009 16:47, 4 comments.

Page thumbnail

Poems for bugs

This is talk about C64 coding that I held at Revision 2013. Read more.

Posted Tuesday 2-Apr-2013 23:27, 7 comments.

Page thumbnail

Rasp64

Rasp64 is a Raspberry Pi attached to the user port of a C64, primarily for the purpose of cross-development. Read more.

Posted Tuesday 5-Feb-2013 21:31, 10 comments.

Page thumbnail

Raster paper

This is a simple but very useful tool for C64 demo coding. It's a grid, 63 squares wide, that you print out on paper and draw instructions on. Along the top are helpful reminders about which clock cycles are involved in various effects, and which ones get stolen due to badlines and sprite fetches. Read more.

Posted Saturday 30-Mar-2013 18:23, 8 comments.

Page thumbnail

Reliable synchronisation of cog PLLs

Each cog in the propeller microcontroller has a video generator, which is clocked from a user configurable PLL. Read more.

Posted Tuesday 2-Nov-2010 17:38, 7 comments.

Page thumbnail

Spindle v1

Spindle is an integrated linking, loading and crunching solution for C64 trackmos. By hiding the details of the storage model, it allows the demo coder to focus on effects, transitions and flow. Read more.

Posted Tuesday 7-May-2013 20:57, 3 comments.

Page thumbnail

Spindle v2

Spindle is an integrated linking, loading and crunching solution for C64 trackmos. By hiding the details of the storage model, it allows the demo coder to focus on effects, transitions and flow. Read more.

(show 2 more files)

Posted Tuesday 30-Jun-2015 21:48, 7 comments.

Page thumbnail

The TTY demystified

The TTY subsystem is central to the design of Linux, and UNIX in general. Unfortunately, its importance is often overlooked, and it is difficult to find good introductory articles about it. I believe that a basic understanding of TTYs in Linux is essential for the developer and the advanced user. Read more.

Posted Friday 25-Jul-2008 17:46, 281 comments.

Page thumbnail

TI-83

The TI-83 was a graphical calculator from Texas Instruments. It had a black and white display, some buttons and a Z80 processor, and it allowed you to write programs in assembly language. Read more.

Posted in ancient times, 2 comments.

Page thumbnail

Turbulence source code

On this page you'll find the complete source code for Turbulence, as well as a general overview and discussion of some of the techniques I used. Read more.

Posted Monday 11-May-2009 16:47, 0 comments.

Page thumbnail

UMLseq

UMLseq generates UML sequence diagrams from simple text files. The output is in Encapsulated PostScript (.eps) format, and the input format is documented in the archive. Read more.

Posted in ancient times, 1 comment.

Page thumbnail

VIC Timing Chart

This is a comprehensive visualisation of the behaviour of the VIC chip. It is quite handy as a reference when coding C64 demo effects. Read more.

Posted Saturday 30-Mar-2013 18:23, 6 comments.