feat(console): add more work to understand ConsoleDeviceInitialize

This commit is contained in:
phaneron 2025-04-03 02:21:40 -04:00
parent 9df5775a17
commit 6cda64dfc4
16 changed files with 224 additions and 28 deletions

View file

@ -0,0 +1,41 @@
#ifndef OS_PROCESSOR_FEATURES_H
#define OS_PROCESSOR_FEATURES_H
DECLARE_STRUCT(ProcessorFeatures);
struct ProcessorFeatures {
// vendor ID string
uint32_t std_0b; // 00
uint32_t std_0d; // 04
uint32_t std_0c; // 08
// standard
uint32_t std_0a; // 0C
uint32_t std_1b; // 10
uint32_t std_1d; // 14
uint32_t std_4a; // 18
// extended
uint32_t ext_0a; // 1C
uint32_t ext_1c; // 20
uint32_t ext_1d; // 24
uint32_t ext_8c; // 28
// processor brand string
uint32_t ext_2a; // 2C
uint32_t ext_2b; // 30
uint32_t ext_2c; // 34
uint32_t ext_2d; // 38
uint32_t ext_3a; // 3C
uint32_t ext_3b; // 40
uint32_t ext_3c; // 44
uint32_t ext_3d; // 48
uint32_t ext_4a; // 4c
uint32_t ext_4b; // 50
uint32_t ext_4c; // 54
uint32_t ext_4d; // 58
};
#endif

View file

@ -0,0 +1,26 @@
#ifndef OS_TIME_MANAGER_H
#define OS_TIME_MANAGER_H
#include "storm/thread.h"
DECLARE_ENUM(TimingMethod);
DECLARE_STRUCT(OsTimeManager);
enum TimingMethod {
BestAvailable = 0,
// GetTickCount (Windows), mach_absolute_time (MacOS)
SystemMethod1 = 1,
// QueryPerformanceCounter (Windows), Carbon Microseconds (MacOS)
SystemMethod2 = 2,
NotSet = 0xFFFFFFFF,
};
struct OsTimeManager {
double scaleToMs;
TimingMethod timingMethod;
uint32_t timingTestError;
int64_t performanceFrequency;
double timeBegin;
};
#endif