Emulators 101: How To Write A Program That Functions Like An NES CPU

We’d bet everyone reading this article has played a game on an emulator at some time or another. And you may have a base idea of how those emulators work. But we’d wager the vast majority of you are clueless about the actual implementation of game emulators (we know we are). But that has all changed after seeing this demonstration of how [Bisqwit] wrote his own NES emulator. The description doesn’t cover anything more than the basics of writing code that emulates the NES CPU hardware itself. But it’s presented in such a way that makes it quite easy to understand for anyone who has a basic knowledge of programming. He starts with a switch statement for handling the processor’s opcodes and then moves through piece by piece showing how he refined his code to make it work while keeping it readable. We think this is a great teaching method and appreciate the time he put into producing this tutorial.

The explanation starts about 4:22 into the video which is embedded after the break. You’ll also find the first two demo videos there. Those involve mostly fast-motion text editing of the emulator coding process with some gameplay tests at the end of the second video.

Continue reading “Emulators 101: How To Write A Program That Functions Like An NES CPU”

Arduino Voice Changer Turns You Into [Vader]

Halloween is just around the corner, so of course we’re looking forward to a bunch of awesome costumes put together by Hackaday readers. In an effort to match his voice to his costume, [Phil Burgess] over at Adafruit (and former Hackaday alumnus) put together an Arduino-powered voice changer to give his voice the gravitas of [James Earl Jones] or the lightheartedness of a member of the Lollipop Guild.

If you’ve ever played with a turntable, you’ll know playing a 33 RPM record at 45 or 78 RPM turns your treasured copy of Dark Side of the Moon into a lighthearted aural experience with a pitch that is much too high. Likewise, playing a single at 33 or 16 RPM means those once dulcet tones are now recordings of tormented souls in an acoustic hell.

[Phil]’s voice changer operates on the same principle by recording sounds from a microphone into a circular array and playing them back at a different rate; faster if the desired effect is a Munchkin, and slower if this year’s Halloween costume will be a Sith lord.

The completed build incorporates a 10k pot to dynamically change the timbre of the voice changer, as well as an Adafruit Wave Shield to play back a few pre-recorded sounds of lightsabers clashing. In all, a very cool project for your Halloween costume that’s also a very good introduction to DSP and real-time audio modifications with a microcontroller.

Continue reading “Arduino Voice Changer Turns You Into [Vader]”

Tripod Mount Anything!

webcam-mounted

[Shawn] wrote in to tell us about his extremely simple method he used for mounting a webcam on a tripod. His article explains it better, but the basic premise is to glue a 1/4 – 20 nut onto the bottom of it. The hack-worthiness of this could be in question, but the technique could come in handy at some point.

After seeing this tip, I was reminded of a slightly crazier, if effective mount that I made for my state of the art Env2 phone. Referenced in a links post in March, it was made of a 2×4 with a 1/2 inch slot milled in it.  After some thought, it was drilled and tapped for a 1/4 – 20 bolt in the other side to mount it on a tripod. So this could be an option in very limited circumstances.

On the other hand, if you want something a bit more hack-worthy, why not check out this motorized camera rig that we featured in July. Sure, it’s more complicated than gluing a nut onto a webcam, but at least it still uses 2 x 4s in it’s mounting hardware!

Still More Software Defined Radio Fun On The Mac

Even though the world of software defined radio started out as a Linux-only endeavor, several recent software releases have put the ball fully into the court of OS X users. [hpux735]’s new Cocoa Radio release provides a (nearly) fully functional software defined radio for anyone with a USB TV tuner and a mac.

Earlier this week, we saw (and tested)  [Elias]‘ port of gqrx and were reasonably impressed. [hpux735]’s app does the same job and also provides the source so you can compile it yourself.

Previously, [hpux735] ported the osmocom driver for these RTL2832U-based USB TV tuner dongles to the Mac and wrote a small Cocoa driver. The new Cocoa Radio software uses this driver and adds all the features you’d expect from a software radio package; in the title pic for this post, you can see a top 40 radio station near my house and their insipid hatred of dynamic range.

[hpux735] posted a few videos of his development process. You can check those out after the break.

Continue reading “Still More Software Defined Radio Fun On The Mac”

LED Matrix Pendants

If you want to mess around with some microcontrollers but don’t really have a purpose in mind this project is perfect for you. It’s cheap, easy to assemble, and there’s blinking LEDs! [TigerUp] shows us how he  put together some LED matrix pendants using just five components.

He calls the project Tiny Matrix, which is fitting as the pendant outline is barely 0.5″ by 0.7″. On the back an ATtiny2313 chip has been soldered directly to the legs of the LED display. They just happen to line up with I/O pins on the chip which makes for super simple soldering. Power comes from a coin-cell which is connected to the pendant by a red and black wire which make up the necklace for the device. The last two components not yet mentioned are a momentary push switch for changing modes, and a pull-up resistor on the reset pin. The bill of materials rings in at $4 and his firmware offers up nine different modes as you can see in the clip after the break.

[TigerUp] was inspired by this 8×8 matrix project.

Continue reading “LED Matrix Pendants”

Stellaris Launchpad Library To Drive The TM1638 UI Board

For those that grabbed one of these TM1638 UI boards you can now easily use it with your Stellaris Launchpad. [Dan O] took it upon himself to publish an ARM library for the UI board.

There’s not a lot of new stuff to talk about here. We’ve already seen this being driven by an FPGA. [Dan] also links to both an Arduino and an MSP430 library for the board. The one thing that is good to know is that the board seems to run fine from the 3.3V supplied by the Stellaris Launchpad.

The ARM chip has four different hardware SPI modules which could have been used to drive this display. But [Dan] opted to bit bang instead. This give him more flexibility, like easily changing the pin mapping and foregoing the need for external components. All it takes is direct connections from three I/O pins which are used for clock, data in, and data out. We’ve embedded the obligatory demo video after the break.

Continue reading “Stellaris Launchpad Library To Drive The TM1638 UI Board”

Nook Simple Touch As A Glider Computer

Look at the beautiful screen on that Nook Simple Touch. It has a lot of advantages over other hardware when used as a glider computer running the open source XCSoar software. The contrast of the display is excellent when compared to an LCD or AOMLED. That’s quite important as gliding through the wild blue yonder often includes intense sunlight. The display is also larger than many of the Android devices that have been used for this purpose. There are a few drawbacks though. One is that unlike other Android devices, this doesn’t have a GPS module built into it. But the price point makes up for the fact that you need to source an external module yourself.

This isn’t the first time we’ve seen the device used as a navigational display. This other hack put a simple touch on a sailboat for the same direct-sunlight-readability reason. For $100, and with the ability to root the system for use as an Android device, we expect to see this to keep popping up all over the place as a simple interface for a multitude of projects.

After the break you can see a video comparing the software running on a Nook display to one on a Dell Streak 5 LCD tablet.

Continue reading “Nook Simple Touch As A Glider Computer”