Tiny386 On An Espressif ESP32-S3

Some people may remember the joys of trying to boot Linux on an 8-bit AVR microcontroller, which was an absolute exercise in patience. In comparison [He Chunhui]’s Tiny386 emulator running on an ESP32-S3 MCU is positively zippy when it boots and runs Windows 95. The provided video (also embedded below) makes clear that while you can comfortably waddle off to prepare and pour a fresh cup of tea, it’s actually borderline usable.

The source code can be obtained via GitHub, which contains not just the basic emulated 80386 CPU written in C99, but also peripherals borrowed from TinyEMU and QEMU, along with a SeaBIOS ROM. In addition to the Windows 95 demo it’s claimed that Tiny386 should be able to run most 16/32-bit software.

Right now the ESP32-S3 version targets the JC3248W535 board, which is a roughly $30 development board featuring a built-in display with touch screen and an ESP32-S3 module. Although it has a USB-C port, it appears that this one is just for programming and not for the USB peripheral of the ESP32-S3. With the USB OTG peripheral used, one could conceivably make a small 386 system based around an ESP32-S3 that features a USB hub to plug a keyboard, mouse, etc. into.

Considering that the Tiny386 emulator is a very simple and straightforward approach to emulating an early-90s PC, some optimization might enable a pretty zippy general purpose PC for early 90s software. Quite a boost from watching Linux struggle into a command line on an AVR, indeed.

Continue reading “Tiny386 On An Espressif ESP32-S3”

Running A Minecraft Server On A WiFi Light Bulb

WiFi-enabled ‘smart’ light bulbs are everywhere these days, and each one of them has a microcontroller inside that’s capable enough to run all sorts of interesting software. For example, [vimpo] decided to get one running a minimal Minecraft server.

The Bl602-equipped board inside the LED lightbulb. (Credit: vimpo, YouTube)
The Bl602-equipped board inside the LED lightbulb. (Credit: vimpo, YouTube)

Inside the target bulb is a BL602 MCU by Bouffalo Lab, that features not only a radio supporting 2.4 GHz WiFi and BLE 5, but also a single-core RISC-V CPU that runs at 192 MHz and is equipped with 276 kB of RAM and 128 kB flash.

This was plenty of space for the minimalist Minecraft server [vimpo] wrote several years ago. The project says it was designed for “machines with limited resources”, but you’ve still got to wonder if they ever thought it would end up running on a literal lightbulb at some point.

It should be noted, of course, that this is not the full Minecraft server, and it should only be used for smaller games like the demonstrated TNT run mini game.

Perhaps the next challenge will be to combine a large set of these light bulbs into a distributed computing cluster and run a full-fat Minecraft server? It seems like a waste to leave the BL602s and Espressif MCUs that are in these IoT devices condemned to a life of merely turning the lights on or off when we could have them do so much more.

Continue reading “Running A Minecraft Server On A WiFi Light Bulb”

Photo of breadboards and bench oscilloscope

Programming The 6581 Sound Interface Device (SID) With The 6502

Over on YouTube, [Ben Eater] pursues that classic 8-bit sound. In this video, [Ben] integrates the MOS Technology 6581 Sound Interface Device (SID) with his homegrown 6502. The 6581 SID was famously used in the Commodore line of computers, perhaps most notably in the Commodore 64.

The 6581 SID supports three independent voices, each consisting of a tone oscillator/waveform generator, an envelope generator, and an amplitude modulator. These voices are combined into an output filter along with a volume control. [Ben] goes into detail concerning how to configure each of these voices using the available facilities on the available pins, referencing the datasheet for the details.

[Ben]’s video finishes with an 8-bit hit from all the way back in October 1985: Monty on the Run by Rob Hubbard. We first heard about [Ben’s] musical explorations back in June. If you missed it, be sure to check it out. It seems hard to imagine that demand for these chips has been strong for decades and shows little sign of subsiding.

Continue reading “Programming The 6581 Sound Interface Device (SID) With The 6502”

Rocket Roll Control, The Old Fashioned Way

The vast majority of model rockets go vaguely up and float vaguely downwards without a lot of control. However, [newaysfactory] built a few rockets that were altogether more precise in their flight, thanks to his efforts to master active roll control.

[newaysfactory] started this work a long time ago, well before Arduinos, ESP32s, and other highly capable microcontroller platforms were on the market. In an era when you had to very much roll your own gear from the ground up, he whipped up a rocket control system based around a Microchip PIC18F2553. He paired it with a L3G4200D gyro, an MPXH6115A barometer, and an MMA2202KEG accelerometer, chosen for its ability to provide useful readings under high G acceleration. He then explains how these sensor outputs were knitted together to keep a rocket flying straight and true under active control.

[newaysfactory] didn’t just master roll control for small rockets; he ended up leveraging this work into a real career working on fully-fledged autopilot systems. Sometimes your personal projects can take your career in interesting directions.

Continue reading “Rocket Roll Control, The Old Fashioned Way”

2025 Component Abuse Challenge: An Input Is Now An Output

Part of setting up a microcontroller when writing a piece of firmware usually involves configuring its connections to the outside world. You define a mapping of physical pins to intenral peripherals to decide which is an input, output, analogue, or whatever other are available. In some cases though that choice isn’t available, and when you’ve used all the available output pins you’re done. But wait – can you use an input as an output? With [SCART VADER]’s lateral thinking, you can.

The whole thing takes advantage of the internal pull-up resistor that a microcontroller has among its internal kit of parts. Driving a transistor from an output pin usually requires a base resistor, so would it be possible to use the pullup as a base resistor? If the microcontroller can enable or disable the resistor on an input pin then yes it can, a transistor can be turned off and on with nary an output to be seen. In this case the chip is from ATmega parts bin so we’re not sure if the trick is possible on other manufacturers’ devices.

As part of our 2025 Component Abuse Challenge, this one embodies the finest principles of using a part in a way it was never intended to be used, and we love it. You’ve still got a few days to make an entry yourself at the time of writing this, so bring out your own hacks!

Speech Synthesis On A 10 Cent Microcontroller

Speech synthesis has been around since roughly the middle of the 20th century. Once upon a time, it took remarkably advanced hardware just to even choke out a few words. But as [atomic14] shows with this project, these days it only takes some open source software and 10-cent microcontroller

The speech synth is implemented on a CH32V003 microcontroller, known for its remarkably low unit cost when ordered in quantity. It’s a speedy little RISC-V chip running at 48 MHz, albeit with the limitation of just 16 KB of Flash and 2 KB of SRAM on board.

The microcontroller is hooked up to a speaker via a simple single-transistor circuit, which allows for audio output. [atomic14] first demonstrates this by having the chip play back six seconds of low quality audio with some nifty space-saving techniques to squeeze it into the limited flash available. Then, [atomic14] shows how he implemented the Talkie library on the chip, which is a softwarehttps://www.youtube.com/watch?v=RZvX95aXSdM implementation of Texas Instruments’ LPC speech synthesis architecture—which you probably know from the famous Speak & Spell toys. It’s got a ton of built in vocabulary out of the box, and you can even encode your own words with some freely available tools.

We’ve seen [atomic14] tinker with these chips before, too.

Continue reading “Speech Synthesis On A 10 Cent Microcontroller”

10 Cent Microcontroller Makes Tracker Music

We are absurdly spoiled these days by our microcontrollers. Take the CH32V00X family– they’ve been immortalized by meme as “the ten cent micro” but with a clock speed of 48MHz and 32-bit registers to work with, they’re astoundingly capable machines even by the standards of home computers of yore. That’s what motivated [Tim] to see if he could use one to play MOD files, with only minimal extra parts– and quite specifically no DAC.

Well, that’s part of what motivated him. The other part was seeing Hackaday feature someone use a CH32V003 making chiptune-like beeps. [Tim] apparently saw that post as a gauntlet thrown down, and he picked it up with an even smaller chip: the CH32V002, which he proceeded to turn into a MOD player. For those of you who slept through 80s and early 90s (or for those precocious infants reading this who hadn’t then yet been born), MOD files are an  electronic music format, pioneered on the Amiga home computers. Like MIDI, the file specifies when to play specific voices rather than encoding the sound directly. Unlike MIDI, MOD files are self-contained, with the samples/voices used being stored inside the file. The original version targeted four-channel sound, and that’s what [Tim] is using here.

As you can see from the demo video, it sounds great. He pulled it off by using the chip’s built-in PWM timer. Since the timer’s duty cycle is determined by a variable that can be changed by DMA, the CPU doesn’t end up with very much to do here. In the worst case, with everything in flash memory instead of SRAM, the CPU is only taxed at 24%, so there’s plenty of power to say, add graphics for a proper demo. Using the existing MODPlay Library, [Tim]’s player fits into 4kB of memory, leaving a perfectly-usable 12kB for the MOD file. As far as external components needed, it’s just an RC filter to get rid of PWM noise.

[Tim] has put his code up on GitHub for anyone interested, and has perhaps inadvertently cast down another gauntlet for anyone who wants to use these little RISC V microprocessors for musical tasks. If you can do better, please do, let us know.

Continue reading “10 Cent Microcontroller Makes Tracker Music”