code commenting, minor changes

This commit is contained in:
dborth 2008-09-17 02:27:55 +00:00
parent eff1bf8705
commit 0b7ed963a2
36 changed files with 157 additions and 187 deletions

View File

@ -1,8 +1,13 @@
/**************************************************************************** /****************************************************************************
* VisualBoyAdvance * Visual Boy Advance GX
* *
* Head and tail audio mixer * Tantric September 2008
****************************************************************************/ *
* audio.cpp
*
* Head and tail audio mixer
***************************************************************************/
#include <gccore.h> #include <gccore.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,8 +1,13 @@
/**************************************************************************** /****************************************************************************
* VisualBoyAdvance * Visual Boy Advance GX
* *
* Head and tail audio mixer * Tantric September 2008
****************************************************************************/ *
* audio.h
*
* Head and tail audio mixer
***************************************************************************/
#ifndef __AUDIOMIXER__ #ifndef __AUDIOMIXER__
#define __AUDIOMIXER__ #define __AUDIOMIXER__

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* michniewski August 2008 * Tantric September 2008
* *
* button_mapping.c * button_mapping.c
* *

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* michniewski August 2008 * Tantric September 2008
* *
* button_mapping.h * button_mapping.h
* *

View File

@ -1,8 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* svpe & crunchy2 June 2007
* Tantric September 2008 * Tantric September 2008
* *
* dvd.cpp * dvd.cpp

View File

@ -1,8 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* svpe & crunchy2 June 2007
* Tantric September 2008 * Tantric September 2008
* *
* dvd.h * dvd.h

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 May 2007
* Tantric August 2008
* *
* fileop.cpp * fileop.cpp
* *
@ -174,12 +172,12 @@ ParseFATdirectory(int method)
int int
LoadFATFile (char *filename, int length) LoadFATFile (char *filename, int length)
{ {
/* char zipbuffer[2048]; /*char zipbuffer[2048];
char filepath[MAXPATHLEN];
FILE *handle; FILE *handle;
unsigned char *rbuffer; unsigned char *rbuffer;
u32 size; u32 size;*/
*/ char filepath[MAXPATHLEN];
/* Check filename length */ /* Check filename length */
if ((strlen(currentdir)+1+strlen(filelist[selection].filename)) < MAXPATHLEN) if ((strlen(currentdir)+1+strlen(filelist[selection].filename)) < MAXPATHLEN)
sprintf(filepath, "%s/%s",currentdir,filelist[selection].filename); sprintf(filepath, "%s/%s",currentdir,filelist[selection].filename);

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 May 2007
* Tantric August 2008
* *
* fileop.h * fileop.h
* *

View File

@ -1,10 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* svpe June 2007
* crunchy2 May-July 2007
* Tantric August 2008
* *
* filesel.cpp * filesel.cpp
* *

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 May 2007
* Tantric August 2008
* *
* filesel.h * filesel.h
* *

View File

@ -1,7 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* Tantric September 2008 * Tantric September 2008
* *
* unzip.cpp * unzip.cpp

View File

@ -1,13 +1,12 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* Tantric September 2008 * Tantric September 2008
* *
* unzip.h * unzip.h
* *
* File unzip routines * File unzip routines
****************************************************************************/ ***************************************************************************/
#ifndef _UNZIP_ #ifndef _UNZIP_
#define _UNZIP_ #define _UNZIP_

View File

@ -1,8 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May-June 2007
* Tantric September 2008 * Tantric September 2008
* *
* input.cpp * input.cpp

View File

@ -1,8 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May-June 2007
* Tantric September 2008 * Tantric September 2008
* *
* input.h * input.h

View File

@ -1,8 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May-June 2007
* Tantric September 2008 * Tantric September 2008
* *
* memcardop.cpp * memcardop.cpp

View File

@ -1,8 +1,6 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May-June 2007
* Tantric September 2008 * Tantric September 2008
* *
* memcardop.cpp * memcardop.cpp

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* Tantric September 2008 * Tantric September 2008
* *
@ -134,6 +134,7 @@ PreferencesMenu ()
if(GCSettings.SaveMethod == METHOD_MC_SLOTB) if(GCSettings.SaveMethod == METHOD_MC_SLOTB)
GCSettings.SaveMethod++; GCSettings.SaveMethod++;
prefmenu[6][0] = '\0'; // MC saving not implemented
// no USB ports on GameCube // no USB ports on GameCube
#ifndef HW_RVL #ifndef HW_RVL
@ -205,8 +206,7 @@ PreferencesMenu ()
else if (GCSettings.AutoSave == 2) sprintf (prefmenu[5],"Auto Save SNAPSHOT"); else if (GCSettings.AutoSave == 2) sprintf (prefmenu[5],"Auto Save SNAPSHOT");
else if (GCSettings.AutoSave == 3) sprintf (prefmenu[5],"Auto Save BOTH"); else if (GCSettings.AutoSave == 3) sprintf (prefmenu[5],"Auto Save BOTH");
sprintf (prefmenu[6], "Verify MC Saves %s", //sprintf (prefmenu[6], "Verify MC Saves %s", GCSettings.VerifySaves == true ? " ON" : "OFF");
GCSettings.VerifySaves == true ? " ON" : "OFF");
ret = RunMenu (prefmenu, prefmenuCount, (char*)"Preferences", 16); ret = RunMenu (prefmenu, prefmenuCount, (char*)"Preferences", 16);

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 May-June 2007
* Tantric August 2008
* *
* menu.h * menu.h
* *

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 June 2007
* Tantric August 2008
* *
* menudraw.cpp * menudraw.cpp
* *
@ -229,18 +227,20 @@ Credits ()
else else
ypos += 32; ypos += 32;
DrawText (125, ypos += 22, (char*)"VBA GX GameCube/Wii Port"); setfontsize (14);
DrawText (350, ypos, (char*)"Tantric");
DrawText (125, ypos += 18, (char*)"VBA GameCube Port Improvements"); DrawText (100, ypos += 22, (char*)"Visual Boy Advance GX");
DrawText (350, ypos, (char*)"emukidid"); DrawText (375, ypos, (char*)"Tantric");
DrawText (125, ypos += 18, (char*)"Original VBA GameCube Port"); DrawText (100, ypos += 18, (char*)"GameCube/Wii Port Improvements");
DrawText (350, ypos, (char*)"SoftDev"); DrawText (375, ypos, (char*)"emukidid");
DrawText (125, ypos += 18, (char*)"Visual Boy Advance 1.7.2"); DrawText (100, ypos += 18, (char*)"Original GameCube Port");
DrawText (350, ypos, (char*)"Forgotten"); DrawText (375, ypos, (char*)"SoftDev");
DrawText (125, ypos += 18, (char*)"libogc"); DrawText (100, ypos += 18, (char*)"Visual Boy Advance 1.7.2");
DrawText (350, ypos, (char*)"Shagkur & wintermute"); DrawText (375, ypos, (char*)"Forgotten");
DrawText (125, ypos += 18, (char*)"Testing"); DrawText (100, ypos += 18, (char*)"libogc");
DrawText (350, ypos, (char*)"tehskeen users"); DrawText (375, ypos, (char*)"Shagkur & wintermute");
DrawText (100, ypos += 18, (char*)"Testing");
DrawText (375, ypos, (char*)"tehskeen users");
DrawText (-1, ypos += 36, (char*)"And many others who have contributed over the years!"); DrawText (-1, ypos += 36, (char*)"And many others who have contributed over the years!");
@ -430,8 +430,8 @@ DrawMenu (char items[][50], char *title, int maxitems, int selected, int fontsiz
DrawText (-1, 60, title); DrawText (-1, 60, title);
} }
setfontsize (12); setfontsize (14);
DrawText (510, screenheight - 20, (char *)VERSIONSTR); DrawText (380, screenheight - 30, (char *)VERSIONSTRFULL);
// Draw menu items // Draw menu items

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 June 2007
* Tantric August 2008
* *
* menudraw.h * menudraw.h
* *

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* Tantric September 2008 * Tantric September 2008
* *
@ -148,7 +148,7 @@ preparePrefsData (int method)
createXMLSetting("LoadFolder", "Load Folder", GCSettings.LoadFolder); createXMLSetting("LoadFolder", "Load Folder", GCSettings.LoadFolder);
createXMLSetting("SaveFolder", "Save Folder", GCSettings.SaveFolder); createXMLSetting("SaveFolder", "Save Folder", GCSettings.SaveFolder);
//createXMLSetting("CheatFolder", "Cheats Folder", GCSettings.CheatFolder); //createXMLSetting("CheatFolder", "Cheats Folder", GCSettings.CheatFolder);
createXMLSetting("VerifySaves", "Verify Memory Card Saves", toStr(GCSettings.VerifySaves)); //createXMLSetting("VerifySaves", "Verify Memory Card Saves", toStr(GCSettings.VerifySaves));
createXMLSection("Network", "Network Settings"); createXMLSection("Network", "Network Settings");
@ -258,8 +258,8 @@ decodePrefsData (int method)
loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod"); loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod");
loadXMLSetting(GCSettings.LoadFolder, "LoadFolder"); loadXMLSetting(GCSettings.LoadFolder, "LoadFolder");
loadXMLSetting(GCSettings.SaveFolder, "SaveFolder"); loadXMLSetting(GCSettings.SaveFolder, "SaveFolder");
loadXMLSetting(GCSettings.CheatFolder, "CheatFolder"); //loadXMLSetting(GCSettings.CheatFolder, "CheatFolder");
loadXMLSetting(&GCSettings.VerifySaves, "VerifySaves"); //loadXMLSetting(&GCSettings.VerifySaves, "VerifySaves");
// Network Settings // Network Settings

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* Tantric September 2008 * Tantric September 2008
* *

View File

@ -1,7 +1,12 @@
/**************************************************************************** /****************************************************************************
* Generic File I/O for VisualBoyAdvance * Visual Boy Advance GX
* *
* Currently only supports SD * Tantric September 2008
*
* sdfileio.c
*
* Generic File I/O for VisualBoyAdvance
* Currently only supports SD/USB
****************************************************************************/ ****************************************************************************/
#include <gccore.h> #include <gccore.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,7 +1,12 @@
/**************************************************************************** /****************************************************************************
* Generic File I/O for VisualBoyAdvance * Visual Boy Advance GX
* *
* Currently only supports SD * Tantric September 2008
*
* sdfileio.h
*
* Generic File I/O for VisualBoyAdvance
* Currently only supports SD/USB
****************************************************************************/ ****************************************************************************/
#ifndef __SDFILEIO__ #ifndef __SDFILEIO__
#define __SDFILEIO__ #define __SDFILEIO__

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 May 2007
* Tantric August 2008
* *
* smbload.cpp * smbload.cpp
* *

View File

@ -1,9 +1,7 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006 * Tantric September 2008
* crunchy2 May 2007
* Tantric August 2008
* *
* smbload.h * smbload.h
* *

View File

@ -1,8 +1,12 @@
/**************************************************************************** /****************************************************************************
* VisualBoyAdvance 1.7.2 * Visual Boy Advance GX
* Nintendo GameCube Wrapper *
****************************************************************************/ * Tantric September 2008
*
* vba.cpp
*
* This file controls overall program flow. Most things start and end here!
***************************************************************************/
#include <gccore.h> #include <gccore.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,11 +1,9 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May 2007-July 2007
* Tantric September 2008 * Tantric September 2008
* *
* snes9xGX.h * vba.h
* *
* This file controls overall program flow. Most things start and end here! * This file controls overall program flow. Most things start and end here!
***************************************************************************/ ***************************************************************************/
@ -14,9 +12,9 @@
#define _VBA_H_ #define _VBA_H_
#include <gccore.h> #include <gccore.h>
#define VERSIONNUM "1.0.0"
#define VERSIONNUM "1.0.0" #define VERSIONSTR "VBA GX 1.0.0"
#define VERSIONSTR "VBA GX 1.0.0" #define VERSIONSTRFULL "Visual Boy Advance GX 1.0.0"
#define NOTSILENT 0 #define NOTSILENT 0
#define SILENT 1 #define SILENT 1

View File

@ -1,15 +1,11 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May 2007
* Tantric September 2008 * Tantric September 2008
* *
* s9xconfig.cpp * vbaconfig.cpp
* *
* Configuration parameters are here for easy maintenance. * Configuration parameters are here for easy maintenance
* Refer to Snes9x.h for all combinations.
* The defaults used here are taken directly from porting.html
***************************************************************************/ ***************************************************************************/
#include <gccore.h> #include <gccore.h>

View File

@ -1,15 +1,11 @@
/**************************************************************************** /****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* softdev July 2006
* crunchy2 May 2007
* Tantric September 2008 * Tantric September 2008
* *
* s9xconfig.h * vbaconfig.h
* *
* Configuration parameters are here for easy maintenance. * Configuration parameters are here for easy maintenance
* Refer to Snes9x.h for all combinations.
* The defaults used here are taken directly from porting.html
***************************************************************************/ ***************************************************************************/
#ifndef _VBACONFIG_ #ifndef _VBACONFIG_

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Visual Boy Advance 1.7.2 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* Tantric September 2008 * Tantric September 2008
* *

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Visual Boy Advance 1.7.2 Nintendo Wii/Gamecube Port * Visual Boy Advance GX
* *
* Tantric September 2008 * Tantric September 2008
* *

View File

@ -1,25 +1,15 @@
/**************************************************************************** /****************************************************************************
* Generic GX Support for Emulators * Visual Boy Advance GX
* softdev 2007 *
* * Tantric September 2008
* This program is free software; you can redistribute it and/or modify * softdev 2007
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * video.cpp
* (at your option) any later version. *
* * Generic GX Support for Emulators
* This program is distributed in the hope that it will be useful, * NGC GX Video Functions
* but WITHOUT ANY WARRANTY; without even the implied warranty of * These are pretty standard functions to setup and use GX scaling.
* 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.
*
* NGC GX Video Functions
*
* These are pretty standard functions to setup and use GX scaling.
****************************************************************************/
#include <gccore.h> #include <gccore.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,25 +1,16 @@
/**************************************************************************** /****************************************************************************
* Generic GX Scaler * Visual Boy Advance GX
* softdev 2007 *
* * Tantric September 2008
* This program is free software; you can redistribute it and/or modify * softdev 2007
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * video.h
* (at your option) any later version. *
* * Generic GX Support for Emulators
* This program is distributed in the hope that it will be useful, * NGC GX Video Functions
* but WITHOUT ANY WARRANTY; without even the implied warranty of * These are pretty standard functions to setup and use GX scaling.
* 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.
*
* NGC GX Video Functions
*
* These are pretty standard functions to setup and use GX scaling.
****************************************************************************/
#ifndef __GXHDR__ #ifndef __GXHDR__
#define __GXHDR__ #define __GXHDR__

View File

@ -1,9 +1,14 @@
#ifdef HW_RVL
/**************************************************************************** /****************************************************************************
* VisualBoyAdvance 1.7.2 * Visual Boy Advance GX
* *
* GameBoy Advance Virtual Memory Paging * Tantric September 2008
****************************************************************************/ *
* vmmem.cpp
*
* GameBoy Advance Virtual Memory Paging
***************************************************************************/
#ifdef HW_RVL
#include "sdfileio.h" #include "sdfileio.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -196,11 +201,7 @@ u8 VMRead8( u32 address )
} }
#else #else
/****************************************************************************
* VisualBoyAdvance 1.7.2
*
* GameBoy Advance Virtual Memory Paging
****************************************************************************/
#include "sdfileio.h" #include "sdfileio.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,8 +1,13 @@
/**************************************************************************** /****************************************************************************
* VisualBoyAdvance 1.7.2 * Visual Boy Advance GX
* *
* GameBoy Advance Virtual Memory Paging * Tantric September 2008
****************************************************************************/ *
* vmmem.h
*
* GameBoy Advance Virtual Memory Paging
***************************************************************************/
#ifndef __VBAVMHDR__ #ifndef __VBAVMHDR__
#define __VBAVMHDR__ #define __VBAVMHDR__