add 2008-03-31 release

This commit is contained in:
dsbomb 2008-04-03 04:04:53 +00:00
parent 11f8c6a70f
commit 345fa23539
17 changed files with 506 additions and 89 deletions

163
Makefile.gc Normal file
View File

@ -0,0 +1,163 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/gamecube_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := fceu_gc
BUILD := build
#SOURCES := source source/sz source/boards source/linux source/linux/bits source/linux/gnu source/palettes source/fir source/input source/rom source/mappers source/mbshare source/drivers source/drivers/common source/drivers/gamecube source/iplfont
SOURCES := source source/boards source/mappers source/input \
source/mbshare source/drivers/common \
source/drivers/gamecube source/roms \
source/iplfont source/sz
DATA := data
INCLUDES := source/sz
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -Os -Wall $(MACHDEP) $(INCLUDE) -DFCEU_VERSION_NUMERIC=9812 -DNGC=1 \
-DZLIB -DBIG_ENDIAN -DHAVE_ASPRINTF=1 -DSTDC \
-D_SZ_ONE_DIRECTORY=1 -D_LZMA_IN_CB=1 -D_LZMA_OUT_READ
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -logc -lm -lz -lsdcard
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS :=
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol source/tags
#---------------------------------------------------------------------------------
run:
psoload $(TARGET).dol
#---------------------------------------------------------------------------------
reload:
psoload -r $(TARGET).dol
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
tags:
@( cd source; ctags *.c *.h \
boards/*.c boards/*.h \
mappers/*.c mappers/*.h \
input/*.c input/*.h \
mbshare/*.c mbshare/*.h \
drivers/common/*.c drivers/common/*.h \
drivers/gamecube/*.c drivers/gamecube/*.h \
iplfont/*.c iplfont/*.h \
sz/*.c sz/*.h \
/opt/devkitpro/libogc/include/*.h \
/opt/devkitpro/libogc/include/mad/*.h \
/opt/devkitpro/libogc/include/ogc/*.h \
/opt/devkitpro/libogc/include/modplay/*.h \
/opt/devkitpro/libogc/include/sdcard/*.h \
/opt/devkitpro/libjpeg/include/jpeg/*.h \
/opt/devkitpro/libfreetype/include/*.h \
/opt/devkitpro/libfreetype/include/freetype/*.h )

4
Makefile.gc.bat Normal file
View File

@ -0,0 +1,4 @@
cp Makefile.gc Makefile
make
rm Makefile
rm -d build/*.*

4
Makefile.orig.bat Normal file
View File

@ -0,0 +1,4 @@
cp Makefile.orig Makefile
make
rm Makefile
rm -d build/*.*

146
Makefile.wii Normal file
View File

@ -0,0 +1,146 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/wii_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := fceugcwi
BUILD := build
#SOURCES := source source/sz source/boards source/linux source/linux/bits source/linux/gnu source/palettes source/fir source/input source/rom source/mappers source/mbshare source/drivers source/drivers/common source/drivers/gamecube source/iplfont
SOURCES := source source/boards source/mappers source/input \
source/mbshare source/drivers/common \
source/drivers/gamecube source/roms \
source/iplfont source/sz
DATA := data
INCLUDES := source/sz
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
#CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DFCEU_VERSION_NUMERIC=9812 -DNGC=1 -DZLIB -DBIG_ENDIAN -DHAVE_ASPRINTF=1 -DSTDC -D_SZ_ONE_DIRECTORY=1 -D_LZMA_IN_CB=1 -D_LZMA_OUT_READ
CFLAGS = -g -Os -Wall $(MACHDEP) $(INCLUDE) -DFCEU_VERSION_NUMERIC=9812 -DNGC=1 \
-DZLIB -DBIG_ENDIAN -DHAVE_ASPRINTF=1 -DSTDC \
-D_SZ_ONE_DIRECTORY=1 -D_LZMA_IN_CB=1 -D_LZMA_OUT_READ
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -logc -lm -lz -lsdcard
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS :=
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol source/tags
#---------------------------------------------------------------------------------
run:
psoload $(TARGET).dol
#---------------------------------------------------------------------------------
reload:
psoload -r $(TARGET).dol
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

4
Makefile.wii.bat Normal file
View File

@ -0,0 +1,4 @@
cp Makefile.wii Makefile
make
rm Makefile
rm build/*.*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<pd><ViewState><e p="fceugc" x="true"></e><e p="fceugc\input" x="false"></e><e p="fceugc\iplfont" x="false"></e><e p="fceugc\mappers" x="false"></e><e p="fceugc\ngc" x="false"></e><e p="fceugc\boards" x="false"></e><e p="fceugc\common" x="false"></e><e p="fceugc\roms" x="false"></e><e p="fceugc\source" x="false"></e><e p="fceugc\sz" x="false"></e><e p="fceugc\mbshare" x="false"></e></ViewState></pd>
<pd><ViewState><e p="fceugc" x="true"></e><e p="fceugc\input" x="false"></e><e p="fceugc\iplfont" x="false"></e><e p="fceugc\mappers" x="false"></e><e p="fceugc\ngc" x="false"></e><e p="fceugc\boards" x="false"></e><e p="fceugc\common" x="false"></e><e p="fceugc\makefiles" x="true"></e><e p="fceugc\roms" x="false"></e><e p="fceugc\source" x="false"></e><e p="fceugc\sz" x="false"></e><e p="fceugc\mbshare" x="false"></e></ViewState></pd>

View File

@ -9,12 +9,29 @@ This new version have asako and _svpe_ lastest added options.
Enjoy it!
Askot.
What's new [20080331]
+[Askot]
- Fixed/changed SDCARD slot selection for searching roms, at
start you will be prompted for this option.
- Code cleanup.
+[dsbomb]
- Added Wii mode support.
- Give a "Bad cartridge" error instead of locking up.
- Joystick fixes due to libogc r14's changed stick values
- Rearranged menu to make more sense, and consistent with Snes9x
- Add "Reboot" menu option
- Removed "." directory from SD card listing, it's pointless
- Expand DVD reading to DVD9 size (once DVDs are working again)
- Added option to go back a menu by pressing B.
What's new? Askot [20080326]
- Added saving state in SD Card (State files will be saved in root of SDCARD).
*Note: I can't make it work to save in root:\fceugc\saves, so help needed.
*Note: I can't make it work to save in root:\fceu\saves, so help needed.
- Added SDCARD slot selection for searching roms, meaning, you can search roms
from SDCARD SLOT A & SLOT B (Beta, meaning, buggy, but works).
- For standarization, you must create folders root:\fceugc\roms to read NES
- For standarization, you must create folders root:\fceu\roms to read NES
roms files from SDCARD.
- Added C-Left to call Menu.
- Reading files from SD Card it's faster, now they're called from cache

View File

@ -59,6 +59,7 @@ int UseSDCARD = 0;
sd_file * filehandle;
char rootSDdir[SDCARD_MAX_PATH_LEN];
int haveSDdir = 0;
int sdslot = 0;
/****************************************************************************
* DVD Lowlevel Functions
@ -199,7 +200,7 @@ unsigned int dvd_read(void *dst, unsigned int len, u64 offset)
DCInvalidateRange ((void *) buffer, len);
if (offset < 0x57057C00 || (isWii == true && offset < 0x118244F00LL)) // don't read past the end of the dvd
if (offset < 0x57057C00 || (isWii == true && offset < 0x1FD3E0000LL)) // don't read past the end of the dvd
{
dvd[0] = 0x2E;
dvd[1] = 0;
@ -432,7 +433,7 @@ int updateSDdirname()
int size=0;
char *test;
char temp[1024];
char tmpCompare[1024];
// char tmpCompare[1024];
/* current directory doesn't change */
if (strcmp(filelist[selection].filename,".") == 0) return 0;
@ -454,9 +455,8 @@ int updateSDdirname()
rootSDdir[size] = 0;
/* handles root name */
sprintf(tmpCompare, "dev%d:",choosenSDSlot);
if (strcmp(rootSDdir,tmpCompare) == 0)sprintf(rootSDdir,"dev%d:\\fceu\\..", choosenSDSlot);
//if (strcmp(rootSDdir,"dev0:") == 0) sprintf(rootSDdir,"dev0:\\fceu\\..");
//sprintf(tmpCompare, "dev%d:",choosenSDSlot);
if (strcmp(rootSDdir, sdslot ? "dev1:":"dev0:") == 0)sprintf(rootSDdir,"dev%d:\\fceu\\..", sdslot);
return 1;
}
@ -466,9 +466,9 @@ int updateSDdirname()
if ((strlen(rootSDdir)+1+strlen(filelist[selection].filename)) < SDCARD_MAX_PATH_LEN)
{
/* handles root name */
sprintf(tmpCompare, "dev%d:\\fceu\\..",choosenSDSlot);
if (strcmp(rootSDdir, tmpCompare) == 0) sprintf(rootSDdir,"dev%d:",choosenSDSlot);
//if (strcmp(rootSDdir,"dev0:\\fceu\\..") == 0) sprintf(rootSDdir,"dev0:");
//sprintf(tmpCompare, "dev%d:\\fceu\\..",choosenSDSlot);
//if (strcmp(rootSDdir, tmpCompare) == 0) sprintf(rootSDdir,"dev%d:",choosenSDSlot);
if (strcmp(rootSDdir, sdslot ? "dev1:\\fceu\\.." : "dev0:\\fceu\\..") == 0) sprintf(rootSDdir,"dev%d:",sdslot);
/* update current directory name */
sprintf(rootSDdir, "%s\\%s",rootSDdir, filelist[selection].filename);
@ -490,6 +490,7 @@ int parseSDdirectory()
{
int entries = 0;
int nbfiles = 0;
int numstored = 0;
DIR *sddir = NULL;
/* initialize selection */
@ -504,11 +505,14 @@ int parseSDdirectory()
while (entries)
{
memset (&filelist[nbfiles], 0, sizeof (FILEENTRIES));
strncpy(filelist[nbfiles].filename,(const char*)sddir[nbfiles].fname,MAXJOLIET);
filelist[nbfiles].filename[MAXJOLIET-1] = 0;
filelist[nbfiles].length = sddir[nbfiles].fsize;
filelist[nbfiles].flags = (char)(sddir[nbfiles].fattr & SDCARD_ATTR_DIR);
if (strcmp((const char*)sddir[nbfiles].fname, ".") != 0) { // Skip "." directory
memset (&filelist[numstored], 0, sizeof (FILEENTRIES));
strncpy(filelist[numstored].filename,(const char*)sddir[nbfiles].fname,MAXJOLIET);
filelist[numstored].filename[MAXJOLIET-1] = 0;
filelist[numstored].length = sddir[nbfiles].fsize;
filelist[numstored].flags = (char)(sddir[nbfiles].fattr & SDCARD_ATTR_DIR);
numstored++;
}
nbfiles++;
entries--;
}
@ -564,7 +568,8 @@ void ShowFiles( int offset, int selection )
* Let user select another ROM to load
****************************************************************************/
bool inSz = false;
#define PADCAL 70
//#define PADCAL 70
extern int PADCAL;
void FileSelector()
{
@ -802,7 +807,7 @@ int OpenDVD()
{
int i, j;
int driveid;//char debug[128];
int driveid=-99;
haveSDdir = 0;
@ -812,10 +817,6 @@ int OpenDVD()
/*** Make sure it's one I now about ***/
if ( ( driveid != 4 ) && ( driveid != 6 ) && ( driveid != 8 ) ) {
/*sprintf(debug, "Unknown drive id! (%d) ... Halted", driveid);
WaitPrompt(debug);
return 0;*/
// if the driveid isn't 4, 6 or 8 we are running on a Wii
isWii = true;
}
@ -888,12 +889,13 @@ int OpenDVD()
return 1;
}
int OpenSD ()
{
UseSDCARD = 1;
char msg[128];
if (choosenSDSlot != sdslot) haveSDdir = 0;
if (haveSDdir == 0)
{
/* don't mess with DVD entries */
@ -901,7 +903,7 @@ int OpenSD ()
/* Reset SDCARD root directory */
sprintf(rootSDdir,"dev%d:\\fceu\\roms",choosenSDSlot);
//sprintf(rootSDdir,"dev0:\\fceu\\roms");
sdslot = choosenSDSlot;
/* Parse initial root directory and get entries list */
ShowAction("Reading Directory ...");

View File

@ -84,6 +84,42 @@ void WaitPrompt( char *msg )
}
}
/**
* Wait for user to press A or B. Returns 0 = B; 1 = A
*/
int WaitButtonAB ()
{
int btns;
while ( (PAD_ButtonsDown (0) & (PAD_BUTTON_A | PAD_BUTTON_B)) );
while ( TRUE )
{
btns = PAD_ButtonsDown (0);
if ( btns & PAD_BUTTON_A )
return 1;
else if ( btns & PAD_BUTTON_B )
return 0;
}
}
/**
* Show a prompt with choice of two options. Returns 1 if A button was pressed
and 0 if B button was pressed.
*/
int WaitPromptChoice (char *msg, char *bmsg, char *amsg)
{
char choiceOption[80];
sprintf (choiceOption, "B = %s : A = %s", bmsg, amsg);
ClearScreen ();
WriteCentre(220, msg);
WriteCentre(220 + font_height, choiceOption);
SetScreen ();
return WaitButtonAB ();
}
void ShowAction( char *msg )
{
memcpy (xfb[whichfb], &backdrop, 1280 * 480);

View File

@ -54,7 +54,8 @@ extern unsigned char GetAnalog(int Joy);
#define MAXPAL 12
#define SCROLLY 380
#define SCROLLY 395
#define SOFTRESET_ADR ((volatile u32*)0xCC003024)
/* color palettes */
struct
@ -399,7 +400,7 @@ int configpadcount = 10;
char padmenu[10][30] = {
{ "NES BUTTON A - A" }, { " BUTTON B - B" }, { " START - S" },
{ " SELECT - Z" }, { " TURBO A - X" }, { " TURBO B - Y" },
{ " FOUR SCORE - OFF" }, { " ANALOG CLIP - 70"}, { " TURBO SPEED - 30.00 pps" },
{ " FOUR SCORE - OFF" }, { " ANALOG CLIP - 40"}, { " TURBO SPEED - 30.00 pps" },
{ "Return to previous" }
};
@ -508,6 +509,10 @@ void ConfigPAD()
}
}
if ( j & PAD_BUTTON_B ) {
quit=1; return;
}
if ( menu < 0 ) menu = configpadcount - 1;
if ( menu == configpadcount ) menu = 0;
@ -597,6 +602,8 @@ int StateManager()
}
}
if ( j & PAD_BUTTON_B ) quit = 1;
if ( menu < 0 )
menu = mccount - 1;
@ -727,6 +734,7 @@ int VideoEnhancements()
}
}
if ( j & PAD_BUTTON_B ) quit = 1;
if ( menu < 0 )
menu = vecount - 1;
@ -793,7 +801,7 @@ void ShowROMInfo()
SetScreen();
while ( !(PAD_ButtonsDown(0) & PAD_BUTTON_A ) )
while ( !(PAD_ButtonsDown(0) & (PAD_BUTTON_A | PAD_BUTTON_B)) )
{ VIDEO_WaitVSync(); }
}
@ -802,10 +810,11 @@ void ShowROMInfo()
* Media Select Screen
****************************************************************************/
int mediacount = 4;
char mediamenu[4][30] = {
int mediacount = 3;
char mediamenu[3][30] = {
{ "Load from DVD" }, { "Load from SDCARD"},
{ "Rom loading in SDCARD: SLOT A" }, { "Return to previous" }
//{ "Rom loading in SDCARD: SLOT A" },
{ "Return to previous" }
};
unsigned char msstext[][512] = {
@ -815,7 +824,7 @@ unsigned char msstext[][512] = {
{ "How can You wait this long?! The games are waiting for You!!" }
};
int choosenSDSlot = 0;
//int choosenSDSlot = 0;
int MediaSelect()
{
@ -849,26 +858,28 @@ int MediaSelect()
if ( j & PAD_BUTTON_A ) {
redraw = 1;
switch ( menu ) {
case 0: UseSDCARD = 0;
case 0: UseSDCARD = 0; //DVD
OpenDVD();
return 1;
break;
case 1: UseSDCARD = 1;
case 1: UseSDCARD = 1; //SDCard
OpenSD();
return 1;
break;
case 2:
choosenSDSlot ^= 1;
/*case 2: choosenSDSlot ^= 1; //Pick Slot
sprintf(mediamenu[2], (!choosenSDSlot) ? "Rom loading in SDCARD: SLOT A" : "Rom loading in SDCARD: SLOT B");
break;
case 3: quit = 1;
break;*/
case 2: quit = 1; //Previous
break;
default: break ;
}
}
if ( j & PAD_BUTTON_B )
quit = 1;
if ( menu == mediacount )
menu = 0;
@ -898,8 +909,8 @@ char credits[12][512] = {
{ "Misc. addons by KruLLo" },
{ "Extras features Askot" },
{ "Thank you to" },
{ "brakken, mithos, luciddream, HonkeyKong" },
{ "... and everyone who supported v1.0!" }
{ "brakken, mithos, luciddream, HonkeyKong," },
{ "dsbomb for bringing it to the Wii" },
};
void ShowCredits(){
@ -927,24 +938,31 @@ void ShowCredits(){
SetScreen();
while ( !(PAD_ButtonsDown(0) & PAD_BUTTON_A ) )
while ( !(PAD_ButtonsDown(0) & (PAD_BUTTON_A | PAD_BUTTON_B)) )
{ VIDEO_WaitVSync(); }
}
/****************************************************************************
* Configuration Screen
****************************************************************************/
int configmenucount = 10;
char configmenu[10][30] = {
{ "Play Game" }, { "Game Information" }, { "Configure Joypads" },
{ "Video Options" }, { "Load new Game" }, { "Reset NES" },
{ "Stop DVD Motor" }, { "STATE Manager" }, { "PSO/SD Reload" } ,
int configmenucount = 11;
char configmenu[11][30] = {
{ "Play Game" },
{ "Reset NES" },
{ "Load New Game" },
{ "State Manager" },
{ "ROM Information" },
{ "Configure Joypads" },
{ "Video Options" },
{ "Stop DVD Motor" },
{ "PSO/SD Reload" } ,
{ "Reboot Gamecube" },
{ "Credits" }
};
unsigned char cstext[][512] = {
//ConfigScreen
{ "FCE Ultra GameCube Edition - Version 1.0.8 \"SUPER-DELUXE\" ;)" },
{ "FCE Ultra GameCube Edition - Version 1.0.9 \"SUPER-DELUXE\" ;)" },
{ "Press L + R anytime to return to this menu!" },
{ "Press START + B + X anytime for PSO/SD-reload" },
{ "* * *" },
@ -960,7 +978,7 @@ int ConfigScreen()
short j;
int redraw = 1;
int *psoid = (int *) 0x80001800;
//int *psoid = (int *) 0x80001800;
void (*PSOReload) () = (void (*)()) 0x80001800;
/*** Stop any running Audio ***/
@ -1008,43 +1026,57 @@ int ConfigScreen()
if (j & PAD_BUTTON_A ) {
redraw = 1;
switch ( menu ) {
case 0: quit = 1; break;
case 1: ShowROMInfo(); break;
case 2: ConfigPAD(); scrollerx = 320 - MARGIN; break;
case 3: if (VideoEnhancements())
return 2;
scrollerx = 320 - MARGIN;
case 0: // Play Game
quit = 1;
break;
case 4: if (MediaSelect()) {
GCMemROM(); /* Fix by Garglub. Thanks! */
return 1;
}
scrollerx = 320 - MARGIN;
break;
case 5: ResetNES();
case 1: // Reset NES
ResetNES();
return 1;
break;
case 6: ShowAction("Stopping Motor");
case 2: // Load new Game
//if (MediaSelect()) {
// if (GCMemROM() >= 0) return 1;/* Fix by Garglub. Thanks! */
//}
MediaSelect();
scrollerx = 320 - MARGIN;
break;
case 3: // State Manager
if (StateManager()) return 2;
scrollerx = 320 - MARGIN;
break;
case 4: // Game Information
ShowROMInfo();
break;
case 5: // COnfigure Joypads
ConfigPAD();
scrollerx = 320 - MARGIN;
break;
case 6: // Video Options
if (VideoEnhancements()) return 2;
scrollerx = 320 - MARGIN;
break;
case 7: // Stop DVD Motor
ShowAction("Stopping Motor");
dvd_motor_off();
WaitPrompt("DVD Motor Stopped");
break;
case 7: if (StateManager())
return 2;
scrollerx = 320 - MARGIN;
break;
case 8:
case 8: // PSO/SD Reload
PSOReload ();
break;
case 9:
case 9: // Reboot
*SOFTRESET_ADR = 0x00000000;
break;
case 10: // Credits
ShowCredits();
break;

View File

@ -44,10 +44,19 @@ long long basetime;
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);
void (*PSOReload) () = (void (*)()) 0x80001800;
static void reset_cb() {
PSOReload();
}
extern int WaitPromptChoice (char *msg, char *bmsg, char *amsg);
int choosenSDSlot = 0;
int main(int argc, char *argv[])
{
initDisplay();
SYS_SetResetCallback (reset_cb);
InitialiseSound();
SDCARD_Init ();
@ -69,6 +78,7 @@ int main(int argc, char *argv[])
cleanSFMDATA();
GCMemROM();
choosenSDSlot = !WaitPromptChoice("Choose a SLOT to load Roms from SDCARD", "SLOT B", "SLOT A");
ConfigScreen();
while (1)

View File

@ -62,12 +62,11 @@ int GCMemROM()
FCEU_ResetPalette();
FCEU_ResetMessages(); // Save state, status messages, etc.
SetSoundVariables();
}
else
{
printf("Bad cartridge!");
while(1) {};
WaitPrompt("Bad cartridge!");
return -1;
}
return 0;;

View File

@ -239,7 +239,7 @@ int GCFCEUSS_Save()
static unsigned char header[16] = "FCS\xff";
char chunk[] = "CHKE";
int zero = 0;
char Comment[2][32] = { { "FCEU GC Version 1.0.8" }, { "A GAME" } };
char Comment[2][32] = { { "FCEU GC Version 1.0.9" }, { "A GAME" } };
memopen(); /*** Reset Memory File ***/

View File

@ -86,7 +86,7 @@ unsigned char DecodeJoy( unsigned short pp )
*
* Additional check for Analog X/Y
****************************************************************************/
int PADCAL = 70;
int PADCAL = 40;
unsigned char GetAnalog(int Joy)
{
@ -138,7 +138,7 @@ int GetJoy()
/*** Look for config menu ***/
signed char px;
px = PAD_SubStickX (0);
if (((px < -70)) || (PAD_ButtonsHeld(0) == ( PAD_TRIGGER_L | PAD_TRIGGER_R ))) {
if (((px < -PADCAL)) || (PAD_ButtonsHeld(0) == ( PAD_TRIGGER_L | PAD_TRIGGER_R ))) {
t = ConfigScreen();
if (t == 1) {
return 1;