Is This The World’s Smallest Nintendo 64?

A niche activity in console fandom is the shrinking of full-size consoles to smaller formats, taking what could once only be played on the family TV into portable formats that fit in the pocket. In a particularly impressive example of the art, [GmanModz] has made what he claims is the world’s smallest portable Nintendo 64. What makes it particularly noteworthy is that he’s done it not with an emulator or a custom PCB, instead there is a real Nintendo 64 motherboard in there having undergone a significant quantity of trimming.

The video below the break goes into detail on the state of the art in these mods, and shows how he has eschewed the latest tech and instead restricted himself to only using commercially available breakout PCBs and off the shelf modules. The N64 board trimmed down particularly aggressively, requiring a lot of fine magnet wire soldering for the various PCBs replacing the parts removed. The cartridge slot is brought out to the back of the board at a right angle, jutting out from the rear of the 3D printed case above a space for an 18650 cell and allowing an original game cartridge to be played. There is a microcontroller to facilitate a few compromises on lesser uses of the Nintendo control pads, but the result is a fully playable mini handheld console. He does admit that “The battery life sucks, it’s uncomfortable to hold […] But hey — it fits in my pocket. Does your N64?” We can’t fault him on that.

This isn’t the first portable N64 we’ve seen, but will it hold the title of smallest for long? Only time will tell.

Continue reading “Is This The World’s Smallest Nintendo 64?”

Building A Smash Bros. Controller With Keyswitches

When it comes to competitive fighting games, having the right controller in your hands can make the difference between victory and defeat. Many tournaments have strict rules around controllers for this very reason. [Akaki Kuumeri] has recently put together a custom controller, aimed at maximising performance in Super Smash Brothers: Ultimate on the Nintendo Switch. (Video, embedded below.)

The build is assembled in an attractive 3D-printed body, made to be reminiscent of the original Nintendo Entertainment System controller. Inside, a cheap third-party Gamecube controller is used to interface with the console. Mechanical keyboard switches are used to replace the buttons and even the analog sticks, with a special modifier key that enables walking and running across the stage. This is pulled off with a handful of resistors emulating the intermediate position of the analog sticks, and makes pulling off advanced combos easier.

It’s a fun build, and we can imagine the precise digital key inputs having some benefits over analog controls. It also pays to note that such a build wouldn’t be as easy without the ready supply of mechanical key switches thanks to the custom keyboard subculture. We’ve seen these satisfying switches cropping up in many controller builds in recent times.

Continue reading “Building A Smash Bros. Controller With Keyswitches”

A SNES, Ray Tracing

A trick famously used by Nintendo to keep its slowly aging SNES console fresh against newer competition was to produce new games with extra support chips in the cartridge to push out hitherto-unthinkable performance. Chips such as the famous SuperFX gave us 3D polygonal graphics, but it would have been a few more years before even much faster platforms could achieve real-time ray-tracing. Nintendo may not have managed it, but here in 2020 [Ben Carter] has a SNES on his bench rendering a complex 3D ray-traced world.

Ray tracing refers to the practice of rendering a scene with accurate lighting by tracing the rays of light that go towards making each pixel. It can achieve results that even approach photorealism, but it remains an extremely computationally intensive job for any computer. To do this with a SNES he hasn’t resorted to a modern computer like the excellent Raspberry-Pi-based NES DOOM cartridge, instead he’s tried to create something that might have graced a Nintendo custom chip back in the 1990s. The tool may be a thoroughly modern DE10-Nano FPGA dev board, but what it implements could conceivably have been made as a 1990s-spec ASIC. In it are three ray tracing cores that do the work, but the final rendering is handled by the SNES itself. At 200 x 160 pixels and 256 colours it’s no graphical powerhouse, but the maximum frame rate of 30 fps makes it no slouch for the day. The video below the break supplies extra detail.

Perhaps an unexpected takeaway of the rendered scene lies in how of its era it seems. It comes from an age in which checker-board floors, mirrored balls, and azure blue skies looked so futuristic, and just before the likes of Toy Story redefined what the general public might expect from 3D rendering. If Nintendo had produced a ray-traced SNES game using a chip like this one, it would have certainly been a defining moment for gaming in that decade.

Continue reading “A SNES, Ray Tracing”

A Straightforward Guide To Unlocking The Nintendo Game And Watch

Nintendo’s reborn tiny handheld game has certainly attracted the attention of hardware hackers, and we’ve been treated to a succession of exploits as its secrets have been one by one unlocked. With relatively straightforward hardware it conceals potential far beyond a simple Mario game or two, and it’s now at the stage of having a path to dumping both its SPI Flash and internal Flash, unlocking its processor, and running arbitrary code. The process of unlocking it is now atraightforward enough to warrant a HOWTO video, to which [stacksmashing] has treated us. It’s early days and this is still touted as for developers rather than gamers, but it serves to show where work on this console is going.

The console’s STM32 architecture means that programming hardware is straightforward enough to find, though we’re cautioned against using the cheap AliExpress type we might use with a Blue Pill or similar. Instead the snap-off programmer that comes with an STM Nucleo board is a safer choice that many people are likely to have already.

The relative simplicity of the process as seen in the video below must conceal an immense amount of work from multiple people. It’s a succession of scripts to sequentially unlock and back up the various firmwares with STM payloads for each step. Finally the STM32 itself is unlocked, and the backed-up Nintendo firmware can be returned to the device or instead a custom firmware can be created. Aside from the DOOM we’ve already seen there are work-in-progress NES and Game Boy emulators, and fascinatingly also work on bare-metal games.

Given the lack of custom chips in this console it is easily possible that its hardware could be directly cloned and that Nintendo might have unintentionally created a new general purpose hacker’s handheld gaming platform. There are a few hardware works-in-progress such as increasing the SPI Flash size and finding the unconnected USB pins, so we look forward to more exciting news from this quarter.

Continue reading “A Straightforward Guide To Unlocking The Nintendo Game And Watch”

DOOM Running On The Nintendo Game & Watch

Today the newly-released Nintendo Game & Watch can play DOOM. Sure, there are caveats…this is a watered down version due to the restraints of the hardware itself. But the important thing is that this shows the hardware has been fully owned. This is code written to replace the firmware that ships on the STM32 within, and that makes this a gorgeous little hardware platform that is completely open to homebrew hacking.

Honestly, you had to assume this was going to happen pretty quickly considering the effort being thrown into it. We first reported on Tuesday that the EEPROM memory which stores the ROMs on the Game and Watch had been decoded. Shortly after that was published, [stacksmashing] and [Konrad Beckmann] were showing test patterns on the display and mentioning the audio was working as well. Turns out they were able to dump the stock firmware despite the chip being security locked.

We’ll have to wait for more details on exactly how to dump firmware, but [stacksmashing] drops enough of a mention in the video below to confirm the obvious. A common approach to dumping code from a locked microcontroller is to find a vulnerability that grants execution of custom code. Being able to run just a few lines of your own code is enough set up something as simple as looping through all internal flash memory addresses and dumping them over a few GPIO pins. In this case our two heroes discovered some ARM code was being loaded from the EEPROM onto the STM32, and managed to inject their own directives to perform the dump. They have promised full details soon.

What we have today is a pretty tricky hack not just to load code, but to get DOOM to run on meager hardware specs. Notably, 128 k of SRAM and 1.3 MB of external RAM. There’s also a bottleneck with the 1.1 MB of FLASH for storing game files. The textures were stripped down, and memory allocation was rewritten, but the proof of concept is there and the game runs. Homebrew, here we come!

Continue reading “DOOM Running On The Nintendo Game & Watch”

Reverse Engineering A PokeWalker

The PokeWalker is part of Nintendo’s long quest to get children (and likely some adults) walking and exercising. There’s the PokeWalker, Pokemon Pikachu, PokeBall Plus, Pokemon Pikachu 2, Pokemon mini, and of course Pokemon Go. Despite being out a decade, there wasn’t a ROM dump for the device and there was minimal documentation on the communication protocol. [Dmitry Grinberg] took it upon himself to change all that and crack the PokeWalker open.

At its heart, the PokeWalker is just a pedometer with an IR port and a 96×64 grayscale screen. It came out in 2009 to accompany the new Pokemon release for the Nintendo DS. Cracking open the device revealed a 64KB EEPROM, a Renesas H8/38606R CPU, a Bosch BMA150 accelerometer, and a generic IR transceiver. The CPU is particularly interesting as in addition to being quite rare, it has a mix of 8, 16, and 32 bits with 24-bit pointers. This gives it a 64K address space. While the CPU is programmable, any attempt to do so erases the onboard flash. The communication protocol packets have an 8-bit header that precedes each packet. The header has a checksum, a command byte, and four bytes of session id, and an unused byte. Curiously enough, every byte is XOR’d with 0xAA before being broadcast.

One command is an EEPROM write, which uses back-referencing compression. Each chunk of data to be written is packaged into 128-byte chunks, though 128 bytes likely won’t be sent thanks to the compression. The command can theoretically reference 4k bytes back, but in practice, it can only reference 256 bytes back. It was this command that laid the foundation for the exploit. By carefully crafting the command to send, the command can overflow the decompression buffer and into executable code. Only a few bytes can be overflowed so the payload needs to be carefully crafted. This allowed for an exploit that reads the system ROM and broadcasts it out the IR port. Only 22k bytes can be dumped before the watchdog reboots the device. By changing the starting address, it was easy to do multiple passes.

After the ROM was stitched together from the different passes, the different IR commands were analyzed. In particular, a command was found that allows direct writes into RAM. This makes for a much easier exploit as you can write your exploit, then override a pointer in the event table, then have the exploit revert the event table once the system naturally jumps to your exploit.

[Dmitry] finishes off this amazing exploit by writing a PalmOS app to dump the ROM from a PokeWalker as well as modify the system state. PalmOS was chosen as it is an easy and cheap way to have a programmable IR transciever. All in all, a gorgeous hack with a meticulous writeup. This isn’t the first video game accessory that’s been reverse engineered with a scrupulous writeup, and we’re sure it won’t be the last.

Continue reading “Reverse Engineering A PokeWalker”

Exploring The New Super Mario Game & Watch

Nintendo has revived the classic Game & Watch, this time in glorious full-color and running the same Super Mario Bros that first graced the Nintendo Entertainment System (NES) back in 1985. Even though it’s only been on the market for a few days, [stacksmashing] has already made some impressive progress towards unlocking the full potential of this $50 retro handheld.

It will come as no surprise to the average Hackaday reader that what we’re looking at here is a pocket-sized NES emulator, but until [stacksmashing] cracked his open, nobody was quite sure what kind of hardware is was running on. Thankfully there wasn’t an epoxy blob in sight, and all of the chips were easily identifiable. Armed with the knowledge that the Game & Watch is running on a STM32H7B0 microcontroller with a nearby SPI flash chip holding the firmware, it was just a matter of figuring out how the software worked.

Connecting to the SWD header.

It didn’t take long to find that an unpopulated header on the board would give him access to the Serial Wire Debug (SWD) interface of the STM32, though unfortunately he found that the chip’s security mode was enabled and he couldn’t dump the firmware.

But he was able to dump the RAM through SWD, which allowed him to identify where the Super Mario Bros NES ROM lived. By connecting the SPI flash chip to a reader and comparing its contents with what the system had in RAM, [stacksmashing] was able to figure out the XOR encryption scheme and come up with a tool that will allow you to insert a modified ROM into an image that can be successfully flashed to the chip.

So does that mean you can put whatever NES ROM you want on the new Game & Watch? Unfortunately, we’re not quite there yet. The emulator running on the device has a few odd quirks, and it will take some additional coaxing before its ready to run Contra. But we’ve seen enough of these devices get hacked to know that it’s just a matter of time.

Continue reading “Exploring The New Super Mario Game & Watch”