SheepShaver: A Cross-Platform Tool For Retro Enthusiasts

The world of desktop computing has coalesced into what is essentially a duopoly, with Windows machines making up the bulk of the market share and Apple carving out a dedicated minority. This relatively stable state hasn’t always existed, though, as the computing scene even as late as the 90s was awash with all kinds of competing operating systems and various incompatible hardware. Amiga, Unix, OS/2, MacOS, NeXT, BeOS, as well as competing DOSes, were all on the table at various points.

If you’ve still got a box running one of these retro systems, SheepShaver might be able to help expand your software library. It’s not the sort of virtualization that we’re used to in the modern world, with an entire operating system running on a sanctioned-off part of your system. But SheepShaver does allow you to run software written for MacOS 7.5.2 thru 9.0.4 in a different environment. Unix and Linux are both supported, as well as Mac OS X, Windows NT, 2000, and XP, and the enigmatic BeOS. Certain configurations allow applications to run natively without any emulation at all, and there is plenty of hardware support built-in as well.

For anyone running retro hardware from the late 90s or early 00s, this could be just the ticket to get an application running that wasn’t ever supported on one of these machines. As for the name, it’s a play on another piece of software called ShapeShifter which brought a Mac-II emulator to the Amiga. SheepShaver has been around since the late 90s, too, so we’re surprised that we haven’t featured it before since it is such a powerful tool for cross-platform compatibility for computers of this era. Even if all you are hanging on to is an old BeBox.

The X Macro: A Historic Preprocessor Hack

If we told you that a C preprocessor hack dated back to 1968, you’d be within your rights to remind us that C didn’t exist in 1968. However, assemblers with preprocessors did, and where there is a preprocessor, there is an opportunity to do clever things. One of those things is the so-called X macro, which saw a lot of use in DEC System 10 code but probably dates back even earlier. You can still use it today if you like, even though there are, of course, other arguably better ways to get the same result. However, the X macro can be very efficient, and you may well run into it in some code, too.

Background

Preprocessing used to be a staple of programming. The idea is that code is manipulated purely at the text level before it is compiled. These days, languages with a preprocessor usually handle it as part of the compiler, but you can also use an external preprocessor like m4 for more sophisticated uses.

Modern languages tend to provide other ways to accomplish many of the tasks handled by the preprocessor. For example, if you have a constant you want to set at compile time, you could say:

int X = 32;
y = X;

But then you’ve created a real variable along with the overhead that might entail. A smart compiler might optimize it away for you, but you can be sure by writing:

#define X 32
y = X;

A modern compiler would prefer you to write:

const int X=32;
y = X;

But there are still some common uses for macros, like including header files. You can also make more sophisticated macros with arguments so you don’t incur a function call penalty, although modern usage would be to mark those functions as inline.

The Problem

Which brings us to the X macro. With all great hacks, there is first a problem to solve. Imagine you have a bunch of electronic parts you want to deal with in your code. You don’t want a database, and you don’t want to carry a bunch of strings around, so you define an enumerated type:

Continue reading “The X Macro: A Historic Preprocessor Hack”

FOSDEM 2023: An Open-Source Conference, Literally

Every year, on the first weekend of February, a certain Brussels university campus livens up. There, you will find enthusiasts of open-source software and hardware alike, arriving from different corners of the world to meet up, talk, and listen. The reason they all meet there is the conference called FOSDEM, a long-standing open-source software conference which has been happening in Belgium since 2000. I’d like to tell you about FOSDEM because, when it comes to conferences, FOSDEM is one of a kind.

FOSDEM is organized in alignment with open-source principles, which is to say, it reminds me of an open-source project itself. The conference is volunteer-driven, with a core of staff responsible for crucial tasks – yet, everyone can and is encouraged to contribute. Just like a large open-source effort, it’s supported by university and company contributions, but there’s no admission fees for participants – for a conference, this means you don’t have to buy a ticket to attend. Last but definitely not least, what makes FOSDEM shine is the community that it creates.

FOSDEM’s focus is open software – yet, for hackers of the hardware world, you will find a strong hardware component to participate in, since a great number of FOSDEM visitors are either interested in hardware, or even develop hardware-related things day-to-day. It’s not just that our hardware can’t live without software, and vice-versa – here, you will meet plenty of pure software, a decent amount of pure hardware, and a lot of places where the two worlds are hard to distinguish. All in all, FOSDEM is no doubt part of hacker culture in Europe, and today, I will tell you about my experience of FOSDEM 2023. Continue reading “FOSDEM 2023: An Open-Source Conference, Literally”

Tiny11 Makes Windows 11 Small

If you often spin up a virtual machine just to run Windows, you might be sad that you have to allocate so much space for it. The Tiny11 project provides a Windows 11 installer that strips and compresses a bare minimum system do under 8GB of space. We aren’t sure what the licensing aspects of it all mean, but there are a few things you need to know. You can see a video about the project below.

The installer requires you to activate Windows, so that’s probably a good thing from a legal standpoint. Besides being compressed, the installer, based on Window 11 Pro 22H2, removes sponsored applications and Teams. It does, however, have the component installer and the Microsoft store, so you can add back things you want that aren’t in the default install.

Continue reading “Tiny11 Makes Windows 11 Small”

YouTube As Infinite File Storage

Anyone who was lucky enough to secure a Gmail invite back in early 2004 would have gasped in wonder at the storage on offer, a whole gigabyte! Nearly two decades later there’s more storage to be had for free from Google and its competitors, but it’s still relatively easy to hit the paid tier. Consider this though, how about YouTube as an infinite cloud storage medium?

The proof of concept code from [DvorakDwarf] works by encoding binary files into video files which can then be uploaded to the video sharing service. It’s hardly a new idea as there were clever boxes back in the 16-bit era that would do the same with a VHS video recorder, but it seems that for the moment it does what it says, and turns YouTube into an infinite cloud file store.

The README goes into a bit of detail about how the code tries to avoid the effects of YouTube’s compression algorithm. It eschews RGB colour for black and white pixels, and each displayed pixel in the video is made of a block of the real pixels. The final video comes in at around four times the size of the original file, and looks like noise on the screen. There’s an example video, which we’ve placed below the break.

Whether this is against YouTube’s TOS is probably open for interpretation, but we’re guessing that the video site could spot these uploads with relative ease and apply a stronger compression algorithm which would corrupt them. As an alternate approach, we recommend hiding all your important data in podcast episodes.

Continue reading “YouTube As Infinite File Storage”

SUPERCON 2022: Kuba Tyszko Cracks Encrypted Software

[Kuba Tyszko] like many of us, has been hacking things from a young age. An early attempt at hacking around with grandpa’s tractor might have been swiftly quashed by his father, but likely this was not the last such incident. With a more recent interest in cracking encrypted applications, [Kuba] gives us some insights into some of the tools at your disposal for reading out the encrypted secrets of applications that have something worth hiding.  (Slides here, PDF.)

There may be all sorts of reasons for such applications to have an encrypted portion, and that’s not really the focus. One such application that [Kuba] describes was a pre-trained machine-learning model written in the R scripting language. If you’re not familiar with R, it is commonly used for ‘data science’ type tasks and has a big fan base. It’s worth checking out. Anyway, the application binary took two command line arguments, one was the encrypted blob of the model, and the second was the path to the test data set for model verification.

The first thing [Kuba] suggests is to disable network access, just in case the application wants to ‘dial home.’ We don’t want that. The application was intended for Linux, so the first port of call was to see what libraries it was linked against using the ldd command. This indicated that it was linked against OpenSSL, so that was a likely candidate for encryption support. Next up, running objdump gave some clues as to the various components of the binary. It was determined that it was doing something with 256-bit AES encryption. Now after applying a little experience (or educated guesswork, if you prefer), the likely scenario is that the binary yanks the private key from somewhere within itself reads the encrypted blob file, and passes this over to libssl. Then the plaintext R script is passed off to the R runtime, the model executes against the test data, and results are collated.

[Kuba]’s first attack method was to grab the OpenSSL source code and drop in some strategic printf() function calls into the target functions. Next, using the LD_PRELOAD ‘trick’ the standard system OpenSSL library was substituted with the ‘fake’ version with the trojan printfs. The result of this was the decryption function gleefully sending the plaintext R script direct to the terminal. No need to even locate the private key!

Continue reading “SUPERCON 2022: Kuba Tyszko Cracks Encrypted Software”

Image from the paper with items a-d. a) Schematic of the EC navigation system integrated with a smart contact lens consisting of GPS receiver module, Arduino UNO as a processor, and PB display. b) Photograph of contact lens placed on the 3D printed replica eyeball. c) Camera setup of the navigation system on the dashboard of a car. d) Driving schemes updating the direction signal: (1–4) images show the four cases of operational principles used in the navigation system. Based on 0.2 V applied to the common pin, 0 V (off-state) and 0.7 V (on-state) are applied alternately in 5 WEs, and operating voltages with relative voltages of −0.2 V and 0.5 V are obtained (From the figure reads left to right: the name of 6 pins used in the system, their on–off status, the applied voltage, and relative voltage). Scale bar is 2 mm.

Smart Contact Lenses Tell You Where To Go

Augmented Reality (AR) promises to relieve us from from the boredom of mundane reality and can also help you navigate unfamiliar environments. Current AR tech leaves something to be desired, but researchers at the Korea Electrotechnology Research Institute have brought AR contact lenses closer to actual reality.

The researchers micro-printed FeFe(CN)6 ink onto the contact substrate and thermally reduced it at 120˚C for nine seconds to form Prussian Blue, an electrochromic pigment. By confining the material with the meniscus of the ink, resolution was better than previous techniques to display data on contact lenses. While the ability to reversibly change from clear to blue faded after 200 cycles, the researchers were targeting a disposable type of smart contact lens, so degradation of the display wasn’t considered a deal breaker.

Since voltages applied were constant, it seems this isn’t a true bi-stable display like e-ink where power is only required to change states. The on condition of a section required 0.5 V while off was -0.2 V. The researchers printed a contact with straight, left, and right arrows as well as STOP and GO commands. Connected to a GPS-equipped Arduino Uno, they used it to navigate between ten different checkpoints as a demonstration. Only a 3D printed eyeball was brave enough (or had IRB approval) to wear the contact lens, so watching the state change through a macro lens attached to a smartphone camera had to do.

With more AR devices on the way, maybe it’s time to start embedding household objects with invisible QR codes or cleaning your workshop to get ready for your AR workbench.