diff options
author | Kitty Draper | 2011-03-05 21:39:25 -0500 |
---|---|---|
committer | Kitty Draper | 2011-03-05 21:39:25 -0500 |
commit | d40ae99422e118188a7f48055dc340c6aca022aa (patch) | |
tree | 83ab93f49fd9e66e43bcd824091ae1dbcaa0c173 /source/nds/ds2_main.c | |
download | snes9x2005-d40ae99422e118188a7f48055dc340c6aca022aa.tar.gz snes9x2005-d40ae99422e118188a7f48055dc340c6aca022aa.tar.bz2 snes9x2005-d40ae99422e118188a7f48055dc340c6aca022aa.zip |
first commit
Diffstat (limited to 'source/nds/ds2_main.c')
-rw-r--r-- | source/nds/ds2_main.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/source/nds/ds2_main.c b/source/nds/ds2_main.c new file mode 100644 index 0000000..710215b --- /dev/null +++ b/source/nds/ds2_main.c @@ -0,0 +1,65 @@ +/* ds2_main.c + * + * Copyright (C) 2010 dking <dking024@gmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public Licens e as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */
+
+#include <stdio.h>
+#include "console.h"
+#include "fs_api.h"
+#include "ds2io.h" +#include "ds2_timer.h" +#include "ds2_malloc.h" +
+#define BLACK_COLOR RGB15(0, 0, 0)
+#define WHITE_COLOR RGB15(31, 31, 31)
+
+extern int sfc_main (int argc, char **argv);
+ +#if 0 +void ddump_mem(unsigned char* addr, unsigned int len) +{ + unsigned int i; + + for(i= 0; i < len; i++) + { + if(i%16 == 0) cprintf("\n%08x: ", i); + cprintf("%02x ", addr[i]); + } +} +#endif + + +
+void ds2_main(void)
+{
+ int err;
+ds2_setCPUclocklevel(13);
+ //Initial video and audio and other input and output
+ err = ds2io_initb(512, 22050, 0, 0);
+ if(err) goto _failure;
+ + //Initial file system
+ err = fat_init();
+ if(err) goto _failure;
+ + //go to user main funtion
+ sfc_main (0, 0);
+
+_failure: + ds2_plug_exit();
+}
+
|