Previous Thread
Next Thread
Print Thread
Page 11 of 11 1 2 9 10 11
Joined: Apr 2012
Posts: 310
Likes: 3
Senior Member
Offline
Senior Member
Joined: Apr 2012
Posts: 310
Likes: 3
Originally Posted by R. Belmont
That's great! I was hoping that implementation would work for other hosts as well, but I'm really happy that it worked without any changes to the SDCard device.
I'm also looking at some devices that can use it, but need CMD10 implementing. The device is using SEND_CID to check the CRC to determine whether the card has been changed.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Joined: Dec 2012
Posts: 244
L
Senior Member
Offline
Senior Member
L
Joined: Dec 2012
Posts: 244
I did some research on that board a while back. It's an Insight Enterprises EQ-4, from about 1983-1984. Apparently it was released, as an Argentinean wrote into Byte magazine in August 1985 asking for "[a]n Insight Enterprises EQ-4 single-board computer user to solve a problem."

There's even an IMP driver for the board http://oldcomputers.dyndns.org/public/pub/cdrom/walnut_creek_cdrom/cpm/imp/i2eq-4.asm

Joined: Mar 2001
Posts: 16,808
Likes: 32
R
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,808
Likes: 32
Originally Posted by Pernod
I'm also looking at some devices that can use it, but need CMD10 implementing. The device is using SEND_CID to check the CRC to determine whether the card has been changed.

I can do a blind implementation from the spec, but more info helps of course. Is this an open-source thing where I can see the firmware code to make sure I'm giving it what it expects?

Joined: Apr 2012
Posts: 310
Likes: 3
Senior Member
Offline
Senior Member
Joined: Apr 2012
Posts: 310
Likes: 3
Originally Posted by R. Belmont
Originally Posted by Pernod
I'm also looking at some devices that can use it, but need CMD10 implementing. The device is using SEND_CID to check the CRC to determine whether the card has been changed.

I can do a blind implementation from the spec, but more info helps of course. Is this an open-source thing where I can see the firmware code to make sure I'm giving it what it expects?

The code that sends the command SEND_CID is at https://github.com/hoglet67/MMFS/blob/c4e4c1ba02092a4460b03fc59ead00d60f41d2c2/MMC.asm#L165, it's only interested in the returned CRC. I believe all SD cards have a unique CID so not sure how to handle this and return realistic data.

There's a similar device for the Dragon machines that also requires CMD9 SEND_CSD.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Joined: Mar 2001
Posts: 16,808
Likes: 32
R
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,808
Likes: 32
Thanks Pernod. That code isn't quite doing what they seem to think. CMD10 returns a CRC7 at the end, not a CRC16, so they're actually going by the CRC in 1 byte and the month and low 4 bits of the year the card was manufactured. (The CRC7 includes the manufacturing date, so it's a little redundant, but I can't imagine people are swapping cards that much).

I'll probably use the file date on the image file as the manufacture date and calculate the correct CRC7.

Joined: Mar 2001
Posts: 16,808
Likes: 32
R
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,808
Likes: 32
...And I've now discovered that I misunderstood what the SD Association specs were trying to say in my previous post. CMD10's response is handled as a data transfer, like CMD17, so there is a CRC16 at the end.

The latest committed version of spi_sdcard should have an MMFS-compliant CMD10 response.

Joined: Apr 2012
Posts: 310
Likes: 3
Senior Member
Offline
Senior Member
Joined: Apr 2012
Posts: 310
Likes: 3
Originally Posted by R. Belmont
The latest committed version of spi_sdcard should have an MMFS-compliant CMD10 response.

Thanks. I'm now getting a 'MMC Read Fault' immediately after CMD10, could be an issue on my side so need to look into it.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Page 11 of 11 1 2 9 10 11

Link Copied to Clipboard
Who's Online Now
1 members (Olivier Galibert), 30 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,974
Posts117,896
Members5,001
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com