#include "config.h"


#define BOOT_LOGO
//#define BOOT_LOGO_DONE

#if !defined(AFX_TESTER1_H__7D4A2D28_4650_475E_A82E_CF6F8E7BA839__INCLUDED_)
#define AFX_TESTER1_H__7D4A2D28_4650_475E_A82E_CF6F8E7BA839__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "resource.h"

//////////////////////////////// Some type definitions /////////////////////
struct Image {
 UINT16 *p;
 long x,y;
};

/////////////////////////////Functions /////////////////////////////////////
Image ReadBMP(char[]);
void ShowImage(UINT16*,int,int,int=0,int=0);
void Gpio();
void UART_setup();
void DumpMMU();
void UART_puts(char *);
void init_fb();
void try_fb();
void boot_linux(char*,char*);
UINT32 ReadPhysical(UINT32);
void  WritePhysical(UINT32 addr,UINT32 val);
UINT32 VirtualToPhysical(UINT32);
void load_boot(char*);
void SetGPIOalt(int,int);
void SetGPIOio(int,int);


////////////////////////////////////////////////////////////////////////////

extern "C" BOOL VirtualCopy(LPVOID lpvDestMem, LPVOID lpvSrcMem, 
							DWORD dwSizeInBytes, DWORD dwProtectFlag);

extern void do_it();

extern int read_mmu();		// reads where is/are descriptors located

extern void IntOff();
extern void DRAMloader(UINT32 adr,UINT32 machine_num); // this function turns off MMU and jumps onto physical address given

extern "C" DWORD SetProcPermissions(
DWORD newperms 
); 

extern "C" DWORD GetCurrentPermissions(
);

extern "C" BOOL SetKMode( 
BOOL fMode 
);

extern "C" LPVOID CreateStaticMapping(
DWORD dwPhysBase,
DWORD dwSize
);


#define MENU_HEIGHT 26

#endif // !defined(AFX_TESTER1_H__7D4A2D28_4650_475E_A82E_CF6F8E7BA839__INCLUDED_)

