GithubHelp home page GithubHelp logo

No microSD card support about c65gs HOT 9 CLOSED

gardners avatar gardners commented on July 30, 2024
No microSD card support

from c65gs.

Comments (9)

gardners avatar gardners commented on July 30, 2024

Have contacted xesscorp to ask about this problem, and if they are willing to relicense under LGPL.

from c65gs.

gardners avatar gardners commented on July 30, 2024

All the machinery is now there, it just doesn't work. Reading a sector reports an error, but sd_error doesn't seem to get loaded.
Also there are some nasty warnings about CE/CS lines during synthesis.

from c65gs.

gardners avatar gardners commented on July 30, 2024

The above commit (f89a736) fixes some doozy bugs that would certainly have prevented the SD card commands from being accepted. Hopefully it will get it working. There remains an issue where the sector buffer remains mapped, regardless of the value of sector_buffer_mapped. This may be related to the nasty synthesis warnings that need to be addressed.

from c65gs.

gardners avatar gardners commented on July 30, 2024

Okay, we now can read the R1 code from the sd controller, but it is saying $05 = illegal command + idle. This may be because the card I am using is SD not SDHC. Changing mode and trying again.

from c65gs.

gardners avatar gardners commented on July 30, 2024

Will switch from using Xess sdcard module to the apparently freely usable code by Steve Merrifield in an attempt to resolve all of the world of hurt and pain that I have experienced with ISE + Xess code + my code. It is hard to workout where the cause of the problem is. In any case, using the free code will avoid having to wait for Xess to LGPL the code before I can release the complete code or an FPGA binary.

from c65gs.

gardners avatar gardners commented on July 30, 2024

With the above commits it is now possible to read from the SD card, but writing fails. Also need to confirm that CRC byte fix has worked, and that the whole 512 bytes get read in. Then need to debug why writing isn't working.

from c65gs.

gardners avatar gardners commented on July 30, 2024

Okay. After a lot of mucking around, the sdcard controller is merged into master. It almost, but not quite works. Basically reading a sector reads some of it, but misses most of the bytes.

from c65gs.

gardners avatar gardners commented on July 30, 2024

Missed byte was caused by SPI FSM in sdcontroller only running when no fastio accesses were in progress. As kernel and basic currently run from fastio, this bug showed up. The behaviour was added in to prevent dual-port ram complaints raised by xst when using the xess sd controller code. As that investigation showed that the sector buffer could in fact be dual port, we can change this behaviour. In fact, we can avoid dual-port by making the sector buffer only accessible when the busy flag is clear in the sdcontroller status register ($D680 bit 0 for now). This is what commit cb88917 above does. Now building to test if it fixes the problem.

from c65gs.

gardners avatar gardners commented on July 30, 2024

Reading from SDcard now works. Writing is untested, but may work, which can be the subject of another issue.

from c65gs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.