[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [N8VEM-S100:6010] Dual IDE/CF V2a



Hi  Rich,

I have built my Dual IDE/CF card but I haven't actually fired it up as yet so I can't speak specifically for this card.  However, it sounds like you are having problems adapting CP/M's disk access methods to the IDE LBA mode.

A few points you might consider.

1. Depending on how you write your BIOS, there are two place you need to be consistent with your track/sector -> LBA mapping.  That is the READ and WRITE routines.  A few times I have made changes to the read routine and forgotten to change write and got myself quite messed up.  

2. Also check the size of your track and sector variables (byte/word).  It was common to use byte values for these.  Obviously that works up to 256 Sectors/Track. Beyond 256 you need word values.

2. Your DPB needs to match the way you calculate the IDE LBA.  Specifically your sectors per track value. I used 256 sector per track with 256 tracks per disk.  At 128 bytes/logical (CP/M) sector that will give me an 8MB disk.  to get to an LBA (512 bytes/sector) I put the track in H and the Sector in L then shift it right a couple of times (divide by 4).  That will give me the LBA with the bits shifted out giving me an index into the 512 byte sector.

That is one implementation, there are other ways to do this but your SPT must match your calculation of the LBA.

Also try writing something to the directory and then use a utility to look at the physical blocks.  You can verify your calculated LBA routines that way.

Once you have sorted out your disk access routines, you need to "format" the CP/M logical disk.  The CP/M directory area needs to have 0xE5 written to all sectors.  It is not enough to do an ERA *.* as there will still be "Junk" left in the directory.  In the ECB world I have a utility called CLRDIR.COM that should do it for you.

I hope this helps.


Max

On Wed, Jan 14, 2015 at 4:06 PM, Rich Leary <richar...@gmail.com> wrote:
All,

Does anybody have a working CP/M 2.2 BIOS for this board? While I finished assembly and testing of my board several months ago and am able to exercise it using MYIDE (V2.9 running on CP/M) I was never able it to get to work correctly when it was integrated into my working CP/M 2.2 system that has been working for decades with DRI de-blocking supporting my 256 byte per physical sector hard drive (ST506) and various 512 byte  per physical sector floppy formats (K4, K2, 1.2 MB, etc.).

I took a few months off to work other projects including my ECB SBC Mk IV that is working without issue using both SD and CF (IDE) media as hard rives. I am at a point in that thread where I am waiting for some material as I build up a 4U rack chassis for the ECB motherboard, the SBC Mk IV, and other boards so I have spent a good bit of time working with the S100 board and BIOS.

Nothing has solved the problems. A brief synopsis..

a. The board "works" with my BIOS and Monitor with no obvious handshaking or time out issues.
b. I have tried a wide variety of CP/M DPB parameters including changing CP/M records per track from 128 to 1024. I have kept capacity of each drive at 8 MB with 2048 byte block size and 1024 directory entries. Conversion from those logical sector parameters to the required LBA sector numbering scheme has used shifts and merges of the logical track and sector data to generate the LBA values.
c. Any attempt to copy a small (<= one block) file to the CF drive is very repeatable. The file is copied and shows in the directory but any attempt to type it, dump it, or just compare it to the original fails immediately as the data is "scrambled" in that records and sectors are misplaced. The misplacement is always the same for a given configuration.
d. Attempting to write a larger than one block file to the drive fails with an error message that file can not be closed. Data is also not where it should be.

Bottom line is that it does not work and hence my whole reason for using it, i.e., replace my 30+- year old hardware. is unsatisfied. The only logical next step is to insert several debug print out statement but before I do that I wanted to see if anybody has a working bios that I could use.

Any advice would be appreciated.

Thanks,

Rich Leary

--
You received this message because you are subscribed to the Google Groups "N8VEM-S100" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem-s100+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.