Pommel, Tachyon, Baryon

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

Moderators: cheriff, TyRaNiD

Post Reply
Gh0st-UPMS
Posts: 23
Joined: Sun Feb 17, 2008 12:32 am

Pommel, Tachyon, Baryon

Post by Gh0st-UPMS »

What are the header files to use for Pommel, Tachyon and Baryon?
Or are they something only moonlight holds.

Thanks.
KickinAezz
Posts: 328
Joined: Sun Jun 03, 2007 10:05 pm

Post by KickinAezz »

Prx Documentation Project.
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
FaderX
Posts: 28
Joined: Sat Mar 01, 2008 12:38 pm

Post by FaderX »

KickinAezz is this em',

Code: Select all

int sceSysconGetTachyonWDTStatus();

int sceSysconGetPommelVersion();

int sceUpdaterGetBaryonVersion();
If so, how do ya use em'

like this??,

Code: Select all

int sceSysconGetTachyonWDTStatus(void);

int sceSysconGetPommelVersion(void);

int sceUpdaterGetBaryonVersion(void);

printf("Your Tachyon Number is: 0x%08X\n\n",sceSysconGetTachyonWDTStatus());
printf("Your Pommel Number is:  0x%08X\n\n",sceSysconGetPommelVersion());
printf("Your Baryon Number is:  0x%08X\n\n",sceUpdaterGetBaryonVersion());
lol
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

No and no ;)

You use them like this:

Code: Select all

u32 tachyon;
u32 baryon;
u32 pommel;
tachyon = sceSysregGetTachyonVersion();
sceSysconGetBaryonVersion(&baryon);
sceSysconGetPommelVersion(&pommel);
printf("Tachyon: 0x%08X\n", tachyon);
printf("Baryon: 0x%08X\n", baryon);
printf("Pommel: 0x%08X\n", pommel);
Note, the old function names were:
u32 sceSyscon_driver_7EC5A957(u32 *baryon); // get baryon
u32 sceSyscon_driver_E7E87741(u32 *pommel); // get pommel
u32 sceSysreg_driver_E2A5D1EE(void); // get tachyon

Tachyon is the overall version of the motherboard (TA-0XX) or the version of the CPU/ME
Baryon is the Syscon chip version number
Pommel is the GPIO/watchdog version number
Gh0st-UPMS
Posts: 23
Joined: Sun Feb 17, 2008 12:32 am

Post by Gh0st-UPMS »

k, I'm doing it exactly as you posted jas0nuk, I've located a syscon library from one of DA's releases, but can't find a library for sysreg

I comment the Tachyon code out the app builds fine but get the Library not found error when running.

I have also located some stub files for both.

Do you have any more pointers?

gh0st
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

Try this... I made it myself for PSPident.

http://rapidshare.com/files/96754529/libpspident.a.html

You can then use the following functions

u32 sceSyscon_driver_7EC5A957(u32 *baryon); // get baryon
u32 sceSyscon_driver_E7E87741(u32 *pommel); // get pommel
u32 sceSysreg_driver_E2A5D1EE(void); // get tachyon
Gh0st-UPMS
Posts: 23
Joined: Sun Feb 17, 2008 12:32 am

Post by Gh0st-UPMS »

jas0nuk wrote:Try this... I made it myself for PSPident.

http://rapidshare.com/files/96754529/libpspident.a.html

You can then use the following functions

u32 sceSyscon_driver_7EC5A957(u32 *baryon); // get baryon
u32 sceSyscon_driver_E7E87741(u32 *pommel); // get pommel
u32 sceSysreg_driver_E2A5D1EE(void); // get tachyon

Thanks jas0nuk, I can now get Tachyon to show the correct value, but when I include both pommel and baryon, it don't show the correct value and then the psp shuts down.

I'm loading a kernel prx to retrieve the values.

Do you still use these functions like this.

Code: Select all

	u32 tachyon;
	u32 pommel;
	u32 baryon;
	
	tachyon = sceSysreg_driver_E2A5D1EE();
	sceSyscon_driver_E7E87741(&pommel);
	//sceSyscon_driver_7EC5A957(&baryon);
	
	printf("Tachyon: 0x%08X\n", tachyon);	
	printf("Pommel: 0x%08X\n", pommel);
	//printf("       Baryon: 0x%08X\n\n", baryon);
I have tried to get the pommel & baryon to work as it should but not to sure on the function usage.
Thanks
User avatar
PSPfreak!
Posts: 34
Joined: Wed Nov 14, 2007 10:57 pm

Post by PSPfreak! »

Does this work on the 1.50 Kernel, its loads but the pommel etc doesnt work, only the sceKernelDevkitVersion does.

Code: Select all

    int sceKernelDevkitVersion(void);

    u32 pommel;
    u32 baryon;
    u32 tachyon;
   
    u32 sceSyscon_driver_7EC5A957(u32 *baryon); // get baryon
    u32 sceSyscon_driver_E7E87741(u32 *pommel); // get pommel
    u32 sceSysreg_driver_E2A5D1EE(void); // get tachyon

    printf("devkit Version: 0x%08X\n",sceKernelDevkitVersion());
    printf("Tachyon: 0x%08X\n",tachyon);
    printf("Baryon:  0x%08X\n",baryon);
    printf("Pommel:  0x%08X\n\n\n",pommel);
Did i do it wrong....again? lolol sorry
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

Gh0st-UPMS: that is the correct way to do it, at least my code is basically doing this. As to why it's crashing, I've no idea. :/

PSPfreak!: The functions aren't being called therefore the values aren't being set.

Code: Select all

    u32 sceSyscon_driver_7EC5A957(u32 *baryon); // get baryon 
    u32 sceSyscon_driver_E7E87741(u32 *pommel); // get pommel 
    u32 sceSysreg_driver_E2A5D1EE(void); // get tachyon 
are just function prototypes.

You need to do...

Code: Select all

   tachyon = sceSysreg_driver_E2A5D1EE(); 
   sceSyscon_driver_E7E87741(&pommel); 
   sceSyscon_driver_7EC5A957(&baryon); 
like Gh0st-UPMS, too.
Gh0st-UPMS
Posts: 23
Joined: Sun Feb 17, 2008 12:32 am

Post by Gh0st-UPMS »

I'm not sure why it crashes either, going to look into it more when I get home from work, hopefully will get more time to study it. I'll post my results.

Thanks

Edit:

k, got home from work and took a look at the code, deleted it all and redone it, and guess what, it all worked, here is the code that I used.

Code: Select all

u32 sceSysreg_driver_E2A5D1EE(void);
u32 sceSyscon_driver_E7E87741(u32 *pommel);
u32 sceSyscon_driver_7EC5A957(u32 *baryon);

Code: Select all

u32 tachyon;
u32 pommel;
u32 baryon;
	
tachyon = sceSysreg_driver_E2A5D1EE();
sceSyscon_driver_E7E87741(&pommel);
sceSyscon_driver_7EC5A957(&baryon);

Code: Select all

printf("Tachyon: 0x%08X", tachyon);
printf("Pommel: 0x%08X", pommel);
printf("Baryon: 0x%08X", baryon);
Thanks for the help and the lib file jas0nuk, appreciated.

gh0st
User avatar
PSPfreak!
Posts: 34
Joined: Wed Nov 14, 2007 10:57 pm

Post by PSPfreak! »

mine now is crashing, even after i started again!. but, i think i figured out my problem, It may be because im getting them in the wrong place, i've tried them everywhere, just exept the correct place.

This is main() {, (commented the stuff out, it works, got more stuff in it though)

Code: Select all

  /*int tachyon;
    int pommel;
    int baryon;
   
    tachyon = sceSysreg_driver_E2A5D1EE();
    sceSyscon_driver_E7E87741(&pommel);
    sceSyscon_driver_7EC5A957(&baryon); */
    
    printf("devKit Version: 0x%08X\n", sceKernelDevkitVersion());
  /*printf("Tachyon: 0x%08X\n", tachyon);
    printf("Baryon:  0x%08X\n", baryon);
    printf("Pommel:  0x%08X\n\n\n", pommel);*/
before main() {, (still commented out)

Code: Select all

  int sceKernelDevkitVersion(void);

/*u32 sceSysreg_driver_E2A5D1EE(void);
  u32 sceSyscon_driver_E7E87741(u32 *pommel);
  u32 sceSyscon_driver_7EC5A957(u32 *baryon);*/
Without the commented out parts, it crashes....did i put em' in the wrong place??
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Are these kernel-level functions? If so, you either need to compile as kernel-mode 1.50-based homebrew, or move them into an external kernel-level prx for 3.xx user-level homebrew.

I can't see these functions as user-level... users don't need to know the version of the hardware.
User avatar
PSPfreak!
Posts: 34
Joined: Wed Nov 14, 2007 10:57 pm

Post by PSPfreak! »

J.F. wrote:Are these kernel-level functions? If so, you either need to compile as kernel-mode 1.50-based homebrew, or move them into an external kernel-level prx for 3.xx user-level homebrew.

I can't see these functions as user-level... users don't need to know the version of the hardware.
Thanks for the response J.F. and i am using the 1.50 Kernel, it still crashes.

lol i basically always base my apps on 1.50
Gh0st-UPMS
Posts: 23
Joined: Sun Feb 17, 2008 12:32 am

Post by Gh0st-UPMS »

PSPfreak! wrote:
J.F. wrote:Are these kernel-level functions? If so, you either need to compile as kernel-mode 1.50-based homebrew, or move them into an external kernel-level prx for 3.xx user-level homebrew.

I can't see these functions as user-level... users don't need to know the version of the hardware.
Thanks for the response J.F. and i am using the 1.50 Kernel, it still crashes.

lol i basically always base my apps on 1.50
@PSPfreak!
Do you have the library file jas0nuk posted.
User avatar
PSPfreak!
Posts: 34
Joined: Wed Nov 14, 2007 10:57 pm

Post by PSPfreak! »

Gh0st-UPMS wrote: @PSPfreak!
Do you have the library file jas0nuk posted.
Yea i have,

Code: Select all

LIBS = -lpspgu -lpng -lz -lm -lpspumd -lpspusb -lpspusbstor -lpspctrl libpspident.A
i might try and put it first and see what happens aye??

p.s. i dont really need all of those libs, so ill remove some crap i dont need
mirzab14
Posts: 8
Joined: Mon Jan 21, 2008 5:37 pm

Post by mirzab14 »

Like J.F. said, the app needs to run in kernel mode.

I have successfully compiled it and it runs on 1.50.
---------------------
Main.c:

Code: Select all

/*
What:     Pommel, Tachyon and Baryon viewer
Thanks to:    jas0nuk for libpspident.a
*/

#include <pspkernel.h>
#include <pspdebug.h>

PSP_MODULE_INFO&#40;"tpb", 0x1000, 1, 0&#41;;  //RUN IT IN KERNEL MODE
PSP_MAIN_THREAD_ATTR&#40;0&#41;;

#define printf pspDebugScreenPrintf

/* Exit callback */
int exit_callback&#40;int arg1, int arg2, void *common&#41; &#123;
          sceKernelExitGame&#40;&#41;;
          return 0;
&#125;

/* Callback thread */
int CallbackThread&#40;SceSize args, void *argp&#41; &#123;
          int cbid;

          cbid = sceKernelCreateCallback&#40;"Exit Callback", exit_callback, NULL&#41;;
          sceKernelRegisterExitCallback&#40;cbid&#41;;

          sceKernelSleepThreadCB&#40;&#41;;

          return 0;
&#125;

/* Sets up the callback thread and returns its thread id */
int SetupCallbacks&#40;void&#41; &#123;
          int thid = 0;

          thid = sceKernelCreateThread&#40;"update_thread", CallbackThread, 0x11, 0xFA0, 0, 0&#41;;
          if&#40;thid >= 0&#41; &#123;
                    sceKernelStartThread&#40;thid, 0, 0&#41;;
          &#125;

          return thid;
&#125;

int main&#40;&#41; &#123;
pspDebugScreenInit&#40;&#41;;
SetupCallbacks&#40;&#41;;

u32 sceSysreg_driver_E2A5D1EE&#40;void&#41;;
u32 sceSyscon_driver_E7E87741&#40;u32 *pommel&#41;;
u32 sceSyscon_driver_7EC5A957&#40;u32 *baryon&#41;;

u32 tachyon;
u32 pommel;
u32 baryon;
   
tachyon = sceSysreg_driver_E2A5D1EE&#40;&#41;;
sceSyscon_driver_E7E87741&#40;&pommel&#41;;
sceSyscon_driver_7EC5A957&#40;&baryon&#41;;

printf&#40;"Tachyon&#58; 0x%08X\n", tachyon&#41;;
printf&#40;"Pommel&#58; 0x%08X\n", pommel&#41;;
printf&#40;"Baryon&#58; 0x%08X\n", baryon&#41;;
sceKernelSleepThread&#40;&#41;;
return 0;
&#125;

Makefile:

Code: Select all

TARGET = hello
OBJS = main.o
 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;
 
LIBS = libpspident.A
 
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = TBP
 
PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak
User avatar
PSPfreak!
Posts: 34
Joined: Wed Nov 14, 2007 10:57 pm

Post by PSPfreak! »

WOOOOOHHHOOO,

got it to work, figured out that i forgot to add the SetupCallbacks(); & since i remade it again, i forgot to do it in Kernel, did another mode,

soz all.

AND!! Thanks to jas0nuk 4 the libpspident.A & mirzab14 for the help, also Gh0st-UPMS for starting the thread lol

thanks all
FaderX
Posts: 28
Joined: Sat Mar 01, 2008 12:38 pm

Post by FaderX »

so how do we specify which PSP model we have, like this??

Code: Select all

if &#40;tachyon = 0x00200000|baryon = 0x00040600&#41;
    &#123;
                printf&#40;"Motherboard = TA-079 v3\n"&#41;;
                
    &#125;
i really dont know how to get the standard mobo, if you know...please tell me...pleasseeee

the above code was just a random guess btw
mirzab14
Posts: 8
Joined: Mon Jan 21, 2008 5:37 pm

Post by mirzab14 »

You would probably have to find tachyon and baryon of each mobo, I dont know how though.

I know jas0nuk knows how to do this since his application PSPident can detect which motherboard the PSP has.
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

Tachyon = 0x00140000, Baryon = 0x00030600 TA-079 v1 1g
Tachyon = 0x00200000, Baryon = 0x00030600 TA-079 v2 1g
Tachyon = 0x00200000, Baryon = 0x00040600 TA-079 v3 1g
Tachyon = 0x00300000, Baryon = 0x00040600 TA-081 1g
Tachyon = 0x00400000, Baryon = 0x00114000 TA-082 1g
Tachyon = 0x00400000, Baryon = 0x00121000 TA-086 1g
Tachyon = 0x00500000, Baryon = 0x0022B200 TA-085 2g
Tachyon = 0x00500000, Baryon = 0x00234000 TA-085 2g
mirzab14
Posts: 8
Joined: Mon Jan 21, 2008 5:37 pm

Post by mirzab14 »

Thanks jas0nuk!

@FaderX-

It would be like this:

Code: Select all

if &#40;&#40;tachyon == 0x00140000 && baryon == 0x00030600&#41;&#41;
    &#123;
                printf&#40;"Motherboard = TA-079 v1 1g\n"&#41;;
               
    &#125;
FaderX
Posts: 28
Joined: Sat Mar 01, 2008 12:38 pm

Post by FaderX »

mirzab14 wrote:Thanks jas0nuk!

@FaderX-

It would be like this:

Code: Select all

if &#40;&#40;tachyon == 0x00140000 && baryon == 0x00030600&#41;&#41;
    &#123;
                printf&#40;"Motherboard = TA-079 v1 1g\n"&#41;;
               
    &#125;
Ok, Thanks bro
Post Reply