Cleanup
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal static class Nova64Core
|
||||
{
|
||||
private const string LibName = "nova64_core";
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate void DisplayFlushDelegate(IntPtr buffer, ushort width, ushort height);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate void AudioOutputDelegate(IntPtr samples, uint count);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate bool SdReadSectorDelegate(uint sectorIdx, IntPtr destinationBuffer, uint sectorCount);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate void CartridgeStatusDelegate(uint slotIdx, bool isInserted);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public delegate void LogMessageDelegate([MarshalAs(UnmanagedType.LPStr)] string message);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Nova64IoInterface
|
||||
{
|
||||
public IntPtr display_flush;
|
||||
public IntPtr audio_output;
|
||||
public IntPtr sd_read_sector;
|
||||
public IntPtr cartridge_status;
|
||||
public IntPtr log_message;
|
||||
}
|
||||
|
||||
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern bool nova64_init(IntPtr io_interface);
|
||||
|
||||
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int nova64_main();
|
||||
|
||||
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern bool nova64_shutdown();
|
||||
|
||||
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint nova64_get_version();
|
||||
}
|
||||
Reference in New Issue
Block a user