Holy Seaman, batman!

Seaman will load :)
This commit is contained in:
hooby3dfx 2014-01-13 12:12:26 -05:00 committed by Bryan Barnes
parent c4dc18f1c1
commit 252df2cc95
3 changed files with 86 additions and 2 deletions

View File

@ -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
} }

View File

@ -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();

View File

@ -5,6 +5,7 @@ enum MapleDeviceType
{ {
MDT_SegaController, MDT_SegaController,
MDT_SegaVMU, MDT_SegaVMU,
MDT_Microphone,
MDT_Count MDT_Count
}; };