Pages about non-obfuscated programming
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.
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, 198 comments.
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.
- lft-avrprg64-1.0.prg (C64 executable, 381 bytes)
- lft-avrprg64-1.0.s (Source code, 2.5 kB)
Posted Friday 19-Jul-2024 06:35, 4 comments.
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.
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.
- dialog-0m03_0_46.zip (Dialog, release 0m/03, library 0.46, 3.2 MB)
- dialog-0m02_0_45.zip (Dialog, release 0m/02, library 0.45, 3.2 MB)
- dialog-0m01_0_44.zip (Dialog, release 0m/01, library 0.44, 3.2 MB)
- dialog-0k06_0_43.zip (Dialog, release 0k/06, library 0.43, 3.2 MB)
- dialog-0k05_0_42.zip (Dialog, release 0k/05, library 0.42, 3.2 MB)
- dialog-0k04_0_41.zip (Dialog, release 0k/04, library 0.41, 3.2 MB)
Posted Thursday 22-Nov-2018 21:18, 56 comments.
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.
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.
- lft-field-sort (C64 executable, 5.8 kB)
Posted Sunday 24-Sep-2017 21:00, 2 comments.
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.
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.
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.
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.
Leaky redaction
Yay! Third place in the 2008 Underhanded C Contest. Read more.
- leaky_redaction_linus_akesson (Tarball, 1.5 kB)
Posted Wednesday 14-Oct-2009 19:34, 3 comments.
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, 6 comments.
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.
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.
- linus-akesson-obsessbook (Tar/gzip, 4.3 kB)
Posted Wednesday 1-Oct-2014 11:11, 1 comment.
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.
- plasma-1.0 (Source code, 6.9 kB)
Posted Monday 11-May-2009 16:47, 4 comments.
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.
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.
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.
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.
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.
- spindle-1.0 (Source code, tar/gzip, 44.9 kB)
Posted Tuesday 7-May-2013 20:57, 3 comments.
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.
- spindle-2.3 (Source tarball, 113.0 kB)
- spindle-2.3-win32 (Spin win32 binary + example, 74.7 kB)
- spindle-2.2 (Source tarball, 111.7 kB)
- spindle-2.2-win32 (Spin win32 binary + example, 73.7 kB)
- spindle-2.1 (Source tarball, 110.6 kB)
- spindle-2.1-win32 (Spin win32 binary + example, 73.2 kB)
Posted Tuesday 30-Jun-2015 21:48, 7 comments.
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.
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.
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.
- turbulence-src (Source code, 60.2 kB)
Posted Monday 11-May-2009 16:47, 0 comments.
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.
- umlseq 1.6 (Source code, 27.6 kB)
Posted in ancient times, 1 comment.
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.