using System; using System.Runtime.InteropServices; internal static class Nova64Core { private const string LibName = "nova64_core"; [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)] public static extern bool nova64_init_io(IntPtr io_interface); [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)] public static extern int nova64_process_tick(uint delta_ms); [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)] public static extern uint nova64_get_version(); } internal static class Program { private static void Main() { Console.WriteLine("Nova64 simulator starting..."); try { var version = Nova64Core.nova64_get_version(); Console.WriteLine($"Loaded nova64_core native library. Version: 0x{version:X}"); } catch (DllNotFoundException ex) { Console.WriteLine($"Native library not found: {ex.Message}"); } catch (EntryPointNotFoundException ex) { Console.WriteLine($"Native entry point missing: {ex.Message}"); } catch (Exception ex) { Console.WriteLine($"Failed to initialize native library: {ex.Message}"); } } }