I've thought about it too, and I'm sure also others.
The Buinomon crew will definitely need this feature to support the huge number of monster graphics they have in mind. On Arduino forums, there seems to be consensus that 300KB/s 'should' be possible out of an SD card. The problem is the parsing speed, not the actual reading. Let's give a fairly conservative estimate of 50 KB/s, means 6250 bytes/sec = ~12 84x48 1-bit frames per second.
So in any case, should be doable and would be a very useful feature indeed.
Youtube finally processed my video. It took more than 24 hours ... I do not know whats wrong with YT nowadays.
This is a short clip from a tech demo I did in 2011, 128x64 1bit streaming video on Arduino over serial link.
Sd card streaming video should therefore be very doable on Gamebuino.
The serial link baud rate was 57.6 KB/s or 115.2 KB/s. I can't remember. Frames per second was around 8-10 fps. I remember though that I had to limit the speed due to serial comms errors, so possibly it was as low as 57.6 KB/s.
This is an old topic, but I found it while looking for a code example to load a bitmap from SD (adekto asked it in the comments but there was no answer).
It happens I just wrote my own routine, to be used with petitFatFs. It is specific to my gamebook engine because the bitmap data is in the middle of a big file on SD (the book itself) and I use 0xff as marker to tell my engine there's a bitmap and not a text paragraph.
I'll write a dedicated sketch for loading a single bitmap file from SD. But the basics are here:
Code:
Serial.begin(9600); PFFS.begin(10, rx, tx); // initialize petit_fatfs pf_open("test.bmp"); char bmp[13]; // 1 byte for width + 1 byte for height + 11 bytes for 1 line of bitmap data (84/8 rounded-up) gb.display.persistence=true; // stop clearing screen at every gb.update() gb.display.clear(); bmp[0]=84; bmp[1]=1; // get bitmap data line by line i.e. bmp dimension is 84x1 WORD br; for(byte y=0; y<48; y++) { pf_lseek(y*11); pf_read((void*)&bmp[2], 11, &br); gb.display.drawBitmap(0, y, bmp); // and draw it! }
Note that in any way the bitmap needs to be converted first (Paintuino will soon be able to do that via an export button).
For this to work you'll also need an enhanced drawBitmap function inside "Display.cpp" (and declare it in "Display.h"), to be able to draw a bitmap from a (variable) char array:
Display.h addition:
Code:
void drawBitmap(int8_t x, int8_t y, char *bitmap);
Display.cpp addition:
Code:
void Display::drawBitmap(int8_t x, int8_t y, char *bitmap) { byte w = bitmap[0]; byte h = bitmap[1]; #if (ENABLE_BITMAPS > 0) int8_t i, j, byteNum, bitNum, byteWidth = (w + 7) >> 3; for (i = 0; i < w; i++) { byteNum = i / 8; bitNum = i % 8; for (j = 0; j < h; j++) { if ((bitmap[2 + j * byteWidth + byteNum]) & (B10000000 >> bitNum)) { drawPixel(x + i, y + j); } } } #else drawRect(x, y, w, h); #endif }