<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 10 Jan 2004 04:48:08 +0000
From   : jgh@... (Jonathan Graham Harston)
Subject: Re: IDE Interface for BBC

In case you don't want to read all the way through, prototype IDE card
information is available at http://www.mdfs.net/Info/Comp/BBC/Hardware/IDE
 
Mike Tomlinson <mike@...> wrote:
> <jgh@...> writes
> >.  I've also identified where ADFS accesses the SCSI
> 
> SASI, IIRC.
 
SASI -> Shugart Associates System Interface
SCSI -> Small Computer System Interface
 
ANSI rejected the name SASI because it used a proprietry name, so it
became SCSI. Most SCSI and SASI devices are interchangable, but due to
sloppy implementations it's not guarranteed. The Acorn card is SASI, and
you can have problems getting SCSI devices to work properly.
 
> >such a b*tch.  With IDE it's essentially:
> >
> >?IDE_Sec=sector:!IDE_Cyl=track:?IDE_Head=head:?IDE_Cmd=IDE_Read
> >FOR A%=0 TO 511 STEP 2:dest%?A%=IDE_Data?0:dest%?(A%+1)=IDE_Data?8:NEXT A%
> 
> It looks to me like you're assuming the IDE drive is always error free,
> or is error checking taken care of in IDE_Read?  The Acorn pseudo-code
> checks for SCSI status (i.e. drive errors) as it goes.  This also
> suggests to me that IDE could be a helluva lot faster.
 
IDE devices tend to be error free and self-correcting[1]. The previous
code snippet should have been followed by something like:
 
  IF?IDE_Status=error THEN retry/report error
 
> >That was my inspiration.
> 
> It was inspired, wasn't it?  I still smile when I think an IDE drive
> could be so easily attached to the Spectrum.  Have you seen the ZX +3e
> project?  It's a set of replacement ROMs for the Spectrum +3 written
 
Yes, quite impressive ;)
 
> So the two-chip version is fully decoded and won't conflict with any
> other hardware?  If so, it's well worth the cost of the extra chip.
> Is it all LS TTL or do you use a PAL for anything?
> Do you buffer the 1MHz bus (with a LS245 or similar)?
 
It's almost fully decoded (as fully decoded as most Acorn peripherals).
It's decodes to &FC4x, and reflected in &FC5x.  It's all LS TTL, though
the final version may probably use HC TTL to reduce power use.  The 1MHz
bus is buffered inside the BBC and the IDE drive(!). I haven't fiddled
with it enough to decide on buffering on the card itself.
 
> Have you thought about having the PCB professionally produced?  I'd buy
> one, especially if it had holes to allow it to be mounted inside the
> Beeb using self-adhesive standoffs, and proper sockets for the 1MHz bus
> and IDE interface.  Perhaps even include room to mount a 2.5" drive on
> the PCB to make installation easier; the size of the board would still
> be small enough to fit inside a 3.5" or 5.25" case if it was desired to
> use one of those externally.
 
I'm prototyping on stripboard at the moment, I intend to produce final
versions on properly fabricated PCBs.  The prototype is small enough to
glue to the top of an 3.5" IDE drive with sticky pads. <gets tape measure
out> The board is 3" by 4", so it may be possible to mount it on a 2.5"
drive.
 
Jules Richardson <julesrichardsonuk@...> wrote:
> Nice :)  (although I seem to have a bazillion SCSI drives on the shelf
> and no IDE drives...)
 
I have a bazillion IDE drives on the shelf :)  I don't know how hard it is
to find suitable SCSI/SASI drives for the Acorn card, but I understand
it's hard to find Acorn cards, and I haven't been able to track down a
circuit diagram for it.
 
> drive into 8-bit mode in order to maintain compatibility with the
> earliest IDE host interfaces? My memory is very hazy on that one though
 
Very few drives nowadays support the "databus=8bit" command[1].
 
> > Also, if there is no demand for drive interchangability, I can access the
> > cylinder/head/sector in a different order. Most IDE drives are xx/16/63,
> > and it would be easier to move that fiddly divide-by-63 away from the
> > bottom of the address, eg as xx/63/16, or 63/1024/16 and partition the
> 
> Hmm. Interesting. I'm used to SCSI drives and treating everything as a
> linear sequence of blocks regardless of actual drive geometry. I'm also
 
Yes I like the SCSI API, as you just say sector=x, and the device itself
does the neccessary divide by sectors/track to calculate internal track
and sector values. The IDE API requires the software to present seperate
sector, track (cylinder) and head (side) values. All the IDE drives I have
sitting on my desk here have 63 sectors per track. I'm trying to work out
a fast divide-by-63 routine that doesn't use repeated subtraction. Doing
500MB divided by 63 takes 16000 subtracktions, and the 6502 would take
about 30 cycles per loop, so 480000 cycles at 2MHz equals 1/4sec or worse!
 
There's an IDE command to change the logical jommertry. I'm going to play
with a few drives to see how well this is supported. Then, I could tell
the drive to set C:H:S to X:8:32, then I can use constant-speed rotates:
 
  LDA DiskAddress:AND #31:STA IDE_Sector
  LDA DiskAddress:LSR A:LSR A:LSR A:LSR A:LSR A:ORA DriveTop:STA IDE_Head
  LDA DiskAddress+1:STA IDE_CylinderLo
  LDA DiskAddress+2:STA IDE_CylinderHi
 
c.j.thornley@... wrote:
> I found an existing circuit for an IDE interface for the bbc micro. Found @
>  http://www.chrisward.uklinux.net/6502/circuit.shtml and picture @ http://w
 
Another of my inspirations, see the list of references at the end.
 
> It works by clocking the 16 bits of data from the drive into two 74LS573
> latches, then transferring the contents of those in two chunks onto the
> 6502's 8-bit data bus.
 
I'm concentrating on getting the 8-bit prototype built and working, I've
drafted a version derived from this to access in 16-bit mode.
 
> What capcity harddrive will the interface on the list support as harddrive
> less that 40Gb are difficult to source at shop and some machine can have a
> limt at 32GB and 137GB as the bit addressing changes.
 
It seems quite easy to pick up 500MB drives around where I am. I know of
three shops that have them in stock, and I've actually started using them
instead of floppy disks to transfer data between home and work!
 
"Colin f" <colin@...> wrote:
> If and when anyone does get an IDE interface working on the Beeb, and
> doesn't find they need multi-gigabytes of storage, I've found Compact
> Flash cards are great for use as IDE drives in old computers. CF has an
 
I've been looking at the Swedish Spectrum DIY Hardware Site, and there's a
really nice Compact Flash interface there. The BBC IDE card should be able
to access CF in IDE/ATA mode.
 
> JGH's suggestion was to modify ADFS to directly work with a simple IDE
> interface, thus it's not a question of the PC's 32 and 137 (actually,
> it's 127) GB limits, but the maximum drive size that ADFS can address.
> Anyone know?
 
8-bit ADFS uses a 24-bit word (three bytes) to hold the sector number, and
expects 256 bytes in each sector. That makes the maximum 8-bit ADFS drive
size as 4GB-1.  8-bit ADFS can access up to 4 hard drives, so a total
amount of storage of 16GB.
 
Sprow <info@...> wrote:
> In article <040106025502@...>,
>    Jonathan Graham Harston <jgh@...> wrote:
> > I'm building a prototype IDE interface for the BBC. I think if I'm careful
> > I can get it down to a two-chip solution.
> 
> Presumably this doesn't include the 1MHz bus address decode and nPGFD clean
> up?
 
Yes it does. 3/4 of a quad NOR to clean nPGFC. 2 halves of a twin 2->4
decoders to decode the address. 1/4 of a quad NOR to convert R/nW to nRD.
 
> Might be nice to have the transition from FCx0 -> FCx1 to autoincrement when
> you read or write from FCx0.
 
Tilmann Reh's GIDE system uses a state machine to toggle with half of the
data word an access to the data location accesses. It's a bit complicated,
and I wanted to make my card use ordinary off-the-shelf components.  I
don't really like PALs and GALs and stuff. Maybe I'm just a bit of an old
fogey, but I loke to be able to build my circuitry without having to put
something into a black box component that is unknowable from the circuit
diagram.
 
> I hope so, as well as having the appropriate pass through connectors and
> optional termination resistors.
 
Yes and yes. (Although the prototype: no, no ;))
 
> > It'd be great to be able to stick one of those 2.5" laptop drives inside
> > a Beeb and have an all-in-one unit.  Power would be no problem; it could
> > be tapped off one of the power feeds and 2.5" drives only use 5v.
> 
> Eek! Please look at the current requirements from 5V, especially the surge
> required to spin the drive up. Remember: unlike floppies, the harddisc is
> always spinning (well, unless someone adds power down code)
 
Looking at the drives I have here, the requirements are:
  5v:  275mA   350mA   500mA
  12v: 250mA   280mA   290mA
 
The BBC's auxilary power socket is rated at:
  5v: 1250mA
 12v: 1250mA
 
so you could drive four drives (or two hungry ones). I can't find any
power ratings on my floppy drives, but you should be ables to drive a
couple of floppies and a hard drive. Anyway, the IDE card hangs off the
IDE drive's power connector, so whatever you use to power it would power
the card.
 
Chris Thornley wrote:
> I've only recently managed to acquire a SR research Level 3 BBC file
> server with a few Winchesters but I need an econect interface to access
 
Lots of people (me included) can sell you an Econet card, suitable for
Master or later. Soldering in the bits for a BBC B/B+ is a lot more
fiddly.
 
> some of the old classic games on it but I don't now do any serious work
> on it like word-processing and programming etc. There are no real killer
 
I write most of my email (I'm writing this now!) on BBCs, and write a lot
of my webpages on BBCs.
 
Sprow <info@...> wrote:
>    Mike Tomlinson <mike@...> wrote:
> > I'd prefer to stick with Acorn format and make it as compatible as
> > possible with the Acorn Winchesters and ADFS.  It can then be prepped
> > with SuperForm.  Using a PC format would require a new FS ROM to be
> > written,
> 
> Done.
> http://www.sprow.co.uk/bbc/dosfs.htm
 
Sprow, when I get the card working and get some PCBs fabricated, would you
like one so you can add hard drive support to your DOSFS?
 
> Excellent point. It would be *definitely* worthwhile popping 8k of SRAM on
> the IDE interface?
 
I was thinking of making the FS software see if there was any extended RAM
available, on a byte-wide card such as Sprow's or a page-wide card in
&FD00 and have the option of using that, rather than put a RAM card on the
IDE card. It's an IDE card, not a RAM card. If I want a RAM card, I'll
buy one from Sprow. (In fact, I just have;))
 
Anyway, it's now 4 in the morning, and I need some sleep. Information on
the IDE card is at http://www.mdfs.net/Info/Comp/BBC/Hardware/IDE and I'll
update it as I go along. There's the diagram of the current 8-bit
prototype, a wiring diagram, and some sketch diagrams for a 16-bit card
and a 16-bit card with access to the CS1 registers.  I'll put photos there
as well when I get somebody with a digital cameral to take some piccies.
____
[1]References:
Tilmann Reh: GIDE - The Generic Z80 IDE Interface
http://www.gaby.de/gide/GIDE.txt
 
Tilmann Reh: Connecting IDE Drives
http://www.gaby.de/gide/IDE-TCJ.txt
 
Francis Gormarker: IDE interface board for Z80180
 
Chris Ward: 16-bit IDE interface for 6502
http://www.chrisward.uklinux.net/6502/schematics/ide.gif
 
Bill Cooper: 8-Bit IDE Converter System
http://8bs.com/submit/subide.htm
 
Swedish Spectrum DIY Hardware Site
http://user.tninet.se/~vjz762w/ZX_SPECTRUM_DIY_PROJECTS
 
http://members.tripod.com/~piters.simpif.htm
 
...and others
 
-- 
J.G.Harston (JGH BBC PD Library) 70 Camm Street, Walkley, SHEFFIELD S6 3TR
jgh@...                - Running on BBCs & Masters with SJ MDFS FileServer
Z80+6502/CoPro+Tubes/Econet+SJ - - - - - - - http://www.mdfs.net/User/JGH/
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>