SD-card and Ethernet drivers for the Amiga 500 Simple SPI controller. The code is based upon previous work by Niklas Ekstrom and Mike Sterling. Without their excellent work I would have never started this project.
All code was compiled using VBCC hosted on an actual Amiga 3000. Included are Amiga scripts to call the compiler and build the code. For compiling the network driver sana2.h is also needed. As this file is copyrighted I did not include it. sana2.h should be placed in the sspi-net drawer In the Amiga drawer you will find the Amiga binaries: 2 drivers and 2 test programs.
This is the SD-card device driver, goes to devs: on your Amiga
This is the SANA-II ENC28J60 network device driver, also go to devs: on your Amiga
A simple console program to test the SD-card. It will read and dump sector 0 on the console.
A simple console program to test the enc28j60 ethernet controller. It will reply every packet send and also dump it on the console.
The driver is currently very simple and does not support SCSI inquiry commands (so no HDtoolbox), no auto-mounting and no auto-booting. The way to deal with this is to prep the SD-card under Winuae and use a manual mount script. As the driver is based upon Niklas's driver you can refer to the tutorials written for the sdbox. Like for example (here). Just replace any reference to the driver with "sspisd.device". I actually use a boot floppy to mount the SD-card and handover control to the Workbench: partition on the SD-card. This process only takes a couple of seconds and after that the SD-card behaves like any other harddisk.
The network driver uses channel 2 of the simple SPI controller to communicate with an ENC28J60 10Mbit ethernet controller chip. These chips are available as cheap modules from the usual sources and are easily hooked up to the simple SPI controller using some dupont jump wires. Only 6 pins are used, VCC, GND, SCK, SO, SI and CS. The other pins on the module (WOL, RESET, CLKOUT and INT) are not used. The nework device driver is SANA-II compatible and can be used with any of the Amiga TCP/IP stacks. I use the old but free AmiTCP 3.0b2 TCP/IP stack from Aminet. AmiTCP is not easy to setup but luckily Patrik Axelsson and David Eriksson made this excellent installation guide. Just make sure you replace any references to the SANA-II network device (they use "cnet.device") to "sspinet.device". Installing AmiTCP is probably best done under WinAUE like I did.
(All tests done on an 68000 Amiga 500 with 1MB chip and 1.5MB slow).
- Booting into Classic-WB takes about 32 seconds.
- Loading up HippoPlayer takes about 14 seconds.
- Sysinfo reports a disk transfer speed of about 42 kbytes/sec.
Note that in general usage the relatively low performance of the simple SPI controller is not really noticed. Usually the CPU is the bottleneck. It is only when loading large chunks of data (like loading a large mod file in HippoPlayer) that you notice the speed difference.
(All tests done on an 68000 Amiga 500 with 1MB chip and 1.5MB slow)
- Downloading from Aminet using ncftp works with a transfer rate up to 11 kbytes/sec
- Inifinity Music Player 3 reports a network speed af about 20 kbytes/sec
- A 1472 bytes ping to my router takes about 120ms.
Like mentioned before, the SD-card driver is very simple and missing a lot of features. It does seem very stable though and my system is working fine with it. I never had a crash caused by the driver. The enc28j60 driver does have some issues it seems. It works stable enough to download files from Aminet using ncftp, visit some telnet BBS's with Ncomm and telser.device and you can listen to music using IMP3. However, it will crash when the system calls expunge() (and that only happens when you stop AmiTCP using "stopnet" and then do "avail flush" to free up memory). But no one ever does that right? Otherwise the driver is pretty stable.