start new makefile, migrate to libpicofe
[picodrive.git] / platform / common / main.c
index 7167df2..5f31b06 100644 (file)
@@ -8,11 +8,11 @@
 #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 "input.h"\r
-#include "plat.h"\r
 #include <cpu/debug.h>\r
 #include <version.h>\r
 \r
@@ -72,17 +72,15 @@ int main(int argc, char *argv[])
 {\r
        g_argv = argv;\r
 \r
-       plat_early_init();\r
+       //plat_early_init();\r
 \r
-       /* in_init() must go before config, config accesses in_ fwk */\r
        in_init();\r
-       emu_prep_defconfig();\r
-       emu_read_config(0, 0);\r
-       config_readlrom(PicoConfigFile);\r
-\r
-       plat_init();\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
@@ -144,7 +142,7 @@ int main(int argc, char *argv[])
        endloop:\r
 \r
        emu_finish();\r
-       plat_finish();\r
+       plat_target_finish();\r
 \r
        return 0;\r
 }\r