some infrastructure for RTC, tilt sensor, vampier slayer contrl in mgba
This commit is contained in:
parent
98bfc77d47
commit
68506d6ea1
|
@ -25,7 +25,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
public static extern bool BizLoad(IntPtr ctx, byte[] data, int length);
|
||||
|
||||
[DllImport(dll, CallingConvention = cc)]
|
||||
public static extern void BizAdvance(IntPtr ctx, LibVBANext.Buttons keys, int[] vbuff, ref int nsamp, short[] sbuff);
|
||||
public static extern void BizAdvance(IntPtr ctx, LibVBANext.Buttons keys, int[] vbuff, ref int nsamp, short[] sbuff,
|
||||
long time, short gyrox, short gyroy, short gyroz, byte luma);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class MemoryAreas
|
||||
|
|
|
@ -65,7 +65,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
if (Controller["Power"])
|
||||
LibmGBA.BizReset(core);
|
||||
|
||||
LibmGBA.BizAdvance(core, VBANext.GetButtons(Controller), videobuff, ref nsamp, soundbuff);
|
||||
LibmGBA.BizAdvance(core, VBANext.GetButtons(Controller), videobuff, ref nsamp, soundbuff,
|
||||
0, // TODO RTC hookup
|
||||
(short)Controller.GetFloat("Tilt X"),
|
||||
(short)Controller.GetFloat("Tilt Y"),
|
||||
(short)Controller.GetFloat("Tilt Z"),
|
||||
(byte)(255 - Controller.GetFloat("Light Sensor")));
|
||||
}
|
||||
|
||||
public int Frame { get; private set; }
|
||||
|
|
|
@ -69,6 +69,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
BoolButtons =
|
||||
{
|
||||
"Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "L", "R", "Power"
|
||||
},
|
||||
FloatControls =
|
||||
{
|
||||
"Tilt X", "Tilt Y", "Tilt Z", "Light Sensor"
|
||||
},
|
||||
FloatRanges =
|
||||
{
|
||||
new[] { -32767f, 0f, 32767f },
|
||||
new[] { -32767f, 0f, 32767f },
|
||||
new[] { -32767f, 0f, 32767f },
|
||||
new[] { 0f, 100f, 200f },
|
||||
}
|
||||
};
|
||||
public ControllerDefinition ControllerDefinition { get { return GBAController; } }
|
||||
|
|
Loading…
Reference in New Issue