thejpster / monotron

A simple 8-bit home computer style application for the TI Tiva-C Launchpad
Apache License 2.0
191 stars 9 forks source link

SD/MMC support #33

Open thejpster opened 5 years ago

thejpster commented 5 years ago

We can put an SD card on SSI0 and use it to load/save files. Breakout boards aren't too expensive (https://www.proto-pic.co.uk/sdmmc-card-breakout.html)

See https://github.com/rafalh/rust-fatfs

thejpster commented 5 years ago

See WIP PR. Can currently do a dir on the root directory.

thejpster commented 5 years ago

We also need a DOS to handle the card, and to expose a sensible API to the user.

The Linux syscall API / POSIX file API isn't a bad starting point I guess.

thejpster commented 5 years ago

See #46

thejpster commented 5 years ago

The WIP PR can now load 6502 BASIC from the SD card (which is about 4 clusters in length).

thejpster commented 5 years ago

We need to use DMA so that data can be transferred during the video render as currently the performance is terrible. Changing the video to use a non-blocking pull API and SPI FIFO space free interrupts would also help.

thejpster commented 5 years ago

There is some DMA example code in a branch for doing DMA with the frame buffer. We can adapt that to do DMA with the SPI instead.

thejpster commented 5 years ago

File read support in master. Needs file write support, plus #46 so applications can use the SD card.