2013-05-05 18:18:41 +02:00
|
|
|
#ifndef __APICompat_H__
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
#define __APICompat_H__
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
#include <string.h>
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
#include <hal/fileio.h>
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
extern "C" {
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
#include <xboxkrnl/xboxkrnl.h>
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
#include <hal/xbox.h>
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
#include <hal/fileio.h>
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define Sleep XSleep
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Port IO */
|
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
unsigned char _outp(unsigned short port, unsigned char databyte);
|
|
|
|
|
|
|
|
unsigned short _outpw(unsigned short port, unsigned short dataword);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
unsigned long _outpd(unsigned short port, unsigned long dataword);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
unsigned char _inp(unsigned short port);
|
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
unsigned short _inpw(unsigned short port);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
unsigned long _inpd(unsigned short port);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-05 18:18:41 +02:00
|
|
|
/* Misc */
|
|
|
|
|
|
|
|
#define min(A, B) ((A) < (B)) ? (A) : (B)
|
|
|
|
|
|
|
|
char *itoa(int value, char *buffer, int radix);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
void *ZeroMemory(void *s, size_t n);
|
2013-05-05 18:18:41 +02:00
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
#endif
|