One Coder Is Porting Portal To The Nintendo 64

When Portal came out in 2007, developers Valve chose not to release the groundbreaking title on an obsolete Nintendo console long out of production. Nobody cared at the time, of course, but [James Lambert] is here to right that wrong. Yes, he’s porting Portal to the N64.

The port, or “demake,” as [James] calls it, has been under construction for some time. The project has posed some challenges: Portal was developed for PCs that were vastly more powerful than the Nintendo 64 of 1996. Thus, initial concerns were that the console wouldn’t be able to handle the physics of the game or render the recursive portal graphics.

However, hard work has paid off. [James] has chipped away, bit by bit, making improvements to his engine all the while. The latest work has the portals rendering nicely, and the companion cube works just the way you’d expect. There’s also a visible portal gun, and the engine can even render 15 recursive layers when looking through mirrored portals. Sixteen was too much.

Of course, there’s still lots to do. There’s no player model yet, and basic animations and sound are lacking. However, the core concept is there, and watching [James] flit through the not-quite-round portals is an absolute delight. Even better, it runs smoothly even on original Nintendo hardware. It’s a feat worthy of commendation.

We had no idea what [James] had in store back when we featured his work creating real-time shadows on N64 hardware. Now we know! Video after the break.

Continue reading “One Coder Is Porting Portal To The Nintendo 64″

Bare-Metal STM32: Using The I2C Bus In Master-Transceiver Mode

As one of the most popular buses today for on- and inter-board communication within systems, there’s a good chance you’ll end up using it with an embedded system. I2C offers a variety of speeds while requiring only two wires (clock and data), which makes it significantly easier to handle than alternatives, such as SPI. Within the STM32 family of MCUs, you will find at least one I2C peripheral on each device.

As a shared, half-duplex medium, I2C uses a rather straightforward call-and-response design, where one device controls the clock, and other devices simply wait and listen until their fixed address is sent on the I2C bus. While configuring an STM32 I2C peripheral entails a few steps, it is quite painless to use afterwards, as we will see in this article. Continue reading “Bare-Metal STM32: Using The I2C Bus In Master-Transceiver Mode”

The LED tree itself , filmed in the dark - a myriad of small orbs glowing mictures of green, blue and warm white

Kaleidoscope – Feelings Turned Into LED Tree

In 2020, [Eddie] found himself with a few hundred RGB LEDs left after a pandemic-interrupted project, and a slew of emotions he wanted to express – so he turned to the language of hardware, and started sculpting his feelings into an art project. He set out to build an LED tree around a piece of wood he picked for its cool shape, and trying out a long-shelved idea of his, while at it – using different resistors to mix colors of the RGB LEDs. The end result, pictured above, has earned “The Most Important Device” spot in our recent Sci-Fi contest, fair and square.

Initially, he wanted to use ATTiny microcontrollers and PWM all the lights in parallel. Having built an intermediate prototype, a small LED flower, he scrapped the idea due to technical problems, and then simplified it by hard-wiring RGB LEDs with randomly selected colors instead. As for the glowing orbs themselves, he made these just by pouring hot glue into silicon orb molds, a simple technique any of us could repeat. After 90 hours of work between him and an assistant he hired, the LEDs were wired up, each with random resistors connected to green and blue LED colors, and some warm white LEDs added into the mix.

He wanted to mostly use blue and green colors, as symbols of a world revived and revitalized – something we can’t help but keep our fingers crossed for. Before putting it all together, they wouldn’t know which colors each of the LEDs would power up in – part of the charm for this art piece, and no doubt a pleasant surprise. In the end, it turned out to be a futuristic decoration that we’re glad a camera could capture properly! If you like what you see, the build logs linked above have a bit more insights into how it all came together.

LED-adorned plants are fun projects that bring joy for a long time after you’ve finished them. You can easily make a LED tree out of what you have on hand, and if you get real fancy, you can create an intricate bonsai, too. And, if you’re ever interested to experiment with castellations, you can design yourself some PCB cube flowers!

This project was an entry into the 2022 Sci-Fi Contest. Check out all of the winning entries here.

A Universal, Non-planar Slicer For 3D Printing Is Worth Thinking About

One may think that when it comes to 3D printing, slicing software is pretty much a solved problem. Take a 3D model, slice it into flat layers equal to layer height, and make a toolpath so the nozzle can create those layers one at a time. However, as 3D printing becomes more complex and capable, this “flat planar slicing” approach will eventually become a limitation because a series of flat slices won’t necessarily the best way to treat all objects (nor all materials or toolheads, for that matter.)

How a 20 mm cube looks when sliced in a cone-shaped plane.

[René K. Müller] works to re-imagine slicing itself, and shows off the results of slicing 3D models using non-planar geometries. There are loads of pictures of a 20 mm cube being sliced with a variety of different geometries, so be sure to give it a look. There’s a video embedded below the page break that covers the main points.

It’s all forward-thinking stuff, and [René] certainly makes some compelling points in favor of a need for universal slicing; a system capable of handling any geometry, with the freedom to process along any path or direction. This is a concept that raises other interesting questions, too. For example, when slicing a 20 mm cube with non-planar geometries, the resulting slices often look strange. What’s the best way to create a toolpath for such a slice? After all, some slicing geometries are clearly better for the object, but can’t be accommodated by normal hot ends (that’s where a rotating, tilted nozzle comes in.)

Such worries may not be an issue for most users at the moment, but it’s worth trying to get ahead of the curve on something like this. And lest anyone think that non-planar slicing has no practical purpose, we previously covered [René]’s demonstration of how non-planar slicing can reliably create 90° overhangs with no supports.

Continue reading “A Universal, Non-planar Slicer For 3D Printing Is Worth Thinking About”

Watch A Complete Reflector Telescope Machined From A Single Block Of Glass

If this is the easy part of making a complete reflector telescope from a single piece of glass, we can’t wait to get a load of the hard part!

A little backstory may be in order for those who don’t follow [Jeroen Vleggaar]’s Huygens Optics channel on YouTube. A few months ago, he released a video discussing monolithic telescopes, where all the reflective and refractive surfaces are ground into a single thick block of glass. Fellow optical engineer [Rik ter Horst] had built a few tiny monolithic Schmidt-Cassegrain reflectors for use in cube sats, so [Jeroen] decided to build a scaled-up version himself.

The build starts with a 45 mm thick block of crown glass, from which a 50 mm cylinder is bored with a diamond hole saw. The faces of the blank are then ground into complex curves to reflect incoming light, first off the parabolic rear surface and then onto the hyperbolic secondary mirror ground into the center of the front face. A final passage through a refracting surface in the center of the rear face completes the photons’ journey through the block of glass, squeezing a 275 mm focal length into a compact package.

All this, of course, vastly understates the work required to pull it off. Between the calculations needed to figure out the surface shapes in the first place to the steps taken to machine a famously unforgiving material like glass, every step is fraught with peril. And because the design is monolithic, any mistakes mean starting all over again. Check out the video below and marvel at the skills needed to get results like this.

What strikes us most about [Jeroen]’s videos is the mix of high-tech and age-old methods and materials used in making optics, which we’ve seen him put to use to make everything from tiny Tesla valves to variable-surface mirrors.

Continue reading “Watch A Complete Reflector Telescope Machined From A Single Block Of Glass”

Turning Scrap Copper Into Beautiful Copper Acetate Crystals

Crystals, at least those hawked by new-age practitioners for their healing or restorative powers, will probably get a well-deserved eye roll from most of the folks around here. That said, there’s no denying that crystals do hold sway over us with the almost magical power of their beauty, as with these home-grown copper acetate crystals.

The recipe for these lovely giant crystals that [Chase Lean] shares is almost too simple — just scrap copper, vinegar, and a bit of hydrogen peroxide — and just the over-the-counter strength versions of those last two. The process begins with making a saturated solution of copper acetate by dissolving the scrap copper bits in the vinegar and peroxide for a couple of days. The solution is concentrated by evaporation until copper acetate crystals start to form. Suspend a seed crystal in the saturated solution, and patience will eventually reward you with a huge, shiny blue-black crystal. [Chase] also shares tips for growing crystal clusters, which have a beauty of their own, as do dehydrated copper acetate crystals, with their milky bluish appearance.

Is there any use for these crystals? Probably not, other than their beauty and the whole coolness factor of watching nature buck its own “no straight lines” rule. And you’ll no doubt remember [Chase]’s Zelda-esque potassium ferrioxalate crystals, or even when he turned common table salt into perfect crystal cubes.

Arming With An OS

We see tons of projects with the infamous “Blue Pill” STM32 boards. They are cheap and plentiful and have a lot of great features, or at least they were before the chip shortage. I recently picked up a “Black Pill”, which is very similar but has an even more powerful processor. For a few bucks, you get an ARM CPU that can run at 100 MHz (but with USB, probably 96 MHz). There’s 512 kB of flash and 128 kB of RAM. There’s a USB type C port, and even a button and an LED onboard. The thing fits on a breadboard and you can program it with a cheap STLink dongle which costs about $10.

The Black Pill module on a breadboard.

Of course, you then have to consider the software. The STM32Cube stuff is a lot to set up and learn but it does let you do just about anything you can imagine. Then there is the STM32Duino plug-in that lets you use it as a beefy Arduino. That works and is easy enough to set up. However, there’s also Mbed. The only problem is that Mbed doesn’t work right out of the box. Turns out, though, it isn’t that hard to set up. I’ll show you how easy it is to get things going and, next time, I’ll show you a practical example of a USB peripheral that uses the mBed RTOS features.

First Steps

Obviously, you are going to need a Black Pill. There are at least two choices but for as cheap as they are there is little reason not to get the STM32F411 version that has more memory. The DIP form factor will fit in whatever breadboard you happen to have and a USB C cable will power the board so unless you are driving a lot of external circuitry, you probably don’t need an external supply.

Continue reading “Arming With An OS”