(Updated July 26, 2024) Overview When building a simple text game, we want the process to be smooth and elegant. There should be few places to trip up the user or make the play awkward. In this write-up, we look at how we can craft the building blocks of a valuable and user-friendly game. User … Read More “Building a Guessing Game” »
Author: William Jojo
(Updated November 19, 2024) Overview We often have data in a form that is not immediately useful. If we need to do mathematical calculations and all we have is a string, we must first take another step. Here, we explore some of the finer details of how this can be done by examining the algorithm … Read More “Converting Strings” »
Overview Sometimes, we have data in one form that needs to be put into another as code or storage in a database. Many editors, like Sublime Text, have Find/Replace tools for complex data transformations. IntelliJ has a similar facility within its editor (Edit/Find/Replace). This brief tutorial explains some regexes (regular expressions) used to achieve quick … Read More “Data Transformation with Regex” »
(Updated July 22, 2024) Overview The methods of programming CPUs/computers have had a vast history. This document is intended to provide a historical introduction to the complexity of how systems were programmed. The details contained here concern the 6502 and 6510 processors. The 6510 was used in the Commodore 64. This was chosen for its … Read More “Machine Code – Assembly Language” »
CISS-111 Group Project 2 Write a BASIC tokenizer for the Commodore 64 (C64). Read Crafting Interpreters, Chapter 4 sections 4.4 and later for a basic understanding of what you are building. Take as much code as you think you need from that model. You don’t need it all, nor do you need it necessarily as … Read More “Group Project 2 (of 2)” »
(Updated July 14, 2024) String name; int len; name = “Bill”; len = name.length(); System.out.println(name.charAt(0)); System.out.println(name.charAt(1)); System.out.println(name.charAt(2)); System.out.println(name.charAt(3)); System.out.println(“The length of the string is ” + len); String name; int len; name = “Bill”; len = name.length(); System.out.println(name.charAt(0)); System.out.println(name.charAt(1)); System.out.println(name.charAt(2)); System.out.println(name.charAt(3)); System.out.println(“The length of the string is ” + len); String name; int len; name … Read More “Comparative Languages” »
(Updated April 21, 2024) Table of contents Overview Emulation Operation Test Drive VICE Overview The Commodore 64 was notably the best-selling computer in history. It was inexpensive, easy to use, and had a following larger than any other platform from that period. Using the MOS-6510 (a descendant of the VIC-20’s MOS-6502), anyone familiar with the … Read More “Commodore 64” »
(Updated December 18, 2024) Overview Hex dumps have been around for a very long time. Looking at binary is mind-numbing, and looking at decimal numbers is less than ideal. Using hexadecimal to show values is much easier on the eyes. With some experience, you can see the binary tucked inside, as each hex digit represents … Read More “The Hex Dump” »
(Updated April 21, 2024) BASIC kaleid.bas 10 print chr$(147) 20 ca=1024:cp=54272:r=25:co=40 30 poke 53280,0:poke 53281,0 40 forw=3to50:fori=1to12:forj=0to12:k=i+j 50 c=j+j+j/(i+3)+i*w/12 60 k1=ca+i+(co*k):i1=ca+k+(co*i):c1=cp+k1:c2=cp+i1 70 k2=ca+(co-i)+(co*(r-k)):i2=ca+(co-k)+(co*(r-i)):c3=cp+k2:c4=cp+i2 80 k3=ca+(co-i)+(co*k):c5=cp+k3:i3=ca+k+(co*(r-i)):c6=cp+i3 90 k4=ca+(co-k)+(co*i):c7=cp+k4:i4=ca+i+(co*(r-k)):c8=cp+i4 100 poke k1,81:poke c1,c:poke i1,81:poke c2,c 110 poke k2,81:poke c3,c:poke i2,81:poke c4,c 120 poke k3,81:poke c5,c:poke i3,81:poke c6,c 130 poke k4,81:poke c7,c:poke i4,81:poke c8,c 140 nextj,i,w 150 goto … Read More “Commodore 64 Code Examples” »
CISS-111 Group Project 1 (Updated December 8, 2024) Write a disassembler for the Commodore 64 (C64) program in the 6502/6510 assembly language. Learning outcomes Working with a translation table. Working with existing data to build a new representation. Working with data type manipulations. Working with switch expressions. Working with unsigned byte data. Working with unique … Read More “Group Project 1 (of 2)” »