iomega clik! 40MB removable drive!

clik! box
clik! box

Ever since I got dynamips, the cisco router emulator to actually run code compiled by GCC, I wanted to do something more fun than a simple game of planetfall with a memory mapped file.  And to make a router more like a real computer, I’d want some kind of disk.  Now most cisco routers have PCMCIA slots, so remembering back in the day iomega sold the click! drive, a 40MB removable disk cartridge that has a PCMCIA interface!  Neat!

And even better, on eBay I managed to fine one.  And much to my surprise when it arrived it was NIB, from 1999!

Contents of the box
Contents of the box

As you can see, there isn’t much inside that box, a CD-ROM of the manual, a brief leaflet, and of course the drive itself and a single 40MB clik! cartridge.  I have to say that it’s all pretty neat.

The clik! disk, compared to a two dollar coin
The clik! disk, compared to a two dollar coin

The disk itself is pretty small.  It does remind me of the older minicomputer disk packs with a removable sleeve to protect the media, but like a three and half inch floppy it is spring loaded to keep users away from it.

Inserting the clik! disk into the drive.
Inserting the clik! disk into the drive.

The disk gently slides into the drive, to give a very satisfying ‘click’ sound to it.

Unfortunately for me, since this was one of those late night impulse purchases I should have remembered that the cisco 1701 series of routers does NOT have a PCMCIA slot, and the NPE-G1 on my cisco 7200 VXR, instead has a compact flash adapter, not the full PCMCIA.

OOPS.

While I do have a RSP 4+ with the PCMCIA slots, I don’t have a chassis or power supply so I can’t do anything with it anyways.  Unless I find the pinouts, and make my own harness to power it up, which I guess is always possible.

So close, but it went nowhere.  But I thought it was interesting enough to take a look at such a tiny storage solution from the turn of the 21st century.

SAGE CP/M disk fun

Wow this was without a doubt one of the more confusing things I’ve ever done.

So here is the problem.  I want to delete some files from an IMD disk image, and then copy some new ones in.  Easy right? .. maybe.

Ok first up the easiest tool I’ve found to manipulate CP/M disk images is cpmtools.  Even better their pre-compiled binary is for Win32, so I’ll run it with Wine on OS X.  which works fine.  Although there is one slight problem, cpmtools doesn’t read the IMD disk format.  So you will have to download imd118.zip from a backup of the late author’s computer.

Now using IMD you need to convert the OS disk into a ‘raw’ or ‘binary’ file.  Naturally IMD is a MS-DOS program so firing up DOSBox, I ran:

Screen Shot 2013-12-05 at 8.35.58 PM
Uncompressing, so easy!

IMDU CPM68K12.IMD CPM.RAW /B

And a few seconds later I had my raw file.  Now the next thing was to manipulate the image in cpmtools.  cpmtools has a database of disk drive types, and naturally there is no definition for the SAGE2.  However thanks to a friend of mine (hi Lorenzo!) I took at look at 22disk, and found their demo version did in-fact have a definition for the SAGE:

BEGIN SAG2 Sage IV – DSDD 96 tpi 5.25″
DENSITY MFM,LOW
CYLINDERS 80
SIDES 2
SECTORS 8,512
SIDE1 0 1,2,3,4,5,6,7,8
SIDE2 1 1,2,3,4,5,6,7,8
ORDER SIDES
BSH 4 BLM 15 EXM 0 DSM 315 DRM 63 AL0 080H AL1 0 OFS 2
END

Which is great, however it took a bit of experimenting to work out how to format this information for cpmtools.  I compared a bunch of known formats, and then managed to work this out:

diskdef sage2
seclen 512
tracks 160
sectrk 8
blocksize 2048
maxdir 128
skew 1
boottrk 2
os 2.2
end

And now I can look at the image file!

$ wine cpmls -f sage2 CPM68K12.RAW
0:
ar68.68k
armath.sub
as.sub
as68.68k
as68symb.dat
asgo.sub
brwnies.txt
copy.68k
core.sub
cpm.sys
ddt.68k
ddt68000.68k
dump.68k
e.sub
find.68k
halt.68k
init.68k
linkcore.sub
lnk.sub
lo68.68k
m.sub
mcc.sub
mince.68k
mince.swp
mind.sub
orbit.sub
p.sub
pe.sub
pip.68k
print.68k
red.sub
redasm.sub
sage4utl.68k
sagebios.sys
screen.68k
setenv.68k
setprntr.68k
sig.txt
space.sub
spacem.sub
startup.sub
stat.68k
tlnk.sub

So I tidy up the image, and copy it back to the IMD program for compressing.  And this was, without a doubt the most difficult to figure out, until after a bunch of searching, and Lorenzo once more again pointed me in the direction of bin2imd

not intuitive!
not intuitive!

So yeah.

BIN2IMD X.RAW X.IMD DM=2 N=80 SS=512 SM=1-8 /2

And the best part is that it worked!  So now I was able to transfer over a binary version of com.68k, com2.68k, along with Zork, and fire it up!

8080 Zork on 68k CP/M
8080 Zork on 68k CP/M

Unfortunately the interpreter doesn’t work right.  It could be the disk transfers fault, maybe the SIMH SAGE emulator, or even the 8080 emulator.  But it worked this far.

Fun with Qemu & Large Disks….

I was playing around with NeXTSTEP under a snapshot of qemu and I noticed that my arrow keys were not working correctly. After a few hours of digging about I found the fix was easy enough:
-k en-us
That’s it, just append that to your boot string, and away you go! Another annoyance has been my quest to install AROS onto a P4 computer.. I picked up a new 320GB IDE disk (WD Caviar Blue) .. which the BIOS & AROS promptly refused to acknowledge corectly. Everything was going to hell until I gave up and read the manual. Once again it was simple, there is a jumper setting for ‘older’ OS’s to see only 32gb, and naturally the BIOS is now happier. If only I could say the same of AROS…