Skip to content

Supplement current explanation of $D680 with the bit-fields when you read the register #659

@gurcei

Description

@gurcei

Feeling like io register $D680 ought to be fleshed out a bit more in the documentation.

There's already a good section about what to write to that register, but I don't think there's any info on what is read from it.

I.e.:

Writing to $D680

We explain this already in this table of various commands you can write:

Image

Reading from $D680

Looking inside "sdcardio.vhdl", the reading of $D680 returns fields unrelated to the table above:

          -- @IO:GS $D680.0 - SD controller BUSY flag  -- GI NOTE: when "sdcardio.vhdl" thinks it is busy
          -- @IO:GS $D680.1 - SD controller BUSY flag  -- GI NOTE: when "sdcard.vhdl" thinks it is busy
          -- @IO:GS $D680.2 - SD controller RESET flag
          -- @IO:GS $D680.3 - SD controller sector buffer mapped flag
          -- @IO:GS $D680.4 - SD controller SDHC mode flag
          -- @IO:GS $D680.5 - SD controller SDIO FSM ERROR flag
          -- @IO:GS $D680.6 - SD controller SDIO error flag
          -- @IO:GS $D680.7 - SD controller primary / secondary SD card

So, if I were to make my own diagram for $D680 when reading:

     B7         B6         B5       B4        B3         B2     B1     B0
+----------+----------+----------+------+-------------+-------+------+------+
| SD CTRL  | SDIO     | SDIO FSM | SDHC | SECTOR BUFF | RESET |  SD  | SDIO |
| PRIM/SEC | ERR FLAG | ERR FLAG | MODE | MAPPED FLAG | FLAG  | BUSY | BUSY |
+----------+----------+----------+------+-------------+-------+------+------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    newNew report, not classified yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions