CD64 Mods, Part 1

A while ago I picked up an interesting gadget: a CD64 backup unit for the Nintendo 64. It's exactly what it sounds like: loads ROMs from CDs. It's also supposed to be good for development, but without the adaptor to connect to a PC, it's not really much good for that.

Anyway, it needed some repair, and when I opened it up I was intrigued by an unused expansion connector inside. Apparently they had planned to add an MPEG decoder here for VCD playback. Well obviously I'm going to have to make something cool out of that.

The first thing I had to do was try my custom Mario Kart track on a real N64. It... almost worked.
[image: Yoshi sitting on nothing]
The track's a little invisible, but it runs!

Playing with it some more, I decoded the game's exception handler, which doesn't work on emulators.
[image: error codes displayed on screen]

As for the hardware, here's a blurry photo of the mainboard. The unused connector is visible at the right; nothing is actually soldered to it.
[image: CD64 mainboard]

It has three flash chips - two hold the BIOS, the third I'm not sure about.

Having convinced the unit to function, I set about documenting the unused expansion connector. Some simple probing with a multimeter was enough to find a few of the pins - some just go straight to the also-unused video connector on the back - but address and data require a bit more in-depth searching.

The best way to do this of course is to write a program that will probe arbitrary cartridge addresses and use an oscilloscope to find those probes. However in my case I'm doing things slightly different. First of all, I don't have an oscilloscope, but a multimeter should do just as well if I have the probes loop for a second or two. (I can see it jump up and down on the read line as games load resources and play music from ROM.) Second, writing an entire program for this purpose means I'd need to learn how to work the hardware, which is something I've never done before - all my hacks have been injected into games, letting Nintendo handle the low-level stuff. So the obvious solution to that is...

[image: menu overlaid on title screen]
...inject the whole damn program into a game. The game has a nice little feature that displays time trial records on the title screen. Taking over that routine and using a leftover debug print function, I hacked up a little "debug menu" of sorts for testing. The title screen works well for this because after the music finishes (which only takes a minute) the game isn't doing any other ROM access.

What's the point of this? Well, the CD64 has a lot of potential as a dev unit but it's unfortunately plagued by bad software. There's a lot of potential for enhancement even without any significant modding - say, DVD/hard drive support? A more advanced trainer? Loading Gameshark code lists from disc instead of the utterly retarded manual input method? Long filename support? Actually reading all the files on a disc?

An unused memory-mapped expansion port is just a bonus. All sorts of crazy things a guy could do with that, especially if a microcontroller were thrown into the mix. I haven't even decided what all to do with it. Networking maybe?

A strange glitch I found is that this CD64 completely fails to read discs using its own power supply. Only by connecting the disc drive to an external power source will it spin up for more than a couple seconds and actually read anything. I haven't found why this is; everything looks alright, capacitors tested fine. Fortunately this won't be a big deal anyway, because it fits with my plans nicely.

I'm going to have to find an old horizontal PC case with a plain flat front on it. (Vertical would waste a lot of space.) Get an N64 mainboard, mount it with the CD64 attached inside. Hook up a disc drive like normal and run the cartridge connector out to where the floppy drive used to be. Stick the controller ports in one of the other drive bays. Wire up some toggle switches, LEDs, maybe an LCD to the unused expansion connector for arbitrary use by my code. See if I can't get it to work with a hard drive. Possibly even try out an idea or two for defeating the 32MB limit, if I can ever find a 64MB module. It'll be pretty damn epic.


Another interesting note is that next to the video connector are four audio pins. A quick test showed these connect directly to the audio input lines on the cartridge connector. Most of Nintendo's cartridge-based consoles have had this, but it's rarely used. (The NES - but not the Famicom - is one exception. It has an input on its expansion port, but not its cartridge port.) I haven't found any documentation of how to use this input; generally it would have to be enabled in software, though perhaps this is not the case for the N64. In theory it should be dead simple to connect any audio input to these pins and add your own music to games. Probably the intention was to connect the CD drive's audio outputs here for sound during VCD movies.


Oh, and check out the mess.
[image: N64 and components]
You can see an early version of the test program. The display is a hollowed-out old DVD player - more on that later; there's another whole story to go with it.

No comments:

Post a Comment