MMC card interface

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
MartinB
Posts: 4555
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity

Re: MMC card interface

Postby MartinB » Wed Apr 27, 2016 3:56 pm

Daniel wrote:It's 115200 bps...

That sounds very precise for the MMC synchronous SPI, are you mixing it with UPURS? (Which is 115k)

(I don't have the MMC stuff so you could well be right bw - it just sounded a bit precise :) )

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

Re: MMC card interface

Postby CMcDougall » Wed Apr 27, 2016 4:21 pm

When the MMC is active, the shift lock led on the keyboard flashes..... Take wires from that :?
ImageImageImage

waltermixxx
Posts: 173
Joined: Wed Jan 14, 2015 4:18 pm
Location: Toronto

Re: MMC card interface

Postby waltermixxx » Wed Apr 27, 2016 5:24 pm

lol I never noticed the shift light flashes with the mmc,
I've always just staired at my MMC ( the previous one i made had an activity light (adafruit sd breakout) ....

I think that's fine... I just wanted some kind of indicator,
that seems to be sufficient... Heck' I'll just look at the shift led. :) ...

sorry folks...

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

Re: MMC card interface

Postby daveejhitchins » Thu Apr 28, 2016 8:36 am

What you need is something to 'detect' the fast TTL logic level: Maybe a series capacitor, followed by a resistor to 0V and then a diode to rectify and produce a 'trigger' for a multivibrator circuit that would flash your LED at a speed you can see!

Dave H :D
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

waltermixxx
Posts: 173
Joined: Wed Jan 14, 2015 4:18 pm
Location: Toronto

Re: MMC card interface

Postby waltermixxx » Thu Apr 28, 2016 10:31 pm

Thank you. Just what I needed. :0)

Thanks again eh!!!

nudelooney
Posts: 117
Joined: Tue Sep 23, 2003 8:41 pm
Contact:

Re: MMC card interface

Postby nudelooney » Fri Apr 29, 2016 8:09 am

waltermixxx wrote:Thank you. Just what I needed. :0)

Thanks again eh!!!


I'd very much like to see a diagram of the circuit you finished up with! My solution would have been something complicated involving taking the MSB of a binary counter - yours sounds much simpler!

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

Re: MMC card interface

Postby tricky » Fri Apr 29, 2016 8:21 am

nudelooney wrote:... My solution would have been something complicated involving taking the MSB of a binary counter ...

Mine too, with some king of r resister capacitor pair building up charge to reset the counter when activity ended. I have near 0 electronics knowledge :shock:

waltermixxx
Posts: 173
Joined: Wed Jan 14, 2015 4:18 pm
Location: Toronto

Re: MMC card interface

Postby waltermixxx » Sun May 15, 2016 1:32 am

ok, so i managed to get 4 micro SD cards, and printed a little case for it. :)
attached a zip of the STL :)

here is a link to more pictures:
https://www.flickr.com/photos/66577016@ ... 016667415/




Image

Image
Attachments
microsd.zip
(950 Bytes) Downloaded 29 times

User avatar
1024MAK
Posts: 6795
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: MMC card interface

Postby 1024MAK » Sun May 15, 2016 2:01 am

daveejhitchins wrote:What you need is something to 'detect' the fast TTL logic level: Maybe a series capacitor, followed by a resistor to 0V and then a diode to rectify and produce a 'trigger' for a multivibrator circuit that would flash your LED at a speed you can see!

A 555 timer may be able to do this.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
Fwapp
Posts: 62
Joined: Thu Mar 26, 2015 7:19 pm

Re: MMC card interface

Postby Fwapp » Sun Jun 12, 2016 5:55 pm

Hello - I've got some Acorn time coming up and I'd like to get my SD card thingy up and running on my Iss.7 BBC B

From reading the previous pages, am I right in thinking that:

I take the SUPERMMC.ROM and burn it to one of these-

Image

and then plonk the PROM in my BBC? Any particular ROM socket?

I then take the files from here viewtopic.php?f=3&t=8176#p87705, plonk them onto a SD card and then put it in this-

Image

and then connect to the user port on my Beeb?
Acorn Atom (iss.4[WIP]) AtoMMC V2.0, BBC B (iss.7) Sir Morris SD Card and MMFS 1.27, Acorn Electron (iss.4), A3000

User avatar
sydney
Posts: 1987
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne

Re: MMC card interface

Postby sydney » Sun Jun 12, 2016 7:54 pm

Yes, but I'd recommend using the latest version of mmfs which I think is 1.27. Or smartspi.

User avatar
Fwapp
Posts: 62
Joined: Thu Mar 26, 2015 7:19 pm

Re: MMC card interface

Postby Fwapp » Sun Jun 12, 2016 8:02 pm

Thanks - would you happen have a link to the latest mmfs?

Scrub that :D Is this it linked here? viewtopic.php?f=3&t=10621&start=270#p135847
Acorn Atom (iss.4[WIP]) AtoMMC V2.0, BBC B (iss.7) Sir Morris SD Card and MMFS 1.27, Acorn Electron (iss.4), A3000

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

Re: MMC card interface

Postby hoglet » Sun Jun 12, 2016 8:08 pm

Fwapp wrote:Thanks - would you happen have a link to the latest mmfs?

Scrub that :D Is this it linked here? viewtopic.php?f=3&t=10621&start=270#p135847

Yes, the latest version, 1.27, is at the bottom of that post.

Dave

User avatar
Fwapp
Posts: 62
Joined: Thu Mar 26, 2015 7:19 pm

Re: MMC card interface

Postby Fwapp » Sun Jun 12, 2016 8:09 pm

Perfect - thanks Dave.

Time to fire up the Mini-pro :)
Acorn Atom (iss.4[WIP]) AtoMMC V2.0, BBC B (iss.7) Sir Morris SD Card and MMFS 1.27, Acorn Electron (iss.4), A3000

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

Re: MMC card interface

Postby DutchAcorn » Sun Jun 12, 2016 8:22 pm

Fwapp wrote:Perfect - thanks Dave.

Time to fire up the Mini-pro :)

The BBC has 16K sockets, the EEPROM you referred to is a 32K EEPROM. If you burn the (16K) image it should go in the top half of the 32K iirc. Or simply put it in there twice :wink:
Paul

User avatar
Fwapp
Posts: 62
Joined: Thu Mar 26, 2015 7:19 pm

Re: MMC card interface

Postby Fwapp » Sun Jun 12, 2016 8:25 pm

Nice catch! I'll double the file up - dos command line here I come!
Acorn Atom (iss.4[WIP]) AtoMMC V2.0, BBC B (iss.7) Sir Morris SD Card and MMFS 1.27, Acorn Electron (iss.4), A3000

User avatar
Fwapp
Posts: 62
Joined: Thu Mar 26, 2015 7:19 pm

Re: MMC card interface

Postby Fwapp » Mon Jun 13, 2016 2:06 pm

Up and running! Thanks gentlemen :)

I'm very, very new to the BBC so assuming that *DBOOT0 is the correct command to start the menu?
Acorn Atom (iss.4[WIP]) AtoMMC V2.0, BBC B (iss.7) Sir Morris SD Card and MMFS 1.27, Acorn Electron (iss.4), A3000

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

Re: MMC card interface

Postby hoglet » Mon Jun 13, 2016 2:09 pm

Fwapp wrote:Up and running! Thanks gentlemen :)

I'm very, very new to the BBC so assuming that *DBOOT0 is the correct command to start the menu?

On the Model B, Shift-Break should work.

On the Master, you might need to do a Ctrl-Shift Break.

Dave

User avatar
Fwapp
Posts: 62
Joined: Thu Mar 26, 2015 7:19 pm

Re: MMC card interface

Postby Fwapp » Mon Jun 13, 2016 2:36 pm

Yep - that works here :D
Acorn Atom (iss.4[WIP]) AtoMMC V2.0, BBC B (iss.7) Sir Morris SD Card and MMFS 1.27, Acorn Electron (iss.4), A3000

mm67
Posts: 49
Joined: Tue Feb 28, 2006 4:44 pm
Location: England
Contact:

Re: MMC card interface

Postby mm67 » Tue Jun 28, 2016 10:04 am

Couldn't resist having one last go at improving the ROM - so here is "Ultra DFS".

It's based on a slimmed down version of MMFS 1.00 (the original version), with its limitations i.e. no SDHC/FAT32/Turbo etc.

But one big improvement is: You can use real disk drives too!

If the floppy disc controller is present, by default all drives are 'Real'.
You can use *DIN and *DOUT to insert/remove 'Virtual' disks.

So, say drive 0 is 'real', and you want to backup a real floppy to a virtual one:

1) Insert the floppy in drive 0
2) Insert the virtual disk in drive 1, e.g. *DIN 1 25
3) *BACKUP 0 1
Voila

The *DDRIVE command has a 'R' or 'V' after the drive number to show its state (Real/Virtual).

Notes:
1) There are three versions of the ROM: 1.20 for 8271 beebs, 2.26 for 1770 beebs and 2.24 for the Master.
2) If the FDC is present by default all drives are real and Ultra DFS should appear no different to the normal DFS, until you use a command that implies access to the MMC/SD card is required, e.g. *DIN.
3) If the FDC is not present, drives 0 to 3 by default contain virtual discs 0 to 3 (like MMFS).
4) You can temporarily disable the FDC by pressing X-Break (followed by a Ctrl+Break to reset the drive states).

To fit all this in one ROM some things had to go, e.g. the SRAM utilities, *MAP/*FREE etc., but you do get *FORMat/*VERIFY/*ROMS in 1.20.

I've used BeebEm to develop/check the code was working - but that doesn't mean it works properly on real hardware as I found when I finally tried it on my real beeb where a few bugs revealed themselves.

I HAVE ONLY BRIEFLY TESTED VERSION 1.20 ON MY BEEB.

FOR THAT REASON THE ATTACHED ROMS ARE FOR TESTING PURPOSES/CURIOSITY ONLY!

I DO NOT INTEND TO MAKE ANY MORE CHANGES TO THIS CODE (UNLESS I FIND A BUG MYSELF) - FEEL FREE TO ADAPT TO YOUR NEEDS.

Happy coding
Martin

BeebEmDLL2.zip
mmbeeb2.dll file + source
(55.15 KiB) Downloaded 25 times

UltraX asm files.zip
asm files
(123.47 KiB) Downloaded 27 times

UltraX batch files.zip
batch files
(1.64 KiB) Downloaded 24 times

UltraX ROM images.zip
ROM images
(68.84 KiB) Downloaded 37 times
mm67

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

Re: MMC card interface

Postby DutchAcorn » Tue Sep 20, 2016 6:04 am

This sounds very elegant, I love the real & virtual combo! =D>

I finally found some time to actually give the 1.20 version a go in my BBC B (8271 interface).

My real floppy drive works but if I try a *DIN command (eg. *DIN 3 6) I am greeted with the "Card?" error.

If I switch back to SmartSPI I can access the card again.

The same error occurs when I try the rom in BeebEm (BBC B mode) with the MMBeeb FDD interface enabled.

Has anyone else experimented with this yet?
Paul

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

Re: MMC card interface

Postby DutchAcorn » Sat Oct 01, 2016 8:53 pm

DutchAcorn wrote:This sounds very elegant, I love the real & virtual combo! =D>

I finally found some time to actually give the 1.20 version a go in my BBC B (8271 interface).

My real floppy drive works but if I try a *DIN command (eg. *DIN 3 6) I am greeted with the "Card?" error.

If I switch back to SmartSPI I can access the card again.

The same error occurs when I try the rom in BeebEm (BBC B mode) with the MMBeeb FDD interface enabled.

Has anyone else experimented with this yet?

Ok tried a few more options. Master version: no joy (Card?)

I found that the original MMFS 1.00 that this was based on gives the same error on my configuration. The card I use is FAT16, and SD (not SDHC). The original MMBDFS and SuperMMB work fine with this (99P) reader and card.

What other known limitations does MMFS 1.00 have that I could look at?

Thanks!
Paul

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

Re: MMC card interface

Postby hoglet » Sat Oct 01, 2016 9:46 pm

DutchAcorn wrote:I found that the original MMFS 1.00 that this was based on gives the same error on my configuration. The card I use is FAT16, and SD (not SDHC). The original MMBDFS and SuperMMB work fine with this (99P) reader and card.

What size is the card?

Are you 100% sure it is FAT16?

Dave

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

Re: MMC card interface

Postby DutchAcorn » Sat Oct 01, 2016 9:52 pm

hoglet wrote:
DutchAcorn wrote:I found that the original MMFS 1.00 that this was based on gives the same error on my configuration. The card I use is FAT16, and SD (not SDHC). The original MMBDFS and SuperMMB work fine with this (99P) reader and card.

What size is the card?

Are you 100% sure it is FAT16?

Dave

The card is 1GB.

Pretty sure it is FAT16. Iirc SuperMMC also does not work with FAT32 and SuperMMC works fine on these cards.

If I try to reformat windows shows FAT as the default option.
Paul

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

Re: MMC card interface

Postby hoglet » Sat Oct 01, 2016 9:59 pm

It's very strange that it works with SuperMMC but not with MMFS 1.00. My understanding was they had the same limitations, because the SD Card initialization code was essentially the same. Only later did Duikkie add support for SDHC and FAT32, and I merged those changes back into later versions of MMFS.

Just to avoid doubt, where did you get MMFS 1.00 from?

With MMFS 1.00, is the error "Card?" or "Card format?"

Are there other files on the card, or just BEEB.MMB?

If you have a way of imaging the card, I'd be happy to take a look (I like mysteries like this!)

Dave

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

Re: MMC card interface

Postby duikkie » Sun Oct 02, 2016 6:35 am

if it works with the old super rom , it must be fat16/ byte access and beeb.mmb in first 8 names table
itmeans cmd0, cmd1.

DutchAcorn wrote:
DutchAcorn wrote:This sounds very elegant, I love the real & virtual combo! =D>

I finally found some time to actually give the 1.20 version a go in my BBC B (8271 interface).

My real floppy drive works but if I try a *DIN command (eg. *DIN 3 6) I am greeted with the "Card?" error.

If I switch back to SmartSPI I can access the card again.

The same error occurs when I try the rom in BeebEm (BBC B mode) with the MMBeeb FDD interface enabled.

Has anyone else experimented with this yet?

Ok tried a few more options. Master version: no joy (Card?)

I found that the original MMFS 1.00 that this was based on gives the same error on my configuration. The card I use is FAT16, and SD (not SDHC). The original MMBDFS and SuperMMB work fine with this (99P) reader and card.

What other known limitations does MMFS 1.00 have that I could look at?

Thanks!

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

Re: MMC card interface

Postby DutchAcorn » Sun Oct 02, 2016 7:39 pm

hoglet wrote:It's very strange that it works with SuperMMC but not with MMFS 1.00. My understanding was they had the same limitations, because the SD Card initialization code was essentially the same. Only later did Duikkie add support for SDHC and FAT32, and I merged those changes back into later versions of MMFS.

Just to avoid doubt, where did you get MMFS 1.00 from?

With MMFS 1.00, is the error "Card?" or "Card format?"

Are there other files on the card, or just BEEB.MMB?

If you have a way of imaging the card, I'd be happy to take a look (I like mysteries like this!)

Dave


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.
Paul

simonc
Posts: 18
Joined: Thu Sep 15, 2016 6:45 pm

Re: MMC card interface

Postby simonc » Sun Oct 02, 2016 9:49 pm

Thanks are due for the ongoing work on MMFS. This weekend my "99p for 2" Micro SD adaptor modules turned up from China so out came the breadboard and patch wires, plus an old user port ribbon cable and a £2 SD card. After a lot of faffing around transferring SuperMMC onto disk - I've no EPROM programmer, RS232 ports or PCs with floppy interfaces in the house and was reduced to loading MMFS into BeebEm, saving it as a UEF, then using MakeUEF to turn it into a WAV for playback at maximum volume using Audacity. I'd forgotten how awful using tape can be when the levels aren't right. I thought I'd seen that last of data? rewind tape messages behind in 1988 when we finally got a disk drive. Anyway, turns out SuperMMC doesn't work with this particular type of card, so I had to do it all over again (BEEP data? rewind tape) with the latest version of MMFS. Then it worked 8)

For reference, the adaptor is another one of the the Catalex cards that looks like this:
Image
Image

Next job, find a suitable plug for the card in the box of bits and bobs in the attic and attach it to the user port cable in the right configuration.

One request, please could the MMFS zip file have subfolders called UserPort and MemoryMapped (or BeebEm if that's the only thing that uses memory mapper currently), to make things a bit more obvious! It's not easy googling for the meaning of M.
Attachments
DSC_8506.JPG
(28.27 KiB) Not downloaded yet
DSC_8505.JPG
(26.84 KiB) Not downloaded yet

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

Re: MMC card interface

Postby hoglet » Mon Oct 03, 2016 11:20 am

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

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

Re: MMC card interface

Postby DutchAcorn » Mon Oct 03, 2016 11:53 am

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?
Paul


Return to “hardware”

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests