Archive for the ‘my c64 games’ Category

My commodore games

Friday, March 20th, 2020

PREAMBLE

As a child I was fascinated by computers and the whole world of information technology. The first computer I had on hand was a VIC20 and then I switched to the Commodore 64 and it was love at first sight!
Initially I saw it only as a computer to play, then I learned BASIC and I wrote some small programs.
Then the turning point came, my brother gave me a clone of the Action Replay III called Niky Crtridge II.
It was first time I saw an assembler listing and a machine code. Obviously all those strange names like LDA, STA, ASL, JMP, BIT, PHA etc, remained a mystery for long time.
The years passed and I dedicated myself to something else. I always cultivated the idea of picking up my old c64 and at age of 35 I searched on the internet how to start assembler programming. I found a lot of resourses.
For those wishing to start programming in assembler from scratch, I recommend the following resources: a milestone is Jim Butterfield’s book Machine Language for the Commodore 64 and Other Computers, another fundamental book is Mapping The Commodore 64 by Sheldon Leemon, than Richard Bayliss’s tutorial assemble-it, and finally the site www.codebase64.org.
Concerning the enviroment programming, I suggest writing the program on a text editor, then compile the source with a cross-compiler and finally run the program on a c64 emulator.
There are so many choices, personally I use as editor Notepad ++, as compiler ACME and as emulator VICE. For those who want to program in C with the c64, I suggest cc65.
The programs that you will find below, have nothing pretentious, I can say that in writing them I learned a lot of things about c64 and beyond.
I don’t have much time to devote to my passion because in real life I deal with anything, I don’t consider myself a programmer but I can say that I enjoy programming a lot so I decided to create this website to share this passion with others.

Summary of games:

From here you can play directly in a C64 javascript emulator

Othello Revenge

(released on 29/6/2020)

Here we are with a new fine production/cooperation between me and Richard Bayliss (TND New dimension). The prologue: some time ago I received as gift an Atari 2600, after trying some games, I discovered Othello, a logic board game. I played some games and I found Othello a game addictive and enough fun, so I decided to create a version for our beloved commodore 64. After a search on CSDB and GB64.com, I have found only few releases mainly written in basic with poor graphics. Before to become crazy in the effort to write an algoritm that make the game addictive, I search on internet if there was a C source available. In a few minutes I have found it and and after some little modifications I was be able to compile the source with cc65. At this point the main obstacle was passed and remains “only” to add a decent graphic with a nice music. After some days of work I sand a draft of the game to Richard that made the front-end and the music. Bellow the link for download the game. The game is also available for download at CSDB and TND New dimension website.

Apart Richard I must credits my girfriend Catia that has contibuited to the graphic design and drow the sketch of othello picture loader. The sketch was than sent to a friend of Catia, Patrizia Castellani that drow the loader image

4 A WIN

(6th SEPTEMBER 2019)

This is perhaps the game that gave me the most satisfaction in making it.
Also in this case I wrote the program using the cc65 suite. I took the game code from the following site.
The algorithm for calculating the moves allowed to calculate the basic moves, after some modifications, I was able to make the computer more difficult to beat.
The graphic is thanks to my friend Richard Bayliss who also helped me to adjust some assembler routine that manage the graphics.
As usual, I put in my games Richard Byaliss’s music, chosen from the many available on the HVSC website. This time I have to say that the SID tune is really beautiful and goes very well with the game. Thanks Richard! ๐Ÿ™‚
The game has been released not only on my site, but also on the TND New Dimension website and can also be downloaded from the CSBD database.
Have fun!

MineSweeper 2019

(14th AUGUST 2019)

Here I am with another logic game.
In this case it is a well-known game that has known its success thanks to the fact that it has been included in every single copy of windows since 1992.
As you may have guessed, it is Minesweeper.
The game was invented by Robert Donner and Curt Johnson in 1989.
In reality the first version of game with “hidden mines” dates back to 1973 with the name Cube and then in 1983 with the name Mines-out.
The aim of the game is to clean up a minefield without exploding mines.
Several versions were also written for the c64 platform.
What I propose, however, has some prerogatives not present in other versions.
The original source code was written for Windows by Servadei Giacomo and published in the following link.
I have simply adapted the code to be compiled with the suit cc65.
Once I verified that the game worked correctly I improved the graphics, implemented the use of joyoistick and inserted an audio track written by my friend Richard Bayliss.
It is also possible to download the game from its TND New Dimension website in the section dedicated to contributors.
Unlike other versions of minesweeper relesed for c64, this allows the creation of random minefields, a seemingly trivial feature that creates some problems in the programming phase as it requires an algorithm capable of freeing all the boxes in which there are no mine or numbers automatically.
About this problem, if you choose to create a custom large field mine for example 24×18, I suggest you enter a relatively high number of mines for example 60 or above becouse a too low number would generate an array of integers too large for the memory of the c64 and the program would crash.
However, this problem is not present if the beginner or expert mode is chosen.
Another feature of the game that is also reported in the instructions is that the same minefield is entered each time the same player’s name is entered, so you can try to solve a previously lost game.
I hope you enjoy it! ๐Ÿ™‚

Hanoy Tower

(12th JULY 2019)

I’ve always liked logic games, even if I’m not so good to solving them ๐Ÿ™‚
Who doesn’t know the game of the Towers of Hanoi? It is a game that dates back to 1883 invented by a French mathematician named ร‰douard Lucas.
On the net you will find innumerable resources that explain the rules and various related legends such as the one in which it is said that in a Hindu temple some monks are constantly engaged in moving 64 gold discs on three diamond columns and when they complete the work, the world will end.
However, the explanations are also shown as scrolling text at the bottom of the screen.
The minimum number of moves needed to complete the game is given by the formula , where n is the number of disks.
The solution to the game can be obtained by using a well-known recursive algorithm that I invite everyone to study.
The novelty of my version is that apart from the graphics and sound made by my friend Richard Bayliss, I added the possibility to solve the game using the aforementioned algorithm.
I also provided the source code for those interested in modifying the game or simply taking some examples to program with the cc65 suite.
Have fun!

C64Weather Station

Thanks to the I2C protocol, many modern devices, like RTC, temperature sensors, FM receiver, microcontroller, etc, can be connected via the user port to the commodore 64.
On the disk you will find various programs:

  • RTCTool which serves to set the date and time in a DS3231 or DS1307 module.
  • C64WeatherStation that reads temperature, pressure and humidity from a BME280 module.
  • WriteEprom which writes on the memory 24C32 present in the RTC module the game Pong which occupies the entire space of 4k bytes.
  • ReadEprom which instead reads from the eprom memory and then executes the game.

Note: in order to use the eprom in the DS3231 module, it is necessary to ground the three address pins A0,A1,A2, using the appropriate pads present in the PCB

Crazy Letters

This is my first game write in assembler. The idea started after having seen another game that evaluate the speed of response to a visual signal. Although the graphics is really horrendous the game in my opinion is fun and tests own typist skills, try it and have fun!

The aim of this game is to press a letter on your keyboard, indicated on the screen. Avoid the letter from reaching the far right, otherwise the game is up. After each level gets completed, the game will get pretty much faster. Therefore having you to react even faster. Can you take the pressure of getting to a really high level, or will this game bee too tough for you?

Pong 1.0

Play against a friend or against the computer. Deflect the incoming ball with your bat, and let it bounce into your opponent’s goal. If it does, you will score a point. It is possible to play with the joystick or paddles. As in other pong the ball’s angle of rebound changes depending on where it is strike the bat, in addition the speed of the ball gradually increases until one of two players miss it.

Legend:

  • F1 = Bat lenght
  • F3 = Joystick or Paddle
  • F5 = 1 or 2 players
  • 1-5 = starting speed
  • SPACE = start game

Lunar Lander

This game is a C64 conversion of the original program from the first book of KIM-1. The idea of this game is to simply use the keys 0-9 to control the velocity of the lander. In order to win this game, you must land safely on to the moon. Fail to successfully land on to the moon, the game is over. Can you complete your landing and survive or will you crash and burn?

Suggestions for the game: in order not to crash on the lunar ground it is necessary to have a speed between 0 and 4. Furthermore the fuel is limited, it is necessary not to consume all the fuel before the landing, otherwise the lander is flown in free fall.

Legend:

  • ALT = Altitude
  • VEL = speed
  • GAS = fuel
  • POW = engine power
  • T = elapsed time

Bagels 1.0

Based on one of Jim Butterfield’s ML games for the KIM-1. The computer randomly chooses 4 letters, between A – F. You must type in the four letters in order to guess the hidden code. The computer will show a number in two columns on the right hand side. The right letter, but in the wrong place, or a number of letters that are in the correct place. These are marked as EXA and MUTE. After your complete the first code. You can work on the next one.

Reverse

The screen will show a combination of 11 letters such as ‘C H D G B A J E I F K’. Move the cursor left/right using a joystick in port 2. You must try and get all of the letters into alphabetical order in less than 11 moves. Relax and take your time. Try to make the least number of moves to complete this game.

Breakaway

This is a puzzle game, in which you move counters A, B, C around the grid, in order to prevent counter D from getting to the most bottom point. Full instructions are revealed on the scroll text.

SID Scope

This is a small demo, use the spacebar to cycle through the different tunes. Some tunes are pretty much familiar to some of you. Enjoy the music.

24bit Frequency Counter

A small tech utility which uses the CIA2 TIMER A and B.
This utility allows you to transform the commodore 64 into a frequency meter, the only limitation is that it measures frequencies up to 1 MHz. In practice it starts to be inaccurate if you approach 1 MHz.
Read on screen instructions on how to use this utility.

Notepad64

Time for a little something different or quite useful. This utility allows you to load in or create new sequential files and edit those. There are a series of various options, to choose from, such as font type, etc. Also included in the digital disk are a few example files.

Megaclock

How would you like to wake up in the morning to you C64, and a bit of oldschool music like you would have back in the very late 1980’s early 1990’s. Megaclock 64 does exactly that. Set the hours, minutes and seconds for the actual time, and also for when to set the alarm off, the press the SPACE BAR to activate the clock.

Game of Life 2017

Game of life is a game invented by an English mathematician named John Horton Conway in 1970.
On the internet you will find many resources in this regard. I will just give a brief explanation of what the game consists of.
The Game of Life is not a game in the conventional sense. There are no players, and no winning or losing. Once the pieces are placed in the starting position, the rules determine everything that happens later.
The four rules of the game are:

  1. Any live cell with fewer than two live dies (referred to as underpopulation or exposure).
  2. Any live cell with more than three live dies (referred to as overpopulation or overcrowding).
  3. Any live cell with two or three live neighbors lives, unchanged, to the next generation.
  4. Any dead cell with exactly three live neighbors will come to life.

The program allows you to change and save the game status at any time.
On the disk there are some demonstration patern.
There is also a counter showing “how old” is the poulation life.

Thinker 2018

This is a puzzle game in which you have to deal with number keys between 1 to 6. On the screen there are 9 white letters that you have to change to purple. When you press a key, three letters on the table invert your background colors, letter white change to purple and letters purple became white. You have to find the correct sequence of keys (1-6) in order to make all boxes purple and win the game. Try to win with less of 15 moves and have fun!

Play games in Javascript C64 Emulator

To simulate the joystick use the ARROW keys and the CONTROL key on the right



Downloading…

Thanks to Thomas Hochgoetz who make available this c64 javascript emulator

The aforementioned programs that I have made available for download, can also be downloaded from the TND New Dimension site by Richard Bayliss, from the contributions section. Many of the music I included in the games was produced by Richard, whom I obviously thank!