A Cycle-Accurate Sega Genesis With FPGA

The Field-Programmable Gate Array (FPGA) is a powerful tool that is becoming more common across all kinds of different projects. They are effectively programmable hardware devices, capable of creating specific digital circuits and custom logic for a wide range of applications and can be much more versatile and powerful than a generic microcontroller. While they’re often used for rapid prototyping, they can also recreate specific integrated circuits, and are especially useful for retrocomputing. [nukeykt] has been developing a Sega Genesis clone using them, with some impressive results.

The Sega Genesis (or Mega Drive) was based around the fairly common Motorola 68000 processor, but this wasn’t the only processor in the console. There were a number of coprocessors including a Z80 and several chips from Yamaha to process audio. This project reproduces a number of these chips which are cycle-accurate using Verilog. The chips were recreated using images of de-capped original hardware, and although it doesn’t cover every chip from every version of the Genesis yet, it does have a version of the 68000, a Z80, and the combined Yamaha processor working and capable of playing plenty of games.

The project is still ongoing and eventually hopes to recreate the rest of the chipset using FPGAs. There’s also ongoing testing of the currently working chips, as some of them do still have a few bugs to work out. If you prefer to take a more purist approach to recreating 90s consoles, though, we recently featured a project which reproduced a Genesis development kit using original hardware.

Thanks to [Anonymous] for the tip!

Reverse Engineering The SEGA Mega Drive

With the widespread adoption of emulators, almost anyone can start playing video games from bygone eras. Some systems are even capable of supporting homebrew games, with several having active communities that are still creating new games even decades later. This ease of programming for non-PC platforms wasn’t always so easy, though. If you wanted to develop games on a now-antique console when it was still relatively new, you had to jump through a lot of hoops. [Tore] shows us how it would have been done with his Sega Mega Drive development kit that he built from scratch.

While [Tore] had an Atari ST, he wanted to do something a little more cutting edge and at the time there was nothing better than the Mega Drive (or the Genesis as it was known in North America). It had a number of features that lent the platform to development, namely the Motorola 68000 chip that was very common for the time and as a result had plenty of documentation available. He still needed to do quite a bit of reverse engineering of the system to get a proper dev board running, though, starting with figuring out how the cartridge system worked. He was able to build a memory bank that functioned as a re-writable game cartridge.

With the hard parts out of the way [Tore] set about building the glue logic, the startup firmware which interfaced with his Atari ST, and then of course wiring it all together. He was eventually able to get far enough along to send programs to the Mega Drive that would allow him to control sprites on a screen with the controller, but unfortunately he was interrupted before he could develop any complete games. The amount of research and work to get this far is incredible, though, and there may be some helpful nuggets for anyone in the homebrew Mega Drive community today. If you don’t want to get this deep into the Mega Drive hardware, though, you can build a cartridge that allows for development on native Sega hardware instead.

Thea Flowers – Creating A Sega-Inspired Hardware Synthesizer From The Ground Up

For those who grew up with video games, the legendary sounds of consoles past are an instant nostalgia hit. [Thea Flowers] first got her hands on a gamepad playing Sonic the Hedgehog, so the sounds of the Sega Genesis hold a special place in her heart. Decades later, this inspired the creation of Genesynth, a hardware synth inspired by the classic console. The journey of developing this hardware formed the basis of [Thea]’s enlightening Supercon talk.

[Thea’s] first begins by exploring why the Genesis sound is so unique. The Sega console slotted neatly into a time period where the company sought to do something more than simple subtractive synthesis, but before it was possible to use full-waveform audio at an affordable price point. In collaboration with Yamaha, the YM2612 FM synthesis chip was built, a cost-reduced sound engine similar to that in the famous DX7 synthesizer of the 1980s. This gave the Genesis abilities far beyond the basic bleeps and bloops of other consoles at the time, and [Thea] decided it simply had to be built into a dedicated hardware synth.

Continue reading “Thea Flowers – Creating A Sega-Inspired Hardware Synthesizer From The Ground Up”

That Game Cartridge Isn’t As Straightforward As You’d Think

Classic games consoles played their games from cartridges, plastic bricks that held a PCB with the game code on it ready to be run by the console hardware. You might therefore expect them to be an easy prospect for emulation, given that the code can be extracted from whatever ROM they contain. But as anyone with an interest in the subject will tell you, some cartridges included extra hardware to boost the capabilities of their games, and this makes the job of an emulator significantly more complex.

[Byuu] has penned an article exploring this topic across a variety of consoles, with in-depth analyses of special-case cartridges. We see the obvious examples such as the DSP coprocessors famously used on some SNES games, as well as Nintendo’s Super Game Boy that contained an entire Game Boy on a chip.

But perhaps more interesting are the edge-case cartridges which didn’t contain special hardware. Capcom’s Rockman X had a copy protection feature that sabotaged the game if it detected RAM at a frequently used save game address emulated by copiers. Unfortunately this could also be triggered accidentally, so every one of the first generation Rockman X cartridges had a manually attached bodge wire that a faithful emulator must replicate. There is also the case of the Sega Genesis F22 Interceptor, which contained an 8-bit ROM where most cartridges for this 68000-powered platform had a 16-bit part. Simple attempts to copy this cartridge result in the upper 8 bits having random values due to the floating data lines, which yet again an emulator must handle correctly.

It’s a subject with a variety as huge as the number of console developers and their games, and a field in which new quirks are constantly being unearthed. While most of us don’t spend our time peering into dusty cartridges, we’re grateful for this insight into that world.

We’ve visited the world of emulators a few times before, such as when we looked at combatting in-game lag.

MIDI Synthesizer From A Sega Genesis

[Aidan] is really into FM synthesis chips for creating audio, and one of the most interesting chips from that era is found on the Sega Genesis. Anyone involved in the console wars at that time certainly remembers the classic, unique sound that those video game systems were able to produce, so [Aidan] built a device using a sound chip from a Genesis to play any piece of music from any game. The second iteration of that project, though, is able to use those same sound files as a MIDI synthesizer.

The interesting aspect of these chips is how they use registers to change the audio output. Essentially, there is a complicated register map (one section of his write-up is simply called “Register Hell”) that can be called in order to access the various types of effects one would normally see on a synthesizer. It’s not straightforward at all, though, and got even more complicated once [Aidan] started adding MIDI functionality to it as well. Once he finished sifting through the Sega Genesis technical manuals and a bunch of registers, though, he had a unique synthesizer working that doesn’t sound like anything you’ve ever heard, unless you’ve ever played a Genesis.

If you’d like to check out his first project, the MegaBlaster, which plays the sound files of the old Genesis games directly, we featured that a while ago. Keep in mind though that his latest project isn’t just an updated MegaBlaster, though. He built this entire thing from the ground up.

Continue reading “MIDI Synthesizer From A Sega Genesis”

Raspberry Pi Breathes Life Into A Scale Model SEGA

Miniature game consoles are all the rage right now. Many of the big names in gaming are releasing their own official “mini” versions of their classic machines, but naturally we see plenty of DIY builds around these parts as well. Generally they’re enclosed in a 3D printed model of whatever system they’re looking to emulate, but as you might expect that involves a lot of sanding and painting to achieve a professional look.

But for SEGA Genesis (or Mega Drive as it was known outside the US) fans, there’s a new option. A company by the name of Retro Electro Models has released a high-fidelity scale model of SEGA’s classic console, so naturally somebody hacked it to hold a Raspberry Pi. Wanting to do the scale detailing of the model justice, [Andrew Armstrong] went the extra mile to get the power button on the front of the console working, and even added support for swapping games via RFID tags.

[Andrew] uses the Raspberry Pi 3 A+ which ended up being the perfect size to fit inside the model. Fitting the Pi Zero would have been even easier, but it lacks the horsepower of its bigger siblings. The RFID reader is connected to the Pi over SPI, and the reed switch used to detect when the power switch has been moved is wired directly to the GPIO pins. The system is powered by a USB cable soldered directly to Pi’s PCB and ran out a small hole in the back of the case.

For input, [Andrew] is using a small wireless keyboard that includes a touch pad and gaming controls. Unfortunately, it has a proprietary receiver which had to be integrated into the system. In a particularly nice touch, he used snipped off component leads to “wire” the receiver’s PCB directly to the pins of the Pi’s USB port. Not only does it look cool, but provides a rigid enough connection that he didn’t even need to glue it down to keep it from rattling around inside the case. Definitely a tip to keep in the back of your mind.

The software side of this project is about what you’d expect for an emulation console, though with the added trickery of loading games based on their RFID tag. At this point [Andrew] only has a single “cartridge” for the system, so he simply drops the tags into the cartridge slot of the console to load up a new title. It doesn’t look like Retro Electro Models is selling loose cartridges (which makes sense, all things considered), so there might still be a job for your 3D printer yet if you want to have a library of scale cartridges to go with your console.

For those of you who were on Team Nintendo in the 1990’s, we’ve seen a similar build done with a 3D printed case. Of course, if even these consoles are a bit too recent for your tastes, you could build a miniature Vectrex instead.

Continue reading “Raspberry Pi Breathes Life Into A Scale Model SEGA”

How To Interface Sega Controllers, And Make Them Wireless

The Sega Genesis, or Mega Drive as it was known outside North America, was a popular console for the simple fact that Sega did what Nintendidn’t. Anachronistic marketing jokes aside, it brought fast scrolling 16-bit games to a home console platform and won many fans over the years. You may find yourself wanting to interface with the old controller hardware, and in that case, [Jon Thysell] is here to help.

[Jon] has done the work required to understand the Sega controller interface, and has shared his work on Github. The interface is an interesting one, and varies depending on the exact console and controller hardware used. The original Master System, with its D-pad and two buttons, simply uses six pins for the six switches on the controller. The 3-button Genesis pad gets a little more advanced, before things get further complicated with the state-machine-esque 6-button pad setup.

[Jon] helpfully breaks down the various interfaces, and makes it possible to interface them with Arduinos relatively easily. Sharing such work allows others to stand on the shoulders of giants and build their own projects. This nets us work such as [Danilo]’s wireless Genesis controller build. By combining the knowledge of the Sega protocol with a few off-the-shelf Arduinos and Bluetooth parts, it makes whipping up a wireless controller easy.

In this day and age, most console controllers can be readily interfaced with a PC with a variety of simple solutions – usually USB. You might feel like trying something harder though, for instance interfacing modern Nintendo controllers to a C64. Video after the break.

Continue reading “How To Interface Sega Controllers, And Make Them Wireless”