Thursday, 30 May 2013

More pies in the sky

Still no progress to report as work is unrelenting, but I did remind one of my colleagues and he asked about the audio codec, so at least he's still interested in doing it. We just have to get some down-time to actually be able to devote some time to it.

So in the mean-time, I've been dreaming about the add-on boards that I'd like to produce for it.

First up, the so-called CPU-socket boards. Considering whether I should put 5V level conversion on the main board, but in the end decided against it just in case I want to stick some 3V3 logic on a small daughter-board. That aside, I'll be looking to make Z80, 6502, 6309 & 68K (DIP & PLCC) adapters in the short term. Wishing I had enough I/O for an ARM250 but it's out of the question (and not sure where I'd get one of those anyway!?!).

Secondly, similar past projects like the One Chip MSX (OCM) & Minimig and more recently proposed and/or WIP project like the ill-fated Coco-X and another TRS-80 Model I expansion design have me thinking about prototyping other system board replacement projects on this hardware. The 200-pin MVS connectors with 5V level conversion should come in very handy for adding all types of peripherals such as cartridge interfaces, keyboards, floppy & hard disk drives...

...with that in mind I'd ultimately like to produce boards for TRS-80 Model I/III/4, TRS-80 Coco 1/2/3, Apple II & BBC microcomputers - roughly in that order of preference. So whilst I'll prototype them as add-on boards to NGPACE, the end result would be single boards that would be mounted inside the original casing of the target platform.

Picture a TRS-80 Model I keyboard unit, running from a modern 12/24V supply, housing a fully pimped-out 128KB (or more) Model 4 core, with a selection of legacy graphics enhancements (e.g. Grafyx Solution and/or Mikrokolor) driving DVI-I video out, internal floppy and hard disk emulation via SD card, modern joysticks and a connector for a real floppy drive accessible via the expansion interface door.

Of course you could also run it as an Apple II or Coco 3... you want one, right?

Tuesday, 21 May 2013

Gathering momentum again?

After a few weeks of inactivity due to very busy workload, I'm trying to get the ball rolling again while some of us (potentially) have a lighter load for the next few weeks.

I gave a quick design briefing on the whiteboard at lunch today to my colleague who volunteered to look at the analogue audio and video circuits. This afternoon I populated the project repository on our SVN server with the project schematics & PCB and all the data I have collected thus far.

Hopefully he'll be enthused enough to start looking at it. And hopefully his enthusiasm will prompt my other colleague to get started on the power supply design!

And to help get myself motivated, tonight I hooked up the AES console to my TV for the first time, and played a few games of Blues Journey and the newly-arrived Fatal Fury 2...

Monday, 20 May 2013

Flash Carts

One of the Holy Grails of Neo Geo enthusiasts' wish lists is a flash cartridge for the system. There is photographic evidence around that suggests a certain development group has developed one, but I would assume its primary purpose is to assist in development of their Neo Geo games. I'd imagine it could be programmed with a reasonable selection of legacy Neo Geo titles, but it would perhaps be safe to assume that it would not be capable of supporting every single game for the system. Regardless, they're not for sale.

I'm not making any such claims either at this stage, but the intention is there to produce some sort of programmable (flash?) cartridge to assist in the development - or more specifically, testing - of the Neo Geo IP. Unfortunately, whilst the cartridge will be programmable in-system via the FPGA on the system board, this will of course not be an option on an actual SNK system board.

Anyway, it's a long way off yet; pointless even designing it without a significant portion of the Neo Geo IP developed and running, and without some in-depth research into the protection mechanisms employed on the various cartridges. But I guess it's possible that eventually I'll have learnt enough to develop a flash cartridge that is programmable externally, and maybe even capable of running most Neo Geo titles.

Sunday, 19 May 2013

The State of Play

I actually started work on this project about 6 weeks ago. But it does have to compete for time with Real Life, so it's going to be somewhat of a drawn-out process.

The easiest way to explain where it's at is just to say that I've completed the "interesting" parts of the schematics. In other words the FPGA, all the memory devices, the ARM, the video IC's and the bulk of the connectors have been done. What's missing on the schematics include the power supplies, analogue video amplifiers (for JAMMA), the analogue audio circuit, and all the really boring bits like de-coupling capacitors and sundry miscellaneous protection components on some of the I/O.

As a result, all the major IC's and the AES/MVS connectors have been selected, based primarily on their availability from Digikey. The flash devices are dirt cheap, and for simplicity I've gone with the same device for all ROM's. The SRAM can be used as either 8-bit or 16-bit mode, which is a bonus. The HDMI chip incorporates audio, is readily available and looks relatively simple to use. The video DAC I've used on another design. I've also used the STM32F2xx family before.

I should mention here that I've managed to coerce a few colleagues into assisting with the design; my business partner is handling the power supplies and related boring bits, and another colleague is designing the analogue audio & video circuits.

As for layout, I've just started to collect footprints for the various components. Fortunately a good selection of the larger IC's have footprint libraries already available. I've done the AES/MVS connectors myself. I'm envisaging the board to look similar to a 1-slot MVS board; JAMMA connector on the front, cartridge connectors at the back, additional audio/video connectors on one side, and controller connectors on the other. At least that's the plan...

I suspect there's a few more weeks, if not months, of schematic capture and review remaining before we can start layout proper. To some degree I'm at the mercy of my colleagues as well, but we're also pretty busy at work atm, let-alone the other aspects of our respective lives. Layout is going to be a massive job, and I'm inclined to sub it out else I'm afraid it'll languish for many months in the too-hard basket. Of course, that's added expense...

In the mean-time, I might re-visit the HDL I wrote a few years ago and see if that has suffered any bit-rot. And of course, I'll need to spend a bit of time on my AES console once the first of my carts turns up - you know, for science!

Saturday, 18 May 2013

What else?

I'll start off my 3rd and final 'introductory' post with a brief run-down on the FPGA.

Since I'm only making a handful of the development boards, I thought I'd use the largest device that I could afford. To give you an idea of size, let me first note that the EP2C20 (20K LE's) is adequate to emulate the Amiga 500, including the 68K core and a 2nd soft-core processor for floppy emulation etc. And I figure that's about the same complexity as the Neo Geo...

I've gone with the 5CEA7, with roughly 150K LE's or, alternatively, enough logic to emulate seven (7!) complete Amiga 500's, or Neo Geo's. I figure there's enough headroom in there for SignalTap and any other debugging aids I may wish to add!?! In any case, with the cartridge connectors and digital video, the Neo Geo has some serious I/O requirements, and my wish list of features pretty much dictated a 480 user I/O device.

As I mentioned, the board is also being designed to be my PACE development platform for the foreseeable future, so there are a few more components not strictly required for the Neo Geo (but may come in handy for it anyway).

I've added an STM32F205 (ARM) micro-controller, primarily for JAMMA & AES controller I/O, but it's also a USB (OTG) host for HID gamepads, standard arcade trackball input, battery-backed RTC for the Neo Geo, and a high speed SD card slot. It's also responsible for configuring the FPGA from SD card. It connects to the FPGA via three (3) high speed SPI ports. For other PACE projects it'll be very useful for emulation of floppy and hard disk devices via FAT-formatted SD cards.

Aside from the FLASH and SRAM required for the Neo Geo, there's also an 8Mx16 SDRAM device which will be most useful for emulation of retro microcomputers like the Amiga. I've also connected a 2nd SD card directly to the FPGA to prototype designs that won't use an external micro-controller.

I've added a so-called 'CPU socket' which is actually a pair of high density dual inline sockets to accommodate various daughter-boards with a CPU. There's just enough I/O for a 68K CPU - for obvious reasons - and of course 6502, Z80 & 68(3)09 would also be possible. Aside from running designs with physical CPU's, the idea is to also accommodate development of a 6309 core - another project that I have undertaken recently.

Finally, some sundry I/O; as mentioned PS/2 x2 to the FPGA, one or two Dreamcast (Maple Bus) ports, one or two Nintendo Gamecube ports, some extra 3.3V & 5V I/O on the ARM (which can be configured as analogue or digital) and a few LED's for good measure.

So there you have it - a handy little board that can be plugged into a JAMMA cabinet, or powered from a 12-24V supply and connected to your 55" LCD via HDMI and played with a variety of controllers. And with plenty of expansion (via the MVS connector) for legacy keyboards, cartridges and 5-1/4" floppy drives, I'll be able to load Sockmaster's Donkey Kong port for the Coco 3 off floppy disk and play it with my wireless NGC Wavebird Controller!

In a perfect world there'd also be a bank of high-speed DDR3; it was originally part of the design but when I ran out of I/O I had to settle for vanilla SDRAM. I cannot think of anything I'd like to add to this board to be honest! I refrained from adding all manner of legacy 8-bit console controllers, and even removed a light gun connector, most of which I can add via the miscellaneous I/O connectors.

Next post I'll give a brief run-down on where the project is at, and speculate wildly as to how I think it's going to pan out. Because engineering projects never blow out...

Friday, 17 May 2013


The penultimate goal of this project is to produce a commercially viable replacement Neo Geo system board that can be used either as an AES (a console connected to a TV) or as an MVS (installed in an arcade arcade). Beyond that, I have aspirations of enhancing the design to eliminate the need for physical game cartridges (for example load ROM's from SD card), and eventually even a miniaturized variant of the latter in a hand-held device much like what the Neo Geo X should have been.

But all this is further down the track.

The initial hardware that I'm designing is not meant to be a commercially viable product; rather it is designed to assist in the development of the IP for the FPGA. And by assist, I mean - make the job as painless as possible. It is going to be ridiculously over-specified, seriously expensive, and I only plan on ever making 4-6 of them. This board will also serve as my PACE platform of choice for the foreseeable future. I have rather broad interests in emulation aside from the Neo Geo, and this board will be designed to cater for most - if not all - of those interests.

First and foremost, I made the decision that this board would use physical AES/MVS cartridges. This alleviates the need to emulate cartridge hardware in the design, and a true replacement system board would use cartridges anyway. So this board will have one AES slot, and one MVS slot. The other plus is that I'd effectively be implementing the logic for an MVS-to-AES cartridge adapter in the FPGA, so that gives me an option for a spin-off product.

Secondly, the cartridge-based Neo Geo system boards contain no less than four (4) ROM devices; the system BIOS, the default FIX layer tile set, the sprite look-up table and the default Z80 sound driver. It has two banks of RAM; the 68K work RAM and the battery-backed RAM. These devices span four different system buses and, whilst not huge, would require a relatively large FPGA to implement using on-chip memory. To both eliminate on-chip resource requirements and provide external flash storage for other projects, I decided to use four distinct external flash devices and a single (battery-backed) SRAM device for these memories.

The flash devices are also several times larger than strictly required; there is adequate capacity, for example, to have the AES, MVS, UniBIOS and Debug BIOS images all programmed at the same time (and of course, be soft-selectable).

Analogue video output is available at both a VGA connector and the JAMMA connector, keeping in mind that the design can drive either 15kHz or 31kHz video on both interfaces. A HDMI port also provides digital video (and audio) with only a simple passive adapter required for DVI monitors.

Analogue stereo audio is available via a pair of RCA connectors. Digital stereo audio (e.g. LPCM) is available via the HDMI connector. It's also worth noting that the hardware will support 8 channels!

Controller input options include the standard JAMMA interface, plus a pair of DB15 AES controller ports. Additionally, there will be two PS/2 ports (keyboard & mouse) and a single USB port will allow devices such as HID gamepads or the Blaze-produced Neo Geo X AES Controller to be used. Finally, a select few 'legacy console ports' such as Dreamcast and Gamecube will allow the respective controllers to be used to play Neo Geo games.

I'll cover the FPGA itself and other board components not strictly required for Neo Geo emulation in my next post.

Thursday, 16 May 2013

Who and Why?

I thought I'd kick off this blog with some background information on myself,  the project history and motivation behind NGPACE rather than dive straight into a technical description of the project.

I've been dabbling in emulation for well over a decade now; initially software emulation (I've authored two MAME drivers thus far - Street Fight (aka Empire City 1931) and Namco Classics Vol. 1 & 2) but in recent years I've turned my attention exclusively to hardware (FPGA) emulation.

In the process of emulating a few dozen different arcade, console and retro microcomputer platforms, I've experimented with the creation of a MAME-like framework for FPGA emulation under the guise of the PACE project. The framework itself is in dire need of a complete re-working, but it has served its purpose well over the years, expediting the addition of new emulated platforms to the project.

A year or two ago I had a stab at the Neo Geo, on hardware that I knew wasn't adequate for a fully working implementation. I managed to get the BIOS booting and with the PROGRAM and FIX layer ROM's loaded from Joy Joy Kid (aka Puzzled) I could actually coin-up and 'play' a game. The next step was to implement at least some of the sprites, however I was diverted onto other projects and, with no prospects of completing a full emulation on that hardware, I never quite got back to it.

Popularity of the Neo Geo remains remarkably strong, with a seemingly sustainable industry surrounding it supplying services such as consolisation of MVS boards, video enhancements, MVS cartridge adapters for AES consoles, and cart conversion (converting the cartridge for a less popular game to another). The platform has even seen several new games released in cartridge form in recent years. And there's the (divisive) Neo Geo X hand-held that was released recently...

I thought it high time I took a serious crack at the Neo Geo, for a number of reasons. Personally, it would represent a more challenging project than any I had attempted before; to be honest a lot of the arcade platforms were little more than exercises in cranking the handle. Also, I had been searching for a number of years for a project that just might have some commercial value (although I have others in mind as well), and I firmly believe that the Neo Geo is a good candidate - at the right price.

Although I was fortunate enough to have had access to ever more powerful FPGA's well suited to PACE in general, it was always going to be unlikely that I'd come across hardware capable of a full Neo Geo emulation. So recently I decided that I'd simply bite the bullet and design some custom hardware that would allow me to emulate the Neo Geo in its entirety. It was going to be ridiculously over-engineered, both to assist in the development and debugging of the Neo Geo, and also serve as a prototyping platform for all my other PACE projects for the foreseeable future.

And this is the story of NGPACE.