Simone's Blog (no JS mode) |
(spoiler: Not a real virus. Just vibes.)
I've always been fascinated by that one sequence in the Hackers movie from 1995, the one with the exaggerated screen light illuminating their faces, and the tap-tap sound on the tiny keyboard of a PowerBook Duo. A few months ago, after an afternoon of researching online, I purchased the model used in that scene (specifically, the PowerBook Duo 280c), and I was ready to explore the age of 90s Apple subnotebooks.
Let me start by saying that I only wish the screen were as bright as they made it look in the movie. I'm sure I gained a few degrees of myopia over the past few weeks, and that keyboard definitely left a lot to be desired (even with a mint-condition replacement bought online). But the trackball was such a nice touch, and I quickly fell in love with it!
As a rite of initiation for any retro tech I own, the first thing I planned to do was transfer files from a modern computer to the PowerBook. I initially thought of using my old Floppy EMU, which I had used to experiment with the Macintosh Plus, but the excitement quickly faded after I realized it was not compatible with the PowerBook. So I placed an order for a BlueSCSI from One Geek Army instead.
While waiting for the BlueSCSI to arrive, I began getting acquainted with Basilisk II and Classic Mac emulation software. I wanted to get as close as possible to the configuration used on the laptop: 12 MB of RAM, a 500 MB hard drive, running Mac OS 8.1.
And that's because I was bored and wanted to try a little something...
I remember stumbling upon this video by Action Retro once, where he demonstrated how to create a Visual Basic Cookie Clicker–like game for his Macintosh Quadra 700, and I thought: this REALbasic looks REALly interesting. To my surprise, the company who developed it is still alive and has rebranded as Xojo.
I remember learning Visual Basic back in high school, thanks to the sweet obsolete Italian school system. But I have to admit, it gave me some core concepts of event-driven programming and rapid app development. So, as my next project, I set out to recreate Joey's Virus Launch Panel (the one with the two smiley PacMan pirates). This can be seen in the scene where the group is fighting against The Plague in Grand Central Station. Here is a clip from the movie. It's even displayed on the cover of the new 4K Blu-ray re-release. Imagine how cool it would have been to run the app on the PowerBook Duo!
For this project, I opted for REALbasic 3.2. There are still some useful guides available online. I mainly studied from the official developer's guide and from an O'Reilly book (although some things were not applicable to my specific version). I started by creating the first hello worlds and familiarizing myself with all the UI elements in the toolset. I then proceeded to sketch out the main Panel seen in the movie. The panel is primarily composed of push buttons, sprites/canvases for rendering the animations, placards, and tiny buttons.
The smiley pirate images were hand-cut by me, frame by frame, directly from the movie (the assets are all hosted on my GitHub repo). I spent a whole day trying to figure out how to animate those damn sprites. The three bottom components in the Panel: the red circle, Launch SPF, and Smile Pirates FPS — are used respectively to indicate whether the host has successfully connected to a server (I'll explain this later), to show the timer before initiating the request to that server, and to manage the redraw timer for the PacMan animation on the right-hand side. Most of the animations are GIFs images except for the clock icon one which is a JPG. I was really happy to see that these modern formats were supported out of the box and no conversion was needed.
The thing that grabbed my attention among all the components in the toolset was the Socket Control. After dragging it into the main window, I quickly realized this tool allowed me to communicate via TCP/IP with a remote host. I thought, WOW, I can make the app talk to the outside!
Simply dragging and dropping this item into the main window allowed me to instantly use the tool. All I needed to configure were four events: Connected, DataAvailable, Error, and SendComplete. While in the main property window, I could specify the host and the port. I initially made a small proof of concept of an app running in Basilisk II, which then connected to a Ruby TCP server hosted on my Macbook Pro, and it was working like a charm. This was very neat. The next step was loading the PoC onto the BlueSCSI and connecting the PowerBook Duo to the internet.
After spending a few hours configuring the WiFi DaynaPORT on the PowerBook, I finally got it working by following the official guide. The BlueSCSI is one crazy piece of hardware. I really could not believe I got this thirty years old laptop online. The proof of concept also worked perfectly on the PowerBook and was able to communicate with my TCP server.
My brain was flooded with ideas from the excitement. I had to give this little UI experiment some functionality and purpose. As I reminded myself that I had never looked into creating bots for Bluesky using the ATProto, I thought this could be a good chance to learn that as well. After replanning the whole project, I decided to make a small Ruby server that would post tweets to Bluesky whenever people initiated the Virus Launch functionality from the REALbasic app. What initially started as a simple UI experiment was turning into a fully fledged Classic Mac OS application.
At the beginning, I wanted to keep things simple by letting the REALbasic app communicate directly with my web app using HTTP on port 80 (since HTTPS would've been a nightmare to use for obvious reasons). Unfortunately, this turned out to be more complicated than I thought. For some reason, the REALbasic app was simply not getting the response back from my server hosted on Fly.io, even after establishing a sucessfull connection. The only way this worked was by using a proxy server in the middle that would communicate using raw TCP/IP on port 8080.
The TCP proxy simply receives a message from the PowerBook and sends a POST request to the main Sinatra app. The web app afterward is in charge of posting the tweet to Bluesky. If the tweet is successfully posted, the string HACK THE PLANET!
is finally returned all the way to the original client.
The tweets posted contain screengrabs taken from the original movie. The images show the actors talking on the phone, and by geolocating the client's IP address, I post a tweet saying that someone has hacked the planet from that specific country of origin of the request.
After wrapping everything up, it was finally time to build the executable and run it on the PowerBook. REALbasic is smart enough to allow building the whole project and bundling it into a single executable. You can even specify if you want to make it compatible with other types of architecture, such as PowerPC or even Windows executables. Anyway, I loaded the new app onto the BlueSCSI, ran it, and... it’s out of memory! Apparently, my assets were a bit too large for the 12 MB of RAM available. Understandable, so I spent some time cleaning up the code and reducing the size of the assets so they could fit into the tiny RAM of this laptop. Indicating how much RAM my app needed was certainly an interesting experience.
Once I repeated the steps, the app opened up fine, but the smiley PacMan animations were too flickery and flashy. The reason was that I used simple Canvas components to draw these animations, updating the backdrop image for every frame. Unfortunately, I realized this was a very inefficient solution. Upon refactoring everything using the SpriteSurface control, the animations ran much smoother and were less flashy during rendering.
The app was finally working great, so I decided to add a final touch to let the user know the tweet was successfully posted to Bluesky. You can check this out in the video!
The source code and all my assets are hosted on my retrocomputing GitHub repository. The code is definitely a bit messy and could use some polishing, but I’m more than happy with how the app turned out, so it's there if you want to have a look.
Both the TCP proxy (proxy.hacktheplanet.simone.computer
) and the Sinatra app, hacktheplanet.simone.computer, are currently online for you to play with (at least until I get too much spam; in that case, I’ll have to take them down). So feel free to download the Joey's Virus Launch Panel from the Archive.sit
on GitHub and run the app yourself with that proxy server.
This project is not actually a virus, so it’s completely safe to run the app!
This whole time, I've been wondering if the UI in the movie is actually a custom application developed exclusively for the film, especially since it clearly looks like a Classic Mac OS application running on what appears to be a modded Compaq LTE Lite. My best bet is that it was most likely just rendered with animation software from that era, but if you know anything about it, let me know!