flycast/core/hw/maple/maple_devs.h

53 lines
1.1 KiB
C
Raw Normal View History

2013-12-19 17:10:14 +00:00
#pragma once
#include "types.h"
enum MapleDeviceType
{
MDT_SegaController,
2018-08-20 11:20:25 +00:00
2013-12-19 17:10:14 +00:00
MDT_SegaVMU,
MDT_Microphone,
MDT_PurupuruPack,
MDT_Keyboard,
2018-09-18 07:27:16 +00:00
MDT_Mouse,
2013-12-19 17:10:14 +00:00
MDT_NaomiJamma,
2018-08-20 11:20:25 +00:00
MDT_None,
2013-12-19 17:10:14 +00:00
MDT_Count
};
struct IMapleConfigMap;
struct maple_device
{
u8 maple_port; //raw maple port
u8 bus_port; //0 .. 5
u8 bus_id; //0 .. 3
wchar logical_port[3]; //A0, etc
2013-12-19 17:10:14 +00:00
IMapleConfigMap* config;
//fill in the info
void Setup(u32 prt);
virtual void OnSetup(){};
virtual ~maple_device();
virtual u32 Dma(u32 Command,u32* buffer_in,u32 buffer_in_len,u32* buffer_out,u32& buffer_out_len)=0;
2018-09-02 13:49:23 +00:00
virtual bool maple_serialize(void **data, unsigned int *total_size){return true;};
virtual bool maple_unserialize(void **data, unsigned int *total_size){return true;};
};
struct _NaomiState
{
u8 Cmd;
u8 Mode;
u8 Node;
2013-12-19 17:10:14 +00:00
};
maple_device* maple_Create(MapleDeviceType type);
2014-01-19 17:35:52 +00:00
#define SIZE_OF_MIC_DATA 480 //ALSO DEFINED IN SipEmulator.java
2014-02-28 22:46:08 +00:00
#ifndef TARGET_PANDORA
2014-01-19 17:35:52 +00:00
int get_mic_data(u8* buffer); //implemented in Android.cpp
int push_vmu_screen(u8* buffer); //implemented in Android.cpp
2014-02-28 22:46:08 +00:00
#endif