notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clarify PicoDrive's license
[picodrive.git]
/
platform
/
common
/
main.c
diff --git
a/platform/common/main.c
b/platform/common/main.c
index
7a7c876
..
5a0287e
100644
(file)
--- a/
platform/common/main.c
+++ b/
platform/common/main.c
@@
-1,18
+1,22
@@
-// (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
+/*
\r
+ * PicoDrive
\r
+ * (C) notaz, 2006-2010
\r
+ *
\r
+ * This work is licensed under the terms of MAME license.
\r
+ * See COPYING file in the top-level directory.
\r
+ */
\r
\r
#include <stdio.h>
\r
#include <stdlib.h>
\r
#include <string.h>
\r
#include <strings.h>
\r
\r
\r
#include <stdio.h>
\r
#include <stdlib.h>
\r
#include <string.h>
\r
#include <strings.h>
\r
\r
-#include "menu.h"
\r
+#include "../libpicofe/input.h"
\r
+#include "../libpicofe/plat.h"
\r
+#include "menu_pico.h"
\r
#include "emu.h"
\r
#include "config.h"
\r
#include "emu.h"
\r
#include "config.h"
\r
-#include "input.h"
\r
-#include "plat.h"
\r
+#include <cpu/debug.h>
\r
#include <version.h>
\r
\r
\r
#include <version.h>
\r
\r
\r
@@
-34,6
+38,12
@@
void parse_cmd_line(int argc, char *argv[])
else if (strcasecmp(argv[x], "-loadstate") == 0) {
\r
if (x+1 < argc) { ++x; load_state_slot = atoi(argv[x]); }
\r
}
\r
else if (strcasecmp(argv[x], "-loadstate") == 0) {
\r
if (x+1 < argc) { ++x; load_state_slot = atoi(argv[x]); }
\r
}
\r
+ else if (strcasecmp(argv[x], "-pdb") == 0) {
\r
+ if (x+1 < argc) { ++x; pdb_command(argv[x]); }
\r
+ }
\r
+ else if (strcasecmp(argv[x], "-pdb_connect") == 0) {
\r
+ if (x+2 < argc) { pdb_net_connect(argv[x+1], argv[x+2]); x += 2; }
\r
+ }
\r
else {
\r
unrecognized = 1;
\r
break;
\r
else {
\r
unrecognized = 1;
\r
break;
\r
@@
-65,17
+75,15
@@
int main(int argc, char *argv[])
{
\r
g_argv = argv;
\r
\r
{
\r
g_argv = argv;
\r
\r
- plat_early_init();
\r
+
//
plat_early_init();
\r
\r
\r
- /* in_init() must go before config, config accesses in_ fwk */
\r
in_init();
\r
in_init();
\r
- pemu_prep_defconfig();
\r
- emu_read_config(0, 0);
\r
- config_readlrom(PicoConfigFile);
\r
-
\r
- plat_init();
\r
in_probe();
\r
in_probe();
\r
- in_debug_dump();
\r
+
\r
+ plat_target_init();
\r
+
\r
+ emu_prep_defconfig(); // depends on input
\r
+ emu_read_config(NULL, 0);
\r
\r
emu_init();
\r
menu_init();
\r
\r
emu_init();
\r
menu_init();
\r
@@
-137,7
+145,7
@@
int main(int argc, char *argv[])
endloop:
\r
\r
emu_finish();
\r
endloop:
\r
\r
emu_finish();
\r
- plat_finish();
\r
+ plat_
target_
finish();
\r
\r
return 0;
\r
}
\r
\r
return 0;
\r
}
\r