+3E

From Grahams Wiki

Jump to: navigation, search

The Spectrum +3e is some upgrades to +3DOS, which allows the Speccy (With some hardware) to talk to a hard disk.

Contents

[edit] Where is it?

+3e home page

[edit] How to

To do this, you need to decide on the appropriate interface to use. (I used the simple one, because there was little point in the complex one for me, See limitations below) You then download the roms, and blow the appropriate ones to EEPROM, and put them into the +3. At this stage, you should be able to use +3E, although without the hard drive interface, that bit wont work. Next build the interface. I built an internal one, using the simple 8 bit interface.


[edit] Limitations

Most of the limitations are limitations of +3DOS. The maximum partition size is 16Mb, and there is a maximum of 255 partitions. This gives a maximum accessible size of 4Gb of disk space.

On the whole, unless you do have a small hard drive around, you may as well build the simple interface. The simple interface can only access half of the hard drive space, however, as its difficult to get hold of a hard drive as small of 8Gb these days, only accessing half of the hard drive space isn't that much of a problem.

[edit] Simple interface details

An IDE hard drive is basically 8 registers, of which most are 8 bits wide and one is 16 bits wide. Normally, the data register, used for IO is 16 bits. Fortunately, if your willing to waste 8 bits in every 16, you can get away with only writing 8 bits per word. This is what the simple interface does.

In common with lots of spectrum peripherals, only one line is decoded. As long as A4 is low, the Hard drive is selected. The registers are mapped to A8, A12 and A13 (For Register address A0,A1 and A2) This gives the following register addresses:

  • 1100 1110 1110 1111 $CEEF 52975 Data Port
  • 1100 1111 1110 1111 $CFEF 53231 R:Error register W: Precomp
  • 1101 1110 1110 1111 $DEEF 57071 Sector count
  • 1101 1111 1110 1111 $DFEF 57327 Sector number
  • 1110 1110 1110 1111 $EEEF 61167 Cyl Low
  • 1110 1111 1110 1111 $EFEF 61423 Cyl Hi
  • 1111 1110 1110 1111 $FEEF 65263 Drive/Head **
  • 1111 1111 1110 1111 $FFEF 65519 R: Status W:Command

Drive/head register format:

  • 0 \
  • 1 | Head number (0-15)
  • 2 |
  • 3 /
  • 4 Master/slave select (0=master)
  • 5 1 \
  • 6 0 | Specifies 512 bytes/sector. Most hard drives don't support anything else.
  • 7 1 /

STATUS register format:

  • 0 Error. If set, the last command ended in an error. (Read Reg #1 for details)
  • 1 Index. Probably unused these days. Pulsed each time the disk revolves.
  • 2 ECC. If set, then an ECC correction on the data was executed.
  • 3 DRQ. If set, the disk is waiting either for you to read data or write data.
  • 4 SKC. Indicates a seek success. May be used to determine a disk size with fiddling.
  • 5 WFT. Indicates a write error. If you actually see this on a modern disk, time to replace it.
  • 6 RDY. The disk has finished power up.
  • 7 Bsy. set when the disk is busy. Wait for it to clear before giving commands.

ERROR register format:

  • 0 AMNF. Address mark not found. If this happens on a modern disk, the disk is probably a paperweight.
  • 1 TK0NF. If set, the drive was not able to find track 0! Paperweight time.
  • 2 ABRT. Set if the disk was given invalid parameters.
  • 3 MCR. Media change requested. Probably wont see this much in Hard drives. You get it when the button on a CD drive gets pressed.
  • 4 IDNF. Sector ID was not found. You have requested a sector that is not there.
  • 5 MC. Media changed. Again, wont see this much on hard drives.
  • 6 UNC. Uncorrectable data error. Again, this indicates a very serious disk error.
  • 7 reserved.
  • 8 resume service

[edit] My one 1st attempt

I built the simple interface internally on a piece of Veroboard with parts from Farnell. To pass through the Z80, i used a wire wrap 40 pin socket, which can be seen at the top of the board.

It is mounted in the z80 socket as shown in the pictures.

I used a 2" laptop hard drive mounted. it just about fits inside, although its a snug fit. If i can get hold of a smaller drive, i will use that instead. The Hard drive is an old 20Gb unit that work chucked out, although the interface is only capable of using 4Gb. The power cable is soldered directly to the power socket beneath the PCB. The downside to this unit is that the hard drive takes some time to spin up, and sometimes doesnt spin up quick enough to be detected by the +3. The solution to this is to reset the machine after the menu comes up.

Note, do not attempt to use the power cable to the FDD. In common with everything else about the crappy Floppy drive Mechanism, the power plug is wired differently from how the rest of the planet does it, and you will end up feeding 12V to the hard drive, and if your unlucky, to the CPU.

Additionally, note the pieces of paper protecting the bottom of the board and the bottom of the hard drive from the PCB. With the keyboard back on top, it gets rather snug in there, so some form of protection for the PCB is advisable.

[edit] My 2nd attempt

A few months later, i got hold of a micro disk module, which is a bit like an early SSD.

Its very low power, and 512K in size, so useless for anything else. As it doesnt spin up, it doesnt require the +3 to be reset after booting.

The only thing is that it mounts vertically to the socket, so i had to make a new board with the socket at right angles. Other than that, the circuit is identical.

Note, that I couldnt be bothered removing the fdd cable i put in for the earlier board. Its just held down by elastic bands. The new board. Note that the SSD power is supplied by a header on the underside, which goes to the Black and white wires. And the underside. Not as pretty.

[edit] My 3rd attempt

After mucking around with a Spectrum +2, and modifying it so it took the +3E roms, the final thing was to add a hard drive. Again, i chose the easy option. As usual, my original board wouldnt fit because the rom got in the way, so i built a third one. The circuit is of course identical, just parts are moved around. I am once again using the original hard drive, so it requires a reset before the HDD is detected. I am taking the power from the CPU. there are a few capacitors on it, however, it still really requires a seperate PSU.

Currently, i am taking the hard drive power from the CPU. This is probably the worst place. Really, it needs its own seperate regulator, however, there is no space left internally for one, I could always mount an external regulator, but its not that urgent. If i can get hold of another low power SSD as i did for the +3 version, that will solve the problem as it did for the +3, however, making a board will be significantly more difficult. due to space constraints.