Here are small additions to Contrib/at67/gtemuAT67 that emulate a SD card plugged to a 128K RAM&IO expansion board. This code can boot from the SD card using Marcel's CardBoot program that is included in ROMv5a (with the version number bug fixed) and DEVROM. Initializing the card and reading single blocks is reasonably tested. Reading multiple blocks and writing blocks has not been tested for lack of Gigatron software that does this. I intend to correct as soon as bugs show up.
Demo:
Uncompress the provided sd card image sd.vhd.bz2. The image is compressed because it has to be 64MB to be formatted in FAT32, out of which only 900 bytes are used. Bzip2 provides the best compression for such files.
Make sure that the [SPI0] entries in loader_config.ini are properly configured: Type=SDHC, Filename=sd.vhd.
Start gtemuAT67 and use CTRL+Z twice to enable the 128KB RAM&IO expansion board emulation. It should then boot from the SD card.
The pull request has three main commits (and two smallish improvements.)
The first one fixes the IO part of the RAM & IO expansion emulation and implements the latest version of the memory banking (which may or may not prove useful but is easy to adjust.)
The second one adds files spi.h and spi.cpp. It also changes stuff in loader.cpp to permit parsing additional sections such as [SPI0].
The third one simply adds the compressed version of the SD disk image for demo purposes. This is reasonable because the compressed version is only ~1KB.
Caveat: I haven't tried to compile it under windows. The only window specific code is the _fseeki64 call in the last two functions of spi.cpp. The rest is plain stdio.
Hello AT67.
Here are small additions to Contrib/at67/gtemuAT67 that emulate a SD card plugged to a 128K RAM&IO expansion board. This code can boot from the SD card using Marcel's CardBoot program that is included in ROMv5a (with the version number bug fixed) and DEVROM. Initializing the card and reading single blocks is reasonably tested. Reading multiple blocks and writing blocks has not been tested for lack of Gigatron software that does this. I intend to correct as soon as bugs show up.
Demo:
The pull request has three main commits (and two smallish improvements.)
Caveat: I haven't tried to compile it under windows. The only window specific code is the _fseeki64 call in the last two functions of spi.cpp. The rest is plain stdio.