Tuesday, 20 November 2007

Z64 (for N64) modded to take Compact Flash




Probably the most technically challenging mod (for me) so far.



The Z64 aka "Mr. Backup" is an amazing device for the N64 which plugged on top and allowed the use of Zip discs for playing games. Genius.

Here is a advertising pic of the Z64 in action on the right.

While great, the Z64 had some drawbacks - Large N64 games went to 32MB or more (Z64 does not support games greater than 32MB, but there were only around 5 or so released). These 1) took a long time to load and 2) filled most of a zip disk.


Some bright sparks swapped out the 100MB zip drive for 250MB or even 750MB, and even brighter sparks hacked the Z64 bios to support ide Hard drives. Now THIS was interesting - lots of storage and fast loads.


Several years later and I decided to mod the Z64 with a compactflash-to-IDE adapter. Apart from being silent, low power (and thus easy to power off the Z64) it should have been a 5 minute job - CF cards in IDE adapters are electrically almost identical to IDE devices (hence you can use them in old motherboards etc..). How wrong can you be...


It turned out the Z64 bios (hacked to support IDE HD's) refused any kind of compact flash card in IDE mode. Cue extensive searchs for ancient dos ide 16-bit device drivers, bios hacking tools and seriously steep crash-course in real mode 16bit x86 assembly language...


To cut a long story short, the Z64 is basically a one-chip 386 PC that boots to Dos via a 512K flashram masquerading as a 512K floppy drive. The IDE bios hackers had tracked down an old dos driver than supported adding/removing ORG 2.2GB IDE devices from Dos, which allowed adding/removing HD's from the command prompt. This is essential, because the Z64 bios does not autodetect HD's at all. For a (then) unknown reason, this driver rejected CF cards in IDE mode, but happily worked with all ide drives.


After a fruitless search for alternative device drivers, (which including getting the Z64 to boot off DrDos Enhanced edition), I taught myself enough assembler to hack the original driver using a dissassembler and the old Dos hacking tool SoftIce. I essentially found out that the driver (as you would expect) fired an "Identify Device" request to attached IDE devices, and simply rejected the CF cards response flat. It all came down to a single 16-bit word.... CF cards identify themselves as HD's but as "non-magnetic media" (although this depends on which IDE spec sheet you read). I hacked the dissassembled source to allow any device to be accepted by the driver, and bob's your uncle - up to 8GB of CF goodness on a N64 - pretty much all the space you need ;-)

Out with the zip, in with the CF mounting plate.



NB, the N64 is a US version with an RGB mod, allowing for best possible video output from a 64. (Obviously).

Bios v 221 (Tested working with CF, Fat16 support only - reports as v2.18, should work.)



Bios v 220(Tested working with CF, Fat16 support only)



6 comments:

  1. This is gloriously wonderful!

    ReplyDelete
  2. Hi! Thanx a lot for this bios! I did the upgrade with success but after this the lcd says 2.18b again. Is it normal anyway?

    ReplyDelete
  3. hi,

    mine says 2.18c also. i downloaded another version from techskeen, and that says "2.20 Silverfox." i assume that's the latest version. it works great, thanks to your hard work.

    ReplyDelete
  4. I think both should work fine - just the text is not updated...

    However I've upped the 2.20 version that also works...

    ReplyDelete
  5. HI,
    Where to buy the CF device (replacement for zip drive) as i see on your picture ?
    Many Thks.

    ReplyDelete
  6. I bought the CF<>IDE adapter with a 3.5" mount off ebay years ago. Generic no-brand.

    Addonics make very nice adapters that work, but they are much more expensive: http://www.addonics.com/products/flash_memory_reader/AEUDMD4.asp

    ReplyDelete