diff --git a/Makefile b/Makefile index 65a1cb6..37da27d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -.PHONY = all wii gc wii-clean gc-clean wii-run gc-run +.PHONY = all wii gc wii-clean gc-clean wii-run gc-run mca mcb sd smb mca-clean mcb-clean sd-clean smb-clean specials specials-clean + +VERSION := 003 all: wii gc @@ -21,3 +23,42 @@ gc-clean: gc-run: $(MAKE) -f Makefile.gc run + +# Custom Quicksave Versions + +specials: sd mcb mca smb + +specials-clean: mca-clean mcb-clean smb-clean sd-clean + +mca: + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=0" "LOADTYPE:='"MCSLOTA"'" "VERSION:=$(VERSION)" -f Makefile.wii + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=0" "LOADTYPE:='"MCSLOTA"'" "VERSION:=$(VERSION)" -f Makefile.gc +mca-clean: + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=0" "LOADTYPE:='"MCSLOTA"'" "VERSION:=$(VERSION)" -f Makefile.wii clean + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=0" "LOADTYPE:='"MCSLOTA"'" "VERSION:=$(VERSION)" -f Makefile.gc clean + +mcb: + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=1" "LOADTYPE:='"MCSLOTB"'" "VERSION:=$(VERSION)" -f Makefile.wii + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=1" "LOADTYPE:='"MCSLOTB"'" "VERSION:=$(VERSION)" -f Makefile.gc +mcb-clean: + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=1" "LOADTYPE:='"MCSLOTB"'" "VERSION:=$(VERSION)" -f Makefile.wii clean + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=1" "LOADTYPE:='"MCSLOTB"'" "VERSION:=$(VERSION)" -f Makefile.gc clean + +sd: + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=3" "LOADTYPE:='"SD"'" "VERSION:=$(VERSION)" -f Makefile.wii + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=3" "LOADTYPE:='"SD"'" "VERSION:=$(VERSION)" -f Makefile.gc +sd-clean: + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=3" "LOADTYPE:='"SD"'" "VERSION:=$(VERSION)" -f Makefile.wii clean + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=3" "LOADTYPE:='"SD"'" "VERSION:=$(VERSION)" -f Makefile.gc clean + +smb: + touch source/ngc/snes9xGX.h + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=4" "LOADTYPE:='"SMB"'" "VERSION:=$(VERSION)" -f Makefile.gc +smb-clean: + $(MAKE) "CUSTOMFLAGS:=-DQUICK_SAVE_SLOT=4" "LOADTYPE:='"SMB"'" "VERSION:=$(VERSION)" -f Makefile.gc clean \ No newline at end of file diff --git a/Makefile.gc b/Makefile.gc index d61b024..8c83d0d 100644 --- a/Makefile.gc +++ b/Makefile.gc @@ -9,13 +9,16 @@ endif include $(DEVKITPPC)/gamecube_rules +LOADTYPE = '"sd"' +VERSION = '"version"' + #--------------------------------------------------------------------------------- # 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 := snes9xgx-mm-gc +TARGET := executables/snes9xgx-$(VERSION)-$(LOADTYPE)-gc BUILD := build_gc SOURCES := source/snes9x source/unzip source/ngc source/smb DATA := data @@ -25,18 +28,19 @@ INCLUDES := source/snes9x source/unzip source/ngc source/smb # options for code generation #--------------------------------------------------------------------------------- +CUSTOMFLAGS = -DQUICK_SAVE_SLOT=1 -DSMB_SVID='"Crunchewy"' \ + -DSMB_IP='"192.168.1.111"' -DGW_IP='"192.168.1.1"' + CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \ -DNGC -DNO_ASM -DCPU_SHUTDOWN -DSPC700C \ -DSPC700_SHUTDOWN -DNEW_COLOUR_BLENDING \ -DNO_INLINE_GET_SET -DSDD1_DECOMP -DCORRECT_VRAM_READS \ -DDETECT_NASTY_FX_INTERLEAVE -DNGC_ZOOM -DSDUSE_LFN \ - -DQUICK_SAVE_SLOT=4 -DSMB_SVID='"Crunchewy"' \ - -DSMB_IP='"192.168.1.111"' -DGW_IP='"192.168.1.1"' -DFORCE_WII=0 \ + -DFORCE_WII=0 $(CUSTOMFLAGS) \ -fomit-frame-pointer -fno-exceptions -Wno-unused-parameter -pipe CXXFLAGS = $(CFLAGS) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref -# -mogc #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project diff --git a/Makefile.wii b/Makefile.wii index 6bd1907..dd924ee 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -9,13 +9,17 @@ endif include $(DEVKITPPC)/wii_rules + +LOADTYPE = '"sd"' +VERSION = '"version"' + #--------------------------------------------------------------------------------- # 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 := snes9xgx-mm-wii +TARGET := executables/snes9xgx-$(VERSION)-$(LOADTYPE)-wii BUILD := build_wii SOURCES := source/snes9x source/unzip source/ngc source/smb DATA := data @@ -25,18 +29,19 @@ INCLUDES := source/snes9x source/unzip source/ngc source/smb # options for code generation #--------------------------------------------------------------------------------- +CUSTOMFLAGS = -DQUICK_SAVE_SLOT=3 -DSMB_SVID='"Crunchewy"' \ + -DSMB_IP='"192.168.1.111"' -DGW_IP='"192.168.1.1"' + CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \ -DNGC -DHW_RVL -DNO_ASM -DCPU_SHUTDOWN -DSPC700C \ -DSPC700_SHUTDOWN -DNEW_COLOUR_BLENDING \ -DNO_INLINE_GET_SET -DSDD1_DECOMP -DCORRECT_VRAM_READS \ -DDETECT_NASTY_FX_INTERLEAVE -DNGC_ZOOM -DSDUSE_LFN \ - -DQUICK_SAVE_SLOT=3 -DSMB_SVID='"Crunchewy"' \ - -DSMB_IP='"192.168.1.111"' -DGW_IP='"192.168.1.1"' -DFORCE_WII=1 \ + -DFORCE_WII=1 $(CUSTOMFLAGS)\ -fomit-frame-pointer -fno-exceptions -Wno-unused-parameter -pipe CXXFLAGS = $(CFLAGS) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref -# -mogc #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project diff --git a/README.txt b/README.txt index e424200..5016609 100644 --- a/README.txt +++ b/README.txt @@ -10,28 +10,30 @@ ­———————————————————————————————————————————————————————————————————————•ßrK• ×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· SNES9XGX v2.0.1b8 ·oø×O0| +|0O×øo· SNES9XGX v003 ·oø×O0| `¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' -******************************************************************************* -PLEASE NOTE: THIS DOCUMENT IS A WORK IN PROGRESS - IT IS INCOMPLETE AND SOME OF -THE INFORMATION IS OUT OF DATE -******************************************************************************* +PLEASE NOTE: THIS DOCUMENT IS A WORK IN PROGRESS -Welcome to the revolution in GameCube emulators! SNES9X is by far the most -complete and accurate Super Nintendo Entertainment System emulator to date. -Taking full power of the ATi-GX chipset and packed full of features that are -to die for after playing your games you'll never want to come back to -reality. +[What's New 003] -SNES9X is a very popular open source emulator mainly for the PC platform, but -has seen many ports to other consoles such as the Nintendo DS, Microsoft XBOX -and now thanks to SoftDev the Nintendo GameCube! This is a straight port and -is not based on any previous SNES emulators that have existed for the -GameCube. You can get more information on SNES9X here from the below URL. -http://snes9x.ipherswipsite.com/ +- added: alphabetical file sorting +- added: background logo/backdrop + nicer menus +- added: scrolling in ROM selector +- fixed: switching between pal/ntsc ROMS doesn't mess up timings +- fixed: GC controller config works now +- fixed: freeze autoloading on ROM load +- fixed: zipped ROMS should now load in a reasonable time +- fixed: precompiled dols for autosaving to various locations (see readme) +- changed: GC default quickload slot (to sd) (thanks kerframil) +- changed: default load/save dirs are now "/snes9x/roms" and + "/snes/save/" (thanks kerframil) +- changed: Classic X and Y defaults aren't switched +- changed: if autosave is enabled, it doesn't ask to save SRAM + anymore. It is saved in the background. +- updated README -[What's New 002] +[Whats Was New 002] - added: classic and nunchuk support - added: all controllers can now be configured - added: GC version (untested) @@ -49,6 +51,227 @@ http://snes9x.ipherswipsite.com/ - fixed: autoload sram/freeze - fixed: rom plays immediately after loading +[older update history at the bottom] + + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· FEATURES ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' +- Based on Snes9x 1.5 - superior ROM compatibility +- Auto Load/Save Freeze States and SRAM +- Custom controller configurations +- Wiimote, Nunchuk, Classic, and Gamecube controller support +- Autodetect PAL/NTSC +- Zip Support +- Open Source! + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· SETUP & INSTALLATION ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + +Unzip the archive into a folder. You'll find 4 variations of the dol for both +wii and gamecube versions. The variants auto save and load preferences and sram +to/from different locations as follows (you can also manually save and load +SRAM to any location). +[A default version is provided for quick install. See loading from HBC below.] + + filename preferences/sram autoloading location + ------------------------- ------------------------------------- + snes9xGX-003-sd-xxxx.dol SD card + snes9xGX-003-mcslota-xxxx.dol Memory card in slot A + snes9xGX-003-mcslotb-xxxx.dol Memory card in slot B + snes9xGX-003-smb-xxxx.dol SMB share (see SMB section below) + snes9xGX-003-noload-xxxx.dol none - doesn't load prefs nor autosave SRAM + +The last part of the filename (shown above as xxxx), denotes the wii and gamecube +versions. + +---------------------------- +ROMS, Preferences, and Saves: +---------------------------- +Your SNES rom images must be in the Super Magicom (SMC) or FIG format. Generally, +all images you find will be in this format, but if you run across one that isn't +please download RTOOL which will allow you to convert the image into SMC format. + + + Wii +---------- +On the Wii, you can load roms from any SD card (Front SD, SD Gecko, etc). +By default, ROMs are loaded from "snes9x/roms/" and saves and preferences are +stored in "snes9x/saves/". Therefore, on your SD card, you should have the following +folders: + + snes9x/ + roms/ + saves/ + + + Gamecube +------------ +You can load roms from DVD, SD card or SMB share. If you wish to use an SD card +or SMB share, you must create the same folder tree as above. Put your roms in the +"snes9x/roms" folder. On DVD you can either place your roms at the top level, or +optionally you may have an SNESROMS folder at the top level of the DVD, in which +case the game selectorwill default to showing that folder when first entered. +If you create a bootable DVD of Snes9xGx you can put roms on the same DVD. + +------------------------------ +Loading / Running the Emulator: +------------------------------ + +Via Homebrew Channel: +-------------------- +The most popular method of running homebrew on the wii is through the Homebrew +Channel. If you already have the channel installed, just copy over the apps folder +included in the archive into the root of your SD card (the SD autosaving version +for wii is included in the apps/Snes9xGX/ folder renamed to boot.dol). + +Remember to also create the snes9x/roms and snes9x/saves directories. See above. + +If you wish to use a version that autosaves to other available saving locations, +just choose the appropriate dol, copy it into the apps/Snes9XGX/ folder, and +RENAME it to boot.dol (remove the other version). Then proceed to copy +the entire apps folder to your sd card and run it with the HBC. + +If you haven't installed the homebrew channel yet, read about how to here: + http://hbc.hackmii.com/ + + +Gamecube: +--------- +You can load it via sdload and an SD card in slot A, or by streaming it to your +cube, or by booting a bootable DVD (gamecube only) with it on it. This document doesn't cover +how to do any of that. A good source for information on these topics is the +tehskeen forums: + + http://www.tehskeen.com/forums/ +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· ABOUT SNES9X ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' +Welcome to the revolution in GameCube emulators! SNES9X is by far the most +complete and accurate Super Nintendo Entertainment System emulator to date. +Taking full power of the ATi-GX chipset and packed full of features that are +to die for after playing your games you'll never want to come back to +reality. + +SNES9X is a very popular open source emulator mainly for the PC platform, but +has seen many ports to other consoles such as the Nintendo DS, Microsoft XBOX +and now thanks to SoftDev the Nintendo GameCube! This is a straight port and +is not based on any previous SNES emulators that have existed for the +GameCube. You can get more information on SNES9X here from the below URL. +http://snes9x.ipherswipsite.com/ + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· DEFAULT CONTROLLER MAPPING ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + +NOTE: You can change the controller configurations to your liking in the menu +under the Config Controllers option. + +Below are the default button mappings for supported controllers. The wiimote +configuration allows you to play with the wiimote held sideways. + +Wiimote SNES Nunchuk SNES +--------------------- --------------------- + 1 Y Z Y + 2 B B B + A A A A + B X C X + - SELECT 2 SELECT + + START 1 START +HOME Emulator menu HOME Emulator menu + LT - LT + RT + RT + + + + +Classic SNES GC PAD SNES +--------------------- --------------------- + X X Y Y + B B B B + A A A A + Y Y X X + - SELECT Z SELECT + + START START START +HOME Emulator menu + LT LT LT LT + RT RT RT RT + + + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· ZIP SUPPORT ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + +The Zip support in the emulator is courtesy of the zlib library. Currently, +it supports only the Inflate method. + +The good news is that this is by far the most common zip method! + +You should note also that this implementation assumes that the first file +in each archive is the required rom in smc/fig format. + +In an attempt to save you time, we recommend using 7-Zip as the compressor, +as it gives a gain of 5-25% better compression over standard zips. This being +said, you can very well use WinZip or any other zip utility to create your zipped +ROMs. + +To use 7-Zip compression on either linux or windows, use the following command: + + 7za a -tzip -mx=9 myrom.zip myrom.smc + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· MAIN MENU ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + +Once the DOL file is loaded you will be presented with main menu where you can +load a ROM, set options for the emulator, set the joypad configuration, save or +load freezes, manage SRAM, etc. +After loading a game the game will start running immediately. If you have the +auto-load SRAM option enabled it will automatically load SRAM (if it exists) +before starting play. + +You can return to the main menu at any time by pressing +the c-stick (the yellow control stick) to the left, or by pressing L+R+X+Y. +Return to the game by selecting "Resume Game" or by pressing the B button until +play resumes. + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· TURBO MODE ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + +TurboMode increases the playback speed of the game by about 2x. To use TurboMode +simply press the c-stick (yellow control stick) to the right and hold it right +as long as you want playback to be double-speed. Release the c-stick when you +want normal playback speed to resume. + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· IMPORTING AND EXPORTING SRAM ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + +Snes9xGx 2.0.1 now includes the ability to load SRAM from Snes9x on other +platforms (Mac/PC/Linux/Etc) and to save back to those platforms. To use this +feature simply save or load SRAM to/from SD card or an SMB share. + +The only thing to be aware of is that Snes9xGx requires that the SRM file have a +name that is the rom name (not necessarily the same as the file name!) with .SRM +at the end. For example, the game "Super Mario All-Stars + World" has a rom name +of "ALL_STARS + WORLD", so the SRAM file should have the name "ALL_STARS + +WORLD.srm". You can see the rom name for a game by loading the game - the rom +name is shown in the information that is briefly shown at the bottom of the +screen. A perhaps easier way to find the correct name is simply to load the game +and then save SRAM to SD or SMB and look at the filename that Snes9xGx uses. +That's the name you should use when importing an SRAM from another platform. + +To use an Snes9xGx SRAM on another platform just do the opposite: save SRAM to +SD or SMB, and then copy that saved SRAM file to the other platform. You may +have to rename the file to be what that version of snes9x expects it to be. + +×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ +|0O×øo· UPDATE HISTORY (old) ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' + [What Was New 2.0.1b8] * Added: SD slot B options for freezes, sram and loading of roms * Changed: SMB options no longer displayed in menus when run on a Wii @@ -166,207 +389,6 @@ changes to the emulator settings again and save them. * Analog Clip * XenoGC Support (GC-Linux Homebrew DVD Compatibility) -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· SETUP & INSTALLATION ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -Unzip the archive into a folder. You'll find 6 variations of the dol, along -with an "inject" tool for (optionally) injecting a rom into a dol. The six -variants auto save and load preferences and sram to/from different locations -as follows (you can also manually save and load SRAM to any location): - - filename preferences/sram autoloading location - ------------------------- ------------------------------------- - snes9xGx201b8-mcslota.dol Memory card in slot A - snes9xGx201b8-mcslotb.dol Memory card in slot B - snes9xGx201b8-sdslota.dol SD card in SD adapter in slot A - snes9xGx201b8-sdslotb.dol SD card in SD adapter in slot B - snes9xGx201b8-smb.dol SMB share (see SMB section below) - snes9xGx201b8-noload.dol none - doesn't load prefs nor autosave SRAM - - -Your SNES rom images must be in the Super Magicom (SMC) or FIG format. Generally, -all images you find will be in this format, but if you run across one that isn't -please download RTOOL which will allow you to convert the image into SMC format. - -You can load roms from DVD, SD card or SMB share. If you wish to use an SD card -or SMB share, you must create an SNESROMS and an SNESSAVE folder at the top -level (root) of the card or share. Put your roms in the SNESROMS folder. On DVD -you can either place your roms at the top level, or optionally you may have an -SNESROMS folder at the top level of the DVD, in which case the game selector -will default to showing that folder when first entered. If you create a bootable -DVD of Snes9xGx you can put roms on the same DVD. - -Now that you have that set up all you need to do is load the dol of your choice. -You can load it via sdload and an SD card in slot A, or by streaming it to your -cube, or by booting a bootable DVD with it on it. This document doesn't cover -how to do any of that. A good source for information on these topics is the -tehskeen forums: - - http://www.tehskeen.com/forums/ -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· DEFAULT CONTROLLER MAPPING ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -Wiimote SNES ---------------------- - 1 Y - 2 B - A A - B X - - SELECT - + START -HOME Emulator menu - LT - RT - -This configuration allows you to play with the wiimote held sideways. - -Nunchuk SNES ---------------------- - Z Y - B B - A A - C X - 2 SELECT - 1 START -HOME Emulator menu - - LT - + RT - -Classic SNES ---------------------- - X Y - B B - A A - Y X - - SELECT - + START -HOME Emulator menu - LT LT - RT RT - -GC PAD SNES ---------------------- - Y Y - B B - A A - X X - Z SELECT - START START - LT LT - RT RT - - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· PARTIAL PKZIP SUPPORT ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -The Zip support in the emulator is courtesy of the zlib library. Currently, -it supports only the Inflate method. - -The good news is that this is by far the most common zip method! - -You should note also that this implementation assumes that the first file -in each archive is the required rom in smc/fig format. - -In an attempt to save you time, we recommend using 7-Zip as the compressor, -as it gives a gain of 5-25% better compression over standard zips. - -To use 7-Zip compression on either linux or windows, use the following command: - - 7za a -tzip -mx=9 myrom.zip myrom.smc - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· MAIN MENU ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -Once the DOL file is loaded you will be presented with main menu where you can -load a rom from DVD, SD or SMB, set options for the emulator, set the joypad -configuration (on a per-game basis), save or load freezes, manage SRAM, etc. -After loading a game the game will start running immediately. If you have the -auto-load SRAM option enabled it will automatically load SRAM (if it exists) -before starting play. You can return to the main menu at any time by pressing -the c-stick (the yellow control stick) to the left, or by pressing L+R+X+Y. -Return to the game by selecting "Resume Game" or by pressing the B button until -play resumes. - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· TURBO MODE ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -TurboMode increases the playback speed of the game by about 2x. To use TurboMode -simply press the c-stick (yellow control stick) to the right and hold it right -as long as you want playback to be double-speed. Release the c-stick when you -want normal playback speed to resume. - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· IMPORTING AND EXPORTING SRAM ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -Snes9xGx 2.0.1 now includes the ability to load SRAM from Snes9x on other -platforms (Mac/PC/Linux/Etc) and to save back to those platforms. To use this -feature simply save or load SRAM to/from SD card or an SMB share. - -The only thing to be aware of is that Snes9xGx requires that the SRM file have a -name that is the rom name (not necessarily the same as the file name!) with .SRM -at the end. For example, the game "Super Mario All-Stars + World" has a rom name -of "ALL_STARS + WORLD", so the SRAM file should have the name "ALL_STARS + -WORLD.srm". You can see the rom name for a game by loading the game - the rom -name is shown in the information that is briefly shown at the bottom of the -screen. A perhaps easier way to find the correct name is simply to load the game -and then save SRAM to SD or SMB and look at the filename that Snes9xGx uses. -That's the name you should use when importing an SRAM from another platform. - -To use an Snes9xGx SRAM on another platform just do the opposite: save SRAM to -SD or SMB, and then copy that saved SRAM file to the other platform. You may -have to rename the file to be what that version of snes9x expects it to be. - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· INJECTING A ROM ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -Injecting a rom is not required to use snes9xGx, but if you primarily use -snes9xGx by streaming it to your cube you may wish to inject a rom into the dol. -In that case the game will start playing immediately once Snes9xGx loads. If you -have the auto-load SRAM option enabled it will load SRAM before starting the -game as well. - -To inject a rom you use the "inject.exe" tool on Windows or the "inject" tool on -Mac OS X. This tool works at the command line and has syntax as follows: - - inject original.dol gamerom.smc output.dol - -On the Mac you will either need to copy the inject tool into a location that is -in your "PATH" or just go into the directory that has the inject tool in it and -proceed the command with "./" like this: - - ./inject original.dol gamerom.smc output.dol - -Once you run the tool on your dol, just stream the outputted dol to your cube, -or otherwise load it and Snes9xGx will load and the game will start running. - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· WAVEBIRD WIRELESS CONTROLLER ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -This note applies to all homebrew GC software. The Wavebird wireless controller -CAN be used with homebrew, including Snes9xGx, but to enable it you must press a -button on the controller when you power up the GC and see the Gamecube logo. -This will initialize the controller and allow it to function in Snes9xGx and -other homebrew software. - -You must do this each time you power up your Gamecube. Also, if you unplug the -wireless receiver while Snes9xGx is running and plug it back in, it will not -work - you will then have to plug in a wired controller to continue play. Until -someone figures out how to properly handle the Wavebird, this will continue to -be the case. My ears are open! - -×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· SMB ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' - -TBD ×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ |0O×øo· CREDITS ·oø×O0| @@ -378,10 +400,9 @@ TBD GameCube Port 2.0 WIP6 and earlier - SoftDev Additional improvements to 2.0 WIP6 - eke-eke GameCube 2.0.1bx enhancements - crunchy2 - v001 updates - michniewski + v00x updates - michniewski GX - http://www.gc-linux.org - Font - Qoob Team - libogc - Shagkur + libogc - Shagkur & wintermute Testing @@ -389,9 +410,8 @@ TBD Documentation - original by brakken/updated by crunchy2 - + brakken, crunchy2, michniewski ×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ -|0O×øo· SNES9XGX v2.0.1b8 ·oø×O0| -`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' +|0O×øo· ·oø×O0| +`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' \ No newline at end of file diff --git a/source/ngc/filesel.cpp b/source/ngc/filesel.cpp index 6dce1ca..7062e90 100644 --- a/source/ngc/filesel.cpp +++ b/source/ngc/filesel.cpp @@ -31,7 +31,7 @@ #include "ftfont.h" #include "video.h" #include "aram.h" -#include "ngcunzip.h" +#include "unzip.h" #include "filesel.h" #include "smbload.h" #include "sdload.h" @@ -140,13 +140,17 @@ int selection = 0; int FileSelector () { - u32 p, wp; - signed char a; + u32 p, wp, ph, wh; + signed char a, c; int haverom = 0; int redraw = 1; int selectit = 0; float mag = 0; u16 ang = 0; + int scroll_delay = 0; + bool move_selection = 0; + #define SCROLL_INITIAL_DELAY 15 + #define SCROLL_LOOP_DELAY 4 while (haverom == 0) { @@ -154,17 +158,25 @@ FileSelector () ShowFiles (offset, selection); redraw = 0; + VIDEO_WaitVSync(); // slow things down a bit so we don't overread the pads + p = PAD_ButtonsDown (0); + ph = PAD_ButtonsHeld (0); #ifdef HW_RVL wp = WPAD_ButtonsDown (0); + wh = WPAD_ButtonsHeld (0); wpad_get_analogues(0, &mag, &ang); // get joystick info from wii expansions #else wp = 0; + wh = 0; #endif a = PAD_StickY (0); - - VIDEO_WaitVSync(); // slow things down a bit so we don't overread the pads + c = PAD_SubStickX (0); + /*** Check for exit combo ***/ + if ( (c < -70) || (wp & WPAD_BUTTON_HOME) || (wp & WPAD_CLASSIC_BUTTON_HOME) ) return 0; + + /*** Check buttons, perform actions ***/ if ( (p & PAD_BUTTON_A) || selectit || (wp & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)) ) { if ( selectit ) @@ -274,28 +286,57 @@ FileSelector () return 0; } } // End of B - if ( (p & PAD_BUTTON_DOWN) || (wp & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)) || (a < -PADCAL) || (mag>JOY_THRESHOLD && (ang>130 && ang<230)) ) + if ( ((p | ph) & PAD_BUTTON_DOWN) || ((wp | wh) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)) || (a < -PADCAL) || (mag>JOY_THRESHOLD && (ang>130 && ang<230)) ) { - selection++; - if (selection == maxfiles) - selection = offset = 0; - if ((selection - offset) >= PAGESIZE) - offset += PAGESIZE; - redraw = 1; + if ( (p & PAD_BUTTON_DOWN) || (wp & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)) ) { /*** Button just pressed ***/ + scroll_delay = SCROLL_INITIAL_DELAY; // reset scroll delay. + move_selection = 1; //continue (move selection) + } + else if (scroll_delay == 0) { /*** Button is held ***/ + scroll_delay = SCROLL_LOOP_DELAY; + move_selection = 1; //continue (move selection) + } else { + scroll_delay--; // wait + } + + if (move_selection) + { + selection++; + if (selection == maxfiles) + selection = offset = 0; + if ((selection - offset) >= PAGESIZE) + offset += PAGESIZE; + redraw = 1; + move_selection = 0; + } } // End of down - if ( (p & PAD_BUTTON_UP) || (wp & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP)) || (a > PADCAL) || (mag>JOY_THRESHOLD && (ang>300 || ang<50)) ) - { - selection--; - if (selection < 0) - { - selection = maxfiles - 1; - offset = selection - PAGESIZE + 1; - } - if (selection < offset) - offset -= PAGESIZE; - if (offset < 0) - offset = 0; - redraw = 1; + if ( ((p | ph) & PAD_BUTTON_UP) || ((wp | wh) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP)) || (a > PADCAL) || (mag>JOY_THRESHOLD && (ang>300 || ang<50)) ) + { + if ( (p & PAD_BUTTON_UP) || (wp & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP)) ) { /*** Button just pressed***/ + scroll_delay = SCROLL_INITIAL_DELAY; // reset scroll delay. + move_selection = 1; //continue (move selection) + } + else if (scroll_delay == 0) { /*** Button is held ***/ + scroll_delay = SCROLL_LOOP_DELAY; + move_selection = 1; //continue (move selection) + } else { + scroll_delay--; // wait + } + + if (move_selection) + { + selection--; + if (selection < 0) { + selection = maxfiles - 1; + offset = selection - PAGESIZE + 1; + } + if (selection < offset) + offset -= PAGESIZE; + if (offset < 0) + offset = 0; + redraw = 1; + move_selection = 0; + } } // End of Up if ( (p & PAD_BUTTON_LEFT) || (wp & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT)) ) { @@ -400,7 +441,7 @@ OpenSMB () * Function to load from an SD Card */ int -OpenSD (int slot) +OpenSD () { char msg[80]; char buf[50] = ""; @@ -412,8 +453,8 @@ OpenSD (int slot) /* don't mess with DVD entries */ havedir = 0; // gamecube only - /* get current SDCARD directory */ - sprintf ( currSDdir, getcwd(buf,50) ); // FIX: necessary? + /* change current dir to snes roms directory */ + sprintf ( currSDdir, "%s/%s", ROOTSDDIR, SNESROMDIR ); /* Parse initial root directory and get entries list */ @@ -425,7 +466,7 @@ OpenSD (int slot) else { /* no entries found */ - sprintf (msg, "SNESROMS not found on SDCARD"); // FIX: update error msg + sprintf (msg, "No Files Found!"); WaitPrompt (msg); return 0; } @@ -492,7 +533,7 @@ LoadDVDFile (unsigned char *buffer) else { - return UnZipBuffer (buffer, discoffset, rootdirlength); + return UnZipBuffer (buffer, discoffset, 1, NULL); // unzip from dvd } return rootdirlength; } diff --git a/source/ngc/filesel.h b/source/ngc/filesel.h index 79e1e8d..0e72761 100644 --- a/source/ngc/filesel.h +++ b/source/ngc/filesel.h @@ -12,12 +12,13 @@ int OpenDVD (); int OpenSMB (); -int OpenSD (int slot); +int OpenSD (); #define LOAD_DVD 1 #define LOAD_SMB 2 #define LOAD_SDC 4 -#define SNESROMDIR "SNESROMS" -#define SNESSAVEDIR "SNESSAVE" +#define ROOTSDDIR "fat:/" +#define SNESROMDIR "snes9x/roms" +#define SNESSAVEDIR "snes9x/saves" #endif diff --git a/source/ngc/ftfont.cpp b/source/ngc/ftfont.cpp index e114320..1c7c9f9 100644 --- a/source/ngc/ftfont.cpp +++ b/source/ngc/ftfont.cpp @@ -29,12 +29,13 @@ #include "video.h" #include "ftfont.h" #include "dkpro.h" -#include "tempgfx.h" #include "snes9xGX.h" #include "aram.h" #include +#include "gfx_bg.h" + /*** Globals ***/ FT_Library ftlibrary; FT_Face face; @@ -228,7 +229,7 @@ licence () else ypos += 24; - setfontsize (16); // FIX + setfontsize (16); setfontcolour (0x00, 0x00, 0x00); DrawText (-1, ypos += 40, (char*)"Snes9x - Copyright (c) Snes9x Team 1996 - 2006"); @@ -237,7 +238,7 @@ licence () DrawText (-1, ypos += 20, (char*)"redistribute it under the conditions of the"); DrawText (-1, ypos += 20, (char*)"GNU GENERAL PUBLIC LICENSE Version 2"); DrawText (-1, ypos += - 20, (char*)"Additionally, the developers of this port disclaims"); + 20, (char*)"Additionally, the developers of this port disclaim"); DrawText (-1, ypos += 20, (char*)"all copyright interests in the Nintendo GameCube"); DrawText (-1, ypos += @@ -281,7 +282,7 @@ showdklogo () int w, h, p, dispoffset; p = 0; dispoffset = - ((screenheight != 480 ? 360 : 350) * 320) + ((640 - dkpro_WIDTH) >> 2); + ((screenheight != 480 ? 365 : 355) * 320) + ((640 - dkpro_WIDTH) >> 2); dkunpack (); @@ -354,11 +355,11 @@ unpackbackdrop () /*** If it's PAL50, need to move down a few lines ***/ offset = ((screenheight - 480) >> 1) * 320; - inbytes = tempgfx_COMPRESSED; - outbytes = tempgfx_RAW; + inbytes = BG_COMPRESSED; + outbytes = BG_RAW; res = - uncompress ((Bytef *) backdrop + offset, &outbytes, (Bytef *) tempgfx, + uncompress ((Bytef *) backdrop + offset, &outbytes, (Bytef *) bg, inbytes); #ifndef HW_RVL @@ -390,11 +391,11 @@ void WaitButtonA () { #ifdef HW_RVL - while ( (PAD_ButtonsDown (0) & PAD_BUTTON_A) || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)) ); - while (!(PAD_ButtonsDown (0) & PAD_BUTTON_A) && !(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)) ); + while ( (PAD_ButtonsDown (0) & PAD_BUTTON_A) || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)) ) VIDEO_WaitVSync(); + while (!(PAD_ButtonsDown (0) & PAD_BUTTON_A) && !(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)) ) VIDEO_WaitVSync(); #else - while ( PAD_ButtonsDown (0) & PAD_BUTTON_A ); - while (!(PAD_ButtonsDown (0) & PAD_BUTTON_A) ); + while ( PAD_ButtonsDown (0) & PAD_BUTTON_A ) VIDEO_WaitVSync(); + while (!(PAD_ButtonsDown (0) & PAD_BUTTON_A) ) VIDEO_WaitVSync(); #endif } @@ -410,7 +411,7 @@ WaitButtonAB () while ( (PAD_ButtonsDown (0) & (PAD_BUTTON_A | PAD_BUTTON_B)) || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_A | WPAD_CLASSIC_BUTTON_B)) - ); + ) VIDEO_WaitVSync(); while ( TRUE ) { @@ -424,7 +425,7 @@ WaitButtonAB () #else u32 gc_btns; - while ( (PAD_ButtonsDown (0) & (PAD_BUTTON_A | PAD_BUTTON_B)) ); + while ( (PAD_ButtonsDown (0) & (PAD_BUTTON_A | PAD_BUTTON_B)) ) VIDEO_WaitVSync(); while ( TRUE ) { @@ -504,7 +505,7 @@ ShowAction (char *msg) * Generic Menu Routines ****************************************************************************/ void -DrawMenu (char items[][20], char *title, int maxitems, int selected) +DrawMenu (char items[][20], char *title, int maxitems, int selected, int fontsize) { int i, w; int ypos; @@ -516,7 +517,8 @@ DrawMenu (char items[][20], char *title, int maxitems, int selected) }; #endif - ypos = (screenheight - (maxitems * 32)) >> 1; + //ypos = (screenheight - (maxitems * 32)) >> 1; previous + ypos = (screenheight - (maxitems * (fontsize + 8))) >> 1; if (screenheight == 480) ypos += 52; @@ -525,30 +527,36 @@ DrawMenu (char items[][20], char *title, int maxitems, int selected) clearscreen (); -#if 0 - DrawPolygon (4, bounding, 0x00, 0x00, 0xc0); - DrawPolygon (4, base, 0x00, 0x00, 0xc0); - setfontsize (32); - DrawText (-1, 80, title); - DrawText (-1, screenheight - 50, "Snes9x - GX 2.0"); -#endif +//#if 0 +// DrawPolygon (4, bounding, 0x00, 0x00, 0xc0); +// DrawPolygon (4, base, 0x00, 0x00, 0xc0); + setfontsize (30); + if (title != NULL) + DrawText (-1, 60, title); + setfontsize (12); + DrawText (510, screenheight - 20, "Snes9x GX 003"); +//#endif - setfontsize (24); + setfontsize (fontsize); // set font size setfontcolour (0, 0, 0); for (i = 0; i < maxitems; i++) { if (i == selected) { - for( w = 0; w < 32; w++ ) - DrawLineFast( 30, 610, (i << 5) + (ypos-26) + w, 0x80, 0x80, 0x80 ); + //for( w = 0; w < 32; w++ ) + for( w = 0; w < (fontsize + 8); w++ ) + //DrawLineFast( 30, 610, (i << 5) + (ypos-26) + w, 0x80, 0x80, 0x80 ); previous + DrawLineFast( 30, 610, i * (fontsize + 8) + (ypos-(fontsize + 2)) + w, 0x80, 0x80, 0x80 ); setfontcolour (0xff, 0xff, 0xff); - DrawText (-1, (i << 5) + ypos, items[i]); + //DrawText (-1, (i << 5) + ypos, items[i]); previous + DrawText (-1, i * (fontsize + 8) + ypos, items[i]); setfontcolour (0x00, 0x00, 0x00); } else - DrawText (-1, i * 32 + ypos, items[i]); + DrawText (-1, i * (fontsize + 8) + ypos, items[i]); + //DrawText (-1, i * 32 + ypos, items[i]); previous } showscreen (); @@ -563,7 +571,7 @@ DrawMenu (char items[][20], char *title, int maxitems, int selected) ****************************************************************************/ int menu = 0; int -RunMenu (char items[][20], int maxitems, char *title) +RunMenu (char items[][20], int maxitems, char *title, int fontsize) { int redraw = 1; int quit = 0; @@ -578,7 +586,7 @@ RunMenu (char items[][20], int maxitems, char *title) { if (redraw) { - DrawMenu (&items[0], title, maxitems, menu); + DrawMenu (&items[0], title, maxitems, menu, fontsize); redraw = 0; } diff --git a/source/ngc/ftfont.h b/source/ngc/ftfont.h index 8b1936c..c6ac86d 100644 --- a/source/ngc/ftfont.h +++ b/source/ngc/ftfont.h @@ -27,7 +27,8 @@ void legal (); void highlight (int on); void WaitButtonA (); void setfontcolour (u8 r, u8 g, u8 b); -int RunMenu (char items[][20], int maxitems, char *title); +int RunMenu (char items[][20], int maxitems, char *title, int fontsize = 24); +void DrawMenu (char items[][20], char *title, int maxitems, int selected, int fontsize = 24); void WaitPrompt (char *msg); int WaitPromptChoice (char *msg, char* bmsg, char* amsg); void ShowAction (char *msg); diff --git a/source/ngc/gfx_bg.h b/source/ngc/gfx_bg.h new file mode 100644 index 0000000..8105be2 --- /dev/null +++ b/source/ngc/gfx_bg.h @@ -0,0 +1,691 @@ +/* + * File : bg3.bmp + * Width : 640 + * Height: 480 +*/ +#define BG_WIDTH (640) +#define BG_HEIGHT (480) +#define BG_RAW (614400) +#define BG_COMPRESSED (8789) + + static unsigned char bg[]= + { + 0x78,0x9c,0xed,0xdd,0x77,0xb0,0x94,0xf5,0xbd,0xf8,0x71,0x9d,0x4c, + 0x26,0xe3,0x24,0x93,0xdc,0xeb,0xe4,0xc6,0x4b,0x20,0x89,0xf1,0xc6, + 0x68,0x8c,0x28,0x18,0x31,0x51,0x2c,0x80,0xb1,0x05,0x84,0x83,0x68, + 0xec,0x25,0x41,0x63,0x41,0x11,0xa4,0x6d,0x7b,0xbe,0xbb,0xdf,0xe7, + 0xd9,0x3d,0x20,0x96,0x44,0xa3,0x46,0x13,0x1b,0x8a,0xd8,0x00,0xa5, + 0x8a,0x8a,0x0a,0xa8,0x80,0x02,0x8a,0x8a,0x35,0xc4,0x82,0x68,0x40, + 0x40,0x4a,0x72,0x6b,0xca,0xef,0xf7,0x9c,0x43,0x09,0xe6,0xf7,0xbb, + 0xf7,0x9a,0x4a,0xf1,0xf5,0x9e,0x79,0xcd,0x39,0xbb,0xec,0xd9,0xf6, + 0xc7,0x67,0xbe,0xdf,0xdd,0x67,0x97,0x5f,0x37,0x7e,0x5d,0xf8,0x35, + 0x00,0x00,0x1f,0x1d,0xcd,0xbf,0x2e,0x02,0x00,0x00,0x00,0x00,0x00, + 0x6c,0x67,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0xfb,0x7e, + 0xd5,0xf8,0xd5,0x16,0xb3,0xae,0xb1,0xaa,0xf0,0xcb,0xc6,0x92,0xe2, + 0x92,0xc6,0xdb,0xc5,0xe5,0x8d,0xf7,0xb7,0xe8,0x7d,0x01,0xf8,0x7b, + 0x59,0xd5,0x78,0xb3,0x38,0xbf,0x3e,0xb9,0x74,0x63,0x76,0x45,0x79, + 0x64,0x76,0x75,0x79,0x74,0x36,0xbd,0xf4,0x52,0x7d,0x79,0x71,0xdd, + 0x56,0x70,0xdf,0x00,0xfe,0x56,0xd6,0x35,0x96,0x16,0x66,0x65,0xd7, + 0x96,0x2e,0x8a,0xbd,0x92,0x43,0x7e,0xdc,0xb1,0xdc,0xfe,0xa7,0xfb, + 0x94,0x0e,0xac,0x9f,0x98,0xa4,0xd9,0xfd,0xe5,0x9f,0x37,0x56,0x6f, + 0xf1,0xfb,0x07,0xf0,0xb7,0xf2,0x76,0x7d,0x72,0x71,0x50,0x76,0x68, + 0xe5,0xa0,0x49,0x9d,0x86,0xb6,0x5f,0xb5,0x67,0xff,0xdd,0x7f,0xb5, + 0xdb,0x85,0x5f,0x9c,0xf7,0xf9,0x41,0x7b,0x36,0x4e,0x4e,0x6e,0xcc, + 0x16,0x95,0x56,0x6f,0x05,0xf7,0x11,0xe0,0xaf,0xef,0xbd,0xc2,0xc3, + 0xd9,0x45,0xe5,0x4e,0xb7,0x1d,0x59,0xec,0xf4,0xef,0x5f,0xba,0xb0, + 0xdd,0x6f,0xdb,0xf5,0x6b,0xfb,0x5f,0xed,0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00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x60,0xab,0x32,0x0c,0x00,0x00,0x00,0xb6,0x77,0xef,0x37, + 0xbf,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb6, + 0x31,0xc3,0xdf,0x1f,0x06,0x00,0x00,0x00,0xdb,0xbd,0x66,0x00,0x00, + 0x00,0xd8,0xfe,0xad,0x6a,0x5e,0x55,0x00,0x00,0x00,0x00,0x00,0x00, + 0xd8,0xae,0x0c,0x5f,0x35,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xd8,0xb6,0xac,0x1c,0xbe,0xb2,0x00,0x00,0xc0,0x47,0xca, + 0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xd8,0xda,0xac,0x18,0xbe,0x02,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x8b,0x7a,0x6f, + 0xf8,0x7b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x56,0x62,0xf9,0xf0,0xe5,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x56,0x62, + 0xd9,0x88,0x65,0x00,0x1f,0x4d,0xc3,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x6d,0xd0,0x50,0x00,0x00,0x00,0xd8,0xde,0xfd, + 0x72,0xc4,0x2f,0x87,0x01,0x00,0x00,0x00,0x00,0x00,0x6c,0x57,0x86, + 0x03,0x7c,0x64,0x0d,0x05,0x00,0x00,0x00,0x00,0x00,0xd8,0x9e,0xbc, + 0x3b,0xe2,0xdd,0x61,0x00,0x00,0x00,0x00,0xc0,0x76,0x6b,0x28,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x76,0x65,0x38,0x00,0x00,0x00,0x6c,0xff, + 0xde,0x19,0xf1,0xce,0x30,0x80,0x8f,0xa8,0xa1,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdb,0x82,0xa5,0x23,0x96,0x02, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x13,0xde, + 0x1e,0xf1,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0, + 0x8d,0x59,0x32,0x62,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x36,0xe1,0xad,0x4b,0xdf,0x02,0x00,0x00,0x00,0x00, + 0x00,0x00,0x60,0x7b,0x30,0x02,0x00,0x00,0x00,0xb6,0x7f,0x6f,0x5e, + 0xfa,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xb6,0x62,0x08,0x00,0x00,0x00,0x6c,0xef,0xde,0xb8,0xf4,0x8d,0xa1, + 0x00,0x00,0x00,0x00,0x00,0x00,0xdb,0x99,0x21,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdb,0x82,0xd7,0x2f,0x7d,0x1d, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x9b,0xf0, + 0x8b,0x4b,0x7f,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x56,0x6c,0xf1,0xa5,0x8b,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x6d,0xcf,0x60,0x00,0x00,0x00,0x00,0x60, + 0xfb,0xf4,0xf3,0x91,0x3f,0x1f,0x02,0xf0,0x91,0x74,0x29,0x00,0x00, + 0x00,0x00,0xb0,0x1d,0x1b,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xdb,0xaa,0xd7,0x46,0xbe,0x36,0x04,0x00,0x80,0x8f,0x94,0xc1, + 0x00,0x00,0x00,0xb0,0xdd,0xbb,0x14,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xb6,0x5d,0xaf,0x8e,0x7c,0x15,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x4a,0xbc,0x32, + 0xf2,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x2d,0xea,0xe5,0x91,0x2f,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x6c,0x51,0x2f,0x8d,0x7c,0x09,0x00,0x80,0x8f,0x92,0xcb,0x00,0x00, + 0x00,0x00,0x80,0xed,0xd6,0x96,0x7e,0xfd,0x11,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0x32,0x83,0x00,0x3e,0x8a,0x5e,0xbc,0xec, + 0xc5,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x6c,0xd5,0x06,0x01,0x7c,0x24,0x8d,0x04,0x00,0x00,0x00,0x00, + 0xb6,0x57,0x8b,0x2e,0x5b,0x34,0x18,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xed,0xc2,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xb6,0x5e,0x2f,0x5c,0xf6,0xc2,0x60,0x00,0x00,0x00, + 0xf8,0x08,0x18,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x25,0x3d,0x7f,0xd9,0xf3,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x77,0xf3,0xdc,0x65,0xcf,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x7f,0x63,0x0b,0x2f,0x5b,0x08,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xb1,0x1d,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92, + 0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24, + 0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49,0x92,0x24,0x49, + 0x92,0x24,0x49,0x92,0x24,0x49,0x7f,0x97,0xfe,0x2f,0x91,0x73,0x60, + 0x14,0x14 + }; + diff --git a/source/ngc/mcsave.cpp b/source/ngc/mcsave.cpp index 642840c..f10843c 100644 --- a/source/ngc/mcsave.cpp +++ b/source/ngc/mcsave.cpp @@ -500,7 +500,8 @@ SaveSRAMToMC (int slot, int silent) int datasize; int offset; - ShowAction ((char*) "Saving SRAM to MC..."); + if (!silent) + ShowAction ((char*) "Saving SRAM to MC..."); /*** Build SRAM filename ***/ sprintf (filename, "%s.srm", Memory.ROMName); @@ -551,7 +552,8 @@ SavePrefsToMC (int slot, int silent) int offset; char msg[80]; - ShowAction ((char*) "Saving Prefs to MC..."); + if (!silent) + ShowAction ((char*) "Saving Prefs to MC..."); datasize = preparePrefsData (); offset = SaveBufferToMC (savebuffer, slot, PREFS_FILE_NAME, datasize, silent); diff --git a/source/ngc/memfile.cpp b/source/ngc/memfile.cpp index c34659b..1c2041f 100644 --- a/source/ngc/memfile.cpp +++ b/source/ngc/memfile.cpp @@ -47,9 +47,7 @@ extern unsigned char savebuffer[]; static int bufoffset; static char membuffer[MEMBUFFER]; -char freezecomment[2][32] = { {"Snes9x GX 2.0.1b8 Freeze"}, {"Freeze"} }; - -extern char rootSDdir[MAXPATHLEN]; +char freezecomment[2][32] = { {"Snes9x GX 003 Freeze"}, {"Freeze"} }; /** @@ -153,10 +151,10 @@ NGCFreezeGame (int where, bool8 silent) /*** Freeze to SDCard in slot A or slot B ***/ #ifdef SDUSE_LFN - sprintf (filename, "%s/%s/%s.frz", rootSDdir, SNESSAVEDIR, Memory.ROMName); + sprintf (filename, "%s/%s/%s.frz", ROOTSDDIR, SNESSAVEDIR, Memory.ROMName); #else /*** Until we have LFN on SD ... ***/ - sprintf (filename, "%s/%s/%08x.frz", rootSDdir, SNESSAVEDIR, Memory.ROMCRC32); + sprintf (filename, "%s/%s/%08x.frz", ROOTSDDIR, SNESSAVEDIR, Memory.ROMCRC32); #endif } else @@ -182,7 +180,8 @@ NGCFreezeGame (int where, bool8 silent) if (smbfile) { - ShowAction ((char*) "Saving freeze game..."); + if (!silent) + ShowAction ((char*) "Saving freeze game..."); len = bufoffset; offset = 0; @@ -222,7 +221,8 @@ NGCFreezeGame (int where, bool8 silent) if (handle > 0) { - ShowAction ((char*) "Saving freeze game..."); + if (!silent) + ShowAction ((char*) "Saving freeze game..."); len = fwrite (membuffer, 1, bufoffset, handle); fclose (handle); @@ -238,13 +238,14 @@ NGCFreezeGame (int where, bool8 silent) } else { - sprintf(msg, "Couldn't save to %s/%s/", rootSDdir, SNESSAVEDIR); + sprintf(msg, "Couldn't save to %s/%s/", ROOTSDDIR, SNESSAVEDIR); WaitPrompt (msg); } } else /*** MC in slot A or slot B ***/ { - ShowAction ((char*) "Saving freeze game..."); + if (!silent) + ShowAction ((char*) "Saving freeze game..."); ClearSaveBuffer (); @@ -378,10 +379,10 @@ NGCUnfreezeGame (int from, bool8 silent) { #ifdef SDUSE_LFN - sprintf (filename, "%s/%s/%s.frz", rootSDdir, SNESSAVEDIR, Memory.ROMName); + sprintf (filename, "%s/%s/%s.frz", ROOTSDDIR, SNESSAVEDIR, Memory.ROMName); #else /*** From SDCard ***/ - sprintf (filename, "%s/%s/%08x.frz", rootSDdir, SNESSAVEDIR, Memory.ROMCRC32); + sprintf (filename, "%s/%s/%08x.frz", ROOTSDDIR, SNESSAVEDIR, Memory.ROMCRC32); #endif handle = fopen (filename, "rb"); diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index cc98811..1dd5bf8 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -30,7 +30,7 @@ #include "video.h" #include "mcsave.h" #include "filesel.h" -#include "ngcunzip.h" +#include "unzip.h" #include "smbload.h" #include "mcsave.h" #include "sdload.h" @@ -43,7 +43,7 @@ #include "button_mapping.h" #include "ftfont.h" -extern void DrawMenu (char items[][20], char *title, int maxitems, int selected); +extern void DrawMenu (char items[][20], char *title, int maxitems, int selected, int fontsize); #define PSOSDLOADID 0x7c6000a6 extern int menu; @@ -181,7 +181,7 @@ LoadManager () { case 0: /*** Load from SD ***/ - quit = OpenSD (0); + quit = OpenSD (); break; case 1: @@ -208,14 +208,14 @@ LoadManager () if ( retval == 1 ) // if ROM was loaded, load the SRAM & settings { if ( GCSettings.AutoLoad == 1 ) + { quickLoadSRAM ( SILENT ); + S9xSoftReset(); // reset after loading sram + } else if ( GCSettings.AutoLoad == 2 ) { - /*** load SRAM first in order to get joypad config ***/ - quickLoadSRAM ( SILENT ); quickLoadFreeze ( SILENT ); } - S9xSoftReset(); // reset after loading sram } menu = oldmenu; @@ -250,23 +250,23 @@ SaveManager () { if ( isWii ) /* Wii menu */ { - ret = RunMenu (savemenuwii, savecountwii, (char*)"Save Manager"); + ret = RunMenu (savemenuwii, savecountwii, (char*)"SRAM Manager"); if (ret >= savecountwii-1) ret = savecount-1; } else /* Gamecube menu */ - ret = RunMenu (savemenu, savecount, (char*)"Save Manager"); + ret = RunMenu (savemenu, savecount, (char*)"SRAM Manager"); switch (ret) { case 0: /*** Save to SD***/ - SaveSRAMToSD (0, NOTSILENT); + SaveSRAMToSD (NOTSILENT); break; case 1: /*** Load from SD***/ - LoadSRAMFromSD (0, NOTSILENT); + LoadSRAMFromSD (NOTSILENT); break; case 2: @@ -448,6 +448,7 @@ GetInput (u16 ctrlr_type) { u32 exp_type, pressed; pressed=0; + s8 gc_px = 0; while( PAD_ButtonsHeld(0) #ifdef HW_RVL @@ -459,13 +460,14 @@ GetInput (u16 ctrlr_type) { VIDEO_WaitVSync(); // get input based on controller type - //if (ctrlr_type == CTRLR_GCPAD) - //{ + if (ctrlr_type == CTRLR_GCPAD) + { pressed = PAD_ButtonsHeld (0); - //} + gc_px = PAD_SubStickX (0); + } #ifdef HW_RVL - //else - //{ + else + { // if ( WPAD_Probe( 0, &exp_type) == 0) // check wiimote and expansion status (first if wiimote is connected & no errors) // { pressed = WPAD_ButtonsHeld (0); @@ -473,8 +475,11 @@ GetInput (u16 ctrlr_type) // if (ctrlr_type != CTRLR_WIIMOTE && exp_type != ctrlr_type+1) // if we need input from an expansion, and its not connected... // pressed = 0; // } - //} + } #endif + /*** check for exit sequence (c-stick left OR home button) ***/ + if ( (gc_px < -70) || (pressed & WPAD_BUTTON_HOME) || (pressed & WPAD_CLASSIC_BUTTON_HOME) ) + return 0; } // end while while( pressed == (PAD_ButtonsHeld(0) #ifdef HW_RVL @@ -485,19 +490,23 @@ GetInput (u16 ctrlr_type) return pressed; } // end GetInput() -int cfg_text_count = 4; +int cfg_text_count = 7; char cfg_text[][20] = { -" ", +"Remapping ", "Press Any Button", "on the", -" " // identify controller +" ", // identify controller +" ", +"Press C-Left or", +"Home to exit" }; u32 GetButtonMap(u16 ctrlr_type, char* btn_name) { u32 pressed, previous; - char title[20]; + char temp[20] = ""; + int k; pressed = 0; previous = 1; switch (ctrlr_type) { @@ -515,9 +524,13 @@ GetButtonMap(u16 ctrlr_type, char* btn_name) break; }; - sprintf (cfg_text[0], "Remapping %s", btn_name); // note which button we are remapping + /*** note which button we are remapping ***/ + sprintf (temp, (char*)"Remapping "); + for (k=0; k<9-strlen(btn_name) ;k++) strcat(temp, " "); // add whitespace padding to align text + strncat (temp, btn_name, 9); // snes button we are remapping + strncpy (cfg_text[0], temp, 19); // copy this all back to the text we wish to display - DrawMenu(&cfg_text[0], title, cfg_text_count, 1); // display text + DrawMenu(&cfg_text[0], NULL, cfg_text_count, 1); // display text // while (previous != pressed && pressed == 0); // get two consecutive button presses (which are the same) // { @@ -562,7 +575,7 @@ ConfigureButtons (u16 ctrlr_type) unsigned int* currentpadmap; char temp[20] = ""; - int i, j; + int i, j, k; /*** Update Menu Title (based on controller we're configuring) ***/ switch (ctrlr_type) { @@ -591,21 +604,24 @@ ConfigureButtons (u16 ctrlr_type) { // get current padmap button name to display for ( j=0; + j < ctrlr_def[ctrlr_type].num_btns && currentpadmap[i] != ctrlr_def[ctrlr_type].map[j].btn // match padmap button press with button names - && j < ctrlr_def[ctrlr_type].num_btns ; j++ ); memset (temp, 0, sizeof(temp)); strncpy (temp, cfg_btns_menu[i], 12); // copy snes button information if (currentpadmap[i] == ctrlr_def[ctrlr_type].map[j].btn) // check if a match was made + { + for (k=0; k<7-strlen(ctrlr_def[ctrlr_type].map[j].name) ;k++) strcat(temp, " "); // add whitespace padding to align text strncat (temp, ctrlr_def[ctrlr_type].map[j].name, 6); // update button map display + } else strcat (temp, (char*)"---"); // otherwise, button is 'unmapped' strncpy (cfg_btns_menu[i], temp, 19); // move back updated information } - ret = RunMenu (cfg_btns_menu, cfg_btns_count, menu_title); + ret = RunMenu (cfg_btns_menu, cfg_btns_count, menu_title, 18); switch (ret) { @@ -627,7 +643,8 @@ ConfigureButtons (u16 ctrlr_type) strncpy(temp, cfg_btns_menu[ret], 6); // get the name of the snes button we're changing pressed = GetButtonMap(ctrlr_type, temp); // get a button selection from user // FIX: check if input is valid for this controller - currentpadmap[ret] = pressed; // update mapping + if (pressed != 0) // check if a the button was configured, or if the user exited. + currentpadmap[ret] = pressed; // update mapping break; case -1: /*** Button B ***/ diff --git a/source/ngc/preferences.cpp b/source/ngc/preferences.cpp index 3becab1..f0fb9f4 100644 --- a/source/ngc/preferences.cpp +++ b/source/ngc/preferences.cpp @@ -31,7 +31,7 @@ extern unsigned int wmpadmap[]; extern unsigned int ccpadmap[]; extern unsigned int ncpadmap[]; -#define PREFSVERSTRING "Snes9x GX 002 Prefs" +#define PREFSVERSTRING "Snes9x GX 003 Prefs" char prefscomment[2][32] = { {PREFSVERSTRING}, {"Preferences"} }; @@ -125,7 +125,7 @@ void quickLoadPrefs (bool8 silent) case CARD_SLOTA+2: case CARD_SLOTB+2: - LoadPrefsFromSD(QUICK_SAVE_SLOT-2, silent); + LoadPrefsFromSD(silent); break; case CARD_SLOTA+4: @@ -144,7 +144,7 @@ void quickSavePrefs (bool8 silent) break; case CARD_SLOTA+2: case CARD_SLOTB+2: - SavePrefsToSD(QUICK_SAVE_SLOT-2, silent); + SavePrefsToSD(silent); break; case CARD_SLOTA+4: SavePrefsToSMB(silent); diff --git a/source/ngc/sdload.cpp b/source/ngc/sdload.cpp index 3369874..243af1f 100644 --- a/source/ngc/sdload.cpp +++ b/source/ngc/sdload.cpp @@ -14,7 +14,7 @@ #include #include #include "sdload.h" -#include "ngcunzip.h" +#include "unzip.h" #include "memmap.h" #include "video.h" #include "ftfont.h" @@ -27,13 +27,40 @@ extern unsigned char savebuffer[]; extern char output[16384]; FILE * filehandle; -char rootSDdir[MAXPATHLEN] = "fat:/"; + char currSDdir[MAXPATHLEN]; extern int offset; extern int selection; extern FILEENTRIES filelist[MAXFILES]; +/*************************************************************************** + * FileSortCallback + * + * Quick sort callback to sort file entries with the following order: + * . + * .. + * + * + ***************************************************************************/ +static int FileSortCallback(const void *f1, const void *f2) +{ + /* Special case for implicit directories */ + if(((FILEENTRIES *)f1)->filename[0] == '.' || ((FILEENTRIES *)f2)->filename[0] == '.') + { + if(strcmp(((FILEENTRIES *)f1)->filename, ".") == 0) { return -1; } + if(strcmp(((FILEENTRIES *)f2)->filename, ".") == 0) { return 1; } + if(strcmp(((FILEENTRIES *)f1)->filename, "..") == 0) { return -1; } + if(strcmp(((FILEENTRIES *)f2)->filename, "..") == 0) { return 1; } + } + + /* If one is a file and one is a directory the directory is first. */ + if(((FILEENTRIES *)f1)->flags == 1 && ((FILEENTRIES *)f2)->flags == 0) return -1; + if(((FILEENTRIES *)f1)->flags == 0 && ((FILEENTRIES *)f2)->flags == 1) return 1; + + return stricmp(((FILEENTRIES *)f1)->filename, ((FILEENTRIES *)f2)->filename); +} + /*************************************************************************** * Update SDCARD curent directory name ***************************************************************************/ @@ -75,7 +102,7 @@ int updateSDdirname() /* handles root name */ sprintf(temp, "/%s/..", SNESROMDIR); if (strcmp(currSDdir, temp) == 0) - sprintf(currSDdir,"%s",rootSDdir); + sprintf(currSDdir,"%s",ROOTSDDIR); /* update current directory name */ sprintf(currSDdir, "%s/%s",currSDdir, filelist[selection].filename); @@ -103,7 +130,7 @@ int parseSDdirectory() { /* open the directory */ sddir = diropen(currSDdir); if (sddir == NULL) { - sprintf(currSDdir,"%s",rootSDdir); // if we can't open the previous dir, open root dir + sprintf(currSDdir,"%s",ROOTSDDIR); // if we can't open the previous dir, open root dir sddir = diropen(currSDdir); WaitPrompt(msg); if (sddir == NULL) { @@ -127,6 +154,9 @@ int parseSDdirectory() { /*** close directory ***/ dirclose(sddir); + + /* Sort the file list */ + qsort(filelist, nbfiles, sizeof(FILEENTRIES), FileSortCallback); return nbfiles; } @@ -141,14 +171,10 @@ LoadSDFile (char *filename, int length) char zipbuffer[2048]; char filepath[MAXPATHLEN]; FILE *handle; - char *rbuffer; - PKZIPHEADER pkzip; - z_stream zs; - int res, outbytes = 0; - int size; - int have; + unsigned char *rbuffer; + u32 size; - rbuffer = (char *) Memory.ROM; + rbuffer = (unsigned char *) Memory.ROM; /* Check filename length */ if ((strlen(currSDdir)+1+strlen(filelist[selection].filename)) < MAXPATHLEN) @@ -167,67 +193,11 @@ LoadSDFile (char *filename, int length) if (IsZipFile (zipbuffer)) { - /*** Unzip the ROM ***/ - memcpy (&pkzip, zipbuffer, sizeof (PKZIPHEADER)); - pkzip.uncompressedSize = FLIP32 (pkzip.uncompressedSize); - memset (&zs, 0, sizeof (zs)); - zs.zalloc = Z_NULL; - zs.zfree = Z_NULL; - zs.opaque = Z_NULL; - zs.avail_in = 0; - zs.next_in = Z_NULL; - - res = inflateInit2 (&zs, -MAX_WBITS); - - if (res != Z_OK) - { - fclose (handle); - return 0; - } - - size = (sizeof (PKZIPHEADER) + - FLIP16 (pkzip.filenameLength) + - FLIP16 (pkzip.extraDataLength)); - - do - { - zs.avail_in = 2048 - size; - zs.next_in = (Bytef *) zipbuffer + size; - - do - { - zs.avail_out = 16384; - zs.next_out = (Bytef *) output; - - res = inflate (&zs, Z_NO_FLUSH); - - have = 16384 - zs.avail_out; - - if (have) - { - memcpy (rbuffer + outbytes, output, have); - outbytes += have; - } - - } - while (zs.avail_out == 0); - - sprintf (filepath, "Read %d bytes of %d", outbytes, - pkzip.uncompressedSize); - //ShowAction (filepath); - ShowProgress (filepath, outbytes, pkzip.uncompressedSize); - - size = 0; - fread (zipbuffer, 1, 2048, handle); - - } - while (res != Z_STREAM_END - && (u32) outbytes < pkzip.uncompressedSize); - - inflateEnd (&zs); + /*** Unzip the ROM ***/ + size = UnZipBuffer (rbuffer, 0, 0, handle); // unzip from SD fclose (handle); - return pkzip.uncompressedSize; + return size; } else @@ -326,18 +296,19 @@ SaveBufferToSD (char *filepath, int datasize, bool silent) /**************************************************************************** * Save SRAM to SD Card ****************************************************************************/ -void SaveSRAMToSD (int slot, bool silent) +void SaveSRAMToSD (bool silent) { char filepath[1024]; int datasize; int offset; - ShowAction ((char*) "Saving SRAM to SD..."); + if (!silent) + ShowAction ((char*) "Saving SRAM to SD..."); #ifdef SDUSE_LFN - sprintf (filepath, "%s/%s/%s.srm", rootSDdir, SNESSAVEDIR, Memory.ROMName); + sprintf (filepath, "%s/%s/%s.srm", ROOTSDDIR, SNESSAVEDIR, Memory.ROMName); #else - sprintf (filepath, "%s/SNESSAVE/%08x.srm", rootSDdir, Memory.ROMCRC32); + sprintf (filepath, "%s/%s/%08x.srm", ROOTSDDIR, SNESSAVEDIR, Memory.ROMCRC32); #endif datasize = prepareEXPORTsavedata (); @@ -359,7 +330,7 @@ void SaveSRAMToSD (int slot, bool silent) * Load SRAM From SD Card ****************************************************************************/ void -LoadSRAMFromSD (int slot, bool silent) +LoadSRAMFromSD (bool silent) { char filepath[1024]; int offset = 0; @@ -367,9 +338,9 @@ LoadSRAMFromSD (int slot, bool silent) ShowAction ((char*) "Loading SRAM from SD..."); #ifdef SDUSE_LFN - sprintf (filepath, "%s/%s/%s.srm", rootSDdir, SNESSAVEDIR, Memory.ROMName); + sprintf (filepath, "%s/%s/%s.srm", ROOTSDDIR, SNESSAVEDIR, Memory.ROMName); #else - sprintf (filepath, "%s/%s/%08x.srm", rootSDdir, SNESSAVEDIR, Memory.ROMCRC32); + sprintf (filepath, "%s/%s/%08x.srm", ROOTSDDIR, SNESSAVEDIR, Memory.ROMCRC32); #endif offset = LoadBufferFromSD (filepath, silent); @@ -391,18 +362,19 @@ LoadSRAMFromSD (int slot, bool silent) * Save Preferences to SD Card ****************************************************************************/ void -SavePrefsToSD (int slot, bool silent) +SavePrefsToSD (bool silent) { char filepath[1024]; int datasize; int offset; - ShowAction ((char*) "Saving prefs to SD..."); + if (!silent) + ShowAction ((char*) "Saving prefs to SD..."); #ifdef SDUSE_LFN - sprintf (filepath, "%s/%s/%s", rootSDdir, SNESSAVEDIR, PREFS_FILE_NAME); + sprintf (filepath, "%s/%s/%s", ROOTSDDIR, SNESSAVEDIR, PREFS_FILE_NAME); #else - sprintf (filepath, "%s/%s/%s", rootSDdir, SNESSAVEDIR, PREFS_FILE_NAME); + sprintf (filepath, "%s/%s/%s", ROOTSDDIR, SNESSAVEDIR, PREFS_FILE_NAME); #endif datasize = preparePrefsData (); @@ -420,7 +392,7 @@ SavePrefsToSD (int slot, bool silent) * Load Preferences from SD Card ****************************************************************************/ void -LoadPrefsFromSD (int slot, bool silent) +LoadPrefsFromSD (bool silent) { char filepath[1024]; int offset = 0; @@ -428,9 +400,9 @@ LoadPrefsFromSD (int slot, bool silent) ShowAction ((char*) "Loading prefs from SD..."); #ifdef SDUSE_LFN - sprintf (filepath, "%s/%s/%s", rootSDdir, SNESSAVEDIR, PREFS_FILE_NAME); + sprintf (filepath, "%s/%s/%s", ROOTSDDIR, SNESSAVEDIR, PREFS_FILE_NAME); #else - sprintf (filepath, "%s/%s/%s", rootSDdir, SNESSAVEDIR, PREFS_FILE_NAME); + sprintf (filepath, "%s/%s/%s", ROOTSDDIR, SNESSAVEDIR, PREFS_FILE_NAME); #endif offset = LoadBufferFromSD (filepath, silent); diff --git a/source/ngc/sdload.h b/source/ngc/sdload.h index e5e6db7..28b236d 100644 --- a/source/ngc/sdload.h +++ b/source/ngc/sdload.h @@ -21,15 +21,15 @@ #include #include +static int FileSortCallback(const void *f1, const void *f2); int updateSDdirname(); int parseSDdirectory(); int LoadSDFile (char *filename, int length); -void SaveSRAMToSD (int slot, bool silent); -void LoadSRAMFromSD (int slot, bool silent); -void SavePrefsToSD (int slot, bool silent); -void LoadPrefsFromSD (int slot, bool silent); +void SaveSRAMToSD (bool silent); +void LoadSRAMFromSD (bool silent); +void SavePrefsToSD (bool silent); +void LoadPrefsFromSD (bool silent); -extern char rootSDdir[MAXPATHLEN]; extern char currSDdir[MAXPATHLEN]; #endif diff --git a/source/ngc/smbload.cpp b/source/ngc/smbload.cpp index 7420a5e..1fd55d8 100644 --- a/source/ngc/smbload.cpp +++ b/source/ngc/smbload.cpp @@ -18,7 +18,7 @@ extern "C" { #include "smb.h" } -#include "ngcunzip.h" +#include "unzip.h" #include "memmap.h" #include "video.h" #include "ftfont.h" @@ -382,7 +382,9 @@ SaveSRAMToSMB (bool8 silent) int offset; sprintf (filepath, "%s\\%s.srm", SNESSAVEDIR, Memory.ROMName); - ShowAction ((char*) "Saving SRAM to SMB..."); + + if (!silent) + ShowAction ((char*) "Saving SRAM to SMB..."); datasize = prepareEXPORTsavedata (); @@ -436,7 +438,9 @@ SavePrefsToSMB (bool8 silent) int offset; sprintf (filepath, "%s\\%s", SNESSAVEDIR, PREFS_FILE_NAME); - ShowAction ((char*) "Saving preferences to SMB..."); + + if (!silent) + ShowAction ((char*) "Saving preferences to SMB..."); datasize = preparePrefsData (); diff --git a/source/ngc/snes9xGX.cpp b/source/ngc/snes9xGX.cpp index 75ecbf7..d3ee5ad 100644 --- a/source/ngc/snes9xGX.cpp +++ b/source/ngc/snes9xGX.cpp @@ -229,7 +229,7 @@ unsigned int wmpadmap[] = { WPAD_BUTTON_B, WPAD_BUTTON_2, }; /*** Classic Controller Padmap ***/ unsigned int ccpadmap[] = { WPAD_CLASSIC_BUTTON_A, WPAD_CLASSIC_BUTTON_B, - WPAD_CLASSIC_BUTTON_Y, WPAD_CLASSIC_BUTTON_X, + WPAD_CLASSIC_BUTTON_X, WPAD_CLASSIC_BUTTON_Y, WPAD_CLASSIC_BUTTON_FULL_L, WPAD_CLASSIC_BUTTON_FULL_R, WPAD_CLASSIC_BUTTON_MINUS, WPAD_CLASSIC_BUTTON_PLUS, WPAD_CLASSIC_BUTTON_UP, WPAD_CLASSIC_BUTTON_DOWN, @@ -399,7 +399,34 @@ decodepad (int pad) } } +/**************************************************************************** + * setFrameTimerMethod() + * change frametimer method depending on whether ROM is NTSC or PAL + ****************************************************************************/ +extern u8 vmode_60hz; +int timerstyle; +void setFrameTimerMethod() +{ + /* + Set frametimer method + (timerstyle: 0=NTSC vblank, 1=PAL int timer) + */ + if ( Settings.PAL ) { + if(vmode_60hz == 1) + timerstyle = 1; + else + timerstyle = 0; + //timediffallowed = Settings.FrameTimePAL; + } else { + if(vmode_60hz == 1) + timerstyle = 0; + else + timerstyle = 1; + //timediffallowed = Settings.FrameTimeNTSC; + } + return; +} /**************************************************************************** * NGCReportButtons * Called on each rendered frame @@ -445,7 +472,7 @@ NGCReportButtons () if ( GCSettings.AutoSave == 1 ) { - if ( WaitPromptChoice ((char*)"Save SRAM?", (char*)"Don't Save", (char*)"Save") ) + //if ( WaitPromptChoice ((char*)"Save SRAM?", (char*)"Don't Save", (char*)"Save") ) quickSaveSRAM ( SILENT ); } else if ( GCSettings.AutoSave == 2 ) @@ -465,6 +492,11 @@ NGCReportButtons () mainmenu (); FrameTimer = 0; ConfigRequested = 0; + + setFrameTimerMethod(); // set frametimer method every time a ROM is loaded + + // auto load freeze/sram? + } else { @@ -486,7 +518,7 @@ u32 wpad_get_analogues(int pad, float* mag, u16* ang) u32 exp_type = 0; #ifdef HW_RVL struct expansion_t exp; - memset( &exp, 0, sizeof(exp) ); // FIX: necessary? we only look at the struct if an expansion is connected... + memset( &exp, 0, sizeof(exp) ); if ( WPAD_Probe( pad, &exp_type) == 0) // check wiimote and expansion status (first if wiimote is connected & no errors) { @@ -597,8 +629,6 @@ SetDefaultButtonMap () ****************************************************************************/ /* Eke-Eke: initialize frame Sync */ extern void S9xInitSync(); -extern u8 vmode_60hz; -int timerstyle; void emulate () @@ -607,24 +637,8 @@ emulate () S9xSetSoundMute (TRUE); AudioStart (); S9xInitSync(); - - /* - Set frametimer method - (timerstyle: 0=NTSC vblank, 1=PAL int timer) - */ - if ( Settings.PAL ) { - if(vmode_60hz == 1) - timerstyle = 1; - else - timerstyle = 0; - //timediffallowed = Settings.FrameTimePAL; - } else { - if(vmode_60hz == 1) - timerstyle = 0; - else - timerstyle = 1; - //timediffallowed = Settings.FrameTimeNTSC; - } + + setFrameTimerMethod(); // also called in NGCReportButtons() while (1) { diff --git a/source/ngc/snes9xGX.h b/source/ngc/snes9xGX.h index 57d9665..828c6dd 100644 --- a/source/ngc/snes9xGX.h +++ b/source/ngc/snes9xGX.h @@ -160,8 +160,8 @@ #include "snes9x.h" // FIX: these are unused, but could be... must also change "freezecomment", PREFSVERSTRING, and "sramcomment" -#define GCVERSION "002" -#define GCVERSIONSTRING "Snes9x 1.5 v002" +//#define GCVERSION "002" +//#define GCVERSIONSTRING "Snes9x 1.5 v002" #define NOTSILENT 0 #define SILENT 1 @@ -204,7 +204,7 @@ END_EXTERN_C 3 SD card in slot B 4 SMB share ***/ #ifndef QUICK_SAVE_SLOT -#define QUICK_SAVE_SLOT 1 +#define QUICK_SAVE_SLOT 2 // save to SD #endif /*** default SMB settings ***/ diff --git a/source/ngc/sram.cpp b/source/ngc/sram.cpp index 9d5a86f..3813703 100644 --- a/source/ngc/sram.cpp +++ b/source/ngc/sram.cpp @@ -28,7 +28,7 @@ extern int padcal; extern unsigned short gcpadmap[]; //extern unsigned short padmap[4]; -char sramcomment[2][32] = { {"Snes9x GX 2.0.1b8 SRAM"}, {"Savegame"} }; +char sramcomment[2][32] = { {"Snes9x GX 003 SRAM"}, {"Savegame"} }; /**************************************************************************** * Prepare Memory Card SRAM Save Data @@ -140,7 +140,7 @@ decodesavedata (int readsize) // Check for exportable format sram - it has the sram comment at the start memcpy (sramcomment, savebuffer, 32); - if ( strncmp (sramcomment, "Snes9x GX 2.0", 13) == 0 ) + if ( (strncmp (sramcomment, "Snes9x GX 2.0", 13) == 0) || (strncmp (sramcomment, "Snes9x GX 00", 12) == 0) ) // version 2.0.XX or 00x { offset = 64; @@ -243,7 +243,7 @@ void quickLoadSRAM (bool8 silent) break; case CARD_SLOTA+2: case CARD_SLOTB+2: - LoadSRAMFromSD(QUICK_SAVE_SLOT-2, silent); + LoadSRAMFromSD(silent); break; case CARD_SLOTA+4: LoadSRAMFromSMB(SILENT); @@ -261,7 +261,7 @@ void quickSaveSRAM (bool8 silent) break; case CARD_SLOTA+2: case CARD_SLOTB+2: - SaveSRAMToSD(QUICK_SAVE_SLOT-2, silent); + SaveSRAMToSD(silent); break; case CARD_SLOTA+4: SaveSRAMToSMB(SILENT); diff --git a/source/ngc/unzip.cpp b/source/ngc/unzip.cpp new file mode 100644 index 0000000..7ebcf2d --- /dev/null +++ b/source/ngc/unzip.cpp @@ -0,0 +1,184 @@ +/**************************************************************************** + * Snes9x 1.50 + * + * Nintendo Gamecube Unzip - borrowed from the GPP + * + * softdev July 2006 + ****************************************************************************/ +#include +#include +#include +#include +#include +#include "dvd.h" +#include "video.h" +#include "ftfont.h" +#include "unzip.h" + +/* + * PKWare Zip Header - adopted into zip standard + */ +#define PKZIPID 0x504b0304 +#define MAXROM 0x500000 +#define ZIPCHUNK 2048 + +/* + * Zip files are stored little endian + * Support functions for short and int types + */ +u32 +FLIP32 (u32 b) +{ + unsigned int c; + + c = (b & 0xff000000) >> 24; + c |= (b & 0xff0000) >> 8; + c |= (b & 0xff00) << 8; + c |= (b & 0xff) << 24; + + return c; +} + +u16 +FLIP16 (u16 b) +{ + u16 c; + + c = (b & 0xff00) >> 8; + c |= (b & 0xff) << 8; + + return c; +} + +/**************************************************************************** + * IsZipFile + * + * Returns TRUE when PKZIPID is first four characters of buffer + ****************************************************************************/ +int +IsZipFile (char *buffer) +{ + unsigned int *check; + + check = (unsigned int *) buffer; + + if (check[0] == PKZIPID) + return 1; + + return 0; +} + + /***************************************************************************** + * unzip + * + * It should be noted that there is a limit of 5MB total size for any ROM + ******************************************************************************/ +int +UnZipBuffer (unsigned char *outbuffer, u64 discoffset, short where, FILE* filehandle) +{ + PKZIPHEADER pkzip; + int zipoffset = 0; + int zipchunk = 0; + char out[ZIPCHUNK]; + z_stream zs; + int res; + int bufferoffset = 0; + int have = 0; + char readbuffer[2048]; + char msg[128]; + + /*** Read Zip Header ***/ + switch (where) { + case 0: // SD Card + fseek(filehandle, 0, SEEK_SET); + fread (readbuffer, 1, 2048, filehandle); break; + case 1: // DVD + dvd_read (readbuffer, 2048, discoffset); break; + } + + /*** Copy PKZip header to local, used as info ***/ + memcpy (&pkzip, readbuffer, sizeof (PKZIPHEADER)); + + pkzip.uncompressedSize = FLIP32 (pkzip.uncompressedSize); + + sprintf (msg, "Unzipping %d bytes ... Wait", + pkzip.uncompressedSize); + ShowAction (msg); + + /*** Prepare the zip stream ***/ + memset (&zs, 0, sizeof (z_stream)); + zs.zalloc = Z_NULL; + zs.zfree = Z_NULL; + zs.opaque = Z_NULL; + zs.avail_in = 0; + zs.next_in = Z_NULL; + res = inflateInit2 (&zs, -MAX_WBITS); + + if (res != Z_OK) + return 0; + + /*** Set ZipChunk for first pass ***/ + zipoffset = + (sizeof (PKZIPHEADER) + FLIP16 (pkzip.filenameLength) + + FLIP16 (pkzip.extraDataLength)); + zipchunk = ZIPCHUNK - zipoffset; + + /*** Now do it! ***/ + do + { + zs.avail_in = zipchunk; + zs.next_in = (Bytef *) & readbuffer[zipoffset]; + + /*** Now inflate until input buffer is exhausted ***/ + do + { + zs.avail_out = ZIPCHUNK; + zs.next_out = (Bytef *) & out; + + res = inflate (&zs, Z_NO_FLUSH); + + if (res == Z_MEM_ERROR) + { + inflateEnd (&zs); + return 0; + } + + have = ZIPCHUNK - zs.avail_out; + if (have) + { + /*** Copy to normal block buffer ***/ + memcpy (&outbuffer[bufferoffset], &out, have); + bufferoffset += have; + } + + } + while (zs.avail_out == 0); + + /*** Readup the next 2k block ***/ + zipoffset = 0; + zipchunk = ZIPCHUNK; + + switch (where) { + case 0: // SD Card + fread (readbuffer, 1, 2048, filehandle); break; + case 1: // DVD + discoffset += 2048; + dvd_read (readbuffer, 2048, discoffset); break; + } + + } + while (res != Z_STREAM_END); + + inflateEnd (&zs); + + if (res == Z_STREAM_END) + { + if (pkzip.uncompressedSize == (u32) bufferoffset) + return bufferoffset; + else + return pkzip.uncompressedSize; + } + + return 0; + +} diff --git a/source/ngc/unzip.h b/source/ngc/unzip.h new file mode 100644 index 0000000..7a862a7 --- /dev/null +++ b/source/ngc/unzip.h @@ -0,0 +1,35 @@ +/**************************************************************************** + * Snes9x 1.50 + * + * Nintendo Gamecube Unzip - borrowed from the GPP + * + * softdev July 2006 + ****************************************************************************/ +#ifndef _UNZIP_ +#define _UNZIP_ + +extern int IsZipFile (char *buffer); +int UnZipBuffer (unsigned char *outbuffer, u64 discoffset, short where, FILE* filehandle); +/* + * Zip file header definition + */ +typedef struct +{ + unsigned int zipid __attribute__ ((__packed__)); // 0x04034b50 + unsigned short zipversion __attribute__ ((__packed__)); + unsigned short zipflags __attribute__ ((__packed__)); + unsigned short compressionMethod __attribute__ ((__packed__)); + unsigned short lastmodtime __attribute__ ((__packed__)); + unsigned short lastmoddate __attribute__ ((__packed__)); + unsigned int crc32 __attribute__ ((__packed__)); + unsigned int compressedSize __attribute__ ((__packed__)); + unsigned int uncompressedSize __attribute__ ((__packed__)); + unsigned short filenameLength __attribute__ ((__packed__)); + unsigned short extraDataLength __attribute__ ((__packed__)); +} +PKZIPHEADER; + +u32 FLIP32 (u32 b); +u16 FLIP16 (u16 b); + +#endif diff --git a/source/ngc/video.cpp b/source/ngc/video.cpp index 9042bfb..c6e4c10 100644 --- a/source/ngc/video.cpp +++ b/source/ngc/video.cpp @@ -392,10 +392,10 @@ clearscreen (int colour) VIDEO_ClearFrameBuffer (vmode, xfb[whichfb], colour); #ifdef HW_RVL // on wii copy from memory - //memcpy ((char *) xfb[whichfb], (char *) backdrop, 640 * screenheight * 2); + memcpy ((char *) xfb[whichfb], (char *) backdrop, 640 * screenheight * 2); #else // on gc copy from aram - //ARAMFetch ((char *) xfb[whichfb], (char *) AR_BACKDROP, 640 * screenheight * 2); // FIX + ARAMFetch ((char *) xfb[whichfb], (char *) AR_BACKDROP, 640 * screenheight * 2); // FIX #endif }