MMC card interface

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
duikkie
Posts: 2711
Joined: Fri Feb 07, 2014 3:28 pm

Re: MMC card interface

Postby duikkie » Mon Oct 03, 2016 12:02 pm

you never know about cards :) , maybe some SDHC are back ward competble , if cmd1 give respons then supermmc will work. all the cards and the specs :)


DutchAcorn wrote:
hoglet wrote:
DutchAcorn wrote:Thanks for taking the trouble Dave. :D

The MMFS 1.00 was from here.

The error is "Card?"

BEEB.MMB is the only file on the card. I placed a zipped image of the card on my dropbox account. The image was made using Win32DiskImager.

I've has a quick look at this. The image seems correct, and is definitely FAT16.

The Card? error definitely points the finger at your card. Looking at the MMFS 1.00 initialization code, the only way this error is generated is if the MMC_INIT routine fails. This attempts to put the card in SPI mode, and then sends CMD0 and CMD1. It doesn't look at the contents of the card.

Is there any chance this card could be a fake (i.e. a larger SDHC card that has just been reformatted to a small capacity)?

Do you have another small (2GB or less) card you could try?

Dave

Thanks for checking! :D

It is not unlikely the cards I use are fake Sandisk cards (they come from China). I don't currently have other low capacity cards to try, I'll get some and try again.

It's unlikely to be an SDHC card; SuperMMC should fail on one of those, right?

User avatar
hoglet
Posts: 6622
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: MMC card interface

Postby hoglet » Mon Oct 03, 2016 12:23 pm

DutchAcorn wrote:It's unlikely to be an SDHC card; SuperMMC should fail on one of those, right?

Yes, an SDHC card should fail on SuperMMC.

I've just compared the source code of MMFS 1.00:
http://www.stardot.org.uk/forums/viewto ... 339#p49437

and SuperMMC:
https://swhs.home.xs4all.nl/bbc/mmbeeb/DFS4C/DFS-4C.ssd

The MMC initialization code is not identical, but it looks like both versions should be exercising the card in the same way.

So it still doesn't make sense that you have a card that works in SuperMMC but not MMFS 1.00.

The SuperMMC ROM you are using is the original version, not one that Dukkie further developed?

Dave
Last edited by hoglet on Mon Oct 03, 2016 1:55 pm, edited 1 time in total.

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Mon Oct 03, 2016 1:12 pm

hoglet wrote:
DutchAcorn wrote:It's unlikely to be an SDHC card; SuperMMC should fail on one of those, right?

Yes, an SDHC card should on SuperMMC.

...

The SuperMMC ROM you are using is the original version, not one that Dukkie further developed?

Dave

The SuperMMC ROM image I used comes from this site: https://swhs.home.xs4all.nl/bbc/mmbeeb/. The original DFSMMB rom also works fine with these cards and comes from the same location.

Can it be related that SuperMMC works on BeebEm (with the modified FDD interface definition) but MMFS does not?
Paul

User avatar
hoglet
Posts: 6622
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: MMC card interface

Postby hoglet » Mon Oct 03, 2016 1:56 pm

DutchAcorn wrote:Can it be related that SuperMMC works on BeebEm (with the modified FDD interface definition) but MMFS does not?

I think that's a different issue.

BeebEm emulates a memory mapped SPI interface (at FE08) and the original MMC ROMs check for both this and a user port interface.

I added support for BeebEm back into later versions of MMFS (separate M and U builds)

So still a bit of a mystery!

Dave

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Sat Oct 08, 2016 1:50 pm

hoglet wrote:
DutchAcorn wrote:Can it be related that SuperMMC works on BeebEm (with the modified FDD interface definition) but MMFS does not?

I think that's a different issue.

BeebEm emulates a memory mapped SPI interface (at FE08) and the original MMC ROMs check for both this and a user port interface.

I added support for BeebEm back into later versions of MMFS (separate M and U builds)

So still a bit of a mystery!

Dave

Today I received a batch of used 2GB Sandisk cards. They are from a UK seller and I am quite sure they are genuine. Same symptoms with these cards though. Next thing to try is a different type of SD card reader, I am currently using these. Anyone else here who successfully used the original MMFS with these 99P cards?
Paul

User avatar
CMcDougall
Posts: 5620
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: MMC card interface

Postby CMcDougall » Sat Oct 08, 2016 3:20 pm

^yes :D
but 99p is a bit steap 8) I just got 5 for £2.06 Inc P&P :)
I think the issue you have with the other UltraDFS /Card? thing is the speed the MMC takes to find it, thus needed to be put up (at start of this thread!) unless you have old MMC memory cards, then may work....(my one never did)
I find formatting SD cards to FAT in any PC>winXP are crap, ie take 10mins to format wrongly. I use my desktop WinXP machine or old laptop with WinXP on it, was win98., & takes 2seconds :shock:
ImageImageImage

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Sun Oct 09, 2016 9:48 am

CMcDougall wrote:I think the issue you have with the other UltraDFS /Card? thing is the speed the MMC takes to find it, thus needed to be put up (at start of this thread!) unless you have old MMC memory cards, then may work....(my one never did)

Thanks! I just re-read the start of the thread but I have trouble finding what you refer to. :oops: Do you mean it could be that MMFS 1.0 is compatible only with MMC cards and not SD cards?

If not, just to eliminate possible causes, can you confirm you have successfully used one of these modules?

microsdmodule.jpg


CMcDougall wrote:I find formatting SD cards to FAT in any PC>winXP are crap, ie take 10mins to format wrongly. I use my desktop WinXP machine or old laptop with WinXP on it, was win98., & takes 2seconds :shock:

I use a separate formatter (SDFormatter 4.0) on Windows or use MacOS to format FAT16.
Paul

User avatar
CMcDougall
Posts: 5620
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: MMC card interface

Postby CMcDougall » Sun Oct 09, 2016 10:13 am

DutchAcorn wrote:Do you mean it could be that MMFS 1.0 is compatible only with MMC cards and not SD cards?

yes, that's what I meant, some code had to give it more time to find a SD card, less for a MMC card.
that's the 40p card's I have, just checked this very moment with MMFS1.21 as get all mixed up with all interfaces / beebs on floor :shock:
here's a pic:
41p.jpg
41p micro card

I always use SanDisk as not had much luck with Toshiba etc SD cards...
ImageImageImage

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Sun Oct 09, 2016 12:16 pm

CMcDougall wrote:
DutchAcorn wrote:Do you mean it could be that MMFS 1.0 is compatible only with MMC cards and not SD cards?

yes, that's what I meant, some code had to give it more time to find a SD card, less for a MMC card.
that's the 40p card's I have, just checked this very moment with MMFS1.21 as get all mixed up with all interfaces / beebs on floor :shock:
here's a pic:
41p.jpg
I always use SanDisk as not had much luck with Toshiba etc SD cards...

I use the same configuration. I just tried MMFS 1.18 with this card and card reader, and that works fine. Can you use MMFS 1.0 with the card & card reader in the photo?
Paul

User avatar
CMcDougall
Posts: 5620
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: MMC card interface

Postby CMcDougall » Sun Oct 09, 2016 12:29 pm

^whats MMFS 1.00?? is that not just the first buggy one before DaveB /Hoglet ironed out all the bugs to v1.21?? or do you mean the UltraDFS that Mr Mathers just put up a page back?? :? if so not had time to play :(
ImageImageImage

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Sun Oct 09, 2016 12:57 pm

CMcDougall wrote:^whats MMFS 1.00?? is that not just the first buggy one before DaveB /Hoglet ironed out all the bugs to v1.21?? or do you mean the UltraDFS that Mr Mathers just put up a page back?? :?

Well, I started off with UltraX DFS and failed. Then I read in the UltraX post that Martin based it on the initial MMFS 1.0 (yes, the version that Dave started work on).

So I tried to get that to work using different MicroSD cards.

CMcDougall wrote:if so not had time to play :(


Alternatively: did you manage to get UltraX DFS to work with the Catalex adapter and a SanDisk MicroSD card?
Paul

User avatar
CMcDougall
Posts: 5620
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: MMC card interface

Postby CMcDougall » Mon Oct 10, 2016 9:21 pm

DutchAcorn wrote:did you manage to get UltraX DFS to work with the Catalex adapter and a SanDisk MicroSD card?

just had a go of this, with a beeb with 1770FDC & DFS2.26
used the files per mm67/MartinMather being >Ultra X ROM images/ ULTRA226 & U226UP
ULTRA226 does not work
U226UP does work, but did'nt initalise with just *DIN 0 0
per Martin was to use CTRL-X-Break, this then shows up on banner, and can *. from SD card
*DDRIVE shows the V after each drive number, but can't get it to do the R for real discs, or have both going together :?
but as Martin said, he only tries with his 8271FDC & DFS1.20

might try 8271 beeb another night, as going to bed :shock:
ImageImageImage

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Tue Oct 11, 2016 7:29 am

CMcDougall wrote:used the files per mm67/MartinMather being >Ultra X ROM images/ ULTRA226 & U226UP
ULTRA226 does not work
U226UP does work, but did'nt initalise with just *DIN 0 0
per Martin was to use CTRL-X-Break, this then shows up on banner, and can *. from SD card

I just found from the asm files that the ULTRA variants are probably memory mapped and that the UP variants are probably User Port variants. I've been using the ULTRA variant so that may be why it is not working :oops: :?

Hope to be able to check this tonight.
Paul

User avatar
daveejhitchins
Posts: 3691
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: MMC card interface

Postby daveejhitchins » Tue Oct 11, 2016 8:26 am

CMcDougall wrote:might try 8271 beeb another night, as going to bed :shock:
With a post time of 9:21 :shock: Pussy :lol:

Dave H :lol:
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

TopBanana
Posts: 1039
Joined: Wed Jun 09, 2010 2:16 pm

Re: MMC card interface

Postby TopBanana » Tue Oct 11, 2016 4:22 pm

daveejhitchins wrote:
CMcDougall wrote:might try 8271 beeb another night, as going to bed :shock:
With a post time of 9:21 :shock: Pussy :lol:

Dave H :lol:


Oooooo that's harsh Donkey Dave, 9:21pm is sometimes classed as an all night rave at Top Banana Mansions :shock:

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Tue Oct 11, 2016 7:03 pm

DutchAcorn wrote:
CMcDougall wrote:used the files per mm67/MartinMather being >Ultra X ROM images/ ULTRA226 & U226UP
ULTRA226 does not work
U226UP does work, but did'nt initalise with just *DIN 0 0
per Martin was to use CTRL-X-Break, this then shows up on banner, and can *. from SD card

I just found from the asm files that the ULTRA variants are probably memory mapped and that the UP variants are probably User Port variants. I've been using the ULTRA variant so that may be why it is not working :oops: :?

Hope to be able to check this tonight.

That was it! The UP variant ROM I used was corrupted (FS manager is not always reliable), that did not help.
Attached are the UP variants of the ROM in an SSD image; the ones to use on real hardware.

One thing I found is that, to use this, you cannot have an other MMC FS real DFS in a higher priority ROM socket. If so, it will not access the physical disc drive but will default to MMC. I used it on a model B with a 8271 interface.

I am very pleased with the combination of physical drive and virtual discs, it works great! =D> =D> =D>
Attachments
ultrax.zip
(54.26 KiB) Downloaded 22 times
Paul

User avatar
lazarusr
Posts: 620
Joined: Thu Sep 10, 2015 8:56 pm
Location: London

Re: MMC card interface

Postby lazarusr » Sun Oct 16, 2016 11:13 am

I have an issue which I am unable to understand, let alone look at solving.

I have an MMB file with two SSD images on it (in positions one and two). When I try to use this on my Model B, the first file, on the first image is OK. However, the remaining files on that image are totally corrupted (large blocks of &00 and &FF, with occasional random bytes thrown in). The second image doesn't appear to have any files on it at all.

I have tried three different card readers, all with the same result. I have the same results using one of the latest builds of the MMFS rom and also with the latest build of SmartSPI. With the latter, I have also tried connecting to different data pins on the User Port, again with the same result.

Over on Windows, I have done a full reformat of the SD card (using the official formatter from the SD Association). The disk images were built with BeebASM. But I have tried creating a new image on BeebEm and then copying the files across. Using MMBImager, I can extract images direct from BEEB.MMB on the SD Card and then load them into BeebEM where all the files are fine. Likewise, I can use DFSImager to extract individual files and examine them too - they are, again, all fine.

All this suggests to me that the problem is with the User Port or the 6522. However, if I put the image on a USB stick, I can use my DataCentre (via the Beeb) to import it directly to one of the slots on the SD card. When I do that, everything is just fine.

So every element of the process seems, individually, to be working fine - yet the problem remains. I would really welcome any suggestions.

User avatar
sweh
Posts: 1847
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: MMC card interface

Postby sweh » Sun Oct 16, 2016 2:44 pm

My guess would be a sector size issue... If you format from scratch, then import via USB and DC and then look at the results on the PC, does it still look good?
Rgds
Stephen

User avatar
lazarusr
Posts: 620
Joined: Thu Sep 10, 2015 8:56 pm
Location: London

Re: MMC card interface

Postby lazarusr » Sun Oct 16, 2016 3:53 pm

sweh wrote:My guess would be a sector size issue... If you format from scratch, then import via USB and DC and then look at the results on the PC, does it still look good?

No! The image that was created on the Beeb now has the same, corresponding, problem on the PC in that all bar one of the files are large blocks of &00.

User avatar
sweh
Posts: 1847
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: MMC card interface

Postby sweh » Sun Oct 16, 2016 4:40 pm

That definitely sounds like a "size" issue, somewhere. What SD card are you using? Might it be a SDHC or similar?

We see similar with CF cards. In that case the Beeb only uses the first 8 bits of a 16bit wide word so for that we need to pad every other byte when working on a PC.
Rgds
Stephen

User avatar
lazarusr
Posts: 620
Joined: Thu Sep 10, 2015 8:56 pm
Location: London

Re: MMC card interface

Postby lazarusr » Sun Oct 16, 2016 4:45 pm

It's a (genuine) SanDisk 1GB Micro SD card. I have been using it for ages in the Beeb without a problem. This issue only arose today (albeit after a format).

User avatar
DutchAcorn
Posts: 1631
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: MMC card interface

Postby DutchAcorn » Mon Oct 17, 2016 8:27 pm

lazarusr wrote:It's a (genuine) SanDisk 1GB Micro SD card. I have been using it for ages in the Beeb without a problem. This issue only arose today (albeit after a format).

To rule out formatting issues you are welcome to try the 1GB image I have on my dropbox account. You can use Win32DiskImager to write it to the card.
Paul

User avatar
CMcDougall
Posts: 5620
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: MMC card interface

Postby CMcDougall » Sun Oct 30, 2016 3:41 pm

DutchAcorn wrote:you cannot have a real DFS in a higher priority ROM socket. If so, it will not access the physical disc drive but will default to MMC. I used it on a model B with a 8271 interface

just tried this on my Acorn 1770FDC with DFS2.26 (inD, MMC inE), and it now *'works'*, as now shows 0 V 1,2,3 R
but when going back to actual disc, ie drive 2 (also tried 1&3), it just gives "Disc error x"
so would presume the same with the M128 DFS2.24 version too.

still to try the 8271FDC beeb with DFS1.20, but you say works for you, so proberly does.
ImageImageImage

duikkie
Posts: 2711
Joined: Fri Feb 07, 2014 3:28 pm

Re: MMC card interface

Postby duikkie » Tue Jan 10, 2017 10:11 pm

i did make this one , two things , first the board is 1 mm thickens then the space between the flatcable pins.
second it is not very robust.

so i was thinking why not put the hole in a resin bath . like selvo kristal polyester xor resin. but as dutchman i found it very expensive :roll: ,

so question . will every polyester or resin do ? what is very ,very cheap #-o


DutchAcorn wrote:
skinnymathew wrote:Success with my 99p card.

That inspired me to do this:

bottom.jpgtop.jpginserted.jpg

And I was amazed to find it worked right away, sheer luck given the quality of my soldering. :oops: :D

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: MMC card interface

Postby tricky » Sat Dec 02, 2017 3:55 pm

Did anyone say for sure if there is any danger when connecting CB1 directly to PB1?
I've looked around and having had a problem on a couple of my beebs, I was wondering if this might have been a contributing factor, when combined with badly behaving software.
Would it be better to connect them with a resistor? (I like resistors :))
If so, 10K is my resistor of choice, but maybe someone has an answer based on something more that I like 10K :roll:

User avatar
CMcDougall
Posts: 5620
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: MMC card interface

Postby CMcDougall » Sat Dec 02, 2017 4:35 pm

^no danger at all, my 10x 33p china cards running on all my beebs /elks /masters /compact with no problem! :D
ImageImageImage


Return to “hardware”

Who is online

Users browsing this forum: No registered users and 8 guests