AI Bot Plays Castlevania So You Don’t Have to

We’re not allowed to have TV here in the Hackaday Wonder Bunker, but occasionally we’ll pool together the bandwidth credits they pay us in and gather ’round the old 3.5 inch TFT LCD to watch whatever Netflix assures us is 93% to our liking. That’s how we found out they’ve made a show based on, of all things, one of the Castlevania games for the NES. We wanted to play the game to understand the backstory, but since it hails from the era of gaming where primitive graphics had to be supplemented with soul-crushing difficulty, we didn’t get very far.

But thanks to a very impressive project developed by [Michael Birken] maybe we’ll have it all figured out by the time we’ve saved enough credits to watch Season 2 (no spoilers, please). The software, which he’s quick to point out is not an example of machine learning, is an attempt to condense his personal knowledge of how to play Castlevania into a plugin for the Nintaco NES emulator. The end result is CastlevaniaBot, which is capable of playing through the original Castlevania from start to finish without human intervention. You can even stop and start it at will, so it can play through the parts you don’t want to do yourself.

[Michael] started this project with a simple premise: if he could make a bot successfully navigate the many levels of Dracula’s castle, then getting it to kill a few monsters along the way should be easy enough. Accordingly, he spent a lot of time perfecting the path-finding for CastlevaniaBot, which included manually playing through the entire game in order to get an accurate map of the background images. These images were then analyzed to identify things like walls and stairs, so the bot would know where it could and couldn’t move protagonist Simon Belmont. No matter what the bot is doing during the game it always considers where it is and where it needs to be going, as there’s a time limit for each stage to contend with.

Once CastlevaniaBot knew where it was, where it was going, and how long it had to get there, [Michael] moved onto combat. Targets on screen are identified and their severity determined by checking the game’s Object Attribute Memory (a section of the NES’s video memory used to hold sprites) every frame. There are different strategies required to defeat the various creatures Simon faces in the game, and CastlevaniaBot knows them all. The bot will deploy the appropriate strategy for whatever the highest priority enemy is, while still considering the secondary targets and the ultimate goal of getting to the end of the stage before time runs out. All while the emulator runs at roughly 60 frames per second.

If all this sounds interesting to you, we recommend you read the exceptionally detailed write-up that [Michael] has prepared about the development of CastlevaniaBot and how it works as, frankly, he knows a lot more about the ins and outs of it than we ever will. Of course, if you’d rather just download CastlevaniaBot and watch it do its thing, that’s fine too.

This isn’t the first time we’ve seen somebody hack together an automated system for playing games for them, but such exploits are usually done on more recent games and systems. Like the Teensy microcontroller that will grind Zelda: Breath of the Wild minigames for you, or the button-tapping servo that dodges attacks in Final Fantasy X for the PlayStation Vita.

Editing GameCube Memory With A Raspberry Pi

[James] has been working with GameCubes, emulators, and Animal Crossing for a while now, and while emulators are sufficient, he’d like to play on real hardware. This means he needs to write to a GameCube memory card. While there are a few options to do this, they either require a Wii or hardware that hasn’t been made in a decade. The obvious solution to this problem is to reverse engineer the GameCube memory card to read and write the memory with a Raspberry Pi.

There’s an incredible amount of unofficial documentation for every console, and [James] stumbled upon a GC-Forever forum post that describes the electrical signals inside the GameCube memory card. There’s your standard compliment of power and ground pads, along with a DI, DO, CS, Clk, and an INT pin. [James] broke out the magnet wire and soldered up a pin header to these cards. Data was then captured with a Salae logic analyzer, and lo and behold, it looked like a standard SPI protocol.

With the low-level protocol worked out, [James] checked out the Yet Another GameCube Documentation to get the main functions allowed through the SPI bus. The ‘read block’, for instance, starts off with 0x52 and an address offset. A little bit of Python on a Raspberry Pi meant [James] could read and write the entire GameCube memory card. Right now the code is a little rough, but all the work is available should you want to edit your Animal Crossing save with a Raspberry Pi.

This work follows [James]’ earlier work on getting into the debug menu of Animal Crossing, allowing him to add items to his inventory. With this latest advancement, it’s only a matter of time before we plug Raspberry Pis directly into a GameCube.

NBA Jam ROM Hack on SNES is Heating Up

It’s a rare game that is able to bridge the gap between sports game fans and those that identify as hardcore gamers. Midway was able to bring those two groups onto common ground when they released NBA Jam to arcades in 1993. The game was an instant hit and was ported to 16-bit home consoles that same year. Compromises were made during those ports, so an attempt to make them more inline with the arcade release came in the form of NBA Jam: Tournament Edition a year later. However, in the heart of [eskayelle] NBA Jam: TE on the Super Nintendo didn’t go far enough. Now they have released a ROM hack that completely reworks NBA Jam: TE, and it’s called the “Double Z Mod”.

The Original NBA Jam Ball from the Title Screen
The original NBA Jam ball (courtesy of Steve Lin)

The concept behind the ROM hack was to bring about the NBA Jam game that fans deserved. All facets of pop culture from the early 90s were mixed in (not just former Presidents). According to the ROM hack’s notes, some of the things that were packed into the mod include:

• Assets from the original game have been restored, such as the Mortal Kombat banners.
• Modified certain players to give them a more “arcadey” feel.
• Soar to new heights with Air Jordan!
• Play as “The Worm”, Dennis Rodman, on at least four teams.
• Forget the Rookies, now play as the 1992 Dream Team.
• Tons of new secret characters including: Hulk Hogan, David Hasselhoff, Arnie as the T-800, and more.
• Expanded rosters are now as easy as inputting the “Konami code”

(Hint: B, A, B, A, Up, Down, B, A, Left, Right, B, A at the title screen menu)

In a gesture to give back to the ROM hacking community, [eskayelle] went as far to provide a collection of helpful tools to help potential SNES ROM hackers build their own NBA Jam: TE remixes. The document details ways to alter player photos, team colors, stats, and cosmetic tweaks. Since the Double Z mod focuses on being as 90s as possible, maybe this collection of tutorials will lead to a current NBA roster update.

To play the NBA Jam TE Double Z mod, you can use devices like the Retrode that allow easy dumping of an original cartridge onto a PC. From there the dumped ROM can be patched using an IPS patcher, like LunarIPS, which is as simple as locating two files in a browser window and hitting “Apply Patch”. In case you needed to see the Double Z mod in action, there is the clip below.

Continue reading “NBA Jam ROM Hack on SNES is Heating Up”

GBA on the Big Screen: FPGA Delivers HDMI and Every Feature Imaginable

The concept of creating a gaming portable out of a home console has been around for some time, but it’s hardly seen the other way around. There have been a few devices that dared to straddle the line (i.e., Sega Nomad, Nintendo Switch, etc.), but the two worlds typically remain separate. [Stephen] looked to explore that space by attempting to turn the Game Boy Advance into a “big boy” console. The FPGA-based mod kit he created does just that, and comes complete with controller support and digital video output in 720p over a mini HDMI cable.

The kit itself was designed specifically for the original model GBAs containing the 40-pin LCD ribbon cable. These original models were the early run of non-backlit screens that are also denoted by a motherboard designation that can be seen by peering into the battery compartment. RGB signals are read directly from the GBA LCD socket by removing the handheld’s screen in favor of a fresh flat flex ribbon cable. This method enables a noise-free digital-to-digital solution as opposed to the digital-to-analog output of Nintendo’s own Game Boy Player add-on for the GameCube.

At an astonishing 240×160 native resolution, GBA video is scaled by the FPGA up to 5x within a 720p frame. Of course some of the image is cutoff in the process, so options for 4x and 4.5x scales were included. As a wise man once said, “Leave no pixel behind”. Since Nintendo designed the GBA clock to run at 59.7276 Hz, [Stephen] removed the oscillator crystal in order to sync the refresh rate to a more HDMI friendly 60 Hz. This means that the mod kit overclocks GBA games ever so slightly, though [Stephen] included a GBA cycle accurate mode as an option if your display can handle it.

The video below is [Stephen]’s initial test using a SNES controller. Tests must have gone well, because he decided to incorporate a SNES controller port in the final design. Now all those Super Nintendo ports on the GBA are back home once again thanks to this “consolizer” kit.

Continue reading “GBA on the Big Screen: FPGA Delivers HDMI and Every Feature Imaginable”

Wheel of Fortune Gets Infinite Puzzles on NES

Wheel of Fortune is a television game show, born in the distant year of 1975. Like many popular television properties of the era, it spawned a series of videogames on various platforms. Like many a hacker, [Chris] had been loading up the retro NES title on his Raspberry Pi when he realized that, due to the limitations of the cartridge format, he was playing the same puzzles over and over again. There was nothing for it, but to load a hex editor and get to work.

[Chris’s] initial investigation involved loading up the ROM in a hex editor and simply searching for ASCII strings of common puzzles in the game. Initial results were positive, turning up several scraps of plaintext. Eventually, it became apparent that the puzzles were stored in ASCII, but with certain most-significant-bits changed in order to mark the line breaks and ends of puzzles. [Chris] termed the format wheelscii, and developed an encoder that could turn new puzzles into the same format.

After some preliminary experimentation involving corrupting the puzzles and testing various edge cases, [Chris] decided to implement a complete fix. Puzzles were sourced from the Wheel of Fortune Puzzle Compendium, which should have plenty of fresh content for all but the most addicted viewers. A script was then created that would stuff 1000 fresh puzzles into the ROM at load time to minimize the chances of seeing duplicate puzzles.

ROM hacks are always fun, and this is a particularly good example of how simple tools can be used to make entertaining modifications to 30-year-old software. For another take, check out this hack that lets the Mario Bros. play together.

Poké Ball Plus Teardown Reveals No Pikachu Inside

The latest entry in the fan favorite franchise Pokémon saw release earlier this month alongside a particularly interesting controller. Known as the Poké Ball Plus, this controller is able to control Pokémon games that are available on completely separate platforms, as well as transfer data between them. It rumbles, It talks, it lights up, it’s wireless, and [Spawn] uploaded a video that reveals what’s really inside.

Continue reading “Poké Ball Plus Teardown Reveals No Pikachu Inside”

“Yell to Press B” Mod Makes N64 Controller Worse

There’s probably no reason anyone would actually desire a mod like this. Well, no good reason. But [William Osman] had been pondering what it would be like to play some classic games with inputs other than buttons, and decided to make an audio sensor responsible for pressing the B button on an old N64 controller. This “Yell To Press B” mod was also something unique to show his hosts when he visited the YouTube video game aficionados, [Game Grumps].

[William] acknowledges that the build is a bit of a hack job, but the project page does a good job of documenting his build process and covering the kinds of decisions involved in interfacing to a separate piece of hardware. After all, most budding hackers have sooner or later asked themselves “how do I make my gadget press a button on this other thing?” [William] ends up using a small relay to close the connection between the traces for the B button when triggered by a microphone module, but he points out that it should be possible to do a non-destructive version of the mod. Examples exist of reading the N64 controller’s state with an Arduino, which could form the basis of a man-in-the-middle approach of “Yell To Press B” (or anything else) instead of soldering to the button contacts. A video is embedded below, in which you can watch people struggle to cope with the bizarre mod.

Continue reading ““Yell to Press B” Mod Makes N64 Controller Worse”