A RayCast FPS In COBOL

COBOL is not the first language anyone would ever think of when writing a First Person Shooter– after all , it’s the Common Business Oriented Language, not the Common Game Oriented Language. For Youtube-based hacker [icitry] though, that’s the point. The only way to determine if COBOL would be enough to write an FPS game was to do it.

Sure, you could rest on your laurels knowing that the language is Turing complete and therefore capable by definition, but what’s the fun in that? Now the pipeline for this game is as hacky as anything– COBOL doesn’t exactly have a robust graphics stack or a lot of libraries for pushing pixles, so he’s outputting each frame of the game as raw bitmap to STDOUT, and letting ffplay assemble the images. Control enters the same way, with the terminal set to raw input and the COBOL program reading STDIN.

As for what the images consist of, he’s going for a standard Wolfenstien-inspired raycasting shooter. [icitr] provides a decent explanation of the raycasting algorithm, along with why implementing in COBOL is a silly thing to try. That’s a theme here; he’s able to implement sprites and the logic to move and attack enemies, while constantly complaining about COBOL. If that wasn’t enough, he adds variable-height sectors to bring this much closer to a true DOOM clone. By the end, there’s a full game. It’s all up on GitHub on an Apache license.

While this video is not the most gentle introduction to COBOL, it does show you can hack the business-specific language to do whatever you’d like.

Pi Pico Demos, Therefore It Is

A good demo, like [Linus Akesson]’s Sum Ergo Demonstrato, looks like magic to the average hacker. To normies who don’t know the limitations of the RP2350, they don’t see the big deal. To anyone who has spent any time with the chip, though, it’s a series of tricks you cannot help but be amazed by. Fortuanately for us, [Linus] isn’t actually a magician, because while a magician never reveals his tricks, [Linus] has an hour-long video explaining exactly how his demo was accomplished. We’ve embedded both the demo and the explanation below.

Even if you aren’t into YouTube, you should check out the demo video, and again– remember this is all on a Pi Pico with only the extra passives required for video-out. Then you can watch [Linus] explain how he did it, which is really best heard in his own words. There are a couple of bleeding-edge tricks on the RISC V core and peripherals that we would hate to misrepresent– especially the clever hack with the interpolator that he uses for 3D acceleration.

If this sounds a bit familiar, it’s because we were equally impressed by his Kaleidoscopico demo last year. From demos like this to 3D engines on the ESP32, its amazing what you can do on modern micros if you’re willing to hit the limits of the hardware.

Thanks to [Stephen Walters] for the tip!

Continue reading “Pi Pico Demos, Therefore It Is” →

As It Turns Out, There’s More Than One Cassette Mechanism Being Made After All

It’s become an accepted truth amongst tapeheads that there’s no point looking at new hardware, because there’s only one tape mechanism being made anywhere in the world anymore, and that it sucks. [VWestlife] may enjoy German automobiles, based on the name, but he’s also a tapehead– and he took the time to demonstrate on YouTube that the accepted truth just ain’t so.

The supposed One Mechanism to Rule Them All in Lo-Fi is designed or made by Chinese company Tanishin. Certainly Tanishin does make a tape mechanism, but as [VWestlife] demonstrates with a few teardowns, there’s absolutely more than one on the market. That doesn’t mean any of the new offerings will out-compete your vintage Sony Walkman, but it does mean there are differences worth considering if you were to buy new.

Note that it is handhelds like the Walkman being talked about– it must be, since there are both slot-loading and flip-loading decks still being made, and even if you’re not a tapehead you should be able to tell that those won’t share the same part on the BOM.

With a few teardowns, he finds three separate mechanisms, followed by a deep-dive into the Tanishin. If you’re looking to buy a new walkman– or perhaps use its guts to build a mass storage device-– you might want to watch the whole thing to help you pick. On the other hand, the mechanism doesn’t matter that much, as he points out. It brings the tape over the head, but that’s not difficult. Everything else– from the motor that needs to draw the tape out evenly, to the pickup and the preamps and amplifiers–is where noise and poor quality sound tends to creep in, especially when something’s built to a budget.

Overall, [VWestlife] takes pains to point out that these ‘crappy’ new players aren’t any worse than the original Sony Walkman– we’ve just been spoiled by decades of better media than the humble compact cassette. That’s no slight against the cassette– people are still pushing its limits to this day, like this insanely fast vacuum-driven mechanism we featured.

Thanks to [Stephen Walters] for the tip!

Continue reading “As It Turns Out, There’s More Than One Cassette Mechanism Being Made After All” →

The turntable in question, or at least the same model.

Vintage Turntable Gets Brain Transplant And Home Assistant Integration

When [Marsupial] picked up a vintage Sansusi P-L45 turntable, he figured it would be an easy fix: a few capacitors, a belt or two, and maybe a new cartridge, the usual. But it turned out the electronics were fried, which set the stage for an upgrade that turned it into what may be the world’s only ESP32-driven, Home Assistant integrated, linear tracking turntable.

That last bit, the linear tracking, is why the turntable originally had a microprocessor in the first place: rather than an arm that pivots along the groove naturally, fancy turntables towards the end of the golden era of vinyl slid the needle along a linear track at a variable speed to follow the spiral groove on the record. You can see that in action in the demo video below, though it’s of a working version owned by [BFinks].

The fancy linear mechanism required electronic control to match the speed to the RPM, and in the example of Sansusi’s P-L45, that was provided by an NEC microcontroller on a daughter-board labelled “F4992 CPU”. CPU is a grandiose title, perhaps, but that’s irrelevant since the chip on the board was deader than disco.

That meant [Marsupial] had some reverse engineering to do — figuring out exactly what that chip did to drive this board, in order to replicate its behavior on an ESP32-S3. Luckily the golden era of vinyl correlated with the golden era of service manuals, and the manuals are still available, so [Marsupial] had a big leg up on that. After making the turntable work like stock, what else to do with the extra capability of the ESP32 than plug it into HA and make it really automatic?

Of course it wasn’t quite that easy: a new daughter-board was created that needed to do level shifting to the ESP32’s modern 3.3 V logic as well as hardware debounce on some inputs. The whole saga is very well documented on [Marsupial]’s blog WeAreAllGeeks. The link here takes you to the overview, but he’s got a lot more info on other pages — and of course links to the firmware and PCB design if you happen to have a Sansusi turntable in need of a brain transplant.

Vinyl lovers will appreciate this project much more than the last ESP32 “turntable” we featured, which was anything but. If you want to get into records but don’t have a turntable, you can always make your own.

Continue reading “Vintage Turntable Gets Brain Transplant And Home Assistant Integration” →

Make Your Ceiling Disappear With ADS-B And Short-Throw Projector

If you’re into airplanes, you’ve probably had the experience of hearing an unusual aircraft and rushing outside to try and catch a glimpse of it, all while fumbling with a smartphone to open a flight-tracking app. If your home was equipped with [cpaczek]’s Skylight project, which combines ADS-B data with a short throw projector, that little dance would have been totally unnecessary.

ADS-B or the “Automatic Dependent Surveillance-Broadcast”, is the standard by which aircraft broadcast their position and other flight information from onboard transponders. In most of the world, every commercial aircraft has an ADS-B transmitter, and they’re slowly creeping into general aviation as well. The signals aren’t hard to pick up with software-defined radio — like perhaps this RP2040 based unit we featured — or the RTL-SDR v4 this project calls for.

Using data from ADS-B, the Skylight software runs on Raspberry Pi 5 and renders icons of the aircraft exactly where they would appear above you, if that pesky ceiling wasn’t in the way. You get the flight’s code, destination and flightplan with a nice icon representing what type of airplane it is. Thanks to specifying a Pi 5, the projection is a smooth 60 FPS at 1080p. Airplanes aren’t the only things plotted, though — this is also a planetarium, giving you a full view of the stars and any satellites passing overhead. That’s obviously via an API, not SDR, and if you like you can configure it to track aircraft that way to — allowing you to set your Skylight for anywhere in the world, if you aren’t near an interesting airport.

ADS-B isn’t just for pilots and plane nerds — if you’re flying drones, you probably should keep an eye on it, too. In that case, though, you probably won’t be looking at your ceiling.

Thanks to [Thinkerer] for the tip!

DIY Ceramic Circuit Boards Surely Count As Solarpunk

Solarpunk is all about combining that DIY hacker ethos with sustainability and renewable resources. Our usual PCB manufacturing methods, with their bevy of chemical baths and petrochemical resins aren’t exactly the most sustainable. Digging up some clay and firing it into a circuit board? Very sustainable! And apparently doable, as demonstrated by [Emily Velasco] on Mastadon.

Of course anybody could take a ceramic wafer and call it a circuit board, but that’s only part of what [Emily] did. The ceramic wafer is apparently native clay, which is very cool. Even cooler is that she’s baked the traces into the pottery. While you could conceivably use some sort of conductive glaze for this, what [Emily] did was stamp her desired circuit into the unfired ceramic using a 3D-printed stamp, and then fill the depression with copper powder after the first firing. After that, a second firing is done in a reducing atmosphere to melt/sinter the copper together–it’s not totally clear which is happening here–without burning up.

The results speak for themselves; on the finished demo board, a pair of LEDs blink happily away, driven by the astable oscillator circuit baked right into the clay– and of course the components soldered to it. You’ll have to click through to see it, though.

Given those not-so-sustainable petrochemicals behind our favourite PCBs may be in short supply, this is a timely hack. If it seems familiar, that’s because we featured virtually the same technique last year, but using more-expensive silver powder instead of copper, and a campfire instead of a kiln.

Thanks to [smellsofbikes] for the tip!

Game Dodecahedron Runs AArch64 Assembly

Operating systems are great things to have for general purpose computing, but sometimes they can just get in the way. There’s RAM overhead and processor cycles required for all that operating, after all. For something like a game system, it seems unnecessary. The NES certainly did well enough without an OS, as did its various successors for several console generations.

[Inkbox] wanted to get back to those heady days by programming bare-metal games for a Rasberry Pi 3 that had sat unused since 2016. Games are on cartridge, running bare metal, in assembly — as God and Masayuki Uemura intended. Also, the console is a dodecahedron, because the name GameCube was already taken.

The GitHub link above doesn’t exactly have documentation, at least as of this writing, so you’ll need to watch the video to get the full details. The dodecahedron form factor might not be ideal for packing away in a bag, but as a handheld we have to admit it does look comfortable to hold. Two faces of the dodecahedron get a half-dozen buttons each, which are wired to a GPIO pin on the Pi via a Schmitt trigger for hardware debounce. Like all good consoles, it uses cartridges, these ones being adapted from SD cards on large PCBs derived from a project we featured before.

That all sounds great, but it’s the assembly programming we’re really interested in — skip to around the seven-minute mark in the video for that. Ultimately it’s a build video, so not the ideal tutorial for ARM assembly programming, but it might not be a bad introduction for some. Unfortunately you don’t get line-by-line of the PacMan game he put together — but he does have it in the repository for you to examine. The repo also has STLs if you want to make a dodecahedron of your own.

Of course he’s got a RetroPi cartridge as well, loaded with emulators, and we suspect that’s mostly how this GameDodecahedron will get used. Still, we’ll always have a soft spot for assembly code and projects that use it — be it on ARM, good old 6502, the open-source RISC V architecture, or even the absolute monster of op codes that is x86.

Continue reading “Game Dodecahedron Runs AArch64 Assembly” →