/* 	
Xenon plugins
*/
#include <xtl.h>
#include <gccore.h>
#include <stdint.h>
#include <sys/types.h>

#include "GPUXenonStruct.h"
#include "GPUXenon.h"

extern "C" long GPU__open(void) {
}

extern "C" long GPU__init(void) { 
	//create texture
	return GPUXenon::GPUXenonInit();
}

extern "C" long GPU__shutdown(void) {
	//free everything
	return GPUXenon::GPUXenonShutdown();
}

extern "C" long GPU__close(void) 
{ 
	return GPUXenon::GPUXenonClose();
}
//Write
extern "C" void GPU__writeStatus(unsigned long a)
{
	GPUXenon::GPUXenonWriteStatus(a);
}

extern "C" void GPU__writeData(unsigned long a)
{
	GPUXenon::GPUXenonWriteData(a);
}

extern "C" void GPU__writeDataMem(unsigned long *a, int b){
	GPUXenon::GPUXenonWriteDataMem(a, b); 
}
//Read
extern "C" unsigned long GPU__readStatus(void) 
{ 
	return  GPUXenon::GPUXenonReadStatus(); 
}

extern "C" unsigned long GPU__readData(void) 
{ 
	return  GPUXenon::GPUXenonReadData();  
}

extern "C" void GPU__readDataMem(unsigned long *a, int b){
	GPUXenon::GPUXenonReadDataMem(a, b); 
};
//DMACHAIN
extern "C" long GPU__dmaChain(unsigned long *a ,unsigned long b) 
{
	return  GPUXenon::GPUXenonDmaChain(a,b); 
}

extern "C" void GPU__updateLace(void) 
{
	GPUXenon::GPUXenonUpdateLace(); 
}

extern "C" long GPU__freeze(uint32_t a, GPUFreeze_t *b){
	return GPUXenon::GPUXenonFreeze(a,b);
};
/*
extern "C" long GPU__getScreenPic(unsigned char *){
	return 1;
};

extern "C" long GPU__showScreenPic(unsigned char *){
	return 1;
};

extern "C" void GPU__clearDynarec(void (CALLBACK *callback)(void)){
	psxCpu->Reset();
};
*/