1 /*
2  * OpenBOR - http://www.LavaLit.com
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in OpenBOR root for details.
5  *
6  * Copyright (c) 2004 - 2011 OpenBOR Team
7  */
8 
9 /////////////////////////////////////////////////////////////////////////////
10 
11 #include "dcport.h"
12 #include "timer.h"
13 #include "openbor.h"
14 #include "packfile.h"
15 
16 /////////////////////////////////////////////////////////////////////////////
17 
18 char packfile[128] = {"bor.pak"};
19 int cd_lba;
20 
21 /////////////////////////////////////////////////////////////////////////////
22 
readmsb32(const unsigned char * src)23 unsigned readmsb32(const unsigned char *src)
24 {
25 	return
26 		((((unsigned)(src[0])) & 0xFF) << 24) |
27 		((((unsigned)(src[1])) & 0xFF) << 16) |
28 		((((unsigned)(src[2])) & 0xFF) <<  8) |
29 		((((unsigned)(src[3])) & 0xFF) <<  0);
30 }
31 
32 /////////////////////////////////////////////////////////////////////////////
33 
borExit(int reset)34 void borExit(int reset)
35 {
36 	arch_reboot();
37 }
38 
39 /////////////////////////////////////////////////////////////////////////////
40 
main(int argc,char ** argv)41 int main(int argc, char** argv)
42 {
43 	setSystemRam();
44 	getRamStatus(BYTES);
45 	packfile_mode(0);
46 	if((cd_lba = gdrom_init()) <= 0)
47 	{
48 		printf("gdrom_init failed\n");
49 		arch_reboot();
50 	}
51 	openborMain(argc, argv);
52 	return 0;
53 }
54 
55 /////////////////////////////////////////////////////////////////////////////
56