Merge pull request #687 from dborth/pr/686

Pr/686
This commit is contained in:
dborth 2016-06-25 15:06:30 -06:00 committed by GitHub
commit 609746a183
43 changed files with 889 additions and 324 deletions

232
.cproject
View File

@ -1,116 +1,116 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> <?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings"> <storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756"> <cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756" moduleId="org.eclipse.cdt.core.settings" name="Debug"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/> <externalSettings/>
<extensions> <extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions> </extensions>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug"> <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756." name="/" resourcePath=""> <folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.2100931731" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug"> <toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.2100931731" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2143201764" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/> <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2143201764" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/snes9xgx}/Debug" id="cdt.managedbuild.builder.gnu.cross.2053837606" managedBuildOn="true" name="Gnu Make Builder.Debug" superClass="cdt.managedbuild.builder.gnu.cross"/> <builder buildPath="${workspace_loc:/snes9xgx}/Debug" id="cdt.managedbuild.builder.gnu.cross.2053837606" managedBuildOn="true" name="Gnu Make Builder.Debug" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.982919701" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler"> <tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.982919701" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.2031289438" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.2031289438" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.1652717778" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.option.debugging.level.1652717778" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1078928023" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1078928023" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1967926602" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"> <tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1967926602" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.1919997387" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.optimization.level.1919997387" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.1522103165" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.debugging.level.1522103165" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.99359356" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.99359356" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.181913686" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/> <tool id="cdt.managedbuild.tool.gnu.cross.c.linker.181913686" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1571732526" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"> <tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1571732526" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.413189499" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.413189499" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType> </inputType>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.109803410" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/> <tool id="cdt.managedbuild.tool.gnu.cross.archiver.109803410" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.2058380522" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler"> <tool id="cdt.managedbuild.tool.gnu.cross.assembler.2058380522" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.602635613" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> <inputType id="cdt.managedbuild.tool.gnu.assembler.input.602635613" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration> </cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.341040186"> <cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.341040186">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.341040186" moduleId="org.eclipse.cdt.core.settings" name="Release"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.341040186" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/> <externalSettings/>
<extensions> <extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions> </extensions>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.341040186" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release"> <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.341040186" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.341040186." name="/" resourcePath=""> <folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.341040186." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.861634419" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release"> <toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.861634419" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1790605361" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/> <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1790605361" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/snes9xgx}/Release" id="cdt.managedbuild.builder.gnu.cross.1674472827" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.builder.gnu.cross"/> <builder buildPath="${workspace_loc:/snes9xgx}/Release" id="cdt.managedbuild.builder.gnu.cross.1674472827" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.443160045" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler"> <tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.443160045" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.349795924" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.349795924" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.1035539010" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/> <option id="gnu.c.compiler.option.debugging.level.1035539010" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1964677996" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1964677996" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.850373129" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"> <tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.850373129" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.763348018" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.optimization.level.763348018" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.1524202306" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.debugging.level.1524202306" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.274494164" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.274494164" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1893547560" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/> <tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1893547560" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.2142625516" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"> <tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.2142625516" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1950759389" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1950759389" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType> </inputType>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1299483808" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/> <tool id="cdt.managedbuild.tool.gnu.cross.archiver.1299483808" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.2024822005" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler"> <tool id="cdt.managedbuild.tool.gnu.cross.assembler.2024822005" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1028666565" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1028666565" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration> </cconfiguration>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="snes9xgx.cdt.managedbuild.target.gnu.cross.exe.1270640375" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/> <project id="snes9xgx.cdt.managedbuild.target.gnu.cross.exe.1270640375" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
</storageModule> </storageModule>
<storageModule moduleId="scannerConfiguration"> <storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.341040186;cdt.managedbuild.config.gnu.cross.exe.release.341040186.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.850373129;cdt.managedbuild.tool.gnu.cpp.compiler.input.274494164"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.341040186;cdt.managedbuild.config.gnu.cross.exe.release.341040186.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.850373129;cdt.managedbuild.tool.gnu.cpp.compiler.input.274494164">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.365640756;cdt.managedbuild.config.gnu.cross.exe.debug.365640756.;cdt.managedbuild.tool.gnu.cross.c.compiler.982919701;cdt.managedbuild.tool.gnu.c.compiler.input.1078928023"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.365640756;cdt.managedbuild.config.gnu.cross.exe.debug.365640756.;cdt.managedbuild.tool.gnu.cross.c.compiler.982919701;cdt.managedbuild.tool.gnu.c.compiler.input.1078928023">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.341040186;cdt.managedbuild.config.gnu.cross.exe.release.341040186.;cdt.managedbuild.tool.gnu.cross.c.compiler.443160045;cdt.managedbuild.tool.gnu.c.compiler.input.1964677996"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.341040186;cdt.managedbuild.config.gnu.cross.exe.release.341040186.;cdt.managedbuild.tool.gnu.cross.c.compiler.443160045;cdt.managedbuild.tool.gnu.c.compiler.input.1964677996">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.365640756;cdt.managedbuild.config.gnu.cross.exe.debug.365640756.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1967926602;cdt.managedbuild.tool.gnu.cpp.compiler.input.99359356"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.365640756;cdt.managedbuild.config.gnu.cross.exe.debug.365640756.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1967926602;cdt.managedbuild.tool.gnu.cpp.compiler.input.99359356">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/> <storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject> </cproject>

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/snes9x-gx.pnps
/snes9x-gx.pnproj
/build_wii
/executables

View File

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>snes9xgx</name> <name>snes9xgx</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers> <triggers>full,incremental,</triggers>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.eclipse.cdt.core.cnature</nature> <nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature> <nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

View File

@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project> <project>
<configuration id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756" name="Debug"> <configuration id="cdt.managedbuild.config.gnu.cross.exe.debug.365640756" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1561467767032739010" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1561467767032739010" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>
</extension> </extension>
</configuration> </configuration>
<configuration id="cdt.managedbuild.config.gnu.cross.exe.release.341040186" name="Release"> <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.341040186" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1561467767032739010" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1561467767032739010" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>
</extension> </extension>
</configuration> </configuration>
</project> </project>

View File

@ -27,20 +27,20 @@ INCLUDES := source source/snes9x
# options for code generation # options for code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) -DNO_SOUND \
-DZLIB -DRIGHTSHIFT_IS_SAR -DCPU_SHUTDOWN -DCORRECT_VRAM_READS \ -DZLIB -DRIGHTSHIFT_IS_SAR -DCPU_SHUTDOWN -DCORRECT_VRAM_READS \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \ -D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \
-fomit-frame-pointer \ -fomit-frame-pointer \
-Wno-unused-parameter -Wno-strict-aliasing \ -Wno-unused-parameter -Wno-strict-aliasing \
-Wno-write-strings -Wno-parentheses -Wno-write-strings -Wno-parentheses
CXXFLAGS = $(CFLAGS) CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,-wrap,wiiuse_register
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project # any extra libraries we wish to link with the project
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
LIBS := -ldi -liso9660 -lpng -lmxml \ LIBS := -ldi -liso9660 -lpng -lmxml \
-lfat -lwiiuse -lz -lbte -lasnd -logc -lvorbisidec -lfreetype -ltinysmb -lfat -lwiiuse -lwupc -lz -lbte -lasnd -logc -lvorbisidec -lfreetype -ltinysmb
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing # list of directories containing libraries, this must be the top level containing
# include and lib # include and lib

2
compile.cmd Normal file
View File

@ -0,0 +1,2 @@
make -f Makefile.wii
pause

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1"> <app version="1">
<name>Snes9x GX</name> <name>Snes9x GX</name>
<coder>Tantric</coder> <coder>Tantric, Zopenko, Askot</coder>
<version>4.3.2</version> <version>4.3.5-fix1</version>
<release_date>20121109</release_date> <release_date>20160216</release_date>
<short_description>Super Nintendo Emulator</short_description> <short_description>Super Nintendo Emulator</short_description>
<long_description>A port of Snes9x to the Wii.</long_description> <long_description>A port of Snes9x to the Wii.</long_description>
<ahb_access /> <ahb_access />

View File

@ -1,19 +1,8 @@
­———————————————————————————————————————————————————————————————————————————­ _____________________________________________________________________________
:::::::::::::::×:::::::::::: .______ ::::::::::::::::::: _ ::::::::::
| _________ / ___°/ -------. (_)'\ / `°|
× /______ ° ---__---./ /___ _________ / --- / __| / \ °²
× _______\ \ / ___ // /____//\_____ ° /---/ / ___ --- ×
| °________/ / / / // /__ _______\ \ / / \ \ / / .||
::::::::::::::::/ /::--/_______\::.________/::::/ /:­::\ _ \::::::×:::
:::::::°:::::::/___\:::::::::::::::::::::::::::::/ /::::/__/ \--::­::::::
°:::::::::::::::::×:::::::::::::::°::::×:::::::::\--/::::::::::::::::::×:::::
­————————————————————————————————————————————————————————————————————————————
×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬
|0O×øo· Snes9x GX ·oø×O0| |0O×øo· Snes9x GX ·oø×O0|
| https://github.com/dborth/snes9xgx | | http://code.google.com/p/snes9x-gx |
| (Under GPL License) | | (Under GPL License) |
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' |___________________________________________________________________________|
Snes9x GX is a Super Nintendo™ / Super Famicom emulator for the Nintendo Wii. Snes9x GX is a Super Nintendo™ / Super Famicom emulator for the Nintendo Wii.
Snes9x GX is a port of Snes9x (http://www.snes9x.com). Snes9x GX is a port of Snes9x (http://www.snes9x.com).
@ -42,6 +31,32 @@ Wii homebrew is WiiBrew (www.wiibrew.org).
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
| UPDATE HISTORY | | UPDATE HISTORY |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
[4.3.5 - February 06, 2016]
* Added Fix94 wiiflow plugin mode
* Removed sound from GUI and now gets better perfomance/FPS on games like
Yoshi's Island and Kirby Dream Land 3.
[4.3.4 - February 2, 2016]
* Fixed screenshot image dimensions
* Fixed screenshot option, it no longer creates an additional "dummy" file
* Fixed performance issues, reverted to previous vsync method
* Removed automatic download of newer versions by Burnt Lasagna.
* Compiled with devkitPPC r26
Note: If compiled with devkitPPC r27 some games, like Final Fantasy III
and Chrono Trigger would crash on a battle
[4.3.3 - September 3, 2015 - July 7, 2015]
* Added Cebolleto's preview image support
* Added WiiUPro controller support
* Added a Scanline filter option
* Increase preview image size and reduce game list width
* Added a background to the preview image
* Added a Screenshot button
* Added a "WiiuPro" button on the button mapping menu
* Fixed the inverted color button selection that was in some option windows
[4.3.2 - November 9, 2012] [4.3.2 - November 9, 2012]
@ -837,34 +852,36 @@ changes to the emulator settings again and save them.
| CREDITS | | CREDITS |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
Coding & menu design Tantric Coding & menu design Tantric
Additional coding michniewski Additional coding michniewski
Menu artwork the3seashells Menu artwork the3seashells
Menu sound Peter de Man Menu sound Peter de Man
Extra coding Zopenko,Burnt Lasagna
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ Askot
Snes9x GX GameCube SoftDev, crunchy2,
eke-eke, others
Snes9x Snes9x Team ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
libogc/devkitPPC shagkur & wintermute Snes9x GX GameCube SoftDev, crunchy2,
FreeTypeGX Armin Tamzarian eke-eke, others
Snes9x Snes9x Team
libogc/devkitPPC shagkur & wintermute
FreeTypeGX Armin Tamzarian
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
| LINKS | | LINKS |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
SNES9X GX Project Page SNES9X GX Project Page
https://github.com/dborth/snes9xgx http://code.google.com/p/snes9x-gx
Wii Homebrew Community
www.wiibrew.org
Free (Public Domain) ROMs Wii Homebrew Community
www.pdroms.de www.wiibrew.org
Cheat Codes Free (Public Domain) ROMs
www.cheatzilla.com www.pdroms.de
Cheat Codes
www.cheatzilla.com
×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬ ×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬
|0O×øo· ·oø×O0| |0O×øo· ·oø×O0|

View File

@ -104,6 +104,8 @@ extern const u8 icon_settings_gamecube_png[];
extern const u32 icon_settings_gamecube_png_size; extern const u32 icon_settings_gamecube_png_size;
extern const u8 icon_settings_nunchuk_png[]; extern const u8 icon_settings_nunchuk_png[];
extern const u32 icon_settings_nunchuk_png_size; extern const u32 icon_settings_nunchuk_png_size;
extern const u8 icon_settings_wiiupro_png[];
extern const u32 icon_settings_wiiupro_png_size;
extern const u8 icon_settings_snescontroller_png[]; extern const u8 icon_settings_snescontroller_png[];
extern const u32 icon_settings_snescontroller_png_size; extern const u32 icon_settings_snescontroller_png_size;
@ -124,6 +126,8 @@ extern const u8 icon_settings_network_png[];
extern const u32 icon_settings_network_png_size; extern const u32 icon_settings_network_png_size;
extern const u8 icon_settings_video_png[]; extern const u8 icon_settings_video_png[];
extern const u32 icon_settings_video_png_size; extern const u32 icon_settings_video_png_size;
extern const u8 icon_settings_screenshot_png[];
extern const u32 icon_settings_screenshot_png_size;
extern const u8 button_png[]; extern const u8 button_png[];
extern const u32 button_png_size; extern const u32 button_png_size;
@ -251,6 +255,9 @@ extern const u32 bg_game_selection_png_size;
extern const u8 bg_game_selection_entry_png[]; extern const u8 bg_game_selection_entry_png[];
extern const u32 bg_game_selection_entry_png_size; extern const u32 bg_game_selection_entry_png_size;
extern const u8 bg_preview_png[];
extern const u32 bg_preview_png_size;
extern const u8 scrollbar_png[]; extern const u8 scrollbar_png[];
extern const u32 scrollbar_png_size; extern const u32 scrollbar_png_size;

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Snes9x Nintendo Wii/Gamecube Port * Snes9x 1.51 Nintendo Wii/Gamecube Port
* *
* Michniewski 2008 * Michniewski 2008
* *
@ -11,9 +11,6 @@
* Adapted from Snes9x Win32/MacOSX ports * Adapted from Snes9x Win32/MacOSX ports
* Video Filter Code (hq2x) * Video Filter Code (hq2x)
****************************************************************************/ ****************************************************************************/
#ifdef HW_RVL
#include <gccore.h> #include <gccore.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -24,10 +21,10 @@
#include "filter.h" #include "filter.h"
#include "video.h" #include "video.h"
#include "snes9xgx.h" #include "snes9xGX.h"
#include "menu.h" #include "memmap.h"
#include "snes9x/memmap.h" #include "menu.h"
#define NUMBITS (16) #define NUMBITS (16)
@ -64,6 +61,7 @@ GetFilterName (RenderFilter filterID)
case FILTER_HQ2X: return "hq2x"; case FILTER_HQ2X: return "hq2x";
case FILTER_HQ2XS: return "hq2x Soft"; case FILTER_HQ2XS: return "hq2x Soft";
case FILTER_HQ2XBOLD: return "hq2x Bold"; case FILTER_HQ2XBOLD: return "hq2x Bold";
case FILTER_SCANLINES: return "Scanlines";
} }
} }
@ -78,6 +76,7 @@ FilterToMethod (RenderFilter filterID)
case FILTER_HQ2X: return RenderHQ2X<FILTER_HQ2X>; case FILTER_HQ2X: return RenderHQ2X<FILTER_HQ2X>;
case FILTER_HQ2XS: return RenderHQ2X<FILTER_HQ2XS>; case FILTER_HQ2XS: return RenderHQ2X<FILTER_HQ2XS>;
case FILTER_HQ2XBOLD: return RenderHQ2X<FILTER_HQ2XBOLD>; case FILTER_HQ2XBOLD: return RenderHQ2X<FILTER_HQ2XBOLD>;
case FILTER_SCANLINES: return Scanlines<FILTER_SCANLINES>;
} }
} }
@ -92,6 +91,7 @@ int GetFilterScale(RenderFilter filterID)
case FILTER_HQ2X: case FILTER_HQ2X:
case FILTER_HQ2XS: case FILTER_HQ2XS:
case FILTER_HQ2XBOLD: case FILTER_HQ2XBOLD:
case FILTER_SCANLINES:
return 2; return 2;
} }
} }
@ -542,4 +542,20 @@ void RenderHQ2X (uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
sp += (src1line - width); sp += (src1line - width);
} }
} }
#endif
template<int GuiScale>
void Scanlines (uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height)
{
while (height--) {
uint16 *dp = (uint16 *) dstPtr;
for (int i = 0; i < width; ++i, dp += 2) {
uint16 sp = *((uint16 *)srcPtr + i);
*(dp) = sp;
*(dp + 1) = sp;
*(dp + dstPitch) = 0;
*(dp + dstPitch + 1) = 0;
}
dstPtr += dstPitch<<1;
srcPtr += srcPitch;
}
}

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* Snes9x Nintendo Wii/Gamecube Port * Snes9x 1.51 Nintendo Wii/Gamecube Port
* *
* Michniewski 2008 * Michniewski 2008
* *
@ -18,7 +18,7 @@
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include "snes9x/snes9x.h" #include "snes9x.h"
enum RenderFilter{ enum RenderFilter{
FILTER_NONE = 0, FILTER_NONE = 0,
@ -26,6 +26,7 @@ enum RenderFilter{
FILTER_HQ2X, FILTER_HQ2X,
FILTER_HQ2XS, FILTER_HQ2XS,
FILTER_HQ2XBOLD, FILTER_HQ2XBOLD,
FILTER_SCANLINES,
NUM_FILTERS NUM_FILTERS
}; };
@ -56,6 +57,7 @@ const char* GetFilterName (RenderFilter filterID);
bool GetFilterHiResSupport (RenderFilter filterID); bool GetFilterHiResSupport (RenderFilter filterID);
int GetFilterScale(RenderFilter filterID); int GetFilterScale(RenderFilter filterID);
template<int GuiScale> void RenderHQ2X (uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height); template<int GuiScale> void RenderHQ2X (uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
template<int GuiScale> void Scanlines (uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
void InitLUTs(); void InitLUTs();
#endif #endif

View File

@ -139,3 +139,30 @@ LoadSnapshotAuto (bool silent)
return LoadSnapshot(filepath, silent); return LoadSnapshot(filepath, silent);
} }
/****************************************************************************
* SavePreview
***************************************************************************/
int
SavePreviewImg (char * filepath, bool silent)
{
int device;
if(!FindDevice(filepath, &device))
return 0;
// save screenshot
if(gameScreenPngSize > 0)
{
char screenpath[1024];
strcpy(screenpath, filepath);
screenpath[strlen(screenpath)] = 0;
sprintf(screenpath, "%s.png", screenpath);
SaveFile((char *)gameScreenPng, screenpath, gameScreenPngSize, silent);
}
if(!silent)
InfoPrompt("Save successful");
return 1;
}

View File

@ -16,5 +16,5 @@ int SaveSnapshot (char * filepath, bool silent);
int SaveSnapshotAuto (bool silent); int SaveSnapshotAuto (bool silent);
int LoadSnapshot (char * filepath, bool silent); int LoadSnapshot (char * filepath, bool silent);
int LoadSnapshotAuto (bool silent); int LoadSnapshotAuto (bool silent);
int SavePreviewImg (char * filepath, bool silent);
#endif #endif

View File

@ -123,6 +123,16 @@ typedef struct _paddata {
u8 triggerR; u8 triggerR;
} PADData; } PADData;
typedef struct _wupcfulldata {
u32 btns_d;
u32 btns_u;
u32 btns_h;
s16 stickX;
s16 stickY;
s16 substickX;
s16 substickY;
} WUPCFullData;
#define EFFECT_SLIDE_TOP 1 #define EFFECT_SLIDE_TOP 1
#define EFFECT_SLIDE_BOTTOM 2 #define EFFECT_SLIDE_BOTTOM 2
#define EFFECT_SLIDE_RIGHT 4 #define EFFECT_SLIDE_RIGHT 4
@ -226,6 +236,7 @@ class GuiTrigger
WPADData wpaddata; //!< Wii controller trigger data WPADData wpaddata; //!< Wii controller trigger data
PADData pad; //!< GameCube controller trigger data PADData pad; //!< GameCube controller trigger data
WUPCFullData wupcdata; //!< WiiU Pro controller trigger data
WPADData * wpad; //!< Wii controller trigger WPADData * wpad; //!< Wii controller trigger
s32 chan; //!< Trigger controller channel (0-3, -1 for all) s32 chan; //!< Trigger controller channel (0-3, -1 for all)
u8 type; //!< trigger type (TRIGGER_SIMPLE, TRIGGER_HELD, TRIGGER_BUTTON_ONLY, TRIGGER_BUTTON_ONLY_IN_FOCUS) u8 type; //!< trigger type (TRIGGER_SIMPLE, TRIGGER_HELD, TRIGGER_BUTTON_ONLY, TRIGGER_BUTTON_ONLY_IN_FOCUS)

View File

@ -156,6 +156,7 @@ void GuiButton::Draw()
label[0]->Draw(); label[0]->Draw();
if(labelOver[1]) if(labelOver[1])
labelOver[1]->Draw(); labelOver[1]->Draw();
else if(label[1]) else if(label[1])
label[1]->Draw(); label[1]->Draw();
@ -254,7 +255,7 @@ void GuiButton::Update(GuiTrigger * t)
// button triggers // button triggers
if(this->IsClickable()) if(this->IsClickable())
{ {
s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig; s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig, wupc_btns, wupc_btns_trig;
for(int i=0; i<3; i++) for(int i=0; i<3; i++)
{ {
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan)) if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
@ -267,11 +268,17 @@ void GuiButton::Update(GuiTrigger * t)
cc_btns = t->wpad->btns_d >> 16; cc_btns = t->wpad->btns_d >> 16;
cc_btns_trig = trigger[i]->wpad->btns_d >> 16; cc_btns_trig = trigger[i]->wpad->btns_d >> 16;
// lower 16 bits only (WiiU Pro controller)
wupc_btns = t->wupcdata.btns_d >> 16;
wupc_btns_trig = trigger[i]->wupcdata.btns_d >> 16;
if( if(
(t->wpad->btns_d > 0 && (t->wpad->btns_d > 0 &&
(wm_btns == wm_btns_trig || (wm_btns == wm_btns_trig ||
(cc_btns == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) || (cc_btns == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) ||
(t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0)) (t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0) ||
(wupc_btns == wupc_btns_trig && wupc_btns_trig > 0))
{ {
if(t->chan == stateChan || stateChan == -1) if(t->chan == stateChan || stateChan == -1)
{ {
@ -303,7 +310,7 @@ void GuiButton::Update(GuiTrigger * t)
if(this->IsHoldable()) if(this->IsHoldable())
{ {
bool held = false; bool held = false;
s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig; s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig, wupc_btns, wupc_btns_h, wupc_btns_trig;
for(int i=0; i<3; i++) for(int i=0; i<3; i++)
{ {
@ -319,11 +326,17 @@ void GuiButton::Update(GuiTrigger * t)
cc_btns_h = t->wpad->btns_h >> 16; cc_btns_h = t->wpad->btns_h >> 16;
cc_btns_trig = trigger[i]->wpad->btns_h >> 16; cc_btns_trig = trigger[i]->wpad->btns_h >> 16;
// lower 16 bits only (WiiU Pro controller)
wupc_btns = t->wpad->btns_d >> 16;
wupc_btns_h = t->wpad->btns_h >> 16;
wupc_btns_trig = trigger[i]->wpad->btns_h >> 16;
if( if(
(t->wpad->btns_d > 0 && (t->wpad->btns_d > 0 &&
(wm_btns == wm_btns_trig || (wm_btns == wm_btns_trig ||
(cc_btns == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) || (cc_btns == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) ||
(t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0)) (t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0) ||
(wupc_btns == wupc_btns_trig && wupc_btns > 0))
{ {
if(trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED && if(trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED &&
(t->chan == stateChan || stateChan == -1)) (t->chan == stateChan || stateChan == -1))
@ -334,7 +347,9 @@ void GuiButton::Update(GuiTrigger * t)
(t->wpad->btns_h > 0 && (t->wpad->btns_h > 0 &&
(wm_btns_h == wm_btns_trig || (wm_btns_h == wm_btns_trig ||
(cc_btns_h == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) || (cc_btns_h == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) ||
(t->pad.btns_h == trigger[i]->pad.btns_h && t->pad.btns_h > 0)) (t->pad.btns_h == trigger[i]->pad.btns_h && t->pad.btns_h > 0) ||
(wupc_btns_h == wupc_btns_trig && wupc_btns_h > 0))
{ {
if(trigger[i]->type == TRIGGER_HELD) if(trigger[i]->type == TRIGGER_HELD)
held = true; held = true;

View File

@ -108,12 +108,12 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
fileListText[i] = new GuiText(NULL, 20, (GXColor){0, 0, 0, 0xff}); fileListText[i] = new GuiText(NULL, 20, (GXColor){0, 0, 0, 0xff});
fileListText[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); fileListText[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
fileListText[i]->SetPosition(5,0); fileListText[i]->SetPosition(5,0);
fileListText[i]->SetMaxWidth(380); fileListText[i]->SetMaxWidth(295);
fileListBg[i] = new GuiImage(bgFileSelectionEntry); fileListBg[i] = new GuiImage(bgFileSelectionEntry);
fileListIcon[i] = NULL; fileListIcon[i] = NULL;
fileList[i] = new GuiButton(380, 26); fileList[i] = new GuiButton(295, 26);
fileList[i]->SetParent(this); fileList[i]->SetParent(this);
fileList[i]->SetLabel(fileListText[i]); fileList[i]->SetLabel(fileListText[i]);
fileList[i]->SetImageOver(fileListBg[i]); fileList[i]->SetImageOver(fileListBg[i]);

View File

@ -22,6 +22,7 @@ static u32 delay[4];
GuiTrigger::GuiTrigger() GuiTrigger::GuiTrigger()
{ {
chan = -1; chan = -1;
memset(&wupcdata, 0, sizeof(WUPCFullData));
memset(&wpaddata, 0, sizeof(WPADData)); memset(&wpaddata, 0, sizeof(WPADData));
memset(&pad, 0, sizeof(PADData)); memset(&pad, 0, sizeof(PADData));
wpad = &wpaddata; wpad = &wpaddata;
@ -43,6 +44,7 @@ void GuiTrigger::SetSimpleTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
{ {
type = TRIGGER_SIMPLE; type = TRIGGER_SIMPLE;
chan = ch; chan = ch;
wupcdata.btns_d = wiibtns;
wpaddata.btns_d = wiibtns; wpaddata.btns_d = wiibtns;
pad.btns_d = gcbtns; pad.btns_d = gcbtns;
} }
@ -56,6 +58,7 @@ void GuiTrigger::SetHeldTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
{ {
type = TRIGGER_HELD; type = TRIGGER_HELD;
chan = ch; chan = ch;
wupcdata.btns_h = wiibtns;
wpaddata.btns_h = wiibtns; wpaddata.btns_h = wiibtns;
pad.btns_h = gcbtns; pad.btns_h = gcbtns;
} }
@ -68,6 +71,7 @@ void GuiTrigger::SetButtonOnlyTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
{ {
type = TRIGGER_BUTTON_ONLY; type = TRIGGER_BUTTON_ONLY;
chan = ch; chan = ch;
wupcdata.btns_d = wiibtns;
wpaddata.btns_d = wiibtns; wpaddata.btns_d = wiibtns;
pad.btns_d = gcbtns; pad.btns_d = gcbtns;
} }
@ -81,6 +85,7 @@ void GuiTrigger::SetButtonOnlyInFocusTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
{ {
type = TRIGGER_BUTTON_ONLY_IN_FOCUS; type = TRIGGER_BUTTON_ONLY_IN_FOCUS;
chan = ch; chan = ch;
wupcdata.btns_d = wiibtns;
wpaddata.btns_d = wiibtns; wpaddata.btns_d = wiibtns;
pad.btns_d = gcbtns; pad.btns_d = gcbtns;
} }
@ -158,11 +163,14 @@ bool GuiTrigger::Left()
u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_UP : WPAD_BUTTON_LEFT; u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_UP : WPAD_BUTTON_LEFT;
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT) if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT)
|| (wupcdata.btns_d | wupcdata.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT)
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_LEFT || (pad.btns_d | pad.btns_h) & PAD_BUTTON_LEFT
|| pad.stickX < -PADCAL || pad.stickX < -PADCAL
|| WPAD_StickX(0) < -PADCAL) || WPAD_StickX(0) < -PADCAL
|| wupcdata.stickX < -WUPCCAL)
{ {
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT) if((wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT))
|| (wupcdata.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT))
|| pad.btns_d & PAD_BUTTON_LEFT) || pad.btns_d & PAD_BUTTON_LEFT)
{ {
prev[chan] = gettime(); prev[chan] = gettime();
@ -191,11 +199,14 @@ bool GuiTrigger::Right()
u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_DOWN : WPAD_BUTTON_RIGHT; u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_DOWN : WPAD_BUTTON_RIGHT;
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT) if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT)
|| ((wupcdata.btns_d | wupcdata.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT))
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_RIGHT || (pad.btns_d | pad.btns_h) & PAD_BUTTON_RIGHT
|| pad.stickX > PADCAL || pad.stickX > PADCAL
|| WPAD_StickX(0) > PADCAL) || WPAD_StickX(0) > PADCAL
|| wupcdata.stickX > WUPCCAL)
{ {
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT) if((wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT))
|| (wupcdata.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT))
|| pad.btns_d & PAD_BUTTON_RIGHT) || pad.btns_d & PAD_BUTTON_RIGHT)
{ {
prev[chan] = gettime(); prev[chan] = gettime();
@ -223,12 +234,15 @@ bool GuiTrigger::Up()
{ {
u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_RIGHT : WPAD_BUTTON_UP; u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_RIGHT : WPAD_BUTTON_UP;
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_UP) if(((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_UP))
|| ((wupcdata.btns_d | wupcdata.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_UP))
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_UP || (pad.btns_d | pad.btns_h) & PAD_BUTTON_UP
|| pad.stickY > PADCAL || pad.stickY > PADCAL
|| WPAD_StickY(0) > PADCAL) || WPAD_StickY(0) > PADCAL
|| wupcdata.stickY > WUPCCAL)
{ {
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_UP) if((wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_UP))
|| (wupcdata.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_UP))
|| pad.btns_d & PAD_BUTTON_UP) || pad.btns_d & PAD_BUTTON_UP)
{ {
prev[chan] = gettime(); prev[chan] = gettime();
@ -256,12 +270,15 @@ bool GuiTrigger::Down()
{ {
u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_LEFT : WPAD_BUTTON_DOWN; u32 wiibtn = GCSettings.WiimoteOrientation ? WPAD_BUTTON_LEFT : WPAD_BUTTON_DOWN;
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN) if(((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN))
|| ((wupcdata.btns_d | wupcdata.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN))
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_DOWN || (pad.btns_d | pad.btns_h) & PAD_BUTTON_DOWN
|| pad.stickY < -PADCAL || pad.stickY < -PADCAL
|| WPAD_StickY(0) < -PADCAL) || WPAD_StickY(0) < -PADCAL
|| wupcdata.stickY < -WUPCCAL)
{ {
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN) if((wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN))
|| wupcdata.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN)
|| pad.btns_d & PAD_BUTTON_DOWN) || pad.btns_d & PAD_BUTTON_DOWN)
{ {
prev[chan] = gettime(); prev[chan] = gettime();
@ -271,7 +288,7 @@ bool GuiTrigger::Down()
now[chan] = gettime(); now[chan] = gettime();
if(diff_usec(prev[chan], now[chan]) > delay[chan]) if(diff_usec(prev[chan], now[chan]) > delay[chan])
{ {
prev[chan] = now[chan]; prev[chan] = now[chan];

View File

@ -228,8 +228,8 @@ void GuiWindow::ToggleFocus(GuiTrigger * t)
} }
} }
// change focus // change focus
else if(t->wpad->btns_d & (WPAD_BUTTON_1 | WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) else if((t->wpad->btns_d & (WPAD_BUTTON_1 | WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B))
|| t->pad.btns_d & PAD_BUTTON_B) || (t->pad.btns_d & PAD_BUTTON_B) || (t->wupcdata.btns_d & WPAD_CLASSIC_BUTTON_B))
{ {
for (i = found; i < elemSize; ++i) for (i = found; i < elemSize; ++i)
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

After

Width:  |  Height:  |  Size: 810 B

View File

@ -20,6 +20,7 @@
#include <ogcsys.h> #include <ogcsys.h>
#include <unistd.h> #include <unistd.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <wupc/wupc.h>
#include <ogc/lwp_watchdog.h> #include <ogc/lwp_watchdog.h>
#include "snes9xgx.h" #include "snes9xgx.h"
@ -114,7 +115,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_LEFT; btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_LEFT;
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_RIGHT; btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_RIGHT;
} }
/*** Nunchuk + wiimote Padmap ***/ /*** Nunchuk + wiimote Padmap ***/
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_NUNCHUK)) if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_NUNCHUK))
{ {
@ -202,6 +203,7 @@ void
UpdatePads() UpdatePads()
{ {
#ifdef HW_RVL #ifdef HW_RVL
WUPC_UpdateButtonStats();
WPAD_ScanPads(); WPAD_ScanPads();
#endif #endif
@ -218,6 +220,15 @@ UpdatePads()
userInput[i].pad.substickY = PAD_SubStickY(i); userInput[i].pad.substickY = PAD_SubStickY(i);
userInput[i].pad.triggerL = PAD_TriggerL(i); userInput[i].pad.triggerL = PAD_TriggerL(i);
userInput[i].pad.triggerR = PAD_TriggerR(i); userInput[i].pad.triggerR = PAD_TriggerR(i);
#ifdef HW_RVL
userInput[i].wupcdata.btns_d = WUPC_ButtonsDown(i);
userInput[i].wupcdata.btns_u = WUPC_ButtonsUp(i);
userInput[i].wupcdata.btns_h = WUPC_ButtonsHeld(i);
userInput[i].wupcdata.stickX = WUPC_lStickX(i);
userInput[i].wupcdata.stickY = WUPC_lStickY(i);
userInput[i].wupcdata.substickX = WUPC_rStickX(i);
userInput[i].wupcdata.substickY = WUPC_rStickY(i);
#endif
} }
} }
@ -298,6 +309,7 @@ static void UpdateCursorPosition (int chan, int &pos_x, int &pos_y)
{ {
#define SCOPEPADCAL 20 #define SCOPEPADCAL 20
#define WUPCSCOPEPADCAL 160
// gc left joystick // gc left joystick
if (userInput[chan].pad.stickX > SCOPEPADCAL) if (userInput[chan].pad.stickX > SCOPEPADCAL)
@ -354,6 +366,32 @@ static void UpdateCursorPosition (int chan, int &pos_x, int &pos_y)
pos_y -= (wm_ay*1.0)/SCOPEPADCAL; pos_y -= (wm_ay*1.0)/SCOPEPADCAL;
if (pos_y < 0) pos_y = 0; if (pos_y < 0) pos_y = 0;
} }
/* WiiU Pro Controller */
s8 wupc_ax = userInput[chan].wupcdata.stickX;
s8 wupc_ay = userInput[chan].wupcdata.stickX;
if (wupc_ax > WUPCSCOPEPADCAL)
{
pos_x += (wupc_ax*1.0)/WUPCSCOPEPADCAL;
if (pos_x > 256) pos_x = 256;
}
if (wupc_ax < -WUPCSCOPEPADCAL)
{
pos_x -= (wupc_ax*-1.0)/WUPCSCOPEPADCAL;
if (pos_x < 0) pos_x = 0;
}
if (wupc_ay < -WUPCSCOPEPADCAL)
{
pos_y += (wupc_ay*-1.0)/WUPCSCOPEPADCAL;
if (pos_y > 224) pos_y = 224;
}
if (wupc_ay > WUPCSCOPEPADCAL)
{
pos_y -= (wupc_ay*1.0)/WUPCSCOPEPADCAL;
if (pos_y < 0) pos_y = 0;
}
} }
#endif #endif
@ -383,6 +421,10 @@ static void decodepad (int chan)
u32 exp_type; u32 exp_type;
if ( WPAD_Probe(chan, &exp_type) != 0 ) if ( WPAD_Probe(chan, &exp_type) != 0 )
exp_type = WPAD_EXP_NONE; exp_type = WPAD_EXP_NONE;
s16 wupc_ax = userInput[chan].wupcdata.stickX;
s16 wupc_ay = userInput[chan].wupcdata.stickY;
u32 wupcp = userInput[chan].wupcdata.btns_h;
#endif #endif
/*** /***
@ -427,6 +469,20 @@ static void decodepad (int chan)
else if(sin(angle) < -THRES) else if(sin(angle) < -THRES)
wp |= (exp_type == WPAD_EXP_CLASSIC) ? WPAD_CLASSIC_BUTTON_DOWN : WPAD_BUTTON_DOWN; wp |= (exp_type == WPAD_EXP_CLASSIC) ? WPAD_CLASSIC_BUTTON_DOWN : WPAD_BUTTON_DOWN;
} }
/* Pro Controller */
if (wupc_ax * wupc_ax + wupc_ay * wupc_ay > WUPCCAL * WUPCCAL)
{
angle = atan2(wupc_ay, wupc_ax);
if(cos(angle) > THRES)
wupcp |= WPAD_CLASSIC_BUTTON_RIGHT;
else if(cos(angle) < -THRES)
wupcp |= WPAD_CLASSIC_BUTTON_LEFT;
if(sin(angle) > THRES)
wupcp |= WPAD_CLASSIC_BUTTON_UP;
else if(sin(angle) < -THRES)
wupcp |= WPAD_CLASSIC_BUTTON_DOWN;
}
#endif #endif
/*** Fix offset to pad ***/ /*** Fix offset to pad ***/
@ -440,6 +496,7 @@ static void decodepad (int chan)
|| ( (exp_type == WPAD_EXP_NONE) && (wp & btnmap[CTRL_PAD][CTRLR_WIIMOTE][i]) ) // wiimote || ( (exp_type == WPAD_EXP_NONE) && (wp & btnmap[CTRL_PAD][CTRLR_WIIMOTE][i]) ) // wiimote
|| ( (exp_type == WPAD_EXP_CLASSIC) && (wp & btnmap[CTRL_PAD][CTRLR_CLASSIC][i]) ) // classic controller || ( (exp_type == WPAD_EXP_CLASSIC) && (wp & btnmap[CTRL_PAD][CTRLR_CLASSIC][i]) ) // classic controller
|| ( (exp_type == WPAD_EXP_NUNCHUK) && (wp & btnmap[CTRL_PAD][CTRLR_NUNCHUK][i]) ) // nunchuk + wiimote || ( (exp_type == WPAD_EXP_NUNCHUK) && (wp & btnmap[CTRL_PAD][CTRLR_NUNCHUK][i]) ) // nunchuk + wiimote
|| ( (wupcp & btnmap[CTRL_PAD][CTRLR_CLASSIC][i]) ) // WiiU Pro Controller
#endif #endif
) )
S9xReportButton (offset + i, true); S9xReportButton (offset + i, true);
@ -457,6 +514,7 @@ static void decodepad (int chan)
if (jp & btnmap[CTRL_SCOPE][CTRLR_GCPAD][i] if (jp & btnmap[CTRL_SCOPE][CTRLR_GCPAD][i]
#ifdef HW_RVL #ifdef HW_RVL
|| wp & btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i] || wp & btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i]
|| wupcp & btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i]
#endif #endif
) )
{ {
@ -494,6 +552,7 @@ static void decodepad (int chan)
if (jp & btnmap[CTRL_MOUSE][CTRLR_GCPAD][i] if (jp & btnmap[CTRL_MOUSE][CTRLR_GCPAD][i]
#ifdef HW_RVL #ifdef HW_RVL
|| wp & btnmap[CTRL_MOUSE][CTRLR_WIIMOTE][i] || wp & btnmap[CTRL_MOUSE][CTRLR_WIIMOTE][i]
|| wupcp & btnmap[CTRL_MOUSE][CTRLR_WIIMOTE][i]
#endif #endif
) )
S9xReportButton(offset + i, true); S9xReportButton(offset + i, true);
@ -516,6 +575,7 @@ static void decodepad (int chan)
if (jp & btnmap[CTRL_JUST][CTRLR_GCPAD][i] if (jp & btnmap[CTRL_JUST][CTRLR_GCPAD][i]
#ifdef HW_RVL #ifdef HW_RVL
|| wp & btnmap[CTRL_JUST][CTRLR_WIIMOTE][i] || wp & btnmap[CTRL_JUST][CTRLR_WIIMOTE][i]
|| wupcp & btnmap[CTRL_JUST][CTRLR_WIIMOTE][i]
#endif #endif
) )
S9xReportButton(offset + i, true); S9xReportButton(offset + i, true);
@ -548,9 +608,12 @@ bool MenuRequested()
userInput[i].pad.btns_h & PAD_TRIGGER_R && userInput[i].pad.btns_h & PAD_TRIGGER_R &&
userInput[i].pad.btns_h & PAD_BUTTON_X && userInput[i].pad.btns_h & PAD_BUTTON_X &&
userInput[i].pad.btns_h & PAD_BUTTON_Y userInput[i].pad.btns_h & PAD_BUTTON_Y
) || )
(userInput[i].wpad->btns_h & WPAD_BUTTON_HOME) || #ifdef HW_RVL
(userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_HOME) || (userInput[i].wpad->btns_h & WPAD_BUTTON_HOME) ||
(userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_HOME) ||
(userInput[i].wupcdata.btns_h & WPAD_CLASSIC_BUTTON_HOME)
#endif
) )
{ {
return true; return true;
@ -570,12 +633,13 @@ void ReportButtons ()
int i, j; int i, j;
UpdatePads(); UpdatePads();
/*
Settings.TurboMode = ( Settings.TurboMode = (
userInput[0].pad.substickX > 70 || userInput[0].pad.substickX > 70 ||
userInput[0].WPAD_StickX(1) > 70 userInput[0].WPAD_StickX(1) > 70 ||
userInput[0].wupcdata.substickX > 560
); // RIGHT on c-stick and on classic controller right joystick ); // RIGHT on c-stick and on classic controller right joystick
*/
/* Check for menu: /* Check for menu:
* CStick left * CStick left
* OR "L+R+X+Y" (eg. Homebrew/Adapted SNES controllers) * OR "L+R+X+Y" (eg. Homebrew/Adapted SNES controllers)

View File

@ -19,6 +19,7 @@
#define PI 3.14159265f #define PI 3.14159265f
#define PADCAL 50 #define PADCAL 50
#define WUPCCAL 400
#define MAXJP 12 // # of mappable controller buttons #define MAXJP 12 // # of mappable controller buttons
extern u32 btnmap[4][4][12]; extern u32 btnmap[4][4][12];

View File

@ -1,6 +1,42 @@
msgid "&" msgid "&"
msgstr "" msgstr ""
msgid "Up"
msgstr "Arriba"
msgid "Down"
msgstr "Abajo"
msgid "Left"
msgstr "Izquierda"
msgid "Right"
msgstr "Derecha"
msgid "PLUS"
msgstr "MAS"
msgid "MINUS"
msgstr "MENOS"
msgid "Aim Offscreen"
msgstr "Apuntar Fuera de Pantalla"
msgid "Cursor"
msgstr ""
msgid "Turbo On"
msgstr "Turbo Encendido"
msgid "Turbo Off"
msgstr "Turbo Apagado"
msgid "Pause"
msgstr "Pausa"
msgid "START"
msgstr "Inicio"
msgid "16:9 Correction" msgid "16:9 Correction"
msgstr "Corrección 16:9" msgstr "Corrección 16:9"
@ -82,6 +118,12 @@ msgstr "Vista Portada"
msgid "Covers Folder" msgid "Covers Folder"
msgstr "Carpeta Portadas" msgstr "Carpeta Portadas"
msgid "Wii U Pro Controller"
msgstr "Mando Wii U Pro"
msgid "Screenshots Folder"
msgstr "Carpeta Img. Pantalla"
msgid "Credits" msgid "Credits"
msgstr "Créditos" msgstr "Créditos"
@ -233,7 +275,7 @@ msgid "Press any button on the GameCube Controller now. Press Home or the C-Stic
msgstr "Presione un botón en el Mando de GameCube. Presione HOME o mueva el el Stick-C para eliminar la configuración actual." msgstr "Presione un botón en el Mando de GameCube. Presione HOME o mueva el el Stick-C para eliminar la configuración actual."
msgid "Press any button on the GameCube Controller now. Press the C-Stick in any direction to clear the existing mapping." msgid "Press any button on the GameCube Controller now. Press the C-Stick in any direction to clear the existing mapping."
msgstr "Presione un botón en el Mando de GameCube. Presione HOME o mueva el el Stick-C para eliminar la configuración actual." msgstr "Presione un botón en el Mando de GameCube. Mueva el el Stick-C para eliminar la configuración actual."
msgid "Press any button on the Wiimote now. Press Home to clear the existing mapping." msgid "Press any button on the Wiimote now. Press Home to clear the existing mapping."
msgstr "Presione un botón en el Wiimote. Presione HOME para eliminar la configuración actual." msgstr "Presione un botón en el Wiimote. Presione HOME para eliminar la configuración actual."
@ -241,6 +283,18 @@ msgstr "Presione un bot
msgid "Press any button on the Wiimote or Nunchuk now. Press Home to clear the existing mapping." msgid "Press any button on the Wiimote or Nunchuk now. Press Home to clear the existing mapping."
msgstr "Presione un botón en el Wiimote o Nunchuck. Presione HOME para eliminar la configuración actual." msgstr "Presione un botón en el Wiimote o Nunchuck. Presione HOME para eliminar la configuración actual."
msgid "Press any button on the Wii U Pro Controller now. Press Home to clear the existing mapping."
msgstr "Presione un botón en el Mando Wii U Pro. Presione HOME para eliminar la configuración actual."
msgid "ScreenShot"
msgstr "Pantalla"
msgid "Preview Screenshot"
msgstr "Imagen de Pantalla"
msgid "Save a new Preview Screenshot? Current Screenshot image will be overwritten."
msgstr "¿Grabar una nueva imagen de pantalla? La imagen actual será sobre-escrita."
msgid "Progressive (480p)" msgid "Progressive (480p)"
msgstr "Progresivo (480p)" msgstr "Progresivo (480p)"

View File

@ -14,6 +14,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <wupc/wupc.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef HW_RVL #ifdef HW_RVL
@ -38,6 +39,7 @@
#include "utils/gettext.h" #include "utils/gettext.h"
#include "snes9x/snes9x.h" #include "snes9x/snes9x.h"
#include "snes9x/fxemu.h"
#include "snes9x/memmap.h" #include "snes9x/memmap.h"
#include "snes9x/cheats.h" #include "snes9x/cheats.h"
@ -74,6 +76,7 @@ static GuiWindow * mainWindow = NULL;
static GuiText * settingText = NULL; static GuiText * settingText = NULL;
static GuiText * settingText2 = NULL; static GuiText * settingText2 = NULL;
static int lastMenu = MENU_NONE; static int lastMenu = MENU_NONE;
static int wiiuproCtrl = 0;
static int mapMenuCtrl = 0; static int mapMenuCtrl = 0;
static int mapMenuCtrlSNES = 0; static int mapMenuCtrlSNES = 0;
@ -882,10 +885,10 @@ static void WindowCredits(void * ptr)
Menu_Render(); Menu_Render();
if((userInput[0].wpad->btns_d || userInput[0].pad.btns_d) || if((userInput[0].wpad->btns_d || userInput[0].pad.btns_d || userInput[0].wupcdata.btns_d) ||
(userInput[1].wpad->btns_d || userInput[1].pad.btns_d) || (userInput[1].wpad->btns_d || userInput[1].pad.btns_d || userInput[1].wupcdata.btns_d) ||
(userInput[2].wpad->btns_d || userInput[2].pad.btns_d) || (userInput[2].wpad->btns_d || userInput[2].pad.btns_d || userInput[2].wupcdata.btns_d) ||
(userInput[3].wpad->btns_d || userInput[3].pad.btns_d)) (userInput[3].wpad->btns_d || userInput[3].pad.btns_d || userInput[3].wupcdata.btns_d))
{ {
exit = true; exit = true;
} }
@ -895,6 +898,7 @@ static void WindowCredits(void * ptr)
// clear buttons pressed // clear buttons pressed
for(i=0; i < 4; i++) for(i=0; i < 4; i++)
{ {
userInput[i].wupcdata.btns_d = 0;
userInput[i].wpad->btns_d = 0; userInput[i].wpad->btns_d = 0;
userInput[i].pad.btns_d = 0; userInput[i].pad.btns_d = 0;
} }
@ -925,6 +929,7 @@ static int MenuGameSelection()
GuiImageData iconSettings(icon_settings_png); GuiImageData iconSettings(icon_settings_png);
GuiImageData btnOutline(button_long_png); GuiImageData btnOutline(button_long_png);
GuiImageData btnOutlineOver(button_long_over_png); GuiImageData btnOutlineOver(button_long_over_png);
GuiImageData bgPreviewImg(bg_preview_png);
GuiTrigger trigHome; GuiTrigger trigHome;
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
@ -972,23 +977,27 @@ static int MenuGameSelection()
buttonWindow.Append(&settingsBtn); buttonWindow.Append(&settingsBtn);
buttonWindow.Append(&exitBtn); buttonWindow.Append(&exitBtn);
GuiFileBrowser gameBrowser(424, 268); GuiFileBrowser gameBrowser(330, 268);
gameBrowser.SetPosition(10, 98); gameBrowser.SetPosition(20, 98);
ResetBrowser(); ResetBrowser();
GuiImage bgPreview(&bgPreviewImg);
bgPreview.SetPosition(365, 98);
GuiImage preview; GuiImage preview;
preview.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); preview.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
preview.SetPosition(-10, 0); preview.SetPosition(174, -8);
u8* imgBuffer = MEM_ALLOC(512 * 512 * 4); u8* imgBuffer = MEM_ALLOC(512 * 512 * 4);
int previousBrowserIndex = -1; int previousBrowserIndex = -1;
char screenshotPath[MAXJOLIET + 1]; char screenshotPath[MAXJOLIET + 1];
HaltGui(); HaltGui();
btnLogo->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); btnLogo->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
btnLogo->SetPosition(-50, 24); btnLogo->SetPosition(-50, 24);
mainWindow->Append(&titleTxt); mainWindow->Append(&titleTxt);
mainWindow->Append(&gameBrowser); mainWindow->Append(&gameBrowser);
mainWindow->Append(&buttonWindow); mainWindow->Append(&buttonWindow);
mainWindow->Append(&bgPreview);
mainWindow->Append(&preview); mainWindow->Append(&preview);
ResumeGui(); ResumeGui();
@ -1075,7 +1084,8 @@ static int MenuGameSelection()
if(DecodePNG(savebuffer, &width, &height, imgBuffer, 512, 512)) if(DecodePNG(savebuffer, &width, &height, imgBuffer, 512, 512))
{ {
preview.SetImage(imgBuffer, width, height); preview.SetImage(imgBuffer, width, height);
preview.SetScale(180.0f / width); //preview.SetScale(225.0f / width);
preview.SetScale( MIN(225.0f / width, 235.0f / height) );
} }
else else
{ {
@ -1101,6 +1111,7 @@ static int MenuGameSelection()
mainWindow->Remove(&titleTxt); mainWindow->Remove(&titleTxt);
mainWindow->Remove(&buttonWindow); mainWindow->Remove(&buttonWindow);
mainWindow->Remove(&gameBrowser); mainWindow->Remove(&gameBrowser);
mainWindow->Remove(&bgPreview);
mainWindow->Remove(&preview); mainWindow->Remove(&preview);
MEM_DEALLOC(imgBuffer); MEM_DEALLOC(imgBuffer);
return menu; return menu;
@ -1203,7 +1214,7 @@ static void ControllerWindow()
static int MenuGame() static int MenuGame()
{ {
int menu = MENU_NONE; int menu = MENU_NONE;
GuiText titleTxt((char *)Memory.ROMFilename, 22, (GXColor){255, 255, 255, 255}); GuiText titleTxt((char *)Memory.ROMFilename, 22, (GXColor){255, 255, 255, 255});
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
@ -1412,7 +1423,7 @@ static int MenuGame()
} }
ResumeGui(); ResumeGui();
if(lastMenu == MENU_NONE) if(lastMenu == MENU_NONE)
AutoSave(); AutoSave();
@ -1431,10 +1442,19 @@ static int MenuGame()
} }
else else
{ {
newStatus = false; struct WUPCData *data = WUPC_Data(i);
newLevel = 0; if(data != NULL)
{
newStatus = true;
newLevel = data->battery;
}
else
{
newStatus = false;
newLevel = 0;
}
} }
if(status[i] != newStatus || level[i] != newLevel) if(status[i] != newStatus || level[i] != newLevel)
{ {
if(newStatus == true) // controller connected if(newStatus == true) // controller connected
@ -1836,6 +1856,7 @@ static int MenuGameSaves(int action)
static int MenuGameSettings() static int MenuGameSettings()
{ {
int menu = MENU_NONE; int menu = MENU_NONE;
char filepath[1024];
GuiText titleTxt("Game Settings", 26, (GXColor){255, 255, 255, 255}); GuiText titleTxt("Game Settings", 26, (GXColor){255, 255, 255, 255});
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
@ -1851,6 +1872,7 @@ static int MenuGameSettings()
GuiImageData iconVideo(icon_settings_video_png); GuiImageData iconVideo(icon_settings_video_png);
GuiImageData iconController(icon_game_controllers_png); GuiImageData iconController(icon_game_controllers_png);
GuiImageData iconCheats(icon_game_cheats_png); GuiImageData iconCheats(icon_game_cheats_png);
GuiImageData iconScreenshot(icon_settings_screenshot_png);
GuiImageData btnCloseOutline(button_small_png); GuiImageData btnCloseOutline(button_small_png);
GuiImageData btnCloseOutlineOver(button_small_over_png); GuiImageData btnCloseOutlineOver(button_small_over_png);
@ -1899,7 +1921,7 @@ static int MenuGameSettings()
GuiImage controllerBtnIcon(&iconController); GuiImage controllerBtnIcon(&iconController);
GuiButton controllerBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight()); GuiButton controllerBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
controllerBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); controllerBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
controllerBtn.SetPosition(-125, 250); controllerBtn.SetPosition(-200, 250);
controllerBtn.SetLabel(&controllerBtnTxt); controllerBtn.SetLabel(&controllerBtnTxt);
controllerBtn.SetImage(&controllerBtnImg); controllerBtn.SetImage(&controllerBtnImg);
controllerBtn.SetImageOver(&controllerBtnImgOver); controllerBtn.SetImageOver(&controllerBtnImgOver);
@ -1910,13 +1932,30 @@ static int MenuGameSettings()
controllerBtn.SetTrigger(trig2); controllerBtn.SetTrigger(trig2);
controllerBtn.SetEffectGrow(); controllerBtn.SetEffectGrow();
GuiText screenshotBtnTxt("ScreenShot", 22, (GXColor){0, 0, 0, 255});
GuiImage screenshotBtnImg(&btnLargeOutline);
GuiImage screenshotBtnImgOver(&btnLargeOutlineOver);
GuiImage screenshotBtnIcon(&iconScreenshot);
GuiButton screenshotBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
screenshotBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
screenshotBtn.SetPosition(0, 250);
screenshotBtn.SetLabel(&screenshotBtnTxt);
screenshotBtn.SetImage(&screenshotBtnImg);
screenshotBtn.SetImageOver(&screenshotBtnImgOver);
screenshotBtn.SetIcon(&screenshotBtnIcon);
screenshotBtn.SetSoundOver(&btnSoundOver);
screenshotBtn.SetSoundClick(&btnSoundClick);
screenshotBtn.SetTrigger(trigA);
screenshotBtn.SetTrigger(trig2);
screenshotBtn.SetEffectGrow();
GuiText cheatsBtnTxt("Cheats", 22, (GXColor){0, 0, 0, 255}); GuiText cheatsBtnTxt("Cheats", 22, (GXColor){0, 0, 0, 255});
GuiImage cheatsBtnImg(&btnLargeOutline); GuiImage cheatsBtnImg(&btnLargeOutline);
GuiImage cheatsBtnImgOver(&btnLargeOutlineOver); GuiImage cheatsBtnImgOver(&btnLargeOutlineOver);
GuiImage cheatsBtnIcon(&iconCheats); GuiImage cheatsBtnIcon(&iconCheats);
GuiButton cheatsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight()); GuiButton cheatsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
cheatsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); cheatsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
cheatsBtn.SetPosition(125, 250); cheatsBtn.SetPosition(200, 250);
cheatsBtn.SetLabel(&cheatsBtnTxt); cheatsBtn.SetLabel(&cheatsBtnTxt);
cheatsBtn.SetImage(&cheatsBtnImg); cheatsBtn.SetImage(&cheatsBtnImg);
cheatsBtn.SetImageOver(&cheatsBtnImgOver); cheatsBtn.SetImageOver(&cheatsBtnImgOver);
@ -1964,10 +2003,11 @@ static int MenuGameSettings()
w.Append(&mappingBtn); w.Append(&mappingBtn);
w.Append(&videoBtn); w.Append(&videoBtn);
w.Append(&controllerBtn); w.Append(&controllerBtn);
w.Append(&screenshotBtn);
w.Append(&cheatsBtn); w.Append(&cheatsBtn);
w.Append(&closeBtn); w.Append(&closeBtn);
w.Append(&backBtn); w.Append(&backBtn);
mainWindow->Append(&w); mainWindow->Append(&w);
ResumeGui(); ResumeGui();
@ -1996,6 +2036,14 @@ static int MenuGameSettings()
else else
InfoPrompt("Cheats file not found!"); InfoPrompt("Cheats file not found!");
} }
else if(screenshotBtn.GetState() == STATE_CLICKED)
{
if (WindowPrompt("Preview Screenshot", "Save a new Preview Screenshot? Current Screenshot image will be overwritten.", "OK", "Cancel"))
{
snprintf(filepath, 1024, "%s%s/%s", pathPrefix[GCSettings.SaveMethod], GCSettings.ScreenshotsFolder, Memory.ROMFilename);
SavePreviewImg(filepath, NOTSILENT);
}
}
else if(closeBtn.GetState() == STATE_CLICKED) else if(closeBtn.GetState() == STATE_CLICKED)
{ {
menu = MENU_EXIT; menu = MENU_EXIT;
@ -2290,7 +2338,8 @@ static int MenuSettingsMappingsController()
GuiImageData iconClassic(icon_settings_classic_png); GuiImageData iconClassic(icon_settings_classic_png);
GuiImageData iconGamecube(icon_settings_gamecube_png); GuiImageData iconGamecube(icon_settings_gamecube_png);
GuiImageData iconNunchuk(icon_settings_nunchuk_png); GuiImageData iconNunchuk(icon_settings_nunchuk_png);
GuiImageData iconWiiupro(icon_settings_wiiupro_png);
GuiText gamecubeBtnTxt("GameCube Controller", 22, (GXColor){0, 0, 0, 255}); GuiText gamecubeBtnTxt("GameCube Controller", 22, (GXColor){0, 0, 0, 255});
gamecubeBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-20); gamecubeBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-20);
GuiImage gamecubeBtnImg(&btnLargeOutline); GuiImage gamecubeBtnImg(&btnLargeOutline);
@ -2333,7 +2382,7 @@ static int MenuSettingsMappingsController()
GuiImage classicBtnIcon(&iconClassic); GuiImage classicBtnIcon(&iconClassic);
GuiButton classicBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight()); GuiButton classicBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
classicBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); classicBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
classicBtn.SetPosition(-125, 250); classicBtn.SetPosition(-200, 250);
classicBtn.SetLabel(&classicBtnTxt); classicBtn.SetLabel(&classicBtnTxt);
classicBtn.SetImage(&classicBtnImg); classicBtn.SetImage(&classicBtnImg);
classicBtn.SetImageOver(&classicBtnImgOver); classicBtn.SetImageOver(&classicBtnImgOver);
@ -2343,6 +2392,24 @@ static int MenuSettingsMappingsController()
classicBtn.SetTrigger(trigA); classicBtn.SetTrigger(trigA);
classicBtn.SetTrigger(trig2); classicBtn.SetTrigger(trig2);
classicBtn.SetEffectGrow(); classicBtn.SetEffectGrow();
GuiText wiiuproBtnTxt("Wii U Pro Controller", 22, (GXColor){0, 0, 0, 255});
wiiuproBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-20);
GuiImage wiiuproBtnImg(&btnLargeOutline);
GuiImage wiiuproBtnImgOver(&btnLargeOutlineOver);
GuiImage wiiuproBtnIcon(&iconWiiupro);
GuiButton wiiuproBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
wiiuproBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
wiiuproBtn.SetPosition(0, 250);
wiiuproBtn.SetLabel(&wiiuproBtnTxt);
wiiuproBtn.SetImage(&wiiuproBtnImg);
wiiuproBtn.SetImageOver(&wiiuproBtnImgOver);
wiiuproBtn.SetIcon(&wiiuproBtnIcon);
wiiuproBtn.SetSoundOver(&btnSoundOver);
wiiuproBtn.SetSoundClick(&btnSoundClick);
wiiuproBtn.SetTrigger(trigA);
wiiuproBtn.SetTrigger(trig2);
wiiuproBtn.SetEffectGrow();
GuiText nunchukBtnTxt1("Wiimote", 22, (GXColor){0, 0, 0, 255}); GuiText nunchukBtnTxt1("Wiimote", 22, (GXColor){0, 0, 0, 255});
GuiText nunchukBtnTxt2("&", 18, (GXColor){0, 0, 0, 255}); GuiText nunchukBtnTxt2("&", 18, (GXColor){0, 0, 0, 255});
@ -2354,7 +2421,7 @@ static int MenuSettingsMappingsController()
GuiImage nunchukBtnIcon(&iconNunchuk); GuiImage nunchukBtnIcon(&iconNunchuk);
GuiButton nunchukBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight()); GuiButton nunchukBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
nunchukBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); nunchukBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
nunchukBtn.SetPosition(125, 250); nunchukBtn.SetPosition(200, 250);
nunchukBtn.SetLabel(&nunchukBtnTxt1, 0); nunchukBtn.SetLabel(&nunchukBtnTxt1, 0);
nunchukBtn.SetLabel(&nunchukBtnTxt2, 1); nunchukBtn.SetLabel(&nunchukBtnTxt2, 1);
nunchukBtn.SetLabel(&nunchukBtnTxt3, 2); nunchukBtn.SetLabel(&nunchukBtnTxt3, 2);
@ -2395,6 +2462,7 @@ static int MenuSettingsMappingsController()
{ {
w.Append(&nunchukBtn); w.Append(&nunchukBtn);
w.Append(&classicBtn); w.Append(&classicBtn);
w.Append(&wiiuproBtn);
} }
#endif #endif
w.Append(&backBtn); w.Append(&backBtn);
@ -2419,6 +2487,13 @@ static int MenuSettingsMappingsController()
} }
else if(classicBtn.GetState() == STATE_CLICKED) else if(classicBtn.GetState() == STATE_CLICKED)
{ {
wiiuproCtrl = 0;
menu = MENU_GAMESETTINGS_MAPPINGS_MAP;
mapMenuCtrl = CTRLR_CLASSIC;
}
else if(wiiuproBtn.GetState() == STATE_CLICKED)
{
wiiuproCtrl = 1;
menu = MENU_GAMESETTINGS_MAPPINGS_MAP; menu = MENU_GAMESETTINGS_MAPPINGS_MAP;
mapMenuCtrl = CTRLR_CLASSIC; mapMenuCtrl = CTRLR_CLASSIC;
} }
@ -2474,7 +2549,14 @@ ButtonMappingWindow()
sprintf(msg, "Press any button on the Wiimote now. Press Home to clear the existing mapping."); sprintf(msg, "Press any button on the Wiimote now. Press Home to clear the existing mapping.");
break; break;
case CTRLR_CLASSIC: case CTRLR_CLASSIC:
sprintf(msg, "Press any button on the Classic Controller now. Press Home to clear the existing mapping."); if(wiiuproCtrl == 1)
{
sprintf(msg, "Press any button on the Wii U Pro Controller now. Press Home to clear the existing mapping.");
}
else
{
sprintf(msg, "Press any button on the Classic Controller now. Press Home to clear the existing mapping.");
}
break; break;
case CTRLR_NUNCHUK: case CTRLR_NUNCHUK:
sprintf(msg, "Press any button on the Wiimote or Nunchuk now. Press Home to clear the existing mapping."); sprintf(msg, "Press any button on the Wiimote or Nunchuk now. Press Home to clear the existing mapping.");
@ -2506,11 +2588,10 @@ ButtonMappingWindow()
{ {
pressed = userInput[0].pad.btns_d; pressed = userInput[0].pad.btns_d;
if(userInput[0].pad.substickX < -70 || if(userInput[0].pad.substickX < -70 ||
userInput[0].pad.substickX > 70 || userInput[0].pad.substickX > 70 ||
userInput[0].pad.substickY < -70 || userInput[0].pad.substickY < -70 ||
userInput[0].pad.substickY > 70) userInput[0].pad.substickY > 70)
pressed = WPAD_BUTTON_HOME; pressed = WPAD_BUTTON_HOME;
if(userInput[0].wpad->btns_d == WPAD_BUTTON_HOME) if(userInput[0].wpad->btns_d == WPAD_BUTTON_HOME)
@ -2543,6 +2624,8 @@ ButtonMappingWindow()
break; break;
} }
} }
if(pressed == 0)
pressed = userInput[0].wupcdata.btns_d;
} }
} }
@ -2573,7 +2656,15 @@ static int MenuSettingsMappingsMap()
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
titleTxt.SetPosition(50,30); titleTxt.SetPosition(50,30);
sprintf(menuSubtitle, "%s - %s", gettext(ctrlName[mapMenuCtrlSNES]), gettext(ctrlrName[mapMenuCtrl])); if(wiiuproCtrl == 1)
{
sprintf(menuSubtitle, "%s - %s", gettext(ctrlName[mapMenuCtrlSNES]),"Wii U Pro Controller");
}
else
{
sprintf(menuSubtitle, "%s - %s", gettext(ctrlName[mapMenuCtrlSNES]), gettext(ctrlrName[mapMenuCtrl]));
}
GuiText subtitleTxt(menuSubtitle, 20, (GXColor){255, 255, 255, 255}); GuiText subtitleTxt(menuSubtitle, 20, (GXColor){255, 255, 255, 255});
subtitleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); subtitleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
subtitleTxt.SetPosition(50,60); subtitleTxt.SetPosition(50,60);
@ -2731,6 +2822,7 @@ static int MenuSettingsMappingsMap()
optionBrowser.TriggerUpdate(); optionBrowser.TriggerUpdate();
} }
} }
wiiuproCtrl = 0;
HaltGui(); HaltGui();
mainWindow->Remove(&optionBrowser); mainWindow->Remove(&optionBrowser);
mainWindow->Remove(&w); mainWindow->Remove(&w);
@ -3010,6 +3102,7 @@ static int MenuSettingsVideo()
int ret; int ret;
int i = 0; int i = 0;
bool firstRun = true; bool firstRun = true;
bool reset_sfx = false;
OptionList options; OptionList options;
sprintf(options.name[i++], "Rendering"); sprintf(options.name[i++], "Rendering");
@ -3019,6 +3112,8 @@ static int MenuSettingsVideo()
sprintf(options.name[i++], "Screen Position"); sprintf(options.name[i++], "Screen Position");
sprintf(options.name[i++], "Crosshair"); sprintf(options.name[i++], "Crosshair");
sprintf(options.name[i++], "Video Mode"); sprintf(options.name[i++], "Video Mode");
sprintf(options.name[i++], "Show Framerate");
sprintf(options.name[i++], "SuperFX Overclock");
options.length = i; options.length = i;
#ifdef HW_DOL #ifdef HW_DOL
@ -3106,6 +3201,22 @@ static int MenuSettingsVideo()
if(GCSettings.videomode > 4) if(GCSettings.videomode > 4)
GCSettings.videomode = 0; GCSettings.videomode = 0;
break; break;
case 7:
Settings.AutoDisplayMessages ^= 1;
Settings.DisplayFrameRate ^= 1;
break;
case 8:
GCSettings.sfxOverclock++;
if (GCSettings.sfxOverclock > 2)
GCSettings.sfxOverclock = 0;
switch(GCSettings.sfxOverclock)
{
case 0: Settings.SuperFXSpeedPerLine = 0.417 * 10.5e6; reset_sfx = true; break;
case 1: Settings.SuperFXSpeedPerLine = 0.417 * 40.5e6; reset_sfx = true; break;
case 2: Settings.SuperFXSpeedPerLine = 0.417 * 60.5e6; reset_sfx = true; break;
}
if (reset_sfx) S9xResetSuperFX(); S9xReset();
break;
} }
if(ret >= 0 || firstRun) if(ret >= 0 || firstRun)
@ -3147,6 +3258,16 @@ static int MenuSettingsVideo()
case 4: case 4:
sprintf (options.value[6], "PAL (60Hz)"); break; sprintf (options.value[6], "PAL (60Hz)"); break;
} }
sprintf (options.value[7], "%s", Settings.DisplayFrameRate ? "On" : "Off");
switch(GCSettings.sfxOverclock)
{
case 0:
sprintf (options.value[8], "Default"); break;
case 1:
sprintf (options.value[8], "40 Mhz"); break;
case 2:
sprintf (options.value[8], "60 Mhz"); break;
}
optionBrowser.TriggerUpdate(); optionBrowser.TriggerUpdate();
} }

View File

@ -28,7 +28,7 @@ char wiiIP[16] = { 0 };
#ifdef HW_RVL #ifdef HW_RVL
static int netHalt = 0; static int netHalt = 0;
static bool updateChecked = false; // true if checked for app update static bool updateChecked = true; // true if checked for app update
static char updateURL[128]; // URL of app update static char updateURL[128]; // URL of app update
bool updateFound = false; // true if an app update was found bool updateFound = false; // true if an app update was found
@ -90,7 +90,7 @@ void UpdateCheck()
if(tmp) if(tmp)
{ {
snprintf(updateURL, 128, "%s", tmp); snprintf(updateURL, 128, "%s", tmp);
updateFound = true; updateFound = false;
} }
} }
} }

View File

@ -146,6 +146,7 @@ preparePrefsData ()
createXMLSetting("FilterMethod", "Filter Method", toStr(GCSettings.FilterMethod)); createXMLSetting("FilterMethod", "Filter Method", toStr(GCSettings.FilterMethod));
createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift)); createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift));
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift)); createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
createXMLSetting("sfxOverclock", "SuperFX Overclock", toStr(GCSettings.sfxOverclock));
createXMLSection("Menu", "Menu Settings"); createXMLSection("Menu", "Menu Settings");
@ -323,6 +324,10 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.xshift, "xshift"); loadXMLSetting(&GCSettings.xshift, "xshift");
loadXMLSetting(&GCSettings.yshift, "yshift"); loadXMLSetting(&GCSettings.yshift, "yshift");
//Emulation Settings
loadXMLSetting(&GCSettings.sfxOverclock, "sfxOverclock");
// Menu Settings // Menu Settings
loadXMLSetting(&GCSettings.WiimoteOrientation, "WiimoteOrientation"); loadXMLSetting(&GCSettings.WiimoteOrientation, "WiimoteOrientation");
@ -346,6 +351,7 @@ decodePrefsData ()
loadXMLController(btnmap[CTRL_MOUSE][CTRLR_WIIMOTE], "btnmap_mouse_wiimote"); loadXMLController(btnmap[CTRL_MOUSE][CTRLR_WIIMOTE], "btnmap_mouse_wiimote");
loadXMLController(btnmap[CTRL_JUST][CTRLR_GCPAD], "btnmap_just_gcpad"); loadXMLController(btnmap[CTRL_JUST][CTRLR_GCPAD], "btnmap_just_gcpad");
loadXMLController(btnmap[CTRL_JUST][CTRLR_WIIMOTE], "btnmap_just_wiimote"); loadXMLController(btnmap[CTRL_JUST][CTRLR_WIIMOTE], "btnmap_just_wiimote");
} }
mxmlDelete(xml); mxmlDelete(xml);
} }
@ -474,6 +480,11 @@ DefaultSettings ()
// Frame timings in 50hz and 60hz cpu mode // Frame timings in 50hz and 60hz cpu mode
Settings.FrameTimePAL = 20000; Settings.FrameTimePAL = 20000;
Settings.FrameTimeNTSC = 16667; Settings.FrameTimeNTSC = 16667;
GCSettings.sfxOverclock = 0;
/* Initialize SuperFX CPU to normal speed by default */
Settings.SuperFXSpeedPerLine = 0.417 * 10.5e6;
} }
/**************************************************************************** /****************************************************************************

View File

@ -78,6 +78,7 @@ bool8 S9xOpenSoundDevice(void)
/* eke-eke */ /* eke-eke */
void S9xInitSync() void S9xInitSync()
{ {
FrameTimer = 0;
prev = gettime(); prev = gettime();
} }
@ -85,8 +86,6 @@ void S9xInitSync()
void S9xSyncSpeed () void S9xSyncSpeed ()
{ {
unsigned int timediffallowed = Settings.TurboMode ? 0 : Settings.FrameTime;
while (!S9xSyncSound()) while (!S9xSyncSound())
usleep(10); usleep(10);
@ -95,12 +94,17 @@ void S9xSyncSpeed ()
if (Settings.TurboMode) if (Settings.TurboMode)
skipFrms = Settings.TurboSkipFrames; skipFrms = Settings.TurboSkipFrames;
now = gettime(); if (timerstyle == 0) /* use Wii vertical sync (VSYNC) with NTSC roms */
if (diff_usec(prev, now) > timediffallowed)
{ {
/* Timer has already expired */ while (FrameTimer == 0)
if (IPPU.SkippedFrames < skipFrms) {
usleep(50);
}
if (FrameTimer > skipFrms)
FrameTimer = skipFrms;
if ((FrameTimer > 1) && (IPPU.SkippedFrames < skipFrms))
{ {
IPPU.SkippedFrames++; IPPU.SkippedFrames++;
IPPU.RenderThisFrame = FALSE; IPPU.RenderThisFrame = FALSE;
@ -111,20 +115,42 @@ void S9xSyncSpeed ()
IPPU.RenderThisFrame = TRUE; IPPU.RenderThisFrame = TRUE;
} }
} }
else else /* use internal timer for PAL roms */
{ {
/*** Ahead - so hold up ***/ unsigned int timediffallowed = Settings.TurboMode ? 0 : Settings.FrameTime;
while (diff_usec(prev, now) < timediffallowed) now = gettime();
if (diff_usec(prev, now) > timediffallowed)
{ {
now = gettime(); /* Timer has already expired */
usleep(50); if (IPPU.SkippedFrames < skipFrms)
{
IPPU.SkippedFrames++;
IPPU.RenderThisFrame = FALSE;
}
else
{
IPPU.SkippedFrames = 0;
IPPU.RenderThisFrame = TRUE;
}
} }
IPPU.RenderThisFrame = TRUE; else
IPPU.SkippedFrames = 0; {
/*** Ahead - so hold up ***/
while (diff_usec(prev, now) < timediffallowed)
{
now = gettime();
usleep(50);
}
IPPU.RenderThisFrame = TRUE;
IPPU.SkippedFrames = 0;
}
prev = now;
} }
prev = now; if (!Settings.TurboMode)
FrameTimer--;
return; return;
} }

View File

@ -199,7 +199,8 @@ void S9xInitSuperFX (void)
void S9xResetSuperFX (void) void S9xResetSuperFX (void)
{ {
// FIXME: Snes9x can't execute CPU and SuperFX at a time. Don't ask me what is 0.417 :P // FIXME: Snes9x can't execute CPU and SuperFX at a time. Don't ask me what is 0.417 :P
SuperFX.speedPerLine = (uint32) (0.417 * 10.5e6 * ((1.0 / (float) Memory.ROMFramesPerSecond) / ((float) (Timings.V_Max)))); //SuperFX.speedPerLine = (uint32) (0.417 * 10.5e6 * ((1.0 / (float) Memory.ROMFramesPerSecond) / ((float) (Timings.V_Max))));
SuperFX.speedPerLine = (uint32) (Settings.SuperFXSpeedPerLine * ((1.0f / Memory.ROMFramesPerSecond) / ((float) (Timings.V_Max))));
SuperFX.oneLineDone = FALSE; SuperFX.oneLineDone = FALSE;
SuperFX.vFlags = 0; SuperFX.vFlags = 0;
FxReset(&SuperFX); FxReset(&SuperFX);

View File

@ -446,6 +446,7 @@ struct SSettings
bool8 UpAndDown; bool8 UpAndDown;
bool8 OpenGLEnable; bool8 OpenGLEnable;
float SuperFXSpeedPerLine;
}; };
struct SSNESGameFixes struct SSNESGameFixes

View File

@ -15,10 +15,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <string>
#include <ogcsys.h> #include <ogcsys.h>
#include <unistd.h> #include <unistd.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <wupc/wupc.h>
#include <fat.h> #include <fat.h>
#include <debug.h> #include <debug.h>
#include <sys/iosupport.h> #include <sys/iosupport.h>
@ -43,6 +44,7 @@
#include "utils/FreeTypeGX.h" #include "utils/FreeTypeGX.h"
#include "snes9x/snes9x.h" #include "snes9x/snes9x.h"
#include "snes9x/fxemu.h"
#include "snes9x/memmap.h" #include "snes9x/memmap.h"
#include "snes9x/apu/apu.h" #include "snes9x/apu/apu.h"
#include "snes9x/controls.h" #include "snes9x/controls.h"
@ -85,6 +87,26 @@ void ExitCleanup()
void (*PSOReload) () = (void (*)()) 0x80001800; void (*PSOReload) () = (void (*)()) 0x80001800;
#endif #endif
void ExitToWiiflow()
{
ShutoffRumble();
SavePrefs(SILENT);
if (SNESROMSize > 0 && !ConfigRequested && GCSettings.AutoSave == 1)
SaveSRAMAuto(SILENT);
ExitCleanup();
if( !!*(u32*)0x80001800 )
{
// Were we launched via HBC? (or via wiiflows stub replacement? :P)
exit(1);
}
else
{
// Wii channel support
SYS_ResetSystem( SYS_RETURNTOMENU, 0, 0 );
}
}
void ExitApp() void ExitApp()
{ {
#ifdef HW_RVL #ifdef HW_RVL
@ -181,6 +203,31 @@ void ipl_set_config(unsigned char c)
} }
#endif #endif
/****************************************************************************
* setFrameTimerMethod()
* change frametimer method depending on whether ROM is NTSC or PAL
***************************************************************************/
void setFrameTimerMethod()
{
/*
Set frametimer method
(timerstyle: 0=NTSC vblank, 1=PAL int timer)
*/
if ( Settings.PAL ) {
if(vmode_60hz)
timerstyle = 1;
else
timerstyle = 0;
} else {
if(vmode_60hz)
timerstyle = 0;
else
timerstyle = 1;
}
return;
}
/**************************************************************************** /****************************************************************************
* IOS Check * IOS Check
***************************************************************************/ ***************************************************************************/
@ -346,6 +393,7 @@ int main(int argc, char *argv[])
SYS_SetPowerCallback(ShutdownCB); SYS_SetPowerCallback(ShutdownCB);
SYS_SetResetCallback(ResetCB); SYS_SetResetCallback(ResetCB);
WUPC_Init();
WPAD_Init(); WPAD_Init();
WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownCB); WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownCB);
DI_Init(); DI_Init();
@ -399,6 +447,72 @@ int main(int argc, char *argv[])
#endif #endif
InitGUIThreads(); InitGUIThreads();
bool autoboot = false;
if(argc > 3 && argv[1] != NULL && argv[2] != NULL && argv[3] != NULL)
{
autoboot = true;
ResetBrowser();
LoadPrefs();
if(strcasestr(argv[1], "sd:/") != NULL)
{
GCSettings.SaveMethod = DEVICE_SD;
GCSettings.LoadMethod = DEVICE_SD;
}
else
{
GCSettings.SaveMethod = DEVICE_USB;
GCSettings.LoadMethod = DEVICE_USB;
}
SavePrefs(SILENT);
selectLoadedFile = 1;
std::string dir(argv[1]);
dir.assign(&dir[dir.find_last_of(":") + 2]);
char arg_filename[1024];
strncpy(arg_filename, argv[2], sizeof(arg_filename));
strncpy(GCSettings.LoadFolder, dir.c_str(), sizeof(GCSettings.LoadFolder));
OpenGameList();
strncpy(GCSettings.Exit_Dol_File, argv[3], sizeof(GCSettings.Exit_Dol_File));
if(argc > 5 && argv[4] != NULL && argv[5] != NULL)
{
sscanf(argv[4], "%08x", &GCSettings.Exit_Channel[0]);
sscanf(argv[5], "%08x", &GCSettings.Exit_Channel[1]);
}
else
{
GCSettings.Exit_Channel[0] = 0x00010008;
GCSettings.Exit_Channel[1] = 0x57494948;
}
if(argc > 6 && argv[6] != NULL)
strncpy(GCSettings.LoaderName, argv[6], sizeof(GCSettings.LoaderName));
else
snprintf(GCSettings.LoaderName, sizeof(GCSettings.LoaderName), "WiiFlow");
for(int i = 0; i < browser.numEntries; i++)
{
// Skip it
if (strcmp(browserList[i].filename, ".") == 0 || strcmp(browserList[i].filename, "..") == 0)
continue;
if(strcasestr(browserList[i].filename, arg_filename) != NULL)
{
browser.selIndex = i;
if(IsSz())
{
BrowserLoadSz();
browser.selIndex = 1;
}
break;
}
}
BrowserLoadFile();
}
switch (GCSettings.sfxOverclock)
{
case 0: Settings.SuperFXSpeedPerLine = 0.417 * 10.5e6; break;
case 1: Settings.SuperFXSpeedPerLine = 0.417 * 40.5e6; break;
case 2: Settings.SuperFXSpeedPerLine = 0.417 * 60.5e6; break;
S9xResetSuperFX();
}
while (1) // main loop while (1) // main loop
{ {
// go back to checking if devices were inserted/removed // go back to checking if devices were inserted/removed
@ -407,10 +521,21 @@ int main(int argc, char *argv[])
SwitchAudioMode(1); SwitchAudioMode(1);
if(SNESROMSize == 0) if(!autoboot)
MainMenu(MENU_GAMESELECTION); {
if(SNESROMSize == 0)
MainMenu(MENU_GAMESELECTION);
else
MainMenu(MENU_GAME);
ConfigRequested = 0;
ScreenshotRequested = 0;
}
else if(SNESROMSize != 0 && autoboot)
autoboot = false;
else else
MainMenu(MENU_GAME); ExitApp();
#ifdef HW_RVL #ifdef HW_RVL
SelectFilterMethod(); SelectFilterMethod();
#endif #endif
@ -430,7 +555,10 @@ int main(int argc, char *argv[])
AudioStart (); AudioStart ();
CheckVideo = 2; // force video update FrameTimer = 0;
setFrameTimerMethod (); // set frametimer method every time a ROM is loaded
CheckVideo = 2; // force video update
prevRenderedFrameCount = IPPU.RenderedFramesCount; prevRenderedFrameCount = IPPU.RenderedFramesCount;
currentMode = GCSettings.render; currentMode = GCSettings.render;

View File

@ -19,9 +19,9 @@
#include "filter.h" #include "filter.h"
#include "filelist.h" #include "filelist.h"
#define APPNAME "Snes9x GX" #define APPNAME "Snes9x GX"
#define APPVERSION "4.3.2" #define APPVERSION "4.3.6"
#define APPFOLDER "snes9xgx" #define APPFOLDER "snes9xgx"
#define PREF_FILE_NAME "settings.xml" #define PREF_FILE_NAME "settings.xml"
#define NOTSILENT 0 #define NOTSILENT 0
@ -80,16 +80,20 @@ enum {
}; };
struct SGCSettings{ struct SGCSettings{
int AutoLoad; int AutoLoad;
int AutoSave; int AutoSave;
int LoadMethod; // For ROMS: Auto, SD, DVD, USB, Network (SMB) int LoadMethod; // For ROMS: Auto, SD, DVD, USB, Network (SMB)
int SaveMethod; // For SRAM, Freeze, Prefs: Auto, SD, USB, SMB int SaveMethod; // For SRAM, Freeze, Prefs: Auto, SD, USB, SMB
char LoadFolder[MAXPATHLEN]; // Path to game files char LoadFolder[MAXPATHLEN]; // Path to game files
char LastFileLoaded[MAXPATHLEN]; //Last file loaded filename char LastFileLoaded[MAXPATHLEN]; //Last file loaded filename
char SaveFolder[MAXPATHLEN]; // Path to save files char SaveFolder[MAXPATHLEN]; // Path to save files
char CheatFolder[MAXPATHLEN]; // Path to cheat files char CheatFolder[MAXPATHLEN]; // Path to cheat files
char ScreenshotsFolder[MAXPATHLEN]; //Path to screenshots files char ScreenshotsFolder[MAXPATHLEN]; //Path to screenshots files
char Exit_Dol_File[MAXPATHLEN]; // Exit Path
char LoaderName[20]; // Menu Loader Name
u32 Exit_Channel[2]; // Exit Channel
char smbip[80]; char smbip[80];
char smbuser[20]; char smbuser[20];
char smbpwd[20]; char smbpwd[20];
@ -110,7 +114,9 @@ struct SGCSettings{
int MusicVolume; int MusicVolume;
int SFXVolume; int SFXVolume;
int Rumble; int Rumble;
int language; int language;
int sfxOverclock;
}; };
void ExitApp(); void ExitApp();

View File

@ -67,7 +67,8 @@ int gameScreenPngSize = 0;
u32 FrameTimer = 0; u32 FrameTimer = 0;
static bool vmode_60hz = true; bool vmode_60hz = true;
int timerstyle = 0;
bool progressive = 0; bool progressive = 0;
#define HASPECT 320 #define HASPECT 320

View File

@ -36,6 +36,8 @@ extern bool progressive;
extern u8 * gameScreenPng; extern u8 * gameScreenPng;
extern int gameScreenPngSize; extern int gameScreenPngSize;
extern u32 FrameTimer; extern u32 FrameTimer;
extern bool vmode_60hz;
extern int timerstyle;
extern int CheckVideo; extern int CheckVideo;
#endif #endif

View File

@ -18,7 +18,7 @@
#include <ppc/timebase.h> #include <ppc/timebase.h>
#include <xenon_sound/sound.h> #include <xenon_sound/sound.h>
int FrameTimer = 0; int FrameTimer, timerstyle = 1;
unsigned long long prev, now; unsigned long long prev, now;
unsigned long long gettime(void) unsigned long long gettime(void)
@ -128,6 +128,7 @@ void S9xGenerateSound()
/* eke-eke */ /* eke-eke */
void S9xInitSync() void S9xInitSync()
{ {
FrameTimer = 0;
prev = gettime(); prev = gettime();
} }
@ -139,15 +140,18 @@ void S9xSyncSpeed ()
if (Settings.TurboMode) if (Settings.TurboMode)
skipFrms = Settings.TurboSkipFrames; skipFrms = Settings.TurboSkipFrames;
unsigned int timediffallowed = Settings.TurboMode ? 0 : Settings.FrameTime; if (timerstyle == 0) /* use NGC vertical sync (VSYNC) with NTSC roms */
now = gettime();
if (diff_usec(prev, now) > timediffallowed)
{ {
printf("L\n"); while (FrameTimer == 0)
/* Timer has already expired */ {
if (IPPU.SkippedFrames < skipFrms) udelay(50);
}
if (FrameTimer > skipFrms)
FrameTimer = skipFrms;
if ((FrameTimer > 1) && (IPPU.SkippedFrames < skipFrms))
{ {
IPPU.SkippedFrames++; IPPU.SkippedFrames++;
IPPU.RenderThisFrame = FALSE; IPPU.RenderThisFrame = FALSE;
@ -158,20 +162,43 @@ void S9xSyncSpeed ()
IPPU.RenderThisFrame = TRUE; IPPU.RenderThisFrame = TRUE;
} }
} }
else else /* use internal timer for PAL roms */
{ {
/*** Ahead - so hold up ***/ unsigned int timediffallowed = Settings.TurboMode ? 0 : Settings.FrameTime;
while (diff_usec(prev, now) < timediffallowed) now = gettime();
if (diff_usec(prev, now) > timediffallowed)
{ {
now = gettime(); printf("L\n");
udelay(50); /* Timer has already expired */
if (IPPU.SkippedFrames < skipFrms)
{
IPPU.SkippedFrames++;
IPPU.RenderThisFrame = FALSE;
}
else
{
IPPU.SkippedFrames = 0;
IPPU.RenderThisFrame = TRUE;
}
} }
IPPU.RenderThisFrame = TRUE; else
IPPU.SkippedFrames = 0; {
/*** Ahead - so hold up ***/
while (diff_usec(prev, now) < timediffallowed)
{
now = gettime();
udelay(50);
}
IPPU.RenderThisFrame = TRUE;
IPPU.SkippedFrames = 0;
}
prev = now;
} }
prev = now; if (!Settings.TurboMode)
FrameTimer--;
return; return;
} }

4
update.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="4.3.4">
<file url="http://snes9x-gx.googlecode.com/files/Snes9x%20GX%204.3.2.zip"></file>
</app>