parent
c4dc18f1c1
commit
252df2cc95
|
@ -72,7 +72,7 @@ void mcfg_CreateDevices()
|
||||||
|
|
||||||
#ifdef HAS_VMU
|
#ifdef HAS_VMU
|
||||||
mcfg_Create(MDT_SegaVMU,0,0);
|
mcfg_Create(MDT_SegaVMU,0,0);
|
||||||
mcfg_Create(MDT_SegaVMU,0,1);
|
mcfg_Create(MDT_Microphone,0,1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -651,6 +651,86 @@ struct maple_sega_vmu: maple_base
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct maple_microphone: maple_base
|
||||||
|
{
|
||||||
|
virtual u32 dma(u32 cmd)
|
||||||
|
{
|
||||||
|
//printf("maple_microphone::dma Called 0x%X;Command %d\n",device_instance->port,Command);
|
||||||
|
switch (cmd)
|
||||||
|
{
|
||||||
|
case MDC_DeviceRequest:
|
||||||
|
//caps
|
||||||
|
//4
|
||||||
|
w32(MFID_4_Mic);
|
||||||
|
|
||||||
|
//struct data
|
||||||
|
//3*4
|
||||||
|
w32( 0xfe060f00);
|
||||||
|
w32( 0);
|
||||||
|
w32( 0);
|
||||||
|
|
||||||
|
//1 area code
|
||||||
|
w8(0xFF);
|
||||||
|
|
||||||
|
//1 direction
|
||||||
|
w8(0);
|
||||||
|
|
||||||
|
//30
|
||||||
|
wstr(maple_sega_mic_name,30);
|
||||||
|
|
||||||
|
//60
|
||||||
|
wstr(maple_sega_brand,60);
|
||||||
|
|
||||||
|
//2
|
||||||
|
w16(0x01AE);
|
||||||
|
|
||||||
|
//2
|
||||||
|
w16(0x01F4);
|
||||||
|
|
||||||
|
return MDRS_DeviceStatus;
|
||||||
|
|
||||||
|
//controller condition
|
||||||
|
case MDCF_GetCondition:
|
||||||
|
{
|
||||||
|
//PlainJoystickState pjs;
|
||||||
|
//config->GetInput(&pjs);
|
||||||
|
//caps
|
||||||
|
//4
|
||||||
|
w32(MFID_4_Mic);
|
||||||
|
|
||||||
|
//state data
|
||||||
|
//2 key code
|
||||||
|
//w16(pjs.kcode);
|
||||||
|
|
||||||
|
//triggers
|
||||||
|
//1 R
|
||||||
|
//w8(pjs.trigger[PJTI_R]);
|
||||||
|
//1 L
|
||||||
|
//w8(pjs.trigger[PJTI_L]);
|
||||||
|
|
||||||
|
//joyx
|
||||||
|
//1
|
||||||
|
//w8(pjs.joy[PJAI_X1]);
|
||||||
|
//joyy
|
||||||
|
//1
|
||||||
|
//w8(pjs.joy[PJAI_Y1]);
|
||||||
|
|
||||||
|
//not used
|
||||||
|
//1
|
||||||
|
w8(0x80);
|
||||||
|
//1
|
||||||
|
w8(0x80);
|
||||||
|
}
|
||||||
|
|
||||||
|
return MDRS_DataTransfer;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf("UNKOWN MAPLE COMMAND %d\n",cmd);
|
||||||
|
return MDRE_UnknownFunction;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
maple_device* maple_Create(MapleDeviceType type)
|
maple_device* maple_Create(MapleDeviceType type)
|
||||||
{
|
{
|
||||||
maple_device* rv=0;
|
maple_device* rv=0;
|
||||||
|
@ -659,6 +739,9 @@ maple_device* maple_Create(MapleDeviceType type)
|
||||||
case MDT_SegaController:
|
case MDT_SegaController:
|
||||||
rv=new maple_sega_controller();
|
rv=new maple_sega_controller();
|
||||||
break;
|
break;
|
||||||
|
case MDT_Microphone:
|
||||||
|
rv=new maple_microphone();
|
||||||
|
break;
|
||||||
#ifdef HAS_VMU
|
#ifdef HAS_VMU
|
||||||
case MDT_SegaVMU:
|
case MDT_SegaVMU:
|
||||||
rv = new maple_sega_vmu();
|
rv = new maple_sega_vmu();
|
||||||
|
@ -670,4 +753,4 @@ maple_device* maple_Create(MapleDeviceType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ enum MapleDeviceType
|
||||||
{
|
{
|
||||||
MDT_SegaController,
|
MDT_SegaController,
|
||||||
MDT_SegaVMU,
|
MDT_SegaVMU,
|
||||||
|
MDT_Microphone,
|
||||||
|
|
||||||
MDT_Count
|
MDT_Count
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue