SmartPort calls - FORMAT

For discussions about the use of your CFFA card. Feel free to start threads about anything you are doing with your card. Tell us about your system, your CF card, how many drives, and especially anything cool you might be doing with your Apple II. Also, if anybody is hacking the CFFA please post info here!

SmartPort calls - FORMAT

Postby david__schmidt » Sat May 12, 2007 3:44 pm

If the firmware for the SmartPort format command is essentially a NOP, how does the ProDOS utility program format it successfully?
david__schmidt
 
Posts: 158
Joined: Sat Jul 15, 2006 9:32 pm

RE: Post subject: SmartPort calls - FORMAT

Postby rich » Tue May 15, 2007 11:29 am

I have always assumed that the SmartPort format command (that is basically a NOP) is there to support low-level formatting of attached devices. This kind of low-level formatting is not needed on IDE and CF devices. The only formatting that is needed is to write out the file system data and bootlloader at the beginning of the partition. For prodos that means writing < 20 blocks of data to the drive.

Keep in mind that a CF card handles all of the messy FLASH wear-leveling and error detection and correction details internally. To the user it appears as a linear array of 512 byte blocks. When a block goes bad, it is automatically replaced, and the data is copied to the new block from a pool of reserved blocks, if possible. It is typically possible, because it is usually write that fails and read still works fine.

IDE drives also appear as a linear array of blocks, but I don't believe they can auto detect and replace bad blocks like a CF card can. That is why modern OS still scan the entire drive looking for bad blocks when you do a format. Unless you do a Quick format, then that step is skipped.
rich
 
Posts: 188
Joined: Sat Feb 16, 2002 6:00 pm
Location: Wisconsin

Postby david__schmidt » Tue May 15, 2007 7:33 pm

Ok, I'll take another look. I sent a format command and got back a $27 error code (drive door open or some such). So obviously I did something wrong.
david__schmidt
 
Posts: 158
Joined: Sat Jul 15, 2006 9:32 pm

SmartPort calls - FORMAT

Postby rich » Thu May 17, 2007 11:30 pm

Dave,

So I guess i was trying to say, that indeed the format command in the smartport firmware on the CFFA card is a NOP. There isn't any format support built-in because there isn't any needed. You just need a ProDOS utility that has format support, like Copy II+ or Apple System Utilities or Davex.

If I am not understanding something in your thread, let me know.
rich
 
Posts: 188
Joined: Sat Feb 16, 2002 6:00 pm
Location: Wisconsin

SmartPort calls - FORMAT

Postby rich » Thu May 17, 2007 11:33 pm

Also...

If you are getting that error from a standard prodos utility like I mentioned, then the most likely cause of that is you put the CF card into the socket in the CFFA __after__ your Apple II was already turned on. This will not work. Actually with some cards you can just hit reset, and they will start working, but in general you always want to have the CF card installed before power is switched on.

If that is not the problem, then drop me an email and I can try to help you debug this further.
rich
 
Posts: 188
Joined: Sat Feb 16, 2002 6:00 pm
Location: Wisconsin

Re: SmartPort calls - FORMAT

Postby david__schmidt » Sun May 20, 2007 3:21 pm

[quote="rich"]If that is not the problem, then drop me an email and I can try to help you debug this further.[/quote]

Thanks. Turns out that wasn't the problem. I'm running into the CFFA ROM's SpValidateUnitNumber code, and it's returning a #BAD_UNIT_NUMBER ($11) which I erroneously interpreted as a ProDOS return code (drive door open).

I sent you an email with some more particulars and a pointer to the format code (http://adtpro.cvs.sourceforge.net/adtpr ... iew=markup, SmartForm: routine).

- David
david__schmidt
 
Posts: 158
Joined: Sat Jul 15, 2006 9:32 pm


Return to CFFA Applications

Who is online

Users browsing this forum: No registered users and 9 guests

cron