As per comments in the Fuzix thread, I had a go at coming up with a schematic for a 82c55 IDE adapter for the RC2014.
It's a clone of Philip's YAZ180 design with added '688 based address decoding (thanks to PianoMatt and various S100 designs. I looked at this one: https://www.retrobrewcomputers.org/lib/exe/fetch.php?media=boards:ecb:ramfloppy:printing_ecb-ramf-r11.sch.pdf), and a 40pin IDE connector.
One thing I'm not sure about is the IDE INTRQ signal. Attaching this directly to the Z80s interrupt line seems like a bad idea if we want to be able to use the Z80 in interrupt mode 2, which is ideally what you'd want to do when using the Z80 peripheral chips, the CTC, SIO etc.
I'm wondering if attaching it is necessary?
All comments welcome! I knocked it up quickly so will definitely be some errors...
Looking forward to getting a RC2014 IDE interface soon. ;-).
I've gone for both a 40 pin and 44 pin connector so everyone should be happy. The 40 pin is a right angle on on the edge so you could use it with a CF adapter.
Re the pin assignment, I went with Philip's variation (see the Fuzix thread for details) so you would have to swap a couple of the RomWBW defines around... Now thinking that maybe should just go with the same as the other RetroBrew interfaces though.
At the moment just going for an IDE interface, so have reverted to the RetroBrew pinout. Figure if need one for general purpose use can spin another PCB.
The IDE interface is created by another PPIDE mini-board adapter attached in between the 82C55 and the IDE drive, and it carries the inverters necessary to drive the IDE bus. Since the PPIDE mini-board is a special purpose interface they don't care about Mode 1 applications (keyboard scanning, CRT, parallel printing), or Mode 2 applications (Floppy Controller).
The current RetroBrew PPIDE mini board uses exactly the same pin-out solution as Paul Stoffregen, and Peter Faasse before him, leaving PC0, PC1, and PC2 for the IDE address pins (non-inverted).
Are the other modes of operation that the 82C55 is capable of useful in the context of an IDE interface?
Cloning the DiskIO board makes sense to me, because it makes it easier to implement RomWBW on the RC. It'd be great to see the RC become officially supported by RomWBW, and adding the standard IDE interface to the RC arsenal could bring us one step closer.
PianoMatt
Will add some jumpers to swap those round and send it off to get a PCB made. Hopefully I've not missed anything else, although wary as I've not prototyped this!
Will be interesting to see what kind of performance you get vs bit banging the compactflash card in 8 bit mode. I expect it's not going to make any difference at all.
What speed do you run the Z180 on your YAZ180? I was looking at an S100 82c55 design, and they'd added some logic to latch signals to enable it to work on buses > 8Mhz.
Will be interesting to see what kind of performance you get vs bit banging the compact flash card in 8 bit mode. I expect it's not going to make any difference at all.
That's faster than I imagined.
So regarding the z88dk stuff, there's the 82c55 driver then diskio layered over that as an abstraction and c interface, then FatFS on top of that?
And you could theoretically build this into a CP/M program? (the COM file would have to reside on a normal CP/M formatted drive, but you could load data in-program from a FAT partition on a different drive?)
Will be interesting to see what kind of performance you get vs bit banging the compact flash card in 8 bit mode. I expect it's not going to make any difference at all.Well the question is intriguing enough to make it worth a bit of an investigation. So, I took my `diskio.c` test program, put in some timing captures and increased the sector count to 32 (512 byte) sector writes and reads. And the results are in.Kingspec-SSD KSD-PA18.6-XXXMS 16kB W/R in 14 /256th of a second or 292kB/s.that seems like quite fast... so lets try an old IBM drive.IBM-Travelstar DBCA-206480 16kB W/R in 15-21 /256th of a second or 195kB/s to 273kB/s
And you could theoretically build this into a CP/M program? (the COM file would have to reside on a normal CP/M formatted drive, but you could load data in-program from a FAT partition on a different drive?)Yes. Absolutely.Actually I have a cunning plan, and that is to build a "modern" CP/M2.2 platform with FAT32 disks, and memory banking similar to ZDOS, potentially looking quite a bit like (if not the same as) FUZIX, that can run CP/M applications without all the mucking about with inefficient file types and other limitations from the 1980s. Admittedly, one should produce running code before one mouths off about stuff. But, it is a medium - long term outcome focus for me.
Have you looked at an app called "RUNCPM"? I believe RUNCPM does this by replacing the BDOS and BIOS layers in CPM, while running the stock CCP layer. Seems to me the same think could be done on the Z80 to access media formatted in FATxx fashion.
That's faster than I imagined.Yes, it is faster than I imagined too. By 10x what PJRC mentioned on his web site. The performance is purely driven by the number of reads and writes to the 82C55, so I used the Z80 ini and outi to great benefit, allowing me to run the interface more efficiently than PJRC was doing with his 8051 code. And, I've specifically written only byte and sector transfer routines, and tried to optimise for that. PJRC went about it a bit differently.
Will be interesting to see what kind of performance you get vs bit banging the compact flash card in 8 bit mode. I expect it's not going to make any difference at all.Well the question is intriguing enough to make it worth a bit of an investigation. So, I took my `diskio.c` test program, put in some timing captures and increased the sector count to 32 (512 byte) sector writes and reads. And the results are in.
Kingspec-SSD KSD-PA18.6-XXXMS 16kB W/R in 14 /256th of a second or about 292kB/s.
I'll try some C interface (FatFs) speed testing, of file copies, etc, to see how much performance is lost between C wrapped asm diskIO functions, and the FatFs calls.
total_bytes = 0;
for (;;)
{
res = f_read(&FileIn, buffer, sizeof(buffer), &br);
if (res || br == 0) break; /* error or eof */
res = f_write(&FileOut, buffer, br, &bw);
total_bytes += bw;
if (res || bw < br) break; /* error or disk full */
}