diff --git a/source/ngc/s9xconfig.cpp b/source/ngc/s9xconfig.cpp index 5171ddc..9c703c8 100644 --- a/source/ngc/s9xconfig.cpp +++ b/source/ngc/s9xconfig.cpp @@ -34,11 +34,16 @@ DefaultSettings () GCSettings.AutoLoad = 1; GCSettings.AutoSave = 1; - // default SMB settings - strncpy (GCSettings.smbip, "192.168.0.1", 15); // IP Address of share server - strncpy (GCSettings.smbuser, "Wiiuser", 19); // Your share user - strncpy (GCSettings.smbpwd, "password", 19); // Your share user password - strncpy (GCSettings.smbshare, "SNES", 19); // Share name on server + // custom SMB settings + strncpy (GCSettings.smbip, "", 15); // IP Address of share server + strncpy (GCSettings.smbuser, "", 19); // Your share user + strncpy (GCSettings.smbpwd, "", 19); // Your share user password + strncpy (GCSettings.smbshare, "", 19); // Share name on server + + GCSettings.smbip[15] = 0; + GCSettings.smbuser[19] = 0; + GCSettings.smbpwd[19] = 0; + GCSettings.smbshare[19] = 0; GCSettings.gcip[0] = 0; GCSettings.gwip[0] = 0; @@ -48,10 +53,10 @@ DefaultSettings () GCSettings.NGCZoom = 0; GCSettings.VerifySaves = 0; - + GCSettings.render = 0; GCSettings.widescreen = 0; - + GCSettings.Superscope = 0; GCSettings.Mouse = 0; GCSettings.Justifier = 0; diff --git a/source/ngc/s9xsupport.cpp b/source/ngc/s9xsupport.cpp index b93a438..e9abdb8 100644 --- a/source/ngc/s9xsupport.cpp +++ b/source/ngc/s9xsupport.cpp @@ -132,8 +132,8 @@ Snes9x homepage: http://www.snes9x.com Permission to use, copy, modify and/or distribute Snes9x in both binary - and source form, for non-commercial purposes, is hereby granted without - fee, providing that this license information and copyright notice appear + and source form, for non-commercial purposes, is hereby granted without + fee, providing that this license information and copyright notice appear with all copies and any derived work. This software is provided 'as-is', without any express or implied @@ -202,7 +202,7 @@ S9xExit () { /*** Nintendo Gamecube will NEVER get here ... unless something major went wrong !! - + In which case, I'll settle for a reboot first -;) ***/ } @@ -242,7 +242,7 @@ S9xGetFilenameInc (const char *e, enum s9x_getdirtype dirtype) void S9xAutoSaveSRAM () { - //Memory.SaveSRAM (S9xGetFilename (".srm", SRAM_DIR)); + } /*** Sound based functions ***/ @@ -284,7 +284,7 @@ S9xGenerateSound () /* eke-eke */ void S9xInitSync() -{ +{ FrameTimer = 0; prev = gettime(); } @@ -295,7 +295,7 @@ extern int timerstyle; void S9xSyncSpeed () { uint32 skipFrms = Settings.SkipFrames; - + if ( Settings.TurboMode ) skipFrms = Settings.TurboSkipFrames; @@ -305,10 +305,10 @@ void S9xSyncSpeed () { usleep (50); } - + if (FrameTimer > skipFrms) FrameTimer = skipFrms; - + if ((FrameTimer > 1) && (IPPU.SkippedFrames < skipFrms)) { IPPU.SkippedFrames++; @@ -320,11 +320,11 @@ void S9xSyncSpeed () IPPU.RenderThisFrame = TRUE; } } - else /* use internal timer for PAL roms */ + else /* use internal timer for PAL roms */ { unsigned int timediffallowed = Settings.TurboMode ? 0 : Settings.FrameTime; now = gettime(); - + if (diff_usec(prev, now) > timediffallowed) { /*while ( diff_usec((prev, now) < timediffallowed * 2) { @@ -353,7 +353,7 @@ void S9xSyncSpeed () prev = now; } - + if ( !Settings.TurboMode ) FrameTimer--; return; diff --git a/source/ngc/smbop.cpp b/source/ngc/smbop.cpp index 10c0e5e..c341e46 100644 --- a/source/ngc/smbop.cpp +++ b/source/ngc/smbop.cpp @@ -89,6 +89,13 @@ ConnectShare (bool silent) return false; #endif + // check that all parameter have been set + if(strlen(GCSettings.smbuser) == 0 || + strlen(GCSettings.smbpwd) == 0 || + strlen(GCSettings.smbshare) == 0 || + strlen(GCSettings.smbip) == 0) + return false; + if(!networkInit) networkInit = InitializeNetwork(silent); diff --git a/source/ngc/snes9xGX.cpp b/source/ngc/snes9xGX.cpp index 6112d3f..1222664 100644 --- a/source/ngc/snes9xGX.cpp +++ b/source/ngc/snes9xGX.cpp @@ -347,10 +347,10 @@ main () WPAD_SetVRes(WPAD_CHAN_ALL,640,480); #endif - /*** Initialise GC ***/ - InitGCVideo (); /*** Get the ball rolling ***/ + // Initialise video + InitGCVideo (); - /*** Initialise freetype ***/ + // Initialise freetype font system if (FT_Init ()) { printf ("Cannot initialise font subsystem!\n"); @@ -359,38 +359,33 @@ main () unpackbackdrop (); - /*** Set defaults ***/ + // Set defaults DefaultSettings (); S9xUnmapAllControls (); SetDefaultButtonMap (); - //printf ("Initialise Memory\n"); - /*** Allocate SNES Memory ***/ + // Allocate SNES Memory if (!Memory.Init ()) while (1); - //printf ("Initialise APU\n"); - /*** Allocate APU ***/ + // Allocate APU if (!S9xInitAPU ()) while (1); - /*** Set Pixel Renderer to match 565 ***/ + // Set Pixel Renderer to match 565 S9xSetRenderPixelFormat (RGB565); - /*** Initialise Snes Sound System ***/ + // Initialise Snes Sound System S9xInitSound (5, TRUE, 1024); - //printf ("Initialise GFX\n"); - /*** Initialise Graphics ***/ + // Initialise Graphics setGFX (); if (!S9xGraphicsInit ()) while (1); // Initialize libFAT for SD and USB fatInitDefault(); - //fatInit(8192, false); - //fat_enable_readahead_all(); // Initialize DVD subsystem (GameCube only) #ifndef HW_RVL @@ -414,13 +409,7 @@ main () selectedMenu = 2; // change to preferences menu } - // Correct any relevant saved settings that are invalid - Settings.FrameTimeNTSC = 16667; - Settings.FrameTimePAL = 20000; - if ( Settings.TurboSkipFrames <= Settings.SkipFrames ) - Settings.TurboSkipFrames = 20; - - /*** No appended ROM, so get the user to load one ***/ + // No appended ROM, so get the user to load one if (ARAM_ROMSIZE == 0) { while (ARAM_ROMSIZE == 0) diff --git a/source/ngc/sram.cpp b/source/ngc/sram.cpp index f8efd10..424e804 100644 --- a/source/ngc/sram.cpp +++ b/source/ngc/sram.cpp @@ -84,7 +84,7 @@ preparesavedata (int method) else { offset = 0; - WaitPrompt("No SRAM data to save!"); + WaitPrompt((char *)"No SRAM data to save!"); } return offset;