libito intchandler question

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
sincro
Posts: 25
Joined: Tue Jan 27, 2004 9:54 am

libito intchandler question

Post by sincro »

how can i disable ito intchandler??

nothing to do it in examples and documentation.

help.

sincro
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

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.
sincro
Posts: 25
Joined: Tue Jan 27, 2004 9:54 am

Post by sincro »

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: Select all

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

Code: Select all

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
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

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: Select all

DIntr();
DisableIntcHandler(ITO_INTC_VSYNC_START);
RemoveIntcHandler(ITO_INTC_VSYNC_START, handler_id);
EIntr();
You get the handler_id from itoAddIntcHandler.
sincro
Posts: 25
Joined: Tue Jan 27, 2004 9:54 am

Post by sincro »

BIG thanks Lukasz
Post Reply