QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Time Program

This is a discussion on Time Program within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I compiled a program for the PSP from the example here and when I run on my PSP all that ...

Reply
 
LinkBack Thread Tools
Old 08-04-2005, 10:30 AM   #1
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default Time Program

I compiled a program for the PSP from the example here and when I run on my PSP all that is displayed is a blank black screen. I was wondering if anyone could help me make the program run correctly. If it helps, I compiled the program using the envioronment from Yeldarb's tutorials. I have little knowledge in C and C++ so I could not determine why it would not work. I attached the source code I used. Thanks!

Code:
 // Time - Displays the date and time

/*
          This program was created by Josh Valdez using a GNU C libarary
          example.
*/

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

 #define SIZE 256
 
  PSP_MODULE_INFO("Hello World", 0, 1, 1);
  
   #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(void) {
     
      pspDebugScreenInit();
      SetupCallbacks();

  	char buffer[SIZE];
 	time_t curtime;
 	struct tm *loctime;

  	/* Get the current time. */
  	curtime = time (NULL);

  	/* Convert it to local time representation. */
  	loctime = localtime (&curtime);

  	/* Print out the date and time in the standard format. */
  	fputs (asctime (loctime), stdout);

  	/* Print it out in a nice format. */
  	strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
  	fputs (buffer, stdout);
  	strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime);
  	fputs (buffer, stdout);
       
      sceKernelSleepThread();
       
      return 0;
        
    }
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 10:51 AM   #2
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

That generally means you have a buffer overflow, try increasing the size of your buffer.
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 03:01 PM   #3
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

If what you meant by increasing the buffer was to make SIZE bigger than it did not help. I tried 512, 1024, 2048, and 4096 in place of 256 but it still displayed a blank screen. Any other suggestions? :wall:

Oh, and by the way great tutorials!
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 08:57 PM   #4
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

What's fputs there for? You don't use that to print out on a PSP Use printf instead.
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 10:04 PM   #5

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Ok i fixed your script so it heres the code and i made the eboot that is in the link.
http://uploadhut.com/success.php?id=243109


// Time - Displays the date and time

/*
This program was created by Josh Valdez using a GNU C libarary
example.
*/

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

#define SIZE 256

PSP_MODULE_INFO("Hello World", 0, 1, 1);

#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);
sceKernelRegisterExitCall back(cbid);

sceKernelSleepThreadCB();

return 0;
}

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

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

return thid;
}

int main(void) {

pspDebugScreenInit();
SetupCallbacks();

char buffer[SIZE];
time_t curtime;
struct tm *loctime;

/* Get the current time. */
curtime = time (NULL);

/* Convert it to local time representation. */
loctime = localtime (&curtime);

/* Print out the date and time in the standard format. */
printf (asctime (loctime), stdout);

/* Print it out in a nice format. */
strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
printf (buffer, stdout);
strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime);
printf (buffer, stdout);

sceKernelSleepThread();

return 0;

}

But theres one problem. It stays on the exact time and doesnt update..so you might wanna fix that
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 10:35 AM   #6
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Oh man, I'm disappointed.
I came rushing in here thinking someone made a time machine.
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 10:55 AM   #7
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

Here's a version that will update the time. (Untested)
Code:
// Time - Displays the date and time
/*
          This program was created by Josh Valdez using a GNU C libarary
          example.
          
          Editted by Yeldarb
*/

#include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>
#include <time.h>
 
PSP_MODULE_INFO("Hello World", 0, 1, 1);

#define printf pspDebugScreenPrintf
#define SIZE 256
   
/* 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(void) { 
    pspDebugScreenInit();
	SetupCallbacks();

	char buffer[SIZE];
	time_t curtime, oldtime;
	struct tm *loctime;
    
    while(1) {
        do {
            /* Get the current time. */
             curtime = time (NULL);
        } while(curtime == oldtime);
        
        oldtime = curtime;

        /* Convert it to local time representation. */
        loctime = localtime (&curtime);

        /* Print out the date and time in the standard format. */
        printf (asctime (loctime), stdout);

        /* Print it out in a nice format. */
        strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
        printf (buffer, stdout);
        strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime);
        printf (buffer, stdout);
    }
       
    sceKernelSleepThread();
       
    return 0;        
}
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 11:20 AM   #8

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Quote:
Originally Posted by Yeldarb
Here's a version that will update the time. (Untested)
Code:
// Time - Displays the date and time
/*
          This program was created by Josh Valdez using a GNU C libarary
          example.
          
          Editted by Yeldarb
*/

#include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>
#include <time.h>
 
PSP_MODULE_INFO("Hello World", 0, 1, 1);

#define printf pspDebugScreenPrintf
#define SIZE 256
   
/* 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(void) { 
    pspDebugScreenInit();
	SetupCallbacks();

	char buffer[SIZE];
	time_t curtime, oldtime;
	struct tm *loctime;
    
    while(1) {
        do {
            /* Get the current time. */
             curtime = time (NULL);
        } while(curtime == oldtime);
        
        oldtime = curtime;

        /* Convert it to local time representation. */
        loctime = localtime (&curtime);

        /* Print out the date and time in the standard format. */
        printf (asctime (loctime), stdout);

        /* Print it out in a nice format. */
        strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
        printf (buffer, stdout);
        strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime);
        printf (buffer, stdout);
    }
       
    sceKernelSleepThread();
       
    return 0;        
}

Got some errors with that code.
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 11:23 AM   #9
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

That's not an error, it's a warning
Test the eboot it gives you; it should still work.
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 11:43 AM   #10

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Alright it works now but... its one giant list like it updates by the second going:
Today is...

Today is...

Today is...

It gets pretty hard to read.
Oh and the home button doesnt work cuz it freezes on please wait...
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 11:48 AM   #11
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

I just did the updating code for him, he'll have to write the code to exit the game loop and call a simple screen clear if he wants it in the same spot :P
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 02:26 PM   #12
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

Thanks guys, its nice to know there are people in these forums so eager to help. I'm going to edit the code to refresh itself without all the things printed on screen. Thanks again!
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 02:34 PM   #13

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

no problem even tho Yeldarb did most of the work i just did some coding and compiled stuff.
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 04:18 PM   #14
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

I altered the code to update the time, but when I run the app on the PSP it adds a day to the current date and changes the hour. This also happens with Yeldarb's edited code. Here's the code I used.
Code:
 // Time - Displays the date and time
/*
          This program was created by Josh Valdez using a GNU C libarary
          example.
          
          Editted by Yeldarb
*/

#include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>
#include <time.h>
 
PSP_MODULE_INFO("Hello World", 0, 1, 1);

#define printf pspDebugScreenPrintf
#define clrscr pspDebugScreenClear
#define SIZE 256
   
/* 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(void) { 
    pspDebugScreenInit();
	SetupCallbacks();

	char buffer[SIZE];
	time_t curtime, oldtime;
	struct tm *loctime;
    
    while(1) {
        do {
            /* Get the current time. */
             curtime = time (NULL);
        } while(curtime == oldtime);
        
        oldtime = curtime;

	clrscr();

        /* Convert it to local time representation. */
        loctime = localtime (&curtime);

        /* Print out the date and time in the standard format. */
        printf (asctime (loctime), stdout);

        /* Print it out in a nice format. */
        strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
        printf (buffer, stdout);
        strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime);
        printf (buffer, stdout);
    }
       
    sceKernelSleepThread();
       
    return 0;        
}
I just added a clrscr function into Yeldarb's edited code. Do either of you have an idea of why it displays the wrong time?
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 04:44 PM   #15
 
makarman's Avatar
 
Join Date: Jun 2005
Location: Candy Land
Posts: 1,582
Trader Feedback: 0
Default

Quote:
Originally Posted by MagicianFB
Oh man, I'm disappointed.
I came rushing in here thinking someone made a time machine.
LOL!!!!!!!!

Oh, and by the way... your sig is... uhmm... disturbing.

Lol, j/k, it's quite funny. Who said that?
__________________
[CENTER]
[url=http://www.indepthhacks.info/forums/index.php?][COLOR=DarkSlateGray][SIZE="3"][b]The Banned Club[/SIZE][/COLOR][/url] - join or die[/b]
[url=http://www.blingo.com/friends?ref=3DxJIw6buw61_I3ZGGrrYqoaNz0][COLOR=DarkSlateGray][SIZE="3"][b]Blingo[/SIZE][/COLOR][/url] - win stuff while searching Google[/b]
[/CENTER]
makarman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 04:46 PM   #16
 

 
Join Date: Jul 2005
Posts: 494
Trader Feedback: 0
Default

Quote:
Originally Posted by makarman
LOL!!!!!!!!

Oh, and by the way... your sig is... uhmm... disturbing.

Lol, j/k, it's quite funny. Who said that?
man makarman it is so hard to take you seriuosly you should really change your avatar
__________________
[CENTER]
[url=http://gearsofwar.xbox360.gamebattles.com/stats/10774][img]http://gearsofwar.xbox360.gamebattles.com/card/10774|basic[/img][/url][/center]F*** Pillowpants! Honk if you love or like ****y![/center]
wallaby is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 04:58 PM   #17

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Come on stay on topic. You shouldn't be posting here unless you are going to be talking about developing the app,helping him, or congratulating him. The spam in the DEVELOPMENT section is getting very annoying. Its starting to become like a general psp chat and speculation(all the topics about" Could someome make me a program for the psp").

Anyways ExxonValdeez Im going to compile your code and see what your talking bout then i try to find whats wrong in the code
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 05:19 PM   #18

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

is yours showing in the 1 am area? because if it is i know what has to be done. If it is we either need to start it out on a certain time so it will match the psp's or find out to use the psp clock because its not right now. It also seems that the date goes up because its using seconds instead.
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 06:42 PM   #19
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

It is showing about 2:32 AM at 8:32 PM Central Standard Time. Also it is showing Saturday August 6 on Friday August 5. Any ideas? :wall:

I posted the eboot and source code files here.
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 07:14 PM   #20

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Quote:
Originally Posted by ExxonValdeez
It is showing about 2:32 AM at 8:32 PM Central Standard Time. Also it is showing Saturday August 6 on Friday August 5. Any ideas? :wall:

I posted the eboot and source code files here.
okay im getting about the samething i already have the eboot on my psp from when i compiled it. Im going to look into finding how to make it match the psp os clock.
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2005, 10:48 PM   #21
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

It's showing GMT guys; (I think) all of the date functions do

You need to set the time zone. You can either hard code it to subtract hours, or I think I saw something about a localtime function on the PSP; run a search on PS2dev forums.
__________________
[url=http://www.barbdwyer.com/footer.php][img]http://www.barbdwyer.com/8Ball.jpg[/img][/url]
[FONT=Verdana][SIZE=1]
[b]PSP Developer Resource Site:[/b] [url=http://www.psp-programming.com]PSP-Programming.com[/url]

[b]Other:[/b] [url=http://wake-boarding.org]Wakeboarding[/url], [url=http://water-skiing.org]Waterskiing[/url], [url=http://wake-surfing.org]Wake Surfing[/url], [url=http://www.guitarhero-4.com]Guitar Hero IV[/url][/SIZE][/FONT]
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2005, 11:25 AM   #22
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

You are right Yeldarb, it is using the GMT time. I put %Z into the code to display what the timezone was and sure enough it was GMT. Now to figure out how to change that to the correct timezone. Here is the updated code:
Code:
// Time - Displays the date and time
/*
          This program was created by Josh Valdez using a GNU C libarary
          example.
          
          Editted by Yeldarb and Twenty 2
	  
	  Updated 8/6/2005 1:22PM CST: Added %Z to display timezone.
	
	  
*/

#include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>
#include <time.h>
 
PSP_MODULE_INFO("Hello World", 0, 1, 1);

#define printf pspDebugScreenPrintf
#define clrscr pspDebugScreenClear
#define SIZE 256
   
/* 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(void) { 
    pspDebugScreenInit();
	SetupCallbacks();

	char buffer[SIZE];
	time_t curtime, oldtime;
	struct tm *loctime;
    
    while(1) {
        do {
            /* Get the current time. */
             curtime = time (NULL);
        } while(curtime == oldtime);
        
        oldtime = curtime;

	clrscr();

        /* Convert it to local time representation. */
        loctime = localtime (&curtime);

        /* Print out the date and time in the standard format. */
        printf (asctime (loctime), stdout);

        /* Print it out in a nice format. */
        strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
        printf (buffer, stdout);
        strftime (buffer, SIZE, "The time is %I:%M %p. %Z\n", loctime);
        printf (buffer, stdout);
    }
       
    sceKernelSleepThread();
       
    return 0;        
}
And if you don't mind keep an update log at the top of the code from now on. Please include the date and time you updated and what you changed or added to the code. Thanks!
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 03:44 PM   #23
 
Join Date: Jul 2005
Posts: 68
Trader Feedback: 0
Default

Quote:
Originally Posted by Twenty 2
Alright it works now but... its one giant list like it updates by the second going:
Today is...

Today is...

Today is...

It gets pretty hard to read.
Oh and the home button doesnt work cuz it freezes on please wait...
Well, to remove that Today is... bit, simply place that printf command before the loop. Then, in the loop, make it check if the day is the same every second. If it is different, then printf the new date and continue.
tehhunter is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 06:57 PM   #24
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

We solved that problem by adding in a clear screen function.
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2005, 12:03 PM   #25
PSP User
 
ExxonValdeez's Avatar
 
Join Date: Jul 2005
Location: psixonline.com
Posts: 205
Trader Feedback: 0
Default

To Twenty 2: I won't be able to work as much on this project as I am starting school tomorrow so this thread may not be updated often. I hope it is okay if I send you a private message for help if I need it. Thanks!
ExxonValdeez is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
program , time

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 07:34 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us