Extreme Vectrex Multicart Plays Bad Apple

[Sprite_TM] had a Vectrex console that he wanted to play with. Alas, his makeshift multicart had fallen into disrepair. Rolling up his hacking sleeves, he set about making a new one, a better one. His PCB design included his microcontroller of choice: the ST STM32F411, a 32-bit 100Mhz ARM Cortex M4, along with a 16MB SPI flash chip. [Sprite_TM] wanted to make programming games onto the multicart simple. Using the libopencm3 firmware library for the STM in conjunction with Elm-Chans FatFS, the multicart could be plugged into a computer’s USB port and have any game data dragged and dropped onto it like a USB stick. The PCB then connects directly into the Vectrex’s cartridge port. The first cartridge file is a basic menu that lists all of the game ROMs stored in the flash memory. When the user selects the game the STM loads that ROM file which the menu software then boots.

After loading his entire Vectrex ROM library onto the multicart, [Sprite_TM] realized he had far too much space left over – so he decided to add some extras. His first choice was Bad Apple (YouTube link), a music video made by fans of the Touhou Project game series. The video features black and white silhouettes of the many game characters in a shadow art style. Since its debut, Bad Apple has been ported from everything from the Sega Genesis (YouTube link) to laser scanners (YouTube link). It was time for the Vectrex to join the list.

After ripping the video from YouTube, [Sprite_TM] used MPlayer to save each frame as a PNG along with a wave file of the music. Next, he ran Potrace on the PNG files to get vector versions. Using a custom PHP script, the resulting JSON file was post-processed into relative vectors the Vectrex uses. Digital audio was possible by having the Vectrex’s 8-bit DA-converter perform double duty both for the video circuit and the audio. However, the volume must be turned to the max in order to hear the music. Incidentally, the DAC can only output audio in this scenario when vectors are not being drawn, so the event timing needed to be adjusted. The video and audio data was re-parsed after a modified version of VecX was used to get the timing events synchronized before transferring Bad Apple onto the multicart.

You can see the Vectrex version of Bad Apple after the break, along with a 3D-engine based on Doom levels. The engine is written in C and makes use of the Z-buffer, creating the effect of solid 3D-objects in front of each other.  There are no weapons or enemies to dispatch here, but the effect is impressive nonetheless.

Continue reading “Extreme Vectrex Multicart Plays Bad Apple”

New Part Day: MSP430 + Cortex M4F

Texas Instruments’ MSP430 series of microcontrollers has been the standard extremely low power microcontroller for several years now. It’s not an ARM, though, so while there are fans of the ‘430, there aren’t a lot of people who would want to port their work in ARM to a completely different architecture. Here is TI’s answer to that. It’s called the MSP432, and it combines the low power tech of the ‘430 with a 32-bit ARM Cortex M4F running at 48MHz.

This is not the first ARM Cortex M4F platform TI has developed; the Tiva C series is based on the Cortex M4F core and was released a few years ago. The MSP432 is a little bit different, leveraging the entire development system of the MSP430 and adding a DSP engine and a FPU. If you’re looking for something that’s low power but still powerful, there you go. You can find the official press release here.

If you’d like to try out the MSP432, there’s a LaunchPad available. $13 to TI gets you in the door. The most capable MSP432 with 256 kB of Flash, 64 kB of SRAM, and 24 ADC channels hasn’t hit distributors yet, but you can sample it here.

Execution Tracing on Cortex-M3 Microcontrollers

The higher-power ARM micros have a bunch of debugging tools for program and data tracing, as you would expect. This feature – CoreSight Trace Macrocells – is also found in the lowly ARM Cortex M3 microcontroller. The Cortex M3 is finding its way into a lot of projects, and [Petteri] wondered why these debugging tools weren’t seen often enough. Was it a question of a lack of tools, or a lack of documentation? It doesn’t really matter now, as he figured out how to do it with a cheap logic analyzer and some decoders for the trace signals.

There are two trace blocks in most of the Cortex M3 chips: the ITM and ETM. The Instrumentation Trace Macrocell is the higher level of the two, tracing watchpoints, and interrupts. The Embedded Trace Macrocell shows every single instruction executed in the CPU.  Both of these can be read with a cheap FX2-based logic analyzer that can be found through the usual outlets for about $10. The problem then becomes software, for which [Petteri] wrote a few decoders.

To demonstrate the debugging capability, [Petteri] tracked down a bug in his CNC controller of choice, the Smoothieboard. Every once in a great while, the machine would miss a step. With the help of the trace tool and by underclocking the micro, [Petteri] found the bug in the form of a rounding error of the extruder. Now that he knows what the bug is, he can figure out a way to fix it. He hasn’t figured that out yet. Still, knowing what to fix is invaluable and something that couldn’t be found with the normal set of tools.

Hackaday Links: February 15, 2015

[Matthias Wandel], also known as the genius/demigod that can make anything out of wood, put together a mount for a Raspberry Pi and a camera. Yes, it’s just a holder for a Raspi, but some of our readers who aren’t up to speed with [Matthias] might want to check out his Youtube channel. There are hundreds of awesome videos. Report back in a month.

[Evan], the guy working his butt off for the MidAtlantic Retro Computing Hobbyists, and the organizer for the Vintage Computer Festival East (we’re going, April 17-19, Wall, NJ) has been working on a book. It’s about mobile computing, and he’s crowdfunding it.

Your keyboard has buttons, and so does and Akai MPC. Daft PunKonsole! Press the space bar for  instrumental part. There is, as yet, no video of someone doing this correctly.

Valentine’s Day was yesterday, and that means Valentine’s Day builds started rolling in on the tip line. Here’s something that’s actually a very simple circuit that’s inspired from an old ‘Electronic Games and Toys’ book by [Len Buckwalter]. Here’s a video of it in action.

A few years ago the name of the game was tiny, credit card-sized ARM boards. It had to come to this: a 64-bit board. ARM Cortex A53 running at 1.2GHz. It also costs $120 and only has a gig of RAM, but there you go.

The Teensy LC. LC Means Low Cost.

For one reason or another, we’ve been seeing a lot of builds featuring the Teensy 3.1 filtering in on the tip line recently. In retrospect, it’s somewhat obvious; it’s a good board that’s cheap and fast. Yes, somehow [Paul] hit all three in the good/cheap/fast mutually exclusive triumvirate.

Now, there’s a new Teensy. It’s the Teensy LC – Low Cost. It’s not as powerful as the Teensy 3.1, but it does give you the power of an ARM for something that’s just about as cheap as a board with an ATMega.

The chip [Paul] chose for the Teensy LC is the Freescale MKL26Z64 (datasheet here and 876-page reference manual here. PDFs of course). This is a 32-bit Cortex-M0+ running at 48 MHz with 64k of Flash and 8k of RAM. There are 27 digital I/O pins on this one, and the Teensy LC has been designed to be pin-compatible with the Teensy 3.0 and 3.1.

On board are 13 analog inputs, 8 PWM outputs, on 12-bit DAC output, three serial ports, two SPI ports, and two I2C ports. Most of the pins can drive 5mA with a few capable of driving 20mA, and there is a single 5v output pin for driving WS2812 Neopixel LEDs.

Since this is a cut-down version of the Teensy, everything available on the Teensy 3.1 just can’t fit into the BOM of the Teensy LC. The pins aren’t 5V tolerant, there’s no CAN bus, and there are only 4 DMA channels instead of 16 on the Teensy 3.1. Still, it’s a great ARM answer to the ATMega Trinket or other small dev boards.

ARM Pro Mini

Slowly but surely, the age of 8-bit micros being the first tool anyone picks up is coming to an end, and we’re seeing more and more ARM dev boards in nifty, breadboard-friendly packages. [Zapta] thought he would throw his hat into the ring with the ARM Pro Mini, a tiny little board based on the ARM M0 microcontroller.

The ARM chip on this board is the NXP LPC11 with 64 kB of Flash, 12 kB of RAM, and just enough pins to make the whole endeavor worthwhile. The board itself is extremely simple, with just enough SMD parts to be annoying to hand solder.

All the nifty bonuses of ARM boards are available on the ARM Pro Mini, including drag and drop firmware over the USB port, support for single stepping and debugging, and the IDE is a single install with NXP Eclipse/LPCXpresso. Mbed is also supported, so it’s possible to use this board with no software installs when using the online Mbed IDE.

[Zapta] has put everything you need to build this board up on his Github, and has even done a few simple ‘getting started’ tutorials, including a cool little example with a graphics library and a small OLED.

ZX81 Emulated on an mbed

This is a wonderful example of the phenomenon of “feature creep”. [Gert] was working on getting a VGA output running on an mbed platform without using (hardly) any discrete components. Using only a few resistors, the mbed was connected to a VGA display running at 640×480. But what could he do with something with VGA out? He decided to emulate an entire Sinclair ZX81 computer, of course.

With more than 1.5 million units sold, the Sinclair ZX81 was a fairly popular computer in the early ’80s. It was [Gert]’s first computer, so it was a natural choice for him to try to emulate. Another reason for the choice was that his mbed-VGA device could only output monochrome color, which was another characteristic of the ZX81.

[Gert] started by modifying a very lean Z80 emulator to make the compiled code run as efficiently as possible on the mbed. Then he went about getting a picture to display on the screen, then he interfaced an SD card and a keyboard to his new machine. To be true to the original, he built everything into an original ZX81 case.

This isn’t the first time we’ve seen a ZX81, but it is one of the better implementations of an emulated version of this system we’ve seen.

Thanks to [Jeroen] for the tip!