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.

Investigating The S3 Virge’s Reputation As A 3D Decelerator Card

The special 512x384 mode with S3 card installed. (Credit: Bits und Bolts, YouTube)
The special 512×384 mode with S3 card installed. (Credit: Bits und Bolts, YouTube)

Back in 1996 the 3D gaming market on PC was beginning to heat up, with hot new titles like Tomb Raider coming out that year and requiring much more graphics power than what was needed for old titles like Doom and Duke Nukem 3D to experience good graphics. Thus you had to pick some kind of 3D accelerator card to buy. Here a common joke was that of the available options, the S3 Virge GPU was so bad that it was actually worse than running in software rendering, but was this true? Cue [Bits und Bolts]’s investigation to finally put this myth to rest.

On software rendering mode a zippy Pentium 166 would struggle to render at 640×480 resolution, so if you wanted more than 320×240, or really knock down graphical fidelity, you had to get that 3D accelerator card. After combining a P166 with an S3 Virge/DX – a minor update to the original Virge – the Tomb Raider game was first compared while running in 512×384 resolution, which the game offers you with an S3 card installed along with bilinear filtering.

After hitting a capped 30 FPS on that first test, 640×480 was tried and hit a solid 15 FPS with bilinear filtering enabled, but the conclusion is basically that the special 512×384 resolution mode is pretty good. Perhaps the main causes of the myth was the wide variability in quality of the various GPUs using the S3 Virge chip, as well as trying to run at anything other than this special resolution which appears to target the card’s strengths.

Continue reading “Investigating The S3 Virge’s Reputation As A 3D Decelerator Card”

Deltarune’s Tenna Brought To Life

For those who have never played the hit video games Undertale and Deltarune, the games are partially known for their interesting characters, many of which have eerie, surreal, and expressive designs. One of the more memorable characters from Deltarune is Tenna, a game show host of sorts whose distinguishing feature is an old television as a head, as well as a colorful suit. As a result he’s been the subject of a number of recreations by various cosplayers and makers like [BigRig Creates].

This version of the character was actually inspired by a previous build by [BunnyBii] which used an iPad as the interactive screen/face. Inside the television, though, the actual human found this to be front heavy and limiting in the ways that it could be used interactively, especially since the only way to see the outside world in this version was with a small endoscope and screen. [BigRig Creates]’s version builds on this idea but swaps out the iPad for a Raspberry Pi, allowing for much more customization, and uses a pair of Xreal glasses instead of a screen for the view of the outside world from in the television.

To get the whole costume together, the head is 3D printed with all of the electronics inside, and a game controller integrated into a handheld microphone controls the animations shown on the screen. A vibrant, custom-tailored suit with white gloves rounds out the ensemble, along with a pair of 3D-printed shoe covers since actual yellow shoes were a bit pricy. There were some interesting problems to solve along the way, specifically with regards to power management for all the electronics, but in the end it all seems to have come together quite well. [BigRig Creates] is no stranger to builds with unusual displays, though; one of our favorites was the world’s largest Nintendo 3DS.

Continue reading “Deltarune’s Tenna Brought To Life”

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”

STM32 Handheld Has OpenGL And All The Classics

We do sometimes go on about how absurdly powerful microcontrollers are these days, but this time it’s technically a microprocessor, not a microcontroller, at the heart of the build — specifically, an STM32MP2. Still, you know you’re living in the future when an STM32 of any sort can not only run [John Cronin]’s gk handheld game console, but provide 3D acceleration to boot.

Full disclosure: you’ve seen this handheld here before — sorta. That was version 3, which was an STM32-based handheld.  V3 used the much less powerful STM32H7S7L8, with a single Cortex-M7 clocked at 600 MHz and a 2D NeoChrom GPU. The STM32MP2, by contrast, has dual Cortex-A35 cores running 1.5 GHz and a bonus Cortex-M33. It’s running a custom OS called gkos, which is mostly POSIX-compliant and boasts nigh-instantaneous boot times.

As with the last version, you can run a bevy of emulators from the 8-bit to the 32-bit era, but the added power and OpenGL support mean this handheld also runs N64 games via a fork of mupen64. There are also emulators for ‘real’ computers, namely Atari ST and XL, and a little-known thing known as a “PC”. DOSBox gets the equivalent performance of a 50 MHz 486, which means you can run all the classics, including DOOM, though that will be more performant running the native-running port of sdl-DOOM.

You also get extra inputs to play with and a bigger screen compared to the last version. Oh, and WiFi. There are accelerometers for tilt control, and did we mention the screen’s touch input is supported? If it weren’t for the form-factor, we’d call this a capable little computer. The GK handheld looks like an awesome handheld console, check it out in the demo video below.

Continue reading “STM32 Handheld Has OpenGL And All The Classics”

Loading Sega Genesis Games Off A Vinyl Record

Recently [Throaty Mumbo] took a poke at another daft idea, in the form of loading Sega Genesis games off vinyl records. Although a whacky idea, it’s made possible through the use of a Mega Everdrive Pro and its ability to load games via its USB port, a feature mostly intended for on-the-fly game development without swapping SD cards.

For a few decades in home computing, the loading of software from cassette tapes and similar media was very common. This was due to the low-cost nature of this ubiquitous technology compared to alternatives like cartridges and floppy disks. Even if it was famously unreliable and slow, this accessibility made it a very popular choice. This is where home game consoles were different, as they generally used very fast cartridges, but what if you merge these two worlds?

As demonstrated, a Pico 2 board with its RP2350 MCU is used to convert the audio signal containing the binary data into data for transmission via USB to the Everdrive cartridge. After confirming that it works with a tape drive, he drags in a plastic-y PO-80 5″ record cutter and player, where the mono audio limitation is not a problem.

Unfortunately, this PO-80 turns out to be exactly the kind of toy it looks like, with [Throaty Mumbo] unable to cut and play back a record that gets a clean enough signal to the Pico 2 board, though with a better player and likely record cutter it should work fine. After all, some magazines back in the day came with plastic ‘vinyl’ records that contained programs you could load from your record player.

Although technically a failure, it does demonstrate that if you are very patient, you can totally load Sega Genesis ROMs off a tape or record at a blistering couple of kB/s, tops.

Continue reading “Loading Sega Genesis Games Off A Vinyl Record”

Keychain GameCube Controller Made Functional

Mini game controllers with buttons and joysticks that move like the real deal are a pretty cool keychain and fidget toy, but at least for some of us there’s this intrusive thought that tells us that it would be so much cooler if it actually was a functional game controller. Enter [Brux] tearing into a miniature GameCube controller and adding the required guts.

The keychain/fidget toy is made by Backpack Buddies and is one of a range of similar toys that feature buttons you can press and joysticks that move, giving a pretty good start on the externals of the controller. Once cracked open at the seam, some interior redecorating had to be performed to clear space and add something to mount switches onto. Here [Brux] opted to glue SMD switches to custom 3D components in lieu of a PCB. These were subsequently wired up with thin enameled wire, before attaching the original buttons to them following some more plastic surgery.

Some tiny joystick innards were then installed before gluing on the final buttons and joystick caps. As for how it all connects to a real GameCube, here an RP2040 was used to handle the translation of control inputs to the GameCube controller protocol. Then a GameCube controller was sacrificed for its cable and controller connector, but as can be seen in the video it does all work and creates the perfect controller for guests.

Continue reading “Keychain GameCube Controller Made Functional”