## Calculating an approximate value of PI, another method

I was having a look at a method of calculating an approximate value of PI without resorting on random numbers.…

## Chaos game: fractals by using random numbers (C64 BASIC)

Again on random numbers. This time, we’ll have a look at how to generate fractals by using random numbers. It…

## Estimating PI using Monte Carlo Method (C64, BASIC)

OK, it’s not PI day, but I wanted to have a trial at estimating PI using Monte Carlo Method anyway.…

## C64 BASIC: ECM and MCM scrolling routines

I have been still doing experiments with C64 BASIC this week. Again, I have been working on scrolling routines. This…

## Big moving letters with Commodore 64 BASIC

Being bored myself of my usual checkerboard routines, by using their principles I wanted to have a try at something…

## Animations with Commodore 64 BASIC: zooming chessboard

A zooming chessboard is a classic on demo coding. Assembler is a must here if you want the effect to…

## Commodore 64 clock using the CIA TOD clock (from “Compute!”)

I’ve recently typed-in a nice program from Compute! magazine[1]Issue 43, December 1983 called “Commodore 64 clock”, by Paul F. Schatz.…

## Commodore 64 SID music programming with BASIC – playing a simple three voices tune (part 2)

On the first part, we have seen a simple technique for programming a three voices tune with BASIC. The program…

## Assembly language: a simple UNNEW (OLD) utility (C64)

A very classic topic is the ability to recover a BASIC program that has been killed by an unwanted NEW…

## Commodore 64 SID music programming with BASIC – playing a simple three voices tune

On earlier posts we have seen how to play a single note and how to play a one voice tune…

## How to merge two BASIC programs together (C64)

Sometimes it may be useful to merge two BASIC programs together. For instance, we may need on the program we…

## Commodore 64 keyboard buffer tricks: deleting and creating BASIC lines from BASIC

Let’s have a look at some nice Commodore 64 keyboard buffer tricks. The keyboard buffer is normally used by the…

## Commodore 64 SID music programming with BASIC – playing a simple one voice tune

Now that we know how to play a single note with Commodore 64 BASIC, why not make something more complex?…

## Commodore 64 SID music programming with BASIC – playing a note

Although machine language is what we really need for C64 music programming, BASIC may be more than acceptable for some…

## Very basic BASIC: drawing tilted ellipses (Commodore 64)

Following a request by a reader (Kick Off), I have had a quick look at how to draw tilted ellipses.…

## Drawing the United Kingdom flag with BASIC (Commodore 64, Sinclair Spectrum)

Drawing the United Kingdom flag is an interesting exercise, especially if we want to draw it by using CBM BASIC…

## Very Basic BASIC: making a digital clock program using CBM characters and sprites (C64)

One of my readers (Crispin) has kindly requested a simple digital clock program for the Commodore 64 (in BASIC V2).…

## Plotting graphics on sprites – drawing a filled circle with BASIC V2 (C64)

Sprites are much more than movable objects intended for games. For example, sprites can be used to set up a…

## User defined characters – a really simple font editor (BASIC, Machine Language – C64)

Creating user defined characters on the Commodore 64 is not that easy from BASIC V2. Binary numbers – which can…

## VIC-II graphics, accessing ROM font images from different banks (C64)

The Commodore 64 has 64K of RAM memory and the VIC-II graphic chip can access all of it, but in…

## Very basic BASIC: drawing circles the old way (C64)

On a C64, drawing circles is quite difficult using BASIC V2, not only for speed problems, but also because a…

## Handling sprites collisions and scrolling from BASIC: coding a simple “game” (C64)

This article is intended as a companion to my previous article “Programming sprites on the Commodore 64, a simple tutorial…

## Plotting a 3D function with Simons’ BASIC and BASIC 2.0 (C64)

Some time ago I noticed on Youtube a nice Sinclair Spectrum BASIC program that plots a 3D function. Since I…

## Very basic BASIC: formatting numbers and updating information on screen

While writing a simple C64 BASIC “game”, I came across some little issues dealing with formatting numbers and updating information…

## Taking the square of a 16 bit number, a simple technique using 6502 assembly

If we need a fast square of an 8 bit number, we just have to create a simple table of…

## Another look at 3D graphics: fast hidden faces removal (back-face culling)

While doing even very simple 3D graphics, the need of a better rendering of images will soon arise. Wireframe 3D…

## An introduction to vector-based graphics on the Commodore 64 – Rotating simple 3D objects (assembly language)

Vector-based graphics or 3D graphics is quite common today. On old 8 bit computers it was not very common instead,…

## Assembly math: 6502 8 bit fast multiply routine. 16 bit multiply without bit shifting.

On my last post I had presented an 8 bit fast multiply routine. Actually, it was limited to a narrower range…

## Optimizing the assembly program “Sphere” – More tips on fixed point math. A fast 8 bit multiply routine.

Fixed point math can be quite useful for fast computations involving decimal numbers. We have seen some examples in this…

## The Mandelbrot set – a C64 assembly program to draw it fast, using integer math – part 2

In the first part of this article I have presented a Commodore 64 program to draw the Mandelbrot set coded in…

## The Mandelbrot set – a C64 assembly program to draw it fast, using integer math – part 1

The Mandelbrot set, like most fractals, requires a lot of computations to be drawn. That’s why most programs on the…

## Commodore 64 BASIC 8×8 Mandelbrot set: faster version

Today I have had a look at the BASIC program that has been presented in this article. I was looking…

## Drawing the Mandelbrot set – Coding fractals with Commodore 64 BASIC and Freebasic

Fractals are commonly referred to as images which are obtained by performing several calculations. One property that sets those images…

## Sprite multiplexing, a simple implementation using Commodore 64 BASIC V2

The Commodore 64 graphics chip VIC-II offers 8 hardware sprites. This number is not that impressive, but as C64 sprites…

## Programming sprites on the Commodore 64, a simple tutorial using BASIC V2

Programming sprites on the Commodore 64 is quite simple, even with Commodore BASIC V2 (the built-in BASIC interpreter). The Commodore…

## Machine language for the Commodore 64, 128, and other Commodore computers (book review)

“Machine language for the Commodore 64, 128 and other Commodore computers” is a machine language course written by the world-famous…

## Zooming a square with Commodore 64 BASIC – a simple 2D realtime zoomer using sprites

Coding a zoomer on a vintage computer is something that usually asks for machine language. And even with that language,…

## 3D Graphics: rotating a cube with Freebasic (PC) and Simons’ BASIC (C64)

3D graphics is what games are all about today. At the time the Commodore 64 and other 8 bit computers…

## Old BASIC interpreters era: is there anything left for today’s PCs? An introduction to Freebasic.

Most 8 bit computers were equipped with a BASIC interpreter directly available in ROM. Microsoft BASIC was the most common…

## Commodore 64: breaking the 38K RAM barrier from BASIC. Creating an additional 4K BASIC variables storage area.

Although the Commodore 64 comes with 64K RAM of memory, not all of this amount of memory is available right…

## Color bars for movement: a simple perspective scrolling with Commodore 64 BASIC

Several Commodore 64 games use color bars to achieve the illusion of a moving landscape. Even other platforms such as…

## Very basic BASIC – simple tips for entering strings with INPUT (Commodore 64 BASIC)

When using Commodore 64 BASIC V2, you more than often realize that even performing very simple tasks, like entering strings,…

## Commodore VIC 20 BASIC programming: scrolling chessboard

Although the available BASIC RAM memory on an unexpanded Commodore VIC 20 is quite limited, it is still possible to…

## 6502 assembly math: division – a simple algorithm using powers of two

There are several routines available on the web that perform integer division in 6502 assembly language. Still, I wanted to…

## A 35000 characters string with Commodore 64 BASIC

Commodore 64 BASIC strings are limited to 255 characters. But, that doesn’t mean you can’t put a bigger string on…

## Line drawing routines programming: a different approach. 6502/6510 assembly implementation on the Commodore 64

Drawing lines is a classic topic on computer graphics programming. You will usually find explanations dealing with algorithms derived from…

## Playing SID tunes with a slow speed: Monty on the Run BASIC player

Sometimes while doing SID music covers I wish I had a way of playing SID tunes with a slow speed.…

## An introduction to 6502 math: addition, subtraction and more

Numbers can be fun, and talking about 6502 CPU math is just another way to look at topics we already…

## The perspective drawing of a sphere coded in 6502 assembly language

Perspective drawing has always been fascinating to me. I will never stop being amazed at the wonder of seeing a…

## A simple text scroller coded in assemby language for the Commodore 64

I have coded a very simple text scroller that uses most of the concepts explained on this article. I hope…

## Commodore 64 BASIC 2.0 garbage collection, strings assignments in loops

Strings assignments inside loops are very likely to create garbage. Even when a new string is assigned to an already…

## “Hi-res” bitmap graphics with Commodore 64 BASIC 2.0, fast screen clearing routine

Bitmap graphics with Commodore 64 BASIC 2.0 is not easy, but it is possible. The problem is the lack of…

## 6502 assembly language: a quick overview with Commodore 64 programming examples

This article is a little overview of 6502 Assembly Language, intended for those with little knowledge of 6502/6510 assembly or…

## Coding a simple smooth text scroller with Commodore 64 BASIC, working with string variables

Text scrollers are quite common on the Commodore 64, due to the ability of the VIC-II chip to perform fine…

## Garbage collection on Commodore 64 BASIC, how to handle it

One important part of a BASIC interpreter is string handling. This can be done in two ways: either by using static strings or…

## C64 BASIC scrolling chessboards: horizontal scroll

I have recently given another go on my experiments on Commodore 64 BASIC programming. I like doing graphics even without…

## A bigger scrolling chessboard with Commodore 64 BASIC

Commodore 64 BASIC can be very fun, even if it lacks commands. In this article I explained my way of creating a…

## Coding a scrolling chessboard with Commodore 64 BASIC

You can achieve nice effects like a scrolling chessboard on the Commodore 64 even with BASIC. The VIC-II is really…

## The Commodore 64 BASIC WAIT statement explained

Commodore BASIC WAIT statement is maybe the most difficult BASIC statement to understand. It’s very difficult to explain for sure,…

## Simple but effective Commodore 64 BASIC coding

Commodore 64 BASIC is known for its lack of commands and instructions. On the start-up screen message, it is said…
Insert math as
$${}$$