Simon Says With An RP2040

The team of [Michael] and [Chimdi] from Cornell’s Designing with Microcontrollers (ECE 4760) Fall 2023 session designed a version of Simon Says on an RP2040 which they call Pico Says. It uses UDP packets over WiFi to communicate between the players, and supports VGA graphics for output. Each player’s hardware consists of a Pico W module plus a control panel containing the four LEDs and buttons ( red, green, yellow, and blue ) plus send and reset buttons.

For purposes of this lab, the modules were build on a solderless breadboard and used perfboard for the control panels. They weren’t entirely happy with their choice of UDP because they experienced frequent datagram dropouts in the noisy environment of the microcontroller lab. They also planned to implement sound effects, but ran out of time after spending too much time on the WiFi implementation, and had to drop that feature. In the end, however, they wrapped up their project and demonstrated a working game. We can only speculate whether this bonus lesson in resource management was intended by [Dr. Hunter Adams] or not.

Two ECE 4760 course references are highlighted in the write-up that helped them jump-start the project: the UDP and VGA examples for the Pico. These are good links to put in your RP2020 toolbox for future projects, in addition to the ECE 4760 course home page itself. We’ve covered several of these projects recently, as well as the curriculum switch from the Microchip PIC32MX-based Microstick II to the RP2040 last Spring.

Continue reading “Simon Says With An RP2040”

Gyro-Controlled Labyrinth Game Outputs To VGA

This gesture-controlled labyrinth game using two Raspberry Pi Pico units does a great job of demonstrating how it can sometimes take a lot of work to make something look simple.

To play, one tilts an MPU6050 inertial measurement unit (IMU) attached to one Pico to guide a square through a 2D maze, with the player working through multiple levels of difficulty. A second Pico takes care of displaying the game state on a VGA monitor, and together they work wirelessly to deliver a coherent experience with the right “feel”. This includes low latency, simulating friction appropriately, and more.

Taking a stream of raw sensor readings and turning them into control instructions over UDP in a way that feels intuitive while at the same time generating a VGA display signal has a lot of moving parts, software-wise. The project write-up has a considerable amount of detail on the architecture of the system, and the source code is available on GitHub for those who want a closer look.

We’ve seen gesture controls interfaced to physical marble mazes before, but two Raspberry Pi Picos doing it wirelessly with a VGA monitor for feedback is pretty neat. Watch it in action in the video, embedded just under the page break.

Continue reading “Gyro-Controlled Labyrinth Game Outputs To VGA”

Designing A Macintosh-to-VGA Adapter With An LM1881

Old-school Macintosh-to-VGA adapter. Just solve for X, set the right DIP switches and you’re golden.

If you’re the happy owner of a vintage Apple system like a 1989 Macintosh IIci you may know the pain of keeping working monitors around. Unless it’s a genuine Apple-approved CRT with the proprietary DA-15-based video connector, you are going to need at least an adapter studded with DIP switches to connect it to other monitors. Yet as [Steve] recently found out, the Macintosh’s rather selective use of video synchronization signals causes quite a headache when you try to hook up a range of VGA-equipped LCD monitors. A possible solution? Extracting the sync signal using a Texas Instruments LM1881 video sync separator chip.

Much of this trouble comes from the way that these old Apple systems output the analog video signal, which goes far beyond the physical differences of the DA-15 versus the standard DE-15 D-subminiature connectors. Whereas the VGA standard defines the RGB signals along with a VSYNC and HSYNC signal, the Apple version can generate HSYNC, VSYC, but also CSYNC (composite sync). Which sync signal is generated depends on what value the system reads on the three sense pins on the DA-15 connector, as a kind of crude monitor ID.

Theoretically this should be easy to adapt to, you might think, but the curveball Apple throws here is that for the monitor ID that outputs both VSYNC and HSYNC you are limited to a fixed resolution of 640 x 870, which is not the desired 640 x 480. The obvious solution is then to target the one monitor configuration with this output resolution, and extract the CSYNC (and sync-on-green) signal which it outputs, so that it can be fudged into a more VGA-like sync signal. Incidentally, it seems that [Steve]’s older Dell 2001FP LCD monitor does support sync-on-green and CSYNC, whereas newer LCD monitors no longer list this as a feature, which is why now more than a passive adapter is needed.

Although still a work-in-progress, so far [Steve] has managed to get an image on a number of these newer LCDs by using the LM1881 to extract CSYNC and obtain a VSYNC signal this way, while using the CSYNC as a sloppy HSYNC alternative. Other ICs also can generate an HSYNC signal from CSYNC, but those cost a bit more than the ~USD$3 LM1881.

An 8-bit ISA card with VGA, HDMI and composite video connectors

Upgraded Graphics Gremlin Adds HDMI Video To Vintage PCs

Although new VGA-equipped monitors can still be bought, the old standard is definitely on its way out by now, being replaced by high-speed digital interfaces like HDMI and DisplayPort. It therefore makes sense to prepare for a VGA-less future, as [Yeo Kheng Meng] is doing. He designed an 8-bit ISA display card with an HDMI output that enables even the very first generation of PCs to talk to a modern monitor.

The design is based on the Graphics Gremlin by [Tube Time], which is an 8-bit ISA display card that aims to be software compatible with the obsolete MDA and CGA display formats while outputting a clean VGA signal. [Yeo Kheng Meng] modified the board by adding a TFP410 HDMI bus driver and replacing the rarely-used 9-pin RGBI connector with an HDMI version. He also updated the HDL code for the Lattice FPGA, which forms the heart of the graphics card, to account for the new digital output. While he was at it, he also added a few features he was missing in the original product, such as the option to select the color displayed in MDA mode and the ability to output both HDMI and composite video at the same time.

The video below shows the updated card in action in an IBM 5155 Portable PC. The HDMI port connects to a modern monitor, while the composite video output is routed to the 5155’s internal CRT as well as a small color monitor on top. The IBM thereby joins a small list of retro computers that have received an HDMI upgrade — the Amiga 500 and PlayStation 2 being other examples. HDMI might be a lot more complex to work with than VGA, but luckily there are open-source implementations that do much of the work for you.

Continue reading “Upgraded Graphics Gremlin Adds HDMI Video To Vintage PCs”

RGB Graphics On A DEC Rainbow With Reverse-Engineered Monitor

One of the delights of the boring pre-VGA era is that you get to express your creativity when it comes to making a random color CRT work with an equally exciting dual CPU computer like the DEC Rainbow 100. This is the situation that the folk over at Usagi Electric found themselves in with a recent project. The Rainbow 100 is an interesting computer in that it can boot not only DOS with its 8088 processor, but also CP/M on the Z80 processor. Although generally used in monochrome mode, it supports a color graphic card to output RGB signals via its male DB15 connector.

DEC Rainbow 100 to Princeton Ultrasync adapter. With strain-relief zip tie.
DEC Rainbow 100 to Princeton Ultrasync adapter. With strain-relief zip tie.

Unfortunately, the target monitor – a Princeton Ultrasync – featured a female DB25 connector that obviously wasn’t going to connect directly, thus requiring a spot of reverse engineering. Making this very easy, the PCB containing the input connector had the traces clearly marked with the intended signal, which just left the mapping of the two connectors. One complication here was with the Rainbow 100 outputting an RGB signal with sync-on-green, whereas the monitor expected a separate synchronization signal.

Fortunately, most analog monitors aren’t particularly fussy so long as they get the expected signal somewhere in the input, which just left the final issue, of the Rainbow 100 outputting the monochrome signal on a special monochrome pin. This allowed everything to work as it should, and leaving those of us who joined the computing era in the 90s appreciative of standard VGA cables, other than for those weird Sun and Apple systems with their proprietary connectors.

Continue reading “RGB Graphics On A DEC Rainbow With Reverse-Engineered Monitor”

An Easy Z80 And VGA Upgrade For The Apple II

The Apple II was at the forefront of the home computer revolution when it came out in 1977. In its era, nobody really cared about hooking up the Apple II to a VGA monitor, but these days, it’s far easier than sourcing an original monitor. The V2 Analog is a useful tool that will let you do just that, plus some other neat tricks, besides.

As demonstrated on Youtube by [Adrian’s Digital Basement], The V2 Analog is basically a slot-in video card for the Apple II, II+, and IIe. It’s based upon the AppleII-VGA, which uses a Raspberry Pi Pico to snoop the 6502 CPU bus and copy the video memory. It then outputs a high-quality VGA signal that is far nicer than the usual composite output options.

As a bonus, the V2 Analog can be reconfigured to run as an emulated AppliCard Z80 expansion card instead. This card was originally intended to allow Apple II users to run CP/M applications. The V2 Analog does a great job in this role, though it bears noting it can’t handle VGA output and Z80 emulation at the same time.

Project files are available on Github for the curious. The Apple II may be long out of production, but it’s certainly not forgotten. Video after the break.

Continue reading “An Easy Z80 And VGA Upgrade For The Apple II”

Much Better VGA From An ESP32

The ESP32 series from Espressif have been a successful line of products, offering a powerful microcontroller with on-chip wireless networking. There’s a snag though in their practice of calling all of them ESP32s despite wildly varying specifications and even different processor cores, such that it’s easy to lose track of exactly what the chip in front of you can do. [Bitluni] was faced with updating his VGA library to include a newer variant, and was pleasantly surprised to find that it includes a far more capable display peripheral which enables significantly higher resolutions than previously.

The part in question is the ESP32-S3, a version of the chip with the dual Extensa cores we’re familiar with from earlier versions, but the interesting addition of an LCD controller. His previous VGA on ESP32 used the I2S peripheral and sacrificed some of the available bits to create sync pulses, while this version is not only faster but also includes dedicated sync hardware. He can now do up to 16-bit colour in as much as 1024×768 resolution as can be seen in the video below the break, though this feat requires a slightly out of spec framerate that only works on some screens. It’s by no means perfect because the peripheral is intended for LCD rather than VGA use, but it’s pushing microcontroller VGA to new heights and we look forward to any other uses people will put it to.

We covered the original Bitluni ESP32 VGA library when it first appeared.

Continue reading “Much Better VGA From An ESP32”