Tuesday, October 16, 2018

The Analogue Mega Sg – A Preview of the Next Chapter in the FPGA "Console Wars"

Analogue Mega Sg JPN Version
Today, Analogue has made an announcement of its next FPGA retro console. This was a reveal which had been long expected. When the console was revealed as an implementation of the Sega Genesis/Mega Drive, it came as no great surprise to observers like myself familiar with Analogue’s history. Let’s explore some of that history, the specifications of the unit, what you will get for the $189.99 retail price and how this console may fare in today’s increasingly-crowded retro-console market.


The Analogue Story So Far, the Short Version

The CEO of Analogue (and also CMO of 8bitdo) is Christopher Taber. In the 1990s he had a Sega Genesis and it was his first console. Any person who has formed a lifelong love of video games never forgets their first console, even if their favorite games were found on later consoles. However, the Genesis was not his passport to making money off retro consoles. When he started Analogue, it was making consolized Neo Geo MVS systems in wooden enclosures. Looking for a more popular console to sell, Analogue acquired CPU and PPU chips used in the NES and Famicom. Using these chips, they designed a PCB around them with the NESRGB mod, placed it in an aluminum shell and pre-sold it as the Analogue Nt in 2015.

When Analogue had taken preorders for the Analogue Nt, it had advertised an RGB option and an HDMI option. Unfortunately it discovered that the available solutions were not designed to give a high-quality, lag-free experience for a 240p console until Analogue came across Kevin “kevtris” Horton’s Hi-Def NES Mod. They struck up a working relationship where kevtris sold Analogue Hi-Def NES Mod boards that would work with the Analogue Nt’s PCB. Customers who pre-ordered the HDMI option eventually received their consoles.

In October of 2016, Analogue revealed the Analogue Nt Mini. Unlike the Nt, this NES-compatible console was designed for both high quality analog and digital video and audio output. Instead of using old chips, it recreated all the functionality of the NES with a Field Programmable Gate Array (FPGA) chip. Analogue had hired kevtris to design the PCB and to write the NES core which would tell the FPGA to function like a NES. Kevtris had written a FPGA NES core over a decade ago, so he could migrate much of his existing work to the new console. The console was shipping to customers in February of 2017.

While the Analogue Nt Mini was cheaper than its predecessors, it still cost $449.00 to purchase. The high price put it out of reach of many, despite the publicity and praised lavished on the console. The next console, the Super Nt, followed in the footsteps of the Nt Mini by recreating the SNES in an FPGA. But when it was announced in October of 2017, its price tag of $189.00 was far more reasonable to retro gamers. That decrease dropped analogue output from the console and required using a plastic enclosure instead of some exotic material, but I would suggest it is beyond dispute that more Super Nts have been sold than all of Analogue’s previous products combined. Like with the Nt Mini, Analogue hit its target delivery date of February, 2018.

Since the release of the Super Nt, Analogue has been quiet about other projects. They did mention that the Super Nt would have an adapter to provide analog AV outputs from the HDMI port, but that has yet to be given a release date. Having seen a pattern of October announcements followed by February releases, people have speculated that the next console announcement would come this month. Kevtris mentioned that he was working on a new secret project and his many fans have speculated on what that project could have been.

Analogue Mega Sg USA Version
Building the Genesis on an FPGA

When interviewed for the Super Nt, Taber mentioned his love for the Genesis and toyed with the idea that they were working on an FPGA Genesis then.  However, kevtris was a Nintendo-kid, so it made sense for him to work on a system which he knew, had prior experience with and would sell. His experience with the Genesis was pretty much playing the Sonic the Hedgehog series and not much else. But he did design the Sega Master System and Sega Game Gear cores found in the Nt Mini’s jailbreak firmware. The Genesis is built on the Master System, so he already had something of a beginning to start his foray into the realm of 16-bit Sega gaming.

The Genesis consists of three main chips, the 68000 CPU, the Z80 CPU and the Visual Display Processor (VDP). All three chips are bus masters and can interrupt each other to take control of the bus. They are assisted in this by a custom chip in the Genesis called the Bus Arbitration Unit. This helps the Genesis CPUs talk to the audio chips, the YM2612 used for FM Synthesis chip and SN76489-based Programmable Sound Generator. It also allows the CPUs to read from the I/O chip, which is another custom Sega chip which handles input and output like reading the Control Pads.

Analogue Mega Sg EUR Version
Kevtris already had the Z80 under his belt, but the 68000 would require writing an FPGA implementation of it from scratch. He had surveyed the existing open source 68000 cores and emulator implementations of the 68000 and was not impressed. He did not believe these implementations accurately reflected the CPU’s behavior. The 68000 was pushed to its limits to make demos for home computers like the Commodore Amiga and especially the Atari ST. There have also been several “how could they do that” demos released for the Sega Genesis. His goal is for all of them to work.

The 68000 core took over two months to write on its own. He had to test every instruction with every mode and implement most of the CPU’s other features and quirks like its interrupt system and its instruction pipeline. Then he had to tackle the tile and sprite engines of the VDP and get all three bus masters working as they would on the real Genesis. After that he had to write the YM2612 implementation. While he had written a YM2413 implementation in the past, that was a two operator FM Synthesis chip and the YM2612 was a four operator FM Synthesis chip.

Kevtris has had two decades of designing printed circuit boards. Compared to the Nt Mini, the Super Nt was a smaller and much more streamlined board. Part of the cost savings were achieved by omitting the analog video and audio connectors. That led to a much more streamlined design. These design principles will be continued into the Mega Sg.


Analogue Mega Sg White Version
Features of the Mega Sg

The Mega Sg have the following ports and connectors, the 64-pin cartridge slot, two 9-pin Genesis controller ports, the 60-pin expansion port card edge and a stereo headphone jack. Video output will be HDMI only. There will be an SD card slot for firmware updates and perhaps more. The power port will be a micro-USB port like the Super Nt.

The Mega Sg is intended to be as comprehensive in terms of compatibility as possible. In addition to the Genesis, it will also run SG-1000, Master System and Game Gear games. It will come with a Master System cartridge converter. Unlike the Nt Mini, which could only manage a 5x scale, the Mega Sg can expand the Game Gear’s 160x144 native graphical resolution to a 7x scale. There will be cartridge adapters for the Mark III, the Sega Card, Game Gear, SG-1000 & SC-3000 (which uses a keyboard) for $9.99 each. Kevtris did design cartridge adapters for the Nt Mini but never found the time to implement them, now he will have the opportunity he needs.

The Mega Sg will be compatible with all models of the Sega & Mega CDs, as shown by the inclusion of the expansion port. The FPGA will not simulate the CD add-on.  The Sega 32x, however, is another story. The Sega 32x mixes the RGB video output from the Genesis with its own video before sending the combined signal to a display, but the Mega Sg’s video is digital in nature. The 32x takes the sync signal from the Genesis' VDP, so connecting the 32x on its own will usually show a rolling picture.  Analogue has considered trying to implement the 32x in an FPGA but the add-on is more complex in many ways compared to the underlying Genesis.  Here are its specs from wikipedia :

"The 32X contains two Hitachi SH2 32-bit RISC processors with a clock speed of 23 MHz, which Sega claimed would allow the system to work 40 times faster than a stand-alone Genesis.  Its graphics processing unit is capable of producing 32,768 colors and rendering 50,000 polygons per second, which provides a noticeable improvement over the polygon rendering of the Genesis.  The 32X also includes 256 kilobytes of random-access memory (RAM), along with 256 kilobytes of video RAM. Sound is supplied through a pulse-width modulation sound source."

I do not believe they will go this route, it would take way too much time to master this new hardware and recreate it in an FPGA, assuming the FPGA in the Mega Nt (Altera Cyclone V E A4) has sufficient resources when it also has to function as a full Genesis.  While the 32x has some impressive games, there were only 34 cartridge games and 6 CD games released across all regions.  

Analogue has designed a DAC to work with the Super Nt and Mega Nt. kevtris was working on the DAC in between development of the Super Nt and Mega Nt.  The DAC would provide all analog video outputs like they were made available on the Nt Mini.  It could make the Sega 32x compatible with the Mega Sg and solve light gun issues for both systems.  In interviews today Chris Taber indicated that releasing "99.9 done" DAC would be the top priority after the launch of the Mega Sg next April.  
https://www.polygon.com/2018/10/16/17979024/sega-genesis-mega-drive-mega-sg-release-date-analogue-super-nt

If the Super Nt is anything to go by, the current line of Krikzz Mega EverDrives, the V2/X7, X5 and X3, will be supported. I have few worries that my Mega EverDrive V1 will not work in a Mega Sg. Similarly, Analogue promises maximum compatibility, so games that like to break those cheap atgames clones like the Game Genie, Sonic & Knuckles or Virtua Racing will be tested to work on the Mega Sg.

The output will be similar to the Super Nt in that 480p, 720p and 1080p will be supported, with 1080p up to 5x vertical scale. Great features from the Super Nt like the interpolation will return. The Genesis often relied on the color blending effects of a composite video signal, so kevtris may introduce an option to simulate that effect. The Genesis supported a 320x224 graphic mode and a 256x224 graphic mode at sixty frames per second. Switching between those modes, as games like Castlevania frequently do, is seamless on a CRT. Kevtris intends to make them as seamless as he can on the Mega Sg. The interlaced video modes used in games like Sonic 2 and Combat Cars will also be supported.

There will be options to change the region settings (Japanese/US & EUR) and NTSC and PAL modes. PAL modes are important to run demos as most take advantage of the longer vertical blanking time when the screen is being redrawn only fifty times per second. Compatibility will be equivalent to a Genesis Model 1 with the High Definition Graphics text, so games that are best heard with an YM2612 and require the TAS instruction to be buggy will work in the Mega Sg. Fortunately it will not support Sega’s TMSS lockout functions which break compatibility with several early games.

Due to its use of HDMI, the only accessories and peripherals the Mega Sg will not support are the light guns released for the system or its predecessor, the Sega Menacer, the Konami Justifier and the Light Phaser guns. Similarly, the Sega 3-D glasses requires the synchronization to an analog display and a card adapter. When the analog adapter is released, these incompatibilities should be removed.

In addition, Analogue will be offering special 8bitdo 6-button controllers for the Genesis or Mega Sg. The controllers will come with a 9-pin dongle that supports communication over 2.4GHz, but is not Bluetooth compatible. This means that each dongle will only be compatible with the controller it comes with, but this may also have the benefit of reducing input lag. The loss of Bluetooth compatibility means that 8bitdo can sell these controllers at $24.99 compared to the Super Nt’s SN30 controllers price of $39.99. Krikzz sells a similar controller, the Joyzz, but that costs $65.00.  I am sure someone will compare the two in a Wireless Genesis Controller Showdown.


Analogue Mega Sg Cartridge Adapters, Master System, Mark III, Game Gear & Sega Card
The Competition

The Mega Sg will be introduced during a time when many hardware retro consoles will be competing for gamers’ dollars. The PlayStation Classic is likely to sell very well this holiday season. People have been speculating since the release of the SNES Classic if Nintendo is going to introduce an N64 or Game Boy Classic Edition mini console. There has also been a Neo Geo Classic released in the shape of a mini-arcade.

Analogue caught something of a lucky break when Sega, who had announced the release a Genesis Classic Mini-style console, reassigned development of the console from atgames to a Japanese developer. atgames had been making officially-licensed but junky clone consoles for years. Its Genesis Flashback HD did not impress reviewers or the public accustomed to the quality of the NES and SNES Classics. After years of griping, Sega apparently decided its brand was worth more than its product to be consigned to discount stores. Fortunately for Analogue, Sega’s new direction means that the Genesis Classic will not be released until next year.

Other options that are less well-known to the general public include the Ataribox, which purportedly received over three million dollars in its Indiegogo campaign. Then there is the PolyMega, a console which promised hybrid emulation combining ARM processing power with FPGA capabilities but turned into a CD-based RetroN 5. Customer have pre-ordered that device to the tune of half a million dollars.  

Perhaps the closest current competitor in terms of design is the CollectorVision Phoenix, a crowdfunded FPGA console. While I could offer a still more despicable opinion of that device and company that is selling it, I will stand on the statements made, as amended, in the last blog post.

The MiSTer project uses a DE-10 Nano FPGA development board, sometimes with two specially-designed expansion boards, to run video game cores. The project is open source and it has a Genesis core ported from the original MiST project. The Genesis core, until recently, would give atgames’ products a run for their money in terms of compatibility and audio quality. The core has seen several improvements recently, some of them may have been in parallel with kevtris’ core for all we know. The basic MiSTer development board costs $130.00, but the expansion boards and a 3-D printed enclosure will take a little effort to track down and will add significantly to the total cost. MiSTer only supported USB input devices until someone recently designed a controller add-on board and no cartridges or expansion devices.  There is a learning curve associated with MiSTer, so if you are the type who prefers to plug in a cartridge, turn the system on and start playing, the Mega Sg will be more your speed.


What Sets Analogue Apart from the Rest of the Crowd
(All images in this article courtesy of and copyright by Analogue)
Conclusion

After the Super Nt, people speculated that, despite Taber’s well-publicized comment about being a Sega fanboy, that the next project would be a console other than a Genesis. People speculated about the Neo Geo, after all it was their first product. But the Neo Geo has many memory buses, expensive cartridge connectors and huge games. The other alternative was the Turbo Grafx 16/PC Engine. That was more feasible but the TG16 requires a very fast access time to system RAM. Even modern DRAM cannot quite keep up with the TG16’s CPU’s demand for instant access. Both systems are also rather niche systems.

There are four console enclosure variations offered for sale. The USA, EU and JPN variations differ only by the color of their power and reset buttons. They are black with a red and gray button (USA), black with a white and gray button (EU) and black with a red and blue button (JPN). As their color schemes suggest, they are meant to evoke the color schemes of each region’s respective consoles. The fourth color is a pure white. The renders show the headphone jack on the front to the right of the controller ports. The SD card slot is on the left side and the Expansion Connector must be on the right. The rear has an HDMI port and a mini-USB port for power. There is lettering around the circular edge of the console “[FPGA]NTSC/PAL [A]48Khz 16-bit [V]1080/720/480p HD” This lettering will be in white for the USA and EU consoles, Red for JPN consoles and Gold for the White console.  The RGB LED is contained in the Power Button.

Analogue has announced the consoles to ship in April rather than in February as the case had been for the Super Nt and Nt Mini. This will give kevtris more time to test games and fix bugs. Do not forget that he has not one but four systems to manage this time around!  Still, remember to patch your console with the obligatory launch day firmware update!  There will be a sizeable number of people who will pre-order this system, so Analogue will use that time to ensure that there are no delays in shipping orders when launch day comes.  I also must note that shipping this time around may be a little cheaper for many customers than for the Super Nt or Nt Mini.  The shipping calculator gave me a figure of $29.xx whereas I paid $39.xx to ship my Super Nt and Nt Mini.  Analogue is using UPS for delivery in the continental United States, so shipping to P. O. Boxes will not be possible.  

So, would I recommend pre-ordering a Mega Sg?  If you have any interest in a high-quality Sega solution, of course.  Will I be acquiring one, you bet.  Analogue is one company worth supporting, the price you pay for the quality of the product you will receive is unmatched.  Analogue already has three major system launches under their belt, so you are not dealing with a new startup or a snake oil salesman.  Sega released many great games for its 8-bit and 16-bit consoles and they deserve a console worthy of them.

5 comments:

Anonymous said...

Great writeup as always. Love reading your stuff.

I do have a couple nitpicks though:

You call the Mega Sg "Mega Nt" a few times. You also suggest a "pattern of October announcements" which is not really the case. The Nt Mini was announced in August 2016, so I don't really see the pattern there. "Customer have pre-ordered" isn't grammatically correct. (Nitpicky I know but I hope you appreciate it like I would)

Rodrigo García Carmona said...

If you don't mind, could you explain what's the problem with the PCE RAM speed? Assuming it works at a speed comparable to the CPU, it would pose no problem to modern RAMs.

Thanks in advance.

Anonymous said...

Hi!
I would have a "weird" request.
I was searching for a disk image of Castlevania, the crappy PC version, and I found in a old discussion on a forum that you have one, do you still have it?
In any case congratulations for this blog.

Ark

Great Hierophant said...

I guess the pattern was not as firmly established as I thought.

The problem with the PC Engine is that it uses a 6502-based CPU. This CPU requires memory with a 60ns access time. The system was not designed with wait states in mind. Usually that memory access speed is only found in SRAM. Modern DRAM has difficulty with providing that kind of access speed, even though throughput and bandwidth is far superior to 1980s SRAM and Mask ROMs.

Search for the Total DOS Collection, you may find the PC disk image for Castlevania in there.

Rodrigo García Carmona said...

Thanks a lot. I didn't understand why other 6502-based systems could be replicated in an FPGA and not the PC-Engine. Now I can see the problem.