Fonction Source Code

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

Moderators: cheriff, TyRaNiD

Post Reply
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Fonction Source Code

Post by vcarriere »

First, i have to say that i'm new to psp programming (but not new to programming) and i was looking at the irda source code. I saw pspDebugScreenInit() and i looked at the pspdebug.h header file. I was wondering if the source of this fonction can be found as source or is it already pre-compiled? I'm just curious and i want to see what functions does because usually i had the .c file with the header file.

Thanks
Vincent
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

Anyone? i'm only trying to understand here...
deagle
Posts: 8
Joined: Wed Jun 29, 2005 5:12 am

Post by deagle »

look into the scr_printf.c file, just near the pspdebug.h file
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

I did a search in the whole cygwin folder and didn't find any scr_printf.c file nor any .c file at all (except in Sample).

Vincent
sexdwarf
Posts: 34
Joined: Thu Jul 14, 2005 12:07 am

Post by sexdwarf »

/usr/local/pspdev/psp/sdk/include/pspdebug.h
...isn't it nice, sugar and spice...
...luring disco dollies to a life of vice...
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

just found out that i didn't have the sources... so they must be already compiled... in linux, what's the equivalent of a dll with pre-compiled code?
sexdwarf
Posts: 34
Joined: Thu Jul 14, 2005 12:07 am

Post by sexdwarf »

yes, a dll type shard library is known as a shared object, extension .so

you could just grab the sources via svn,

Code: Select all

svn co svn://svn.pspdev.org/psp/pspsdk
...isn't it nice, sugar and spice...
...luring disco dollies to a life of vice...
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

Thx. So if i don't have the sources, where is the pre compiled code the compiler gets his fuctions from? I son't see any .so or .c files....

sorry if this is a noob question.
deagle
Posts: 8
Joined: Wed Jun 29, 2005 5:12 am

Post by deagle »

scr_printf.c :

Code: Select all

void pspDebugScreenInit()
{
   X = Y = 0;
   /* Place vram in uncached memory */
   g_vram_base = (void *) (0x40000000 | sceGeEdramGetAddr());
   sceDisplaySetMode(0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
   sceDisplaySetFrameBuf((void *) g_vram_base, PSP_LINE_SIZE, PSP_PIXEL_FORMAT, 1);
   clear_screen(bg_col);
   init = 1;
}
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

Yeah, i finally found them by downloading the sources from the server.

Now what i can't find anywhere is the sceDisplay* Functions source code....

I might be asking too many questions, but i've been working with uC and windows programming and usually i'm very close to the hardware i program for and i know anything i need to know.

Sorry.
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

Is it possible that those are found in .s files wich are in Assembly language?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

vcarriere wrote:Now what i can't find anywhere is the sceDisplay* Functions source code....

The sce*-functions are provided by the Sony PSP kernel firmware. If you have the source code of it, let me know ;-)
vcarriere
Posts: 11
Joined: Tue Apr 12, 2005 1:16 am

Post by vcarriere »

so basically, the sce functions are in the firmware and you send data at this address with the required parameters or you put the values in a accumulator and call the function...
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

vcarriere wrote:so basically, the sce functions are in the firmware and you send data at this address with the required parameters or you put the values in a accumulator and call the function...
basically, if you want source code of sceDisplay* functions so badly, you MUST need to sign a NDA* with SONY and buy a very expensive licence.

"Suffisamment clair, non ?"*




*: Non Disclosure Agreement
*: [it's] clear enough, isn't it ?
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

can disassmble to get the source of a firmware function
use psplinks memory dump to help you best
10011011 00101010 11010111 10001001 10111010
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

First, why would you need the source of those functions? the sceDisplay* functions aren't that interesting anyway.... They just interface with the LCD controller, sceLcdc..............
The only use of their disassembly would only be, in my opinion, to execute code on the Me, since you can't call sce* functions directly...
Post Reply