The easiest way to start programming Commodore 64
Learn BASIC and 6502 Assembly with bite-sized video tutorials.
Watch a few episodes today!
All released episodes
Episode #108 - Advanced input with get
BASIC INPUT command works great for prototypes and small programs. If you care about user experience you need to create you own input routine with the GET command. Read more →
Buy this episode for just $3.99Episode #107 - BASIC GET ASC AND CHR$
GET instruction reads the keyboard buffer instead of waiting for an input. It can be used to read keypresses and to let users take immediate actions or make quick decisions. Read more →
Buy this episode for just $3.99Episode #106 - BASIC INPUT
You aready know how to PRINT stuff in BASIC, right? Great! Now, it's time to ask the user for an INPUT! Read more →
Buy this episode for just $3.99Episode #105 - BASIC SAVE & VERIFY
In this episode we'll learn how to save and verify BASIC programs on both C64 and VIC-20. Read more →
Buy this episode for just $3.99Episode #104 - Loading in BASIC
Today we will learn about different modes of the BASIC load command. How to display the directory, and why it even works, and how to load BASIC and Assembly programs from a disk drive. Read more →
Buy this episode for just $3.99Episode #103 - BASIC memory layout
When we turn the Commodore 64 on it greets us with an information about how many bytes are free for BASIC programs. But not all of it can be used for the code. As soon as we introduce variables, ... Read more →
Buy this episode for just $3.99Episode #102 - BASIC in Assembly II
In this episode, we take a look at the tokenization process. It is a routine that converts BASIC keywords and commands into single-byte values, called tokens. This happens automatically when we t... Read more →
Buy this episode for just $3.99Episode #101 - BASIC in Assembly I
When we type programs in BASIC, they are pre-processed and saved into the memory, to be interpreted later. Now imagine we don't need to type them anymore. What if we could write their contents di... Read more →
Buy this episode for just $3.99Episode #100 - Back to BASIC
It is time to get back to BASIC and take a closer look at the SYS instruction. We used it all the time to run our assembly programs. But it can do much more than that. Did you know that we can us... Read more →
Buy this episode for just $3.99Episode #099 - Split Screen
Many two-player games on Commodore 64 split the screen horizontally and present separate view for each player. Today we are going to do it ourselves. We are going to make two horizontal parts of ... Read more →
Buy this episode for just $3.99Episode #098 - Binary Coded Decimal
One of the pretty common tasks we encounter while creating a game is printing the score. It can also be surprisingly difficult. Especially if you need an efficient solution. Today we will learn h... Read more →
Buy this episode for just $3.99Episode #097 - Printing Bin & Hex Numbers II
In the previous episode, we've created pseudo commands that converted numbers into their binary and hexadecimal string representations. They will work fine in most cases when we need to either pri... Read more →
Buy this episode for just $3.99Episode #096 - Printing Bin & Hex Numbers I
When programming Commodore 64 we are using different representations of numbers. Sometimes it is more convenient to use a plain old decimal version, especially when we need to use any arithmetic. ... Read more →
Buy this episode for just $3.99Episode #095 - Safe Branching
Often in programming Commodore 64, we need accurate and compact delay loops. We usually create them using one of branching instructions. Once we introduce such loop, our code can become fragile,... Read more →
Buy this episode for just $3.99Episode #094 - Counting Cycles
Aren't you tired of counting cycles in your routines by hand? Looking up specifications of every single instruction gets old soon. It's especially hard if your code contains branches and loops. ... Read more →
Buy this episode for just $3.99Episode #093 - Sprites everywhere
Can we display more than 8 sprites on the screen with side borders open? Of course, we can! You'll learn how in less than eight minutes! Read more →
Buy this episode for just $3.99Episode #092 - Sprites on the border IV - Four on a bad line
In the previous episode, we've found a way to display sprite-zero while also having the side border open. In this video we will figure out if that's possible on a bad line. Read more →
Buy this episode for just $3.99Episode #091 - Sprites on the border III - Eight sprites
In this episode, we will learn how to display sprite zero while the side border is open. This allows us to draw all eight sprites on the top and the bottom part of the border where there are no ba... Read more →
Buy this episode for just $3.99Episode #090 - Sprites on the border II - Seven sprites
In the previous episode, we have learned that if the sprite is to be displayed on a next raster line the graphical chip steals five cycles from the processor. That's not the whole story, though. ... Read more →
Buy this episode for just $3.99Episode #089 - Sprites on the Border I
Now that we have the border open around the whole screen, we can finally use that space to draw something. We can use sprites to do that. But having them enabled with the side border open is actu... Read more →
Buy this episode for just $3.99Episode #088 - Hyperscreen
In this episode we will learn two methods of opening all borders around the screen. The effect is also know as hyperscreen because it allows to expand the drawable area and increase the screen re... Read more →
Buy this episode for just $3.99Episode #087 - Opening Borders III - Almost There
In the previous episode, we've started opening side-borders. It went fine until weencountered a bad line, which left us with fewer cycles to spare. Today we will tackle that problem and try to ope... Read more →
Buy this episode for just $3.99Episode #086 - Opening Borders II - Left & Right
In the episode sixty-one, we've learned how to use the vertical border expansion to remove parts of the border that are above and below the drawable area. Opening side borders can be accomplished ... Read more →
Buy this episode for just $3.99Episode #085 - Raster Stabilization IV - Pitfalls
We've been working on a raster stabilization routine for three episodes already. We ended up with an optimized code that does the job quite well. But I've also been warning you about difficulties... Read more →
Buy this episode for just $3.99Episode #084 - Raster Stabilization III - Optimization
Once we have our stable raster routine working it's time to optimize it. Let's see if we can minimize its memory footprint and shave off few cycles here and there. Read more →
Buy this episode for just $3.99Episode #083 - Raster Stabilization II
In this episode we continue stabilization of the raster. All we need to do is solving two problems: * find out a way to detect if we are one cycle early and then * delay the execution by just... Read more →
Buy this episode for just $3.99Episode #082 - Raster Stabilization I
Because of the way the 6510 processor works the raster interrupt handlers might experience a random delay in execution. The variance is usually called the jitter and it can take up to seven or eve... Read more →
Buy this episode for just $3.99Episode #081 - Filtering Sound
We can create new waveforems not only by adding pure tones together. We can also start with complex sounds, like saw or a rectangle wave and subtract different frequencies from them. This is the b... Read more →
Buy this episode for just $3.99Episode #080 - Test, Sync & Ring Modulation
Today we will learn how to synchronize SID voices using the test bit and hard-sync functionality. We will also use the ring modulation to... create sick bass drops for Dub Step. Read more →
Buy this episode for just $3.99Episode #079 - Combining Sounds
Up until now, we've been using only the first one of three voice of the SID chip. But if we use all three voices simultaneously, we can play songs with chords, simulate multiple instruments, or p... Read more →
Buy this episode for just $3.99Episode #078 - Write Only Registers
Most SID registers are write-only. It means that we can't use the usual read-modify-store construction to update just part of a register. The most common technique to deal with this problem is to e... Read more →
Buy this episode for just $3.99Episode #077 - Programming SID III - Sound Envelope
We already know how to play sounds using the SID chip. Today we are going to learn how to make them more interesting by changing attack, decay, sustain and release registers, which define a so-call... Read more →
Buy this episode for just $3.99Episode #076 - C64 Debugger III - Debugging
It's about time to get the most of the C64 Debugger! In this episode you will learn - how to load any demo, - use snapshots to quickly jump to interesting moments, - stop the excution at any t... Read more →
Buy this episode for just $3.99Episode #075 - C64 Debugger II - Overview
In this episode we will learn how to use basic features of the C64 Debugger. Memory map allows us to quickly notice patterns in the running program. Disassembly view allows us to locate the progra... Read more →
Buy this episode for just $3.99Episode #074 - C64 Debugger I - Setup
Today we are going to take a look at one of the most powerful programming tools for Commodore 64. The C64 Debugger by Slayerek. Even though it's not even a 1.0 release, it already has plenty of f... Read more →
Buy this episode for just $3.99Episode #073 - KickAssembler 4.x
Some time ago a new version of the Kick Assembler compiler had been released with a plenty of new features. Today we are going to take a closer look at some of those features. We will also figure ... Read more →
Buy this episode for just $3.99Episode #072 - Programming SID II - Playing Notes
Today we are going to figure out how to specify the sound frequency of the SID chip in Hertz. Then we are going to find correct frequencies for notes in different octaves. All of that (in theory at... Read more →
Buy this episode for just $3.99Episode #071 - Programming SID I - Sound Waves
It's about time to figure out how to use the SID chip without a pre-built player. In this video we will learn how to use one of the built-in oscillators to generate different kinds of sound waves.... Read more →
Buy this episode for just $3.99Episode #070 - Playing SID Music III - PAL vs NTSC
When Commodore 64 came out, it was produced mainly for two different markets. The one for the USA market was designed for the NTSC system, while the European model supported PAL. Each one had a d... Read more →
Buy this episode for just $3.99Episode #069 - Playing SID Music II
In this video, we are going to continue making our SID player more versatile. We will dig into the SID file format specification and use it to play a variety of different tunes by switching ROMs, ... Read more →
Buy this episode for just $3.99Episode #068 - Playing SID Music I
One of the reasons behind the popularity of Commodore 64 was the quality of the sound it could produce. Almost all games and demos released on Commodore 64 have their unique tunes. On top of that,... Read more →
Buy this episode for just $3.99Episode #067 - Multiplication
Multiplication on the Commodore 64 is not trivial. The 6510 processor does not have built-in instruction for it. We have to use some kind of an algorithm. Why not a one used few centuries ago... b... Read more →
Buy this episode for just $3.99Episode #066 - Horizontal Software Scrolling
In the previous episode, we've learned how to create a twenty-five-character vertical scroll. Today we will create a horizontal one made out of forty characters. To do that efficiently we'll need ... Read more →
Buy this episode for just $3.99Episode #065 - Vertical Software Scrolling
Although efficient, hardware screen scrolling forces us to widen the border, which in turn leaves us with only twenty-four rows or thirty-nine columns of characters. In a case of vertical scrollin... Read more →
Buy this episode for just $3.99Episode #064 - Sixty Four Sprites
Remember when I told you that the Commodore 64 could display up to eight hardware-accelerated sprites. I lied. It can draw more of them, and this episode will teach you how to do that. Read more →
Buy this episode for just $3.99Episode #063 - Full-Screen Scrolling
We already know how to scroll a line of text using the hardware scrolling feature of the Commodore 64. Today we'll take it up a notch and scroll the full screen. Read more →
Buy this episode for just $3.99Episode #062 - Scrolling Text
Since we already know how the hardware scrolling works, let's put it to a good use and implement one of the most common effects seen in demos - a scrolling text. Read more →
Get This Episode For Free!Episode #061 - Opening Borders I - Top & Bottom
The VIC-II - the graphical chip of Commodore 64 was designed in a hurry and many of its features ended having unexpected side effects. Discovering those quirks, and using them to enhance capabilit... Read more →
Buy this episode for just $3.99Episode #060 - Hardware Scrolling
One of the things that made games more interesting when the Commodore 64 came out was the ability to scroll the screen pixel by pixel. The VIC-II - the graphical chip of Commodore 64, allows movin... Read more →
Buy this episode for just $3.99Episode #059 - Replace Default IRQ Handler
Default IRQ handler does quite a few things for us. But it also wastes cycles and memory on tasks unrelated to our code. Today we will learn how to handle IRQ signals ourselves and efficiently sto... Read more →
Buy this episode for just $3.99Episode #058 - Raster Interrupts
Waiting actively until the display reaches specific raster line has few drawbacks. Today we will learn how to allow VIC-II to notify us when the line is displayed with a raster interrupt. Read more →
Get This Episode For Free!Episode #057 - Vertical Sync
We've been animating sprites and characters for some time already. But we've never managed to synchronize the animation with the rate of screen refresh. It caused noticable flickering and artifacts... Read more →
Buy this episode for just $3.99Episode #056 - Timing IRQs II - Timer B
In the previous episode, we have learned that the Timer A in the first CIA chip triggers the IRQ signal sixty times per second. We've also learned how to slow it down, pause it and make it run just... Read more →
Buy this episode for just $3.99Episode #055 - Timing IRQs
When we turn the computer on the maskable interrupt signal or IRQ is being sent around sixty times per second by one of the internal timers. Today we will learn how this process actually works. Read more →
Buy this episode for just $3.99Episode #054 - Sprite-Character Priorities
Today we will focus on sprite display priorities. Or in other words, how can we display sprites in front or behind the character-based graphics. We will explore all built-in graphical modes and ... Read more →
Buy this episode for just $3.99Episode #053 - Pre-calculated Sprite Movement
We have been animating sprites in the past but only in a way of changing their bitmaps on each frame. But this kind of animation is not unique to sprites. It can also be realized using the characte... Read more →
Buy this episode for just $3.99Episode #052 - Multicolor Bitmap Mode
The Multicolor Bitmap mode is the last of built-in graphical modes that Commodore 64 can display. As the name suggests, it can display bitmap images with additional colors, but it sacrifices the h... Read more →
Buy this episode for just $3.99Episode #051 - Hi-Res Bitmap Mode
The Commodore 64 can display images with the maximum resolution of 320 by 200 pixels. But we only learned how to fill the screen with 256 different characters at most. This works great as tile-base... Read more →
Get This Episode For Free!Episode #050 - Extended Background Mode
The last of built-in character modes that the Commodore 64 can display is an extended background color mode. It allows us to combine high-resolution graphics with additional colors but sacrifices ... Read more →
Buy this episode for just $3.99Episode #049 - Multicolor Character Mode
In this episode, we are going to talk about the Multicolor Character Mode, which allows us sacrifices the horizontal resolution of a character for additional colors. It can be used to add shading ... Read more →
Buy this episode for just $3.99Episode #048 - Hi-Res Character Mode
Commodore 64 has plenty of built-in graphical modes that we can use to paint images on the screen. All of them use characters in one way or the other. Some of them enable us to achieve better resol... Read more →
Buy this episode for just $3.99Episode #047 - Custom Character Set
Commodore 64 has two default character sets. We can switch between them by pressing the shift+commodore key. In this episode we will learn how to create our own character bitmaps and make the comp... Read more →
Get This Episode For Free!Episode #046 - Managing ROM & RAM II
In the second part about ROM manipulation we will claim all of the RAM by disabling BASIC and KERNAL ROMS as well as I/O registers block. We will also learn how to move the Character Generator ROM... Read more →
Buy this episode for just $3.99Episode #045 - Managing ROM & RAM I
As we already know, Commodore 64 has exactly 64 Kilobytes of RAM. But we can't use all of it by default. BASIC Interpreter ROM, KERNAL ROM and I/O registers cover 20KB of RAM. Today we will learn... Read more →
Buy this episode for just $3.99Episode #044 - Zero Page
In most computers based on 6502 and 6510 processors the first 256 bytes of memory are precious. Most instructions using this part of memory are shorter and faster to execute. Commodore 64 uses almo... Read more →
Get This Episode For Free!Episode #043 - Unusual Jumps
We already known that RTS and RTI can be used as jump instructions. But using branching as unconditional jumps and the BIT instruction to skip few bytes? That's just insane... But frequently use... Read more →
Buy this episode for just $3.99Episode #042 - Stack II - jumps
The 6502 stack is not only useful as a temporary storage for data in assembly programs. It is also used internally by the processor in three jump instructions: jsr, rts and rti. Knowing this allow... Read more →
Buy this episode for just $3.99Episode #041 - Stack
The processor that powers the Commodore 64 supports only a handful of registers that can be used for arithmetic or logical operations. This means that we will often encounter a situation when we ne... Read more →
Get This Episode For Free!Episode #040 - Independent FPS Control
We already know how to insert our routine into the interrupt handler to get reliable 50 ar 60 frames per second for our animations. But what if we want to display them at only half that speed? In... Read more →
Buy this episode for just $3.99Episode #039 - Multiple IRQ Wedges
In a previous episode, we've learned how to insert a routine at the beginning of the IRQ handler. In the most typical situation, we just need to store our routine address in the place in RAM called... Read more →
Buy this episode for just $3.99Episode #038 - IRQ Driven Animations
In our previous episodes, we've been using a quite primitive animation technique. We've been simply advancing frames in an infinite loop with and wasting enough time with a delay macro to slow the ... Read more →
Buy this episode for just $3.99Episode #037 - Animating Characters
We've already been talking a lot about hardware sprites. They are a useful tool to draw and animate dynamic parts of your game, application or a demo.
The other way of creating graphics on thi... Read more →
Episode #036 - Robust Animations
If you solved exercises from the previous episode, you should already have a robust program that can animate sprites of any type exported from the sprite pad.
Today we will analyse one of poss... Read more →
Episode #035 - Automated Sprite Setup
In the previous episode, we've seen how to optimize the memory usage of the sprite animation with a technique called run-length encoding. It allowed us to keep only a unique subset of all bitmaps i... Read more →
Buy this episode for just $3.99Episode #034 - Optimizing Animations
In this episode, we'll see how to compress duplicated sprite bitmaps without any visual changes to the animation. Read more →
Buy this episode for just $3.99Episode #033 - Sprite Animation
On top of creating bitmaps for use in static sprites, SpritePad allows us to create series of images that can be animated in our program.
Today we will learn how to load and animate exported spr... Read more →
Episode #032 - Importing SpritePad Files
In the previous episode we've used the SpritePad application to design four different sprites. We have also exported them into binary files in two formats. The native spritepad one and the SEUCK fo... Read more →
Buy this episode for just $3.99Episode #031 - Using the SpritePad
This time, instead of programming, we'll learn to use one of the most popular sprite editors - the SpritePad.
It allows you to create multicolor and hires sprite bitmaps in a much more convenien... Read more →
Episode #030 - Sprites III - Multicolor Bitmaps
If we take a look at a sprite bitmap, and treat each pixel as it was defined by a pair of bits.
The displayed image grid would now only be 12 by 21 pixels. But each of them could be in one of fo... Read more →
Episode #029 - Sprites II - Hires Bitmaps
As we already know, sprites are a 24 by 21-pixel bitmaps. But default ones are just filled rectangles. In this episode we will learn how to redefine sprite bitmaps to make them more interesting. Read more →
Get This Episode For Free!Episode #028 - Sprites I - Properties
VIC-II the graphical chip of Commodore 64 can display eight movable bitmaps, also known as sprites. It is a feature designed specifically to use in games. Sprites can be controlled by the set of re... Read more →
Buy this episode for just $3.99Episode #027 - Data Structures
KickAssembler's scripting language provides a variety of data structures that can be used to group and order static data.
Proper use of lists, hash tables and structures can add clarity to your ... Read more →
Episode #026 - Namespaces
Some languages provide structures or records to group data at runtime. Surprisingly KickAssembler's namespaces can be used in a similar manner. We can use them to group data together and pass them ... Read more →
Buy this episode for just $3.99Episode #025 - Joystick Handling II - Turn Based Polling
Today we'll learn a robust method of implementing turn-based joystick polling that works well for rogue-like games or puzzles. Read more →
Buy this episode for just $3.99Episode #024 - Joystick Handling
When writing games and graphical programs we need some way of interacting with things presented on the screen.
Commodore 64 has a built-in support for two joysticks that are perfect for dynamic ... Read more →
Episode #023 - Boolean Operations
In this episode, we will find out how the 6502 processor handles boolean operations. We will use the 64spec library to see their results and side effects, and how they can be used to manipulate spe... Read more →
Buy this episode for just $3.99Episode #022 - TDD with 64spec
64spec is an open-source testing framework for Commodore 64. It is heavily inspired by an rspec library that Ruby developers use for testing their programs. Today we will see how to use it to learn... Read more →
Get This Episode For Free!Episode #021 - PETSCII Encoding
Today we will talk about the PETSCII character encoding. We'll learn how to use the control characters, master the conversion from screencodes, and figure out how to use it effectively from the Kic... Read more →
Buy this episode for just $3.99Episode #020 - Text Rendering II - KERNAL
Today we will learn how to print strings at the current cursor position, just like the print command does it in BASIC. To make it more interesting we'll be using built in KERNAL subroutines CHROUT ... Read more →
Buy this episode for just $3.99Episode #019 - Text Rendering I
Today we take a look at printing strings during compilation and at runtime. We also examine few pros and cons of C-like null terminated string in comparison to Pascal-like strings prepended with th... Read more →
Buy this episode for just $3.99Episode #018 - Pseudo Commands
Today we'll learn about .pseudocommand directive in KickAssembler. It allows us to make more robust macros that can work with different addressing modes and behave like a built in assembly instruct... Read more →
Buy this episode for just $3.99Episode #017 - Loops in Assembly
In which we will learn about absolute indexed mode to access memory sequentially. We will also create self-modyfing code. On top of that we will figure out how and why should we use loop unrolling. Read more →
Buy this episode for just $3.99Episode #016 - Compile Time TDD
On top of being awesome, KickAssembler's scripting language has two simple but powerful directives - .assert and .asserterror.
We can use both to do compile-time Test Driven Development, and... Read more →
Episode #015 - Metaprogramming
The KickAssembler has one exclusive feature that allows for really powerful compile-time metaprogramming. It has a built-in programming language that can be used to generate assembly.
In thi... Read more →
Episode #014 - TDD with Macros
Have you ever thought of doing Test Driven Development on Commodore 64?
It's not only possible, but surprisingly simple and rewarding. In this episode, with the help of macros, we'll build a... Read more →
Episode #013 - Comparisons
In this episode we'll learn the remaining Z flag along with it's BEQ and BNE instructions. We'll also try to compare arbitrary numbers using subtraction and CMP command, which only seems to be stra... Read more →
Buy this episode for just $3.99Episode #012 - Decisions
Did you know you can use the carry flag to signify an overflow in unsigned integer operations. But wait, there's more. We also have other flags like V, or N and we can use them to make decisions i... Read more →
Get This Episode For Free!Episode #011 - Captivity of Negativity
This one teaches not only how to subtract numbers on Commodore 64. It also shows different ways of representing negative numbers in binary and explains reasons why borrow in subtraction is defined ... Read more →
Buy this episode for just $3.99Episode #010 - Add and Carry On
Often in games we need to track various numbers. Score, number of lives, amount of fuel, experience points, or even the position of the player are just few examples. Therefore it's a good idea to l... Read more →
Buy this episode for just $3.99Episode #009 - Jumping Around
Where we will learn how to use JMP, JSR and RTS commands to jump around programs. We will also use labels, constants and subroutines to make the programs a bit more readable. Read more →
Buy this episode for just $3.99Episode #008 - Assembly - The Sane Way
In this episode we will learn an easier way to write the assembly. Instead of using machine language monitor like animals, we can use modern development environments that work on every platform. Wi... Read more →
Buy this episode for just $3.99Episode #007 - Assembly - The Hard Way
In this episode we will start our adventure with the assembly. We will learn a handful of commands, how to translate them into machine code by hand [sic!], and how to run them from BASIC. We will a... Read more →
Buy this episode for just $3.99Episode #006 - Read Data
The DATA statement is used to define sequences of string or numerical constants. The READ command is used in to pick values from these sequences of one by one. They are mostly used in combination w... Read more →
Get This Episode For Free!Episode #005 - For Loops
Where we learn how to simplify repetitive tasks using FOR loops in BASIC. We will find out how to properly nest them to perform tasks on multidimensional data. And finally how can we use them to fi... Read more →
Buy this episode for just $3.99Episode #004 - PEEK & POKE
We will learn how to use two most powerful instructions in BASIC - Peek and Poke. We can use them to read from and write to the memory, which on C64 is not only used to store data. By writing value... Read more →
Buy this episode for just $3.99Episode #003 - Programs in BASIC
We will learn how to write LIST and RUN programs in basic. We'll see how to debug them using STOP and CONT commands. We will also find out the surprising similarities and differences between the RU... Read more →
Buy this episode for just $3.99Episode #002 - BASIC's Basics
In which we'll learn how to execute BASIC commands. We will define and use variables, convert between different types and display them on the screen. Along the way we will find out why floats in BA... Read more →
Get This Episode For Free!Episode #001 - Tools
Where we learn about three tools we can use to program C64 on any platform today. We'll use VICE, KickAssembler and Sublime Text as an Emulator, Cross Assembler and a Text Editor. In the show notes... Read more →
Get This Episode For Free!