Completely Owning The Dreamcast Add-on You Never Had

If you’ve got a SEGA Dreamcast kicking around in a closet somewhere, and you still have the underutilized add-on Visual Memory Unit (VMU), you’re in for a treat today. If not, but you enjoy incredibly detailed hacks into the depths of slightly aged silicon, you’ll be even more excited. Because [Dmitry Grinberg] has a VMU hack that will awe you with its completeness. With all the bits in place, the hacking tally is a new MAME emulator, an IDA plugin, a never-before ROM dump, and an emulator for an ARM chip that doesn’t exist, running Flappy Bird. All in a month’s work!

The VMU was a Dreamcast add-on that primarily stored game data in its flash memory, but it also had a small LCD display, a D-pad, and inter-VMU communications functions. It also had room for a standalone game which could interact with the main Dreamcast games in limited ways. [Dmitry] wanted to see what else he could do with it. Basically everything.

We can’t do this hack justice in a short write-up, but the outline is that he starts out with the datasheet for the VMU’s CPU, and goes looking for interesting instructions. Then he started reverse engineering the ROM that comes with the SDK, which was only trivially obfuscated. Along the way, he wrote his own IDA plugin for the chip. Discovery of two ROP gadgets allowed him to dump the ROM to flash, where it could be easily read out. Those of you in the VMU community will appreciate the first-ever ROM dump.

On to doing something useful with the device! [Dmitry]’s definition of useful is to have it emulate a modern CPU so that it’s a lot easier to program for. Of course, nobody writes an emulator for modern hardware directly on obsolete hardware — you emulate the obsolete hardware on your laptop to get a debug environment first. So [Dmitry] ported the emulator for the VMU’s CPU that he found in MAME from C++ to C (for reasons that we understand) and customized it for the VMU’s hardware.

Within the emulated VMU, [Dmitry] then wrote the ARM Cortex emulator that it would soon run. But what ARM Cortex to emulate? The Cortex-M0 would have been good enough, but it lacked some instructions that [Dmitry] liked, so he ended up writing an emulator of the not-available-in-silicon Cortex-M23, which had the features he wanted. Load up the Cortex emulator in the VMU, and you can write games for it in C. [Dmitry] provides two demos, naturally: a Mandlebrot set grapher, and Flappy Bird.

Amazed? Yeah, we were as well. But then this is the same guy emulated an ARM chip on the AVR architecture, just to run Linux on an ATMega1284p.

Conventional Current Vs. Electron Current

Electric current comes in many forms: current in a wire, flow of ions between the plates of a battery and between plates during electrolysis, as arcs, sparks, and so on. However, here on Hackaday we mostly deal with the current in a wire. But which way does that current flow in that wire? There are two possibilities depending on whether you’re thinking in terms of electron current or conventional current.

Electron current vs. conventional current
Electron current vs. conventional current

In a circuit connected to a battery, the electrons are the charge carrier and flow from the battery’s negative terminal, around the circuit and back to the positive terminal.

Conventional current takes just the opposite direction, from the positive terminal, around the circuit and back to the negative terminal. In that case there’s no charge carrier moving in that direction. Conventional current is a story we tell ourselves.

But since there is such a variety of forms that current comes in, the charge carrier sometimes does move from the positive to the negative, and sometimes movement is in both directions. When a lead acid battery is in use, positive hydrogen ions move in one direction while negative sulfate ions move in the other. So if the direction doesn’t matter then having a convention that ignores the charge carrier makes life easier.

Saying that we need a convention that’s independent of the charge carrier is all very nice, but that seems to be a side effect rather than the reason we have the convention. The convention was established long before there was a known variety of forms that current comes in — back even before the electron, or even the atom, was discovered. Why do we have the convention? As you’ll read below, it started with Benjamin Franklin.

Continue reading “Conventional Current Vs. Electron Current”

PLC Vs Arduino Show Down

Hackaday readers don’t need an introduction to the Arduino. But in industrial control applications, programmable logic controllers or PLCs are far more common. These are small rugged devices that can do simple things like monitor switches and control actuators. Being ruggedized, they are typically reasonably expensive, especially compared to an Arduino. [Doug Reneker] decided to evaluate an Arduino versus a PLC in a relatively simple industrial-style application.

The application is a simple closed-loop control of flow generated by a pump. A sensor measures flow for the Arduino, which adjusts a control valve actuator to maintain the specified setpoint. The software uses proportional and integral control (the PI part of a PID loop).

Continue reading “PLC Vs Arduino Show Down”

The Cheapest Meter On Banggood

According to [pileofstuff], he didn’t really need another digital multimeter. However, when he saw a DT-832 meter on Banggood for the princely sum for $4.99 he wondered just what kind of meter you’d get for that price. You can see his conclusions in his recent video (below). He does make it clear, by the way, that he wasn’t paid for the review or given the meter. He just decided to see what $5 would buy in a meter.

Depending on your predisposition to cheap Asian electronics, you may or may not be surprised. After all, for $5 you can’t expect a top-of-the-line lab instrument. The device measures AC and DC voltage, DC amperage, ohms, transistor beta, and has a diode tester and continuity buzzer. It also has some frequency measurement capability. You can’t be too surprised it doesn’t auto range, though. To be fair, although he mentions Banggood as the source of the meter, a quick Google search shows you can get them from all the usual sources, and the price is down to $3.73 as long as you let them ship it from Canada.

Continue reading “The Cheapest Meter On Banggood”

Make Some Noise With The Typewriter Keyboard

Are you an angry programmer? Do you get the frequent urge to smash the return key or space bar after finishing every single line of code? Well then [Konstantin Schauwecker]’s typewriter keyboard is just the thing for you. In his project, [Konstantin] hacked a German Olympia Monica typewriter into a USB keyboard.

The project uses no less than 50 photo interrupters mounted on a custom PCB that mounts directly under the typewriter itself. The circuit board is so designed that the hammer arms take a position in obstructing the opto-interrupters. Every time a key is pressed, the corresponding device sends a signal to an Arduino.

In order to enable the wiring of 50 signals to an Arduino Leonardo, multiplexers and decoders are employed. CD4515, 4×16 line decoders work to activate the optical signals and the CD4067, 16×4 multiplexers are used to return the scans. This forms the traditional scanning keyboard matrix and the whole thing is managed in the Arduino code (available as a zip file).

This project can be a great starting point for anyone who wants to hack their grandpa’s old typewriter or make one in order to annoy the guy sitting next to them. Check out the video below for a demo and teardown and if you prefer Raspberry Pis then check out this mechanical typewriter hack.

Radiohead’s Greatest Hits For The ZX Spectrum

We’ll admit that only a few of us here at Hackaday are Radiohead fans. However, we all couldn’t help but appreciate their new remastered release of OK Computer. The new release contains some bonus material. At the end of the bonus material is a strange noise that turns out to be a ZX Spectrum Basic program.[OooSLAJEREKooO] managed to find it, play it, and record it for all of us (see video below).

The two minutes of tones might sound unfamiliar to a modern computer user, but back in the day, audio tones were used to communicate over phone lines and to load and save programs via cassette tape recorders. You might be asking yourself: why the ZX Spectrum? Radiohead is from the UK, but that’s not the complete picture. Of all home computers, the ZX Spectrum had a higher effective bit rate when storing data on tape. Basically, it takes less time (and less tape) to put it on a Speccy than a C64 or Apple.

Continue reading “Radiohead’s Greatest Hits For The ZX Spectrum”

Hackaday Links Column Banner

Hackaday Links: July 16, 2017

[Carl Bass] has joined the board at Formlabs. This is interesting, and further proof that Print The Legend is now absurdly out of date and should not be used as evidence of anything in the world of 3D printing.

Here’s something cool: a breadboardable dev board for the Parallax Propeller.

Finally, after years of hard work, there’s a change.org petition to stop me. I must congratulate [Peter] for the wonderful graphic for this petition.

Want some flexible circuits? OSHPark is testing something out. If you have an idea for a circuit that would look good on Kapton instead of FR4, shoot OSHPark an email.

SeeMeCNC has some new digs. SeeMeCNC are the creators of the awesome Rostock Max 3D printer and hosts of the Midwest RepRap Festival every March. If you’ve attended MRRF, you’re probably aware their old shop was a bit on the small side. As far as I can figure, they’ll soon have ten times the space as the old shop. What does this mean for the future of MRRF? Probably not much; we’ll find out in February or something.

Rumors of SoundCloud’s impending demise abound. There is some speculation that SoundCloud simply won’t exist by this time next year. There’s a lot of data on the SoundCloud servers, and when it comes to preserving our digital heritage, the Internet Archive (and [Jason Scott]) are the go-to people. Unfortunately, it’s going to cost a fortune to back up SoundCloud, and it would be (one of?) the largest projects the archive team has ever undertaken. Here’s your donation link.

If you’re looking for a place to buy a Raspberry Pi Zero or a Pi Zero W, there’s the Pi Locator, a site that pings stores and tells you where these computers are in stock. Now this site has been expanded to compare the price and stock of 2200 products from ModMyPi, ThePiHut, Pi-Supply, and Kubii.