diff options
author | Jaedyn Draper | 2012-12-27 23:19:47 -0800 |
---|---|---|
committer | Jaedyn Draper | 2012-12-27 23:19:47 -0800 |
commit | 3fff289e60df73b25c483807f5cf73c011804117 (patch) | |
tree | d8a44c6256c2a7652b028525054e0e55d756ff15 /source/nds/ds2_main.c | |
parent | 74211924afc184870627c90ce522c4c5743761db (diff) | |
parent | c01a2a42168695233ecc69c4a60ed918e7701fb9 (diff) | |
download | snes9x2005-3fff289e60df73b25c483807f5cf73c011804117.tar.gz snes9x2005-3fff289e60df73b25c483807f5cf73c011804117.tar.bz2 snes9x2005-3fff289e60df73b25c483807f5cf73c011804117.zip |
Merge pull request #26 from Nebuleon/master
Merge to CATSFC 1.10+
Diffstat (limited to 'source/nds/ds2_main.c')
-rw-r--r-- | source/nds/ds2_main.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/source/nds/ds2_main.c b/source/nds/ds2_main.c index 710215b..7229727 100644 --- a/source/nds/ds2_main.c +++ b/source/nds/ds2_main.c @@ -15,19 +15,20 @@ * 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 <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);
+#include "ds2sound.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) @@ -42,24 +43,22 @@ void ddump_mem(unsigned char* addr, unsigned int len) } #endif +void ds2_main(void) +{ + int err; + ds2_setCPUclocklevel(13); + //Initial video and audio and other input and output + err = ds2io_initb(DS2_BUFFER_SIZE, SND_SAMPLE_RATE, 0, 0); + if(err) goto _failure; -
-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; - //Initial file system
- err = fat_init();
- if(err) goto _failure;
+ //go to user main funtion + sfc_main (0, 0); - //go to user main funtion
- sfc_main (0, 0);
-
_failure: - ds2_plug_exit();
-}
-
+ ds2_plug_exit(); +} + |