• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

looking for mpcfio equivalent for SD card

Started by -Gina-, April 12, 2006, 09:22:12 AM

Previous topic - Next topic

-Gina-

The topic pretty much covers it.  Does anyone have source for FAT operation on the SD card that they'd care to share?  It would save me a lot of time converting mpcfio.cpp and hoping it works.

Thanks,
      Gina

omaemad

The supercard I/0 lib is in the downloads section
the header files in cPP refers to the assembler files (sd.s cf.s)
it also includes the assembler need for both the SD and CF
man fears time but time fears the pyramid"

-Gina-

I don't understand what you are saying.   I have file sc_examples_10-2005.zip

There are no references to anything SD in mpcfio.cpp from what I can tell.  And I don't know if changing all the references from CF_ReadSector to sd_data_read_s (and so on) will work.

I just want to read some small files (under 32K each) off my SD card.

What I see in example_SD/source/main.cpp doesn't do that much to help.

socket

There's another file on the Download page... get the I/O source, not the examples...

-Gina-

Hi,

   Okay, I have the other file.  It just looks like a subset of the sc_examples file.

In the Main.c file, it states:
you may use "mpcfio.cpp" code also,but fisrt you must run "InitSCMode()" function.
(their misspelling, not mine)

However not all the calls in mpcfio.cpp match up with the ones in sd.s or cf.s

Do I need to change all instances of CF_WriteSector() to WriteSector() or is there an easier way?  Do the SDCommand() parameters match the CFCommand() ones?  It doesn't look like it since they are defined differently...

.GLOBAL  SDCommand
.GLOBAL  CFCommand @ r0:Srcp r1:num ok


Thanks,
Gina

omaemad

Have you seen palib
it has standard functions for all media card writting
man fears time but time fears the pyramid"

-Gina-

Quote from: "omaemad"Have you seen palib
it has standard functions for all media card writting

Oooh!  Examples that do something useful  :D  It looks a bit bloated (190K just to do a directory), but I don't care as long as it works.

Thanks!
  Gina