Microsoft’s new Xbox Series X, formerly known as Project Scarlet, is slated for release in the holiday period of 2020. Like any new console release, it promises better graphics, more immersive gameplay, and all manner of other superlatives in the press releases. In a sharp change from previous generations, however, suddenly everybody is talking about FLOPS. Let’s dive in and explore what this means, and what bearing it has on performance.
Teacher says that every time a toggle switch clunks, a hacker gets their wings. Or something like that. All we know is that there are few things the hardware tinkerer likes more than the satisfying action of a nice flip. Which by extension means this handheld game built by [Roman Revzin] and controlled by nothing more than three toggle switches will likely be a big hit at the hackerspace.
The parts list for this game, which [Roman] calls the ToggleBoss, is about as short as it gets. There’s a NodeMCU ESP8266 development board, a common SH1106 OLED display, and a trio of suitably clunky toggle switches. Add a bit of wire, toss it all into a 3D printed enclosure, and you’re halfway to thumb flicking nirvana.
Naturally, you might be wondering about the sort of games that can be played with three latching digital inputs; after all, it’s not exactly the most conventional controller layout. But there is where ToggleBoss really shines. Instead of trying to shoehorn traditional games into an exceptionally unconventional system, [Roman] has come up with several games which really embrace the limited input offered to the user.
In a platforming game not unlike the classic Mario Bros, the positions of the physical switches are mapped to virtual walls that are raised and lowered to control a character’s movement through the level. Another game shows the player three dots which correspond to the intended switch states, which they have to match as quickly and as accurately as possible. [Roman] has released the source code to his current lineup of games, which hopefully will inspire others to try their hand at creating software for this fascinating little system.
With the availability of cheap OLED displays and powerful microcontrollers, we’ve started to see more of these bespoke gaming systems. While some will undoubtedly prefer a pocket full of Nintendo’s classics, we think there’s something special about a game system that you can truly call your own.
It is absolutely no exaggeration to say that [Michael Steil] gave the Ultimate Game Boy talk at the 33rd Chaos Communication Congress back in 2016. Watch it, and if you think that there’s been a better talk since then, post up in the comments and we’ll give you the hour back. (As soon as we get this time machine working…)
We were looking into the audio subsystem of the Game Boy a while back, and scouring the Internet for resources, when we ran across this talk. Not only does [Michael] do a perfect job of demonstrating the entire audio system, allowing you to write custom chiptunes at the register level if that’s your thing, but he also gets deep into the graphics engine. You’ll never look at a low-bit Pole Position clone the same again. The talk even includes some new (in 2016, anyway) hacks on the pixel pipeline in the last 15 minutes, and a quick review of the hacking tools and even the Game Boy camera.
Why do you care about the Game Boy? It’s probably the last/best 8-bit game machine that was made in mass production. You can get your hands on one, or a clone, for dirt cheap. And if you build a microcontroller-based cartridge, you can hack the whole thing non-destructively live, and in Python! Or emulate either the whole shebang. Either way, when you’re done, you’ve got a portable demo of your hard work thanks to the Nintendo hardware. It makes the perfect retro project.
Unless you’ve held on to an old tube TV, did the hack that lets you use a light gun with an LCD via Wiimote receiver and a couple of microcontrollers, or live close to one of those adult arcades, you might be really jonesing to play Duck Hunt by now. It’s time to renew that hunting license, because [Danko] has recreated the game for NodeMCU boards, and it’s open season.
Instead of ducks, you get to shoot cute little Twitter-esque birds of varying sizes and point values, and a tiny cab-over truck if you wish. There’s a 60-second free-for-all, and then time is up and your score is displayed. As a special bonus, there’s no smug dog to laugh at you if don’t hit anything. Be sure to check out the demo and build video after the break.
This pocket console lives on a nicely-wired breadboard for now while [Danko] works on a custom PCB. He’s also planning to add support for Arduboy games in the future, and maybe a joystick instead of a D-pad of buttons.
There are a lot of myths floating around about how the old CRTs read the NES light gun, but our own [Will Sweatman] shot them down in his fascinating Duck Hunt: Reloaded write-up.
Some people like to do things the hard way. Maybe they drive a manual transmission, or they bust out the wire wrap tool instead of a soldering iron, or they code in assembly to stay close to the machine. Doing things the hard way certainly has its merits, and we are not here to argue about that. Scott Shawcroft — project lead for CircuitPython — on the other hand, makes a great case for doing things the easy way in his talk at the 2019 Hackaday Superconference.
In fact, he proved how easy it is right off the bat. There he stood at the podium, presenting in front of a room full of people, poised at an unfamiliar laptop with only the stock text editor. Yet with a single keystroke and a file save operation, Scott was able make the LEDs on his Adafruit Edge Badge — one of the other pieces of hackable hardware in the Supercon swag bag — go from off to battery-draining bright.
Code + Community
As Scott explains, CircuitPython prides itself on being equal parts code and community. In other words, it’s friendly and inviting all the way around. Developing in CircuitPython is easy because the entire environment — the code, toolchain, and the devices — are all extremely portable. Interacting with sensors and other doodads is easy because of the import and library mechanics Python is known for, both of which are growing within the CircuitPython ecosystem all the time.
CircuitPython is so friendly that it can even talk to old hardware relatively easily without devolving into a generational battle. To demonstrate this point, Scott whipped out an original Nintendo Game Boy and a custom cartridge, which he can use to play fun sounds via the Game Boy’s CPU.
It’s interesting to see the platforms on which Scott has used the power of CircuitPython. The Game Boy brings the hardware for sound and pixel generation along with some logic, but he says it’s the code on the cartridge that does the interesting stuff.
The CPU communicates with carts at a rate of 1MHz. As long as you can keep this rate up and the CPU understands your instructions, you can get it to do anything you want.
Scott’s custom cart has a 120MHz SAMD51. He spends a second explaining how he gets from Python libraries down to the wire that goes to the Game Boy’s brain — basically, the C code underneath CircuitPython accesses direct structs defined within the SAMD to do Direct Memory Access (DMA), which allows for jitter-free communication at 1MHz.
He’s using the chip’s lookup tables to generate a 1MHz signal out of clock, read, and A15 in order to send music-playing instructions to the sound register of the Game Boy’s CPU. It sounds like a lot of work, but CircuitPython helps to smooth over the dirty details, leaving behind a simpler interface.
If you want easy access to hardware no matter how new or nostalgic, the message is clear: snake your way in there with CircuitPython.
[Michael Pick] calls himself the casual engineer, though we don’t know whether he is referring to his work clothes or his laid back attitude. However, he does like to show quick and easy projects. His latest? A little portable Tetris game for $9 worth of parts. There is an Arduino Pro Mini and a tiny display along with a few switches and things on a prototyping PC board. [Michael] claims it is a one day build, and we imagine it wouldn’t even be that much.
Our only complaint is that there isn’t a clear bill of material or the code. However, we think you could figure out the parts pretty easy and there are bound to be plenty of games including Tetris that you could adapt to the hardware.
Tetris may have first arrived in the West on machines such as the PC and Amiga, but its genesis at the hands of [Alexey Pajitnov] was on an Electronika 60, a Soviet clone of an early-1970s DEC PDP-11. Thus those tumbling blocks are hardly demanding in terms of processor power, and a game can be implemented on the humblest of hardware. Relatively modern silicon such as the Atmega328 in [c0pperdragon]’s Arduino Nano Tetris console should then have no problems, but to make that assumption is to miss the quality of the achievement.
In a typical home or desktop computer of the 1980s the processor would have been assisted by plenty of dedicated hardware, but since the Arduino has none of that the feat of creating the game with a 288p video signal having four gray scales and with four-channel music is an extremely impressive one. Beside the Nano there are only a few passive components, there are no CRT controllers or sound chips to be seen.
The entire device is packaged within a clone of a NES controller, with the passives on a piece of stripboard beside the Nano. There is a rudimentary resistor DAC to produce the grey scales, and the audio is not the direct PWM you might expect but a very simple DAC created by charging and discharging a capacitor at the video line frequency. The results can be seen and heard in the video below the break, and though we’re sure we’ve heard something like that tune before, it looks to be a very playable little game.