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 

libito intchandler question

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



Joined: 27 Jan 2004
Posts: 25

PostPosted: Thu Jul 22, 2004 10:14 pm    Post subject: libito intchandler question Reply with quote

how can i disable ito intchandler??

nothing to do it in examples and documentation.

help.

sincro
Back to top
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Thu Jul 22, 2004 10:59 pm    Post subject: Reply with quote

Just use the disable and then remove intc handler syscalls. I think the intc number i 2 or 3, check the source to be sure.
Back to top
View user's profile Send private message Visit poster's website
sincro



Joined: 27 Jan 2004
Posts: 25

PostPosted: Fri Jul 23, 2004 5:31 pm    Post subject: Reply with quote

Lukasz wrote:
Just use the disable and then remove intc handler syscalls. I think the intc number i 2 or 3, check the source to be sure.


tnx LuKasz.

I'm not very able to program, you could makes an example code me?

i've activate intc handler:

Code:
itoDI();
  itoAddIntcHandler(ITO_INTC_VSYNC_START, draw, 0);
  itoEnableIntc(ITO_INTC_VSYNC_START);
  itoEI();


and function:

Code:
void draw()
{

      itoSprite(ITO_RGBA(0xFF,0x0,0x0,0x0), 0, 0, screen_width, screen_height, 0);
      itoSetTexture(0, 128, ITO_RGBA32, ITO_TEXTURE_128, ITO_TEXTURE_64);
      itoTextureSprite(ITO_RGBA(0x80,0x80,0x80,0xFF), 0, 64, 0, 0, 128, 128, 128, 64, 0);
      itoSprite(ITO_RGBA(0xF0,0xF0,0x0,0x0), 192, 128, 256, 192, 0);
      itoGsFinish();
      itoSwitchFrameBuffers();
      itoEI();
}





how the way to disable intc handler?

tnx

sincro
Back to top
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Fri Jul 23, 2004 8:45 pm    Post subject: Reply with quote

I can see that I didn't have all syscalls included with ito, just does ones i needed, so either add the ones you need for removing the intc handler or link with ps2sdk, in the last case, you can do something like this.

Code:

DIntr();
DisableIntcHandler(ITO_INTC_VSYNC_START);
RemoveIntcHandler(ITO_INTC_VSYNC_START, handler_id);
EIntr();


You get the handler_id from itoAddIntcHandler.
Back to top
View user's profile Send private message Visit poster's website
sincro



Joined: 27 Jan 2004
Posts: 25

PostPosted: Fri Jul 23, 2004 11:46 pm    Post subject: Reply with quote

BIG thanks Lukasz
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 -> PS2 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