Thursday, February 20, 2020

Writing CD-R images that the Nuon "game console" can read

I put "game console" in quotes because the Nuon wasn't really marketed as such -- although it probably should have been. Much like the Phillips CD-i, VM Lab's Nuon was conceptualized as technology that could be included in DVD players to give them game-playing functionality. It came out around the same time as Sony's Playstation 2.

You've heard of the Playstation 2. You probably have never heard of the Nuon.

There's reasons for that. 

It turns out that marketing game consoles that incidentally can play DVDs was a much better strategy than marketing DVD players that incidentally can play games. 

It has a fascinating quad-core architecture -- fairly rare for 2001 -- and it flopped on the market. It came to my attention because VM Labs released a consumer SDK for it, which is also a fairly rare thing. So, of course, I had to get one. 

The fan site Nuon Dome hosts a variety of CD-R images of homebrew games. Ideally, one simply writes a file called NUON.CD to the top level of an ISO9660 CD image. I tried this using the Yaroze Classics, Breakout, Snake, and VG Music. All of these gave "No disc" errors. It turns out you need to also include a dummy file (at the top level to pad the CD) with a filename whose name that comes earlier than NUON in alphabetical order. I tried using, which was contained the source code for one of the Nuon games. It was around 15 megabytes. Discs written with the padding file worked fine. I wrote them using an LG Slim Portable DVD Writer, Model SP80NB80, at the lowest speed the writer supports, which is 10x. I used the macOS program Burn. The CD-Rs were Verbatim 700 MB, 52x, 80 min media.

There was a disc that worked OK without padding, namely BOMB, but it had several additional files to include of the form level?.pcm (where ? is the numbers 1 through 5). I think these inherently provided the need padding. 

At this point I decided to keep including the padding file, and successfully made discs for Same Game (shape version) and the slow Atari 800 emulator that runs M.U.L.E. I decided to test other media, and successfully wrote discs for the 2600-style Pac-Man, Pac-Man Tournament Edition, and Same Game (colors version) on Maxell 700 MB, 80 min media.

Actually... I started this blog post in the middle of the story. The experiments described above were conducted on the second Samsung DVD-N501 I have obtained. The first one appeared when I didn't have any official Nuon-compatible movies or games, so I solely tried burned CD-Rs of home-brew games. Only a few burns of Decaying Orbit would occasionally start up. After burning dozens upon dozens of CD-Rs in different ways, most failing in different ways, I finally picked up the game Ballistic (one of only eight games officially released) and the Nuon-enhanced movie The Adventures of Buckaroo Banzai Across the 8th Dimension (one of only four such movies officially released). Both official releases seemed to work fine, so I assumed I was doing something wrong in burning the CD-Rs, but at one point I went back and checked the official releases and neither ran. I then finally realized that the first DVD-N501 I obtained had a failing DVD drive that increasingly giving up the ghost as I was using it. 

This lead me to obtain the second DVD-N501. When I went back and tried the many Maxell CD-Rs I had created -- some on my Mac with Burn, others on a Windows 10 computer with imgburn (careful, it will install a bunch of other software you don't want unless you explicitly tell it "no," repeatedly) -- I discovered most of them played fine: Decaying Orbit, Ambient Monsters, Chomp, Sheshell, and even Doom. At that point I wasn't keeping accurate records, but I can tell from looking at the discs that the ones that didn't have the padding file were the discs that showed the "no disc" error. Some of the programs had additional files, like music files, that seemed to provide the needed padding for the machine to find the NUON.CD file.

I'm hoping to talk a few of my Vertically Integrated Project Retrofuturistic Hardware students into trying to write games for it, or at least get the development environment up and running.

Saturday, February 1, 2020

A 1987 Themed Homebrew Computer

I've long had dreams of designing 70s/80s style game consoles/computers "from scratch" (where "from scratch" is vaguely defined). One of my students has started down a 70s path with the COSMAC VIP with the 1802 processor.

I was thinking of starting another development effort focusing on the year 1987. Besides me starting my junior year of high school, that year saw the appearance of VGA, so we could justify using a 15-pin VGA cable and not something weird, along with the appearance of PS/2 ports (not to be confused with Playstation 2) for keyboards and mice, which are plentiful. We could use 9-pin Sega Master System style controller ports, which are like the Atari 2600 port with an extra button. (Lots of manufacturers used DB-9 jacks for their controllers; there's a guide on wikipedia).

A general principle (on any project like this) would be to use chips and technologies available in that time period. For instance, we could use GAL22V10 PLDs, but not modern FPGAs. (One exception would be to use bigger RAM chips that are available now just to lower the chip count; one could imagine just using more chips in an earlier era). Another general guiding principle would be to avoid surface mount parts, especially anything with a tiny pitch. 


I got some chips from eBay along such lines. They would be also interesting to experiment with on their own:

I bought 4 each of the following (they're interesting 64-pin chips; like a 40-pin package but smaller spacing between pins):
  • V9958 display chip used in MSX2+ computers. It's the last in the line of chips that started with the TMS9918 used in the TI 99/4A and the Colecovision (Z80 CPU) and the Vtech Creativision (6502 CPU), and it's backward compatible with an earlier chip, the V9938, and even the TMS9918. These chips use external video RAM (up to 192 KB) that's separate from the main CPU RAM; this contrasts with most other video chips of the era. 
  • YM2610 sound chip -- FM synthesis and ADPCM sample playback. Used in some Taito arcade boards and the SNK NeoGeo, and quite similar to the YM2608 used in NEC PC computers. You can hear lots of examples of YM2610 music on youtube. I picked the YM2610 since its sample playback is flexible; the YM2608 has built-in drum sounds, which are nice but you can't change them.
As far as CPU, well, lots of folks have used the Z80; that's well travelled territory. I was thinking of the 65C816, which is an extension of the 65C02 with 16-bit registers but an 8-bit external data bus. It has a 6502 compatibility mode. It's most famously used in the Apple IIGS (providing backward compatibility with the original Apple II line) and the SNES. I conjure it was originally chosen so the SNES could play NES games -- of course, the SNES can't play NES games, but I bet is was a design goal that got dropped somewhere along the line. (Notice I'm not going with a 68000 since I want to stick with an 8-bit bus; the V9958 and YM2610 use an 8-bit bus). This machine could be in honor of Chuck Peddle, the designer of the 6502, who sadly died last year.

Instead of using an actual 65C816, I've been looking at the 65C265, which is a 65C816 with a truckload of peripherals and expanded I/O that that makes it more like a microcontroller. It has the additional advantage of addressing the full 24-bit address space without the weird multiplexing that the 65C816 uses to keep the pin count low. It comes in both surface mount and PLCC packages; the later lets it be used as a through-hole part in an appropriate carrier. It came out a bit after 1987, but I feel it would be worth taking a bit of artistic license here.

Western Design Center makes two "single board computers" for the 65C265: the W65C265SXB (around $48), which has 32K SRAM and 128K Flash ROM in a PLCC, and the W65C265QBX, which is isn't much more than a breakout board. I just bought a couple the fancier boards, the W65C265SXB, from Amazon. WDC also a reference design called The Mench Computer (not to be confused with the W65C265QBX, which is also called "The Mench"), although that webpage looks like it is out of date. (I just noticed that it implements the full 6-button Sega Genesis controller standard, which is pretty cool).

As a "stretch goal," we could add a co-processor in the form of a NEC UPD77C25 DSP (in our case, we'd use the UPD77P25 which is one-time programmable instead of masked ROM); it has an 8-bit external data bus, a 8.3 MhZ clock, and comes in a 28-pin DIP or a 44-pin PLCC. I will attach the datasheet. The reason this caught my attention is that it's the "real" chip appearing in some SNES carts labeled "DSP-1," where it is used to do 3D calculations, among other things.  Someone even managed to dump the masked ROM code in the various DSP1 versions.

Other Design Efforts 

There's two main projects ongoing to create a 6502-inspired machine:
  • The Commander x16 by the 8-Bit Guy, aka David Murray, uses the 65C02. His team even has an emulator for it. One of his design goals is to avoid using FPGAs unless he absolutely has to, under the constraint that he wants to only use parts that are currently being manufactured; the latter constraint means they had to resort to using an FPGA for graphics. For my project, I value avoiding FPGAs and modern parts over avoiding parts that are no longer in production, and hence am happy to use the V9958 and YM2610. Although they are no longer manufactured, they are plentiful on ebay for reasonable prices (although one must watch out for counterfeits). Everyone should watch his videos (Part 1 and Part 2) describing his philosophy and design process. Many folks are helping David with it; just typing Commander x16 into the youtube search field will yield lots of interesting work.
  • The C256 Foenix headed by Stefany Allaire, uses the 65C816. Stefany is building the machine she imagines Commodore would have build if their 8-bit line kept going, including imagining the custom chips they might have designed. Hence, she makes extensive use of powerful FPGAs. This is awesome, but it differs from both the 8-Bit Guy's vision and mine.
  • Dan Grise is building a homebrew computer with a 65C816 and a V9958; I'm very interested in following his progress. I'm hoping by using the 65C265 we could avoid needing so many support chips.

Naming the Thing 

There are lot of computers with numbers in the name: Commodore VIC-20s and 64s, Dragon Commander x16s, Dragon 32s and 64s, Radio Shack TRS-80s, Sharp x6800s, NEC PC-9801s and PC-9821s, Atari 400s and 800s, Atari 2600s, 5200s, and 7800s, Amstrad CPC 464s, etc.
Since we're imaging that this could have been a computer released in 1987, it should be called Something87, or perhaps with a hyphen, like Something-87. I briefly thought of calling it the Peddle-87 in honor of the designer of the 6502, but I wouldn't want to imply that he created it or that his estate approved of it. I asked friends to think of words associated with 1987, and after reading that I came up with Gnarly-87 or Gnarlycomp-87, but promptly decided I didn't like that either. Any ideas?

Alternate Paths 

Instead of the 65C265, we could try a Z8S180 or Z8L180, which are enhanced Z80s with additional peripherals, available in 64-pin DIP and 68-pin PLCC. We would probably go for the Z8S180, which can go up to 33 MHz. (The Z8L180, a low power 3.3V version, only goes up to 20 MHz, but we probably want to use 5V anyway). This might be a fun parallel effort, but if we go for just one path, I'm most interested in the 65C265. The Z8S180 version could also be a later effort.


This project would naturally lend itself to a division of labor, with different people specializing in different parts, and lots of opportunities for software development. The various parts could be tested separately; for instance, there's all sorts of projects where people interfaced Yamaha soundchips with an Arduino of some sort. Lessons learned in any part of the project could be relevant to many other projects.

Wednesday, January 29, 2020

The NEC PC-98 is alive!

I have a PC-FXGA card that plugs into the special "C bus" of NEC PC-98 computers, which were only released in Japan. The PC-FXGA is basically a card with the chipset for the NEC PC-FX game console, which was also only released in Japan, and allowed enthusiasts to develop their own games with the GMAKER or GMAKER/Plus SDK in addition to playing PC-FX games through the PC-98's CD-ROM drive. This caught my attention, since it's fairly rare for companies to provide end users with tools to write games for their consoles; usually these are covered under NDAs. (Incidentally, the PC-FX apparently didn't use any copy protection.) There was also a version of the PC-FXGA developed for DOS/V machines.

The PC-FX focused on doing high-quality full motion video, and not 3-D graphics, like the Playstation and the Nintendo 64 focused on. This turned out to be a bad decision by NEC, who got obliterated by Sony. The PC-FX had better FMV than any of its competitors -- but heavy use of FMV does not generally make for better games. Of course, I have an unhealthy fascination with failed game consoles, hence I found a PC-FXGA on ebay.

Anyway, since I had a PC-FXGA card that needs a NEC PC-98 computer, I bought a PC-9821 Cx2 via It didn't come with a hard drive, so I got an IDE-to-Compact Flash adapter to replace it. I found some hard drive images here:

In particular, it gave this download link: (542MB, so I wrote 542 on that CF card; it also came with a simpler 128MB image, so I wrote 128 on that CF card.)

The 542MB has apparently had a tool called CONV98AT applied to it that lets it be read and written to as an ordinary Window partition on a regular PC. Apparently this is NOT true of your usual PC-98 disk; trying to mount one on a Window machine without applying the CONV98AT tool can cause problems.

I ran into trouble since the 5V and 12V of the power connector on my IDE-to-CF adapter is swapped relative to the connector on the motherboard. Putting 12V into a 5V input on a CF card did not make the card very happy; it started to smell very bad and get very hot very quickly. I threw away any toasted cards. I also bought a 2nd adapter to use; the original is probably fine, but I figured I might as well get a new one to reduce variables while I sorted out the issue.

So now that I am not jamming 12V into the 5V input, the hard drive images boot OK instead of trying to catch on fire. Floppy disk drive seems to work fine. The CD-ROM drive opens and closes and spins up; I haven’t been able to read anything off it yet. I probably need to find the right driver or something. PC hardware configuration in the 80s and early 90s was always a pain. It turns out it’s much more of a pain when most of it is in Japanese.

Interestingly, the PC-FXGA allegedly has a 3-D graphics chip on it, the HuC6273 Aurora, which isn't present in the PC-FX.