Breadboard Computer Plays Snake On Character Display; Also In A Browser!

If building a homebrew computer on a breadboard is your thing, you’re most certainly familiar with [Ben Eater], whose design of using nothing but logic gates has served as inspiration for many replicas over the years. [visrealm] took the concept and expanded upon it, even adding a 16×2 LCD that let’s you play Snake by moving a single pixel on the character display!

Making the most of tiny resolution is impressive — it’s a difficult constraint for the game field. But there are other tricks at work as well. [visrealm] uses different intensities to distinguish between the snake and its food which is kind of a dark pixel in the demo shown after the break. But what stands out most is that the breadboard build is really only half of the story. In addition, [visrealm] built an entire emulator that resembles his actual breadboard design, which can be programmed and used via browser, giving WebAssembly a whole new meaning. While that’s convenient for anyone interested to play around with these breadboard computers, but lacks the patience to build one themselves, it also functions as the real one’s programming environment. In addition, an ESP8266 is used to load a new program directly via WiFi.

All the code and some build notes are available on GitHub, and if you’re looking for a nifty LCD emulator for your web site, there’s a standalone repository for that as well. But in case you need a better display option for your own breadboard computer, how about adding a VGA connector? And if you don’t build your own yet, it’s never too late to start.

Continue reading “Breadboard Computer Plays Snake On Character Display; Also In A Browser!”

Brain Transplant Makes One Arcade Machine Play Games From Another

We’re used to games consoles in which the same hardware plays a variety of different games, but if we were to peer inside arcade cabinets of an older vintage we’d find custom boards unique to every game. Some boards from the same manufacturers shared common hardware traits even if they weren’t identical though, and [twistedsymphony] has taken advantage of this to make one vintage Taito game — Gun & Frontier — run on the hardware for another, Ah Eikou no Koshien. It’s a fascinating tale across a forum thread, that’s well worth a read even if you will never touch a vintage arcade board.

We might expect that the tool of choice would be a logic analyser or similar, but unexpectedly the solution to this hack was found in MAME. The arcade emulator conceals a wealth of information about these boards, from which you can discover their differences and try out possible solutions. The hardware hacks are surprisingly straightforward, a few bodge wires and an extra address line for a larger ROM. A programmable logic array required dumping and rewriting to fix a graphics corruption issue and a little bit of ROM tweaking after emulating a controller problem in MAME was required, but it seems that yes, one game can run on another. Certainly less painful than the Taito hack that required a chip to be decapped.

[via r/ReverseEngineering]

Hackaday Links Column Banner

Hackaday Links: April 26, 2020

Gosh, what a shame: it turns out that perhaps 2 billion phones won’t be capable of COVID-19 contact-tracing using the API that Google and Apple are jointly developing. The problem is that the scheme the two tech giants have concocted, which Elliot Williams expertly dissected recently, is based on Bluetooth LE. If a phone lacks a BLE chipset, then it won’t work with apps built on the contact-tracing API, which uses the limited range of BLE signals as a proxy for the physical proximity of any two people. If a user is reported to be COVID-19 positive, all the people whose BLE beacons were received by the infected user’s phone within a defined time period can be anonymously notified of their contact. As Elliot points out, numerous questions loom around this scheme, not least of which is privacy, but for now, something like a third of phones in mature smartphone markets won’t be able to participate, and perhaps two-thirds of the phones in developing markets are not compatible. For those who don’t like the privacy-threatening aspects of this scheme, pulling an old phone out and dusting it off might not be a bad idea.

We occasionally cover stories where engineers in industrial settings use an Arduino for a quick-and-dirty automation solution. This is uniformly met with much teeth-gnashing and hair-rending in the comments asserting that Arduinos are not appropriate for industrial use. Whether true or not, such comments miss the point that the Arduino solution is usually a stop-gap or proof-of-concept deal. But now the purists and pedants can relax, because Automation Direct is offering Arduino-compatible, industrial-grade programmable controllers. Their ProductivityOpen line is compatible with the Arduino IDE while having industrial certifications and hardening against harsh conditions, with a rich line of shields available to piece together complete automation controllers. For the home-gamer, an Arduino in an enclosure that can withstand harsh conditions and only cost $49 might fill a niche.

Speaking of Arduinos and Arduino accessories, better watch out if you’ve got any modules and you come under the scrutiny of an authoritarian regime, because you could be accused of being a bomb maker. Police in Hong Kong allegedly arrested a 20-year-old student and posted a picture of parts he used to manufacture a “remote detonated bomb”. The BOM for the bomb was strangely devoid of anything with wireless capabilities or, you know, actual explosives, and instead looks pretty much like the stuff found on any of our workbenches or junk bins. Pretty scary stuff.

If you’ve run through every binge-worthy series on Netflix and are looking for a bit of space-nerd entertainment, have we got one for you. Scott Manley has a new video that goes into detail on the four different computers used for each Apollo mission. We knew about the Apollo Guidance Computers that guided the Command Module and the Lunar Module, and the Launch Vehicle Digital Computer that got the whole stack into orbit and on the way to the Moon, but we’d never heard of the Abort Guidance System, a backup to the Lunar Module AGC intended to get the astronauts back into lunar orbit in the event of an emergency. And we’d also never heard that there wasn’t a common architecture for these machines, to the point where each had its own word length. The bit about infighting between MIT and IBM was entertaining too.

And finally, if you still find yourself with time on your hands, why not try your hand at pen-testing a military satellite in orbit? That’s the offer on the table to hackers from the US Air Force, proprietor of some of the tippy-toppest secret hardware in orbit. The Hack-A-Sat Space Security Challenge is aimed at exposing weaknesses that have been inadvertantly baked into space hardware during decades of closed development and secrecy, vulnerabilities that may pose risks to billions of dollars worth of irreplaceable assets. The qualification round requires teams to hack a grounded test satellite before moving on to attacking an orbiting platform during DEFCON in August, with prizes going to the winning teams. Get paid to hack government assets and not get arrested? Maybe 2020 isn’t so bad after all.

Snakes And Ladders: Game Boy Emulator In Python

If a Game Boy was a part of your childhood, you were probably more than once dreaming of spending your entire school day with it. Well, they had to wait a few more years for that, but eventually in 2015, [Asger], [baekalfen], and [troelsy] made that dream reality when they created a Game Boy emulator in Python for a university project. However, it didn’t stop there, and the emulator has since grown into a full-blown open source project, PyBoy, which just reached the version 1.0 release.

Since it started out as an academic project, the three of them had to do their research accordingly, so the background and theory about the Game Boy’s internal functionality and the emulator they wrote is summarized in a report published along with the source code. There is still some work to be done, and sadly there is no sound support implemented yet, but for the most part it’s fully functional and let’s you successfully play your own extracted cartridges, or any ROM file you happen to have in your possession.

Being an emulator, you can also inspect its inner life when run in debug mode, and watch the sprites, tiles, and data as you play, plus do cool things like play the emulation in reverse as shown in the clip below. Even more so, you can just load the instance in your own Python scripts, and start writing your own bots for your games — something’s we’ve seen in action for the NES before. And if you want to dive really deep into the world of the Game Boy, you should definitely watch the 33c3 talk about it.

Continue reading “Snakes And Ladders: Game Boy Emulator In Python”

Custom Bluetooth Joystick In A Nunchuk Shell

With the Wii’s unique controller, Nintendo not only provided new gaming experiences to players, but gave hardware hackers a platform for experimentation that’s still going strong. Case in point, this modification of a third party Wii “Nunchuk” by [Giliam de Carpentier] that turns the accessory into a stand-alone wireless controller powered by a ATtiny44A.

Milling a new home for the AVR

It turns out there’s a considerable amount of free space inside the Nunchuk case, so [Giliam] found adding in the new hardware wasn’t nearly as difficult as you might expect. Of course, it helps that the diminutive SMD ATtiny44A and its support hardware are housed on a very neatly milled PCB that attaches to the back of the original board.

Most of the other hardware comes in the form of modular components, like theĀ  Bluetooth transmitter and TP4056 charge controller for the 300 mAh battery. A micro USB charging port is mounted where the original Nunchuk cable entered the case, making the whole thing look very professional.

Even if you aren’t interested in making your own controller, [Giliam] covers many interesting topics in this write-up such as handling different methods of Bluetooth connectivity and various power management techniques to eke out as much life from the relatively small battery as possible. It’s not only a fascinating read, but a great example of what thorough project documentation should look like.

In the past we’ve seen Bluetooth conversions for the Wii Nunchuck, but traditionally they left the original electronics in place. On the other side of the spectrum, we’ve also seen the internals get replaced with something as powerful as the Raspberry Pi Zero.

Continue reading “Custom Bluetooth Joystick In A Nunchuk Shell”

Cable Driven Robotic Joint

Even the oldest of mechanisms remain useful in modern technology. [Skyentific] has been messing with robotic joints for quite a while, and demonstrated an interesting way to use a pulley system in a robotic joint with quite a bit of mechanical advantage and zero backlash.

Inspired by the LIMS2-AMBIDEX robotic arm, the mechanism is effectively two counteracting sets of pulley, running of the same cable reel, with rollers allowing them to act around the bend of the joint. Increasing the mechanical advantage of the joint is simply a matter of adding pulleys and rollers. If this is difficult to envision, don’t work as [Skyentific] does an excellent job of explaining how the mechanism works using CAD models in the video below.

The mechanism is back drivable, which would allow it to be used for dynamic control using a motor with an encoder for position feedback. This could be a useful feature in walking robots that need to respond to dynamically changing terrain to stay upright, or in arms that need to push or pull without damaging anything. With properly tensioned cables, there is no backlash in the mechanism. Unfortunately cables can stretch over time, so it is something that needs to be considered when using this in a project.

Pulley systems have been with us for a very long time, and remain a very handy tool to have in your mechanical toolbox. A similar arrangement is used in the Da Vinci surgical robots to control their tiny manipulators. It would also be interesting to see this used in the already impressive robots of [James Bruton]. Continue reading “Cable Driven Robotic Joint”

Human-Powered Laser Gun Makes Battery-Free Target Practice

[Dirk] shared a fascinating project of his that consists of several different parts coming together in a satisfying whole. It’s all about wanting to do target practice, indoors, using a simple red laser dot instead of any sort of projectile. While it’s possible to practice by flashing a red laser pointer and watching where it lands on a paper target, it’s much more rewarding (and objective) to record the hits in some way. This is what led [Dirk] to create human-powered, battery-free laser guns with software to track and display hits. In the image above, red laser hits on the target are detected and displayed on the screen by the shooter.

Right under the thumb is the pivot point for the lever, and that’s also where a geared stepper motor (used as a generator) is housed. Operating the action cranks the motor.

There are several parts to this project and, sadly, the details are a bit incomplete and somewhat scattered around, so we’ll go through the elements one at a time. The first is the guns themselves, and the star of the show is his 3D printed cowboy rifle design. The rifle paints the target with a momentary red laser dot when the trigger is pressed, but that’s not all. [Dirk] appears to have embedded a stepper motor into the lever action, so that working the lever cranks the motor as a generator and stores the small amount of power in a capacitor. Upon pulling the trigger, the capacitor is dumped into the laser (and into a piezo buzzer for a bit of an audio cue, apparently) with just enough juice to create a momentary flash. We wish [Dirk] had provided more details about this part of his build. There are a few more images here, but if you’d like to replicate [Dirk]’s work it looks like you’ll be on your own to some extent.

As for the target end of things, blipping a red dot onto a paper target and using one’s own eyeballs can do the job in a bare minimum sort of way, but [Dirk] went one further. He used Python and OpenCV with a camera to watch for the red dot, capture it, then push an image of the target (with a mark where the impact was detected) to a Chromecast-enabled screen near the shooter. This offers much better feedback and allows for easier scoring. The GitHub repository for the shot detector and target caster is here, and while it could be used on its own to detect any old laser pointer, it really sings when combined with the 3D printed cowboy rifle that doesn’t need batteries.

Not using projectiles in target practice does have some benefits: it’s silent, it’s easy to do safely, there is no need for a backstop, there are no consumables or cleaning, and there is no need to change or patch targets once they get too many holes. Watch it all in action in the video embedded below.

Continue reading “Human-Powered Laser Gun Makes Battery-Free Target Practice”