-// (c) Copyright 2006 notaz, All rights reserved.\r
+// (c) Copyright 2006-2009 notaz, All rights reserved.\r
// Free for non-commercial use.\r
\r
// For commercial use, separate licencing terms must be obtained.\r
#include <stdio.h>\r
#include <stdlib.h>\r
#include <string.h>\r
-#include <unistd.h>\r
#include <strings.h>\r
-#include <linux/limits.h>\r
\r
#include "../common/menu.h"\r
#include "../common/emu.h"\r
#include "../common/input.h"\r
#include "../common/plat.h"\r
#include "emu.h"\r
-#include "940ctl.h"\r
#include "version.h"\r
\r
-#include "squidgehack.h"\r
-#include "cpuctrl.h"\r
-\r
\r
extern char *PicoConfigFile;\r
static int load_state_slot = -1;\r
-int mmuhack_status = 0;\r
char **g_argv;\r
\r
void parse_cmd_line(int argc, char *argv[])\r
in_probe();\r
in_debug_dump();\r
\r
- if (currentConfig.EmuOpt&0x10) {\r
- int ret = mmuhack();\r
- printf("squidge hack code finished and returned %i\n", ret); fflush(stdout);\r
- mmuhack_status = ret;\r
- }\r
- cpuctrl_init();\r
- if (currentConfig.EmuOpt&0x100) {\r
- printf("setting RAM timings.. "); fflush(stdout);\r
- // craigix: --trc 6 --tras 4 --twr 1 --tmrd 1 --trfc 1 --trp 2 --trcd 2\r
- set_RAM_Timings(6, 4, 1, 1, 1, 2, 2);\r
- printf("done.\n"); fflush(stdout);\r
- }\r
- sharedmem_init();\r
emu_Init();\r
menu_init();\r
\r
endloop:\r
\r
emu_Deinit();\r
- sharedmem_deinit();\r
- cpuctrl_deinit();\r
plat_finish();\r
- if (mmuhack_status)\r
- mmuunhack();\r
\r
return 0;\r
}\r