RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » CB030 Compact flash (mostly a SW ?)
CB030 Compact flash (mostly a SW ?) [message #9260] Wed, 20 October 2021 11:33 Go to next message
curbie is currently offline  curbie
Messages: 55
Registered: June 2021
Member
What version of CF spec is the CB030 CF software based on, I've been reading version 3.0
"CF+ and CompactFlash Specification Revision 3.0"
http://rumkin.com/reference/aquapad/media/cfspc3_0.pdf

and I can't tell if my issues are what I'm reading, or just me?

Can anyone point me to a document they have found useful?

Curbie
Re: CB030 Compact flash (mostly a SW ?) [message #9264 is a reply to message #9260] Wed, 20 October 2021 18:51 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Curbie,
Sorry about the delay in replying. I received your email and flagged it to reply, but then got busy with something else and forgot about it.

The "AT Attachment for Disk Drives ANSI X3.221-199x" spec I used is pretty old, before year 2000. The CF interface of CB030 operates in PIO mode, no DMA feature is used, no interrupt, and it is a 8-bit wide interface (Set Feature command with value of 0x01). I'm not using any advance features, so these basic features should be supported in later version of ATA spec.

What CF problem have you encountered?
Bill
Re: CB030 Compact flash (mostly a SW ?) [message #9266 is a reply to message #9264] Wed, 20 October 2021 22:50 Go to previous messageGo to next message
curbie is currently offline  curbie
Messages: 55
Registered: June 2021
Member
Bill,

Don't worry about the delay, I know you're busy and this is probably a stupid question, I just can't seem to relate some small lines of code the documentation and I hate loose ends, then the question becomes, am I using the correct documentation, or am I missing something.

This code that is perplexing me, comes from "CBBIOS", located under the "init1:" routine six lines down:
move.b #$E0,CF2427 * set Logical Address addressing mode
move.b #1,CFerr * set feature register to 8-bit interface
move.b #$EF,CFstat *set feature command
bsr readbsy
move.b #$40,CF2427 * set Logical Address addressing mode

my issue is I can't find the documentation of #$E0 to CF2427. #1 to Cferr or #$40 to CF2427, I assume sending $E0 and $40 to CF2427 don't both "set Logical Address addressing mode" and is just some legacy commenting but without the proper documentation, I'm having trouble following this.

I'll look for the "AT Attachment for Disk Drives ANSI X3.221-199x" spec tomorrow, to see if it will clear thing up for me.

Thanks.

Curbie
Re: CB030 Compact flash (mostly a SW ?) [message #9271 is a reply to message #9266] Thu, 21 October 2021 06:10 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Curbie,
Well, it is good you are going over my code. You've found a bug (one of many, I'm sure); the "move.b #$40,CF2427" is redundant. It doesn't do anything since LBA mode is already enabled 4 lines prior.

The section numbers are referring to sections in "CF+ and CompactFlash Specification Revision 3.0"

First line is change the addressing mode of CF disk, see section 6.1.5.7. The default is cylinder/head/sector mode, by writing 0xE0 to drive/head register, it is now Logical Block Address mode.

Second and third lines are the "Set Feature" command, see section 6.2.1.29. By writing to feature register with 0x1, and issue "set feature" (0xEF) command to command register, the CF data bus is now 8-bit wide.

5th line is redundant and should be removed.

Bill
Re: CB030 Compact flash (mostly a SW ?) [message #9272 is a reply to message #9271] Thu, 21 October 2021 09:12 Go to previous message
curbie is currently offline  curbie
Messages: 55
Registered: June 2021
Member
Bill,

The code runs fine with no "bug" related glitches that I'm aware of, I don't view what I've found as "bugs", just "turds" that annoy when you step on them as you walk through the code, I'm just crazy and experience dictates that I need to be sure I thoroughly understand the purpose of every line.

Curbie
Previous Topic: KISS 68030 and VGA3
Next Topic: PICL National Industrial Basic Language computer by Karen Orton


Current Time: Mon Mar 24 21:22:25 PDT 2025

Total time taken to generate the page: 0.03787 seconds