Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload to Touchshield slide of 91 images fails #14

Open
crone opened this issue Mar 15, 2010 · 1 comment
Open

Upload to Touchshield slide of 91 images fails #14

crone opened this issue Mar 15, 2010 · 1 comment

Comments

@crone
Copy link

crone commented Mar 15, 2010

I am having major problems with uploading 91 bitmaps to my TouchShield Slide. The first 34 images are no problem. They are uploaded correctly. But then the screen background gets grey (in stead of black). It looks like the images are still uploaded, but I cannot use them afterwards. The screen gets scrambled although I see some of the colors of the bitmaps that I uploaded.

My 91 images are around 800kb in total. This looks like a buffer overflow of some sort. I tried to hack the FlashFileSystem.ccp file but I had no luck at all. I have this issue both on XP and OSX.

I thought that the TouchShield Slide is able to store 2mb of images? My upload breaks half-way; after 300kb of data. The bmp files that I try to upload can be found in this zipfile (in the images_bitmaps folder):
http://openmoco.org/downloads/openmoco_min.zip

I am running the following on the Slide during image upload:
PImage battlePic; //Create an image

void setup() {
background(0); //set the entire screen to black

open(FlashTransfer); //Waits for the IDE to send files to TouchShield’s flash storage.
battlePic = loadImage(“battle.bmp”); //read the uploaded image file from memory

image(battlePic,0,0); //paint image at pixel location (0,0)
}

void loop() {
// Do nothing!
}

I am running the following on the Arduino during upload
void setup(){
}

void loop(){
}

I anyone able to upload the images mentioned in the zipfile? Or am I missing something here?

@joaobarros
Copy link

on bmp.h you have:

#define kLookupTableMaxEntries (kLookupTableSize / kSizeOfFlashFileEntry)

#define kLookupTableSize DATAFLASH_PAGESIZE
#define DATAFLASH_PAGESIZE 528
#define kSizeOfFlashFileEntry 16

which turns out to be 528 / 16 = 33

From what I can see the code only uses 1 flash page so there's the limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants