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 

Timer and Interrupts

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



Joined: 29 Nov 2007
Posts: 36

PostPosted: Mon Feb 25, 2008 12:29 am    Post subject: Timer and Interrupts Reply with quote

Hi,

I wat to setup a simple timer interrupt which displays a text message e.g. everyday at 9am. I am really at the beginning of my code but I am not sure what route to choose now. I guess what is needed is some kind of an interrupt to not loop until time=9am. Is there any tutorial out there which explains how to set up timer interrupts?

Also, would a separate prx filebe required here? Can prx programs be considered as separate threads at all or should that be done inside my main internally?

I would really like to understand prx and threads on PSP better but the SDK doxygen doc is too hard for me to understand. Does anyone know of good tutorials?

Best regards,
Kai
Back to top
View user's profile Send private message
kasikeeper



Joined: 29 Nov 2007
Posts: 36

PostPosted: Thu Feb 28, 2008 5:31 am    Post subject: Reply with quote

Hello,

noone here to give some advice on timer interrupts on the PSP??

Kai
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Feb 28, 2008 6:20 am    Post subject: Reply with quote

Did you at least look at the sample in the sdk? I know that one of the tutorial sites a user here maintains has a section on timers as well. Do a little research yourself and maybe others will be more inclined to help. You ARE supposed to be a developer, after all.
Back to top
View user's profile Send private message AIM Address
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Sun Mar 09, 2008 7:03 pm    Post subject: Reply with quote

You might be better off using the RTC alarm handlers here to wake up the PSP at a given time.
Back to top
View user's profile Send private message
kasikeeper



Joined: 29 Nov 2007
Posts: 36

PostPosted: Thu Mar 13, 2008 6:11 am    Post subject: Reply with quote

Adrahil, this is exactly what I am looking for. I am using the VTimers successfully but when the PSP goes to sleep, the timers go to sleep as well and there is no chance to wake the PSP up from a VTimer callback.

I checked the psprtc.h header file but could not find any rtc timer handler functionality. Ca you give me a clue where in the sdk these functions sit?
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Sun Mar 16, 2008 1:33 am    Post subject: Reply with quote

Have a look at Art's code. There is a modified psprtc.h and a little alarm library.
http://forums.qj.net/f-psp-development-forum-11/t-time-baby-v12g-136338.html
Back to top
View user's profile Send private message
kasikeeper



Joined: 29 Nov 2007
Posts: 36

PostPosted: Wed Mar 19, 2008 6:45 am    Post subject: Reply with quote

Ok. I had a look the the timebaby source code and I copied the modified psprtc.h header into my sdk directory (by the way,when is this new header file going to be part of the standard sdk distribution?)

When compiling my code I get

[Linker error] undefined reference to `sceRtcRegisterCallback'
[Linker error] undefined reference to `sceRtcSetAlarmTick'

which are two of the functions that are new in the psprtc.h so I assumed they sit in the precompiled .s files provided with the sources. I included them in my makefile and now I get the follwoing compile errors:

unrecognized opcode `dummy'
junk at end of line, first unrecognized character is `/'
[sceRtc_driver.o] Error 1

How can these functions`sceRtcRegisterCallback' and `sceRtcSetAlarmTick' be made accessable more easily? Or how doI get rid of the assembler errors in a precompiled .s file?
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