Announcing SMS project
Here you can find my 'IF.bin'. IPU performs colorspace conversion (YUV->RGB) first and then displays conversion's result. lpFrame -> m_pBuf points to decoded macroblocks. IPU takes them, converts to RGB format and sends result to the GS. At the end IPU displays textured sprite in full screen maintaining aspect ratio of source picture (so depending on it you can experience "black bars" at the top and at the bottom of screen).
Thank's for your file and your explication.
But I don't understand.
You write:
m_pData doesn't exist in lpFrame structure cause it's initialized whit SMS_Frame*, and not whit SMS_FrameBuffer*.
And I saw in IPU.h void ( *Display ) ( struct SMS_FrameBuffer* );
So I have to write:
I'm right or not?
Bye
But I don't understand.
You write:
Code: Select all
SMS_Frame* lpFrame = NULL;
lCodecCtx.m_pCodec -> Decode (
&lCodecCtx, ( void** )&lpFrame, lpData, lSize
);
if ( lpFrame ) {
if ( !lpFrame -> m_pData ) lpFrame = &g_MPEGCtx.m_CurPic;
lpIPUCtx -> Display ( lpFrame -> m_pData );
And I saw in IPU.h void ( *Display ) ( struct SMS_FrameBuffer* );
So I have to write:
Code: Select all
SMS_Frame* lpFrame = NULL;
lCodecCtx.m_pCodec -> Decode (
&lCodecCtx, ( void** )&lpFrame, lpData, lSize
);
if ( lpFrame ) {
if ( !lpFrame -> m_pBuf ) lpFrame = &g_MPEGCtx.m_CurPic;
lpIPUCtx -> Display ( lpFrame -> m_pBuf );
Bye
...this is because I've used older version of SMS (that I use on PC), sorry :). I've "invented" SMS_FrameBuffer a bit later, so now "lpFrame" variable has to have "SMS_FrameBuffer*" type like this "SMS_FrameBuffer* lpFrame;", so the code would be like this:
...sorry again...
Code: Select all
SMS_FrameBuffer* lpFrame = NULL;
lCodecCtx.m_pCodec -> Decode (
&lCodecCtx, ( void** )&lpFrame, lpData, lSize
);
if ( !lpFrame ) {
lpFrame = g_MPEGCtx.m_CurPic.m_pBuf;
lpIPUCtx -> Display ( lpFrame );
Hello EEUG,
I didn't find any tool which can extract a IF whit the same structure of your, so I wrote some code line to done that whit SMS, and inserted them to _sms_play_v fonction, (cause I make none audio avi file).
Can you take a look and tell me if it's OK or not?
So I extract the twice I-Frame in this fonction.
Bye
Bixente
I didn't find any tool which can extract a IF whit the same structure of your, so I wrote some code line to done that whit SMS, and inserted them to _sms_play_v fonction, (cause I make none audio avi file).
Can you take a look and tell me if it's OK or not?
Code: Select all
static void _sms_play_v ( void ) {
int NbIFrame = 0;
int lSize;
SMS_FrameBuffer* lpFrame;
SMS_AVPacket* lpPacket = s_Player.m_pCont -> NewPacket ( s_Player.m_pCont );
float lFrameRate = ( float )s_Player.m_pCont -> m_pStm[ s_VideoIdx ] -> m_RealFrameRate / ( float )s_Player.m_pCont -> m_pStm[ s_VideoIdx ] -> m_RealFrameRateBase;
float lDiff;
float lNextFrame = g_Timer;
float lFrameTime = 1000.0F / lFrameRate;
char lBuff[ 128 ];
sprintf ( lBuff, "Buffering %s file (video only)...", s_Player.m_pCont -> m_pName );
s_Player.m_pGUICtx -> Status ( lBuff );
s_Player.m_pFileCtx -> Stream ( s_Player.m_pFileCtx, s_Player.m_pFileCtx -> m_CurPos, 384 );
_prepare_ipu_context ( 1 );
while ( 1 ) {
int lButtons = GUI_ReadButtons ();
if ( lButtons & PAD_SELECT ) {
lNextFrame = g_Timer;
_draw_text ( "Pause" );
GUI_WaitButton ( PAD_START, 0 );
} else if ( lButtons & PAD_TRIANGLE ) {
s_Player.m_pIPUCtx -> Sync ();
_draw_text ( "Stopping" );
break;
} /* end if */
lSize = s_Player.m_pCont -> ReadPacket ( lpPacket );
if ( lSize < 0 )
break;
else if ( lSize == 0 ) continue;
if ( lpPacket -> m_StmIdx != s_VideoIdx ) continue;
if ( s_pVideoCodec -> Decode (
&s_Player.m_pCont -> m_pStm[ s_VideoIdx ] -> m_Codec, ( void** )&lpFrame, lpPacket -> m_pData, lpPacket -> m_Size
)
) {
s_Player.m_pIPUCtx -> Sync ();
lDiff = lNextFrame - g_Timer;
if ( lDiff > 0.0F ) Timer_Wait ( lDiff );
// Debut ajout Extract IF
if ( g_MPEGCtx.m_pCurPic -> m_KeyFrame == SMS_FT_I_TYPE ) {
NbIFrame++;
if ( NbIFrame == 2 ) {
lNextFrame = g_Timer;
_draw_text ( "Extracting IFrame" );
FILE* lpFile = fopen ( "mc0:SMS/skin.bin", "wb" );
fseek ( lpFile, 0, SEEK_SET );
fwrite ( lpPacket -> m_pData, 1, lpPacket -> m_Size, lpFile );
fclose ( lpFile );
s_Player.m_pIPUCtx -> Display ( lpFrame );
_draw_text ( "End Extracting IFrame Press START" );
GUI_WaitButton ( PAD_START, 0 );
} /* end if NbI-Frame */
} /* end if I-Frame */
// Fin ajout Extract IF
s_Player.m_pIPUCtx -> Display ( lpFrame );
} /* end if */
lNextFrame = g_Timer + lFrameTime;
} /* end while */
lpPacket -> Destroy ( lpPacket );
} /* end _sms_play_v */
Bye
Bixente
News:
Version Extract I-Frame: It's OK for extracting, creation of a skin.bin file in directory mc0:SMS.
Version Draw Skin: For the moment, my code draw a green skin at initialization and a real skin when it redraw GUI ( at the end of avi playing, or when stopping ).
I think there is an initialized parameter, so i'm tring to find which one.
bye.
Version Extract I-Frame: It's OK for extracting, creation of a skin.bin file in directory mc0:SMS.
Version Draw Skin: For the moment, my code draw a green skin at initialization and a real skin when it redraw GUI ( at the end of avi playing, or when stopping ).
I think there is an initialized parameter, so i'm tring to find which one.
bye.
...this
performs DSP stuff initialization. It's executed inside "SMS_Initialize" after initialization of the GUI, so that causes green screen. I think it's safe to move these two lines somewhere before "GUI_InitContext" call...
Code: Select all
memcpy ( SMS_DSP_SPR_CONST, &g_DataBuffer[ SMS_IDCT_CONST_OFFSET ], SMS_IDCT_CONST_SIZE );
SMS_DSP_Init ();
Hello
Here the file which contain GUI_Stub.c ( a very good code wrote by EEUG. ;) )
And a skin.bin file which contain a I-Frame extract from a avi file.
http://www.fileshack.us/files/131/SKIN.rar
I'm now working on a WIN tool which can extract I-Frame from avi file. ( With preview ;) )
Bye
Bix
Here the file which contain GUI_Stub.c ( a very good code wrote by EEUG. ;) )
And a skin.bin file which contain a I-Frame extract from a avi file.
http://www.fileshack.us/files/131/SKIN.rar
I'm now working on a WIN tool which can extract I-Frame from avi file. ( With preview ;) )
Bye
Bix
Re Hello,
Here 6 Skins extracted with my own version of SMS.
http://www.fileshack.us/files/131/6_SKIN.rar
See you.
Here 6 Skins extracted with my own version of SMS.
http://www.fileshack.us/files/131/6_SKIN.rar
See you.
...your pictures look quite cool, really :). I'll try to integrate skin support as soon as I'll have time for it. Just one remark: maybe it would be easier to make image converter instead of I-Frame extractor? I don't know the details, but I think it's quite easy. Win32 has quite rich API for bitmap processing (IPicture COM stuff, for example, to load jpeg/gif etc. images). So, the whole process would be just like "load bitmap -> use DivX/XviD codec ("encore" API?)" to generate I-Frame file. Maybe this will give you more information? Anyway, it's just a suggestion, if you don't feel like learning this stuff just forget about it.
Best regards
Eugene
Best regards
Eugene
Hello EEUG,
Thanks for your link, very usefull.
I'm working with the help of VirtualDu* source code, and DX50 encoding.
I've got some "problems", but I think I'm on the right way.
That's not why, i send you this post.
A freind want to use his remote controle, so we search how-to, and find libpad and padman work whit official remote controle.
So we modified GUI.c to add support of pad 2 (without test for port 2).
Now 2 pads work and the remote controle work find, there is just a think : we can't push 2 buttons at the same time with RM, so init screen (pal, ntsc,...) , save config, reset, and power off, don't work with RM, but with pad.
We've test all possibility and it fill good.
Here the GUI.c modified file:
http://www.fileshack.us/files/131/GUI.rar
Bye
Thanks for your link, very usefull.
I'm working with the help of VirtualDu* source code, and DX50 encoding.
I've got some "problems", but I think I'm on the right way.
That's not why, i send you this post.
A freind want to use his remote controle, so we search how-to, and find libpad and padman work whit official remote controle.
So we modified GUI.c to add support of pad 2 (without test for port 2).
Now 2 pads work and the remote controle work find, there is just a think : we can't push 2 buttons at the same time with RM, so init screen (pal, ntsc,...) , save config, reset, and power off, don't work with RM, but with pad.
We've test all possibility and it fill good.
Here the GUI.c modified file:
http://www.fileshack.us/files/131/GUI.rar
Bye
because rm doesn't support more than 1 button pressed, another way should be using the rmman iop driver but it needs to use xpadman to work togheter with pad,
so first you load ADDRV from rom0 then XPADMAN and RMMAN from rom1 then you need to link correct library and in this way you can use full remote control buttons, but there's still two problem
1-i don't know if it work with consoles that require dvd player update
2-rmman library isn't compatible with never builtin ir
you can use a newer remote control with older and new console using the rm adapter in it's full function (at least from the view of your software, but you can't eject or power off without a handmade implementation of them in older console)
so first you load ADDRV from rom0 then XPADMAN and RMMAN from rom1 then you need to link correct library and in this way you can use full remote control buttons, but there's still two problem
1-i don't know if it work with consoles that require dvd player update
2-rmman library isn't compatible with never builtin ir
you can use a newer remote control with older and new console using the rm adapter in it's full function (at least from the view of your software, but you can't eject or power off without a handmade implementation of them in older console)
@weltall
I've worked a little bit on librm, and it's very complicate to add support of rmman in SMS, cause rmman don't work on the same way with all consol version.
So i've just add support of 2 pad, which meen, you can control SMS with pad 1 or pad 2, if you put an official RM instead of pad 2, that ok for navigate, playing, stopping, ... , SMS.
RM send 0 when we push 2 buttons, so RM can't use some fonctionnality of SMS, but pad 1 can.
That's all.
I've worked a little bit on librm, and it's very complicate to add support of rmman in SMS, cause rmman don't work on the same way with all consol version.
So i've just add support of 2 pad, which meen, you can control SMS with pad 1 or pad 2, if you put an official RM instead of pad 2, that ok for navigate, playing, stopping, ... , SMS.
RM send 0 when we push 2 buttons, so RM can't use some fonctionnality of SMS, but pad 1 can.
That's all.
Very GOOOOD job EEUG for forward/backward.
Here some skins:
http://www.fileshack.us/files/131/9_SKIN.rar
My prefered, the 6.
I'm still on my tool, but it's a little bit boring, I don't obtain the right format. :(
Something else, what do you think about drawing an other icon at the end of device section, witch permit to acces to a screen ( normal GUI ) with some option ( instead of file ), like, screen setting, ip setting, save conf, reset, poweroff. That allow people to do that with remote controle.
BEST BEST regards
Bye Bix
Here some skins:
http://www.fileshack.us/files/131/9_SKIN.rar
My prefered, the 6.
I'm still on my tool, but it's a little bit boring, I don't obtain the right format. :(
Something else, what do you think about drawing an other icon at the end of device section, witch permit to acces to a screen ( normal GUI ) with some option ( instead of file ), like, screen setting, ip setting, save conf, reset, poweroff. That allow people to do that with remote controle.
BEST BEST regards
Bye Bix
...that would be the easiest way to implement the configuration screen (I think it's not the nicest one). Well, let's wait while "BraveDog" will implement a new font (from FNTIMAGE) drawing functions (it's almost done), so we can create fully functional setup screen with this new font (16x20), so it will be overlayed with browser :). I can't help you with the tool since I'm noob in that at the moment, so I should start from scratch anyway...
All the new improvements to video rendering and the GUI are great, of course, but I've just noticed that something odd has happened to the sound. I haven't noticed it much in recent tests because I wasn't testing the sound, so having it low was what I wanted anyway to decrease distractions. But it is clear to me now that the sound level is much lower than it ought to be.
To hear what people are saying, in normal conversations of a movie, I have to turn up the TV volume control way beyond its normal settings. Then, if I play a game with those same settings, and an ingame conversation occurs that 'should' have similar volume to that of the movie, then the result will be deafening... I think that the recent SMS versions have lost appx 20 dB (just a rough guess) of sound level, as compared to some older versions.
I haven't saved copies of all old versions, so I'm not sure exactly when this happened, but it was after v1.4 Rev.2 which has good sound level, whereas v1.4 Rev.4 and later revisions all have too low levels.
Quite probably this is not due to any change in your own code, EEUG, but due to some change in the sound driver, so perhaps you should check that possibility first.
Best regards: dlanor
To hear what people are saying, in normal conversations of a movie, I have to turn up the TV volume control way beyond its normal settings. Then, if I play a game with those same settings, and an ingame conversation occurs that 'should' have similar volume to that of the movie, then the result will be deafening... I think that the recent SMS versions have lost appx 20 dB (just a rough guess) of sound level, as compared to some older versions.
I haven't saved copies of all old versions, so I'm not sure exactly when this happened, but it was after v1.4 Rev.2 which has good sound level, whereas v1.4 Rev.4 and later revisions all have too low levels.
Quite probably this is not due to any change in your own code, EEUG, but due to some change in the sound driver, so perhaps you should check that possibility first.
Best regards: dlanor
could be good also a disable lan or use ps2link already installed lan.bix64 wrote:
Something else, what do you think about drawing an other icon at the end of device section, witch permit to acces to a screen ( normal GUI ) with some option ( instead of file ), like, screen setting, ip setting, save conf, reset, poweroff. That allow people to do that with remote controle.
BEST BEST regards
Bye Bix
You're right that this was my main 'problem'. When I boost the internal volume gauge of SMS to nearly its maximum, I get what I consider a 'normal' level (appx). However, to get the maximum usefulness out of this control, it really needs to be centered at a level that corresponds to average levels produced by most games at default settings. Otherwise most of the range of that control will be wasted, producing sound levels so near silent as to be useless (except near the top end).EEUG wrote:@dlanor: maybe it's because volume control? (formely SMS set full sound at startup, now it's < 1/2 and it's adjustable via up/down buttons).
I realize that there is no absolute standard for these things, but I still think the level needs to be raised a bit.
Btw:
I second the motion bix64 made, for adding a 'dummy' device icon to the GUI, and using this to enter a setup screen of some kind. As SMS continues to grow in capabilities and complexity, users will need some way to check on current settings, and to change them without relying entirely on their memory of the button combos needed. Such a setup screen could not only contain the major settings as adjustable numbers, but also provide a simple means of bringing up a help text for the button combos. That feature alone might eliminate lots of redundant questions both here and in other forums.
Best regards: dlanor
...yes, sound stuff is quite difficult as there're no documentation about SPU2 unit. Maybe this could be solved by adjusting signal magnitude inside MP3 decoder (same way as in AC3), but I don't know at the moment how to do that :(. Setup screen is definitely needed. I'll try to implement it one day (or, maybe, someone else will try to do it ? ;)). Just hold on some days till I'll make some demo proggy to show the new font, so, again, democracy can help to make a choice :)...
Hello
EEUG, what is the icon format ? How-to obtain it ?
unsigned char g_Img[ 9216 ] __attribute__( ( aligned( 16 ) ) ) for 48*48 ?
unsigned char g_Img[ 4096 ] __attribute__( ( aligned( 16 ) ) ) for 16*16 ?
I read in GUI_data.c, Icon design: (c) David Vignoni, but in his web site, I didn't find anything.
Had he created icon for you ? or had you done it ?
I know I ask a lot of questions!!! ;) Sorry to be curious. ;)
Bye
Bixente
EEUG, what is the icon format ? How-to obtain it ?
unsigned char g_Img[ 9216 ] __attribute__( ( aligned( 16 ) ) ) for 48*48 ?
unsigned char g_Img[ 4096 ] __attribute__( ( aligned( 16 ) ) ) for 16*16 ?
I read in GUI_data.c, Icon design: (c) David Vignoni, but in his web site, I didn't find anything.
Had he created icon for you ? or had you done it ?
I know I ask a lot of questions!!! ;) Sorry to be curious. ;)
Bye
Bixente