 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Fri Oct 21, 2005 7:50 pm Post subject: |
|
|
Hello, EEUG
Can you put your IF.bin file some where, to compare it whit other, extract whit virualDu*, GSpo*, ACIDDra*, ... ?
Question, IPU Display a Framebuffer ? So we have to display lpFrame -> m_pBuf ?
Bye |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Fri Oct 21, 2005 8:16 pm Post subject: |
|
|
| 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). |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Sat Oct 22, 2005 1:36 am Post subject: |
|
|
Thank's for your file and your explication.
But I don't understand.
You write:
| Code: |
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 );
|
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:
| Code: |
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 );
|
I'm right or not?
Bye |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Sat Oct 22, 2005 2:40 am Post subject: |
|
|
...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:
| Code: |
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 );
|
...sorry again... |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Sat Oct 22, 2005 2:51 am Post subject: |
|
|
Hey, sorry for what???
You give me the code, and all explication.
You're a very good teacher!!!
Thanks for all. |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Sat Oct 22, 2005 3:57 am Post subject: |
|
|
| ...for desinformation ;)... |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Sun Oct 23, 2005 8:25 pm Post subject: |
|
|
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?
| Code: |
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 */
|
So I extract the twice I-Frame in this fonction.
Bye
Bixente |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Sun Oct 23, 2005 8:28 pm Post subject: |
|
|
Note: This version of SMS is just for me and poeple who want to work on skin integration.
Bye |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Sun Oct 23, 2005 9:02 pm Post subject: |
|
|
| ...I'll get back to you tomorrow, since I left the code which extracts I-Frame from AVI file at work. Maybe it would be great to make an utility on PC which can extract I-Frame from avi file (also with preview :))... |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Mon Oct 24, 2005 12:47 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Mon Oct 24, 2005 1:08 am Post subject: |
|
|
...this | Code: |
memcpy ( SMS_DSP_SPR_CONST, &g_DataBuffer[ SMS_IDCT_CONST_OFFSET ], SMS_IDCT_CONST_SIZE );
SMS_DSP_Init ();
|
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... |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Mon Oct 24, 2005 2:02 am Post subject: |
|
|
Thank you "BOSS".
That's why it doesn't work.
I've put this two lines at the top of GUI_Stub.c and now every think is OK.
I'm going to create some other skin with my own version of SMS cause the color of caracter in SMS flash a little bit to much with my skin.
I give you the file in next post.
Bye |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Mon Oct 24, 2005 2:29 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Mon Oct 24, 2005 3:34 am Post subject: |
|
|
Other Note:
I didn't modified any other file of SMS 1.4 rev5, just GUI_Stub.c
Bye
Bixente |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Mon Oct 24, 2005 5:53 pm Post subject: |
|
|
...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 |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Thu Oct 27, 2005 4:12 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Thu Oct 27, 2005 3:38 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Thu Oct 27, 2005 9:15 pm Post subject: |
|
|
@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. |
|
| Back to top |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Fri Oct 28, 2005 3:31 pm Post subject: |
|
|
| yeah that's why i left the idea of implementating it into ps2mp3... |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Mon Oct 31, 2005 2:56 am Post subject: |
|
|
...new revision is in SVN. README contains explanations.
Best regards
Eugene |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Mon Oct 31, 2005 4:15 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Mon Oct 31, 2005 4:35 am Post subject: |
|
|
| ...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... |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Mon Oct 31, 2005 4:56 am Post subject: |
|
|
No problem at all.
Thanks for all ( Yeah, I'm now in the README file ;) )
Bye |
|
| Back to top |
|
 |
dlanor
Joined: 28 Oct 2004 Posts: 269 Location: Stockholm, Sweden
|
Posted: Mon Oct 31, 2005 3:37 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Mon Oct 31, 2005 4:47 pm Post subject: |
|
|
| 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 |
could be good also a disable lan or use ps2link already installed lan. |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Mon Oct 31, 2005 5:21 pm Post subject: |
|
|
| @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). Anyway, thanks for the remark, I'll try to check that... |
|
| Back to top |
|
 |
dlanor
Joined: 28 Oct 2004 Posts: 269 Location: Stockholm, Sweden
|
Posted: Mon Oct 31, 2005 6:34 pm Post subject: |
|
|
| 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).
| 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).
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 |
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Mon Oct 31, 2005 7:04 pm Post subject: |
|
|
| ...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 :)... |
|
| Back to top |
|
 |
bix64
Joined: 17 Oct 2005 Posts: 38
|
Posted: Tue Nov 01, 2005 2:03 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|