Shop OBEX P1 Docs P2 Docs Learn Events
P2 SD Drivers - COG PASM Version V2.70 - Page 2 — Parallax Forums

P2 SD Drivers - COG PASM Version V2.70

2

Comments

  • @cluso99 - that's a good idea about the CRC, in that it can be optimized easily and I like how you have made the complete transfer into one zero-overhead REP loop so that there are no jumps. While this doesn't help much with single sector reads since there is SD latency and other overheads, it should be quite noticeable with large multi-block reads.
  • Cluso99Cluso99 Posts: 18,066
    @"Peter Jakacki"
    I noticed that the latency is reduced when you are reading successive but individual sectors. Might do some more tests while I still have my test harness setup. I find once I move on it takes too long to go back even tho I have my code saved in steps along the way.
  • Yes, this is true and I have done various tests but it is not always predictable I think. Certainly the SD controller is either buffering a larger block with read-ahead or else it doesn't need any more overhead for that section. I should type in a q&d one-liner and put it through its paces to see how consistent that is and for how far.

    btw, I tried installing Visual Studio Code from the package manager on Linux, but it was a dumb flatpak that needed 500MB and for some reason kept using more than that and stalling and cluttering up var/tmp files. So I manually cleared them out and went straight to the VS website and downloaded a 60MB Linux deb install and I was up and running. So far, so good as I am using it and it feels somewhat similar to Atom but better and I even integrate a couple of terminal windows into my workspace, one running minicom. Right now I am modifying the grammer files.
  • Cluso99Cluso99 Posts: 18,066
    edited 2020-05-30 04:50
    So now you need the VSC setup files for spin and spin2 :)
    Here is the thread I started a while ago. My colors are better now - I'm using the standard Dark theme with the spin and spin2 json file.
    https://forums.parallax.com/discussion/170068/visual-studio-code-editor-for-p1-p2-spin-pasm
    and here too
    https://forums.parallax.com/discussion/comment/1469214/#Comment_1469214

    I had this link flagged for later consumption
    https://dev.to/ronsoak/i-built-my-own-vs-code-syntax-highlighter-from-scratch-and-here-s-what-i-learned-1h98
  • evanhevanh Posts: 15,126
    Cluso99 wrote: »
    ... Unfortunately I cannot do the same trick for reads and of course they are the most prevalent too.
    Oh, here I was thinking your code was for read data. Shows how unreadable skipping looks.

  • I followed the skipping without problems, but I think I must be missing something else.
    To reverse the order of the bits in the byte, isn’t it quicker to use a REV followed by a SHR #24?
  • evanhevanh Posts: 15,126
    I don't see any reordering.
  • Cluso99Cluso99 Posts: 18,066
    AJL wrote: »
    I followed the skipping without problems, but I think I must be missing something else.
    To reverse the order of the bits in the byte, isn’t it quicker to use a REV followed by a SHR #24?
    There’s no reversal. SPI sends msg first. If your just sending 8 bits you just need to shl/rol/rcl #24 first, then rcl #1 wc for each bit.
    When receiving, just testp #pin wc and rcl #1. Once all 8 bits received your good to go. Don’t even need to clear upper bits in some cases.
    evanh wrote: »
    Cluso99 wrote: »
    ... Unfortunately I cannot do the same trick for reads and of course they are the most prevalent too.
    Oh, here I was thinking your code was for read data. Shows how unreadable skipping looks.
    Even tho I mentioned it was for write, didn’t you see the 3 instruction loop were only outputs? The skip skips either the first or second mov which is writing clk=0 plus di= 0 or 1. The third instruction is never skipped and just outputs clk=1 without changing di. DI is MOSI output to SD (ie a write).

    Read requires the two clk=0 and clk=1 instructions plus it has to test the input pin do (MISO) and accumulate it and that’s another two instructions making the bit loop 4 instructions. No way around this without smart pins, and to make matters worse, the sampling instruction must come ~8 clocks after the output clk=0 instruction!
    We needed a combo write/sample/ accumulate instruction ;)
  • evanhevanh Posts: 15,126
    All I see is a bunch of MODC's.
  • Cluso99Cluso99 Posts: 18,066
    edited 2020-05-31 00:25
    Penny drops! You're looking at the wrong code. That code was just an example of using skipf which proves it (skipf) works, nothing more :(

    This is a snippet of the real code. I haven't posted the whole code that uses the skipf because it has a bug and I've temporarily moved on as it is working good enough without this speedup. I'll revisit it later athough I might just try smartpins when I get a chance.
  • RaymanRayman Posts: 13,805
    edited 2020-09-05 18:27
    I tried the v223 in top post... Not sure if working or not... See a few error messages in the output (see attached).
    v222 gives similar result...
  • Cluso99Cluso99 Posts: 18,066
    edited 2020-09-05 22:06
    @Rayman
    I'll need to look at the code (same with the OS) - don't have time at the moment so please remind me in a few days in case I forget.

    It is failing the initialise sequence although interestingly looks like the card thinks it is initialised correctly as it seems to be correctly returning the CSD and CID data.

    Can you try reading a known sector to see if the correct data is being returned at $FC100 ?
  • Cluso99Cluso99 Posts: 18,066
    edited 2021-01-29 21:00

    Here is my low level SD Driver V2.70 with a spin2 demo. It is using my multiport serial driver as a single UART.


    You will need a file "_HELP   .TXT" on the SD Card. It is just a text file so anything will do.


    Please report any bugs here :)

  • Ahle2Ahle2 Posts: 1,178
    edited 2021-03-03 15:14

    @Cluso99

    What a fantastic driver you have made! :smile: It's a thing of beuty when looking through the PASM code; And the mailbox interface works like a charm.

    It doesn't work perfectly in my setup though and I don't know what the cause of the problem is. The initializing code locks up when I reupload and restart the code the second time after a cold start. So everything works as expected as long as I do a cold start between each run. It doesn't matter if I eject and then reinsert the card again.

    I have debugged where the lock up happens and come to the conlusion that this piece of code will loop forever by jumping back to ".command55"...

    '+-----------------------------------------------------------------------------+
    '+ Prefix to ACMD41 & ACMD23:                                                  +
    '+      CMD55, PAR=$0,        CRC=$xx, reply=R1($01)                           +
    '+-----------------------------------------------------------------------------+
    .command55      mov     sdx_cmdout,      #CMD55         '
                    mov     sdx_cmdpar,      #0             '
    '+-----------------------------------------------------------------------------+
                    call    #_cmdRZA41       ' /CS=0, send cmd, recv R1, /CS=0(ena)
    '+-----------------------------------------------------------------------------+
      if_c_or_z     jmp     #_fail                          ' <>$01 (not idle)
                                                            '              fall thru
    '+-----------------------------------------------------------------------------+
    '+ Check SDV1/SDV2:  (follows CMD55)                                           +
    '+     ACMD41, PAR=$40000000, CRC=$xx, reply=R1($00) SD-V2                     +
    '+-----------------------------------------------------------------------------+
    .commandA41     mov     sdx_cmdout,      #ACMD41        '
                    decod   sdx_cmdpar,      #30            ' SDV2=$40000000 (1<<30)
     '+-----------------------------------------------------------------------------+
                    call    #_cmdR1          ' /CS=0, send cmd, recv R1, /CS=1
    '+-----------------------------------------------------------------------------+
      if_nc_and_nz  jmp     #.command55                     '  =$01(busy): CMD55+CMD41 again
      if_c          jmp     #_fail                          ' <>$00/$01: error
                                                            ' SDV2         fall thru
    


    Even if the problem is on my end, it probably shouldn't be possible to lock the driver up like this. This is the card...

  • dgatelydgately Posts: 1,621
    edited 2021-03-03 17:12

    @Cluso99 said:
    Here is my low level SD Driver V2.70 with a spin2 demo. It is using my multiport serial driver as a single UART.

    You will need a file "_HELP   .TXT" on the SD Card. It is just a text file so anything will do.

    Please report any bugs here :)

    Can't find the directory or the _HELP.txt file... With MS-Fat formatted SD (4096 sized blocks on a 16GB Patriot Micro HC SD card) executing on P2Eval:

    .wait ...
    ----------------------------------------
    SD Driver v2.70 demo (using spin)
    Serial driver started in cog 1
    SD Driver     started in cog 2
    
    Initialise the sd driver
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=       0
    SD Driver initialised
    Walk to the fat directory
      cmd= 0 stat=FF buf=    10D8 sect=       0 aux=       0
    *** Directory not found error FF
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=       0
    Find file _HELP   TXT in directory
      cmd= 0 stat=FF buf=    10D8 sect=       0 aux=     200
    *** File not found error FF
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=     200
    Read sector        0
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=     200
    Read sector        0 successful
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=     200
    010D8: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 10 76 0C  '.X.MSDOS5.0...v.'
    010E8: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    010F8: 00 A0 CE 01  C5 39 00 00  00 00 00 00  02 00 00 00  '.....9..........'
    01108: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    01118: 80 00 29 95  76 E5 10 4E  4F 20 4E 41  4D 45 20 20  '..).v..NO NAME  '
    01128: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    01138: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    01148: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    01158: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    01168: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    01178: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    01188: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    01198: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    011A8: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    011B8: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    011C8: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    011D8: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    011E8: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    011F8: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    01208: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    01218: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    01228: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    01238: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    01248: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    01258: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    01268: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    01278: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    01288: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    01298: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    012A8: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    012B8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    012C8: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    ----------------------------------------
    Stopping SD Driver
    SD Driver stopped
      cmd=FF stat=FF buf=    10D8 sect=       0 aux=     200
    ----------------------------------------
    .........
    

    What the SD looks like to WIN 10:

    dgately

  • Cluso99Cluso99 Posts: 18,066
    edited 2021-03-03 21:55

    @Ahle2 said:
    @Cluso99

    What a fantastic driver you have made! :smile: It's a thing of beuty when looking through the PASM code; And the mailbox interface works like a charm.

    It doesn't work perfectly in my setup though and I don't know what the cause of the problem is. The initializing code locks up when I reupload and restart the code the second time after a cold start. So everything works as expected as long as I do a cold start between each run. It doesn't matter if I eject and then reinsert the card again.

    I have debugged where the lock up happens and come to the conlusion that this piece of code will loop forever by jumping back to ".command55"...

    '+-----------------------------------------------------------------------------+
    '+ Prefix to ACMD41 & ACMD23:                                                  +
    '+      CMD55, PAR=$0,        CRC=$xx, reply=R1($01)                           +
    '+-----------------------------------------------------------------------------+
    .command55      mov     sdx_cmdout,      #CMD55         '
                    mov     sdx_cmdpar,      #0             '
    '+-----------------------------------------------------------------------------+
                    call    #_cmdRZA41       ' /CS=0, send cmd, recv R1, /CS=0(ena)
    '+-----------------------------------------------------------------------------+
      if_c_or_z     jmp     #_fail                          ' <>$01 (not idle)
                                                            '              fall thru
    '+-----------------------------------------------------------------------------+
    '+ Check SDV1/SDV2:  (follows CMD55)                                           +
    '+     ACMD41, PAR=$40000000, CRC=$xx, reply=R1($00) SD-V2                     +
    '+-----------------------------------------------------------------------------+
    .commandA41     mov     sdx_cmdout,      #ACMD41        '
                    decod   sdx_cmdpar,      #30            ' SDV2=$40000000 (1<<30)
     '+-----------------------------------------------------------------------------+
                    call    #_cmdR1          ' /CS=0, send cmd, recv R1, /CS=1
    '+-----------------------------------------------------------------------------+
      if_nc_and_nz  jmp     #.command55                     '  =$01(busy): CMD55+CMD41 again
      if_c          jmp     #_fail                          ' <>$00/$01: error
                                                            ' SDV2         fall thru
    


    Even if the problem is on my end, it probably shouldn't be possible to lock the driver up like this. This is the card...

    @Ahle2
    Thanks for your kind words.

    It shouldn't be possible to lock up the driver. Those calls have a timeout around them and they will return with C and or Z set and cause a jump to _fail to escape.
    However, the other day ??? reported a problem with not being able to use the SD card after Flash was used. I did a mod to call init twice, and FLTH the DO pin (should already be an input) and it did fix the problem. So here is V271 to try.

  • Cluso99Cluso99 Posts: 18,066

    @dgately said:

    @Cluso99 said:
    Here is my low level SD Driver V2.70 with a spin2 demo. It is using my multiport serial driver as a single UART.

    You will need a file "_HELP   .TXT" on the SD Card. It is just a text file so anything will do.

    Please report any bugs here :)

    Can't find the directory or the _HELP.txt file... With MS-Fat formatted SD (4096 sized blocks on a 16GB Patriot Micro HC SD card) executing on P2Eval:

    .wait ...
    ----------------------------------------
    SD Driver v2.70 demo (using spin)
    Serial driver started in cog 1
    SD Driver     started in cog 2
    
    Initialise the sd driver
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=       0
    SD Driver initialised
    Walk to the fat directory
      cmd= 0 stat=FF buf=    10D8 sect=       0 aux=       0
    *** Directory not found error FF
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=       0
    Find file _HELP   TXT in directory
      cmd= 0 stat=FF buf=    10D8 sect=       0 aux=     200
    *** File not found error FF
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=     200
    Read sector        0
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=     200
    Read sector        0 successful
      cmd= 0 stat= 0 buf=    10D8 sect=       0 aux=     200
    010D8: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 10 76 0C  '.X.MSDOS5.0...v.'
    010E8: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    010F8: 00 A0 CE 01  C5 39 00 00  00 00 00 00  02 00 00 00  '.....9..........'
    01108: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    01118: 80 00 29 95  76 E5 10 4E  4F 20 4E 41  4D 45 20 20  '..).v..NO NAME  '
    01128: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    01138: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    01148: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    01158: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    01168: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    01178: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    01188: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    01198: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    011A8: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    011B8: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    011C8: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    011D8: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    011E8: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    011F8: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    01208: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    01218: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    01228: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    01238: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    01248: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    01258: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    01268: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    01278: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    01288: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    01298: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    012A8: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    012B8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    012C8: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    ----------------------------------------
    Stopping SD Driver
    SD Driver stopped
      cmd=FF stat=FF buf=    10D8 sect=       0 aux=     200
    ----------------------------------------
    .........
    

    What the SD looks like to WIN 10:

    dgately

    The driver is not finding/validating the directory structure. It's not getting to the part where it searches for the file.

    I am presuming the card is formatted as FAT32?
    4K blocks are tiny. I use 32K blocks.

    Currently cannot recall how to determine if the card is an older style using byte addressing or sector addressing. This driver must use the newer sector addressing cards.
    BTW I always recommend SanDisk cards which is a common theme amongst users, even tho I've never had problems with other branded cards.

    In the driver, uncomment these two commented lines and change $FC400 to $78000

    done
        if_e    wrbyte  #0,         PTRA[m_stat]    ' set ##mbox_status (success)
        if_e    jmp     #mainloop
                wrbyte  #$FF,       PTRA[m_stat]    ' set ##mbox_status (failed)
                setq    #32-1
                wrlong  sdx_status, ##$78000        ' dump regs for debugging
                jmp     #mainloop
    

    and in the demo program SD_DEMO_SPIN.spin2 insert the line after the walkDirectory() line

    '--------------------------------------------------------------------------------------------------
    ' walk directory (locates the fat directory table) - (required once before using find file)
      walkDirectory()
      term.txdump($78000, $78000+32-1)                   ' display data read
    '--------------------------------------------------------------------------------------------------
    

    This will display two dumped lines after the walkDirectory() call. The first byte of the second line will be the last command issued to the sd card where the card failed. Please post a snapshot and I'll see what went wrong and try to fix.

  • dgatelydgately Posts: 1,621
    edited 2021-03-04 00:25

    @Cluso99 said:
    This will display two dumped lines after the walkDirectory() call. The first byte of the second line will be the last command issued to the sd card where the card failed. Please post a snapshot and I'll see what went wrong and try to fix.

    wait ...
    ----------------------------------------
    SD Driver v2.70 demo (using spin)
    Serial driver started in cog 1
    SD Driver     started in cog 2
    
    Initialise the sd driver
      cmd= 0 stat= 0 buf=    24C0 sect=       0 aux=       0
    SD Driver initialised
    Walk to the fat directory
      cmd= 0 stat=FF buf=    24C0 sect=       0 aux=       0
    *** Directory not found error FF
      cmd= 0 stat= 0 buf=    24C0 sect=       0 aux=       0
    78000: 00 00 00 00  00 00 00 00  C0 24 00 00  9D 6C DA 18  '.........$...l..'
    78010: 51 00 00 00  00 00 00 00  87 00 00 00  01 00 00 00  'Q...............'
    Find file _HELP   TXT in directory
      cmd= 0 stat=FF buf=    24C0 sect=       0 aux=     200
    *** File not found error FF
      cmd= 0 stat= 0 buf=    24C0 sect=       0 aux=     200
    Read sector        0
      cmd= 0 stat= 0 buf=    24C0 sect=       0 aux=     200
    Read sector        0 successful
      cmd= 0 stat= 0 buf=    24C0 sect=       0 aux=     200
    024C0: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 10 76 0C  '.X.MSDOS5.0...v.'
    024D0: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    024E0: 00 A0 CE 01  C5 39 00 00  00 00 00 00  02 00 00 00  '.....9..........'
    024F0: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02500: 80 00 29 95  76 E5 10 4E  4F 20 4E 41  4D 45 20 20  '..).v..NO NAME  '
    02510: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    02520: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    02530: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    02540: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    02550: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    02560: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    02570: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    02580: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    02590: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    025A0: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    025B0: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    025C0: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    025D0: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    025E0: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    025F0: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    02600: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    02610: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    02620: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    02630: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    02640: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02650: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02660: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    02670: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    02680: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    02690: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    026A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026B0: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    ----------------------------------------
    Stopping SD Driver
    SD Driver stopped
      cmd=FF stat=FF buf=    24C0 sect=       0 aux=     200
    

    I'll test a SanDisk SD card as well... Well, a "Samsung EVO 64GB", And It does read this one! :

    wait ...
    ----------------------------------------
    SD Driver v2.70 demo (using spin)
    Serial driver started in cog 1
    SD Driver     started in cog 2Initialise the sd driver
      cmd= 0 stat= 0 buf=    24C0 sect=       0 aux=       0
    SD Driver initialised
    Walk to the fat directory
      cmd= 0 stat= 0 buf=    24C0 sect=    7F5A aux=       0
    Directory found at sector     7F5A
    78000: 00 00 00 00  5A 7F 00 00  C0 24 00 00  85 37 01 19  '....Z....$...7..'
    78010: 51 00 00 00  5A 7F 00 00  87 00 00 00  01 00 00 00  'Q...Z...........'
    Find file _HELP   TXT in directory
      cmd= 0 stat= 0 buf=    24C0 sect=   1905A aux=     E75
    File _HELP   TXT found at sector    1905A size      E75 bytes
    Read sector    1905A
      cmd= 0 stat= 0 buf=    24C0 sect=   1905A aux=     E75
    Read sector    1905A successful
      cmd= 0 stat= 0 buf=    24C0 sect=   1905A aux=     E75
    024C0: 2A 2A 2A 20  43 6C 75 73  6F 27 73 20  50 72 6F 70  '*** Cluso's Prop'
    024D0: 65 6C 6C 65  72 20 53 44  20 63 61 72  64 20 4F 70  'eller SD card Op'
    024E0: 65 72 61 74  69 6E 67 20  53 79 73 74  65 6D 20 76  'erating System v'
    024F0: 31 2E 31 34  20 2A 2A 2A  20 20 20 20  20 20 28 30  '1.14 ***      (0'
    02500: 38 20 4F 63  74 6F 62 65  72 20 32 30  31 36 29 0D  '8 October 2016).'
    02510: 0A 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  '.---------------'
    02520: 2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  '----------------'
    02530: 2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  '----------------'
    02540: 2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  '----------------'
    02550: 2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  2D 2D 2D 2D  '----------------'
    02560: 0D 0A 63 6C  65 61 72 20  20 20 20 20  20 20 20 20  '..clear         '
    02570: 20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20  '                '
    02580: 20 20 20 20  20 20 20 20  20 20 20 20  27 20 43 6C  '            ' Cl'
    02590: 65 61 72 20  73 63 72 65  65 6E 0D 0A  63 6D 64 20  'ear screen..cmd '
    025A0: 20 20 20 20  2D 2D 2D 20  20 20 20 20  20 20 20 20  '    ---         '
    025B0: 20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20  '                '
    025C0: 20 20 20 20  20 20 27 20  49 6E 74 65  72 6E 61 6C  '      ' Internal'
    025D0: 20 75 73 65  20 28 63 6F  6D 6D 61 6E  64 20 69 6E  ' use (command in'
    025E0: 74 65 72 70  72 65 74 65  72 29 0D 0A  63 6F 70 79  'terpreter)..copy'
    025F0: 20 20 20 20  3C 73 6F 75  72 63 65 5F  66 69 6C 65  '    <source_file'
    02600: 3E 20 3C 64  65 73 74 69  6E 61 74 69  6F 6E 5F 66  '> <destination_f'
    02610: 69 6C 65 3E  20 20 27 20  43 6F 70 79  20 61 20 66  'ile>  ' Copy a f'
    02620: 69 6C 65 0D  0A 64 65 6C  20 20 20 20  20 3C 66 69  'ile..del     <fi'
    02630: 6C 65 3E 20  20 20 20 20  20 20 20 20  20 20 20 20  'le>             '
    02640: 20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 27  '               ''
    02650: 20 44 65 6C  65 74 65 20  61 20 66 69  6C 65 0D 0A  ' Delete a file..'
    02660: 64 69 66 66  20 20 20 20  3C 66 69 6C  65 31 3E 20  'diff    <file1> '
    02670: 3C 66 69 6C  65 32 3E 20  20 20 20 20  20 20 20 20  '<file2>         '
    02680: 20 20 20 20  20 20 20 20  20 20 27 20  44 69 73 70  '          ' Disp'
    02690: 6C 61 79 20  66 69 6C 65  20 64 69 66  66 65 72 65  'lay file differe'
    026A0: 6E 63 65 73  0D 0A 64 69  72 20 20 20  20 20 5B 6D  'nces..dir     [m'
    026B0: 61 73 6B 5D  20 20 20 20  20 20 20 20  20 20 20 20  'ask]            '
    
    ----------------------------------------
    
    Stopping SD Driver
    SD Driver stopped
      cmd=FF stat=FF buf=    24C0 sect=   1905A aux=     E75
    
  • Cluso99Cluso99 Posts: 18,066

    It is failing to read the sector, probably the first sector $0.

    To confirm this
    In the driver, uncomment these two commented lines and change both lines as shown

    done
        if_e    wrbyte  #0,         PTRA[m_stat]    ' set ##mbox_status (success)
        if_e    jmp     #mainloop
                wrbyte  #$FF,       PTRA[m_stat]    ' set ##mbox_status (failed)
                setq    #96-1
                wrlong  sdx_status, ##$78000        ' dump regs for debugging
                jmp     #mainloop
    

    and in the demo program SD_DEMO_SPIN.spin2 insert the line after the walkDirectory() line

    '--------------------------------------------------------------------------------------------------
    ' walk directory (locates the fat directory table) - (required once before using find file)
      walkDirectory()
      term.txdump($78000, $78000+96-1)                   ' display data read
    '--------------------------------------------------------------------------------------------------
    

    ie 32 changed to 96 (2 places)

  • Remember that TAQOZ in ROM is a great hardware diagnostic tool. While it is very basic compared to TAQOZ RELOADED, it is still useful.
    You can initialize the card, issue low level commands etc, or just simply MOUNT the FAT32 fs and DIR and DUMP files etc.

    Here's a quick console dump: ( text between the TAQOZ# prompt and the --- response are commands )

      Cold start
    -------------------------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.1--v33h         190219-1900
    -------------------------------------------------------------------------------
    TAQOZ# MOUNT --- .SDSC64G 6269_0201 P2 CARD    64k 60,890M ok
    TAQOZ# DIR --- 
    .SDSC64G 6269_0201 P2 CARD    64k 60,890M
    ROOTDIR      $0000_BA96   1980.00.00.00.00   0
    _BOOT_P2.BIX $0000_BC16   2000.01.01.00.00   131,072
    BMP          $0000_BD16   2021.01.12.13.11   0
    BMV          $0000_E416   2021.01.12.13.12   0
    FTH          $007A_0816   2021.01.12.13.12   0
    HTM          $007A_0E96   2021.01.12.13.13   0
    PDF          $007A_1496   2021.01.12.13.11   0
    PNG          $007A_2496   2021.01.12.13.15   0
    TXT          $007A_2E96   2021.01.12.13.12   0
    WAV          $007B_8396   2021.01.22.01.27   0
    _BOOT_P2.LZ4 $00B2_4896   2021.01.21.22.00   48,938
    FAVICON .ICO $00B2_4916   2013.12.16.23.57   8,069
    IMAGE        $00B2_4996   2014.06.15.05.44   16,204
    IMAGE1       $00B2_4A16   2000.01.01.00.00   12,500
    IMAGE2       $00B2_4A96   2014.06.15.05.44   51,347
    IMAGE3       $00B2_4B16   2014.06.15.13.54   80,286
    P8CPU   .JPG $00B2_4C16   2015.02.17.05.18   67,271
    SPIDEY  .GIF $00B2_4D16   2018.10.29.01.28   145,609
    TIGER   .GIF $00B2_4E96   2018.10.25.01.16   248,692
    TIGER   .JPG $00B2_5096   2018.10.25.01.10   133,590
    FISH2   .VT  $00B2_5216   2000.00.00.00.00   211,945
    RAM     .BIN $00B2_5416   2042.04.01.07.03   1,048,576
    EYEGOD  .BMP $00B2_5C16   2000.01.01.00.00   327,680
    WINDOWS .WAV $00B2_5E96   2021.01.24.06.16   424,744
    MINION  .BMP $00B2_6216   2021.01.24.13.08   231,478
    TAQOZ   .WAV $00B2_6416   2021.01.24.13.35   7,939,116
    TAQOZUP .WAV $00B2_A116   2021.01.24.13.42   899,834
    BOOT    .TXT $00B2_A816   2000.00.00.00.00   65,536
    TEST         $00B2_A896   2000.00.00.00.00   65,536
    SCREEN       $00B2_A916   2000.00.00.00.00   308,346
    PACMAN  .BMP $00B2_B296   2021.02.11.09.13   231,538
    PACMAN16.BMP $00B2_AB16   2021.02.11.07.56   691,254
    PACMAN1 .BMP $00B2_B096   2021.02.11.08.22   231,538
    BREAKOUT.WAV $00A9_DA96   2019.04.03.05.00   26,141,362
    _BOOT_P2.BIX $00B2_B496   2000.00.00.00.00   131,072
     ok
    TAQOZ#  ---  ok
    TAQOZ# @ROOT FOPEN 0 $80 SD DUMP --- 
    00000: 52 4F 4F 54  44 49 52 20  20 20 20 08  00 00 00 00     'ROOTDIR    .....'
    00010: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00020: 5F 42 4F 4F  54 5F 50 32  42 49 58 20  00 00 6C 3D     '_BOOT_P2BIX ..l='
    00030: 36 52 5C 52  00 00 00 00  21 28 03 00  00 00 02 00     '6R\R....!(......'
    00040: 42 4D 50 20  20 20 20 20  20 20 20 10  00 60 7D B0     'BMP        ..`}.'
    00050: 35 52 2C 52  00 00 6F 69  2C 52 05 00  00 00 00 00     '5R,R..oi,R......'
    00060: 42 4D 56 20  20 20 20 20  20 20 20 10  00 B3 E5 B1     'BMV        .....'
    00070: 35 52 2C 52  00 00 85 69  2C 52 53 00  00 00 00 00     '5R,R...i,RS.....' ok
    TAQOZ# 0 FOPEN 0 $200 SD DUMP --- 
    00000: 90 14 80 FD  50 32 45 56  41 4C 2D 42  03 00 00 00     '....P2EVAL-B....'
    00010: 00 2D 31 01  00 C2 EB 0B  F8 09 00 01  00 C2 01 00     '.-1.............'
    00020: 00 01 02 03  04 00 00 00  04 0D 00 00  00 AC 1C 10     '................'
    00030: 35 36 00 00  BC 05 00 00  1C 31 00 00  3A 00 00 00     '56.......1..:...'
    00040: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00050: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00060: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00070: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00080: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00090: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000B0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000C0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000D0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000E0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000F0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00100: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00110: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00120: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00130: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00140: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00150: 42 4F 4F 54  3A 20 32 30  30 30 2F 30  30 2F 30 30     'BOOT: 2000/00/00'
    00160: 20 4D 4F 4E  20 30 30 3A  30 30 3A 30  30 00 00 00     ' MON 00:00:00...'
    00170: 00 00 00 00  01 00 00 00  00 00 02 00  50 72 6F 50     '............ProP'
    00180: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00190: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001B0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 FE     '................'
    001C0: FF FF 0C 00  00 00 00 80  00 00 00 D0  6E 07 00 00     '............n...'
    001D0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001E0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001F0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 55 AA     '..............U.' ok
    TAQOZ#
    
  • Also, if you do happen to load the full TAQOZ serially you can use .DISK to test and print the disk details.

    TAQOZ# .DISK ---  CARD: SANDISK   SD SC64G REV$80 #35190404 DATE:2018/10 CARD: SANDISK   SD SC64G REV$80 #35190404 DATE:2018/10
    
                       *** OCR *** 
        VALUE........................... $C0FF_8000
        RANGE........................... 2.7V to 3.6V
    
                       *** CSD *** 
        CARD TYPE....................... SDHC
        LATENCY......................... 1ms+1400 clocks 
        SPEED........................... 50MHz 
        CLASSES......................... 0 1 0 1 1 0 1 1 0 1 0 1 
        BLKLEN.......................... 512
        SIZE............................ 62,367MB
        Iread Vmin...................... 10ma
        Iread Vmax...................... 25ma
        Iwrite Vmin..................... 60ma
        Iwrite Vmax..................... 35ma
    
                     *** SPEEDS *** 
        LATENCY......................... 481us,278us,259us,260us,275us,258us,258us,278us,
        SECTOR.......................... 421us,472us,451us,450us,469us,450us,449us,470us,
        BLOCKS.......................... 2,522kB/s @240MHz
    
                       *** MBR *** 
        PARTITION....................... 0 00 INACTIVE
        FILE SYSTEM..................... FAT32 LBA
        CHS START....................... 1023,254,63
        CHS END......................... 0,0,0
        FIRST SECTOR.................... $0000_8000
        TOTAL SECTORS................... 124,702,720 = 63,847MB
    
    00170: 0000_0000 0000_0001 0002_0000 506F_7250     '............ProP'
    
                      *** FAT32 *** 
        OEM............................. TAQOZ P2
        Byte/Sect....................... 512
        Sect/Clust...................... 128 = 65KB
        FATs............................ 2
        Media........................... F8
        Sect/Track...................... 63 
        Heads........................... 255 
        Hidden Sectors.................. 32,768 = 16MB
        Sect/Part....................... 124,702,720 = 63,847MB
        Sect/FAT........................ 7,611 = 3MB
        Flags........................... 0
        Ver............................. 00 00 
        ROOT Cluster.................... $0000_0002 SECTOR: $0000_BB96
        INFO Sector..................... $0001 = $0000_8001
        Backup Sector................... $0006 = $0000_8006
        res............................. 00 00 00 00 00 00 00 00 00 00 00 00 
        Drive#.......................... 128
        Ext sig......................... $29 OK!
        Part Serial#.................... $6269_0201 #1651048961
        Volume Name..................... P2 CARD    FAT32    ok
    
    
  • Cluso99Cluso99 Posts: 18,066

    @"Peter Jakacki" said:
    Remember that TAQOZ in ROM is a great hardware diagnostic tool. While it is very basic compared to TAQOZ RELOADED, it is still useful.
    You can initialize the card, issue low level commands etc, or just simply MOUNT the FAT32 fs and DIR and DUMP files etc.

    Here's a quick console dump: ( text between the TAQOZ# prompt and the --- response are commands )

      Cold start
    -------------------------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.1--v33h         190219-1900
    -------------------------------------------------------------------------------
    TAQOZ# MOUNT --- .SDSC64G 6269_0201 P2 CARD    64k 60,890M ok
    TAQOZ# DIR --- 
    .SDSC64G 6269_0201 P2 CARD    64k 60,890M
    ROOTDIR      $0000_BA96   1980.00.00.00.00   0
    _BOOT_P2.BIX $0000_BC16   2000.01.01.00.00   131,072
    BMP          $0000_BD16   2021.01.12.13.11   0
    BMV          $0000_E416   2021.01.12.13.12   0
    FTH          $007A_0816   2021.01.12.13.12   0
    HTM          $007A_0E96   2021.01.12.13.13   0
    PDF          $007A_1496   2021.01.12.13.11   0
    PNG          $007A_2496   2021.01.12.13.15   0
    TXT          $007A_2E96   2021.01.12.13.12   0
    WAV          $007B_8396   2021.01.22.01.27   0
    _BOOT_P2.LZ4 $00B2_4896   2021.01.21.22.00   48,938
    FAVICON .ICO $00B2_4916   2013.12.16.23.57   8,069
    IMAGE        $00B2_4996   2014.06.15.05.44   16,204
    IMAGE1       $00B2_4A16   2000.01.01.00.00   12,500
    IMAGE2       $00B2_4A96   2014.06.15.05.44   51,347
    IMAGE3       $00B2_4B16   2014.06.15.13.54   80,286
    P8CPU   .JPG $00B2_4C16   2015.02.17.05.18   67,271
    SPIDEY  .GIF $00B2_4D16   2018.10.29.01.28   145,609
    TIGER   .GIF $00B2_4E96   2018.10.25.01.16   248,692
    TIGER   .JPG $00B2_5096   2018.10.25.01.10   133,590
    FISH2   .VT  $00B2_5216   2000.00.00.00.00   211,945
    RAM     .BIN $00B2_5416   2042.04.01.07.03   1,048,576
    EYEGOD  .BMP $00B2_5C16   2000.01.01.00.00   327,680
    WINDOWS .WAV $00B2_5E96   2021.01.24.06.16   424,744
    MINION  .BMP $00B2_6216   2021.01.24.13.08   231,478
    TAQOZ   .WAV $00B2_6416   2021.01.24.13.35   7,939,116
    TAQOZUP .WAV $00B2_A116   2021.01.24.13.42   899,834
    BOOT    .TXT $00B2_A816   2000.00.00.00.00   65,536
    TEST         $00B2_A896   2000.00.00.00.00   65,536
    SCREEN       $00B2_A916   2000.00.00.00.00   308,346
    PACMAN  .BMP $00B2_B296   2021.02.11.09.13   231,538
    PACMAN16.BMP $00B2_AB16   2021.02.11.07.56   691,254
    PACMAN1 .BMP $00B2_B096   2021.02.11.08.22   231,538
    BREAKOUT.WAV $00A9_DA96   2019.04.03.05.00   26,141,362
    _BOOT_P2.BIX $00B2_B496   2000.00.00.00.00   131,072
     ok
    TAQOZ#  ---  ok
    TAQOZ# @ROOT FOPEN 0 $80 SD DUMP --- 
    00000: 52 4F 4F 54  44 49 52 20  20 20 20 08  00 00 00 00     'ROOTDIR    .....'
    00010: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00020: 5F 42 4F 4F  54 5F 50 32  42 49 58 20  00 00 6C 3D     '_BOOT_P2BIX ..l='
    00030: 36 52 5C 52  00 00 00 00  21 28 03 00  00 00 02 00     '6R\R....!(......'
    00040: 42 4D 50 20  20 20 20 20  20 20 20 10  00 60 7D B0     'BMP        ..`}.'
    00050: 35 52 2C 52  00 00 6F 69  2C 52 05 00  00 00 00 00     '5R,R..oi,R......'
    00060: 42 4D 56 20  20 20 20 20  20 20 20 10  00 B3 E5 B1     'BMV        .....'
    00070: 35 52 2C 52  00 00 85 69  2C 52 53 00  00 00 00 00     '5R,R...i,RS.....' ok
    TAQOZ# 0 FOPEN 0 $200 SD DUMP --- 
    00000: 90 14 80 FD  50 32 45 56  41 4C 2D 42  03 00 00 00     '....P2EVAL-B....'
    00010: 00 2D 31 01  00 C2 EB 0B  F8 09 00 01  00 C2 01 00     '.-1.............'
    00020: 00 01 02 03  04 00 00 00  04 0D 00 00  00 AC 1C 10     '................'
    00030: 35 36 00 00  BC 05 00 00  1C 31 00 00  3A 00 00 00     '56.......1..:...'
    00040: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00050: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00060: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00070: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00080: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00090: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000B0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000C0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000D0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000E0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    000F0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00100: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00110: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00120: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00130: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00140: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00150: 42 4F 4F 54  3A 20 32 30  30 30 2F 30  30 2F 30 30     'BOOT: 2000/00/00'
    00160: 20 4D 4F 4E  20 30 30 3A  30 30 3A 30  30 00 00 00     ' MON 00:00:00...'
    00170: 00 00 00 00  01 00 00 00  00 00 02 00  50 72 6F 50     '............ProP'
    00180: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00190: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001B0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 FE     '................'
    001C0: FF FF 0C 00  00 00 00 80  00 00 00 D0  6E 07 00 00     '............n...'
    001D0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001E0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001F0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 55 AA     '..............U.' ok
    TAQOZ#
    

    Thanks for chiming in Peter. I just never remember the TAQOZ one-liners :(

  • Ahle2Ahle2 Posts: 1,178

    @Peter Jakacki

    TAQOZ is amazing... Soo much punch in that "little" bag and all built in from the start. I have to start using it for diagnostics a little more. :smile:

  • dgatelydgately Posts: 1,621
    edited 2021-03-04 14:25

    @Cluso99

    SD Driver v2.70 demo (using spin)
    Serial driver started in cog 1
    SD Driver     started in cog 2
    Initialise the sd driver
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=       0
    SD Driver initialised
    Walk to the fat directory
      cmd= 0 stat=FF buf=    2668 sect=       0 aux=       0
    *** Directory not found error FF
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=       0
    78000: 00 00 00 00  00 00 00 00  68 26 00 00  7F B6 F8 18  '........h&......'
    78010: 51 00 00 00  00 00 00 00  87 00 00 00  01 00 00 00  'Q...............'
    78020: 73 00 00 00  FE 00 00 00  0E 01 00 00  00 02 00 00  's...............'
    78030: 00 00 00 00  00 00 00 38  00 00 00 00  00 80 FF C0  '.......8........'
    78040: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    78050: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    Find file _HELP   TXT in directory
      cmd= 0 stat=FF buf=    2668 sect=       0 aux=     200
    *** File not found error FF
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Read sector        0
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Read sector        0 successful
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    02668: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 40 16 03  '.X.MSDOS5.0..@..'
    02678: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    02688: 00 A0 CE 01  75 0E 00 00  00 00 00 00  02 00 00 00  '....u...........'
    02698: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026A8: 80 00 29 1B  65 96 3C 4E  4F 20 4E 41  4D 45 20 20  '..).e.<NO NAME  '
    026B8: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    026C8: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    026D8: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    026E8: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    026F8: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    02708: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    02718: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    02728: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    02738: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    02748: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    02758: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    02768: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    02778: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    02788: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    02798: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    027A8: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    027B8: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    027C8: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    027D8: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    027E8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    027F8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02808: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    02818: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    02828: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    02838: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    02848: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02858: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    Write sector        0
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Write sector        0 successful
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    02668: 3F 3F 3F 3F  53 44 4F 53  35 2E 30 00  02 40 16 03  '????SDOS5.0..@..'
    02678: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    02688: 00 A0 CE 01  75 0E 00 00  00 00 00 00  02 00 00 00  '....u...........'
    02698: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026A8: 80 00 29 1B  65 96 3C 4E  4F 20 4E 41  4D 45 20 20  '..).e.<NO NAME  '
    026B8: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    026C8: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    026D8: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    026E8: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    026F8: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    02708: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    02718: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    02728: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    02738: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    02748: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    02758: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    02768: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    02778: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    02788: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    02798: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    027A8: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    027B8: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    027C8: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    027D8: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    027E8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    027F8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02808: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    02818: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    02828: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    02838: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    02848: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02858: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    Read sector        0
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Read sector        0 successful
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    02668: 3F 3F 3F 3F  53 44 4F 53  35 2E 30 00  02 40 16 03  '????SDOS5.0..@..'
    02678: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    02688: 00 A0 CE 01  75 0E 00 00  00 00 00 00  02 00 00 00  '....u...........'
    02698: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026A8: 80 00 29 1B  65 96 3C 4E  4F 20 4E 41  4D 45 20 20  '..).e.<NO NAME  '
    026B8: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    026C8: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    026D8: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    026E8: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    026F8: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    02708: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    02718: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    02728: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    02738: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    02748: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    02758: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    02768: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    02778: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    02788: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    02798: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    027A8: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    027B8: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    027C8: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    027D8: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    027E8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    027F8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02808: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    02818: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    02828: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    02838: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    02848: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02858: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    Write sector        0
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Write sector        0 successful
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    02668: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 40 16 03  '.X.MSDOS5.0..@..'
    02678: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    02688: 00 A0 CE 01  75 0E 00 00  00 00 00 00  02 00 00 00  '....u...........'
    02698: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026A8: 80 00 29 1B  65 96 3C 4E  4F 20 4E 41  4D 45 20 20  '..).e.<NO NAME  '
    026B8: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    026C8: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    026D8: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    026E8: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    026F8: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    02708: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    02718: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    02728: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    02738: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    02748: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    02758: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    02768: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    02778: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    02788: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    02798: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    027A8: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    027B8: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    027C8: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    027D8: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    027E8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    027F8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02808: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    02818: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    02828: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    02838: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    02848: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02858: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    Find file _HELP2  TXT in directory
      cmd= 0 stat=FF buf=    2668 sect=       0 aux=     200
    *** File not found error FF
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Read sector        0
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    Read sector        0 successful
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=     200
    02668: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 40 16 03  '.X.MSDOS5.0..@..'
    02678: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00  '........?.......'
    02688: 00 A0 CE 01  75 0E 00 00  00 00 00 00  02 00 00 00  '....u...........'
    02698: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026A8: 80 00 29 1B  65 96 3C 4E  4F 20 4E 41  4D 45 20 20  '..).e.<NO NAME  '
    026B8: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4  '  FAT32   3.....'
    026C8: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56  '{......|.V@.N..V'
    026D8: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A  '@.A..U..r...U.u.'
    026E8: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD  '...t..F..-.V@...'
    026F8: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6  '.s......f...@f..'
    02708: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9  '...?.......Af...'
    02718: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A  'f..f.F..~..u9.~*'
    02728: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01  '.w3f.F.f........'
    02738: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC  '..,......}..|...'
    02748: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB  '..t.<.t.........'
    02758: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19  '...}...}........'
    02768: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06  'f`.~.... .fj.fP.'
    02778: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13  'Sfh.....B.V@....'
    02788: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03  'fXfXfXfX.3f;F.r.'
    02798: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2  '..*f3.f..N.f....'
    027A8: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56  '..f..f....v....V'
    027B8: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F  '@............fa.'
    027C8: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F  '.t.....f@Iu..BOO'
    027D8: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00  'TMGR    ........'
    027E8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    027F8: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02808: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69  '..............Di'
    02818: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73  'sk error...Press'
    02828: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74  ' any key to rest'
    02838: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00  'art.............'
    02848: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02858: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA  '..............U.'
    ----------------------------------------
    Stopping SD Driver
    SD Driver stopped
      cmd=FF stat=FF buf=    2668 sect=       0 aux=     200
    ----------------------------------------
    ....Saving session...completed.
    
      Cold start
    
    -------------------------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.1--v33h         190219-1900
    
    -------------------------------------------------------------------------------
    TAQOZ# MOUNT --- 'PHSD16G 3C96_651B NO NAME    32k 14,804M ok
    TAQOZ# DIR --- 
    'PHSD16G 3C96_651B NO NAME    32k 14,804M
     ok
    TAQOZ# @ROOT FOPEN 0 $80 SD DUMP --- 
    00000: 68 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00010: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00020: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00030: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00040: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00050: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00060: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00070: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................' ok
    TAQOZ# .DISK ???  ---  ok
    TAQOZ# @ROOT FOPEN 0 $80 SD DUMP --- 
    00000: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00010: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00020: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00030: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00040: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00050: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00060: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00070: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................' ok
    TAQOZ# 0 FOPEN 0 $200 SD DUMP ---  --- 
    00000: EB 58 90 4D  53 44 4F 53  35 2E 30 00  02 40 16 03     '.X.MSDOS5.0..@..'
    00010: 02 00 00 00  00 F8 00 00  3F 00 FF 00  00 00 00 00     '........?.......'
    00020: 00 A0 CE 01  75 0E 00 00  00 00 00 00  02 00 00 00     '....u...........'
    00030: 01 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00040: 80 00 29 1B  65 96 3C 4E  4F 20 4E 41  4D 45 20 20     '..).e.<NO NAME  '
    00050: 20 20 46 41  54 33 32 20  20 20 33 C9  8E D1 BC F4     '  FAT32   3.....'
    00060: 7B 8E C1 8E  D9 BD 00 7C  88 56 40 88  4E 02 8A 56     '{......|.V@.N..V'
    00070: 40 B4 41 BB  AA 55 CD 13  72 10 81 FB  55 AA 75 0A     '@.A..U..r...U.u.'
    00080: F6 C1 01 74  05 FE 46 02  EB 2D 8A 56  40 B4 08 CD     '...t..F..-.V@...'
    00090: 13 73 05 B9  FF FF 8A F1  66 0F B6 C6  40 66 0F B6     '.s......f...@f..'
    000A0: D1 80 E2 3F  F7 E2 86 CD  C0 ED 06 41  66 0F B7 C9     '...?.......Af...'
    000B0: 66 F7 E1 66  89 46 F8 83  7E 16 00 75  39 83 7E 2A     'f..f.F..~..u9.~*'
    000C0: 00 77 33 66  8B 46 1C 66  83 C0 0C BB  00 80 B9 01     '.w3f.F.f........'
    000D0: 00 E8 2C 00  E9 A8 03 A1  F8 7D 80 C4  7C 8B F0 AC     '..,......}..|...'
    000E0: 84 C0 74 17  3C FF 74 09  B4 0E BB 07  00 CD 10 EB     '..t.<.t.........'
    000F0: EE A1 FA 7D  EB E4 A1 7D  80 EB DF 98  CD 16 CD 19     '...}...}........'
    00100: 66 60 80 7E  02 00 0F 84  20 00 66 6A  00 66 50 06     'f`.~.... .fj.fP.'
    00110: 53 66 68 10  00 01 00 B4  42 8A 56 40  8B F4 CD 13     'Sfh.....B.V@....'
    00120: 66 58 66 58  66 58 66 58  EB 33 66 3B  46 F8 72 03     'fXfXfXfX.3f;F.r.'
    00130: F9 EB 2A 66  33 D2 66 0F  B7 4E 18 66  F7 F1 FE C2     '..*f3.f..N.f....'
    00140: 8A CA 66 8B  D0 66 C1 EA  10 F7 76 1A  86 D6 8A 56     '..f..f....v....V'
    00150: 40 8A E8 C0  E4 06 0A CC  B8 01 02 CD  13 66 61 0F     '@............fa.'
    00160: 82 74 FF 81  C3 00 02 66  40 49 75 94  C3 42 4F 4F     '.t.....f@Iu..BOO'
    00170: 54 4D 47 52  20 20 20 20  00 00 00 00  00 00 00 00     'TMGR    ........'
    00180: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    00190: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001A0: 00 00 00 00  00 00 00 00  00 00 00 00  0D 0A 44 69     '..............Di'
    001B0: 73 6B 20 65  72 72 6F 72  FF 0D 0A 50  72 65 73 73     'sk error...Press'
    001C0: 20 61 6E 79  20 6B 65 79  20 74 6F 20  72 65 73 74     ' any key to rest'
    001D0: 61 72 74 0D  0A 00 00 00  00 00 00 00  00 00 00 00     'art.............'
    001E0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00     '................'
    001F0: 00 00 00 00  00 00 00 00  AC 01 B9 01  00 00 55 AA     '..............U.' ok
    TAQOZ# 
    

    I reformatted the 64GB Samsung SD card with an older version of "ApplePiBaker", the Raspberry Pi SD format & copy app. And, it now reads without issue. I'll reformat the 16GB SD that I started this posting with, if its no longer needed for examination.

  • dgatelydgately Posts: 1,621
    edited 2021-03-07 00:32

    Just to complete the circle on this issue with several SD cards that I have...

    I reformatted the Patriot 16GB SD card using a version of ApplePiBaker (1.9.9), which allows formatting an SD card with an MS-Fat partition, normally for the use as a RaspberryPi OS card. I generally use this app because formatting > 32GB SDs to MS-Fat on WIN 10 is not an option. And, formatting the SD card as MS-Fat via macOS DiskUtility appears to not work well with the P2 driver. The app allows MS-Fat formatting without issue.

    The SD's directory is able to be read. After copying the _HELP.txt file to the SD card (via macOS), the file can now be read by the driver demo!

    SD Driver v2.70 demo (using spin)
    Serial driver started in cog 1
    SD Driver     started in cog 2
    
    Initialise the sd driver
      cmd= 0 stat= 0 buf=    2668 sect=       0 aux=       0
    SD Driver initialised
    Walk to the fat directory
      cmd= 0 stat= 0 buf=    2668 sect=    7BAA aux=       0
    Directory found at sector     7BAA
    78000: 00 00 00 00  AA 7B 00 00  68 26 00 00  1F 9A 42 25  '.....{..h&....B%'
    78010: 51 00 00 00  AA 7B 00 00  87 00 00 00  01 00 00 00  'Q....{..........'
    78020: 00 00 00 00  FE 00 00 00  0E 01 00 00  00 02 00 00  '................'
    78030: 0A 00 00 00  00 00 00 38  00 00 00 00  00 80 FF C0  '.......8........'
    78040: 00 08 00 00  01 08 00 00  20 08 00 00  AA 7B 00 00  '........ ....{..'
    78050: 00 98 CE 01  04 00 00 00  5F 48 45 4C  50 32 20 20  '........_HELP2  '
    Find file _HELP   TXT in directory
      cmd= 0 stat= 0 buf=    2668 sect=    86BA aux=     E75
    File _HELP   TXT found at sector     86BA size      E75 bytes
    Read sector     86BA
      cmd= 0 stat= 0 buf=    2668 sect=    86BA aux=     E75
    Read sector     86BA successful
      cmd= 0 stat= 0 buf=    2668 sect=    86BA aux=     E75
    
    024C0: 52 41 53 50  42 45 52 52  59 20 20 28  00 00 00 00  'RASPBERRY  (....'
    024D0: 00 00 00 00  00 00 1D 81  66 52 00 00  00 00 00 00  '........fR......'
    024E0: 42 30 00 30  00 00 00 FF  FF FF FF 0F  00 21 FF FF  'B0.0.........!..'
    024F0: FF FF FF FF  FF FF FF FF  FF FF 00 00  FF FF FF FF  '................'
    02500: 01 2E 00 53  00 70 00 6F  00 74 00 0F  00 21 6C 00  '...S.p.o.t...!l.'
    02510: 69 00 67 00  68 00 74 00  2D 00 00 00  56 00 31 00  'i.g.h.t.-...V.1.'
    02520: 53 50 4F 54  4C 49 7E 31  20 20 20 12  00 2A 1D 81  'SPOTLI~1   ..*..'
    02530: 66 52 66 52  00 00 1D 81  66 52 03 00  00 00 00 00  'fRfR....fR......'
    02540: 41 2E 00 66  00 73 00 65  00 76 00 0F  00 DA 65 00  'A..f.s.e.v....e.'
    02550: 6E 00 74 00  73 00 64 00  00 00 00 00  FF FF FF FF  'n.t.s.d.........'
    02560: 46 53 45 56  45 4E 7E 31  20 20 20 12  00 2F 1D 81  'FSEVEN~1   ../..'
    02570: 66 52 66 52  00 00 1D 81  66 52 5E 00  00 00 00 00  'fRfR....fR^.....'
    02580: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02590: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    025A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    025B0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    025C0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    025D0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    025E0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    025F0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02600: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02610: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02620: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02630: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02640: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02650: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02660: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02670: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02680: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    02690: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026A0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    026B0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  '................'
    ----------------------------------------
    Stopping SD Driver
    SD Driver stopped
      cmd=FF stat=FF buf=    24C0 sect=    7BAA aux=     200
    ----------------------------------------
    ..............Saving session...completed.
    Deleting expired sessions...      17 completed.
    
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2021-03-07 02:50

    TAQOZ reloaded has built in SD and FAT32 test utilities and reports, and also includes a FORMAT command that complies to the SD card association's specification for a reserved area before the start of the first partition. It will also format cards that are larger than 32GB to FAT32 and with the maximum cluster size of 64kB as well. I have formatted 128GB cards as FAT32 and even with 8GB cards I still choose a 64kB cluster size as well. BTW, 64kB is now set by default as well as protecting sector 0 with special system permission (in my "driver").

    Sometimes in the past I have overwritten sector 0 accidentally and so I have formatted just the MBR itself as TAQOZ allows access to the individual routines such as FORMAT.MBR FORMAT.ROOT and FORMAT.FAT.

    While Windows will format an SD card, it does not reserve memory before the first partition as is recommended, and also while it will format a card larger than 32GB as "FAT", it does so as exFAT, not FAT32.

  • @"Peter Jakacki" said:
    TAQOZ reloaded has built in SD and FAT32 test utilities and reports, and also includes a FORMAT command that complies to the SD card association's specification for a reserved area before the start of the first partition. It will also format cards that are larger than 32GB to FAT32 and with the maximum cluster size of 64kB as well. I have formatted 128GB cards as FAT32 and even with 8GB cards I still choose a 64kB cluster size as well. BTW, 64kB is now set by default as well as protecting sector 0 with special system permission (in my "driver").

    Excellent... Thank you for the reminder, Peter!

  • Uhm, maybe I'm, like, blind, but I can't find the files the FAT32 object wants. Where are they?

  • Cluso99Cluso99 Posts: 18,066

    I haven't posted an official version because it's not ready/tested for prime time.
    My Propeller 2 OS thread has the lastest posted working code in the last post here
    https://forums.parallax.com/discussion/comment/1519675/#Comment_1519675
    It is working better than I remembered but I know there are bugs

  • Cluso99Cluso99 Posts: 18,066

    I just updated post #3 on this thread with some block diagrams and timing diagrams that will help anyone wanting to either use my driver(s) or write their own.
    I did these years ago when writing the P2 SD boot code.

Sign In or Register to comment.