News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Hard disk interface and HDOS

Started by rpalmer, 09:46, 14 March 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rpalmer

Hello,

While it may appear that i have been quiet after CPC/IP to ROM and HDOS updates, I can now let you all know that i successfully made a prototype hard disk interface using the 8255 IC :)
The next phase of the interface is to make one via a printed double sided PCB.

With the interface I have also been testing HDOS with it and been able to save files under AMSDOS using the standard OS calls from basic. The saved file was loaded back with no issues that i have seen.
I have a variety of test programs and all seem to show that HDOS works as expected as far.

With further testing I will hopefully be able to also access files from a FAT16 (or FAT32) partition directly. when this part of the testing is complete and can be shown to be stable I will then be able sell versions of it programmed into 2 ROMs (the drivers and HDOS System).  The cost of the ROMs has yet to be determined.
I am able to program eproms via an eprom programmer i have had since i bought my CPC so long ago. So far i program the eprom via cassette, but is patient to built on my interface to get a PCB version going so that the future programming can be done via Hard disk.

If all goes well, i will make the PCB version with a through connector so that other devices can also be attached and possibly sell versions off it to those who would like one for a reasonable price. Currently the price of the interface is dependent of the availability of parts, but checked on internet for them and it would seem that a price of somewhere between $75-$100 (AUS) for a fully built version.

The speed of the interface has been shown to get approximately 140 Kb/s with a modern 120Gig HD. I have also connected a 121Mb drive which shows that the speed dropped to 40 Kb/s (this i understand is due to the drive and not the interface).
Symbiface-II states it gets approx 150 Kb/s, so mine is not that far behind.

I haver also been looking at an ethernet interface via the CS8900a IC which can be connected to an 8-bit computer such as the CPC. I would probably connect it via another 8255 on a different port.
And if this is indeed possbile then the CPC/IP on ROM, Harddisk interface and ethernet interface would make it possible for the CPC to finally get on the internet with current connectivity devices. :)

Attached is a picture of the interface (sorry about quality).

Bryce

#1
Hi rpalmer,
         wow, nice project :) Well done. Have you considered using a Compact Flash Card instead of a Harddrive? The interface and protocol are identical and they are smaller and need less power. That way, it could all be powered via the CPC?

If you need any support on the layout or producing a prototype board, then let me know.
Will you be releasing the schematics and layout on the wiki, or is the project "closed".

And do you have a supply source for the 8255 ?? They are getting very hard to find these days.

Bryce.

Gryzor

Nice one mate!! I wish I had one - but then again, I wish I had a use for it :D

TFM

Quote from: rpalmer on 09:46, 14 March 11
Hello,

While it may appear that i have been quiet after CPC/IP to ROM and HDOS updates, I can now let you all know that i successfully made a prototype hard disk interface using the 8255 IC :)
The next phase of the interface is to make one via a printed double sided PCB.


Hi,

Is your interface compatible to the interface from Yarek?

see: http://8bit.yarek.pl/index.html


Are they compatible?

Would be a pity to have another solution, with again new specifiactions.


TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

rpalmer

hello TFM,

Yarek's IDE/8255 is based on the same method I have used to connect an IDE and uses the exact same ports, except mine is fixed to ports with bit A10 low (i.e Ports &F8xx to &FBxx)

The version i have created is a little simpler in its used of the 8255 and the associated doco i posted shows that the controls to port C are simply to invert the required lines to prevent disk damge.

Regards
rpalmer

rpalmer

hello bryce,

The availability of the 8255 is ok as far as i can tell (see RS online, url is http://australia.rs-online.com/web/).
Just search for CP82C55A).
My main concern is the edge connector which may not be easily got, since the type of connector is not used by PC/MAC computers anymore.

As for the CF side, I plan to make an adaptor so that CF cards can be used and will have associated drivers built just for it as well.

rpalmer

TFM

Quote from: rpalmer on 21:29, 14 March 11
hello TFM,

Yarek's IDE/8255 is based on the same method I have used to connect an IDE and uses the exact same ports, except mine is fixed to ports with bit A10 low (i.e Ports &F8xx to &FBxx)

The version i have created is a little simpler in its used of the 8255 and the associated doco i posted shows that the controls to port C are simply to invert the required lines to prevent disk damge.

Regards
rpalmer

Great! Thanks for the answer! Fixed Ports are wonderfull, since we can use the same software for both cards? Hmm, can we use the same software?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

rpalmer

hello TFM,

I just checked the Yarek IDE/8255 interface and it uses slightly different ports.
HDOS System ROM does not have HD drivers in it, but the drivers rom does.

The drivers rom and source files will be free and so all that is needed is to create a new driver using mine as a template. Hopefully the yarek version would not be that hard to create as I believe mine is documented well enough for anyone to understand.

Regards
Rpalmer

TFM

Yes, had an initial look at it. Great doc indeed! Would be great if we could have drivers that work with both 8255-IDE boards  :)  That would make a lot of things more easy  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

rpalmer

2nd go to get attachment include.

hello TFM,

I just checked the Yarek IDE/8255 interface and it uses slightly different ports.
HDOS System ROM does not have HD drivers in it, but the drivers rom does.

The   drivers rom and source files will be free and so all that is needed is   to create a new driver using mine as a template. Hopefully the yarek   version would not be that hard to create as I believe mine is documented   well enough for anyone to understand.

Regards
Rpalmer

TFM

Thanks a lot for the information, and sorry for this question: Would it be possible to adapt the ports and to use the same soft? Sorry for bothering you that much.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

rpalmer

hello TFM,

The drivers im afraid are going to have to be hardware specific as I dont know what IDE lines the Yarek IDE/8255 are connected to.
But HDOS only has internal drivers for floppy and RAM disk, so any external driver such as my IDE/8255 would need to be created so that HDOS can access the devices and these are in the drivers ROM.

However, with that said, the previously attached zip contained a version the driver for the Yarek device. I have assumed that the ports of the 8255 apply to the same IDE lines i used for my IDE/8255 and if they differ then anyone can change them as required to what Yarek has connected them to (refer to the Hardware Details section of dr-Y8255.asm). My version of the IDE/8255 driver has been optimised against the way i built my prototype.

To access the routines from a "Driver Interface" module -

All you need do is view the source file Dev-Mgr.asm for the |DEVMGR RSX to get access to the routines.
For example:
        |DEVMGR,@ROM,@address,1,"Yarek-IDE"

The above accesses the READ routine location and returns the address of it and its ROM location. So a simple RST 3 call with applicable assembly code could be built up where the ROM and FAR Address are poked in to call the routine to perform a READ of the attached device.

You can also assemble the driver to be a user loadable file for development testing as well (look at
gendev-test.asm for how i test drivers).

The code is assembled to memory or file
the basic code to load/test the driver is:

10 memory &6fff
20 load "devtst.bin",&7000
30 call &7000:rem initialisation test
40 end

Then change line 30 to which test you would like to perform or add more basic to do more.

Also, HDOS can use drivers which are loaded into memory from floppy/tape to allow for user created drivers (again see gendev-test.asm for an example).

Regards
rpalmer

TFM

Alright, I'm looking forward to get one of these devices  :) ;D
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

rpalmer

Hello all,

I am please to say that I can now read and write to FAT16 formatted hard discs via AMSDOS.

There are 2 caveats to this though:
1.  AMSDOS files on a FAT16 device do not contain the the normal header, so loading them into memory requires the user to use the RSX commands in HDOS.  Again this can be overcome by the "linking" process between HDOS formats and FAT formats.

2. The loading of wholes files in one hit are limited to 64K, i dont allow for banked memory during the loading process.

The testing to date included reading files from a FAT32 drive with success, now i just need to get to write as well.

The process of changing directories created by a PC was a success as well.  More testing will be done with directories to get a more complete suite of tests to verify directory management is all ok.

The initialisation of the FAT16/FAT32 drive is still a bit of a pain, but is a two part process to get the whole thing up an running. The first part is to initialise the device under HDOS to setup the HDOS info for partition access and then continue the initialisation via PC to format the partition to make it ready for both the HDOS and the PC.

As mentioned in previous posts, I will see if i can patch AMSDOS to directly access the hard drive via a "Virtual" disk image which will eventually allow for existing internet disk images to be used on the trusty "real" CPCs.
To date the only limits I can see for this is that the disk image would need to be limited to sectors which are errorless when read in.  This issue is important as it would be somewhat hard to control disk sector access to return "error" conditions which normally exist from real CPC disk.

Regards
rpalmer

Powered by SMFPacks Menu Editor Mod