Archive for the ‘Programming’ Category

So this is the end. The Retrochallenge is over and I couldn’t meet the deadline with a complete working game as I planned and promised.

Although I couldn’t finish the game, I have a very good foundation ready, and if I had about six hours more, I would finish it. That’s too bad to get so close and not be able to complete the challenge, but I am the only to be blamed about it. But I won’t do it, because I will continue to make the game until it is done – maybe I could do it for the Winter Challenge!

In the small video below you can see the game was getting there, and I was able to manage to use Player/Missile techniques with the goalie, player and the ball. Although the ball is the only animated on the video, the plan is to make the goalie to jump to try to catch the ball.

The joystick directions will set the direction the ball will be kicked towards the goal, and the gauge on the bottom right side indicates the precision of you kick – Closer to the centre you click the button, more precise will be the kick.

One of the problems I had to develop the game was that I spent too much time with the math to make the ball go towards the selected point. Although the formula was simple, it took me a while to figure out that the P/M coordinates are different than the ones on the playfield. It was explained on several different places but it slipped from my mind when I was coding that part.

During the next week I will also try to capture and make the source code available here. Stay tuned!


I’ve learned few weeks ago about the Retrochallenge that happens every winter and summer, which is , according to its website,  a loosely disorganized gathering of RetroComputing enthusiasts who collectively do stuff with old computers for a month. The challenge will be held from July 1st to 31st.

Excited about it, and with tons of interesting stuff to do but very little will power, I decided to enter this year as a way to motivate myself to do something new retro-wise.

I know this is a Commodore 64 blog, but I am a big fan of all 8-bit machines I can put my hands on, so for this challenge I’ve decided to do something with my latest acquisition: an Atari 600XL! To keep the Commodore lovers under control, I’m calling this challenge the Blasphemy Edition, since I am going to use a less sacred machine. Don’t worry Atari lovers, I’m saying that only to please the Commodore lovers. Don’t worry Commodore lovers, I’m saying that only to please the Atari lovers. Don’t worry….(repeat until you get tired).

Here is my challenge proposal:

– Create a game in BASIC that uses graphics and the player/missile resources. The game will be simple but it has to use those techniques – theme is still TBD (it will be defined before July 1st)
– All the work will be done in the actual Atari 600xl with a cassette tape as storage device. I won’t be using any modern resource like emulators, SD2PC devices, etc.
– I will be blogging the experience in at least a weekly update here under the title “Retrochallenge 2014 – Blasphemy Edition”
– The final result will be made available for download at my new website as soon as I can send the program to my PC (I don’t have the means to do it right now)

If you want to follow me during this journey, subscribe to the blog or follow me on twitter!


Retrochallenge 2014 website:


CBM prg Studio v3.0.0 has been released. The main new feature in this version is support for the 65816 processor, both in the assembler and debugger. This was a large piece of work which is why there has been a much longer wait than usual. Other new features include:

  • Some support for the VICE debugger (transfer of labels and breakpoints),
  • Bitmap import/export for character editor,
  • Binary file import to Assembly source,
  • Line and rectangle drawing tools for the screen designer,
  • TASM support added to Source Converter tool.
  • Also there’s a ton of bug fixes from v2.9.0, see CBM prg Studio website for details.



This is not little Paulo

You are already weeping and grinding your teeth only reading this title, I know. Maybe you think that a guy talking about Commodore 64 programming couldn’t say anything different from that, or even you are laughing at my stupidity because BASIC with its line numbers and goto’s is often seen as ugly and disorganized, grows without control and it is a nightmare to maintain.

But my point comes from my experience as a  13 years old boy who doesn’t know better and were amazed about that little ZX-81 clone with 2 Kbytes of memory. When you are 13 you don’t plan, you are usually very disorganized and when you want something you want it right way – the results have to be there as soon as you finish typing the commands.

So let’s take a look at two different scenarios:

Modern Languages

“It is 2013 and little Paulo decided to make a simple game on his Windows 888 machine so he gets started altavistaing for how to do it – remember he’s young and foul!. After typing “How to Make a game” on AltaVista using Netscape, he gets back 5,430,000,000 different answers. He doesn’t even know how to pronounce that number so he closes the window, turn off the computer and go back to play with his brand new Falcon.

Few days later, after his Falcon had lost all his fingers during a zipline operation, Paulo decides to go back and make a computer game. Few days before at school, his friend gave him few tips and a step-by-step “how to” about where to start so he doesn’t need to rely on Altavista or Lycos anymore. His friend told him to make a game using HTML5/CSS/JavaScript or Unity 3D with C# scripts, pretty safe choices, he said!

So he decides to use HTML5, following his friend’s notes. He opens Notepad and start typing the HTML code that according to his friend, doesn’t do anything other than display a page where your game will be placed. After he types everything, he saves it and open another text file to type the Javascript code. After a while, he also finishes it. His friend said that he needs some images to represent the player and the enemies, and that has to be created by himself using Paint or he can grab some from the Internet BBS. He chooses the latter of course. He grabs the images, rename them accordingly to his friends indications and …. and what? Oh yes, to run the game, he has to open the browser and then the html file he created minutes (hours) ago. The game loads, but nothing happens so he decide to open the html file to see what is wrong – oh wait, the html file has nothing useful, it must be the JS file! He closes the html file, opens the JS and start proof-read it. He finds some typos and fix them, saves the file, opens the browser and now the game does something, but the images are all in the wrong size, or cropped. He goes back to the Internet BBS and finds new images, downloads them and changes the names. Now he knows he has to adjust/scale the images, so he realizes he couldn’t avoid Paint anyways. After the images are fixed, he repeats the whole cycle until he gets some sort of game done.

All happy he saves the game on a pen drive, goes to his friend house to show him. When he opens the game, everything is messed up and doesn’t work properly. His friend then says: “oh! You wrote it and tested only on Netscape, but I’m using Chrome! You know, you have to get it working on Opera, Firefox, Internet Explorer and Safari as well!”. Little Paulo stares at his friend for few seconds, than he turns back and leave without saying a word. At home, he takes his fingertips Falcon and start playing with it again.” (more…)

In my journey to learn everything about the Commodore 64 I did some experiments in BASIC and I managed to finish a complete game. Although I believe the final product was pretty good, every article I read in magazines like Compute Gazette keep saying that you can get most of the machine if you code in its native language: 6502 machine language. This kind of bothered me a bit because I never had a chance to program using any assembler. I did a quick training on Z80 back in 1984 but I never use it – and to be honest, it didn’t click on me – I was way more comfortable using BASIC.

BASIC has a lot of problems, like the lack of functions and better structured statements, but it is easy to learn and you can see the immediate results of what you’re coding, which is probably the reason of its huge success. I know I can still do amazing things using plain BASIC!

To answer the title question, I say a big “yes”! Learning to code for the 6502 will make you a better developer, even if you don’t actually have a reason or use for it right now. Here are my reasons: (more…)

This article was first published on The Transactor volume 4 issue 02 (January 1983) by Paul Higginbottom. I recently found him and asked for permission to reproduce this article here, and he was very kind to give it. After reading tons of texts about SID, his article was the first that actually I could understand, so I really wanted to share here.

Paul Higginbottom can be found on his blog ( and,  since 2005 he has been creating websites and other media, and providing professional technology consulting to individuals, businesses and other organizations across the world through his company Reora, Inc

Making Friends with SID

Paul Higginbottom

The synthesizer chip in your Commodore-64 computer is affectionately known as SID. SID is in fact an acronym for Sound Interface Device. I doubt that many people realise just how powerful this chip is, but I intend to unleash some of its power for you. If you read some of the documentation for the Commodore-64 about its sound capabilities and are new to synthesizer jargon (as I was), you probably thought to yourself, “I’m never going to figure that out!” Well, l am the sort of person who gets more determined to figure something out when it seems harder than ever to do so. So, step by step, I, like any beginner, set about learning how to control the SID’s sound capability. (more…)

Mission:Moon gameplay video

Posted: September 2, 2013 in 80's, Commodore 64, Programming

So I finally did it! Mission:Moon is complete!

Soon enough I will make it available for download, but meanwhile I took my Betamax camera and shot this short video. Enjoy!