forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pommel, Tachyon, Baryon

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Sun Mar 02, 2008 8:03 am    Post subject: Pommel, Tachyon, Baryon Reply with quote

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

Thanks.
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Sun Mar 02, 2008 11:32 am    Post subject: Reply with quote

Prx Documentation Project.
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
FaderX



Joined: 01 Mar 2008
Posts: 28

PostPosted: Sun Mar 02, 2008 7:24 pm    Post subject: Reply with quote

KickinAezz is this em',

Code:
int sceSysconGetTachyonWDTStatus();

int sceSysconGetPommelVersion();

int sceUpdaterGetBaryonVersion();


If so, how do ya use em'

like this??,

Code:
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
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Sun Mar 02, 2008 10:12 pm    Post subject: Reply with quote

No and no ;)

You use them like this:

Code:
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
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Mon Mar 03, 2008 1:09 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Mar 04, 2008 2:13 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Wed Mar 05, 2008 1:40 am    Post subject: Reply with quote

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:

   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
Back to top
View user's profile Send private message
PSPfreak!



Joined: 14 Nov 2007
Posts: 34

PostPosted: Wed Mar 05, 2008 5:56 pm    Post subject: Reply with quote

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

Code:

    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
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Thu Mar 06, 2008 3:51 am    Post subject: Reply with quote

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:
    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:
   tachyon = sceSysreg_driver_E2A5D1EE();
   sceSyscon_driver_E7E87741(&pommel);
   sceSyscon_driver_7EC5A957(&baryon);
like Gh0st-UPMS, too.
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Thu Mar 06, 2008 9:29 am    Post subject: Reply with quote

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:

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

Code:

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

Code:

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
Back to top
View user's profile Send private message
PSPfreak!



Joined: 14 Nov 2007
Posts: 34

PostPosted: Thu Mar 06, 2008 6:13 pm    Post subject: Reply with quote

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:

  /*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:

  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??
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Mar 07, 2008 1:34 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
PSPfreak!



Joined: 14 Nov 2007
Posts: 34

PostPosted: Fri Mar 07, 2008 6:44 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Fri Mar 07, 2008 7:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
PSPfreak!



Joined: 14 Nov 2007
Posts: 34

PostPosted: Fri Mar 07, 2008 3:57 pm    Post subject: Reply with quote

Gh0st-UPMS wrote:

@PSPfreak!
Do you have the library file jas0nuk posted.


Yea i have,

Code:
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
Back to top
View user's profile Send private message
mirzab14



Joined: 21 Jan 2008
Posts: 8

PostPosted: Fri Mar 07, 2008 5:39 pm    Post subject: Reply with quote

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:

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

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

PSP_MODULE_INFO("tpb", 0x1000, 1, 0);  //RUN IT IN KERNEL MODE
PSP_MAIN_THREAD_ATTR(0);

#define printf pspDebugScreenPrintf

/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
          sceKernelExitGame();
          return 0;
}

/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
          int cbid;

          cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
          sceKernelRegisterExitCallback(cbid);

          sceKernelSleepThreadCB();

          return 0;
}

/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
          int thid = 0;

          thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
          if(thid >= 0) {
                    sceKernelStartThread(thid, 0, 0);
          }

          return thid;
}

int main() {
pspDebugScreenInit();
SetupCallbacks();

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

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", baryon);
sceKernelSleepThread();
return 0;
}



Makefile:

Code:

TARGET = hello
OBJS = main.o
 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
 
LIBS = libpspident.A
 
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = TBP
 
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Back to top
View user's profile Send private message
PSPfreak!



Joined: 14 Nov 2007
Posts: 34

PostPosted: Fri Mar 07, 2008 8:41 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
FaderX



Joined: 01 Mar 2008
Posts: 28

PostPosted: Sun Mar 09, 2008 10:27 am    Post subject: Reply with quote

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

Code:

if (tachyon = 0x00200000|baryon = 0x00040600)
    {
                printf("Motherboard = TA-079 v3\n");
               
    }


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
Back to top
View user's profile Send private message
mirzab14



Joined: 21 Jan 2008
Posts: 8

PostPosted: Mon Mar 10, 2008 4:23 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Mar 11, 2008 1:22 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mirzab14



Joined: 21 Jan 2008
Posts: 8

PostPosted: Tue Mar 11, 2008 3:09 pm    Post subject: Reply with quote

Thanks jas0nuk!

@FaderX-

It would be like this:

Code:
if ((tachyon == 0x00140000 && baryon == 0x00030600))
    {
                printf("Motherboard = TA-079 v1 1g\n");
               
    }
Back to top
View user's profile Send private message
FaderX



Joined: 01 Mar 2008
Posts: 28

PostPosted: Tue Mar 11, 2008 4:22 pm    Post subject: Reply with quote

mirzab14 wrote:
Thanks jas0nuk!

@FaderX-

It would be like this:

Code:
if ((tachyon == 0x00140000 && baryon == 0x00030600))
    {
                printf("Motherboard = TA-079 v1 1g\n");
               
    }


Ok, Thanks bro
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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