DC-SWAT Forum

Полная версия: how can I get the value of I/O in the Dreamcast?
Вы просматриваете yпpощеннyю веpсию форума. Пеpейти к полной веpсии.
Dreamcast inside the handle button I/O is how to get the value? And I/O's MD as fixed? Or is it a fixed address?

THANK YOU REPLYSmile
What the button? Lid open/close detection? No more buttons inside... But you can get some free GPIO directly from CPU.
Is the game of the handle of the button, Dreamcast is how to detect the press of a button on the handle of the game? What specific functions do not have?

For example, I press the start button, the function is how to get it?

Can you give me an example? Thank you
Aah you mean the joystick.
So it's named as Maple Bus with some specific packet interface. You can look docs or KallistiOS source code for it.
It's hard to be say by two words how it's works.
thank you

I try to find the.
Just a little example

First initialize input device, for instance joystick
PHP код:
maple_device_tjoy maple_enum_type(0MAPLE_FUNC_CONTROLLER); 

Then, poll joy's buttons state
PHP код:
cont_state_t *joy_state = (cont_state_t *)maple_dev_status(joy);
if (
joy_state->joyx != || joy_state->joyy != 0)
{
    
Ball->Move(joy_state->joyxjoy_state->joyy);

I think for kof888 need code without big libs...

For example, you can get simple implementation from here https://code.google.com/p/sylverant/sour...er/maple.c (see usage in patcher.c)
I'm very sorry. I just remember this post now. I'm so forgetful.........
URL ссылки