Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ToS

Pages: [1] 2
1
News and Release info / Re: Mictronics firmware release 0.10b
« on: 07.09.2007 at 21:15:25 »
Quote
I do miss a indicator for volyme when playing...
For what reason?

To be able to verify, and if needed, adjust the volyme before putting in the earpices, without having to switch to the volyme menu..

2
News and Release info / Re: Mictronics firmware release 0.10b
« on: 07.09.2007 at 13:02:32 »
Nice,

I do miss a indicator for volyme when playing... Did not get the YP act as a USB mem, but that is most likley due to the drivers in my computer... (Said, not able to read, do you want to format. And when trying to format, got an error...)

/ToS

3
Developers Corner / Re: GUI Ideas, Skin and Theme handling
« on: 02.03.2007 at 12:11:00 »
Some unstructured thoughts....

To minimize mem impact, we maybee should just load the GUI configuration and load the bmy's at demand ?

One solution could be, having a array of pointers, and when loading a GUI config, malloc space for each of the GUI component description, storing the pointer in the array.

The allocated memory, that describes:
What the GUI component represents, eg. GUI_PROGRESSBAR, should do with a byte ?
Type of GUI component, Text, graphic, should also do with a byte ?
Position x
Position y
And then a char array, if its a graphical GUI component that requires more than one bmy lets use ; as delimiter and then 0x00 teminated.

And then in the GUI update function,

eg. (Just pseudo code...)

while (g_pGuiComponent[idx] != NULL) {

  pGuiComp = g_pGuiComponent[idx];

  switch (pGuiComp[0]) {
    case GUI_PROGRESSBAR:
      switch (pGuiComp[1]) {
        case GRAPH:
           draw grapic at pGuiComp[2], pGuiComp[3], using bmy with index in delimited string based upon the value...
         break;
       default:
         //Handle it as text...
           draw text at pGuiComp[2], pGuiComp[3], using string with the value added...
       break;
     }
    ...
     break;
    case GUI_BATTERY:
}
}

4
Developers Corner / Re: Who is working on what?
« on: 01.03.2007 at 10:53:39 »
Oh, no need for oldschool mail lists when we have SVN, lets try to stick to the forum as the way to communicate...

In explorer, select the folder level in your local copy of the repository where you want to view changes...
TurtoiseSVN->Check for modifications, now click the button check repository, and hey. better than any email, you can see wich files you have updated local, what files that are updated in the repository... And now.. Select a file that has changed with right click, select compare with working copy... And now you really see what has changed...

/ToS

5
Developers Corner / Re: Who is working on what?
« on: 28.02.2007 at 21:53:35 »
Really, I think it´s Jespers previlige to decide on how work should be distributed and how the s/w should be designed, I hope he takes help from the forum to solve tasks and find solutions to design issues. I Would prefer that we posts code solutions and Jesper uses copy/paste to implement the best solutions, cause I think the quality of the code might suffer if more than a couple of people get write access in the SVN.

As to MIC´s less is more approach to the GUI... no lets go wild and crazy...  :P I would like an implementation where we have a config file at the SD card that describes what text or icons should be used for what info... That way MIC could have his simple gui with text, and I could have my shiny progress bar and funky battery icon  8)

eg.

config.ini
battery_icon=on
battery_icon_xy=10,10
battery100%=batt_icon100.bmy
battery75%=batt_icon75.bmy
battery50%=batt_icon50.bmy
battery25%=batt_icon25.bmy
battery0%=batt_icon0.bmy
#battery_icon=off
#battery_text="%d.%d Volt",10,10

/ToS

6
Software / Re: Display time and VBR MP3 file
« on: 28.02.2007 at 21:37:46 »
Have tried some diffrent approaches to this problem, and my opinon is that we should try to get total song time, if the file is VBR, estimate the length from a couple of frames by averanging, stick to this "song length" and then use the file size and pointer for progressbar... saves time at change song, enables use of progressbar, and does not confuse user with changing value for song time..

/ToS

7
Developers Corner / Re: Id3v1 tag
« on: 23.02.2007 at 19:28:57 »
Did almost work...  ;D

      if (pTitle != NULL) free(pTitle);
        if (pArti != NULL) free(pArti);
        
        pTitle = NULL;
        pArti = NULL;

      if (fatlseek(playstate.ps_fd, -128, SEEK_END ) != 0) {
          pCBuffer = (char*)malloc(128);
         FATFileRead(playstate.ps_fd, pCBuffer, 128);

         if (memcmp(pCBuffer, "TAG", 3) == 0) {
              cGenre = pCBuffer[127];
              sYear = ((pCBuffer[93]-48)*1000)+((pCBuffer[94]-48)*100)+((pCBuffer[95]-48)*10)+(pCBuffer[96]-48);
              if (pCBuffer[33] != NULL) {
                 pCBuffer[63] = NULL;
                 pArti = (char*)malloc(strlen(pCBuffer+33));
                 strcpy(pArti, pCBuffer+33);
              }                 

              if (pCBuffer[3] != NULL) {
                 pCBuffer[33] = NULL;
                 pTitle = (char*)malloc(strlen(pCBuffer+3));
                 strcpy(pTitle,pCBuffer+3);
              }
            }
         free(pCBuffer);
      }
            
      fatlseek(playstate.ps_fd,0,SEEK_SET);


And in update_playinfo (main.c)
   if (pArti != NULL) lcd_text2(4, 85, WHITE,BLACK, pArti);
   if (pTitle != NULL) lcd_text2(4, 94, WHITE,BLACK, pTitle);

And some declarations in main.c
char* pTitle;
char* pArti;
short sYear;
char  cGenre;

8
Developers Corner / Id3v1 tag
« on: 23.02.2007 at 12:50:06 »
Not tested nor compiled for ypod... just a first try... Would be nice if someone could add code to get song length in sec...

Reference used: http://www.id3.org/ID3v1

I did not include the comment field.. Easy to do, but is it worth the bits ?


Some nice place.. helpers.h ?

extern  char* pTitle;
extern  char* pArti;
extern  short sYear;
extern  char  cGenre;

At startup set all to NULL, ... main.c somewhere...

in helpers.c, function play_file

In the begining of function...

 char* pCBuffer;

An then after:

if (playstate.ps_fd != NULL)
   {
      iprintf("open ok\n");

  if (pTitle != NULL) free(pTitle);
  if (pArti != NULL) free(pArti);

if (fatlseek(playstate.ps_fd, -128, SEEK_END ) != 0) {
    pCBuffer = (char*)malloc(128);
FATFileRead(playstate.ps_fd, pCBuffer, 128);

     if (memcmp(pCBuffer, "TAG", 3) == 0) {
        pTitle = (char*)malloc(strlen(pCBuffer+3));
        strcpy(pTitle,pCBuffer+3);
        pArti = (char*)malloc(strlen(pCBuffer+33));
        strcpy(pArti, pCBuffer+33);
        sYear = ((pCBuffer[93]-48)*1000)+((pCBuffer[94]-48)*100)+((pCBuffer[95]-48)*10)+(pCBuffer[96]-48);
        cGenre = pCBuffer[127];
      }

free(pCBuffer);

}
fatlseek(fd,0,SEEK_SET);
}

/ToS





9
Wishlist / Re: More functions
« on: 22.02.2007 at 19:04:43 »
Skip to next song...

in main.c add function

int skip_play(void)
{
   next_in_playlist();
   return 1;
}

Change menu section in main.c to:

const menu_t play_menu_s[] = {
   {"Play Menu", NULL},         // first entry is title of menu

   {"Skip to next",    skip_play},
   {"Back",          player_refresh},
   {"Stop Playing",    stop_play},
   {"Browse Files",    option_browse},
   {"Main Menu",       totitlemenu},
   /*{"Option Menu",    option_menu},*/
   {NULL,NULL}
};

In helpers.h add:

void next_in_playlist(void);


Not fully tested, but seams to work...

/ToS

10
Wishlist / Re: Playerdesign
« on: 21.02.2007 at 22:18:48 »
A begining of a graphic time bar...

in helper.c:

void timeBar(int songLengthSec, int songPosSec)
{   
   int pos;
   
   //Ok lets set 5px at each side to border, 131-10 = 121
   pos = ((float)songPosSec*((float)121/(float)songLengthSec));
   
   if (pos < 126) {
      lcd_rectfill(4, 70, 127, 75, YELLOW);
      lcd_rectfill(5+pos, 71, 126, 74, BLACK);
   }   
}

In helper.h

void timeBar(int songLengthSec, int songPosSec);

in main.c, method void update_playinfo(void), after i is set... (btw I think, i should be named currSec. A lot of places short var names that not describes the meaning of the var are used...)

   timeBar((5*60) , i);

Todo, find a way to get song length, here hardcoded to 5*60...


11
Software / Re: Problem with 2Gb SD ?
« on: 15.02.2007 at 21:09:51 »
Ok, problem solved...

When I prepared the SD card, i unpacked the ycard_card_contents.zip into the card... And that structure have lower case in the
directory names... Recreated the structure with uppercase letters... And the fault is gone.... But this should be implemented so that the case on the directorys does not matter...

Caution..
The Circuit board are not fixed 100% in the case, the SD can get stuck... And if a headphone set with a large plastic sheilding are used, the connector might not go entire way in, causing bad connection to earth... (Bad sound quality).


12
Software / Re: Problem with 2Gb SD ?
« on: 15.02.2007 at 19:25:28 »
Yepp, with the driver the flasher works ok !

13
Software / Re: Problem with 2Gb SD ?
« on: 15.02.2007 at 18:39:09 »
Ok gave up, and solved the sam7flash problem by installing Visual C++ Express edition... Now I can run the flasher but get a device not connected msg... But really, a USB driver should be installed in XP, or not ? XP detects the USB device and executes the install new hardware dialog... Should I install a driver or not ? And wich one in such case ?

And now to the firmware bug, did a change in the software to read the icons from the root dir instead... And copied the icon files to the root of the SD... But since I have the flash problem I could not upload the new firmware... But left the files in the root at the SD.... And to my suprise.... The four icon meny appeared when i inserted the SD and power on... The fault should logicaly be in the fat.c code... If I get the flasher to work, I can test some more...

/ToS

14
Software / Re: Problem with 2Gb SD ?
« on: 15.02.2007 at 00:06:48 »
Nope no icons...

Wake up by [down 2] 3 sec.
welcome status screen...
Have to press center, to continue....
"File list" Appears... Can move marker up/down, text ok but icons infront of text seems currupted
If I selects a folder eg. music, screen does not change, must press center to get back to "File list" mode...

mp3 files placed in the music folder can´t be accessed, neither viewed in a list and hence not played...

So it seems like the code reads the root dir on the sd card correctly, but not further down into the filesystem structure...

mp3 files placed in the root at the sd card can be listed/played.....

And a note for the dev install.... Had problems to get it work, the code did not link properly... Some strange fault in the make... Solved by installing the tools in a path without space in dir name... Eg. NOT in c:\program files...

So now I can compile the yPod source, will try to get the flasher to work tomorrow without installing Visual Studio Express edition...

/ToS


15
Software / Re: Problem with 2Gb SD ?
« on: 14.02.2007 at 19:31:36 »
Just to get some sound... Copy a mp3 file to the root (\) of the SD, select the file in the "browser meny" and it plays ok...

Ok about VS, I think there is a "small" package at msdn somewhere that installs the runtimes for VS without the whole VS environment, just a case of finding it on bills page...

Pages: [1] 2