From 2472adacdd18aebb1450702d5f5e0af0794cc0d2 Mon Sep 17 00:00:00 2001 From: ekeeke31 Date: Fri, 12 Dec 2008 15:38:04 +0000 Subject: [PATCH] updated documentation --- source/ngc/config.h | 2 +- source/ngc/filemem.c | 3 +-- source/ngc/gui/font.c | 1 - source/ngc/gui/legal.c | 2 +- source/ngc/gui/menu.c | 6 +++--- source/ngc/ngc.c | 17 ++++++++--------- source/ngc/ogc_audio.c | 2 +- source/ngc/ogc_audio.h | 2 +- source/ngc/ogc_video.c | 6 +++--- source/ngc/ogc_video.h | 2 +- source/ngc/osd.h | 1 + 11 files changed, 21 insertions(+), 23 deletions(-) diff --git a/source/ngc/config.h b/source/ngc/config.h index 400b109..94a5111 100644 --- a/source/ngc/config.h +++ b/source/ngc/config.h @@ -66,7 +66,7 @@ t_config config; extern void config_save(); extern void config_load(); extern void set_config_defaults(void); -extern bool fat_enabled; + #endif /* _CONFIG_H_ */ diff --git a/source/ngc/filemem.c b/source/ngc/filemem.c index ba018ee..44818b8 100644 --- a/source/ngc/filemem.c +++ b/source/ngc/filemem.c @@ -88,7 +88,6 @@ void memfile_autosave() ManageState(0,config.freeze_auto); SILENT = 0; - return; } @@ -605,7 +604,7 @@ int ManageState (u8 direction, u8 device) CARD_Unmount (CARDSLOT); /*** Load State ***/ - state_load(&savebuffer[2112]); + state_load(&savebuffer[2112]); /*** Inform user ***/ sprintf (action, "Loaded %d bytes successfully", size); diff --git a/source/ngc/gui/font.c b/source/ngc/gui/font.c index 7f819ca..831d1c1 100644 --- a/source/ngc/gui/font.c +++ b/source/ngc/gui/font.c @@ -344,7 +344,6 @@ u8 SILENT = 0; void SetScreen () { - VIDEO_SetNextFramebuffer (xfb[whichfb]); VIDEO_Flush (); VIDEO_WaitVSync (); diff --git a/source/ngc/gui/legal.c b/source/ngc/gui/legal.c index b9c3150..8f58803 100644 --- a/source/ngc/gui/legal.c +++ b/source/ngc/gui/legal.c @@ -1,7 +1,7 @@ /**************************************************************************** * legal.c * - * generic legal informations screen + * legal informations screen * * code by Softdev (2006), Eke-Eke (2007,2008) * diff --git a/source/ngc/gui/menu.c b/source/ngc/gui/menu.c index f80727c..f4bc9ae 100644 --- a/source/ngc/gui/menu.c +++ b/source/ngc/gui/menu.c @@ -234,11 +234,11 @@ void miscmenu () if (config.bios_enabled & 1) sprintf (items[2], "Use BIOS: ON"); else sprintf (items[2], "Use BIOS: OFF"); sprintf (items[3], "SVP Cycles: %d", SVP_cycles); - if (config.sram_auto == 0) sprintf (items[4], "Auto SRAM: SDCARD"); + if (config.sram_auto == 0) sprintf (items[4], "Auto SRAM: FAT"); else if (config.sram_auto == 1) sprintf (items[4], "Auto SRAM: MCARD A"); else if (config.sram_auto == 2) sprintf (items[4], "Auto SRAM: MCARD B"); else sprintf (items[4], "Auto SRAM: OFF"); - if (config.freeze_auto == 0) sprintf (items[5], "Auto FREEZE: SDCARD"); + if (config.freeze_auto == 0) sprintf (items[5], "Auto FREEZE: FAT"); else if (config.freeze_auto == 1) sprintf (items[5], "Auto FREEZE: MCARD A"); else if (config.freeze_auto == 2) sprintf (items[5], "Auto FREEZE: MCARD B"); else sprintf (items[5], "Auto FREEZE: OFF"); @@ -816,7 +816,7 @@ int loadsavemenu (int which) while (quit == 0) { - if (device == 0) sprintf(items[0], "Device: SDCARD"); + if (device == 0) sprintf(items[0], "Device: FAT"); else if (device == 1) sprintf(items[0], "Device: MCARD A"); else if (device == 2) sprintf(items[0], "Device: MCARD B"); diff --git a/source/ngc/ngc.c b/source/ngc/ngc.c index 23a47a1..fe42764 100644 --- a/source/ngc/ngc.c +++ b/source/ngc/ngc.c @@ -22,9 +22,9 @@ ***************************************************************************/ #include "shared.h" -#include "gcaram.h" #include "font.h" #include "history.h" +#include "gcaram.h" #ifdef HW_DOL #include "dvd.h" @@ -47,7 +47,7 @@ void Power_Off(void) /*************************************************************************** - * Genesis Virtual Machine + * Genesis Plus Virtual Machine * ***************************************************************************/ static void load_bios() @@ -57,7 +57,7 @@ static void load_bios() /* reset BIOS found flag */ config.bios_enabled &= ~2; - /* open file */ + /* open BIOS file */ sprintf (pathname, "%s/BIOS.bin",DEFAULT_PATH); FILE *fp = fopen(pathname, "rb"); if (fp == NULL) return; @@ -82,9 +82,12 @@ static void init_machine (void) /* Allocate cart_rom here */ cart_rom = memalign(32, 10 * 1024 * 1024); + /* BIOS support */ + load_bios(); + /* allocate global work bitmap */ memset (&bitmap, 0, sizeof (bitmap)); - bitmap.width = 360 * 2; + bitmap.width = 720; bitmap.height = 576; bitmap.depth = 16; bitmap.granularity = 2; @@ -93,15 +96,11 @@ static void init_machine (void) bitmap.viewport.h = 224; bitmap.viewport.x = 0; bitmap.viewport.y = 0; - bitmap.remap = 1; bitmap.data = texturemem; /* default system */ input.system[0] = SYSTEM_GAMEPAD; input.system[1] = SYSTEM_GAMEPAD; - - /* BIOS support */ - load_bios(); } /************************************************** @@ -175,7 +174,7 @@ int main (int argc, char *argv[]) set_history_defaults(); history_load(); - /* Initialize Genesis Virtual Machine */ + /* Initialize Virtual Machine */ init_machine (); /* Load any injected rom */ diff --git a/source/ngc/ogc_audio.c b/source/ngc/ogc_audio.c index 4142db2..051c7fd 100644 --- a/source/ngc/ogc_audio.c +++ b/source/ngc/ogc_audio.c @@ -1,5 +1,5 @@ /**************************************************************************** - * ogc_video.c + * ogc_audio.c * * Genesis Plus GX audio support * diff --git a/source/ngc/ogc_audio.h b/source/ngc/ogc_audio.h index 4253895..c8a0ea0 100644 --- a/source/ngc/ogc_audio.h +++ b/source/ngc/ogc_audio.h @@ -1,5 +1,5 @@ /**************************************************************************** - * ogc_video.c + * ogc_audio.c * * Genesis Plus GX audio support * diff --git a/source/ngc/ogc_video.c b/source/ngc/ogc_video.c index 7bdd07b..6940388 100644 --- a/source/ngc/ogc_video.c +++ b/source/ngc/ogc_video.c @@ -35,7 +35,7 @@ sms_ntsc_setup_t sms_setup; sms_ntsc_t sms_ntsc; /*** PAL 50hz flag ***/ -int gc_pal = 0; +BOOL gc_pal = 0; /*** VI ***/ unsigned int *xfb[2]; /*** Double buffered ***/ @@ -44,9 +44,9 @@ GXRModeObj *vmode; /*** Menu video mode ***/ u8 *texturemem; /*** Texture Data ***/ /*** GX ***/ -#define TEX_WIDTH 360 * 2 +#define TEX_WIDTH 720 #define TEX_HEIGHT 576 -#define TEX_SIZE TEX_WIDTH * TEX_HEIGHT * 2 +#define TEX_SIZE (TEX_WIDTH * TEX_HEIGHT * 2) #define DEFAULT_FIFO_SIZE 256 * 1024 #define HASPECT 320 #define VASPECT 240 diff --git a/source/ngc/ogc_video.h b/source/ngc/ogc_video.h index 1425dd1..2ecb729 100644 --- a/source/ngc/ogc_video.h +++ b/source/ngc/ogc_video.h @@ -28,7 +28,7 @@ extern void ogc_video__init(void); extern void ogc_video__update(void); extern void ogc_video__reset(void); -extern int gc_pal; +extern BOOL gc_pal; extern unsigned int *xfb[2]; extern int whichfb; extern GXRModeObj *tvmodes[6]; diff --git a/source/ngc/osd.h b/source/ngc/osd.h index b095b9e..989446b 100644 --- a/source/ngc/osd.h +++ b/source/ngc/osd.h @@ -41,5 +41,6 @@ extern int peripherals; extern int frameticker; extern int FramesPerSecond; extern int Shutdown; +extern bool fat_enabled; #endif /* _OSD_H_ */