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”

CGA As You Have Never Seen It Before

An old-style graphics system as found on many 8-bit computers and on early PC graphics cards drew its characters by retrieving their bitmaps from a ROM. With a little sideways thinking, [GloriousCow] has exploited this process to make a CGA card perform graphical tricks it was never designed to do.

The CGA card clocks its character ROM continuously across the whole screen, even at the edges where nothing would normally be displayed. By placing the ROM in tandem with a Raspberry Pi Pico 2 they were able to use this ROM clocking as a synchronization signal, and inject whatever pixel data they chose.

The result is a CGA card that can display 60 Hz high-res graphics in text mode, albeit with a very retro one bit color depth. It can overlay the text and the graphics too, because the ROM is still present. One fun result of this is a bouncing DVD logo screensaver, on a DOS PC.

There’s a PCB and a promise of more, meanwhile we suggest you take a look at an impossible feat using a similar technique: NES Doom.

Implementing 3D Graphics Basics

Plenty of our childhoods had at least one math teacher who made the (ultimately erroneous) claim that we needed to learn to do math because we wouldn’t always have a calculator in our pockets. While the reasoning isn’t particularly sound anymore, knowing how to do math from first principles is still a good idea in general. Similarly, most of us have hugely powerful graphics cards with computing power that PC users decades ago could only dream of, but [NCOT Technology] still decided to take up this project where he does the math that shows the fundamentals of how 3D computer graphics are generated.

The best place to start is at the beginning, so the video demonstrates a simple cube wireframe drawn by connecting eight points together with lines. This is simple enough, but modern 3D graphics are really triangles stitched together to make essentially every shape we see on the screen. For [NCOT Technology]’s software, he’s using the Utah Teapot, essentially the “hello world” of 3D graphics programming. The first step is drawing all of the triangles to make the teapot wireframe. Then the triangles are made opaque, which is a step in the right direction but isn’t quite complete. The next steps to make it look more like a teapot are to hide the back faces of the triangles, figure out which of them face the viewer at any given moment, and then make sure that all of these triangles are drawn in the correct orientation.

Rendering a teapot is one thing, but to get to something more modern-looking like a first-person shooter, he also demonstrates all the matrix math that allows the player to move around an object. Technically, the object moves around the viewer, but the end effect is one that eventually makes it so we can play our favorite games, from DOOM to DOOM Eternal. He notes that his code isn’t perfect, but he did it from the ground up and didn’t use anything to build it other than his computer and his own brain, and now understands 3D graphics on a much deeper level than simply using an engine or API would generally allow for. The 3D world can also be explored through the magic of Excel.

Continue reading “Implementing 3D Graphics Basics”

Kaleidoscopico Shows Off Pi Pico’s Capabilities

In the early days of computing, and well into the era where home computers were common but not particularly powerful, programming these machines was a delicate balance of managing hardware with getting the most out of the software. Memory had to be monitored closely, clock cycles taken into account, and even video outputs had to be careful not to overwhelm the processor. This can seem foreign in the modern world where double-digit gigabytes of memory is not only common, it’s expected, but if you want to hone your programming skills there’s no better way to do it than with the limitations imposed by something like a retro computer or a Raspberry Pi Pico.

This project is called Kaleidoscopio, built by [Linus Ã…kesson] aka [lft] and goes deep into the hardware of the Pi Pico in order to squeeze as much out of the small, inexpensive platform as possible. The demo is written with 17,000 lines of assembly using the RISC-V instruction set. The microcontroller has two cores on it, with one core acting as the computer’s chipset and the other acts as the CPU, rendering the effects. The platform has no dedicated audio or video components, so everything here is done in software using this setup to act as a PC from the 80s might. In this case, [lft] is taking inspiration from the Amiga platform, his favorite of that era.

The only hardware involved in this project apart from the Pi Pico itself are a few resistors, an audio jack, and a VGA port, further demonstrating that the software is the workhorse in this build. It’s impressive not only for wringing out as much as possible from the platform but for using the arguably weaker RISC-V cores instead of the ARM cores, as the Pi Pico includes both. [lft] goes into every detail on the project’s page as well, for those who are still captivated by the era of computer programming where every bit mattered. For more computing demos like this, take a look at this one which is based on [lft]’s retrocomputer of choice, the Amiga.

Continue reading “Kaleidoscopico Shows Off Pi Pico’s Capabilities”

Dress Up Your 3D Prints With Toner-Transfer Labels

We’ve always found the various methods for adding text and graphics to 3D prints somewhat underwhelming. Embossed or debossed characters are fuzzy, at best, and multi-color printers always seem to bleed one color into the next. Still, the need for labels and logos is common enough that it’s worth exploring other methods, such as this easy toner transfer trick.

Home PCB makers will probably find the method [Squalius] describes in the video below very familiar, and with good reason. We’ve seen toner transfer used to mask PCBs before etching, and the basic process here is very similar. It starts with printing the desired graphics on regular paper using a laser printer; don’t forget to mirror the print. The printed surface is scuffed up a bit, carefully cleaned, and coated with a thick layer of liquid acrylic medium, of the kind used in paint pouring. The mirrored print is carefully laid on the acrylic, toner-side down, and more medium is brushed on the back of the paper. After the print dries, the paper is removed with a little water and some gentle friction, leaving the toner behind. A coat of polyurethane protects the artwork reasonably well.

[Squalius] has tested the method with PLA and PETG and reports good results. The text is clear and sharp, and even fine text and dithered graphics look pretty good. Durability could be better, and [Squalius] is looking for alternative products that might work better for high-wear applications. It looks like it works best on lightly textured surfaces, too, as opposed to surfaces with layer lines. We’d love to see if color laser prints work, too; [Squalius] says that’s in the works, and we’ve seen examples before that are reason for optimism.

Continue reading “Dress Up Your 3D Prints With Toner-Transfer Labels”

Black Graphics On Your TV, For A Greener World?

Can you really save energy by carefully choosing the colors displayed on a TV screen? Under some conditions, yes. Or at least that’s the conclusion of a team at the BBC that looked at reducing the energy consumption impact of their output by using what they call Lower Carbon Graphics. In short, they’re trying to ensure that OLED displays or those with reactive backlights use less energy when displaying BBC graphics, simply by using more black.

It turns out that a lot of British households play radio stations on their TVs, and the BBC sends a static image to each screen in this mode. As part of a redesign across the organisation, the BBC removed the bright background colours from these images and replaced it with black, with a remarkable reduction in power consumption, at least on OLED and FALD screens. (On normally backlit screens, 89% of British TVs, this does nothing.)

If you look hard at their numbers, though, listening to radio on the TV is horrendously inefficient; can you imagine a radio that consumes 100 W?  If the BBC really wants to help reduce media-related energy consumption, maybe they should stop broadcasting radio programming on the TV entirely.

Anyway, as we move toward a larger fraction of OLED screens, on TVs and monitors alike, it’s fun to think that darker images use up to 40% less power. Who knew that Hackaday was so environmentally friendly? Black is the new green!

Header: RIA Novosti archive/ Igor Vinogradov, CC-BY-SA 3.0.

Adding Portals To Quake

For those who have played Quake extensively, adding portals seems unnecessary, as teleporters are already a core part of the game mechanics. What [Matthew Earl] accomplishes is more of the Portal style of portal by rendering what is on the other side of the portal with a seamless teleportation transition.

Of course, Quake is an old game with a software renderer. Just throwing another camera into the scene, rendering to another texture, and then mapping that texture to the scene isn’t an option. Quake uses an edge rasterizer and generates spans along scanlines that track where edges intersect the current scanline. Rather than making expensive per-pixel comparisons, [Matt] stashes the portal spans and renders them in a second render, so even with multiple portals, only a single screen’s worth of pixels are rendered.

However, this technique has no near clipping plane, which means objects can appear in the portal that don’t make any sense as they are in front of the portal’s viewpoint. Luckily, Quake has an ingenious method for polygon occlusion: the BSP. While [Matt] is manually checking polygons, the BSP is the perfect tool for bisecting a room along a plane. It’s an incredible hack, and we’re excited to see Quake expand into a puzzle game. [Matt] dives into greater detail on how the software renderer works in another video that’s well worth a watch.

Perhaps the most incredible aspect of this technique is that it could run on original hardware. If you want to bring a little more Quake to life, why not get the Quake light flicker in your house? Video after the break.

Continue reading “Adding Portals To Quake”