Date : Fri, 17 Dec 2010 10:42:22 +0000
From : afra@... (Phill Harvey-Smith)
Subject: Harddisc fakery using a microcontroller - back on
Alan Williams wrote:
> I have been vaguely thinking about a 1MhzE bus interfaced SD card
> interface or about an emulator for the whole host adaptor ACB4000/4070
> chain.
Yeah that should be doable with an AVR/PIC/ARM etc after all the Adaptec
and Xebec ones from back in the day often used Z80 or 808x
> Since single chip micros don't tend to make good bus interfaced
> peripherals I was wondering if anybody had any experience with
> AT94K10AL-25AJC. Its from the Atmel FP Slic family and is a FPGA with
> an AVR core and can come in a 84 pin PLCC. I can get them for about
> AUD30 but they also need their config ram for another $12, and I have to
> buy 10 of each so its looking a bit pricy to start with.
>
> The chip looks very nice for this sort of thing but the licensing for
> the dev tools is some what draconian. Its free for a very short time,
> after which I think its about $1200 a year.
Yeah that is the major disadvantage I wish Atmel would get with it and
release their PLD dev tools for free as Xilinx/Altera etc do, and as
Atmel themselves do for the AVR etc.
> Just wondering if anybody knew any cute ways around that....
I have ended up going for an ATMega1284 + a bunch of LS to interface it
to the SCSI bus and an IDE type drive. I started off using an SD card
but, found that the perfomance was less than optimal.
> Also on the use of SD or any Flash memory for that matter as a hard disc
> replacement, its harder than might be expected.
>
> What becomes immediately obvious when you start reading the data sheets
> is that these sorts of memory cards do not have single sector erase and
> being flash memory require data to be erased before it can be rewritten.
> The number of sectors that have to be erased in one go varies with the
> capacity of the device but is in the order of 8, 16, 32 (x512 bytes)
> etc.
Humm the things I have looked at SD/MMC and IDE (disk on module which is
flash based), seem to have a controler on the card that handles that,
along with wear leaviling.
> This makes writing one sector quite a time consuming job and it also
> requires a big (in 8 bit terms) ram buffer in reach of the micro
> controller to backup all the other sectors that have not changed.
That may be the case for something like Smart media which is basically I
think just a flash chip in a convenient form. But as noted above SD/MMC
and IDE this is not the case.
> This starts to suggest that a new filing system should be written that
> understands the underlying media, but since I am interested in this sort
> of adaptor for use with a Filestore rather than a BBC that's not all
> that possible.
Well the aproch that I have taken is to have the AVR deal with
interfacing with the SCSI bus and the IDE drive, but also to use Chan's
FatFS, and keep the filesystem on the IDE as FAT32, with the SCSI drives
as large files on the FAT32 disk. This has the distinct advantage that
the FatFS handles all the blocking/deblocking for cases where the SCSI
sector size is not 512, and also it make backing things up (or sharing
the files with emulators) on a more moden system much easier.
> Back to the ACB4000 to IDE emulation I think.
Yep I was hoping to emulate pretty much all of the ACB40x0 and Xebec
SASI controler commands, as well as 256 byte sectors as that gives the
flexibility to work with a multitude of old systems.
My personal motivation for doing this apart from the BBC, is that the RM
Nimbus 186 machines can only talk to a small number of SCSI drives which
are getting harder to get hold of.
Anyway there's a couple of pictures of my early prototype here :-
http://www.stardot.org.uk/forums/viewtopic.php?f=11&t=3646
Phill.