Why am I here??
The Eighties. The “Decade of Greed.” The Decade of “Me.” Over the past 30 years, the decade in which I grew up has been maligned at best, and at worst derided as the worst decade of the modern age. While it’s true there were many things from the eighties worthy of criticism, whether you agree or not you can’t argue that many good things… no, fantastic things also emerged from this time. Cell Phones, Compact Discs, the birth of New Wave and Hair Metal (granted, those last two are pretty subjective, but still)…
Granted, computers have been around since 1959 and earlier. Early IBM Behemoths such as the 704 and 7094, The TX-0, the PDP-1. (For more information on these computers and the amazing stories of the growth of the computer industry, pick up Hackers: Heroes of the Computer Revolution by Stephen Levy.) The Apple II was created in 1977, and many would argue that computer is what truly began the computer revolution. However, it wasn’t until the 1980s that the computer revolution truly began. Growth in the tech sector grew by leaps and bounds, as did the technology itself. We experienced the Apple II, the TRS-80, the PET. These beginnings were rudimentary, even crude.
Then we were blessed with the Commodore 64, and later the Amiga. The Apple Macintosh, the Atari ST. Most importantly from a business perspective, we have to include the IBM PC/XT/AT. Graphics improved, Sound went from beeps and boops to proper stereo synthesizers capable or producing commercial quality music. Microsoft Windows became a thing. We went from 8-bit to 32-bit. All of this happened between 1978 and 1990.
Of course, I’m loving on the eighties for more than just the tech. I grew up in the 80s. My first computer was the Commodore VIC-20, in all its 5k RAM, 22-column display glory. I graduated to the Commodore 128 before finally succumbing to the IBM compatible world. Later on I became a programmer professionally, writing software for all of my professional life. I’ve written software for gaming systems, big data environments and shrinkwrap development environments. I’ve truly enjoyed the things I’ve been able to do and accomplish.
But as I’ve grown older I’ve found myself growing nostalgic for the old days, the 8-bit days of the Commodore and Apple IIe. I learned BASIC on my VIC-20. I learned machine language on my 128, but never really became the expert programmer on it. I’ve always wanted to go back to it, learn the intricacies of 6502 (well, 6510/8502) machine language programming… and hacking.
This blog is going to cover my journey in learning the tricks of the old trade. I’m going to be eventually writing a game using the things I’ve learned over the years and the things I’ll learn over the next few months. Everything I learn I’ll write about here, so if you’re as interested in learning 8-bit computing as much as I am, stick around. It’ll be a bumpy ride, but at the end, it’ll be worth it.
Let’s get to work.
Tools Of The Trade
Back in the before time, writing software for your computer wasn’t as easy as it is today. The development environments we have today are, in a word, amazing. Whether you’re developing software with Visual Studio or Eclipse, everything you need is at your fingertips. you can write, debug, even publish your software and even develop it for several different platforms. On the 128, you didn’t have such luxuries. If you wanted to write quality code, you were basically limited to pure machine language. Writing machine language wasn’t easy – In fact, without the right software it was nigh impossible!
Today, things are much, much easier. It’s possible to use modern tools to develop software for the 128. You can use any text editor you wish, compile your code using a modern compiler, then use special software to create a disk image that can be put onto a disk for use on the 128 (or 64). Development time can be cut down to a fraction of the time it would historically have taken.
But I’m not going to develop software in the easy way.
The whole point of this adventure isn’t just to develop software. As I mentioned earlier, I do that for a living. Obviously, nothing I develop is going to be commercially viable. This whole excursion into 8-bit land is for one reason only – to have fun reminiscing! Now, that being said, I do have to make some allowances. Simply put, I no longer have a C-128. Mine disappeared decades ago, and replacement ones on eBay run in the area of $150-$400 dollars (!). While I’d have no problem spending that much, my wife would kill me. So instead, I present you with the first item in our tool box:
This cool tool is the best Commodore 8-bit emulator you can get. With this package you get emulators for the VIC-20, C-64, +4, 16, and the 128. You also have access to all the different I/O devices, such as the 1541/1571/1581 disk drives and the Datassette tape device. As an added bonus, many of the cartridges and add-on devices that were available to you as an owner of these computers is also available. Memory expanders, BASIC language enhancers, even CP/M emulators!
As a developer you’ll really appreciate “Warp Mode.” Activating this mode makes your emulator run at 4-5x the normal speed of the emulator. The upshot of this is most things that take forever to run on a 1mhz machine takes a fraction of the time. You soon learn to truly appreciate this bonus!
Installing WinVice is a breeze. I won’t go into details here, as the WinVice website helps you out with that, and that’s assuming you even need help.
For the most part my time will be spent almost exclusively on the 128 emulator. The 128 had a C-64 emulator built in, so there’s no need to run that emulator as well. Beauty! Be sure to install WinVice before anything else – you’ll need it to continue along with me.
This software is a disk image that loads and runs on the 128. It’s the only way you can run this software – trying to run it on Windows or any other modern O/S will just end up with your being depressed and confused.
The Merlin assembler was one of the best available for the 128, and even the 64. It has all the earmarks of a professional assembler, with features that are common even in today’s assemblers such as labels, full screen editing, debugging, etc. Everything you need to write whatever software you want is right at your fingertips. I’ll explain the use of this assembler in a later post, but for now, click on the link to get a copy of it via my Dropbox.
Also within that link you’ll find several PDF-formatted books that you can use (as will I) to learn more about the innards of the system. The most pertinent of these books are:
- Commodore 128 Assembly Language, by Mark Andrews
- Merlin 128 Manual
- Commodore 128 System Guide
- Commodore 128 Programmer’s Reference Guide
- Commodore 128 Peeks and Pokes
Each of these have their own qualities. The book by Mark Andrews gives an excellent tutorial on the usage of Merlin, as well as a step-by-step guide to Assembly language itself. I’ve read it through, and continue to use it as a reference guide. I suggest you do the same. The other books provide other bits of important information, the key one being the Programmer’s Reference Guide. Be sure to download all of these books, they’ll come in quite handy!
That’s all we need for now. Next blog post, I’ll cover how to get the Merlin assembler up and going, as well as basic usage of the software. We’ll even write our very first assembler program! In the meantime, get your environment set up, do some advance reading, and get ready for some fun.