I found this old C64’s machine code program!

It’s 1:54 am… Yesterday I found an interesting machine code program for the Commodore 64. It is written by me probably at the age of 13, when I was learning C64’s 6510 assembly.

But.. It’s a wonder, that it works at all as such.. In the video there’s the story and I will fix the program so, that I can understand it.. 🙂

“Unlimited objects” in JavaScript

This “unlimited objects” effect is something I saw for the first time at early 90’s in Amiga demos. I’ve implemented this earlier in Monkey X. This time it’s implemented in JavaScript. The idea is, that there’s one moving object, the rest is real time animation…

Video:

Unlimited objects in JavaScript

The source code:

<!DOCTYPE html>
<html lang="fi">
<head>
<link rel="StyleSheet" href="tyylit.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8"/>
<title>Unlimited amount of objects! :-)</title>
</head>
<script>
var canvases = [];
var CTXs = [];
var angle = 0;
var ctx = undefined;
var r = undefined;
var rr = 0;
var counter = 0;

var image = new Image();

window.onload = function() {
    let canvas = document.getElementById("canvas");
    canvas.setAttribute("width",document.documentElement.clientWidth);
    canvas.setAttribute("height",document.documentElement.clientHeight);
    ctx = canvas.getContext("2d");
    let backCanvas = document.createElement("canvas");
    backCanvas.width = canvas.width;
    backCanvas.height = canvas.height;
    for (let i = 0; i < 16; i++) {
        let copy = backCanvas.cloneNode();
        canvases.push(copy);
        let context = copy.getContext("2d");
        CTXs.push(context);
    }

    // Put your own image here
    image.src = "image.png";

}

function unlimited_objects() {
    ctx.clearRect(0,0,canvas.width,canvas.height);
    r = (1 + Math.sin(angle)) * 100 + rr;
    CTXs[counter].drawImage(image, Math.cos(angle) * r + canvas.width / 2, Math.sin(angle) * r + canvas.height / 2 - 100, 64, 64);
    ctx.drawImage(canvases[counter], 0,0);    
    
    angle += Math.PI / 180;
    rr+=0.1;
    counter++;
    if (counter == 16) {
        counter = 0;
    }
    window.requestAnimationFrame(unlimited_objects);

}

image.onload = function() {

    window.requestAnimationFrame(unlimited_objects);
}

</script>
<body>
<canvas id="canvas"></canvas>
</body>
</html>

The line, where CSS style is loaded in not needed.

Feel free to use this code.

THE VIC 20 available in October 2020!

I recently bought C64 Mini for 34,95€ and I’m satisfied with it for that price. But in October 2020 we’ll get a new product: THE VIC 20!

Why should I buy THE VIC 20? Well, now I’ve got only the C64 Mini, THE VIC 20 comes with the usable keyboard. And that’s not all: THE VIC 20 has also C64 mode! I could finally use C64 with C64 alike keyboard again.

The most of the Vic 20 games that come built-in in THE VIC 20 I’m not familiar with. I was hoping for Radar Rat Race, Money Wars and Fire Galaxy, for example. Here’s the complete Vic 20 game list of THE VIC 20:

  • Abductor
  • Andes Attack
  • Arcadia
  • Bewitched
  • Blitzkrieg
  • Brainstorm
  • Catcha Snatcha
  • Connect 4
  • Encounter
  • Frantic
  • Frog Chase
  • Gridrunner
  • Harvester
  • Headbanger’s Heaven
  • Hell Gate
  • Laser Zone
  • Martians
  • Matrix
  • Mega Vault
  • Metagalactic
  • Llamas Battle at the Edge of Time
  • Psychedelia
  • Snake
  • Starquest
  • Subspace Striker
  • Tank Battle
  • Traxx
  • Wacky Waiters
  • Zor

Though, with a USB stick one can load in more Vic 20 games! 🙂 The C64 mode of THE VIC 20 consists mostly the same games as the C64 Mini… 😦

Old School: Rolling and Rotating Text in JavaScript

It’s over midnight, but it is summer… I’ve made this kind of effect in Monkey X earlier. Just tried to make it in JavaScript too. Video:

The source code:

<!DOCTYPE html>
<html lang="fi">
<head>
<link rel="StyleSheet" href="tyylit.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8"/>
<title>Rolling and rotating text</title>
</head>
<script>
var canvas = undefined;
var ctx = undefined;
var angle = -270;
var start = 0;
var i = 0;

const SCROLLTEXT = "                                      Rolling and rotating text in JavaScript with alpha...... Source code at my web site....                                       ";

window.onload = function() {
    canvas = document.getElementById("canvas");
    canvas.setAttribute("width",document.documentElement.clientWidth);
    canvas.setAttribute("height",document.documentElement.clientHeight);

    ctx = canvas.getContext("2d");
    ctx.font = "48px courier";

    rotate_text();
}


function rotate_text() {


    ctx.clearRect(0,0,document.documentElement.clientWidth,document.documentElement.clientHeight);

    i = 0;
    let alpha = 0;

    for (let angle2 = -270 - angle; angle2 < -270 + 360 - angle; angle2+=10) {

        letter = SCROLLTEXT.substring(start + i, start + i + 1);

        ctx.save();
        ctx.translate(Math.cos((angle2) * (Math.PI / 180)) * 250, Math.sin(( angle2) * (Math.PI / 180)) * 250);
        ctx.translate(canvas.width / 2, canvas.height / 2);
        ctx.rotate((angle2) * (Math.PI / 180));
        ctx.translate(-canvas.width / 2, -canvas.height / 2);
        ctx.fillStyle = "#1122FF";

        alpha = 1 + Math.cos((angle2 + 90) * Math.PI / 180);
        ctx.globalAlpha = alpha;
        

        ctx.fillText(letter, canvas.width / 2  , canvas.height / 2);
        ctx.restore();  
        
        i++;

    }


    if (angle % 10 == 0) {
        start+=1;
        angle=0;
    } 
    angle += 0.5;
    

    if (start == SCROLLTEXT.length - 36) {
        start = 0;
    }
    

    window.requestAnimationFrame(rotate_text);

}


</script>
<body>
<canvas id="canvas"></canvas>
</body>
</html>

The line where CSS style is loaded is not needed.

Feel free to use the code.

I bought C64 Mini for 34,95€

This is the first Blue Bit Entertainment post I make to my new free plan web site at WordPress.com now when I don’t have really anymore time for Blue Bit Entertainment, but now the end of June and the whole July is a break for my studies..

My joke is, that everything is small and expensive in Finland. 🙂 So, when I saw this deal for C64 Mini, I just had to buy it… And I must say, that I haven’t regretted it. It’s better thing I expected!

Wow! The games run so smoothly. This brings back a lot of memories. I played Winter Games with my girlfriend and this was the first time she played the game. We tried Ski Jump together among others.

I was surprised, that this little thing (C64 Mini) had so huge impact on me. This is probably the power of nostalgia, but C64 Mini’s Paradroid seems to give me better experience, than the game gave back in the day! 🙂 And I haven’t enjoyed this game with other emulators this much..

Even now when THE C64 Maxi is available, I recommend C64 Mini too, if you find a good deal for it.

I don’t have anymore time for Blue Bit Entertainment…

Since 1.1.2019 I’ve been full time student and it seems, that I don’t have anymore time for Blue Bit Entertainment. This web site will soon be at WordPress.com as free plan web site and then I don’t have anymore access to WordPress plugin so the web site will take another form.

I think I will be posting to this blog time to time still some new stuff, perhaps making some new videos, too.

I have finished my bachelor of science thesis and hopefully I will be bachelor of scienece by the end of this year.

For the sake of nostalgia, some years ago I made the following:

Order the Chaos (BlitzMax version) ending

Also, the online games are not anymore available, when the site will be at WordPress.com as free plan web site… One of the online games is an online version of Order the Chaos.

Let’s see what kind of form this web site will soon take…

At the moment’s I’m mostly interested in retro computing stuff..

I’ve started to code my dream game :-)

I’m still big fan of C64’s Ultima IV & V. Since playing those games, I’ve wanted to make some kind of 2D Ultima game myself and now I’ve started…

Though in my limited spare time, it will take probably quite a long time to finish this game. Not only coding takes time, but also to come up with some nice story for the game…

This is what I’ve done so far (far from perfect…):

Hopefully I will be able to make at least a ”mini version” for the Amiga, too.

Demonstration of speed of C64’s basic

Ah, this takes me way back in time… Just wanted to test the speed of C64’s basic with a simple program of controlling a worm. The video:

It was 1987 when I last coded with Commodore 64. ..and I admit it: I never learned 6502 / 6510 assembly well.. On Amiga I have done 680×0 assembly coding a lot, though…

Let’s see a picture of the source code:

1024 is the starting address of C64’s screen memory and 56320 is the address of joystick port 2.

VERY fun way to play C64’s Pitstop II

It was, when I was about 10 – 11 years old, when I invented this kind of style to beat the computer player on Commodore 64’s Pitstop II. Watch the video:

The computer player is stuck behind me and AI computer player and eventually the computer player’s tires will blow up. After that, it’s easy to win the race. 🙂

This might be very fun with two human players. 🙂

For Relaxation: THE C64 Joystick with Manic Miner 64DX

Commodore 64 gets still new games or remakes of the old ones. In the end of the year 2019 was released Manic Miner 64DX. I tried my new retro joystick with it. The video below may give a picture can it be used for playing this kind of game:

Manic Miner 64DX for the Commodore 64

If you want to download this game, here’s the link: https://csdb.dk/release/?id=185586

Playing old retro games helps me to cut loose from my hard studies. This is perhaps because playing retro games today is not so serious as it was back in the day when the games were new.

Some pictures of the joystick:

Retro games also take me back in time. As a programmer I also think at the same time while playing the how the games might be programmed.