The easiest way to start programming Commodore 64

Learn BASIC and 6502 Assembly with bite-sized video tutorials.
Delivered to you every week.

Weekly Video Subscription

Always wanted to write a game or a demo for Commodore 64?

But when you will find time for that?

You can't afford to waste it on reading twenty-year-old-books, trying to understand outdated tutorials, or begging for help on hostile forums.

Get short, condensed lesson every week

Imagine that:

  • Every week, new video is delivered straight to your inbox.
  • You can watch each episode online on any device,
  • or download for your convenience DRM free.

And each video comes with:

  • detailed complete transcript of the episode,
  • plenty of source code examples to follow along,
  • additional exercises to solve on your own,
On top of that you will get
  • access to private and inclusive forum, where you can ask for help.
  • all episodes released in the current season

Make progress with little effort

With the 64 Bites Subscription you will level up consistently.

Every week you will learn a new thing and advance toward your goal without much effort.

You can get the subscription for $10.99/month or $109/year (two months for free).

I want a new episode each week!

Get 15 latest episodes now and a new one each week.
All with detailed transcripts, source code examples and programming exercises.

You will get 15 latest episodes immediately

Episode #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. But when we operate on specific bits of a number it is easier to use a binary representation. Memory addresses, on the other hand, are more natural to read as hexadecimal numbers. In the source code, we can easily change the representation of a number. But we don't have any built-in way of printing them on the screen. Today we will solve this problem.

Episode #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, since branches can take one cycle more if the jump lands on a different page than the next instruction. And it can happen by accident if we add some code to before those instructions or if we relocate the program. This can lead to frustrating debugging sessions since the compiler doesn't warn us about this problem automatically. Today we will change that.

Episode #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. Not to mention page crossing. Wouldn't it be great to have the cycle-count computed automatically? In this tutorial, we are going to create a library. You'll be able to include it in any project. It will automatically compute how many cycles your routine takes. We won't need to look up specifications of every single instruction. We will also make sure the library works well by using Test Driven Development to create it.

Episode #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!

Episode #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.

Episode #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 bad lines.

Episode #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. Not all of those five stolen cycles are equal. The number changes depending on which sprites are currently active. Today we will try to figure out the required delay for up to seven sprites.

Episode #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 actually quite hard. Today we will see how to display them on separate raster lines.

Episode #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 resolution.

Episode #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 open the rest of the border.

Episode #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 in a similar fashion, but it is significantly harder. Not only the timing has to be spot-on, the process has to be repeated on each raster line.

Episode #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 in writing timing specific code. Today we will explore the topic, and try to break our routine deliberately.

Episode #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.

Episode #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 one cycle only in this situation. The former can be solved by comparing current rasterline register value at the right moment. Once we know that we need to just find an instruction that can take a variable amount of cycles. But how to do it in practice?

Episode #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 even eight cycles. In this episode we will learn how to reduce the jitter to only one cycle consistently using two nested interrupts.

You can get the subscription for $10.99/month or $109/year (two months for free).

I want a new episode each week!

Get 15 latest episodes now and a new one each week.
All with detailed transcripts, source code examples and programming exercises.