Hallo allemaal,
I want to present 1541IDE8 V0.4. This is phase 4 in a project where at the end I should be able to handle IDE hard drives (HD) up to 128 GB using a 1541 as base. A problem is that the original File System (FS) of the 1541 only can handle 170 KB disks. Using the BAM technology of a 8250 we can screw this number up to about 16 MB. Replacing the two-bytes Track/Sector link by a four-bytes LBA link, we can handle drives up to one TeraByte!
At http://www.baltissen.org/newhtm/1541ide8.htm you'll find the more technical details including schematics and a picture of my home brew interface. For the rest the page is a bit outdated but I'm working on it, therefore this update.
Remark: at this moment I'm using an 8-bits interface and therefore only using half of the capacity of an HD. So if I mention a 128 GB HD like above, only 64 GB of it can be used.
What does phase 4?
Phase 4 can handle multiple D64 images. At startup the 1541 will use image 0 to start with. With OPEN 1,8,15,"Z:xxxxx" : CLOSE 1 (or @Z:xxxxx) you can change the image. 'xxxxx' is the number of the image from 0 (zero) up to 12271. But before you can use the drive you have to format it using the command OPEN 1,8,15,"Y" : CLOSE 1 (or @Y). This command will fill the image directory and the BAM sector of every available image with zeros.
I don't 'format' the other sectors. Doing the above for a 4 GB HD will already take about 2 minutes. Formatting all sectors would cost about 7 hours (I think). But before you can use an image at all, you have to format it anyway using the well known OPEN 1,8,15,"N:<name>,<id>" : CLOSE 1 (or @Z:<name>,<id>) and then all sectors are filled with zeros.
An image occupies 768 sectors. These are the original 683 sectors plus five extra tracks of 17 sectors each as used in various 40-tracks FS's. These extra 5 tracks are NOT formatted as the original FS has no knowledge of them.
When formatting an image, an entry is made in the image directory. This directory occupies (a multiple of) 768 sectors, good for 12788 entries. As IDE starts counting from sector 1, the first 768 are in fact only 767 sectors, therefore the number 12271 you have read above.
The image directory can be shown using OPEN 1,8,15,"$$" : CLOSE 1 (or @$$). It will show the number and disk header of the available images.
Remark: I have no idea what will happen if the listing exceeds the maximum size of a BASIC program. As JiffyDOS outputs a directory listing direct to screen, it shouldn't be a problem IMHO. But how a standard C64 will act, I have no idea (overflow error ???).
Files:
http://www.baltissen.org/files/idejd4.asm - source code
http://www.baltissen.org/files/idejd4.bin - 32 KB binary
http://www.baltissen.org/files/mp-asm.exe - my own assembler
I use an AT29C256 EEPROM, therefore the size of 32 KB. Sorry, I just realised it when writing this. Use DEBUG or another program to cut off the first 16 KB as you only need the second 16 KB for a 27128 EPROM. Another option is using a 27256 or equivalent.
The number of images an HD can support is hardcoded for the moment and can be found at $F69E, $002FF0 = 12272 (label CSubIma in the source code). At $E7B5 you'll find how many clusters of 256 sectors are reserved for the image directory. At this moment that is 3. This number MUST be a multiple of 3. 768 sectors are good foor 12280 entries or 4.8 GB. So if you use a 6.2 GB HD this number must be 6 and the number at $F69E about 18000. During the format of the whole disk I check if a BAM sector can be written and you'll get a fashing LED if things go wrong but no info WHERE it goes wrong (for the moment).
Compatibility:
The only speedloader I'm sure of that 1541IDE8 V0.4 supports is JiffyDOS. Speedloaders that address the floppy drive directly, like FC3, you can forget now and in the futere. Speedloaders that only call some routines of the 1541 ROM still make a chance but that is something for the future. Speedloaders not calling 1541 routines should work but I don't know of any so I have no proof.
Parallel loaders:
Can 1541IDE8 work with parallel loaders like SpeedDOS and Dolphin DOS? The answer is simple: I dont know. But IMHO, just get the source code (in the worst case disassemble the original binaries), combine it with my source and see for youself.
Remark:
I have two 7-segments LED displays for debugging purposes coupled to the free A-port of one of the 6522, the one normally used for parallel loading. If you really want to experiment with parallel loading, look for and remove everything that has the label 'POSTcode'.
Have fun !!!
1541IDE8 V0.4
Moderator: Moderators
1541IDE8 V0.4
Code: Select all
___
/ __|__
/ / |_/ Met vriendelijke groet, Ruud Baltissen
\ \__|_\
\___| URL: www.baltissen.org
- eslapion
- ultimate expander
- Posts: 5037
- Joined: Fri Jun 23, 2006 7:50 pm
- Location: Canada
- Occupation: 8bit addict
Nice project.
Considering the price of hard drives, I suppose a 50% loss in capacity, even if significant in numbers, is negligible in actual financial impact.
But more importantly... since this type of project seems to do away with pretty much all analog electronics used in the actual 1541, it would therefore be possible to create a dedicated 1541IDE8 machine.
Pretty much all the digital electronic components in the 1541 are either still being made or easily replacable with off the shelf programmable logic devices.
Do you think that would be a good idea?
Considering the price of hard drives, I suppose a 50% loss in capacity, even if significant in numbers, is negligible in actual financial impact.
But more importantly... since this type of project seems to do away with pretty much all analog electronics used in the actual 1541, it would therefore be possible to create a dedicated 1541IDE8 machine.
Pretty much all the digital electronic components in the 1541 are either still being made or easily replacable with off the shelf programmable logic devices.
Do you think that would be a good idea?
It depends. I have several old drives laying around with bad mechanisms. That means I already have some free PCBs and cases.eslapion wrote:Do you think that would be a good idea?
The advantage of your own PCB is that you can equip it with more RAM.
Code: Select all
___
/ __|__
/ / |_/ Met vriendelijke groet, Ruud Baltissen
\ \__|_\
\___| URL: www.baltissen.org
And who is going to write the VHDL for this FPGA? And what about the needed (EEP)ROM (or whatever) to fill the FPGA with data? Modern FPGA's run on 3.3V and pins that are hardly to solder with a normal soldering tool.eslapion wrote:Or do away with all the old chips and use a single 20$ FPGA (and still equip it with more RAM).
My design can be used by anyone with a bit of soldering skills.
Oh, and being a cheap Dutchman, my working combination only costed some wire, soldering tin and electricity to power the tool. The disk, connector, cable and IC's I got from scrapped equipment. Whatever the whole costed, it was much less then the $20 for your FPGA.
FYI, I also have a 1541-Ultimate from Gideon. And the moment my project works on full scale, Gideon will implement my work in his FPGA.
Small world :)
Code: Select all
___
/ __|__
/ / |_/ Met vriendelijke groet, Ruud Baltissen
\ \__|_\
\___| URL: www.baltissen.org