You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(38) |
Apr
(39) |
May
(1) |
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(36) |
Feb
(3) |
Mar
(7) |
Apr
|
May
(1) |
Jun
(9) |
Jul
(23) |
Aug
(5) |
Sep
(2) |
Oct
(2) |
Nov
(11) |
Dec
|
2008 |
Jan
|
Feb
(4) |
Mar
(5) |
Apr
(5) |
May
|
Jun
|
Jul
(5) |
Aug
(16) |
Sep
(6) |
Oct
|
Nov
|
Dec
(10) |
2009 |
Jan
(4) |
Feb
(17) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <min...@us...> - 2012-10-23 05:00:45
|
Revision: 376 http://open2x.svn.sourceforge.net/open2x/?rev=376&view=rev Author: mindless2112 Date: 2012-10-23 05:00:38 +0000 (Tue, 23 Oct 2012) Log Message: ----------- O2xIV: fix compiler complaint Modified Paths: -------------- trunk/utils/o2xiv/src/thread.c Modified: trunk/utils/o2xiv/src/thread.c =================================================================== --- trunk/utils/o2xiv/src/thread.c 2009-03-31 22:55:32 UTC (rev 375) +++ trunk/utils/o2xiv/src/thread.c 2012-10-23 05:00:38 UTC (rev 376) @@ -42,6 +42,8 @@ } int load_images( void *nothing ) { + (void) nothing; + unsigned int cur_index = 0, // which indexes are actually loaded next_index = 0, prev_index = 0; @@ -172,7 +174,6 @@ free(filename); return 0; - nothing = NULL; // avoid being unused } // kate: tab-width 4; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-03-31 22:55:36
|
Revision: 375 http://open2x.svn.sourceforge.net/open2x/?rev=375&view=rev Author: senquack Date: 2009-03-31 22:55:32 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Subtitle bugs (some still present), scaling register bugs Modified Paths: -------------- trunk/apps/mp2x_4_1/source/gv.c trunk/apps/mp2x_4_1/source/mmsp2_if.h trunk/apps/mp2x_4_1/source/subdisp.c trunk/apps/mp2x_4_1/source/subreader.c Added Paths: ----------- trunk/apps/mp2x_4_1/source/libarmmem.a Removed Paths: ------------- trunk/apps/mp2x_4_1/source/gv.c.bak Modified: trunk/apps/mp2x_4_1/source/gv.c =================================================================== --- trunk/apps/mp2x_4_1/source/gv.c 2009-03-31 22:41:43 UTC (rev 374) +++ trunk/apps/mp2x_4_1/source/gv.c 2009-03-31 22:55:32 UTC (rev 375) @@ -138,22 +138,24 @@ SDL_Quit(); - chdir("/usr/gp2x/"); // \xC6\xC4\xC0\xCF\xC0\xCC \xC0ִ\xC2 \xB5\xF0\xB7\xBA\xC5丮\xB7\xCE \xC0̵\xBF - execlp("./gp2xmenu", "./gp2xmenu", NULL, 0); // \xC6\xC4\xC0\xCF \xBD\xC7\xC7\xE0 + //senquack - we'll handle this in our own script +// chdir("/usr/gp2x/"); // \xC6\xC4\xC0\xCF\xC0\xCC \xC0ִ\xC2 \xB5\xF0\xB7\xBA\xC5丮\xB7\xCE \xC0̵\xBF +// execlp("./gp2xmenu", "./gp2xmenu", NULL, 0); // \xC6\xC4\xC0\xCF \xBD\xC7\xC7\xE0 } int main(int argc, char *argv[]) { - { - char libpath[1024]; - struct stat statbuf; - - getcwd(libpath, 1000); - strcat(libpath, "/libiconv_plug.so"); - if(!lstat(libpath, &statbuf) && S_ISREG(statbuf.st_mode)) - setenv("LD_PRELOAD", libpath, 0); - } - + //senquack - GPH is so amateur! This doesn't work after the + //executable is already loaded, it is pointless. +// { +// char libpath[1024]; +// struct stat statbuf; +// +// getcwd(libpath, 1000); +// strcat(libpath, "/libiconv_plug.so"); +// if(!lstat(libpath, &statbuf) && S_ISREG(statbuf.st_mode)) +// setenv("LD_PRELOAD", libpath, 0); +// init_SDL_engine(); if(SetMode(argc, argv) != 0) { Deleted: trunk/apps/mp2x_4_1/source/gv.c.bak =================================================================== --- trunk/apps/mp2x_4_1/source/gv.c.bak 2009-03-31 22:41:43 UTC (rev 374) +++ trunk/apps/mp2x_4_1/source/gv.c.bak 2009-03-31 22:55:32 UTC (rev 375) @@ -1,1335 +0,0 @@ -/* - * - godori <ghcstop>, www.aesop-embedded.org - * - * => Created. October, 2004 - * - * => DIGNSYS Inc. < www.dignsys.com > developing from April 2005 - * - */ - -#include <SDL.h> -#include <SDL_thread.h> -#include <sys/stat.h> - -#include "gvlib_export.h" -#include "fbdisp/gfxdev.h" -#include "fbdisp/fbs.h" -#include "libao2/audio_out.h" - -#include "cx25874.h" - -#include "typed.h" -#include "filelistview.h" -#include "SDL_inifile.h" - -#define IMG_RESUME "./skin/resume.png" - -char charset[256]; -int leftgap, rightgap, topgap, bottomgap, minbottom; -int font_red, font_green, font_blue; -int outline_red, outline_green, outline_blue; -extern int resize_mode; - -SDL_Surface *g_pScreen = NULL; -SDL_Joystick *m_pJoy = NULL; -SDL_Surface *g_pImg_Body = NULL; -int done = 0; - -Uint8 g_Joystate = 0; -Uint8 g_LastStick = 0; -Uint32 g_DownTime = 0; - -int NowTick = 0; -int TotalPlayTime = 0; -float CurrentPlayTime = 0.0f; -float g_fResumePlayTime = 0.0f; -bool g_bResumePlay = false; - -int g_Kbps = 0; -int g_Khz = 0; -char *g_pTagTitle = NULL; -bool g_stero = false; -bool g_repeate = false; -bool g_shuf = false; -Equlize g_eq = NORMAL_EQ; - -extern ao_functions_t *audio_out; -extern int pause_flag; - -int quit_event = 0; -int break_signal_sent = 0; - -unsigned int disp_mode = 0; - - -int load_count = 0; -VideoFile vf; -char *ifile = NULL; -bool bFileSelect = false; -NEXT_COMMAND g_Command = NEXT_FILE_CMD; - - -int g_FBStatus = 0x01; -int posCursor = 0; -ViewMode viewmode = FILE_VIEW; -ViewMode oldviewmode = FILE_VIEW; -bool bMenuStatus = false; -bool g_NotSupported = false; - -bool bSeekPrevButton = false; -bool bSeekNextButton = false; -int g_ProgressValue = 0; - -bool bSeekPrevStick = false; -bool bSeekNextStick = false; -int g_SeekTime = 0; - -bool g_bHoldLCDoff = false; -int g_bTVMode = 0; - -static int sub_mode = 0; -VideoStatus vstate = STOP_STATUS; - - //senquack - no longer used -int cpuclock = 0; - -extern int force_backward_seek; -extern int leftVol; - -extern int set_of_sub_size; -extern SViewInfomation infoView; -extern SDirInfomation infoDir; - -void init_SDL_engine(void); -void InitApp(); -void ExitApp(); -void event_loop(void); -int SetMode(int argc, char *argv[]); -void OnExitClick(); - -extern void volume_change(bool up_flag); - -void InitApp() -{ - - infoView.nStartCount = 0; - infoView.nEndCount = 3; - infoView.nPosition = 0; - infoView.nStatus = 0; - infoDir.nCount = 3; - - g_Joystate = 0; - g_LastStick = 0; - g_DownTime = 0; -} - -void ExitApp() -{ - FileView_Exitialize(); - if(ifile != NULL) free(ifile); - DeleteDirInfo(&infoDir); - - if(g_FBStatus == 0x02) - switch_fb1_to_fb0(); - - - if(SDL_JoystickOpened(0)) - SDL_JoystickClose(m_pJoy); - - SDL_Quit(); - - //senquack - we can take care of this ourselves -// chdir("/usr/gp2x/"); // \xC6\xC4\xC0\xCF\xC0\xCC \xC0ִ\xC2 \xB5\xF0\xB7\xBA\xC5丮\xB7\xCE \xC0̵\xBF -// execlp("./gp2xmenu", "./gp2xmenu", NULL, 0); // \xC6\xC4\xC0\xCF \xBD\xC7\xC7\xE0 -} - -int main(int argc, char *argv[]) -{ - { - char libpath[1024]; - struct stat statbuf; - - getcwd(libpath, 1000); - strcat(libpath, "/libiconv_plug.so"); - if(!lstat(libpath, &statbuf) && S_ISREG(statbuf.st_mode)) - setenv("LD_PRELOAD", libpath, 0); - } - - init_SDL_engine(); - if(SetMode(argc, argv) != 0) - { - printf("Display Mode Set failed!!\n"); - ExitApp(); - return -1; - } - - InitApp(); - init_etc_setting(); - osd_plane_open(); - - viewmode = FILE_VIEW; - FileView_Initialize(); - FileView_OnDraw(g_pScreen); - - event_loop(); - - // senquack - this is now in the same folder as the binary for open2x: -// INI_Open("/usr/gp2x/common.ini"); - INI_Open("common.ini"); - INI_WriteInt("sound", "volume", leftVol); - INI_WriteInt("video", "speed", cpuclock); - INI_Close(); - - osd_plane_close(); - close_etc_setting(); - - ExitApp(); - - return 1; -} - - -void FileEvnetLoop(SDL_Event *event, SDL_Event *open_event) -{ - switch(event->type) - { - case SDL_KEYDOWN: - if(event->key.keysym.sym == SDLK_b) - { - OnExitClick(); - return; - } - break; - case SDL_JOYBUTTONDOWN : - if(event->jbutton.button == VK_START) - { - OnExitClick(); - return; - } - break; - } - FileView_OnProc(g_pScreen, event, open_event); - - - if(event->type == SDL_JOYBUTTONDOWN) - { - switch(event->jbutton.button) - { - case VK_UP : - case VK_DOWN : - g_Joystate = SDL_JOYBUTTONDOWN; - g_LastStick = event->jbutton.button; - g_DownTime = SDL_GetTicks(); - break; - } - } - else if(event->type == SDL_JOYBUTTONUP) - { - g_Joystate = SDL_JOYBUTTONUP; - } -} - - -void OnRelativeSeek(double sec) -{ - movie_seek(sec, RELATIVE_SEEK_BY_SECOND); -} - - -void OnAbsoluteSeek(double sec) -{ - movie_seek(sec, ABSOLUTE_SEEK_BY_POSITION); -} - -int GetPause() -{ - return pause_flag; -} - -void SetPause(int status) -{ - PauseTimer(status); - if(!status) { - force_backward_seek = 1; - OnRelativeSeek(-1); - } - pause_flag = status; -} - - -void OnPrevSong() -{ - if(pause_flag) SetPause(false); - if(infoView.nPosition-1 >= 0) - { - - if(infoDir.pList[infoView.nPosition-1].nAttribute == AVI_FORMAT) - { - pause_flag = 0; - quit_event = 1; - g_Command = PREV_FILE_CMD; - } - } -} - - -void OnNextSong() -{ - if(pause_flag) SetPause(false); - if(infoView.nPosition+1<infoDir.nCount) - { - - if(infoDir.pList[infoView.nPosition+1].nAttribute == AVI_FORMAT) - { - pause_flag = 0; - quit_event = 1; - g_Command = NEXT_FILE_CMD; - } - } -} - - -void OnPrevSeek() -{ - OnRelativeSeek(-10.0); -} - - -void OnNextSeek() -{ - OnRelativeSeek(10.0); -} - -void SaveResumeInfo() -{ - //senquack - now in same path as binary for open2x -// INI_Open("/usr/gp2x/movie.ini"); - INI_Open("movie.ini"); - INI_WriteFloat("resume", "time", CurrentPlayTime); - INI_WriteText("resume", "path", infoDir.szPath); - INI_WriteText("resume", "file", infoDir.pList[infoView.nPosition].szName); - INI_Close(); - - sync(); -} - -void OnToolBar_Play(SDL_Event *open_event) -{ - - if(GetPause()) - { - SetPause(false); - OnAbsoluteSeek((double)CurrentPlayTime/(double)TotalPlayTime*100.0); - } - else if(vstate == STOP_STATUS) - { - if(bFileSelect == true) - { - viewmode = MOVIE_VIEW; - bFileSelect = true; - - if(ifile != NULL) free(ifile); - ifile = (char*)malloc(strlen(infoDir.szPath) + strlen(infoDir.pList[infoView.nPosition].szName) + 2); - sprintf(ifile, "%s/%s", infoDir.szPath, infoDir.pList[infoView.nPosition].szName); - open_event->type = EVENT_MOVIE_PLAY; - open_event->user.data1 = (void*)ifile; - SDL_PushEvent(open_event); - } - } -} - - -void OnToolBar_Stop() -{ - pause_flag = 0; - quit_event = 1; - g_Command = STOP_CMD; -} - - -void OnToolBar_Pause() -{ - if(vstate != PLAY_STATUS) - { - printf("vstate != PLAY_STATUS OK \n"); - return; - } - else - { - printf("vstate != PLAY_STATUS NOT OK \n"); - } - - if(GetPause() == true) - { - SetPause(false); - OnAbsoluteSeek((double)CurrentPlayTime/(double)TotalPlayTime*100.0); - } - else - { - SetPause(true); - audio_out->reset(); - } -} - -void OnToolBar_Open() -{ - if(vstate == STOP_STATUS) - { - switch_fb1_to_fb0(); - viewmode = FILE_VIEW; - FileView_Initialize(); - FileView_OnDraw(g_pScreen); - } - else - { - pause_flag = 0; - quit_event = 1; - g_Command = OPEN_CMD; - } -} - -void OnToolBarEvent(SDL_Event *open_event) -{ - if(!bMenuStatus) return; - - switch(posCursor) - { - case PREV_FILE_BUTTON : - OnPrevSong(); - break; - case NEXT_FILE_BUTTON : - OnNextSong(); - break; - case PREV_SEEK_BUTTON : - if(vstate == PLAY_STATUS) - { - bSeekPrevButton = true; - g_ProgressValue = (double)CurrentPlayTime/(double)TotalPlayTime*100.0; - if(bSeekPrevStick == true || bSeekNextStick == true) - bSeekPrevStick = bSeekNextStick = false; - else - NowTick = g_SeekTime = SDL_GetTicks(); - } - - break; - case NEXT_SEEK_BUTTON : - if(vstate == PLAY_STATUS) - { - bSeekNextButton = true; - g_ProgressValue = (double)CurrentPlayTime/(double)TotalPlayTime*100.0; - if(bSeekPrevStick == true || bSeekNextStick == true) - bSeekPrevStick = bSeekNextStick = false; - else - NowTick = g_SeekTime = SDL_GetTicks(); - } - - break; - case PLAY_BUTTON : - OnToolBar_Play(open_event); - break; - case PAUSE_BUTTON : - OnToolBar_Pause(); - break; - case STOP_BUTTON : - OnToolBar_Stop(); - break; - case OPEN_BUTTON : - OnToolBar_Open(); - break; - } -} - -/* -void OnToolBar() -{ - if(bMenuStatus == true) HideToolBar(); - else ShowToolBar(); - -} -*/ - -void OnMoveToolBarIcon(int arrow) -{ - int oldpos = posCursor; - if(arrow == -1) - { - posCursor = (posCursor-1+8)%8; - } - else if(arrow == 1) - { - - posCursor = (posCursor+1+8)%8; - } - - if(oldpos != posCursor) OnDraw_MoveMenu(oldpos, posCursor); - -} - - -void OnExitClick() -{ - g_Command = EXIT_CMD; - pause_flag = 0; - quit_event = 1; - - if(vstate == STOP_STATUS) - { - if(g_FBStatus == 0x02) - switch_fb1_to_fb0(); - done = 1; - } - - -} - - -void OnJoystickDown(Uint8 button, SDL_Event *open_event) -{ - if(!bMenuStatus) - { - switch(button) - { - case VK_LEFT : - if(vstate == PLAY_STATUS) - { - NowTick = g_SeekTime = SDL_GetTicks(); - g_ProgressValue = (double)CurrentPlayTime/(double)TotalPlayTime*100.0; - bSeekPrevStick = true; - } - - break; - case VK_RIGHT : - if(vstate == PLAY_STATUS) - { - NowTick = g_SeekTime = SDL_GetTicks(); - g_ProgressValue = (double)CurrentPlayTime/(double)TotalPlayTime*100.0; - bSeekNextStick = true; - } - - break; - case VK_FL : - OnPrevSong(); - break; - case VK_FR : - OnNextSong(); - break; - case VK_FA : - break; - case VK_TAT : - OnToolBar_Pause(); - break; - case VK_FB : - - break; - case VK_FY : - ShowMenu(); - break; - case VK_FX : - if(vstate == PLAY_STATUS) - { - OnToolBar_Stop(); - } - else - { - switch_fb1_to_fb0(); - viewmode = FILE_VIEW; - FileView_Initialize(); - FileView_OnDraw(g_pScreen); - - } - break; - } - } - else - { - switch(button) - { - case VK_LEFT : - OnMoveToolBarIcon(-1); - break; - case VK_RIGHT : - OnMoveToolBarIcon(1); - break; - - case VK_FL : - OnPrevSong(); - break; - case VK_FR : - OnNextSong(); - break; - - case VK_FA : - break; - - case VK_TAT : - - - case VK_FB : - OnToolBarEvent(open_event); - break; - case VK_FY : - HideMenu(); - break; - case VK_FX : - if(vstate == PLAY_STATUS) OnToolBar_Stop(); - else OnToolBar_Open(); - break; - } - } -} - -void OnJoystickUp(Uint8 button, SDL_Event *open_event) -{ - if(bMenuStatus) - { - switch(button) - { - case VK_LEFT : - if(bSeekPrevStick == true || bSeekNextStick == true) - { - bSeekPrevStick = false; - bSeekNextStick = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnPrevSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - } - break; - case VK_RIGHT : - if(bSeekPrevStick == true || bSeekNextStick == true) - { - bSeekPrevStick = false; - bSeekNextStick = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnNextSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - } - break; - case VK_TAT : - case VK_FB : - printf("OnJoystickUp\n"); - if(bSeekPrevButton == true) - { - printf("OnJoystickUp bSeekPrevButton \n"); - - bSeekPrevButton = false; - bSeekNextButton = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnPrevSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - } - else if(bSeekNextButton == true) - { - printf("OnJoystickUp bSeekPrevButton \n"); - - bSeekPrevButton = false; - bSeekNextButton = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnNextSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - } - } - } - else - { - switch(button) - { - - - - - case VK_LEFT : - if(bSeekPrevStick == true || bSeekNextStick == true) - { - bSeekPrevStick = false; - bSeekNextStick = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnPrevSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - HideMenu(); - } - break; - case VK_RIGHT : - if(bSeekPrevStick == true || bSeekNextStick == true) - { - bSeekPrevStick = false; - bSeekNextStick = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnNextSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - HideMenu(); - } - break; - case VK_TAT : - case VK_FB : - if(bSeekPrevButton == true) - { - bSeekPrevButton = false; - bSeekNextButton = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnPrevSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - } - else if(bSeekNextButton == true) - { - bSeekPrevButton = false; - bSeekNextButton = false; - if(SDL_GetTicks()-g_SeekTime < 500) OnNextSeek(); - else OnAbsoluteSeek((double)g_ProgressValue); - } - } - } -} - -void OnKeyDown(SDLKey key, SDL_Event *open_event) -{ - printf("KEY DOWN\n"); - if(!bMenuStatus) - { - switch(key) - { - case SDLK_j : OnPrevSeek(); break; - case SDLK_l : OnNextSeek(); break; - - case SDLK_9 : OnPrevSong(); break; - case SDLK_0 : OnNextSong(); break; - - case SDLK_n : break; - case SDLK_u : OnToolBarEvent(open_event); break; - case SDLK_m : ShowMenu(); break; - case SDLK_y : break; - - case SDLK_b : OnExitClick(); break; - case SDLK_z : volume_change(false); break; - case SDLK_x : volume_change(true); break; - } - } - else - { - switch(key) - { - case SDLK_j : OnMoveToolBarIcon(-1); break; - case SDLK_l : OnMoveToolBarIcon(1); break; - - case SDLK_9 : OnPrevSong(); break; - case SDLK_0 : OnNextSong(); break; - - case SDLK_n : break; - case SDLK_u : OnToolBarEvent(open_event); break; - case SDLK_m : HideMenu(); break; - case SDLK_y : break; - - case SDLK_b : OnExitClick(); break; - case SDLK_z : volume_change(false); break; - case SDLK_x : volume_change(true); break; - } - } -} - -void OnKeyUp(SDLKey key, SDL_Event *open_event) -{ -} - -void ShowNotSupported() -{ - SDL_Surface *imgLoading = NULL; - SDL_Rect imgrect; - - - imgLoading = IMG_Load("./skin/error.png"); - - if(imgLoading != NULL) - { - imgrect.x = (320-imgLoading->w)/2; - imgrect.y = (240-imgLoading->h)/2; - imgrect.w = imgLoading->w; - imgrect.h = imgLoading->h; - - SDL_BlitSurface(imgLoading, NULL, g_pScreen, &imgrect); - if(imgLoading) SDL_FreeSurface(imgLoading); - SDL_UpdateRect(g_pScreen, imgrect.x, imgrect.y, imgrect.w, imgrect.h); - } -} -void ShowLoading() -{ - SDL_Surface *imgLoading = NULL; - SDL_Rect imgrect; - - - imgLoading = IMG_Load("./skin/loading.png"); - - if(imgLoading != NULL) - { - imgrect.x = (320-imgLoading->w)/2; - imgrect.y = (240-imgLoading->h)/2; - imgrect.w = imgLoading->w; - imgrect.h = imgLoading->h; - - SDL_BlitSurface(imgLoading, NULL, g_pScreen, &imgrect); - if(imgLoading) SDL_FreeSurface(imgLoading); - SDL_UpdateRect(g_pScreen, imgrect.x, imgrect.y, imgrect.w, imgrect.h); - } -} - -void OnPlay() -{ - SDL_Rect dstrect = { 0, 0, 320, 240 }; - - - pause_flag = 0; - break_signal_sent = 0; - quit_event = 0; - - bSeekPrevButton = false; - bSeekNextButton = false; - bSeekPrevButton = false; - bSeekNextButton = false; - g_ProgressValue = 0; - - - if(g_FBStatus == 0x02) switch_fb1_to_fb0(); - - - SDL_FillRect(g_pScreen, &dstrect, SDL_MapRGB(g_pScreen->format, 0x00, 0x00, 0x00)); - SDL_UpdateRect(g_pScreen, dstrect.x, dstrect.y, dstrect.w, dstrect.h); - - ShowLoading(); - - vstate = PLAY_STATUS; - viewmode = MOVIE_VIEW; - printf("play file name : %s\n", ifile); - - CurrentPlayTime = 0; - NowTick = SDL_GetTicks(); - - if(init_media_play(ifile) < 0) - { - printf("media play initialize error\n"); - quit_event = 0; - break_signal_sent = 0; - vstate = STOP_STATUS; - - ShowNotSupported(); - return; - } - - - SDL_FillRect(g_pScreen, &dstrect, SDL_MapRGB(g_pScreen->format, 0x00, 0x00, 0x00)); - SDL_UpdateRect(g_pScreen, dstrect.x, dstrect.y, dstrect.w, dstrect.h); - - - switch_fb0_to_fb1(); - - - if(!set_of_sub_size) sub_mode = 0; - else sub_mode = 1; - - HideMenu(); -} - -void OnFileOpen() -{ - printf("EVENT_FILE_OPEN\n"); -} - - -void OnQuitPlay(SDL_Event *open_event) -{ - quit_event = 1; - printf("EVENT_QUIT_PLAY occur\n"); - exit_media_play(); - - vstate = STOP_STATUS; - - quit_event = 0; - break_signal_sent = 0; - - if(g_Command == PREV_FILE_CMD) - { - - if(infoView.nPosition-1 >= 0) - { - - if(infoDir.pList[infoView.nPosition-1].nAttribute == AVI_FORMAT) - { - infoView.nPosition--; - viewmode = MOVIE_VIEW; - bFileSelect = true; - g_Command = NEXT_FILE_CMD; - - - if(ifile != NULL) free(ifile); - ifile = (char*)malloc(strlen(infoDir.szPath) + strlen(infoDir.pList[infoView.nPosition].szName) + 2); - sprintf(ifile, "%s/%s", infoDir.szPath, infoDir.pList[infoView.nPosition].szName); - open_event->type = EVENT_MOVIE_PLAY; - open_event->user.data1 = (void*)ifile; - SDL_PushEvent(open_event); - printf("PRev File Play\n"); - } - else - { - g_Command = STOP_CMD; - } - } - else - { - g_Command = STOP_CMD; - } - } - else if(g_Command == NEXT_FILE_CMD) - { - - if(infoView.nPosition+1<infoDir.nCount) - { - - if(infoDir.pList[infoView.nPosition+1].nAttribute == AVI_FORMAT) - { - infoView.nPosition++; - viewmode = MOVIE_VIEW; - bFileSelect = true; - g_Command = NEXT_FILE_CMD; - - - if(ifile != NULL) free(ifile); - ifile = (char*)malloc(strlen(infoDir.szPath) + strlen(infoDir.pList[infoView.nPosition].szName) + 2); - sprintf(ifile, "%s/%s", infoDir.szPath, infoDir.pList[infoView.nPosition].szName); - open_event->type = EVENT_MOVIE_PLAY; - open_event->user.data1 = (void*)ifile; - SDL_PushEvent(open_event); - printf("PRev File Play\n"); - } - else - { - g_Command = STOP_CMD; - } - } - else - { - g_Command = STOP_CMD; - } - } - else if(g_Command == OPEN_CMD) - { - viewmode = FILE_VIEW; - FileView_Initialize(); - FileView_OnDraw(g_pScreen); - - - viewmode = FILE_VIEW; - bFileSelect = false; - g_Command = NEXT_FILE_CMD; - - } - else if(g_Command == EXIT_CMD) - { - done = 1; - } - - if(g_Command == STOP_CMD) - { - vstate = STOP_STATUS; - quit_event = 0; - break_signal_sent = 0; - posCursor = STOP_BUTTON; - printf("STOP_CMD\n"); - ShowMenu(); - } - else - { - printf("### HERE ??? \n"); - switch_fb1_to_fb0(); - } -} - -void ShowResumeMessage() -{ - SDL_Surface *pResumeSurface = IMG_Load(IMG_RESUME); - - if(pResumeSurface != NULL) - { - SDL_Rect imgrect; - imgrect.x = (320-pResumeSurface->w)/2; - imgrect.y = (240-pResumeSurface->h)/2; - imgrect.w = pResumeSurface->w; - imgrect.h = pResumeSurface->h; - - SDL_BlitSurface(pResumeSurface, NULL, g_pScreen, &imgrect); - SDL_UpdateRect(g_pScreen, 0, 0, 0, 0); - - if(pResumeSurface) SDL_FreeSurface(pResumeSurface); - pResumeSurface = NULL; - } -} - -bool GetResumeInfomation(float *pResumePlayTime, char **pszpathname, char **pszfilename) -{ - //senquack - now in same folder as binary for open2x: -// INI_Open("/usr/gp2x/movie.ini"); - INI_Open("movie.ini"); - *pResumePlayTime = INI_ReadFloat("resume", "time", 0); - *pszpathname = strdup(INI_ReadText("resume", "path", "")); - *pszfilename = strdup(INI_ReadText("resume", "file", "")); - INI_Close(); - - return true; -} - -SDL_Event *resume_open_event = NULL; - -void event_loop(void) -{ - - SDL_Event event; - SDL_Event open_event; - static joydown[32]; - char *resumepathname = NULL; - char *resumefilename = NULL; - - resume_open_event = &open_event; // resume \xB6\xA7\xB9\xAE\xBF\xA1 \xC3߰\xA1 - memset((char *)&vf, 0x00, sizeof(VideoFile)); - load_count++; - - g_fResumePlayTime = 0.0f; - - if(GetResumeInfomation(&g_fResumePlayTime, &resumepathname, &resumefilename) == true) { - if(g_fResumePlayTime != 0.0f && resumepathname != NULL && resumefilename != NULL) { - if(ifile != NULL) free(ifile); - ifile = (char*)malloc(strlen(resumepathname) + strlen(resumefilename) + 3); - sprintf(ifile, "%s/%s", resumepathname, resumefilename); - - if(access(ifile, F_OK) == 0) { - ShowResumeMessage(); - - while(!done) - { - usleep(1); - if(SDL_PollEvent(&event) && (event.type == SDL_JOYBUTTONDOWN)) { - switch(event.jbutton.button) { - case VK_FB : - DeleteDirInfo(&infoDir); - GetDirInfo(&infoDir, resumepathname, FOLDER_AVI_MODE); - infoView.nStartCount = 0; - infoView.nPosition = 0; - infoView.nStatus = 1; - if(infoDir.nCount > 8) infoView.nEndCount = 8; - else infoView.nEndCount = infoDir.nCount; - - while(1) { - if(strcmp(infoDir.pList[infoView.nPosition].szName, resumefilename) == 0) break; - - if(infoView.nPosition >= infoDir.nCount -1) break; - infoView.nPosition++; - if(infoView.nPosition >= infoView.nEndCount) { - infoView.nStartCount++; - infoView.nEndCount++; - } - } - - g_bResumePlay = true; - open_event.type = EVENT_MOVIE_PLAY; - SDL_PushEvent(&open_event); - done = 1; - break; - case VK_FX : - g_bResumePlay = false; - FileView_OnDraw(g_pScreen); - done = 1; - break; - } - } - } - } - } - } - - if(resumepathname != NULL) free(resumepathname); // \xC7Ҵ\xE7 \xB9\xDE\xC0\xBA \xB0\xCD \xC7\xD8\xC1\xA6 - if(resumefilename != NULL) free(resumefilename); // \xC7Ҵ\xE7 \xB9\xDE\xC0\xBA \xB0\xCD \xC7\xD8\xC1\xA6 - - done = 0; - while(!done) - { - usleep(1); - - if(SDL_PollEvent(&event)) - { - switch(event.type) - { - case SDL_JOYBUTTONDOWN : - switch(event.jbutton.button) - { - case VK_VOL_UP : - if( ((g_bHoldLCDoff == false) || (joydown[VK_FL] && joydown[VK_FR])) && (leftVol != 100) ) - volume_change(true); - break; - case VK_VOL_DOWN : - if( ((g_bHoldLCDoff == false) || (joydown[VK_FL] && joydown[VK_FR])) && (leftVol != 0) ) - volume_change(false); - break; - case VK_START : - if(viewmode != FILE_VIEW) - SaveResumeInfo(); - OnExitClick(); - break; - case VK_SELECT: - resize_mode++; - break; - } - } - - - switch(event.type) - { - case EVENT_MOVIE_PLAY : - OnPlay(); - break; - case EVENT_FILE_OPEN : - OnFileOpen(); - break; - case EVENT_QUIT_PLAY: - OnQuitPlay(&open_event); - break; - case EVENT_SUBTITLE_CHANGE: - - sub_disp(); - break; - case EVENT_RESUME_SEEK: - g_fResumePlayTime -= 5; - force_backward_seek = 1; - if(g_fResumePlayTime < 0) g_fResumePlayTime = 0; - OnRelativeSeek(g_fResumePlayTime); - g_bResumePlay = false; - g_fResumePlayTime = 0.0f; - break; - case SDL_QUIT: - printf("SDL_QUIT signal occur\n"); - quit_event = 1; - done = 1; - break; - default: - break; - } - - if(g_bHoldLCDoff == false) { - switch(event.type) - { - case SDL_JOYBUTTONDOWN : - if(viewmode == FILE_VIEW) - FileEvnetLoop(&event, &open_event); - else - OnJoystickDown(event.jbutton.button, &open_event); - break; - case SDL_JOYBUTTONUP : - if(viewmode == FILE_VIEW) - FileEvnetLoop(&event, &open_event); - else - OnJoystickUp(event.jbutton.button, &open_event); - break; - case SDL_KEYDOWN: - if(viewmode == FILE_VIEW) - FileEvnetLoop(&event, &open_event); - else - OnKeyDown(event.key.keysym.sym, &open_event); - break; - case SDL_KEYUP: - if(viewmode == FILE_VIEW) - FileEvnetLoop(&event, &open_event); - else - OnKeyUp(event.key.keysym.sym, &open_event); - break; - } - } else { - switch(event.type) - { - case SDL_JOYBUTTONDOWN : - case SDL_JOYBUTTONUP : - joydown[event.jbutton.button] = event.type == SDL_JOYBUTTONDOWN; - break; - } - } - } - - - else if((SDL_GetTicks() > (NowTick + 500)) && (vstate == PLAY_STATUS) && (viewmode == MOVIE_VIEW) && bMenuStatus == true && (bSeekPrevButton == false && bSeekNextButton == false)) - { - NowTick = SDL_GetTicks(); - OnHide_SmallNumber(); - OnDraw_SmallNumberText(300, 4, ((int)CurrentPlayTime)/60, ((int)CurrentPlayTime)%60); - - OnDraw_Progress(13, 55, (int)(((double)CurrentPlayTime)/((double)TotalPlayTime)*100)); - } - - else if(g_Joystate == SDL_JOYBUTTONDOWN && g_DownTime + 300 < SDL_GetTicks() && viewmode == FILE_VIEW) - { - FileView_OnJoystickDown(g_pScreen, g_LastStick, &open_event); - } - - - else if((bSeekPrevButton || bSeekNextButton || bSeekPrevStick || bSeekNextStick) && (SDL_GetTicks() > g_SeekTime+500) && (SDL_GetTicks() > (NowTick + 100)) && (vstate == PLAY_STATUS) && (viewmode == MOVIE_VIEW)) - { - int curtime = 0; - NowTick = SDL_GetTicks(); - if(bSeekPrevButton || bSeekPrevStick) - { - g_ProgressValue -= 1; - if(g_ProgressValue < 0) g_ProgressValue = 0; - } - if(bSeekNextButton || bSeekNextStick) - { - g_ProgressValue += 1; - if(g_ProgressValue > 100) g_ProgressValue = 100; - } - - curtime = (int)(g_ProgressValue*(TotalPlayTime/100.0)); - - if(bMenuStatus) { - OnDraw_Progress(13, 55, g_ProgressValue); - - OnHide_SmallNumber(); - OnDraw_SmallNumberText(300, 4, ((int)curtime)/60, ((int)curtime)%60); - } else { - OnDraw_Progress2(13, 10, g_ProgressValue); - - OnHide_SmallNumber2(); - OnDraw_SmallNumberText(300, 4, ((int)curtime)/60, ((int)curtime)%60); - - OnHide_LargeNumber2(); - OnDraw_LargeNumberText(300, 15, ((int)TotalPlayTime)/60, ((int)TotalPlayTime)%60); - } - } - - } -} - -int SetMode(int argc, char *argv[]) -{ -/* - if(argc == 3) - { - if(!strcmp(argv[1], "lcd")) disp_mode = DISPLAY_LCD; - else if(!strcmp(argv[1], "monitor")) disp_mode = DISPLAY_MONITOR; - else if(!strcmp(argv[1], "tv")) disp_mode = DISPLAY_TV; - else - { - printf("NOT argv mode %s\n", argv[1]); - return -1; - } - } - - if(argc == 3) - { - if(!strcmp(argv[2], "NTSC")) g_bTVMode = 0; - else g_bTVMode = 1; - } -*/ - Msgdummy dummymsg, *pdmsg; - pdmsg = &dummymsg; - - memset((char *) &dummymsg, 0x00, sizeof(Msgdummy)); - MSG(pdmsg) = MMSP2_FB0_TV_LCD_CHECK; - LEN(pdmsg) = 0; - - //senquack - SDL_videofd was some sort of retarded global GPH put in their crappy SDL: - // We'll just open /dev/fb0 directly since that is where this ioctl should be going - int SDL_videofd = open("/dev/fb0", O_RDWR); - if (SDL_videofd == -1) { - fprintf(stderr, "Error opening /dev/fb0\n" ); - exit(1); - } - - if(ioctl(SDL_videofd, FBMMSP2CTRL, pdmsg) == 1) { - printf("TV Mode"); - disp_mode = DISPLAY_TV; - } else { - printf("LCD Mode...\n"); - disp_mode = DISPLAY_LCD; - //senquack - close(SDL_videofd); - return 0; - } - - MSG(pdmsg) = MMSP2_FB0_GET_TV_MODE; - LEN(pdmsg) = 0; - g_bTVMode = (ioctl(SDL_videofd, FBMMSP2CTRL, pdmsg) == 1) ? 1 : 0; - if(g_bTVMode == 0) printf(", NTSC Mode...\n"); - else printf(", PAL Mode...\n"); - - //senquack - close(SDL_videofd); - - return 0; -} - -void init_SDL_engine(void) -{ - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_EVENTTHREAD | SDL_INIT_JOYSTICK)) - { - fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError()); - exit(1); - } - - - if(SDL_NumJoysticks()>0) - { - m_pJoy = SDL_JoystickOpen(0); - if(m_pJoy) - { - #if 0 - printf("Opened Joystick 0\n"); - printf("Name: %s\n", SDL_JoystickName(0)); - printf("Number of Axes: %d\n", SDL_JoystickNumAxes(m_pJoy)); - printf("Number of Buttons: %d\n", SDL_JoystickNumButtons(m_pJoy)); - printf("Number of Balls: %d\n", SDL_JoystickNumBalls(m_pJoy)); - #endif - } - else - { - fprintf(stderr, "Couldn't open Joystick 0\n"); - } - } - - //senquack -moving this below setvideomode so it actually does get disabled -// SDL_ShowCursor(SDL_DISABLE); - - //senquack -// g_pScreen = SDL_SetVideoMode(320, 240, 0, SDL_SWSURFACE | SDL_FULLSCREEN); - g_pScreen = SDL_SetVideoMode(320, 240, 16, SDL_SWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF); - - if(g_pScreen == NULL) - { - fprintf(stderr, "SDL: could not set video mode - exiting\n"); - exit(1); - } - - // senquack - SDL_ShowCursor(SDL_DISABLE); - - INI_Open("./mp2x.ini"); - - strcpy(charset, INI_ReadText("subtitle", "lang", "")); - - leftgap = INI_ReadInt("subtitle", "left", 10); - if(leftgap < 0) leftgap = 0;if(leftgap > 320) leftgap = 320; - rightgap = INI_ReadInt("subtitle", "right", 10); - if(rightgap < 0) rightgap = 0;if(rightgap > 320) rightgap = 320; - topgap = INI_ReadInt("subtitle", "top", 10); - if(topgap < 0) topgap = 0;if(topgap > 240) topgap = 240; - bottomgap = INI_ReadInt("subtitle", "bottom", 10); - if(bottomgap < 0) bottomgap = 0;if(bottomgap > 240) bottomgap = 240; - - minbottom = INI_ReadInt("subtitle", "base", 40); - if(minbottom < 0) minbottom = 0; - if(minbottom > (240 - topgap - bottomgap)) minbottom = 240 - topgap - bottomgap; - - font_red = INI_ReadInt("subtitle", "font_red", 0xff) & 0xff; - font_green = INI_ReadInt("subtitle", "font_green", 0xff) & 0xff; - font_blue = INI_ReadInt("subtitle", "font_blue", 0xff) & 0xff; - - outline_red = INI_ReadInt("subtitle", "outline_red", 0) & 0xff; - outline_green = INI_ReadInt("subtitle", "outline_green", 0) & 0xff; - outline_blue = INI_ReadInt("subtitle", "outline_blue", 0) & 0xff; - - INI_Close(); - - // senquack - now in same folder as binary for open2x -// INI_Open("/usr/gp2x/common.ini"); - INI_Open("common.ini"); - - leftVol = INI_ReadInt("sound", "volume", 70); - cpuclock = INI_ReadInt("video", "speed", 0); - if(!charset[0]) - strcpy(charset, INI_ReadText("main", "charset", "UHC//IGNORE")); - - INI_Close(); -} Added: trunk/apps/mp2x_4_1/source/libarmmem.a =================================================================== (Binary files differ) Property changes on: trunk/apps/mp2x_4_1/source/libarmmem.a ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/apps/mp2x_4_1/source/mmsp2_if.h =================================================================== --- trunk/apps/mp2x_4_1/source/mmsp2_if.h 2009-03-31 22:41:43 UTC (rev 374) +++ trunk/apps/mp2x_4_1/source/mmsp2_if.h 2009-03-31 22:55:32 UTC (rev 375) @@ -109,7 +109,9 @@ #define TV_NTSC_ENC_WIDTH 670 #define TV_NTSC_ENC_HEIGHT (232*2) #define TV_PAL_ENC_WIDTH 670 +//senquack - experiment, changing this to 232*2 didn't help subtitle cutoff #define TV_PAL_ENC_HEIGHT (280*2) +//#define TV_PAL_ENC_HEIGHT (232*2) # ifndef mmioFOURCC # define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ Modified: trunk/apps/mp2x_4_1/source/subdisp.c =================================================================== --- trunk/apps/mp2x_4_1/source/subdisp.c 2009-03-31 22:41:43 UTC (rev 374) +++ trunk/apps/mp2x_4_1/source/subdisp.c 2009-03-31 22:55:32 UTC (rev 375) @@ -224,7 +224,11 @@ gfx_draw_sized_rect(psd, 0, 0, psd->planew, psd->planeh, RGB2PIXEL(0xCC,0xCC,0xCC)); - if((disp_mode == DISPLAY_TV) && (g_bTVMode == 0) && (memfd > 0)) // NTSC TV Mode... + //senquack - It seems that in PAL mode, it never touches the scaling registers. Let's + // set them to the same values when in either PAL or NTSC mode to try to fix cut-off + // bottom portion of screen PAL users are complaining about: +// if((disp_mode == DISPLAY_TV) && (g_bTVMode == 0) && (memfd > 0)) // NTSC TV Mode... + if((disp_mode == DISPLAY_TV) && (memfd > 0)) // NTSC TV Mode... { unsigned short *regs; regs = (unsigned short*)mmap(0, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, memfd, 0xC0000000); Modified: trunk/apps/mp2x_4_1/source/subreader.c =================================================================== --- trunk/apps/mp2x_4_1/source/subreader.c 2009-03-31 22:41:43 UTC (rev 374) +++ trunk/apps/mp2x_4_1/source/subreader.c 2009-03-31 22:55:32 UTC (rev 375) @@ -1670,7 +1670,9 @@ void subcp_open(FILE * enca_fd) { - char *tocp = "UTF-8"; + // senquack +// char *tocp = "UTF-8"; + char *tocp = "UHC//IGNORE"; if (sub_cp) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-03-31 22:41:45
|
Revision: 374 http://open2x.svn.sourceforge.net/open2x/?rev=374&view=rev Author: senquack Date: 2009-03-31 22:41:43 +0000 (Tue, 31 Mar 2009) Log Message: ----------- TV Tweaking Daemon Added Paths: ----------- trunk/utils/tv_daemon/ trunk/utils/tv_daemon/Makefile trunk/utils/tv_daemon/mmsp2_regs.h trunk/utils/tv_daemon/tv_daemon.c Added: trunk/utils/tv_daemon/Makefile =================================================================== --- trunk/utils/tv_daemon/Makefile (rev 0) +++ trunk/utils/tv_daemon/Makefile 2009-03-31 22:41:43 UTC (rev 374) @@ -0,0 +1,42 @@ +#CFLAGS=-c -O2 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float +CFLAGS=-c -O3 -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float +#CFLAGS=-DDEBUG -c -O5 -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lgcc -lm -lc -ldl -larmmem -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lgcc -lm -lc -ldl -msoft-float -O2 + +SOURCES=tv_daemon.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=tv_daemon + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT \ + -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(GPLDFLAGS) + $(STRIP) $@ + + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f tv_daemon *~ *.o *.bak + Added: trunk/utils/tv_daemon/mmsp2_regs.h =================================================================== --- trunk/utils/tv_daemon/mmsp2_regs.h (rev 0) +++ trunk/utils/tv_daemon/mmsp2_regs.h 2009-03-31 22:41:43 UTC (rev 374) @@ -0,0 +1,205 @@ +/* + * MMSP2 (MP2520F) Registers + * Only listed needed regs for HW blit stuff + * + * 2005-12-20 Paeryn + */ + + +#ifndef _MMSP2_REG_H_ +#define _MMSP2_REG_H_ + +/* + * Blitter registers + */ + +#define MESGDSTCTRL (0x0000>>2) +#define MESG_DSTENB (1<<6) +#define MESG_BSTBPP 0x60 +#define MESG_DSTBPP_8 (0<<5) +#define MESG_DSTBPP_16 (1<<5) + +#define MESGDSTADDR (0x0004>>2) +#define MESGDSTSTRIDE (0x0008>>2) +#define MESGSRCCTRL (0x000C>>2) +#define MESG_INVIDEO (1<<8) +#define MESG_SRCENB (1<<7) +#define MESG_SRCBPP 0x60 +#define MESG_SRCBPP_8 (0<<5) +#define MESG_SRCBPP_16 (1<<5) +#define MESG_SRCBPP_1 (1<<6) + +#define MESGSRCADDR (0x0010>>2) +#define MESGSRCSTRIDE (0x0014>>2) +#define MESGSRCFORCOLOR (0x0018>>2) +#define MESGSRCBACKCOLOR (0x001C>>2) +#define MESGPATCTRL (0x0020>>2) +#define MESG_PATMONO (1<<6) +#define MESG_PATENB (1<<5) +#define MESG_PATBPP 0x18 +#define MESG_PATBPP_8 (0<<3) +#define MESG_PATBPP_16 (1<<3) +#define MESG_PATBPP_1 (1<<4) +#define MESG_YOFFSET 0x07 + +#define MESGFORCOLOR (0x0024>>2) +#define MESGBACKCOLOR (0x0028>>2) +#define MESGSIZE (0x002C>>2) +#define MESG_HEIGHT 16 +#define MESG_WIDTH 0 + +#define MESGCTRL (0x0030>>2) +#define MESG_TRANSPCOLOR 16 +#define MESG_TRANSPEN (1<<11) +#define MESG_FFCLR (1<<10) +#define MESG_YDIR (1<< 9) +#define MESG_YDIR_NEG (0<< 9) +#define MESG_YDIR_POS (1<< 9) +#define MESG_XDIR (1<< 8) +#define MESG_XDIR_NEG (0<< 8) +#define MESG_XDIR_POS (1<< 8) +#define MESG_ROP 0xFF + +#define MESGSTATUS (0x0034>>2) +#define MESG_BUSY (1<<0) + +#define MESGFIFOSTATUS (0x0038>>2) +#define MESG_FULL (1<<31) +#define MESG_REMAIN 0x1f + +#define MESGFIFO (0x003C>>2) +#define MESGPAT (0x0080>>2) + +/* + * Basic ROPs + */ +#define MESG_ROP_NULL 0xAA +#define MESG_ROP_COPY 0xCC +#define MESG_ROP_PAT 0xF0 + + +/* + * Control registers + */ +#define SYSCLKENREG (0x0904>>1) +#define FASTIOCLK (1<<10) + +#define VCLKENREG (0x090A>>1) +#define GRPCLK (1<<2) + +#define SC_STATUS (0x1802>>1) +#define SC_DISP_FIELD (1<<7) + +#define GPIOB_PINLVL (0x1182>>1) +#define GPIOB_VSYNC (1<<4) + +#define DPC_CNTL (0x2800>>1) +#define DPC_INTERLACE (1<<5) +#define DPC_X_MAX (0x2816>>1) +#define DPC_Y_MAX (0x2818>>1) +#define DPC_V_SYNC (0x2920>>1) +#define DPC_VSFLDPOL (1<<6) +#define DPC_VSFLDEN (1<<7) +#define DPC_CLKCNTL (0x2848>>1) + +#define MLC_OVLAY_CNTR (0x2880>>1) +#define DISP_BOTH_PATH (1<<15) +#define DISP_OVLY2SCALE (1<<14) +#define DISP_FLD_POL (1<<13) +#define DISP_GAMM_BYPATH (1<<12) +#define DISP_SWAP (1<<11) +#define DISP_CURSOR (1<< 9) +#define DISP_SUBPICTURE (1<< 8) +#define DISP_OSD (1<< 7) +#define DISP_STL5EN (1<< 6) +#define DISP_STL4EN (1<< 5) +#define DISP_STL3EN (1<< 4) +#define DISP_STL2EN (1<< 3) +#define DISP_STL1EN (1<< 2) +#define DISP_VLBON (1<< 1) +#define DISP_VLAON (1<< 0) + +//senquack - new registers undefined before: +#define MLC_YUV_CNTL (0x2884>>1) +#define MLC_YUVA_TP_HSC (0x2886>>1) // bits 15:12 must be 0 +#define MLC_YUVA_BT_HSC (0x2888>>1) // bits 15:12 must be 0 +#define MLC_VLA_ENDX (0x2898>>1) +#define MLC_VLA_TP_VSCL (0x288A>>1) +#define MLC_VLA_TP_VSCH (0x288C>>1) // bits 15:9 of this are reserved +#define MLC_YUVA_TP_PXW (0x2892>>1) +#define MLC_YUVA_BT_PXW (0x2894>>1) + + +#define MLC_STL_CNTL (0x28DA>>1) +#define MLC_STL_BPP 9 +#define MLC_STL_BPP_4 0x00AA +#define MLC_STL_BPP_8 0x02AA +#define MLC_STL_BPP_16 0x04AA +#define MLC_STL_BPP_24 0x06AA +#define MLC_STL5ACT (1<<8) +#define MLC_STL4ACT (1<<6) +#define MLC_STL3ACT (1<<6) +#define MLC_STL2ACT (1<<4) +#define MLC_STL1ACT (1<<0) +#define MLC_STL_DEFAULT 0xAA + +#define MLC_STL_MIXMUX (0x28DC>>1) +#define MLC_STL5_MIXMUX 8 +#define MLC_STL4_MIXMUX 6 +#define MLC_STL3_MIXMUX 4 +#define MLC_STL2_MIXMUX 2 +#define MLC_STL1_MIXMUX 0 + +#define MLC_STL_ALPHAL (0x28DE>>1) +#define MLC_STL3_ALPHA 8 +#define MLC_STL2_ALPHA 4 +#define MLC_STL1_ALPHA 0 + +#define MLC_STL_ALPHAH (0x28E0>>1) +#define MLC_STL5_ALPHA 4; +#define MLC_STL4_ALPHA 0; + +#define MLC_STL1_STX (0x28E2>>1) +#define MLC_STL1_ENDX (0x28E4>>1) +#define MLC_STL1_STY (0x28E6>>1) +#define MLC_STL1_ENDY (0x28E8>>1) +#define MLC_STL2_STX (0x28EA>>1) +#define MLC_STL2_ENDX (0x28EC>>1) +#define MLC_STL2_STY (0x28EE>>1) +#define MLC_STL2_ENDY (0x28F0>>1) +#define MLC_STL3_STX (0x28F2>>1) +#define MLC_STL3_ENDX (0x28F4>>1) +#define MLC_STL3_STY (0x28F6>>1) +#define MLC_STL3_ENDY (0x28F8>>1) +#define MLC_STL4_STX (0x28FA>>1) +#define MLC_STL4_ENDX (0x28FC>>1) +#define MLC_STL4_STY (0x28FE>>1) +#define MLC_STL4_ENDY (0x2900>>1) +#define MLC_STL_CKEY_GB (0x2902>>1) +#define MLC_STL_CKEYG 8 +#define MLC_STL_CKEYB 0 +#define MLC_STL_CKEY_R (0x2904>>1) +#define MLC_STL_HSC (0x2906>>1) +#define MLC_STL_VSCL (0x2908>>1) +#define MLC_STL_VSCH (0x290A>>1) +#define MLC_STL_HW (0x290C>>1) +#define MLC_STL_OADRL (0x290E>>1) +#define MLC_STL_OADRH (0x2910>>1) +#define MLC_STL_EADRL (0x2912>>1) +#define MLC_STL_EADRH (0x2914>>1) +#define MLC_STL_PALLT_A (0x2958>>1) +#define MLC_STL_PALLT_D (0x295A>>1) + +#define MLC_HWC_CNTL (0x291E>>1) +#define MLC_HWC_STX (0x2920>>1) +#define MLC_HWC_STY (0x2922>>1) +#define MLC_HWC_FGR (0x2924>>1) +#define MLC_HWC_FB (0x2926>>1) +#define MLC_HWC_BGR (0x2928>>1) +#define MLC_HWC_BB (0x292A>>1) +#define MLC_HWC_OADRL (0x292C>>1) +#define MLC_HWC_OADRH (0x292E>>1) +#define MLC_HWC_EADRL (0x2930>>1) +#define MLC_HWC_EADRH (0x2932>>1) + +#endif Added: trunk/utils/tv_daemon/tv_daemon.c =================================================================== --- trunk/utils/tv_daemon/tv_daemon.c (rev 0) +++ trunk/utils/tv_daemon/tv_daemon.c 2009-03-31 22:41:43 UTC (rev 374) @@ -0,0 +1,831 @@ +/* tv_daemon.c TV tweaking daemon for Open2X. + Copyright (C) 2008 Dan Silsby (Senor Quack) + Portions of code based on : + + parts (c) Rlyehs Work (minlib) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> +#include <time.h> +#include <signal.h> +#include "mmsp2_regs.h" + +#define MIN_PITCH 1 +#define MAX_PITCH 2048 +//#define MIN_XOFFSET (-50) +//#define MAX_XOFFSET 35 +//#define MIN_YOFFSET (-15) +//#define MAX_YOFFSET 45 +#define MIN_XOFFSET (-50) +#define MAX_XOFFSET 35 +#define MIN_YOFFSET (-21) // Any less than this, my NTSC TV displays black +#define MAX_YOFFSET 85 // Can probably go further than this but, damn, do we need to? +#define MIN_XSCALE 12 +#define MAX_XSCALE 200 +#define MIN_YSCALE 12 +#define MAX_YSCALE 200 +#define MIN_VXSCALE 12 +#define MAX_VXSCALE 200 +#define MIN_VYSCALE 12 +#define MAX_VYSCALE 200 +#define DEFAULT_NTSC_XOFFSET 10 +#define DEFAULT_NTSC_YOFFSET (-7) +//Changed this to the NTSC default since someone showed that it was too far to the right: +//#define DEFAULT_PAL_XOFFSET 16 +#define DEFAULT_PAL_XOFFSET 10 +#define DEFAULT_PAL_YOFFSET 19 +#define MIN_DELAY 1 +#define MAX_DELAY 120 +#define DEFAULT_DELAY 1 +#define MIN_FIRST_DELAY 1 +#define MAX_FIRST_DELAY 120 +#define DEFAULT_FIRST_DELAY 4 + +//senquack - pulled from Rlyeh's minlib for improved TVout: +#define gp2x_cx25874_read(a) gp2x_i2c_read(0x8A,(a)) +#define gp2x_cx25874_write(a,v) gp2x_i2c_write(0x8A,(a),(v)) +typedef struct { unsigned char id,addr,data;} i2cw; +typedef struct { unsigned char id,addr,*pdata;} i2cr; + +// Found out from GPH sources that LCD is one, not zero as many seem to think: +enum { LCD = 1, PAL = 4, NTSC = 3 }; + +extern int errno; +unsigned short *gp2x_memregs; +int memfd; +int cx25874 = 0; // fd for chip device driver + +int xoffset = 999; // Magic 999 tells program if xoffset wasn't given on command line +int yoffset = 999; // "" +int xscale_percent = 100; +int yscale_percent = 100; +int vxscale_percent = 100; +int vyscale_percent = 100; +int first_delay = DEFAULT_FIRST_DELAY; // How many seconds to wait before first tweak? +int delay = DEFAULT_DELAY; // How many seconds to wait inbetween subsequent tweaks? +int mode = NTSC; +int tweak_only_once = 0; +int tweak_yuv = 0; +int enable_tvmode = 0; +//int stubborn_fix = 0; /* for apps like Tilematch and Blingo, their SDL has few bugs +// that leave registers for tvout incorrectly set, this +// will fix that if enabled. */ +int scaling_tweak = 1; /* Hit the scaling registers? For apps like mame and lemonboy2x, + if this is 1 it will cause problems. They hit the scaling + registers intentionally but without at least some other + tweaks they can't display tv properly. */ +int pal_overscan_fix = 0;/* When in PAL mode, apply Rlyeh's overscan stuff. I have a suspicion + that this is what is causing people problems with cut-off lower + portions of the picture on PAL TVs, so it is now turned off by + default. */ +int pitch = 0; + +void gp2x_video_RGB_setscaling(int W, int H); +void *trymmap (void *start, size_t length, int prot, int flags, int fd, off_t offset); +unsigned char initphys (void); +void gp2x_i2c_write(unsigned char id, unsigned char addr, unsigned char data); +void gp2x_video_RGB_setscaling(int W, int H); +void gp2x_video_YUV_setscaling(int region, int W, int H); +void tweaktvout(int pal, int init_tv, int force_phys_pitch); +void loop (void); +void closephys (void); +void displayhelp (void); + +void *trymmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) +{ + char *p; + int aa; + + p = mmap (start, length, prot, flags, fd, offset); + if (p == (char *)0xFFFFFFFF) + { + aa = errno; + printf ("mmap failed. errno = %d\n", aa); + exit(1); + } + + return p; +} + +unsigned char initphys (void) +{ + memfd = open("/dev/mem", O_RDWR); + if (memfd == -1) + { + printf ("Opening /dev/mem failed\n"); + return 0; + } + + gp2x_memregs = (unsigned short *)trymmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, memfd, 0xc0000000); + return 1; +} + +//senquack - pulled from Rlyeh's minlib for improved TVout: +/* Function: gp2x_i2c_write + This function writes a byte into an I2C address. + + Parameters: + id (0..) - i2c ID + addr - address to write data to. + data (0..255) - data to be written. + + See also: + <gp2x_i2c_read> + + Credits: + rlyeh */ + +void gp2x_i2c_write(unsigned char id, unsigned char addr, unsigned char data) +{ + i2cw a; + a.id = id, a.addr = addr, a.data = data; + ioctl(cx25874, _IOW('v', 0x00, i2cw), &a); //CX25874_I2C_WRITE_BYTE +} + +//senquack - pulled from Rlyeh's minlib for improved TVout, extensively modified +/* Function: gp2x_video_RGB_setscaling + This function adjusts a given resolution to fit the whole display (320,240). + + Notes: + - Draw at (0,0) coordinates always, whatever resolution you are working with. + - Call this function once. Do not call this function in every frame. + + Parameters: + W (1..) - virtual width in pixels to scale to 320. + H (1..) - virtual height in pixels to scale to 240. + + Default: + - (W,H) are set to (320,240). + + Credits: + rlyeh */ + +void gp2x_video_RGB_setscaling(int W, int H) +{ + short tmp; + int bpp=(gp2x_memregs[0x28DA>>1]>>9)&0x3; + int mul = (gp2x_memregs[DPC_CNTL] & 0x100 ? 512 : 1024); + + // some video modes are 360-pixels wide so we must account for that when + // doing scaling ratio: + int div = gp2x_memregs[MLC_STL_HW] >> (bpp - 1); + if (div != 360) + { + div = 320; + } + + // scale horizontal + tmp = (unsigned short)((float)mul *((float)W / (float)div)); + // round to nearest multiple of 8 + tmp &= ~0x7; + gp2x_memregs[MLC_STL_HSC]=tmp; + + // scale vertical + tmp = (unsigned short)((float)320.0*bpp *(H/240.0)); + // round to nearest multiple of 8 + tmp &= ~0x7; + gp2x_memregs[MLC_STL_VSCL]=tmp; + gp2x_memregs[MLC_STL_VSCH] = 0; +} + +////senquack - pulled from Rlyeh's minlib for improved TVout, +// extensively modified. Alters only the top of Region A +// (for video playing) +///* Function: gp2x_video_YUV_setscaling +// This function adjusts a given resolution to fit the whole display (320,240). +// +// Notes: +// - Draw at (0,0) coordinates of each framebuffer always, whatever resolution you are working with. +// - Call this function once. Do not call this function in every frame. +// +// Parameters: +// region (0..3) - YUV region (0..3) +// W (1..) - virtual width in pixels to scale to 320. +// H (1..) - virtual height in pixels to scale to 240. +// +// Default: +// - (W,H) are set to (320,240) for each region. +// +// Credits: +// rlyeh */ +// +void gp2x_video_YUV_setscaling(int region, int W, int H) +{ + short reg; + + //senquack - set region A Top pixel skip register to 0: + gp2x_memregs[MLC_YUV_CNTL] &= ~(1<<3); + gp2x_memregs[MLC_YUV_CNTL] &= ~(1<<2); + + //VERTICAL SCALING: + reg = (float)gp2x_memregs[MLC_YUVA_TP_PXW] * ((float)H / 240.0); + gp2x_memregs[MLC_VLA_TP_VSCL] = reg; + gp2x_memregs[MLC_VLA_TP_VSCH] &= ~0x1FF; + + //HORIZONTAL SCALING: + reg = 1024.0 * ((float)W / 320.0); + reg &= 0x7FF; + gp2x_memregs[MLC_YUVA_TP_HSC] = reg; +} + +// Parameters: pal 0: NTSC 1: PAL +// init_tv 0: Don't set tv mode 1: set tv mode indicated by pal +// force_phys_pitch Override physical pitch to be this number (720 needed for +// gngeo)... disabled if 0 +// Note: I got it to automatically deal with various pitches, so no need for the last +// parameter for now +void tweaktvout(int pal, int init_tv, int force_phys_pitch) +{ + static int set_scaling = 0; // Done the initial setting of scaling yet? +// static int initial_stubborn_fix = 0; // Done the initial stubborn fix? + + unsigned int bytes_per_pixel = (gp2x_memregs[MLC_STL_CNTL]>>9)&0x3; + unsigned int width = 320; + unsigned int height = 240; + unsigned int pitch, phys_pitch; +// static int scaled_width = -1; +// static int scaled_height = -1; + int orig_w = 320; // orig_w and orig_h get set to the user-specified scaled + // percentage of 320x240 a little later before anything + // gets tweaked. Later tweaks tweak based on the auto- + // detected height and width no longer need to do + // any math, the stored values are already scaled properly. + int orig_h = 240; + + static int scaled_vwidth = -1, scaled_vheight = -1; + + if ((scaled_vwidth == -1) || (scaled_vheight == -1)) + { + // We can't do auto-detection of height and width on the YUV layers, so + // these get set once and then YUV is set to these values that never change. + scaled_vwidth = (int)(320.0 * (100.0 / (float)vxscale_percent)); + scaled_vheight = (int)(240.0 * (100.0 / (float)vyscale_percent)); + } + + + if (init_tv) + { + cx25874 = open("/dev/cx25874",O_RDWR); + if (cx25874 != -1) + { + ioctl(cx25874, _IOW('v', 0x02, unsigned char), pal ? PAL : NTSC); + close(cx25874); + } else + { + cx25874 = 0; + } + } + + // Open special Open2X device driver that doesn't reset the hardware on opening + cx25874 = open("/dev/cx25874_open2x",O_RDWR); + if (cx25874 == -1) + { + cx25874 = 0; +#if DEBUG + printf("Error opening /dev/cx25874_open2x, some tweaks won't be applied.\n"); +#endif + return; + } + + if (!(gp2x_memregs[DPC_CNTL]&0x100)) + { +#if DEBUG + printf("Cannot tweak, TV output not enabled! Exiting..\n"); +#endif + if (cx25874) + close (cx25874); + cx25874 = 0; +// closephys(); +// exit(1); + return; + } + + // Do one-time setting of scaling registers before anything. + if (scaling_tweak && !set_scaling) +// if (!set_scaling) + { + gp2x_memregs[DPC_Y_MAX] = 239; + orig_w = (long)(320.0 * (100.0 / (float)xscale_percent)); + orig_h = (long)(240.0 * (100.0 / (float)yscale_percent)); + + gp2x_video_RGB_setscaling( orig_w, orig_h ); + + + set_scaling = 1; + } + +// if (tweak_yuv) +// { +// gp2x_video_YUV_setscaling(0, scaled_vwidth, scaled_vheight ); +// } + +// // This fixes apps that used a buggy SDL like some of Ruckage's fenix games +// // and Tilematch. When using TVout, they have horrible interlacing otherwise. +// if (stubborn_fix && !initial_stubborn_fix && cx25874) +// { +//// gp2x_memregs[MLC_STL_HW] = 640; +// gp2x_memregs[MLC_STL_HW] = (bytes_per_pixel == 1) ? 320 : 640; +//// gp2x_memregs[MLC_STL1_ENDX] = 639; +//// gp2x_memregs[MLC_STL1_ENDX] = (bytes_per_pixel == 1) ? 319 : 639; +// gp2x_memregs[MLC_STL1_ENDX] = 719; +// gp2x_memregs[DPC_X_MAX] = 719; +// gp2x_memregs[MLC_STL_MIXMUX] = 0; +// gp2x_memregs[MLC_STL_ALPHAL] = 255; +// gp2x_memregs[MLC_STL_ALPHAH] = 255; +// gp2x_memregs[MLC_OVLAY_CNTR] |= DISP_STL1EN; +// // This is the critical fix for interlacing: +//// gp2x_memregs[MLC_STL_EADRL] = gp2x_memregs[MLC_STL_OADRL]; +//// gp2x_memregs[MLC_STL_EADRH] = gp2x_memregs[MLC_STL_OADRH]; +// initial_stubborn_fix = 1; +// } +// + // This is the critical fix for interlacing: + gp2x_memregs[MLC_STL_EADRL] = gp2x_memregs[MLC_STL_OADRL]; + gp2x_memregs[MLC_STL_EADRH] = gp2x_memregs[MLC_STL_OADRH]; + + +#if DEBUG + printf("Detecting hw of %d\n", gp2x_memregs[MLC_STL_HW]); + printf("Detecting endx of %d\n", gp2x_memregs[MLC_STL1_ENDX]); + printf("Detecting YUV endx of %d\n", gp2x_memregs[MLC_VLA_ENDX]); + printf("DPC_X_MAX: %d\n", gp2x_memregs[DPC_X_MAX]); + printf("DPC_Y_MAX: %d\n", gp2x_memregs[DPC_Y_MAX]); + printf("MLC_STL_HSC: %d\n", gp2x_memregs[MLC_STL_HSC]); + printf("MLC_STL_VSCL: %d\n", gp2x_memregs[MLC_STL_VSCL]); +#endif + + // Auto-detection of width + width = gp2x_memregs[MLC_STL_HW] >> (bytes_per_pixel - 1); + + // Some SDLs set the width wrong, apparently (Blingo's fenix, spout) + if (width == 640) + { + width = 320; + } + + // Massage the vertical scaling register if it gets fubar'd + if (gp2x_memregs[MLC_STL_VSCL] < 32) + { + // For some reason, it seems a lot of code out there (early minlibs) + // ends up putting this at very low values, making it impossible to + // see anyhthing. Fix this to a sane value if this occurs. +#ifdef DEBUG + printf("VSCL went out of whack, resetting scaling..\n"); +#endif +// gp2x_video_RGB_setscaling( orig_w, orig_h ); +// gp2x_video_RGB_setscaling( width, (int)(((float)width / 320.0) * 240.0) ); +// gp2x_video_RGB_setscaling( width, (int)(((float)width / 320.0) * 240.0) + 8 ); + if (gp2x_memregs[MLC_STL_HSC] == 489) + { + // using an old version of minlib and program has changed to 320x240 mode + gp2x_memregs[MLC_STL_VSCL] = (bytes_per_pixel == 1) ? 320 : 640; + } else + { + // Since the VSCL register has been wiped out, we have no way of knowing + // what the height is supposed to be. All we can do is look at the width + // and come up with a height that matches a 4:3 width:height ratio and hope + // for the best. Seems to work pretty well. + // If I don't have the +24 here, the image goes off the bottom of the screen. + // Who knows what it does with or without in PAL mode, I only have a NTSC tv. + gp2x_video_RGB_setscaling( width, (int)(((float)width / 320.0) * 240.0) + 24 ); +// gp2x_video_RGB_setscaling( width, (int)(((float)width / 320.0) * 240.0) ); + } + +#ifdef DEBUG + printf("after reset, MLC_STL_HSC: %d\n", gp2x_memregs[MLC_STL_HSC]); + printf("after reset, MLC_STL_VSCL: %d\n", gp2x_memregs[MLC_STL_VSCL]); +#endif + + } + + // Auto-detection of height (not so easy as the width) + int tmp = gp2x_memregs[MLC_STL_VSCL]; + tmp += 7; + tmp &= ~0x7; + height = (int)(((float)tmp * 240.0) / (320.0 * (float)bytes_per_pixel)); + height += 7; + height &= ~0x7; + + + +#ifdef DEBUG + printf("orig_w: %d orig_h: %d\n", orig_w, orig_h); + printf("Detecting width, height of %d,%d\n", width, height); + printf("Detecting bpp of %d\n", bytes_per_pixel); +#endif + + pitch = phys_pitch = width << (bytes_per_pixel == 1 ? 0 : 1); + + if (force_phys_pitch > 0) + { + phys_pitch=force_phys_pitch; + } + +// // Do maintenance tweak: + if (scaling_tweak) + { + gp2x_video_RGB_setscaling(width, height); + } + + if (tweak_yuv) + { + gp2x_video_YUV_setscaling(0, scaled_vwidth, scaled_vheight ); + gp2x_memregs[MLC_VLA_ENDX] = 719; + } + + // A few last tweaks for the display controller before moving to the encoder chip + gp2x_memregs[MLC_STL1_ENDX]= 719; + gp2x_memregs[MLC_STL_HW] = phys_pitch; + + // BEGIN RLYEH'S TV IMAGE CENTERING: + // -------------------------------- + int lines, syncs_start, syncs_end; + + //horizontal adjustment + if (cx25874) + { + gp2x_cx25874_write(0x8c, (unsigned char) (50 - 11 + 3 - xoffset) ); + } + + + //vertical adjustment + if(pal) + lines = 288, syncs_start = 1, syncs_end = 24; + else + lines = 240, syncs_start = 1, syncs_end = 22; + + lines -= yoffset, syncs_end += yoffset; + + gp2x_memregs[DPC_Y_MAX] = lines - 1; + gp2x_memregs[0x2820 >> 1] &= (0xFF00); + gp2x_memregs[0x2820 >> 1] |= (syncs_start << 8); + gp2x_memregs[0x2822 >> 1] &= ~(0x1FF); + gp2x_memregs[0x2822 >> 1] |= syncs_end; // syncs_end = verBackPorch+verFontPorch - 1 + +// if(pal && cx25874) + //senquack - think this might be the code causing PAL problems with bottom part of image + // cut off. No way of knowing, I don't have a PAL tv. This code is now turned off + // by default. + if(pal && pal_overscan_fix && cx25874) + { + //bottom screen image cut off (PAL 320x288 full -> PAL 320x240 centered w/ black borders) + int real_lines = 288, + wanted_lines = 240, + top_spacing = (real_lines - wanted_lines) << 1, + active_lines = wanted_lines + top_spacing; + + active_lines += -top_spacing +5 + yoffset; + + gp2x_cx25874_write(0x84, active_lines & 0xFF); //reduce overscan, VACTIVE_0 + gp2x_cx25874_write(0x86, 0x26 | ((active_lines & 0x100)>>1) ); + + gp2x_cx25874_write(0x94, active_lines & 0xFF); //reduce overscan, VACTIVE_1 + gp2x_cx25874_write(0x96, 0x31 | ((active_lines & 0x300)>>8) ); + } + + // END RLYEH'S TV IMAGE CENTERING + // -------------------------------- + + if (cx25874) + { + close(cx25874); + } +} + +void loop (void) +{ + struct timespec timereq, timerem; + timereq.tv_sec = first_delay; + timereq.tv_nsec = 0; + + // Do initial tweak (but only after waiting) + nanosleep(&timereq, &timerem); + tweaktvout((mode == PAL), enable_tvmode, pitch ); + + if (tweak_only_once) + return; + + timereq.tv_sec = delay; + timereq.tv_nsec = 0; + + while (1) + { + nanosleep(&timereq, &timerem); +#if DEBUG + printf("Tweaking TV..\n"); +#endif + tweaktvout(mode == PAL, 0, pitch); + } +} + +void closephys (void) +{ + close (memfd); +} + +void displayhelp (void) +{ + printf("Open2X TV tweaking daemon written by Senor Quack v1.0\n"); + printf(" Copyright (C) 2009 Daniel Silsby\n"); + printf(" Portions of code adapted from Rlyeh's minlib \n"); + printf("OPTIONS:\n"); + printf("-h\t\tDisplay help and version info\n"); + printf("-p\t\tUse PAL timings (default is NTSC)\n"); + printf("-P\t\tApply Rlyeh's PAL overscan tweak (untested)\n"); + printf("-e\t\tEnable TV mode initially (normally not needed)\n"); +// printf("-s\t\tEnable 'stubborn' fix for some older SDL/Fenix apps\n"); +// printf("\t\t\tlike Tilematch or Blingo (fixes flicker)\n"); + printf("-S\t\tDisable tweaking of scaling registers (for Mame,Lemonboy2x,etc)\n"); +// printf("-fPITCH\t\tForce physical pitch of PITCH. Valid range: %d..%d\n", +// MIN_PITCH, MAX_PITCH); +// printf("\t\t\t(Normally 320 for 1bpp mode, 640 for 2bpp mode, but some\n" +// "\t\t\t programs like gngeo need a setting of 720 forced here.)\n"); + printf("-xOFFSET\tMove image right/left. Valid range: %d..%d\n", + MIN_XOFFSET, MAX_XOFFSET); + printf("\t\t\t(if not specified, default is %d for NTSC, %d for PAL)\n", + DEFAULT_NTSC_XOFFSET, DEFAULT_PAL_XOFFSET); + printf("-yOFFSET\tMove image up/down. Valid range: %d..%d\n", + MIN_YOFFSET, MAX_YOFFSET); + printf("\t\t\t(if not specified, default is %d for NTSC, %d for PAL)\n", + DEFAULT_NTSC_YOFFSET, DEFAULT_PAL_YOFFSET); + printf("-XSCALE\t\tScale image horizontally SCALE%%. Valid range: %d..%d\n", + MIN_XSCALE, MAX_XSCALE); + printf("\t\t\t(if not specified, default is 100)\n"); + printf("-YSCALE\t\tScale image vertically SCALE%%. Valid range: %d..%d\n", + MIN_YSCALE, MAX_YSCALE); + printf("-vxSCALE\tScale YUV video image horizontally SCALE%%. Valid range: %d..%d\n", + MIN_XSCALE, MAX_XSCALE); + printf("\t\t\t(if not specified, default is 100)\n"); + printf("-vySCALE\tScale YUV video image vertically SCALE%%. Valid range: %d..%d\n", + MIN_YSCALE, MAX_YSCALE); + printf("\t\t\t(if not specified, default is 100)\n"); + printf("-V\t\tTweak YUV video layer as well as RBG layer.\n"); + printf("-dSECS\t\tSleep this many seconds inbetween tweaks.\n"); + printf("\t\t\tValid range: %d..%d Default is %d seconds\n", + MIN_DELAY, MAX_DELAY, DEFAULT_DELAY); + printf("-DSECS\t\tSleep this many seconds before the first tweak.\n"); + printf("\t\t\tValid range: %d..%d Default is %d seconds\n", + MIN_FIRST_DELAY, MAX_FIRST_DELAY, DEFAULT_FIRST_DELAY); + printf("-t\t\tOnly tweak once and then terminate\n"); + printf("\t\t\t(if not specified, tweak infinitely)\n"); +} + +int main(int argc, char *argv[]) +{ + // We are gonna be killall'd a lot, so try to be submissive: + signal(SIGINT,&exit); + signal(SIGTERM, &exit); + // but don't disappear when run from shell scripts + signal(SIGHUP, SIG_IGN); + + if (!initphys()) { + printf("Error mapping registers!\n"); + printf("Exiting..\n"); + return 1; + } + + int cur_arg = 1; + while (cur_arg < argc) + { + // We have been passed command-line parameters + switch (argv[cur_arg][1]) + { + case 'h': + displayhelp(); + return(0); + break; + case 'p': + mode = PAL; + break; + case 'P': + pal_overscan_fix = 1; + break; + case 'e': + enable_tvmode = 1; + break; +// case 's': +// stubborn_fix = 1; +// break; + case 'S': + scaling_tweak = 0; + break; + case 'v': + switch (argv[cur_arg][2]) + { + case 'x': + if (strlen(&argv[cur_arg][3]) <= 3) + { + vxscale_percent = atoi(&argv[cur_arg][3]); + if (vxscale_percent < MIN_VXSCALE || vxscale_percent > MAX_VXSCALE) + { + printf("ERROR: Video X-axis scaling percentage out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad video X-axis scaling percentage\n\n"); + displayhelp(); + exit(1); + } + break; + case 'y': + if (strlen(&argv[cur_arg][3]) <= 3) + { + vyscale_percent = atoi(&argv[cur_arg][3]); + if (vyscale_percent < MIN_VYSCALE || vyscale_percent > MAX_VYSCALE) + { + printf("ERROR: Video Y-axis scaling percentage out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad video Y-axis scaling percentage\n\n"); + displayhelp(); + exit(1); + } + break; + default: + printf("ERROR: bad video scaling parameter\n\n"); + displayhelp(); + exit(1); + break; + } + break; + case 'V': + tweak_yuv = 1; + break; + case 't': + tweak_only_once = 1; + break; +// case 'f': +// if (strlen(&argv[cur_arg][2]) <= 4) +// { +// pitch = atoi(&argv[cur_arg][2]); +// if (pitch < MIN_PITCH || pitch > MAX_PITCH) +// { +// printf("ERROR: pitch out of range\n\n"); +// displayhelp(); +// exit(1); +// } +// } else +// { +// printf("ERROR: bad pitch\n\n"); +// displayhelp(); +// exit(1); +// } +// break; + case 'x': + if (strlen(&argv[cur_arg][2]) <= 3) + { + xoffset = atoi(&argv[cur_arg][2]); + if (xoffset < MIN_XOFFSET || xoffset > MAX_XOFFSET) + { + printf("ERROR: X offset out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad X offset\n\n"); + displayhelp(); + exit(1); + } + break; + case 'y': + if (strlen(&argv[cur_arg][2]) <= 3) + { + yoffset = atoi(&argv[cur_arg][2]); + if (yoffset < MIN_YOFFSET || yoffset > MAX_YOFFSET) + { + printf("ERROR: Y offset out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad Y offset\n\n"); + displayhelp(); + exit(1); + } + break; + case 'X': + if (strlen(&argv[cur_arg][2]) <= 3) + { + xscale_percent = atoi(&argv[cur_arg][2]); + if (xscale_percent < MIN_XSCALE || xscale_percent > MAX_XSCALE) + { + printf("ERROR: X-axis scaling percentage out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad X-axis scaling percentage\n\n"); + displayhelp(); + exit(1); + } + break; + case 'Y': + if (strlen(&argv[cur_arg][2]) <= 3) + { + yscale_percent = atoi(&argv[cur_arg][2]); + if (yscale_percent < MIN_YSCALE || yscale_percent > MAX_YSCALE) + { + printf("ERROR: Y-axis scaling percentage out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad Y-axis scaling percentage\n\n"); + displayhelp(); + exit(1); + } + break; + case 'd': + if (strlen(&argv[cur_arg][2]) <= 3) + { + delay = atoi(&argv[cur_arg][2]); + if (delay < MIN_DELAY || delay > MAX_DELAY) + { + printf("ERROR: delay out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad delay given\n\n"); + displayhelp(); + exit(1); + } + break; + case 'D': + if (strlen(&argv[cur_arg][2]) <= 3) + { + first_delay = atoi(&argv[cur_arg][2]); + if (first_delay < MIN_FIRST_DELAY || first_delay > MAX_FIRST_DELAY) + { + printf("ERROR: 'first delay' out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad 'first delay' given\n\n"); + displayhelp(); + exit(1); + } + break; + default: + // invalid parameter + printf("ERROR: invalid parameter passed\n\n"); + displayhelp(); + exit(1); + } // switch + cur_arg++; + } // while (argc > 1) + + if (xoffset == 999) + { + // parameter wasn't specified, set to default for the given mode + xoffset = (mode == PAL ? DEFAULT_PAL_XOFFSET : DEFAULT_NTSC_XOFFSET); + } + + if (yoffset == 999) + { + // parameter wasn't specified, set to default for the given mode + yoffset = (mode == PAL ? DEFAULT_PAL_YOFFSET : DEFAULT_NTSC_YOFFSET); + } + + // main loop + loop(); + + closephys(); + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-03-31 22:39:43
|
Revision: 373 http://open2x.svn.sourceforge.net/open2x/?rev=373&view=rev Author: senquack Date: 2009-03-31 22:39:39 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Relaunchd, the Open2X menu relaunching daemon (for use with the process killer) Added Paths: ----------- trunk/utils/relaunchd/ trunk/utils/relaunchd/Makefile trunk/utils/relaunchd/mmsp2_regs.h trunk/utils/relaunchd/relaunchd.c Added: trunk/utils/relaunchd/Makefile =================================================================== --- trunk/utils/relaunchd/Makefile (rev 0) +++ trunk/utils/relaunchd/Makefile 2009-03-31 22:39:39 UTC (rev 373) @@ -0,0 +1,41 @@ +CFLAGS=-c -O3 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float +#CFLAGS=-c -O0 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lgcc -lm -lc -ldl -larmmem -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lgcc -lm -lc -ldl -msoft-float -O2 + +SOURCES=relaunchd.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=relaunchd + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT \ + -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(GPLDFLAGS) + $(STRIP) $@ + + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f relaunchd *~ *.o *.bak + Added: trunk/utils/relaunchd/mmsp2_regs.h =================================================================== --- trunk/utils/relaunchd/mmsp2_regs.h (rev 0) +++ trunk/utils/relaunchd/mmsp2_regs.h 2009-03-31 22:39:39 UTC (rev 373) @@ -0,0 +1,194 @@ +/* + * MMSP2 (MP2520F) Registers + * Only listed needed regs for HW blit stuff + * + * 2005-12-20 Paeryn + */ + + +#ifndef _MMSP2_REG_H_ +#define _MMSP2_REG_H_ + +/* + * Blitter registers + */ + +#define MESGDSTCTRL (0x0000>>2) +#define MESG_DSTENB (1<<6) +#define MESG_BSTBPP 0x60 +#define MESG_DSTBPP_8 (0<<5) +#define MESG_DSTBPP_16 (1<<5) + +#define MESGDSTADDR (0x0004>>2) +#define MESGDSTSTRIDE (0x0008>>2) +#define MESGSRCCTRL (0x000C>>2) +#define MESG_INVIDEO (1<<8) +#define MESG_SRCENB (1<<7) +#define MESG_SRCBPP 0x60 +#define MESG_SRCBPP_8 (0<<5) +#define MESG_SRCBPP_16 (1<<5) +#define MESG_SRCBPP_1 (1<<6) + +#define MESGSRCADDR (0x0010>>2) +#define MESGSRCSTRIDE (0x0014>>2) +#define MESGSRCFORCOLOR (0x0018>>2) +#define MESGSRCBACKCOLOR (0x001C>>2) +#define MESGPATCTRL (0x0020>>2) +#define MESG_PATMONO (1<<6) +#define MESG_PATENB (1<<5) +#define MESG_PATBPP 0x18 +#define MESG_PATBPP_8 (0<<3) +#define MESG_PATBPP_16 (1<<3) +#define MESG_PATBPP_1 (1<<4) +#define MESG_YOFFSET 0x07 + +#define MESGFORCOLOR (0x0024>>2) +#define MESGBACKCOLOR (0x0028>>2) +#define MESGSIZE (0x002C>>2) +#define MESG_HEIGHT 16 +#define MESG_WIDTH 0 + +#define MESGCTRL (0x0030>>2) +#define MESG_TRANSPCOLOR 16 +#define MESG_TRANSPEN (1<<11) +#define MESG_FFCLR (1<<10) +#define MESG_YDIR (1<< 9) +#define MESG_YDIR_NEG (0<< 9) +#define MESG_YDIR_POS (1<< 9) +#define MESG_XDIR (1<< 8) +#define MESG_XDIR_NEG (0<< 8) +#define MESG_XDIR_POS (1<< 8) +#define MESG_ROP 0xFF + +#define MESGSTATUS (0x0034>>2) +#define MESG_BUSY (1<<0) + +#define MESGFIFOSTATUS (0x0038>>2) +#define MESG_FULL (1<<31) +#define MESG_REMAIN 0x1f + +#define MESGFIFO (0x003C>>2) +#define MESGPAT (0x0080>>2) + +/* + * Basic ROPs + */ +#define MESG_ROP_NULL 0xAA +#define MESG_ROP_COPY 0xCC +#define MESG_ROP_PAT 0xF0 + + +/* + * Control registers + */ +#define SYSCLKENREG (0x0904>>1) +#define FASTIOCLK (1<<10) + +#define VCLKENREG (0x090A>>1) +#define GRPCLK (1<<2) + +#define SC_STATUS (0x1802>>1) +#define SC_DISP_FIELD (1<<7) + +#define GPIOB_PINLVL (0x1182>>1) +#define GPIOB_VSYNC (1<<4) + +#define DPC_CNTL (0x2800>>1) +#define DPC_INTERLACE (1<<5) +#define DPC_X_MAX (0x2816>>1) +#define DPC_Y_MAX (0x2818>>1) +#define DPC_V_SYNC (0x2920>>1) +#define DPC_VSFLDPOL (1<<6) +#define DPC_VSFLDEN (1<<7) +#define DPC_CLKCNTL (0x2848>>1) + +#define MLC_OVLAY_CNTR (0x2880>>1) +#define DISP_BOTH_PATH (1<<15) +#define DISP_OVLY2SCALE (1<<14) +#define DISP_FLD_POL (1<<13) +#define DISP_GAMM_BYPATH (1<<12) +#define DISP_SWAP (1<<11) +#define DISP_CURSOR (1<< 9) +#define DISP_SUBPICTURE (1<< 8) +#define DISP_OSD (1<< 7) +#define DISP_STL5EN (1<< 6) +#define DISP_STL4EN (1<< 5) +#define DISP_STL3EN (1<< 4) +#define DISP_STL2EN (1<< 3) +#define DISP_STL1EN (1<< 2) +#define DISP_VLBON (1<< 1) +#define DISP_VLAON (1<< 0) + +#define MLC_STL_CNTL (0x28DA>>1) +#define MLC_STL_BPP 9 +#define MLC_STL_BPP_4 0x00AA +#define MLC_STL_BPP_8 0x02AA +#define MLC_STL_BPP_16 0x04AA +#define MLC_STL_BPP_24 0x06AA +#define MLC_STL5ACT (1<<8) +#define MLC_STL4ACT (1<<6) +#define MLC_STL3ACT (1<<6) +#define MLC_STL2ACT (1<<4) +#define MLC_STL1ACT (1<<0) +#define MLC_STL_DEFAULT 0xAA + +#define MLC_STL_MIXMUX (0x28DC>>1) +#define MLC_STL5_MIXMUX 8 +#define MLC_STL4_MIXMUX 6 +#define MLC_STL3_MIXMUX 4 +#define MLC_STL2_MIXMUX 2 +#define MLC_STL1_MIXMUX 0 + +#define MLC_STL_ALPHAL (0x28DE>>1) +#define MLC_STL3_ALPHA 8 +#define MLC_STL2_ALPHA 4 +#define MLC_STL1_ALPHA 0 + +#define MLC_STL_ALPHAH (0x28E0>>1) +#define MLC_STL5_ALPHA 4; +#define MLC_STL4_ALPHA 0; + +#define MLC_STL1_STX (0x28E2>>1) +#define MLC_STL1_ENDX (0x28E4>>1) +#define MLC_STL1_STY (0x28E6>>1) +#define MLC_STL1_ENDY (0x28E8>>1) +#define MLC_STL2_STX (0x28EA>>1) +#define MLC_STL2_ENDX (0x28EC>>1) +#define MLC_STL2_STY (0x28EE>>1) +#define MLC_STL2_ENDY (0x28F0>>1) +#define MLC_STL3_STX (0x28F2>>1) +#define MLC_STL3_ENDX (0x28F4>>1) +#define MLC_STL3_STY (0x28F6>>1) +#define MLC_STL3_ENDY (0x28F8>>1) +#define MLC_STL4_STX (0x28FA>>1) +#define MLC_STL4_ENDX (0x28FC>>1) +#define MLC_STL4_STY (0x28FE>>1) +#define MLC_STL4_ENDY (0x2900>>1) +#define MLC_STL_CKEY_GB (0x2902>>1) +#define MLC_STL_CKEYG 8 +#define MLC_STL_CKEYB 0 +#define MLC_STL_CKEY_R (0x2904>>1) +#define MLC_STL_HSC (0x2906>>1) +#define MLC_STL_VSCL (0x2908>>1) +#define MLC_STL_VSCH (0x290A>>1) +#define MLC_STL_HW (0x290C>>1) +#define MLC_STL_OADRL (0x290E>>1) +#define MLC_STL_OADRH (0x2910>>1) +#define MLC_STL_EADRL (0x2912>>1) +#define MLC_STL_EADRH (0x2914>>1) +#define MLC_STL_PALLT_A (0x2958>>1) +#define MLC_STL_PALLT_D (0x295A>>1) + +#define MLC_HWC_CNTL (0x291E>>1) +#define MLC_HWC_STX (0x2920>>1) +#define MLC_HWC_STY (0x2922>>1) +#define MLC_HWC_FGR (0x2924>>1) +#define MLC_HWC_FB (0x2926>>1) +#define MLC_HWC_BGR (0x2928>>1) +#define MLC_HWC_BB (0x292A>>1) +#define MLC_HWC_OADRL (0x292C>>1) +#define MLC_HWC_OADRH (0x292E>>1) +#define MLC_HWC_EADRL (0x2930>>1) +#define MLC_HWC_EADRH (0x2932>>1) + +#endif Added: trunk/utils/relaunchd/relaunchd.c =================================================================== --- trunk/utils/relaunchd/relaunchd.c (rev 0) +++ trunk/utils/relaunchd/relaunchd.c 2009-03-31 22:39:39 UTC (rev 373) @@ -0,0 +1,210 @@ +/* relaunchd.c Menu relaunching daemon for Open2X. + Copyright (C) 2008 Dan Silsby (Senor Quack) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> +#include <time.h> +#include <signal.h> +#include <sys/types.h> +#include <sys/stat.h> +#include "mmsp2_regs.h" + +// GET_GMENU2X_RELAUNCH_NEEDED allows the gmenu2x relaunch daemon to see if the process killer +// has indicated a relaunch of gmenu2x is needed. Once the daemon relaunches GMenu2X, it will +// issue the ioctl SET_GMENU2X_RELAUNCH_NEEDED with the argument 0 to reset this flag. +#define GP2X_GET_GMENU2X_RELAUNCH_NEEDED 92 +#define GP2X_SET_GMENU2X_RELAUNCH_NEEDED 93 + +#define DEFAULT_DELAY 2 // 2 second delay +#define MIN_DELAY 1 +#define MAX_DELAY 10 +#define DEBUG 1 + +extern int errno; + +int delay = DEFAULT_DELAY; +//char scriptname[256]; +char *scriptname = "/usr/sbin/relaunchd_script"; + +int relaunch_needed(void) +{ + int gpiodev = open("/dev/GPIO",O_RDONLY); + if (gpiodev == -1) + { +#if DEBUG + printf("Error opening /dev/GPIO during poll.\n"); +#endif + return 0; + } + + int retval = (ioctl(gpiodev, GP2X_GET_GMENU2X_RELAUNCH_NEEDED, 0) == 1); + close(gpiodev); + return retval; +} + +void reset_relaunch_flag(void) +{ + int new_flag = 0; + int gpiodev = open("/dev/GPIO",O_WRONLY); + if (gpiodev == -1) + { +#if DEBUG + printf("Error opening /dev/GPIO during reset.\n"); +#endif + return; + } + + ioctl(gpiodev, GP2X_SET_GMENU2X_RELAUNCH_NEEDED, &new_flag); + close(gpiodev); +} + +void loop (void) +{ + struct timespec timereq, timerem; + timereq.tv_sec = delay; + timereq.tv_nsec = 0; + + while (1) + { + nanosleep(&timereq, &timerem); + + if (relaunch_needed()) + { +#if DEBUG + printf("Relaunch needed, killing all gmenu2x processes..\n"); +#endif + system("killall gmenu2x"); + +#if DEBUG + printf("Executing %s..\n", scriptname); +#endif + if (system(scriptname) == -1) + { +#if DEBUG + printf("Error during relaunch\n"); +#endif + } + + reset_relaunch_flag(); + } + } +} + +void displayhelp (void) +{ + printf("Open2X menu relaunching daemon written by Senor Quack v1.0\n"); + printf(" Copyright (C) 2009 Daniel Silsby\n\n"); + printf("OPTIONS:\n"); + printf("-h\t\tDisplay help and version info\n"); +// printf("-sSCRIPTNAME\tRelaunch script (full pathname required)\n"); + printf("-dSECS\t\tSleep this many seconds inbetween polls. Valid range: %d..%d\n", + MIN_DELAY, MAX_DELAY); + printf("\t\t\t(if not specified, default is %d seconds)\n", DEFAULT_DELAY); +} + +int main(int argc, char *argv[]) +{ + signal(SIGINT,&exit); + signal(SIGTERM, &exit); + signal(SIGHUP, SIG_IGN); + +// scriptname[0] = 0; + int cur_arg = 1; + while (cur_arg < argc) + { + // We have been passed command-line parameters + switch (argv[cur_arg][1]) + { + case 'h': + displayhelp(); + return(0); + break; + case 'd': + if (strlen(&argv[cur_arg][2]) <= 2) + { + delay = atoi(&argv[cur_arg][2]); + if (delay < MIN_DELAY || delay > MAX_DELAY) + { + printf("ERROR: delay out of range\n\n"); + displayhelp(); + exit(1); + } + } else + { + printf("ERROR: bad delay given\n\n"); + displayhelp(); + exit(1); + } + break; +// case 's': +// if (strlen(&argv[cur_arg][2]) < 250) +// { +// strcpy(scriptname, &argv[cur_arg][2]); +// struct stat tmp; +// if (stat(scriptname, &tmp)) +// { +// printf("ERROR: file %s does not exist.\n\n", scriptname); +// displayhelp(); +// exit(1); +// } +// strcat(scriptname, "&"); // run in background +// } else +// { +// printf("ERROR: script name too long\n\n"); +// displayhelp(); +// exit(1); +// } +// break; + default: + // invalid parameter + printf("ERROR: invalid parameter passed\n\n"); + displayhelp(); + exit(1); + } // switch + cur_arg++; + } // while (argc > 1) + +// if (scriptname[0] == 0) +// { +// // No script specified +// printf("ERROR: no relaunch script specified\n\n"); +// displayhelp(); +// exit(1); +// } + + struct stat tmp; + if (stat(scriptname, &tmp)) + { + printf("ERROR: relaunching script %s is missing.\n\n", scriptname); + exit(1); + } + + // main loop + loop(); + + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-03-31 22:38:49
|
Revision: 372 http://open2x.svn.sourceforge.net/open2x/?rev=372&view=rev Author: senquack Date: 2009-03-31 22:38:44 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Joy2xd USB gamepad->GP2X GPIO control daemon Added Paths: ----------- trunk/utils/joy2xd/ trunk/utils/joy2xd/joy2xd/ trunk/utils/joy2xd/joy2xd/Makefile trunk/utils/joy2xd/joy2xd/joy2xd.c trunk/utils/joy2xd/joy2xd_cfg/ trunk/utils/joy2xd/joy2xd_cfg/Makefile trunk/utils/joy2xd/joy2xd_cfg/SFont.c trunk/utils/joy2xd/joy2xd_cfg/SFont.h trunk/utils/joy2xd/joy2xd_cfg/img/ trunk/utils/joy2xd/joy2xd_cfg/img/animation.png trunk/utils/joy2xd/joy2xd_cfg/img/bg.png trunk/utils/joy2xd/joy2xd_cfg/img/font_wh.png trunk/utils/joy2xd/joy2xd_cfg/joy2xd_cfg.c Added: trunk/utils/joy2xd/joy2xd/Makefile =================================================================== --- trunk/utils/joy2xd/joy2xd/Makefile (rev 0) +++ trunk/utils/joy2xd/joy2xd/Makefile 2009-03-31 22:38:44 UTC (rev 372) @@ -0,0 +1,39 @@ +CFLAGS=-c -O3 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 + +SOURCES=joy2xd.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=joy2xd + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT \ + -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(OBJECTS) -o $@ $(LDFLAGS) + $(STRIP) $@ + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f joy2xd *~ *.o *.bak + Added: trunk/utils/joy2xd/joy2xd/joy2xd.c =================================================================== --- trunk/utils/joy2xd/joy2xd/joy2xd.c (rev 0) +++ trunk/utils/joy2xd/joy2xd/joy2xd.c 2009-03-31 22:38:44 UTC (rev 372) @@ -0,0 +1,515 @@ +/* joy2xd.c Joy2xd daemon for Open2X. + joy2xd is a daemon that allows USB gamepads to control the GP2X directly + through special new ioctls issued to /dev/GPIO. + + Copyright (C) 2009 Dan Silsby (Senor Quack) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> +#include <linux/joystick.h> +#include <signal.h> +#include <time.h> + + +#define GPIOAPINLVL 0x1180 +#define GPIOBPINLVL 0x1182 +#define GPIOCPINLVL 0x1184 +#define GPIODPINLVL 0x1186 +#define GPIOEPINLVL 0x1188 +#define GPIOFPINLVL 0x118A +#define GPIOGPINLVL 0x118C +#define GPIOHPINLVL 0x118E +#define GPIOIPINLVL 0x1190 +#define GPIOJPINLVL 0x1192 +#define GPIOKPINLVL 0x1194 +#define GPIOLPINLVL 0x1196 +#define GPIOMPINLVL 0x1198 +#define GPIONPINLVL 0x119A +#define GPIOOPINLVL 0x119C + +#define GPIOAOUT 0x1060 +#define GPIOBOUT 0x1062 +#define GPIOCOUT 0x1064 +#define GPIODOUT 0x1066 +#define GPIOEOUT 0x1068 +#define GPIOFOUT 0x106A +#define GPIOGOUT 0x106C +#define GPIOHOUT 0x106E +#define GPIOIOUT 0x1070 +#define GPIOJOUT 0x1072 +#define GPIOKOUT 0x1074 +#define GPIOLOUT 0x1076 +#define GPIOMOUT 0x1078 +#define GPIONOUT 0x107A +#define GPIOOOUT 0x107C + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_L (11) +#define GP2X_BUTTON_R (10) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) +#define NUM_BUTTONS (19) // total number of buttons we'll need to keep track of + +// senquack - allows the gpiod daemon to set GP2X buttons to on/off even if the user isn't pressing +// anything on the GP2X itself. For USB gamepad control of the GP2X. +// Argument to button_forcing is 1 if it is to be enabled, 0 if disabled: +#define GP2X_BUTTON_FORCING 70 +// Argument to force_button ioctl is a 32-bit unsigned int. The lower 16-bits should be set to 0x0001 +// if button is to be pressed down and 0x0000 if unpressed. The upper 16-bits should be the button +// number to set, 0-18 +#define GP2X_FORCE_BUTTON 71 + +// User can specify threshold between 1-128 to adjust the joystick's deadzone. +// It gets converted to a number between 1-32767 +#define MIN_USER_THRESHOLD 1 +#define MAX_USER_THRESHOLD 128 +#define DEFAULT_USER_THRESHOLD 96 +#define MIN_THRESHOLD 1 +#define MAX_THRESHOLD 32767 + +extern int errno; +//unsigned long *memregs32; +//unsigned short *memregs16; +FILE settings_file; +//int memfd; +int gpiofd; // /dev/GPIO +int joyfd; // /dev/js0 +int axis_threshold = DEFAULT_USER_THRESHOLD << 8; // How far does a joy axis need to + // be pushed beforewe accept it as input? + // (This is 1-32767) + +char settings_filename[80] = "/etc/config/open2x_joy2xd.conf"; +char joy_filename[80] = "/dev/input/o2x_js0"; +//char joy_filename[50] = "/dev/js0"; +//char joy2_filename[50] = "/dev/js1"; +char gpio_filename[] = "/dev/GPIO"; + +// axis_map links the USB gamepad's axes to the GP2X's +// stick axes. The value stored is 1 more than the +// real axis number (i.e., axis 0 will be stored as +// positive and negative 1, axis 1 will be positive +// and negative 2, and so forth). This is because +// we can't have positive and negative 0 ;) +// +// If axis 0 -/+ is left/right +// and axis 1 -/+ is up/down movement +// movement of the USB joystick, these values will exist: +// axis_map[AXIS_LEFT] == -1 axis_map[AXIS_UP] == -2 +#define AXIS_UP 0 +#define AXIS_LEFT 1 +int axis_map[2] = { 0, 0 }; + +// button_map holds the GP2X button numbers each joy button activates +// -1 means disabled +#define BUTTON_MAP_SIZE 40 +int button_map[40] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +char *trim_string(char *buf); +int read_config(const char *settings_filename); +//void *try_mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset); +int open_joy (void); +void close_joy (void); +int get_joy_axis(int *axis, int *value, int abortbutton); +int get_joy_button(int *button, int abortbutton, int skipbutton); +void flush_joy_queue(void); +int get_status (int number); +void shutdown(void); +int initialize(void); + + + +char *trim_string(char *buf) +{ + int len; + + while (*buf == ' ') buf++; + + len = strlen(buf); + + while (len != 0 && buf[len - 1] == ' ') + { + len--; + buf[len] = 0; + } + + return buf; +} + +// Return 1 on success, 0 on error. +int read_config(const char *settings_filename) +{ + FILE *f; + char buf[8192]; + char *str, *param; + + int x, y; + + f = fopen(settings_filename, "r"); + if (f == NULL) + { + printf("Error opening file: %s\n", settings_filename); + return 0; + } + else + { + printf("Loading settings from file: %s\n", settings_filename); + } + + while (!feof(f)) + { + // skip empty lines + fscanf(f, "%8192[\n\r]", buf); + + // read line + buf[0] = 0; + fscanf(f, "%8192[^\n^\r]", buf); + + // trim line + str = trim_string(buf); + + if (str[0] == 0) continue; + if (str[0] == '#') continue; + + // find parameter (after '=') + param = strchr(str, '='); + + if (param == NULL) continue; + + // split string into two strings + *param = 0; + param++; + + // trim them + str = trim_string(str); + param = trim_string(param); + + if ( strcmp(str, "AXIS_UP") == 0 ) + { + if (strlen(param) <= 2 && atoi(param) != 0) + { + axis_map[AXIS_UP] = atoi(param); + } else + { + printf("Error: ignoring bad parameter %s for key %s\n", param, str); + } + } + else if ( strcmp(str, "AXIS_LEFT") == 0 ) + { + if (strlen(param) <= 2 && atoi(param) != 0) + { + axis_map[AXIS_LEFT] = atoi(param); + } else + { + printf("Error: ignoring bad parameter %s for key %s\n", param, str); + } + } + else if ( strncmp(str, "BUTTON_", 7) == 0 ) + { + x = atoi(str+7); + y = atoi(param); + if (x >= 0 && x < BUTTON_MAP_SIZE && y >= 0 && y < NUM_BUTTONS) + { + button_map[x] = y; + } else if (y < -1) + { + printf("Error: ignoring bad key / parameter pair: %s=%s\n", str, param); + } + } + else if ( strcmp(str, "DEADZONE") == 0 ) + { + y = atoi(param); + if (y >= MIN_USER_THRESHOLD && y <= MAX_USER_THRESHOLD) + { + axis_threshold = y << 8; + if (axis_threshold < MIN_THRESHOLD) + axis_threshold = MIN_THRESHOLD; + if (axis_threshold > MAX_THRESHOLD) + axis_threshold = MAX_THRESHOLD; + printf("Saved axis_threshold: %d\n", axis_threshold); + } else if (y < -1) + { + printf("Error: ignoring bad key / parameter pair: %s=%s\n", str, param); + } + } + else + { + printf("Ignoring unknown setting: %s\n", str); + } + } + + if (axis_map[AXIS_UP] == 0 || axis_map[AXIS_LEFT] == 0) + { + printf("Fatal error: both Up and Left directional axes not specified\n"); + return 0; + } + + fclose(f); + return 1; +} + +int open_gpio (char *filename) +{ + gpiofd = open(filename, O_RDWR); + + if (gpiofd != -1) + { + int x = 1; + // Enable button forcing + ioctl(gpiofd, GP2X_BUTTON_FORCING, &x); + return 1; + } + + return 0; +} + +void close_gpio(void) +{ + if (gpiofd != -1) + { + int x = 0; + // Disable button forcing + ioctl(gpiofd, GP2X_BUTTON_FORCING, &x); + close(gpiofd); + } +} + +int open_joy (void) +{ + int num_tries; + struct timespec tv_req, tv_rem; + + tv_req.tv_sec = 1; + tv_req.tv_nsec = 0; + + for (num_tries = 0; num_tries < 6; num_tries++) + { + joyfd = open(joy_filename, O_RDONLY); + if (joyfd != -1) + return 1; + // wait a bit if we didn't open successfully, modules might be loading still + nanosleep(&tv_req, &tv_rem); + } + + return 0; +} + +void close_joy (void) +{ + if (joyfd != -1) + close(joyfd); +} + +static inline void force_button(int button, int state) +{ + state |= (button << 16); + ioctl(gpiofd, GP2X_FORCE_BUTTON, &state); +} + +void read_loop(void) +{ + struct js_event ev; + + for (;;) + { + while (read (joyfd, &ev, sizeof(struct js_event)) == sizeof(struct js_event)) + { + if (ev.type == JS_EVENT_BUTTON && ev.number < BUTTON_MAP_SIZE ) + { + if (button_map[ev.number] != -1) + force_button(button_map[ev.number], ev.value); + } + else if (ev.type == JS_EVENT_AXIS) + { + int up_pressed = 0; int down_pressed = 0; + int left_pressed = 0; int right_pressed = 0; + // is this equivalent to a down event? (greater than min. threshold?) + int down_event = abs(ev.value) > axis_threshold; + if (abs(axis_map[AXIS_UP]) == (ev.number + 1)) + { + // Movement along up/down axis + if (axis_map[AXIS_UP] < 0 && (ev.value < 0)) + { + // Movement towards up + up_pressed = down_event; + down_pressed = 0; + } else + { + // Movement towards down + down_pressed = down_event; + up_pressed = 0; + } + force_button(GP2X_BUTTON_UP, up_pressed); + force_button(GP2X_BUTTON_DOWN, down_pressed); + } else if (abs(axis_map[AXIS_LEFT]) == (ev.number + 1)) + { + // Movement along left/right axis + if (axis_map[AXIS_LEFT] < 0 && (ev.value < 0)) + { + // Movement towards left + left_pressed = down_event; + right_pressed = 0; + } else + { + // Movement towards right + right_pressed = down_event; + left_pressed = 0; + } + force_button(GP2X_BUTTON_LEFT, left_pressed); + force_button(GP2X_BUTTON_RIGHT, right_pressed); + } + } + } + usleep(0); // Don't delay at all, just give up our timeslice + } +} + +void shutdown(void) +{ + close_gpio(); + close_joy(); +} + + +int initialize(void) +{ + if (!read_config(settings_filename)) + { + fprintf(stderr, "Joy2xd couldn't find configuration file %s\n", settings_filename); + shutdown(); + return 0; + } + + if (!open_joy()) + { + fprintf(stderr, "Error opening joystick device %s\n", joy_filename); + shutdown(); + return 0; + } + + if (!open_gpio(gpio_filename)) + { + fprintf(stderr, "Error opening device file %s\n", gpio_filename); + shutdown(); + return 0; + } + + return 1; +} + +int main(int argc, char *argv[]) +{ + signal(SIGINT, &exit); + signal(SIGTERM, &exit); + signal(SIGHUP, SIG_IGN); + + if (argc > 1) { + // We have been passed command-line parameters + switch (argv[1][1]) { + case 'h': + // display help: + printf("Joy2xd USB gamepad -> GP2X control daemon by Senor Quack v1.0\n"); + printf("Copyright (C) 2009 Daniel Silsby\n\n"); + printf("OPTIONS:\n"); + printf("-h\t\t:\tDisplay help and version info\n\n"); + printf("-d\t\t:\tJust disable GPIO emulation and terminate\n\n"); + printf("-sFILE\t\t:\tRead settings from this file\n"); + printf("\t\t\t(default is %s)\n", settings_filename); + printf("-jJOYDEV\t:\tRead events from this joystick device file\n"); + printf("\t\t\t(default is %s)\n", joy_filename); + + return 0; + break; + case 'd': + if (open_gpio(gpio_filename)) + { + printf("Disabling GPIO emulation..\n"); + close_gpio(); // automatically disabled it + } + return 0; + break; + case 's': + if ((strlen(&argv[1][2]) < 79) && argv[1][2] != ' ' && argv[1][2] != '=') + { + strcpy(settings_filename, &argv[1][2]); + printf("Joy2xd reading config from %s\n", settings_filename); + } + else + { + printf("Error parsing filename after -s parameter.\n"); + return 1; + } + break; + case 'j': + if ((strlen(&argv[1][2]) < 79) && argv[1][2] != ' ' && argv[1][2] != '=') + { + strcpy(joy_filename, &argv[1][2]); + printf("Joy2xd reading events from %s\n", joy_filename); + } + else + { + printf("Error parsing filename after -j parameter.\n"); + return 1; + } + break; + default: + // invalid parameter + printf("Error: invalid parameter passed, see help by passing -h\n"); + shutdown(); + return 1; + + } // switch + } + + if (!initialize()) + { + fprintf(stderr, "Aborting because of initialization errors.\n"); + shutdown(); + return 1; + } + + read_loop(); + + shutdown(); + + return 0; +} + Added: trunk/utils/joy2xd/joy2xd_cfg/Makefile =================================================================== --- trunk/utils/joy2xd/joy2xd_cfg/Makefile (rev 0) +++ trunk/utils/joy2xd/joy2xd_cfg/Makefile 2009-03-31 22:38:44 UTC (rev 372) @@ -0,0 +1,39 @@ +CFLAGS=-c -O2 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 + +SOURCES=SFont.c joy2xd_cfg.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=joy2xd_cfg + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT \ + -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(OBJECTS) -o $@ $(LDFLAGS) + $(STRIP) $@ + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f joy2xd_cfg *~ *.o *.bak + Added: trunk/utils/joy2xd/joy2xd_cfg/SFont.c =================================================================== --- trunk/utils/joy2xd/joy2xd_cfg/SFont.c (rev 0) +++ trunk/utils/joy2xd/joy2xd_cfg/SFont.c 2009-03-31 22:38:44 UTC (rev 372) @@ -0,0 +1,182 @@ +/* SFont: a simple font-library that uses special .pngs as fonts + Copyright (C) 2003 Karl Bartel + + License: GPL or LGPL (at your choice) + WWW: http://www.linux-games.com/sfont/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Karl Bartel + Cecilienstr. 14 + 12307 Berlin + GERMANY + ka...@gm... +*/ +#include <SDL.h> + +#include <assert.h> +#include <stdlib.h> +#include "SFont.h" + +//DKS - added for memory debugging: +//#include "..\memwatch.h" + + +static Uint32 GetPixel(SDL_Surface *Surface, Sint32 X, Sint32 Y) +{ + Uint8 *bits; + Uint32 Bpp; + + assert(X>=0); + assert(X<Surface->w); + + Bpp = Surface->format->BytesPerPixel; + bits = ((Uint8 *)Surface->pixels)+Y*Surface->pitch+X*Bpp; + + // Get the pixel + switch(Bpp) { + case 1: + return *((Uint8 *)Surface->pixels + Y * Surface->pitch + X); + break; + case 2: + return *((Uint16 *)Surface->pixels + Y * Surface->pitch/2 + X); + break; + case 3: { // Format/endian independent + Uint8 r, g, b; + r = *((bits)+Surface->format->Rshift/8); + g = *((bits)+Surface->format->Gshift/8); + b = *((bits)+Surface->format->Bshift/8); + return SDL_MapRGB(Surface->format, r, g, b); + } + break; + case 4: + return *((Uint32 *)Surface->pixels + Y * Surface->pitch/4 + X); + break; + } + + return -1; +} + +SFont_Font* SFont_InitFont(SDL_Surface* Surface) +{ + int x = 0, i = 0; + Uint32 pixel; + SFont_Font* Font; + Uint32 pink; + + if (Surface == NULL) + return NULL; + + Font = (SFont_Font *) malloc(sizeof(SFont_Font)); + Font->Surface = Surface; + + SDL_LockSurface(Surface); + + pink = SDL_MapRGB(Surface->format, 255, 0, 255); + while (x < Surface->w) { + if (GetPixel(Surface, x, 0) == pink) { + Font->CharPos[i++]=x; + while((x < Surface->w) && (GetPixel(Surface, x, 0)== pink)) + x++; + Font->CharPos[i++]=x; + } + x++; + } + Font->MaxPos = x-1; + + pixel = GetPixel(Surface, 0, Surface->h-1); + SDL_UnlockSurface(Surface); + SDL_SetColorKey(Surface, SDL_SRCCOLORKEY, pixel); + + return Font; +} + +void SFont_FreeFont(SFont_Font* FontInfo) +{ + SDL_FreeSurface(FontInfo->Surface); + free(FontInfo); +} + +void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, + int x, int y, const char *text) +{ + const char* c; + int charoffset; + SDL_Rect srcrect, dstrect; + + if(text == NULL) + return; + + // these values won't change in the loop + srcrect.y = 1; + dstrect.y = y; + srcrect.h = dstrect.h = Font->Surface->h - 1; + + for(c = text; *c != '\0' && x <= Surface->w ; c++) { + charoffset = ((int) (*c - 33)) * 2 + 1; + // skip spaces and nonprintable characters + if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) { + x += Font->CharPos[2]-Font->CharPos[1]; + continue; + } + + srcrect.w = dstrect.w = + (Font->CharPos[charoffset+2] + Font->CharPos[charoffset+1])/2 - + (Font->CharPos[charoffset] + Font->CharPos[charoffset-1])/2; + srcrect.x = (Font->CharPos[charoffset]+Font->CharPos[charoffset-1])/2; + dstrect.x = x - (float)(Font->CharPos[charoffset] + - Font->CharPos[charoffset-1])/2; + + SDL_BlitSurface(Font->Surface, &srcrect, Surface, &dstrect); + + x += Font->CharPos[charoffset+1] - Font->CharPos[charoffset]; + } +} + +int SFont_TextWidth(const SFont_Font *Font, const char *text) +{ + const char* c; + int charoffset=0; + int width = 0; + + if(text == NULL) + return 0; + + for(c = text; *c != '\0'; c++) { + charoffset = ((int) *c - 33) * 2 + 1; + // skip spaces and nonprintable characters + if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) { + width += Font->CharPos[2]-Font->CharPos[1]; + continue; + } + + width += Font->CharPos[charoffset+1] - Font->CharPos[charoffset]; + } + + return width; +} + +int SFont_TextHeight(const SFont_Font* Font) +{ + return Font->Surface->h - 1; +} + +void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font *Font, + int y, const char *text) +{ + SFont_Write(Surface, Font, Surface->w/2 - SFont_TextWidth(Font, text)/2, + y, text); +} + Added: trunk/utils/joy2xd/joy2xd_cfg/SFont.h =================================================================== --- trunk/utils/joy2xd/joy2xd_cfg/SFont.h (rev 0) +++ trunk/utils/joy2xd/joy2xd_cfg/SFont.h 2009-03-31 22:38:44 UTC (rev 372) @@ -0,0 +1,83 @@ +/* SFont: a simple font-library that uses special bitmaps as fonts + Copyright (C) 2003 Karl Bartel + + License: GPL or LGPL (at your choice) + WWW: http://www.linux-games.com/sfont/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Karl Bartel + Cecilienstr. 14 + 12307 Berlin + GERMANY + ka...@gm... +*/ + +/************************************************************************ +* SFONT - SDL Font Library by Karl Bartel <ka...@gm...> * +* * +* All functions are explained below. For further information, take a * +* look at the example files, the links at the SFont web site, or * +* contact me, if you problem isn' addressed anywhere. * +* * +************************************************************************/ +#ifndef SFONT_H +#define SFONT_H + +#include <SDL.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// Delcare one variable of this type for each font you are using. +// To load the fonts, load the font image into YourFont->Surface +// and call InitFont( YourFont ); +typedef struct { + SDL_Surface *Surface; + int CharPos[512]; + int MaxPos; +} SFont_Font; + +// Initializes the font +// Font: this contains the suface with the font. +// The Surface must be loaded before calling this function +SFont_Font* SFont_InitFont (SDL_Surface *Font); + +// Frees the font +// Font: The font to free +// The font must be loaded before using this function. +void SFont_FreeFont(SFont_Font* Font); + +// Blits a string to a surface +// Destination: the suface you want to blit to +// text: a string containing the text you want to blit. +void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, int x, int y, + const char *text); + +// Returns the width of "text" in pixels +int SFont_TextWidth(const SFont_Font* Font, const char *text); +// Returns the height of "text" in pixels (which is always equal to Font->Surface->h) +int SFont_TextHeight(const SFont_Font* Font); + +// Blits a string to Surface with centered x position +void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font* Font, int y, + const char *text); + +#ifdef __cplusplus +} +#endif + +#endif /* SFONT_H */ Added: trunk/utils/joy2xd/joy2xd_cfg/img/animation.png =================================================================== (Binary files differ) Property changes on: trunk/utils/joy2xd/joy2xd_cfg/img/animation.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/utils/joy2xd/joy2xd_cfg/img/bg.png =================================================================== (Binary files differ) Property changes on: trunk/utils/joy2xd/joy2xd_cfg/img/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/utils/joy2xd/joy2xd_cfg/img/font_wh.png =================================================================== (Binary files differ) Property changes on: trunk/utils/joy2xd/joy2xd_cfg/img/font_wh.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/utils/joy2xd/joy2xd_cfg/joy2xd_cfg.c =================================================================== --- trunk/utils/joy2xd/joy2xd_cfg/joy2xd_cfg.c (rev 0) +++ trunk/utils/joy2xd/joy2xd_cfg/joy2xd_cfg.c 2009-03-31 22:38:44 UTC (rev 372) @@ -0,0 +1,1572 @@ +/* joy2xd_cfg.c joy2xd configuration utility for Open2X. + This is a support program for joy2xd. joy2xd is a daemon + that allows USB gamepads to control the GP2X directly + through special new ioctls issued to /dev/GPIO. + + Copyright (C) 2009 Dan Silsby (Senor Quack) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> +#include <SDL.h> +#include <SDL_image.h> +#include <SDL_gfxPrimitives.h> +#include "SFont.h" +#include <linux/joystick.h> +#include <signal.h> + +#define GPIOAPINLVL 0x1180 +#define GPIOBPINLVL 0x1182 +#define GPIOCPINLVL 0x1184 +#define GPIODPINLVL 0x1186 +#define GPIOEPINLVL 0x1188 +#define GPIOFPINLVL 0x118A +#define GPIOGPINLVL 0x118C +#define GPIOHPINLVL 0x118E +#define GPIOIPINLVL 0x1190 +#define GPIOJPINLVL 0x1192 +#define GPIOKPINLVL 0x1194 +#define GPIOLPINLVL 0x1196 +#define GPIOMPINLVL 0x1198 +#define GPIONPINLVL 0x119A +#define GPIOOPINLVL 0x119C + +#define GPIOAOUT 0x1060 +#define GPIOBOUT 0x1062 +#define GPIOCOUT 0x1064 +#define GPIODOUT 0x1066 +#define GPIOEOUT 0x1068 +#define GPIOFOUT 0x106A +#define GPIOGOUT 0x106C +#define GPIOHOUT 0x106E +#define GPIOIOUT 0x1070 +#define GPIOJOUT 0x1072 +#define GPIOKOUT 0x1074 +#define GPIOLOUT 0x1076 +#define GPIOMOUT 0x1078 +#define GPIONOUT 0x107A +#define GPIOOOUT 0x107C + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_L (11) +#define GP2X_BUTTON_R (10) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) +#define NUM_BUTTONS (19) // total number of buttons we'll need to keep track of + +// User can specify threshold between 1-128 to adjust the joystick's deadzone. +// It gets converted to a number between 1-32767 +#define MIN_USER_THRESHOLD 1 +#define MAX_USER_THRESHOLD 128 +#define DEFAULT_USER_THRESHOLD 96 +#define MIN_THRESHOLD 1 +#define MAX_THRESHOLD 32767 + + +const int menu_title_y = 52; +const int menu_line_y[4] = { 83, 93, 103, 113 }; +const int menu_line_x = 90; +const int gp2x_abort_button = GP2X_BUTTON_X; +extern int errno; +unsigned long *memregs32; +unsigned short *memregs16; +FILE settings_file; +int memfd; +int joyfd; // /dev/js0 +int user_threshold = DEFAULT_USER_THRESHOLD; // Joystick deadzone, 1-128 +int axis_threshold = DEFAULT_USER_THRESHOLD << 8; // How far does a joy axis need to + // be pushed beforewe accept it as input? + // (This is 1-32767) +//global surfaces +SDL_Surface* screen; // framebuffer +SDL_Surface* background; // background containing test images, etc + +//global fonts +SFont_Font *font_wh; //white + +//global constants +const int screenw = 320; +const int screenh = 240; +const int screenbpp = 16; +const int screenflags = SDL_DOUBLEBUF; + +char settings_filename[80] = "/etc/config/open2x_joy2xd.conf"; +char joy_filename[80] = "/dev/input/o2x_js0"; + +// Each GP2X button has one entry for each of these two arrays: + +//// type_map tells whether a button should be controlled by a +//// joystick axis event or a joystick button event. +//// If an axis event, its entry will be JS_EVENT_BUTTON, 0x01 +//// If a button event, its entry will be JS_EVENT_AXIS, 0x02 +//// If it is not to be controlled at all, its entry will be 0 +//int type_map[19] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0 } +// +//// value_map is referred to when a button is being controlled +//// by a joystick axis. +//// The button's entry will be the minimum threshold value, +//// positive, or negative, for that axis to represent a +//// GP2X button press. +//int value_map[19] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0 } + + +// axis_map links the USB gamepad's axes to the GP2X's +// stick axes. The value stored is 1 more than the +// real axis number (i.e., axis 0 will be stored as +// positive and negative 1, axis 1 will be positive +// and negative 2, and so forth). This is because +// we can't have positive and negative 0 ;) +// +// If axis 0 -/+ controls left to right +// movement of the GP2X stick, these values will exist: +// axis_map[AXIS_LEFT] == -1 axis_map[AXIS_RIGHT] == 1 +// +// And if axis 1 -/+ controls down to up movement of the +// GP2SX stick, these values will be assigned: +// axis_map[AXIS_DOWN] == -2 axis_map[AXIS_UP] == 2 +// joystick axis event or a joystick button event. +//#define AXIS_UP 0 +//#define AXIS_DOWN 1 +//#define AXIS_LEFT 2 +//#define AXIS_RIGHT 3 +//int axis_map[4] = { 0, 0, 0, 0 }; + + + +//// button_map holds the USB joy buttons numbers that +//// activate the GP2X's non-stick-related buttons. +//// -1 means disabled +//#define BUTTON_A 0 +//#define BUTTON_B 1 +//#define BUTTON_X 2 +//#define BUTTON_Y 3 +//#define BUTTON_L 4 +//#define BUTTON_R 5 +//#define BUTTON_SELECT 6 +//#define BUTTON_START 7 +//#define BUTTON_VOLUP 8 +//#define BUTTON_VOLDOWN 9 +//#define BUTTON_CLICK 10 +//int button_map[11] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +// axis_map links the USB gamepad's axes to the GP2X's +// stick axes. The value stored is 1 more than the +// real axis number (i.e., axis 0 will be stored as +// positive and negative 1, axis 1 will be positive +// and negative 2, and so forth). This is because +// we can't have positive and negative 0 ;) +// +// If axis 0 -/+ is left/right +// and axis 1 -/+ is up/down movement +// movement of the USB joystick, these values will exist: +// axis_map[AXIS_LEFT] == -1 axis_map[AXIS_UP] == -2 +#define AXIS_UP 0 +#define AXIS_LEFT 1 +int axis_map[2] = { 0, 0 }; + +// button_map holds the GP2X button numbers each joy button activates +// -1 means disabled +#define BUTTON_MAP_SIZE 40 +int button_map[40] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +char *trim_string(char *buf); +void init_map_vars(void); +int write_config(void); +int read_config(const char *settings_filename); +void *try_mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset); +int init_gpio (void); +int open_joy (char *joyfile); +void close_joy (void); +int get_joy_axis(int *axis, int *value, int abortbutton); +int get_joy_button(int *button, int abortbutton, int skipbutton); +void flush_joy_queue(void); +void close_phys (void); +int get_status (int number); +int wait_for_button (void); +int load_graphics(void); +void unload_graphics(void); +void shutdown(void); +void blit_bg(void); +void show_anim(void); +void show_joy_error(void); +int configure_sequence(void); +int menu(void); +int initialize(void); + + + +char *trim_string(char *buf) +{ + int len; + + while (*buf == ' ') buf++; + + len = strlen(buf); + + while (len != 0 && buf[len - 1] == ' ') + { + len--; + buf[len] = 0; + } + + return buf; +} + +// Return 1 on success, 0 on error. +int read_config(const char *settings_filename) +{ + FILE *f; + char buf[8192]; + char *str, *param; + + int i, x, y; + + f = fopen(settings_filename, "r"); + if (f == NULL) + { + printf("Error opening file: %s\n", settings_filename); + return 0; + } + else + { + printf("Loading settings from file: %s\n", settings_filename); + } + + while (!feof(f)) + { + // skip empty lines + fscanf(f, "%8192[\n\r]", buf); + + // read line + buf[0] = 0; + fscanf(f, "%8192[^\n^\r]", buf); + + // trim line + str = trim_string(buf); + + if (str[0] == 0) continue; + if (str[0] == '#') continue; + + // find parameter (after '=') + param = strchr(str, '='); + + if (param == NULL) continue; + + // split string into two strings + *param = 0; + param++; + + // trim them + str = trim_string(str); + param = trim_string(param); + + if ( strcmp(str, "AXIS_UP") == 0 ) + { + if (strlen(param) <= 2 && atoi(param) != 0) + { + axis_map[AXIS_UP] = atoi(param); + } else + { + printf("Error: ignoring bad parameter %s for key %s\n", param, str); + } + } + else if ( strcmp(str, "AXIS_LEFT") == 0 ) + { + if (strlen(param) <= 2 && atoi(param) != 0) + { + axis_map[AXIS_LEFT] = atoi(param); + } else + { + printf("Error: ignoring bad parameter %s for key %s\n", param, str); + } + } + else if ( strncmp(str, "BUTTON_", 7) == 0 ) + { + x = atoi(str+7); + y = atoi(param); + if (x >= 0 && x < BUTTON_MAP_SIZE && y >= 0 && y < NUM_BUTTONS) + { + button_map[x] = y; + } else if (y < -1) + { + printf("Error: ignoring bad key / parameter pair: %s=%s\n", str, param); + } + } + else if ( strcmp(str, "DEADZONE") == 0 ) + { + printf("Before read_config, axis_threshold = %d\n", axis_threshold); + y = atoi(param); + if (y >= MIN_USER_THRESHOLD && y <= MAX_USER_THRESHOLD) + { + user_threshold = y; + axis_threshold = y << 8; + if (axis_threshold < MIN_THRESHOLD) + axis_threshold = MIN_THRESHOLD; + if (axis_threshold > MAX_THRESHOLD) + axis_threshold = MAX_THRESHOLD; + printf("Read in axis_threshold of %d\n", axis_threshold); + } else if (y < -1) + { + printf("Error: ignoring bad key / parameter pair: %s=%s\n", str, param); + } + } + else + { + printf("Ignoring unknown setting: %s\n", str); + } + } + + if (axis_map[AXIS_UP] == 0 || axis_map[AXIS_LEFT] == 0) + { + printf("Fatal error: both Up and Left directional axes not specified\n"); + return 0; + } + + fclose(f); + return 1; +} + +// initializes axis and button maps +void init_map_vars(void) +{ + int i; + axis_map[AXIS_UP] = 0; + axis_map[AXIS_LEFT] = 0; + for (i = 0; i < BUTTON_MAP_SIZE ; i++) + button_map[i] = -1; +} + + +// Return 1 on success, 0 on error. +int write_config(void) +{ + int i; + FILE *f; + char buf[50]; + + f = fopen(settings_filename, "w"); + if (f == NULL) + { + printf("Error opening file for writing: %s\n", settings_filename); + return 0; + } + else + { + printf("Writing settings to file: %s\n", settings_filename); + } + + fprintf(f, "AXIS_UP=%d\n", axis_map[AXIS_UP]); + fprintf(f, "AXIS_LEFT=%d\n", axis_map[AXIS_LEFT]); + for (i=0; i < BUTTON_MAP_SIZE; i++) + { + fprintf(f, "BUTTON_%02d=%d\n", i, button_map[i]); + } + fprintf(f, "DEADZONE=%d\n", user_threshold); + + return (fclose(f) == 0); +} + +void *try_mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) +{ + char *p; + int aa; + + p = mmap (start, length, prot, flags, fd, offset); + if (p == (char *)0xFFFFFFFF) + { + aa = errno; + printf ("mmap failed. errno = %d\n", aa); + } + else + { + //printf ("OK! (%X)\n", (unsigned int)p); + } + + return p; +} + +// returns 1 on success, 0 on error +int init_gpio (void) +{ + memfd = open("/dev/mem", O_RDWR); + if (memfd == -1) + { + printf ("Opening /dev/mem failed\n"); + return 0; + } + + memregs32 = try_mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, memfd, 0xc0000000); + if (memregs32 == (unsigned long *)0xFFFFFFFF) return 0; + + memregs16 = (unsigned short *)memregs32; + + return 1; +} + +int open_joy (char *joyfilename) +{ + joyfd = open(joyfilename, O_RDONLY | O_NONBLOCK); + return (joyfd != -1); +} + +void close_joy (void) +{ + if (joyfd != -1) + close(joyfd); +} + +//This function will wait until either the user presses a joystick axis +//far enough in a direction to register above the axis_threshold or until +//the user presses the designated GP2X abort button. +//return 0 if got axis value (along with axis and value (as +1 or -1) in reference parameters) +//return 1 if user pressed gp2x abort button +int get_joy_axis(int *axis, int *value, int abortbutton) +{ + struct js_event ev; + + while (1) + { + if (get_status(abortbutton)) + return 1; // user aborted + if (read (joyfd, &ev, sizeof(struct js_event)) == sizeof(struct js_event)) + { + if (ev.type == JS_EVENT_AXIS && abs(ev.value) > axis_threshold) + { + *axis = ev.number; + *value = (ev.value > 0) ? 1 : -1; + return 0; + } + } + } +} + +//This function will wait until either the user presses a joystick button +//or the user presses the designated GP2X abort button or skip buttons +//return 0 if we got a real button press +//return 1 if user pressed gp2x abort button +//return 2 if user pressed gp2x skip button +//return button number pressed in button reference parameter +int get_joy_button(int *button, int abortbutton, int skipbutton) +{ + struct js_event ev; + + while (1) + { + if (get_status(abortbutton)) + return 1; // user aborted + if (get_status(skipbutton)) + return 2; // user skipped + if (read (joyfd, &ev, sizeof(struct js_event)) == sizeof(struct js_event)) + { + if (ev.type == JS_EVENT_BUTTON && ev.value == 1 && ev.number < BUTTON_MAP_SIZE) + { + *button = ev.number; + return 0; + } + } + } +} + +// Keep reading joy events until there aren't anymore (joystick centered and resting) +void flush_joy_queue(void) +{ + struct js_event ev; + while (read (joyfd, &ev, sizeof(struct js_event)) > 0) {}; +} + +void close_phys (void) +{ + close (memfd); +} + +// return status of a specific GP2X button, 1 if pressed, 0 if not +int get_status (int number) +{ + unsigned long mask = 0; + switch (number) { + case GP2X_BUTTON_UP: + mask = 1; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_DOWN: + mask = 1 << 4; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_LEFT: + mask = 1 << 2; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_RIGHT: + mask = 1 << 6; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_UPLEFT: + mask = 1 << 1; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_UPRIGHT: + mask = 1 << 7; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_DOWNLEFT: + mask = 1 << 3; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_DOWNRIGHT: + mask = 1 << 5; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_VOLDOWN: + mask = 1 << 6; + if (~(memregs16[GPIODPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_VOLUP: + mask = 1 << 7; + if (~(memregs16[GPIODPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_CLICK: + mask = 1 << 11; + if (~(memregs16[GPIODPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_L: + mask = 1 << 10; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_R: + mask = 1 << 11; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_A: + mask = 1 << 12; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_B: + mask = 1 << 13; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_X: + mask = 1 << 14; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_Y: + mask = 1 << 15; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_SELECT: + mask = 1 << 9; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_START: + mask = 1 << 8; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + default: + // shouldn't happen + printf("error in get_status()\n"); + return 0; + break; + } + + return 0; +} + +// Wait infinitely for GP2X button to be pressed. +// Return value is button pressed. +int wait_for_button (void) +{ + int i; + while (1) { + for (i = 0; i <= 18; i++) { + if (get_status(i)) { + return i; + } + } + usleep(20000); // sleep 20ms + } +} + +int load_graphics(void) +{ + SDL_Surface *tmp_sur, *tmp_sur2; + +// // animation that moves to show interlacing +// tmp_sur = IMG_Load("img/animation.png"); +// if (!tmp_sur) +// { +// fprintf(stderr, "Fatal error loading: img/animation.png\n"); +// return 0; +// } +// animation = SDL_DisplayFormat(tmp_sur); +// SDL_SetColorKey(animation, SDL_SRCCOLORKEY, SDL_MapRGB(screen->format, 255, 0, 255)); +// SDL_FreeSurface(tmp_sur); + + // Background image + tmp_sur = IMG_Load("img/bg.png"); + if (!tmp_sur) + { + fprintf(stderr, "Fatal error loading: img/bg.png\n"); + return 0; + } + background = SDL_DisplayFormat(tmp_sur); + SDL_FreeSurface(tmp_sur); + + //Font + tmp_sur = IMG_Load("img/font_wh.png"); + if (!tmp_sur) + { + fprintf ( stderr,"Fatal error loading: img/font_wh.png\n" ); + return 0; + } + tmp_sur2 = SDL_DisplayFormat(tmp_sur); + font_wh = SFont_InitFont(tmp_sur2); + if (!font_wh) + { + fprintf ( stderr,"Fatal error intializing SFont on font_wh.png\n" ); + return 0; + } + SDL_FreeSurface(tmp_sur); + + + return 1; +} + +void unload_graphics(void) +{ + if (background) + SDL_FreeSurface(background); + + if (font_wh) + SFont_FreeFont(font_wh); +} + +void shutdown(void) +{ + unload_graphics(); + SDL_Quit(); + close_phys(); + close_joy(); +} + +void blit_bg(void) +{ + SDL_Rect dstrect; + + //blit background + SDL_BlitSurface(background, NULL, screen, NULL); + + //blit menu border & BG +// rectangleRGBA(screen, ((screenw >> 1) - 80), 1, ((screenw >> 1) + 80), 58, +// 255, 255, 255, 255); + rectangleRGBA(screen, ((screenw >> 1) - 80), 51, ((screenw >> 1) + 80), 128, + 0, 0, 0, 255); + dstrect.x = (screenw >> 1) - 80 + 1; +// dstrect.y = 2; + dstrect.y = 52; + dstrect.w = ((screenw >> 1) + 80) - ((screenw >> 1) - 80) - 1; +// dstrect.h = 56; + dstrect.h = 76; + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); + + SFont_WriteCenter(screen, font_wh, menu_title_y, "Open2X Joy2xd Configuration Utility"); + +} + +// show animated menu window expanding on startup +void show_anim(void) +{ + SDL_Rect dstrect; + + int i; + for (i = 0; i < 77; i+=4) + { + //blit background + SDL_BlitSurface(background, NULL, screen, NULL); + // animated menu border + rectangleRGBA(screen, ((screenw >> 1) - i), 51, ((screenw >> 1) + i), 128, + 0, 0, 0, 0); + dstrect.x = (screenw >> 1) - i + 1; + dstrect.y = 52; + dstrect.w = ((screenw >> 1) + i) - ((screenw >> 1) - i) - 2; + dstrect.h = 75; + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); + SDL_Flip(screen); +// SDL_Delay(10); + } +} + + +void show_joy_error(void) +{ + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[0], "Error: No USB joysticks detected."); + SFont_WriteCenter(screen, font_wh, menu_line_y[1], "Make sure USB Host and USB HID are"); + SFont_WriteCenter(screen, font_wh, menu_line_y[2], "enabled in the Open2X settings."); + SFont_WriteCenter(screen, font_wh, menu_line_y[3], "Press any GP2X button to exit..."); + SDL_Flip(screen); + wait_for_button(); +} + +// returns 1 if completed, 0 if cancelled +int configure_sequence(void) +{ +#define CONFIG_INSTR_LINE1 0 +#define CONFIG_INSTR_LINE2 1 +#define CONFIG_INSTR_LINE3 2 +#define CONFIG_INSTR_LINE4 3 + + int rval,axis,button,value; + int ok_delay = 1000; + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Move stick/pad up"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to cancel)"); + SDL_Flip(screen); + rval = get_joy_axis(&axis, &value, gp2x_abort_button); + switch (rval) + { + case 0: + // User gave us USB joy axis + axis_map[AXIS_UP] = axis + 1; // always stored 1 more than real axis + // (since we can't have zero as positive and + // negative) + if (value < 0) + { + axis_map[AXIS_UP] *= -1; + } + break; + default: + // User aborted + return 0; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok."); + SDL_Flip(screen); + SDL_Delay(ok_delay); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok.."); + SDL_Flip(screen); + SDL_Delay(ok_delay); + + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Move stick/pad left"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to cancel)"); + SDL_Flip(screen); + rval = get_joy_axis(&axis, &value, gp2x_abort_button); + switch (rval) + { + case 0: + // User gave us USB joy axis + axis_map[AXIS_LEFT] = axis + 1; // always stored 1 more than real axis + // (since we can't have zero as positive and + // negative) + if (value < 0) + { + axis_map[AXIS_LEFT] *= -1; + } + break; + default: + // User aborted + return 0; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok."); + SDL_Flip(screen); + SDL_Delay(ok_delay); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok.."); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X A button"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_A ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X B button"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_B ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X X button"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_X ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Y button"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_Y ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Left Trigger"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_L ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Right Trigger"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_R ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Volume -"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_VOLDOWN ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Volume +"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_VOLUP; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Select button"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_SELECT; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Start button"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_START ; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); + flush_joy_queue(); + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "Ok"); + SDL_Flip(screen); + SDL_Delay(ok_delay); + flush_joy_queue(); + + blit_bg(); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE1], "Press USB button corresponding to:"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE2], "GP2X Stick-click"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE3], "(Press Start on GP2X to skip)"); + SFont_WriteCenter(screen, font_wh, menu_line_y[CONFIG_INSTR_LINE4], "(Press X on GP2X to go cancel)"); + SDL_Flip(screen); + rval = get_joy_button(&button, gp2x_abort_button, GP2X_BUTTON_START); + switch (rval) + { + case 0: + // User gave us USB joy button + button_map[button] = GP2X_BUTTON_CLICK; + break; + case 1: + // User aborted + return 0; + break; + default: + // User skipped + break; + } + blit_bg(); + SDL_Flip(screen); +... [truncated message content] |
From: <sen...@us...> - 2009-03-31 22:28:11
|
Revision: 371 http://open2x.svn.sourceforge.net/open2x/?rev=371&view=rev Author: senquack Date: 2009-03-31 22:28:08 +0000 (Tue, 31 Mar 2009) Log Message: ----------- GMenu2X support for Joy2xd, TV Daemon, general DR6/DR7 changes Modified Paths: -------------- trunk/utils/gmenu2x/build/gmenu2x.conf trunk/utils/gmenu2x/src/Makefile trunk/utils/gmenu2x/src/gmenu2x.cpp trunk/utils/gmenu2x/src/gmenu2x.h trunk/utils/gmenu2x/src/linkapp.cpp trunk/utils/gmenu2x/src/linkapp.h trunk/utils/gmenu2x/src/utilities.cpp Added Paths: ----------- trunk/utils/gmenu2x/build/skins/Default/icons/gamepad.png trunk/utils/gmenu2x/src/open2x.h Modified: trunk/utils/gmenu2x/build/gmenu2x.conf =================================================================== --- trunk/utils/gmenu2x/build/gmenu2x.conf 2009-03-31 22:26:22 UTC (rev 370) +++ trunk/utils/gmenu2x/build/gmenu2x.conf 2009-03-31 22:28:08 UTC (rev 371) @@ -1,23 +1,28 @@ lang="" tvoutEncoding="NTSC" wallpaper="skins/Default/wallpapers/wallpaper2x.png" -skin="open2x" +skin="Default" showServices=0 -tvoutEncoding=0 +tvoutXScale=100 outputLogs=0 +tvoutXOffsetPAL=16 link=0 numCols=5 alwaysUseFastTimings=0 skin=0 saveSelection=0 numRows=4 -resolutionX=0 +resolutionX=320 section=0 menuClock=140 -resolutionY=0 +resolutionY=240 maxClock=300 showUptime=1 +tvoutYOffsetPAL=19 +tvoutYOffsetNTSC=-7 wallpaper=0 -globalVolume=100 +tvoutYScale=100 +globalVolume=67 +tvoutXOffsetNTSC=10 gamma=10 videoBpp=16 Added: trunk/utils/gmenu2x/build/skins/Default/icons/gamepad.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/gamepad.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Modified: trunk/utils/gmenu2x/src/Makefile =================================================================== --- trunk/utils/gmenu2x/src/Makefile 2009-03-31 22:26:22 UTC (rev 370) +++ trunk/utils/gmenu2x/src/Makefile 2009-03-31 22:28:08 UTC (rev 371) @@ -7,6 +7,7 @@ STRIP = $(CROSS_COMPILE)strip CFLAGS = -I./google -I"$(CHAINPREFIX)/include" `$(CHAINPREFIX)/bin/sdl-config --cflags` -DTARGET_GP2X -DOPEN2X -DTIXML_USE_STL -O3 -msoft-float -ffast-math -funroll-loops -Wall -Wno-unknown-pragmas -Wno-format +#CFLAGS = -I./google -I"$(CHAINPREFIX)/include" `$(CHAINPREFIX)/bin/sdl-config --cflags` -DTARGET_GP2X -DOPEN2X -DTIXML_USE_STL -O0 -msoft-float -ffast-math -funroll-loops -Wall -Wno-unknown-pragmas -Wno-format #CFLAGS = -I./google -I"$(CHAINPREFIX)/include" `$(CHAINPREFIX)/bin/sdl-config --cflags` -g -DTARGET_GP2X -DOPEN2X -DTIXML_USE_STL -O0 -msoft-float -ffast-math -funroll-loops -Wall -Wno-unknown-pragmas -Wno-format CXXFLAGS = $(CFLAGS) LDFLAGS = -L$(CHAINPREFIX)/lib `$(CHAINPREFIX)/bin/sdl-config --libs` -lfreetype -lSDL_image -lSDL_gfx -ljpeg -lpng12 -lSDL -lz -ldl # -lpnd Modified: trunk/utils/gmenu2x/src/gmenu2x.cpp =================================================================== --- trunk/utils/gmenu2x/src/gmenu2x.cpp 2009-03-31 22:26:22 UTC (rev 370) +++ trunk/utils/gmenu2x/src/gmenu2x.cpp 2009-03-31 22:28:08 UTC (rev 371) @@ -22,6 +22,7 @@ //senquack - needed for bugfix involving skin.conf: #include <iomanip> + #include <sstream> #include <fstream> #include <stdlib.h> @@ -31,6 +32,14 @@ #include <SDL_gfxPrimitives.h> #include <signal.h> +#include <SDL_gp2x.h> + +//senquack - tvout stuff: +#include "mmsp2_regs.h" + +//senquack - Open2X defines +#include "open2x.h" + #include <sys/statvfs.h> #include <errno.h> @@ -74,6 +83,7 @@ #include "menusettingimage.h" #include "menusettingdir.h" + #include <sys/mman.h> #ifdef TARGET_PANDORA @@ -106,48 +116,752 @@ //if wm97xx fails to open, set f200 to false to prevent any further access to the touchscreen f200 = ts.init(); } + + gp2x_tv_mode = gp2x_memregs[0x2800>>1] & 0x100; + #endif } void GMenu2X::gp2x_deinit() { #ifdef TARGET_GP2X if (gp2x_mem!=0) { - gp2x_memregs[0x28DA>>1]=0x4AB; - gp2x_memregs[0x290C>>1]=640; + //senquack +// gp2x_memregs[0x28DA>>1]=0x4AB; +// gp2x_memregs[0x290C>>1]=640; close(gp2x_mem); } if (batteryHandle!=0) close(batteryHandle); if (f200) ts.deinit(); + + if (cx25874) + { + close(cx25874); + cx25874 = 0; + } #endif } +//senquack - pulled from Rlyeh's minlib for improved TVout: +// NOTE: this appears to wait indefinitely, might not be compatible with SDL, disabling. +/* Function: gp2x_video_waitvsync + This function halts the program until a vertical sync is done. + + See also: + <gp2x_video_waithsync> + + Credits: + rlyeh (original code) + K-teto (fixed this function for firmware 2.0.0) */ + +//void GMenu2X::gp2x_video_waitvsync(void) +//{ +// while( gp2x_memregs[0x1182>>1]&(1<<4)) +// { +// asm volatile ("nop"); +// asm volatile ("nop"); +// asm volatile ("nop"); +// asm volatile ("nop"); +// +// //asm volatile ("" ::: "memory"); +// } +// +// while(!(gp2x_memregs[0x1182>>1]&(1<<4))) +// { +// asm volatile ("nop"); +// asm volatile ("nop"); +// asm volatile ("nop"); +// asm volatile ("nop"); +// +// //asm volatile ("" ::: "memory"); +// } +//} + +//senquack - pulled from Rlyeh's minlib for improved TVout: +/* Function: gp2x_i2c_write + This function writes a byte into an I2C address. + + Parameters: + id (0..) - i2c ID + addr - address to write data to. + data (0..255) - data to be written. + + See also: + <gp2x_i2c_read> + + Credits: + rlyeh */ + +void GMenu2X::gp2x_i2c_write(unsigned char id, unsigned char addr, unsigned char data) +{ +#ifdef TARGET_GP2X + i2cw a; + a.id = id, a.addr = addr, a.data = data; + ioctl(cx25874, _IOW('v', 0x00, i2cw), &a); //CX25874_I2C_WRITE_BYTE +#endif +} + +//senquack - pulled from Rlyeh's minlib for improved TVout: +/* Function: gp2x_i2c_read + This function reads a byte from an I2C address. + + Parameters: + id (0..) - i2c ID + addr - address to write data to. + + See also: + <gp2x_i2c_write> + + Credits: + rlyeh */ + +unsigned char GMenu2X::gp2x_i2c_read(unsigned char id, unsigned char addr) +{ +#ifdef TARGET_GP2X + unsigned char temp; + i2cr a; + a.id = id, a.addr = addr, a.pdata = &temp ; + ioctl(cx25874, _IOW('v', 0x01, i2cr), &a); //CX25874_I2C_READ_BYTE + + return (*a.pdata); +#endif +} + +//senquack - pulled from Rlyeh's minlib for improved TVout: +//int GMenu2X::gp2x_tv_getmode(void) +//{ +//// return gp2x_tv_lastmode; +// return gp2x_tv_mode; // LCD, PAL or NTSC +//} + +//senquack - pulled from Rlyeh's minlib for improved TVout (modified slightly) +/* Function: gp2x_misc_lcd + This function enables or disables the LCD backlight. + + Parameters: + on (0..1) - turns LCD backlight off (0) or on (1) + + Credits: + RobBrown, Coder_TimT */ + +void GMenu2X::gp2x_misc_lcd(int on) +{ +#ifdef TARGET_GP2X + if(f200) + { + if(on) gp2x_memregs[0x1076 >> 1] |= 0x0800; else gp2x_memregs[0x1076 >> 1] &= ~0x0800; + } + else + { + if(on) gp2x_memregs[0x106E>>1] |= 4; else gp2x_memregs[0x106E>>1] &= ~4; + } +#endif +} + + +void GMenu2X::gp2x_video_RGB_setscaling(int W, int H) +{ +#ifdef TARGET_GP2X + int bpp=(gp2x_memregs[0x28DA>>1]>>9)&0x3; + + float mul = (gp2x_memregs[0x2800>>1] & 0x100 ? 512.0 : 1024.0); + + // scale horizontal + gp2x_memregs[0x2906>>1]=(unsigned short)((float)mul *(W/320.0)); + // scale vertical +// gp2x_memregs[0x2908>>1]=(unsigned long)((float)320.0*bpp *(H/240.0)); + gp2x_memregs[0x2908>>1]=(unsigned short)((float)320.0*bpp *(H/240.0)); + gp2x_memregs[0x290A>>1]=0; +#endif +} + +//senquack - pulled from Rlyeh's minlib for improved TVout: +/* Function: gp2x_tv_setmode + This function set TV out mode on or off. + + Parameters: + mode - set mode to <LCD>, <PAL> or <NTSC>. + addr - address to write data to. + + See also: + <gp2x_tv_adjust> + + Credits: + rlyeh */ + +//void GMenu2X::gp2x_tv_setmode(unsigned char mode) +//{ +//#ifdef TARGET_GP2X +// if(mode != LCD && mode != PAL && mode != NTSC) return; +// +// gp2x_tv_lastmode = mode; +// +//// if(!gp2x_dev[0]) gp2x_dev[0] = open("/dev/cx25874",O_RDWR); +// if(!cx25874) cx25874 = open("/dev/cx25874",O_RDWR); +// +// gp2x_misc_lcd(1); +// +// if(mode == LCD) +// { +// ioctl(cx25874, _IOW('v', 0x02, unsigned char), 0); +// close(cx25874); +// cx25874 = 0; +// +// return; +// } +// +// ioctl(cx25874, _IOW('v', 0x02, unsigned char), mode); +// +// //gp2x_video_RGB_setwindows(0x11,-1,-1,-1,319,239); +// gp2x_video_RGB_setscaling(320,240); +// //gp2x_video_YUV_setparts(-1,-1,-1,-1,319,239); +// gp2x_video_YUV_setscaling(0,320,240); +// gp2x_video_YUV_setscaling(1,320,240); +// gp2x_video_YUV_setscaling(2,320,240); +// gp2x_video_YUV_setscaling(3,320,240); +// +// gp2x_misc_lcd(0); +// +// if(mode == NTSC) +// { +// gp2x_tv_adjust(25, -7); +// } +// else +// { +// gp2x_tv_adjust(25, 20); +// } +// +// //senquack - experiment (this seems to allow the tv to show the whole screen instead of half +// //now, but it still flickers on the vertical axis +//// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; +//// gp2x_memregs[0x28E8>>1]=239; +// +//#endif +//} + +////senquack - pulled from Rlyeh's minlib for improved TVout: +///* Function: gp2x_tv_adjust +// This function adjusts and centers screen to TV. +// +// Parameters: +// horizontal (-50..0..35) - number of pixels to move the image horizontally. +// vertical (-15..0..45) - number of pixels to move the image vertically. +// +// Note: +// - horizontal and vertical are both signed. +// - default setting for NTSC is (16, -7) +// - default setting for PAL is (16, 19) +// +// See also: +// <gp2x_tv_setmode> +// +// Credits: +// rlyeh */ +// +//void GMenu2X::gp2x_tv_adjust(signed char horizontal, signed char vertical) +//{ +//#ifdef TARGET_GP2X +// int lines, syncs_start, syncs_end; +// +// //horizontal adjustment +//// gp2x_video_waitvsync(); +// gp2x_cx25784_write(0x8c, (unsigned char) (50 - 11 + 3 - horizontal) ); +// +// //vertical adjustment +// if(gp2x_tv_mode == PAL) +// lines = 288, syncs_start = 1, syncs_end = 24; +// else +// lines = 240, syncs_start = 1, syncs_end = 22; +// +// lines -= vertical, syncs_end += vertical; +// +//// gp2x_video_waitvsync(); +// gp2x_memregs[0x2818 >> 1] = lines - 1; +// gp2x_memregs[0x2820 >> 1] &= (0xFF00); +// gp2x_memregs[0x2820 >> 1] |= (syncs_start << 8); +// gp2x_memregs[0x2822 >> 1] &= ~(0x1FF); +// gp2x_memregs[0x2822 >> 1] |= syncs_end; // syncs_end = verBackPorch+verFontPorch - 1 +// +// if(gp2x_tv_mode == PAL) +// { +// //bottom screen image cut off (PAL 320x288 full -> PAL 320x240 centered w/ black borders) +// int real_lines = 288, +// wanted_lines = 240, +// top_spacing = (real_lines - wanted_lines) / 2, +// active_lines = wanted_lines + top_spacing; +// +//// gp2x_video_waitvsync(); +// +// active_lines += -top_spacing +5 + vertical; +// +// gp2x_cx25784_write(0x84, active_lines & 0xFF); //reduce overscan, VACTIVE_0 +// gp2x_cx25784_write(0x86, 0x26 | ((active_lines & 0x100)>>1) ); +// +// gp2x_cx25784_write(0x94, active_lines & 0xFF); //reduce overscan, VACTIVE_1 +// gp2x_cx25784_write(0x96, 0x31 | ((active_lines & 0x300)>>8) ); +// } +//#endif +//} + +//senquack - first two are originals: +//void GMenu2X::gp2x_tvout_on(bool pal) { +//#ifdef TARGET_GP2X +// if (gp2x_mem!=0) { +// /*Ioctl_Dummy_t *msg; +// int TVHandle = ioctl(SDL_videofd, FBMMSP2CTRL, msg);*/ +// if (cx25874!=0) gp2x_tvout_off(); +// //if tv-out is enabled without cx25874 open, stop +// //if (gp2x_memregs[0x2800>>1]&0x100) return; +// cx25874 = open("/dev/cx25874",O_RDWR); +// ioctl(cx25874, _IOW('v', 0x02, unsigned char), pal ? 4 : 3); +// gp2x_memregs[0x2906>>1]=512; +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; +// // senquack - trying to fix vertical flickering: +//// gp2x_memregs[0x28E8>>1]=239; +// } +//#endif +//} +// +//void GMenu2X::gp2x_tvout_off() { +//#ifdef TARGET_GP2X +// if (gp2x_mem!=0) { +// close(cx25874); +// cx25874 = 0; +// gp2x_memregs[0x2906>>1]=1024; +// } +//#endif +//} +//void GMenu2X::gp2x_tvout_on(bool pal) { +//#ifdef TARGET_GP2X +// +// SDL_GP2X_TV(1); +// SDL_GP2X_TVMode(pal ? PAL : NTSC); +//// gp2x_tv_setmode(pal ? PAL : NTSC); +// +// //relaunch GMenu2X: +//// SDL_Quit(); +//// chdir(getExePath().c_str()); +//// execlp("./gmenu2x", "./gmenu2x", NULL); +//#endif +//} +// +//void GMenu2X::gp2x_tvout_off() { +//#ifdef TARGET_GP2X +//// gp2x_tv_setmode(LCD); +// SDL_GP2X_TVMode(LCD); +// SDL_GP2X_TV(0); +// +// //relaunch GMenu2X: +//// SDL_Quit(); +//// chdir(getExePath().c_str()); +//// execlp("./gmenu2x", "./gmenu2x", NULL); +//#endif +//} void GMenu2X::gp2x_tvout_on(bool pal) { #ifdef TARGET_GP2X - if (gp2x_mem!=0) { - /*Ioctl_Dummy_t *msg; - int TVHandle = ioctl(SDL_videofd, FBMMSP2CTRL, msg);*/ - if (cx25874!=0) gp2x_tvout_off(); - //if tv-out is enabled without cx25874 open, stop - //if (gp2x_memregs[0x2800>>1]&0x100) return; - cx25874 = open("/dev/cx25874",O_RDWR); - ioctl(cx25874, _IOW('v', 0x02, unsigned char), pal ? 4 : 3); - gp2x_memregs[0x2906>>1]=512; - gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; - gp2x_memregs[0x28E8>>1]=239; + unsigned int bytes_per_pixel = (gp2x_memregs[0x28DA>>1]>>9)&0x3; + unsigned int width = 320; + unsigned int height = 240; + unsigned int pitch, phys_pitch; + + cx25874 = open("/dev/cx25874",O_RDWR); +// open special open2x device driver that doesn't reset the hardware on opening +// cx25874 = open("/dev/cx25874_open2x",o_rdwr); + if (cx25874 == -1) + { + cx25874 = 0; +#if debug + printf("error opening /dev/cx25874.\n"); +#endif + return; } + + ioctl(cx25874, _IOW('v', 0x02, unsigned char), pal ? PAL : NTSC); + + close(cx25874); + + //relaunch GMenu2X (screen is garbled until we do).. we'll tweak it after restart + gp2x_deinit(); + SDL_Quit(); + chdir(getExePath().c_str()); + execlp("./gmenu2x", "./gmenu2x", NULL); + +// gp2x_tv_mode = true; +// +// if (bytes_per_pixel == 1) +// { +// // in 8bpp mode +// printf("8bpp tweak\n"); +// pitch = phys_pitch = width; +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1] << 1; +// } else +// { +// // in 16bpp mode +// printf("16bpp tweak\n"); +// pitch = phys_pitch = width << 1; +//// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1] << 1; +// } +// +//// int w_passed = (long)(320.0 * (100.0 / (float)xscale_percent)); +//// int h_passed = (long)(240.0 * (100.0 / (float)yscale_percent)); +//// gp2x_video_RGB_setscaling( w_passed, h_passed ); +////senquack -for now ,just pass 320x240 +// gp2x_video_RGB_setscaling( 320, 240 ); +// +// gp2x_memregs[MLC_STL_HW] = phys_pitch; +// gp2x_memregs[MLC_STL_CNTL] = MLC_STL_BPP_16 | MLC_STL1ACT; +// gp2x_memregs[MLC_STL_MIXMUX] = 0; +// gp2x_memregs[MLC_STL_ALPHAL] = 255; +// gp2x_memregs[MLC_STL_ALPHAH] = 255; +// gp2x_memregs[MLC_OVLAY_CNTR] |= DISP_STL1EN; +// +// // Rlyeh's tv image centering: +// int xoffset, yoffset; +// if (pal) +// { +// cout << "pal mode" << endl; +// xoffset = confInt["tvoutXOffsetPAL"]; +// yoffset = confInt["tvoutYOffsetPAL"]; +// } else +// { +// cout << "ntsc mode" << endl; +// xoffset = confInt["tvoutXOffsetNTSC"]; +// yoffset = confInt["tvoutYOffsetNTSC"]; +// } +// +// int lines, syncs_start, syncs_end; +// +// //horizontal adjustment +// // gp2x_video_waitvsync(); +// gp2x_cx25874_write(0x8c, (unsigned char) (50 - 11 + 3 - xoffset) ); +// +// //vertical adjustment +// // if(gp2x_tv_getmode() == PAL) +// if(pal) +// lines = 288, syncs_start = 1, syncs_end = 24; +// else +// lines = 240, syncs_start = 1, syncs_end = 22; +// +// lines -= yoffset, syncs_end += yoffset; +// +// // gp2x_video_waitvsync(); +// gp2x_memregs[0x2818 >> 1] = lines - 1; +// gp2x_memregs[0x2820 >> 1] &= (0xFF00); +// gp2x_memregs[0x2820 >> 1] |= (syncs_start << 8); +// gp2x_memregs[0x2822 >> 1] &= ~(0x1FF); +// gp2x_memregs[0x2822 >> 1] |= syncs_end; // syncs_end = verBackPorch+verFontPorch - 1 +// +// if(pal) +// { +// //bottom screen image cut off (PAL 320x288 full -> PAL 320x240 centered w/ black borders) +// int real_lines = 288, +// wanted_lines = 240, +// top_spacing = (real_lines - wanted_lines) / 2, +// active_lines = wanted_lines + top_spacing; +// +// // gp2x_video_waitvsync(); +// active_lines += -top_spacing +5 + yoffset; +// +// gp2x_cx25874_write(0x84, active_lines & 0xFF); //reduce overscan, VACTIVE_0 +// gp2x_cx25874_write(0x86, 0x26 | ((active_lines & 0x100)>>1) ); +// +// gp2x_cx25874_write(0x94, active_lines & 0xFF); //reduce overscan, VACTIVE_1 +// gp2x_cx25874_write(0x96, 0x31 | ((active_lines & 0x300)>>8) ); +// } +// +// close(cx25874); +// cx25874 = 0; #endif } void GMenu2X::gp2x_tvout_off() { #ifdef TARGET_GP2X - if (gp2x_mem!=0) { + gp2x_tv_mode = false; + + if (cx25874 != 0) close(cx25874); - cx25874 = 0; - gp2x_memregs[0x2906>>1]=1024; + + cx25874 = open("/dev/cx25874",O_RDWR); + if (cx25874 != -1) + { + ioctl(cx25874, _IOW('v', 0x02, unsigned char), LCD); + gp2x_video_RGB_setscaling( 320, 240 ); + close(cx25874); + cx25874=0; } + gp2x_misc_lcd(1); // turn backlight back on + + return; #endif } +//senquack - TV out +void GMenu2X::toggleTvOut() { +#ifdef TARGET_GP2X +//senquack +// if (cx25874!=0) + if (gp2x_tv_mode) + gp2x_tvout_off(); + else + gp2x_tvout_on(confStr["tvoutEncoding"] == "PAL"); +#endif +} + +////senquack - new function to make tv out better +//void GMenu2X::tweakTvOut(bool pal) { +//#ifdef TARGET_GP2X +// if (gp2x_tv_mode == LCD) +// { +// cout << "Cannot tweak TV, not in TV mode." << endl; +// return; +// } +// +// if (gp2x_mem!=0) { +// cout << "Tweaking TV output" << endl; +// +// if (!cx25874) +// { +// cx25874 = open("/dev/cx25874",O_RDWR); +// if (cx25874 == -1) +// { +// cx25874 = 0; +// cout << "Error opening /dev/cx25874" << endl; +// return; +// } +// } +// +// unsigned int phys_width = gp2x_memregs[DPC_X_MAX] + 1; +// unsigned int phys_height = gp2x_memregs[DPC_Y_MAX] + 1; +// unsigned int phys_ilace = (gp2x_memregs[DPC_CNTL] & DPC_INTERLACE) ? 1 : 0; +// // Set up the new mode framebuffer, making sanity adjustments +// // 64 <= width <= 1024, multiples of 8 only +// //senquack - note: changing this causes the screen to be totally corrupted +// unsigned int width = 320; +// +// width = (width + 7) & 0x7f8; +// if (width < 64) width = 64; +// if (width > 1024) width = 1024; +// +// // 64 <= height <= 768 +// unsigned int height = 240; +// // senquack - adding 8 or 16 here allows the entire screen to be displayed but with cutout +// // lines +// // unsigned int height = 256; +// if (height < 64) height = 64; +// if (height > 768) height = 768; +// +// unsigned int phys_pitch; +// unsigned int pitch = phys_pitch = width * 2; +// +// // senquack-enabling this causes pixels to be doubled horizontally: +//// phys_pitch *= 2; +// +// unsigned int scale_x = (1024 * width) / phys_width; +// // and y-scale is scale * pitch +// unsigned int scale_y = (height * pitch) / phys_height; +// // xscale and yscale are set so that virtual_x * xscale = phys_x (16.16) +// unsigned int xscale = (phys_width << 16) / width; +// unsigned int yscale = (phys_height << 16) / height; +// // senquack - rgb_setscaling sets these two registers, let's try it instead +//// gp2x_memregs[MLC_STL_HSC] = scale_x; +//// gp2x_memregs[MLC_STL_VSCL] = scale_y & 0xffff; +// gp2x_video_RGB_setscaling(320, 240); +// +// gp2x_memregs[MLC_STL_VSCH] = scale_y >> 16; +// gp2x_memregs[MLC_STL_HW] = phys_pitch; +//// gp2x_memregs[MLC_STL_CNTL] = MLC_STL_BPP_16 | MLC_STL1ACT; +// +// //senquack - without this, only half the screen is shown: +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; +// +// // Rlyeh's tvadjust: +// +// // load Rlyeh's default offsets +// int horizontal, vertical; +//// if (pal) +//// { +//// horizontal = 16; vertical = 19; +//// } else +//// { +//// //senquack - on my NTSC TV, 10 is better than 16 for horizontal: +//// horizontal = 10, vertical = -7; +//// } +// if (pal) +// { +// cout << "pal mode" << endl; +// horizontal = confInt["tvoutXOffsetPAL"]; +// vertical = confInt["tvoutYOffsetPAL"]; +// } else +// { +// cout << "ntsc mode" << endl; +// horizontal = confInt["tvoutXOffsetNTSC"]; +// vertical = confInt["tvoutYOffsetNTSC"]; +// } +// cout << "tweaks: horiz= " << horizontal << " vert= " << vertical << endl; +// +// int lines, syncs_start, syncs_end; +// +// //horizontal adjustment +// // gp2x_video_waitvsync(); +// gp2x_cx25784_write(0x8c, (unsigned char) (50 - 11 + 3 - horizontal) ); +// +// //vertical adjustment +// // if(gp2x_tv_getmode() == PAL) +// if(pal) +// lines = 288, syncs_start = 1, syncs_end = 24; +// else +// lines = 240, syncs_start = 1, syncs_end = 22; +// +// lines -= vertical, syncs_end += vertical; +// +// // gp2x_video_waitvsync(); +// gp2x_memregs[0x2818 >> 1] = lines - 1; +// gp2x_memregs[0x2820 >> 1] &= (0xFF00); +// gp2x_memregs[0x2820 >> 1] |= (syncs_start << 8); +// gp2x_memregs[0x2822 >> 1] &= ~(0x1FF); +// gp2x_memregs[0x2822 >> 1] |= syncs_end; // syncs_end = verBackPorch+verFontPorch - 1 +// +// // if(gp2x_tv_getmode() == PAL) +// if(pal) +// { +// //bottom screen image cut off (PAL 320x288 full -> PAL 320x240 centered w/ black borders) +// int real_lines = 288, +// wanted_lines = 240, +// top_spacing = (real_lines - wanted_lines) / 2, +// active_lines = wanted_lines + top_spacing; +// +// // gp2x_video_waitvsync(); +// +// active_lines += -top_spacing +5 + vertical; +// +// gp2x_cx25784_write(0x84, active_lines & 0xFF); //reduce overscan, VACTIVE_0 +// gp2x_cx25784_write(0x86, 0x26 | ((active_lines & 0x100)>>1) ); +// +// gp2x_cx25784_write(0x94, active_lines & 0xFF); //reduce overscan, VACTIVE_1 +// gp2x_cx25784_write(0x96, 0x31 | ((active_lines & 0x300)>>8) ); +// } +// } +//#endif +//} +//senquack - new function to make tv out better +void GMenu2X::tweakTvOut(bool pal) { +#ifdef TARGET_GP2X + if (cx25874 != 0) + close(cx25874); + +// Every time you open this stupid device is resets itself. Must reset display mode first thing. + cx25874 = open("/dev/cx25874",O_RDWR); + if (cx25874 != -1) + { + ioctl(cx25874, _IOW('v', 0x02, unsigned char), pal ? PAL : NTSC); + } + + unsigned int bytes_per_pixel = (gp2x_memregs[0x28DA>>1]>>9)&0x3; + unsigned int width = 320; + unsigned int height = 240; + unsigned int pitch, phys_pitch; + + if (bytes_per_pixel == 1) + { + // in 8bpp mode + printf("8bpp tweak\n"); + pitch = phys_pitch = width; + // pretty sure endx should be one less than this (after messing more with tv out) +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1] << 1; + gp2x_memregs[0x28E4>>1] = (gp2x_memregs[0x290C>>1] << 1) - 1; + } else + { + // in 16bpp mode + printf("16bpp tweak\n"); + pitch = phys_pitch = width << 1; + // pretty sure endx should be one less than this (after messing more with tv out) +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; + gp2x_memregs[0x28E4>>1] = (gp2x_memregs[0x290C>>1]) - 1; + } + +// int w_passed = (long)(320.0 * (100.0 / (float)xscale_percent)); +// int h_passed = (long)(240.0 * (100.0 / (float)yscale_percent)); +// gp2x_video_RGB_setscaling( w_passed, h_passed ); +//senquack -for now ,just pass 320x240 + int xscale_percent = confInt["tvoutXScale"]; + if (xscale_percent < TV_MIN_XSCALE || xscale_percent > TV_MAX_YSCALE) + { + xscale_percent = confInt["tvoutXScale"] = 100; + } + int yscale_percent = confInt["tvoutYScale"]; + if (yscale_percent < TV_MIN_YSCALE || yscale_percent > TV_MAX_YSCALE) + { + yscale_percent = confInt["tvoutYScale"] = 100; + } + +// gp2x_video_RGB_setscaling( 320, 240 ); + int w_passed = (long)(320.0 * (100.0 / (float)xscale_percent)); + int h_passed = (long)(240.0 * (100.0 / (float)yscale_percent)); + gp2x_video_RGB_setscaling( w_passed, h_passed ); + + // Rlyeh's tv image centering: + int xoffset, yoffset; + if (pal) + { + cout << "pal mode" << endl; + xoffset = confInt["tvoutXOffsetPAL"]; + yoffset = confInt["tvoutYOffsetPAL"]; + } else + { + cout << "ntsc mode" << endl; + xoffset = confInt["tvoutXOffsetNTSC"]; + yoffset = confInt["tvoutYOffsetNTSC"]; + } + + int lines, syncs_start, syncs_end; + + //horizontal adjustment + // gp2x_video_waitvsync(); + gp2x_cx25874_write(0x8c, (unsigned char) (50 - 11 + 3 - xoffset) ); + + //vertical adjustment + // if(gp2x_tv_getmode() == PAL) + if(pal) + lines = 288, syncs_start = 1, syncs_end = 24; + else + lines = 240, syncs_start = 1, syncs_end = 22; + + lines -= yoffset, syncs_end += yoffset; + + // gp2x_video_waitvsync(); + gp2x_memregs[0x2818 >> 1] = lines - 1; + gp2x_memregs[0x2820 >> 1] &= (0xFF00); + gp2x_memregs[0x2820 >> 1] |= (syncs_start << 8); + gp2x_memregs[0x2822 >> 1] &= ~(0x1FF); + gp2x_memregs[0x2822 >> 1] |= syncs_end; // syncs_end = verBackPorch+verFontPorch - 1 + + // Changed this block to be optional and by default, off, because PAL users + // report problems with cut-off bottom image. Not completely sure if this has + // anything to do with it yet, though: +// if(pal) + if(pal && confInt["tvoutPalOverscanFix"]) + { + //bottom screen image cut off (PAL 320x288 full -> PAL 320x240 centered w/ black borders) + int real_lines = 288, + wanted_lines = 240, + top_spacing = (real_lines - wanted_lines) / 2, + active_lines = wanted_lines + top_spacing; + + // gp2x_video_waitvsync(); + active_lines += -top_spacing +5 + yoffset; + + gp2x_cx25874_write(0x84, active_lines & 0xFF); //reduce overscan, VACTIVE_0 + gp2x_cx25874_write(0x86, 0x26 | ((active_lines & 0x100)>>1) ); + + gp2x_cx25874_write(0x94, active_lines & 0xFF); //reduce overscan, VACTIVE_1 + gp2x_cx25874_write(0x96, 0x31 | ((active_lines & 0x300)>>8) ); + } + + close(cx25874); + cx25874 = 0; +} + + GMenu2X::GMenu2X(int argc, char *argv[]) { //senquack - added ability to detect Open2X fw version number // //Detect firmware version and type @@ -160,7 +874,8 @@ // } if (fileExists(OPEN2X_VERSION_FILENAME)) { fwType = "open2x"; - ifstream inf(OPEN2X_VERSION_FILENAME.c_str()); +// ifstream inf(OPEN2X_VERSION_FILENAME.c_str()); + ifstream inf(OPEN2X_VERSION_FILENAME); if (inf.is_open()) { string line; if (!inf.eof() ) @@ -183,6 +898,17 @@ f200 = true; #endif + //senquack - New functions used under Open2X. Everytime GMenu2X starts, it takes a look at all processes + // currently running. It tells the kernel all the PIDs it finds (excluding GMenu2X itself). The kernel + // keeps this list in memory when programs are run. If the user presses a specific button combo, the + // kernel will kill off all PIDs not in this whitelist and then restart GMenu2X. This is so users can + // recover from program crashes or hangs (or when a program won't let you exit!). + if (fwType == "open2x") + { + generatePidWhitelist(); + } + + confStr.set_empty_key(" "); confStr.set_deleted_key(""); confInt.set_empty_key(" "); @@ -217,16 +943,34 @@ o2x_use_autorun_on_SD = false; // Never autoexec /mnt/sd/autorun.gpu by default. o2x_SD_read_only = false; + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it will greatly interfere + // with apps like Picodrive that already know how to use USB joysticks. + o2x_gmenu2x_starts_joy2xd = true; // Is Joy2Xd enabled? + // If this is true, GMenu2X will start the joy2xd + // daemon at startup, and it will remain loaded + // during program executions and will be restarted + // every time GMenu2X reloads) If an app specifically + // disabled joy2xd in its link settings, joy2xd is + // killed before launch of the program, then restarted + // when gmenu2x comes back up, unless this bool is false. + // senquack - stick click emulation for Open2X: o2x_stick_click_mode = f200 ? OPEN2X_STICK_CLICK_DPAD : OPEN2X_STICK_CLICK_DISABLED; usbnet = samba = inet = web = false; useSelectionPng = false; + + //load config data readConfig(); if (fwType=="open2x") { + // senquack - new Open2x TV tweaking daemon should be killed when GMenu2X restarts + system("killall tv_daemon"); + readConfigOpen2x(); + // VOLUME SCALING switch(o2x_volumeMode) { case VOLUME_MODE_MUTE: setVolumeScaler(VOLUME_SCALER_MUTE); break; @@ -242,6 +986,14 @@ // senquack - UPPER MEMORY CACHING setUpperMemoryCaching(0); + + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it will greatly interfere + // with apps like Picodrive that already know how to use USB joysticks. + if (o2x_gmenu2x_starts_joy2xd) + { + activateJoy2xd(); // launch the daemon (kill off old instances first) + } } else readCommonIni(); @@ -261,15 +1013,17 @@ gp2x_init(); + //senquack //Fix tv-out - if (gp2x_mem!=0) { - if (gp2x_memregs[0x2800>>1]&0x100) { - gp2x_memregs[0x2906>>1]=512; - //gp2x_memregs[0x290C>>1]=640; - gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; - } - gp2x_memregs[0x28E8>>1]=239; - } +// if (gp2x_mem!=0) { +// if (gp2x_memregs[0x2800>>1]&0x100) { +// gp2x_memregs[0x2906>>1]=512; +//// gp2x_memregs[0x290C>>1]=640; +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; +// } +// } + //senquack - pulled from Rlyeh's minlib for improved TVout: +// gp2x_tv_lastmode = LCD; #endif //Screen @@ -286,7 +1040,34 @@ SDL_Surface *tmps = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_SWSURFACE); SDL_ShowCursor(0); s->enableVirtualDoubleBuffer(tmps); + + //senquack + //Fix tv-out +// if (gp2x_mem!=0) { +// if (gp2x_memregs[0x2800>>1]&0x100) { +// tweakTvOut(confStr["tvoutEncoding"] == "PAL"); +// } +// } + // After SDL initialization, it is necessary to tweak tv-related registers: + if (gp2x_tv_mode) + { + // TV out appears to be enabled, let's assume it is in the mode that is stored in + // GMenu2X's configuration + cx25874 = open("/dev/cx25874",O_RDWR); + if (cx25874 == -1) + { + cout << "Error opening /dev/cx25874" << endl; + cx25874 = 0; + } else + { +// senquack - tweakTvOut will do this for us: +// ioctl(cx25874, _IOW('v', 0x02, unsigned char), +// (confStr["tvoutEncoding"] == "PAL") ? PAL: NTSC); + tweakTvOut(confStr["tvoutEncoding"] == "PAL"); + } + } } +#endif #else s->raw = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_HWSURFACE|SDL_DOUBLEBUF); #endif @@ -315,7 +1096,20 @@ setInputSpeed(); initServices(); + //senquack - we now support a separate gamma setting for TV mode +#ifdef TARGET_GP2X + if (gp2x_tv_mode) + { + setGamma(confInt["tvoutGamma"]); + } + else + { + setGamma(confInt["gamma"]); + } +#else setGamma(confInt["gamma"]); +#endif + setVolume(confInt["globalVolume"]); //senquack - New option, alwaysUseFastTimings, allows us to set fast ram timings as @@ -363,11 +1157,20 @@ SDL_Quit(); #ifdef TARGET_GP2X if (gp2x_mem!=0) { - //Fix tv-out - if (gp2x_memregs[0x2800>>1]&0x100) { - gp2x_memregs[0x2906>>1]=512; - gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; - } + // senquack +// //Fix tv-out +// if (gp2x_memregs[0x2800>>1]&0x100) { +// gp2x_memregs[0x2906>>1]=512; +// gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; +// //senquack - copied this line from the other "fix tv out" section, it seemed to be +// //missing +// } + + //senquack - make sure SDL didn't change any of our tv tweaks when exiting +// if (gp2x_memregs[0x2800>>1]&0x100) { +// if (gp2x_tv_mode != LCD) { +// tweakTvOut(gp2x_tv_mode == PAL); +// } gp2x_deinit(); } #endif @@ -498,16 +1301,18 @@ menu->addActionLink(i,tr["About Open2X"],MakeDelegate(this,&GMenu2X::aboutOpen2X),tr["Info about Open2X"],"skin:icons/about.png"); menu->addActionLink(i,tr["Open2x"],MakeDelegate(this,&GMenu2X::settingsOpen2x),tr["Configure Open2x system settings"],"skin:icons/o2xconfigure.png"); menu->addActionLink(i,tr["Restore Apps"],MakeDelegate(this,&GMenu2X::restoreO2XAppSection),tr["Restore Open2X application section's links to defaults"],"skin:icons/o2xconfigure.png"); - menu->addActionLink(i,tr["Unmount SD"],MakeDelegate(this,&GMenu2X::unmountSD),tr["Safely unmount SD card before removal (hotbutton: X)"],"skin:icons/explorer.png"); } menu->addActionLink(i,tr["Skin"],MakeDelegate(this,&GMenu2X::skinMenu),tr["Configure skin"],"skin:icons/skin.png"); menu->addActionLink(i,tr["Wallpaper"],MakeDelegate(this,&GMenu2X::changeWallpaper),tr["Change GMenu2X wallpaper"],"skin:icons/wallpaper.png"); #ifdef TARGET_GP2X menu->addActionLink(i,"TV",MakeDelegate(this,&GMenu2X::toggleTvOut),tr["Activate/deactivate tv-out"],"skin:icons/tv.png"); - menu->addActionLink(i,"USB Sd",MakeDelegate(this,&GMenu2X::activateSdUsb),tr["Activate Usb on SD"],"skin:icons/usb.png"); + //senquack if (fwType=="gph" && !f200) + { menu->addActionLink(i,"USB Nand",MakeDelegate(this,&GMenu2X::activateNandUsb),tr["Activate Usb on Nand"],"skin:icons/usb.png"); + menu->addActionLink(i,"USB Sd",MakeDelegate(this,&GMenu2X::activateSdUsb),tr["Activate Usb on SD"],"skin:icons/usb.png"); //menu->addActionLink(i,"USB Root",MakeDelegate(this,&GMenu2X::activateRootUsb),tr["Activate Usb on the root of the Gp2x Filesystem"],"skin:icons/usb.png"); + } #endif if (fileExists(path+"log.txt")) menu->addActionLink(i,tr["Log Viewer"],MakeDelegate(this,&GMenu2X::viewLog),tr["Displays last launched program's output"],"skin:icons/ebook.png"); @@ -581,19 +1386,21 @@ split(text,"Open2X was made possible by:\n\ ----\n\ -Alex\n\ Coder\n\ DJWillis\n\ Jycet\n\ Lithosphere\n\ Mindless\n\ Orkie\n\ -Paeryn\n\ PokeParadox\n\ Ryo\n\ Senor Quack\n\ Wejp\n\ \n\ +Open2X boot graphic made by Alex\n\ +Gamepad icon for joy2xd made by Gort\n\ +Credit for much hardware info to Rlyeh and Squidge\n\ +Credit for HW-accelerated SDL to Paeryn\n\ (If you are missing from this list, please contact us in #open2x on freenode)","\n"); TextDialog td(this, "Open2X", tr.translate("Version $1 (Build date: $2)",fwVersion.c_str(),__DATE__,NULL), "icons/about.png", &text); td.exec(); @@ -664,6 +1471,22 @@ evalIntConf( &confInt["showServices"], 0, 0, 1 ); evalIntConf( &confInt["alwaysUseFastTimings"], 0, 0, 1 ); + //senquack - added adjustable TV-out offsets for proper centering and + // adjustable scaling: + // These value ranges and defaults were taken from Rlyeh's minlib: +// horizontal (-50..0..35) - number of pixels to move the image horizontally. +// vertical (-15..0..45) - number of pixels to move the image vertically. +// - default setting for NTSC is (16, -7) +// - default setting for PAL is (16, 19) +// NOTE: on my NTSC TV, I found 10 to be better than 16 for the X offset + evalIntConf( &confInt["tvoutXOffsetNTSC"], 10, TV_MIN_XOFFSET, TV_MAX_XOFFSET); + evalIntConf( &confInt["tvoutYOffsetNTSC"], -7, TV_MIN_YOFFSET, TV_MAX_YOFFSET); + evalIntConf( &confInt["tvoutXOffsetPAL"], 16, TV_MIN_XOFFSET, TV_MAX_XOFFSET); + evalIntConf( &confInt["tvoutYOffsetPAL"], 19, TV_MIN_YOFFSET, TV_MAX_YOFFSET); + evalIntConf( &confInt["tvoutXScale"], 100, TV_MIN_XSCALE, TV_MAX_XSCALE); + evalIntConf( &confInt["tvoutYScale"], 100, TV_MIN_YSCALE, TV_MAX_YSCALE); + evalIntConf( &confInt["tvoutGamma"], 1, 1,100 ); + evalIntConf( &confInt["tvoutPalOverscanFix"], 0, 0, 1 ); if (confStr["tvoutEncoding"] != "PAL") confStr["tvoutEncoding"] = "NTSC"; resX = constrain( confInt["resolutionX"], 320,1920 ); resY = constrain( confInt["resolutionY"], 240,1200 ); @@ -704,7 +1527,11 @@ else if (name=="USB_NET_IP") o2x_usb_net_ip = value; else if (name=="TELNET_ON_BOOT") o2x_telnet_on_boot = value == "y" ? true : false; else if (name=="FTP_ON_BOOT") o2x_ftp_on_boot = value == "y" ? true : false; - else if (name=="GP2XJOY_ON_BOOT") o2x_gp2xjoy_on_boot = value == "y" ? true : false; +// else if (name=="GP2XJOY_ON_BOOT") o2x_gp2xjoy_on_boot = value == "y" ? true : false; + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it will greatly interfere + // with apps like Picodrive that already know how to use USB joysticks. + else if (name=="GMENU2X_STARTS_JOY2XD") o2x_gmenu2x_starts_joy2xd = value == "y" ? true : false; else if (name=="USB_HOST_ON_BOOT") o2x_usb_host_on_boot = value == "y" ? true : false; else if (name=="USB_HID_ON_BOOT") o2x_usb_hid_on_boot = value == "y" ? true : false; else if (name=="USB_STORAGE_ON_BOOT") o2x_usb_storage_on_boot = value == "y" ? true : false; @@ -732,7 +1559,12 @@ inf << "USB_NET_IP=" << o2x_usb_net_ip << endl; inf << "TELNET_ON_BOOT=" << ( o2x_telnet_on_boot ? "y" : "n" ) << endl; inf << "FTP_ON_BOOT=" << ( o2x_ftp_on_boot ? "y" : "n" ) << endl; - inf << "GP2XJOY_ON_BOOT=" << ( o2x_gp2xjoy_on_boot ? "y" : "n" ) << endl; +// inf << "GP2XJOY_ON_BOOT=" << ( o2x_gp2xjoy_on_boot ? "y" : "n" ) << endl; + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it can interfere + // with apps specific apps that already know how to use USB joysticks. + // (Sometimes they're fine even then) + inf << "GMENU2X_STARTS_JOY2XD=" << ( o2x_gmenu2x_starts_joy2xd ? "y" : "n" ) << endl; inf << "USB_HOST_ON_BOOT=" << ( (o2x_usb_host_on_boot || o2x_usb_hid_on_boot || o2x_usb_storage_on_boot) ? "y" : "n" ) << endl; inf << "USB_HID_ON_BOOT=" << ( o2x_usb_hid_on_boot ? "y" : "n" ) << endl; inf << "USB_STORAGE_ON_BOOT=" << ( o2x_usb_storage_on_boot ? "y" : "n" ) << endl; @@ -1300,6 +2132,16 @@ //senquack - new option to always use fast RAM timings bool alwaysUseFastTimings = confInt["alwaysUseFastTimings"]; + //senquack - added adjustable TV-out offsets for proper centering: + int tvoutXOffsetNTSC = confInt["tvoutXOffsetNTSC"]; + int tvoutYOffsetNTSC = confInt["tvoutYOffsetNTSC"]; + int tvoutXOffsetPAL = confInt["tvoutXOffsetPAL"]; + int tvoutYOffsetPAL = confInt["tvoutYOffsetPAL"]; + int tvoutXScale = confInt["tvoutXScale"]; + int tvoutYScale = confInt["tvoutYScale"]; + int tvoutGamma = confInt["tvoutGamma"]; + int tvoutPalOverscanFix = confInt["tvoutPalOverscanFix"]; + FileLister fl_tr("translations"); fl_tr.browse(); fl_tr.files.insert(fl_tr.files.begin(),"English"); @@ -1319,7 +2161,25 @@ //G sd.addSetting(new MenuSettingInt(this,tr["Gamma"],tr["Set gp2x gamma value (default: 10)"],&confInt["gamma"],1,100)); sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings)); + + //senquack - added adjustable TV-out offsets for proper centering: + // These value ranges and defaults were taken from Rlyeh's minlib: +// horizontal (-50..0..35) - number of pixels to move the image horizontally. +// vertical (-15..0..45) - number of pixels to move the image vertically. +// - default setting for NTSC is (16, -7) +// - default setting for PAL is (16, 19) +// NOTE: on my NTSC TV, I found 10 to be better than 16 for the X offset + sd.addSetting(new MenuSettingInt(this,tr["TV X Offset (NTSC)"],tr["NTSC TV image offset left/right (default: 10)"],&confInt["tvoutXOffsetNTSC"],TV_MIN_XOFFSET,TV_MAX_XOFFSET)); + sd.addSetting(new MenuSettingInt(this,tr["TV Y Offset (NTSC)"],tr["NTSC TV image offset up/down (default: -7)"],&confInt["tvoutYOffsetNTSC"],TV_MIN_YOFFSET,TV_MAX_YOFFSET)); + sd.addSetting(new MenuSettingInt(this,tr["TV X Offset (PAL)"],tr["PAL TV image offset left/right (default: 16)"],&confInt["tvoutXOffsetPAL"],TV_MIN_XOFFSET,TV_MAX_XOFFSET)); + sd.addSetting(new MenuSettingInt(this,tr["TV Y Offset (PAL)"],tr["PAL TV image offset up/down (default: 19)"],&confInt["tvoutYOffsetPAL"],TV_MIN_YOFFSET,TV_MAX_YOFFSET)); + sd.addSetting(new MenuSettingInt(this,tr["TV X Scaling %"],tr["TV image horizontal stretch/shrink (default: 100%)"],&confInt["tvoutXScale"],TV_MIN_XSCALE,TV_MAX_XSCALE)); + sd.addSetting(new MenuSettingInt(this,tr["TV Y Scaling %"],tr["TV image vertical stretch/shrink (default: 100%)"],&confInt["tvoutYScale"],TV_MIN_YSCALE,TV_MAX_YSCALE)); + sd.addSetting(new MenuSettingInt(this,tr["TV Gamma"],tr["Set gp2x tv-out gamma value (default: 8)"],&confInt["tvoutGamma"],1,100)); + sd.addSetting(new MenuSettingBool(this,tr["TV PAL Overscan Fix"],tr["Enable Rlyeh's PAL-mode tweak (untested)"],&confInt["tvoutPalOverscanFix"])); + sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder)); + //senquack - added new option to always use fast RAM timings: sd.addSetting(new MenuSettingBool(this,tr["RAM timings always fast"],tr["Always use fast RAM timings (overrides link settings)"],&confInt["alwaysUseFastTimings"])); //senquack - added optional display of uptime : @@ -1328,9 +2188,15 @@ if (fwType != "open2x") sd.addSetting(new MenuSettingBool(this,tr["Show services"],tr["Show services icons in status bar"],&confInt["showServices"])); + if (sd.exec() && sd.edited()) { //G + //senquack - tv now has a separate gamma setting: +#ifdef TARGET_GP2X + if (prevgamma != confInt["gamma"] && !gp2x_tv_mode) setGamma(confInt["gamma"]); +#else if (prevgamma != confInt["gamma"]) setGamma(confInt["gamma"]); +#endif if (curMenuClock!=confInt["menuClock"]) setClock(confInt["menuClock"]); if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]); if (lang == "English") lang = ""; @@ -1356,17 +2222,40 @@ applyDefaultTimings(); } } +#ifdef TARGET_GP2X + if ( gp2x_tv_mode && + ( tvoutXOffsetNTSC != confInt["tvoutXOffsetNTSC"] || + tvoutYOffsetNTSC != confInt["tvoutYOffsetNTSC"] || + tvoutXOffsetPAL != confInt["tvoutXOffsetPAL"] || + tvoutYOffsetPAL != confInt["tvoutYOffsetPAL"] || + tvoutXScale != confInt["tvoutXScale"] || + tvoutYScale != confInt["tvoutYScale"] || + tvoutYScale != confInt["tvoutGamma"] || + tvoutPalOverscanFix != confInt["tvoutPalOverscanFix"] )) + { + // User altered some tvout settings, apply immediately if in tv mode + tweakTvOut(confStr["tvoutEncoding"] == "PAL"); + setGamma(confInt["tvoutGamma"]); + } +#endif + writeConfig(); } } void GMenu2X::settingsOpen2x() { + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it will greatly interfere + // with apps like Picodrive that already know how to use USB joysticks. + int gmenu2x_starts_joy2xd = o2x_gmenu2x_starts_joy2xd; + SettingsDialog sd(this,tr["Open2x Settings"]); sd.addSetting(new MenuSettingBool(this,tr["USB net on boot"],tr["Allow USB networking to be started at boot time"],&o2x_usb_net_on_boot)); sd.addSetting(new MenuSettingString(this,tr["USB net IP"],tr["IP address to be used for USB networking"],&o2x_usb_net_ip)); sd.addSetting(new MenuSettingBool(this,tr["Telnet on boot"],tr["Allow telnet to be started at boot time"],&o2x_telnet_on_boot)); sd.addSetting(new MenuSettingBool(this,tr["FTP on boot"],tr["Allow FTP to be started at boot time"],&o2x_ftp_on_boot)); - sd.addSetting(new MenuSettingBool(this,tr["GP2XJOY on boot"],tr["Create a js0 device for GP2X controls"],&o2x_gp2xjoy_on_boot)); + sd.addSetting(new MenuSettingBool(this,tr["Joy2xd USB->GP2X control"],tr["Enable daemon allowing control of GP2X from USB gamepads"],&o2x_gmenu2x_starts_joy2xd)); +// sd.addSetting(new MenuSettingBool(this,tr["GP2XJOY on boot"],tr["Create a js0 device for GP2X controls"],&o2x_gp2xjoy_on_boot)); sd.addSetting(new MenuSettingBool(this,tr["USB host on boot"],tr["Allow USB host to be started at boot time"],&o2x_usb_host_on_boot)); sd.addSetting(new MenuSettingBool(this,tr["USB HID on boot"],tr["Allow USB HID to be started at boot time"],&o2x_usb_hid_on_boot)); sd.addSetting(new MenuSettingBool(this,tr["USB storage on boot"],tr["Allow USB storage to be started at boot time"],&o2x_usb_storage_on_boot)); @@ -1393,6 +2282,16 @@ setVolume(confInt["globalVolume"]); // senquack - STICK CLICK EMULATION: setStickClickEmulation(o2x_stick_click_mode); + // senquack - USB joystick -> GP2X control daemon: + if (gmenu2x_starts_joy2xd != o2x_gmenu2x_starts_joy2xd) + { + if (o2x_gmenu2x_starts_joy2xd) + { + activateJoy2xd(); + } else { + deactivateJoy2xd(); + } + } } } @@ -1421,14 +2320,6 @@ } } -void GMenu2X::toggleTvOut() { -#ifdef TARGET_GP2X - if (cx25874!=0) - gp2x_tvout_off(); - else - gp2x_tvout_on(confStr["tvoutEncoding"] == "PAL"); -#endif -} void GMenu2X::setSkin(string skin, bool setWallpaper) { confStr["skin"] = skin; @@ -1549,6 +2440,31 @@ } } +void GMenu2X::activateJoy2xd() { +#ifdef TARGET_GP2X + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. + if (fwType == "open2x") { +// string cmdline = "/etc/init.d/Ojoy2xd start"; + // very important this is not start, only should be called with start + // on first startup from the init scripts. + string cmdline = "/etc/init.d/Ojoy2xd restart"; + system(cmdline.c_str()); + } +#endif +} + +void GMenu2X::deactivateJoy2xd() { +#ifdef TARGET_GP2X + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. + if (fwType == "open2x") { + string cmdline = "/etc/init.d/Ojoy2xd stop"; + system(cmdline.c_str()); + } +#endif +} + //senquack - new action allows safe SD removal (removal of SDs with EXT filesystems // causes problems without explicitly unmounting the FS first.) void GMenu2X::unmountSD() { @@ -1780,13 +2696,54 @@ //G int linkGamma = menu->selLinkApp()->gamma(); - //senquack - new open2x gpio remapping support: + //senquack - new open2x /dev/gpio (SDL) button remapping support: int link_o2x_gpio_mapping[19]; bool link_o2x_gpio_remapping = false; // senquack - new Open2X support for configurable caching of upper memory so mmuhack.o is // no longer necessary: - bool link_o2x_upper_memory_cached = false; + bool link_o2x_upper_memory_cached; + //senquack - new Open2X support for TV tweaking daemon: + bool link_o2x_tv_daemon_enabled; + // Tweak YUV layer? + bool link_o2x_tv_daemon_tweak_yuv; + // Hit scaling registers? + bool link_o2x_tv_daemon_scaling_tweak; + int link_o2x_tv_daemon_xoffset; + int link_o2x_tv_daemon_yoffset; + int link_o2x_tv_daemon_xscale; + int link_o2x_tv_daemon_yscale; + int link_o2x_tv_daemon_vxscale; + int link_o2x_tv_daemon_vyscale; + // Delay before first tweaking: + int link_o2x_tv_daemon_first_delay; + // Delay inbetween subsequent tweaks: + int link_o2x_tv_daemon_delay; + // Tweak just once after pausing for the delay above and terminate? + bool link_o2x_tv_daemon_tweak_only_once; +// // Needed for some things like gngeo: +// bool link_o2x_tv_daemon_force_720_pitch; + // Not normally needed, since tv mode should already be enabled: + bool link_o2x_tv_daemon_enable_tv_mode; + // DEPRECATED: +// // Special fix for some games that used a buggy SDL, like Tilematch and some +// // of Ruckage's earlier games: +// bool link_o2x_tv_daemon_stubborn_fix; + // Rage2X segfaults when started in TVout mode, but will allow you to + // turn TV mode on from inside it. This option lets you launch the tv tweaker + // even when TV mode isn't enabled (it actually works) + bool link_o2x_tv_daemon_always_started; + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it will greatly interfere + // with apps like Picodrive that already know how to use USB joysticks. + bool link_o2x_link_uses_joy2xd; + // When this is true, a hack is implemented that presents a dummy js0 + // joystick to all applications, and the first USB joystick is thus + // not seen at all by any apps. This is very useful for some apps like + // PocketSNES that don't have very flexible button remapping and won't + // let player 2 use the second joystick otherwise. + bool link_o2x_joy2xd_hides_js0; + if (fwType == "open2x") { link_o2x_gpio_remapping = menu->selLinkApp()->getGpioRemappingStatus(); @@ -1797,6 +2754,27 @@ } link_o2x_upper_memory_cached = menu->selLinkApp()->getUpperMemoryCachingStatus(); + + link_o2x_tv_daemon_enabled = menu->selLinkApp()->getTVDaemonStatus(); + link_o2x_tv_daemon_tweak_yuv = menu->selLinkApp()->getTVDaemonTweakYuv(); + link_o2x_tv_daemon_scaling_tweak = menu->selLinkApp()->getTVDaemonScalingTweak(); + link_o2x_tv_daemon_xoffset = menu->selLinkApp()->getTVDaemonXOffset(); + link_o2x_tv_daemon_yoffset = menu->selLinkApp()->getTVDaemonYOffset(); + link_o2x_tv_daemon_xscale = menu->selLinkApp()->getTVDaemonXScale(); + link_o2x_tv_daemon_yscale = menu->selLinkApp()->getTVDaemonYScale(); + link_o2x_tv_daemon_vxscale = menu->selLinkApp()->getTVDaemonVXScale(); + link_o2x_tv_daemon_vyscale = menu->selLinkApp()->getTVDaemonVYScale(); + link_o2x_tv_daemon_delay = menu->selLinkApp()->getTVDaemonDelay(); + link_o2x_tv_daemon_first_delay = menu->selLinkApp()->getTVDaemonFirstDelay(); + link_o2x_tv_daemon_tweak_only_once = menu->selLinkApp()->getTVDaemonTweakOnlyOnce(); +// link_o2x_tv_daemon_force_720_pitch = menu->selLinkApp()->getTVDaemonForce720Pitch(); + link_o2x_tv_daemon_enable_tv_mode = menu->selLinkApp()->getTVDaemonEnableTVMode(); + // Deprecated: +// link_o2x_tv_daemon_stubborn_fix = menu->selLinkApp()->getTVDaemonStubbornFix(); + link_o2x_tv_daemon_always_started = menu->selLinkApp()->getTVDaemonAlwaysStarted(); + + link_o2x_link_uses_joy2xd = menu->selLinkApp()->getJoy2xdStatus(); + link_o2x_joy2xd_hides_js0 = menu->selLinkApp()->getJoy2xdHidesJs0(); } string diagTitle = tr.translate("Edit link: $1",linkTitle.c_str(),NULL); @@ -1810,7 +2788,11 @@ sd.addSetting(new MenuSettingFile(this,tr["Manual"],tr["Select a graphic/textual manual or a readme"],&linkManual,".man.png,.txt")); sd.addSetting(new MenuSettingInt(this,tr["Clock (default: 200)"],tr["Cpu clock frequency to set when launching this link"],&linkClock,50,confInt["maxClock"])); sd.addSetting(new MenuSettingBool(this,tr["Tweak RAM Timings"],tr["This usually speeds up the application at the cost of stability"],&linkUseRamTimings)); - sd.addSetting(new MenuSettingInt(this,tr["Volume (default: -1)"],tr["Volume to set for this link"],&linkVolume,-1,100)); + // senquack - default volume is now 67 (that has always been the GP2X's default) and the + // volume always gets set before launching a link now (so that one program cannot affect + // another's volume) +// sd.addSetting(new MenuSettingInt(this,tr["Volume (default: -1)"],tr["Volume to set for this link"],&linkVolume,-1,100)); + sd.addSetting(new MenuSettingInt(this,tr["Volume (default: 67)"],tr["Volume to set for this link"],&linkVolume,-1,100)); sd.addSetting(new MenuSettingString(this,tr["Parameters"],tr["Parameters to pass to the application"],&linkParams, diagTitle,diagIcon)); sd.addSetting(new MenuSettingDir(this,tr["Selector Directory"],tr["Directory to scan for the selector"],&linkSelDir)); sd.addSetting(new MenuSettingBool(this,tr["Selector Browser"],tr["Allow the selector to change directory"],&linkSelBrowser)); @@ -1822,11 +2804,28 @@ sd.addSetting(new MenuSettingBool(this,tr["Wrapper"],tr["Explicitly relaunch GMenu2X after this link's execution ends"],&menu->selLinkApp()->wrapper)); sd.addSetting(new MenuSettingBool(this,tr["Don't Leave"],tr["Don't quit GMenu2X when launching this link"],&menu->selLinkApp()->dontleave)); - //senquack - new open2x gpio remapping support: + //senquack - new open2x gpio remapping support, upper memory caching support, TV daemon support: if (fwType == "open2x") { - sd.addSetting(new MenuSettingBool(this,tr["Cache upper memory"],tr["(Replaces mmuhack - can cause incompatibility)"], &link_o2x_upper_memory_cached)); - sd.addSetting(new MenuSettingBool(this,tr["Open2X Control Remapping"],tr["Enable remapping of controls reported to SDL games"], &link_o2x_gpio_remapping)); + sd.addSetting(new MenuSettingBool(this,tr["Cache upper memory"],tr["Force full MMUhack - unnecessary and can cause glitches"], &link_o2x_upper_memory_cached)); + sd.addSetting(new MenuSettingBool(this,tr["TV Tweaker Daemon"],tr["Runs in background when TV mode is enabled"], &link_o2x_tv_daemon_enabled)); + sd.addSetting(new MenuSettingBool(this,tr["TV YUV Tweaked"],tr["Only useful for video and very rare apps like LemonBoy2X"], &link_o2x_tv_daemon_tweak_yuv)); + sd.addSetting(new MenuSettingBool(this,tr["TV Scaling Tweak"],tr["Known to be incompatible with LemonBoy2X"], &link_o2x_tv_daemon_scaling_tweak)); + sd.addSetting(new MenuSettingInt(this,tr["TV X Offset"],tr["Defaults - NTSC: 10 PAL: 10"],&link_o2x_tv_daemon_xoffset,TV_MIN_XOFFSET,TV_MAX_XOFFSET)); + sd.addSetting(new MenuSettingInt(this,tr["TV Y Offset"],tr["Defaults - NTSC: -7 PAL: 19"],&link_o2x_tv_daemon_yoffset,TV_MIN_YOFFSET,TV_MAX_YOFFSET)); + sd.addSetting(new MenuSettingInt(this,tr["TV X Scaling %"],tr["TV image horizontal stretch/shrink (default: 100%)"],&link_o2x_tv_daemon_xscale,TV_MIN_XSCALE,TV_MAX_XSCALE)); + sd.addSetting(new MenuSettingInt(this,tr["TV Y Scaling %"],tr["TV image vertical stretch/shrink (default: 100%)"],&link_o2x_tv_daemon_yscale,TV_MIN_YSCALE,TV_MAX_YSCALE)); + sd.addSetting(new MenuSettingInt(this,tr["TV YUV X Scaling %"],tr["YUV image horizontal stretch/shrink (default: 100%)"],&link_o2x_tv_daemon_vxscale,TV_MIN_VXSCALE,TV_MAX_VXSCALE)); + sd.addSetting(new MenuSettingInt(this,tr["TV YUV Y Scaling %"],tr["YUV image vertical stretch/shrink (default: 100%)"],&link_o2x_tv_daemon_vyscale,TV_MIN_VYSCALE,TV_MAX_VYSCALE)); + sd.addSetting(new MenuSettingInt(this,tr["TV First Tweak Delay"],tr["Seconds to wait before the first tweaking (default: 4)"],&link_o2x_tv_daemon_first_delay,TV_DAEMON_MIN_FIRST_DELAY,TV_DAEMON_MAX_FIRST_DELAY)); + sd.addSetting(new MenuSettingInt(this,tr["TV Tweaking Delay"],tr["Seconds to wait inbetween maintenance tweaks (default: 1)"],&link_o2x_tv_daemon_delay,TV_DAEMON_MIN_DELAY,TV_DAEMON_MAX_DELAY)); + sd.addSetting(new MenuSettingBool(this,tr["TV Tweaked Only Once "],tr["Daemon waits, tweaks only once, and terminates"], &link_o2x_tv_daemon_tweak_only_once)); + // Deprecated: +// sd.addSetting(new MenuSettingBool(this,tr["TV Forced to 720 Pitch"],tr["Try this if screen is garbled on apps like gngeo."], &link_o2x_tv_daemon_force_720_pitch)); +// sd.addSetting(new MenuSettingBool(this,tr["TV Fixed Stubbornly"],tr["Try this if screen is garbled or interlaced"], &link_o2x_tv_daemon_stubborn_fix)); + sd.addSetting(new MenuSettingBool(this,tr["TV Daemon Always Started"],tr["Always launch even when in LCD mode (Useful for Rage2X)"], &link_o2x_tv_daemon_always_started)); + sd.addSetting(new MenuSettingBool(this,tr["TV Mode Forced On"],tr["Daemon waits, forces TV mode on, and then tweaks"], &link_o2x_tv_daemon_enable_tv_mode)); + sd.addSetting(new MenuSettingBool(this,tr["SDL Control Remapping"],tr["Works for all SDL games and others that read /dev/GPIO"], &link_o2x_gpio_remapping)); sd.addSetting(new MenuSettingInt(this,tr["Button 0 (Up)"],tr["Remap button 0 (Up)"],&(link_o2x_gpio_mapping[0]),0,18)); sd.addSetting(new MenuSettingInt(this,tr["Button 1 (UpLeft)"],tr["Remap button 1 (UpLeft)"],&(link_o2x_gpio_mapping[1]),0,18)); sd.addSetting(new MenuSettingInt(this,tr["Button 2 (Left)"],tr["Remap button 2 (Left)"],&(link_o2x_gpio_mapping[2]),0,18)); @@ -1846,6 +2845,8 @@ sd.addSetting(new MenuSettingInt(this,tr["Button 16 (Vol+)"],tr["Remap button 16 (Vol+)"],&(link_o2x_gpio_mapping[16]),0,18)); sd.addSetting(new MenuSettingInt(this,tr["Button 17 (Vol-)"],tr["Remap button 17 (Vol-)"],&(link_o2x_gpio_mapping[17]),0,18)); sd.addSetting(new MenuSettingInt(this,tr["Button 18 (Click)"],tr["Remap button 18 (Stick Click)"],&(link_o2x_gpio_mapping[18]),0,18)); + sd.addSetting(new MenuSettingBool(this,tr["Joy2xd USB->GP2X control"],tr["Control GP2X buttons with USB Joy 0"], &link_o2x_link_uses_joy2xd)); + sd.addSetting(new MenuSettingBool(this,tr["Joy2xd hides Joy 0"],tr["No events reported from js0 (default: on)"], &link_o2x_joy2xd_hides_js0)); } if (sd.exec() && sd.edited()) { @@ -1880,6 +2881,30 @@ // senquack - new Open2X support for configurable caching of upper memory so mmuhack.o is // no longer necessary: menu->selLinkApp()->setUpperMemoryCachingStatus(link_o2x_upper_memory_cached); + //senquack - new support for TV tweaking daemon: + menu->selLinkApp()->setTVDaemonStatus(link_o2x_tv_daemon_enabled); + menu->selLinkApp()->setTVDaemonTweakYuv(link_o2x_tv_daemon_tweak_yuv); + menu->selLinkApp()->setTVDaemonScalingTweak(link_o2x_tv_daemon_scaling_tweak); + menu->selLinkApp()->setTVDaemonXOffset(link_o2x_tv_daemon_xoffset); + menu->selLinkApp()->setTVDaemonYOffset(link_o2x_tv_daemon_yoffset); + menu->selLinkApp()->setTVDaemonXScale(link_o2x_tv_daemon_xscale); + menu->selLinkApp()->setTVDaemonYScale(link_o2x_tv_daemon_yscale); + menu->selLinkApp()->setTVDaemonVXScale(link_o2x_tv_daemon_vxscale); + menu->selLinkApp()->setTVDaemonVYScale(link_o2x_tv_daemon_vyscale); + menu->selLinkApp()->setTVDaemonDelay(link_o2x_tv_daemon_first_delay); + menu->selLinkApp()->setTVDaemonDelay(link_o2x_tv_daemon_delay); + menu->selLinkApp()->setTVDaemonTweakOnlyOnce(link_o2x_tv_daemon_tweak_only_once); + // Deprecated: +// menu->selLinkApp()->setTVDaemonForce720Pitch(link_o2x_tv_daemon_force_720_pitch); +// menu->selLinkApp()->setTVDaemonStubbornFix(link_o2x_tv_daemon_stubborn_fix); + menu->selLinkApp()->setTVDaemonAlwaysStarted(link_o2x_tv_daemon_always_started); + menu->selLinkApp()->setTVDaemonEnableTVMode(link_o2x_tv_daemon_enable_tv_mode); + + // senquack - new Open2X joy2xd daemon allows control of all GP2X buttons from + // a USB gamepad. It should be configurable because it will greatly interfere + // with apps like Picodrive that already know how to use USB joysticks. + menu->selLinkApp()->setJoy2xdStatus(link_o2x_link_uses_joy2xd); + menu->selLinkApp()->setJoy2xdHidesJs0(link_o2x_joy2xd_hides_js0); } #ifdef DEBUG @@ -2411,6 +3436,73 @@ close(gpioDev); } +//senquack - New functions used under Open2X. Everytime GMenu2X starts, it takes a look at all processes +// currently running. It tells the kernel all the PIDs it finds (excluding GMenu2X itself). The kernel +// keeps this list in memory when programs are run. If the user presses a specific button combo, the +// kernel will kill off all PIDs not in this whitelist and then restart GMenu2X. This is so users can +// recover from program crashes or hangs (or when a program won't let you exit!). +void GMenu2X::clearPidWhitelist(void) { + int gpioDev = open("/dev/GPIO", O_WRONLY); + if (gpioDev == -1) + return; + + ioctl(gpioDev, GP2X_WHITELIST_CLEAR, 0); + close(gpioDev); +} + +void GMenu2X::addPidToWhitelist(int pid) { + int gpioDev = open("/dev/GPIO", O_WRONLY); + if (gpioDev == -1) + return; + + ioctl(gpioDev, GP2X_WHITELIST_ADD, &pid); + close(gpioDev); +} + +void GMenu2X::generatePidWhitelist(void) +{ + clearPidWhitelist(); + + char buf[8192], buf2[8192]; + FILE *f; + int pid; + + // Get the output of the ps command as a file + f = popen("ps -w", "r"); + + if (f) + { + if (!feof(f)) + { + // skip empty lines + fscanf(f, "%8192[\n\r]", buf); + // read first line and discard it (it is just column descriptors) + fscanf(f, "%8192[^\n^\r]", buf); + // chomp endline + fscanf(f, "%8192[\n\r]", buf); + + // read remaining lines + while (!feof(f)) + { +// // skip empty lines, chomp any endlines +// fscanf(f, "%8192[\n\r]", buf); + fscanf(f, "%8192[^\n^\r]", buf); +// cout << "Processing line: " << endl << buf << endl; + // add all PIDs listed to the whitelist, but exclude gmenu... [truncated message content] |
From: <sen...@us...> - 2009-03-31 22:26:33
|
Revision: 370 http://open2x.svn.sourceforge.net/open2x/?rev=370&view=rev Author: senquack Date: 2009-03-31 22:26:22 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Joy2xd support, TV tweaker support, mmuhack cleanup, sound volume levels fix (again) Modified Paths: -------------- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config trunk/kernel/linux-open2x-2.4.26_FW2-3/Makefile trunk/kernel/linux-open2x-2.4.26_FW2-3/arch/arm/config.in trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/Makefile trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/joystick/Config.in trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/joystick/Makefile trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/input/input.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/media/video/Config.in trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/media/video/Makefile trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/media/video/mmsp2_cx25874.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/sound/ac97_codec.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/usb/hub.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/video/fbprogress.c trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h trunk/kernel/linux-open2x-2.4.26_FW2-3/include/linux/miscdevice.h trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sched.c trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c Added Paths: ----------- trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f100.latest trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f200.latest trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/joystick/dummyjoy.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/gp2x/Makefile trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/gp2x/mmuhack.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/gp2x/mmuhack.o trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/media/video/mmsp2_cx25874_open2x.c Removed Paths: ------------- trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/gp2x/mmuhack/ Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/.config =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config 2009-02-28 22:36:14 UTC (rev 369) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/.config 2009-03-31 22:26:22 UTC (rev 370) @@ -135,12 +135,13 @@ # CONFIG_MACH_MMSP2_DTK3 is not set CONFIG_MACH_MMSP2_DTK4=y CONFIG_MACH_GP2X=y -# CONFIG_MACH_GP2XF200 is not set +CONFIG_MACH_GP2XF200=y # CONFIG_MACH_GP2X_DEBUG is not set # CONFIG_MACH_GP2X_SVIDEO_NTSC is not set # CONFIG_MACH_GP2X_SVIDEO_PAL is not set CONFIG_MMSP2_USBDEV=m -CONFIG_MMSP2_USBDEV_NETLINK=m +# CONFIG_MMSP2_USBDEV_NETLINK is not set +CONFIG_GP2X_MMUHACK=m # CONFIG_ARCH_ACORN is not set # CONFIG_PLD is not set # CONFIG_FOOTBRIDGE is not set @@ -200,7 +201,7 @@ # CONFIG_BINFMT_MISC is not set # CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/mtdblock3 rw" +CONFIG_CMDLINE="root=/dev/mmcsd/disc0/part1 rw" CONFIG_ALIGNMENT_TRAP=y # @@ -413,9 +414,62 @@ # # SCSI support # -# CONFIG_SCSI is not set +CONFIG_SCSI=m +CONFIG_BLK_DEV_SD=m +CONFIG_SD_EXTRA_DEVS=40 +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_SCSI_DEBUG_QUEUES is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set # +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AHA1740 is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_MEGARAID2 is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_DMA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_NCR53C7xx is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# # I2O device support # # CONFIG_I2O is not set @@ -491,8 +545,8 @@ CONFIG_MMSP2_VPP=y CONFIG_MMSP2_ISP=y CONFIG_MMSP2_KEY=y -CONFIG_MMSP_GPX_BATT=y -# CONFIG_MMSP_GP2X_ADC is not set +# CONFIG_MMSP_GPX_BATT is not set +CONFIG_MMSP_GP2X_ADC=y # # L3 serial bus support @@ -525,6 +579,7 @@ # CONFIG_INPUT_ADI is not set # CONFIG_INPUT_COBRA is not set CONFIG_INPUT_GP2X=m +CONFIG_INPUT_DUMMY=m # CONFIG_INPUT_GF2K is not set # CONFIG_INPUT_GRIP is not set # CONFIG_INPUT_INTERACT is not set @@ -614,6 +669,7 @@ # CONFIG_VIDEO_PMS is not set # CONFIG_VIDEO_OV9640 is not set CONFIG_VIDEO_CX25874=y +CONFIG_VIDEO_CX25874_OPEN2X=y # CONFIG_VIDEO_SAA7113H is not set # CONFIG_VIDEO_CPIA is not set # CONFIG_VIDEO_SAA5249 is not set @@ -641,7 +697,7 @@ # CONFIG_QUOTA is not set # CONFIG_QFMT_V2 is not set # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=y +# CONFIG_AUTOFS4_FS is not set CONFIG_REISERFS_FS=m # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set @@ -757,7 +813,7 @@ # Native Language Support # CONFIG_NLS_DEFAULT="UTF8" -# CONFIG_NLS_CODEPAGE_437 is not set +CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set @@ -780,7 +836,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set +CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set @@ -793,7 +849,7 @@ # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=y +CONFIG_NLS_UTF8=m # # Console drivers @@ -868,6 +924,8 @@ CONFIG_SOUND_MP2520F_AC97=y # CONFIG_SOUND_TVMIXER is not set # CONFIG_SOUND_AD1980 is not set +CONFIG_SOUND_WM97XX=y +CONFIG_SOUND_WM97XX=y # # Multimedia Capabilities Port drivers @@ -897,10 +955,10 @@ CONFIG_USB_AUDIO=m CONFIG_USB_EMI26=m CONFIG_USB_MIDI=m -# CONFIG_USB_STORAGE is not set +CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set +CONFIG_USB_STORAGE_FREECOM=y # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_DPCM is not set # CONFIG_USB_STORAGE_HP8200e is not set @@ -946,8 +1004,8 @@ # CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_BELKIN is not set +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set # CONFIG_USB_SERIAL_EMPEG is not set @@ -959,10 +1017,10 @@ # CONFIG_USB_SERIAL_EDGEPORT_TI is not set # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set # CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set +CONFIG_USB_SERIAL_MCT_U232=m # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_PL2303 is not set +CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/Makefile =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/Makefile 2009-02-28 22:36:14 UTC (rev 369) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/Makefile 2009-03-31 22:26:22 UTC (rev 370) @@ -145,6 +145,9 @@ DRIVERS-m := DRIVERS- := +# senquack - for mmuhack +DRIVERS-$(CONFIG_GP2X_MMUHACK) += drivers/gp2x/mmuhack.o + DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/arch/arm/config.in =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/arch/arm/config.in 2009-02-28 22:36:14 UTC (rev 369) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/arch/arm/config.in 2009-03-31 22:26:22 UTC (rev 370) @@ -206,10 +206,16 @@ dep_bool ' GP2X DEBUG ENABLE.' CONFIG_MACH_GP2X_DEBUG $CONFIG_ARCH_MMSP2 dep_bool ' GP2X SVIDEO BOOTING(NTSC).' CONFIG_MACH_GP2X_SVIDEO_NTSC $CONFIG_GP2X_ONLY_TV dep_bool ' GP2X SVIDEO BOOTING(PAL).' CONFIG_MACH_GP2X_SVIDEO_PAL $CONFIG_GP2X_ONLY_TV -dep_tristate 'MMSP2 USB function support' CONFIG_MMSP2_USBDEV $CONFIG_ARCH_MMSP2 -dep_tristate ' Support for MMSP2 USB network link function' CONFIG_MMSP2_USBDEV_NETLINK $CONFI +dep_tristate ' MMSP2 USB function support' CONFIG_MMSP2_USBDEV $CONFIG_ARCH_MMSP2 +dep_tristate ' Support for MMSP2 USB network link function' CONFIG_MMSP2_USBDEV_NETLINK $CONFIG_MMSP2_USBDEV +dep_tristate ' Squidges mmuhack module (always build as module)' CONFIG_GP2X_MMUHACK $CONFIG_ARCH_MMSP2 endmenu +# senquack - make sure mmuhack is built as a module +if [ "$CONFIG_GP2X_MMUHACK" = "y" ]; then + define_tristate CONFIG_GP2X_MMUHACK m +fi + # Definitions to make life easier if [ "$CONFIG_ARCH_ARCA5K" = "y" -o \ "$CONFIG_ARCH_RPC" = "y" ]; then Added: trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f100.latest =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f100.latest (rev 0) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f100.latest 2009-03-31 22:26:22 UTC (rev 370) @@ -0,0 +1,1106 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_OMAHA is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_MX1ADS is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_RISCSTATION is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +CONFIG_ARCH_MMSP2=y +# CONFIG_ARCH_AT91RM9200 is not set + +# +# Archimedes/A5000 Implementations +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +# CONFIG_ARCH_NETWINDER is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ACCELENT is not set +# CONFIG_SA1100_ASSABET is not set +# CONFIG_ASSABET_NEPONSET is not set +# CONFIG_SA1100_ADSAGC is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_ADSBITSYPLUS is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CEP is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_H3XXX is not set +# CONFIG_H3600_SLEEVE is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_FRODO is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SIMPUTER is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set +# CONFIG_MACH_CSB337 is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CLEP7312 is not set +# CONFIG_ARCH_EDB7211 is not set +# CONFIG_ARCH_FORTUNET is not set +# CONFIG_ARCH_GUIDEA07 is not set +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_EP7211 is not set +# CONFIG_ARCH_EP7212 is not set + +# +# MMSP2 Implementation +# +CONFIG_MMSP2_SHADOW_ENABLE=y +CONFIG_MACH_MMSP2_MDK=y +# CONFIG_MACH_MMSP2_DTK3 is not set +CONFIG_MACH_MMSP2_DTK4=y +CONFIG_MACH_GP2X=y +# CONFIG_MACH_GP2XF200 is not set +# CONFIG_MACH_GP2X_DEBUG is not set +# CONFIG_MACH_GP2X_SVIDEO_NTSC is not set +# CONFIG_MACH_GP2X_SVIDEO_PAL is not set +CONFIG_MMSP2_USBDEV=m +CONFIG_MMSP2_USBDEV_NETLINK=m +CONFIG_GP2X_MMUHACK=m +# CONFIG_ARCH_ACORN is not set +# CONFIG_PLD is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +CONFIG_CPU_ARM920T=y +# CONFIG_CPU_ARM922T is not set +# CONFIG_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1020E is not set +# CONFIG_CPU_ARM1022 is not set +# CONFIG_CPU_ARM1026 is not set +# CONFIG_CPU_SA110 is not set +# CONFIG_CPU_SA1100 is not set +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y +# CONFIG_ARM_THUMB is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +# CONFIG_PCI is not set +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_KEXEC=y +CONFIG_HOTPLUG=y + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set +# CONFIG_PCMCIA_CLPS6700 is not set +# CONFIG_PCMCIA_SA1100 is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/mtdblock3 rw" +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +# CONFIG_MTD_GEN_PROBE is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_CFI_UTIL is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_AMDSTD is not set +# CONFIG_MTD_SHARP is not set +# CONFIG_MTD_JEDEC is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_CDB89712 is not set +# CONFIG_MTD_SA1100 is not set +# CONFIG_MTD_DC21285 is not set +# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_LUBBOCK is not set +# CONFIG_MTD_IXP425 is not set +# CONFIG_MTD_EPXA10DB is not set +# CONFIG_MTD_FORTUNET is not set +# CONFIG_MTD_AUTCPU12 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_H720X is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_CEIVA is not set +# CONFIG_MTD_NOR_TOTO is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PCMCIA is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCPROBE is not set + +# +# NAND Flash Device Drivers +# +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_BONFS is not set +CONFIG_MTD_OPEN2X_SINGLE_PARTITION=y +# CONFIG_OPEN2X_IGNORE_BB_ERASE is not set +# CONFIG_MTD_NAND_SPIA is not set +# CONFIG_MTD_NAND_TOTO is not set +# CONFIG_MTD_NAND_AUTCPU12 is not set +# CONFIG_MTD_NAND_EDB7312 is not set +CONFIG_MTD_NAND_MP2520F=y +# CONFIG_MTD_NAND_MP2520F_HWECC is not set +# CONFIG_MTD_NAND_MP2520F_HWECC_DEBUG is not set +CONFIG_MTD_NAND_IDS=y + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=m +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +CONFIG_SYN_COOKIES=y +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Network device support +# +# CONFIG_NETDEVICES is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +CONFIG_SCSI=m +CONFIG_BLK_DEV_SD=m +CONFIG_SD_EXTRA_DEVS=40 +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_SCSI_DEBUG_QUEUES is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AHA1740 is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_MEGARAID2 is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_DMA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_NCR53C7xx is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +CONFIG_INPUT=m +CONFIG_INPUT_KEYBDEV=m +CONFIG_INPUT_MOUSEDEV=m +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_INPUT_MX1TS is not set + +# +# Character devices +# +CONFIG_VT=y +# CONFIG_VT_CONSOLE is not set +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_IRDA_LIRC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_21285 is not set +# CONFIG_SERIAL_21285_OLD is not set +# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_UART00 is not set +# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_SA1100 is not set +# CONFIG_SERIAL_SA1100_CONSOLE is not set +# CONFIG_SERIAL_OMAHA is not set +# CONFIG_SERIAL_OMAHA_CONSOLE is not set +# CONFIG_SERIAL_AT91 is not set +# CONFIG_SERIAL_AT91_CONSOLE is not set +CONFIG_SERIAL_MMSP2=y +CONFIG_SERIAL_MMSP2_CONSOLE=y +# CONFIG_SERIAL_8250 is not set +# CONFIG_SERIAL_8250_CONSOLE is not set +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_MANY_PORTS is not set +# CONFIG_SERIAL_8250_SHARE_IRQ is not set +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_HUB6 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_MMSP2_TPC is not set +CONFIG_MMSP2_DUALCPU=m +CONFIG_MMSP2_VPP=y +CONFIG_MMSP2_ISP=y +CONFIG_MMSP2_KEY=y +CONFIG_MMSP_GPX_BATT=y +# CONFIG_MMSP_GP2X_ADC is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set +# CONFIG_L3_ALGOBIT is not set +# CONFIG_L3_BIT_SA1100_GPIO is not set +# CONFIG_L3_SA1111 is not set +# CONFIG_BIT_SA1100_GPIO is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +CONFIG_INPUT_GP2X=m +CONFIG_INPUT_DUMMY=m +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_21285_WATCHDOG is not set +# CONFIG_977_WATCHDOG is not set +# CONFIG_SA1100_WATCHDOG is not set +# CONFIG_EPXA_WATCHDOG is not set +# CONFIG_OMAHA_WATCHDOG is not set +# CONFIG_AT91_WATCHDOG is not set +# CONFIG_MMSP2_WATCHDOG is not set +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_60XX_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_AMD7XX_TCO is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +CONFIG_MMSP2_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# +# CONFIG_VIDEO_PROC_FS is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_OV9640 is not set +CONFIG_VIDEO_CX25874=y +CONFIG_VIDEO_CX25874_OPEN2X=y +# CONFIG_VIDEO_SAA7113H is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_ZORAN is not set +# CONFIG_VIDEO_ZORAN_BUZ is not set +# CONFIG_VIDEO_ZORAN_DC10 is not set +# CONFIG_VIDEO_ZORAN_LML33 is not set +# CONFIG_VIDEO_ZR36120 is not set +# CONFIG_VIDEO_MEYE is not set +# CONFIG_VIDEO_CYBERPRO is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MIROPCM20 is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +CONFIG_EXT3_FS=m +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=y +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_NAND=y +CONFIG_CRAMFS=y +CONFIG_TMPFS=y +CONFIG_RAMFS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +CONFIG_UDF_FS=m +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_YAFFS_FS=y +# CONFIG_YAFFS2_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=m +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp949" +CONFIG_SMB_UNIX=y +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +CONFIG_SMB_NLS=y +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="UTF8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Console drivers +# +CONFIG_PC_KEYMAP=y +# CONFIG_VGA_CONSOLE is not set + +# +# Frame-buffer support +# +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_ACORN is not set +CONFIG_FB_MMSP2=y +# CONFIG_FB_ANAKIN is not set +# CONFIG_FB_CLPS711X is not set +# CONFIG_FB_SA1100 is not set +# CONFIG_FB_DBMX1 is not set +CONFIG_LPP=y +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_FBCON_ADVANCED=y +# CONFIG_FBCON_MFB is not set +# CONFIG_FBCON_CFB2 is not set +# CONFIG_FBCON_CFB4 is not set +# CONFIG_FBCON_CFB8 is not set +CONFIG_FBCON_CFB16=y +# CONFIG_FBCON_CFB24 is not set +# CONFIG_FBCON_CFB32 is not set +# CONFIG_FBCON_AFB is not set +# CONFIG_FBCON_ILBM is not set +# CONFIG_FBCON_IPLAN2P2 is not set +# CONFIG_FBCON_IPLAN2P4 is not set +# CONFIG_FBCON_IPLAN2P8 is not set +# CONFIG_FBCON_MAC is not set +# CONFIG_FBCON_VGA_PLANES is not set +# CONFIG_FBCON_VGA is not set +# CONFIG_FBCON_HGA is not set +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set +# CONFIG_FBCON_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Sound +# +CONFIG_SOUND=y +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_MIDI_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +# CONFIG_MIDI_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_VIDC is not set +# CONFIG_SOUND_WAVEARTIST is not set +CONFIG_SOUND_MP2520F_AC97=y +# CONFIG_SOUND_TVMIXER is not set +# CONFIG_SOUND_AD1980 is not set + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set +# CONFIG_MCP_SA1100 is not set +# CONFIG_MCP_UCB1200 is not set +# CONFIG_MCP_UCB1200_AUDIO is not set +# CONFIG_MCP_UCB1200_TS is not set + +# +# USB support +# +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_UHCI is not set +# CONFIG_USB_UHCI_ALT is not set +# CONFIG_USB_OHCI is not set +# CONFIG_USB_OHCI_SA1111 is not set +CONFIG_USB_OHCI_MMSP2=m +# CONFIG_MMSP2_UPAD3_TO_DEVICE is not set +# CONFIG_USB_SL811HS_ALT is not set +# CONFIG_USB_SL811HS is not set +CONFIG_USB_AUDIO=m +CONFIG_USB_EMI26=m +CONFIG_USB_MIDI=m +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +CONFIG_USB_STORAGE_FREECOM=y +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_HID=m +CONFIG_USB_HIDINPUT=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_KBD=m +CONFIG_USB_MOUSE=m +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_WACOM=m +# CONFIG_USB_KBTAB is not set +CONFIG_USB_POWERMATE=m +# CONFIG_USB_DC2XX is not set +# CONFIG_USB_MDC800 is not set +CONFIG_USB_SCANNER=m +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_W9968CF is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DABUSB is not set +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_KAWETH=m +CONFIG_USB_CATC=m +CONFIG_USB_CDCETHER=m +CONFIG_USB_USBNET=m +# CONFIG_USB_USS720 is not set + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_SERIAL_DEBUG is not set +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_BELKIN=m +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +CONFIG_USB_SERIAL_MCT_U232=m +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +CONFIG_USB_SERIAL_PL2303=m +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_BRLVGER is not set +# CONFIG_USB_LCD is not set + +# +# Support for USB gadgets +# +CONFIG_USB_GADGET=m +CONFIG_USB_GADGET_NET2272=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_CONTROLLER is not set +CONFIG_USB_NET2272=m +CONFIG_USB_GADGET_CONTROLLER=m +CONFIG_USB_GADGET_DUALSPEED=y +CONFIG_USB_ZERO=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set + +# +# MMC/SD Card support +# +CONFIG_MMCSD=y +# CONFIG_MMCSD_DEBUG is not set +CONFIG_OPEN2X_SD_AUTOMOUNT=y +CONFIG_MMCSD_DISK=y +CONFIG_MMCSD_SLOT=y + +# +# Bluetooth support +# +CONFIG_BLUEZ=m +# CONFIG_BLUEZ_L2CAP is not set +# CONFIG_BLUEZ_SCO is not set +# CONFIG_BLUEZ_RFCOMM is not set +# CONFIG_BLUEZ_BNEP is not set + +# +# Bluetooth device drivers +# +CONFIG_BLUEZ_HCIUSB=m +CONFIG_BLUEZ_HCIUSB_SCO=y +CONFIG_BLUEZ_HCIUART=m +CONFIG_BLUEZ_HCIUART_H4=y +CONFIG_BLUEZ_HCIUART_BCSP=y +# CONFIG_BLUEZ_HCIUART_BCSP_TXCRC is not set +CONFIG_BLUEZ_HCIBFUSB=m +# CONFIG_BLUEZ_HCIDTL1 is not set +# CONFIG_BLUEZ_HCIBT3C is not set +# CONFIG_BLUEZ_HCIBLUECARD is not set +# CONFIG_BLUEZ_HCIBTUART is not set +CONFIG_BLUEZ_HCIVHCI=m + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_NO_PGT_CACHE is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_DC21285_PORT is not set +# CONFIG_DEBUG_CLPS711X_UART2 is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +# CONFIG_FW_LOADER is not set Added: trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f200.latest =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f200.latest (rev 0) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/configs/.config.f200.latest 2009-03-31 22:26:22 UTC (rev 370) @@ -0,0 +1,1108 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_OMAHA is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_MX1ADS is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_RISCSTATION is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +CONFIG_ARCH_MMSP2=y +# CONFIG_ARCH_AT91RM9200 is not set + +# +# Archimedes/A5000 Implementations +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +# CONFIG_ARCH_NETWINDER is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ACCELENT is not set +# CONFIG_SA1100_ASSABET is not set +# CONFIG_ASSABET_NEPONSET is not set +# CONFIG_SA1100_ADSAGC is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_ADSBITSYPLUS is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CEP is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_H3XXX is not set +# CONFIG_H3600_SLEEVE is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_FRODO is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SIMPUTER is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set +# CONFIG_MACH_CSB337 is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CLEP7312 is not set +# CONFIG_ARCH_EDB7211 is not set +# CONFIG_ARCH_FORTUNET is not set +# CONFIG_ARCH_GUIDEA07 is not set +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_EP7211 is not set +# CONFIG_ARCH_EP7212 is not set + +# +# MMSP2 Implementation +# +CONFIG_MMSP2_SHADOW_ENABLE=y +CONFIG_MACH_MMSP2_MDK=y +# CONFIG_MACH_MMSP2_DTK3 is not set +CONFIG_MACH_MMSP2_DTK4=y +CONFIG_MACH_GP2X=y +CONFIG_MACH_GP2XF200=y +# CONFIG_MACH_GP2X_DEBUG is not set +# CONFIG_MACH_GP2X_SVIDEO_NTSC is not set +# CONFIG_MACH_GP2X_SVIDEO_PAL is not set +CONFIG_MMSP2_USBDEV=m +# CONFIG_MMSP2_USBDEV_NETLINK is not set +CONFIG_GP2X_MMUHACK=m +# CONFIG_ARCH_ACORN is not set +# CONFIG_PLD is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +CONFIG_CPU_ARM920T=y +# CONFIG_CPU_ARM922T is not set +# CONFIG_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1020E is not set +# CONFIG_CPU_ARM1022 is not set +# CONFIG_CPU_ARM1026 is not set +# CONFIG_CPU_SA110 is not set +# CONFIG_CPU_SA1100 is not set +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y +# CONFIG_ARM_THUMB is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +# CONFIG_PCI is not set +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_KEXEC=y +CONFIG_HOTPLUG=y + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set +# CONFIG_PCMCIA_CLPS6700 is not set +# CONFIG_PCMCIA_SA1100 is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/mtdblock3 rw" +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +# CONFIG_MTD_GEN_PROBE is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_CFI_UTIL is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_AMDSTD is not set +# CONFIG_MTD_SHARP is not set +# CONFIG_MTD_JEDEC is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_CDB89712 is not set +# CONFIG_MTD_SA1100 is not set +# CONFIG_MTD_DC21285 is not set +# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_LUBBOCK is not set +# CONFIG_MTD_IXP425 is not set +# CONFIG_MTD_EPXA10DB is not set +# CONFIG_MTD_FORTUNET is not set +# CONFIG_MTD_AUTCPU12 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_H720X is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_CEIVA is not set +# CONFIG_MTD_NOR_TOTO is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PCMCIA is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCPROBE is not set + +# +# NAND Flash Device Drivers +# +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_BONFS is not set +CONFIG_MTD_OPEN2X_SINGLE_PARTITION=y +# CONFIG_OPEN2X_IGNORE_BB_ERASE is not set +# CONFIG_MTD_NAND_SPIA is not set +# CONFIG_MTD_NAND_TOTO is not set +# CONFIG_MTD_NAND_AUTCPU12 is not set +# CONFIG_MTD_NAND_EDB7312 is not set +CONFIG_MTD_NAND_MP2520F=y +# CONFIG_MTD_NAND_MP2520F_HWECC is not set +# CONFIG_MTD_NAND_MP2520F_HWECC_DEBUG is not set +CONFIG_MTD_NAND_IDS=y + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=m +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +CONFIG_SYN_COOKIES=y +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Network device support +# +# CONFIG_NETDEVICES is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +CONFIG_SCSI=m +CONFIG_BLK_DEV_SD=m +CONFIG_SD_EXTRA_DEVS=40 +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_SCSI_DEBUG_QUEUES is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AHA1740 is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_MEGARAID2 is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_DMA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_NCR53C7xx is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +CONFIG_INPUT=m +CONFIG_INPUT_KEYBDEV=m +CONFIG_INPUT_MOUSEDEV=m +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_INPUT_MX1TS is not set + +# +# Character devices +# +CONFIG_VT=y +# CONFIG_VT_CONSOLE is not set +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_IRDA_LIRC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_21285 is not set +# CONFIG_SERIAL_21285_OLD is not set +# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_UART00 is not set +# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_SA1100 is not set +# CONFIG_SERIAL_SA1100_CONSOLE is not set +# CONFIG_SERIAL_OMAHA is not set +# CONFIG_SERIAL_OMAHA_CONSOLE is not set +# CONFIG_SERIAL_AT91 is not set +# CONFIG_SERIAL_AT91_CONSOLE is not set +CONFIG_SERIAL_MMSP2=y +CONFIG_SERIAL_MMSP2_CONSOLE=y +# CONFIG_SERIAL_8250 is not set +# CONFIG_SERIAL_8250_CONSOLE is not set +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_MANY_PORTS is not set +# CONFIG_SERIAL_8250_SHARE_IRQ is not set +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_HUB6 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_MMSP2_TPC is not set +CONFIG_MMSP2_DUALCPU=m +CONFIG_MMSP2_VPP=y +CONFIG_MMSP2_ISP=y +CONFIG_MMSP2_KEY=y +# CONFIG_MMSP_GPX_BATT is not set +CONFIG_MMSP_GP2X_ADC=y + +# +# L3 serial bus support +# +# CONFIG_L3 is not set +# CONFIG_L3_ALGOBIT is not set +# CONFIG_L3_BIT_SA1100_GPIO is not set +# CONFIG_L3_SA1111 is not set +# CONFIG_BIT_SA1100_GPIO is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +CONFIG_INPUT_GP2X=m +CONFIG_INPUT_DUMMY=m +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_21285_WATCHDOG is not set +# CONFIG_977_WATCHDOG is not set +# CONFIG_SA1100_WATCHDOG is not set +# CONFIG_EPXA_WATCHDOG is not set +# CONFIG_OMAHA_WATCHDOG is not set +# CONFIG_AT91_WATCHDOG is not set +# CONFIG_MMSP2_WATCHDOG is not set +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_60XX_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_AMD7XX_TCO is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +CONFIG_MMSP2_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# +# CONFIG_VIDEO_PROC_FS is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_OV9640 is not set +CONFIG_VIDEO_CX25874=y +CONFIG_VIDEO_CX25874_OPEN2X=y +# CONFIG_VIDEO_SAA7113H is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_ZORAN is not set +# CONFIG_VIDEO_ZORAN_BUZ is not set +# CONFIG_VIDEO_ZORAN_DC10 is not set +# CONFIG_VIDEO_ZORAN_LML33 is not set +# CONFIG_VIDEO_ZR36120 is not set +# CONFIG_VIDEO_MEYE is not set +# CONFIG_VIDEO_CYBERPRO is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MIROPCM20 is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +CONFIG_EXT3_FS=m +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=y +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_NAND=y +CONFIG_CRAMFS=y +CONFIG_TMPFS=y +CONFIG_RAMFS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +CONFIG_UDF_FS=m +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_YAFFS_FS=y +# CONFIG_YAFFS2_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=m +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp949" +CONFIG_SMB_UNIX=y +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_... [truncated message content] |
From: <sen...@us...> - 2009-02-28 22:36:19
|
Revision: 369 http://open2x.svn.sourceforge.net/open2x/?rev=369&view=rev Author: senquack Date: 2009-02-28 22:36:14 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Changed makefile to default to GP2X build, removed extraneous file Modified Paths: -------------- trunk/utils/o2xiv/Makefile Removed Paths: ------------- trunk/utils/o2xiv/101bitches.png Deleted: trunk/utils/o2xiv/101bitches.png =================================================================== (Binary files differ) Modified: trunk/utils/o2xiv/Makefile =================================================================== --- trunk/utils/o2xiv/Makefile 2009-02-28 22:22:47 UTC (rev 368) +++ trunk/utils/o2xiv/Makefile 2009-02-28 22:36:14 UTC (rev 369) @@ -1,7 +1,7 @@ # BUILD SETTINGS ################################### -DEBUG := 1 +DEBUG := 0 # Valid values: UNIX, GP2X -PLATFORM := UNIX +PLATFORM := GP2X # If building for the GP2X GP2X_CHAINPREFIX := /opt/open2x/gcc-4.1.1-glibc-2.3.6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-28 22:22:52
|
Revision: 368 http://open2x.svn.sourceforge.net/open2x/?rev=368&view=rev Author: senquack Date: 2009-02-28 22:22:47 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Added source code for touchscreen calibration utility Added Paths: ----------- trunk/utils/ts_calibrator/ trunk/utils/ts_calibrator/Makefile trunk/utils/ts_calibrator/SFont.c trunk/utils/ts_calibrator/SFont.h trunk/utils/ts_calibrator/img/ trunk/utils/ts_calibrator/img/bg.png trunk/utils/ts_calibrator/img/font_wh.png trunk/utils/ts_calibrator/img/target.png trunk/utils/ts_calibrator/ts_calibrator.c Added: trunk/utils/ts_calibrator/Makefile =================================================================== --- trunk/utils/ts_calibrator/Makefile (rev 0) +++ trunk/utils/ts_calibrator/Makefile 2009-02-28 22:22:47 UTC (rev 368) @@ -0,0 +1,33 @@ +CFLAGS=-c -O2 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 + +SOURCES=SFont.c ts_calibrator.c + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=ts_calibrator + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) + $(CC) $(OBJECTS) -o $@ $(LDFLAGS) + $(STRIP) $@ + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f ts_calibrator *~ *.o *.bak + Added: trunk/utils/ts_calibrator/SFont.c =================================================================== --- trunk/utils/ts_calibrator/SFont.c (rev 0) +++ trunk/utils/ts_calibrator/SFont.c 2009-02-28 22:22:47 UTC (rev 368) @@ -0,0 +1,182 @@ +/* SFont: a simple font-library that uses special .pngs as fonts + Copyright (C) 2003 Karl Bartel + + License: GPL or LGPL (at your choice) + WWW: http://www.linux-games.com/sfont/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Karl Bartel + Cecilienstr. 14 + 12307 Berlin + GERMANY + ka...@gm... +*/ +#include <SDL.h> + +#include <assert.h> +#include <stdlib.h> +#include "SFont.h" + +//DKS - added for memory debugging: +//#include "..\memwatch.h" + + +static Uint32 GetPixel(SDL_Surface *Surface, Sint32 X, Sint32 Y) +{ + Uint8 *bits; + Uint32 Bpp; + + assert(X>=0); + assert(X<Surface->w); + + Bpp = Surface->format->BytesPerPixel; + bits = ((Uint8 *)Surface->pixels)+Y*Surface->pitch+X*Bpp; + + // Get the pixel + switch(Bpp) { + case 1: + return *((Uint8 *)Surface->pixels + Y * Surface->pitch + X); + break; + case 2: + return *((Uint16 *)Surface->pixels + Y * Surface->pitch/2 + X); + break; + case 3: { // Format/endian independent + Uint8 r, g, b; + r = *((bits)+Surface->format->Rshift/8); + g = *((bits)+Surface->format->Gshift/8); + b = *((bits)+Surface->format->Bshift/8); + return SDL_MapRGB(Surface->format, r, g, b); + } + break; + case 4: + return *((Uint32 *)Surface->pixels + Y * Surface->pitch/4 + X); + break; + } + + return -1; +} + +SFont_Font* SFont_InitFont(SDL_Surface* Surface) +{ + int x = 0, i = 0; + Uint32 pixel; + SFont_Font* Font; + Uint32 pink; + + if (Surface == NULL) + return NULL; + + Font = (SFont_Font *) malloc(sizeof(SFont_Font)); + Font->Surface = Surface; + + SDL_LockSurface(Surface); + + pink = SDL_MapRGB(Surface->format, 255, 0, 255); + while (x < Surface->w) { + if (GetPixel(Surface, x, 0) == pink) { + Font->CharPos[i++]=x; + while((x < Surface->w) && (GetPixel(Surface, x, 0)== pink)) + x++; + Font->CharPos[i++]=x; + } + x++; + } + Font->MaxPos = x-1; + + pixel = GetPixel(Surface, 0, Surface->h-1); + SDL_UnlockSurface(Surface); + SDL_SetColorKey(Surface, SDL_SRCCOLORKEY, pixel); + + return Font; +} + +void SFont_FreeFont(SFont_Font* FontInfo) +{ + SDL_FreeSurface(FontInfo->Surface); + free(FontInfo); +} + +void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, + int x, int y, const char *text) +{ + const char* c; + int charoffset; + SDL_Rect srcrect, dstrect; + + if(text == NULL) + return; + + // these values won't change in the loop + srcrect.y = 1; + dstrect.y = y; + srcrect.h = dstrect.h = Font->Surface->h - 1; + + for(c = text; *c != '\0' && x <= Surface->w ; c++) { + charoffset = ((int) (*c - 33)) * 2 + 1; + // skip spaces and nonprintable characters + if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) { + x += Font->CharPos[2]-Font->CharPos[1]; + continue; + } + + srcrect.w = dstrect.w = + (Font->CharPos[charoffset+2] + Font->CharPos[charoffset+1])/2 - + (Font->CharPos[charoffset] + Font->CharPos[charoffset-1])/2; + srcrect.x = (Font->CharPos[charoffset]+Font->CharPos[charoffset-1])/2; + dstrect.x = x - (float)(Font->CharPos[charoffset] + - Font->CharPos[charoffset-1])/2; + + SDL_BlitSurface(Font->Surface, &srcrect, Surface, &dstrect); + + x += Font->CharPos[charoffset+1] - Font->CharPos[charoffset]; + } +} + +int SFont_TextWidth(const SFont_Font *Font, const char *text) +{ + const char* c; + int charoffset=0; + int width = 0; + + if(text == NULL) + return 0; + + for(c = text; *c != '\0'; c++) { + charoffset = ((int) *c - 33) * 2 + 1; + // skip spaces and nonprintable characters + if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) { + width += Font->CharPos[2]-Font->CharPos[1]; + continue; + } + + width += Font->CharPos[charoffset+1] - Font->CharPos[charoffset]; + } + + return width; +} + +int SFont_TextHeight(const SFont_Font* Font) +{ + return Font->Surface->h - 1; +} + +void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font *Font, + int y, const char *text) +{ + SFont_Write(Surface, Font, Surface->w/2 - SFont_TextWidth(Font, text)/2, + y, text); +} + Added: trunk/utils/ts_calibrator/SFont.h =================================================================== --- trunk/utils/ts_calibrator/SFont.h (rev 0) +++ trunk/utils/ts_calibrator/SFont.h 2009-02-28 22:22:47 UTC (rev 368) @@ -0,0 +1,83 @@ +/* SFont: a simple font-library that uses special bitmaps as fonts + Copyright (C) 2003 Karl Bartel + + License: GPL or LGPL (at your choice) + WWW: http://www.linux-games.com/sfont/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Karl Bartel + Cecilienstr. 14 + 12307 Berlin + GERMANY + ka...@gm... +*/ + +/************************************************************************ +* SFONT - SDL Font Library by Karl Bartel <ka...@gm...> * +* * +* All functions are explained below. For further information, take a * +* look at the example files, the links at the SFont web site, or * +* contact me, if you problem isn' addressed anywhere. * +* * +************************************************************************/ +#ifndef SFONT_H +#define SFONT_H + +#include <SDL.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// Delcare one variable of this type for each font you are using. +// To load the fonts, load the font image into YourFont->Surface +// and call InitFont( YourFont ); +typedef struct { + SDL_Surface *Surface; + int CharPos[512]; + int MaxPos; +} SFont_Font; + +// Initializes the font +// Font: this contains the suface with the font. +// The Surface must be loaded before calling this function +SFont_Font* SFont_InitFont (SDL_Surface *Font); + +// Frees the font +// Font: The font to free +// The font must be loaded before using this function. +void SFont_FreeFont(SFont_Font* Font); + +// Blits a string to a surface +// Destination: the suface you want to blit to +// text: a string containing the text you want to blit. +void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, int x, int y, + const char *text); + +// Returns the width of "text" in pixels +int SFont_TextWidth(const SFont_Font* Font, const char *text); +// Returns the height of "text" in pixels (which is always equal to Font->Surface->h) +int SFont_TextHeight(const SFont_Font* Font); + +// Blits a string to Surface with centered x position +void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font* Font, int y, + const char *text); + +#ifdef __cplusplus +} +#endif + +#endif /* SFONT_H */ Added: trunk/utils/ts_calibrator/img/bg.png =================================================================== (Binary files differ) Property changes on: trunk/utils/ts_calibrator/img/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/utils/ts_calibrator/img/font_wh.png =================================================================== (Binary files differ) Property changes on: trunk/utils/ts_calibrator/img/font_wh.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/utils/ts_calibrator/img/target.png =================================================================== (Binary files differ) Property changes on: trunk/utils/ts_calibrator/img/target.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/utils/ts_calibrator/ts_calibrator.c =================================================================== --- trunk/utils/ts_calibrator/ts_calibrator.c (rev 0) +++ trunk/utils/ts_calibrator/ts_calibrator.c 2009-02-28 22:22:47 UTC (rev 368) @@ -0,0 +1,416 @@ +/* lcdadjuster.c LCD adjustment utility for Open2X. + Copyright (C) 2008 Dan Silsby (Senor Quack) + Portions of code based on : + + cpuctrl.c for GP2X (CPU/LCD/RAM-Tuner Version 2.0) + Copyright (C) 2006 god_at_hell + original CPU-Overclocker (c) by Hermes/PS2Reality + the gamma-routine was provided by theoddbot + parts (c) Rlyehs Work + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +//#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> +#include <SDL.h> +#include <SDL_image.h> +#include <SDL_gfxPrimitives.h> +#include "SFont.h" + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_L (11) +#define GP2X_BUTTON_R (10) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) +#define NUMBUTTONS (19) // total number of buttons we'll need to keep track of + +#define MINPRESSURE (35000) // Any pressures below this are probably inaccurate +#define OFFSET 30 // Offset from edges of screen the readings are taken + +typedef struct { + unsigned short pressure; + unsigned short x; + unsigned short y; + unsigned short pad; +} ts_sample; + +extern int errno; + +char *settings_filename = "/etc/pointercal"; +int ts_dev; +ts_sample samples[2]; // We read two samples to calibrate + + +//global surfaces +SDL_Surface* screen; // framebuffer +SDL_Surface* background; +SDL_Surface* target; // image to show where to tap the stylus + +//global fonts +SFont_Font *font_wh; //white + +//global joysticks +SDL_Joystick* joy; + + +//global constants +const int screenw = 320; +const int screenh = 240; +const int screenbpp = 16; +const int screenflags = SDL_DOUBLEBUF; + + +// Return 1 on success, 0 on error. Write settings from timings structure. +int write_calvals(const char *filename, ts_sample *samples_read) +{ + FILE *handle; + char buf[100]; + int a, b, c, d, e, f, s, left, right, top, bottom; + + s = 1 << 16; + + left = samples_read->x; + top = samples_read->y; + + samples_read++; // advance to second sample in array + + right = samples_read->x; + bottom = samples_read->y; + + a = s * (OFFSET - (319 - OFFSET)) / (left - right); + b = 0; + c = s * OFFSET - a * left; + + d = 0; + e = s * (OFFSET - (239 - OFFSET)) / (top - bottom); + f = s * OFFSET - e * top; + + handle = fopen(filename, "w"); + if (handle == NULL) + { + printf("Error opening file for writing: %s\n", filename); + return 0; + } + else + { + printf("Writing new calibration values to file: %s\n", filename); + } + + sprintf(buf, "%d %d %d %d %d %d %d", a, b, c, d, e, f, s); + fprintf(handle, buf); + + return (fclose(handle) == 0); +} + + +int load_graphics(void) +{ + SDL_Surface *tmp_sur, *tmp_sur2; + + // Background image + tmp_sur = IMG_Load("img/bg.png"); + if (!tmp_sur) + { + fprintf(stderr, "Fatal error loading: img/bg.png\n"); + return 0; + } + background = SDL_DisplayFormat(tmp_sur); + SDL_FreeSurface(tmp_sur); + + // Target image + tmp_sur = IMG_Load("img/target.png"); + if (!tmp_sur) + { + fprintf(stderr, "Fatal error loading: img/target.png\n"); + return 0; + } + target = SDL_DisplayFormat(tmp_sur); + SDL_FreeSurface(tmp_sur); + SDL_SetColorKey(target, SDL_SRCCOLORKEY, SDL_MapRGB(screen->format, 255, 0, 255)); + + + //Font + tmp_sur = IMG_Load("img/font_wh.png"); + if (!tmp_sur) + { + fprintf ( stderr,"Fatal error loading: img/font_wh.png\n" ); + return 1; + } + tmp_sur2 = SDL_DisplayFormat(tmp_sur); + font_wh = SFont_InitFont(tmp_sur2); + if (!font_wh) + { + fprintf ( stderr,"Fatal error intializing SFont on font_wh.png\n" ); + return 1; + } + SDL_FreeSurface(tmp_sur); + + return 1; +} + +void unload_graphics(void) +{ + SDL_FreeSurface(background); + SDL_FreeSurface(target); + + if (font_wh) + { + SFont_FreeFont(font_wh); + } +} + +// Read a touchscreen sample. Return 1 if sample was read successfully, 0 if not. +int read_ts(int handle, ts_sample *sample) +{ + return(read(handle, sample, sizeof(ts_sample)) == sizeof(ts_sample)); +} + +// Returns 1 if user completed calibration or 0 if user requested to abort the calibration +int calibration_sequence(void) +{ + int quit = 0; + int times_pressed = 0; // how many times has the stylus been pressed? if 2, we're done + + SDL_Rect dstrect; + + const int line_y[4] = { 13, 23, 33, 43 }; // Four lines on which we can place text + + int i; + for (i = 0; i < 77; i+=4) + { + //blit background + SDL_BlitSurface(background, NULL, screen, NULL); + // animated menu border + rectangleRGBA(screen, ((screenw >> 1) - i), 1, ((screenw >> 1) + i), 58, + 255, 255, 255, 255); + dstrect.x = (screenw >> 1) - i + 1; + dstrect.y = 2; + dstrect.w = ((screenw >> 1) + i) - ((screenw >> 1) - i) - 2; + dstrect.h = 55; + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); + SDL_Flip(screen); + } + + while (!quit) + { + // calibration loop + + //blit background + SDL_BlitSurface(background, NULL, screen, NULL); + + //blit menu border & BG + rectangleRGBA(screen, ((screenw >> 1) - 80), 1, ((screenw >> 1) + 80), 58, + 255, 255, 255, 255); + dstrect.x = (screenw >> 1) - 80 + 1; + dstrect.y = 2; + dstrect.w = ((screenw >> 1) + 80) - ((screenw >> 1) - 80) - 1; + dstrect.h = 56; + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); + + SFont_WriteCenter(screen, font_wh, 0, "Open2X Touchscreen Calibration"); + + // draw menu text + SFont_WriteCenter(screen, font_wh, line_y[3], "Press any button to abort"); + + if (times_pressed == 0) + { + SFont_WriteCenter(screen, font_wh, line_y[1], "Tap stylus on target"); + // draw first target + dstrect.x = OFFSET - (target->w >> 1); + dstrect.y = OFFSET - (target->h >> 1); + dstrect.w = target->w; + dstrect.h = target->h; + SDL_BlitSurface(target, NULL, screen, &dstrect); + } + else if (times_pressed == 1) + { + SFont_WriteCenter(screen, font_wh, line_y[1], "Tap stylus on next target"); + // draw second target + dstrect.x = (319 - OFFSET) - (target->w >> 1); + dstrect.y = (239 - OFFSET) - (target->h >> 1); + dstrect.w = target->w; + dstrect.h = target->h; + SDL_BlitSurface(target, NULL, screen, &dstrect); + } + + ts_sample sample; + if (read_ts(ts_dev, &sample)) + { + // successfully read a sample + if (sample.pressure > MINPRESSURE) + { + samples[times_pressed] = sample; + times_pressed++; + // don't move on until stylus is released for a period of time + int stylus_still_pressed = 1; + while (stylus_still_pressed) + { + if (read_ts(ts_dev, &sample) && sample.pressure == 0) + { + stylus_still_pressed = 0; + } + SDL_Delay(20); + } + + if (times_pressed == 1) + { + // animate the target moving from one spot to another + const int num_steps = 100; + float x_incr = (float)(((319 - OFFSET) - (target->w >> 1)) - OFFSET) / + (float)num_steps; + float y_incr = (float)(((239 - OFFSET) - (target->h >> 1)) - OFFSET) / + (float)num_steps; + float dst_x = OFFSET - (target->w >> 1); + float dst_y = OFFSET - (target->h >> 1); + dstrect.w = target->w; + dstrect.h = target->h; + + for (i = 0; i < num_steps; i++) + { + dstrect.x = dst_x; + dstrect.y = dst_y; + SDL_BlitSurface(background, NULL, screen, NULL); + SDL_BlitSurface(target, NULL, screen, &dstrect); + SDL_Flip(screen); + dst_x += x_incr; + dst_y += y_incr; + } + } +// SDL_Delay(500); + } + } + + if (times_pressed == 2) + { + quit = 1; + } + + // update screen and wait a bit + SDL_Flip(screen); + SDL_Delay(10); + + SDL_JoystickUpdate(); + for (i = 0; i < NUMBUTTONS; i++) + { + if (SDL_JoystickGetButton(joy, i)) + { + quit = 1; + } + } + } + + return (times_pressed == 2); +} + +int initialize(void) +{ + if (!(screen = SDL_SetVideoMode(screenw, screenh, screenbpp, screenflags))) + { + fprintf(stderr, "cannot open %dx%d display: %s\n", + screenw, screenh, SDL_GetError()); + return 0; + } + + SDL_ShowCursor(SDL_DISABLE); + + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { + fprintf(stderr, "Cannot initialize SDL system: %s\n", SDL_GetError()); + return 0; + } + + joy = SDL_JoystickOpen(0); + if (joy == NULL) + { + fprintf(stderr, "Cannot initialize GP2X joystick: %s\n", SDL_GetError()); + } + + if (!load_graphics()) { + fprintf(stderr, "Error loading sprites/fonts.\n"); + return 0; + } + + ts_dev = open("/dev/touchscreen/wm97xx",O_RDONLY|O_NDELAY); + if (ts_dev == -1) + { + fprintf(stderr, "Error opening touchscreen device.\n"); + return 0; + } + + return 1; +} + +void shutdown(void) +{ + close(ts_dev); + unload_graphics(); + SDL_Quit(); +} + +int main(int argc, char *argv[]) +{ + // Initialize graphics, load sprits/fonts etc, open touchscreen device + if (!initialize()) + { + fprintf(stderr, "Aborting because of initialization errors.\n"); + return 1; + } + + // RUN CALIBRATION + if (calibration_sequence()) + { + // Returned 1, user completed calibration + if (write_calvals(settings_filename, samples)) + { + printf("Successfully saved new values.\n"); + } + else + { + printf("Problem occurred writing new values.\n"); + } + + sync(); + } + else + { + // Returned 0, user aborted calibration sequence + printf("User aborted.\n"); + } + + shutdown(); + + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-28 22:18:49
|
Revision: 367 http://open2x.svn.sourceforge.net/open2x/?rev=367&view=rev Author: senquack Date: 2009-02-28 22:18:39 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Added source code for LCD timings adjustment utilities Added Paths: ----------- trunk/utils/lcd_timings/ trunk/utils/lcd_timings/adjuster_cli/ trunk/utils/lcd_timings/adjuster_cli/Makefile trunk/utils/lcd_timings/adjuster_cli/lcdtimings.c trunk/utils/lcd_timings/adjuster_gui/ trunk/utils/lcd_timings/adjuster_gui/Makefile trunk/utils/lcd_timings/adjuster_gui/SFont.c trunk/utils/lcd_timings/adjuster_gui/SFont.h trunk/utils/lcd_timings/adjuster_gui/img/ trunk/utils/lcd_timings/adjuster_gui/img/animation.png trunk/utils/lcd_timings/adjuster_gui/img/bg.png trunk/utils/lcd_timings/adjuster_gui/img/font_wh.png trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.c trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.png Added: trunk/utils/lcd_timings/adjuster_cli/Makefile =================================================================== --- trunk/utils/lcd_timings/adjuster_cli/Makefile (rev 0) +++ trunk/utils/lcd_timings/adjuster_cli/Makefile 2009-02-28 22:18:39 UTC (rev 367) @@ -0,0 +1,40 @@ +CFLAGS=-c -O2 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lgcc -lm -lc -ldl -larmmem -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lgcc -lm -lc -ldl -larmmem -msoft-float -O2 + +SOURCES=lcdtimings.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=lcdtimings_cli + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT \ + -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(GPLDFLAGS) + $(STRIP) $@ + + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f lcdtimings_cli *~ *.o *.bak + Added: trunk/utils/lcd_timings/adjuster_cli/lcdtimings.c =================================================================== --- trunk/utils/lcd_timings/adjuster_cli/lcdtimings.c (rev 0) +++ trunk/utils/lcd_timings/adjuster_cli/lcdtimings.c 2009-02-28 22:18:39 UTC (rev 367) @@ -0,0 +1,397 @@ +/* lcdadjuster.c LCD adjustment utility for Open2X. + Copyright (C) 2008 Dan Silsby (Senor Quack) + Portions of code based on : + + cpuctrl.c for GP2X (CPU/LCD/RAM-Tuner Version 2.0) + Copyright (C) 2006 god_at_hell + original CPU-Overclocker (c) by Hermes/PS2Reality + the gamma-routine was provided by theoddbot + parts (c) Rlyehs Work + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> + +#define CLOCKGEN_UPLL 1 +#define CLOCKGEN_FPLL 2 + +#define GPIOAPINLVL 0x1180 +#define GPIOBPINLVL 0x1182 +#define GPIOCPINLVL 0x1184 +#define GPIODPINLVL 0x1186 +#define GPIOEPINLVL 0x1188 +#define GPIOFPINLVL 0x118A +#define GPIOGPINLVL 0x118C +#define GPIOHPINLVL 0x118E +#define GPIOIPINLVL 0x1190 +#define GPIOJPINLVL 0x1192 +#define GPIOKPINLVL 0x1194 +#define GPIOLPINLVL 0x1196 +#define GPIOMPINLVL 0x1198 +#define GPIONPINLVL 0x119A +#define GPIOOPINLVL 0x119C + +#define GPIOAOUT 0x1060 +#define GPIOBOUT 0x1062 +#define GPIOCOUT 0x1064 +#define GPIODOUT 0x1066 +#define GPIOEOUT 0x1068 +#define GPIOFOUT 0x106A +#define GPIOGOUT 0x106C +#define GPIOHOUT 0x106E +#define GPIOIOUT 0x1070 +#define GPIOJOUT 0x1072 +#define GPIOKOUT 0x1074 +#define GPIOLOUT 0x1076 +#define GPIOMOUT 0x1078 +#define GPIONOUT 0x107A +#define GPIOOOUT 0x107C + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_L (11) +#define GP2X_BUTTON_R (10) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) + +extern int errno; +unsigned long *memregs32; +unsigned short *memregs16; +char settings_file[255] = "/etc/config/open2x_lcdsettings.conf"; +int memfd; + +struct lcd_timings +{ + unsigned int clockgen; + signed int timing; +}; + +struct lcd_timings new_timings; + +// default is UPLL clockgen, timing of 1 +const struct lcd_timings default_timings = { CLOCKGEN_UPLL, 1 }; + +void set_add_FLCDCLK(int addclock) +{ + //Set LCD controller to use FPLL + printf ("...set to FPLL-Clockgen...\r\n"); + printf ("set Timing-Prescaler = %i\r\n",addclock); + memregs16[0x924>>1]= 0x5A00 + ((addclock)<<8); +} + +void set_add_ULCDCLK(int addclock) +{ + //Set LCD controller to use UPLL + printf ("...set to UPLL-Clockgen...\r\n"); + printf ("set Timing-Prescaler = %i\r\n",addclock); + memregs16[0x0924>>1] = 0x8900 + ((addclock)<<8); +} + +unsigned get_LCDClk() +{ + if (memregs16[0x0924>>1] < 0x7A01) return((memregs16[0x0924>>1] - 0x5A00)>>8); + else return((memregs16[0x0924>>1] - 0x8900)>>8); +} + +char *trim_string(char *buf) +{ + int len; + + while (*buf == ' ') buf++; + + len = strlen(buf); + + while (len != 0 && buf[len - 1] == ' ') + { + len--; + buf[len] = 0; + } + + return buf; +} + +void set_new_timings(struct lcd_timings timings) +{ + if (timings.clockgen == CLOCKGEN_UPLL) + { + if ((timings.timing >= -6) && (timings.timing <= 10)) + { + printf("Setting clockgen to UPLL, timing: %d\n", timings.timing); + set_add_ULCDCLK(timings.timing); + } + } + else if (timings.clockgen == CLOCKGEN_FPLL) + { + if ((timings.timing >= -20) && (timings.timing <= 36)) + { + printf("Setting clockgen to FPLL, timing: %d\n", timings.timing); + set_add_FLCDCLK(timings.timing); + } + } +} + +// Return 0 on success, -1 on error. Read settings into *timings structure. +int read_saved_timings(char *settings_filename, struct lcd_timings *timings) +{ + FILE *f; + char buf[8192]; + char *str, *param; + + f = fopen(settings_filename, "r"); + if (f == NULL) + { + printf("Error opening file: %s\n", settings_filename); + return -1; + } + else + { + printf("Loading settings from file: %s\n", settings_filename); + } + + while (!feof(f)) + { + // skip empty lines + fscanf(f, "%8192[\n\r]", buf); + + // read line + buf[0] = 0; + fscanf(f, "%8192[^\n^\r]", buf); + + // trim line + str = trim_string(buf); + + if (str[0] == 0) continue; + if (str[0] == '#') continue; + + // find parameter (after '=') + param = strchr(str, '='); + + if (param == NULL) continue; + + // split string into two strings + *param = 0; + param++; + + // trim them + str = trim_string(str); + param = trim_string(param); + + if ( strcasecmp(str, "clockgen") == 0 ) + { + if ( strcasecmp(param, "fpll") == 0 ) + { + timings->clockgen = CLOCKGEN_FPLL; + } + else if ( strcasecmp(param, "upll") == 0 ) + { + timings->clockgen = CLOCKGEN_UPLL; + } + else + { + printf("Error parsing clockgen parameter in %s\n", settings_filename); + printf("Setting parameter to default value.\n"); + timings->clockgen = default_timings.clockgen; + } + } + else if ( strcasecmp(str, "timing") == 0 ) + { + if ((strlen(param) > 0) && (strlen(param) < 4)) + { + timings->timing = atoi(param); + } + else + { + printf("Error parsing timing parameter in %s\n", settings_filename); + printf("Setting parameter to default value.\n"); + timings->timing = default_timings.timing; + } + } + else + { + printf("Ignoring unknown setting: %s\n", str); + } + } + + // check range of values we got for timing + if (timings->clockgen == CLOCKGEN_UPLL) + { + if ((timings->timing < -6) || (timings->timing > 10)) + { + printf("Timing parameter specified is not in the valid UPLL range of -6 to 10.\n"); + printf("Setting all values to default.\n"); + timings->clockgen = default_timings.clockgen; + timings->timing = default_timings.clockgen; + } + } + else if (timings->clockgen == CLOCKGEN_FPLL) + { + if ((timings->timing < -20) || (timings->timing > 36)) + { + printf("Timing parameter specified is not in the valid FPLL range of -20 to 36.\n"); + printf("Setting all values to default.\n"); + timings->clockgen = default_timings.clockgen; + timings->timing = default_timings.clockgen; + } + } + else + { + printf("Clockgen not specified, setting all values to default.\n"); + timings->clockgen = default_timings.clockgen; + timings->timing = default_timings.clockgen; + } + + fclose(f); + return 0; +} + + +void *trymmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) +{ + char *p; + int aa; + + //printf ("mmap(%X, %X, %X, %X, %X, %X) ... ", (unsigned int)start, length, prot, flags, fd, (unsigned int)offset); + p = mmap (start, length, prot, flags, fd, offset); + if (p == (char *)0xFFFFFFFF) + { + aa = errno; + printf ("mmap failed. errno = %d\n", aa); + } + else + { + //printf ("OK! (%X)\n", (unsigned int)p); + } + + return p; +} + +unsigned char initphys (void) +{ + memfd = open("/dev/mem", O_RDWR); + if (memfd == -1) + { + printf ("Opening /dev/mem failed\n"); + return 0; + } + + memregs32 = trymmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, memfd, 0xc0000000); + if (memregs32 == (unsigned long *)0xFFFFFFFF) return 0; + + memregs16 = (unsigned short *)memregs32; + + return 1; +} + +void closephys (void) +{ + close (memfd); +} + +int main(int argc, char *argv[]) +{ + // Initialize new timings to default timings for now + new_timings.clockgen = default_timings.clockgen; + new_timings.timing = default_timings.clockgen; + + if (!initphys()) { + printf("Error mapping GPIO registers!\n"); + printf("Exiting..\n"); + return 1; + } + + if (argc > 1) { + // We have been passed command-line parameters + switch (argv[1][1]) { + case 'h': + // display help: + printf("CLI LCD timings adjustment utility written by Senor Quack v1.0\n"); + printf("Copyright (C) 2008 Daniel Silsby\n\n"); + printf(" Portions of code adapted from:\n"); + printf(" CPU/LCD/RAM-Tuner for GP2X Version 2.0\n"); + printf(" Copyright (C) 2006 god_at_hell \n\n"); + printf("OPTIONS:\n"); + printf("-h\t\t:\tDisplay help and version info\n\n"); + printf("-f FILENAME\t:\tRestore saved settings from this file\n\n"); + printf("\t(if not specified, default is %s\n", settings_file); + break; + case 'f': + if (argc > 2) + { + // Good, we got passed a filename (presumably) + if (strlen(argv[2]) < 254) + { + strcpy(settings_file, argv[2]); + } + else + { + printf("Error parsing filename after -f parameter.\n"); + return 1; + } + } + else + { + printf("Error parsing filename after -f parameter.\n"); + return 1; + } + + if (read_saved_timings(settings_file, &new_timings) == 0) + { + //successfully read timings + set_new_timings(new_timings); + } + break; + default: + // invalid parameter + printf("Error: invalid parameter passed, see help by passing -h\n"); + } // switch + } // if (argc > 1) + else + { + printf("No filename specified on command line.\n"); + printf("Using default settings file: %s\n", settings_file); + if (read_saved_timings(settings_file, &new_timings) == 0) + { + //successfully read timings + set_new_timings(new_timings); + } + } + + + closephys(); + return 0; +} + Added: trunk/utils/lcd_timings/adjuster_gui/Makefile =================================================================== --- trunk/utils/lcd_timings/adjuster_gui/Makefile (rev 0) +++ trunk/utils/lcd_timings/adjuster_gui/Makefile 2009-02-28 22:18:39 UTC (rev 367) @@ -0,0 +1,39 @@ +CFLAGS=-c -O2 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz -lSDL -lpthread -lgcc -lm -lc -ldl -msoft-float -O2 + +SOURCES=SFont.c lcdtimings_gui.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=lcdtimings_gui + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_REENTRANT \ + -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(OBJECTS) -o $@ $(LDFLAGS) + $(STRIP) $@ + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f lcdtimings_gui *~ *.o *.bak + Added: trunk/utils/lcd_timings/adjuster_gui/SFont.c =================================================================== --- trunk/utils/lcd_timings/adjuster_gui/SFont.c (rev 0) +++ trunk/utils/lcd_timings/adjuster_gui/SFont.c 2009-02-28 22:18:39 UTC (rev 367) @@ -0,0 +1,182 @@ +/* SFont: a simple font-library that uses special .pngs as fonts + Copyright (C) 2003 Karl Bartel + + License: GPL or LGPL (at your choice) + WWW: http://www.linux-games.com/sfont/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Karl Bartel + Cecilienstr. 14 + 12307 Berlin + GERMANY + ka...@gm... +*/ +#include <SDL.h> + +#include <assert.h> +#include <stdlib.h> +#include "SFont.h" + +//DKS - added for memory debugging: +//#include "..\memwatch.h" + + +static Uint32 GetPixel(SDL_Surface *Surface, Sint32 X, Sint32 Y) +{ + Uint8 *bits; + Uint32 Bpp; + + assert(X>=0); + assert(X<Surface->w); + + Bpp = Surface->format->BytesPerPixel; + bits = ((Uint8 *)Surface->pixels)+Y*Surface->pitch+X*Bpp; + + // Get the pixel + switch(Bpp) { + case 1: + return *((Uint8 *)Surface->pixels + Y * Surface->pitch + X); + break; + case 2: + return *((Uint16 *)Surface->pixels + Y * Surface->pitch/2 + X); + break; + case 3: { // Format/endian independent + Uint8 r, g, b; + r = *((bits)+Surface->format->Rshift/8); + g = *((bits)+Surface->format->Gshift/8); + b = *((bits)+Surface->format->Bshift/8); + return SDL_MapRGB(Surface->format, r, g, b); + } + break; + case 4: + return *((Uint32 *)Surface->pixels + Y * Surface->pitch/4 + X); + break; + } + + return -1; +} + +SFont_Font* SFont_InitFont(SDL_Surface* Surface) +{ + int x = 0, i = 0; + Uint32 pixel; + SFont_Font* Font; + Uint32 pink; + + if (Surface == NULL) + return NULL; + + Font = (SFont_Font *) malloc(sizeof(SFont_Font)); + Font->Surface = Surface; + + SDL_LockSurface(Surface); + + pink = SDL_MapRGB(Surface->format, 255, 0, 255); + while (x < Surface->w) { + if (GetPixel(Surface, x, 0) == pink) { + Font->CharPos[i++]=x; + while((x < Surface->w) && (GetPixel(Surface, x, 0)== pink)) + x++; + Font->CharPos[i++]=x; + } + x++; + } + Font->MaxPos = x-1; + + pixel = GetPixel(Surface, 0, Surface->h-1); + SDL_UnlockSurface(Surface); + SDL_SetColorKey(Surface, SDL_SRCCOLORKEY, pixel); + + return Font; +} + +void SFont_FreeFont(SFont_Font* FontInfo) +{ + SDL_FreeSurface(FontInfo->Surface); + free(FontInfo); +} + +void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, + int x, int y, const char *text) +{ + const char* c; + int charoffset; + SDL_Rect srcrect, dstrect; + + if(text == NULL) + return; + + // these values won't change in the loop + srcrect.y = 1; + dstrect.y = y; + srcrect.h = dstrect.h = Font->Surface->h - 1; + + for(c = text; *c != '\0' && x <= Surface->w ; c++) { + charoffset = ((int) (*c - 33)) * 2 + 1; + // skip spaces and nonprintable characters + if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) { + x += Font->CharPos[2]-Font->CharPos[1]; + continue; + } + + srcrect.w = dstrect.w = + (Font->CharPos[charoffset+2] + Font->CharPos[charoffset+1])/2 - + (Font->CharPos[charoffset] + Font->CharPos[charoffset-1])/2; + srcrect.x = (Font->CharPos[charoffset]+Font->CharPos[charoffset-1])/2; + dstrect.x = x - (float)(Font->CharPos[charoffset] + - Font->CharPos[charoffset-1])/2; + + SDL_BlitSurface(Font->Surface, &srcrect, Surface, &dstrect); + + x += Font->CharPos[charoffset+1] - Font->CharPos[charoffset]; + } +} + +int SFont_TextWidth(const SFont_Font *Font, const char *text) +{ + const char* c; + int charoffset=0; + int width = 0; + + if(text == NULL) + return 0; + + for(c = text; *c != '\0'; c++) { + charoffset = ((int) *c - 33) * 2 + 1; + // skip spaces and nonprintable characters + if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) { + width += Font->CharPos[2]-Font->CharPos[1]; + continue; + } + + width += Font->CharPos[charoffset+1] - Font->CharPos[charoffset]; + } + + return width; +} + +int SFont_TextHeight(const SFont_Font* Font) +{ + return Font->Surface->h - 1; +} + +void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font *Font, + int y, const char *text) +{ + SFont_Write(Surface, Font, Surface->w/2 - SFont_TextWidth(Font, text)/2, + y, text); +} + Added: trunk/utils/lcd_timings/adjuster_gui/SFont.h =================================================================== --- trunk/utils/lcd_timings/adjuster_gui/SFont.h (rev 0) +++ trunk/utils/lcd_timings/adjuster_gui/SFont.h 2009-02-28 22:18:39 UTC (rev 367) @@ -0,0 +1,83 @@ +/* SFont: a simple font-library that uses special bitmaps as fonts + Copyright (C) 2003 Karl Bartel + + License: GPL or LGPL (at your choice) + WWW: http://www.linux-games.com/sfont/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Karl Bartel + Cecilienstr. 14 + 12307 Berlin + GERMANY + ka...@gm... +*/ + +/************************************************************************ +* SFONT - SDL Font Library by Karl Bartel <ka...@gm...> * +* * +* All functions are explained below. For further information, take a * +* look at the example files, the links at the SFont web site, or * +* contact me, if you problem isn' addressed anywhere. * +* * +************************************************************************/ +#ifndef SFONT_H +#define SFONT_H + +#include <SDL.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// Delcare one variable of this type for each font you are using. +// To load the fonts, load the font image into YourFont->Surface +// and call InitFont( YourFont ); +typedef struct { + SDL_Surface *Surface; + int CharPos[512]; + int MaxPos; +} SFont_Font; + +// Initializes the font +// Font: this contains the suface with the font. +// The Surface must be loaded before calling this function +SFont_Font* SFont_InitFont (SDL_Surface *Font); + +// Frees the font +// Font: The font to free +// The font must be loaded before using this function. +void SFont_FreeFont(SFont_Font* Font); + +// Blits a string to a surface +// Destination: the suface you want to blit to +// text: a string containing the text you want to blit. +void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, int x, int y, + const char *text); + +// Returns the width of "text" in pixels +int SFont_TextWidth(const SFont_Font* Font, const char *text); +// Returns the height of "text" in pixels (which is always equal to Font->Surface->h) +int SFont_TextHeight(const SFont_Font* Font); + +// Blits a string to Surface with centered x position +void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font* Font, int y, + const char *text); + +#ifdef __cplusplus +} +#endif + +#endif /* SFONT_H */ Added: trunk/utils/lcd_timings/adjuster_gui/img/animation.png =================================================================== (Binary files differ) Property changes on: trunk/utils/lcd_timings/adjuster_gui/img/animation.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/utils/lcd_timings/adjuster_gui/img/bg.png =================================================================== (Binary files differ) Property changes on: trunk/utils/lcd_timings/adjuster_gui/img/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/utils/lcd_timings/adjuster_gui/img/font_wh.png =================================================================== (Binary files differ) Property changes on: trunk/utils/lcd_timings/adjuster_gui/img/font_wh.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.c =================================================================== --- trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.c (rev 0) +++ trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.c 2009-02-28 22:18:39 UTC (rev 367) @@ -0,0 +1,830 @@ +/* lcdadjuster.c LCD adjustment utility for Open2X. + Copyright (C) 2008 Dan Silsby (Senor Quack) + Portions of code based on : + + cpuctrl.c for GP2X (CPU/LCD/RAM-Tuner Version 2.0) + Copyright (C) 2006 god_at_hell + original CPU-Overclocker (c) by Hermes/PS2Reality + the gamma-routine was provided by theoddbot + parts (c) Rlyehs Work + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> +#include <SDL.h> +#include <SDL_image.h> +#include <SDL_gfxPrimitives.h> +#include "SFont.h" + +#define CLOCKGEN_UPLL 1 +#define CLOCKGEN_FPLL 2 + +#define GPIOAPINLVL 0x1180 +#define GPIOBPINLVL 0x1182 +#define GPIOCPINLVL 0x1184 +#define GPIODPINLVL 0x1186 +#define GPIOEPINLVL 0x1188 +#define GPIOFPINLVL 0x118A +#define GPIOGPINLVL 0x118C +#define GPIOHPINLVL 0x118E +#define GPIOIPINLVL 0x1190 +#define GPIOJPINLVL 0x1192 +#define GPIOKPINLVL 0x1194 +#define GPIOLPINLVL 0x1196 +#define GPIOMPINLVL 0x1198 +#define GPIONPINLVL 0x119A +#define GPIOOPINLVL 0x119C + +#define GPIOAOUT 0x1060 +#define GPIOBOUT 0x1062 +#define GPIOCOUT 0x1064 +#define GPIODOUT 0x1066 +#define GPIOEOUT 0x1068 +#define GPIOFOUT 0x106A +#define GPIOGOUT 0x106C +#define GPIOHOUT 0x106E +#define GPIOIOUT 0x1070 +#define GPIOJOUT 0x1072 +#define GPIOKOUT 0x1074 +#define GPIOLOUT 0x1076 +#define GPIOMOUT 0x1078 +#define GPIONOUT 0x107A +#define GPIOOOUT 0x107C + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_L (11) +#define GP2X_BUTTON_R (10) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) +#define NUMBUTTONS (19) // total number of buttons we'll need to keep track of + +extern int errno; +unsigned long *memregs32; +unsigned short *memregs16; +FILE settings_file; +int memfd; + +//global surfaces +SDL_Surface* screen; // framebuffer +SDL_Surface* background; // background containing test images, etc +SDL_Surface* animation; // animation to show interlacing + +//global fonts +SFont_Font *font_wh; //white + +//global joysticks +SDL_Joystick* joy; + +//global constants +const int screenw = 320; +const int screenh = 240; +const int screenbpp = 16; +const int screenflags = SDL_DOUBLEBUF; +const int upll_max = 10; // Min and max timings for each clockgen, upll and fpll +const int upll_min = -6; +const int fpll_max = 36; +const int fpll_min = -20; + +//const char* settings_filename = "/etc/config/open2x_lcdsettings.conf"; +char settings_filename[255] = "/etc/config/open2x_lcdsettings.conf"; + +struct lcd_timings +{ + unsigned int clockgen; + signed int timing; +}; + +struct lcd_timings original_timings, current_timings; + +// default is UPLL clockgen, timing of 1 +const struct lcd_timings default_timings = { CLOCKGEN_UPLL, 1 }; + +void set_add_FLCDCLK(int addclock) +{ + //Set LCD controller to use FPLL + printf ("...set to FPLL-Clockgen...\r\n"); + printf ("set Timing-Prescaler = %i\r\n",addclock); + memregs16[0x924>>1]= 0x5A00 + ((addclock)<<8); +} + +void set_add_ULCDCLK(int addclock) +{ + //Set LCD controller to use UPLL + printf ("...set to UPLL-Clockgen...\r\n"); + printf ("set Timing-Prescaler = %i\r\n",addclock); + memregs16[0x0924>>1] = 0x8900 + ((addclock)<<8); +} + +unsigned get_LCDClk() +{ + if (memregs16[0x0924>>1] < 0x7A01) return((memregs16[0x0924>>1] - 0x5A00)>>8); + else return((memregs16[0x0924>>1] - 0x8900)>>8); +} + +char *trim_string(char *buf) +{ + int len; + + while (*buf == ' ') buf++; + + len = strlen(buf); + + while (len != 0 && buf[len - 1] == ' ') + { + len--; + buf[len] = 0; + } + + return buf; +} + +void set_new_timings(const struct lcd_timings timings) +{ + if (timings.clockgen == CLOCKGEN_UPLL) + { + if ((timings.timing >= upll_min) && (timings.timing <= upll_max)) + { + printf("Setting clockgen to UPLL, timing: %d\n", timings.timing); + set_add_ULCDCLK(timings.timing); + } + } + else if (timings.clockgen == CLOCKGEN_FPLL) + { + if ((timings.timing >= fpll_min) && (timings.timing <= fpll_max)) + { + printf("Setting clockgen to FPLL, timing: %d\n", timings.timing); + set_add_FLCDCLK(timings.timing); + } + } +} + +// Return 1 on success, 0 on error. Write settings from timings structure. +int write_new_timings(const char *filename, struct lcd_timings timings) +{ + FILE *f; + char buf[50]; + + f = fopen(filename, "w"); + if (f == NULL) + { + printf("Error opening file for writing: %s\n", filename); + return 0; + } + else + { + printf("Writing settings to file: %s\n", filename); + } + + if (timings.clockgen == CLOCKGEN_FPLL) + { + fprintf(f, "clockgen=fpll\n"); + } + else + { + fprintf(f, "clockgen=upll\n"); + } + + sprintf(buf, "timing=%d\n", timings.timing); + fprintf(f, buf); + + return (fclose(f) == 0); +} + +// Return 1 on success, 0 on error. Read settings into *timings structure. +int read_saved_timings(const char *filename, struct lcd_timings *timings) +{ + FILE *f; + char buf[8192]; + char *str, *param; + + f = fopen(filename, "r"); + if (f == NULL) + { + printf("Error opening file: %s\n", filename); + return 0; + } + else + { + printf("Loading settings from file: %s\n", filename); + } + + while (!feof(f)) + { + // skip empty lines + fscanf(f, "%8192[\n\r]", buf); + + // read line + buf[0] = 0; + fscanf(f, "%8192[^\n^\r]", buf); + + // trim line + str = trim_string(buf); + + if (str[0] == 0) continue; + if (str[0] == '#') continue; + + // find parameter (after '=') + param = strchr(str, '='); + + if (param == NULL) continue; + + // split string into two strings + *param = 0; + param++; + + // trim them + str = trim_string(str); + param = trim_string(param); + + if ( strcasecmp(str, "clockgen") == 0 ) + { + if ( strcasecmp(param, "fpll") == 0 ) + { + timings->clockgen = CLOCKGEN_FPLL; + } + else if ( strcasecmp(param, "upll") == 0 ) + { + timings->clockgen = CLOCKGEN_UPLL; + } + else + { + printf("Error parsing clockgen parameter in %s\n", filename); + printf("Setting parameter to default value.\n"); + timings->clockgen = default_timings.clockgen; + } + } + else if ( strcasecmp(str, "timing") == 0 ) + { + if ((strlen(param) > 0) && (strlen(param) < 4)) + { + timings->timing = atoi(param); + } + else + { + printf("Error parsing timing parameter in %s\n", filename); + printf("Setting parameter to default value.\n"); + timings->timing = default_timings.timing; + } + } + else + { + printf("Ignoring unknown setting: %s\n", str); + } + } + + // check range of values we got for timing + if (timings->clockgen == CLOCKGEN_UPLL) + { + if ((timings->timing < upll_min) || (timings->timing > upll_max)) + { + printf("Timing parameter specified is not in the valid UPLL range of -6 to 10.\n"); + printf("Setting all values to default.\n"); + timings->clockgen = default_timings.clockgen; + timings->timing = default_timings.clockgen; + } + } + else if (timings->clockgen == CLOCKGEN_FPLL) + { + if ((timings->timing < fpll_min) || (timings->timing > fpll_max)) + { + printf("Timing parameter specified is not in the valid FPLL range of -20 to 36.\n"); + printf("Setting all values to default.\n"); + timings->clockgen = default_timings.clockgen; + timings->timing = default_timings.clockgen; + } + } + else + { + printf("Clockgen not specified, setting all values to default.\n"); + timings->clockgen = default_timings.clockgen; + timings->timing = default_timings.clockgen; + } + + fclose(f); + return 1; +} + + +void *trymmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) +{ + char *p; + int aa; + + //printf ("mmap(%X, %X, %X, %X, %X, %X) ... ", (unsigned int)start, length, prot, flags, fd, (unsigned int)offset); + p = mmap (start, length, prot, flags, fd, offset); + if (p == (char *)0xFFFFFFFF) + { + aa = errno; + printf ("mmap failed. errno = %d\n", aa); + } + else + { + //printf ("OK! (%X)\n", (unsigned int)p); + } + + return p; +} + +int init_gpio (void) +{ + memfd = open("/dev/mem", O_RDWR); + if (memfd == -1) + { + printf ("Opening /dev/mem failed\n"); + return 0; + } + + memregs32 = trymmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, memfd, 0xc0000000); + if (memregs32 == (unsigned long *)0xFFFFFFFF) return 0; + + memregs16 = (unsigned short *)memregs32; + + return 1; +} + +void closephys (void) +{ + close (memfd); +} + + +int load_graphics(void) +{ + SDL_Surface *tmp_sur, *tmp_sur2; + + // animation that moves to show interlacing + tmp_sur = IMG_Load("img/animation.png"); + if (!tmp_sur) + { + fprintf(stderr, "Fatal error loading: img/animation.png\n"); + return 0; + } + animation = SDL_DisplayFormat(tmp_sur); + SDL_SetColorKey(animation, SDL_SRCCOLORKEY, SDL_MapRGB(screen->format, 255, 0, 255)); + SDL_FreeSurface(tmp_sur); + + // Background image with test gradients + tmp_sur = IMG_Load("img/bg.png"); + if (!tmp_sur) + { + fprintf(stderr, "Fatal error loading: img/bg.png\n"); + return 0; + } + background = SDL_DisplayFormat(tmp_sur); + SDL_FreeSurface(tmp_sur); + + //Font + tmp_sur = IMG_Load("img/font_wh.png"); + if (!tmp_sur) + { + fprintf ( stderr,"Fatal error loading: img/font_wh.png\n" ); + return 1; + } + tmp_sur2 = SDL_DisplayFormat(tmp_sur); + font_wh = SFont_InitFont(tmp_sur2); + if (!font_wh) + { + fprintf ( stderr,"Fatal error intializing SFont on font_wh.png\n" ); + return 1; + } + SDL_FreeSurface(tmp_sur); + + + return 1; +} + +void unload_graphics(void) +{ + SDL_FreeSurface(background); + SDL_FreeSurface(animation); + + if (font_wh) + { + SFont_FreeFont(font_wh); + } +} + +void shutdown(void) +{ + unload_graphics(); + SDL_Quit(); + closephys(); +} + + +int menu(void) +{ + const int menu_delay = 10; // Menu loop delay in ms + int quit = 0; + int wants_to_save = 0; + + int animation_y = 0; // Where on the screen's y axis is the animation being blitted to? + int animation_y_max = animation->h - 1; // Max on y axis to blit to before going back to 0 + int animation_vel = 1; + + int last_input_time = 0; // What was the ticks value when we last took a button input? + + SDL_Rect srcrect, dstrect; + + const int line_y[4] = { 13, 23, 33, 43 }; + const int line_x = 90; + const int num_lines = 4; + + int current_line = 0; // What line of the menu to start on? + + char tmp_str[10]; // for drawing the timing on the menu + +#define TIMING_LINE 0 +#define CLOCKGEN_LINE 1 +#define QUIT_AND_SAVE_LINE 2 +#define QUIT_LINE 3 + + int i; + for (i = 0; i < 77; i+=4) + { + //blit background + SDL_BlitSurface(background, NULL, screen, NULL); + // animated menu border + rectangleRGBA(screen, ((screenw >> 1) - i), 1, ((screenw >> 1) + i), 58, + 255, 255, 255, 255); + dstrect.x = (screenw >> 1) - i + 1; + dstrect.y = 2; + dstrect.w = ((screenw >> 1) + i) - ((screenw >> 1) - i) - 2; + dstrect.h = 55; + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); + SDL_Flip(screen); +// SDL_Delay(10); + } + + while (!quit) + { + // menu loop + + //blit background + SDL_BlitSurface(background, NULL, screen, NULL); + + // blit background color over which animation will be drawn + dstrect.x = 0; + dstrect.y = 0; + dstrect.w = screenw; + dstrect.h = animation->h; +// SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); +// SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 150, 150, 150)); + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 0, 0, 0)); + + // blit animation to show interlacing + srcrect.x = 0; + srcrect.y = 0; + srcrect.w = animation->w; + srcrect.h = animation->h - animation_y; + + dstrect.x = 0; + dstrect.y = animation_y; + dstrect.w = srcrect.w; + dstrect.h = srcrect.h; + + SDL_BlitSurface(animation, &srcrect, screen, &dstrect); + + if (animation_y != 0) + { + // blit remaining portion of animation higher up on screen than what we just blitted + srcrect.x = 0; + srcrect.y = animation->h - animation_y; + srcrect.w = animation->w; + srcrect.h = animation_y; + + dstrect.x = 0; + dstrect.y = 0; + dstrect.w = srcrect.w; + dstrect.h = srcrect.h; + + SDL_BlitSurface(animation, &srcrect, screen, &dstrect); + } + + animation_y += animation_vel; + if (animation_y > animation_y_max) + { + animation_y = 0; + } + + //blit menu border & BG + rectangleRGBA(screen, ((screenw >> 1) - 80), 1, ((screenw >> 1) + 80), 58, + 255, 255, 255, 255); + dstrect.x = (screenw >> 1) - 80 + 1; + dstrect.y = 2; + dstrect.w = ((screenw >> 1) + 80) - ((screenw >> 1) - 80) - 1; + dstrect.h = 56; + SDL_FillRect(screen, &dstrect, SDL_MapRGB(screen->format, 50, 50, 50)); + + SFont_WriteCenter(screen, font_wh, 0, "Open2X LCD Calibration Utility"); + + // draw menu text + SFont_Write(screen, font_wh, line_x, line_y[TIMING_LINE], "Timing:"); + sprintf(tmp_str, "%d", current_timings.timing); + SFont_Write(screen, font_wh, line_x + 45, line_y[TIMING_LINE], tmp_str); + SFont_Write(screen, font_wh, line_x + 73, line_y[TIMING_LINE], "(default is 1)"); + SFont_Write(screen, font_wh, line_x, line_y[CLOCKGEN_LINE], "ClockGen:"); + if (current_timings.clockgen == CLOCKGEN_UPLL) + { + SFont_Write(screen, font_wh, line_x + 45, line_y[CLOCKGEN_LINE], "UPLL"); + } + else + { + SFont_Write(screen, font_wh, line_x + 45, line_y[CLOCKGEN_LINE], "FPLL"); + } + SFont_Write(screen, font_wh, line_x + 73, line_y[CLOCKGEN_LINE], "(default is UPLL)"); + SFont_Write(screen, font_wh, line_x, line_y[QUIT_AND_SAVE_LINE], "Save and exit"); + SFont_Write(screen, font_wh, line_x, line_y[QUIT_LINE], "Abandon changes and exit"); + + // draw cursor + SFont_Write(screen, font_wh, line_x - 4, line_y[current_line], ">"); + SFont_Write(screen, font_wh, line_x - 6, line_y[current_line] - 1, "-"); + + // update screen and wait a bit + SDL_Flip(screen); + SDL_Delay(menu_delay); + + if ((SDL_GetTicks() - last_input_time) > 150) + { + // 150ms has passed since last accepting input + SDL_JoystickUpdate(); + +// if (SDL_JoystickGetButton(joy, GP2X_BUTTON_START)) +// { +// quit = 1; +// break; +// } + if (SDL_JoystickGetButton(joy, GP2X_BUTTON_B)) + { + switch (current_line) + { + case TIMING_LINE: + current_timings.timing++; + if (current_timings.timing > (current_timings.clockgen == CLOCKGEN_UPLL ? + upll_max : fpll_max)) + { + // loop around to minimum timing + current_timings.timing = (current_timings.clockgen == CLOCKGEN_UPLL ? + upll_min : fpll_min); + } + set_new_timings(current_timings); + break; + case CLOCKGEN_LINE: + current_timings.clockgen = (current_timings.clockgen == CLOCKGEN_UPLL ? + CLOCKGEN_FPLL : CLOCKGEN_UPLL); + current_timings.timing = 1; // since each has a different valid range + set_new_timings(current_timings); + break; + case QUIT_AND_SAVE_LINE: + quit = 1; + wants_to_save = 1; + break; + case QUIT_LINE: + quit = 1; + break; + default: + break; + } + } + if (SDL_JoystickGetButton(joy, GP2X_BUTTON_RIGHT)) + { + switch (current_line) + { + case TIMING_LINE: + current_timings.timing++; + if (current_timings.timing > (current_timings.clockgen == CLOCKGEN_UPLL ? + upll_max : fpll_max)) + { + // loop around to minimum timing + current_timings.timing = (current_timings.clockgen == CLOCKGEN_UPLL ? + upll_min : fpll_min); + } + set_new_timings(current_timings); + break; + case CLOCKGEN_LINE: + current_timings.clockgen = (current_timings.clockgen == CLOCKGEN_UPLL ? + CLOCKGEN_FPLL : CLOCKGEN_UPLL); + current_timings.timing = 1; // since each has a different valid range + set_new_timings(current_timings); + break; + default: + break; + } + } + if (SDL_JoystickGetButton(joy, GP2X_BUTTON_LEFT)) + { + switch (current_line) + { + case TIMING_LINE: + current_timings.timing--; + if (current_timings.timing < (current_timings.clockgen == CLOCKGEN_UPLL ? + upll_min : fpll_min)) + { + // loop around to maximum timing + current_timings.timing = (current_timings.clockgen == CLOCKGEN_UPLL ? + upll_max : fpll_max); + } + set_new_timings(current_timings); + break; + case CLOCKGEN_LINE: + current_timings.clockgen = (current_timings.clockgen == CLOCKGEN_UPLL ? + CLOCKGEN_FPLL : CLOCKGEN_UPLL); + current_timings.timing = 1; // since each has a different valid range + set_new_timings(current_timings); + break; + default: + break; + } + } + if (SDL_JoystickGetButton(joy, GP2X_BUTTON_UP)) + { + current_line--; + if (current_line < 0) + { + current_line = num_lines - 1; + } + } + if (SDL_JoystickGetButton(joy, GP2X_BUTTON_DOWN)) + { + current_line++; + if (current_line >= num_lines) + { + current_line = 0; + } + } + + last_input_time = SDL_GetTicks(); + } + } + + return wants_to_save; +} + +int initialize(void) +{ + if (!(screen = SDL_SetVideoMode(screenw, screenh, screenbpp, screenflags))) + { + fprintf(stderr, "cannot open %dx%d display: %s\n", + screenw, screenh, SDL_GetError()); + return 0; + } + + SDL_ShowCursor(SDL_DISABLE); + + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { + fprintf(stderr, "Cannot initialize SDL system: %s\n", SDL_GetError()); + return 0; + } + + joy = SDL_JoystickOpen(0); + if (joy == NULL) + { + fprintf(stderr, "Cannot initialize GP2X joystick: %s\n", SDL_GetError()); + } + + if (!load_graphics()) { + fprintf(stderr, "Error loading sprites/fonts.\n"); + return 0; + } + + if (!init_gpio()) { + fprintf(stderr, "Error mapping GPIO registers!\n"); + return 0; + } + + return 1; +} + +int main(int argc, char *argv[]) +{ + // Initialize new timings to default timings for now + current_timings.clockgen = default_timings.clockgen; + current_timings.timing = default_timings.clockgen; + original_timings = current_timings; + + if (argc > 1) { + // We have been passed command-line parameters + switch (argv[1][1]) { + case 'h': + // display help: + printf("GUI LCD timings adjustment utility written by Senor Quack v1.0\n"); + printf("Copyright (C) 2008 Daniel Silsby\n\n"); + printf(" Portions of code adapted from:\n"); + printf(" CPU/LCD/RAM-Tuner for GP2X Version 2.0\n"); + printf(" Copyright (C) 2006 god_at_hell \n\n"); + printf("OPTIONS:\n"); + printf("-h\t\t:\tDisplay help and version info\n\n"); + printf("-f FILENAME\t:\tRestore saved settings from a file\n\n"); + printf("\t(if not specified, default is %s\n", settings_filename); + return 0; + break; + case 'f': + if (argc > 2) + { + // Good, we got passed a filename (presumably) + if (strlen(argv[2]) < 254) + { + strcpy(settings_filename, argv[2]); + } + else + { + printf("Error parsing filename after -f parameter.\n"); + return 1; + } + } + else + { + printf("Error parsing filename after -f parameter.\n"); + return 1; + } + + break; + default: + // invalid parameter + printf("Error: invalid parameter passed, see help by passing -h\n"); + } // switch + } + + // Initialize graphics, load sprits/fonts etc, mmap registers + if (!initialize()) + { + fprintf(stderr, "Aborting because of initialization errors.\n"); + return 1; + } + + // Return 0 on success, -1 on error. Read settings into *timings structure. + if (!read_saved_timings(settings_filename, &original_timings)) + { + printf("Unable to read timings from %s, using defaults values.\n", settings_filename); + original_timings.clockgen = default_timings.clockgen; + original_timings.timing = default_timings.timing; + } + + // current_timings will contain any possible new timings being tried out, + // original_timings will contain the original settings as read from the file + + current_timings = original_timings; + + // RUN MENU LOOP + if (menu()) + { + // Returned 1, user wanted to save new values + printf("User requested to save new LCD timings.\n"); + if (write_new_timings(settings_filename, current_timings)) + { + printf("Successfully saved new values.\n"); + } + else + { + printf("Problem occurred writing new values.\n"); + } + + sync(); + } + else + { + // Returned 0, user wants to abandon new timings + set_new_timings(original_timings); + printf("Restored original timings.\n"); + } + + shutdown(); + + return 0; +} + Added: trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.png =================================================================== (Binary files differ) Property changes on: trunk/utils/lcd_timings/adjuster_gui/lcdtimings_gui.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-28 22:15:56
|
Revision: 366 http://open2x.svn.sourceforge.net/open2x/?rev=366&view=rev Author: senquack Date: 2009-02-28 22:15:52 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Added source code to buttonquery utility Added Paths: ----------- trunk/utils/buttonquery/ trunk/utils/buttonquery/Makefile trunk/utils/buttonquery/buttonquery.c Added: trunk/utils/buttonquery/Makefile =================================================================== --- trunk/utils/buttonquery/Makefile (rev 0) +++ trunk/utils/buttonquery/Makefile 2009-02-28 22:15:52 UTC (rev 366) @@ -0,0 +1,39 @@ +CFLAGS=-c -O2 -g -Wall -DPLATFORM_GP2X -mcpu=arm920t -mtune=arm920 -ffast-math -W -Wall -pthread -msoft-float + +#LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lgcc -lm -lc -ldl -larmmem -msoft-float -O2 +LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lgcc -lm -lc -ldl -larmmem -msoft-float -O2 + +SOURCES=buttonquery.c + + +OBJECTS=$(SOURCES:.c=.o) +EXECUTABLEGP=buttonquery + +CC=arm-open2x-linux-gcc +STRIP=arm-open2x-linux-strip +CFLAGS+=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ \ + -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include/ \ + -D_REENTRANT -msoft-float -DPLATFORM_GP2X + +all: + make gpversion + +gpversion: $(SOURCES) $(EXECUTABLEGP) + + +$(EXECUTABLEGP): $(OBJECTS) +# $(CC) $(LDFLAGS) -static $(OBJECTS) -o $@ $(GPLDFLAGS) + $(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(GPLDFLAGS) + $(STRIP) $@ + + + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +cleanobjs: + rm -f $(OBJECTS) + +clean: + -rm -f buttonquery *~ *.o *.bak + Added: trunk/utils/buttonquery/buttonquery.c =================================================================== --- trunk/utils/buttonquery/buttonquery.c (rev 0) +++ trunk/utils/buttonquery/buttonquery.c 2009-02-28 22:15:52 UTC (rev 366) @@ -0,0 +1,314 @@ +#include <stdlib.h> +#include <stdio.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <linux/fb.h> +#include <unistd.h> +#include <stropts.h> +#include <errno.h> + +extern int errno; +unsigned long *memregs32; +unsigned short *memregs16; + +int memfd; + +#define GPIOAPINLVL 0x1180 +#define GPIOBPINLVL 0x1182 +#define GPIOCPINLVL 0x1184 +#define GPIODPINLVL 0x1186 +#define GPIOEPINLVL 0x1188 +#define GPIOFPINLVL 0x118A +#define GPIOGPINLVL 0x118C +#define GPIOHPINLVL 0x118E +#define GPIOIPINLVL 0x1190 +#define GPIOJPINLVL 0x1192 +#define GPIOKPINLVL 0x1194 +#define GPIOLPINLVL 0x1196 +#define GPIOMPINLVL 0x1198 +#define GPIONPINLVL 0x119A +#define GPIOOPINLVL 0x119C + +#define GPIOAOUT 0x1060 +#define GPIOBOUT 0x1062 +#define GPIOCOUT 0x1064 +#define GPIODOUT 0x1066 +#define GPIOEOUT 0x1068 +#define GPIOFOUT 0x106A +#define GPIOGOUT 0x106C +#define GPIOHOUT 0x106E +#define GPIOIOUT 0x1070 +#define GPIOJOUT 0x1072 +#define GPIOKOUT 0x1074 +#define GPIOLOUT 0x1076 +#define GPIOMOUT 0x1078 +#define GPIONOUT 0x107A +#define GPIOOOUT 0x107C + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_L (11) +#define GP2X_BUTTON_R (10) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) + + +void *trymmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) +{ + char *p; + int aa; + + //printf ("mmap(%X, %X, %X, %X, %X, %X) ... ", (unsigned int)start, length, prot, flags, fd, (unsigned int)offset); + p = mmap (start, length, prot, flags, fd, offset); + if (p == (char *)0xFFFFFFFF) + { + aa = errno; + printf ("failed. errno = %d\n", aa); + } + else + { + //printf ("OK! (%X)\n", (unsigned int)p); + } + + return p; +} + +unsigned char initphys (void) +{ + memfd = open("/dev/mem", O_RDWR); + if (memfd == -1) + { + printf ("Open failed\n"); + return 0; + } + + //printf ("/dev/mem opened successfully - fd = %d\n", memfd); + + memregs32 = trymmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, memfd, 0xc0000000); + if (memregs32 == (unsigned long *)0xFFFFFFFF) return 0; + + memregs16 = (unsigned short *)memregs32; + + return 1; +} + +void closephys (void) +{ + close (memfd); +} + +// return status of a specific GP2X button, 1 if pressed, 0 if not +int getstatus (int number) +{ + unsigned long mask = 0; + switch (number) { + case GP2X_BUTTON_UP: + mask = 1; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_DOWN: + mask = 1 << 4; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_LEFT: + mask = 1 << 2; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_RIGHT: + mask = 1 << 6; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_UPLEFT: + mask = 1 << 1; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_UPRIGHT: + mask = 1 << 7; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_DOWNLEFT: + mask = 1 << 3; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_DOWNRIGHT: + mask = 1 << 5; + if (~(memregs16[GPIOMPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_VOLDOWN: + mask = 1 << 6; + if (~(memregs16[GPIODPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_VOLUP: + mask = 1 << 7; + if (~(memregs16[GPIODPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_CLICK: + mask = 1 << 11; + if (~(memregs16[GPIODPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_L: + mask = 1 << 10; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_R: + mask = 1 << 11; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_A: + mask = 1 << 12; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_B: + mask = 1 << 13; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_X: + mask = 1 << 14; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_Y: + mask = 1 << 15; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_SELECT: + mask = 1 << 9; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + case GP2X_BUTTON_START: + mask = 1 << 8; + if (~(memregs16[GPIOCPINLVL >> 1]) & mask) + return 1; + break; + default: + // shouldn't happen + printf("error in getstatus()\n"); + return 0; + break; + } + + return 0; +} + + +int main(int argc, char *argv[]) +{ + int i; + + + if (!initphys()) { + printf("Error mapping GPIO registers!\n"); + printf("Exiting..\n"); + return 100; + } + + if (argc > 1) { + // We have been passed command-line parameters + switch (argv[1][1]) { + case 'h': + // display help: + printf("GP2X button input utility written by Senor Quack v1.0\n\n"); + printf("OPTIONS:\n"); + printf("-h\t\t\t:\tDisplay help and version info\n\n"); + printf("-sBUTTON_NUMBER\t\t:\tGet current status of a specific button.\n"); + printf("\t\t\t\t(Returns immediately, return status is 0 or 1, 1 if button is pressed.)\n"); + printf("\t\t\t\tBUTTON_NUMBER is one of the following:\n\n"); + printf("\tGP2X_BUTTON_UP\t\t\t0\t\tGP2X_BUTTON_A\t\t12\n"); + printf("\tGP2X_BUTTON_DOWN\t\t4\t\tGP2X_BUTTON_B\t\t13\n"); + printf("\tGP2X_BUTTON_LEFT\t\t2\t\tGP2X_BUTTON_X\t\t15\n"); + printf("\tGP2X_BUTTON_RIGHT\t\t6\t\tGP2X_BUTTON_Y\t\t14\n"); + printf("\tGP2X_BUTTON_UPLEFT\t\t1\t\tGP2X_BUTTON_L\t\t11\n"); + printf("\tGP2X_BUTTON_UPRIGHT\t\t7\t\tGP2X_BUTTON_R\t\t10\n"); + printf("\tGP2X_BUTTON_DOWNLEFT\t\t3\t\tGP2X_BUTTON_START\t8\n"); + printf("\tGP2X_BUTTON_DOWNRIGHT\t\t5\t\tGP2X_BUTTON_SELECT\t9\n"); + printf("\tGP2X_BUTTON_CLICK\t\t18\t\tGP2X_BUTTON_VOLUP\t16\n"); + printf("\t\t\t\t\t\t\tGP2X_BUTTON_VOLDOWN\t17\n\n"); + printf("* If no option is passed, this program will wait until a button is pressed.\n\n"); + printf("* The return value upon exiting is one of the values listed above, corresponding\n"); + printf("\tto the button pressed before exiting.\n\n"); + printf("* Utility returns 100 on error.\n"); + break; + case 's': + // caller wants status of specific button, return immediately regardless of whether any buttons are pressed. + if (argv[1][2] == '\0') { + //caller didn't supply required argument to -s + printf("Error: -s requires a parameter, see help by passing -h\n"); + } else { + int button_wanted = atoi(&argv[1][2]); + if ((button_wanted < 0) || (button_wanted > 18)) { + //caller supplied button number that is out of range + printf("Error: button value out of range, see help by passing -h\n"); + } else { + //OK, get down to returning status of specified button + + if (getstatus(button_wanted)) { + closephys(); + return 1; + } else { + closephys(); + return 0; + } + } + } + break; + default: + // invalid parameter + printf("Error: invalid parameter passed, see help by passing -h\n"); + closephys(); + return 100; + } // switch + } // if (argc > 1) + else { + // we weren't passed a command line parameter, so we should block until a button is pressed + int can_exit = 0; + int button_pressed; + while (!can_exit) { + for (i = 0; i <= 18; i++) { + if (getstatus(i)) { + button_pressed = i; + can_exit = 1; + break; + } + } + sleep(.005); //sleep 5ms + } + + closephys(); + return button_pressed; + } + + closephys(); + + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-28 10:18:09
|
Revision: 365 http://open2x.svn.sourceforge.net/open2x/?rev=365&view=rev Author: senquack Date: 2009-02-28 10:18:06 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Code cleanup, made sure services icons will never be displayed under Open2X Modified Paths: -------------- trunk/utils/gmenu2x/src/gmenu2x.cpp Modified: trunk/utils/gmenu2x/src/gmenu2x.cpp =================================================================== --- trunk/utils/gmenu2x/src/gmenu2x.cpp 2009-02-27 09:21:11 UTC (rev 364) +++ trunk/utils/gmenu2x/src/gmenu2x.cpp 2009-02-28 10:18:06 UTC (rev 365) @@ -396,9 +396,6 @@ // Surface sd_removed("imgs/sd_removed.png", confStr["skin"]); Surface cpu("imgs/cpu.png", confStr["skin"]); Surface volume("imgs/volume.png", confStr["skin"]); - //senquack - added optional display of uptime to help gauge battery life: -// Surface uptime("imgs/clock.png", confStr["skin"]); - //senquack - added support for removable SDs and appropriate visual indication if (fwType != "open2x") @@ -443,24 +440,27 @@ int serviceX = resX - (f200 ? 19 : 38); - if (confInt["showServices"]) + if (fwType != "open2x") { - if (usbnet) { - if (web) { - Surface webserver("imgs/webserver.png", confStr["skin"]); - webserver.blit( sc["bgmain"], serviceX, bottomBarIconY ); - serviceX -= 19; + if (confInt["showServices"]) + { + if (usbnet) { + if (web) { + Surface webserver("imgs/webserver.png", confStr["skin"]); + webserver.blit( sc["bgmain"], serviceX, bottomBarIconY ); + serviceX -= 19; + } + if (samba) { + Surface sambaS("imgs/samba.png", confStr["skin"]); + sambaS.blit( sc["bgmain"], serviceX, bottomBarIconY ); + serviceX -= 19; + } + if (inet) { + Surface inetS("imgs/inet.png", confStr["skin"]); + inetS.blit( sc["bgmain"], serviceX, bottomBarIconY ); + serviceX -= 19; + } } - if (samba) { - Surface sambaS("imgs/samba.png", confStr["skin"]); - sambaS.blit( sc["bgmain"], serviceX, bottomBarIconY ); - serviceX -= 19; - } - if (inet) { - Surface inetS("imgs/inet.png", confStr["skin"]); - inetS.blit( sc["bgmain"], serviceX, bottomBarIconY ); - serviceX -= 19; - } } } } @@ -892,10 +892,8 @@ bool quit = false; - //senquack - original line: int x,y, offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6, helpBoxHeight = fwType=="open2x" ? 154 : 139; - uint i; long tickBattery = -60000, tickNow; string batteryIcon = "imgs/battery/0.png"; @@ -905,9 +903,6 @@ // senquack - keep track of if we need to reload the links/background because // SD has just been removed/inserted bool needToReloadLinks = false; -// bool SDinserted = mountPointUsed("/mnt/sd"); -// bool SDinserted = (getDiskFree() != ""); - bool SDinserted = (fwType == "open2x") ? isSDInserted() : true; string df = getDiskFree(); @@ -931,8 +926,6 @@ { //senquack - need to track if an SD has just been removed or inserted. If so, we need // to reload the links and background sprite - // if (mountPointUsed("/mnt/sd")) - // if (getDiskFree() != "") if (isSDInserted()) { if (!SDinserted) @@ -1035,7 +1028,6 @@ // // New grayed-out "sd removed" icon // sc.skinRes("imgs/sd_removed.png")->blit( sc["bgmain"], 3, bottomBarIconY ); // } -// if (isSDInserted()) // SD is mounted if (SDinserted) // SD is mounted { // string df = getDiskFree(); @@ -1062,14 +1054,10 @@ if (fscanf(uptime_file, "%f %f", &uptime_secs, &idle_secs) != EOF) { uptimeX = manualX + 19 + 5; -// uptime.blit( sc["bgmain"], uptimeX, bottomBarIconY ); sc.skinRes("imgs/uptime.png")->blit(s,uptimeX,bottomBarIconY); char buf[30]; sprintf(buf, "%1$d:%2$.2d", ((int)uptime_secs / 3600), (((int)uptime_secs % 3600) / 60)); -// string uptime_str(buf); -// sc["bgmain"]->write( font, (string)buf, manualX + 19, bottomBarTextY, -// SFontHAlignLeft, SFontVAlignMiddle); s->write( font, (string)buf, uptimeX + 19, bottomBarTextY, SFontHAlignLeft, SFontVAlignMiddle); } @@ -1759,8 +1747,6 @@ { // senquack - allow editing of applications links since people might // want to change clockspeeds, etc. -// if ((strcasecmp((menu->selSection()).c_str(), "applications") == 0) || -// (strcasecmp((menu->selSection()).c_str(), "settings") == 0) ) if (strcasecmp((menu->selSection()).c_str(), "settings") == 0) { MessageBox mb(this,tr["Editing links in this section is not allowed."]); @@ -2368,43 +2354,6 @@ } //senquack - new stick click emulation -//void GMenu2X::setStickClickEmulation(int mode) { -// int gpioDev = open("/dev/GPIO", O_WRONLY); -// if (gpioDev == -1) -// return; -// -// int tmp; -// switch (mode) -// { -// case OPEN2X_STICK_CLICK_DISABLED: -// // yes, I know the command should be the second parameter but GPH is utterly retarded -// // and made the ioctl be interpreted wrong in their kernel, so the parameter is actually -// // the command. seriously brain-dead. -// cout << "gmenu2x: stick click emulation disabled" << endl; -// tmp = GP2X_STICK_CLICK_EMULATION_DISABLED; -//// ioctl(gpioDev, 0, &tmp); -// ioctl(gpioDev, GP2X_STICK_CLICK_EMULATION_DISABLED, &tmp); -// break; -// case OPEN2X_STICK_CLICK_DPAD: -// // emulate stick-click when UP+DOWN+LEFT+RIGHT is pressed -// cout << "gmenu2x: stick click emulation DPAD" << endl; -// tmp = GP2X_STICK_CLICK_EMULATION_DPAD; -//// ioctl(gpioDev, 0, &tmp); -// ioctl(gpioDev, GP2X_STICK_CLICK_EMULATION_DPAD, &tmp); -// break; -// case OPEN2X_STICK_CLICK_VOLUPDOWN: -// // emulate stick-click when VOL UP+DOWN is pressed -// cout << "gmenu2x: stick click emulation VOLUP+DOWN" << endl; -// tmp = GP2X_STICK_CLICK_EMULATION_VOLUPDOWN; -//// ioctl(gpioDev, 0, &tmp); -// ioctl(gpioDev, GP2X_STICK_CLICK_EMULATION_VOLUPDOWN, &tmp); -// break; -// default: -// break; -// } -// -// close(gpioDev); -//} void GMenu2X::setStickClickEmulation(int mode) { int gpioDev = open("/dev/GPIO", O_WRONLY); if (gpioDev == -1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-27 09:21:14
|
Revision: 364 http://open2x.svn.sourceforge.net/open2x/?rev=364&view=rev Author: senquack Date: 2009-02-27 09:21:11 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Fixed size and position of link selection rectangle Modified Paths: -------------- trunk/utils/gmenu2x/src/link.cpp Modified: trunk/utils/gmenu2x/src/link.cpp =================================================================== --- trunk/utils/gmenu2x/src/link.cpp 2009-02-27 08:47:14 UTC (rev 363) +++ trunk/utils/gmenu2x/src/link.cpp 2009-02-27 09:21:11 UTC (rev 364) @@ -46,7 +46,9 @@ if (gmenu2x->useSelectionPng) gmenu2x->sc["imgs/selection.png"]->blit(gmenu2x->s,rect,SFontHAlignCenter,SFontVAlignMiddle); else - gmenu2x->s->box(rect.x, rect.y, rect.w, rect.h, gmenu2x->skinConfColors["selectionBg"]); + // senquack - fixing size and offset of selection rectangle (was slightly too small) +// gmenu2x->s->box(rect.x, rect.y, rect.w, rect.h, gmenu2x->skinConfColors["selectionBg"]); + gmenu2x->s->box(rect.x, rect.y - 1, rect.w, rect.h + 1, gmenu2x->skinConfColors["selectionBg"]); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-27 09:04:14
|
Revision: 363 http://open2x.svn.sourceforge.net/open2x/?rev=363&view=rev Author: senquack Date: 2009-02-27 08:47:14 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removing extraneous files Removed Paths: ------------- trunk/utils/gmenu2x/src/gmenu2x.cpp.orig trunk/utils/gmenu2x/src/menu.cpp.orig trunk/utils/gmenu2x/src/utilities.cpp.orig Deleted: trunk/utils/gmenu2x/src/gmenu2x.cpp.orig =================================================================== --- trunk/utils/gmenu2x/src/gmenu2x.cpp.orig 2009-02-23 14:32:18 UTC (rev 362) +++ trunk/utils/gmenu2x/src/gmenu2x.cpp.orig 2009-02-27 08:47:14 UTC (rev 363) @@ -1,1900 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Massimiliano Torromeo * - * mas...@gm... * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#include <iostream> -#include <sstream> -#include <fstream> -#include <stdlib.h> -#include <unistd.h> -#include <math.h> -#include <SDL.h> -#include <SDL_gfxPrimitives.h> -#include <signal.h> - -#include <sys/statvfs.h> -#include <errno.h> - -#include "gp2x.h" -#include <sys/fcntl.h> //for battery - -//for browsing the filesystem -#include <sys/stat.h> -#include <sys/types.h> -#include <dirent.h> - -//for soundcard -#include <sys/ioctl.h> -#include <linux/soundcard.h> - -#include "linkapp.h" -#include "linkaction.h" -#include "menu.h" -#include "asfont.h" -#include "sfontplus.h" -#include "surface.h" -#include "filedialog.h" -#include "gmenu2x.h" -#include "filelister.h" - -#include "iconbutton.h" -#include "messagebox.h" -#include "inputdialog.h" -#include "settingsdialog.h" -#include "wallpaperdialog.h" -#include "textdialog.h" -#include "menusettingint.h" -#include "menusettingbool.h" -#include "menusettingrgba.h" -#include "menusettingstring.h" -#include "menusettingmultistring.h" -#include "menusettingfile.h" -#include "menusettingimage.h" -#include "menusettingdir.h" - -#include <sys/mman.h> - -#ifdef TARGET_PANDORA -//#include <pnd_container.h> -//#include <pnd_conf.h> -//#include <pnd_discovery.h> -#endif - -using namespace std; -using namespace fastdelegate; - -int main(int argc, char *argv[]) { - cout << "----" << endl; - cout << "GMenu2X starting: If you read this message in the logs, check http://gmenu2x.sourceforge.net/page/Troubleshooting for a solution" << endl; - cout << "----" << endl; - - signal(SIGINT,&exit); - GMenu2X app(argc,argv); - return 0; -} - -void GMenu2X::gp2x_init() { -#ifdef TARGET_GP2X - gp2x_mem = open("/dev/mem", O_RDWR); - gp2x_memregs=(unsigned short *)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, gp2x_mem, 0xc0000000); - MEM_REG=&gp2x_memregs[0]; - - batteryHandle = open(f200 ? "/dev/mmsp2adc" : "/dev/batt", O_RDONLY); - if (f200) { - //if wm97xx fails to open, set f200 to false to prevent any further access to the touchscreen - f200 = ts.init(); - } -#endif -} - -void GMenu2X::gp2x_deinit() { -#ifdef TARGET_GP2X - if (gp2x_mem!=0) { - gp2x_memregs[0x28DA>>1]=0x4AB; - gp2x_memregs[0x290C>>1]=640; - close(gp2x_mem); - } - if (batteryHandle!=0) close(batteryHandle); - if (f200) ts.deinit(); -#endif -} - -void GMenu2X::gp2x_tvout_on(bool pal) { -#ifdef TARGET_GP2X - if (gp2x_mem!=0) { - /*Ioctl_Dummy_t *msg; - int TVHandle = ioctl(SDL_videofd, FBMMSP2CTRL, msg);*/ - if (cx25874!=0) gp2x_tvout_off(); - //if tv-out is enabled without cx25874 open, stop - //if (gp2x_memregs[0x2800>>1]&0x100) return; - cx25874 = open("/dev/cx25874",O_RDWR); - ioctl(cx25874, _IOW('v', 0x02, unsigned char), pal ? 4 : 3); - gp2x_memregs[0x2906>>1]=512; - gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; - gp2x_memregs[0x28E8>>1]=239; - } -#endif -} - -void GMenu2X::gp2x_tvout_off() { -#ifdef TARGET_GP2X - if (gp2x_mem!=0) { - close(cx25874); - cx25874 = 0; - gp2x_memregs[0x2906>>1]=1024; - } -#endif -} - -GMenu2X::GMenu2X(int argc, char *argv[]) { - //Detect firmware version and type - if (fileExists("/etc/open2x")) { - fwType = "open2x"; - fwVersion = ""; - } else { - fwType = "gph"; - fwVersion = ""; - } -#ifdef TARGET_GP2X - f200 = fileExists("/dev/touchscreen/wm97xx"); -#else - f200 = true; -#endif - - confStr.set_empty_key(" "); - confStr.set_deleted_key(""); - confInt.set_empty_key(" "); - confInt.set_deleted_key(""); - skinConfInt.set_empty_key(" "); - skinConfInt.set_deleted_key(""); - skinConfStr.set_empty_key(" "); - skinConfStr.set_deleted_key(""); - skinConfColors.set_empty_key(" "); - skinConfColors.set_deleted_key(""); - - //open2x - savedVolumeMode = 0; - volumeMode = VOLUME_MODE_NORMAL; - volumeScalerNormal = VOLUME_SCALER_NORMAL; - volumeScalerPhones = VOLUME_SCALER_PHONES; - - o2x_usb_net_on_boot = false; - o2x_usb_net_ip = ""; - o2x_ftp_on_boot = false; - o2x_telnet_on_boot = false; - o2x_gp2xjoy_on_boot = false; - o2x_usb_host_on_boot = false; - o2x_usb_hid_on_boot = false; - o2x_usb_storage_on_boot = false; - - usbnet = samba = inet = web = false; - useSelectionPng = false; - - //load config data - readConfig(); - if (fwType=="open2x") { - readConfigOpen2x(); - // VOLUME MODIFIER - switch(volumeMode) { - case VOLUME_MODE_MUTE: setVolumeScaler(VOLUME_SCALER_MUTE); break; - case VOLUME_MODE_PHONES: setVolumeScaler(volumeScalerPhones); break; - case VOLUME_MODE_NORMAL: setVolumeScaler(volumeScalerNormal); break; - } - } else - readCommonIni(); - - halfX = resX/2; - halfY = resY/2; - bottomBarIconY = resY-18; - bottomBarTextY = resY-10; - - path = ""; - getExePath(); - -#ifdef TARGET_GP2X - gp2x_mem = 0; - cx25874 = 0; - batteryHandle = 0; - - gp2x_init(); - - //Fix tv-out - if (gp2x_mem!=0) { - if (gp2x_memregs[0x2800>>1]&0x100) { - gp2x_memregs[0x2906>>1]=512; - //gp2x_memregs[0x290C>>1]=640; - gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; - } - gp2x_memregs[0x28E8>>1]=239; - } -#endif - - //Screen - if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_JOYSTICK)<0 ) { - cout << "\033[0;34mGMENU2X:\033[0;31m Could not initialize SDL:\033[0m " << SDL_GetError() << endl; - quit(); - } - - s = new Surface(); -#ifdef TARGET_GP2X - { - //I use a tmp variable to hide the cursor as soon as possible (and create the double buffer surface only after that) - //I'm forced to use SW surfaces since with HW there are issuse with changing the clock frequency - SDL_Surface *tmps = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_SWSURFACE); - SDL_ShowCursor(0); - s->enableVirtualDoubleBuffer(tmps); - } -#else - s->raw = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_HWSURFACE|SDL_DOUBLEBUF); -#endif - - bg = NULL; - font = NULL; - menu = NULL; - setSkin(confStr["skin"], false); - initMenu(); - - if (!fileExists(confStr["wallpaper"])) { -#ifdef DEBUG - cout << "Searching wallpaper" << endl; -#endif - FileLister fl("skins/"+confStr["skin"]+"/wallpapers",false,true); - fl.setFilter(".png,.jpg,.jpeg,.bmp"); - fl.browse(); - if (fl.files.size()<=0 && confStr["skin"] != "Default") - fl.setPath("skins/Default/wallpapers",true); - if (fl.files.size()>0) - confStr["wallpaper"] = fl.getPath()+fl.files[0]; - } - - initBG(); - input.init(path+"input.conf"); - setInputSpeed(); - initServices(); - - setGamma(confInt["gamma"]); - setVolume(confInt["globalVolume"]); - applyDefaultTimings(); - setClock(confInt["menuClock"]); - - //recover last session - readTmp(); - if (lastSelectorElement>-1 && menu->selLinkApp()!=NULL && (!menu->selLinkApp()->getSelectorDir().empty() || !lastSelectorDir.empty())) - menu->selLinkApp()->selector(lastSelectorElement,lastSelectorDir); - -#ifdef DEBUG - cout << "Starting main()" << endl; -#endif - main(); - writeConfig(); - if (fwType=="open2x") writeConfigOpen2x(); - - quit(); - exit(0); -} - -GMenu2X::~GMenu2X() { - free(menu); - free(s); - free(font); -} - -void GMenu2X::quit() { - fflush(NULL); - sc.clear(); - s->free(); - SDL_Quit(); -#ifdef TARGET_GP2X - if (gp2x_mem!=0) { - //Fix tv-out - if (gp2x_memregs[0x2800>>1]&0x100) { - gp2x_memregs[0x2906>>1]=512; - gp2x_memregs[0x28E4>>1]=gp2x_memregs[0x290C>>1]; - } - gp2x_deinit(); - } -#endif -} - -void GMenu2X::initBG() { - sc.del("bgmain"); - - if (bg != NULL) free(bg); - - if (!fileExists(confStr["wallpaper"])) { - bg = new Surface(s); - bg->box(0,0,resX,resY,0,0,0); - } else { - bg = new Surface(confStr["wallpaper"],false); - } - - drawTopBar(bg); - drawBottomBar(bg); - - Surface *bgmain = new Surface(bg); - sc.add(bgmain,"bgmain"); - - Surface sd("imgs/sd.png", confStr["skin"]); - Surface cpu("imgs/cpu.png", confStr["skin"]); - Surface volume("imgs/volume.png", confStr["skin"]); - string df = getDiskFree(); - - sd.blit( sc["bgmain"], 3, bottomBarIconY ); - sc["bgmain"]->write( font, df, 22, bottomBarTextY, SFontHAlignLeft, SFontVAlignMiddle ); - volumeX = 27+font->getTextWidth(df); - volume.blit( sc["bgmain"], volumeX, bottomBarIconY ); - volumeX += 19; - cpuX = volumeX+font->getTextWidth("100")+5; - cpu.blit( sc["bgmain"], cpuX, bottomBarIconY ); - cpuX += 19; - manualX = cpuX+font->getTextWidth("300Mhz")+5; - - int serviceX = resX-38; - if (usbnet) { - if (web) { - Surface webserver("imgs/webserver.png", confStr["skin"]); - webserver.blit( sc["bgmain"], serviceX, bottomBarIconY ); - serviceX -= 19; - } - if (samba) { - Surface sambaS("imgs/samba.png", confStr["skin"]); - sambaS.blit( sc["bgmain"], serviceX, bottomBarIconY ); - serviceX -= 19; - } - if (inet) { - Surface inetS("imgs/inet.png", confStr["skin"]); - inetS.blit( sc["bgmain"], serviceX, bottomBarIconY ); - serviceX -= 19; - } - } -} - -void GMenu2X::initFont() { - if (font != NULL) { - free(font); - font = NULL; - } - - string fontFile = sc.getSkinFilePath("imgs/font.png"); - if (fontFile.empty()) { - cout << "Font png not found!" << endl; - quit(); - exit(-1); - } - font = new ASFont(fontFile); -} - -void GMenu2X::initMenu() { - //Menu structure handler - menu = new Menu(this); - for (uint i=0; i<menu->sections.size(); i++) { - //Add virtual links in the applications section - if (menu->sections[i]=="applications") { - menu->addActionLink(i,"Explorer",MakeDelegate(this,&GMenu2X::explorer),tr["Launch an application"],"skin:icons/explorer.png"); - } - - //Add virtual links in the setting section - else if (menu->sections[i]=="settings") { - menu->addActionLink(i,"GMenu2X",MakeDelegate(this,&GMenu2X::options),tr["Configure GMenu2X's options"],"skin:icons/configure.png"); - if (fwType=="open2x") - menu->addActionLink(i,"Open2x",MakeDelegate(this,&GMenu2X::settingsOpen2x),tr["Configure Open2x system settings"],"skin:icons/o2xconfigure.png"); - menu->addActionLink(i,tr["Skin"],MakeDelegate(this,&GMenu2X::skinMenu),tr["Configure skin"],"skin:icons/skin.png"); - menu->addActionLink(i,tr["Wallpaper"],MakeDelegate(this,&GMenu2X::changeWallpaper),tr["Change GMenu2X wallpaper"],"skin:icons/wallpaper.png"); -#ifdef TARGET_GP2X - menu->addActionLink(i,"TV",MakeDelegate(this,&GMenu2X::toggleTvOut),tr["Activate/deactivate tv-out"],"skin:icons/tv.png"); - menu->addActionLink(i,"USB Sd",MakeDelegate(this,&GMenu2X::activateSdUsb),tr["Activate Usb on SD"],"skin:icons/usb.png"); - if (fwType=="gph" && !f200) - menu->addActionLink(i,"USB Nand",MakeDelegate(this,&GMenu2X::activateNandUsb),tr["Activate Usb on Nand"],"skin:icons/usb.png"); - //menu->addActionLink(i,"USB Root",MakeDelegate(this,&GMenu2X::activateRootUsb),tr["Activate Usb on the root of the Gp2x Filesystem"],"skin:icons/usb.png"); -#endif - if (fileExists(path+"log.txt")) - menu->addActionLink(i,tr["Log Viewer"],MakeDelegate(this,&GMenu2X::viewLog),tr["Displays last launched program's output"],"skin:icons/ebook.png"); - menu->addActionLink(i,tr["About"],MakeDelegate(this,&GMenu2X::about),tr["Info about GMenu2X"],"skin:icons/about.png"); - } - } - - menu->setSectionIndex(confInt["section"]); - menu->setLinkIndex(confInt["link"]); - - menu->loadIcons(); - -#ifdef DEBUG - //DEBUG - menu->addLink( "/mnt/sd/development/gmenu2x/", "sample.pxml", "applications" ); -#endif -} - -void GMenu2X::about() { - vector<string> text; - split(text,"GMenu2X is developed by Massimiliano \"Ryo\" Torromeo, and is released under the GPL-v2 license.\n\ -Website: http://gmenu2x.sourceforge.net\n\ -E-Mail & PayPal account: mas...@gm...\n\ -\n\ -Thanks goes to...\n\ -\n\ - Contributors\n\ -----\n\ -NoidZ for his gp2x' buttons graphics\n\ -\n\ - Beta testers\n\ -----\n\ -Goemon4, PokeParadox, PSyMastR and Tripmonkey_uk\n\ -\n\ - Translators\n\ -----\n\ -English & Italian by me\n\ -French by Yodaz\n\ -Danish by claus\n\ -Dutch by superfly\n\ -Spanish by pedator\n\ -Portuguese (Portugal) by NightShadow\n\ -Slovak by Jozef\n\ -Swedish by Esslan and Micket\n\ -German by fusion_power, johnnysnet and Waldteufel\n\ -Finnish by Jontte and Atte\n\ -Norwegian by cowai\n\ -Russian by XaMMaX90\n\ -\n\ - Donors\n\ -----\n\ -EvilDragon (www.gp2x.de)\n\ -Tecnologie Creative (www.tecnologiecreative.it)\n\ -TelcoLou\n\ -gaterooze\n\ -deepmenace\n\ -superfly\n\ -halo9\n\ -sbock\n\ -b._.o._.b\n\ -Jacopastorius\n\ -lorystorm90\n\ -and all the anonymous donors...\n\ -(If I missed to list you or if you want to be removed, contact me.)","\n"); - TextDialog td(this, "GMenu2X", tr.translate("Version $1 (Build date: $2)","0.10-test4",__DATE__,NULL), "icons/about.png", &text); - td.exec(); -} - -void GMenu2X::viewLog() { - string logfile = path+"log.txt"; - if (fileExists(logfile)) { - ifstream inf(logfile.c_str(), ios_base::in); - if (inf.is_open()) { - vector<string> log; - - string line; - while (getline(inf, line, '\n')) - log.push_back(line); - inf.close(); - - TextDialog td(this, tr["Log Viewer"], tr["Displays last launched program's output"], "icons/ebook.png", &log); - td.exec(); - - MessageBox mb(this, tr["Do you want to delete the log file?"], "icons/ebook.png"); - mb.buttons[ACTION_B] = tr["Yes"]; - mb.buttons[ACTION_X] = tr["No"]; - if (mb.exec() == ACTION_B) { - ledOn(); - unlink(logfile.c_str()); - sync(); - menu->deleteSelectedLink(); - ledOff(); - } - } - } -} - -void GMenu2X::readConfig() { - string conffile = path+"gmenu2x.conf"; - if (fileExists(conffile)) { - ifstream inf(conffile.c_str(), ios_base::in); - if (inf.is_open()) { - string line; - while (getline(inf, line, '\n')) { - string::size_type pos = line.find("="); - string name = trim(line.substr(0,pos)); - string value = trim(line.substr(pos+1,line.length())); - - if (value.length()>1 && value.at(0)=='"' && value.at(value.length()-1)=='"') - confStr[name] = value.substr(1,value.length()-2); - else - confInt[name] = atoi(value.c_str()); - } - inf.close(); - } - } - - if (!confStr["lang"].empty()) tr.setLang(confStr["lang"]); - if (!confStr["wallpaper"].empty() && !fileExists(confStr["wallpaper"])) confStr["wallpaper"] = ""; - if (confStr["skin"].empty() || !fileExists("skins/"+confStr["skin"])) confStr["skin"] = "Default"; - - evalIntConf( &confInt["outputLogs"], 0, 0,1 ); - evalIntConf( &confInt["maxClock"], 300, 200,300 ); - evalIntConf( &confInt["menuClock"], f200 ? 136 : 100, 50,300 ); - evalIntConf( &confInt["globalVolume"], 67, 0,100 ); - evalIntConf( &confInt["gamma"], 1, 1,100 ); - evalIntConf( &confInt["videoBpp"], 16, 8,32 ); - - if (confStr["tvoutEncoding"] != "PAL") confStr["tvoutEncoding"] = "NTSC"; - resX = constrain( confInt["resolutionX"], 320,1920 ); - resY = constrain( confInt["resolutionY"], 240,1200 ); -} - -void GMenu2X::writeConfig() { - ledOn(); - string conffile = path+"gmenu2x.conf"; - ofstream inf(conffile.c_str()); - if (inf.is_open()) { - ConfStrHash::iterator endS = confStr.end(); - for(ConfStrHash::iterator curr = confStr.begin(); curr != endS; curr++) - inf << curr->first << "=\"" << curr->second << "\"" << endl; - - ConfIntHash::iterator endI = confInt.end(); - for(ConfIntHash::iterator curr = confInt.begin(); curr != endI; curr++) - inf << curr->first << "=" << curr->second << endl; - - inf.close(); - sync(); - } - ledOff(); -} - - -void GMenu2X::readConfigOpen2x() { - string conffile = "/etc/config/open2x.conf"; - if (fileExists(conffile)) { - ifstream inf(conffile.c_str(), ios_base::in); - if (inf.is_open()) { - string line; - while (getline(inf, line, '\n')) { - string::size_type pos = line.find("="); - string name = trim(line.substr(0,pos)); - string value = trim(line.substr(pos+1,line.length())); - - if (name=="USB_NET_ON_BOOT") o2x_usb_net_on_boot = value == "y" ? true : false; - else if (name=="USB_NET_IP") o2x_usb_net_ip = value; - else if (name=="TELNET_ON_BOOT") o2x_telnet_on_boot = value == "y" ? true : false; - else if (name=="FTP_ON_BOOT") o2x_ftp_on_boot = value == "y" ? true : false; - else if (name=="GP2XJOY_ON_BOOT") o2x_gp2xjoy_on_boot = value == "y" ? true : false; - else if (name=="USB_HOST_ON_BOOT") o2x_usb_host_on_boot = value == "y" ? true : false; - else if (name=="USB_HID_ON_BOOT") o2x_usb_hid_on_boot = value == "y" ? true : false; - else if (name=="USB_STORAGE_ON_BOOT") o2x_usb_storage_on_boot = value == "y" ? true : false; - else if (name=="VOLUME_MODE") volumeMode = savedVolumeMode = constrain( atoi(value.c_str()), 0, 2); - else if (name=="PHONES_VALUE") volumeScalerPhones = constrain( atoi(value.c_str()), 0, 100); - else if (name=="NORMAL_VALUE") volumeScalerNormal = constrain( atoi(value.c_str()), 0, 150); - } - inf.close(); - } - } -} -void GMenu2X::writeConfigOpen2x() { - ledOn(); - string conffile = "/etc/config/open2x.conf"; - ofstream inf(conffile.c_str()); - if (inf.is_open()) { - inf << "USB_NET_ON_BOOT=" << ( o2x_usb_net_on_boot ? "y" : "n" ) << endl; - inf << "USB_NET_IP=" << o2x_usb_net_ip << endl; - inf << "TELNET_ON_BOOT=" << ( o2x_telnet_on_boot ? "y" : "n" ) << endl; - inf << "FTP_ON_BOOT=" << ( o2x_ftp_on_boot ? "y" : "n" ) << endl; - inf << "GP2XJOY_ON_BOOT=" << ( o2x_gp2xjoy_on_boot ? "y" : "n" ) << endl; - inf << "USB_HOST_ON_BOOT=" << ( (o2x_usb_host_on_boot || o2x_usb_hid_on_boot || o2x_usb_storage_on_boot) ? "y" : "n" ) << endl; - inf << "USB_HID_ON_BOOT=" << ( o2x_usb_hid_on_boot ? "y" : "n" ) << endl; - inf << "USB_STORAGE_ON_BOOT=" << ( o2x_usb_storage_on_boot ? "y" : "n" ) << endl; - inf << "VOLUME_MODE=" << volumeMode << endl; - if (volumeScalerPhones != VOLUME_SCALER_PHONES) inf << "PHONES_VALUE=" << volumeScalerPhones << endl; - if (volumeScalerNormal != VOLUME_SCALER_NORMAL) inf << "NORMAL_VALUE=" << volumeScalerNormal << endl; - inf.close(); - sync(); - } - ledOff(); -} - -void GMenu2X::writeSkinConfig() { - ledOn(); - string conffile = path+"skins/"+confStr["skin"]+"/skin.conf"; - ofstream inf(conffile.c_str()); - if (inf.is_open()) { - ConfStrHash::iterator endS = skinConfStr.end(); - for(ConfStrHash::iterator curr = skinConfStr.begin(); curr != endS; curr++) - inf << curr->first << "=\"" << curr->second << "\"" << endl; - - ConfIntHash::iterator endI = skinConfInt.end(); - for(ConfIntHash::iterator curr = skinConfInt.begin(); curr != endI; curr++) - inf << curr->first << "=" << curr->second << endl; - - ConfRGBAHash::iterator endC = skinConfColors.end(); - for(ConfRGBAHash::iterator curr = skinConfColors.begin(); curr != endC; curr++) - inf << curr->first << "=#" << hex << curr->second.r << hex << curr->second.g << hex << curr->second.b << hex << curr->second.a << endl; - - inf.close(); - sync(); - } - ledOff(); -} - -void GMenu2X::readCommonIni() { - if (fileExists("/usr/gp2x/common.ini")) { - ifstream inf("/usr/gp2x/common.ini", ios_base::in); - if (inf.is_open()) { - string line; - string section = ""; - while (getline(inf, line, '\n')) { - line = trim(line); - if (line[0]=='[' && line[line.length()-1]==']') { - section = line.substr(1,line.length()-2); - } else { - string::size_type pos = line.find("="); - string name = trim(line.substr(0,pos)); - string value = trim(line.substr(pos+1,line.length())); - - if (section=="usbnet") { - if (name=="enable") - usbnet = value=="true" ? true : false; - else if (name=="ip") - ip = value; - - } else if (section=="server") { - if (name=="inet") - inet = value=="true" ? true : false; - else if (name=="samba") - samba = value=="true" ? true : false; - else if (name=="web") - web = value=="true" ? true : false; - } - } - } - inf.close(); - } - } -} - -void GMenu2X::writeCommonIni() {} - -void GMenu2X::readTmp() { - lastSelectorElement = -1; - if (fileExists("/tmp/gmenu2x.tmp")) { - ifstream inf("/tmp/gmenu2x.tmp", ios_base::in); - if (inf.is_open()) { - string line; - string section = ""; - while (getline(inf, line, '\n')) { - string::size_type pos = line.find("="); - string name = trim(line.substr(0,pos)); - string value = trim(line.substr(pos+1,line.length())); - - if (name=="section") - menu->setSectionIndex(atoi(value.c_str())); - else if (name=="link") - menu->setLinkIndex(atoi(value.c_str())); - else if (name=="selectorelem") - lastSelectorElement = atoi(value.c_str()); - else if (name=="selectordir") - lastSelectorDir = value; - } - inf.close(); - } - } -} - -void GMenu2X::writeTmp(int selelem, string selectordir) { - string conffile = "/tmp/gmenu2x.tmp"; - ofstream inf(conffile.c_str()); - if (inf.is_open()) { - inf << "section=" << menu->selSectionIndex() << endl; - inf << "link=" << menu->selLinkIndex() << endl; - if (selelem>-1) - inf << "selectorelem=" << selelem << endl; - if (selectordir!="") - inf << "selectordir=" << selectordir << endl; - inf.close(); - } -} - -void GMenu2X::initServices() { -#ifdef TARGET_GP2X - if (usbnet) { - string services = "scripts/services.sh "+ip+" "+(inet?"on":"off")+" "+(samba?"on":"off")+" "+(web?"on":"off")+" &"; - system(services.c_str()); - } -#endif -} - -void GMenu2X::ledOn() { -#ifdef TARGET_GP2X - if (gp2x_mem!=0 && !f200) gp2x_memregs[0x106E >> 1] ^= 16; - //SDL_SYS_JoystickGp2xSys(joy.joystick, BATT_LED_ON); -#endif -} - -void GMenu2X::ledOff() { -#ifdef TARGET_GP2X - if (gp2x_mem!=0 && !f200) gp2x_memregs[0x106E >> 1] ^= 16; - //SDL_SYS_JoystickGp2xSys(joy.joystick, BATT_LED_OFF); -#endif -} - -int GMenu2X::main() { - uint linksPerPage = linkColumns*linkRows; - int linkSpacingX = (resX-10 - linkColumns*skinConfInt["linkWidth"])/linkColumns; - int linkSpacingY = (resY-35 - skinConfInt["topBarHeight"] - linkRows*skinConfInt["linkHeight"])/linkRows; - uint sectionLinkPadding = (skinConfInt["topBarHeight"] - 32 - font->getLineHeight()) / 3; - - bool quit = false; - int x,y, offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6, helpBoxHeight = fwType=="open2x" ? 154 : 139; - uint i; - long tickBattery = -60000, tickNow; - string batteryIcon = "imgs/battery/0.png"; - stringstream ss; - uint sectionsCoordX = 24; - SDL_Rect re = {0,0,0,0}; - -#ifdef DEBUG - //framerate - long tickFPS = SDL_GetTicks(); - int drawn_frames = 0; - string fps = ""; -#endif - - IconButton btnContextMenu(this,"skin:imgs/menu.png"); - btnContextMenu.setPosition(resX-38, bottomBarIconY); - btnContextMenu.setAction(MakeDelegate(this, &GMenu2X::contextMenu)); - - while (!quit) { - tickNow = SDL_GetTicks(); - - //Background - sc["bgmain"]->blit(s,0,0); - - //Sections - sectionsCoordX = halfX - (constrain((uint)menu->sections.size(), 0 , linkColumns) * skinConfInt["linkWidth"]) / 2; - if (menu->firstDispSection()>0) - sc.skinRes("imgs/l_enabled.png")->blit(s,0,0); - else - sc.skinRes("imgs/l_disabled.png")->blit(s,0,0); - if (menu->firstDispSection()+linkColumns<menu->sections.size()) - sc.skinRes("imgs/r_enabled.png")->blit(s,resX-10,0); - else - sc.skinRes("imgs/r_disabled.png")->blit(s,resX-10,0); - for (i=menu->firstDispSection(); i<menu->sections.size() && i<menu->firstDispSection()+linkColumns; i++) { - string sectionIcon = "skin:sections/"+menu->sections[i]+".png"; - x = (i-menu->firstDispSection())*skinConfInt["linkWidth"]+sectionsCoordX; - if (menu->selSectionIndex()==(int)i) - s->box(x, 0, skinConfInt["linkWidth"], skinConfInt["topBarHeight"], skinConfColors["selectionBg"]); - x += skinConfInt["linkWidth"]/2; - if (sc.exists(sectionIcon)) - sc[sectionIcon]->blit(s,x-16,sectionLinkPadding,32,32); - else - sc.skinRes("icons/section.png")->blit(s,x,sectionLinkPadding); - s->write( font, menu->sections[i], x, skinConfInt["topBarHeight"]-sectionLinkPadding, SFontHAlignCenter, SFontVAlignBottom ); - } - - //Links - s->setClipRect(offset,skinConfInt["topBarHeight"],resX-9,resY-74); //32*2+10 - for (i=menu->firstDispRow()*linkColumns; i<(menu->firstDispRow()*linkColumns)+linksPerPage && i<menu->sectionLinks()->size(); i++) { - int ir = i-menu->firstDispRow()*linkColumns; - x = (ir%linkColumns)*(skinConfInt["linkWidth"]+linkSpacingX)+offset; - y = ir/linkColumns*(skinConfInt["linkHeight"]+linkSpacingY)+skinConfInt["topBarHeight"]+2; - menu->sectionLinks()->at(i)->setPosition(x,y); - - if (i==(uint)menu->selLinkIndex()) - menu->sectionLinks()->at(i)->paintHover(); - - menu->sectionLinks()->at(i)->paint(); - } - s->clearClipRect(); - - drawScrollBar(linkRows,menu->sectionLinks()->size()/linkColumns + ((menu->sectionLinks()->size()%linkColumns==0) ? 0 : 1),menu->firstDispRow(),43,resY-81); - - switch(volumeMode) { - case VOLUME_MODE_MUTE: sc.skinRes("imgs/mute.png")->blit(s,279,bottomBarIconY); break; - case VOLUME_MODE_PHONES: sc.skinRes("imgs/phones.png")->blit(s,279,bottomBarIconY); break; - default: sc.skinRes("imgs/volume.png")->blit(s,279,bottomBarIconY); break; - } - - if (menu->selLink()!=NULL) { - s->write ( font, menu->selLink()->getDescription(), halfX, resY-19, SFontHAlignCenter, SFontVAlignBottom ); - if (menu->selLinkApp()!=NULL) { - s->write ( font, menu->selLinkApp()->clockStr(confInt["maxClock"]), cpuX, bottomBarTextY, SFontHAlignLeft, SFontVAlignMiddle ); - s->write ( font, menu->selLinkApp()->volumeStr(), volumeX, bottomBarTextY, SFontHAlignLeft, SFontVAlignMiddle ); - //Manual indicator - if (!menu->selLinkApp()->getManual().empty()) - sc.skinRes("imgs/manual.png")->blit(s,manualX,bottomBarIconY); - } - } - - if (f200) { - btnContextMenu.paint(); - } - //check battery status every 60 seconds - if (tickNow-tickBattery >= 60000) { - tickBattery = tickNow; - unsigned short battlevel = getBatteryLevel(); - if (battlevel>5) { - batteryIcon = "imgs/battery/ac.png"; - } else { - ss.clear(); - ss << battlevel; - ss >> batteryIcon; - batteryIcon = "imgs/battery/"+batteryIcon+".png"; - } - } - sc.skinRes(batteryIcon)->blit( s, resX-19, bottomBarIconY ); - - //On Screen Help - if (input[ACTION_A]) { - s->box(10,50,300,143, skinConfColors["messageBoxBg"]); - s->rectangle( 12,52,296,helpBoxHeight, skinConfColors["messageBoxBorder"] ); - s->write( font, tr["CONTROLS"], 20, 60 ); - s->write( font, tr["B, Stick press: Launch link / Confirm action"], 20, 80 ); - s->write( font, tr["L, R: Change section"], 20, 95 ); - s->write( font, tr["Y: Show manual/readme"], 20, 110 ); - s->write( font, tr["VOLUP, VOLDOWN: Change cpu clock"], 20, 125 ); - s->write( font, tr["A+VOLUP, A+VOLDOWN: Change volume"], 20, 140 ); - s->write( font, tr["SELECT: Show contextual menu"], 20, 155 ); - s->write( font, tr["START: Show options menu"], 20, 170 ); - if (fwType=="open2x") s->write( font, tr["X: Toggle speaker mode"], 20, 185 ); - } - -#ifdef DEBUG - //framerate - drawn_frames++; - if (tickNow-tickFPS>=1000) { - ss.clear(); - ss << drawn_frames*(tickNow-tickFPS+1)/1000; - ss >> fps; - tickFPS = tickNow; - drawn_frames = 0; - } - s->write( font, fps+" FPS", resX-1,1 ,SFontHAlignRight ); -#endif - - s->flip(); - - //touchscreen - if (f200) { - ts.poll(); - btnContextMenu.handleTS(); - re.x = 0; re.y = 0; re.h = skinConfInt["topBarHeight"]; re.w = resX; - if (ts.pressed() && ts.inRect(re)) { - re.w = skinConfInt["linkWidth"]; - for (i=menu->firstDispSection(); !ts.handled() && i<menu->sections.size() && i<menu->firstDispSection()+linkColumns; i++) { - sectionsCoordX = halfX - (constrain((uint)(linkColumns-menu->sections.size()), 0 , linkColumns) * skinConfInt["linkWidth"]) / 2; - re.x = (i-menu->firstDispSection())*re.w+sectionsCoordX; - - if (ts.inRect(re)) { - menu->setSectionIndex(i); - ts.setHandled(); - } - } - } - - i=menu->firstDispRow()*linkColumns; - while ( i<(menu->firstDispRow()*linkColumns)+linksPerPage && i<menu->sectionLinks()->size()) { - if (menu->sectionLinks()->at(i)->isPressed()) - menu->setLinkIndex(i); - if (menu->sectionLinks()->at(i)->handleTS()) - i = menu->sectionLinks()->size(); - i++; - } - } - -//#ifdef TARGET_GP2X - input.update(); - if ( input[ACTION_B] && menu->selLink()!=NULL ) menu->selLink()->run(); - else if ( input[ACTION_START] ) options(); - else if ( input[ACTION_SELECT] ) contextMenu(); - // VOLUME SCALE MODIFIER - else if ( fwType=="open2x" && input[ACTION_X] ) { - volumeMode = constrain(volumeMode-1, -VOLUME_MODE_MUTE-1, VOLUME_MODE_NORMAL); - if(volumeMode < VOLUME_MODE_MUTE) - volumeMode = VOLUME_MODE_NORMAL; - switch(volumeMode) { - case VOLUME_MODE_MUTE: setVolumeScaler(VOLUME_SCALER_MUTE); break; - case VOLUME_MODE_PHONES: setVolumeScaler(volumeScalerPhones); break; - case VOLUME_MODE_NORMAL: setVolumeScaler(volumeScalerNormal); break; - } - setVolume(confInt["globalVolume"]); - } - // LINK NAVIGATION - else if ( input[ACTION_LEFT ] ) menu->linkLeft(); - else if ( input[ACTION_RIGHT] ) menu->linkRight(); - else if ( input[ACTION_UP ] ) menu->linkUp(); - else if ( input[ACTION_DOWN ] ) menu->linkDown(); - // SELLINKAPP SELECTED - else if (menu->selLinkApp()!=NULL) { - if ( input[ACTION_Y] ) menu->selLinkApp()->showManual(); - else if ( input.isActive(ACTION_A) ) { - // VOLUME - if ( input[ACTION_VOLDOWN] && !input.isActive(ACTION_VOLUP) ) - menu->selLinkApp()->setVolume( constrain(menu->selLinkApp()->volume()-1,0,100) ); - if ( input[ACTION_VOLUP] && !input.isActive(ACTION_VOLDOWN) ) - menu->selLinkApp()->setVolume( constrain(menu->selLinkApp()->volume()+1,0,100) );; - if ( input.isActive(ACTION_VOLUP) && input.isActive(ACTION_VOLDOWN) ) menu->selLinkApp()->setVolume(-1); - } else { - // CLOCK - if ( input[ACTION_VOLDOWN] && !input.isActive(ACTION_VOLUP) ) - menu->selLinkApp()->setClock( constrain(menu->selLinkApp()->clock()-1,50,confInt["maxClock"]) ); - if ( input[ACTION_VOLUP] && !input.isActive(ACTION_VOLDOWN) ) - menu->selLinkApp()->setClock( constrain(menu->selLinkApp()->clock()+1,50,confInt["maxClock"]) ); - if ( input.isActive(ACTION_VOLUP) && input.isActive(ACTION_VOLDOWN) ) menu->selLinkApp()->setClock(200); - } - } - if ( input.isActive(ACTION_A) ) { - if (input.isActive(ACTION_L) && input.isActive(ACTION_R)) - saveScreenshot(); - } else { - // SECTIONS - if ( input[ACTION_L ] ) { - menu->decSectionIndex(); - offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6; - } else if ( input[ACTION_R ] ) { - menu->incSectionIndex(); - offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6; - } - } - - usleep(LOOP_DELAY); - } - - return -1; -} - -void GMenu2X::explorer() { - FileDialog fd(this,tr["Select an application"],".gpu,.gpe,.sh"); - if (fd.exec()) { - if (confInt["saveSelection"] && (confInt["section"]!=menu->selSectionIndex() || confInt["link"]!=menu->selLinkIndex())) - writeConfig(); - if (fwType == "open2x" && savedVolumeMode != volumeMode) - writeConfigOpen2x(); - - //string command = cmdclean(fd.path()+"/"+fd.file) + "; sync & cd "+cmdclean(getExePath())+"; exec ./gmenu2x"; - string command = cmdclean(fd.path()+"/"+fd.file); - chdir(fd.path().c_str()); - quit(); - setClock(200); - execlp("/bin/sh","/bin/sh","-c",command.c_str(),NULL); - - //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue - //try relaunching gmenu2x - fprintf(stderr, "Error executing selected application, re-launching gmenu2x\n"); - chdir(getExePath().c_str()); - execlp("./gmenu2x", "./gmenu2x", NULL); - } -} - -void GMenu2X::options() { - int curMenuClock = confInt["menuClock"]; - int curGlobalVolume = confInt["globalVolume"]; - //G - int prevgamma = confInt["gamma"]; - bool showRootFolder = fileExists("/mnt/root"); - - FileLister fl_tr("translations"); - fl_tr.browse(); - fl_tr.files.insert(fl_tr.files.begin(),"English"); - string lang = tr.lang(); - - vector<string> encodings; - encodings.push_back("NTSC"); - encodings.push_back("PAL"); - - SettingsDialog sd(this,tr["Settings"]); - sd.addSetting(new MenuSettingMultiString(this,tr["Language"],tr["Set the language used by GMenu2X"],&lang,&fl_tr.files)); - sd.addSetting(new MenuSettingBool(this,tr["Save last selection"],tr["Save the last selected link and section on exit"],&confInt["saveSelection"])); - sd.addSetting(new MenuSettingInt(this,tr["Clock for GMenu2X"],tr["Set the cpu working frequency when running GMenu2X"],&confInt["menuClock"],50,325)); - sd.addSetting(new MenuSettingInt(this,tr["Maximum overclock"],tr["Set the maximum overclock for launching links"],&confInt["maxClock"],50,325)); - sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100)); - sd.addSetting(new MenuSettingBool(this,tr["Output logs"],tr["Logs the output of the links. Use the Log Viewer to read them."],&confInt["outputLogs"])); - //G - sd.addSetting(new MenuSettingInt(this,tr["Gamma"],tr["Set gp2x gamma value (default: 10)"],&confInt["gamma"],1,100)); - sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings)); - sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder)); - - if (sd.exec() && sd.edited()) { - //G - if (prevgamma != confInt["gamma"]) setGamma(confInt["gamma"]); - if (curMenuClock!=confInt["menuClock"]) setClock(confInt["menuClock"]); - if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]); - if (lang == "English") lang = ""; - if (lang != tr.lang()) tr.setLang(lang); - if (fileExists("/mnt/root") && !showRootFolder) - unlink("/mnt/root"); - else if (!fileExists("/mnt/root") && showRootFolder) - symlink("/","/mnt/root"); - writeConfig(); - } -} - -void GMenu2X::settingsOpen2x() { - SettingsDialog sd(this,tr["Open2x Settings"]); - sd.addSetting(new MenuSettingBool(this,tr["USB net on boot"],tr["Allow USB networking to be started at boot time"],&o2x_usb_net_on_boot)); - sd.addSetting(new MenuSettingString(this,tr["USB net IP"],tr["IP address to be used for USB networking"],&o2x_usb_net_ip)); - sd.addSetting(new MenuSettingBool(this,tr["Telnet on boot"],tr["Allow telnet to be started at boot time"],&o2x_telnet_on_boot)); - sd.addSetting(new MenuSettingBool(this,tr["FTP on boot"],tr["Allow FTP to be started at boot time"],&o2x_ftp_on_boot)); - sd.addSetting(new MenuSettingBool(this,tr["GP2XJOY on boot"],tr["Create a js0 device for GP2X controls"],&o2x_gp2xjoy_on_boot)); - sd.addSetting(new MenuSettingBool(this,tr["USB host on boot"],tr["Allow USB host to be started at boot time"],&o2x_usb_host_on_boot)); - sd.addSetting(new MenuSettingBool(this,tr["USB HID on boot"],tr["Allow USB HID to be started at boot time"],&o2x_usb_hid_on_boot)); - sd.addSetting(new MenuSettingBool(this,tr["USB storage on boot"],tr["Allow USB storage to be started at boot time"],&o2x_usb_storage_on_boot)); - //sd.addSetting(new MenuSettingInt(this,tr["Speaker Mode on boot"],tr["Set Speaker mode. 0 = Mute, 1 = Phones, 2 = Speaker"],&volumeMode,0,2)); - sd.addSetting(new MenuSettingInt(this,tr["Speaker Scaler"],tr["Set the Speaker Mode scaling 0-150\% (default is 100\%)"],&volumeScalerNormal,0,150)); - sd.addSetting(new MenuSettingInt(this,tr["Headphones Scaler"],tr["Set the Headphones Mode scaling 0-100\% (default is 65\%)"],&volumeScalerPhones,0,100)); - - if (sd.exec() && sd.edited()) { - writeConfigOpen2x(); - switch(volumeMode) { - case VOLUME_MODE_MUTE: setVolumeScaler(VOLUME_SCALER_MUTE); break; - case VOLUME_MODE_PHONES: setVolumeScaler(volumeScalerPhones); break; - case VOLUME_MODE_NORMAL: setVolumeScaler(volumeScalerNormal); break; - } - setVolume(confInt["globalVolume"]); - } -} - -void GMenu2X::skinMenu() { - FileLister fl_sk("skins",true,false); - fl_sk.exclude.push_back(".."); - fl_sk.browse(); - string curSkin = confStr["skin"]; - - SettingsDialog sd(this,tr["Skin"]); - sd.addSetting(new MenuSettingMultiString(this,tr["Skin"],tr["Set the skin used by GMenu2X"],&confStr["skin"],&fl_sk.directories)); - sd.addSetting(new MenuSettingRGBA(this,tr["Top Bar Color"],tr["Color of the top bar"],&skinConfColors["topBarBg"])); - sd.addSetting(new MenuSettingRGBA(this,tr["Bottom Bar Color"],tr["Color of the bottom bar"],&skinConfColors["bottomBarBg"])); - sd.addSetting(new MenuSettingRGBA(this,tr["Selection Color"],tr["Color of the selection and other interface details"],&skinConfColors["selectionBg"])); - sd.addSetting(new MenuSettingRGBA(this,tr["Message Box Color"],tr["Background color of the message box"],&skinConfColors["messageBoxBg"])); - sd.addSetting(new MenuSettingRGBA(this,tr["Message Box Border Color"],tr["Border color of the message box"],&skinConfColors["messageBoxBorder"])); - sd.addSetting(new MenuSettingRGBA(this,tr["Message Box Selection Color"],tr["Color of the selection of the message box"],&skinConfColors["messageBoxSelection"])); - - if (sd.exec() && sd.edited()) { - if (curSkin != confStr["skin"]) { - setSkin(confStr["skin"]); - writeConfig(); - } - writeSkinConfig(); - initBG(); - } -} - -void GMenu2X::toggleTvOut() { -#ifdef TARGET_GP2X - if (cx25874!=0) - gp2x_tvout_off(); - else - gp2x_tvout_on(confStr["tvoutEncoding"] == "PAL"); -#endif -} - -void GMenu2X::setSkin(string skin, bool setWallpaper) { - confStr["skin"] = skin; - - //Clear previous skin settings - skinConfColors.clear(); - skinConfStr.clear(); - skinConfInt.clear(); - - //clear collection and change the skin path - sc.clear(); - sc.setSkin(skin); - - //reset colors to the default values - skinConfColors["topBarBg"] = (RGBAColor){255,255,255,130}; - skinConfColors["bottomBarBg"] = (RGBAColor){255,255,255,130}; - skinConfColors["selectionBg"] = (RGBAColor){255,255,255,130}; - skinConfColors["messageBoxBg"] = (RGBAColor){255,255,255,255}; - skinConfColors["messageBoxBorder"] = (RGBAColor){80,80,80,255}; - skinConfColors["messageBoxSelection"] = (RGBAColor){160,160,160,255}; - - //load skin settings - string skinconfname = "skins/"+skin+"/skin.conf"; - if (fileExists(skinconfname)) { - ifstream skinconf(skinconfname.c_str(), ios_base::in); - if (skinconf.is_open()) { - string line; - while (getline(skinconf, line, '\n')) { - line = trim(line); - cout << "skinconf: " << line << endl; - string::size_type pos = line.find("="); - string name = trim(line.substr(0,pos)); - string value = trim(line.substr(pos+1,line.length())); - - if (value.length()>0) { - if (value.length()>1 && value.at(0)=='"' && value.at(value.length()-1)=='"') - skinConfStr[name] = value.substr(1,value.length()-2); - else if (value.at(0) == '#') - skinConfColors[name] = strtorgba( value.substr(1,value.length()) ); - else - skinConfInt[name] = atoi(value.c_str()); - } - } - skinconf.close(); - - if (setWallpaper && !skinConfStr["wallpaper"].empty() && fileExists("skins/"+skin+"/wallpapers/"+skinConfStr["wallpaper"])) - confStr["wallpaper"] = "skins/"+skin+"/wallpapers/"+skinConfStr["wallpaper"]; - } - } - - evalIntConf( &skinConfInt["topBarHeight"], 40, 32,120 ); - evalIntConf( &skinConfInt["linkHeight"], 40, 32,120 ); - evalIntConf( &skinConfInt["linkWidth"], 60, 32,120 ); - - //recalculate some coordinates based on the new element sizes - linkColumns = (resX-10)/skinConfInt["linkWidth"]; - linkRows = (resY-35-skinConfInt["topBarHeight"])/skinConfInt["linkHeight"]; - - if (menu != NULL) menu->loadIcons(); - - //Selection png - useSelectionPng = sc.addSkinRes("imgs/selection.png") != NULL; - - //font - initFont(); -} - -void GMenu2X::activateSdUsb() { - if (usbnet) { - MessageBox mb(this,tr["Operation not permitted."]+"\n"+tr["You should disable Usb Networking to do this."]); - mb.exec(); - } else { - system("scripts/usbon.sh sd"); - MessageBox mb(this,tr["USB Enabled (SD)"],"icons/usb.png"); - mb.buttons[ACTION_B] = tr["Turn off"]; - mb.exec(); - system("scripts/usboff.sh sd"); - } -} - -void GMenu2X::activateNandUsb() { - if (usbnet) { - MessageBox mb(this,tr["Operation not permitted."]+"\n"+tr["You should disable Usb Networking to do this."]); - mb.exec(); - } else { - system("scripts/usbon.sh nand"); - MessageBox mb(this,tr["USB Enabled (Nand)"],"icons/usb.png"); - mb.buttons[ACTION_B] = tr["Turn off"]; - mb.exec(); - system("scripts/usboff.sh nand"); - } -} - -void GMenu2X::activateRootUsb() { - if (usbnet) { - MessageBox mb(this,tr["Operation not permitted."]+"\n"+tr["You should disable Usb Networking to do this."]); - mb.exec(); - } else { - system("scripts/usbon.sh root"); - MessageBox mb(this,tr["USB Enabled (Root)"],"icons/usb.png"); - mb.buttons[ACTION_B] = tr["Turn off"]; - mb.exec(); - system("scripts/usboff.sh root"); - } -} - -void GMenu2X::contextMenu() { - vector<MenuOption> voices; - { - MenuOption opt = {tr.translate("Add link in $1",menu->selSection().c_str(),NULL), MakeDelegate(this, &GMenu2X::addLink)}; - voices.push_back(opt); - } - - if (menu->selLinkApp()!=NULL) { - { - MenuOption opt = {tr.translate("Edit $1",menu->selLink()->getTitle().c_str(),NULL), MakeDelegate(this, &GMenu2X::editLink)}; - voices.push_back(opt); - }{ - MenuOption opt = {tr.translate("Delete $1 link",menu->selLink()->getTitle().c_str(),NULL), MakeDelegate(this, &GMenu2X::deleteLink)}; - voices.push_back(opt); - } - } - - { - MenuOption opt = {tr["Add section"], MakeDelegate(this, &GMenu2X::addSection)}; - voices.push_back(opt); - }{ - MenuOption opt = {tr["Rename section"], MakeDelegate(this, &GMenu2X::renameSection)}; - voices.push_back(opt); - }{ - MenuOption opt = {tr["Delete section"], MakeDelegate(this, &GMenu2X::deleteSection)}; - voices.push_back(opt); - }{ - MenuOption opt = {tr["Scan for applications and games"], MakeDelegate(this, &GMenu2X::scanner)}; - voices.push_back(opt); - } - - bool close = false; - uint i, sel=0, fadeAlpha=0; - - int h = font->getHeight(); - int h2 = font->getHalfHeight(); - SDL_Rect box; - box.h = (h+2)*voices.size()+8; - box.w = 0; - for (i=0; i<voices.size(); i++) { - int w = font->getTextWidth(voices[i].text); - if (w>box.w) box.w = w; - } - box.w += 23; - box.x = halfX - box.w/2; - box.y = halfY - box.h/2; - - SDL_Rect selbox = {box.x+4, 0, box.w-8, h+2}; - long tickNow, tickStart = SDL_GetTicks(); - - Surface bg(s); - /*//Darken background - bg.box(0, 0, resX, resY, 0,0,0,150); - bg.box(box.x, box.y, box.w, box.h, skinConfColors["messageBoxBg"]); - bg.rectangle( box.x+2, box.y+2, box.w-4, box.h-4, skinConfColors["messageBoxBorder"] );*/ - while (!close) { - tickNow = SDL_GetTicks(); - - selbox.y = box.y+4+(h+2)*sel; - bg.blit(s,0,0); - - if (fadeAlpha<200) fadeAlpha = intTransition(0,200,tickStart,500,tickNow); - s->box(0, 0, resX, resY, 0,0,0,fadeAlpha); - s->box(box.x, box.y, box.w, box.h, skinConfColors["messageBoxBg"]); - s->rectangle( box.x+2, box.y+2, box.w-4, box.h-4, skinConfColors["messageBoxBorder"] ); - - - //draw selection rect - s->box( selbox.x, selbox.y, selbox.w, selbox.h, skinConfColors["messageBoxSelection"] ); - for (i=0; i<voices.size(); i++) - s->write( font, voices[i].text, box.x+12, box.y+h2+5+(h+2)*i, SFontHAlignLeft, SFontVAlignMiddle ); - s->flip(); - - //touchscreen - if (f200) { - ts.poll(); - if (ts.released()) { - if (!ts.inRect(box)) - close = true; - else if (ts.x>=selbox.x && ts.x<=selbox.x+selbox.w) - for (i=0; i<voices.size(); i++) { - selbox.y = box.y+4+(h+2)*i; - if (ts.y>=selbox.y && ts.y<=selbox.y+selbox.h) { - voices[i].action(); - close = true; - i = voices.size(); - } - } - } else if (ts.pressed() && ts.inRect(box)) { - for (i=0; i<voices.size(); i++) { - selbox.y = box.y+4+(h+2)*i; - if (ts.y>=selbox.y && ts.y<=selbox.y+selbox.h) { - sel = i; - i = voices.size(); - } - } - } - } - - input.update(); - if ( input[ACTION_SELECT] ) close = true; - if ( input[ACTION_UP ] ) sel = max(0, sel-1); - if ( input[ACTION_DOWN ] ) sel = min((int)voices.size()-1, sel+1); - if ( input[ACTION_B] ) { voices[sel].action(); close = true; } - } -} - -void GMenu2X::changeWallpaper() { - WallpaperDialog wp(this); - if (wp.exec() && confStr["wallpaper"] != wp.wallpaper) { - confStr["wallpaper"] = wp.wallpaper; - initBG(); - writeConfig(); - } -} - -void GMenu2X::saveScreenshot() { - ledOn(); - uint x = 0; - stringstream ss; - string fname; - do { - x++; - fname = ""; - ss.clear(); - ss << x; - ss >> fname; - fname = "screen"+fname+".bmp"; - } while (fileExists(fname)); - SDL_SaveBMP(s->raw,fname.c_str()); - sync(); - ledOff(); -} - -void GMenu2X::addLink() { - FileDialog fd(this,tr["Select an application"]); - if (fd.exec()) { - ledOn(); - menu->addLink(fd.path(), fd.file); - sync(); - ledOff(); - } -} - -void GMenu2X::editLink() { - if (menu->selLinkApp()==NULL) return; - - vector<string> pathV; - split(pathV,menu->selLinkApp()->file,"/"); - string oldSection = ""; - if (pathV.size()>1) - oldSection = pathV[pathV.size()-2]; - string newSection = oldSection; - - string linkTitle = menu->selLinkApp()->getTitle(); - string linkDescription = menu->selLinkApp()->getDescription(); - string linkIcon = menu->selLinkApp()->getIcon(); - string linkManual = menu->selLinkApp()->getManual(); - string linkParams = menu->selLinkApp()->getParams(); - string linkSelFilter = menu->selLinkApp()->getSelectorFilter(); - string linkSelDir = menu->selLinkApp()->getSelectorDir(); - bool linkSelBrowser = menu->selLinkApp()->getSelectorBrowser(); - bool linkUseRamTimings = menu->selLinkApp()->getUseRamTimings(); - string linkSelScreens = menu->selLinkApp()->getSelectorScreens(); - string linkSelAliases = menu->selLinkApp()->getAliasFile(); - int linkClock = menu->selLinkApp()->clock(); - int linkVolume = menu->selLinkApp()->volume(); - //G - int linkGamma = menu->selLinkApp()->gamma(); - - string diagTitle = tr.translate("Edit link: $1",linkTitle.c_str(),NULL); - string diagIcon = menu->selLinkApp()->getIconPath(); - - SettingsDialog sd(this,diagTitle,diagIcon); - sd.addSetting(new MenuSettingString(this,tr["Title"],tr["Link title"],&linkTitle, diagTitle,diagIcon)); - sd.addSetting(new MenuSettingString(this,tr["Description"],tr["Link description"],&linkDescription, diagTitle,diagIcon)); - sd.addSetting(new MenuSettingMultiString(this,tr["Section"],tr["The section this link belongs to"],&newSection,&menu->sections)); - sd.addSetting(new MenuSettingImage(this,tr["Icon"],tr.translate("Select an icon for the link: $1",linkTitle.c_str(),NULL),&linkIcon,".png,.bmp,.jpg,.jpeg")); - sd.addSetting(new MenuSettingFile(this,tr["Manual"],tr["Select a graphic/textual manual or a readme"],&linkManual,".man.png,.txt")); - sd.addSetting(new MenuSettingInt(this,tr["Clock (default: 200)"],tr["Cpu clock frequency to set when launching this link"],&linkClock,50,confInt["maxClock"])); - sd.addSetting(new MenuSettingBool(this,tr["Tweak RAM Timings"],tr["This usually speeds up the application at the cost of stability"],&linkUseRamTimings)); - sd.addSetting(new MenuSettingInt(this,tr["Volume (default: -1)"],tr["Volume to set for this link"],&linkVolume,-1,100)); - sd.addSetting(new MenuSettingString(this,tr["Parameters"],tr["Parameters to pass to the application"],&linkParams, diagTitle,diagIcon)); - sd.addSetting(new MenuSettingDir(this,tr["Selector Directory"],tr["Directory to scan for the selector"],&linkSelDir)); - sd.addSetting(new MenuSettingBool(this,tr["Selector Browser"],tr["Allow the selector to change directory"],&linkSelBrowser)); - sd.addSetting(new MenuSettingString(this,tr["Selector Filter"],tr["Filter for the selector (Separate values with a comma)"],&linkSelFilter, diagTitle,diagIcon)); - sd.addSetting(new MenuSettingDir(this,tr["Selector Screenshots"],tr["Directory of the screenshots for the selector"],&linkSelScreens)); - sd.addSetting(new MenuSettingFile(this,tr["Selector Aliases"],tr["File containing a list of aliases for the selector"],&linkSelAliases)); - //G - sd.addSetting(new MenuSettingInt(this,tr["Gamma (default: 0)"],tr["Gamma value to set when launching this link"],&linkGamma,0,100)); - sd.addSetting(new MenuSettingBool(this,tr["Wrapper"],tr["Explicitly relaunch GMenu2X after this link's execution ends"],&menu->selLinkApp()->wrapper)); - sd.addSetting(new MenuSettingBool(this,tr["Don't Leave"],tr["Don't quit GMenu2X when launching this link"],&menu->selLinkApp()->dontleave)); - - if (sd.exec() && sd.edited()) { - ledOn(); - - menu->selLinkApp()->setTitle(linkTitle); - menu->selLinkApp()->setDescription(linkDescription); - menu->selLinkApp()->setIcon(linkIcon); - menu->selLinkApp()->setManual(linkManual); - menu->selLinkApp()->setParams(linkParams); - menu->selLinkApp()->setSelectorFilter(linkSelFilter); - menu->selLinkApp()->setSelectorDir(linkSelDir); - menu->selLinkApp()->setSelectorBrowser(linkSelBrowser); - menu->selLinkApp()->setUseRamTimings(linkUseRamTimings); - menu->selLinkApp()->setSelectorScreens(linkSelScreens); - menu->selLinkApp()->setAliasFile(linkSelAliases); - menu->selLinkApp()->setClock(linkClock); - menu->selLinkApp()->setVolume(linkVolume); - //G - menu->selLinkApp()->setGamma(linkGamma); - -#ifdef DEBUG - cout << "New Section: " << newSection << endl; -#endif - //if section changed move file and update link->file - if (oldSection!=newSection) { - vector<string>::iterator newSectionIndex = find(menu->sections.begin(),menu->sections.end(),newSection); - if (newSectionIndex==menu->sections.end()) return; - string newFileName = "sections/"+newSection+"/"+linkTitle; - uint x=2; - while (fileExists(newFileName)) { - string id = ""; - stringstream ss; ss << x; ss >> id; - newFileName = "sections/"+newSection+"/"+linkTitle+id; - x++; - } - rename(menu->selLinkApp()->file.c_str(),newFileName.c_str()); - menu->selLinkApp()->file = newFileName; -#ifdef DEBUG - cout << "New section index: " << newSectionIndex - menu->sections.begin() << endl; -#endif - menu->linkChangeSection(menu->selLinkIndex(), menu->selSectionIndex(), newSectionIndex - menu->sections.begin()); - } - menu->selLinkApp()->save(); - sync(); - - ledOff(); - } -} - -void GMenu2X::deleteLink() { - if (menu->selLinkApp()!=NULL) { - MessageBox mb(this, tr.translate("Deleting $1",menu->selLink()->getTitle().c_str(),NULL)+"\n"+tr["Are you sure?"], menu->selLink()->getIconPath()); - mb.buttons[ACTION_B] = tr["Yes"]; - mb.buttons[ACTION_X] = tr["No"]; - if (mb.exec() == ACTION_B) { - ledOn(); - menu->deleteSelectedLink(); - sync(); - ledOff(); - } - } -} - -void GMenu2X::addSection() { - InputDialog id(this,tr["Insert a name for the new section"]); - if (id.exec()) { - //only if a section with the same name does not exist - if (find(menu->sections.begin(),menu->sections.end(),id.input)==menu->sections.end()) { - //section directory doesn't exists - ledOn(); - if (menu->addSection(id.input)) { - menu->setSectionIndex( menu->sections.size()-1 ); //switch to the new section - sync(); - } - ledOff(); - } - } -} - -void GMenu2X::renameSection() { - InputDialog id(this,tr["Insert a new name for this section"],menu->selSection()); - if (id.exec()) { - //only if a section with the same name does not exist & !samename - if (menu->selSection()!=id.input && find(menu->sections.begin(),menu->sections.end(),id.input)==menu->sections.end()) { - //section directory doesn't exists - string newsectiondir = "sections/"+id.input; - string sectiondir = "sections/"+menu->selSection(); - ledOn(); - if (rename(sectiondir.c_str(), "tmpsection")==0 && rename("tmpsection", newsectiondir.c_str())==0) { - string oldpng = sectiondir+".png", newpng = newsectiondir+".png"; - string oldicon = sc.getSkinFilePath(oldpng), newicon = sc.getSkinFilePath(newpng); - if (!oldicon.empty() && newicon.empty()) { - newicon = oldicon; - newicon.replace(newicon.find(oldpng), oldpng.length(), newpng); - - if (!fileExists(newicon)) { - rename(oldicon.c_str(), "tmpsectionicon"); - rename("tmpsectionicon", newicon.c_str()); - sc.move("skin:"+oldpng, "skin:"+newpng); - } - } - menu->sections[menu->selSectionIndex()] = id.input; - sync(); - } - ledOff(); - } - } -} - -void GMenu2X::deleteSection() { - MessageBox mb(this,tr["You will lose all the links in this section."]+"\n"+tr["Are you sure?"]); - mb.buttons[ACTION_B] = tr["Yes"]; - mb.buttons[ACTION_X] = tr["No"]; - if (mb.exec() == ACTION_B) { - ledOn(); - if (rmtree(path+"sections/"+menu->selSection())) { - menu->deleteSelectedSection(); - sync(); - } - ledOff(); - } -} - -void GMenu2X::scanner() { - Surface scanbg(bg); - drawButton(&scanbg, "x", tr["Exit"], - drawButton(&scanbg, "b", "", 5)-10); - scanbg.write(font,tr["Link Scanner"],halfX,7,SFontHAlignCenter,SFontVAlignMiddle); - - uint lineY = 42; - -#ifdef _TARGET_PANDORA - //char *configpath = pnd_conf_query_searchpath(); -#else - if (confInt["menuClock"]<200) { - setClock(200); - scanbg.write(font,tr["Raising cpu clock to 200Mhz"],5,lineY); - scanbg.blit(s,0,0); - s->flip(); - lineY += 26; - } - - scanbg.write(font,tr["Scanning SD filesystem..."],5,lineY); - scanbg.blit(s,0,0); - s->flip(); - lineY += 26; - - vector<string> files; - scanPath("/mnt/sd",&files); - - //Onyl gph firmware has nand - if (fwType=="gph" && !f200) { - scanbg.write(font,tr["Scanning NAND filesystem..."],5,lineY); - scanbg.blit(s,0,0); - s->flip(); - lineY += 26; - scanPath("/mnt/nand",&files); - } - - stringstream ss; - ss << files.size(); - string str = ""; - ss >> str; - scanbg.write(font,tr.translate("$1 files found.",str.c_str(),NULL),5,lineY); - lineY += 26; - scanbg.write(font,tr["Creating links..."],5,lineY); - scanbg.blit(s,0,0); - s->flip(); - lineY += 26; - - string path, file; - string::size_type pos; - uint linkCount = 0; - - ledOn(); - for (uint i = 0; i<files.size(); i++) { - pos = files[i].rfind("/"); - if (pos!=string::npos && pos>0) { - path = files[i].substr(0, pos+1); - file = files[i].substr(pos+1, files[i].length()); - if (menu->addLink(path,file,"found "+file.substr(file.length()-3,3))) - linkCount++; - } - } - - ss.clear(); - ss << linkCount; - ss >> str; - scanbg.write(font,tr.translate("$1 links created.",str.c_str(),NULL),5,lineY); - scanbg.blit(s,0,0); - s->flip(); - lineY += 26; - - if (confInt["menuClock"]<200) { - setClock(confInt["menuClock"]); - scanbg.write(font,tr["Decreasing cpu clock"],5,lineY); - scanbg.blit(s,0,0); - s->flip(); - lineY += 26; - } - - sync(); - ledOff(); -#endif - - bool close = false; - while (!close) { - input.update(); - if (input[ACTION_START] || input[ACTION_B] || input[ACTION_X]) close = true; - usleep(30000); - } -} - -void GMenu2X::scanPath(string path, vector<string> *files) { - DIR *dirp; - struct stat st; - struct dirent *dptr; - string filepath, ext; - - if (path[path.length()-1]!='/') path += "/"; - if ((dirp = opendir(path.c_str())) == NULL) return; - - while ((dptr = readdir(dirp))) { - if (dptr->d_name[0]=='.') - continue; - filepath = path+dptr->d_name; - int statRet = stat(filepath.c_str(), &st); - if (S_ISDIR(st.st_mode)) - scanPath(filepath, files); - if (statRet != -1) { - ext = filepath.substr(filepath.length()-4,4); -#ifdef TARGET_GP2X - if (ext==".gpu" || ext==".gpe") -#else - if (ext==".pxml") -#endif - files->push_back(filepath); - } - } - - closedir(dirp); -} - -unsigned short GMenu2X::getBatteryLevel() { -#ifdef TARGET_GP2X - if (batteryHandle<=0) return 0; - - if (f200) { - MMSP2ADC val; - read(batteryHandle, &val, sizeof(MMSP2ADC)); - - if (val.batt==0) return 5; - if (val.batt==1) return 3; - if (val.batt==2) return 1; - if (val.batt==3) return 0; - } else { - int battval = 0; - unsigned short cbv, min=900, max=0; - - for (int i = 0; i < BATTERY_READS; i ++) { - if ( read(batteryHandle, &cbv, 2) == 2) { - battval += cbv; - if (cbv>max) max = cbv; - if (cbv<min) min = cbv; - } - } - - battval -= min+max; - battval /= BATTERY_READS-2; - - if (battval>=850) return 6; - if (battval>780) return 5; - if (battval>740) return 4; - if (battval>700) return 3; - if (battval>690) return 2; - if (battval>680) return 1; - } - return 0; -#else - return 6; //AC Power -#endif -} - -void GMenu2X::setInputSpeed() { - input.setInterval(150); - input.setInterval(30, ACTION_VOLDOWN); - input.setInterval(30, ACTION_VOLUP ); - input.setInterval(30, ACTION_A ); - input.setInterval(500, ACTION_START ); - input.setInterval(500, ACTION_SELECT ); - input.setInterval(300, ACTION_X ); - input.setInterval(300, ACTION_Y ); - input.setInterval(1000,ACTION_B ); - //joy.setInterval(1000,ACTION_CLICK ); - input.setInterval(300, ACTION_L ); - input.setInterval(300, ACTION_R ); - SDL_EnableKeyRepeat(1,150); -} - -void GMenu2X::applyRamTimings() { -#ifdef TARGET_GP2X - // 6 4 1 1 1 2 2 - if (gp2x_mem!=0) { - int tRC = 5, tRAS = 3, tWR = 0, tMRD = 0, tRFC = 0, tRP = 1, tRCD = 1; - gp2x_memregs[0x3802>>1] = ((tMRD & 0xF) << 12) | ((tRFC & 0xF) << 8) | ((tRP & 0xF) << 4) | (tRCD & 0xF); - gp2x_memregs[0x3804>>1] = ((tRC & 0xF) << 8) | ((tRAS & 0xF) << 4) | (tWR & 0xF); - } -#endif -} - -void GMenu2X::applyDefaultTimings() { -#ifdef TARGET_GP2X - // 8 16 3 8 8 8 8 - if (gp2x_mem!=0) { - int tRC = 7, tRAS = 15, tWR = 2, tMRD = 7, tRFC = 7, tRP = 7, tRCD = 7; - gp2x_memregs[0x3802>>1] = ((tMRD & 0xF) << 12) | ((tRFC & 0xF) << 8) | ((tRP & 0xF) << 4) | (tRCD & 0xF); - gp2x_memregs[0x3804>>1] = ((tRC & 0xF) << 8) | ((tRAS & 0xF) << 4) | (tWR & 0xF); - } -#endif -} - -void GMenu2X::setClock(unsigned mhz) { - mhz = constrain(mhz,50,confInt["maxClock"]); -#ifdef TARGET_GP2X - if (gp2x_mem!=0) { - unsigned v; - unsigned mdiv,pdiv=3,scale=0; - mhz*=1000000; - mdiv=(mhz*pdiv)/GP2X_CLK_FREQ; - mdiv=((mdiv-8)<<8) & 0xff00; - pdiv=((pdiv-2)<<2) & 0xfc; - scale&=3; - v=mdiv | pdiv | scale; - MEM_REG[0x910>>1]=v; - } -#endif -} - -void GMenu2X::setGamma(int gamma) { -#ifdef TARGET_GP2X - float fgamma = (float)constrain(gamma,1,100)/10; - fgamma = 1 / fgamma; - MEM_REG[0x2880>>1]&=~(1<<12); - MEM_REG[0x295C>>1]=0; - - for (int i=0; i<256; i++) { - unsigned char g = (unsigned char)(255.0*pow(i/255.0,fgamma)); - unsigned short s = (g<<8) | g; - MEM_REG[0x295E>>1]= s; - MEM_REG[0x295E>>1]= g; - } -#endif -} - -int GMenu2X::getVolume() { - int vol = -1; - unsigned long soundDev = open("/dev/mixer", O_RDONLY); - if (soundDev) { - ioctl(soundDev, SOUND_MIXER_READ_PCM, &vol); - close(soundDev); - if (vol != -1) { - //just return one channel , not both channels, they're hopefully the same anyways - return vol & 0xFF; - } - } - return vol; -} - -void GMenu2X::setVolume(int vol) { - vol = constrain(vol,0,100); - unsigned long sou... [truncated message content] |
From: <sen...@us...> - 2009-02-23 14:32:30
|
Revision: 362 http://open2x.svn.sourceforge.net/open2x/?rev=362&view=rev Author: senquack Date: 2009-02-23 14:32:18 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Importing newer version of GPH media player customized for Open2X with fixes for selection bar and folder navigation by Senor Quack, also excludes OGG support that probably never worked with the avi format used anyways. Added Paths: ----------- trunk/apps/mp2x_4_1/ trunk/apps/mp2x_4_1/AUTHORS trunk/apps/mp2x_4_1/LICENSE trunk/apps/mp2x_4_1/mp2x trunk/apps/mp2x_4_1/mp2x.ini trunk/apps/mp2x_4_1/mp2x_topalign.ini trunk/apps/mp2x_4_1/readme.txt trunk/apps/mp2x_4_1/skin/ trunk/apps/mp2x_4_1/skin/asf.png trunk/apps/mp2x_4_1/skin/avi.png trunk/apps/mp2x_4_1/skin/body.png trunk/apps/mp2x_4_1/skin/dat.png trunk/apps/mp2x_4_1/skin/downarrow.png trunk/apps/mp2x_4_1/skin/error.png trunk/apps/mp2x_4_1/skin/ext.png trunk/apps/mp2x_4_1/skin/ext_on.png trunk/apps/mp2x_4_1/skin/folder.png trunk/apps/mp2x_4_1/skin/full.png trunk/apps/mp2x_4_1/skin/loading.png trunk/apps/mp2x_4_1/skin/mpg.png trunk/apps/mp2x_4_1/skin/nand.png trunk/apps/mp2x_4_1/skin/nand_on.png trunk/apps/mp2x_4_1/skin/normal.png trunk/apps/mp2x_4_1/skin/resume.png trunk/apps/mp2x_4_1/skin/save.png trunk/apps/mp2x_4_1/skin/sd.png trunk/apps/mp2x_4_1/skin/sd_on.png trunk/apps/mp2x_4_1/skin/selectbar.png trunk/apps/mp2x_4_1/skin/uparrow.png trunk/apps/mp2x_4_1/skin/wmv.png trunk/apps/mp2x_4_1/source/ trunk/apps/mp2x_4_1/source/AUTHORS trunk/apps/mp2x_4_1/source/DirDisplay.c trunk/apps/mp2x_4_1/source/DirDisplay.h trunk/apps/mp2x_4_1/source/DirList.c trunk/apps/mp2x_4_1/source/DirList.h trunk/apps/mp2x_4_1/source/FontDisplay.c trunk/apps/mp2x_4_1/source/FontDisplay.h trunk/apps/mp2x_4_1/source/LICENSE trunk/apps/mp2x_4_1/source/Makefile trunk/apps/mp2x_4_1/source/SDL_inifile.h trunk/apps/mp2x_4_1/source/UnicodeFont.h trunk/apps/mp2x_4_1/source/bswap.h trunk/apps/mp2x_4_1/source/codec-cfg.c trunk/apps/mp2x_4_1/source/codec-cfg.h trunk/apps/mp2x_4_1/source/config.h trunk/apps/mp2x_4_1/source/config.mak trunk/apps/mp2x_4_1/source/csource.lst trunk/apps/mp2x_4_1/source/cx25874.h trunk/apps/mp2x_4_1/source/drawcontrol.c trunk/apps/mp2x_4_1/source/drawcontrol.h trunk/apps/mp2x_4_1/source/dualcpu.h trunk/apps/mp2x_4_1/source/etc/ trunk/apps/mp2x_4_1/source/etc/codecs.conf trunk/apps/mp2x_4_1/source/etc/dvb-menu.conf trunk/apps/mp2x_4_1/source/etc/example.conf trunk/apps/mp2x_4_1/source/etc/input.conf trunk/apps/mp2x_4_1/source/etc/inttypes.h trunk/apps/mp2x_4_1/source/etc/menu.conf trunk/apps/mp2x_4_1/source/etc/mplayer.desktop trunk/apps/mp2x_4_1/source/etc/mplayer.ico trunk/apps/mp2x_4_1/source/fbdisp/ trunk/apps/mp2x_4_1/source/fbdisp/Makefile trunk/apps/mp2x_4_1/source/fbdisp/fblin16.c trunk/apps/mp2x_4_1/source/fbdisp/fblin24.c trunk/apps/mp2x_4_1/source/fbdisp/fblin32.c trunk/apps/mp2x_4_1/source/fbdisp/fbs.h trunk/apps/mp2x_4_1/source/fbdisp/gfxdev.h trunk/apps/mp2x_4_1/source/fbdisp/gfxtype.h trunk/apps/mp2x_4_1/source/fbdisp/main.c trunk/apps/mp2x_4_1/source/fbdisp/scr_fb.c trunk/apps/mp2x_4_1/source/filelistview.c trunk/apps/mp2x_4_1/source/filelistview.h trunk/apps/mp2x_4_1/source/find_sub.c trunk/apps/mp2x_4_1/source/g2player.h trunk/apps/mp2x_4_1/source/get_path.c trunk/apps/mp2x_4_1/source/glock.c trunk/apps/mp2x_4_1/source/glock.h trunk/apps/mp2x_4_1/source/gv.c trunk/apps/mp2x_4_1/source/gv.c.bak trunk/apps/mp2x_4_1/source/gvlib_export.h trunk/apps/mp2x_4_1/source/help/ trunk/apps/mp2x_4_1/source/help/help_diff.sh trunk/apps/mp2x_4_1/source/help/help_mp-bg.h trunk/apps/mp2x_4_1/source/help/help_mp-cs.h trunk/apps/mp2x_4_1/source/help/help_mp-de.h trunk/apps/mp2x_4_1/source/help/help_mp-dk.h trunk/apps/mp2x_4_1/source/help/help_mp-el.h trunk/apps/mp2x_4_1/source/help/help_mp-en.h trunk/apps/mp2x_4_1/source/help/help_mp-es.h trunk/apps/mp2x_4_1/source/help/help_mp-fr.h trunk/apps/mp2x_4_1/source/help/help_mp-hu.h trunk/apps/mp2x_4_1/source/help/help_mp-it.h trunk/apps/mp2x_4_1/source/help/help_mp-ja.h trunk/apps/mp2x_4_1/source/help/help_mp-ko.h trunk/apps/mp2x_4_1/source/help/help_mp-mk.h trunk/apps/mp2x_4_1/source/help/help_mp-nl.h trunk/apps/mp2x_4_1/source/help/help_mp-no.h trunk/apps/mp2x_4_1/source/help/help_mp-pl.h trunk/apps/mp2x_4_1/source/help/help_mp-pt_BR.h trunk/apps/mp2x_4_1/source/help/help_mp-ro.h trunk/apps/mp2x_4_1/source/help/help_mp-ru.h trunk/apps/mp2x_4_1/source/help/help_mp-sk.h trunk/apps/mp2x_4_1/source/help/help_mp-sv.h trunk/apps/mp2x_4_1/source/help/help_mp-tr.h trunk/apps/mp2x_4_1/source/help/help_mp-uk.h trunk/apps/mp2x_4_1/source/help/help_mp-zh_CN.h trunk/apps/mp2x_4_1/source/help/help_mp-zh_TW.h trunk/apps/mp2x_4_1/source/help_mp.h trunk/apps/mp2x_4_1/source/i2c.h trunk/apps/mp2x_4_1/source/imgNumber.h trunk/apps/mp2x_4_1/source/imgbinary.h trunk/apps/mp2x_4_1/source/liba52/ trunk/apps/mp2x_4_1/source/liba52/Makefile trunk/apps/mp2x_4_1/source/liba52/a52.h trunk/apps/mp2x_4_1/source/liba52/a52_internal.h trunk/apps/mp2x_4_1/source/liba52/attributes.h trunk/apps/mp2x_4_1/source/liba52/audio_out.h trunk/apps/mp2x_4_1/source/liba52/bit_allocate.c trunk/apps/mp2x_4_1/source/liba52/bitstream.c trunk/apps/mp2x_4_1/source/liba52/bitstream.h trunk/apps/mp2x_4_1/source/liba52/config.h trunk/apps/mp2x_4_1/source/liba52/crc.c trunk/apps/mp2x_4_1/source/liba52/downmix.c trunk/apps/mp2x_4_1/source/liba52/imdct.c trunk/apps/mp2x_4_1/source/liba52/mm_accel.h trunk/apps/mp2x_4_1/source/liba52/parse.c trunk/apps/mp2x_4_1/source/liba52/resample.c trunk/apps/mp2x_4_1/source/liba52/resample_c.c trunk/apps/mp2x_4_1/source/liba52/tables.h trunk/apps/mp2x_4_1/source/liba52/tendra.h trunk/apps/mp2x_4_1/source/libaf/ trunk/apps/mp2x_4_1/source/libaf/Makefile trunk/apps/mp2x_4_1/source/libaf/af.c trunk/apps/mp2x_4_1/source/libaf/af.h trunk/apps/mp2x_4_1/source/libaf/af_channels.c trunk/apps/mp2x_4_1/source/libaf/af_comp.c trunk/apps/mp2x_4_1/source/libaf/af_delay.c trunk/apps/mp2x_4_1/source/libaf/af_dummy.c trunk/apps/mp2x_4_1/source/libaf/af_equalizer.c trunk/apps/mp2x_4_1/source/libaf/af_export.c trunk/apps/mp2x_4_1/source/libaf/af_extrastereo.c trunk/apps/mp2x_4_1/source/libaf/af_format.c trunk/apps/mp2x_4_1/source/libaf/af_format.h trunk/apps/mp2x_4_1/source/libaf/af_format_alaw.c trunk/apps/mp2x_4_1/source/libaf/af_format_ulaw.c trunk/apps/mp2x_4_1/source/libaf/af_gate.c trunk/apps/mp2x_4_1/source/libaf/af_hrtf.c trunk/apps/mp2x_4_1/source/libaf/af_hrtf.h trunk/apps/mp2x_4_1/source/libaf/af_lavcresample.c trunk/apps/mp2x_4_1/source/libaf/af_mp.c trunk/apps/mp2x_4_1/source/libaf/af_mp.h trunk/apps/mp2x_4_1/source/libaf/af_pan.c trunk/apps/mp2x_4_1/source/libaf/af_resample.c trunk/apps/mp2x_4_1/source/libaf/af_resample.h trunk/apps/mp2x_4_1/source/libaf/af_sub.c trunk/apps/mp2x_4_1/source/libaf/af_surround.c trunk/apps/mp2x_4_1/source/libaf/af_sweep.c trunk/apps/mp2x_4_1/source/libaf/af_tools.c trunk/apps/mp2x_4_1/source/libaf/af_volnorm.c trunk/apps/mp2x_4_1/source/libaf/af_volume.c trunk/apps/mp2x_4_1/source/libaf/config.h trunk/apps/mp2x_4_1/source/libaf/control.h trunk/apps/mp2x_4_1/source/libaf/dsp.h trunk/apps/mp2x_4_1/source/libaf/equalizer.h trunk/apps/mp2x_4_1/source/libaf/filter.c trunk/apps/mp2x_4_1/source/libaf/filter.h trunk/apps/mp2x_4_1/source/libaf/window.c trunk/apps/mp2x_4_1/source/libaf/window.h trunk/apps/mp2x_4_1/source/libao2/ trunk/apps/mp2x_4_1/source/libao2/Makefile trunk/apps/mp2x_4_1/source/libao2/afmt.c trunk/apps/mp2x_4_1/source/libao2/afmt.h trunk/apps/mp2x_4_1/source/libao2/ao_alsa.c trunk/apps/mp2x_4_1/source/libao2/ao_alsa5.c trunk/apps/mp2x_4_1/source/libao2/ao_arts.c trunk/apps/mp2x_4_1/source/libao2/ao_dsound.c trunk/apps/mp2x_4_1/source/libao2/ao_dxr2.c trunk/apps/mp2x_4_1/source/libao2/ao_esd.c trunk/apps/mp2x_4_1/source/libao2/ao_jack.c trunk/apps/mp2x_4_1/source/libao2/ao_macosx.c trunk/apps/mp2x_4_1/source/libao2/ao_mpegpes.c trunk/apps/mp2x_4_1/source/libao2/ao_nas.c trunk/apps/mp2x_4_1/source/libao2/ao_null.c trunk/apps/mp2x_4_1/source/libao2/ao_oss.c trunk/apps/mp2x_4_1/source/libao2/ao_pcm.c trunk/apps/mp2x_4_1/source/libao2/ao_plugin.c trunk/apps/mp2x_4_1/source/libao2/ao_polyp.c trunk/apps/mp2x_4_1/source/libao2/ao_sdl.c trunk/apps/mp2x_4_1/source/libao2/ao_sgi.c trunk/apps/mp2x_4_1/source/libao2/ao_sun.c trunk/apps/mp2x_4_1/source/libao2/ao_win32.c trunk/apps/mp2x_4_1/source/libao2/audio_out.c trunk/apps/mp2x_4_1/source/libao2/audio_out.h trunk/apps/mp2x_4_1/source/libao2/audio_out_internal.h trunk/apps/mp2x_4_1/source/libao2/audio_plugin.h trunk/apps/mp2x_4_1/source/libao2/audio_plugin_internal.h trunk/apps/mp2x_4_1/source/libao2/config.mak trunk/apps/mp2x_4_1/source/libao2/eq.h trunk/apps/mp2x_4_1/source/libao2/filter.h trunk/apps/mp2x_4_1/source/libao2/fir.h trunk/apps/mp2x_4_1/source/libao2/firfilter.c trunk/apps/mp2x_4_1/source/libao2/pl_delay.c trunk/apps/mp2x_4_1/source/libao2/pl_eq.c trunk/apps/mp2x_4_1/source/libao2/pl_extrastereo.c trunk/apps/mp2x_4_1/source/libao2/pl_format.c trunk/apps/mp2x_4_1/source/libao2/pl_resample.c trunk/apps/mp2x_4_1/source/libao2/pl_surround.c trunk/apps/mp2x_4_1/source/libao2/pl_volnorm.c trunk/apps/mp2x_4_1/source/libao2/pl_volume.c trunk/apps/mp2x_4_1/source/libao2/remez.c trunk/apps/mp2x_4_1/source/libao2/remez.h trunk/apps/mp2x_4_1/source/libfaad2/ trunk/apps/mp2x_4_1/source/libfaad2/Makefile trunk/apps/mp2x_4_1/source/libfaad2/README trunk/apps/mp2x_4_1/source/libfaad2/analysis.h trunk/apps/mp2x_4_1/source/libfaad2/bits.c trunk/apps/mp2x_4_1/source/libfaad2/bits.h trunk/apps/mp2x_4_1/source/libfaad2/cfft.c trunk/apps/mp2x_4_1/source/libfaad2/cfft.h trunk/apps/mp2x_4_1/source/libfaad2/cfft_tab.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/ trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_1.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_10.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_11.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_2.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_3.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_4.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_5.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_6.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_7.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_8.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_9.h trunk/apps/mp2x_4_1/source/libfaad2/codebook/hcb_sf.h trunk/apps/mp2x_4_1/source/libfaad2/common.c trunk/apps/mp2x_4_1/source/libfaad2/common.h trunk/apps/mp2x_4_1/source/libfaad2/decoder.c trunk/apps/mp2x_4_1/source/libfaad2/decoder.h trunk/apps/mp2x_4_1/source/libfaad2/drc.c trunk/apps/mp2x_4_1/source/libfaad2/drc.h trunk/apps/mp2x_4_1/source/libfaad2/drm_dec.c trunk/apps/mp2x_4_1/source/libfaad2/drm_dec.h trunk/apps/mp2x_4_1/source/libfaad2/error.c trunk/apps/mp2x_4_1/source/libfaad2/error.h trunk/apps/mp2x_4_1/source/libfaad2/faad.h trunk/apps/mp2x_4_1/source/libfaad2/filtbank.c trunk/apps/mp2x_4_1/source/libfaad2/filtbank.h trunk/apps/mp2x_4_1/source/libfaad2/fixed.h trunk/apps/mp2x_4_1/source/libfaad2/hcr.c trunk/apps/mp2x_4_1/source/libfaad2/huffman.c trunk/apps/mp2x_4_1/source/libfaad2/huffman.h trunk/apps/mp2x_4_1/source/libfaad2/ic_predict.c trunk/apps/mp2x_4_1/source/libfaad2/ic_predict.h trunk/apps/mp2x_4_1/source/libfaad2/iq_table.h trunk/apps/mp2x_4_1/source/libfaad2/is.c trunk/apps/mp2x_4_1/source/libfaad2/is.h trunk/apps/mp2x_4_1/source/libfaad2/kbd_win.h trunk/apps/mp2x_4_1/source/libfaad2/local_changes.diff trunk/apps/mp2x_4_1/source/libfaad2/lt_predict.c trunk/apps/mp2x_4_1/source/libfaad2/lt_predict.h trunk/apps/mp2x_4_1/source/libfaad2/mdct.c trunk/apps/mp2x_4_1/source/libfaad2/mdct.h trunk/apps/mp2x_4_1/source/libfaad2/mdct_tab.h trunk/apps/mp2x_4_1/source/libfaad2/mp4.c trunk/apps/mp2x_4_1/source/libfaad2/mp4.h trunk/apps/mp2x_4_1/source/libfaad2/ms.c trunk/apps/mp2x_4_1/source/libfaad2/ms.h trunk/apps/mp2x_4_1/source/libfaad2/neaacdec.h trunk/apps/mp2x_4_1/source/libfaad2/output.c trunk/apps/mp2x_4_1/source/libfaad2/output.h trunk/apps/mp2x_4_1/source/libfaad2/pns.c trunk/apps/mp2x_4_1/source/libfaad2/pns.h trunk/apps/mp2x_4_1/source/libfaad2/ps_dec.c trunk/apps/mp2x_4_1/source/libfaad2/ps_dec.h trunk/apps/mp2x_4_1/source/libfaad2/ps_syntax.c trunk/apps/mp2x_4_1/source/libfaad2/ps_tables.h trunk/apps/mp2x_4_1/source/libfaad2/pulse.c trunk/apps/mp2x_4_1/source/libfaad2/pulse.h trunk/apps/mp2x_4_1/source/libfaad2/rvlc.c trunk/apps/mp2x_4_1/source/libfaad2/rvlc.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_dct.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_dct.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_dec.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_dec.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_e_nf.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_e_nf.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_fbt.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_fbt.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_hfadj.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_hfadj.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_hfgen.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_hfgen.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_huff.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_huff.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_noise.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_qmf.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_qmf.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_qmf_c.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_syntax.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_syntax.h trunk/apps/mp2x_4_1/source/libfaad2/sbr_tf_grid.c trunk/apps/mp2x_4_1/source/libfaad2/sbr_tf_grid.h trunk/apps/mp2x_4_1/source/libfaad2/sine_win.h trunk/apps/mp2x_4_1/source/libfaad2/specrec.c trunk/apps/mp2x_4_1/source/libfaad2/specrec.h trunk/apps/mp2x_4_1/source/libfaad2/ssr.c trunk/apps/mp2x_4_1/source/libfaad2/ssr.h trunk/apps/mp2x_4_1/source/libfaad2/ssr_fb.c trunk/apps/mp2x_4_1/source/libfaad2/ssr_fb.h trunk/apps/mp2x_4_1/source/libfaad2/ssr_ipqf.c trunk/apps/mp2x_4_1/source/libfaad2/ssr_ipqf.h trunk/apps/mp2x_4_1/source/libfaad2/ssr_win.h trunk/apps/mp2x_4_1/source/libfaad2/structs.h trunk/apps/mp2x_4_1/source/libfaad2/syntax.c trunk/apps/mp2x_4_1/source/libfaad2/syntax.h trunk/apps/mp2x_4_1/source/libfaad2/tns.c trunk/apps/mp2x_4_1/source/libfaad2/tns.h trunk/apps/mp2x_4_1/source/libmpcodecs/ trunk/apps/mp2x_4_1/source/libmpcodecs/Makefile trunk/apps/mp2x_4_1/source/libmpcodecs/TODO trunk/apps/mp2x_4_1/source/libmpcodecs/ac3dec.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad.h trunk/apps/mp2x_4_1/source/libmpcodecs/ad_acm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_alaw.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_dk3adpcm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_dmo.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_dshow.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_dvdpcm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_faad.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_ffmpeg.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_hwac3.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_hwac3i.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_imaadpcm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_internal.h trunk/apps/mp2x_4_1/source/libmpcodecs/ad_liba52.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_libdts.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_libdv.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_libmad.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_libvorbis.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_libvorbis.c.orig trunk/apps/mp2x_4_1/source/libmpcodecs/ad_mp3lib.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_msadpcm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_msgsm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_pcm.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_qtaudio.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_ra1428.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_realaud.c trunk/apps/mp2x_4_1/source/libmpcodecs/ad_sample.c trunk/apps/mp2x_4_1/source/libmpcodecs/ae_toolame.c trunk/apps/mp2x_4_1/source/libmpcodecs/ae_toolame.h trunk/apps/mp2x_4_1/source/libmpcodecs/cmmx.h trunk/apps/mp2x_4_1/source/libmpcodecs/dec_audio.c trunk/apps/mp2x_4_1/source/libmpcodecs/dec_audio.h trunk/apps/mp2x_4_1/source/libmpcodecs/dec_video.c trunk/apps/mp2x_4_1/source/libmpcodecs/dec_video.h trunk/apps/mp2x_4_1/source/libmpcodecs/dtsdec.c trunk/apps/mp2x_4_1/source/libmpcodecs/img_format.c trunk/apps/mp2x_4_1/source/libmpcodecs/img_format.h trunk/apps/mp2x_4_1/source/libmpcodecs/mp_image.h trunk/apps/mp2x_4_1/source/libmpcodecs/mpc_info.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/ trunk/apps/mp2x_4_1/source/libmpcodecs/native/RTjpegN.c trunk/apps/mp2x_4_1/source/libmpcodecs/native/RTjpegN.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/alaw.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/common1428.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/decode144.c trunk/apps/mp2x_4_1/source/libmpcodecs/native/decode144.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/decode288.c trunk/apps/mp2x_4_1/source/libmpcodecs/native/decode288.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/lzoconf.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/minilzo.c trunk/apps/mp2x_4_1/source/libmpcodecs/native/minilzo.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/nuppelvideo.c trunk/apps/mp2x_4_1/source/libmpcodecs/native/tables144.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/tables288.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/xa_gsm.c trunk/apps/mp2x_4_1/source/libmpcodecs/native/xa_gsm.h trunk/apps/mp2x_4_1/source/libmpcodecs/native/xa_gsm_int.h trunk/apps/mp2x_4_1/source/libmpcodecs/pullup.c trunk/apps/mp2x_4_1/source/libmpcodecs/pullup.h trunk/apps/mp2x_4_1/source/libmpcodecs/vd.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd.h trunk/apps/mp2x_4_1/source/libmpcodecs/vd_divx4.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_dmo.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_dshow.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_ffmpeg.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_hmblck.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_ijpg.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_internal.h trunk/apps/mp2x_4_1/source/libmpcodecs/vd_libdv.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_libmpeg2.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_lzo.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_mpegpes.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_mpng.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_mtga.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_null.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_nuv.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_odivx.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_qtvideo.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_raw.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_realvid.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_sgi.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_theora.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_vfw.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_vfwex.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_xanim.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_xvid.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_xvid4.c trunk/apps/mp2x_4_1/source/libmpcodecs/vd_zrmjpeg.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_divx4.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_lavc.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_libdv.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_nuv.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_qtvideo.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_raw.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_vfw.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_x264.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_xvid.c trunk/apps/mp2x_4_1/source/libmpcodecs/ve_xvid4.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf.h trunk/apps/mp2x_4_1/source/libmpcodecs/vf_1bpp.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_2xsai.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_bmovl.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_boxblur.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_crop.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_cropdetect.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_decimate.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_delogo.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_denoise3d.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_detc.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_dint.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_divtc.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_down3dright.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_dsize.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_dvbscale.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_eq.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_eq2.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_expand.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_fame.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_field.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_fil.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_filmdint.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_flip.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_format.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_framestep.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_halfpack.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_harddup.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_hqdn3d.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_hue.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_il.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_ilpack.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_ivtc.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_kerndeint.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_lavc.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_lavcdeint.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_mirror.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_noformat.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_noise.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_palette.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_perspective.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_phase.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_pp.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_pullup.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_qp.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_rectangle.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_rgb2bgr.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_rgbtest.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_rotate.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_sab.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_scale.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_scale.h trunk/apps/mp2x_4_1/source/libmpcodecs/vf_smartblur.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_softpulldown.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_softskip.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_spp.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_swapuv.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_telecine.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_test.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_tfields.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_tile.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_tinterlace.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_unsharp.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_vo.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_yuvcsp.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_yuy2.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_yvu9.c trunk/apps/mp2x_4_1/source/libmpcodecs/vf_zrmjpeg.c trunk/apps/mp2x_4_1/source/libmpcodecs/vfcap.h trunk/apps/mp2x_4_1/source/libmpdemux/ trunk/apps/mp2x_4_1/source/libmpdemux/Makefile trunk/apps/mp2x_4_1/source/libmpdemux/README trunk/apps/mp2x_4_1/source/libmpdemux/ai_alsa.c trunk/apps/mp2x_4_1/source/libmpdemux/ai_alsa1x.c trunk/apps/mp2x_4_1/source/libmpdemux/ai_oss.c trunk/apps/mp2x_4_1/source/libmpdemux/asf.h trunk/apps/mp2x_4_1/source/libmpdemux/asf_mmst_streaming.c trunk/apps/mp2x_4_1/source/libmpdemux/asf_streaming.c trunk/apps/mp2x_4_1/source/libmpdemux/asfheader.c trunk/apps/mp2x_4_1/source/libmpdemux/audio_in.c trunk/apps/mp2x_4_1/source/libmpdemux/audio_in.h trunk/apps/mp2x_4_1/source/libmpdemux/aviheader.c trunk/apps/mp2x_4_1/source/libmpdemux/aviheader.h trunk/apps/mp2x_4_1/source/libmpdemux/aviprint.c trunk/apps/mp2x_4_1/source/libmpdemux/bswap.h trunk/apps/mp2x_4_1/source/libmpdemux/cache2.c trunk/apps/mp2x_4_1/source/libmpdemux/cdd.h trunk/apps/mp2x_4_1/source/libmpdemux/cdda.c trunk/apps/mp2x_4_1/source/libmpdemux/cddb.c trunk/apps/mp2x_4_1/source/libmpdemux/cdinfo.c trunk/apps/mp2x_4_1/source/libmpdemux/config.h trunk/apps/mp2x_4_1/source/libmpdemux/cookies.c trunk/apps/mp2x_4_1/source/libmpdemux/cookies.h trunk/apps/mp2x_4_1/source/libmpdemux/cue_read.c trunk/apps/mp2x_4_1/source/libmpdemux/cue_read.h trunk/apps/mp2x_4_1/source/libmpdemux/demux_asf.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_audio.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_avi.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_demuxers.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_film.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_fli.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_gif.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_lavf.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_lmlm4.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_mf.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_mkv.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_mov.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_mpg.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_nsv.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_nuv.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_ogg.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_pva.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_rawaudio.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_rawdv.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_rawvideo.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_real.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_realaud.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_roq.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_rtp.cpp trunk/apps/mp2x_4_1/source/libmpdemux/demux_rtp.h trunk/apps/mp2x_4_1/source/libmpdemux/demux_rtp_codec.cpp trunk/apps/mp2x_4_1/source/libmpdemux/demux_rtp_internal.h trunk/apps/mp2x_4_1/source/libmpdemux/demux_smjpeg.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_ts.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_ty.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_ty_osd.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_viv.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_xmms.c trunk/apps/mp2x_4_1/source/libmpdemux/demux_xmms_plugin.h trunk/apps/mp2x_4_1/source/libmpdemux/demux_y4m.c trunk/apps/mp2x_4_1/source/libmpdemux/demuxer.c trunk/apps/mp2x_4_1/source/libmpdemux/demuxer.h trunk/apps/mp2x_4_1/source/libmpdemux/dvb_defaults.h trunk/apps/mp2x_4_1/source/libmpdemux/dvb_tune.c trunk/apps/mp2x_4_1/source/libmpdemux/dvbin.c trunk/apps/mp2x_4_1/source/libmpdemux/dvbin.h trunk/apps/mp2x_4_1/source/libmpdemux/dvdnav_stream.c trunk/apps/mp2x_4_1/source/libmpdemux/dvdnav_stream.h trunk/apps/mp2x_4_1/source/libmpdemux/ebml.c trunk/apps/mp2x_4_1/source/libmpdemux/ebml.h trunk/apps/mp2x_4_1/source/libmpdemux/extension.c trunk/apps/mp2x_4_1/source/libmpdemux/frequencies.c trunk/apps/mp2x_4_1/source/libmpdemux/frequencies.h trunk/apps/mp2x_4_1/source/libmpdemux/genres.h trunk/apps/mp2x_4_1/source/libmpdemux/help_mp.h trunk/apps/mp2x_4_1/source/libmpdemux/http.c trunk/apps/mp2x_4_1/source/libmpdemux/http.h trunk/apps/mp2x_4_1/source/libmpdemux/matroska.h trunk/apps/mp2x_4_1/source/libmpdemux/mf.c trunk/apps/mp2x_4_1/source/libmpdemux/mf.h trunk/apps/mp2x_4_1/source/libmpdemux/mp3_hdr.c trunk/apps/mp2x_4_1/source/libmpdemux/mp3_hdr.h trunk/apps/mp2x_4_1/source/libmpdemux/mp_msg.h trunk/apps/mp2x_4_1/source/libmpdemux/mpeg_hdr.c trunk/apps/mp2x_4_1/source/libmpdemux/mpeg_hdr.h trunk/apps/mp2x_4_1/source/libmpdemux/ms_hdr.h trunk/apps/mp2x_4_1/source/libmpdemux/muxer.c trunk/apps/mp2x_4_1/source/libmpdemux/muxer.h trunk/apps/mp2x_4_1/source/libmpdemux/muxer_avi.c trunk/apps/mp2x_4_1/source/libmpdemux/muxer_mpeg.c trunk/apps/mp2x_4_1/source/libmpdemux/muxer_rawvideo.c trunk/apps/mp2x_4_1/source/libmpdemux/netstream.h trunk/apps/mp2x_4_1/source/libmpdemux/network.c trunk/apps/mp2x_4_1/source/libmpdemux/network.h trunk/apps/mp2x_4_1/source/libmpdemux/nuppelvideo.h trunk/apps/mp2x_4_1/source/libmpdemux/open.c trunk/apps/mp2x_4_1/source/libmpdemux/parse_es.c trunk/apps/mp2x_4_1/source/libmpdemux/parse_es.h trunk/apps/mp2x_4_1/source/libmpdemux/parse_mp4.c trunk/apps/mp2x_4_1/source/libmpdemux/parse_mp4.h trunk/apps/mp2x_4_1/source/libmpdemux/pnm.c trunk/apps/mp2x_4_1/source/libmpdemux/pnm.h trunk/apps/mp2x_4_1/source/libmpdemux/qtpalette.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/ trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/asmrp.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/asmrp.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/real.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/real.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/rmff.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/rmff.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/rtsp.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/rtsp.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/rtsp_session.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/rtsp_session.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/sdpplin.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/sdpplin.h trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/xbuffer.c trunk/apps/mp2x_4_1/source/libmpdemux/realrtsp/xbuffer.h trunk/apps/mp2x_4_1/source/libmpdemux/rtp.c trunk/apps/mp2x_4_1/source/libmpdemux/rtp.h trunk/apps/mp2x_4_1/source/libmpdemux/stheader.h trunk/apps/mp2x_4_1/source/libmpdemux/stream.c trunk/apps/mp2x_4_1/source/libmpdemux/stream.h trunk/apps/mp2x_4_1/source/libmpdemux/stream_file.c trunk/apps/mp2x_4_1/source/libmpdemux/stream_ftp.c trunk/apps/mp2x_4_1/source/libmpdemux/stream_netstream.c trunk/apps/mp2x_4_1/source/libmpdemux/stream_null.c trunk/apps/mp2x_4_1/source/libmpdemux/stream_vcd.c trunk/apps/mp2x_4_1/source/libmpdemux/test.c trunk/apps/mp2x_4_1/source/libmpdemux/tv.c trunk/apps/mp2x_4_1/source/libmpdemux/tv.h trunk/apps/mp2x_4_1/source/libmpdemux/tvi_bsdbt848.c trunk/apps/mp2x_4_1/source/libmpdemux/tvi_def.h trunk/apps/mp2x_4_1/source/libmpdemux/tvi_dummy.c trunk/apps/mp2x_4_1/source/libmpdemux/tvi_v4l.c trunk/apps/mp2x_4_1/source/libmpdemux/tvi_v4l2.c trunk/apps/mp2x_4_1/source/libmpdemux/url.c trunk/apps/mp2x_4_1/source/libmpdemux/url.h trunk/apps/mp2x_4_1/source/libmpdemux/vcd_read.h trunk/apps/mp2x_4_1/source/libmpdemux/vcd_read_darwin.h trunk/apps/mp2x_4_1/source/libmpdemux/vcd_read_fbsd.h trunk/apps/mp2x_4_1/source/libmpdemux/vcd_read_nbsd.h trunk/apps/mp2x_4_1/source/libmpdemux/video.c trunk/apps/mp2x_4_1/source/libmpdemux/videodev2.h trunk/apps/mp2x_4_1/source/libmpdemux/yuv4mpeg.c trunk/apps/mp2x_4_1/source/libmpdemux/yuv4mpeg.h trunk/apps/mp2x_4_1/source/libmpdemux/yuv4mpeg_intern.h trunk/apps/mp2x_4_1/source/libmpdemux/yuv4mpeg_ratio.c trunk/apps/mp2x_4_1/source/loader/ trunk/apps/mp2x_4_1/source/loader/Makefile trunk/apps/mp2x_4_1/source/loader/afl.c trunk/apps/mp2x_4_1/source/loader/com.h trunk/apps/mp2x_4_1/source/loader/config.h trunk/apps/mp2x_4_1/source/loader/dmo/ trunk/apps/mp2x_4_1/source/loader/dmo/DMO_AudioDecoder.c trunk/apps/mp2x_4_1/source/loader/dmo/DMO_AudioDecoder.h trunk/apps/mp2x_4_1/source/loader/dmo/DMO_Filter.h trunk/apps/mp2x_4_1/source/loader/dmo/DMO_VideoDecoder.c trunk/apps/mp2x_4_1/source/loader/dmo/DMO_VideoDecoder.h trunk/apps/mp2x_4_1/source/loader/dmo/Makefile trunk/apps/mp2x_4_1/source/loader/dmo/buffer.c trunk/apps/mp2x_4_1/source/loader/dmo/dmo.c trunk/apps/mp2x_4_1/source/loader/dmo/dmo.h trunk/apps/mp2x_4_1/source/loader/dmo/dmo_guids.c trunk/apps/mp2x_4_1/source/loader/dmo/dmo_guids.h trunk/apps/mp2x_4_1/source/loader/dmo/dmo_interfaces.h trunk/apps/mp2x_4_1/source/loader/driver.c trunk/apps/mp2x_4_1/source/loader/driver.h trunk/apps/mp2x_4_1/source/loader/dshow/ trunk/apps/mp2x_4_1/source/loader/dshow/DS_AudioDecoder.c trunk/apps/mp2x_4_1/source/loader/dshow/DS_AudioDecoder.h trunk/apps/mp2x_4_1/source/loader/dshow/DS_Filter.c trunk/apps/mp2x_4_1/source/loader/dshow/DS_Filter.h trunk/apps/mp2x_4_1/source/loader/dshow/DS_VideoDecoder.c trunk/apps/mp2x_4_1/source/loader/dshow/DS_VideoDecoder.h trunk/apps/mp2x_4_1/source/loader/dshow/Makefile trunk/apps/mp2x_4_1/source/loader/dshow/allocator.c trunk/apps/mp2x_4_1/source/loader/dshow/allocator.h trunk/apps/mp2x_4_1/source/loader/dshow/cmediasample.c trunk/apps/mp2x_4_1/source/loader/dshow/cmediasample.h trunk/apps/mp2x_4_1/source/loader/dshow/guids.c trunk/apps/mp2x_4_1/source/loader/dshow/guids.h trunk/apps/mp2x_4_1/source/loader/dshow/inputpin.c trunk/apps/mp2x_4_1/source/loader/dshow/inputpin.h trunk/apps/mp2x_4_1/source/loader/dshow/interfaces.h trunk/apps/mp2x_4_1/source/loader/dshow/iunk.h trunk/apps/mp2x_4_1/source/loader/dshow/libwin32.h trunk/apps/mp2x_4_1/source/loader/dshow/outputpin.c trunk/apps/mp2x_4_1/source/loader/dshow/outputpin.h trunk/apps/mp2x_4_1/source/loader/dshow/test.c trunk/apps/mp2x_4_1/source/loader/dshow/test.divx trunk/apps/mp2x_4_1/source/loader/elfdll.c trunk/apps/mp2x_4_1/source/loader/ext.c trunk/apps/mp2x_4_1/source/loader/ext.h trunk/apps/mp2x_4_1/source/loader/ldt_keeper.c trunk/apps/mp2x_4_1/source/loader/ldt_keeper.h trunk/apps/mp2x_4_1/source/loader/loader.h trunk/apps/mp2x_4_1/source/loader/loader_objfix.sh trunk/apps/mp2x_4_1/source/loader/module.c trunk/apps/mp2x_4_1/source/loader/pe_image.c trunk/apps/mp2x_4_1/source/loader/pe_resource.c trunk/apps/mp2x_4_1/source/loader/qt_comp.h trunk/apps/mp2x_4_1/source/loader/qt_fv.h trunk/apps/mp2x_4_1/source/loader/qtx/ trunk/apps/mp2x_4_1/source/loader/qtx/c.sh trunk/apps/mp2x_4_1/source/loader/qtx/list.c trunk/apps/mp2x_4_1/source/loader/qtx/qtxload.c trunk/apps/mp2x_4_1/source/loader/qtx/qtxsdk/ trunk/apps/mp2x_4_1/source/loader/qtx/qtxsdk/components.h trunk/apps/mp2x_4_1/source/loader/qtx/qtxsdk/select.h trunk/apps/mp2x_4_1/source/loader/registry.c trunk/apps/mp2x_4_1/source/loader/registry.h trunk/apps/mp2x_4_1/source/loader/resource.c trunk/apps/mp2x_4_1/source/loader/stubs.s trunk/apps/mp2x_4_1/source/loader/vfl.c trunk/apps/mp2x_4_1/source/loader/win32.c trunk/apps/mp2x_4_1/source/loader/win32.h trunk/apps/mp2x_4_1/source/loader/wine/ trunk/apps/mp2x_4_1/source/loader/wine/avifmt.h trunk/apps/mp2x_4_1/source/loader/wine/basetsd.h trunk/apps/mp2x_4_1/source/loader/wine/debugtools.h trunk/apps/mp2x_4_1/source/loader/wine/driver.h trunk/apps/mp2x_4_1/source/loader/wine/elfdll.h trunk/apps/mp2x_4_1/source/loader/wine/heap.h trunk/apps/mp2x_4_1/source/loader/wine/ldt.h trunk/apps/mp2x_4_1/source/loader/wine/mmreg.h trunk/apps/mp2x_4_1/source/loader/wine/module.h trunk/apps/mp2x_4_1/source/loader/wine/msacm.h trunk/apps/mp2x_4_1/source/loader/wine/msacmdrv.h trunk/apps/mp2x_4_1/source/loader/wine/ntdef.h trunk/apps/mp2x_4_1/source/loader/wine/pe_image.h trunk/apps/mp2x_4_1/source/loader/wine/poppack.h trunk/apps/mp2x_4_1/source/loader/wine/pshpack1.h trunk/apps/mp2x_4_1/source/loader/wine/pshpack2.h trunk/apps/mp2x_4_1/source/loader/wine/pshpack4.h trunk/apps/mp2x_4_1/source/loader/wine/pshpack8.h trunk/apps/mp2x_4_1/source/loader/wine/vfw.h trunk/apps/mp2x_4_1/source/loader/wine/winbase.h trunk/apps/mp2x_4_1/source/loader/wine/windef.h trunk/apps/mp2x_4_1/source/loader/wine/windows.h trunk/apps/mp2x_4_1/source/loader/wine/winerror.h trunk/apps/mp2x_4_1/source/loader/wine/winestring.h trunk/apps/mp2x_4_1/source/loader/wine/winnt.h trunk/apps/mp2x_4_1/source/loader/wine/winreg.h trunk/apps/mp2x_4_1/source/loader/wine/winuser.h trunk/apps/mp2x_4_1/source/loader/wineacm.h trunk/apps/mp2x_4_1/source/loader/wrapper.S trunk/apps/mp2x_4_1/source/loader/wrapper.h trunk/apps/mp2x_4_1/source/m_config.c trunk/apps/mp2x_4_1/source/m_config.h trunk/apps/mp2x_4_1/source/m_option.c trunk/apps/mp2x_4_1/source/m_option.h trunk/apps/mp2x_4_1/source/m_struct.c trunk/apps/mp2x_4_1/source/m_struct.h trunk/apps/mp2x_4_1/source/mangle.h trunk/apps/mp2x_4_1/source/mixer.c trunk/apps/mp2x_4_1/source/mixer.h trunk/apps/mp2x_4_1/source/mmsp2_940_if.c trunk/apps/mp2x_4_1/source/mmsp2_if.h trunk/apps/mp2x_4_1/source/mp_msg.c trunk/apps/mp2x_4_1/source/mp_msg.h trunk/apps/mp2x_4_1/source/mplayer.c trunk/apps/mp2x_4_1/source/mplayer.h trunk/apps/mp2x_4_1/source/osdep/ trunk/apps/mp2x_4_1/source/osdep/Makefile trunk/apps/mp2x_4_1/source/osdep/fseeko.c trunk/apps/mp2x_4_1/source/osdep/getch2-win.c trunk/apps/mp2x_4_1/source/osdep/getch2.c trunk/apps/mp2x_4_1/source/osdep/getch2.h trunk/apps/mp2x_4_1/source/osdep/gettimeofday.c trunk/apps/mp2x_4_1/source/osdep/glob-win.c trunk/apps/mp2x_4_1/source/osdep/glob.h trunk/apps/mp2x_4_1/source/osdep/kerneltwosix.h trunk/apps/mp2x_4_1/source/osdep/keycodes.h trunk/apps/mp2x_4_1/source/osdep/lrmi.c trunk/apps/mp2x_4_1/source/osdep/lrmi.h trunk/apps/mp2x_4_1/source/osdep/macosx_finder_args.c trunk/apps/mp2x_4_1/source/osdep/mplayer.rc trunk/apps/mp2x_4_1/source/osdep/scandir.c trunk/apps/mp2x_4_1/source/osdep/shmem.c trunk/apps/mp2x_4_1/source/osdep/shmem.h trunk/apps/mp2x_4_1/source/osdep/strl.c trunk/apps/mp2x_4_1/source/osdep/strsep.c trunk/apps/mp2x_4_1/source/osdep/swab.c trunk/apps/mp2x_4_1/source/osdep/timer-darwin.c trunk/apps/mp2x_4_1/source/osdep/timer-lx.c trunk/apps/mp2x_4_1/source/osdep/timer-win2.c trunk/apps/mp2x_4_1/source/osdep/timer.h trunk/apps/mp2x_4_1/source/osdep/vbelib.c trunk/apps/mp2x_4_1/source/osdep/vbelib.h trunk/apps/mp2x_4_1/source/osdep/vsscanf.c trunk/apps/mp2x_4_1/source/rtc_1024_table.h trunk/apps/mp2x_4_1/source/subdisp.c trunk/apps/mp2x_4_1/source/subdisp.h trunk/apps/mp2x_4_1/source/subreader.c trunk/apps/mp2x_4_1/source/subreader.h trunk/apps/mp2x_4_1/source/typed.h trunk/apps/mp2x_4_1/source/version.h trunk/apps/mp2x_4_1/source/vpp.h trunk/apps/mp2x_4_1/source/vpts_q.c trunk/apps/mp2x_4_1/source/wincetype.h Added: trunk/apps/mp2x_4_1/AUTHORS =================================================================== --- trunk/apps/mp2x_4_1/AUTHORS (rev 0) +++ trunk/apps/mp2x_4_1/AUTHORS 2009-02-23 14:32:18 UTC (rev 362) @@ -0,0 +1,962 @@ + ***************************************** + AUTHORS + ***************************************** + +NOTE: NEVER send bug reports, help and feature requests directly to the +authors, but you're free to write mails about donating! + +For donation requests visit http://www.mplayerhq.hu/homepage/donations.html. + + +___________________ +The MPlayer project +~~~~~~~~~~~~~~~~~~~ + +MPlayer was originally written by \xC1rp\xE1d Gere\xF6ffy (for a more complete history +see DOCS/HTML/en/history.html) and later extended by a bunch of other people, +some of which are listed here in alphabetical order. If you think you are +missing, feel free to send a patch. + +Ackermann, Andreas (Acki) <asa...@st...> + * LIRC support + * DGA support in libvo + +adland <adl...@ya...> + * support for various Windows DLL codecs (LCW2, ASLC) + * SMIL playlist parser + * many streaming bug fixes and improvements + * libfaad2 update + +Anholt, Eric <ea...@gl...> + * CPU detection code + +Ashberg, Folke <fo...@as...> + * native AAlib driver (-vo aa) + +Balatoni, D\xE9nes <pn...@co...> + * XMMS inputplugin support + * minor features & fixes mostly to make MPlayer work better on a PDA + +Barat, Zsolt (joyping) <jo...@st...> + * ao_alsa9 fixes, AC3 passthrough support + * ao_alsa unified ALSA audio output driver + +Barbato, Luca (lu_zero) <lu...@ge...> + * random AltiVec fixes + * other minor fixes + +Baryshkov, Dmitry (lumag) <mi...@sc...> + * Russian documentation translation + * FLAC decoding support + * XML build system + +Baudet, Bertrand <ber...@ya...> + * network streaming support author + * CDDB support + +Bedel, Alban (albeu) <al...@fr...> + * MMS network streaming patches + * playtree and per-entry config + * playlist parsers + * new input layer, slave mode improvements + * audio only support + * MP3, WAV and Ogg demuxers, Ogg in AVI fixes + * support for audio from an external file + * DXR2 driver + * vo_aa improvements + * CDDA support + * OSD menu + * new modular config/command line parser code + +Belev, Luchezar (lucho) <lu...@ha...> + * hw-accelerated video eq support into x11, gl2 (using DirectColor cmap) + +B\xE9rczi, G\xE1bor (Gabucino) <gab...@mp...> + * large parts the original HTML and TXT documentation + * original Hungarian documentation, homepage, console message translation + * second homepage design & gfx + * original homepage content + * testing, codecs quality & speed comparisons + * experimental MINIX port :) (what's funny about it?) + * MPsub subtitle format design + * AlienMind, BlueHeart, CubicPlayer, MidnightLove, netscape4, + WMP6, xanim, xine-lcd skins + +Berecz, Szabolcs (Szabi) <sz...@in...> + * codecs.conf file parser + * config file and command line parser + * mga_vid fixes, module option, etc + * fbdev video output driver + * type #7 subtitle support + +Beregsz\xE1szi, Alex (al3x) <al...@fs...> + * second project maintainer + * alsa5 and alsa9 audio output drivers in libao2 + * ggi video output driver (www.ggi-project.org) + * XAnim codecs support + * VIVO files, codecs support + * TV grabbing support + * QuickTime hackings + * libavcodec support in MEncoder + * RM file format demuxer + * MEncoder framecopy + * yuv4mpeg1 support + * NuppelVideo demuxer changes + * subconfig + * VIDIX and libdha hackings + * Matrox driver port to VIDIX + * XVIDIX video output driver + * many other things (in libvo, libmad syncing, dec_audio/video and loader) + * libmpcodecs / libmpdemux hacking + * patch review + * dynamic a/v plugins (external shared ad/vd/.. objects) + * millions of bug fixes + +Bitterberg, Tilmann <tra...@ti...> + * AVI OpenDML read support + +Biurrun, Diego (DonDiego) <di...@bi...> + * documentation all over the place + * command line option documentation completed + * README, wishlist, translations.txt + * random trivial fixes + * main tester and small fixes for the Cygwin and MinGW ports + * testing, bug reports + * homepage content improvements, design7, HTML fixed + * Hunglish to English translation everywhere + * head of the Ministry for English Composition + * ultrafina skin + * skin review part I + * patch review + +Blomenkamp, Marcus <Mar...@ep...> + * VIDIX patches (Rage128, Radeon 7000) + * OSS AC3 passthrough fix + +Buehler, Andrew (The Wanderer) <inv...@co...> + * various documentation spelling and grammar corrections + * mp_msg transition on main source files + +Bulgroz, Eviv <ebu...@ya...> + * presets support for mp3lame encoding + * AVI demuxer time/bitrate calculation fixes + * various bug fixes + +B\xFCnemann, Felix (Atmos) <atm...@us...> + * additional YUV formats fixes + * new font (mp_font2.zip) + * png video output driver + * flipping support (for Indeo 3/4, etc) + * SDL audio output driver in libao2 + * RAW PCM/WAVE file writer for libao2 + * Ogg Vorbis audio support + * aspect ratio code improvements, prescaling support + * Win32 (Cygwin) port + * DivX5Linux support + * AAC decoding support via libfaad2 + * Darwin (Mac OS X) port + +Bunkus, Moritz (Mosu) <mo...@bu...> + * various OGM hacks/fixes + * OGMtools author + * Matroska demuxer + +Christiansen, Dan Villiom Podlaski (danchr) <da...@da...> + * timer-darwin.c + * ao_macosx + * build system cleanups for Darwin + +Clagg, Jeff (snacky) <sn...@ik...> + * minor updates and fixes for x264 support + * superficial clarity fixes for mpcf.txt + +Comstedt, Marcus <ma...@id...> + * initial Solaris 8 x86 support + * configure fixes + +Cook, Kees <mp...@ou...> + * dvdnav hacks + * rawdv demuxer fixes + +Davies, Stephen <st...@da...> + * support for large video files (>2^32 bytes in size) + * surround sound aop plugin + +Di Vita, Piero (Scognito) <sco...@li...> + * gnome, trium skins + * new GUI icons + * skin review part II + +Diedrich, Tobias (ranma) <ra...@gm...> + * NAS audio output driver + * DXR2 driver + * softpulldown video filter + * ported Donald Graft's kerndeint video filter + * AVI OpenDML write support + +Dietrich, Florian <fl...@ya...> + * MinGW networking support + +Dobbelaere, Jeroen <jer...@ac...> + * original libmad support + +D\xF6ffinger, Reimar (reimar) <rei...@st...> + * GL code fixes + * various fixes all over the place + * reworked live changing playback speed + * made MMS over HTTP stream selection work and modified ASF header parsing + +Dolbeau, Romain <ro...@do...> + * random AltiVec (PowerPC multimedia extensions) stuff + * vo_quartz YUV support & fixes + * endianness fixes + +D\xF6nmez, Ismail (cartman) <ism...@bo...> + * compile fix for mga_vid to compile with Linux 2.5/2.6 kernels + * small fixes all around + +Egger, Christoph <chr...@gm...> + * vo_ggi updates + +Elsinghorst, Paul Wilhelm <pa...@un...> + * GUI: remote ESD support including software mixer + +Ernesti, Bernd <mp...@li...> + * NetBSD support patches + +Falco, Salvatore <sf...@st...> + * jacosub parsing & dump support + * overlapping subtitles & sub sorting support + * SAMI subtitles dump support + +Feigl, Johannes (jaf) <joh...@ao...> + * original German docs translation (outdated) + * some improvements in configure, small patches + * found somebody (Thilo Wunderlich) who sent a DVB card + +Felker, D Richard III (dalias) <da...@ae...> + * lots of work on inverse telecine including initial support + * improved MEncoder (getting rid of DivX4 dependency, seeking, ...) + * antialiased DVD subtitles + * misc bug fixes and improvements, esp. in video filter/output system + * tech docs on encoding + * eq, halfpack, dint, detc, field, decimate, dsize, ilpack, ivtc, + tfields, pullup video filters + +Ferguson, Tim <ti...@ma...> + * open source Cinepak decoder + * open source CYUV decoder + +Finlayson, Ross <fin...@li...> + * LIVE.COM Streaming Media library author + * RTP/RTSP streaming support + +Forghieri, Daniele (xdanny) <gu...@di...> + * TGA output driver + * framestep & tile video filters + * initial Italian man page translation + * fixes and improvements to lavc audio encoding + +Foth, Kilian A. <fo...@in...> + * slave mode + +Franz, Fabian (Fabianx) <mp...@fa...> + * help with the libmpeg2 0.3.0 update + * playlist improvements + * KDE screensaver support + * mini skin + +Gansser, Martin <mga...@ng...> + * HP-UX port + +Gere\xF6ffy, \xC1rp\xE1d (A'rpi/ESP-team) <ar...@th...> + * project founder, first project maintainer + * MPlayer, MEncoder core, A-V sync + * libmpdemux, demultiplexer for MPEG, ASF, AVI, various fixes in others + * mp3lib, based on mpglib sources [MP3 audio decoder] + * getch2 [keyboard handler] + * some changes in libmpeg2 code (progressive frames, bitrate & fps support) + * libvo improvements: adding OpenGL support, bug fix in mga driver... + * triple buffering & YUY2 support (for DivX/MPEG-4) into mga_vid driver + * OSD & subtitle display code + * FFmpeg/libavcodec integration + * DivX4Linux (Project Mayo) support (see documentation) + * New DVD support using libdvdread + * MPEG PES output & DVB card support + * libmpcodecs design, porting video decoders, filters + +Giani, Matteo <mat...@ct...> + * PVA demuxer + +Goethel, Sven <sgo...@ja...> + * vo_gl2 video output driver + +Gomez Garcia, German <ge...@pi...> + * SPDIF AC3 output for SBLive! + +Gottwald, Alexander <Ale...@in...> + * various small bug fixes + +Graffam, Michael <mgr...@id...> + * XF86VidMode support to vo_x11 and vo_dga + * video mode switching code to vo_dga + +Gritsenko, Andriy N. (AG_LS) <an...@lu...> + * drop-deinterlace (dint) video filter + * muxer layer, and new MPEG-PS muxer + +Guyomarch, R\xE9mi (rguyom) <rg...@po...> + * various fixes + * unsharp video filter + * XviD encoding support + +Hammelmann, J\xFCrgen <jue...@gm...> + * TOOLS/mencvcd author + +Hertel, Christopher R. <cr...@ub...> + * md5sum code used by vo_md5sum. part of uCIFS library. + +Hess, Andreas <ja...@gm...> + * upgrading libdvdcss in libmpdvdkit2 + * various small bug fixes + +Hickey, Corey <bug...@fa...> + * telecine/interlacing HOWTO for the MEncoder documentation + +Hidv\xE9gi, Zolt\xE1n (Zoli) <mp...@hz...> + * filmdint video filter + +Hoffmann, Jens <hof...@gm...> + * additional YUV formats support + * found the big BITMAPINFOHEADER problem -> solved ASV2 pixelization + +Holm, David (dholm, mswitch) <dh...@te...> + * DXR3 support + +Horst, Bohdan (Nexus) <ne...@ir...> + * FreeBSD support + +Hug, Hampa <hh...@st...> + * LUT-based soft eq video filter (vf_eq2) + * .ogm demuxer endianness fixes + +Hurka, Tomas <to...@hu...> + * Darwin DVD support (mpdvdkit2) + * various fixes + +Isani, Sidik <lk...@cf...> + * get_delay() smoothing code (-autosync) + * RTC initialization fixes + * various small fixes + +Issaris, Panagiotis (takis) <ta...@lu...> + * -playlist option + * NuppelVideo support + * various fixes + +Jacobs, Aurelien <au...@gn...> + * standalone C Matroska demuxer + * DTS support + +Jelveh, Reza (timebomb) <rez...@tu...> + * NSV demuxer + * seeking in Real files without index + * savage_vid VIDIX driver + * miscellaneous small fixes and improvements + +Jermann, Jonas (g0th) <jje...@gm...> + * manual page rewrite + * documentation + +Johansson, Anders <aj...@at...> + * old audio plugin system, some effect plugins + * new libaf interface design, implementation, plugins + +Kain, Nicholas <nj...@ae...> + * strl(cpy|cat) detection and conversion + * string handling cleanups + +Kalinski, Filip (filon) <fi...@pl...> + * X11 fulscreen switching fixes/cleanup + +Kalvachev, Ivan (iive) <ii...@ya...> + * interlaced MPEG-2 support (libmpeg2) + * libvo2 draft + * configfile parser fixes + * SRT subtitle dump support + * Bulgarian console message translation (help_mp-bg.h) + * vo_svga rewrite + * various fixes and small improvements + * XvMC support (MPlayer & FFmpeg) + * XviD4 driver import (vd/ve_xvid4.c by GomGom) + +Kaniewski, Wojtek <woj...@by...> + * mouse wheel support + * made the FreeType + RAW font support work together + +Kaplan, Kim Minh <kmk...@se...> + * DVD and VOBsub subtitles display support + * DVD subtitles rip to VOBsub + +K\xE4rkk\xE4inen, Samuli <ska...@wo...> + * first DVD ripping guide + +Keil, J\xFCrgen <jk...@to...> + * patched MPlayer to work on Solaris 8 x86 + * various fixes (Win32, configure, etc) + * sun audio output driver in libao2 + * mediaLib support in libavcodec + * esd audio output driver in libao2 + +Kesterson, Robert <ro...@ro...> + * yuv4mpeg video output driver + +Kinali, Attila (KotH) <at...@ki...> + * various small fixes in the X11 code + * xinerama support + * documentation + * patch application monkey, mailer daemon + +Kovriga, Gregory <gko...@te...> + * GUI drag & drop support + * GUI DVD fixes + * various small bug fixes in ASX/URL parser + +K\xFChling, David <dvd...@gm...> + * libtheora support, Ogg/Theora demuxing changes + +Kuivinen, Fredrik (ksorim) <fre...@st...> + * OSD/subtitles outside a movie for SDL + * video filter layer draft, first implementation + * VirtualDub filter support (not yet finished/committed) + +Kurshev, Nick <nic...@ma...> + * memcpy optimizations for AMD K7 and Intel Pentium III (fastmemcpy.h) + * CD-ROM tune info + * further 3DNow! optimizations into mp3lib and libac3 and FFmpeg + * first Russian documentation translation (outdated) + * radeon_vid, rage128_vid, radeonfb + * vesa video output driver + * VIDIX and libdha design, programming, Rage128/Radeon VIDIX drivers + +Kuschak, Brian <bku...@ya...> + * RTP streaming support (reading) + +Kushnir, Vladimir <vku...@Al...> + * patched MPlayer to work on FreeBSD x86 + +Lambley, Dave <mp...@da...> + * HTTP cookie support + +L\xE1szl\xF3, Gyula (Chass, T\xE9gla) <ch...@fr...> + * first fonts (mp_font1.zip) + * third and fourth homepage design & gfx + +Le Gaillart, Nicolas <n...@to...> + * French documentation translation + * documentation updates and fixes + * 2nd half of the documentation HTML --> XML conversion + +L\xE9n\xE1rt, G\xE1bor (LGB) <lg...@lg...> + * configure script improvements + * Makefile improvements + * preliminary DVD support (libcss) + * various X11 cleanups and fixes + * HTMLization of the documentation + +Leroy, Colin <co...@co...> + * GUI endianness fixes + * volume control with -ao sdl + * -ovc lavc endianness fixes + * -ao pcm endianness fixes + * libdha on PowerPC Linux + * mach64 VIDIX driver endianness fixes + +Liljeblad, Oskar <os...@os...> + * various OSD related patches + +Lin, Sam <it...@so...> + * -wid (plugger) patch + +Lombard, Pierre (pl) <p_...@gm...> + * new configure script + * general code maintaining, fixes, patch committing + +Madick, Puk <pi...@sw...> + * KDE/GNOME2 fullscreen fix + * configparser fixes + +Makovicka, Jindrich (henry, x0rph) <mak...@KM...> + * various bug fixes + * rewrote v4l video capturing, implemented audio capturing layer + * FreeType 2 font rendering support + +Marek, Rudolf <MA...@cs...> + * gtf code for -vo vesa + * NeoMagic TV out support through VESA VBE + +Megyer, L\xE1szl\xF3 (Lez, Laaz) <le...@sc...> + * subtitle reader + * screensaver + DPMS disable for libvo + +Melanson, Mike (tmmm) <mel...@pc...> + * MS Video1 codec open source implementation + * FLI demuxer, decoder + * unified ADPCM decoder (supports IMA/DVI, MS ADPCM, several others) + * FILM (.cpk) file demuxer + * RoQ file demuxer, audio/video decoder + * QT SMC decoder + * QT RLE decoder + * MS RLE decoder reimplementation + +von Merkatz, Arwed <v.m...@gm...> + * fontconfig font lookup support + +Merritt, Loren (pengvado) <lorenm@u.washington.edu> + * x264 encoding support + * x264 documentation + * some libavcodec documentation + +Mierzejewski, Dominik (Rathann) <do...@ra...> + * compiler warning fixes + * official Red Hat RPM packages + * Polish documentation translation + +Milushev, Mihail <la...@la...> + * GIMP font generator plugin (TOOLS/subfont-gimp) + +Mistry, Nehal (Nehal) <neh...@gm...> + * various audio driver fixes + +Mohari, Andr\xE1s <ma...@va...> + * skin documentation + * various docs updates and fixes + * 1st half of the documentation HTML --> XML conversion + +Mueller, Steven <dif...@ug...> + * first implementation of live changing playback speed + +Neundorf, Alexander <neu...@kd...> + * raw DV demuxer + * demuxer packet refcounting + +Niedermayer, Michael (michaelni) <mic...@gm...> + * new, GPL postprocessing code (with deinterlacing etc...) + * software scaling with MMX/MMX2/3DNow! support (swscale.c) + * various RGB/YUV bpp converters + * new, better IDCT code for libavcodec, DivX decoder speedup + * runtime CPU detection + * liba52 SSE optimization + * various encoder/decoder fixes, improvements in libavcodec, DR support + * lrintf() bugs + * many bug fixes + * patch review + * boxblur, fil, hue, il, noise, perspective, qp, rgbtest, sab, smartblur, + spp, swapuv, test video filters + +Noring, Fredrik <no...@no...> + * -vo DGA fixes + +Ohm, Christian <ch...@gm...> + * various small bug fixes + +Parrish, Joey <jo...@ni...> + * various fixes + * -vo gif89a author + * GIF demuxer author + * Windows support improvements + * Cygwin installer package + +Pietrzak, Dariusz (Eyck) <ey...@gh...> + * Debian packaging support (see debian/* and the documentation) + * support for vplayer subtitle format + * preliminary support for .RT subtitle format + +Plourde, Nicolas <nic...@sy...> + * quartz video output driver for Mac OS X + * Darwin VCD/SVCD support + +Poettering, Lennart <mzz...@0p...> + * audio driver for the Polypaudio sound server + +Poirier, Guillaume <gui...@et...> + * French documentation translation and synchronization + * XviD documentation + * lavc's turbo mode + +Ponekker, Zolt\xE1n (Pontscho/fresh!mindworkz) <pon...@ma...> + * the original configure script and Makefiles for easy compilation + * GUI system + * 3DNow! support into mp3lib and fastmemcpy.h + * various X11 driver changes, fixes (keyboard handling, fullscreen, + bpp detect, etc) + * xmga video output driver + * audio mixer (volume) support + +van Poorten, Ivo (ivop) <iv...@eu...> + * multiple directory support for vo_jpeg + * vo_jpeg suboptions pa... [truncated message content] |
From: <sen...@us...> - 2009-02-23 13:29:31
|
Revision: 361 http://open2x.svn.sourceforge.net/open2x/?rev=361&view=rev Author: senquack Date: 2009-02-23 13:29:27 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Making way for newer Open2X version of GPH's mplayer Added Paths: ----------- trunk/apps/mplayer.old/ Removed Paths: ------------- trunk/apps/mplayer/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-23 12:57:24
|
Revision: 360 http://open2x.svn.sourceforge.net/open2x/?rev=360&view=rev Author: senquack Date: 2009-02-23 12:57:17 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Removing unneeded volumescaler utility Removed Paths: ------------- trunk/utils/volumescale/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-23 12:51:49
|
Revision: 359 http://open2x.svn.sourceforge.net/open2x/?rev=359&view=rev Author: senquack Date: 2009-02-23 12:51:28 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Adding latest GMenu2X with new Open2X enhancements like in-kernel mmuhack support, /dev/GPIO remapping support, and volume scaling, and various bugfixes Added Paths: ----------- trunk/utils/gmenu2x/ trunk/utils/gmenu2x/AUTHORS trunk/utils/gmenu2x/COPYING trunk/utils/gmenu2x/ChangeLog trunk/utils/gmenu2x/INSTALL trunk/utils/gmenu2x/README.txt trunk/utils/gmenu2x/autorun.gpu trunk/utils/gmenu2x/build/ trunk/utils/gmenu2x/build/gmenu2x trunk/utils/gmenu2x/build/gmenu2x.conf trunk/utils/gmenu2x/build/input.conf trunk/utils/gmenu2x/build/open2x_backup/ trunk/utils/gmenu2x/build/open2x_backup/sections/ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/ebook trunk/utils/gmenu2x/build/open2x_backup/sections/applications/filemanager trunk/utils/gmenu2x/build/open2x_backup/sections/applications/image trunk/utils/gmenu2x/build/open2x_backup/sections/applications/music trunk/utils/gmenu2x/build/open2x_backup/sections/applications/pdf trunk/utils/gmenu2x/build/open2x_backup/sections/applications/video trunk/utils/gmenu2x/build/scripts/ trunk/utils/gmenu2x/build/scripts/restore_o2x_apps.sh trunk/utils/gmenu2x/build/scripts/services.sh trunk/utils/gmenu2x/build/scripts/usboff.sh trunk/utils/gmenu2x/build/scripts/usbon.sh trunk/utils/gmenu2x/build/sections/ trunk/utils/gmenu2x/build/sections/applications/ trunk/utils/gmenu2x/build/sections/applications/ebook trunk/utils/gmenu2x/build/sections/applications/filemanager trunk/utils/gmenu2x/build/sections/applications/image trunk/utils/gmenu2x/build/sections/applications/music trunk/utils/gmenu2x/build/sections/applications/pdf trunk/utils/gmenu2x/build/sections/applications/video trunk/utils/gmenu2x/build/sections/settings/ trunk/utils/gmenu2x/build/sections/settings/lcdtimings trunk/utils/gmenu2x/build/sections/settings/mountext trunk/utils/gmenu2x/build/sections/settings/tscalibrate trunk/utils/gmenu2x/build/skins/ trunk/utils/gmenu2x/build/skins/Default/ trunk/utils/gmenu2x/build/skins/Default/icons/ trunk/utils/gmenu2x/build/skins/Default/icons/about.png trunk/utils/gmenu2x/build/skins/Default/icons/calibrate.png trunk/utils/gmenu2x/build/skins/Default/icons/configure.png trunk/utils/gmenu2x/build/skins/Default/icons/ebook.png trunk/utils/gmenu2x/build/skins/Default/icons/exit.png trunk/utils/gmenu2x/build/skins/Default/icons/explorer.png trunk/utils/gmenu2x/build/skins/Default/icons/filemgr.png trunk/utils/gmenu2x/build/skins/Default/icons/generic.png trunk/utils/gmenu2x/build/skins/Default/icons/image.png trunk/utils/gmenu2x/build/skins/Default/icons/lcdsettings.png trunk/utils/gmenu2x/build/skins/Default/icons/mplayer.png trunk/utils/gmenu2x/build/skins/Default/icons/music.png trunk/utils/gmenu2x/build/skins/Default/icons/o2xconfigure.png trunk/utils/gmenu2x/build/skins/Default/icons/pdf.png trunk/utils/gmenu2x/build/skins/Default/icons/photo.png trunk/utils/gmenu2x/build/skins/Default/icons/section.png trunk/utils/gmenu2x/build/skins/Default/icons/skin.png trunk/utils/gmenu2x/build/skins/Default/icons/tv.png trunk/utils/gmenu2x/build/skins/Default/icons/usb.png trunk/utils/gmenu2x/build/skins/Default/icons/wallpaper.png trunk/utils/gmenu2x/build/skins/Default/imgs/ trunk/utils/gmenu2x/build/skins/Default/imgs/battery/ trunk/utils/gmenu2x/build/skins/Default/imgs/battery/0.png trunk/utils/gmenu2x/build/skins/Default/imgs/battery/1.png trunk/utils/gmenu2x/build/skins/Default/imgs/battery/2.png trunk/utils/gmenu2x/build/skins/Default/imgs/battery/3.png trunk/utils/gmenu2x/build/skins/Default/imgs/battery/4.png trunk/utils/gmenu2x/build/skins/Default/imgs/battery/5.png trunk/utils/gmenu2x/build/skins/Default/imgs/battery/ac.png trunk/utils/gmenu2x/build/skins/Default/imgs/bottombar.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/ trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/a.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/b.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/down.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/l.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/left.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/r.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/right.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/select.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/start.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/stick.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/up.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/vol+.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/vol-.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/x.png trunk/utils/gmenu2x/build/skins/Default/imgs/buttons/y.png trunk/utils/gmenu2x/build/skins/Default/imgs/cpu.png trunk/utils/gmenu2x/build/skins/Default/imgs/file.png trunk/utils/gmenu2x/build/skins/Default/imgs/folder.png trunk/utils/gmenu2x/build/skins/Default/imgs/font.png trunk/utils/gmenu2x/build/skins/Default/imgs/go-up.png trunk/utils/gmenu2x/build/skins/Default/imgs/inet.png trunk/utils/gmenu2x/build/skins/Default/imgs/l_disabled.png trunk/utils/gmenu2x/build/skins/Default/imgs/l_enabled.png trunk/utils/gmenu2x/build/skins/Default/imgs/left.png trunk/utils/gmenu2x/build/skins/Default/imgs/manual.png trunk/utils/gmenu2x/build/skins/Default/imgs/menu.png trunk/utils/gmenu2x/build/skins/Default/imgs/mute.png trunk/utils/gmenu2x/build/skins/Default/imgs/phones.png trunk/utils/gmenu2x/build/skins/Default/imgs/r_disabled.png trunk/utils/gmenu2x/build/skins/Default/imgs/r_enabled.png trunk/utils/gmenu2x/build/skins/Default/imgs/right.png trunk/utils/gmenu2x/build/skins/Default/imgs/samba.png trunk/utils/gmenu2x/build/skins/Default/imgs/sd.png trunk/utils/gmenu2x/build/skins/Default/imgs/sd_removed.png trunk/utils/gmenu2x/build/skins/Default/imgs/topbar.png trunk/utils/gmenu2x/build/skins/Default/imgs/uptime.png trunk/utils/gmenu2x/build/skins/Default/imgs/volume.png trunk/utils/gmenu2x/build/skins/Default/imgs/webserver.png trunk/utils/gmenu2x/build/skins/Default/sections/ trunk/utils/gmenu2x/build/skins/Default/sections/applications.png trunk/utils/gmenu2x/build/skins/Default/sections/emulators.png trunk/utils/gmenu2x/build/skins/Default/sections/games.png trunk/utils/gmenu2x/build/skins/Default/sections/settings.png trunk/utils/gmenu2x/build/skins/Default/skin.conf trunk/utils/gmenu2x/build/skins/Default/skin.conf_ trunk/utils/gmenu2x/build/skins/Default/wallpapers/ trunk/utils/gmenu2x/build/skins/Default/wallpapers/wallpaper2x.png trunk/utils/gmenu2x/build/translations/ trunk/utils/gmenu2x/build/translations/Basque trunk/utils/gmenu2x/build/translations/Catalan trunk/utils/gmenu2x/build/translations/Danish trunk/utils/gmenu2x/build/translations/Dutch trunk/utils/gmenu2x/build/translations/Finnish trunk/utils/gmenu2x/build/translations/French trunk/utils/gmenu2x/build/translations/German trunk/utils/gmenu2x/build/translations/Italian trunk/utils/gmenu2x/build/translations/Norwegian trunk/utils/gmenu2x/build/translations/Portuguese (Portugal) trunk/utils/gmenu2x/build/translations/Russian trunk/utils/gmenu2x/build/translations/Slovak trunk/utils/gmenu2x/build/translations/Spanish trunk/utils/gmenu2x/build/translations/Swedish trunk/utils/gmenu2x/build/translations/Turkish trunk/utils/gmenu2x/objs/ trunk/utils/gmenu2x/objs/gp2x/ trunk/utils/gmenu2x/objs/gp2x/tinyxml/ trunk/utils/gmenu2x/src/ trunk/utils/gmenu2x/src/FastDelegate.h trunk/utils/gmenu2x/src/Makefile trunk/utils/gmenu2x/src/Makefile.linux trunk/utils/gmenu2x/src/asfont.cpp trunk/utils/gmenu2x/src/asfont.h trunk/utils/gmenu2x/src/button.cpp trunk/utils/gmenu2x/src/button.h trunk/utils/gmenu2x/src/dirdialog.cpp trunk/utils/gmenu2x/src/dirdialog.h trunk/utils/gmenu2x/src/filedialog.cpp trunk/utils/gmenu2x/src/filedialog.h trunk/utils/gmenu2x/src/filelister.cpp trunk/utils/gmenu2x/src/filelister.h trunk/utils/gmenu2x/src/font-14.xcf trunk/utils/gmenu2x/src/font.xcf trunk/utils/gmenu2x/src/gmenu2x.cpp trunk/utils/gmenu2x/src/gmenu2x.cpp.orig trunk/utils/gmenu2x/src/gmenu2x.h trunk/utils/gmenu2x/src/google/ trunk/utils/gmenu2x/src/google/dense_hash_map trunk/utils/gmenu2x/src/google/dense_hash_set trunk/utils/gmenu2x/src/google/sparse_hash_map trunk/utils/gmenu2x/src/google/sparse_hash_set trunk/utils/gmenu2x/src/google/sparsehash/ trunk/utils/gmenu2x/src/google/sparsehash/densehashtable.h trunk/utils/gmenu2x/src/google/sparsehash/sparseconfig.h trunk/utils/gmenu2x/src/google/sparsehash/sparsehashtable.h trunk/utils/gmenu2x/src/google/sparsetable trunk/utils/gmenu2x/src/google/type_traits.h trunk/utils/gmenu2x/src/gp2x.h trunk/utils/gmenu2x/src/iconbutton.cpp trunk/utils/gmenu2x/src/iconbutton.h trunk/utils/gmenu2x/src/imagedialog.cpp trunk/utils/gmenu2x/src/imagedialog.h trunk/utils/gmenu2x/src/inputdialog.cpp trunk/utils/gmenu2x/src/inputdialog.h trunk/utils/gmenu2x/src/inputmanager.cpp trunk/utils/gmenu2x/src/inputmanager.h trunk/utils/gmenu2x/src/link.cpp trunk/utils/gmenu2x/src/link.h trunk/utils/gmenu2x/src/linkaction.cpp trunk/utils/gmenu2x/src/linkaction.h trunk/utils/gmenu2x/src/linkapp.cpp trunk/utils/gmenu2x/src/linkapp.h trunk/utils/gmenu2x/src/listview.cpp trunk/utils/gmenu2x/src/listview.h trunk/utils/gmenu2x/src/listviewitem.cpp trunk/utils/gmenu2x/src/listviewitem.h trunk/utils/gmenu2x/src/lr.xcf trunk/utils/gmenu2x/src/menu.cpp trunk/utils/gmenu2x/src/menu.cpp.orig trunk/utils/gmenu2x/src/menu.h trunk/utils/gmenu2x/src/menusetting.cpp trunk/utils/gmenu2x/src/menusetting.h trunk/utils/gmenu2x/src/menusettingbool.cpp trunk/utils/gmenu2x/src/menusettingbool.h trunk/utils/gmenu2x/src/menusettingdir.cpp trunk/utils/gmenu2x/src/menusettingdir.h trunk/utils/gmenu2x/src/menusettingfile.cpp trunk/utils/gmenu2x/src/menusettingfile.h trunk/utils/gmenu2x/src/menusettingimage.cpp trunk/utils/gmenu2x/src/menusettingimage.h trunk/utils/gmenu2x/src/menusettingint.cpp trunk/utils/gmenu2x/src/menusettingint.h trunk/utils/gmenu2x/src/menusettingmultistring.cpp trunk/utils/gmenu2x/src/menusettingmultistring.h trunk/utils/gmenu2x/src/menusettingrgba.cpp trunk/utils/gmenu2x/src/menusettingrgba.h trunk/utils/gmenu2x/src/menusettingstring.cpp trunk/utils/gmenu2x/src/menusettingstring.h trunk/utils/gmenu2x/src/messagebox.cpp trunk/utils/gmenu2x/src/messagebox.h trunk/utils/gmenu2x/src/pxml.cpp trunk/utils/gmenu2x/src/pxml.h trunk/utils/gmenu2x/src/selector.cpp trunk/utils/gmenu2x/src/selector.h trunk/utils/gmenu2x/src/selectordetector.cpp trunk/utils/gmenu2x/src/selectordetector.h trunk/utils/gmenu2x/src/settingsdialog.cpp trunk/utils/gmenu2x/src/settingsdialog.h trunk/utils/gmenu2x/src/sfontplus.cpp trunk/utils/gmenu2x/src/sfontplus.h trunk/utils/gmenu2x/src/surface.cpp trunk/utils/gmenu2x/src/surface.h trunk/utils/gmenu2x/src/surfacecollection.cpp trunk/utils/gmenu2x/src/surfacecollection.h trunk/utils/gmenu2x/src/textdialog.cpp trunk/utils/gmenu2x/src/textdialog.h trunk/utils/gmenu2x/src/textmanualdialog.cpp trunk/utils/gmenu2x/src/textmanualdialog.h trunk/utils/gmenu2x/src/tinyxml/ trunk/utils/gmenu2x/src/tinyxml/tinystr.cpp trunk/utils/gmenu2x/src/tinyxml/tinystr.h trunk/utils/gmenu2x/src/tinyxml/tinyxml.cpp trunk/utils/gmenu2x/src/tinyxml/tinyxml.h trunk/utils/gmenu2x/src/tinyxml/tinyxmlerror.cpp trunk/utils/gmenu2x/src/tinyxml/tinyxmlparser.cpp trunk/utils/gmenu2x/src/touchscreen.cpp trunk/utils/gmenu2x/src/touchscreen.h trunk/utils/gmenu2x/src/translator.cpp trunk/utils/gmenu2x/src/translator.h trunk/utils/gmenu2x/src/utilities.cpp trunk/utils/gmenu2x/src/utilities.cpp.orig trunk/utils/gmenu2x/src/utilities.h trunk/utils/gmenu2x/src/wallpaperdialog.cpp trunk/utils/gmenu2x/src/wallpaperdialog.h Added: trunk/utils/gmenu2x/AUTHORS =================================================================== --- trunk/utils/gmenu2x/AUTHORS (rev 0) +++ trunk/utils/gmenu2x/AUTHORS 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,4 @@ +Massimiliano "Ryo" Torromeo <mtorromeo at users.sourceforge.net> +Testers: PokeParadox, Tripmonkey_uk, Goemon4 PSyMastR +Translators: Yodaz, superfly, pedator, NightShadow, Jozef, Esslan, Micket, fusion_power, johnnysnet, Waldteufel, Jontte, Atte, cowai, XaMMaX90, claus +Open2X enhancements and other enhancements/bugfixes: Senor Quack and PokeParadox Added: trunk/utils/gmenu2x/COPYING =================================================================== --- trunk/utils/gmenu2x/COPYING (rev 0) +++ trunk/utils/gmenu2x/COPYING 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: trunk/utils/gmenu2x/ChangeLog =================================================================== --- trunk/utils/gmenu2x/ChangeLog (rev 0) +++ trunk/utils/gmenu2x/ChangeLog 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,154 @@ +----------- +New in 0.10 +----------- +Raised default clock to 136Mhz for F200 models (minimum frequency for touchscreen) +Fixed bug in link navigation +Support for additional utf8 characters +Restructured the virtual keyboard dialog with touchscreen support +New translations: Basque, Catalan, Turkish +Added support for the touchscreen +Added support for f200 battery +Added internal explorer that can launch .gpu .gpe and .sh files +Added graphic indicators for switching sections +Added on screen help (keep pressed A, only on the main screen at the moment) +Cpu clock raised when loading manuals +Added support for bmp and jpg/jpeg files for manuals +Added preview of images when selecting icons +Added option to show the root folder in the selection dialogs +Fixed bug that prevented the use of the custom selected wallpaper on restart +Lots of fixes + +---------- +New in 0.9 +---------- +Added gamma setting (global and per-link) +Added option to tweak ram timings +Added skins support +Added link to activate tv-out +Added support for multiple wallpapers +Color of message dialogs changeable by skins +Automatic icon association for links with icons found in the skin "icons" directory +Adding a link to a file without gpu or gpe extension automatically enables the wrapper feature +Added support for translations (Italian, Danish, Dutch, Spanish, German, French, Finnish, Portuguese, Swedish, Slovak, Norwegian and Russian included) +Use of a new font code which supports (some) utf8 characters +Added graphics for gp2x buttons +Moved screenshot in the selector under the text +[selFullPath] is automatically added at the end of the params when using the selector and no [marker] is specified +Easier access to the last row of links +Moved manual indicator to the bottom bar +Save screenshot with A+L+R (only on the main screen) +SD corruption when using USB on certain setups should be fixed +Fixed half tv-out screen +Fixed flickering in various locations +Fixed bugs in the manuals navigation system +Other small changes + +------------ +New in 0.8.1 +------------ +Fixed crash on section creation. +Fixed moving links between sections. +Fixed creating links in the first section. +Fixed alpha support for font.png + +---------- +New in 0.8 +---------- +Added support for game manuals (.man.png, .man.txt or readmes) +Implemented link's output logs with a log viewer (Disabled by default) +Implemented a simple text reader used in various situations +Implemented volume control (per-link and globally) +Added some confirmation dialogs +Changed cancel button from A to X +Added link to mount nand on usb with a dialog notification if usb is used for networking +Implemented virtual links (gmenu2x settings, usb, log viewer, about) +Added messageboxes +Added links for firmware 2.1.x +Directories browseable from selector +Added a blending effect to selector screenshots. +Updated the README with basic instructions (website is still recommended) +Fixed some minor bugs. + +---------- +New in 0.7 +---------- +GMenu2X always returns to last section/game/selector used (until shutdown) +New params magic value: [selFullPath] which equals [selPath][selFile][selExt] +Params magic values ([selFile] & Co.) are now automatically escaped, so quotes are not needed (and may cause problems) +Added support for an optional alias file for the selector that display the full name of roms. +Fixed bug with links with special characters. +Removed some unneeded savings. +Number of rows and columns on the links page configurable. +Various little fixes and tweaks + +---------- +New in 0.6 +---------- +Implemented link scanner +Added options to links for using a selector with them +Initial support for usbnet, ftp, telnet, samba and web server +Battery led indicates disk writes (don't turn the gp2x off while the led is on) +L = PageUp, R = PageDown in lists +Raised maximum hardcoded clock to 325Mhz and default gmenu2x clock to 100Mhz +Improved virtual keyboard +Sorting functions are now case unsensitive (filebrowser, dirdialog, selector) +Wrapper script removed and fixed a related bugs (wrapper function is still available) +Link's section changeable +All link's features are configurable from the interface +Battery indicator refined +File selector starts from /mnt instead of /mnt/sd +Fixed support for fonts of different size + +---------- +New in 0.5 +---------- +Added context-menu option to change link icon +Added options to configure top bar, bottom bar and selection color separately. +Readded support for imgs/selection.png (used only if present) +GMenu2X is now working at 50Mhz (configurable) +Added ability to set the maximum overclock to use with links (hardcoded maximum remains 300Mhz) +Moved under/overclock functions in gmenu2x (no need for cpu_speed binary) +"Save last selection" feature disableable + +---------- +New in 0.4 +---------- +Fixed flickering in context menu +Fixed bug that prevented correct launch of some applications +Interface color configurable (START brings up an options menu) (removed img/selection.png) +Saves and restores last selected section and link +Added global config file +Sections with no icon are displayed with a default one (icons/section.png) +Added virtual keyboard for editing title and description of links +Links created through file browser are truncated if too long + +---------- +New in 0.3 +---------- +Links creatable in-menu using a file browser +Links deletable in-menu +Icon associated with gpu/gpe is used when no icon is specified +Dithered background +Added battery status indicator +Added a menu with options binded to the select button +Clock setting is saved when changed +Links area scrollable to allow more than 24 links per section +Fix for links with DOS line-endings +Increased space between icons + +------------ +New in 0.2.1 +------------ +No more crash in presence of a section with no valid links +Keys and values in links are now trimmed. This means that you can spaces before and after keys and values (IE: " exec = /path/to/link.gpe " is valid) +Split applications section in applications and settings and added settings/exit link that launches the original frontend. +L and R shoulder buttons swapped + +---------- +New in 0.2 +---------- +Interface completely redesigned, now there are 24 links visible at the same time. +Display of free space on sd +In-Menu Under/Overclocker using the included utility by god_at_hell, Hermes/PS2Reality, Robster, Vimacs (edit script/cpuspeed.sh to tweak other parameteres besides clock speed) +Any number of sections supported +Customisation made simplier (just replace bg.png with any wallpaper of size 320x240) Added: trunk/utils/gmenu2x/INSTALL =================================================================== --- trunk/utils/gmenu2x/INSTALL (rev 0) +++ trunk/utils/gmenu2x/INSTALL 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,8 @@ +To compile the sourcecode you need to set the GP2XDEV environment variable and probably edit the Makefile present in the src folder. +This is an example environment: + +# export GP2XDEV="/usr/local/gp2xdev" +# export PATH="$PATH:${GP2XDEV}/bin" + +=== Installation === +Put the file "autorun.gpu" and the folder "gmenu2x" on the root of your sd, create the links as described on the documentation present on the website (http://gmenu2x.sourceforge.net) and boot your gp2x. Added: trunk/utils/gmenu2x/README.txt =================================================================== --- trunk/utils/gmenu2x/README.txt (rev 0) +++ trunk/utils/gmenu2x/README.txt 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,26 @@ +[Introduction] +GMenu2X is a replacement for the official frontend for the gp2x released under the GNU GPL license. + +[Installation] +Copy the file autorun.gpu and the directory gmenu2x/ to the root of your sd card. +Verify that the autorun option in the standard gp2x interface is enabled. +(Re)Boot your gp2x and enjoy GMenu2X. + +[Controls] +X, Stick left: Goes up one directory in file browser. +X: Cancel action. +B, Stick press: Launch selected link / Confirm action. +L, R: Switch between sections - PageUp/PageDown on lists. +Y: Bring up the manual/readme. +VOLDOWN: Decrease cpu clock. +VOLUP: Increase cpu clock. +VOLDOWN+VOLUP: Reset clock. +A+VOLDOWN: Decrease volume for the selected link. +A+VOLUP: Increase volume for the selected link. +A+VOLDOWN+VOLUP: Reset volume for the selected link. +SELECT: Bring up the contextual menu. +START: GMenu2X options. + +[Contacts] +Developed by Massimiliano Torromeo <mas...@gm...> +Visit the homepage at http://gmenu2x.sourceforge.net for more info. Added: trunk/utils/gmenu2x/autorun.gpu =================================================================== --- trunk/utils/gmenu2x/autorun.gpu (rev 0) +++ trunk/utils/gmenu2x/autorun.gpu 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,3 @@ +#!/bin/sh +cd /mnt/sd/gmenu2x +exec ./gmenu2x Added: trunk/utils/gmenu2x/build/gmenu2x =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/gmenu2x ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/gmenu2x.conf =================================================================== --- trunk/utils/gmenu2x/build/gmenu2x.conf (rev 0) +++ trunk/utils/gmenu2x/build/gmenu2x.conf 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,23 @@ +lang="" +tvoutEncoding="NTSC" +wallpaper="skins/Default/wallpapers/wallpaper2x.png" +skin="open2x" +showServices=0 +tvoutEncoding=0 +outputLogs=0 +link=0 +numCols=5 +alwaysUseFastTimings=0 +skin=0 +saveSelection=0 +numRows=4 +resolutionX=0 +section=0 +menuClock=140 +resolutionY=0 +maxClock=300 +showUptime=1 +wallpaper=0 +globalVolume=100 +gamma=10 +videoBpp=16 Property changes on: trunk/utils/gmenu2x/build/gmenu2x.conf ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/input.conf =================================================================== --- trunk/utils/gmenu2x/build/input.conf (rev 0) +++ trunk/utils/gmenu2x/build/input.conf 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,14 @@ +a=joystickbutton,0,12 +b=joystickbutton,0,13 +x=joystickbutton,0,14 +y=joystickbutton,0,15 +l=joystickbutton,0,10 +r=joystickbutton,0,11 +select=joystickbutton,0,9 +start=joystickbutton,0,8 +volup=joystickbutton,0,16 +voldown=joystickbutton,0,17 +up=joystickbutton,0,0 +down=joystickbutton,0,4 +left=joystickbutton,0,2 +right=joystickbutton,0,6 Property changes on: trunk/utils/gmenu2x/build/input.conf ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/ebook =================================================================== --- trunk/utils/gmenu2x/build/open2x_backup/sections/applications/ebook (rev 0) +++ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/ebook 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,6 @@ +title=E-Book +description=GReader2X +icon=skin:icons/ebook.png +exec=/opt/greader2x/greader2x.gpe +manual=/opt/greader2x/readme.txt +clock=100 Property changes on: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/ebook ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/filemanager =================================================================== --- trunk/utils/gmenu2x/build/open2x_backup/sections/applications/filemanager (rev 0) +++ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/filemanager 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,24 @@ +title=File Manager +description=Enexfi +icon=skin:icons/filemgr.png +exec=/opt/enexfi/enexfi.gpe +clock=100 +gpio_button_00=0 +gpio_button_01=1 +gpio_button_02=2 +gpio_button_03=3 +gpio_button_04=4 +gpio_button_05=5 +gpio_button_06=6 +gpio_button_07=7 +gpio_button_08=8 +gpio_button_09=9 +gpio_button_10=11 +gpio_button_11=10 +gpio_button_12=12 +gpio_button_13=13 +gpio_button_14=15 +gpio_button_15=14 +gpio_button_16=16 +gpio_button_17=17 +gpio_button_18=18 Property changes on: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/filemanager ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/image =================================================================== --- trunk/utils/gmenu2x/build/open2x_backup/sections/applications/image (rev 0) +++ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/image 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,7 @@ +title=Images +description=O2XIV +icon=skin:icons/image.png +exec=/opt/o2xiv/o2xiv.gpu +clock=200 +useramtimings=true +wrapper=true Property changes on: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/image ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/music =================================================================== --- trunk/utils/gmenu2x/build/open2x_backup/sections/applications/music (rev 0) +++ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/music 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,25 @@ +title=Music +description=Gmu +icon=skin:icons/music.png +exec=/opt/gmu/gmu.gpu +clock=200 +gpio_remapping=true +gpio_button_00=0 +gpio_button_01=1 +gpio_button_02=2 +gpio_button_03=3 +gpio_button_04=4 +gpio_button_05=5 +gpio_button_06=6 +gpio_button_07=7 +gpio_button_08=8 +gpio_button_09=9 +gpio_button_10=11 +gpio_button_11=10 +gpio_button_12=12 +gpio_button_13=13 +gpio_button_14=15 +gpio_button_15=14 +gpio_button_16=16 +gpio_button_17=17 +gpio_button_18=18 Property changes on: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/music ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/pdf =================================================================== --- trunk/utils/gmenu2x/build/open2x_backup/sections/applications/pdf (rev 0) +++ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/pdf 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,25 @@ +title=PDF +description=XPDF +icon=skin:icons/pdf.png +exec=/opt/gp2xpdf/gp2xpdf.gpu +clock=200 +useramtimings=true +gpio_button_00=0 +gpio_button_01=1 +gpio_button_02=2 +gpio_button_03=3 +gpio_button_04=4 +gpio_button_05=5 +gpio_button_06=6 +gpio_button_07=7 +gpio_button_08=8 +gpio_button_09=9 +gpio_button_10=10 +gpio_button_11=11 +gpio_button_12=12 +gpio_button_13=13 +gpio_button_14=14 +gpio_button_15=15 +gpio_button_16=16 +gpio_button_17=17 +gpio_button_18=18 Property changes on: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/pdf ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/video =================================================================== --- trunk/utils/gmenu2x/build/open2x_backup/sections/applications/video (rev 0) +++ trunk/utils/gmenu2x/build/open2x_backup/sections/applications/video 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,7 @@ +title=Video +description=Mp2x +icon=skin:icons/mplayer.png +exec=/opt/mplayer/mp2x +params= +clock=200 +wrapper=false Property changes on: trunk/utils/gmenu2x/build/open2x_backup/sections/applications/video ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/scripts/restore_o2x_apps.sh =================================================================== --- trunk/utils/gmenu2x/build/scripts/restore_o2x_apps.sh (rev 0) +++ trunk/utils/gmenu2x/build/scripts/restore_o2x_apps.sh 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,3 @@ +#!/bin/bash +rm -rf /usr/menu/sections/applications +cp -R /usr/menu/open2x_backup/sections/applications /usr/menu/sections/ Property changes on: trunk/utils/gmenu2x/build/scripts/restore_o2x_apps.sh ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/scripts/services.sh =================================================================== --- trunk/utils/gmenu2x/build/scripts/services.sh (rev 0) +++ trunk/utils/gmenu2x/build/scripts/services.sh 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,12 @@ +#!/bin/bash +# $1 = ip +# $2 = inet +# $3 = samba +# $4 = web +insmod net2272 +insmod g_ether +ifconfig usb0 $1 netmask 255.255.255.0 up +# route add default gw $defaultgw +if [ $2 = "on" ]; then /etc/init.d/inet start; fi +if [ $3 = "on" ]; then smbd; fi +if [ $4 = "on" ]; then thttpd; fi Property changes on: trunk/utils/gmenu2x/build/scripts/services.sh ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/scripts/usboff.sh =================================================================== --- trunk/utils/gmenu2x/build/scripts/usboff.sh (rev 0) +++ trunk/utils/gmenu2x/build/scripts/usboff.sh 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,10 @@ +#!/bin/bash +rmmod g_file_storage +rmmod net2272 +if [ $1 = "nand" ]; then + mount /mnt/nand || mount -o remount,rw /mnt/nand +elif [ $1 = "root" ]; then + mount -o remount,rw / +else + mount /mnt/sd || mount -o remount,rw /mnt/sd +fi Property changes on: trunk/utils/gmenu2x/build/scripts/usboff.sh ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/scripts/usbon.sh =================================================================== --- trunk/utils/gmenu2x/build/scripts/usbon.sh (rev 0) +++ trunk/utils/gmenu2x/build/scripts/usbon.sh 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,14 @@ +#!/bin/bash +# $1 = sd|nand|root +# defaults to sd (compatible with previous versions) +modprobe net2272 +if [ $1 = "nand" ]; then + umount /mnt/nand || mount -o remount,loop,ro /mnt/nand + modprobe g_file_storage file=/dev/loop/7 +elif [ $1 = "root" ]; then + mount -o remount,loop,ro / + modprobe g_file_storage file=/dev/mtdblock/3 +else + umount /mnt/sd || mount -o remount,loop,ro /mnt/sd + modprobe g_file_storage file=/dev/mmcsd/disc0/disc +fi Property changes on: trunk/utils/gmenu2x/build/scripts/usbon.sh ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/applications/ebook =================================================================== --- trunk/utils/gmenu2x/build/sections/applications/ebook (rev 0) +++ trunk/utils/gmenu2x/build/sections/applications/ebook 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,6 @@ +title=E-Book +description=GReader2X +icon=skin:icons/ebook.png +exec=/opt/greader2x/greader2x.gpe +manual=/opt/greader2x/readme.txt +clock=100 Property changes on: trunk/utils/gmenu2x/build/sections/applications/ebook ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/applications/filemanager =================================================================== --- trunk/utils/gmenu2x/build/sections/applications/filemanager (rev 0) +++ trunk/utils/gmenu2x/build/sections/applications/filemanager 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,24 @@ +title=File Manager +description=Enexfi +icon=skin:icons/filemgr.png +exec=/opt/enexfi/enexfi.gpe +clock=100 +gpio_button_00=0 +gpio_button_01=1 +gpio_button_02=2 +gpio_button_03=3 +gpio_button_04=4 +gpio_button_05=5 +gpio_button_06=6 +gpio_button_07=7 +gpio_button_08=8 +gpio_button_09=9 +gpio_button_10=11 +gpio_button_11=10 +gpio_button_12=12 +gpio_button_13=13 +gpio_button_14=15 +gpio_button_15=14 +gpio_button_16=16 +gpio_button_17=17 +gpio_button_18=18 Property changes on: trunk/utils/gmenu2x/build/sections/applications/filemanager ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/applications/image =================================================================== --- trunk/utils/gmenu2x/build/sections/applications/image (rev 0) +++ trunk/utils/gmenu2x/build/sections/applications/image 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,7 @@ +title=Images +description=O2XIV +icon=skin:icons/image.png +exec=/opt/o2xiv/o2xiv.gpu +clock=200 +useramtimings=true +wrapper=true Property changes on: trunk/utils/gmenu2x/build/sections/applications/image ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/applications/music =================================================================== --- trunk/utils/gmenu2x/build/sections/applications/music (rev 0) +++ trunk/utils/gmenu2x/build/sections/applications/music 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,25 @@ +title=Music +description=Gmu +icon=skin:icons/music.png +exec=/opt/gmu/gmu.gpu +clock=200 +gpio_remapping=true +gpio_button_00=0 +gpio_button_01=1 +gpio_button_02=2 +gpio_button_03=3 +gpio_button_04=4 +gpio_button_05=5 +gpio_button_06=6 +gpio_button_07=7 +gpio_button_08=8 +gpio_button_09=9 +gpio_button_10=11 +gpio_button_11=10 +gpio_button_12=12 +gpio_button_13=13 +gpio_button_14=15 +gpio_button_15=14 +gpio_button_16=16 +gpio_button_17=17 +gpio_button_18=18 Property changes on: trunk/utils/gmenu2x/build/sections/applications/music ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/applications/pdf =================================================================== --- trunk/utils/gmenu2x/build/sections/applications/pdf (rev 0) +++ trunk/utils/gmenu2x/build/sections/applications/pdf 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,25 @@ +title=PDF +description=XPDF +icon=skin:icons/pdf.png +exec=/opt/gp2xpdf/gp2xpdf.gpu +clock=200 +useramtimings=true +gpio_button_00=0 +gpio_button_01=1 +gpio_button_02=2 +gpio_button_03=3 +gpio_button_04=4 +gpio_button_05=5 +gpio_button_06=6 +gpio_button_07=7 +gpio_button_08=8 +gpio_button_09=9 +gpio_button_10=10 +gpio_button_11=11 +gpio_button_12=12 +gpio_button_13=13 +gpio_button_14=14 +gpio_button_15=15 +gpio_button_16=16 +gpio_button_17=17 +gpio_button_18=18 Property changes on: trunk/utils/gmenu2x/build/sections/applications/pdf ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/applications/video =================================================================== --- trunk/utils/gmenu2x/build/sections/applications/video (rev 0) +++ trunk/utils/gmenu2x/build/sections/applications/video 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,7 @@ +title=Video +description=Mp2x +icon=skin:icons/mplayer.png +exec=/opt/mplayer/mp2x +params= +clock=200 +wrapper=false Property changes on: trunk/utils/gmenu2x/build/sections/applications/video ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/settings/lcdtimings =================================================================== --- trunk/utils/gmenu2x/build/sections/settings/lcdtimings (rev 0) +++ trunk/utils/gmenu2x/build/sections/settings/lcdtimings 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,7 @@ +title=LCD Timings +description=Adjust LCD timings +icon=skin:icons/lcdsettings.png +exec=/opt/lcdtimings/lcdtimings_gui +params=-f /etc/config/open2x_lcdsettings.conf +clock=200 +wrapper=true Property changes on: trunk/utils/gmenu2x/build/sections/settings/lcdtimings ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/settings/mountext =================================================================== --- trunk/utils/gmenu2x/build/sections/settings/mountext (rev 0) +++ trunk/utils/gmenu2x/build/sections/settings/mountext 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,7 @@ +title=Mount EXT +description=Mount USB mass storage devices +icon=skin:icons/explorer.png +exec=/etc/init.d/Omountext +params=start +clock=200 +wrapper=true Property changes on: trunk/utils/gmenu2x/build/sections/settings/mountext ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/sections/settings/tscalibrate =================================================================== --- trunk/utils/gmenu2x/build/sections/settings/tscalibrate (rev 0) +++ trunk/utils/gmenu2x/build/sections/settings/tscalibrate 2009-02-23 12:51:28 UTC (rev 359) @@ -0,0 +1,6 @@ +title=Touchscreen +description=Calibrate touchscreen +icon=skin:icons/calibrate.png +exec=/opt/ts_calibrator/ts_calibrator +clock=200 +wrapper=true Property changes on: trunk/utils/gmenu2x/build/sections/settings/tscalibrate ___________________________________________________________________ Added: svn:executable + Added: trunk/utils/gmenu2x/build/skins/Default/icons/about.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/about.png ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/skins/Default/icons/calibrate.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/calibrate.png ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/skins/Default/icons/configure.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/configure.png ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/skins/Default/icons/ebook.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/ebook.png ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/skins/Default/icons/exit.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/exit.png ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/skins/Default/icons/explorer.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/explorer.png ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: trunk/utils/gmenu2x/build/skins/Default/icons/filemgr.png =================================================================== (Binary files differ) Property changes on: trunk/utils/gmenu2x/build/skins/Default/icons/filemgr.png ____________________________________________________... [truncated message content] |
From: <sen...@us...> - 2009-02-23 12:40:08
|
Revision: 358 http://open2x.svn.sourceforge.net/open2x/?rev=358&view=rev Author: senquack Date: 2009-02-23 12:40:05 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Making way for completely new GMenu2X Removed Paths: ------------- trunk/utils/gmenu2x/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-17 09:20:52
|
Revision: 357 http://open2x.svn.sourceforge.net/open2x/?rev=357&view=rev Author: senquack Date: 2009-02-17 09:20:41 +0000 (Tue, 17 Feb 2009) Log Message: ----------- Fixed modules installation script - was installing to subfolder of where it should have gone Modified Paths: -------------- trunk/kernel/linux-open2x-2.4.26_FW2-3/open2x-kernel.sh Added Paths: ----------- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f100 trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f200 Added: trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f100 =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f100 (rev 0) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f100 2009-02-17 09:20:41 UTC (rev 357) @@ -0,0 +1,1050 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_OMAHA is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_MX1ADS is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_RISCSTATION is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +CONFIG_ARCH_MMSP2=y +# CONFIG_ARCH_AT91RM9200 is not set + +# +# Archimedes/A5000 Implementations +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +# CONFIG_ARCH_NETWINDER is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ACCELENT is not set +# CONFIG_SA1100_ASSABET is not set +# CONFIG_ASSABET_NEPONSET is not set +# CONFIG_SA1100_ADSAGC is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_ADSBITSYPLUS is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CEP is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_H3XXX is not set +# CONFIG_H3600_SLEEVE is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_FRODO is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SIMPUTER is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set +# CONFIG_MACH_CSB337 is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CLEP7312 is not set +# CONFIG_ARCH_EDB7211 is not set +# CONFIG_ARCH_FORTUNET is not set +# CONFIG_ARCH_GUIDEA07 is not set +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_EP7211 is not set +# CONFIG_ARCH_EP7212 is not set + +# +# MMSP2 Implementation +# +CONFIG_MMSP2_SHADOW_ENABLE=y +CONFIG_MACH_MMSP2_MDK=y +# CONFIG_MACH_MMSP2_DTK3 is not set +CONFIG_MACH_MMSP2_DTK4=y +CONFIG_MACH_GP2X=y +# CONFIG_MACH_GP2XF200 is not set +# CONFIG_MACH_GP2X_DEBUG is not set +# CONFIG_MACH_GP2X_SVIDEO_NTSC is not set +# CONFIG_MACH_GP2X_SVIDEO_PAL is not set +CONFIG_MMSP2_USBDEV=m +CONFIG_MMSP2_USBDEV_NETLINK=m +# CONFIG_ARCH_ACORN is not set +# CONFIG_PLD is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +CONFIG_CPU_ARM920T=y +# CONFIG_CPU_ARM922T is not set +# CONFIG_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1020E is not set +# CONFIG_CPU_ARM1022 is not set +# CONFIG_CPU_ARM1026 is not set +# CONFIG_CPU_SA110 is not set +# CONFIG_CPU_SA1100 is not set +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y +# CONFIG_ARM_THUMB is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +# CONFIG_PCI is not set +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_KEXEC=y +CONFIG_HOTPLUG=y + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set +# CONFIG_PCMCIA_CLPS6700 is not set +# CONFIG_PCMCIA_SA1100 is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/mtdblock3 rw" +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +# CONFIG_MTD_GEN_PROBE is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_CFI_UTIL is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_AMDSTD is not set +# CONFIG_MTD_SHARP is not set +# CONFIG_MTD_JEDEC is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_CDB89712 is not set +# CONFIG_MTD_SA1100 is not set +# CONFIG_MTD_DC21285 is not set +# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_LUBBOCK is not set +# CONFIG_MTD_IXP425 is not set +# CONFIG_MTD_EPXA10DB is not set +# CONFIG_MTD_FORTUNET is not set +# CONFIG_MTD_AUTCPU12 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_H720X is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_CEIVA is not set +# CONFIG_MTD_NOR_TOTO is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PCMCIA is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCPROBE is not set + +# +# NAND Flash Device Drivers +# +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_BONFS is not set +CONFIG_MTD_OPEN2X_SINGLE_PARTITION=y +# CONFIG_OPEN2X_IGNORE_BB_ERASE is not set +# CONFIG_MTD_NAND_SPIA is not set +# CONFIG_MTD_NAND_TOTO is not set +# CONFIG_MTD_NAND_AUTCPU12 is not set +# CONFIG_MTD_NAND_EDB7312 is not set +CONFIG_MTD_NAND_MP2520F=y +# CONFIG_MTD_NAND_MP2520F_HWECC is not set +# CONFIG_MTD_NAND_MP2520F_HWECC_DEBUG is not set +CONFIG_MTD_NAND_IDS=y + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=m +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +CONFIG_SYN_COOKIES=y +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Network device support +# +# CONFIG_NETDEVICES is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +CONFIG_INPUT=m +CONFIG_INPUT_KEYBDEV=m +CONFIG_INPUT_MOUSEDEV=m +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_INPUT_MX1TS is not set + +# +# Character devices +# +CONFIG_VT=y +# CONFIG_VT_CONSOLE is not set +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_IRDA_LIRC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_21285 is not set +# CONFIG_SERIAL_21285_OLD is not set +# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_UART00 is not set +# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_SA1100 is not set +# CONFIG_SERIAL_SA1100_CONSOLE is not set +# CONFIG_SERIAL_OMAHA is not set +# CONFIG_SERIAL_OMAHA_CONSOLE is not set +# CONFIG_SERIAL_AT91 is not set +# CONFIG_SERIAL_AT91_CONSOLE is not set +CONFIG_SERIAL_MMSP2=y +CONFIG_SERIAL_MMSP2_CONSOLE=y +# CONFIG_SERIAL_8250 is not set +# CONFIG_SERIAL_8250_CONSOLE is not set +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_MANY_PORTS is not set +# CONFIG_SERIAL_8250_SHARE_IRQ is not set +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_HUB6 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_MMSP2_TPC is not set +CONFIG_MMSP2_DUALCPU=m +CONFIG_MMSP2_VPP=y +CONFIG_MMSP2_ISP=y +CONFIG_MMSP2_KEY=y +CONFIG_MMSP_GPX_BATT=y +# CONFIG_MMSP_GP2X_ADC is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set +# CONFIG_L3_ALGOBIT is not set +# CONFIG_L3_BIT_SA1100_GPIO is not set +# CONFIG_L3_SA1111 is not set +# CONFIG_BIT_SA1100_GPIO is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +CONFIG_INPUT_GP2X=m +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_21285_WATCHDOG is not set +# CONFIG_977_WATCHDOG is not set +# CONFIG_SA1100_WATCHDOG is not set +# CONFIG_EPXA_WATCHDOG is not set +# CONFIG_OMAHA_WATCHDOG is not set +# CONFIG_AT91_WATCHDOG is not set +# CONFIG_MMSP2_WATCHDOG is not set +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_60XX_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_AMD7XX_TCO is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +CONFIG_MMSP2_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# +# CONFIG_VIDEO_PROC_FS is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_OV9640 is not set +CONFIG_VIDEO_CX25874=y +# CONFIG_VIDEO_SAA7113H is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_ZORAN is not set +# CONFIG_VIDEO_ZORAN_BUZ is not set +# CONFIG_VIDEO_ZORAN_DC10 is not set +# CONFIG_VIDEO_ZORAN_LML33 is not set +# CONFIG_VIDEO_ZR36120 is not set +# CONFIG_VIDEO_MEYE is not set +# CONFIG_VIDEO_CYBERPRO is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MIROPCM20 is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +CONFIG_EXT3_FS=m +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=y +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_NAND=y +CONFIG_CRAMFS=y +CONFIG_TMPFS=y +CONFIG_RAMFS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +CONFIG_UDF_FS=m +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_YAFFS_FS=y +# CONFIG_YAFFS2_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=m +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp949" +CONFIG_SMB_UNIX=y +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +CONFIG_SMB_NLS=y +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="UTF8" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Console drivers +# +CONFIG_PC_KEYMAP=y +# CONFIG_VGA_CONSOLE is not set + +# +# Frame-buffer support +# +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_ACORN is not set +CONFIG_FB_MMSP2=y +# CONFIG_FB_ANAKIN is not set +# CONFIG_FB_CLPS711X is not set +# CONFIG_FB_SA1100 is not set +# CONFIG_FB_DBMX1 is not set +CONFIG_LPP=y +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_FBCON_ADVANCED=y +# CONFIG_FBCON_MFB is not set +# CONFIG_FBCON_CFB2 is not set +# CONFIG_FBCON_CFB4 is not set +# CONFIG_FBCON_CFB8 is not set +CONFIG_FBCON_CFB16=y +# CONFIG_FBCON_CFB24 is not set +# CONFIG_FBCON_CFB32 is not set +# CONFIG_FBCON_AFB is not set +# CONFIG_FBCON_ILBM is not set +# CONFIG_FBCON_IPLAN2P2 is not set +# CONFIG_FBCON_IPLAN2P4 is not set +# CONFIG_FBCON_IPLAN2P8 is not set +# CONFIG_FBCON_MAC is not set +# CONFIG_FBCON_VGA_PLANES is not set +# CONFIG_FBCON_VGA is not set +# CONFIG_FBCON_HGA is not set +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set +# CONFIG_FBCON_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Sound +# +CONFIG_SOUND=y +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_MIDI_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +# CONFIG_MIDI_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_VIDC is not set +# CONFIG_SOUND_WAVEARTIST is not set +CONFIG_SOUND_MP2520F_AC97=y +# CONFIG_SOUND_TVMIXER is not set +# CONFIG_SOUND_AD1980 is not set + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set +# CONFIG_MCP_SA1100 is not set +# CONFIG_MCP_UCB1200 is not set +# CONFIG_MCP_UCB1200_AUDIO is not set +# CONFIG_MCP_UCB1200_TS is not set + +# +# USB support +# +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_UHCI is not set +# CONFIG_USB_UHCI_ALT is not set +# CONFIG_USB_OHCI is not set +# CONFIG_USB_OHCI_SA1111 is not set +CONFIG_USB_OHCI_MMSP2=m +# CONFIG_MMSP2_UPAD3_TO_DEVICE is not set +# CONFIG_USB_SL811HS_ALT is not set +# CONFIG_USB_SL811HS is not set +CONFIG_USB_AUDIO=m +CONFIG_USB_EMI26=m +CONFIG_USB_MIDI=m +# CONFIG_USB_STORAGE is not set +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_HID=m +CONFIG_USB_HIDINPUT=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_KBD=m +CONFIG_USB_MOUSE=m +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_WACOM=m +# CONFIG_USB_KBTAB is not set +CONFIG_USB_POWERMATE=m +# CONFIG_USB_DC2XX is not set +# CONFIG_USB_MDC800 is not set +CONFIG_USB_SCANNER=m +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_W9968CF is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DABUSB is not set +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_KAWETH=m +CONFIG_USB_CATC=m +CONFIG_USB_CDCETHER=m +CONFIG_USB_USBNET=m +# CONFIG_USB_USS720 is not set + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_SERIAL_DEBUG is not set +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_BRLVGER is not set +# CONFIG_USB_LCD is not set + +# +# Support for USB gadgets +# +CONFIG_USB_GADGET=m +CONFIG_USB_GADGET_NET2272=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_CONTROLLER is not set +CONFIG_USB_NET2272=m +CONFIG_USB_GADGET_CONTROLLER=m +CONFIG_USB_GADGET_DUALSPEED=y +CONFIG_USB_ZERO=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set + +# +# MMC/SD Card support +# +CONFIG_MMCSD=y +# CONFIG_MMCSD_DEBUG is not set +CONFIG_OPEN2X_SD_AUTOMOUNT=y +CONFIG_MMCSD_DISK=y +CONFIG_MMCSD_SLOT=y + +# +# Bluetooth support +# +CONFIG_BLUEZ=m +# CONFIG_BLUEZ_L2CAP is not set +# CONFIG_BLUEZ_SCO is not set +# CONFIG_BLUEZ_RFCOMM is not set +# CONFIG_BLUEZ_BNEP is not set + +# +# Bluetooth device drivers +# +CONFIG_BLUEZ_HCIUSB=m +CONFIG_BLUEZ_HCIUSB_SCO=y +CONFIG_BLUEZ_HCIUART=m +CONFIG_BLUEZ_HCIUART_H4=y +CONFIG_BLUEZ_HCIUART_BCSP=y +# CONFIG_BLUEZ_HCIUART_BCSP_TXCRC is not set +CONFIG_BLUEZ_HCIBFUSB=m +# CONFIG_BLUEZ_HCIDTL1 is not set +# CONFIG_BLUEZ_HCIBT3C is not set +# CONFIG_BLUEZ_HCIBLUECARD is not set +# CONFIG_BLUEZ_HCIBTUART is not set +CONFIG_BLUEZ_HCIVHCI=m + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_NO_PGT_CACHE is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_DC21285_PORT is not set +# CONFIG_DEBUG_CLPS711X_UART2 is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +# CONFIG_FW_LOADER is not set Added: trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f200 =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f200 (rev 0) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/.config.f200 2009-02-17 09:20:41 UTC (rev 357) @@ -0,0 +1,1052 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_OMAHA is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_MX1ADS is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_RISCSTATION is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +CONFIG_ARCH_MMSP2=y +# CONFIG_ARCH_AT91RM9200 is not set + +# +# Archimedes/A5000 Implementations +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +# CONFIG_ARCH_NETWINDER is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ACCELENT is not set +# CONFIG_SA1100_ASSABET is not set +# CONFIG_ASSABET_NEPONSET is not set +# CONFIG_SA1100_ADSAGC is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_ADSBITSYPLUS is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CEP is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_H3XXX is not set +# CONFIG_H3600_SLEEVE is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_FRODO is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SIMPUTER is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set +# CONFIG_MACH_CSB337 is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CLEP7312 is not set +# CONFIG_ARCH_EDB7211 is not set +# CONFIG_ARCH_FORTUNET is not set +# CONFIG_ARCH_GUIDEA07 is not set +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_EP7211 is not set +# CONFIG_ARCH_EP7212 is not set + +# +# MMSP2 Implementation +# +CONFIG_MMSP2_SHADOW_ENABLE=y +CONFIG_MACH_MMSP2_MDK=y +# CONFIG_MACH_MMSP2_DTK3 is not set +CONFIG_MACH_MMSP2_DTK4=y +CONFIG_MACH_GP2X=y +CONFIG_MACH_GP2XF200=y +# CONFIG_MACH_GP2X_DEBUG is not set +# CONFIG_MACH_GP2X_SVIDEO_NTSC is not set +# CONFIG_MACH_GP2X_SVIDEO_PAL is not set +# CONFIG_MMSP2_USBDEV is not set +# CONFIG_MMSP2_USBDEV_NETLINK is not set +# CONFIG_ARCH_ACORN is not set +# CONFIG_PLD is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +CONFIG_CPU_ARM920T=y +# CONFIG_CPU_ARM922T is not set +# CONFIG_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1020E is not set +# CONFIG_CPU_ARM1022 is not set +# CONFIG_CPU_ARM1026 is not set +# CONFIG_CPU_SA110 is not set +# CONFIG_CPU_SA1100 is not set +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y +# CONFIG_ARM_THUMB is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +# CONFIG_PCI is not set +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_KEXEC=y +CONFIG_HOTPLUG=y + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set +# CONFIG_PCMCIA_CLPS6700 is not set +# CONFIG_PCMCIA_SA1100 is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/mtdblock3 rw" +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +# CONFIG_MTD_GEN_PROBE is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_CFI_UTIL is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_AMDSTD is not set +# CONFIG_MTD_SHARP is not set +# CONFIG_MTD_JEDEC is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_CDB89712 is not set +# CONFIG_MTD_SA1100 is not set +# CONFIG_MTD_DC21285 is not set +# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_LUBBOCK is not set +# CONFIG_MTD_IXP425 is not set +# CONFIG_MTD_EPXA10DB is not set +# CONFIG_MTD_FORTUNET is not set +# CONFIG_MTD_AUTCPU12 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_H720X is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_CEIVA is not set +# CONFIG_MTD_NOR_TOTO is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PCMCIA is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCPROBE is not set + +# +# NAND Flash Device Drivers +# +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_BONFS is not set +CONFIG_MTD_OPEN2X_SINGLE_PARTITION=y +# CONFIG_OPEN2X_IGNORE_BB_ERASE is not set +# CONFIG_MTD_NAND_SPIA is not set +# CONFIG_MTD_NAND_TOTO is not set +# CONFIG_MTD_NAND_AUTCPU12 is not set +# CONFIG_MTD_NAND_EDB7312 is not set +CONFIG_MTD_NAND_MP2520F=y +# CONFIG_MTD_NAND_MP2520F_HWECC is not set +# CONFIG_MTD_NAND_MP2520F_HWECC_DEBUG is not set +CONFIG_MTD_NAND_IDS=y + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=m +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +CONFIG_SYN_COOKIES=y +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Network device support +# +# CONFIG_NETDEVICES is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +CONFIG_INPUT=m +CONFIG_INPUT_KEYBDEV=m +CONFIG_INPUT_MOUSEDEV=m +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_INPUT_MX1TS is not set + +# +# Character devices +# +CONFIG_VT=y +# CONFIG_VT_CONSOLE is not set +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_IRDA_LIRC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_21285 is not set +# CONFIG_SERIAL_21285_OLD is not set +# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_UART00 is not set +# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_SA1100 is not set +# CONFIG_SERIAL_SA1100_CONSOLE is not set +# CONFIG_SERIAL_OMAHA is not set +# CONFIG_SERIAL_OMAHA_CONSOLE is not set +# CONFIG_SERIAL_AT91 is not set +# CONFIG_SERIAL_AT91_CONSOLE is not set +CONFIG_SERIAL_MMSP2=y +CONFIG_SERIAL_MMSP2_CONSOLE=y +# CONFIG_SERIAL_8250 is not set +# CONFIG_SERIAL_8250_CONSOLE is not set +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_MANY_PORTS is not set +# CONFIG_SERIAL_8250_SHARE_IRQ is not set +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_HUB6 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_MMSP2_TPC is not set +CONFIG_MMSP2_DUALCPU=m +CONFIG_MMSP2_VPP=y +CONFIG_MMSP2_ISP=y +CONFIG_MMSP2_KEY=y +# CONFIG_MMSP_GPX_BATT is not set +CONFIG_MMSP_GP2X_ADC=y + +# +# L3 serial bus support +# +# CONFIG_L3 is not set +# CONFIG_L3_ALGOBIT is not set +# CONFIG_L3_BIT_SA1100_GPIO is not set +# CONFIG_L3_SA1111 is not set +# CONFIG_BIT_SA1100_GPIO is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +CONFIG_INPUT_GP2X=m +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_21285_WATCHDOG is not set +# CONFIG_977_WATCHDOG is not set +# CONFIG_SA1100_WATCHDOG is not set +# CONFIG_EPXA_WATCHDOG is not set +# CONFIG_OMAHA_WATCHDOG is not set +# CONFIG_AT91_WATCHDOG is not set +# CONFIG_MMSP2_WATCHDOG is not set +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_60XX_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_AMD7XX_TCO is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +CONFIG_MMSP2_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# +# CONFIG_VIDEO_PROC_FS is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_OV9640 is not set +CONFIG_VIDEO_CX25874=y +# CONFIG_VIDEO_SAA7113H is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_ZORAN is not set +# CONFIG_VIDEO_ZORAN_BUZ is not set +# CONFIG_VIDEO_ZORAN_DC10 is not set +# CONFIG_VIDEO_ZORAN_LML33 is not set +# CONFIG_VIDEO_ZR36120 is not set +# CONFIG_VIDEO_MEYE is not set +# CONFIG_VIDEO_CYBERPRO is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MIROPCM20 is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +CONFIG_EXT3_FS=m +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=y +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_NAND=y +CONFIG_CRAMFS=y +CONFIG_TMPFS=y +CONFIG_RAMFS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +CONFIG_UDF_FS=m +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_YAFFS_FS=y +# CONFIG_YAFFS2_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=m +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp949" +CONFIG_SMB_UNIX=y +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +CONFIG_SMB_NLS=y +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="UTF8" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Console drivers +# +CONFIG_PC_KEYMAP=y +# CONFIG_VGA_CONSOLE is not set + +# +# Frame-buffer support +# +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_ACORN is not set +CONFIG_FB_MMSP2=y +# CONFIG_FB_ANAKIN is not set +# CONFIG_FB_CLPS711X is not set +# CONFIG_FB_SA1100 is not set +# CONFIG_FB_DBMX1 is not set +CONFIG_LPP=y +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_FBCON_ADVANCED=y +# CONFIG_FBCON_MFB is not set +# CONFIG_FBCON_CFB2 is not set +# CONFIG_FBCON_CFB4 is not set +# CONFIG_FBCON_CFB8 is not set +CONFIG_FBCON_CFB16=y +# CONFIG_FBCON_CFB24 is not set +# CONFIG_FBCON_CFB32 is not set +# CONFIG_FBCON_AFB is not set +# CONFIG_FBCON_ILBM is not set +# CONFIG_FBCON_IPLAN2P2 is not set +# CONFIG_FBCON_IPLAN2P4 is not set +# CONFIG_FBCON_IPLAN2P8 is not set +# CONFIG_FBCON_MAC is not set +# CONFIG_FBCON_VGA_PLANES is not set +# CONFIG_FBCON_VGA is not set +# CONFIG_FBCON_HGA is not set +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set +# CONFIG_FBCON_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Sound +# +CONFIG_SOUND=y +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_MIDI_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +# CONFIG_MIDI_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_VIDC is not set +# CONFIG_SOUND_WAVEARTIST is not set +CONFIG_SOUND_MP2520F_AC97=y +# CONFIG_SOUND_TVMIXER is not set +# CONFIG_SOUND_AD1980 is not set +CONFIG_SOUND_WM97XX=y +CONFIG_SOUND_WM97XX=y + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set +# CONFIG_MCP_SA1100 is not set +# CONFIG_MCP_UCB1200 is not set +# CONFIG_MCP_UCB1200_AUDIO is not set +# CONFIG_MCP_UCB1200_TS is not set + +# +# USB support +# +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_UHCI is not set +# CONFIG_USB_UHCI_ALT is not set +# CONFIG_USB_OHCI is not set +# CONFIG_USB_OHCI_SA1111 is not set +CONFIG_USB_OHCI_MMSP2=m +# CONFIG_MMSP2_UPAD3_TO_DEVICE is not set +# CONFIG_USB_SL811HS_ALT is not set +# CONFIG_USB_SL811HS is not set +CONFIG_USB_AUDIO=m +CONFIG_USB_EMI26=m +CONFIG_USB_MIDI=m +# CONFIG_USB_STORAGE is not set +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_HID=m +CONFIG_USB_HIDINPUT=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_KBD=m +CONFIG_USB_MOUSE=m +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_WACOM=m +# CONFIG_USB_KBTAB is not set +CONFIG_USB_POWERMATE=m +# CONFIG_USB_DC2XX is not set +# CONFIG_USB_MDC800 is not set +CONFIG_USB_SCANNER=m +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_W9968CF is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DABUSB is not set +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_KAWETH=m +CONFIG_USB_CATC=m +CONFIG_USB_CDCETHER=m +CONFIG_USB_USBNET=m +# CONFIG_USB_USS720 is not set + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_SERIAL_DEBUG is not set +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_BRLVGER is not set +# CONFIG_USB_LCD is not set + +# +# Support for USB gadgets +# +CONFIG_USB_GADGET=m +CONFIG_USB_GADGET_NET2272=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_CONTROLLER is not set +CONFIG_USB_NET2272=m +CONFIG_USB_GADGET_CONTROLLER=m +CONFIG_USB_GADGET_DUALSPEED=y +CONFIG_USB_ZERO=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set + +# +# MMC/SD Card support +# +CONFIG_MMCSD=y +# CONFIG_MMCSD_DEBUG is not set +CONFIG_OPEN2X_SD_AUTOMOUNT=y +CONFIG_MMCSD_DISK=y +CONFIG_MMCSD_SLOT=y + +# +# Bluetooth support +# +CONFIG_BLUEZ=m +# CONFIG_BLUEZ_L2CAP is not set +# CONFIG_BLUEZ_SCO is not set +# CONFIG_BLUEZ_RFCOMM is not set +# CONFIG_BLUEZ_BNEP is not set + +# +# Bluetooth device drivers +# +CONFIG_BLUEZ_HCIUSB=m +CONFIG_BLUEZ_HCIUSB_SCO=y +CONFIG_BLUEZ_HCIUART=m +CONFIG_BLUEZ_HCIUART_H4=y +CONFIG_BLUEZ_HCIUART_BCSP=y +# CONFIG_BLUEZ_HCIUART_BCSP_TXCRC is not set +CONFIG_BLUEZ_HCIBFUSB=m +# CONFIG_BLUEZ_HCIDTL1 is not set +# CONFIG_BLUEZ_HCIBT3C is not set +# CONFIG_BLUEZ_HCIBLUECARD is not set +# CONFIG_BLUEZ_HCIBTUART is not set +CONFIG_BLUEZ_HCIVHCI=m + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_NO_PGT_CACHE is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_DC21285_PORT is not set +# CONFIG_DEBUG_CLPS711X_UART2 is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +# CONFIG_FW_LOADER is not set Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/open2x-kernel.sh =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/open2x-kernel.sh 2009-02-15 13:34:24 UTC (rev 356) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/open2x-kernel.sh 2009-02-17 09:20:41 UTC (rev 357) @@ -118,7 +118,7 @@ echo "#!/bin/bash" >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" echo "echo Installing Modules..." >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" -echo "cp -R -f ./modules/lib/modules/2.4.26-open2x /lib/modules/2.4.26-open2x" >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" +echo "cp -R -f ./modules/lib/modules/2.4.26-open2x /lib/modules/" >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" echo "# Sync the SD card to check that everything is written." >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" echo "sync" >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" echo "# Return to the GPH menu screen" >> "gp2xkernel-open2x-`date '+%Y-%m-%d'`/inst_modules.gpe" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-15 13:34:27
|
Revision: 356 http://open2x.svn.sourceforge.net/open2x/?rev=356&view=rev Author: senquack Date: 2009-02-15 13:34:24 +0000 (Sun, 15 Feb 2009) Log Message: ----------- Added a new mmuhack into the kernel that can be toggled while running and speeds up even older non-mmuhack apps Modified Paths: -------------- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mem.c trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/.config =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/.config 2009-02-15 09:55:25 UTC (rev 355) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/.config 2009-02-15 13:34:24 UTC (rev 356) @@ -200,7 +200,7 @@ # CONFIG_BINFMT_MISC is not set # CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/mtdblock4 rw" +CONFIG_CMDLINE="root=/dev/mtdblock3 rw" CONFIG_ALIGNMENT_TRAP=y # @@ -283,7 +283,7 @@ CONFIG_MTD_NAND=y # CONFIG_MTD_NAND_VERIFY_WRITE is not set # CONFIG_MTD_NAND_BONFS is not set -# CONFIG_MTD_OPEN2X_SINGLE_PARTITION is not set +CONFIG_MTD_OPEN2X_SINGLE_PARTITION=y # CONFIG_OPEN2X_IGNORE_BB_ERASE is not set # CONFIG_MTD_NAND_SPIA is not set # CONFIG_MTD_NAND_TOTO is not set @@ -338,7 +338,7 @@ # CONFIG_NETLINK_DEV is not set # CONFIG_NETFILTER is not set CONFIG_FILTER=y -CONFIG_UNIX=m +CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set @@ -524,7 +524,7 @@ # CONFIG_INPUT_A3D is not set # CONFIG_INPUT_ADI is not set # CONFIG_INPUT_COBRA is not set -# CONFIG_INPUT_GP2X is not set +CONFIG_INPUT_GP2X=m # CONFIG_INPUT_GF2K is not set # CONFIG_INPUT_GRIP is not set # CONFIG_INPUT_INTERACT is not set @@ -994,7 +994,7 @@ # CONFIG_MMCSD=y # CONFIG_MMCSD_DEBUG is not set -# CONFIG_OPEN2X_SD_AUTOMOUNT is not set +CONFIG_OPEN2X_SD_AUTOMOUNT=y CONFIG_MMCSD_DISK=y CONFIG_MMCSD_SLOT=y Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mem.c =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mem.c 2009-02-15 09:55:25 UTC (rev 355) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mem.c 2009-02-15 13:34:24 UTC (rev 356) @@ -27,6 +27,10 @@ #include <asm/io.h> #include <asm/pgalloc.h> +#ifdef CONFIG_MACH_GP2X +#include <asm/arch/mmsp20.h> // for g_cache_high_memory global - senquack +#endif + #ifdef CONFIG_FB extern void fbmem_init(void); #endif @@ -196,8 +200,28 @@ * through a file pointer that was marked O_SYNC will be * done non-cached. */ +//senquack - on GP2X, upper memory (0x0200000-0x03FFFFFF) should be bufferable by default, +// and optionally also cacheable +#ifdef CONFIG_MACH_GP2X + if (!g_cache_high_memory) + { + //this macro is copied here for reference from include/arm/proc/pgtable.h +//#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) & ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE)) + if ((offset >= 0x04000000) || (file->f_flags & O_SYNC)) /* above high memory? */ + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + else if (offset >= 0x02000000) /* inside high memory? */ + vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) & ~(L_PTE_CACHEABLE)); + } + else + { + if ((offset >= 0x04000000) || (file->f_flags & O_SYNC)) + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + } + +#else if (noncached_address(offset) || (file->f_flags & O_SYNC)) vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +#endif /* Don't try to swap out physical pages.. */ vma->vm_flags |= VM_RESERVED; Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c 2009-02-15 09:55:25 UTC (rev 355) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c 2009-02-15 13:34:24 UTC (rev 356) @@ -106,6 +106,8 @@ #define GP2X_REMAP_BUTTON_17 67 #define GP2X_REMAP_BUTTON_18 68 #define GP2X_DISABLE_REMAPPING 69 +//senquack - new option to allow caching of mmap'd upper memory (what mmuhack does) +#define GP2X_SET_UPPER_MEMORY_CACHING 80 /* UCLK = 95.xxxMHz. It's default value. */ @@ -445,6 +447,22 @@ g_button_mapping[i] = i; } break; + case GP2X_SET_UPPER_MEMORY_CACHING: + // g_cache_high_memory is buried in kernel/sys.c: + // (cannot store globals here, they get trashed) + if (get_user(int_param, (int *)arg)) + return -EFAULT; + if (int_param == 0) + { + printk("kernel: upper memory caching for future mmaps disabled\n"); + g_cache_high_memory = int_param; + } + else if (int_param == 1) + { + printk("kernel: upper memory caching for future mmaps enabled\n"); + g_cache_high_memory = int_param; + } + break; default: break; } Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h 2009-02-15 09:55:25 UTC (rev 355) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h 2009-02-15 13:34:24 UTC (rev 356) @@ -28,6 +28,12 @@ extern int g_stick_click_mode; // defined in kernel/sys.c, sue me, it works.. extern int g_button_mapping[19]; // array of gp2x button mappings used in mmsp2-key.c (in kernel/sys.c) extern int g_button_remapping; // When this is 0, remapping is off, 1 is on (in kernel/sys.c) +//senquack - new boolean allows replacement of mmuhack.o: +// When this is 1, pages mapped through mmap are configured as both cached and +// bufferable (which is what mmuhack allows). When it is 0, pages are only +// reported as bufferable (which is still an improvement over the default when +// a program doesn't use mmuhack). 0 is the default. +extern int g_cache_high_memory; #define MMSP20_UART_CHANNELS 4 Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c 2009-02-15 09:55:25 UTC (rev 355) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c 2009-02-15 13:34:24 UTC (rev 356) @@ -43,6 +43,7 @@ #endif +#ifdef CONFIG_MACH_GP2X //senquack - Changed July 30, 2008.. Added scaling factor, g_volume_scale, this is a global // variable in kernel/sys.c (don't tell linus). I would place it here, but even when // this is compiled into the kernel, not as a module, globals here get wiped out. @@ -62,6 +63,14 @@ int g_button_mapping[19] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 }; int g_button_remapping = 0; // When this is 0, remapping is off, 1 is on +//senquack - new boolean allows replacement of mmuhack.o: +// When this is 1, pages mapped through mmap are configured as both cached and +// bufferable (which is what mmuhack allows). When it is 0, pages are only +// reported as bufferable (which is still an improvement over the default when +// a program doesn't use mmuhack). 0 is the default. +int g_cache_high_memory = 0; +#endif /* CONFIG_MACH_GP2X */ + /* * this is where the system-wide overflow UID and GID are defined, for * architectures that now have 32-bit UID/GID but didn't in the past This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-15 09:55:30
|
Revision: 355 http://open2x.svn.sourceforge.net/open2x/?rev=355&view=rev Author: senquack Date: 2009-02-15 09:55:25 +0000 (Sun, 15 Feb 2009) Log Message: ----------- Added low-level stick-click emulation and also added control remapping for /dev/GPIO Modified Paths: -------------- trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sched.c trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c 2009-02-02 21:39:54 UTC (rev 354) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/drivers/char/mmsp2-key.c 2009-02-15 09:55:25 UTC (rev 355) @@ -41,8 +41,10 @@ #define VOL_UP GPIO_D7 #define VOL_DOWN GPIO_D6 +//senquack - moved this outside the ifdef below for stick click emulation purposes: +#define TACT_SW GPIO_D11 + #ifndef CONFIG_MACH_GP2XF200 -#define TACT_SW GPIO_D11 #else #define USB_CHECK GPIO_F5 #define USB_TO_SD GPIO_F2 @@ -59,28 +61,53 @@ #endif /* IOCTL CMD*/ -#define BACK_LIGHT_OFF 0 -#define BACK_LIGHT_ON 1 -#define BATT_LED_ON 2 -#define BATT_LED_OFF 3 +//senquack - GPH's ioctl interface is here utterly broken, unused, and braindead. Replacing +//it with my own. +//#define BACK_LIGHT_OFF 0 +//#define BACK_LIGHT_ON 1 +//#define BATT_LED_ON 2 +//#define BATT_LED_OFF 3 +// +//#define FCLK_200 10 +//#define FCLK_166 11 +//#define FCLK_133 12 +//#define FCLK_100 13 +//#define FCLK_78 14 +//#define FCLK_64 15 +//#define FCLK_DEFUALT 16 +//#define SD_CLK_MODE_0 17 /* 5Mhz */ +//#define SD_CLK_MODE_1 18 /* 15Mhz */ +//#define SD_CLK_MODE_2 19 /* 25Mhz */ +//#define GP2X_INFO_LSB 20 +//#define GP2X_INFO_MSB 21 +//#define GP2X_GET_USBHCHK 30 +//#define USB_CONNECT_START 31 +//#define USB_CONNECT_END 32 +//senquack - new stick-click emulation controllable by these new ioctl commands: +#define GP2X_SET_STICK_CLICK_EMULATION_MODE 40 +// senquack - new /dev/GPIO button remapping controllable by these commands: +#define GP2X_REMAP_BUTTON_00 50 +#define GP2X_REMAP_BUTTON_01 51 +#define GP2X_REMAP_BUTTON_02 52 +#define GP2X_REMAP_BUTTON_03 53 +#define GP2X_REMAP_BUTTON_04 54 +#define GP2X_REMAP_BUTTON_05 55 +#define GP2X_REMAP_BUTTON_06 56 +#define GP2X_REMAP_BUTTON_07 57 +#define GP2X_REMAP_BUTTON_08 58 +#define GP2X_REMAP_BUTTON_09 59 +#define GP2X_REMAP_BUTTON_10 60 +#define GP2X_REMAP_BUTTON_11 61 +#define GP2X_REMAP_BUTTON_12 62 +#define GP2X_REMAP_BUTTON_13 63 +#define GP2X_REMAP_BUTTON_14 64 +#define GP2X_REMAP_BUTTON_15 65 +#define GP2X_REMAP_BUTTON_16 66 +#define GP2X_REMAP_BUTTON_17 67 +#define GP2X_REMAP_BUTTON_18 68 +#define GP2X_DISABLE_REMAPPING 69 -#define FCLK_200 10 -#define FCLK_166 11 -#define FCLK_133 12 -#define FCLK_100 13 -#define FCLK_78 14 -#define FCLK_64 15 -#define FCLK_DEFUALT 16 -#define SD_CLK_MODE_0 17 /* 5Mhz */ -#define SD_CLK_MODE_1 18 /* 15Mhz */ -#define SD_CLK_MODE_2 19 /* 25Mhz */ -#define GP2X_INFO_LSB 20 -#define GP2X_INFO_MSB 21 -#define GP2X_GET_USBHCHK 30 -#define USB_CONNECT_START 31 -#define USB_CONNECT_END 32 - /* UCLK = 95.xxxMHz. It's default value. */ #define U_MDIV (0x60) #define U_PDIV (0x0) @@ -91,7 +118,6 @@ #define A_PDIV 0x0 #define A_SDIV 0x2 - struct timeval cur_tv; static unsigned int old_tv_usec = 0; @@ -194,104 +220,238 @@ keyTemp=0; keyTemp|=read_gpio_bit(VOL_UP); keyTemp|=read_gpio_bit(VOL_DOWN)<<1; - keyTemp=(~keyTemp)& 0x03; + //senquack - added emulation of stick click so we now *do* check for TACT_SW: +// keyTemp=(~keyTemp)& 0x03; + if (g_stick_click_mode == OPEN2X_STICK_CLICK_DISABLED) + { + // force stick-click to be unpressed when emulation disabled on F200s + keyTemp |= 1 << 2; + } + else + { + keyTemp |= read_gpio_bit(TACT_SW) << 2; + } + + keyTemp = (~keyTemp) & 0x07; + + keyTemp|=read_gpio_bit(USB_CHECK)<<3; keyValue|=(unsigned long) keyTemp << 16; #endif - copy_to_user( Putbuf, &keyValue, 4); + + //senquack - new support for button remapping: + if (g_button_remapping) + { + unsigned long remapped_keyValue = (keyTemp & 0x80000); // Store away lone USB_CHECK bit + for (i = 18; i >= 0; i--) + { + // check if button is even enabled: + if (g_button_mapping[i] != -1) + remapped_keyValue |= ((keyValue >> i) & 0x1) << g_button_mapping[i]; + } + copy_to_user( Putbuf, &remapped_keyValue, 4); + } + else + { + copy_to_user( Putbuf, &keyValue, 4); + } return length; } -int MMSP2key_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,unsigned long arg) +//senquack - as far as I can tell, this ioctl interface is completely and utterly broken +// and unused by even GPH themselves. I am redoing it with my own commands. +//int MMSP2key_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,unsigned long arg) +//{ +// MMSP20_CLOCK_POWER *pPMR_REG; +// pPMR_REG = MMSP20_GetBase_CLOCK_POWER(); +// +// switch(arg) +// { +// case 0: +//#ifndef CONFIG_MACH_GP2XF200 +// write_gpio_bit(GPIO_H1,0); //LCD VGH oFF +// write_gpio_bit(GPIO_H2,0); //LCD Back oFF +//#else +// write_gpio_bit(GPIO_H1,0); //5V OFF +// write_gpio_bit(GPIO_L11,0); //LCD Back oFF +//#endif +// break; +// case 1: +//#ifndef CONFIG_MACH_GP2XF200 +// write_gpio_bit(GPIO_H1,1); //LCD VGH on +// write_gpio_bit(GPIO_H2,1); //LCD Back on +//#else +// write_gpio_bit(GPIO_H1,1); //5V ON +// write_gpio_bit(GPIO_L11,1); //LCD Back ON +//#endif +// break; +// case BATT_LED_ON: +//#ifndef CONFIG_MACH_GP2XF200 +// write_gpio_bit(GPIO_H4,0); //Batt LED on +//#endif +// break; +// case BATT_LED_OFF: +//#ifndef CONFIG_MACH_GP2XF200 +// write_gpio_bit(GPIO_H4,1); //Batt LED oFF +//#endif +// break; +// case GP2X_INFO_LSB: +// //senquack - this seems to be extraneous.. cannot find this function anywhere: +//// return GetGp2xInfo(1); +// case GP2X_INFO_MSB: +// //senquack - this seems to be extraneous.. cannot find this function anywhere: +//// return GetGp2xInfo(0); +// case FCLK_200: +// pPMR_REG->FPLLSETVREG = ((0x49 << 8) + (1 << 2) + 0); +// udelay(4000); +// break; +// case FCLK_166: +// pPMR_REG->FPLLSETVREG = ((0x3B << 8) + (1 << 2) + 0); +// udelay(4000); +// break; +// case FCLK_133: +// pPMR_REG->FPLLSETVREG = ((0x2E << 8) + (1 << 2) + 0); +// udelay(4000); +// break; +// case FCLK_100: +// pPMR_REG->FPLLSETVREG = ((0x20 << 8) + (1 << 2) + 0); +// udelay(4000); +// printk("fclk 100MHZ\n"); +// break; +// case FCLK_78: +// pPMR_REG->FPLLSETVREG = ((0x18 << 8) + (1 << 2) + 0); +// udelay(4000); +// break; +// case FCLK_64: +// pPMR_REG->FPLLSETVREG = ((0x12 << 8) + (1 << 2) + 0); +// udelay(4000); +// break; +//#ifdef CONFIG_MACH_GP2XF200 +// case USB_CONNECT_START: +// /* Usb to SD mode */ +// write_gpio_bit(CPU_TO_SD,1); +// write_gpio_bit(USB_TO_SD,0); +// write_gpio_bit(USB_CPU_RESET,1); +// udelay(50); +// break; +// case USB_CONNECT_END: +// /* SD to usb mode */ +// write_gpio_bit(USB_CPU_RESET,0); +// write_gpio_bit(CPU_TO_SD,0); +// write_gpio_bit(USB_TO_SD,1); +// break; +//#endif +// case GP2X_GET_USBHCHK: +// //senquack - this is not defined using the current headers, I am disabling it because +// //it probably never worked anyway: +//// return GetUshHcon(); +// +// //senquack - new stick click emulation: +////#define GP2X_STICK_CLICK_EMULATION_DISABLED 43 +////#define GP2X_STICK_CLICK_EMULATION_DPAD 44 +////#define GP2X_STICK_CLICK_EMULATION_VOLUPDOWN 45 +////int g_stick_click_mode = OPEN2X_STICK_CLICK_DISABLED; +// case GP2X_STICK_CLICK_EMULATION_DISABLED: +// // g_stick_click_mode global is buried in kernel/sys.c: +// // (cannot store globals here, they get trashed) +// printk("kernel: stick click emulation disabled\n"); +// g_stick_click_mode = OPEN2X_STICK_CLICK_DISABLED; +// set_gpio_ctrl(TACT_SW,GPIOMD_IN,GPIOPU_EN); // original GPH GPIO configuration +// break; +// case GP2X_STICK_CLICK_EMULATION_DPAD: +// printk("kernel: stick click emulation DPAD\n"); +// g_stick_click_mode = OPEN2X_STICK_CLICK_DPAD; +// set_gpio_ctrl(TACT_SW,GPIOMD_OUT,GPIOPU_DIS); // new GPIO configuration for emulation +// break; +// case GP2X_STICK_CLICK_EMULATION_VOLUPDOWN: +// printk("kernel: stick click emulation VOLUP+DOWN\n"); +// g_stick_click_mode = OPEN2X_STICK_CLICK_VOLUPDOWN; +// set_gpio_ctrl(TACT_SW,GPIOMD_OUT,GPIOPU_DIS); // new GPIO configuration for emulation +// break; +// case FCLK_DEFUALT: +// break; +// } +// +// return 0; +//} +//#define GP2X_SET_STICK_CLICK_EMULATION_MODE 40 +int MMSP2key_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { - MMSP20_CLOCK_POWER *pPMR_REG; - pPMR_REG = MMSP20_GetBase_CLOCK_POWER(); + int int_param; - switch(arg) + switch (cmd) { - case 0: -#ifndef CONFIG_MACH_GP2XF200 - write_gpio_bit(GPIO_H1,0); //LCD VGH oFF - write_gpio_bit(GPIO_H2,0); //LCD Back oFF -#else - write_gpio_bit(GPIO_H1,0); //5V OFF - write_gpio_bit(GPIO_L11,0); //LCD Back oFF -#endif + case GP2X_SET_STICK_CLICK_EMULATION_MODE: + // g_stick_click_mode global is buried in kernel/sys.c: + // (cannot store globals here, they get trashed) + printk("kernel: set stick click emulation mode\n"); + if (get_user(int_param, (int *)arg)) + return -EFAULT; + if (int_param == OPEN2X_STICK_CLICK_DISABLED) + { + printk("kernel: stick click emulation disabled\n"); + g_stick_click_mode = int_param; + set_gpio_ctrl(TACT_SW,GPIOMD_IN,GPIOPU_EN); // original GPH GPIO configuration + } + else if (int_param == OPEN2X_STICK_CLICK_DPAD) + { + printk("kernel: stick click emulation DPAD\n"); + g_stick_click_mode = int_param; + set_gpio_ctrl(TACT_SW,GPIOMD_OUT,GPIOPU_DIS); // new GPIO configuration for emulation + } + else if (int_param == OPEN2X_STICK_CLICK_VOLUPDOWN) + { + printk("kernel: stick click emulation VOLUP+DOWN\n"); + g_stick_click_mode = int_param; + set_gpio_ctrl(TACT_SW,GPIOMD_OUT,GPIOPU_DIS); // new GPIO configuration for emulation + } break; - case 1: -#ifndef CONFIG_MACH_GP2XF200 - write_gpio_bit(GPIO_H1,1); //LCD VGH on - write_gpio_bit(GPIO_H2,1); //LCD Back on -#else - write_gpio_bit(GPIO_H1,1); //5V ON - write_gpio_bit(GPIO_L11,1); //LCD Back ON -#endif + case GP2X_REMAP_BUTTON_00: + case GP2X_REMAP_BUTTON_01: + case GP2X_REMAP_BUTTON_02: + case GP2X_REMAP_BUTTON_03: + case GP2X_REMAP_BUTTON_04: + case GP2X_REMAP_BUTTON_05: + case GP2X_REMAP_BUTTON_06: + case GP2X_REMAP_BUTTON_07: + case GP2X_REMAP_BUTTON_08: + case GP2X_REMAP_BUTTON_09: + case GP2X_REMAP_BUTTON_10: + case GP2X_REMAP_BUTTON_11: + case GP2X_REMAP_BUTTON_12: + case GP2X_REMAP_BUTTON_13: + case GP2X_REMAP_BUTTON_14: + case GP2X_REMAP_BUTTON_15: + case GP2X_REMAP_BUTTON_16: + case GP2X_REMAP_BUTTON_17: + case GP2X_REMAP_BUTTON_18: +//extern int g_button_mapping[19]; // array of gp2x button mappings used in mmsp2-key.c (in kernel/sys.c) +//extern int g_button_remapping; // When this is 0, remapping is off, 1 is on (in kernel/sys.c) + if (get_user(int_param, (int *)arg)) + return -EFAULT; + if (int_param >= -1 && int_param <= 18) + { + // FYI: if user passed -1, that signifies the button is disabled + g_button_remapping = 1; + g_button_mapping[cmd - 50] = int_param; + } break; - case BATT_LED_ON: -#ifndef CONFIG_MACH_GP2XF200 - write_gpio_bit(GPIO_H4,0); //Batt LED on -#endif + case GP2X_DISABLE_REMAPPING: + g_button_remapping = 0; + int i; + for (i = 0; i < 19; i++) + { + g_button_mapping[i] = i; + } break; - case BATT_LED_OFF: -#ifndef CONFIG_MACH_GP2XF200 - write_gpio_bit(GPIO_H4,1); //Batt LED oFF -#endif + default: break; - case GP2X_INFO_LSB: - return GetGp2xInfo(1); - case GP2X_INFO_MSB: - return GetGp2xInfo(0); - case FCLK_200: - pPMR_REG->FPLLSETVREG = ((0x49 << 8) + (1 << 2) + 0); - udelay(4000); - break; - case FCLK_166: - pPMR_REG->FPLLSETVREG = ((0x3B << 8) + (1 << 2) + 0); - udelay(4000); - break; - case FCLK_133: - pPMR_REG->FPLLSETVREG = ((0x2E << 8) + (1 << 2) + 0); - udelay(4000); - break; - case FCLK_100: - pPMR_REG->FPLLSETVREG = ((0x20 << 8) + (1 << 2) + 0); - udelay(4000); - printk("fclk 100MHZ\n"); - break; - case FCLK_78: - pPMR_REG->FPLLSETVREG = ((0x18 << 8) + (1 << 2) + 0); - udelay(4000); - break; - case FCLK_64: - pPMR_REG->FPLLSETVREG = ((0x12 << 8) + (1 << 2) + 0); - udelay(4000); - break; -#ifdef CONFIG_MACH_GP2XF200 - case USB_CONNECT_START: - /* Usb to SD mode */ - write_gpio_bit(CPU_TO_SD,1); - write_gpio_bit(USB_TO_SD,0); - write_gpio_bit(USB_CPU_RESET,1); - udelay(50); - break; - case USB_CONNECT_END: - /* SD to usb mode */ - write_gpio_bit(USB_CPU_RESET,0); - write_gpio_bit(CPU_TO_SD,0); - write_gpio_bit(USB_TO_SD,1); - break; -#endif - case GP2X_GET_USBHCHK: - return GetUshHcon(); - case FCLK_DEFUALT: - break; } return 0; } - struct file_operations MMSP2key_fops = { open: MMSP2key_open, read: MMSP2key_read, @@ -321,6 +481,8 @@ set_gpio_ctrl(VOL_UP,GPIOMD_IN,GPIOPU_EN); set_gpio_ctrl(VOL_DOWN,GPIOMD_IN,GPIOPU_EN); + //senquack - new stick-click emulation: + #ifndef CONFIG_MACH_GP2XF200 set_gpio_ctrl(TACT_SW,GPIOMD_IN,GPIOPU_EN); #else @@ -328,6 +490,14 @@ set_gpio_ctrl(CPU_TO_SD,GPIOMD_OUT,GPIOPU_EN); set_gpio_ctrl(USB_TO_SD,GPIOMD_OUT,GPIOPU_EN); set_gpio_ctrl(USB_CPU_RESET,GPIOMD_OUT,GPIOPU_EN); + + //senquack - stick click emulation: +// printk("Enabling F200 stick-click emulation\n"); +// set_gpio_ctrl(TACT_SW,GPIOMD_OUT,GPIOPU_DIS); + // configure this the same was as F100s initially.. it can be changed later to + // GPIOMD_OUT and GPIOPU_DIS when stick-click emulation is enabled after kernel boot: + set_gpio_ctrl(TACT_SW,GPIOMD_IN,GPIOPU_EN); + /* Cpu to sd mode */ write_gpio_bit(CPU_TO_SD,0); write_gpio_bit(USB_TO_SD,1); Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h 2009-02-02 21:39:54 UTC (rev 354) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/include/asm-arm/arch-mmsp2/mmsp20.h 2009-02-15 09:55:25 UTC (rev 355) @@ -19,6 +19,17 @@ //#include <asm/hardware.h> // mmsp2 register map in kernel src +//senquack - added new defines for stick-click emulation (mostly used in sched.c) +#define OPEN2X_STICK_CLICK_DISABLED 0 // stick-click emulation disabled (default) +#define OPEN2X_STICK_CLICK_DPAD 1 // stick-click emulated by pressing UP+DOWN+LEFT+RIGHT +#define OPEN2X_STICK_CLICK_VOLUPDOWN 2 // stick click emulated by pressing VOLUP+VOLDOWN +//senquack - global that defines if we are emulating stick-click or not and if so +// what button combo is used to trigger it: +extern int g_stick_click_mode; // defined in kernel/sys.c, sue me, it works.. +extern int g_button_mapping[19]; // array of gp2x button mappings used in mmsp2-key.c (in kernel/sys.c) +extern int g_button_remapping; // When this is 0, remapping is off, 1 is on (in kernel/sys.c) + + #define MMSP20_UART_CHANNELS 4 /* MMSP20 only supports 512 Byte HW ECC */ Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sched.c =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sched.c 2009-02-02 21:39:54 UTC (rev 354) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sched.c 2009-02-15 09:55:25 UTC (rev 355) @@ -33,6 +33,20 @@ #include <asm/uaccess.h> #include <asm/mmu_context.h> +//senquack - for stick-click emulation: +#define GP2X_VOLUME_UP GPIO_D7 +#define GP2X_VOLUME_DOWN GPIO_D6 +#define GP2X_UP GPIO_M0 +#define GP2X_DOWN GPIO_M4 +#define GP2X_LEFT GPIO_M2 +#define GP2X_RIGHT GPIO_M6 +#define GP2X_STICK_BUTTON GPIO_D11 +#include <asm/arch/proto_gpio.h> +#include <asm/hardware.h> +#include <asm/arch/mmsp20.h> +#include <asm/arch/hardware.h> +#include <asm/arch/mmsp20_type.h> + extern void timer_bh(void); extern void tqueue_bh(void); extern void immediate_bh(void); @@ -546,6 +560,54 @@ */ asmlinkage void schedule(void) { + //senquack - GPIO is setup in mmsp2-key.c for now, seems to work OK. + //senquack - stick click emulation for F200 GP2Xes +// set_gpio_ctrl(GP2X_STICK_BUTTON,GPIOMD_OUT,GPIOPU_EN); +// +// static int initialized_gpio = 0; +// static int old_stick_click_mode = -1; + +// if (!initialized_gpio) + +// // have we just started the kernel? if so, initialize GPIO to default mode +// if (old_stick_click_mode == -1) +// { +// set_gpio_ctrl(GP2X_STICK_BUTTON,GPIOMD_OUT,0); +// old_stick_click_mode = g_stick_click_mode; +// } + + if (g_stick_click_mode == OPEN2X_STICK_CLICK_DPAD) + { + unsigned char active_pins; + active_pins = read_gpio_bit(GP2X_UP); + active_pins |= read_gpio_bit(GP2X_DOWN) << 1; + active_pins |= read_gpio_bit(GP2X_LEFT) << 2; + active_pins |= read_gpio_bit(GP2X_RIGHT) << 3; + + if ((active_pins & 0xF) == 0) + { +// printk("up+down+left+right, emulating stick-click\n"); + write_gpio_bit(GP2X_STICK_BUTTON, 0); + } + else + { + // printk("nope\n"); + write_gpio_bit(GP2X_STICK_BUTTON, 1); + } + } + else if (g_stick_click_mode == OPEN2X_STICK_CLICK_VOLUPDOWN) + { + if ( !read_gpio_bit(GP2X_VOLUME_UP) && !read_gpio_bit(GP2X_VOLUME_DOWN) ) + { +// printk("volup+voldown, emulating stick-click\n"); + write_gpio_bit(GP2X_STICK_BUTTON, 0); + } + else + { + write_gpio_bit(GP2X_STICK_BUTTON, 1); + } + } + struct schedule_data * sched_data; struct task_struct *prev, *next, *p; struct list_head *tmp; Modified: trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c =================================================================== --- trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c 2009-02-02 21:39:54 UTC (rev 354) +++ trunk/kernel/linux-open2x-2.4.26_FW2-3/kernel/sys.c 2009-02-15 09:55:25 UTC (rev 355) @@ -20,6 +20,9 @@ #include <asm/uaccess.h> #include <asm/io.h> +//senquack - for stick-click emulation: +#include <asm/arch/mmsp20.h> + #ifndef SET_UNALIGN_CTL # define SET_UNALIGN_CTL(a,b) (-EINVAL) #endif @@ -52,6 +55,13 @@ // issue these ioctl calls from scripts and such. int g_volume_scale = 100; // sue me, it works +//senquack - added stick-click emulation for F200s and F100s with DPAD mod: +int g_stick_click_mode = OPEN2X_STICK_CLICK_DISABLED; + +//senquack - array used my mmsp2-key.c to remap GP2X buttons reported by /dev/GPIO +int g_button_mapping[19] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 }; +int g_button_remapping = 0; // When this is 0, remapping is off, 1 is on + /* * this is where the system-wide overflow UID and GID are defined, for * architectures that now have 32-bit UID/GID but didn't in the past This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-02 22:16:24
|
Revision: 354 http://open2x.svn.sourceforge.net/open2x/?rev=354&view=rev Author: senquack Date: 2009-02-02 21:39:54 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Pointed Makefile to SDL 1.2.11 instead of 1.2.13 Modified Paths: -------------- trunk/libs-new/sdl/sdl/Makefile.mk Modified: trunk/libs-new/sdl/sdl/Makefile.mk =================================================================== --- trunk/libs-new/sdl/sdl/Makefile.mk 2009-02-02 14:45:35 UTC (rev 353) +++ trunk/libs-new/sdl/sdl/Makefile.mk 2009-02-02 21:39:54 UTC (rev 354) @@ -3,5 +3,5 @@ endif #include sdl/sdl/1.2.9.mk -#include sdl/sdl/1.2.11.mk -include sdl/sdl/1.2.13.mk +include sdl/sdl/1.2.11.mk +#include sdl/sdl/1.2.13.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sen...@us...> - 2009-02-02 14:45:39
|
Revision: 353 http://open2x.svn.sourceforge.net/open2x/?rev=353&view=rev Author: senquack Date: 2009-02-02 14:45:35 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Accidentally left out a small change to the touchscreen event struct Modified Paths: -------------- trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/gp2x_tslib.c trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/tslib.h Modified: trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/gp2x_tslib.c =================================================================== --- trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/gp2x_tslib.c 2009-01-26 15:34:18 UTC (rev 352) +++ trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/gp2x_tslib.c 2009-02-02 14:45:35 UTC (rev 353) @@ -96,7 +96,7 @@ unsigned short pad; } UCB1X00_TS_EVENT; -//DKS - Originially, I had made this read multiple samples but it turns out the driver +//senquack - Originially, I had made this read multiple samples but it turns out the driver //for the touchscreen is set up to give only one sample per read, so had to go back //to this optimized version. It should be noted that the device file only ever provides //8 bytes of data, basically 3shorts: x,y,and pressure, and the old code tried to read @@ -182,7 +182,7 @@ variance_dev.delta = 30 * 30; } -//DKS - added parameter, flush_history, that gets assigned to 1 if a fast movement is +//senquack - added parameter, flush_history, that gets assigned to 1 if a fast movement is // detected.. this is so the averaging algorithm will flush its history if // enough of them are detected static inline int variance_read(TSDEV *ts, TS_SAMPLE *samp, int nr, int *flush_history) @@ -234,7 +234,7 @@ variance_dev.flags = (variance_dev.flags & ~VAR_NOISEVALID) | VAR_SUBMITNOISE; - //DKS - flush sample history in averaging module + //senquack - flush sample history in averaging module *flush_history = 1; } else variance_dev.flags |= VAR_NOISEVALID; @@ -266,7 +266,7 @@ #define XYHISTLENGTH 15 XYHIST average_xyhist[XYHISTLENGTH]; -//DKS - De-jitterer that can handle high noise level of the GP2X: +//senquack - New de-jitterer that can handle high noise level of the GP2X: static inline int average_read(TSDEV *ts, TS_SAMPLE *samp, int nr) { @@ -275,8 +275,8 @@ int flush_history = 0; // variance module will tell us if we are getting fast movements static int flush_count = 0; // when we get enough fast movements, flush the history - static int xyhist_full = 0; //DKS - when we have a full four samples, this is 1 - static int xyhist_counter = 0; // DKS - how many entires in history? + static int xyhist_full = 0; //senquack - when we have a full four samples, this is 1 + static int xyhist_counter = 0; // senquack - how many entires in history? static int xyhist_index = 0; //xyhist_index - 1 is index to most-recent sample in array ret = variance_read(ts, samp, nr, &flush_history); Modified: trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/tslib.h =================================================================== --- trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/tslib.h 2009-01-26 15:34:18 UTC (rev 352) +++ trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/tslib.h 2009-02-02 14:45:35 UTC (rev 353) @@ -46,7 +46,6 @@ int x; int y; unsigned int pressure; - struct timeval tv; }; /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lit...@us...> - 2009-01-26 15:34:21
|
Revision: 352 http://open2x.svn.sourceforge.net/open2x/?rev=352&view=rev Author: lithosphere Date: 2009-01-26 15:34:18 +0000 (Mon, 26 Jan 2009) Log Message: ----------- Add support for other YUV surfaces (untested) Modified Paths: -------------- trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/SDL_gp2xyuv.c Modified: trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/SDL_gp2xyuv.c =================================================================== --- trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/SDL_gp2xyuv.c 2009-01-25 10:08:59 UTC (rev 351) +++ trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/SDL_gp2xyuv.c 2009-01-26 15:34:18 UTC (rev 352) @@ -47,18 +47,28 @@ struct private_yuvhwdata { - Uint8 *YUVBuf[2]; // we will have two buffers, a front and back (double buffered) - unsigned int GP2XAddr[2]; // the yuv buffer address from the gp2x's perspective + Uint8 *YUVBuf[2][3]; // we will have two buffers, a front and back (double buffered) + unsigned int GP2XAddr[2][3]; // the yuv buffer address from the gp2x's perspective unsigned int uBackBuf; // which buffer is currently the back buffer (0 or 1) unsigned int uBufSize; // how big the YUVBuf buffers are (in bytes) + unsigned int uYsize; // how big the Y plane is (in bytes) (not used for YUY2) + unsigned int uUsize; // how big the U plane is (in bytes) (not used for YUY2) SDL_Rect rctLast; // the last rectangle we used for displaying (so we know when to rescale/change coordinates) Uint16 u16PixelWidth; // value stored for MLC_VLA_TP_PXW register /* These are just so we don't have to allocate them separately */ Uint16 pitches[3]; Uint8 *planes[3]; + + Uint32 format; }; +#define FDC_CNTL (0x1838 >> 1) +#define FDC_FRAME_SIZE (0x183A >> 1) +#define FDC_LUMA_OFFSET (0x183C >> 1) +#define FDC_CB_OFFSET (0x183E >> 1) +#define FDC_CR_OFFSET (0x1840 >> 1) + // These are the registers (currently) modified by this code; // They are in this array so we can restore them to their previous state after the overlay is destroyed. const unsigned int g_pTouchedRegs[] = @@ -80,7 +90,12 @@ 0x28A4 >> 1, 0x28A6 >> 1, 0x28C0 >> 1, - 0x28C2 >> 1 + 0x28C2 >> 1, + FDC_CNTL, + FDC_FRAME_SIZE, + FDC_LUMA_OFFSET, + FDC_CB_OFFSET, + FDC_CR_OFFSET }; const unsigned int TOUCHEDREGS_COUNT = sizeof(g_pTouchedRegs) / sizeof(unsigned int); @@ -120,7 +135,10 @@ SDL_PrivateVideoData *data = this->hidden; unsigned short volatile *p16GP2XRegs = data->io; - hwdata->uBufSize = width * height * 2; // YUY2 is (2 * width) bytes per line + if(format == SDL_YUY2_OVERLAY) + hwdata->uBufSize = width * height * 2; // YUY2 is (2 * width) bytes per line + else if(format == SDL_YV12_OVERLAY || format == SDL_IYUV_OVERLAY) + hwdata->uBufSize = width * height * 3 / 2; // u v 2x2 subsampled -> width * 1.5 bytes per line // initialize to values that will never be used so that we force a rescale the first time GP2X_DisplayYUVOverlay is called hwdata->rctLast.h = hwdata->rctLast.w = 0; @@ -128,29 +146,56 @@ hwdata->uBackBuf = 0; // arbitrary starting point (can be 0 or 1) - // We're using GP2X_UPPER_MEM_START because that's where vmem is mapped in SDL_gp2xvideo.c - hwdata->GP2XAddr[0] = GP2X_UPPER_MEM_START; // this is where vmem is mapped from the gp2x's pov - hwdata->GP2XAddr[1] = GP2X_UPPER_MEM_START + hwdata->uBufSize; + if(format == SDL_YUY2_OVERLAY) + { + // We're using GP2X_UPPER_MEM_START because that's where vmem is mapped in SDL_gp2xvideo.c + hwdata->GP2XAddr[0][0] = GP2X_UPPER_MEM_START; // this is where vmem is mapped from the gp2x's pov + hwdata->GP2XAddr[1][0] = GP2X_UPPER_MEM_START + hwdata->uBufSize; - //map memory for our cursor + 4 YUV regions (double buffered each one) - hwdata->YUVBuf[0] = (Uint8 *) data->vmem; - hwdata->YUVBuf[1] = ((Uint8 *) data->vmem) + hwdata->uBufSize; + //map memory for our cursor + 4 YUV regions (double buffered each one) + hwdata->YUVBuf[0][0] = (Uint8 *) data->vmem; + hwdata->YUVBuf[1][0] = ((Uint8 *) data->vmem) + hwdata->uBufSize; + } + else if(format == SDL_YV12_OVERLAY || format == SDL_IYUV_OVERLAY) + { + // PhyAddr = (ScreenOffset << 24) | (YOffset << 20) | (XOffset * 0x2000) + // GP2X_UPPER_MEM_START == 0x0200 << 24 + hwdata->GP2XAddr[0][0] = 0x0240; // this is from the gp2x's pov + hwdata->GP2XAddr[0][1] = 0x0244; + hwdata->GP2XAddr[0][2] = 0x0246; + hwdata->GP2XAddr[1][0] = 0x0260; + hwdata->GP2XAddr[1][1] = 0x0264; + hwdata->GP2XAddr[1][2] = 0x0266; + + //map memory for our cursor + 4 YUV regions (double buffered each one) + hwdata->YUVBuf[0][0] = (Uint8 *) data->vmem + (0x4 << 20); + hwdata->YUVBuf[0][1] = (Uint8 *) data->vmem + (0x4 << 20) + 0x4 * 0x2000; + hwdata->YUVBuf[0][2] = (Uint8 *) data->vmem + (0x4 << 20) + 0x6 * 0x2000; + hwdata->YUVBuf[1][0] = (Uint8 *) data->vmem + (0x6 << 20); + hwdata->YUVBuf[1][1] = (Uint8 *) data->vmem + (0x6 << 20) + 0x4 * 0x2000; + hwdata->YUVBuf[1][2] = (Uint8 *) data->vmem + (0x6 << 20) + 0x6 * 0x2000; + } + + hwdata->format = format; + // tests have shown that this value should be the width of the overlay, not the width of the display (ie not always 320) hwdata->u16PixelWidth = width; + if(format != SDL_YUY2_OVERLAY) + p16GP2XRegs[FDC_CNTL] = 1<<11 + // Write mode: mem -> scaler/display + ((format == SDL_YV12_OVERLAY || format == SDL_IYUV_OVERLAY) ? 1 : 0) << 1; + // Set MLC_VLA_TP_PXW p16GP2XRegs[0x2892>>1] = hwdata->u16PixelWidth; - // MLC_YUV_CNTL: set YUV source to external memory for regions A and B, turn off "stepping" - p16GP2XRegs[0x2884>>1]=0; + // MLC_YUV_CNTL: set YUV source to external memory for regions A and B, turn off "stepping" when YUY2 + // otherwise get it from the fdc + p16GP2XRegs[0x2884>>1] = format == SDL_YUY2_OVERLAY ? 0 : 1; - // disable all RGB Windows, and YUV region B - p16GP2XRegs[MLC_OVLAY_CNTR] &= ~(DISP_STL5EN|DISP_STL4EN|DISP_STL3EN|DISP_STL2EN|DISP_STL1EN|DISP_VLBON); + // disable all RGB Windows, and YUV region A & B + p16GP2XRegs[MLC_OVLAY_CNTR] &= ~(DISP_STL5EN|DISP_STL4EN|DISP_STL3EN|DISP_STL2EN|DISP_STL1EN|DISP_VLAON|DISP_VLBON); - // enable YUV region A - p16GP2XRegs[MLC_OVLAY_CNTR] |= DISP_VLAON; - // disable bottom regions for A & B, and turn off all mirroring p16GP2XRegs[0x2882>>1] &= 0xFC00; @@ -167,11 +212,19 @@ SDL_Overlay *overlay = NULL; struct private_yuvhwdata *hwdata; - // we ONLY support YUY2 because that is the native gp2x YUV format - if (format != SDL_YUY2_OVERLAY) - { - printf("SDL_GP2X: Unsupported YUV format for hardware acceleration. Falling back to software.\n"); - return NULL; + switch(format){ + // we support YUY2 because that is the native gp2x YUV format + case SDL_YUY2_OVERLAY: + // other planar formats need the extra frame dimension converter + case SDL_YV12_OVERLAY: + case SDL_IYUV_OVERLAY: // == I420 ? + break; + + default: + // SDL_UYVY_OVERLAY: // 2x2 subsampled packed + // SDL_YVYU_OVERLAY: // 2x2 subsampled packed + printf("SDL_GP2X: Unsupported YUV format for hardware acceleration. Falling back to software.\n"); + return NULL; } /* Create the overlay structure */ @@ -225,16 +278,30 @@ /* Set up the plane pointers */ overlay->pitches = hwdata->pitches; overlay->pixels = hwdata->planes; - overlay->planes = 1; // since we only support YUY2, there is always only 1 plane - // the pitch will always be the overlay width * 2, because we only support YUY2 - overlay->pitches[0] = overlay->w * 2; + if(format == SDL_YUY2_OVERLAY) + { + overlay->planes = 1; + // the pitch will be the overlay width * 2 + overlay->pitches[0] = overlay->w * 2; + } + else if(format == SDL_YV12_OVERLAY || format == SDL_IYUV_OVERLAY) + { + overlay->planes = 3; + + overlay->pitches[0] = overlay->w * 1; + overlay->pitches[1] = overlay->w / 4; + overlay->pitches[2] = overlay->w / 4; + } + // start on the correct back buffer - overlay->pixels[0] = hwdata->YUVBuf[hwdata->uBackBuf]; + overlay->pixels[0] = hwdata->YUVBuf[hwdata->uBackBuf][0]; + overlay->pixels[1] = hwdata->YUVBuf[hwdata->uBackBuf][1]; + overlay->pixels[1] = hwdata->YUVBuf[hwdata->uBackBuf][2]; /* We're all done.. */ - printf("SDL_GP2X: Created YUY2 overlay\n"); + printf("SDL_GP2X: Created YUV overlay\n"); return(overlay); } @@ -250,7 +317,7 @@ int GP2X_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *dstrect) { struct private_yuvhwdata *hwdata = overlay->hwdata; - unsigned int uAddress = (unsigned int) hwdata->GP2XAddr[hwdata->uBackBuf]; + unsigned int *uAddress = (unsigned int*) hwdata->GP2XAddr[hwdata->uBackBuf]; SDL_PrivateVideoData *data = this->hidden; unsigned short volatile *p16GP2XRegs = data->io; @@ -290,6 +357,12 @@ if (s16Right > 319) s16Right = 319; if (s16Bottom > 239) s16Bottom = 239; + if(hwdata->format != SDL_YUY2_OVERLAY){ + // Set frame size for FDC + p16GP2XRegs[FDC_FRAME_SIZE] = (overlay->w / 16 - 1) + // width / 16 - 1 + (overlay->h / 16 - 1) << 8; // height / 16 - 1 + } + // now that we've done all the calculations we can before changing registers, wait for vblank GP2X_WaitVBlank(data); @@ -324,22 +397,33 @@ // NOW FLIP THE ACTUAL BUFFER - // NOTE : I am flipping the odd and even fields here because that's how rlyeh did it, but I am not sure - // whether both of these need to be flipped. + if(hwdata->format == SDL_YUY2_OVERLAY){ + // NOTE : I am flipping the odd and even fields here because that's how rlyeh did it, but I am not sure + // whether both of these need to be flipped. - // region A, odd fields - p16GP2XRegs[0x28A0>>1] = (uAddress & 0xFFFF); - p16GP2XRegs[0x28A2>>1] = (uAddress >> 16); + // region A, odd fields + p16GP2XRegs[0x28A0>>1] = (uAddress[0] & 0xFFFF); + p16GP2XRegs[0x28A2>>1] = (uAddress[0] >> 16); - // region A, even fields - p16GP2XRegs[0x28A4>>1] = (uAddress & 0xFFFF); - p16GP2XRegs[0x28A6>>1] = (uAddress >> 16); + // region A, even fields + p16GP2XRegs[0x28A4>>1] = (uAddress[0] & 0xFFFF); + p16GP2XRegs[0x28A6>>1] = (uAddress[0] >> 16); + }else{ + p16GP2XRegs[FDC_LUMA_OFFSET] = uAddress[0]; + p16GP2XRegs[FDC_CB_OFFSET] = uAddress[1]; + p16GP2XRegs[FDC_CR_OFFSET] = uAddress[2]; + + p16GP2XRegs[FDC_CNTL] |= 1; // START FDC + } + // change back buffer to the other buffer (can be 0 or 1, so XOR works nicely) hwdata->uBackBuf ^= 1; // update the pixel pointer to new back buffer - overlay->pixels[0] = hwdata->YUVBuf[hwdata->uBackBuf]; + overlay->pixels[0] = hwdata->YUVBuf[hwdata->uBackBuf][0]; + overlay->pixels[1] = hwdata->YUVBuf[hwdata->uBackBuf][1]; + overlay->pixels[2] = hwdata->YUVBuf[hwdata->uBackBuf][2]; return(0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |