PMP Mod V1.02 / small mods

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
csuper
Posts: 103
Joined: Tue Jan 03, 2006 6:19 pm

Post by csuper »

Change the fps ! => 24 or 25.
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

still good on 23fps....

hey any1 knows what settings jonny uses in his serenity trailer?
that trailer is so fluid and smooth, you wont see any pixel (pixelated) at all
its like pixel doesnt exists!
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Re: about sceIoDevctl()

Post by Raphael »

karnare wrote:I believe that the function sceIoDevctl() is much more than just getting the free space.You can try to remove it, and then you will find the .pmp which is writed to MS right now via USB cann`t be played any more.
It seems that about 30k bytes(maybe 32k, one cluster?) at the head of the file can be read. WHY?
That really shouldn't happen, because the sceIoDevctl() really only sends the command to the MS Device to return the free and total space in a buffer (malloc's original M4.02 also works and doesn't have the sceIoDevCtl function either). So it must be another reason why your upload to the MS will fail.
karnare
Posts: 17
Joined: Thu Feb 16, 2006 11:40 am

Re: about sceIoDevctl()

Post by karnare »

Raphael wrote:
That really shouldn't happen, because the sceIoDevctl() really only sends the command to the MS Device to return the free and total space in a buffer (malloc's original M4.02 also works and doesn't have the sceIoDevCtl function either). So it must be another reason why your upload to the MS will fail.
Have you tried it? I have tested it in three psp machines, and the fact is there. Sometimes it will be Ok,but after *formatting* the MS and try again, it would be passed any more.Even if I used the USB sample in SDK, the problem is the same.

And I guess when the program starts, it will save the FAT in its cache. So the new file could not be read correctly.Will it possible?

Or will there be differences between our machines?
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Sounds more like your MS is bricked. Test with another MS to check for that
happycoding
Posts: 31
Joined: Sun Jan 22, 2006 2:24 am

Re: about sceIoDevctl()

Post by happycoding »

malloc's original M4.02 also works and doesn't have the sceIoDevCtl function either
I can not find malloc's original M4.02, but http://www.alex-berl.de/download/PMPMOD ... na_src.zip has sceIoDevCtl.
The key problem is: When you *format* your MS by SONY PSP's format function, and click "start" to fresh .pmp file list. you may not play the new uploaded (thru USB from PC) .pmp files if you don't use sceIoDevCtl.

Yes, it is wondering why it works but after SONY PSP's format it fails. But the fact is it! And it costs me a lot of time to solve the strange problem...

I also tried to use Windows XP to format MS (FAT16 or FAT32), and the result is the same with SONY PSP format. My MS is "SONY Memory Stick Pro Duo High Speed 1GB MagicGate,MSX-M1GN", and PSP version is, of course, 1.5.

Any suggestion is welcome and appreciated!
jbruns
Posts: 3
Joined: Tue Feb 28, 2006 3:16 pm

Post by jbruns »

csuper wrote:Change the fps ! => 24 or 25.
WIll that mess up the video since the original xvid is 29fps?
csuper
Posts: 103
Joined: Tue Jan 03, 2006 6:19 pm

Post by csuper »

jbruns wrote:
csuper wrote:Change the fps ! => 24 or 25.
WIll that mess up the video since the original xvid is 29fps?
Nope if you use "mencoder"...
and with the front end call : AVI2PMP for example...

csuper.
jbruns
Posts: 3
Joined: Tue Feb 28, 2006 3:16 pm

Post by jbruns »

I tried with AVI2PMP. I found at the above settings with a change in fps to 25 or 23 the video became choppy. However at 26.5 it was smooth. I guess ill be sticking with 26.5fps then. Thanks!
AtaruZ
Posts: 14
Joined: Thu Mar 09, 2006 8:50 am
Location: Italy

A little mod to improve precision...

Post by AtaruZ »

Hello! This is my first POST here!
Tonight I've made a little modification to the pmpmod.c file in the PMPMOD_1_02_M4g3_argandona_src release in order to obtain a more precise file length in the GUI. It happens that, if a file has 23.97 fps, the length calculation is made with the integer part (23) resulting in an imprecise length shown in the GUI. I've also added the visualization (if it exists) of the resume position near the file size.
Here's a picture:

Image

Here's the diff file:

Code: Select all

--- pmpmod.c.original	2006-03-09 00:02:55.000000000 +0100
+++ pmpmod.c	2006-03-08 23:47:28.000000000 +0100
@@ -454,7 +454,7 @@ int exec_pu;
 
 void exitUSBdrivers(void)
 {
-   sceUsbDeactivate();
+   sceUsbDeactivate(0x1c8);
 
 // FIXME: last arg should be NULL (wrong prototype in pspsdk?)
    sceUsbStop("USBStor_Driver",0,0);
@@ -649,7 +649,10 @@ void main_loop()
 		int top_entry              = 0;
 		int maximum_number_of_rows = 14;
 		int starting_row           = 7;
-		unsigned int vwidth = 0, vheight = 0, vrate = 0, vframes = 0;		// Video Information
+		unsigned int vwidth = 0, vheight = 0, vframes = 0, vpos = 0; // Video Information
+		// AtaruZ POS mod: handle vrate as float for sharp length & POS calculation later
+		float vrate = 0; 
+		
 		scrollpos = 0;
 
 		#ifndef USE_SKIN
@@ -729,12 +732,29 @@ void main_loop()
 					vwidth = pmp_struc->width;
 					vheight = pmp_struc->height;
 					if (pmp_struc->scale)
-					  vrate = pmp_struc->rate / pmp_struc->scale;
+					  // AtaruZ POS mod: save the sharp fps rate for sharp length & POS calculation later
+					  vrate = (float)pmp_struc->rate / (float)pmp_struc->scale;
 					else
-					  vrate = pmp_struc->rate;
+					  // AtaruZ POS mod: save the sharp fps rate for sharp length & POS calculation later
+					  vrate = (float)pmp_struc->rate;
 					vframes = pmp_struc->number_of_frames;
+					
 				}
 				free_64(pmp_struc);
+				
+				// AtaruZ mod start: try to determine resume percentage
+				char resume_filename[1024];
+				
+				strcpy( resume_filename, sorted_files[selected_entry] );
+				strcpy( resume_filename + strlen(resume_filename), ".POS" );
+				
+				SceUID	fd;
+				if ((fd = sceIoOpen(resume_filename, PSP_O_RDONLY, 0777)))
+				{
+					sceIoRead( fd, &vpos, sizeof(int) );
+					sceIoClose( fd );
+				};
+				// AtaruZ mod end
 			}
 						
 
@@ -928,7 +948,14 @@ void main_loop()
 			// Display Video Information
 			if (vwidth && vheight && vrate && vframes) {
 				pspDebugScreenSetXY(2, starting_row + maximum_number_of_rows + 7);
-				pspDebugScreenPrintf("%ix%i %ifps, %i:%02i:%02i (%i%s)", vwidth, vheight, vrate, (vframes/vrate/3600),(vframes/vrate/60)%60, (vframes/vrate)%60, sel_size, sel_unit); 
+				// AtaruZ POS mod: let's calculate file lenght more precisely!
+				pspDebugScreenPrintf("%ix%i %ffps, %i:%02i:%02i (%i%s)", vwidth, vheight, vrate, (int)(vframes/vrate/3600), (int)(vframes/vrate/60)%60, (int)(vframes/vrate)%60, sel_size, sel_unit);
+				// AtaruZ POS mod begin
+				if (vpos != 0) {
+					// Calculate saved position precisely with the float vrate value and display it
+					pspDebugScreenPrintf(" POS: %i:%02i:%02i", (int)(vpos/vrate/3600),(int)(vpos/vrate/60)%60, (int)(vpos/vrate)%60);
+				}
+				// AtaruZ POS mod finish
 			}
 
 			// Display Playlist Information

Notice also the

Code: Select all

sceUsbDeactivate(0x1c8);
line as from latest pspsdk...

Hope this to be useful!

Best regards!

AtaruZ
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Nice, I'll add that to my current source tree, the POS information is a good idea :) However, I'd clip the float to 2 decimals, since 23.970000 looks rather weird than informative.
Hope to see more from you though ;)


BTW: Just to let you know on the current status of my work: I'm currently working on getting multilanguage support for the subtitle files (meaning languages based on ASCII charset work already), which really is much more problematic than I ever would have imagined (dough). But after looking over some source of VLC and MPC I finally have some idea of how to do it.
Before that I was stuck for nearly two weeks now on getting the font rendering done fast and correctly (some probably noticed my other thread on 4bit textures), yet it's still only 90% the way I wanted it to be (PSP GU is really picky).
And now I'm also running short on time, because I'm changing my subject on studies from mathematics to computer sciences and will have to move, so the next weeks will get stressy. I hope I can finish the subtitles before I run completely out of time (I will try my best), but if that happens I'll drop my unfinished work to malloc or someone other interested so he can finish it maybe.

Cheers,
Raphael
AtaruZ
Posts: 14
Joined: Thu Mar 09, 2006 8:50 am
Location: Italy

Post by AtaruZ »

Hi Raphael!
Take it easy, no need to rush.. Good things need time and patience!
I'm glad you like my little work on the GUI, I wish I was good enough to give you a hand with something thougher!
Here's the mod for the 2 decimals (easy!)

Code: Select all

--- pmpmod.c.20060309	2006-03-10 01:24:15.000000000 +0100
+++ pmpmod.c	2006-03-10 01:24:43.000000000 +0100
@@ -949,7 +949,7 @@ void main_loop()
 			if (vwidth && vheight && vrate && vframes) {
 				pspDebugScreenSetXY(2, starting_row + maximum_number_of_rows + 7);
 				// AtaruZ POS mod: let's calculate file lenght more precisely!
-				pspDebugScreenPrintf("%ix%i %ffps, %i:%02i:%02i (%i%s)", vwidth, vheight, vrate, (int)(vframes/vrate/3600), (int)(vframes/vrate/60)%60, (int)(vframes/vrate)%60, sel_size, sel_unit);
+				pspDebugScreenPrintf("%ix%i %.2ffps, %i:%02i:%02i (%i%s)", vwidth, vheight, vrate, (int)(vframes/vrate/3600), (int)(vframes/vrate/60)%60, (int)(vframes/vrate)%60, sel_size, sel_unit);
 				// AtaruZ POS mod begin
 				if (vpos != 0) {
 					// Calculate saved position precisely with the float vrate value and display it
Any chance to use a SVN or CVS server to share code?

Best regards!

AtaruZ
synch22
Posts: 3
Joined: Tue Mar 14, 2006 1:29 pm

Post by synch22 »

how do i install these mods to my pmp player?? I have downloaded the files and tried to use the folders but it did not update the player. Is there other stuff to do??
gmk
Posts: 6
Joined: Thu Jan 19, 2006 12:37 am

Post by gmk »

synch22 wrote:how do i install these mods to my pmp player?? I have downloaded the files and tried to use the folders but it did not update the player. Is there other stuff to do??
Hi synch22,

reveine give alllready the answer:
reveine wrote: You don't have to update anything. Just download the modified version of pmpmod here. http://www.alex-berl.de/download/PMPMOD ... andona.zip and put the two folders on PSP\GAME
AtaruZ
Posts: 14
Joined: Thu Mar 09, 2006 8:50 am
Location: Italy

PMPMOD_1_02_M4g3_argandona_AtaruZ_20060316

Post by AtaruZ »

synch22 wrote:how do i install these mods to my pmp player?? I have downloaded the files and tried to use the folders but it did not update the player. Is there other stuff to do??
If you mean to install my mod (POS & more precise length calc) you have to re-build PMP-MOD fter patching the source code.

Anyway, if Raphael agrees, I can post the modded version right here and make it available to the community...

Waiting for Raphael's reply!

*** UPDATE ***

OK, Raphael agrees! :)

Here's the compiled version in kxploit format (PMPMOD & PMPMOD%):

http://lnx.mangazone.org/psp/PMPMOD_1_0 ... 16.tar.bz2

The diff:

Code: Select all

--- pmpmod.c.original	2006-03-09 00:02:55.000000000 +0100
+++ pmpmod.c	2006-03-11 11:41:30.000000000 +0100
@@ -454,7 +454,7 @@ int exec_pu;
 
 void exitUSBdrivers(void)
 {
-   sceUsbDeactivate();
+   sceUsbDeactivate(0x1c8);
 
 // FIXME: last arg should be NULL (wrong prototype in pspsdk?)
    sceUsbStop("USBStor_Driver",0,0);
@@ -649,7 +649,10 @@ void main_loop()
 		int top_entry              = 0;
 		int maximum_number_of_rows = 14;
 		int starting_row           = 7;
-		unsigned int vwidth = 0, vheight = 0, vrate = 0, vframes = 0;		// Video Information
+		unsigned int vwidth = 0, vheight = 0, vframes = 0, vpos = 0; // Video Information
+		// AtaruZ POS mod: handle vrate as float for sharp length & POS calculation later
+		float vrate = 0; 
+		
 		scrollpos = 0;
 
 		#ifndef USE_SKIN
@@ -729,12 +732,29 @@ void main_loop()
 					vwidth = pmp_struc->width;
 					vheight = pmp_struc->height;
 					if (pmp_struc->scale)
-					  vrate = pmp_struc->rate / pmp_struc->scale;
+					  // AtaruZ POS mod: save the sharp fps rate for sharp length & POS calculation later
+					  vrate = (float)pmp_struc->rate / (float)pmp_struc->scale;
 					else
-					  vrate = pmp_struc->rate;
+					  // AtaruZ POS mod: save the sharp fps rate for sharp length & POS calculation later
+					  vrate = (float)pmp_struc->rate;
 					vframes = pmp_struc->number_of_frames;
+					
 				}
 				free_64(pmp_struc);
+				
+				// AtaruZ mod start: try to determine resume percentage
+				char resume_filename[1024];
+				
+				strcpy( resume_filename, sorted_files[selected_entry] );
+				strcpy( resume_filename + strlen(resume_filename), ".POS" );
+				
+				SceUID	fd;
+				if ((fd = sceIoOpen(resume_filename, PSP_O_RDONLY, 0777)))
+				{
+					sceIoRead( fd, &vpos, sizeof(int) );
+					sceIoClose( fd );
+				};
+				// AtaruZ mod end
 			}
 						
 
@@ -928,7 +948,14 @@ void main_loop()
 			// Display Video Information
 			if (vwidth && vheight && vrate && vframes) {
 				pspDebugScreenSetXY(2, starting_row + maximum_number_of_rows + 7);
-				pspDebugScreenPrintf("%ix%i %ifps, %i:%02i:%02i (%i%s)", vwidth, vheight, vrate, (vframes/vrate/3600),(vframes/vrate/60)%60, (vframes/vrate)%60, sel_size, sel_unit); 
+				// AtaruZ POS mod: let's calculate file lenght more precisely!
+				pspDebugScreenPrintf("%ix%i %.2ffps, %i:%02i:%02i (%i%s)", vwidth, vheight, vrate, (int)(vframes/vrate/3600), (int)(vframes/vrate/60)%60, (int)(vframes/vrate)%60, sel_size, sel_unit);
+				// AtaruZ POS mod begin
+				if (vpos != 0) {
+					// Calculate saved position precisely with the float vrate value and display it
+					pspDebugScreenPrintf(" POS: %i:%02i:%02i", (int)(vpos/vrate/3600),(int)(vpos/vrate/60)%60, (int)(vpos/vrate)%60);
+				}
+				// AtaruZ POS mod finish
 			}
 
 			// Display Playlist Information

For lazy boys, here's a direct link to the diff file:

http://lnx.mangazone.org/psp/AtaruZ_POS ... 60316.diff

Have fun!

AtaruZ
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

good work... im still looking forward for file deletion when you press the select button.. miemt11 already done this but he doesnt put a confirmation dialog.. and it sucks. I accidentaly deleted my 800mb movie on the spot! and it took me 18mins again to transfer (1.1USB)
AtaruZ
Posts: 14
Joined: Thu Mar 09, 2006 8:50 am
Location: Italy

Re: hello

Post by AtaruZ »

pegasus wrote:good work... im still looking forward for file deletion when you press the select button.. miemt11 already done this but he doesnt put a confirmation dialog.. and it sucks. I accidentaly deleted my 800mb movie on the spot! and it took me 18mins again to transfer (1.1USB)
Maybe this could be next AtaruZ's mod!
Stay tuned!

AtaruZ
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

ok i'm gonna wait for that tnx!
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

What's new in tha atarazu version?Just the decimal places?I think that so many zeros look ridiculus (no offence).I gues the best thing is to be no zeros at all.
So if movie is 24 or 25 show 24 or 25 and if it is 23.976 r 29.97 show 23.976 and 29.97.

I think the previous shows just 23 or 29.So y not get rid of the zeros?
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

just try it.. you got it wrong dude
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

Ok i will,but for the record what's added?
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

POS & more precise length calc.
the duration calc is made on the integer part so its imprecise, he now manage to correct it..
he also added the POS resume position after the fps (if it exist)

also the fps is set only to 2 decimals

ok try it now its good..
XD
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

I tried it,good job,thanx for the info pegasus.
AtaruZ
Posts: 14
Joined: Thu Mar 09, 2006 8:50 am
Location: Italy

Post by AtaruZ »

therock003 wrote:I tried it,good job,thanx for the info pegasus.
Thanks! ;)

AtaruZ
Eingang
Posts: 59
Joined: Wed Jan 04, 2006 7:33 am

Post by Eingang »

Malloc, could you pleeeeaaasse add luminosity and the other stuff on to new 2.00 ???
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

We should just wait until Raphael or sum1 incorporates it
Last edited by pegasus on Wed Apr 05, 2006 4:02 am, edited 1 time in total.
Wil
Posts: 15
Joined: Wed Feb 23, 2005 7:30 pm
Location: Las Vegas
Contact:

Post by Wil »

The guy above said he wishes for malloc to update the new PMP MOD Version 2.00 and include his updates which are 'lumonisity' and stuff -- not that he wants PMP Mod to work on Firmware 2.00.
Wil
pegasus
Posts: 61
Joined: Tue Jan 17, 2006 2:38 pm

hello

Post by pegasus »

yes i'm fully aware of that...
ok i'll rephrase my post

Eingang wants to merge jonny's 2.0 pmp and mod from PMPMOD_1_02_M4g3_argandona_AtaruZ_20060316
as this topic is all about modding jonny's work and not some firmware stuff

ok what do u say..
TestType
Posts: 23
Joined: Tue Dec 13, 2005 4:04 am
Location: Iceland

Post by TestType »

Malloc / Ralph, where art thou?
I'm also hoping an issue I saw introduced in the latest mod mod version resolved when you guys get around to releasing the v2.0 edition of it. Most of the time when I press start to get the OSD up the video jumps a frame(s) backwards (or forward, can't remember which) for a split second. Playback is not affected in any way but it is a rather jarring and spasmic looking effect. I have not seen anybody mention it but I find it hard to believe I'm the only one (unless my 1.0 firmware is to blame).

Thanks for all your efforts guys, really like your modded version of Jonny's mod :)
Last edited by TestType on Sun Apr 09, 2006 6:43 am, edited 1 time in total.
PSP: Japanese Firmware 1.0 :: 1gb SanDisk Memory Stick
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Hi guys,
sorry to let you wait so long, but I finally moved to my new appartement last weekend so I had little time for anything dev related, and last but not least, I still don't have internet there yet, because of the f***ing-lame-pink-T telephone company here in germany. This weekend I'm at my girlfriends house, so I was able to finally take a look here to write this and read my mails, so I didn't know of jonnys 2.0 up to now.
I'll download his version and take it home on USB stick on tuesday and start working on a merge and then try to upload everything from university if I find a possibility - that is unless someone else makes the merge until then AND if I manage to make myself comfortable with LINUX and ftp until then.

greets,
Raphael
Post Reply