The Nintendo Switch CPU Exposed

Ever wonder what’s inside a Nintendo Switch? Well, the chip is an Nvidia Tegra X1. However, if you peel back a layer, there are four ARM CPU cores inside — specifically Cortex A57 cores, which take up about two square millimeters of space on the die. The whole cluster, including some cache memory, takes up just over 13 square millimeters. [ClamChowder] takes us inside the Cortex A57 inside the Nintendo Switch in a recent post.

Interestingly, the X1 also has four A53 cores, which are more power efficient, but according to the post, Nintendo doesn’t use them. The 4 GB of DRAM is LPDDR4 memory with a theoretical bandwidth of 25.6 GB/s.

The post details the out-of-order execution and branch prediction used to improve performance. We can’t help but marvel that in our lifetime, we’ve seen computers go from giant, expensive machines to the point where a game console has 8 CPU cores and advanced things like out-of-order execution. Still, [ClamChowder] makes the point that the Switch’s processor is anemic by today’s standards, and can’t even compare with an outdated desktop CPU.

Want to program the ARM in assembly language? We can help you get started. You can even do it on a breadboard, though the LPC1114 is a pretty far cry from what even the Switch is packing under the hood.

Jenny’s Daily Drivers: RiscOS 5.28

On a mundane day at some point in late 1987, though I didn’t grasp exactly what it would become at the time, I sat in front of the future. My school had a lab full of BBC Micros which I’d spent the previous few years getting to know, but on that day there was a new machine in one corner. It was a brand-new Acorn Archimedes, probably an A300, and it was the first time I had used an operating system with a desktop GUI. The computer was the first consumer application of the ARM processor architecture which has since gone on to conquer the world, and the operating system was called Arthur, which hasn’t. That’s not to say that Arthur is forgotten though, because it was soon renamed as RiscOS, managed to outlive both Acorn and the Archimedes, and still survives as a maintained though admittedly niche operating system to this day. So my Daily Driver this month is the current generation of RiscOS, version 5.28, and the machine I’m running it on is a Raspberry Pi 4. For a computer with an ARM core that’s designed and sold by a company based in Cambridge just like the original Acorn, it’s the most appropriate pairing I can think of.

Probably the Smallest OS In This Series

A beige desktop with no monitor, keyboard and mouse in front. It shows signs of yellowing with age.
The first ARM product, an Acorn Archimedes A310. mikkohoo, CC BY-SA 4.0.

At one point the Raspberry Pi folks even featured the Pi version of RiscOS on their website, but for those missing it there it’s freely downloadable as a disk image from the RiscOS Open site. Having spent most of its life as a closed-source product it’s been opened up over the last decade, and you can grab the source if you’re interested. When it’s normal for an OS download to run into the many gigabytes, it’s a bit of a shock to grab one that’s a shade under 140 megabytes and can be written to a 2 gigabyte SD card. This makes it probably one of the quickest operating system installs I have ever done, with all steps completed in a very short time. Sticking the SD card into the Pi it boots to a desktop in about 32 seconds which is only 5 seconds less than the latest Raspberry Pi OS image, so sadly that compactness doesn’t net you any extra speed. Continue reading “Jenny’s Daily Drivers: RiscOS 5.28”

Emulating X86 On Apple’s AARCH64 X64 Emulator

You might know [Evan Martin] as the developer of retrowin32. It’s a Windows and x86 emulator designed to run on a Mac or on the web. He’s recently been exploring how to run 32-bit x86 binaries on the AArch64 (aka ARM64) architecture.

[Evan] realized that Apple’s ARM-based Macs feature a high-quality x86 emulator, used via the Rosetta binary translation system. It only supports 64-bit x86-64 binaries, also known as x64, and thus he had initially discounted it for running older 32-bit x86 software. However, as it turns out, x64 features a special compatibility mode for running 32-bit code. [Evan] was able to leverage this to run 32-bit Windows executables rather neatly via the high-performance Rosetta emulator.

To run a 32-bit executable on a 64-bit processor in this way, one creates a 64-bit program that is tasked with loading the 32-bit executable. It’s a little fussy, involving some tricks to handle memory management between the 32-bit code and the 64-bit wrapper, and how to interface with the OS, but [Evan] explains deftly how it’s all done.

[Evan] notes that this hack may not work forever, especially if Apple changes or deprecates Rosetta’s remaining x86-64 emulation in the future. Regardless, Apple’s “Game Porting Toolkit” relies on similar techniques used by Wine. If you find yourself dancing across platforms, you might learn some nifty tricks from [Evan]’s example!

Debian Officially Adds RISC-V Support

As time goes on, more and more computer manufacturers are moving towards the ARM architecture and away from the bloated and outdated x86 instruction set. Apple is the most prominent producer to take this step, but plenty others are using ARM for its flexibility and efficiency. The only problem with ARM is that it’s licensed, so if you want to go even further down the open-source path the RISC-V instruction set is the next logical step. Now at least one mainline Linux distribution will officially support this architecture.

While Debian did have some support for RISC-V before this as a Debian port, which was not officially part of Debian. However, the official support will begin with the release of Debian 13, which is currently in the testing phase and hasn’t seen a stable release yet. To that end, the current state of this official version is extremely limited, being described as “almost empty” but with planned support for an initial 90 packages in the coming days. Most users working on a RISC-V platform will most likely to continue to use their Debian ports version.

It might be a little while before the RISC-V version is as full-featured as the ARM or x86 versions of this Linux distribution, but we are happy to see it move in this direction at all. And don’t think that RISC-V is limited to embedded systems or otherwise limited computing platforms, either. We’ve seen full Linux desktops with RISC-V processors since at least 2019.

MicroLisp: Lisp For Microcontrollers Now Has Lisp-Based ARM Assembler

In a way it feels somewhat silly to market a version of Lisp as targeting resource-constrained platforms, considering the systems it ran on back in the 1960s, but as time goes on, what would have given 1970s Big Iron a run for its money is now a sub-$5 microcontroller that you can run uLisp (MicroLisp) on. This particular project now even has an ARM assembler that is written in Lisp whose source code (GitHub) fits on a mere two A4-sized pages.

ULisp currently supports five platforms, being AVR-nano (ATmega328 and similar low-cost AVRs), AVR, ARM, ESP (8266 and 32), as well as RISC-V. The purpose of this assembler is to execute native ARM instructions when running on an ARM board, since uLisp itself runs a Lisp interpreter on the platform. When executed natively like this, a considerable speed-up of the task can be expected, as illustrated by a number of ARM assembler examples in the documentation.

Running a Fibonacci sequence that takes 24.6 seconds with the Lisp version on an Adafruit Metro M4 is reduced to a mere 61 ms when ARM assembly is used instead. This shouldn’t be too shocking, since this assembler essentially bypasses the Lisp runtime, coming closer to what would be the performance of firmware written in e.g. C. However, it also demonstrates that with this ARM assembler it is possible to have your Lisp and still get native performance when you want it, all using Lisp code.

MeArm 3.0: The Pocket-Sized Robot Arm

We all might dream of having an industrial robot arm at our disposal, complete with working controller that doesn’t need constant maintenance and replacement parts, and which is able to help us with other projects with only a minimum of coding or instruction. That’s a pipe dream for most of us, as without a large space, sufficient funding, or unlimited amounts of troubleshooting time we’ll almost always have to look for something smaller and simpler. Perhaps something even as small as this pocket-sized robotic arm.

This isn’t actually the first time we’ve seen the MeArm; the small robot has been around since 2014 and has undergone a number of revisions and upgrades. Even this revision has been out for a little while now but this latest in the series is now available with a number of improvements over the older models. The assembly time required has been reduced from two hours to about 30 minutes and the hardware has even been fully open-sourced as well which allows virtually anyone with the prerequisite tools to build this tiny robot for whatever they happen to need it for, due to its very permissive licensing.

The linked Instructable goes into every detail needed for building the robot as well as documenting all of the parts needed, although you will need access to some specialty tools to make a lot of them. We also featured a Friday Hack Chat about these robots back in 2018 that has some interesting details about these robots in it, and although this is a relatively small robot in the grand scheme of things it’s always possible to upgrade to something larger in the future.

Continue reading “MeArm 3.0: The Pocket-Sized Robot Arm”

RetroPie, Without The Pi

The smart television is an interesting idea in theory. Rather than having the cable or satellite company control all of the content, a small computer is included in the television itself to host and control various streaming clients and other services. Assuming you have control of the software running on the computer, and assuming it isn’t turned into a glorified targeted advertising machine, this can revolutionize the way televisions are used. It’s even possible to turn a standard television into a smart TV with various Android devices, and it turns out there’s a lot more you can do with these smart TV contraptions as well.

With most of these devices, a Linux environment is included running on top of an ARM platform. If that sounds similar to the Raspberry Pi, it turns out that a lot of these old Android TV sets are quite capable of doing almost everything that a Raspberry Pi can do, with the major exception of GPIO. That’s exactly what [Timax] is doing here, but he notes that one of the major hurdles is the vast variety of hardware configurations found on these devices. Essentially you’d have to order one and hope that you can find all the drivers and software to get into a usable Linux environment. But if you get lucky, these devices can be more powerful than a Pi and also be found for a much lower price.

He’s using one of these to run RetroPie, which actually turned out to be much easier than installing a more general-purpose Linux distribution and then running various emulation software piecemeal. It will take some configuration tinkering get everything working properly but with [Timax] providing this documentation it should be a lot easier to find compatible hardware and choose working software from the get-go. He also made some improvements on his hardware to improve cooling, but for older emulation this might not be strictly necessary. As he notes in his video, it’s a great way of making use of a piece of electronics which might otherwise be simply thrown out.

Continue reading “RetroPie, Without The Pi”