Prodos 8 supports up to 108 GB cffa card

This forum is for the discussion of the CFFA for Apple II project.

Moderator: rich

Prodos 8 supports up to 108 GB cffa card

Postby troublemaker64 » Thu Feb 05, 2009 3:49 pm

That is not a mistake. I have written a short ML program that can directly access 256 drives of 32 MB each for a total of 8 GB and according to the cffa manual, there is another 4 bits available above the byte that is used for the drive number. That will increase the size by a factor of 16. So 16 X 8 GB equals 108 GB. Each drive can be written to or read from just as if it were drive #1. And if the driver is not installed, then you can still use the original slot and drive convention to access up to 8 drives. This driver would also be easily adaptable to GSOS for someone who is familiar with programming with Prodos 16. Unfortunately, I am only a Prodos 8 programmer. If there is enough interest to have Prodos 8 to access and support up to 108 GB cffa card, I will make the driver available.

Should work on II+, IIe (original and enhanced) and IIGS and laser 128 and should work with any version of Prodos and Basic.system. The driver is currently written for firmware v2.0 but can easily be adapted to v1.2 as well.
troublemaker64
 
Posts: 4
Joined: Thu Feb 05, 2009 2:56 pm

Re: Prodos 8 supports up to 108 GB cffa card

Postby troublemaker64 » Sat Feb 14, 2009 1:40 am

Ok here it is. The program was so short, I decided to list it here.
A couple of things first.
You will not be able to format your entire cffa card to use all the drives until I have finished writing the "disk.editor/block.editor" program to allow you to do so. A 1 GB cffa card can have up to 31 drives - a 4 GB can have 123 drives and a 8 GB card can have 247 drives, and these can vary slightly depending on the cffa card.

Until the editor is ready, you can still see how this driver works to access other drives. It has a very simple syntax.

You just append a ",Vd" where d is the drive # from 1 to max drives your card can hold
ie ]CATALOG,V39 will catalog drive #39

Please test on a newly formatted cffa card to get familiar with the driver and confirm it works. As, you all know the drill. "I WILL NOT BE RESPONSIBLE FOR ANY DATA LOSS"

Once you have all the drives formatted, then boot into the card by holding the 'M' key and reduce the number of devices to 1 (one). Save and then boot.
You will have to write your own installer to install the driver between Basic.system and its buffers, but as is, will work at its current position at $4000.


4000:A9 0C 8D 1A BF A9 40 8D 1B BF 60 D8 A0 05 AD 68
4010:BE F0 30 D9 F8 05 B0 2B AA CA 8A 99 F8 04 A2 50
4020:2C FF CF 2C 00 C5 20 DE CB A5 42 D0 07 A0 FF A2
4030:FF A9 00 60 C9 02 D0 02 38 89 18 20 20 CB B0 02
4040:A9 00 60 A9 02 60 00 00


I have triple checked the listing, so there are no errors. Make sure the program is typed in correctly and then do a trial run. I have it set up for slot 5, so if you want to change the slot, then you need to change the bytes at $400C to $0n and $401F to $n0, where n is the slot number your cffa card is installed in.

With an 8 GB cffa card installed in slot 5 you can use V1 to V247.
You can do a "PREFIX,S5,V3" or "CATALOG,S5,V3" and verify that the third drive that you previously formatted is being listed.
now you can "SAVE" and "LOAD" a file just like normal without entering any coordinates.
If you try to catalog a drive that was formatted to hfs, you will get a I/O error.

I am also looking into copying DATA/RESOURCE files from drive to drive with Prodos 8, unless someone beats me to the punch and writes a GSOS driver that takes advantage of the large cffa cards and has access to all the drives that are formatted to Prodos.

I like to keep major applications, graphics, sounds, fonts, and games each in their own drive. Usually higher up starting at drive 100.

Since the volume number has a range of 0-255, and the 4 bits of the next drive register are not programmed into the firmware, I opted out of creating support for a 108 GB, as 8 GB cffa card is huge by apple ii standards. Since the driver table for drive 2 is not being used, It would not take much to patch ,d1 and ,d2 to work with a 16 GB card without causing any range errors and still fit within one page of memory. I believe a slight firmware change is in order, so for now 8 GB will have to be the limit.

Enjoy!
troublemaker64
 
Posts: 4
Joined: Thu Feb 05, 2009 2:56 pm

Re: Prodos 8 supports up to 108 GB cffa card

Postby troublemaker64 » Sun Feb 15, 2009 10:28 pm

I have made a an addendum to the listing so that changing the slot your cffa card is in would need the address changed in the driver table. Please use this routine instead and enter the bytes that get changed to your slot number: $4001 - $0n, 4012 - $0n and 402A - $n0 where n is the slot # your card is in.

4000:A9 05 0A A8 A9 10 99 10 BF C8 A9 40 99 10 BF 60
4010:D8 A0 05 AD 68 BE F0 30 D9 F8 05 B0 2B AA CA 8A
4020:99 F8 04 A2 50 2C FF CF 2C 00 C5 20 DE CB A5 42
4030:D0 07 A0 FF A2 FF A9 00 60 C9 02 D0 02 38 89 18
4040:20 20 CB B0 02 A9 00 60 A9 02 60 00 00 00 00 00
troublemaker64
 
Posts: 4
Joined: Thu Feb 05, 2009 2:56 pm

Re: Prodos 8 supports up to 108 GB cffa card

Postby troublemaker64 » Sat Feb 28, 2009 11:43 pm

This first part is a correction to the instructions of which bytes needed to be changed for different slots. Here is the listing again with proper byte changes:

The bytes that get changed to your slot number are:
$4001 - $0n, 4012 - $0n, 4024 - $n0 and 402A - $Cn where n is the slot # your card is in.

4000:A9 05 0A A8 A9 10 99 10 BF C8 A9 40 99 10 BF 60
4010:D8 A0 05 AD 68 BE F0 30 D9 F8 05 B0 2B AA CA 8A
4020:99 F8 04 A2 50 2C FF CF 2C 00 C5 20 DE CB A5 42
4030:D0 07 A0 FF A2 FF A9 00 60 C9 02 D0 02 38 89 18
4040:20 20 CB B0 02 A9 00 60 A9 02 60 00 00 00 00 00


This second part is for the CF card formatting routine to format your card to its maximum number of drives. Once again, this routine was setup for slot #5. The bytes that need to be changed to a different slot are:
$1002 - 0n where n is your slot #
and you will have to scan the listing for any reference to LDX #$50 and BIT $C500 and change the "5" in these instances to your slot #.

CAUTION: Please use this program with caution, as it will erase your entire directory structure, if formatting a previously used card.

1000:60 A9 05 85 06 20 93 FE 20 58 FC A9 20 85 08 85
1010:45 A9 15 85 09 A9 02 85 46 A9 00 A4 06 99 F8 04
1020:85 44 85 47 2C FF CF 2C 00 C5 A2 50 A4 06 20 DE
1030:CB 18 20 20 CB E6 46 E6 45 E6 45 C6 09 10 EB 18
1040:AD 04 20 85 04 29 0F 69 04 85 07 EA A4 06 A9 01
1050:99 F8 04 A9 ED A0 10 85 5E 84 5F A2 13 20 41 DB
1060:A5 24 85 05 A5 05 85 24 A4 06 B9 F8 04 AA E8 A9
1070:00 20 24 ED 88 98 18 65 04 8D 04 20 B9 00 01 91
1080:07 88 10 F8 A9 15 85 09 A9 00 85 44 85 47 A9 20
1090:85 45 A9 02 85 46 2C FF CF 2C 00 C5 A2 50 A4 06
10A0:38 20 20 CB E6 46 E6 45 E6 45 C6 09 10 EE EA EA
10B0:EA EA EA A4 06 18 B9 F8 04 69 01 D9 F8 05 B0 05
10C0:99 F8 04 D0 9F AD 02 28 C9 03 D0 20 A9 01 8D 02
10D0:28 A9 00 85 44 A9 28 85 45 A9 06 85 46 A9 00 85
10E0:47 A4 06 99 F8 04 A2 50 38 20 20 CB 60 C6 EF F2
10F0:ED E1 F4 F4 E9 EE E7 A0 C4 F2 E9 F6 E5 A0 A3 A0


Some quick instructions
I tried to keep the listing as small as possible to list it here and the code is very compact with no error detection or prompts.
I put a (60 RTS) at the beginning of this routine so you do not accidently run this program. You will have to enter the monitor and type *:1001G or BLOAD the routine and CALL 4097 at the applesoft prompt.
What it basically does is it copies the CATALOG block #'s (2-5) and the BITMAP block #'s (6-15) of the first drive (volume #1) to all the other drives. This routine appends 2 - 256 (or the highest number of drives your CFFA card supports) to the Volume name that was created in drive 1. There will be a running tally, so you will be able to see the maximum number of drives available for your CFFA card. You will have to format the first drive of 32 MB on the CFFA card first using COPY II PLUS, Dave Lyons tools or any system of GSOS/Prodos 16. Make sure the first drive is the maximum size of 32 MB or 65536 ($FFFF) blocks. It does not matter if any other drive is not formatted to its max. After running this routine all other drives will be created automatically to their maximum size with this format routine. There will be no partial drives smaller than 32 MB.
Once the CFFA card is formatted, then install the driver at the top of this post and do a
CATALOG,S5,V(2-max drives) - obviously change the Slot # to the slot your card is in.

If these utilities are useful to anyone or you have any questions, feel free to drop me a line or reply to this post.
Just imagine if Apple had this drive 10-15 years ago with 8 GB of storage. The incentive for companies to write decent programs would have been astounding.

Enjoy!
troublemaker64
 
Posts: 4
Joined: Thu Feb 05, 2009 2:56 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron