• 6502 Scripting: a Tcl Shell on the Commodore 64

    The C64’s user interface is Commodore BASIC v2, which presents itself without delay as a REPL the instant the machine is powered on. BASIC lives in 8 KB of ROM of 6502 machine code. Michael Steil has worked on collecting versions of the BASIC source for various 8-bit platforms, putting them into a single source tree, and adding comments. There’s also EhBASIC by Lee Davidson, a popular BASIC interpreter used by a number of 6502-based homebrew computers. EhBASIC fits into 10 KB.

    There were other interpreted languages available for the C64, e.g. LISP dialects such as LISP 64 (page in German). From a glance at the screenshots, LISP 64 is delivered as a 52-block large PRG file, so about 13 KB in size.

    With scripting on resource-depraved microcontrollers becoming more popular, I was wondering if there are also new options for 6502-based systems. Alas, languages like MicroPython still require at least hundreds of KB of memory for the interpreter. Then, I came across an excellent blog post by Serge Zaitsev who was evidently on a similar mission in 2016.

  • Sentinel-6 Launch

    This past weekend, I watched the Sentinel-6 launch, the fourth launch I went to see. The first launch I attended was the ill-fated Orb-3 mission (see the resulting fireball in my post on that mission) launching on an Antares rocket from the MARS facility in Virginia. The second one was InSight launching on an Atlas V from Vandenberg Air Force Base. No post and no pictures for this launch—the marine layer over Vandenberg was so dense that not even the light from the thrusting engines could be seen through the clouds. Only the loud rumble of the engines was audible, slowly fading indicating the rocket was speeding away. Launch number 3 was OA-9E (see post here). Like Orb-3, OA-9E launched from MARS on an Antares rocket.

    This brings us to Sentinel-6. You can read more about the Sentinel-6 mission on my wife’s blog who worked on the satellite’s radiometer, the AMR-C instrument. Sentinel-6 also launched from Vandenberg, using a Falcon 9 rocket. The launch was scheduled for 9:17am local time, and while I expected the marine layer still hanging over the base in the morning, the weather turned out to be a lot more favorable with blue, clear skies.

  • Going Full-Frame

    With the Nikon Z 6II hitting the shelves this week, I finally took the plunge to switch to a full-frame camera. Previously, my workhorses had been two cameras with smaller APS-C sensors: a Nikon D5100 that I got 7 years ago (and that I used to capture the Z 6II in the image below) and a Fuji X100T that I like to use for travel, added 6 years ago. Some of the pictures I took over the years with those cameras are on my Flickr.

  • Blog Design Overhaul

    After almost 6 years, the blog is getting a small design refresher. In addition, a few things are changing under the hood. When I started the blog in 2014, I opted for Octopress as the blogging engine. The theme I used was a tweaked version of Whitespace. I’ve now moved to Jekyll, and the new theme is based on Centrarium. Since Octopress uses Jekyll under the hood, the move was relatively painless. Below are a before and an after view (as of this writing).

  • Adversarial Machine Learning and Robust Classification

    This past Saturday, I talked about attacks on ML within cybersecurity at the RAISA3 Workshop. The slides for my talk, “Of Search Lights and Blind Spots: Machine Learning in Cybersecurity,” are available on Slideshare (see also below). I want to reiterate and expatiate on the conclusions of the talk (i.e. the five points of slide 29) using this less ephemeral medium.

  • Assembling my Commodore 64

    For this latest part of my series of posts on building a Commodore 64, it is time to assemble all the pieces. The Pixelwizard C64C case has since arrived in the mail, and now all parts (namely the Ultimate 64 board and an original keyboard) need to go into it. To that end, I ordered a mounting kit as well, which contains standoffs for the keyboard and a support for the U64 board. And that’s where the problems start…

  • Finishing the 3D-Printed Paddle Controller

    Now that I’ve received the Ultimate 64 board, it’s time to finish the 3D-printed paddle controller for my to-be-built Commodore 64. And to try it out in action, I’ve ordered a copy of Commodore’s “Clowns” game on a cartridge. The case for the machine is still in the mail, so the setup is quite jury-rigged with the circuit board and keyboard sitting on a toolbox as you can see in the picture below. A breadboard is wired up to the first control port with a potentiometer and a button attached to it.

  • Ultimate 64

    Finally, the next item for my quest to build a Commodore 64 has arrived. After several weeks of travelling the world in a box, the Ultimate 64 circuit board arrived at my house in L.A. this week. You can see it (with the 3D-printed joystick from my last post) in all its glory in the picture below. With the keyboard and the circuit board checked off the list, now only the case is missing, which should arrive shortly as well.

  • 3D-Printing a Joystick and a Paddle Controller (While Waiting on my C64 Parts)

    The circuit board and the case for my project to build a Commodore 64 are still in the mail, and while I am waiting for those to arrive in Los Angeles, I started building input devices: a joystick and a paddle controller. Like many other contemporary machines, the C64 uses a DE-9 connector to hook up game controllers. These types of connectors are easy to get as they’re still in use in modern devices, e.g. for RS-232 serial interfaces. A paddle consists of a button and a potentiometer, also easy to obtain. And a joystick is, well, the actual stick assembly (with 4 switches, one for each direction) and a button. Those parts are still made for arcade machines. Lastly, both the paddle and the joystick need to fit into their own enclosures. For those I’ve opted for 3D printing. The result for the joystick is below. It’s a bit bulky but it works, probably—we’ll know for sure once the C64 parts are here.

  • Building a Commodore 64

    The C64 has a special place in my heart. My uncle bought one of the initial breadbin versions when it came out in the 80’s, and my cousins taught me programming in BASIC on it. I was hooked on computing. Later, I got my first computer at home as well, a C64C—or C64-II as it was marketed in Germany.

    Nearly four decades later, the C64 community is still going strong. There is even new commercial software released for the platform to this day. There are a number of ways to experience the C64 today. The quickest route is by emulation, e.g. using the VICE emulator. I’ve used VICE and the ACME cross-assembler to write a small game a few years ago (ACME is the same assembler used for my breadboard 6502 project). Cloanto sells C64 Forever, which wraps VICE in a convenient launcher and comes with a bunch of software to try out.

    Another option is to buy THEC64, which also emulates the looks of the C64. Under the hood, it uses an ARM CPU to run an emulator. There’s also THEC64 Mini in a smaller form factor and without a working keyboard (I own a Mini, mainly to play California Games). Outside of emulation, there are FPGA/ASIC-based implementations such as the C64DTV. The MISTer is built around a Cyclone V FPGA that can be configured to implement numerous retro platforms, including the C64.

    You can also still find original C64s on sites like Ebay. Often, some attention is required such as replacing the capacitors on the circuit board or getting a new power supply as the original power supplies have established a reputation of failing while frying the attached system. Another route to an almost-original system (for varying degrees of “original”) is to build one using modern replacement parts, which is the focus of this post. There are three main areas to consider: the circuit board, the case, and the keyboard. Let’s take a look!