elect-gombe / k210_mmd

3D rendering test
68 stars 8 forks source link

VMD file parse eror,Count = 0! #8

Open imliubo opened 4 years ago

imliubo commented 4 years ago

Hi, I'm trying this very amazing project, but I seem to have encountered a problem. I use A-EYE hardware,I have modified the pins of the LCD and SD card for A-EYE board.Model file it seem can be parse right,but the motion file can not be parse right(count always is 0),did I miss something? I use PC it can be works well! Log:

Core 0 Hello world                                   
core 1 registering...                                
Core 1 Hello world
sd init 0
card info status 0
CardCapacity:31914983424
CardBlockSize:512
mount sdcard:0
count:0
ik=7
elect-gombe commented 4 years ago

it seems loading model file is okay, but could not load a motion file. 'count:0' shows there is no key frames in that motion file.

https://github.com/elect-gombe/k210_mmd/blob/master/vmd.cpp

Make sure your motion file is enough small to fit within RAM of k210. I tested motion file of 'wavefile'. you can download from here: https://bowlroll.net/file/5983

imliubo commented 4 years ago

Hi @elect-gombe , Thanks for help me,I try this motion file again,the problem still exists. It was fail in this line:

    filread(&f,&motioncount,sizeof(uint32_t));
    motionlist = (motion_t*)malloc(sizeof(motion_t)*motioncount);
    if(motionlist == NULL){
     fail();
    }

Looks like memory allocation failed or file read error. Tonight, I will push the code to this repository(after 10 PM),If time is convenient, please take look~

Have a nice day!