-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTimeFixer.h
More file actions
29 lines (23 loc) · 833 Bytes
/
TimeFixer.h
File metadata and controls
29 lines (23 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//Thanks to www.free60.org/SMC
//Thanks to tmbinc for smc.c
#pragma once
#ifndef _TimeFixer_H
#define _TimeFixer_H
#include <string.h>
//Call to SMC message function in xboxkrnl.lib
extern "C" void __stdcall HalSendSMCMessage(void* input, void* output);
extern "C" void __stdcall HalReturnToFirmware(int type);
void GetRTCDate();
void SetRTCDate();
int hex_to_bytes(const char *hex, unsigned char *out, size_t max_len);
time_t decode_smc_rtc(const unsigned char *data);
void encode_smc_rtc(time_t t, unsigned char out[7]);
void print_bytes(const unsigned char *input_bytes, int len);
void RunTest();
void ShowTextForSeconds(const wchar_t *message, float seconds);
//This is used to store our SMC data
unsigned char m_SMCMessage[16];
unsigned char m_SMCReturn[16];
unsigned char m_SMCEditable[16];
void PrepareBuffers();
#endif