Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b1495d48b | |||
| c0e0b5580c | |||
| d2dc097eff | |||
| 4fad1f3005 | |||
| b10c052626 | |||
| 652dd3ec0a | |||
| f31480c0be | |||
| 61284bed2b | |||
| 869c2f6680 | |||
| 7b86e8c494 | |||
| 1f4dce126a | |||
| 47c6fddd11 | |||
| 1b71833d93 | |||
| 288a3d2ef0 | |||
| ecb8e35a77 | |||
| 519b96caad | |||
| be5906a418 | |||
| 1eb8e8c7a8 | |||
| 91b2448cfd | |||
| 114d6b3042 | |||
| 972d9bb82e | |||
| 3a94a008cd | |||
| 40d98e8557 | |||
| 856676e678 | |||
| d4e8ac4cdd | |||
| d8f0847701 | |||
| d525833e8e | |||
| f40b2b2fb4 | |||
| 7ee66cd593 | |||
| 42f261257d | |||
| 1e98d61c51 | |||
| 65a8802fa2 | |||
| a5f58c9773 | |||
| 572b94f236 | |||
| d4430c88de | |||
| a32fdf6ab8 | |||
| 0fc446067f | |||
| 989a6f10e3 | |||
| 1ebead5fac | |||
| 0e73ce2ce1 | |||
| 7bac5bfc6a | |||
| 09ba1ef010 | |||
| 76d99aff35 | |||
| 08eb335139 | |||
| af4aabf476 | |||
| c6c5306cbd | |||
| 2a1d9e7a65 | |||
| 43c8a0bbc0 | |||
| 89e372b89c | |||
| 19a5fee322 | |||
| 854a260a36 | |||
| 5e236bbcb9 | |||
| e66a1a4d11 | |||
| 0b88296299 | |||
| 1950f2d519 | |||
| 759f0ce164 |
Binary file not shown.
+33
-4
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.53.4</string>
|
||||
<string>1.62.3</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OEGameCoreController</string>
|
||||
<key>OEGameCoreClass</key>
|
||||
@@ -28,20 +28,49 @@
|
||||
<dict>
|
||||
<key>openemu.system.snes</key>
|
||||
<dict>
|
||||
<key>OEGameCoreRequiresFiles</key>
|
||||
<true/>
|
||||
<key>OEGameCoreRewindBufferSeconds</key>
|
||||
<integer>1200</integer>
|
||||
<integer>60</integer>
|
||||
<key>OEGameCoreRewindInterval</key>
|
||||
<integer>0</integer>
|
||||
<key>OEGameCoreSupportsCheatCode</key>
|
||||
<true/>
|
||||
<key>OEGameCoreSupportsRewinding</key>
|
||||
<true/>
|
||||
<key>OERequiredFiles</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Satellaview BS-X BIOS</string>
|
||||
<key>MD5</key>
|
||||
<string>FED4D8242CFBED61343D53D48432ACED</string>
|
||||
<key>Name</key>
|
||||
<string>BS-X.bin</string>
|
||||
<key>Optional</key>
|
||||
<true/>
|
||||
<key>Size</key>
|
||||
<integer>1048576</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>BS-X BIOS (English) [No DRM] [2016 v1.3]</string>
|
||||
<key>MD5</key>
|
||||
<string>96CF17BF589FCBFA6F8DE2DC84F19FA2</string>
|
||||
<key>Name</key>
|
||||
<string>BS-X BIOS (English) [No DRM] [2016 v1.3].sfc</string>
|
||||
<key>Optional</key>
|
||||
<true/>
|
||||
<key>Size</key>
|
||||
<integer>1048576</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>OEGameCorePlayerCount</key>
|
||||
<string>8</string>
|
||||
<key>OEProjectURL</key>
|
||||
<string>http://www.snes9x.com/</string>
|
||||
<string>https://github.com/snes9xgit/snes9x</string>
|
||||
<key>OESystemIdentifiers</key>
|
||||
<array>
|
||||
<string>openemu.system.snes</string>
|
||||
|
||||
+270
-257
@@ -19,35 +19,26 @@
|
||||
name = "Build & Install SNES9x";
|
||||
productName = "Build & Install";
|
||||
};
|
||||
82CAFD4C0FEDD6A200CCDC7E /* Distribution */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = 82CAFD630FEDD6D100CCDC7E /* Build configuration list for PBXAggregateTarget "Distribution" */;
|
||||
buildPhases = (
|
||||
82CAFD620FEDD6D100CCDC7E /* CopyFiles */,
|
||||
82CAFD4B0FEDD6A200CCDC7E /* ShellScript */,
|
||||
);
|
||||
dependencies = (
|
||||
82CAFD500FEDD6A600CCDC7E /* PBXTargetDependency */,
|
||||
);
|
||||
name = Distribution;
|
||||
productName = Distribution;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3DA5C31814DCF0180029660B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5C31714DCF0180029660B /* libz.dylib */; };
|
||||
826C1B1F0F420C2200FB9014 /* SNESGameCore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 826C1B1E0F420C2200FB9014 /* SNESGameCore.mm */; };
|
||||
828F16CB0F43A10000FD7321 /* APPL.icns in Resources */ = {isa = PBXBuildFile; fileRef = 828F16CA0F43A10000FD7321 /* APPL.icns */; };
|
||||
8725B0B91E933E1B00F68CA5 /* sdsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8725B08F1E931ED600F68CA5 /* sdsp.cpp */; };
|
||||
8725B0BB1E933E2B00F68CA5 /* smp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8725B0B31E931ED600F68CA5 /* smp.cpp */; };
|
||||
8725B0BC1E933E2D00F68CA5 /* smp_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8725B0B51E931ED600F68CA5 /* smp_state.cpp */; };
|
||||
8741B3AC1FC9361100A95A00 /* msu1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8741B3AA1FC9361000A95A00 /* msu1.cpp */; };
|
||||
87431C061B02F20700F82158 /* stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 87431C041B02F20700F82158 /* stream.cpp */; };
|
||||
8769DC9D20D19CDC005ABC18 /* bml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8769DC9C20D19CDB005ABC18 /* bml.cpp */; };
|
||||
8769DCA020D19D1C005ABC18 /* sha256.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8769DC9E20D19D1C005ABC18 /* sha256.cpp */; };
|
||||
87709EEC294EDD590084AEE0 /* tileimpl-n1x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 87709EE9294EDD580084AEE0 /* tileimpl-n1x1.cpp */; };
|
||||
87709EED294EDD590084AEE0 /* tileimpl-h2x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 87709EEA294EDD580084AEE0 /* tileimpl-h2x1.cpp */; };
|
||||
87709EEE294EDD590084AEE0 /* tileimpl-n2x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 87709EEB294EDD580084AEE0 /* tileimpl-n2x1.cpp */; };
|
||||
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
|
||||
8F6CC7A029FD51E2006C7D59 /* fscompat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F6CC79E29FD51E2006C7D59 /* fscompat.cpp */; };
|
||||
94790D7A14C0C46900B30798 /* apu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CDC14C0C46900B30798 /* apu.cpp */; };
|
||||
94790D7B14C0C46900B30798 /* license.txt in Resources */ = {isa = PBXBuildFile; fileRef = 94790CE314C0C46900B30798 /* license.txt */; };
|
||||
94790D7C14C0C46900B30798 /* SNES_SPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CE714C0C46900B30798 /* SNES_SPC.cpp */; };
|
||||
94790D7D14C0C46900B30798 /* SNES_SPC_misc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CE914C0C46900B30798 /* SNES_SPC_misc.cpp */; };
|
||||
94790D7E14C0C46900B30798 /* SNES_SPC_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CEA14C0C46900B30798 /* SNES_SPC_state.cpp */; };
|
||||
94790D7F14C0C46900B30798 /* SPC_DSP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CEC14C0C46900B30798 /* SPC_DSP.cpp */; };
|
||||
94790D8014C0C46900B30798 /* SPC_Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CEE14C0C46900B30798 /* SPC_Filter.cpp */; };
|
||||
94790D8114C0C46900B30798 /* bsx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CF014C0C46900B30798 /* bsx.cpp */; };
|
||||
94790D8214C0C46900B30798 /* c4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CF214C0C46900B30798 /* c4.cpp */; };
|
||||
94790D8314C0C46900B30798 /* c4emu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790CF414C0C46900B30798 /* c4emu.cpp */; };
|
||||
@@ -92,7 +83,6 @@
|
||||
94790DB714C0C46900B30798 /* spc7110.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790D6014C0C46900B30798 /* spc7110.cpp */; };
|
||||
94790DBA14C0C46900B30798 /* srtc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790D6614C0C46900B30798 /* srtc.cpp */; };
|
||||
94790DBC14C0C46900B30798 /* tile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94790D6A14C0C46900B30798 /* tile.cpp */; };
|
||||
C67F02030FC200A6009C6CD6 /* SNESOESupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 82AD85B50F41646E00DF0AE1 /* SNESOESupport.mm */; };
|
||||
C6D120FB1711314D00E868A8 /* OpenEmuBase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6D120FA1711314D00E868A8 /* OpenEmuBase.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -104,13 +94,6 @@
|
||||
remoteGlobalIDString = 8D5B49AC048680CD000E48DA;
|
||||
remoteInfo = SNES9x;
|
||||
};
|
||||
82CAFD4F0FEDD6A600CCDC7E /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8D5B49AC048680CD000E48DA;
|
||||
remoteInfo = SNES9x;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -123,151 +106,160 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
82CAFD620FEDD6D100CCDC7E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
089C167EFE841241C02AAC07 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
3DA5C31714DCF0180029660B /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||
8233FF2814C1E1B100FC4547 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||
8233FF2A14C1E1C100FC4547 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
826C1B1D0F420C2200FB9014 /* SNESGameCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNESGameCore.h; sourceTree = "<group>"; };
|
||||
826C1B1E0F420C2200FB9014 /* SNESGameCore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SNESGameCore.mm; sourceTree = "<group>"; };
|
||||
828F16CA0F43A10000FD7321 /* APPL.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = APPL.icns; sourceTree = "<group>"; };
|
||||
82AD85B50F41646E00DF0AE1 /* SNESOESupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SNESOESupport.mm; sourceTree = "<group>"; };
|
||||
87431C041B02F20700F82158 /* stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = stream.cpp; path = "snes9x-1.53-src/stream.cpp"; sourceTree = "<group>"; };
|
||||
87431C051B02F20700F82158 /* stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stream.h; path = "snes9x-1.53-src/stream.h"; sourceTree = "<group>"; };
|
||||
87431C071B0309F700F82158 /* loadzip.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = loadzip.cpp; path = "snes9x-1.53-src/loadzip.cpp"; sourceTree = "<group>"; };
|
||||
8725B08B1E931ED600F68CA5 /* blargg_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = blargg_common.h; sourceTree = "<group>"; };
|
||||
8725B08C1E931ED600F68CA5 /* blargg_config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = blargg_config.h; sourceTree = "<group>"; };
|
||||
8725B08D1E931ED600F68CA5 /* blargg_endian.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = blargg_endian.h; sourceTree = "<group>"; };
|
||||
8725B08E1E931ED600F68CA5 /* blargg_source.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = blargg_source.h; sourceTree = "<group>"; };
|
||||
8725B08F1E931ED600F68CA5 /* sdsp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = sdsp.cpp; sourceTree = "<group>"; };
|
||||
8725B0901E931ED600F68CA5 /* sdsp.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = sdsp.hpp; sourceTree = "<group>"; };
|
||||
8725B0911E931ED600F68CA5 /* SPC_DSP.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SPC_DSP.cpp; sourceTree = "<group>"; };
|
||||
8725B0921E931ED600F68CA5 /* SPC_DSP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPC_DSP.h; sourceTree = "<group>"; };
|
||||
8725B0941E931ED600F68CA5 /* algorithms.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = algorithms.cpp; sourceTree = "<group>"; };
|
||||
8725B0A71E931ED600F68CA5 /* oppseudo_misc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = oppseudo_misc.cpp; sourceTree = "<group>"; };
|
||||
8725B0A81E931ED600F68CA5 /* oppseudo_mov.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = oppseudo_mov.cpp; sourceTree = "<group>"; };
|
||||
8725B0A91E931ED600F68CA5 /* oppseudo_pc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = oppseudo_pc.cpp; sourceTree = "<group>"; };
|
||||
8725B0AA1E931ED600F68CA5 /* oppseudo_read.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = oppseudo_read.cpp; sourceTree = "<group>"; };
|
||||
8725B0AB1E931ED600F68CA5 /* oppseudo_rmw.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = oppseudo_rmw.cpp; sourceTree = "<group>"; };
|
||||
8725B0AC1E931ED600F68CA5 /* core.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = core.cpp; sourceTree = "<group>"; };
|
||||
8725B0AE1E931ED600F68CA5 /* debugger.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = debugger.cpp; sourceTree = "<group>"; };
|
||||
8725B0AF1E931ED600F68CA5 /* debugger.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = debugger.hpp; sourceTree = "<group>"; };
|
||||
8725B0B01E931ED600F68CA5 /* disassembler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = disassembler.cpp; sourceTree = "<group>"; };
|
||||
8725B0B11E931ED600F68CA5 /* iplrom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = iplrom.cpp; sourceTree = "<group>"; };
|
||||
8725B0B21E931ED600F68CA5 /* memory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = memory.cpp; sourceTree = "<group>"; };
|
||||
8725B0B31E931ED600F68CA5 /* smp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = smp.cpp; sourceTree = "<group>"; };
|
||||
8725B0B41E931ED600F68CA5 /* smp.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = smp.hpp; sourceTree = "<group>"; };
|
||||
8725B0B51E931ED600F68CA5 /* smp_state.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = smp_state.cpp; sourceTree = "<group>"; };
|
||||
8725B0B61E931ED600F68CA5 /* timing.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = timing.cpp; sourceTree = "<group>"; };
|
||||
8725B0B81E931ED600F68CA5 /* snes.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = snes.hpp; sourceTree = "<group>"; };
|
||||
8741B3AA1FC9361000A95A00 /* msu1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = msu1.cpp; path = src/msu1.cpp; sourceTree = "<group>"; };
|
||||
8741B3AB1FC9361000A95A00 /* msu1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = msu1.h; path = src/msu1.h; sourceTree = "<group>"; };
|
||||
87431C041B02F20700F82158 /* stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = stream.cpp; path = src/stream.cpp; sourceTree = "<group>"; };
|
||||
87431C051B02F20700F82158 /* stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stream.h; path = src/stream.h; sourceTree = "<group>"; };
|
||||
87431C071B0309F700F82158 /* loadzip.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = loadzip.cpp; path = src/loadzip.cpp; sourceTree = "<group>"; };
|
||||
8769DC9B20D19CDB005ABC18 /* bml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bml.h; path = src/bml.h; sourceTree = "<group>"; };
|
||||
8769DC9C20D19CDB005ABC18 /* bml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bml.cpp; path = src/bml.cpp; sourceTree = "<group>"; };
|
||||
8769DC9E20D19D1C005ABC18 /* sha256.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sha256.cpp; path = src/sha256.cpp; sourceTree = "<group>"; };
|
||||
8769DC9F20D19D1C005ABC18 /* sha256.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sha256.h; path = src/sha256.h; sourceTree = "<group>"; };
|
||||
87709EE8294EDD580084AEE0 /* tileimpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tileimpl.h; path = src/tileimpl.h; sourceTree = "<group>"; };
|
||||
87709EE9294EDD580084AEE0 /* tileimpl-n1x1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "tileimpl-n1x1.cpp"; path = "src/tileimpl-n1x1.cpp"; sourceTree = "<group>"; };
|
||||
87709EEA294EDD580084AEE0 /* tileimpl-h2x1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "tileimpl-h2x1.cpp"; path = "src/tileimpl-h2x1.cpp"; sourceTree = "<group>"; };
|
||||
87709EEB294EDD580084AEE0 /* tileimpl-n2x1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "tileimpl-n2x1.cpp"; path = "src/tileimpl-n2x1.cpp"; sourceTree = "<group>"; };
|
||||
8D5B49B6048680CD000E48DA /* SNES9x.oecoreplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SNES9x.oecoreplugin; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
942597D5151470C00074E3A3 /* OpenEmuBase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenEmuBase.framework; path = ../OpenEmu/build/Release/OpenEmuBase.framework; sourceTree = "<group>"; };
|
||||
94790CDA14C0C46900B30798 /* 65c816.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 65c816.h; path = "snes9x-1.53-src/65c816.h"; sourceTree = "<group>"; };
|
||||
8F6CC79E29FD51E2006C7D59 /* fscompat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fscompat.cpp; path = src/fscompat.cpp; sourceTree = "<group>"; };
|
||||
8F6CC79F29FD51E2006C7D59 /* fscompat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fscompat.h; path = src/fscompat.h; sourceTree = "<group>"; };
|
||||
94790CDA14C0C46900B30798 /* 65c816.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 65c816.h; path = src/65c816.h; sourceTree = "<group>"; };
|
||||
94790CDC14C0C46900B30798 /* apu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = apu.cpp; sourceTree = "<group>"; };
|
||||
94790CDD14C0C46900B30798 /* apu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = apu.h; sourceTree = "<group>"; };
|
||||
94790CDE14C0C46900B30798 /* blargg_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blargg_common.h; sourceTree = "<group>"; };
|
||||
94790CDF14C0C46900B30798 /* blargg_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blargg_config.h; sourceTree = "<group>"; };
|
||||
94790CE014C0C46900B30798 /* blargg_endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blargg_endian.h; sourceTree = "<group>"; };
|
||||
94790CE114C0C46900B30798 /* blargg_source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blargg_source.h; sourceTree = "<group>"; };
|
||||
94790CE214C0C46900B30798 /* hermite_resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hermite_resampler.h; sourceTree = "<group>"; };
|
||||
94790CE314C0C46900B30798 /* license.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = license.txt; sourceTree = "<group>"; };
|
||||
94790CE414C0C46900B30798 /* linear_resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linear_resampler.h; sourceTree = "<group>"; };
|
||||
94790CE514C0C46900B30798 /* resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resampler.h; sourceTree = "<group>"; };
|
||||
94790CE614C0C46900B30798 /* ring_buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ring_buffer.h; sourceTree = "<group>"; };
|
||||
94790CE714C0C46900B30798 /* SNES_SPC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SNES_SPC.cpp; sourceTree = "<group>"; };
|
||||
94790CE814C0C46900B30798 /* SNES_SPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNES_SPC.h; sourceTree = "<group>"; };
|
||||
94790CE914C0C46900B30798 /* SNES_SPC_misc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SNES_SPC_misc.cpp; sourceTree = "<group>"; };
|
||||
94790CEA14C0C46900B30798 /* SNES_SPC_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SNES_SPC_state.cpp; sourceTree = "<group>"; };
|
||||
94790CEB14C0C46900B30798 /* SPC_CPU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPC_CPU.h; sourceTree = "<group>"; };
|
||||
94790CEC14C0C46900B30798 /* SPC_DSP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SPC_DSP.cpp; sourceTree = "<group>"; };
|
||||
94790CED14C0C46900B30798 /* SPC_DSP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPC_DSP.h; sourceTree = "<group>"; };
|
||||
94790CEE14C0C46900B30798 /* SPC_Filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SPC_Filter.cpp; sourceTree = "<group>"; };
|
||||
94790CEF14C0C46900B30798 /* SPC_Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPC_Filter.h; sourceTree = "<group>"; };
|
||||
94790CF014C0C46900B30798 /* bsx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bsx.cpp; path = "snes9x-1.53-src/bsx.cpp"; sourceTree = "<group>"; };
|
||||
94790CF114C0C46900B30798 /* bsx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bsx.h; path = "snes9x-1.53-src/bsx.h"; sourceTree = "<group>"; };
|
||||
94790CF214C0C46900B30798 /* c4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = c4.cpp; path = "snes9x-1.53-src/c4.cpp"; sourceTree = "<group>"; };
|
||||
94790CF314C0C46900B30798 /* c4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = c4.h; path = "snes9x-1.53-src/c4.h"; sourceTree = "<group>"; };
|
||||
94790CF414C0C46900B30798 /* c4emu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = c4emu.cpp; path = "snes9x-1.53-src/c4emu.cpp"; sourceTree = "<group>"; };
|
||||
94790CF514C0C46900B30798 /* cheats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cheats.cpp; path = "snes9x-1.53-src/cheats.cpp"; sourceTree = "<group>"; };
|
||||
94790CF614C0C46900B30798 /* cheats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cheats.h; path = "snes9x-1.53-src/cheats.h"; sourceTree = "<group>"; };
|
||||
94790CF714C0C46900B30798 /* cheats2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cheats2.cpp; path = "snes9x-1.53-src/cheats2.cpp"; sourceTree = "<group>"; };
|
||||
94790CF814C0C46900B30798 /* clip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = clip.cpp; path = "snes9x-1.53-src/clip.cpp"; sourceTree = "<group>"; };
|
||||
94790CF914C0C46900B30798 /* conffile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = conffile.cpp; path = "snes9x-1.53-src/conffile.cpp"; sourceTree = "<group>"; };
|
||||
94790CFA14C0C46900B30798 /* conffile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conffile.h; path = "snes9x-1.53-src/conffile.h"; sourceTree = "<group>"; };
|
||||
94790CFB14C0C46900B30798 /* controls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = controls.cpp; path = "snes9x-1.53-src/controls.cpp"; sourceTree = "<group>"; };
|
||||
94790CFC14C0C46900B30798 /* controls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = controls.h; path = "snes9x-1.53-src/controls.h"; sourceTree = "<group>"; };
|
||||
94790CFD14C0C46900B30798 /* cpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpu.cpp; path = "snes9x-1.53-src/cpu.cpp"; sourceTree = "<group>"; };
|
||||
94790CFE14C0C46900B30798 /* cpuaddr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpuaddr.h; path = "snes9x-1.53-src/cpuaddr.h"; sourceTree = "<group>"; };
|
||||
94790CFF14C0C46900B30798 /* cpuexec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpuexec.cpp; path = "snes9x-1.53-src/cpuexec.cpp"; sourceTree = "<group>"; };
|
||||
94790D0014C0C46900B30798 /* cpuexec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpuexec.h; path = "snes9x-1.53-src/cpuexec.h"; sourceTree = "<group>"; };
|
||||
94790D0114C0C46900B30798 /* cpumacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpumacro.h; path = "snes9x-1.53-src/cpumacro.h"; sourceTree = "<group>"; };
|
||||
94790D0214C0C46900B30798 /* cpuops.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpuops.cpp; path = "snes9x-1.53-src/cpuops.cpp"; sourceTree = "<group>"; };
|
||||
94790D0314C0C46900B30798 /* cpuops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpuops.h; path = "snes9x-1.53-src/cpuops.h"; sourceTree = "<group>"; };
|
||||
94790D0414C0C46900B30798 /* crosshairs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = crosshairs.cpp; path = "snes9x-1.53-src/crosshairs.cpp"; sourceTree = "<group>"; };
|
||||
94790D0514C0C46900B30798 /* crosshairs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crosshairs.h; path = "snes9x-1.53-src/crosshairs.h"; sourceTree = "<group>"; };
|
||||
94790D0614C0C46900B30798 /* debug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = debug.cpp; path = "snes9x-1.53-src/debug.cpp"; sourceTree = "<group>"; };
|
||||
94790D0714C0C46900B30798 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = debug.h; path = "snes9x-1.53-src/debug.h"; sourceTree = "<group>"; };
|
||||
94790D0814C0C46900B30798 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = display.h; path = "snes9x-1.53-src/display.h"; sourceTree = "<group>"; };
|
||||
94790D0914C0C46900B30798 /* dma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dma.cpp; path = "snes9x-1.53-src/dma.cpp"; sourceTree = "<group>"; };
|
||||
94790D0A14C0C46900B30798 /* dma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dma.h; path = "snes9x-1.53-src/dma.h"; sourceTree = "<group>"; };
|
||||
94790D0B14C0C46900B30798 /* dsp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp.cpp; path = "snes9x-1.53-src/dsp.cpp"; sourceTree = "<group>"; };
|
||||
94790D0C14C0C46900B30798 /* dsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dsp.h; path = "snes9x-1.53-src/dsp.h"; sourceTree = "<group>"; };
|
||||
94790D0D14C0C46900B30798 /* dsp1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp1.cpp; path = "snes9x-1.53-src/dsp1.cpp"; sourceTree = "<group>"; };
|
||||
94790D0E14C0C46900B30798 /* dsp2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp2.cpp; path = "snes9x-1.53-src/dsp2.cpp"; sourceTree = "<group>"; };
|
||||
94790D0F14C0C46900B30798 /* dsp3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp3.cpp; path = "snes9x-1.53-src/dsp3.cpp"; sourceTree = "<group>"; };
|
||||
94790D1014C0C46900B30798 /* dsp4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp4.cpp; path = "snes9x-1.53-src/dsp4.cpp"; sourceTree = "<group>"; };
|
||||
94790D1114C0C46900B30798 /* font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = font.h; path = "snes9x-1.53-src/font.h"; sourceTree = "<group>"; };
|
||||
94790D1214C0C46900B30798 /* fxdbg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fxdbg.cpp; path = "snes9x-1.53-src/fxdbg.cpp"; sourceTree = "<group>"; };
|
||||
94790D1314C0C46900B30798 /* fxemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fxemu.cpp; path = "snes9x-1.53-src/fxemu.cpp"; sourceTree = "<group>"; };
|
||||
94790D1414C0C46900B30798 /* fxemu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fxemu.h; path = "snes9x-1.53-src/fxemu.h"; sourceTree = "<group>"; };
|
||||
94790D1514C0C46900B30798 /* fxinst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fxinst.cpp; path = "snes9x-1.53-src/fxinst.cpp"; sourceTree = "<group>"; };
|
||||
94790D1614C0C46900B30798 /* fxinst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fxinst.h; path = "snes9x-1.53-src/fxinst.h"; sourceTree = "<group>"; };
|
||||
94790D1714C0C46900B30798 /* getset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = getset.h; path = "snes9x-1.53-src/getset.h"; sourceTree = "<group>"; };
|
||||
94790D1814C0C46900B30798 /* gfx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = gfx.cpp; path = "snes9x-1.53-src/gfx.cpp"; sourceTree = "<group>"; };
|
||||
94790D1914C0C46900B30798 /* gfx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gfx.h; path = "snes9x-1.53-src/gfx.h"; sourceTree = "<group>"; };
|
||||
94790D1A14C0C46900B30798 /* globals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = globals.cpp; path = "snes9x-1.53-src/globals.cpp"; sourceTree = "<group>"; };
|
||||
94790D3814C0C46900B30798 /* language.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = language.h; path = "snes9x-1.53-src/language.h"; sourceTree = "<group>"; };
|
||||
94790D3A14C0C46900B30798 /* logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = logger.cpp; path = "snes9x-1.53-src/logger.cpp"; sourceTree = "<group>"; };
|
||||
94790D3B14C0C46900B30798 /* logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = logger.h; path = "snes9x-1.53-src/logger.h"; sourceTree = "<group>"; };
|
||||
94790D3C14C0C46900B30798 /* memmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = memmap.cpp; path = "snes9x-1.53-src/memmap.cpp"; sourceTree = "<group>"; };
|
||||
94790D3D14C0C46900B30798 /* memmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = memmap.h; path = "snes9x-1.53-src/memmap.h"; sourceTree = "<group>"; };
|
||||
94790D3E14C0C46900B30798 /* messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = messages.h; path = "snes9x-1.53-src/messages.h"; sourceTree = "<group>"; };
|
||||
94790D3F14C0C46900B30798 /* missing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = missing.h; path = "snes9x-1.53-src/missing.h"; sourceTree = "<group>"; };
|
||||
94790D4014C0C46900B30798 /* movie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = movie.cpp; path = "snes9x-1.53-src/movie.cpp"; sourceTree = "<group>"; };
|
||||
94790D4114C0C46900B30798 /* movie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = movie.h; path = "snes9x-1.53-src/movie.h"; sourceTree = "<group>"; };
|
||||
94790D4214C0C46900B30798 /* netplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = netplay.cpp; path = "snes9x-1.53-src/netplay.cpp"; sourceTree = "<group>"; };
|
||||
94790D4314C0C46900B30798 /* netplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = netplay.h; path = "snes9x-1.53-src/netplay.h"; sourceTree = "<group>"; };
|
||||
94790D4414C0C46900B30798 /* obc1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = obc1.cpp; path = "snes9x-1.53-src/obc1.cpp"; sourceTree = "<group>"; };
|
||||
94790D4514C0C46900B30798 /* obc1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = obc1.h; path = "snes9x-1.53-src/obc1.h"; sourceTree = "<group>"; };
|
||||
94790D4614C0C46900B30798 /* pixform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pixform.h; path = "snes9x-1.53-src/pixform.h"; sourceTree = "<group>"; };
|
||||
94790D4714C0C46900B30798 /* port.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = port.h; path = "snes9x-1.53-src/port.h"; sourceTree = "<group>"; };
|
||||
94790D4814C0C46900B30798 /* ppu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ppu.cpp; path = "snes9x-1.53-src/ppu.cpp"; sourceTree = "<group>"; };
|
||||
94790D4914C0C46900B30798 /* ppu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ppu.h; path = "snes9x-1.53-src/ppu.h"; sourceTree = "<group>"; };
|
||||
94790D4C14C0C46900B30798 /* sa1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sa1.cpp; path = "snes9x-1.53-src/sa1.cpp"; sourceTree = "<group>"; };
|
||||
94790D4D14C0C46900B30798 /* sa1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sa1.h; path = "snes9x-1.53-src/sa1.h"; sourceTree = "<group>"; };
|
||||
94790D4E14C0C46900B30798 /* sa1cpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sa1cpu.cpp; path = "snes9x-1.53-src/sa1cpu.cpp"; sourceTree = "<group>"; };
|
||||
94790D4F14C0C46900B30798 /* sar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sar.h; path = "snes9x-1.53-src/sar.h"; sourceTree = "<group>"; };
|
||||
94790D5014C0C46900B30798 /* screenshot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = screenshot.cpp; path = "snes9x-1.53-src/screenshot.cpp"; sourceTree = "<group>"; };
|
||||
94790D5114C0C46900B30798 /* screenshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = screenshot.h; path = "snes9x-1.53-src/screenshot.h"; sourceTree = "<group>"; };
|
||||
94790D5214C0C46900B30798 /* sdd1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sdd1.cpp; path = "snes9x-1.53-src/sdd1.cpp"; sourceTree = "<group>"; };
|
||||
94790D5314C0C46900B30798 /* sdd1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sdd1.h; path = "snes9x-1.53-src/sdd1.h"; sourceTree = "<group>"; };
|
||||
94790D5414C0C46900B30798 /* sdd1emu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sdd1emu.cpp; path = "snes9x-1.53-src/sdd1emu.cpp"; sourceTree = "<group>"; };
|
||||
94790D5514C0C46900B30798 /* sdd1emu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sdd1emu.h; path = "snes9x-1.53-src/sdd1emu.h"; sourceTree = "<group>"; };
|
||||
94790D5614C0C46900B30798 /* server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = server.cpp; path = "snes9x-1.53-src/server.cpp"; sourceTree = "<group>"; };
|
||||
94790D5714C0C46900B30798 /* seta.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta.cpp; path = "snes9x-1.53-src/seta.cpp"; sourceTree = "<group>"; };
|
||||
94790D5814C0C46900B30798 /* seta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = seta.h; path = "snes9x-1.53-src/seta.h"; sourceTree = "<group>"; };
|
||||
94790D5914C0C46900B30798 /* seta010.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta010.cpp; path = "snes9x-1.53-src/seta010.cpp"; sourceTree = "<group>"; };
|
||||
94790D5A14C0C46900B30798 /* seta011.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta011.cpp; path = "snes9x-1.53-src/seta011.cpp"; sourceTree = "<group>"; };
|
||||
94790D5B14C0C46900B30798 /* seta018.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta018.cpp; path = "snes9x-1.53-src/seta018.cpp"; sourceTree = "<group>"; };
|
||||
94790D5C14C0C46900B30798 /* snapshot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = snapshot.cpp; path = "snes9x-1.53-src/snapshot.cpp"; sourceTree = "<group>"; };
|
||||
94790D5D14C0C46900B30798 /* snapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = snapshot.h; path = "snes9x-1.53-src/snapshot.h"; sourceTree = "<group>"; };
|
||||
94790D5E14C0C46900B30798 /* snes9x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = snes9x.cpp; path = "snes9x-1.53-src/snes9x.cpp"; sourceTree = "<group>"; };
|
||||
94790D5F14C0C46900B30798 /* snes9x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = snes9x.h; path = "snes9x-1.53-src/snes9x.h"; sourceTree = "<group>"; };
|
||||
94790D6014C0C46900B30798 /* spc7110.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = spc7110.cpp; path = "snes9x-1.53-src/spc7110.cpp"; sourceTree = "<group>"; };
|
||||
94790D6114C0C46900B30798 /* spc7110.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spc7110.h; path = "snes9x-1.53-src/spc7110.h"; sourceTree = "<group>"; };
|
||||
94790D6214C0C46900B30798 /* spc7110dec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = spc7110dec.cpp; path = "snes9x-1.53-src/spc7110dec.cpp"; sourceTree = "<group>"; };
|
||||
94790D6314C0C46900B30798 /* spc7110dec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spc7110dec.h; path = "snes9x-1.53-src/spc7110dec.h"; sourceTree = "<group>"; };
|
||||
94790D6414C0C46900B30798 /* spc7110emu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = spc7110emu.cpp; path = "snes9x-1.53-src/spc7110emu.cpp"; sourceTree = "<group>"; };
|
||||
94790D6514C0C46900B30798 /* spc7110emu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spc7110emu.h; path = "snes9x-1.53-src/spc7110emu.h"; sourceTree = "<group>"; };
|
||||
94790D6614C0C46900B30798 /* srtc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srtc.cpp; path = "snes9x-1.53-src/srtc.cpp"; sourceTree = "<group>"; };
|
||||
94790D6714C0C46900B30798 /* srtc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = srtc.h; path = "snes9x-1.53-src/srtc.h"; sourceTree = "<group>"; };
|
||||
94790D6814C0C46900B30798 /* srtcemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srtcemu.cpp; path = "snes9x-1.53-src/srtcemu.cpp"; sourceTree = "<group>"; };
|
||||
94790D6914C0C46900B30798 /* srtcemu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = srtcemu.h; path = "snes9x-1.53-src/srtcemu.h"; sourceTree = "<group>"; };
|
||||
94790D6A14C0C46900B30798 /* tile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tile.cpp; path = "snes9x-1.53-src/tile.cpp"; sourceTree = "<group>"; };
|
||||
94790D6B14C0C46900B30798 /* tile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tile.h; path = "snes9x-1.53-src/tile.h"; sourceTree = "<group>"; };
|
||||
C6480FFA1364B1CF0094FA33 /* OESNESSystemResponderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OESNESSystemResponderClient.h; path = ../OpenEmu/SuperNES/OESNESSystemResponderClient.h; sourceTree = "<group>"; };
|
||||
94790CF014C0C46900B30798 /* bsx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bsx.cpp; path = src/bsx.cpp; sourceTree = "<group>"; };
|
||||
94790CF114C0C46900B30798 /* bsx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bsx.h; path = src/bsx.h; sourceTree = "<group>"; };
|
||||
94790CF214C0C46900B30798 /* c4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = c4.cpp; path = src/c4.cpp; sourceTree = "<group>"; };
|
||||
94790CF314C0C46900B30798 /* c4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = c4.h; path = src/c4.h; sourceTree = "<group>"; };
|
||||
94790CF414C0C46900B30798 /* c4emu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = c4emu.cpp; path = src/c4emu.cpp; sourceTree = "<group>"; };
|
||||
94790CF514C0C46900B30798 /* cheats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cheats.cpp; path = src/cheats.cpp; sourceTree = "<group>"; };
|
||||
94790CF614C0C46900B30798 /* cheats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cheats.h; path = src/cheats.h; sourceTree = "<group>"; };
|
||||
94790CF714C0C46900B30798 /* cheats2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cheats2.cpp; path = src/cheats2.cpp; sourceTree = "<group>"; };
|
||||
94790CF814C0C46900B30798 /* clip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = clip.cpp; path = src/clip.cpp; sourceTree = "<group>"; };
|
||||
94790CF914C0C46900B30798 /* conffile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = conffile.cpp; path = src/conffile.cpp; sourceTree = "<group>"; };
|
||||
94790CFA14C0C46900B30798 /* conffile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conffile.h; path = src/conffile.h; sourceTree = "<group>"; };
|
||||
94790CFB14C0C46900B30798 /* controls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = controls.cpp; path = src/controls.cpp; sourceTree = "<group>"; };
|
||||
94790CFC14C0C46900B30798 /* controls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = controls.h; path = src/controls.h; sourceTree = "<group>"; };
|
||||
94790CFD14C0C46900B30798 /* cpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpu.cpp; path = src/cpu.cpp; sourceTree = "<group>"; };
|
||||
94790CFE14C0C46900B30798 /* cpuaddr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpuaddr.h; path = src/cpuaddr.h; sourceTree = "<group>"; };
|
||||
94790CFF14C0C46900B30798 /* cpuexec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpuexec.cpp; path = src/cpuexec.cpp; sourceTree = "<group>"; };
|
||||
94790D0014C0C46900B30798 /* cpuexec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpuexec.h; path = src/cpuexec.h; sourceTree = "<group>"; };
|
||||
94790D0114C0C46900B30798 /* cpumacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpumacro.h; path = src/cpumacro.h; sourceTree = "<group>"; };
|
||||
94790D0214C0C46900B30798 /* cpuops.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpuops.cpp; path = src/cpuops.cpp; sourceTree = "<group>"; };
|
||||
94790D0314C0C46900B30798 /* cpuops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpuops.h; path = src/cpuops.h; sourceTree = "<group>"; };
|
||||
94790D0414C0C46900B30798 /* crosshairs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = crosshairs.cpp; path = src/crosshairs.cpp; sourceTree = "<group>"; };
|
||||
94790D0514C0C46900B30798 /* crosshairs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crosshairs.h; path = src/crosshairs.h; sourceTree = "<group>"; };
|
||||
94790D0614C0C46900B30798 /* debug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = debug.cpp; path = src/debug.cpp; sourceTree = "<group>"; };
|
||||
94790D0714C0C46900B30798 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = debug.h; path = src/debug.h; sourceTree = "<group>"; };
|
||||
94790D0814C0C46900B30798 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = display.h; path = src/display.h; sourceTree = "<group>"; };
|
||||
94790D0914C0C46900B30798 /* dma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dma.cpp; path = src/dma.cpp; sourceTree = "<group>"; };
|
||||
94790D0A14C0C46900B30798 /* dma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dma.h; path = src/dma.h; sourceTree = "<group>"; };
|
||||
94790D0B14C0C46900B30798 /* dsp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp.cpp; path = src/dsp.cpp; sourceTree = "<group>"; };
|
||||
94790D0C14C0C46900B30798 /* dsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dsp.h; path = src/dsp.h; sourceTree = "<group>"; };
|
||||
94790D0D14C0C46900B30798 /* dsp1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp1.cpp; path = src/dsp1.cpp; sourceTree = "<group>"; };
|
||||
94790D0E14C0C46900B30798 /* dsp2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp2.cpp; path = src/dsp2.cpp; sourceTree = "<group>"; };
|
||||
94790D0F14C0C46900B30798 /* dsp3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp3.cpp; path = src/dsp3.cpp; sourceTree = "<group>"; };
|
||||
94790D1014C0C46900B30798 /* dsp4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dsp4.cpp; path = src/dsp4.cpp; sourceTree = "<group>"; };
|
||||
94790D1114C0C46900B30798 /* font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = font.h; path = src/font.h; sourceTree = "<group>"; };
|
||||
94790D1214C0C46900B30798 /* fxdbg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fxdbg.cpp; path = src/fxdbg.cpp; sourceTree = "<group>"; };
|
||||
94790D1314C0C46900B30798 /* fxemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fxemu.cpp; path = src/fxemu.cpp; sourceTree = "<group>"; };
|
||||
94790D1414C0C46900B30798 /* fxemu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fxemu.h; path = src/fxemu.h; sourceTree = "<group>"; };
|
||||
94790D1514C0C46900B30798 /* fxinst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fxinst.cpp; path = src/fxinst.cpp; sourceTree = "<group>"; };
|
||||
94790D1614C0C46900B30798 /* fxinst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fxinst.h; path = src/fxinst.h; sourceTree = "<group>"; };
|
||||
94790D1714C0C46900B30798 /* getset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = getset.h; path = src/getset.h; sourceTree = "<group>"; };
|
||||
94790D1814C0C46900B30798 /* gfx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = gfx.cpp; path = src/gfx.cpp; sourceTree = "<group>"; };
|
||||
94790D1914C0C46900B30798 /* gfx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gfx.h; path = src/gfx.h; sourceTree = "<group>"; };
|
||||
94790D1A14C0C46900B30798 /* globals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = globals.cpp; path = src/globals.cpp; sourceTree = "<group>"; };
|
||||
94790D3814C0C46900B30798 /* language.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = language.h; path = src/language.h; sourceTree = "<group>"; };
|
||||
94790D3A14C0C46900B30798 /* logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = logger.cpp; path = src/logger.cpp; sourceTree = "<group>"; };
|
||||
94790D3B14C0C46900B30798 /* logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = logger.h; path = src/logger.h; sourceTree = "<group>"; };
|
||||
94790D3C14C0C46900B30798 /* memmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = memmap.cpp; path = src/memmap.cpp; sourceTree = "<group>"; };
|
||||
94790D3D14C0C46900B30798 /* memmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = memmap.h; path = src/memmap.h; sourceTree = "<group>"; };
|
||||
94790D3E14C0C46900B30798 /* messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = messages.h; path = src/messages.h; sourceTree = "<group>"; };
|
||||
94790D3F14C0C46900B30798 /* missing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = missing.h; path = src/missing.h; sourceTree = "<group>"; };
|
||||
94790D4014C0C46900B30798 /* movie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = movie.cpp; path = src/movie.cpp; sourceTree = "<group>"; };
|
||||
94790D4114C0C46900B30798 /* movie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = movie.h; path = src/movie.h; sourceTree = "<group>"; };
|
||||
94790D4214C0C46900B30798 /* netplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = netplay.cpp; path = src/netplay.cpp; sourceTree = "<group>"; };
|
||||
94790D4314C0C46900B30798 /* netplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = netplay.h; path = src/netplay.h; sourceTree = "<group>"; };
|
||||
94790D4414C0C46900B30798 /* obc1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = obc1.cpp; path = src/obc1.cpp; sourceTree = "<group>"; };
|
||||
94790D4514C0C46900B30798 /* obc1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = obc1.h; path = src/obc1.h; sourceTree = "<group>"; };
|
||||
94790D4614C0C46900B30798 /* pixform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pixform.h; path = src/pixform.h; sourceTree = "<group>"; };
|
||||
94790D4714C0C46900B30798 /* port.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = port.h; path = src/port.h; sourceTree = "<group>"; };
|
||||
94790D4814C0C46900B30798 /* ppu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ppu.cpp; path = src/ppu.cpp; sourceTree = "<group>"; };
|
||||
94790D4914C0C46900B30798 /* ppu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ppu.h; path = src/ppu.h; sourceTree = "<group>"; };
|
||||
94790D4C14C0C46900B30798 /* sa1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sa1.cpp; path = src/sa1.cpp; sourceTree = "<group>"; };
|
||||
94790D4D14C0C46900B30798 /* sa1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sa1.h; path = src/sa1.h; sourceTree = "<group>"; };
|
||||
94790D4E14C0C46900B30798 /* sa1cpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sa1cpu.cpp; path = src/sa1cpu.cpp; sourceTree = "<group>"; };
|
||||
94790D4F14C0C46900B30798 /* sar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sar.h; path = src/sar.h; sourceTree = "<group>"; };
|
||||
94790D5014C0C46900B30798 /* screenshot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = screenshot.cpp; path = src/screenshot.cpp; sourceTree = "<group>"; };
|
||||
94790D5114C0C46900B30798 /* screenshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = screenshot.h; path = src/screenshot.h; sourceTree = "<group>"; };
|
||||
94790D5214C0C46900B30798 /* sdd1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sdd1.cpp; path = src/sdd1.cpp; sourceTree = "<group>"; };
|
||||
94790D5314C0C46900B30798 /* sdd1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sdd1.h; path = src/sdd1.h; sourceTree = "<group>"; };
|
||||
94790D5414C0C46900B30798 /* sdd1emu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sdd1emu.cpp; path = src/sdd1emu.cpp; sourceTree = "<group>"; };
|
||||
94790D5514C0C46900B30798 /* sdd1emu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sdd1emu.h; path = src/sdd1emu.h; sourceTree = "<group>"; };
|
||||
94790D5614C0C46900B30798 /* server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = server.cpp; path = src/server.cpp; sourceTree = "<group>"; };
|
||||
94790D5714C0C46900B30798 /* seta.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta.cpp; path = src/seta.cpp; sourceTree = "<group>"; };
|
||||
94790D5814C0C46900B30798 /* seta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = seta.h; path = src/seta.h; sourceTree = "<group>"; };
|
||||
94790D5914C0C46900B30798 /* seta010.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta010.cpp; path = src/seta010.cpp; sourceTree = "<group>"; };
|
||||
94790D5A14C0C46900B30798 /* seta011.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta011.cpp; path = src/seta011.cpp; sourceTree = "<group>"; };
|
||||
94790D5B14C0C46900B30798 /* seta018.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seta018.cpp; path = src/seta018.cpp; sourceTree = "<group>"; };
|
||||
94790D5C14C0C46900B30798 /* snapshot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = snapshot.cpp; path = src/snapshot.cpp; sourceTree = "<group>"; };
|
||||
94790D5D14C0C46900B30798 /* snapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = snapshot.h; path = src/snapshot.h; sourceTree = "<group>"; };
|
||||
94790D5E14C0C46900B30798 /* snes9x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = snes9x.cpp; path = src/snes9x.cpp; sourceTree = "<group>"; };
|
||||
94790D5F14C0C46900B30798 /* snes9x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = snes9x.h; path = src/snes9x.h; sourceTree = "<group>"; };
|
||||
94790D6014C0C46900B30798 /* spc7110.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = spc7110.cpp; path = src/spc7110.cpp; sourceTree = "<group>"; };
|
||||
94790D6114C0C46900B30798 /* spc7110.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spc7110.h; path = src/spc7110.h; sourceTree = "<group>"; };
|
||||
94790D6214C0C46900B30798 /* spc7110dec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = spc7110dec.cpp; path = src/spc7110dec.cpp; sourceTree = "<group>"; };
|
||||
94790D6314C0C46900B30798 /* spc7110dec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spc7110dec.h; path = src/spc7110dec.h; sourceTree = "<group>"; };
|
||||
94790D6414C0C46900B30798 /* spc7110emu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = spc7110emu.cpp; path = src/spc7110emu.cpp; sourceTree = "<group>"; };
|
||||
94790D6514C0C46900B30798 /* spc7110emu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spc7110emu.h; path = src/spc7110emu.h; sourceTree = "<group>"; };
|
||||
94790D6614C0C46900B30798 /* srtc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srtc.cpp; path = src/srtc.cpp; sourceTree = "<group>"; };
|
||||
94790D6714C0C46900B30798 /* srtc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = srtc.h; path = src/srtc.h; sourceTree = "<group>"; };
|
||||
94790D6814C0C46900B30798 /* srtcemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srtcemu.cpp; path = src/srtcemu.cpp; sourceTree = "<group>"; };
|
||||
94790D6914C0C46900B30798 /* srtcemu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = srtcemu.h; path = src/srtcemu.h; sourceTree = "<group>"; };
|
||||
94790D6A14C0C46900B30798 /* tile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tile.cpp; path = src/tile.cpp; sourceTree = "<group>"; };
|
||||
94790D6B14C0C46900B30798 /* tile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tile.h; path = src/tile.h; sourceTree = "<group>"; };
|
||||
C6480FFA1364B1CF0094FA33 /* OESNESSystemResponderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OESNESSystemResponderClient.h; path = ../OpenEmu/SystemPlugins/SuperNES/OESNESSystemResponderClient.h; sourceTree = "<group>"; };
|
||||
C6D120FA1711314D00E868A8 /* OpenEmuBase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OpenEmuBase.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -295,6 +287,7 @@
|
||||
);
|
||||
name = SNES9x;
|
||||
sourceTree = "<group>";
|
||||
usesTabs = 0;
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -325,7 +318,6 @@
|
||||
C6480FFA1364B1CF0094FA33 /* OESNESSystemResponderClient.h */,
|
||||
826C1B1D0F420C2200FB9014 /* SNESGameCore.h */,
|
||||
826C1B1E0F420C2200FB9014 /* SNESGameCore.mm */,
|
||||
82AD85B50F41646E00DF0AE1 /* SNESOESupport.mm */,
|
||||
82AD83C60F4154DD00DF0AE1 /* core */,
|
||||
);
|
||||
name = Classes;
|
||||
@@ -334,7 +326,6 @@
|
||||
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
942597D5151470C00074E3A3 /* OpenEmuBase.framework */,
|
||||
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
@@ -370,6 +361,8 @@
|
||||
children = (
|
||||
94790CDA14C0C46900B30798 /* 65c816.h */,
|
||||
94790CDB14C0C46900B30798 /* apu */,
|
||||
8769DC9C20D19CDB005ABC18 /* bml.cpp */,
|
||||
8769DC9B20D19CDB005ABC18 /* bml.h */,
|
||||
94790CF014C0C46900B30798 /* bsx.cpp */,
|
||||
94790CF114C0C46900B30798 /* bsx.h */,
|
||||
94790CF214C0C46900B30798 /* c4.cpp */,
|
||||
@@ -404,6 +397,8 @@
|
||||
94790D0F14C0C46900B30798 /* dsp3.cpp */,
|
||||
94790D1014C0C46900B30798 /* dsp4.cpp */,
|
||||
94790D1114C0C46900B30798 /* font.h */,
|
||||
8F6CC79E29FD51E2006C7D59 /* fscompat.cpp */,
|
||||
8F6CC79F29FD51E2006C7D59 /* fscompat.h */,
|
||||
94790D1214C0C46900B30798 /* fxdbg.cpp */,
|
||||
94790D1314C0C46900B30798 /* fxemu.cpp */,
|
||||
94790D1414C0C46900B30798 /* fxemu.h */,
|
||||
@@ -423,6 +418,8 @@
|
||||
94790D3F14C0C46900B30798 /* missing.h */,
|
||||
94790D4014C0C46900B30798 /* movie.cpp */,
|
||||
94790D4114C0C46900B30798 /* movie.h */,
|
||||
8741B3AA1FC9361000A95A00 /* msu1.cpp */,
|
||||
8741B3AB1FC9361000A95A00 /* msu1.h */,
|
||||
94790D4214C0C46900B30798 /* netplay.cpp */,
|
||||
94790D4314C0C46900B30798 /* netplay.h */,
|
||||
94790D4414C0C46900B30798 /* obc1.cpp */,
|
||||
@@ -447,6 +444,8 @@
|
||||
94790D5914C0C46900B30798 /* seta010.cpp */,
|
||||
94790D5A14C0C46900B30798 /* seta011.cpp */,
|
||||
94790D5B14C0C46900B30798 /* seta018.cpp */,
|
||||
8769DC9E20D19D1C005ABC18 /* sha256.cpp */,
|
||||
8769DC9F20D19D1C005ABC18 /* sha256.h */,
|
||||
94790D5C14C0C46900B30798 /* snapshot.cpp */,
|
||||
94790D5D14C0C46900B30798 /* snapshot.h */,
|
||||
94790D5E14C0C46900B30798 /* snes9x.cpp */,
|
||||
@@ -465,36 +464,96 @@
|
||||
87431C051B02F20700F82158 /* stream.h */,
|
||||
94790D6A14C0C46900B30798 /* tile.cpp */,
|
||||
94790D6B14C0C46900B30798 /* tile.h */,
|
||||
87709EEA294EDD580084AEE0 /* tileimpl-h2x1.cpp */,
|
||||
87709EE9294EDD580084AEE0 /* tileimpl-n1x1.cpp */,
|
||||
87709EEB294EDD580084AEE0 /* tileimpl-n2x1.cpp */,
|
||||
87709EE8294EDD580084AEE0 /* tileimpl.h */,
|
||||
);
|
||||
name = core;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8725B0891E931ED600F68CA5 /* bapu */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8725B08A1E931ED600F68CA5 /* dsp */,
|
||||
8725B0931E931ED600F68CA5 /* smp */,
|
||||
8725B0B71E931ED600F68CA5 /* snes */,
|
||||
);
|
||||
path = bapu;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8725B08A1E931ED600F68CA5 /* dsp */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8725B08B1E931ED600F68CA5 /* blargg_common.h */,
|
||||
8725B08C1E931ED600F68CA5 /* blargg_config.h */,
|
||||
8725B08D1E931ED600F68CA5 /* blargg_endian.h */,
|
||||
8725B08E1E931ED600F68CA5 /* blargg_source.h */,
|
||||
8725B08F1E931ED600F68CA5 /* sdsp.cpp */,
|
||||
8725B0901E931ED600F68CA5 /* sdsp.hpp */,
|
||||
8725B0911E931ED600F68CA5 /* SPC_DSP.cpp */,
|
||||
8725B0921E931ED600F68CA5 /* SPC_DSP.h */,
|
||||
);
|
||||
path = dsp;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8725B0931E931ED600F68CA5 /* smp */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8725B0941E931ED600F68CA5 /* algorithms.cpp */,
|
||||
8725B0951E931ED600F68CA5 /* core */,
|
||||
8725B0AC1E931ED600F68CA5 /* core.cpp */,
|
||||
8725B0AD1E931ED600F68CA5 /* debugger */,
|
||||
8725B0B11E931ED600F68CA5 /* iplrom.cpp */,
|
||||
8725B0B21E931ED600F68CA5 /* memory.cpp */,
|
||||
8725B0B31E931ED600F68CA5 /* smp.cpp */,
|
||||
8725B0B41E931ED600F68CA5 /* smp.hpp */,
|
||||
8725B0B51E931ED600F68CA5 /* smp_state.cpp */,
|
||||
8725B0B61E931ED600F68CA5 /* timing.cpp */,
|
||||
);
|
||||
path = smp;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8725B0951E931ED600F68CA5 /* core */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8725B0A71E931ED600F68CA5 /* oppseudo_misc.cpp */,
|
||||
8725B0A81E931ED600F68CA5 /* oppseudo_mov.cpp */,
|
||||
8725B0A91E931ED600F68CA5 /* oppseudo_pc.cpp */,
|
||||
8725B0AA1E931ED600F68CA5 /* oppseudo_read.cpp */,
|
||||
8725B0AB1E931ED600F68CA5 /* oppseudo_rmw.cpp */,
|
||||
);
|
||||
path = core;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8725B0AD1E931ED600F68CA5 /* debugger */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8725B0AE1E931ED600F68CA5 /* debugger.cpp */,
|
||||
8725B0AF1E931ED600F68CA5 /* debugger.hpp */,
|
||||
8725B0B01E931ED600F68CA5 /* disassembler.cpp */,
|
||||
);
|
||||
path = debugger;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8725B0B71E931ED600F68CA5 /* snes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8725B0B81E931ED600F68CA5 /* snes.hpp */,
|
||||
);
|
||||
path = snes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94790CDB14C0C46900B30798 /* apu */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
94790CDC14C0C46900B30798 /* apu.cpp */,
|
||||
94790CDD14C0C46900B30798 /* apu.h */,
|
||||
94790CDE14C0C46900B30798 /* blargg_common.h */,
|
||||
94790CDF14C0C46900B30798 /* blargg_config.h */,
|
||||
94790CE014C0C46900B30798 /* blargg_endian.h */,
|
||||
94790CE114C0C46900B30798 /* blargg_source.h */,
|
||||
94790CE214C0C46900B30798 /* hermite_resampler.h */,
|
||||
94790CE314C0C46900B30798 /* license.txt */,
|
||||
94790CE414C0C46900B30798 /* linear_resampler.h */,
|
||||
8725B0891E931ED600F68CA5 /* bapu */,
|
||||
94790CE514C0C46900B30798 /* resampler.h */,
|
||||
94790CE614C0C46900B30798 /* ring_buffer.h */,
|
||||
94790CE714C0C46900B30798 /* SNES_SPC.cpp */,
|
||||
94790CE814C0C46900B30798 /* SNES_SPC.h */,
|
||||
94790CE914C0C46900B30798 /* SNES_SPC_misc.cpp */,
|
||||
94790CEA14C0C46900B30798 /* SNES_SPC_state.cpp */,
|
||||
94790CEB14C0C46900B30798 /* SPC_CPU.h */,
|
||||
94790CEC14C0C46900B30798 /* SPC_DSP.cpp */,
|
||||
94790CED14C0C46900B30798 /* SPC_DSP.h */,
|
||||
94790CEE14C0C46900B30798 /* SPC_Filter.cpp */,
|
||||
94790CEF14C0C46900B30798 /* SPC_Filter.h */,
|
||||
);
|
||||
name = apu;
|
||||
path = "snes9x-1.53-src/apu";
|
||||
path = src/apu;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
@@ -525,12 +584,11 @@
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 0700;
|
||||
LastUpgradeCheck = 0830;
|
||||
};
|
||||
buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "SNES9x" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
en,
|
||||
@@ -541,7 +599,6 @@
|
||||
targets = (
|
||||
8D5B49AC048680CD000E48DA /* SNES9x */,
|
||||
826C1BAA0F42306E00FB9014 /* Build & Install SNES9x */,
|
||||
82CAFD4C0FEDD6A200CCDC7E /* Distribution */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -553,7 +610,6 @@
|
||||
files = (
|
||||
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */,
|
||||
828F16CB0F43A10000FD7321 /* APPL.icns in Resources */,
|
||||
94790D7B14C0C46900B30798 /* license.txt in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -573,19 +629,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "mkdir -p \"$USER_LIBRARY_DIR/Application Support/OpenEmu/Cores\"\nrm -rf \"$USER_LIBRARY_DIR/Application Support/OpenEmu/Cores/$PROJECT_NAME.oecoreplugin\"{,.dSYM}\ncp -rf \"$BUILT_PRODUCTS_DIR/$PROJECT_NAME.oecoreplugin\"{,.dSYM} \"$USER_LIBRARY_DIR/Application Support/OpenEmu/Cores/\"\n";
|
||||
};
|
||||
82CAFD4B0FEDD6A200CCDC7E /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = /usr/bin/openemu_rb_automation.rb;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -594,13 +637,11 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
826C1B1F0F420C2200FB9014 /* SNESGameCore.mm in Sources */,
|
||||
C67F02030FC200A6009C6CD6 /* SNESOESupport.mm in Sources */,
|
||||
94790D7A14C0C46900B30798 /* apu.cpp in Sources */,
|
||||
94790D7C14C0C46900B30798 /* SNES_SPC.cpp in Sources */,
|
||||
94790D7D14C0C46900B30798 /* SNES_SPC_misc.cpp in Sources */,
|
||||
94790D7E14C0C46900B30798 /* SNES_SPC_state.cpp in Sources */,
|
||||
94790D7F14C0C46900B30798 /* SPC_DSP.cpp in Sources */,
|
||||
94790D8014C0C46900B30798 /* SPC_Filter.cpp in Sources */,
|
||||
8725B0B91E933E1B00F68CA5 /* sdsp.cpp in Sources */,
|
||||
8725B0BB1E933E2B00F68CA5 /* smp.cpp in Sources */,
|
||||
8725B0BC1E933E2D00F68CA5 /* smp_state.cpp in Sources */,
|
||||
8769DC9D20D19CDC005ABC18 /* bml.cpp in Sources */,
|
||||
94790D8114C0C46900B30798 /* bsx.cpp in Sources */,
|
||||
94790D8214C0C46900B30798 /* c4.cpp in Sources */,
|
||||
94790D8314C0C46900B30798 /* c4emu.cpp in Sources */,
|
||||
@@ -628,9 +669,11 @@
|
||||
94790DA414C0C46900B30798 /* logger.cpp in Sources */,
|
||||
94790DA514C0C46900B30798 /* memmap.cpp in Sources */,
|
||||
94790DA614C0C46900B30798 /* movie.cpp in Sources */,
|
||||
8741B3AC1FC9361100A95A00 /* msu1.cpp in Sources */,
|
||||
94790DA714C0C46900B30798 /* netplay.cpp in Sources */,
|
||||
94790DA814C0C46900B30798 /* obc1.cpp in Sources */,
|
||||
94790DA914C0C46900B30798 /* ppu.cpp in Sources */,
|
||||
8F6CC7A029FD51E2006C7D59 /* fscompat.cpp in Sources */,
|
||||
87431C061B02F20700F82158 /* stream.cpp in Sources */,
|
||||
94790DAB14C0C46900B30798 /* sa1.cpp in Sources */,
|
||||
94790DAC14C0C46900B30798 /* sa1cpu.cpp in Sources */,
|
||||
@@ -641,11 +684,15 @@
|
||||
94790DB214C0C46900B30798 /* seta010.cpp in Sources */,
|
||||
94790DB314C0C46900B30798 /* seta011.cpp in Sources */,
|
||||
94790DB414C0C46900B30798 /* seta018.cpp in Sources */,
|
||||
8769DCA020D19D1C005ABC18 /* sha256.cpp in Sources */,
|
||||
94790DB514C0C46900B30798 /* snapshot.cpp in Sources */,
|
||||
94790DB614C0C46900B30798 /* snes9x.cpp in Sources */,
|
||||
94790DB714C0C46900B30798 /* spc7110.cpp in Sources */,
|
||||
94790DBA14C0C46900B30798 /* srtc.cpp in Sources */,
|
||||
94790DBC14C0C46900B30798 /* tile.cpp in Sources */,
|
||||
87709EED294EDD590084AEE0 /* tileimpl-h2x1.cpp in Sources */,
|
||||
87709EEC294EDD590084AEE0 /* tileimpl-n1x1.cpp in Sources */,
|
||||
87709EEE294EDD590084AEE0 /* tileimpl-n2x1.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -657,18 +704,13 @@
|
||||
target = 8D5B49AC048680CD000E48DA /* SNES9x */;
|
||||
targetProxy = 826C1BAD0F42307900FB9014 /* PBXContainerItemProxy */;
|
||||
};
|
||||
82CAFD500FEDD6A600CCDC7E /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8D5B49AC048680CD000E48DA /* SNES9x */;
|
||||
targetProxy = 82CAFD4F0FEDD6A600CCDC7E /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
089C167EFE841241C02AAC07 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
@@ -680,8 +722,13 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/src\"",
|
||||
"\"$(SRCROOT)/src/apu/bapu\"",
|
||||
);
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
@@ -689,9 +736,10 @@
|
||||
"\"$(SRCROOT)\"",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-D__MACOSX__",
|
||||
"-Wno-write-strings",
|
||||
"-Dunix",
|
||||
"-DHAVE_STRINGS_H",
|
||||
"-DHAVE_INTTYPES_H",
|
||||
"-DHAVE_STDINT_H",
|
||||
"-DRIGHTSHIFT_IS_SAR",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:identifier}";
|
||||
PRODUCT_NAME = SNES9x;
|
||||
@@ -704,9 +752,14 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_STRICT_ALIASING = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/src\"",
|
||||
"\"$(SRCROOT)/src/apu/bapu\"",
|
||||
);
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
@@ -714,13 +767,15 @@
|
||||
"\"$(SRCROOT)\"",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-D__MACOSX__",
|
||||
"-Wno-write-strings",
|
||||
"-Dunix",
|
||||
"-DHAVE_STRINGS_H",
|
||||
"-DHAVE_INTTYPES_H",
|
||||
"-DHAVE_STDINT_H",
|
||||
"-DRIGHTSHIFT_IS_SAR",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:identifier}";
|
||||
PRODUCT_NAME = SNES9x;
|
||||
SKIP_INSTALL = YES;
|
||||
USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/src\" \"$(SRCROOT)/src/apu/bapu\"";
|
||||
WRAPPER_EXTENSION = oecoreplugin;
|
||||
};
|
||||
name = Release;
|
||||
@@ -744,6 +799,7 @@
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
@@ -752,11 +808,10 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
LLVM_LTO = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
WARNING_CFLAGS = "-Wno-deprecated";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -787,11 +842,9 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
LLVM_LTO = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
SDKROOT = macosx;
|
||||
WARNING_CFLAGS = "-Wno-deprecated";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -821,37 +874,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
82CAFD4D0FEDD6A200CCDC7E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
||||
PRODUCT_NAME = Distribution;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
82CAFD4E0FEDD6A200CCDC7E /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
||||
OTHER_CFLAGS = (
|
||||
"-DUNZIP_SUPPORT",
|
||||
"-D__MACOSX__",
|
||||
"-DJMA_SUPPORT",
|
||||
);
|
||||
PRODUCT_NAME = Distribution;
|
||||
SKIP_INSTALL = YES;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -882,15 +904,6 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
82CAFD630FEDD6D100CCDC7E /* Build configuration list for PBXAggregateTarget "Distribution" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
82CAFD4D0FEDD6A200CCDC7E /* Debug */,
|
||||
82CAFD4E0FEDD6A200CCDC7E /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
|
||||
+880
-719
File diff suppressed because it is too large
Load Diff
@@ -1,255 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2009, OpenEmu Team
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the OpenEmu Team nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY OpenEmu Team ''AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL OpenEmu Team BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
#include "memmap.h"
|
||||
#include "gfx.h"
|
||||
#include "display.h"
|
||||
#include "ppu.h"
|
||||
#include "conffile.h"
|
||||
#include "apu.h"
|
||||
#include "controls.h"
|
||||
#include "snes9x.h"
|
||||
#include "movie.h"
|
||||
#include "screenshot.h"
|
||||
|
||||
const char *S9xBasename (const char *filename)
|
||||
{
|
||||
//NSLog(@"basename %s",filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext)
|
||||
{
|
||||
NSString *nsPath = [NSString stringWithUTF8String:path];
|
||||
|
||||
drive[0] = '\0';
|
||||
|
||||
NSString *extension = [nsPath pathExtension];
|
||||
NSArray *components = [nsPath pathComponents];
|
||||
NSArray *dirComponents = [[nsPath pathComponents] subarrayWithRange:NSMakeRange(0, [components count] - 1)];
|
||||
NSString *fileName = [[nsPath lastPathComponent] stringByDeletingPathExtension];
|
||||
NSString *directory = [NSString pathWithComponents:dirComponents];
|
||||
|
||||
strcpy(dir, [directory UTF8String]);
|
||||
strcpy(fname, [fileName UTF8String]);
|
||||
strcpy(ext, [extension UTF8String]);
|
||||
}
|
||||
|
||||
void _makepath(char *path, const char *drive, const char *dir, const char *fname, const char *ext)
|
||||
{
|
||||
#pragma unused (drive)
|
||||
|
||||
NSString *directory = [NSString stringWithUTF8String:dir];
|
||||
NSString *fileName = [NSString stringWithUTF8String:fname];
|
||||
NSString *extension = [NSString stringWithUTF8String:ext];
|
||||
|
||||
fileName = [fileName stringByAppendingPathExtension:extension];
|
||||
|
||||
NSString *fullPath = [directory stringByAppendingPathComponent:fileName];
|
||||
|
||||
strcpy(path, [fullPath UTF8String]);
|
||||
}
|
||||
|
||||
void S9xExit ()
|
||||
{
|
||||
NSLog(@"exit");
|
||||
}
|
||||
|
||||
void S9xHandlePortCommand(s9xcommand_t cmd, int16 data1, int16 data2)
|
||||
{
|
||||
|
||||
NSLog(@"Port command");
|
||||
}
|
||||
|
||||
|
||||
void S9xGenerateSound ()
|
||||
{
|
||||
NSLog(@"Gen sound");
|
||||
}
|
||||
|
||||
|
||||
void S9xSetPalette ()
|
||||
{
|
||||
//NSLog(@"Set pallette");
|
||||
}
|
||||
const char * S9xGetSPC7110Directory(void)
|
||||
{
|
||||
NSLog(@"7110 dir");
|
||||
return NULL;
|
||||
}
|
||||
const char *S9xGetDirectory (enum s9x_getdirtype dirtype)
|
||||
{
|
||||
NSString *biosPath = [[[[NSHomeDirectory() stringByAppendingPathComponent:@"Library"]
|
||||
stringByAppendingPathComponent:@"Application Support"]
|
||||
stringByAppendingPathComponent:@"OpenEmu"]
|
||||
stringByAppendingPathComponent:@"BIOS"];
|
||||
|
||||
NSLog(@"Get dir");
|
||||
switch (dirtype)
|
||||
{
|
||||
case SRAM_DIR: return [NSHomeDirectory() UTF8String]; break;
|
||||
case BIOS_DIR: return [biosPath UTF8String]; break;
|
||||
default: return NULL; break;
|
||||
}
|
||||
}
|
||||
|
||||
const char *S9xChooseFilename (bool8 read_only)
|
||||
{
|
||||
NSLog(@"Choose fname");
|
||||
return NULL;
|
||||
}
|
||||
void S9xLoadSDD1Data ()
|
||||
{
|
||||
NSLog(@"Load SDD1");
|
||||
}
|
||||
|
||||
void S9xAutoSaveSRAM (void)
|
||||
{
|
||||
NSLog(@"Auto save SRAM");
|
||||
}
|
||||
|
||||
void S9xToggleSoundChannel (int channel)
|
||||
{
|
||||
NSLog(@"Toggle channel");
|
||||
}
|
||||
|
||||
extern "C" char *osd_GetPackDir()
|
||||
{
|
||||
NSLog(@"Get pack dir");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void S9xSyncSpeed ()
|
||||
{
|
||||
IPPU.RenderThisFrame = true;
|
||||
///NSLog(@"Sync");
|
||||
}
|
||||
|
||||
const char *S9xStringInput(const char *message)
|
||||
{
|
||||
NSLog(@"String input");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool8 S9xInitUpdate (void)
|
||||
{
|
||||
//NSLog(@"Init update");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool8 S9xDeinitUpdate(int width, int height)
|
||||
{
|
||||
//NSLog(@"de init");
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned char S9xContinueUpdate(int width, int height)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
const char *S9xGetFilename (const char *extension, enum s9x_getdirtype dirtype)
|
||||
{
|
||||
NSLog(@"Get filename");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SetInfoDlgColor(unsigned char, unsigned char, unsigned char)
|
||||
{
|
||||
NSLog(@"Set info dlg");
|
||||
}
|
||||
const char *S9xGetFilenameInc (const char *, enum s9x_getdirtype)
|
||||
{
|
||||
NSLog(@"Get filenameinc");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
bool8 S9xDoScreenshot(int width, int height)
|
||||
{
|
||||
NSLog(@"Do screenshot");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool8 S9xOpenSnapshotFile (const char *base, bool8 read_only, STREAM *file)
|
||||
{
|
||||
if((*file = OPEN_STREAM(base, (read_only ? "r" : "w"))) != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void S9xCloseSnapshotFile (STREAM file)
|
||||
{
|
||||
CLOSE_STREAM(file);
|
||||
}
|
||||
|
||||
bool S9xPollButton(uint32 id, bool *pressed)
|
||||
{
|
||||
NSLog(@"Poll button");
|
||||
return true;
|
||||
}
|
||||
bool S9xPollPointer(uint32 id, int16 *x, int16 *y)
|
||||
{
|
||||
NSLog(@"Poll Pointer");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool S9xPollAxis(uint32 id, int16 *value)
|
||||
{
|
||||
NSLog(@"Poll axis");
|
||||
return true;
|
||||
}
|
||||
|
||||
void S9xMessage (int type, int number, const char *message)
|
||||
{
|
||||
NSLog(@"%s", message);
|
||||
}
|
||||
|
||||
const char *S9xChooseMovieFilename(bool8 read_only)
|
||||
{
|
||||
NSLog(@"Movie filename");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void S9xExtraUsage()
|
||||
{
|
||||
NSLog(@"Extra usage");
|
||||
}
|
||||
|
||||
void S9xParseArg(char**, int&, int)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void S9xParsePortConfig(ConfigFile&, int)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _65C816_H_
|
||||
#define _65C816_H_
|
||||
|
||||
#define Carry 1
|
||||
#define Zero 2
|
||||
#define IRQ 4
|
||||
#define Decimal 8
|
||||
#define IndexFlag 16
|
||||
#define MemoryFlag 32
|
||||
#define Overflow 64
|
||||
#define Negative 128
|
||||
#define Emulation 256
|
||||
|
||||
#define SetCarry() (ICPU._Carry = 1)
|
||||
#define ClearCarry() (ICPU._Carry = 0)
|
||||
#define SetZero() (ICPU._Zero = 0)
|
||||
#define ClearZero() (ICPU._Zero = 1)
|
||||
#define SetIRQ() (Registers.PL |= IRQ)
|
||||
#define ClearIRQ() (Registers.PL &= ~IRQ)
|
||||
#define SetDecimal() (Registers.PL |= Decimal)
|
||||
#define ClearDecimal() (Registers.PL &= ~Decimal)
|
||||
#define SetIndex() (Registers.PL |= IndexFlag)
|
||||
#define ClearIndex() (Registers.PL &= ~IndexFlag)
|
||||
#define SetMemory() (Registers.PL |= MemoryFlag)
|
||||
#define ClearMemory() (Registers.PL &= ~MemoryFlag)
|
||||
#define SetOverflow() (ICPU._Overflow = 1)
|
||||
#define ClearOverflow() (ICPU._Overflow = 0)
|
||||
#define SetNegative() (ICPU._Negative = 0x80)
|
||||
#define ClearNegative() (ICPU._Negative = 0)
|
||||
|
||||
#define CheckCarry() (ICPU._Carry)
|
||||
#define CheckZero() (ICPU._Zero == 0)
|
||||
#define CheckIRQ() (Registers.PL & IRQ)
|
||||
#define CheckDecimal() (Registers.PL & Decimal)
|
||||
#define CheckIndex() (Registers.PL & IndexFlag)
|
||||
#define CheckMemory() (Registers.PL & MemoryFlag)
|
||||
#define CheckOverflow() (ICPU._Overflow)
|
||||
#define CheckNegative() (ICPU._Negative & 0x80)
|
||||
#define CheckEmulation() (Registers.P.W & Emulation)
|
||||
|
||||
#define SetFlags(f) (Registers.P.W |= (f))
|
||||
#define ClearFlags(f) (Registers.P.W &= ~(f))
|
||||
#define CheckFlag(f) (Registers.PL & (f))
|
||||
|
||||
typedef union
|
||||
{
|
||||
#ifdef LSB_FIRST
|
||||
struct { uint8 l, h; } B;
|
||||
#else
|
||||
struct { uint8 h, l; } B;
|
||||
#endif
|
||||
uint16 W;
|
||||
} pair;
|
||||
|
||||
typedef union
|
||||
{
|
||||
#ifdef LSB_FIRST
|
||||
struct { uint8 xPCl, xPCh, xPB, z; } B;
|
||||
struct { uint16 xPC, d; } W;
|
||||
#else
|
||||
struct { uint8 z, xPB, xPCh, xPCl; } B;
|
||||
struct { uint16 d, xPC; } W;
|
||||
#endif
|
||||
uint32 xPBPC;
|
||||
} PC_t;
|
||||
|
||||
struct SRegisters
|
||||
{
|
||||
uint8 DB;
|
||||
pair P;
|
||||
pair A;
|
||||
pair D;
|
||||
pair S;
|
||||
pair X;
|
||||
pair Y;
|
||||
PC_t PC;
|
||||
};
|
||||
|
||||
#define AL A.B.l
|
||||
#define AH A.B.h
|
||||
#define XL X.B.l
|
||||
#define XH X.B.h
|
||||
#define YL Y.B.l
|
||||
#define YH Y.B.h
|
||||
#define SL S.B.l
|
||||
#define SH S.B.h
|
||||
#define DL D.B.l
|
||||
#define DH D.B.h
|
||||
#define PL P.B.l
|
||||
#define PH P.B.h
|
||||
#define PBPC PC.xPBPC
|
||||
#define PCw PC.W.xPC
|
||||
#define PCh PC.B.xPCh
|
||||
#define PCl PC.B.xPCl
|
||||
#define PB PC.B.xPB
|
||||
|
||||
extern struct SRegisters Registers;
|
||||
|
||||
#endif
|
||||
@@ -1,564 +0,0 @@
|
||||
// Core SPC emulation: CPU, timers, SMP registers, memory
|
||||
|
||||
// snes_spc 0.9.0. http://www.slack.net/~ant/
|
||||
|
||||
#include "SNES_SPC.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Copyright (C) 2004-2007 Shay Green. This module is free software; you
|
||||
can redistribute it and/or modify it under the terms of the GNU Lesser
|
||||
General Public License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version. This
|
||||
module is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
details. You should have received a copy of the GNU Lesser General Public
|
||||
License along with this module; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include "blargg_source.h"
|
||||
|
||||
#define RAM (m.ram.ram)
|
||||
#define REGS (m.smp_regs [0])
|
||||
#define REGS_IN (m.smp_regs [1])
|
||||
|
||||
// (n ? n : 256)
|
||||
#define IF_0_THEN_256( n ) ((uint8_t) ((n) - 1) + 1)
|
||||
|
||||
// Note: SPC_MORE_ACCURACY exists mainly so I can run my validation tests, which
|
||||
// do crazy echo buffer accesses.
|
||||
#ifndef SPC_MORE_ACCURACY
|
||||
#define SPC_MORE_ACCURACY 0
|
||||
#endif
|
||||
|
||||
#ifdef BLARGG_ENABLE_OPTIMIZER
|
||||
#include BLARGG_ENABLE_OPTIMIZER
|
||||
#endif
|
||||
|
||||
|
||||
//// Timers
|
||||
|
||||
#if SPC_DISABLE_TEMPO
|
||||
#define TIMER_DIV( t, n ) ((n) >> t->prescaler)
|
||||
#define TIMER_MUL( t, n ) ((n) << t->prescaler)
|
||||
#else
|
||||
#define TIMER_DIV( t, n ) ((n) / t->prescaler)
|
||||
#define TIMER_MUL( t, n ) ((n) * t->prescaler)
|
||||
#endif
|
||||
|
||||
SNES_SPC::Timer* SNES_SPC::run_timer_( Timer* t, rel_time_t time )
|
||||
{
|
||||
int elapsed = TIMER_DIV( t, time - t->next_time ) + 1;
|
||||
t->next_time += TIMER_MUL( t, elapsed );
|
||||
|
||||
if ( t->enabled )
|
||||
{
|
||||
int remain = IF_0_THEN_256( t->period - t->divider );
|
||||
int divider = t->divider + elapsed;
|
||||
int over = elapsed - remain;
|
||||
if ( over >= 0 )
|
||||
{
|
||||
int n = over / t->period;
|
||||
t->counter = (t->counter + 1 + n) & 0x0F;
|
||||
divider = over - n * t->period;
|
||||
}
|
||||
t->divider = (uint8_t) divider;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
inline SNES_SPC::Timer* SNES_SPC::run_timer( Timer* t, rel_time_t time )
|
||||
{
|
||||
if ( time >= t->next_time )
|
||||
t = run_timer_( t, time );
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
//// ROM
|
||||
|
||||
void SNES_SPC::enable_rom( int enable )
|
||||
{
|
||||
if ( m.rom_enabled != enable )
|
||||
{
|
||||
m.rom_enabled = dsp.rom_enabled = enable;
|
||||
if ( enable )
|
||||
memcpy( m.hi_ram, &RAM [rom_addr], sizeof m.hi_ram );
|
||||
memcpy( &RAM [rom_addr], (enable ? m.rom : m.hi_ram), rom_size );
|
||||
// TODO: ROM can still get overwritten when DSP writes to echo buffer
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// DSP
|
||||
|
||||
#if SPC_LESS_ACCURATE
|
||||
int const max_reg_time = 29;
|
||||
|
||||
signed char const SNES_SPC::reg_times_ [256] =
|
||||
{
|
||||
-1, 0,-11,-10,-15,-11, -2, -2, 4, 3, 14, 14, 26, 26, 14, 22,
|
||||
2, 3, 0, 1,-12, 0, 1, 1, 7, 6, 14, 14, 27, 14, 14, 23,
|
||||
5, 6, 3, 4, -1, 3, 4, 4, 10, 9, 14, 14, 26, -5, 14, 23,
|
||||
8, 9, 6, 7, 2, 6, 7, 7, 13, 12, 14, 14, 27, -4, 14, 24,
|
||||
11, 12, 9, 10, 5, 9, 10, 10, 16, 15, 14, 14, -2, -4, 14, 24,
|
||||
14, 15, 12, 13, 8, 12, 13, 13, 19, 18, 14, 14, -2,-36, 14, 24,
|
||||
17, 18, 15, 16, 11, 15, 16, 16, 22, 21, 14, 14, 28, -3, 14, 25,
|
||||
20, 21, 18, 19, 14, 18, 19, 19, 25, 24, 14, 14, 14, 29, 14, 25,
|
||||
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
||||
};
|
||||
|
||||
#define RUN_DSP( time, offset ) \
|
||||
int count = (time) - (offset) - m.dsp_time;\
|
||||
if ( count >= 0 )\
|
||||
{\
|
||||
int clock_count = (count & ~(clocks_per_sample - 1)) + clocks_per_sample;\
|
||||
m.dsp_time += clock_count;\
|
||||
dsp.run( clock_count );\
|
||||
}
|
||||
#else
|
||||
#define RUN_DSP( time, offset ) \
|
||||
{\
|
||||
int count = (time) - m.dsp_time;\
|
||||
if ( !SPC_MORE_ACCURACY || count )\
|
||||
{\
|
||||
assert( count > 0 );\
|
||||
m.dsp_time = (time);\
|
||||
dsp.run( count );\
|
||||
}\
|
||||
}
|
||||
#endif
|
||||
|
||||
int SNES_SPC::dsp_read( rel_time_t time )
|
||||
{
|
||||
RUN_DSP( time, reg_times [REGS [r_dspaddr] & 0x7F] );
|
||||
|
||||
int result = dsp.read( REGS [r_dspaddr] & 0x7F );
|
||||
|
||||
#ifdef SPC_DSP_READ_HOOK
|
||||
SPC_DSP_READ_HOOK( spc_time + time, (REGS [r_dspaddr] & 0x7F), result );
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
inline void SNES_SPC::dsp_write( int data, rel_time_t time )
|
||||
{
|
||||
RUN_DSP( time, reg_times [REGS [r_dspaddr]] )
|
||||
#if SPC_LESS_ACCURATE
|
||||
else if ( m.dsp_time == skipping_time )
|
||||
{
|
||||
int r = REGS [r_dspaddr];
|
||||
if ( r == SPC_DSP::r_kon )
|
||||
m.skipped_kon |= data & ~dsp.read( SPC_DSP::r_koff );
|
||||
|
||||
if ( r == SPC_DSP::r_koff )
|
||||
{
|
||||
m.skipped_koff |= data;
|
||||
m.skipped_kon &= ~data;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SPC_DSP_WRITE_HOOK
|
||||
SPC_DSP_WRITE_HOOK( m.spc_time + time, REGS [r_dspaddr], (uint8_t) data );
|
||||
#endif
|
||||
|
||||
if ( REGS [r_dspaddr] <= 0x7F )
|
||||
dsp.write( REGS [r_dspaddr], data );
|
||||
else if ( !SPC_MORE_ACCURACY )
|
||||
dprintf( "SPC wrote to DSP register > $7F\n" );
|
||||
}
|
||||
|
||||
|
||||
//// Memory access extras
|
||||
|
||||
#if SPC_MORE_ACCURACY
|
||||
#define MEM_ACCESS( time, addr ) \
|
||||
{\
|
||||
if ( time >= m.dsp_time )\
|
||||
{\
|
||||
RUN_DSP( time, max_reg_time );\
|
||||
}\
|
||||
}
|
||||
#elif !defined (NDEBUG)
|
||||
// Debug-only check for read/write within echo buffer, since this might result in
|
||||
// inaccurate emulation due to the DSP not being caught up to the present.
|
||||
|
||||
bool SNES_SPC::check_echo_access( int addr )
|
||||
{
|
||||
if ( !(dsp.read( SPC_DSP::r_flg ) & 0x20) )
|
||||
{
|
||||
int start = 0x100 * dsp.read( SPC_DSP::r_esa );
|
||||
int size = 0x800 * (dsp.read( SPC_DSP::r_edl ) & 0x0F);
|
||||
int end = start + (size ? size : 4);
|
||||
if ( start <= addr && addr < end )
|
||||
{
|
||||
if ( !m.echo_accessed )
|
||||
{
|
||||
m.echo_accessed = 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#define MEM_ACCESS( time, addr ) check( !check_echo_access( (uint16_t) addr ) );
|
||||
#else
|
||||
#define MEM_ACCESS( time, addr )
|
||||
#endif
|
||||
|
||||
|
||||
//// CPU write
|
||||
|
||||
#if SPC_MORE_ACCURACY
|
||||
static unsigned char const glitch_probs [3] [256] =
|
||||
{
|
||||
0xC3,0x92,0x5B,0x1C,0xD1,0x92,0x5B,0x1C,0xDB,0x9C,0x72,0x18,0xCD,0x5C,0x38,0x0B,
|
||||
0xE1,0x9C,0x74,0x17,0xCF,0x75,0x45,0x0C,0xCF,0x6E,0x4A,0x0D,0xA3,0x3A,0x1D,0x08,
|
||||
0xDB,0xA0,0x82,0x19,0xD9,0x73,0x3C,0x0E,0xCB,0x76,0x52,0x0B,0xA5,0x46,0x1D,0x09,
|
||||
0xDA,0x74,0x55,0x0F,0xA2,0x3F,0x21,0x05,0x9A,0x40,0x20,0x07,0x63,0x1E,0x10,0x01,
|
||||
0xDF,0xA9,0x85,0x1D,0xD3,0x84,0x4B,0x0E,0xCF,0x6F,0x49,0x0F,0xB3,0x48,0x1E,0x05,
|
||||
0xD8,0x77,0x52,0x12,0xB7,0x49,0x23,0x06,0xAA,0x45,0x28,0x07,0x7D,0x28,0x0F,0x07,
|
||||
0xCC,0x7B,0x4A,0x0E,0xB2,0x4F,0x24,0x07,0xAD,0x43,0x2C,0x06,0x86,0x29,0x11,0x07,
|
||||
0xAE,0x48,0x1F,0x0A,0x76,0x21,0x19,0x05,0x76,0x21,0x14,0x05,0x44,0x11,0x0B,0x01,
|
||||
0xE7,0xAD,0x96,0x23,0xDC,0x86,0x59,0x0E,0xDC,0x7C,0x5F,0x15,0xBB,0x53,0x2E,0x09,
|
||||
0xD6,0x7C,0x4A,0x16,0xBB,0x4A,0x25,0x08,0xB3,0x4F,0x28,0x0B,0x8E,0x23,0x15,0x08,
|
||||
0xCF,0x7F,0x57,0x11,0xB5,0x4A,0x23,0x0A,0xAA,0x42,0x28,0x05,0x7D,0x22,0x12,0x03,
|
||||
0xA6,0x49,0x28,0x09,0x82,0x2B,0x0D,0x04,0x7A,0x20,0x0F,0x04,0x3D,0x0F,0x09,0x03,
|
||||
0xD1,0x7C,0x4C,0x0F,0xAF,0x4E,0x21,0x09,0xA8,0x46,0x2A,0x07,0x85,0x1F,0x0E,0x07,
|
||||
0xA6,0x3F,0x26,0x07,0x7C,0x24,0x14,0x07,0x78,0x22,0x16,0x04,0x46,0x12,0x0A,0x02,
|
||||
0xA6,0x41,0x2C,0x0A,0x7E,0x28,0x11,0x05,0x73,0x1B,0x14,0x05,0x3D,0x11,0x0A,0x02,
|
||||
0x70,0x22,0x17,0x05,0x48,0x13,0x08,0x03,0x3C,0x07,0x0D,0x07,0x26,0x07,0x06,0x01,
|
||||
|
||||
0xE0,0x9F,0xDA,0x7C,0x4F,0x18,0x28,0x0D,0xE9,0x9F,0xDA,0x7C,0x4F,0x18,0x1F,0x07,
|
||||
0xE6,0x97,0xD8,0x72,0x64,0x13,0x26,0x09,0xDC,0x67,0xA9,0x38,0x21,0x07,0x15,0x06,
|
||||
0xE9,0x91,0xD2,0x6B,0x63,0x14,0x2B,0x0E,0xD6,0x61,0xB7,0x41,0x2B,0x0E,0x10,0x09,
|
||||
0xCF,0x59,0xB0,0x2F,0x35,0x08,0x0F,0x07,0xB6,0x30,0x7A,0x21,0x17,0x07,0x09,0x03,
|
||||
0xE7,0xA3,0xE5,0x6B,0x65,0x1F,0x34,0x09,0xD8,0x6B,0xBE,0x45,0x27,0x07,0x10,0x07,
|
||||
0xDA,0x54,0xB1,0x39,0x2E,0x0E,0x17,0x08,0xA9,0x3C,0x86,0x22,0x16,0x06,0x07,0x03,
|
||||
0xD4,0x51,0xBC,0x3D,0x38,0x0A,0x13,0x06,0xB2,0x37,0x79,0x1C,0x17,0x05,0x0E,0x06,
|
||||
0xA7,0x31,0x74,0x1C,0x11,0x06,0x0C,0x02,0x6D,0x1A,0x38,0x10,0x0B,0x05,0x06,0x03,
|
||||
0xEB,0x9A,0xE1,0x7A,0x6F,0x13,0x34,0x0E,0xE6,0x75,0xC5,0x45,0x3E,0x0B,0x1A,0x05,
|
||||
0xD8,0x63,0xC1,0x40,0x3C,0x1B,0x19,0x06,0xB3,0x42,0x83,0x29,0x18,0x0A,0x08,0x04,
|
||||
0xD4,0x58,0xBA,0x43,0x3F,0x0A,0x1F,0x09,0xB1,0x33,0x8A,0x1F,0x1F,0x06,0x0D,0x05,
|
||||
0xAF,0x3C,0x7A,0x1F,0x16,0x08,0x0A,0x01,0x72,0x1B,0x52,0x0D,0x0B,0x09,0x06,0x01,
|
||||
0xCF,0x63,0xB7,0x47,0x40,0x10,0x14,0x06,0xC0,0x41,0x96,0x20,0x1C,0x09,0x10,0x05,
|
||||
0xA6,0x35,0x82,0x1A,0x20,0x0C,0x0E,0x04,0x80,0x1F,0x53,0x0F,0x0B,0x02,0x06,0x01,
|
||||
0xA6,0x31,0x81,0x1B,0x1D,0x01,0x08,0x08,0x7B,0x20,0x4D,0x19,0x0E,0x05,0x07,0x03,
|
||||
0x6B,0x17,0x49,0x07,0x0E,0x03,0x0A,0x05,0x37,0x0B,0x1F,0x06,0x04,0x02,0x07,0x01,
|
||||
|
||||
0xF0,0xD6,0xED,0xAD,0xEC,0xB1,0xEB,0x79,0xAC,0x22,0x47,0x1E,0x6E,0x1B,0x32,0x0A,
|
||||
0xF0,0xD6,0xEA,0xA4,0xED,0xC4,0xDE,0x82,0x98,0x1F,0x50,0x13,0x52,0x15,0x2A,0x0A,
|
||||
0xF1,0xD1,0xEB,0xA2,0xEB,0xB7,0xD8,0x69,0xA2,0x1F,0x5B,0x18,0x55,0x18,0x2C,0x0A,
|
||||
0xED,0xB5,0xDE,0x7E,0xE6,0x85,0xD3,0x59,0x59,0x0F,0x2C,0x09,0x24,0x07,0x15,0x09,
|
||||
0xF1,0xD6,0xEA,0xA0,0xEC,0xBB,0xDA,0x77,0xA9,0x23,0x58,0x14,0x5D,0x12,0x2F,0x09,
|
||||
0xF1,0xC1,0xE3,0x86,0xE4,0x87,0xD2,0x4E,0x68,0x15,0x26,0x0B,0x27,0x09,0x15,0x02,
|
||||
0xEE,0xA6,0xE0,0x5C,0xE0,0x77,0xC3,0x41,0x67,0x1B,0x3C,0x07,0x2A,0x06,0x19,0x07,
|
||||
0xE4,0x75,0xC6,0x43,0xCC,0x50,0x95,0x23,0x35,0x09,0x14,0x04,0x15,0x05,0x0B,0x04,
|
||||
0xEE,0xD6,0xED,0xAD,0xEC,0xB1,0xEB,0x79,0xAC,0x22,0x56,0x14,0x5A,0x12,0x26,0x0A,
|
||||
0xEE,0xBB,0xE7,0x7E,0xE9,0x8D,0xCB,0x49,0x67,0x11,0x34,0x07,0x2B,0x0B,0x14,0x07,
|
||||
0xED,0xA7,0xE5,0x76,0xE3,0x7E,0xC4,0x4B,0x77,0x14,0x34,0x08,0x27,0x07,0x14,0x04,
|
||||
0xE7,0x8B,0xD2,0x4C,0xCA,0x56,0x9E,0x31,0x36,0x0C,0x11,0x07,0x14,0x04,0x0A,0x02,
|
||||
0xF0,0x9B,0xEA,0x6F,0xE5,0x81,0xC4,0x43,0x74,0x10,0x30,0x0B,0x2D,0x08,0x1B,0x06,
|
||||
0xE6,0x83,0xCA,0x48,0xD9,0x56,0xA7,0x23,0x3B,0x09,0x12,0x09,0x15,0x07,0x0A,0x03,
|
||||
0xE5,0x5F,0xCB,0x3C,0xCF,0x48,0x91,0x22,0x31,0x0A,0x17,0x08,0x15,0x04,0x0D,0x02,
|
||||
0xD1,0x43,0x91,0x20,0xA9,0x2D,0x54,0x12,0x17,0x07,0x09,0x02,0x0C,0x04,0x05,0x03,
|
||||
};
|
||||
#endif
|
||||
|
||||
// divided into multiple functions to keep rarely-used functionality separate
|
||||
// so often-used functionality can be optimized better by compiler
|
||||
|
||||
// If write isn't preceded by read, data has this added to it
|
||||
int const no_read_before_write = 0x2000;
|
||||
|
||||
void SNES_SPC::cpu_write_smp_reg_( int data, rel_time_t time, int addr )
|
||||
{
|
||||
switch ( addr )
|
||||
{
|
||||
case r_t0target:
|
||||
case r_t1target:
|
||||
case r_t2target: {
|
||||
Timer* t = &m.timers [addr - r_t0target];
|
||||
int period = IF_0_THEN_256( data );
|
||||
if ( t->period != period )
|
||||
{
|
||||
t = run_timer( t, time );
|
||||
#if SPC_MORE_ACCURACY
|
||||
// Insane behavior when target is written just after counter is
|
||||
// clocked and counter matches new period and new period isn't 1, 2, 4, or 8
|
||||
if ( t->divider == (period & 0xFF) &&
|
||||
t->next_time == time + TIMER_MUL( t, 1 ) &&
|
||||
((period - 1) | ~0x0F) & period )
|
||||
{
|
||||
//dprintf( "SPC pathological timer target write\n" );
|
||||
|
||||
// If the period is 3, 5, or 9, there's a probability this behavior won't occur,
|
||||
// based on the previous period
|
||||
int prob = 0xFF;
|
||||
int old_period = t->period & 0xFF;
|
||||
if ( period == 3 ) prob = glitch_probs [0] [old_period];
|
||||
if ( period == 5 ) prob = glitch_probs [1] [old_period];
|
||||
if ( period == 9 ) prob = glitch_probs [2] [old_period];
|
||||
|
||||
// The glitch suppresses incrementing of one of the counter bits, based on
|
||||
// the lowest set bit in the new period
|
||||
int b = 1;
|
||||
while ( !(period & b) )
|
||||
b <<= 1;
|
||||
|
||||
if ( (rand() >> 4 & 0xFF) <= prob )
|
||||
t->divider = (t->divider - b) & 0xFF;
|
||||
}
|
||||
#endif
|
||||
t->period = period;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case r_t0out:
|
||||
case r_t1out:
|
||||
case r_t2out:
|
||||
if ( !SPC_MORE_ACCURACY )
|
||||
dprintf( "SPC wrote to counter %d\n", (int) addr - r_t0out );
|
||||
|
||||
if ( data < no_read_before_write / 2 )
|
||||
run_timer( &m.timers [addr - r_t0out], time - 1 )->counter = 0;
|
||||
break;
|
||||
|
||||
// Registers that act like RAM
|
||||
case 0x8:
|
||||
case 0x9:
|
||||
REGS_IN [addr] = (uint8_t) data;
|
||||
break;
|
||||
|
||||
case r_test:
|
||||
if ( (uint8_t) data != 0x0A )
|
||||
dprintf( "SPC wrote to test register\n" );
|
||||
break;
|
||||
|
||||
case r_control:
|
||||
// port clears
|
||||
if ( data & 0x10 )
|
||||
{
|
||||
REGS_IN [r_cpuio0] = 0;
|
||||
REGS_IN [r_cpuio1] = 0;
|
||||
}
|
||||
if ( data & 0x20 )
|
||||
{
|
||||
REGS_IN [r_cpuio2] = 0;
|
||||
REGS_IN [r_cpuio3] = 0;
|
||||
}
|
||||
|
||||
// timers
|
||||
{
|
||||
for ( int i = 0; i < timer_count; i++ )
|
||||
{
|
||||
Timer* t = &m.timers [i];
|
||||
int enabled = data >> i & 1;
|
||||
if ( t->enabled != enabled )
|
||||
{
|
||||
t = run_timer( t, time );
|
||||
t->enabled = enabled;
|
||||
if ( enabled )
|
||||
{
|
||||
t->divider = 0;
|
||||
t->counter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
enable_rom( data & 0x80 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SNES_SPC::cpu_write_smp_reg( int data, rel_time_t time, int addr )
|
||||
{
|
||||
if ( addr == r_dspdata ) // 99%
|
||||
dsp_write( data, time );
|
||||
else
|
||||
cpu_write_smp_reg_( data, time, addr );
|
||||
}
|
||||
|
||||
void SNES_SPC::cpu_write_high( int data, int i, rel_time_t time )
|
||||
{
|
||||
if ( i < rom_size )
|
||||
{
|
||||
m.hi_ram [i] = (uint8_t) data;
|
||||
if ( m.rom_enabled )
|
||||
RAM [i + rom_addr] = m.rom [i]; // restore overwritten ROM
|
||||
}
|
||||
else
|
||||
{
|
||||
assert( *(&(RAM [0]) + i + rom_addr) == (uint8_t) data );
|
||||
*(&(RAM [0]) + i + rom_addr) = cpu_pad_fill; // restore overwritten padding
|
||||
cpu_write( data, i + rom_addr - 0x10000, time );
|
||||
}
|
||||
}
|
||||
|
||||
int const bits_in_int = CHAR_BIT * sizeof (int);
|
||||
|
||||
void SNES_SPC::cpu_write( int data, int addr, rel_time_t time )
|
||||
{
|
||||
MEM_ACCESS( time, addr )
|
||||
|
||||
// RAM
|
||||
RAM [addr] = (uint8_t) data;
|
||||
int reg = addr - 0xF0;
|
||||
if ( reg >= 0 ) // 64%
|
||||
{
|
||||
// $F0-$FF
|
||||
if ( reg < reg_count ) // 87%
|
||||
{
|
||||
REGS [reg] = (uint8_t) data;
|
||||
|
||||
// Ports
|
||||
#ifdef SPC_PORT_WRITE_HOOK
|
||||
if ( (unsigned) (reg - r_cpuio0) < port_count )
|
||||
SPC_PORT_WRITE_HOOK( m.spc_time + time, (reg - r_cpuio0),
|
||||
(uint8_t) data, ®S [r_cpuio0] );
|
||||
#endif
|
||||
|
||||
// Registers other than $F2 and $F4-$F7
|
||||
//if ( reg != 2 && reg != 4 && reg != 5 && reg != 6 && reg != 7 )
|
||||
// TODO: this is a bit on the fragile side
|
||||
if ( ((~0x2F00 << (bits_in_int - 16)) << reg) < 0 ) // 36%
|
||||
cpu_write_smp_reg( data, time, reg );
|
||||
}
|
||||
// High mem/address wrap-around
|
||||
else
|
||||
{
|
||||
reg -= rom_addr - 0xF0;
|
||||
if ( reg >= 0 ) // 1% in IPL ROM area or address wrapped around
|
||||
cpu_write_high( data, reg, time );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// CPU read
|
||||
|
||||
inline int SNES_SPC::cpu_read_smp_reg( int reg, rel_time_t time )
|
||||
{
|
||||
int result = REGS_IN [reg];
|
||||
reg -= r_dspaddr;
|
||||
// DSP addr and data
|
||||
if ( (unsigned) reg <= 1 ) // 4% 0xF2 and 0xF3
|
||||
{
|
||||
result = REGS [r_dspaddr];
|
||||
if ( (unsigned) reg == 1 )
|
||||
result = dsp_read( time ); // 0xF3
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int SNES_SPC::cpu_read( int addr, rel_time_t time )
|
||||
{
|
||||
MEM_ACCESS( time, addr )
|
||||
|
||||
// RAM
|
||||
int result = RAM [addr];
|
||||
int reg = addr - 0xF0;
|
||||
if ( reg >= 0 ) // 40%
|
||||
{
|
||||
reg -= 0x10;
|
||||
if ( (unsigned) reg >= 0xFF00 ) // 21%
|
||||
{
|
||||
reg += 0x10 - r_t0out;
|
||||
|
||||
// Timers
|
||||
if ( (unsigned) reg < timer_count ) // 90%
|
||||
{
|
||||
Timer* t = &m.timers [reg];
|
||||
if ( time >= t->next_time )
|
||||
t = run_timer_( t, time );
|
||||
result = t->counter;
|
||||
t->counter = 0;
|
||||
}
|
||||
// Other registers
|
||||
else if ( reg < 0 ) // 10%
|
||||
{
|
||||
result = cpu_read_smp_reg( reg + r_t0out, time );
|
||||
}
|
||||
else // 1%
|
||||
{
|
||||
assert( reg + (r_t0out + 0xF0 - 0x10000) < 0x100 );
|
||||
result = cpu_read( reg + (r_t0out + 0xF0 - 0x10000), time );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//// Run
|
||||
|
||||
// Prefix and suffix for CPU emulator function
|
||||
#define SPC_CPU_RUN_FUNC \
|
||||
BOOST::uint8_t* SNES_SPC::run_until_( time_t end_time )\
|
||||
{\
|
||||
rel_time_t rel_time = m.spc_time - end_time;\
|
||||
/*assert( rel_time <= 0 );*/\
|
||||
m.spc_time = end_time;\
|
||||
m.dsp_time += rel_time;\
|
||||
m.timers [0].next_time += rel_time;\
|
||||
m.timers [1].next_time += rel_time;\
|
||||
m.timers [2].next_time += rel_time;
|
||||
|
||||
#define SPC_CPU_RUN_FUNC_END \
|
||||
m.spc_time += rel_time;\
|
||||
m.dsp_time -= rel_time;\
|
||||
m.timers [0].next_time -= rel_time;\
|
||||
m.timers [1].next_time -= rel_time;\
|
||||
m.timers [2].next_time -= rel_time;\
|
||||
/*assert( m.spc_time >= end_time );*/\
|
||||
return ®S [r_cpuio0];\
|
||||
}
|
||||
|
||||
int const cpu_lag_max = 12 - 1; // DIV YA,X takes 12 clocks
|
||||
|
||||
void SNES_SPC::end_frame( time_t end_time )
|
||||
{
|
||||
// Catch CPU up to as close to end as possible. If final instruction
|
||||
// would exceed end, does NOT execute it and leaves m.spc_time < end.
|
||||
if ( end_time > m.spc_time )
|
||||
run_until_( end_time );
|
||||
|
||||
m.spc_time -= end_time;
|
||||
m.extra_clocks += end_time;
|
||||
|
||||
// Greatest number of clocks early that emulation can stop early due to
|
||||
// not being able to execute current instruction without going over
|
||||
// allowed time.
|
||||
assert( -cpu_lag_max <= m.spc_time && m.spc_time <= cpu_lag_max );
|
||||
|
||||
// Catch timers up to CPU
|
||||
for ( int i = 0; i < timer_count; i++ )
|
||||
run_timer( &m.timers [i], 0 );
|
||||
|
||||
// Catch DSP up to CPU
|
||||
if ( m.dsp_time < 0 )
|
||||
{
|
||||
RUN_DSP( 0, max_reg_time );
|
||||
}
|
||||
|
||||
// Save any extra samples beyond what should be generated
|
||||
if ( m.buf_begin )
|
||||
save_extra();
|
||||
}
|
||||
|
||||
// Inclusion here allows static memory access functions and better optimization
|
||||
#include "SPC_CPU.h"
|
||||
@@ -1,316 +0,0 @@
|
||||
// SNES SPC-700 APU emulator
|
||||
|
||||
// snes_spc 0.9.0
|
||||
#ifndef SNES_SPC_H
|
||||
#define SNES_SPC_H
|
||||
|
||||
#include "SPC_DSP.h"
|
||||
#include "blargg_endian.h"
|
||||
|
||||
#ifdef DEBUGGER
|
||||
#include "snes9x.h"
|
||||
#include "display.h"
|
||||
#include "debug.h"
|
||||
#endif
|
||||
|
||||
struct SNES_SPC {
|
||||
public:
|
||||
typedef BOOST::uint8_t uint8_t;
|
||||
|
||||
// Must be called once before using
|
||||
blargg_err_t init();
|
||||
|
||||
// Sample pairs generated per second
|
||||
enum { sample_rate = 32000 };
|
||||
|
||||
// Emulator use
|
||||
|
||||
// Sets IPL ROM data. Library does not include ROM data. Most SPC music files
|
||||
// don't need ROM, but a full emulator must provide this.
|
||||
enum { rom_size = 0x40 };
|
||||
void init_rom( uint8_t const rom [rom_size] );
|
||||
|
||||
// Sets destination for output samples
|
||||
typedef short sample_t;
|
||||
void set_output( sample_t* out, int out_size );
|
||||
|
||||
// Number of samples written to output since last set
|
||||
int sample_count() const;
|
||||
|
||||
// Resets SPC to power-on state. This resets your output buffer, so you must
|
||||
// call set_output() after this.
|
||||
void reset();
|
||||
|
||||
// Emulates pressing reset switch on SNES. This resets your output buffer, so
|
||||
// you must call set_output() after this.
|
||||
void soft_reset();
|
||||
|
||||
// 1024000 SPC clocks per second, sample pair every 32 clocks
|
||||
typedef int time_t;
|
||||
enum { clock_rate = 1024000 };
|
||||
enum { clocks_per_sample = 32 };
|
||||
|
||||
// Emulated port read/write at specified time
|
||||
enum { port_count = 4 };
|
||||
int read_port ( time_t, int port );
|
||||
void write_port( time_t, int port, int data );
|
||||
|
||||
// Runs SPC to end_time and starts a new time frame at 0
|
||||
void end_frame( time_t end_time );
|
||||
|
||||
// Sound control
|
||||
|
||||
// Mutes voices corresponding to non-zero bits in mask (issues repeated KOFF events).
|
||||
// Reduces emulation accuracy.
|
||||
enum { voice_count = 8 };
|
||||
void mute_voices( int mask );
|
||||
|
||||
// If true, prevents channels and global volumes from being phase-negated.
|
||||
// Only supported by fast DSP.
|
||||
void disable_surround( bool disable = true );
|
||||
|
||||
// Sets tempo, where tempo_unit = normal, tempo_unit / 2 = half speed, etc.
|
||||
enum { tempo_unit = 0x100 };
|
||||
void set_tempo( int );
|
||||
|
||||
// SPC music files
|
||||
|
||||
// Loads SPC data into emulator
|
||||
enum { spc_min_file_size = 0x10180 };
|
||||
enum { spc_file_size = 0x10200 };
|
||||
blargg_err_t load_spc( void const* in, long size );
|
||||
|
||||
// Clears echo region. Useful after loading an SPC as many have garbage in echo.
|
||||
void clear_echo();
|
||||
|
||||
// Plays for count samples and write samples to out. Discards samples if out
|
||||
// is NULL. Count must be a multiple of 2 since output is stereo.
|
||||
blargg_err_t play( int count, sample_t* out );
|
||||
|
||||
// Skips count samples. Several times faster than play() when using fast DSP.
|
||||
blargg_err_t skip( int count );
|
||||
|
||||
// State save/load (only available with accurate DSP)
|
||||
|
||||
#if !SPC_NO_COPY_STATE_FUNCS
|
||||
// Saves/loads state
|
||||
enum { state_size = 68 * 1024L }; // maximum space needed when saving
|
||||
typedef SPC_DSP::copy_func_t copy_func_t;
|
||||
void copy_state( unsigned char** io, copy_func_t );
|
||||
|
||||
// Writes minimal header to spc_out
|
||||
static void init_header( void* spc_out );
|
||||
|
||||
// Saves emulator state as SPC file data. Writes spc_file_size bytes to spc_out.
|
||||
// Does not set up SPC header; use init_header() for that.
|
||||
void save_spc( void* spc_out );
|
||||
|
||||
// Returns true if new key-on events occurred since last check. Useful for
|
||||
// trimming silence while saving an SPC.
|
||||
bool check_kon();
|
||||
#endif
|
||||
|
||||
//// Snes9x Accessor
|
||||
|
||||
void spc_allow_time_overflow( bool );
|
||||
|
||||
void dsp_set_spc_snapshot_callback( void (*callback) (void) );
|
||||
void dsp_dump_spc_snapshot( void );
|
||||
void dsp_set_stereo_switch( int );
|
||||
uint8_t dsp_reg_value( int, int );
|
||||
int dsp_envx_value( int );
|
||||
|
||||
//// Snes9x Debugger
|
||||
|
||||
#ifdef DEBUGGER
|
||||
void debug_toggle_trace( void );
|
||||
bool debug_is_enabled( void );
|
||||
void debug_do_trace( int, int, int, uint8_t const *, uint8_t *, int, int, int, int );
|
||||
void debug_op_print( char *, int, int, int, uint8_t const *, uint8_t *, int, int, int, int );
|
||||
void debug_io_print( char * );
|
||||
#endif
|
||||
|
||||
public:
|
||||
BLARGG_DISABLE_NOTHROW
|
||||
|
||||
typedef BOOST::uint16_t uint16_t;
|
||||
|
||||
// Time relative to m_spc_time. Speeds up code a bit by eliminating need to
|
||||
// constantly add m_spc_time to time from CPU. CPU uses time that ends at
|
||||
// 0 to eliminate reloading end time every instruction. It pays off.
|
||||
typedef int rel_time_t;
|
||||
|
||||
struct Timer
|
||||
{
|
||||
rel_time_t next_time; // time of next event
|
||||
int prescaler;
|
||||
int period;
|
||||
int divider;
|
||||
int enabled;
|
||||
int counter;
|
||||
};
|
||||
enum { reg_count = 0x10 };
|
||||
enum { timer_count = 3 };
|
||||
enum { extra_size = SPC_DSP::extra_size };
|
||||
|
||||
enum { signature_size = 35 };
|
||||
|
||||
private:
|
||||
SPC_DSP dsp;
|
||||
|
||||
#if SPC_LESS_ACCURATE
|
||||
static signed char const reg_times_ [256];
|
||||
signed char reg_times [256];
|
||||
#endif
|
||||
|
||||
struct state_t
|
||||
{
|
||||
Timer timers [timer_count];
|
||||
|
||||
uint8_t smp_regs [2] [reg_count];
|
||||
|
||||
struct
|
||||
{
|
||||
int pc;
|
||||
int a;
|
||||
int x;
|
||||
int y;
|
||||
int psw;
|
||||
int sp;
|
||||
} cpu_regs;
|
||||
|
||||
rel_time_t dsp_time;
|
||||
time_t spc_time;
|
||||
bool echo_accessed;
|
||||
|
||||
int tempo;
|
||||
int skipped_kon;
|
||||
int skipped_koff;
|
||||
const char* cpu_error;
|
||||
|
||||
int extra_clocks;
|
||||
sample_t* buf_begin;
|
||||
sample_t const* buf_end;
|
||||
sample_t* extra_pos;
|
||||
sample_t extra_buf [extra_size];
|
||||
|
||||
int rom_enabled;
|
||||
uint8_t rom [rom_size];
|
||||
uint8_t hi_ram [rom_size];
|
||||
|
||||
unsigned char cycle_table [256];
|
||||
|
||||
struct
|
||||
{
|
||||
// padding to neutralize address overflow
|
||||
union {
|
||||
uint8_t padding1 [0x100];
|
||||
uint16_t align; // makes compiler align data for 16-bit access
|
||||
} padding1 [1];
|
||||
uint8_t ram [0x10000];
|
||||
uint8_t padding2 [0x100];
|
||||
} ram;
|
||||
};
|
||||
state_t m;
|
||||
|
||||
enum { rom_addr = 0xFFC0 };
|
||||
|
||||
enum { skipping_time = 127 };
|
||||
|
||||
// Value that padding should be filled with
|
||||
enum { cpu_pad_fill = 0xFF };
|
||||
|
||||
enum {
|
||||
r_test = 0x0, r_control = 0x1,
|
||||
r_dspaddr = 0x2, r_dspdata = 0x3,
|
||||
r_cpuio0 = 0x4, r_cpuio1 = 0x5,
|
||||
r_cpuio2 = 0x6, r_cpuio3 = 0x7,
|
||||
r_f8 = 0x8, r_f9 = 0x9,
|
||||
r_t0target = 0xA, r_t1target = 0xB, r_t2target = 0xC,
|
||||
r_t0out = 0xD, r_t1out = 0xE, r_t2out = 0xF
|
||||
};
|
||||
|
||||
void timers_loaded();
|
||||
void enable_rom( int enable );
|
||||
void reset_buf();
|
||||
void save_extra();
|
||||
void load_regs( uint8_t const in [reg_count] );
|
||||
void ram_loaded();
|
||||
void regs_loaded();
|
||||
void reset_time_regs();
|
||||
void reset_common( int timer_counter_init );
|
||||
|
||||
Timer* run_timer_ ( Timer* t, rel_time_t );
|
||||
Timer* run_timer ( Timer* t, rel_time_t );
|
||||
int dsp_read ( rel_time_t );
|
||||
void dsp_write ( int data, rel_time_t );
|
||||
void cpu_write_smp_reg_( int data, rel_time_t, int addr );
|
||||
void cpu_write_smp_reg ( int data, rel_time_t, int addr );
|
||||
void cpu_write_high ( int data, int i, rel_time_t );
|
||||
void cpu_write ( int data, int addr, rel_time_t );
|
||||
int cpu_read_smp_reg ( int i, rel_time_t );
|
||||
int cpu_read ( int addr, rel_time_t );
|
||||
unsigned CPU_mem_bit ( uint8_t const* pc, rel_time_t );
|
||||
|
||||
bool check_echo_access ( int addr );
|
||||
uint8_t* run_until_( time_t end_time );
|
||||
|
||||
struct spc_file_t
|
||||
{
|
||||
char signature [signature_size];
|
||||
uint8_t has_id666;
|
||||
uint8_t version;
|
||||
uint8_t pcl, pch;
|
||||
uint8_t a;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
uint8_t psw;
|
||||
uint8_t sp;
|
||||
char text [212];
|
||||
uint8_t ram [0x10000];
|
||||
uint8_t dsp [128];
|
||||
uint8_t unused [0x40];
|
||||
uint8_t ipl_rom [0x40];
|
||||
};
|
||||
|
||||
static char const signature [signature_size + 1];
|
||||
|
||||
void save_regs( uint8_t out [reg_count] );
|
||||
|
||||
// Snes9x timing hack
|
||||
bool allow_time_overflow;
|
||||
// Snes9x debugger
|
||||
#ifdef DEBUGGER
|
||||
FILE *apu_trace;
|
||||
bool debug_trace;
|
||||
#endif
|
||||
};
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
inline int SNES_SPC::sample_count() const { return (m.extra_clocks >> 5) * 2; }
|
||||
|
||||
inline int SNES_SPC::read_port( time_t t, int port )
|
||||
{
|
||||
assert( (unsigned) port < port_count );
|
||||
return run_until_( t ) [port];
|
||||
}
|
||||
|
||||
inline void SNES_SPC::write_port( time_t t, int port, int data )
|
||||
{
|
||||
assert( (unsigned) port < port_count );
|
||||
run_until_( t ) [0x10 + port] = data;
|
||||
m.ram.ram [0xF4 + port] = data;
|
||||
}
|
||||
|
||||
inline void SNES_SPC::mute_voices( int mask ) { dsp.mute_voices( mask ); }
|
||||
|
||||
inline void SNES_SPC::disable_surround( bool disable ) { dsp.disable_surround( disable ); }
|
||||
|
||||
#if !SPC_NO_COPY_STATE_FUNCS
|
||||
inline bool SNES_SPC::check_kon() { return dsp.check_kon(); }
|
||||
#endif
|
||||
|
||||
inline void SNES_SPC::spc_allow_time_overflow( bool allow ) { allow_time_overflow = allow; }
|
||||
|
||||
#endif
|
||||
@@ -1,855 +0,0 @@
|
||||
// SPC emulation support: init, sample buffering, reset, SPC loading
|
||||
|
||||
// snes_spc 0.9.0. http://www.slack.net/~ant/
|
||||
|
||||
#include "SNES_SPC.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Copyright (C) 2004-2007 Shay Green. This module is free software; you
|
||||
can redistribute it and/or modify it under the terms of the GNU Lesser
|
||||
General Public License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version. This
|
||||
module is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
details. You should have received a copy of the GNU Lesser General Public
|
||||
License along with this module; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include "blargg_source.h"
|
||||
|
||||
#define RAM (m.ram.ram)
|
||||
#define REGS (m.smp_regs [0])
|
||||
#define REGS_IN (m.smp_regs [1])
|
||||
|
||||
// (n ? n : 256)
|
||||
#define IF_0_THEN_256( n ) ((uint8_t) ((n) - 1) + 1)
|
||||
|
||||
|
||||
//// Init
|
||||
|
||||
blargg_err_t SNES_SPC::init()
|
||||
{
|
||||
memset( &m, 0, sizeof m );
|
||||
dsp.init( RAM );
|
||||
|
||||
m.tempo = tempo_unit;
|
||||
|
||||
// Most SPC music doesn't need ROM, and almost all the rest only rely
|
||||
// on these two bytes
|
||||
m.rom [0x3E] = 0xFF;
|
||||
m.rom [0x3F] = 0xC0;
|
||||
|
||||
static unsigned char const cycle_table [128] =
|
||||
{// 01 23 45 67 89 AB CD EF
|
||||
0x28,0x47,0x34,0x36,0x26,0x54,0x54,0x68, // 0
|
||||
0x48,0x47,0x45,0x56,0x55,0x65,0x22,0x46, // 1
|
||||
0x28,0x47,0x34,0x36,0x26,0x54,0x54,0x74, // 2
|
||||
0x48,0x47,0x45,0x56,0x55,0x65,0x22,0x38, // 3
|
||||
0x28,0x47,0x34,0x36,0x26,0x44,0x54,0x66, // 4
|
||||
0x48,0x47,0x45,0x56,0x55,0x45,0x22,0x43, // 5
|
||||
0x28,0x47,0x34,0x36,0x26,0x44,0x54,0x75, // 6
|
||||
0x48,0x47,0x45,0x56,0x55,0x55,0x22,0x36, // 7
|
||||
0x28,0x47,0x34,0x36,0x26,0x54,0x52,0x45, // 8
|
||||
0x48,0x47,0x45,0x56,0x55,0x55,0x22,0xC5, // 9
|
||||
0x38,0x47,0x34,0x36,0x26,0x44,0x52,0x44, // A
|
||||
0x48,0x47,0x45,0x56,0x55,0x55,0x22,0x34, // B
|
||||
0x38,0x47,0x45,0x47,0x25,0x64,0x52,0x49, // C
|
||||
0x48,0x47,0x56,0x67,0x45,0x55,0x22,0x83, // D
|
||||
0x28,0x47,0x34,0x36,0x24,0x53,0x43,0x40, // E
|
||||
0x48,0x47,0x45,0x56,0x34,0x54,0x22,0x60, // F
|
||||
};
|
||||
|
||||
// unpack cycle table
|
||||
for ( int i = 0; i < 128; i++ )
|
||||
{
|
||||
int n = cycle_table [i];
|
||||
m.cycle_table [i * 2 + 0] = n >> 4;
|
||||
m.cycle_table [i * 2 + 1] = n & 0x0F;
|
||||
}
|
||||
|
||||
allow_time_overflow = false;
|
||||
|
||||
dsp.rom = m.rom;
|
||||
dsp.hi_ram = m.hi_ram;
|
||||
|
||||
#ifdef DEBUGGER
|
||||
apu_trace = NULL;
|
||||
debug_trace = false;
|
||||
#endif
|
||||
|
||||
#if SPC_LESS_ACCURATE
|
||||
memcpy( reg_times, reg_times_, sizeof reg_times );
|
||||
#endif
|
||||
|
||||
reset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SNES_SPC::init_rom( uint8_t const in [rom_size] )
|
||||
{
|
||||
memcpy( m.rom, in, sizeof m.rom );
|
||||
}
|
||||
|
||||
void SNES_SPC::set_tempo( int t )
|
||||
{
|
||||
m.tempo = t;
|
||||
int const timer2_shift = 4; // 64 kHz
|
||||
int const other_shift = 3; // 8 kHz
|
||||
|
||||
#if SPC_DISABLE_TEMPO
|
||||
m.timers [2].prescaler = timer2_shift;
|
||||
m.timers [1].prescaler = timer2_shift + other_shift;
|
||||
m.timers [0].prescaler = timer2_shift + other_shift;
|
||||
#else
|
||||
if ( !t )
|
||||
t = 1;
|
||||
int const timer2_rate = 1 << timer2_shift;
|
||||
int rate = (timer2_rate * tempo_unit + (t >> 1)) / t;
|
||||
if ( rate < timer2_rate / 4 )
|
||||
rate = timer2_rate / 4; // max 4x tempo
|
||||
m.timers [2].prescaler = rate;
|
||||
m.timers [1].prescaler = rate << other_shift;
|
||||
m.timers [0].prescaler = rate << other_shift;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Timer registers have been loaded. Applies these to the timers. Does not
|
||||
// reset timer prescalers or dividers.
|
||||
void SNES_SPC::timers_loaded()
|
||||
{
|
||||
int i;
|
||||
for ( i = 0; i < timer_count; i++ )
|
||||
{
|
||||
Timer* t = &m.timers [i];
|
||||
t->period = IF_0_THEN_256( REGS [r_t0target + i] );
|
||||
t->enabled = REGS [r_control] >> i & 1;
|
||||
t->counter = REGS_IN [r_t0out + i] & 0x0F;
|
||||
}
|
||||
|
||||
set_tempo( m.tempo );
|
||||
}
|
||||
|
||||
// Loads registers from unified 16-byte format
|
||||
void SNES_SPC::load_regs( uint8_t const in [reg_count] )
|
||||
{
|
||||
memcpy( REGS, in, reg_count );
|
||||
memcpy( REGS_IN, REGS, reg_count );
|
||||
|
||||
// These always read back as 0
|
||||
REGS_IN [r_test ] = 0;
|
||||
REGS_IN [r_control ] = 0;
|
||||
REGS_IN [r_t0target] = 0;
|
||||
REGS_IN [r_t1target] = 0;
|
||||
REGS_IN [r_t2target] = 0;
|
||||
}
|
||||
|
||||
// RAM was just loaded from SPC, with $F0-$FF containing SMP registers
|
||||
// and timer counts. Copies these to proper registers.
|
||||
void SNES_SPC::ram_loaded()
|
||||
{
|
||||
m.rom_enabled = dsp.rom_enabled = 0;
|
||||
load_regs( &RAM [0xF0] );
|
||||
|
||||
// Put STOP instruction around memory to catch PC underflow/overflow
|
||||
memset( m.ram.padding1, cpu_pad_fill, sizeof m.ram.padding1 );
|
||||
memset( m.ram.padding2, cpu_pad_fill, sizeof m.ram.padding2 );
|
||||
}
|
||||
|
||||
// Registers were just loaded. Applies these new values.
|
||||
void SNES_SPC::regs_loaded()
|
||||
{
|
||||
enable_rom( REGS [r_control] & 0x80 );
|
||||
timers_loaded();
|
||||
}
|
||||
|
||||
void SNES_SPC::reset_time_regs()
|
||||
{
|
||||
m.cpu_error = 0;
|
||||
m.echo_accessed = 0;
|
||||
m.spc_time = 0;
|
||||
m.dsp_time = 0;
|
||||
#if SPC_LESS_ACCURATE
|
||||
m.dsp_time = clocks_per_sample + 1;
|
||||
#endif
|
||||
|
||||
for ( int i = 0; i < timer_count; i++ )
|
||||
{
|
||||
Timer* t = &m.timers [i];
|
||||
t->next_time = 1;
|
||||
t->divider = 0;
|
||||
}
|
||||
|
||||
regs_loaded();
|
||||
|
||||
m.extra_clocks = 0;
|
||||
reset_buf();
|
||||
}
|
||||
|
||||
void SNES_SPC::reset_common( int timer_counter_init )
|
||||
{
|
||||
int i;
|
||||
for ( i = 0; i < timer_count; i++ )
|
||||
REGS_IN [r_t0out + i] = timer_counter_init;
|
||||
|
||||
// Run IPL ROM
|
||||
memset( &m.cpu_regs, 0, sizeof m.cpu_regs );
|
||||
m.cpu_regs.pc = rom_addr;
|
||||
|
||||
REGS [r_test ] = 0x0A;
|
||||
REGS [r_control] = 0xB0; // ROM enabled, clear ports
|
||||
for ( i = 0; i < port_count; i++ )
|
||||
REGS_IN [r_cpuio0 + i] = 0;
|
||||
|
||||
reset_time_regs();
|
||||
}
|
||||
|
||||
void SNES_SPC::soft_reset()
|
||||
{
|
||||
reset_common( 0 );
|
||||
dsp.soft_reset();
|
||||
}
|
||||
|
||||
void SNES_SPC::reset()
|
||||
{
|
||||
m.cpu_regs.pc = 0xFFC0;
|
||||
m.cpu_regs.a = 0x00;
|
||||
m.cpu_regs.x = 0x00;
|
||||
m.cpu_regs.y = 0x00;
|
||||
m.cpu_regs.psw = 0x02;
|
||||
m.cpu_regs.sp = 0xEF;
|
||||
memset( RAM, 0x00, 0x10000 );
|
||||
ram_loaded();
|
||||
reset_common( 0x0F );
|
||||
dsp.reset();
|
||||
}
|
||||
|
||||
char const SNES_SPC::signature [signature_size + 1] =
|
||||
"SNES-SPC700 Sound File Data v0.30\x1A\x1A";
|
||||
|
||||
blargg_err_t SNES_SPC::load_spc( void const* data, long size )
|
||||
{
|
||||
spc_file_t const* const spc = (spc_file_t const*) data;
|
||||
|
||||
// be sure compiler didn't insert any padding into fle_t
|
||||
assert( sizeof (spc_file_t) == spc_min_file_size + 0x80 );
|
||||
|
||||
// Check signature and file size
|
||||
if ( size < signature_size || memcmp( spc, signature, 27 ) )
|
||||
return "Not an SPC file";
|
||||
|
||||
if ( size < spc_min_file_size )
|
||||
return "Corrupt SPC file";
|
||||
|
||||
// CPU registers
|
||||
m.cpu_regs.pc = spc->pch * 0x100 + spc->pcl;
|
||||
m.cpu_regs.a = spc->a;
|
||||
m.cpu_regs.x = spc->x;
|
||||
m.cpu_regs.y = spc->y;
|
||||
m.cpu_regs.psw = spc->psw;
|
||||
m.cpu_regs.sp = spc->sp;
|
||||
|
||||
// RAM and registers
|
||||
memcpy( RAM, spc->ram, 0x10000 );
|
||||
ram_loaded();
|
||||
|
||||
// DSP registers
|
||||
dsp.load( spc->dsp );
|
||||
|
||||
reset_time_regs();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SNES_SPC::clear_echo()
|
||||
{
|
||||
if ( !(dsp.read( SPC_DSP::r_flg ) & 0x20) )
|
||||
{
|
||||
int addr = 0x100 * dsp.read( SPC_DSP::r_esa );
|
||||
int end = addr + 0x800 * (dsp.read( SPC_DSP::r_edl ) & 0x0F);
|
||||
if ( end > 0x10000 )
|
||||
end = 0x10000;
|
||||
memset( &RAM [addr], 0xFF, end - addr );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// Sample output
|
||||
|
||||
void SNES_SPC::reset_buf()
|
||||
{
|
||||
// Start with half extra buffer of silence
|
||||
sample_t* out = m.extra_buf;
|
||||
while ( out < &m.extra_buf [extra_size / 2] )
|
||||
*out++ = 0;
|
||||
|
||||
m.extra_pos = out;
|
||||
m.buf_begin = 0;
|
||||
|
||||
dsp.set_output( 0, 0 );
|
||||
}
|
||||
|
||||
void SNES_SPC::set_output( sample_t* out, int size )
|
||||
{
|
||||
require( (size & 1) == 0 ); // size must be even
|
||||
|
||||
m.extra_clocks &= clocks_per_sample - 1;
|
||||
if ( out )
|
||||
{
|
||||
sample_t const* out_end = out + size;
|
||||
m.buf_begin = out;
|
||||
m.buf_end = out_end;
|
||||
|
||||
// Copy extra to output
|
||||
sample_t const* in = m.extra_buf;
|
||||
while ( in < m.extra_pos && out < out_end )
|
||||
*out++ = *in++;
|
||||
|
||||
// Handle output being full already
|
||||
if ( out >= out_end )
|
||||
{
|
||||
// Have DSP write to remaining extra space
|
||||
out = dsp.extra();
|
||||
out_end = &dsp.extra() [extra_size];
|
||||
|
||||
// Copy any remaining extra samples as if DSP wrote them
|
||||
while ( in < m.extra_pos )
|
||||
*out++ = *in++;
|
||||
assert( out <= out_end );
|
||||
}
|
||||
|
||||
dsp.set_output( out, out_end - out );
|
||||
}
|
||||
else
|
||||
{
|
||||
reset_buf();
|
||||
}
|
||||
}
|
||||
|
||||
void SNES_SPC::save_extra()
|
||||
{
|
||||
// Get end pointers
|
||||
sample_t const* main_end = m.buf_end; // end of data written to buf
|
||||
sample_t const* dsp_end = dsp.out_pos(); // end of data written to dsp.extra()
|
||||
if ( m.buf_begin <= dsp_end && dsp_end <= main_end )
|
||||
{
|
||||
main_end = dsp_end;
|
||||
dsp_end = dsp.extra(); // nothing in DSP's extra
|
||||
}
|
||||
|
||||
// Copy any extra samples at these ends into extra_buf
|
||||
sample_t* out = m.extra_buf;
|
||||
sample_t const* in;
|
||||
for ( in = m.buf_begin + sample_count(); in < main_end; in++ )
|
||||
*out++ = *in;
|
||||
for ( in = dsp.extra(); in < dsp_end ; in++ )
|
||||
*out++ = *in;
|
||||
|
||||
m.extra_pos = out;
|
||||
assert( out <= &m.extra_buf [extra_size] );
|
||||
}
|
||||
|
||||
blargg_err_t SNES_SPC::play( int count, sample_t* out )
|
||||
{
|
||||
require( (count & 1) == 0 ); // must be even
|
||||
if ( count )
|
||||
{
|
||||
set_output( out, count );
|
||||
end_frame( count * (clocks_per_sample / 2) );
|
||||
}
|
||||
|
||||
const char* err = m.cpu_error;
|
||||
m.cpu_error = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
blargg_err_t SNES_SPC::skip( int count )
|
||||
{
|
||||
#if SPC_LESS_ACCURATE
|
||||
if ( count > 2 * sample_rate * 2 )
|
||||
{
|
||||
set_output( 0, 0 );
|
||||
|
||||
// Skip a multiple of 4 samples
|
||||
time_t end = count;
|
||||
count = (count & 3) + 1 * sample_rate * 2;
|
||||
end = (end - count) * (clocks_per_sample / 2);
|
||||
|
||||
m.skipped_kon = 0;
|
||||
m.skipped_koff = 0;
|
||||
|
||||
// Preserve DSP and timer synchronization
|
||||
// TODO: verify that this really preserves it
|
||||
int old_dsp_time = m.dsp_time + m.spc_time;
|
||||
m.dsp_time = end - m.spc_time + skipping_time;
|
||||
end_frame( end );
|
||||
m.dsp_time = m.dsp_time - skipping_time + old_dsp_time;
|
||||
|
||||
dsp.write( SPC_DSP::r_koff, m.skipped_koff & ~m.skipped_kon );
|
||||
dsp.write( SPC_DSP::r_kon , m.skipped_kon );
|
||||
clear_echo();
|
||||
}
|
||||
#endif
|
||||
|
||||
return play( count, 0 );
|
||||
}
|
||||
|
||||
//// Snes9x Accessor
|
||||
|
||||
void SNES_SPC::dsp_set_spc_snapshot_callback( void (*callback) (void) )
|
||||
{
|
||||
dsp.set_spc_snapshot_callback( callback );
|
||||
}
|
||||
|
||||
void SNES_SPC::dsp_dump_spc_snapshot( void )
|
||||
{
|
||||
dsp.dump_spc_snapshot();
|
||||
}
|
||||
|
||||
void SNES_SPC::dsp_set_stereo_switch( int value )
|
||||
{
|
||||
dsp.set_stereo_switch( value );
|
||||
}
|
||||
|
||||
SNES_SPC::uint8_t SNES_SPC::dsp_reg_value( int ch, int addr )
|
||||
{
|
||||
return dsp.reg_value( ch, addr );
|
||||
}
|
||||
|
||||
int SNES_SPC::dsp_envx_value( int ch )
|
||||
{
|
||||
return dsp.envx_value( ch );
|
||||
}
|
||||
|
||||
//// Snes9x debugger
|
||||
|
||||
#ifdef DEBUGGER
|
||||
|
||||
void SNES_SPC::debug_toggle_trace( void )
|
||||
{
|
||||
debug_trace = !debug_trace;
|
||||
|
||||
if (debug_trace)
|
||||
{
|
||||
printf("APU tracing enabled.\n");
|
||||
ENSURE_TRACE_OPEN(apu_trace, "apu_trace.log", "wb")
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("APU tracing disabled.\n");
|
||||
fclose(apu_trace);
|
||||
apu_trace = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool SNES_SPC::debug_is_enabled( void ) { return debug_trace; }
|
||||
|
||||
void SNES_SPC::debug_do_trace( int a, int x, int y, uint8_t const *pc, uint8_t *sp, int psw, int c, int nz, int dp )
|
||||
{
|
||||
char msg[512];
|
||||
|
||||
ENSURE_TRACE_OPEN(apu_trace, "apu_trace.log", "a")
|
||||
|
||||
debug_op_print(msg, a, x, y, pc, sp, psw, c, nz, dp);
|
||||
fprintf(apu_trace, "%s ", msg);
|
||||
debug_io_print(msg);
|
||||
fprintf(apu_trace, "%s ", msg);
|
||||
S9xPrintHVPosition(msg);
|
||||
fprintf(apu_trace, "%s\n", msg);
|
||||
}
|
||||
|
||||
void SNES_SPC::debug_op_print( char *buffer, int a, int x, int y, uint8_t const *pc, uint8_t *sp, int psw, int c, int nz, int dp )
|
||||
{
|
||||
static char mnemonics[256][20] =
|
||||
{
|
||||
"NOP",
|
||||
"TCALL 0",
|
||||
"SET1 $%02X.0",
|
||||
"BBS $%02X.0,$%04X",
|
||||
"OR A,$%02X",
|
||||
"OR A,!$%04X",
|
||||
"OR A,(X)",
|
||||
"OR A,[$%02X+X]",
|
||||
"OR A,#$%02X",
|
||||
"OR $%02X,$%02X",
|
||||
"OR1 C,$%04X.%d",
|
||||
"ASL $%02X",
|
||||
"MOV !$%04X,Y",
|
||||
"PUSH PSW",
|
||||
"TSET1 !$%04X",
|
||||
"BRK",
|
||||
"BPL $%04X",
|
||||
"TCALL 1",
|
||||
"CLR1 $%02X.0",
|
||||
"BBC $%02X.0,$%04X",
|
||||
"OR A,$%02X+X",
|
||||
"OR A,!$%04X+X",
|
||||
"OR A,!$%04X+Y",
|
||||
"OR A,[$%02X]+Y",
|
||||
"OR $%02X,#$%02X",
|
||||
"OR (X),(Y)",
|
||||
"DECW $%02X",
|
||||
"ASL $%02X+X",
|
||||
"ASL A",
|
||||
"DEC X",
|
||||
"CMP X,!$%04X",
|
||||
"JMP [!$%04X+X]",
|
||||
"CLRP",
|
||||
"TCALL 2",
|
||||
"SET1 $%02X.1",
|
||||
"BBS $%02X.1,$%04X",
|
||||
"AND A,$%02X",
|
||||
"AND A,!$%04X",
|
||||
"AND A,(X)",
|
||||
"AND A,[$%02X+X]",
|
||||
"AND A,#$%02X",
|
||||
"AND $%02X,$%02X",
|
||||
"OR1 C,/$%04X.%d",
|
||||
"ROL $%02X",
|
||||
"ROL !$%04X",
|
||||
"PUSH A",
|
||||
"CBNE $%02X,$%04X",
|
||||
"BRA $%04X",
|
||||
"BMI $%04X",
|
||||
"TCALL 3",
|
||||
"CLR1 $%02X.1",
|
||||
"BBC $%02X.1,$%04X",
|
||||
"AND A,$%02X+X",
|
||||
"AND A,!$%04X+X",
|
||||
"AND A,!$%04X+Y",
|
||||
"AND A,[$%02X]+Y",
|
||||
"AND $%02X,#$%02X",
|
||||
"AND (X),(Y)",
|
||||
"INCW $%02X",
|
||||
"ROL $%02X+X",
|
||||
"ROL A",
|
||||
"INC X",
|
||||
"CMP X,$%02X",
|
||||
"CALL !$%04X",
|
||||
"SETP",
|
||||
"TCALL 4",
|
||||
"SET1 $%02X.2",
|
||||
"BBS $%02X.2,$%04X",
|
||||
"EOR A,$%02X",
|
||||
"EOR A,!$%04X",
|
||||
"EOR A,(X)",
|
||||
"EOR A,[$%02X+X]",
|
||||
"EOR A,#$%02X",
|
||||
"EOR $%02X,$%02X",
|
||||
"AND1 C,$%04X.%d",
|
||||
"LSR $%02X",
|
||||
"LSR !$%04X",
|
||||
"PUSH X",
|
||||
"TCLR1 !$%04X",
|
||||
"PCALL $%02X",
|
||||
"BVC $%04X",
|
||||
"TCALL 5",
|
||||
"CLR1 $%02X.2",
|
||||
"BBC $%02X.2,$%04X",
|
||||
"EOR A,$%02X+X",
|
||||
"EOR A,!$%04X+X",
|
||||
"EOR A,!$%04X+Y",
|
||||
"EOR A,[$%02X]+Y",
|
||||
"EOR $%02X,#$%02X",
|
||||
"EOR (X),(Y)",
|
||||
"CMPW YA,$%02X",
|
||||
"LSR $%02X+X",
|
||||
"LSR A",
|
||||
"MOV X,A",
|
||||
"CMP Y,!$%04X",
|
||||
"JMP !$%04X",
|
||||
"CLRC",
|
||||
"TCALL 6",
|
||||
"SET1 $%02X.3",
|
||||
"BBS $%02X.3,$%04X",
|
||||
"CMP A,$%02X",
|
||||
"CMP A,!$%04X",
|
||||
"CMP A,(X)",
|
||||
"CMP A,[$%02X+X]",
|
||||
"CMP A,#$%02X",
|
||||
"CMP $%02X,$%02X",
|
||||
"AND1 C,/$%04X.%d",
|
||||
"ROR $%02X",
|
||||
"ROR !$%04X",
|
||||
"PUSH Y",
|
||||
"DBNZ $%02X,$%04X",
|
||||
"RET",
|
||||
"BVS $%04X",
|
||||
"TCALL 7",
|
||||
"CLR1 $%02X.3",
|
||||
"BBC $%02X.3,$%04X",
|
||||
"CMP A,$%02X+X",
|
||||
"CMP A,!$%04X+X",
|
||||
"CMP A,!$%04X+Y",
|
||||
"CMP A,[$%02X]+Y",
|
||||
"CMP $%02X,#$%02X",
|
||||
"CMP (X),(Y)",
|
||||
"ADDW YA,$%02X",
|
||||
"ROR $%02X+X",
|
||||
"ROR A",
|
||||
"MOV A,X",
|
||||
"CMP Y,$%02X",
|
||||
"RET1",
|
||||
"SETC",
|
||||
"TCALL 8",
|
||||
"SET1 $%02X.4",
|
||||
"BBS $%02X.4,$%04X",
|
||||
"ADC A,$%02X",
|
||||
"ADC A,!$%04X",
|
||||
"ADC A,(X)",
|
||||
"ADC A,[$%02X+X]",
|
||||
"ADC A,#$%02X",
|
||||
"ADC $%02X,$%02X",
|
||||
"EOR1 C,$%04X.%d",
|
||||
"DEC $%02X",
|
||||
"DEC !$%04X",
|
||||
"MOV Y,#$%02X",
|
||||
"POP PSW",
|
||||
"MOV $%02X,#$%02X",
|
||||
"BCC $%04X",
|
||||
"TCALL 9",
|
||||
"CLR1 $%02X.4",
|
||||
"BBC $%02X.4,$%04X",
|
||||
"ADC A,$%02X+X",
|
||||
"ADC A,!$%04X+X",
|
||||
"ADC A,!$%04X+Y",
|
||||
"ADC A,[$%02X]+Y",
|
||||
"ADC $%02X,#$%02X",
|
||||
"ADC (X),(Y)",
|
||||
"SUBW YA,$%02X",
|
||||
"DEC $%02X+X",
|
||||
"DEC A",
|
||||
"MOV X,SP",
|
||||
"DIV YA,X",
|
||||
"XCN A",
|
||||
"EI",
|
||||
"TCALL 10",
|
||||
"SET1 $%02X.5",
|
||||
"BBS $%02X.5,$%04X",
|
||||
"SBC A,$%02X",
|
||||
"SBC A,!$%04X",
|
||||
"SBC A,(X)",
|
||||
"SBC A,[$%02X+X]",
|
||||
"SBC A,#$%02X",
|
||||
"SBC $%02X,$%02X",
|
||||
"MOV1 C,$%04X.%d",
|
||||
"INC $%02X",
|
||||
"INC !$%04X",
|
||||
"CMP Y,#$%02X",
|
||||
"POP A",
|
||||
"MOV (X)+,A",
|
||||
"BCS $%04X",
|
||||
"TCALL 11",
|
||||
"CLR1 $%02X.5",
|
||||
"BBC $%02X.5,$%04X",
|
||||
"SBC A,$%02X+X",
|
||||
"SBC A,!$%04X+X",
|
||||
"SBC A,!$%04X+Y",
|
||||
"SBC A,[$%02X]+Y",
|
||||
"SBC $%02X,#$%02X",
|
||||
"SBC (X),(Y)",
|
||||
"MOVW YA,$%02X",
|
||||
"INC $%02X+X",
|
||||
"INC A",
|
||||
"MOV SP,X",
|
||||
"DAS A",
|
||||
"MOV A,(X)+",
|
||||
"DI",
|
||||
"TCALL 12",
|
||||
"SET1 $%02X.6",
|
||||
"BBS $%02X.6,$%04X",
|
||||
"MOV $%02X,A",
|
||||
"MOV !$%04X,A",
|
||||
"MOV (X),A",
|
||||
"MOV [$%02X+X],A",
|
||||
"CMP X,#$%02X",
|
||||
"MOV !$%04X,X",
|
||||
"MOV1 $%04X.%d,C",
|
||||
"MOV $%02X,Y",
|
||||
"ASL !$%04X",
|
||||
"MOV X,#$%02X",
|
||||
"POP X",
|
||||
"MUL YA",
|
||||
"BNE $%04X",
|
||||
"TCALL 13",
|
||||
"CLR1 $%02X.6",
|
||||
"BBC $%02X.6,$%04X",
|
||||
"MOV $%02X+X,A",
|
||||
"MOV !$%04X+X,A",
|
||||
"MOV !$%04X+Y,A",
|
||||
"MOV [$%02X]+Y,A",
|
||||
"MOV $%02X,X",
|
||||
"MOV $%02X+Y,X",
|
||||
"MOVW $%02X,YA",
|
||||
"MOV $%02X+X,Y",
|
||||
"DEC Y",
|
||||
"MOV A,Y",
|
||||
"CBNE $%02X+X,$%04X",
|
||||
"DAA A",
|
||||
"CLRV",
|
||||
"TCALL 14",
|
||||
"SET1 $%02X.7",
|
||||
"BBS $%02X.7,$%04X",
|
||||
"MOV A,$%02X",
|
||||
"MOV A,!$%04X",
|
||||
"MOV A,(X)",
|
||||
"MOV A,[$%02X+X]",
|
||||
"MOV A,#$%02X",
|
||||
"MOV X,!$%04X",
|
||||
"NOT1 $%04X.%d",
|
||||
"MOV Y,$%02X",
|
||||
"MOV Y,!$%04X",
|
||||
"NOTC",
|
||||
"POP Y",
|
||||
"SLEEP",
|
||||
"BEQ $%04X",
|
||||
"TCALL 15",
|
||||
"CLR1 $%02X.7",
|
||||
"BBC $%02X.7,$%04X",
|
||||
"MOV A,$%02X+X",
|
||||
"MOV A,!$%04X+X",
|
||||
"MOV A,!$%04X+Y",
|
||||
"MOV A,[$%02X]+Y",
|
||||
"MOV X,$%02X",
|
||||
"MOV X,$%02X+Y",
|
||||
"MOV $%02X,$%02X",
|
||||
"MOV Y,$%02X+X",
|
||||
"INC Y",
|
||||
"MOV Y,A",
|
||||
"DBNZ Y,$%04X",
|
||||
"STOP"
|
||||
};
|
||||
|
||||
static int modes[256] =
|
||||
{
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 3, 6, 0, 1, 2, 1, 2,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 4, 2, 0, 0, 2, 2, 1, 1,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 3, 6, 0, 1, 2, 5, 7,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 4, 2, 0, 0, 2, 2, 0, 1,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 3, 6, 0, 1, 2, 1, 0,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 4, 2, 0, 0, 2, 2, 1, 1,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 3, 6, 0, 1, 2, 5, 2,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 4, 2, 0, 0, 2, 2, 0, 2,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 3, 6, 0, 1, 0, 2, 4,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 4, 2, 0, 0, 2, 2, 2, 2,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 3, 6, 0, 1, 0, 2, 2,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 4, 2, 0, 0, 2, 2, 2, 2,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 1, 6, 0, 1, 0, 2, 2,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 0, 0, 0, 0, 2, 2, 5, 2,
|
||||
2, 2, 0, 5, 0, 1, 2, 0, 0, 1, 6, 0, 1, 2, 2, 2,
|
||||
7, 2, 0, 5, 0, 1, 1, 0, 0, 0, 3, 0, 2, 2, 7, 2
|
||||
};
|
||||
|
||||
static int modesToBytes[] =
|
||||
{
|
||||
2, 3, 1, 3, 3, 3, 3, 2
|
||||
};
|
||||
|
||||
int const n80 = 0x80; // nz
|
||||
int const p20 = 0x20; // dp
|
||||
int const z02 = 0x02; // nz
|
||||
int const c01 = 0x01; // c
|
||||
|
||||
#define GET_PC() (pc - ram)
|
||||
#define GET_SP() (sp - 0x101 - ram)
|
||||
#define GET_PSW( out )\
|
||||
{\
|
||||
out = psw & ~(n80 | p20 | z02 | c01);\
|
||||
out |= c >> 8 & c01;\
|
||||
out |= dp >> 3 & p20;\
|
||||
out |= ((nz >> 4) | nz) & n80;\
|
||||
if ( !(uint8_t) nz ) out |= z02;\
|
||||
}
|
||||
|
||||
uint8_t const *ram = RAM;
|
||||
|
||||
int addr;
|
||||
int tsp, tpsw;
|
||||
uint8_t d0, d1, d2;
|
||||
|
||||
addr = GET_PC();
|
||||
tsp = GET_SP();
|
||||
GET_PSW(tpsw);
|
||||
|
||||
d0 = *pc;
|
||||
d1 = (addr < 0xffff) ? *(pc + 1) : 0;
|
||||
d2 = (addr < 0xfffe) ? *(pc + 2) : 0;
|
||||
|
||||
int mode = modes[d0];
|
||||
int bytes = modesToBytes[mode];
|
||||
char mnem[100];
|
||||
|
||||
switch (bytes)
|
||||
{
|
||||
case 1:
|
||||
sprintf(buffer, "%04X %02X ", addr, d0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sprintf(buffer, "%04X %02X %02X ", addr, d0, d1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sprintf(buffer, "%04X %02X %02X %02X ", addr, d0, d1, d2);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
sprintf(mnem, mnemonics[d0], d1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
sprintf(mnem, mnemonics[d0], d1 + (d2 << 8));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
strcpy (mnem, mnemonics[d0]);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sprintf(mnem, mnemonics[d0], d2, d1);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sprintf(mnem, mnemonics[d0], d2, d1);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
sprintf(mnem, mnemonics[d0], d1, addr + 3 + (int8_t) d2);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
sprintf(mnem, mnemonics[d0], (d1 + (d2 << 8)) & 0x1fff, d2 >> 5);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
sprintf(mnem, mnemonics[d0], addr + 2 + (int8_t) d1);
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(buffer, "%s %-20s A:%02X X:%02X Y:%02X S:%02X P:%c%c%c%c%c%c%c%c ROM:%d",
|
||||
buffer, mnem, a, x, y, tsp,
|
||||
(tpsw & 0x80) ? 'N' : 'n',
|
||||
(tpsw & 0x40) ? 'V' : 'v',
|
||||
(tpsw & 0x20) ? 'P' : 'p',
|
||||
(tpsw & 0x10) ? 'B' : 'b',
|
||||
(tpsw & 0x08) ? 'H' : 'h',
|
||||
(tpsw & 0x04) ? 'I' : 'i',
|
||||
(tpsw & 0x02) ? 'Z' : 'z',
|
||||
(tpsw & 0x01) ? 'C' : 'c',
|
||||
m.rom_enabled ? 1 : 0);
|
||||
}
|
||||
|
||||
void SNES_SPC::debug_io_print( char *buffer )
|
||||
{
|
||||
sprintf(buffer, "i/o %02X/%02X %02X/%02X %02X/%02X %02X/%02X",
|
||||
m.smp_regs[1][r_cpuio0], m.smp_regs[0][r_cpuio0],
|
||||
m.smp_regs[1][r_cpuio1], m.smp_regs[0][r_cpuio1],
|
||||
m.smp_regs[1][r_cpuio2], m.smp_regs[0][r_cpuio2],
|
||||
m.smp_regs[1][r_cpuio3], m.smp_regs[0][r_cpuio3]);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,142 +0,0 @@
|
||||
// SPC emulation state save/load: copy_state(), save_spc()
|
||||
// Separate file to avoid linking in unless needed
|
||||
|
||||
// snes_spc 0.9.0. http://www.slack.net/‾ant/
|
||||
|
||||
#include "SNES_SPC.h"
|
||||
|
||||
#if !SPC_NO_COPY_STATE_FUNCS
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Copyright (C) 2004-2007 Shay Green. This module is free software; you
|
||||
can redistribute it and/or modify it under the terms of the GNU Lesser
|
||||
General Public License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version. This
|
||||
module is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
details. You should have received a copy of the GNU Lesser General Public
|
||||
License along with this module; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "blargg_source.h"
|
||||
|
||||
#define RAM (m.ram.ram)
|
||||
#define REGS (m.smp_regs [0])
|
||||
#define REGS_IN (m.smp_regs [1])
|
||||
|
||||
void SNES_SPC::save_regs( uint8_t out [reg_count] )
|
||||
{
|
||||
// Use current timer counter values
|
||||
for ( int i = 0; i < timer_count; i++ )
|
||||
out [r_t0out + i] = m.timers [i].counter;
|
||||
|
||||
// Last written values
|
||||
memcpy( out, REGS, r_t0out );
|
||||
}
|
||||
|
||||
void SNES_SPC::init_header( void* spc_out )
|
||||
{
|
||||
spc_file_t* const spc = (spc_file_t*) spc_out;
|
||||
|
||||
spc->has_id666 = 26; // has none
|
||||
spc->version = 30;
|
||||
memcpy( spc, signature, sizeof spc->signature );
|
||||
memset( spc->text, 0, sizeof spc->text );
|
||||
}
|
||||
|
||||
void SNES_SPC::save_spc( void* spc_out )
|
||||
{
|
||||
spc_file_t* const spc = (spc_file_t*) spc_out;
|
||||
|
||||
// CPU
|
||||
spc->pcl = (uint8_t) (m.cpu_regs.pc >> 0);
|
||||
spc->pch = (uint8_t) (m.cpu_regs.pc >> 8);
|
||||
spc->a = m.cpu_regs.a;
|
||||
spc->x = m.cpu_regs.x;
|
||||
spc->y = m.cpu_regs.y;
|
||||
spc->psw = m.cpu_regs.psw;
|
||||
spc->sp = m.cpu_regs.sp;
|
||||
|
||||
// RAM, ROM
|
||||
memcpy( spc->ram, RAM, sizeof spc->ram );
|
||||
if ( m.rom_enabled )
|
||||
memcpy( spc->ram + rom_addr, m.hi_ram, sizeof m.hi_ram );
|
||||
memset( spc->unused, 0, sizeof spc->unused );
|
||||
memcpy( spc->ipl_rom, m.rom, sizeof spc->ipl_rom );
|
||||
|
||||
// SMP registers
|
||||
save_regs( &spc->ram [0xF0] );
|
||||
int i;
|
||||
for ( i = 0; i < port_count; i++ )
|
||||
spc->ram [0xF0 + r_cpuio0 + i] = REGS_IN [r_cpuio0 + i];
|
||||
|
||||
// DSP registers
|
||||
for ( i = 0; i < SPC_DSP::register_count; i++ )
|
||||
spc->dsp [i] = dsp.read( i );
|
||||
}
|
||||
|
||||
#undef IF_0_THEN_256
|
||||
#define IF_0_THEN_256( n ) ((uint8_t) ((n) - 1) + 1)
|
||||
void SNES_SPC::copy_state( unsigned char** io, copy_func_t copy )
|
||||
{
|
||||
SPC_State_Copier copier( io, copy );
|
||||
|
||||
// Make state data more readable by putting 64K RAM, 16 SMP registers,
|
||||
// then DSP (with its 128 registers) first
|
||||
|
||||
// RAM
|
||||
enable_rom( 0 ); // will get re-enabled if necessary in regs_loaded() below
|
||||
copier.copy( RAM, 0x10000 );
|
||||
|
||||
{
|
||||
// SMP registers
|
||||
uint8_t regs [reg_count];
|
||||
uint8_t regs_in [reg_count];
|
||||
|
||||
memcpy( regs, REGS, reg_count );
|
||||
memcpy( regs_in, REGS_IN, reg_count );
|
||||
|
||||
copier.copy( regs, sizeof regs );
|
||||
copier.copy( regs_in, sizeof regs_in );
|
||||
|
||||
memcpy( REGS, regs, reg_count);
|
||||
memcpy( REGS_IN, regs_in, reg_count );
|
||||
|
||||
enable_rom( REGS [r_control] & 0x80 );
|
||||
}
|
||||
|
||||
// CPU registers
|
||||
SPC_COPY( uint16_t, m.cpu_regs.pc );
|
||||
SPC_COPY( uint8_t, m.cpu_regs.a );
|
||||
SPC_COPY( uint8_t, m.cpu_regs.x );
|
||||
SPC_COPY( uint8_t, m.cpu_regs.y );
|
||||
SPC_COPY( uint8_t, m.cpu_regs.psw );
|
||||
SPC_COPY( uint8_t, m.cpu_regs.sp );
|
||||
copier.extra();
|
||||
|
||||
SPC_COPY( int16_t, m.spc_time );
|
||||
SPC_COPY( int16_t, m.dsp_time );
|
||||
|
||||
// DSP
|
||||
dsp.copy_state( io, copy );
|
||||
|
||||
// Timers
|
||||
for ( int i = 0; i < timer_count; i++ )
|
||||
{
|
||||
Timer* t = &m.timers [i];
|
||||
t->period = IF_0_THEN_256( REGS [r_t0target + i] );
|
||||
t->enabled = REGS [r_control] >> i & 1;
|
||||
SPC_COPY( int16_t, t->next_time );
|
||||
SPC_COPY( uint8_t, t->divider );
|
||||
SPC_COPY( uint8_t, t->counter );
|
||||
copier.extra();
|
||||
}
|
||||
|
||||
set_tempo( m.tempo );
|
||||
|
||||
copier.extra();
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,68 +0,0 @@
|
||||
// snes_spc 0.9.0. http://www.slack.net/~ant/
|
||||
|
||||
#include "SPC_Filter.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Copyright (C) 2007 Shay Green. This module is free software; you
|
||||
can redistribute it and/or modify it under the terms of the GNU Lesser
|
||||
General Public License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version. This
|
||||
module is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
details. You should have received a copy of the GNU Lesser General Public
|
||||
License along with this module; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include "blargg_source.h"
|
||||
|
||||
void SPC_Filter::clear() { memset( ch, 0, sizeof ch ); }
|
||||
|
||||
SPC_Filter::SPC_Filter()
|
||||
{
|
||||
gain = gain_unit;
|
||||
bass = bass_norm;
|
||||
clear();
|
||||
}
|
||||
|
||||
void SPC_Filter::run( short* io, int count )
|
||||
{
|
||||
require( (count & 1) == 0 ); // must be even
|
||||
|
||||
int const gain = this->gain;
|
||||
int const bass = this->bass;
|
||||
chan_t* c = &ch [2];
|
||||
do
|
||||
{
|
||||
// cache in registers
|
||||
int sum = (--c)->sum;
|
||||
int pp1 = c->pp1;
|
||||
int p1 = c->p1;
|
||||
|
||||
for ( int i = 0; i < count; i += 2 )
|
||||
{
|
||||
// Low-pass filter (two point FIR with coeffs 0.25, 0.75)
|
||||
int f = io [i] + p1;
|
||||
p1 = io [i] * 3;
|
||||
|
||||
// High-pass filter ("leaky integrator")
|
||||
int delta = f - pp1;
|
||||
pp1 = f;
|
||||
int s = sum >> (gain_bits + 2);
|
||||
sum += (delta * gain) - (sum >> bass);
|
||||
|
||||
// Clamp to 16 bits
|
||||
if ( (short) s != s )
|
||||
s = (s >> 31) ^ 0x7FFF;
|
||||
|
||||
io [i] = (short) s;
|
||||
}
|
||||
|
||||
c->p1 = p1;
|
||||
c->pp1 = pp1;
|
||||
c->sum = sum;
|
||||
++io;
|
||||
}
|
||||
while ( c != ch );
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
// Simple low-pass and high-pass filter to better match sound output of a SNES
|
||||
|
||||
// snes_spc 0.9.0
|
||||
#ifndef SPC_FILTER_H
|
||||
#define SPC_FILTER_H
|
||||
|
||||
#include "blargg_common.h"
|
||||
|
||||
struct SPC_Filter {
|
||||
public:
|
||||
|
||||
// Filters count samples of stereo sound in place. Count must be a multiple of 2.
|
||||
typedef short sample_t;
|
||||
void run( sample_t* io, int count );
|
||||
|
||||
// Optional features
|
||||
|
||||
// Clears filter to silence
|
||||
void clear();
|
||||
|
||||
// Sets gain (volume), where gain_unit is normal. Gains greater than gain_unit
|
||||
// are fine, since output is clamped to 16-bit sample range.
|
||||
enum { gain_unit = 0x100 };
|
||||
void set_gain( int gain );
|
||||
|
||||
// Sets amount of bass (logarithmic scale)
|
||||
enum { bass_none = 0 };
|
||||
enum { bass_norm = 8 }; // normal amount
|
||||
enum { bass_max = 31 };
|
||||
void set_bass( int bass );
|
||||
|
||||
public:
|
||||
SPC_Filter();
|
||||
BLARGG_DISABLE_NOTHROW
|
||||
private:
|
||||
enum { gain_bits = 8 };
|
||||
int gain;
|
||||
int bass;
|
||||
struct chan_t { int p1, pp1, sum; };
|
||||
chan_t ch [2];
|
||||
};
|
||||
|
||||
inline void SPC_Filter::set_gain( int g ) { gain = g; }
|
||||
|
||||
inline void SPC_Filter::set_bass( int b ) { bass = b; }
|
||||
|
||||
#endif
|
||||
@@ -1,664 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include "snes9x.h"
|
||||
#include "apu.h"
|
||||
#include "snapshot.h"
|
||||
#include "display.h"
|
||||
#include "linear_resampler.h"
|
||||
#include "hermite_resampler.h"
|
||||
|
||||
#define APU_DEFAULT_INPUT_RATE 32000
|
||||
#define APU_MINIMUM_SAMPLE_COUNT 512
|
||||
#define APU_MINIMUM_SAMPLE_BLOCK 128
|
||||
#define APU_NUMERATOR_NTSC 15664
|
||||
#define APU_DENOMINATOR_NTSC 328125
|
||||
#define APU_NUMERATOR_PAL 34176
|
||||
#define APU_DENOMINATOR_PAL 709379
|
||||
#define APU_DEFAULT_RESAMPLER HermiteResampler
|
||||
|
||||
SNES_SPC *spc_core = NULL;
|
||||
|
||||
static uint8 APUROM[64] =
|
||||
{
|
||||
0xCD, 0xEF, 0xBD, 0xE8, 0x00, 0xC6, 0x1D, 0xD0,
|
||||
0xFC, 0x8F, 0xAA, 0xF4, 0x8F, 0xBB, 0xF5, 0x78,
|
||||
0xCC, 0xF4, 0xD0, 0xFB, 0x2F, 0x19, 0xEB, 0xF4,
|
||||
0xD0, 0xFC, 0x7E, 0xF4, 0xD0, 0x0B, 0xE4, 0xF5,
|
||||
0xCB, 0xF4, 0xD7, 0x00, 0xFC, 0xD0, 0xF3, 0xAB,
|
||||
0x01, 0x10, 0xEF, 0x7E, 0xF4, 0x10, 0xEB, 0xBA,
|
||||
0xF6, 0xDA, 0x00, 0xBA, 0xF4, 0xC4, 0xF4, 0xDD,
|
||||
0x5D, 0xD0, 0xDB, 0x1F, 0x00, 0x00, 0xC0, 0xFF
|
||||
};
|
||||
|
||||
namespace spc
|
||||
{
|
||||
static apu_callback sa_callback = NULL;
|
||||
static void *extra_data = NULL;
|
||||
|
||||
static bool8 sound_in_sync = TRUE;
|
||||
static bool8 sound_enabled = FALSE;
|
||||
|
||||
static int buffer_size;
|
||||
static int lag_master = 0;
|
||||
static int lag = 0;
|
||||
|
||||
static uint8 *landing_buffer = NULL;
|
||||
static uint8 *shrink_buffer = NULL;
|
||||
|
||||
static Resampler *resampler = NULL;
|
||||
|
||||
static int32 reference_time;
|
||||
static uint32 remainder;
|
||||
|
||||
static const int timing_hack_numerator = SNES_SPC::tempo_unit;
|
||||
static int timing_hack_denominator = SNES_SPC::tempo_unit;
|
||||
/* Set these to NTSC for now. Will change to PAL in S9xAPUTimingSetSpeedup
|
||||
if necessary on game load. */
|
||||
static uint32 ratio_numerator = APU_NUMERATOR_NTSC;
|
||||
static uint32 ratio_denominator = APU_DENOMINATOR_NTSC;
|
||||
}
|
||||
|
||||
static void EightBitize (uint8 *, int);
|
||||
static void DeStereo (uint8 *, int);
|
||||
static void ReverseStereo (uint8 *, int);
|
||||
static void UpdatePlaybackRate (void);
|
||||
static void from_apu_to_state (uint8 **, void *, size_t);
|
||||
static void to_apu_from_state (uint8 **, void *, size_t);
|
||||
static void SPCSnapshotCallback (void);
|
||||
static inline int S9xAPUGetClock (int32);
|
||||
static inline int S9xAPUGetClockRemainder (int32);
|
||||
|
||||
|
||||
static void EightBitize (uint8 *buffer, int sample_count)
|
||||
{
|
||||
uint8 *buf8 = (uint8 *) buffer;
|
||||
int16 *buf16 = (int16 *) buffer;
|
||||
|
||||
for (int i = 0; i < sample_count; i++)
|
||||
buf8[i] = (uint8) ((buf16[i] / 256) + 128);
|
||||
}
|
||||
|
||||
static void DeStereo (uint8 *buffer, int sample_count)
|
||||
{
|
||||
int16 *buf = (int16 *) buffer;
|
||||
int32 s1, s2;
|
||||
|
||||
for (int i = 0; i < sample_count >> 1; i++)
|
||||
{
|
||||
s1 = (int32) buf[2 * i];
|
||||
s2 = (int32) buf[2 * i + 1];
|
||||
buf[i] = (int16) ((s1 + s2) >> 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void ReverseStereo (uint8 *src_buffer, int sample_count)
|
||||
{
|
||||
int16 *buffer = (int16 *) src_buffer;
|
||||
|
||||
for (int i = 0; i < sample_count; i += 2)
|
||||
{
|
||||
buffer[i + 1] ^= buffer[i];
|
||||
buffer[i] ^= buffer[i + 1];
|
||||
buffer[i + 1] ^= buffer[i];
|
||||
}
|
||||
}
|
||||
|
||||
bool8 S9xMixSamples (uint8 *buffer, int sample_count)
|
||||
{
|
||||
static int shrink_buffer_size = -1;
|
||||
uint8 *dest;
|
||||
|
||||
if (!Settings.SixteenBitSound || !Settings.Stereo)
|
||||
{
|
||||
/* We still need both stereo samples for generating the mono sample */
|
||||
if (!Settings.Stereo)
|
||||
sample_count <<= 1;
|
||||
|
||||
/* We still have to generate 16-bit samples for bit-dropping, too */
|
||||
if (shrink_buffer_size < (sample_count << 1))
|
||||
{
|
||||
delete[] spc::shrink_buffer;
|
||||
spc::shrink_buffer = new uint8[sample_count << 1];
|
||||
shrink_buffer_size = sample_count << 1;
|
||||
}
|
||||
|
||||
dest = spc::shrink_buffer;
|
||||
}
|
||||
else
|
||||
dest = buffer;
|
||||
|
||||
if (Settings.Mute)
|
||||
{
|
||||
memset(dest, 0, sample_count << 1);
|
||||
spc::resampler->clear();
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (spc::resampler->avail() >= (sample_count + spc::lag))
|
||||
{
|
||||
spc::resampler->read((short *) dest, sample_count);
|
||||
if (spc::lag == spc::lag_master)
|
||||
spc::lag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(buffer, (Settings.SixteenBitSound ? 0 : 128), (sample_count << (Settings.SixteenBitSound ? 1 : 0)) >> (Settings.Stereo ? 0 : 1));
|
||||
if (spc::lag == 0)
|
||||
spc::lag = spc::lag_master;
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.ReverseStereo && Settings.Stereo)
|
||||
ReverseStereo(dest, sample_count);
|
||||
|
||||
if (!Settings.Stereo || !Settings.SixteenBitSound)
|
||||
{
|
||||
if (!Settings.Stereo)
|
||||
{
|
||||
DeStereo(dest, sample_count);
|
||||
sample_count >>= 1;
|
||||
}
|
||||
|
||||
if (!Settings.SixteenBitSound)
|
||||
EightBitize(dest, sample_count);
|
||||
|
||||
memcpy(buffer, dest, (sample_count << (Settings.SixteenBitSound ? 1 : 0)));
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
int S9xGetSampleCount (void)
|
||||
{
|
||||
return (spc::resampler->avail() >> (Settings.Stereo ? 0 : 1));
|
||||
}
|
||||
|
||||
void S9xFinalizeSamples (void)
|
||||
{
|
||||
if (!Settings.Mute)
|
||||
{
|
||||
if (!spc::resampler->push((short *) spc::landing_buffer, spc_core->sample_count()))
|
||||
{
|
||||
/* We weren't able to process the entire buffer. Potential overrun. */
|
||||
spc::sound_in_sync = FALSE;
|
||||
|
||||
if (Settings.SoundSync && !Settings.TurboMode)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Settings.SoundSync || Settings.TurboMode || Settings.Mute)
|
||||
spc::sound_in_sync = TRUE;
|
||||
else
|
||||
if (spc::resampler->space_empty() >= spc::resampler->space_filled())
|
||||
spc::sound_in_sync = TRUE;
|
||||
else
|
||||
spc::sound_in_sync = FALSE;
|
||||
|
||||
spc_core->set_output((SNES_SPC::sample_t *) spc::landing_buffer, spc::buffer_size >> 1);
|
||||
}
|
||||
|
||||
void S9xLandSamples (void)
|
||||
{
|
||||
if (spc::sa_callback != NULL)
|
||||
spc::sa_callback(spc::extra_data);
|
||||
else
|
||||
S9xFinalizeSamples();
|
||||
}
|
||||
|
||||
void S9xClearSamples (void)
|
||||
{
|
||||
spc::resampler->clear();
|
||||
spc::lag = spc::lag_master;
|
||||
}
|
||||
|
||||
bool8 S9xSyncSound (void)
|
||||
{
|
||||
if (!Settings.SoundSync || spc::sound_in_sync)
|
||||
return (TRUE);
|
||||
|
||||
S9xLandSamples();
|
||||
|
||||
return (spc::sound_in_sync);
|
||||
}
|
||||
|
||||
void S9xSetSamplesAvailableCallback (apu_callback callback, void *data)
|
||||
{
|
||||
spc::sa_callback = callback;
|
||||
spc::extra_data = data;
|
||||
}
|
||||
|
||||
static void UpdatePlaybackRate (void)
|
||||
{
|
||||
if (Settings.SoundInputRate == 0)
|
||||
Settings.SoundInputRate = APU_DEFAULT_INPUT_RATE;
|
||||
|
||||
double time_ratio = (double) Settings.SoundInputRate * spc::timing_hack_numerator / (Settings.SoundPlaybackRate * spc::timing_hack_denominator);
|
||||
spc::resampler->time_ratio(time_ratio);
|
||||
}
|
||||
|
||||
bool8 S9xInitSound (int buffer_ms, int lag_ms)
|
||||
{
|
||||
// buffer_ms : buffer size given in millisecond
|
||||
// lag_ms : allowable time-lag given in millisecond
|
||||
|
||||
int sample_count = buffer_ms * 32000 / 1000;
|
||||
int lag_sample_count = lag_ms * 32000 / 1000;
|
||||
|
||||
spc::lag_master = lag_sample_count;
|
||||
if (Settings.Stereo)
|
||||
spc::lag_master <<= 1;
|
||||
spc::lag = spc::lag_master;
|
||||
|
||||
if (sample_count < APU_MINIMUM_SAMPLE_COUNT)
|
||||
sample_count = APU_MINIMUM_SAMPLE_COUNT;
|
||||
|
||||
spc::buffer_size = sample_count;
|
||||
if (Settings.Stereo)
|
||||
spc::buffer_size <<= 1;
|
||||
if (Settings.SixteenBitSound)
|
||||
spc::buffer_size <<= 1;
|
||||
|
||||
printf("Sound buffer size: %d (%d samples)\n", spc::buffer_size, sample_count);
|
||||
|
||||
if (spc::landing_buffer)
|
||||
delete[] spc::landing_buffer;
|
||||
spc::landing_buffer = new uint8[spc::buffer_size * 2];
|
||||
if (!spc::landing_buffer)
|
||||
return (FALSE);
|
||||
|
||||
/* The resampler and spc unit use samples (16-bit short) as
|
||||
arguments. Use 2x in the resampler for buffer leveling with SoundSync */
|
||||
if (!spc::resampler)
|
||||
{
|
||||
spc::resampler = new APU_DEFAULT_RESAMPLER(spc::buffer_size >> (Settings.SoundSync ? 0 : 1));
|
||||
if (!spc::resampler)
|
||||
{
|
||||
delete[] spc::landing_buffer;
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
spc::resampler->resize(spc::buffer_size >> (Settings.SoundSync ? 0 : 1));
|
||||
|
||||
spc_core->set_output((SNES_SPC::sample_t *) spc::landing_buffer, spc::buffer_size >> 1);
|
||||
|
||||
UpdatePlaybackRate();
|
||||
|
||||
spc::sound_enabled = S9xOpenSoundDevice();
|
||||
|
||||
return (spc::sound_enabled);
|
||||
}
|
||||
|
||||
void S9xSetSoundControl (uint8 voice_switch)
|
||||
{
|
||||
spc_core->dsp_set_stereo_switch(voice_switch << 8 | voice_switch);
|
||||
}
|
||||
|
||||
void S9xSetSoundMute (bool8 mute)
|
||||
{
|
||||
Settings.Mute = mute;
|
||||
if (!spc::sound_enabled)
|
||||
Settings.Mute = TRUE;
|
||||
}
|
||||
|
||||
void S9xDumpSPCSnapshot (void)
|
||||
{
|
||||
spc_core->dsp_dump_spc_snapshot();
|
||||
}
|
||||
|
||||
static void SPCSnapshotCallback (void)
|
||||
{
|
||||
S9xSPCDump(S9xGetFilenameInc((".spc"), SPC_DIR));
|
||||
printf("Dumped key-on triggered spc snapshot.\n");
|
||||
}
|
||||
|
||||
bool8 S9xInitAPU (void)
|
||||
{
|
||||
spc_core = new SNES_SPC;
|
||||
if (!spc_core)
|
||||
return (FALSE);
|
||||
|
||||
spc_core->init();
|
||||
spc_core->init_rom(APUROM);
|
||||
|
||||
spc_core->dsp_set_spc_snapshot_callback(SPCSnapshotCallback);
|
||||
|
||||
spc::landing_buffer = NULL;
|
||||
spc::shrink_buffer = NULL;
|
||||
spc::resampler = NULL;
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
void S9xDeinitAPU (void)
|
||||
{
|
||||
if (spc_core)
|
||||
{
|
||||
delete spc_core;
|
||||
spc_core = NULL;
|
||||
}
|
||||
|
||||
if (spc::resampler)
|
||||
{
|
||||
delete spc::resampler;
|
||||
spc::resampler = NULL;
|
||||
}
|
||||
|
||||
if (spc::landing_buffer)
|
||||
{
|
||||
delete[] spc::landing_buffer;
|
||||
spc::landing_buffer = NULL;
|
||||
}
|
||||
|
||||
if (spc::shrink_buffer)
|
||||
{
|
||||
delete[] spc::shrink_buffer;
|
||||
spc::shrink_buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int S9xAPUGetClock (int32 cpucycles)
|
||||
{
|
||||
return (spc::ratio_numerator * (cpucycles - spc::reference_time) + spc::remainder) /
|
||||
spc::ratio_denominator;
|
||||
}
|
||||
|
||||
static inline int S9xAPUGetClockRemainder (int32 cpucycles)
|
||||
{
|
||||
return (spc::ratio_numerator * (cpucycles - spc::reference_time) + spc::remainder) %
|
||||
spc::ratio_denominator;
|
||||
}
|
||||
|
||||
uint8 S9xAPUReadPort (int port)
|
||||
{
|
||||
return ((uint8) spc_core->read_port(S9xAPUGetClock(CPU.Cycles), port));
|
||||
}
|
||||
|
||||
void S9xAPUWritePort (int port, uint8 byte)
|
||||
{
|
||||
spc_core->write_port(S9xAPUGetClock(CPU.Cycles), port, byte);
|
||||
}
|
||||
|
||||
void S9xAPUSetReferenceTime (int32 cpucycles)
|
||||
{
|
||||
spc::reference_time = cpucycles;
|
||||
}
|
||||
|
||||
void S9xAPUExecute (void)
|
||||
{
|
||||
/* Accumulate partial APU cycles */
|
||||
spc_core->end_frame(S9xAPUGetClock(CPU.Cycles));
|
||||
|
||||
spc::remainder = S9xAPUGetClockRemainder(CPU.Cycles);
|
||||
|
||||
S9xAPUSetReferenceTime(CPU.Cycles);
|
||||
}
|
||||
|
||||
void S9xAPUEndScanline (void)
|
||||
{
|
||||
S9xAPUExecute();
|
||||
|
||||
if (spc_core->sample_count() >= APU_MINIMUM_SAMPLE_BLOCK || !spc::sound_in_sync)
|
||||
S9xLandSamples();
|
||||
}
|
||||
|
||||
void S9xAPUTimingSetSpeedup (int ticks)
|
||||
{
|
||||
if (ticks != 0)
|
||||
printf("APU speedup hack: %d\n", ticks);
|
||||
|
||||
spc::timing_hack_denominator = SNES_SPC::tempo_unit - ticks;
|
||||
spc_core->set_tempo(spc::timing_hack_denominator);
|
||||
|
||||
spc::ratio_numerator = Settings.PAL ? APU_NUMERATOR_PAL : APU_NUMERATOR_NTSC;
|
||||
spc::ratio_denominator = Settings.PAL ? APU_DENOMINATOR_PAL : APU_DENOMINATOR_NTSC;
|
||||
spc::ratio_denominator = spc::ratio_denominator * spc::timing_hack_denominator / spc::timing_hack_numerator;
|
||||
|
||||
UpdatePlaybackRate();
|
||||
}
|
||||
|
||||
void S9xAPUAllowTimeOverflow (bool allow)
|
||||
{
|
||||
if (allow)
|
||||
printf("APU time overflow allowed\n");
|
||||
|
||||
spc_core->spc_allow_time_overflow(allow);
|
||||
}
|
||||
|
||||
void S9xResetAPU (void)
|
||||
{
|
||||
spc::reference_time = 0;
|
||||
spc::remainder = 0;
|
||||
spc_core->reset();
|
||||
spc_core->set_output((SNES_SPC::sample_t *) spc::landing_buffer, spc::buffer_size >> 1);
|
||||
|
||||
spc::resampler->clear();
|
||||
}
|
||||
|
||||
void S9xSoftResetAPU (void)
|
||||
{
|
||||
spc::reference_time = 0;
|
||||
spc::remainder = 0;
|
||||
spc_core->soft_reset();
|
||||
spc_core->set_output((SNES_SPC::sample_t *) spc::landing_buffer, spc::buffer_size >> 1);
|
||||
|
||||
spc::resampler->clear();
|
||||
}
|
||||
|
||||
static void from_apu_to_state (uint8 **buf, void *var, size_t size)
|
||||
{
|
||||
memcpy(*buf, var, size);
|
||||
*buf += size;
|
||||
}
|
||||
|
||||
static void to_apu_from_state (uint8 **buf, void *var, size_t size)
|
||||
{
|
||||
memcpy(var, *buf, size);
|
||||
*buf += size;
|
||||
}
|
||||
|
||||
void S9xAPUSaveState (uint8 *block)
|
||||
{
|
||||
uint8 *ptr = block;
|
||||
|
||||
spc_core->copy_state(&ptr, from_apu_to_state);
|
||||
|
||||
SET_LE32(ptr, spc::reference_time);
|
||||
ptr += sizeof(int32);
|
||||
SET_LE32(ptr, spc::remainder);
|
||||
}
|
||||
|
||||
void S9xAPULoadState (uint8 *block)
|
||||
{
|
||||
uint8 *ptr = block;
|
||||
|
||||
S9xResetAPU();
|
||||
|
||||
spc_core->copy_state(&ptr, to_apu_from_state);
|
||||
|
||||
spc::reference_time = GET_LE32(ptr);
|
||||
ptr += sizeof(int32);
|
||||
spc::remainder = GET_LE32(ptr);
|
||||
}
|
||||
@@ -1,219 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _APU_H_
|
||||
#define _APU_H_
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "SNES_SPC.h"
|
||||
|
||||
typedef void (*apu_callback) (void *);
|
||||
|
||||
#define SPC_SAVE_STATE_BLOCK_SIZE (SNES_SPC::state_size + 8)
|
||||
|
||||
bool8 S9xInitAPU (void);
|
||||
void S9xDeinitAPU (void);
|
||||
void S9xResetAPU (void);
|
||||
void S9xSoftResetAPU (void);
|
||||
uint8 S9xAPUReadPort (int);
|
||||
void S9xAPUWritePort (int, uint8);
|
||||
void S9xAPUExecute (void);
|
||||
void S9xAPUEndScanline (void);
|
||||
void S9xAPUSetReferenceTime (int32);
|
||||
void S9xAPUTimingSetSpeedup (int);
|
||||
void S9xAPUAllowTimeOverflow (bool);
|
||||
void S9xAPULoadState (uint8 *);
|
||||
void S9xAPUSaveState (uint8 *);
|
||||
void S9xDumpSPCSnapshot (void);
|
||||
|
||||
bool8 S9xInitSound (int, int);
|
||||
bool8 S9xOpenSoundDevice (void);
|
||||
|
||||
bool8 S9xSyncSound (void);
|
||||
int S9xGetSampleCount (void);
|
||||
void S9xSetSoundControl (uint8);
|
||||
void S9xSetSoundMute (bool8);
|
||||
void S9xLandSamples (void);
|
||||
void S9xFinalizeSamples (void);
|
||||
void S9xClearSamples (void);
|
||||
bool8 S9xMixSamples (uint8 *, int);
|
||||
void S9xSetSamplesAvailableCallback (apu_callback, void *);
|
||||
|
||||
extern SNES_SPC *spc_core;
|
||||
|
||||
#endif
|
||||
@@ -1,127 +0,0 @@
|
||||
/* Simple resampler based on bsnes's ruby audio library */
|
||||
|
||||
#ifndef __HERMITE_RESAMPLER_H
|
||||
#define __HERMITE_RESAMPLER_H
|
||||
|
||||
#include "resampler.h"
|
||||
|
||||
#undef CLAMP
|
||||
#undef SHORT_CLAMP
|
||||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||
#define SHORT_CLAMP(n) ((short) CLAMP((n), -32768, 32767))
|
||||
|
||||
class HermiteResampler : public Resampler
|
||||
{
|
||||
protected:
|
||||
|
||||
float r_step;
|
||||
float r_frac;
|
||||
int r_left[4], r_right[4];
|
||||
|
||||
static inline float
|
||||
hermite (float mu1, float a, float b, float c, float d)
|
||||
{
|
||||
float mu2, mu3, m0, m1, a0, a1, a2, a3;
|
||||
|
||||
mu2 = mu1 * mu1;
|
||||
mu3 = mu2 * mu1;
|
||||
|
||||
m0 = (c - a) * 0.5;
|
||||
m1 = (d - b) * 0.5;
|
||||
|
||||
a0 = +2 * mu3 - 3 * mu2 + 1;
|
||||
a1 = mu3 - 2 * mu2 + mu1;
|
||||
a2 = mu3 - mu2;
|
||||
a3 = -2 * mu3 + 3 * mu2;
|
||||
|
||||
return (a0 * b) + (a1 * m0) + (a2 * m1) + (a3 * c);
|
||||
}
|
||||
|
||||
public:
|
||||
HermiteResampler (int num_samples) : Resampler (num_samples)
|
||||
{
|
||||
clear ();
|
||||
}
|
||||
|
||||
~HermiteResampler ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
time_ratio (double ratio)
|
||||
{
|
||||
r_step = ratio;
|
||||
clear ();
|
||||
}
|
||||
|
||||
void
|
||||
clear (void)
|
||||
{
|
||||
ring_buffer::clear ();
|
||||
r_frac = 1.0;
|
||||
r_left [0] = r_left [1] = r_left [2] = r_left [3] = 0;
|
||||
r_right[0] = r_right[1] = r_right[2] = r_right[3] = 0;
|
||||
}
|
||||
|
||||
void
|
||||
read (short *data, int num_samples)
|
||||
{
|
||||
int i_position = start >> 1;
|
||||
int max_samples = buffer_size >> 1;
|
||||
short *internal_buffer = (short *) buffer;
|
||||
int o_position = 0;
|
||||
int consumed = 0;
|
||||
|
||||
while (o_position < num_samples && consumed < buffer_size)
|
||||
{
|
||||
int s_left = internal_buffer[i_position];
|
||||
int s_right = internal_buffer[i_position + 1];
|
||||
float hermite_val[2];
|
||||
|
||||
while (r_frac <= 1.0 && o_position < num_samples)
|
||||
{
|
||||
hermite_val[0] = hermite (r_frac, r_left [0], r_left [1], r_left [2], r_left [3]);
|
||||
hermite_val[1] = hermite (r_frac, r_right[0], r_right[1], r_right[2], r_right[3]);
|
||||
data[o_position] = SHORT_CLAMP (hermite_val[0]);
|
||||
data[o_position + 1] = SHORT_CLAMP (hermite_val[1]);
|
||||
|
||||
o_position += 2;
|
||||
|
||||
r_frac += r_step;
|
||||
}
|
||||
|
||||
if (r_frac > 1.0)
|
||||
{
|
||||
r_left [0] = r_left [1];
|
||||
r_left [1] = r_left [2];
|
||||
r_left [2] = r_left [3];
|
||||
r_left [3] = s_left;
|
||||
|
||||
r_right[0] = r_right[1];
|
||||
r_right[1] = r_right[2];
|
||||
r_right[2] = r_right[3];
|
||||
r_right[3] = s_right;
|
||||
|
||||
r_frac -= 1.0;
|
||||
|
||||
i_position += 2;
|
||||
if (i_position >= max_samples)
|
||||
i_position -= max_samples;
|
||||
consumed += 2;
|
||||
}
|
||||
}
|
||||
|
||||
size -= consumed << 1;
|
||||
start += consumed << 1;
|
||||
if (start >= buffer_size)
|
||||
start -= buffer_size;
|
||||
}
|
||||
|
||||
inline int
|
||||
avail (void)
|
||||
{
|
||||
return (int) floor (((size >> 2) - r_frac) / r_step) * 2;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* __HERMITE_RESAMPLER_H */
|
||||
@@ -1,504 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
/* Simple fixed-point linear resampler by BearOso*/
|
||||
|
||||
#ifndef __LINEAR_RESAMPLER_H
|
||||
#define __LINEAR_RESAMPLER_H
|
||||
|
||||
#include "resampler.h"
|
||||
#include "snes9x.h"
|
||||
|
||||
static const int f_prec = 15;
|
||||
static const uint32 f__one = (1 << f_prec);
|
||||
|
||||
#define lerp(t, a, b) (((((b) - (a)) * (t)) >> f_prec) + (a))
|
||||
|
||||
class LinearResampler : public Resampler
|
||||
{
|
||||
protected:
|
||||
uint32 f__r_step;
|
||||
uint32 f__inv_r_step;
|
||||
uint32 f__r_frac;
|
||||
int r_left, r_right;
|
||||
|
||||
public:
|
||||
LinearResampler (int num_samples) : Resampler (num_samples)
|
||||
{
|
||||
f__r_frac = 0;
|
||||
}
|
||||
|
||||
~LinearResampler ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
time_ratio (double ratio)
|
||||
{
|
||||
if (ratio == 0.0)
|
||||
ratio = 1.0;
|
||||
f__r_step = (uint32) (ratio * f__one);
|
||||
f__inv_r_step = (uint32) (f__one / ratio);
|
||||
clear ();
|
||||
}
|
||||
|
||||
void
|
||||
clear (void)
|
||||
{
|
||||
ring_buffer::clear ();
|
||||
f__r_frac = 0;
|
||||
r_left = 0;
|
||||
r_right = 0;
|
||||
}
|
||||
|
||||
void
|
||||
read (short *data, int num_samples)
|
||||
{
|
||||
int i_position = start >> 1;
|
||||
short *internal_buffer = (short *) buffer;
|
||||
int o_position = 0;
|
||||
int consumed = 0;
|
||||
int max_samples = (buffer_size >> 1);
|
||||
|
||||
while (o_position < num_samples && consumed < buffer_size)
|
||||
{
|
||||
if (f__r_step == f__one)
|
||||
{
|
||||
data[o_position] = internal_buffer[i_position];
|
||||
data[o_position + 1] = internal_buffer[i_position + 1];
|
||||
|
||||
o_position += 2;
|
||||
i_position += 2;
|
||||
if (i_position >= max_samples)
|
||||
i_position -= max_samples;
|
||||
consumed += 2;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
while (f__r_frac <= f__one && o_position < num_samples)
|
||||
{
|
||||
data[o_position] = lerp (f__r_frac,
|
||||
r_left,
|
||||
internal_buffer[i_position]);
|
||||
data[o_position + 1] = lerp (f__r_frac,
|
||||
r_right,
|
||||
internal_buffer[i_position + 1]);
|
||||
|
||||
o_position += 2;
|
||||
|
||||
f__r_frac += f__r_step;
|
||||
}
|
||||
|
||||
if (f__r_frac > f__one)
|
||||
{
|
||||
f__r_frac -= f__one;
|
||||
r_left = internal_buffer[i_position];
|
||||
r_right = internal_buffer[i_position + 1];
|
||||
i_position += 2;
|
||||
if (i_position >= max_samples)
|
||||
i_position -= max_samples;
|
||||
consumed += 2;
|
||||
}
|
||||
}
|
||||
|
||||
size -= consumed << 1;
|
||||
start += consumed << 1;
|
||||
if (start >= buffer_size)
|
||||
start -= buffer_size;
|
||||
}
|
||||
|
||||
inline int
|
||||
avail (void)
|
||||
{
|
||||
return (((size >> 2) * f__inv_r_step) - ((f__r_frac * f__inv_r_step) >> f_prec)) >> (f_prec - 1);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* __LINEAR_RESAMPLER_H */
|
||||
@@ -1,60 +0,0 @@
|
||||
/* Simple resampler based on bsnes's ruby audio library */
|
||||
|
||||
#ifndef __RESAMPLER_H
|
||||
#define __RESAMPLER_H
|
||||
|
||||
#include "ring_buffer.h"
|
||||
|
||||
class Resampler : public ring_buffer
|
||||
{
|
||||
public:
|
||||
virtual void clear (void) = 0;
|
||||
virtual void time_ratio (double) = 0;
|
||||
virtual void read (short *, int) = 0;
|
||||
virtual int avail (void) = 0;
|
||||
|
||||
Resampler (int num_samples) : ring_buffer (num_samples << 1)
|
||||
{
|
||||
}
|
||||
|
||||
~Resampler ()
|
||||
{
|
||||
}
|
||||
|
||||
inline bool
|
||||
push (short *src, int num_samples)
|
||||
{
|
||||
if (max_write () < num_samples)
|
||||
return false;
|
||||
|
||||
!num_samples || ring_buffer::push ((unsigned char *) src, num_samples << 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
inline int
|
||||
space_empty (void)
|
||||
{
|
||||
return buffer_size - size;
|
||||
}
|
||||
|
||||
inline int
|
||||
space_filled (void)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
inline int
|
||||
max_write (void)
|
||||
{
|
||||
return space_empty () >> 1;
|
||||
}
|
||||
|
||||
inline void
|
||||
resize (int num_samples)
|
||||
{
|
||||
ring_buffer::resize (num_samples << 1);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* __RESAMPLER_H */
|
||||
@@ -1,111 +0,0 @@
|
||||
/* Simple byte-based ring buffer. Licensed under public domain (C) BearOso. */
|
||||
|
||||
#ifndef __RING_BUFFER_H
|
||||
#define __RING_BUFFER_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#undef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
class ring_buffer
|
||||
{
|
||||
protected:
|
||||
int size;
|
||||
int buffer_size;
|
||||
int start;
|
||||
unsigned char *buffer;
|
||||
|
||||
public:
|
||||
ring_buffer (int buffer_size)
|
||||
{
|
||||
this->buffer_size = buffer_size;
|
||||
buffer = new unsigned char[this->buffer_size];
|
||||
memset (buffer, 0, this->buffer_size);
|
||||
|
||||
size = 0;
|
||||
start = 0;
|
||||
}
|
||||
|
||||
~ring_buffer (void)
|
||||
{
|
||||
delete[] buffer;
|
||||
}
|
||||
|
||||
bool
|
||||
push (unsigned char *src, int bytes)
|
||||
{
|
||||
if (space_empty () < bytes)
|
||||
return false;
|
||||
|
||||
int end = (start + size) % buffer_size;
|
||||
int first_write_size = MIN (bytes, buffer_size - end);
|
||||
|
||||
memcpy (buffer + end, src, first_write_size);
|
||||
|
||||
if (bytes > first_write_size)
|
||||
memcpy (buffer, src + first_write_size, bytes - first_write_size);
|
||||
|
||||
size += bytes;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
pull (unsigned char *dst, int bytes)
|
||||
{
|
||||
if (space_filled () < bytes)
|
||||
return false;
|
||||
|
||||
memcpy (dst, buffer + start, MIN (bytes, buffer_size - start));
|
||||
|
||||
if (bytes > (buffer_size - start))
|
||||
memcpy (dst + (buffer_size - start), buffer, bytes - (buffer_size - start));
|
||||
|
||||
start = (start + bytes) % buffer_size;
|
||||
size -= bytes;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
inline int
|
||||
space_empty (void)
|
||||
{
|
||||
return buffer_size - size;
|
||||
}
|
||||
|
||||
inline int
|
||||
space_filled (void)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
void
|
||||
clear (void)
|
||||
{
|
||||
start = 0;
|
||||
size = 0;
|
||||
memset (buffer, 0, buffer_size);
|
||||
}
|
||||
|
||||
void
|
||||
resize (int size)
|
||||
{
|
||||
delete[] buffer;
|
||||
buffer_size = size;
|
||||
buffer = new unsigned char[buffer_size];
|
||||
memset (buffer, 0, this->buffer_size);
|
||||
|
||||
size = 0;
|
||||
start = 0;
|
||||
}
|
||||
|
||||
inline void
|
||||
cache_silence (void)
|
||||
{
|
||||
clear ();
|
||||
size = buffer_size;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,212 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _BSX_H_
|
||||
#define _BSX_H_
|
||||
|
||||
struct SBSX
|
||||
{
|
||||
bool8 dirty; // Changed register values
|
||||
bool8 dirty2; // Changed register values
|
||||
bool8 bootup; // Start in bios mapping
|
||||
bool8 flash_enable; // Flash state
|
||||
bool8 write_enable; // ROM write protection
|
||||
bool8 read_enable; // Allow card vendor reading
|
||||
uint32 flash_command; // Flash command
|
||||
uint32 old_write; // Previous flash write address
|
||||
uint32 new_write; // Current flash write address
|
||||
uint8 out_index;
|
||||
uint8 output[32];
|
||||
uint8 PPU[32];
|
||||
uint8 MMC[16];
|
||||
uint8 prevMMC[16];
|
||||
uint8 test2192[32];
|
||||
};
|
||||
|
||||
extern struct SBSX BSX;
|
||||
|
||||
uint8 S9xGetBSX (uint32);
|
||||
void S9xSetBSX (uint8, uint32);
|
||||
uint8 S9xGetBSXPPU (uint16);
|
||||
void S9xSetBSXPPU (uint8, uint16);
|
||||
uint8 * S9xGetBasePointerBSX (uint32);
|
||||
void S9xInitBSX (void);
|
||||
void S9xResetBSX (void);
|
||||
void S9xBSXPostLoadState (void);
|
||||
|
||||
#endif
|
||||
@@ -1,331 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
|
||||
#define C4_PI 3.14159265
|
||||
|
||||
int16 C4WFXVal;
|
||||
int16 C4WFYVal;
|
||||
int16 C4WFZVal;
|
||||
int16 C4WFX2Val;
|
||||
int16 C4WFY2Val;
|
||||
int16 C4WFDist;
|
||||
int16 C4WFScale;
|
||||
int16 C41FXVal;
|
||||
int16 C41FYVal;
|
||||
int16 C41FAngleRes;
|
||||
int16 C41FDist;
|
||||
int16 C41FDistVal;
|
||||
|
||||
static double tanval;
|
||||
static double c4x, c4y, c4z;
|
||||
static double c4x2, c4y2, c4z2;
|
||||
|
||||
|
||||
void C4TransfWireFrame (void)
|
||||
{
|
||||
c4x = (double) C4WFXVal;
|
||||
c4y = (double) C4WFYVal;
|
||||
c4z = (double) C4WFZVal - 0x95;
|
||||
|
||||
// Rotate X
|
||||
tanval = -(double) C4WFX2Val * C4_PI * 2 / 128;
|
||||
c4y2 = c4y * cos(tanval) - c4z * sin(tanval);
|
||||
c4z2 = c4y * sin(tanval) + c4z * cos(tanval);
|
||||
|
||||
// Rotate Y
|
||||
tanval = -(double) C4WFY2Val * C4_PI * 2 / 128;
|
||||
c4x2 = c4x * cos(tanval) + c4z2 * sin(tanval);
|
||||
c4z = c4x * -sin(tanval) + c4z2 * cos(tanval);
|
||||
|
||||
// Rotate Z
|
||||
tanval = -(double) C4WFDist * C4_PI * 2 / 128;
|
||||
c4x = c4x2 * cos(tanval) - c4y2 * sin(tanval);
|
||||
c4y = c4x2 * sin(tanval) + c4y2 * cos(tanval);
|
||||
|
||||
// Scale
|
||||
C4WFXVal = (int16) (c4x * (double) C4WFScale / (0x90 * (c4z + 0x95)) * 0x95);
|
||||
C4WFYVal = (int16) (c4y * (double) C4WFScale / (0x90 * (c4z + 0x95)) * 0x95);
|
||||
}
|
||||
|
||||
void C4TransfWireFrame2 (void)
|
||||
{
|
||||
c4x = (double) C4WFXVal;
|
||||
c4y = (double) C4WFYVal;
|
||||
c4z = (double) C4WFZVal;
|
||||
|
||||
// Rotate X
|
||||
tanval = -(double) C4WFX2Val * C4_PI * 2 / 128;
|
||||
c4y2 = c4y * cos(tanval) - c4z * sin(tanval);
|
||||
c4z2 = c4y * sin(tanval) + c4z * cos(tanval);
|
||||
|
||||
// Rotate Y
|
||||
tanval = -(double) C4WFY2Val * C4_PI * 2 / 128;
|
||||
c4x2 = c4x * cos(tanval) + c4z2 * sin(tanval);
|
||||
c4z = c4x * -sin(tanval) + c4z2 * cos(tanval);
|
||||
|
||||
// Rotate Z
|
||||
tanval = -(double) C4WFDist * C4_PI * 2 / 128;
|
||||
c4x = c4x2 * cos(tanval) - c4y2 * sin(tanval);
|
||||
c4y = c4x2 * sin(tanval) + c4y2 * cos(tanval);
|
||||
|
||||
// Scale
|
||||
C4WFXVal = (int16) (c4x * (double) C4WFScale / 0x100);
|
||||
C4WFYVal = (int16) (c4y * (double) C4WFScale / 0x100);
|
||||
}
|
||||
|
||||
void C4CalcWireFrame (void)
|
||||
{
|
||||
C4WFXVal = C4WFX2Val - C4WFXVal;
|
||||
C4WFYVal = C4WFY2Val - C4WFYVal;
|
||||
|
||||
if (abs(C4WFXVal) > abs(C4WFYVal))
|
||||
{
|
||||
C4WFDist = abs(C4WFXVal) + 1;
|
||||
C4WFYVal = (int16) (256 * (double) C4WFYVal / abs(C4WFXVal));
|
||||
if (C4WFXVal < 0)
|
||||
C4WFXVal = -256;
|
||||
else
|
||||
C4WFXVal = 256;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (C4WFYVal != 0)
|
||||
{
|
||||
C4WFDist = abs(C4WFYVal) + 1;
|
||||
C4WFXVal = (int16) (256 * (double) C4WFXVal / abs(C4WFYVal));
|
||||
if (C4WFYVal < 0)
|
||||
C4WFYVal = -256;
|
||||
else
|
||||
C4WFYVal = 256;
|
||||
}
|
||||
else
|
||||
C4WFDist = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void C4Op1F (void)
|
||||
{
|
||||
if (C41FXVal == 0)
|
||||
{
|
||||
if (C41FYVal > 0)
|
||||
C41FAngleRes = 0x80;
|
||||
else
|
||||
C41FAngleRes = 0x180;
|
||||
}
|
||||
else
|
||||
{
|
||||
tanval = (double) C41FYVal / C41FXVal;
|
||||
C41FAngleRes = (int16) (atan(tanval) / (C4_PI * 2) * 512);
|
||||
C41FAngleRes = C41FAngleRes;
|
||||
if (C41FXVal< 0)
|
||||
C41FAngleRes += 0x100;
|
||||
C41FAngleRes &= 0x1FF;
|
||||
}
|
||||
}
|
||||
|
||||
void C4Op15 (void)
|
||||
{
|
||||
tanval = sqrt((double) C41FYVal * C41FYVal + (double) C41FXVal * C41FXVal);
|
||||
C41FDist = (int16) tanval;
|
||||
}
|
||||
|
||||
void C4Op0D (void)
|
||||
{
|
||||
tanval = sqrt((double) C41FYVal * C41FYVal + (double) C41FXVal * C41FXVal);
|
||||
tanval = C41FDistVal / tanval;
|
||||
C41FYVal = (int16) (C41FYVal * tanval * 0.99);
|
||||
C41FXVal = (int16) (C41FXVal * tanval * 0.98);
|
||||
}
|
||||
|
||||
uint8 * S9xGetBasePointerC4 (uint16 Address)
|
||||
{
|
||||
if (Address >= 0x7f40 && Address <= 0x7f5e)
|
||||
return (NULL);
|
||||
return (Memory.C4RAM - 0x6000);
|
||||
}
|
||||
|
||||
uint8 * S9xGetMemPointerC4 (uint16 Address)
|
||||
{
|
||||
if (Address >= 0x7f40 && Address <= 0x7f5e)
|
||||
return (NULL);
|
||||
return (Memory.C4RAM - 0x6000 + (Address & 0xffff));
|
||||
}
|
||||
@@ -1,579 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
#include "cheats.h"
|
||||
|
||||
#define WRAM_BITS ALL_BITS
|
||||
#define SRAM_BITS ALL_BITS + (0x20000 >> 5)
|
||||
#define IRAM_BITS ALL_BITS + (0x30000 >> 5)
|
||||
|
||||
#define BIT_CLEAR(a, v) (a)[(v) >> 5] &= ~(1 << ((v) & 31))
|
||||
|
||||
#define TEST_BIT(a, v) ((a)[(v) >> 5] & (1 << ((v) & 31)))
|
||||
|
||||
#define _S9XCHTC(c, a, b) \
|
||||
((c) == S9X_LESS_THAN ? (a) < (b) : \
|
||||
(c) == S9X_GREATER_THAN ? (a) > (b) : \
|
||||
(c) == S9X_LESS_THAN_OR_EQUAL ? (a) <= (b) : \
|
||||
(c) == S9X_GREATER_THAN_OR_EQUAL ? (a) >= (b) : \
|
||||
(c) == S9X_EQUAL ? (a) == (b) : \
|
||||
(a) != (b))
|
||||
|
||||
#define _S9XCHTD(s, m, o) \
|
||||
((s) == S9X_8_BITS ? ((uint8) (*((m) + (o)))) : \
|
||||
(s) == S9X_16_BITS ? ((uint16) (*((m) + (o)) + (*((m) + (o) + 1) << 8))) : \
|
||||
(s) == S9X_24_BITS ? ((uint32) (*((m) + (o)) + (*((m) + (o) + 1) << 8) + (*((m) + (o) + 2) << 16))) : \
|
||||
((uint32) (*((m) + (o)) + (*((m) + (o) + 1) << 8) + (*((m) + (o) + 2) << 16) + (*((m) + (o) + 3) << 24))))
|
||||
|
||||
#define _S9XCHTDS(s, m, o) \
|
||||
((s) == S9X_8_BITS ? ((int8) (*((m) + (o)))) : \
|
||||
(s) == S9X_16_BITS ? ((int16) (*((m) + (o)) + (*((m) + (o) + 1) << 8))) : \
|
||||
(s) == S9X_24_BITS ? (((int32) ((*((m) + (o)) + (*((m) + (o) + 1) << 8) + (*((m) + (o) + 2) << 16)) << 8)) >> 8): \
|
||||
((int32) (*((m) + (o)) + (*((m) + (o) + 1) << 8) + (*((m) + (o) + 2) << 16) + (*((m) + (o) + 3) << 24))))
|
||||
|
||||
static bool8 S9xAllHex (const char *, int);
|
||||
|
||||
|
||||
static bool8 S9xAllHex (const char *code, int len)
|
||||
{
|
||||
for (int i = 0; i < len; i++)
|
||||
if ((code[i] < '0' || code[i] > '9') && (code[i] < 'a' || code[i] > 'f') && (code[i] < 'A' || code[i] > 'F'))
|
||||
return (FALSE);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
const char * S9xProActionReplayToRaw (const char *code, uint32 &address, uint8 &byte)
|
||||
{
|
||||
uint32 data = 0;
|
||||
|
||||
if (strlen(code) != 8 || !S9xAllHex(code, 8) || sscanf(code, "%x", &data) != 1)
|
||||
return ("Invalid Pro Action Replay code - should be 8 hex digits in length.");
|
||||
|
||||
address = data >> 8;
|
||||
byte = (uint8) data;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
const char * S9xGoldFingerToRaw (const char *code, uint32 &address, bool8 &sram, uint8 &num_bytes, uint8 bytes[3])
|
||||
{
|
||||
char tmp[15];
|
||||
int i;
|
||||
|
||||
if (strlen(code) != 14)
|
||||
return ("Invalid Gold Finger code - should be 14 hex digits in length.");
|
||||
|
||||
strncpy(tmp, code, 5);
|
||||
tmp[5] = 0;
|
||||
if (sscanf(tmp, "%x", &address) != 1)
|
||||
return ("Invalid Gold Finger code.");
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
unsigned int byte;
|
||||
|
||||
strncpy(tmp, code + 5 + i * 2, 2);
|
||||
tmp[2] = 0;
|
||||
if (sscanf(tmp, "%x", &byte) != 1)
|
||||
break;
|
||||
bytes[i] = (uint8) byte;
|
||||
}
|
||||
|
||||
num_bytes = i;
|
||||
sram = code[13] == '1';
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
const char * S9xGameGenieToRaw (const char *code, uint32 &address, uint8 &byte)
|
||||
{
|
||||
char new_code[12];
|
||||
|
||||
if (strlen(code) != 9 || *(code + 4) != '-' || !S9xAllHex(code, 4) || !S9xAllHex(code + 5, 4))
|
||||
return ("Invalid Game Genie(tm) code - should be 'xxxx-xxxx'.");
|
||||
|
||||
strcpy(new_code, "0x");
|
||||
strncpy(new_code + 2, code, 4);
|
||||
strcpy(new_code + 6, code + 5);
|
||||
|
||||
static const char *real_hex = "0123456789ABCDEF";
|
||||
static const char *genie_hex = "DF4709156BC8A23E";
|
||||
|
||||
for (int i = 2; i < 10; i++)
|
||||
{
|
||||
if (islower(new_code[i]))
|
||||
new_code[i] = toupper(new_code[i]);
|
||||
|
||||
int j;
|
||||
for (j = 0; j < 16; j++)
|
||||
{
|
||||
if (new_code[i] == genie_hex[j])
|
||||
{
|
||||
new_code[i] = real_hex[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j == 16)
|
||||
return ("Invalid hex-character in Game Genie(tm) code.");
|
||||
}
|
||||
|
||||
uint32 data = 0;
|
||||
sscanf(new_code, "%x", &data);
|
||||
byte = (uint8) (data >> 24);
|
||||
address = data & 0xffffff;
|
||||
address = ((address & 0x003c00) << 10) +
|
||||
((address & 0x00003c) << 14) +
|
||||
((address & 0xf00000) >> 8) +
|
||||
((address & 0x000003) << 10) +
|
||||
((address & 0x00c000) >> 6) +
|
||||
((address & 0x0f0000) >> 12) +
|
||||
((address & 0x0003c0) >> 6);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
void S9xStartCheatSearch (SCheatData *d)
|
||||
{
|
||||
memmove(d->CWRAM, d->RAM, 0x20000);
|
||||
memmove(d->CSRAM, d->SRAM, 0x10000);
|
||||
memmove(d->CIRAM, &d->FillRAM[0x3000], 0x2000);
|
||||
memset((char *) d->ALL_BITS, 0xff, 0x32000 >> 3);
|
||||
}
|
||||
|
||||
void S9xSearchForChange (SCheatData *d, S9xCheatComparisonType cmp, S9xCheatDataSize size, bool8 is_signed, bool8 update)
|
||||
{
|
||||
int l, i;
|
||||
|
||||
switch (size)
|
||||
{
|
||||
case S9X_8_BITS: l = 0; break;
|
||||
case S9X_16_BITS: l = 1; break;
|
||||
case S9X_24_BITS: l = 2; break;
|
||||
default:
|
||||
case S9X_32_BITS: l = 3; break;
|
||||
}
|
||||
|
||||
if (is_signed)
|
||||
{
|
||||
for (i = 0; i < 0x20000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->WRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTDS(size, d->RAM, i), _S9XCHTDS(size, d->CWRAM, i)))
|
||||
{
|
||||
if (update)
|
||||
d->CWRAM[i] = d->RAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->SRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTDS(size, d->SRAM, i), _S9XCHTDS(size, d->CSRAM, i)))
|
||||
{
|
||||
if (update)
|
||||
d->CSRAM[i] = d->SRAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x2000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->IRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTDS(size, d->FillRAM + 0x3000, i), _S9XCHTDS(size, d->CIRAM, i)))
|
||||
{
|
||||
if (update)
|
||||
d->CIRAM[i] = d->FillRAM[i + 0x3000];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->IRAM_BITS, i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 0x20000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->WRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTD(size, d->RAM, i), _S9XCHTD(size, d->CWRAM, i)))
|
||||
{
|
||||
if (update)
|
||||
d->CWRAM[i] = d->RAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->SRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTD(size, d->SRAM, i), _S9XCHTD(size, d->CSRAM, i)))
|
||||
{
|
||||
if (update)
|
||||
d->CSRAM[i] = d->SRAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x2000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->IRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTD(size, d->FillRAM + 0x3000, i), _S9XCHTD(size, d->CIRAM, i)))
|
||||
{
|
||||
if (update)
|
||||
d->CIRAM[i] = d->FillRAM[i + 0x3000];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->IRAM_BITS, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0x20000 - l; i < 0x20000; i++)
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
|
||||
for (i = 0x10000 - l; i < 0x10000; i++)
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
void S9xSearchForValue (SCheatData *d, S9xCheatComparisonType cmp, S9xCheatDataSize size, uint32 value, bool8 is_signed, bool8 update)
|
||||
{
|
||||
int l, i;
|
||||
|
||||
switch (size)
|
||||
{
|
||||
case S9X_8_BITS: l = 0; break;
|
||||
case S9X_16_BITS: l = 1; break;
|
||||
case S9X_24_BITS: l = 2; break;
|
||||
default:
|
||||
case S9X_32_BITS: l = 3; break;
|
||||
}
|
||||
|
||||
if (is_signed)
|
||||
{
|
||||
for (i = 0; i < 0x20000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->WRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTDS(size, d->RAM, i), (int32) value))
|
||||
{
|
||||
if (update)
|
||||
d->CWRAM[i] = d->RAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->SRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTDS(size, d->SRAM, i), (int32) value))
|
||||
{
|
||||
if (update)
|
||||
d->CSRAM[i] = d->SRAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x2000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->IRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTDS(size, d->FillRAM + 0x3000, i), (int32) value))
|
||||
{
|
||||
if (update)
|
||||
d->CIRAM[i] = d->FillRAM[i + 0x3000];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->IRAM_BITS, i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 0x20000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->WRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTD(size, d->RAM, i), value))
|
||||
{
|
||||
if (update)
|
||||
d->CWRAM[i] = d->RAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->SRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTD(size, d->SRAM, i), value))
|
||||
{
|
||||
if (update)
|
||||
d->CSRAM[i] = d->SRAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x2000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->IRAM_BITS, i) && _S9XCHTC(cmp, _S9XCHTD(size, d->FillRAM + 0x3000, i), value))
|
||||
{
|
||||
if (update)
|
||||
d->CIRAM[i] = d->FillRAM[i + 0x3000];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->IRAM_BITS, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0x20000 - l; i < 0x20000; i++)
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
|
||||
for (i = 0x10000 - l; i < 0x10000; i++)
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
void S9xSearchForAddress (SCheatData *d, S9xCheatComparisonType cmp, S9xCheatDataSize size, uint32 value, bool8 update)
|
||||
{
|
||||
int l, i;
|
||||
|
||||
switch (size)
|
||||
{
|
||||
case S9X_8_BITS: l = 0; break;
|
||||
case S9X_16_BITS: l = 1; break;
|
||||
case S9X_24_BITS: l = 2; break;
|
||||
default:
|
||||
case S9X_32_BITS: l = 3; break;
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x20000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->WRAM_BITS, i) && _S9XCHTC(cmp, i, (int32) value))
|
||||
{
|
||||
if (update)
|
||||
d->CWRAM[i] = d->RAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->SRAM_BITS, i) && _S9XCHTC(cmp, i + 0x20000, (int32) value))
|
||||
{
|
||||
if (update)
|
||||
d->CSRAM[i] = d->SRAM[i];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x2000 - l; i++)
|
||||
{
|
||||
if (TEST_BIT(d->IRAM_BITS, i) && _S9XCHTC(cmp, i + 0x30000, (int32) value))
|
||||
{
|
||||
if (update)
|
||||
d->CIRAM[i] = d->FillRAM[i + 0x3000];
|
||||
}
|
||||
else
|
||||
BIT_CLEAR(d->IRAM_BITS, i);
|
||||
}
|
||||
|
||||
for (i = 0x20000 - l; i < 0x20000; i++)
|
||||
BIT_CLEAR(d->WRAM_BITS, i);
|
||||
|
||||
for (i = 0x10000 - l; i < 0x10000; i++)
|
||||
BIT_CLEAR(d->SRAM_BITS, i);
|
||||
}
|
||||
|
||||
void S9xOutputCheatSearchResults (SCheatData *d)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 0x20000; i++)
|
||||
{
|
||||
if (TEST_BIT(d->WRAM_BITS, i))
|
||||
printf("WRAM: %05x: %02x\n", i, d->RAM[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10000; i++)
|
||||
{
|
||||
if (TEST_BIT(d->SRAM_BITS, i))
|
||||
printf("SRAM: %04x: %02x\n", i, d->SRAM[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x2000; i++)
|
||||
{
|
||||
if (TEST_BIT(d->IRAM_BITS, i))
|
||||
printf("IRAM: %05x: %02x\n", i, d->FillRAM[i + 0x3000]);
|
||||
}
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _CHEATS_H_
|
||||
#define _CHEATS_H_
|
||||
|
||||
#define MAX_CHEATS 150
|
||||
|
||||
struct SCheat
|
||||
{
|
||||
uint32 address;
|
||||
uint8 byte;
|
||||
uint8 saved_byte;
|
||||
bool8 enabled;
|
||||
bool8 saved;
|
||||
char name[22];
|
||||
};
|
||||
|
||||
struct SCheatData
|
||||
{
|
||||
struct SCheat c[MAX_CHEATS];
|
||||
uint32 num_cheats;
|
||||
uint8 CWRAM[0x20000];
|
||||
uint8 CSRAM[0x10000];
|
||||
uint8 CIRAM[0x2000];
|
||||
uint8 *RAM;
|
||||
uint8 *FillRAM;
|
||||
uint8 *SRAM;
|
||||
uint32 ALL_BITS[0x32000 >> 5];
|
||||
uint8 CWatchRAM[0x32000];
|
||||
};
|
||||
|
||||
struct Watch
|
||||
{
|
||||
bool on;
|
||||
int size;
|
||||
int format;
|
||||
uint32 address;
|
||||
char buf[12];
|
||||
char desc[32];
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
S9X_LESS_THAN,
|
||||
S9X_GREATER_THAN,
|
||||
S9X_LESS_THAN_OR_EQUAL,
|
||||
S9X_GREATER_THAN_OR_EQUAL,
|
||||
S9X_EQUAL,
|
||||
S9X_NOT_EQUAL
|
||||
} S9xCheatComparisonType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
S9X_8_BITS,
|
||||
S9X_16_BITS,
|
||||
S9X_24_BITS,
|
||||
S9X_32_BITS
|
||||
} S9xCheatDataSize;
|
||||
|
||||
extern SCheatData Cheat;
|
||||
extern Watch watches[16];
|
||||
|
||||
void S9xApplyCheat (uint32);
|
||||
void S9xApplyCheats (void);
|
||||
void S9xRemoveCheat (uint32);
|
||||
void S9xRemoveCheats (void);
|
||||
void S9xDeleteCheat (uint32);
|
||||
void S9xDeleteCheats (void);
|
||||
void S9xEnableCheat (uint32);
|
||||
void S9xDisableCheat (uint32);
|
||||
void S9xAddCheat (bool8, bool8, uint32, uint8);
|
||||
void S9xInitCheatData (void);
|
||||
void S9xInitWatchedAddress (void);
|
||||
bool8 S9xLoadCheatFile (const char *);
|
||||
bool8 S9xSaveCheatFile (const char *);
|
||||
|
||||
void S9xStartCheatSearch (SCheatData *);
|
||||
void S9xSearchForChange (SCheatData *, S9xCheatComparisonType, S9xCheatDataSize, bool8, bool8);
|
||||
void S9xSearchForValue (SCheatData *, S9xCheatComparisonType, S9xCheatDataSize, uint32, bool8, bool8);
|
||||
void S9xSearchForAddress (SCheatData *, S9xCheatComparisonType, S9xCheatDataSize, uint32, bool8);
|
||||
void S9xOutputCheatSearchResults (SCheatData *);
|
||||
|
||||
const char * S9xGameGenieToRaw (const char *, uint32 &, uint8 &);
|
||||
const char * S9xProActionReplayToRaw (const char *, uint32 &, uint8 &);
|
||||
const char * S9xGoldFingerToRaw (const char *, uint32 &, bool8 &, uint8 &, uint8 bytes[3]);
|
||||
|
||||
#endif
|
||||
@@ -1,407 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
#include "cheats.h"
|
||||
|
||||
static uint8 S9xGetByteFree (uint32);
|
||||
static void S9xSetByteFree (uint8, uint32);
|
||||
|
||||
|
||||
static uint8 S9xGetByteFree (uint32 address)
|
||||
{
|
||||
int32 Cycles = CPU.Cycles;
|
||||
int32 NextEvent = CPU.NextEvent;
|
||||
uint8 byte;
|
||||
|
||||
CPU.NextEvent = 0x7FFFFFFF;
|
||||
byte = S9xGetByte(address);
|
||||
CPU.NextEvent = NextEvent;
|
||||
CPU.Cycles = Cycles;
|
||||
|
||||
return (byte);
|
||||
}
|
||||
|
||||
static void S9xSetByteFree (uint8 byte, uint32 address)
|
||||
{
|
||||
int32 Cycles = CPU.Cycles;
|
||||
int32 NextEvent = CPU.NextEvent;
|
||||
|
||||
CPU.NextEvent = 0x7FFFFFFF;
|
||||
S9xSetByte(byte, address);
|
||||
CPU.NextEvent = NextEvent;
|
||||
CPU.Cycles = Cycles;
|
||||
}
|
||||
|
||||
void S9xInitWatchedAddress (void)
|
||||
{
|
||||
for (unsigned int i = 0; i < sizeof(watches) / sizeof(watches[0]); i++)
|
||||
watches[i].on = false;
|
||||
|
||||
}
|
||||
|
||||
void S9xInitCheatData (void)
|
||||
{
|
||||
Cheat.RAM = Memory.RAM;
|
||||
Cheat.SRAM = Memory.SRAM;
|
||||
Cheat.FillRAM = Memory.FillRAM;
|
||||
}
|
||||
|
||||
void S9xAddCheat (bool8 enable, bool8 save_current_value, uint32 address, uint8 byte)
|
||||
{
|
||||
if (Cheat.num_cheats < sizeof(Cheat.c) / sizeof(Cheat.c[0]))
|
||||
{
|
||||
Cheat.c[Cheat.num_cheats].address = address;
|
||||
Cheat.c[Cheat.num_cheats].byte = byte;
|
||||
Cheat.c[Cheat.num_cheats].enabled = enable;
|
||||
|
||||
if (save_current_value)
|
||||
{
|
||||
Cheat.c[Cheat.num_cheats].saved_byte = S9xGetByteFree(address);
|
||||
Cheat.c[Cheat.num_cheats].saved = TRUE;
|
||||
}
|
||||
|
||||
Cheat.num_cheats++;
|
||||
}
|
||||
}
|
||||
|
||||
void S9xDeleteCheat (uint32 which1)
|
||||
{
|
||||
if (which1 < Cheat.num_cheats)
|
||||
{
|
||||
if (Cheat.c[which1].enabled)
|
||||
S9xRemoveCheat(which1);
|
||||
|
||||
memmove(&Cheat.c[which1], &Cheat.c[which1 + 1], sizeof(Cheat.c[0]) * (Cheat.num_cheats - which1 - 1));
|
||||
|
||||
Cheat.num_cheats--;
|
||||
}
|
||||
}
|
||||
|
||||
void S9xDeleteCheats (void)
|
||||
{
|
||||
S9xRemoveCheats();
|
||||
Cheat.num_cheats = 0;
|
||||
}
|
||||
|
||||
void S9xRemoveCheat (uint32 which1)
|
||||
{
|
||||
if (Cheat.c[which1].saved)
|
||||
{
|
||||
uint32 address = Cheat.c[which1].address;
|
||||
|
||||
int block = (address & 0xffffff) >> MEMMAP_SHIFT;
|
||||
uint8 *ptr = Memory.Map[block];
|
||||
|
||||
if (ptr >= (uint8 *) CMemory::MAP_LAST)
|
||||
*(ptr + (address & 0xffff)) = Cheat.c[which1].saved_byte;
|
||||
else
|
||||
S9xSetByteFree(Cheat.c[which1].saved_byte, address);
|
||||
}
|
||||
}
|
||||
|
||||
void S9xRemoveCheats (void)
|
||||
{
|
||||
for (uint32 i = 0; i < Cheat.num_cheats; i++)
|
||||
if (Cheat.c[i].enabled)
|
||||
S9xRemoveCheat(i);
|
||||
}
|
||||
|
||||
void S9xEnableCheat (uint32 which1)
|
||||
{
|
||||
if (which1 < Cheat.num_cheats && !Cheat.c[which1].enabled)
|
||||
{
|
||||
Cheat.c[which1].enabled = TRUE;
|
||||
S9xApplyCheat(which1);
|
||||
}
|
||||
}
|
||||
|
||||
void S9xDisableCheat (uint32 which1)
|
||||
{
|
||||
if (which1 < Cheat.num_cheats && Cheat.c[which1].enabled)
|
||||
{
|
||||
S9xRemoveCheat(which1);
|
||||
Cheat.c[which1].enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void S9xApplyCheat (uint32 which1)
|
||||
{
|
||||
uint32 address = Cheat.c[which1].address;
|
||||
|
||||
if (!Cheat.c[which1].saved)
|
||||
{
|
||||
Cheat.c[which1].saved_byte = S9xGetByteFree(address);
|
||||
Cheat.c[which1].saved = TRUE;
|
||||
}
|
||||
|
||||
int block = (address & 0xffffff) >> MEMMAP_SHIFT;
|
||||
uint8 *ptr = Memory.Map[block];
|
||||
|
||||
if (ptr >= (uint8 *) CMemory::MAP_LAST)
|
||||
*(ptr + (address & 0xffff)) = Cheat.c[which1].byte;
|
||||
else
|
||||
S9xSetByteFree(Cheat.c[which1].byte, address);
|
||||
}
|
||||
|
||||
void S9xApplyCheats (void)
|
||||
{
|
||||
if (Settings.ApplyCheats)
|
||||
{
|
||||
for (uint32 i = 0; i < Cheat.num_cheats; i++)
|
||||
if (Cheat.c[i].enabled)
|
||||
S9xApplyCheat(i);
|
||||
}
|
||||
}
|
||||
|
||||
bool8 S9xLoadCheatFile (const char *filename)
|
||||
{
|
||||
FILE *fs;
|
||||
uint8 data[28];
|
||||
|
||||
Cheat.num_cheats = 0;
|
||||
|
||||
fs = fopen(filename, "rb");
|
||||
if (!fs)
|
||||
return (FALSE);
|
||||
|
||||
while (fread((void *) data, 1, 28, fs) == 28)
|
||||
{
|
||||
Cheat.c[Cheat.num_cheats].enabled = (data[0] & 4) == 0;
|
||||
Cheat.c[Cheat.num_cheats].byte = data[1];
|
||||
Cheat.c[Cheat.num_cheats].address = data[2] | (data[3] << 8) | (data[4] << 16);
|
||||
Cheat.c[Cheat.num_cheats].saved_byte = data[5];
|
||||
Cheat.c[Cheat.num_cheats].saved = (data[0] & 8) != 0;
|
||||
memmove(Cheat.c[Cheat.num_cheats].name, &data[8], 20);
|
||||
Cheat.c[Cheat.num_cheats++].name[20] = 0;
|
||||
}
|
||||
|
||||
fclose(fs);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
bool8 S9xSaveCheatFile (const char *filename)
|
||||
{
|
||||
if (Cheat.num_cheats == 0)
|
||||
{
|
||||
remove(filename);
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
FILE *fs;
|
||||
uint8 data[28];
|
||||
|
||||
fs = fopen(filename, "wb");
|
||||
if (!fs)
|
||||
return (FALSE);
|
||||
|
||||
for (uint32 i = 0; i < Cheat.num_cheats; i++)
|
||||
{
|
||||
ZeroMemory(data, 28);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
data[6] = 254;
|
||||
data[7] = 252;
|
||||
}
|
||||
|
||||
if (!Cheat.c[i].enabled)
|
||||
data[0] |= 4;
|
||||
|
||||
if (Cheat.c[i].saved)
|
||||
data[0] |= 8;
|
||||
|
||||
data[1] = Cheat.c[i].byte;
|
||||
data[2] = (uint8) (Cheat.c[i].address >> 0);
|
||||
data[3] = (uint8) (Cheat.c[i].address >> 8);
|
||||
data[4] = (uint8) (Cheat.c[i].address >> 16);
|
||||
data[5] = Cheat.c[i].saved_byte;
|
||||
|
||||
memmove(&data[8], Cheat.c[i].name, 19);
|
||||
|
||||
if (fwrite(data, 28, 1, fs) != 1)
|
||||
{
|
||||
fclose(fs);
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return (fclose(fs) == 0);
|
||||
}
|
||||
@@ -1,406 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
|
||||
static uint8 region_map[6][6] =
|
||||
{
|
||||
{ 0, 0x01, 0x03, 0x07, 0x0f, 0x1f },
|
||||
{ 0, 0, 0x02, 0x06, 0x0e, 0x1e },
|
||||
{ 0, 0, 0, 0x04, 0x0c, 0x1c },
|
||||
{ 0, 0, 0, 0, 0x08, 0x18 },
|
||||
{ 0, 0, 0, 0, 0, 0x10 }
|
||||
};
|
||||
|
||||
static inline uint8 CalcWindowMask (int, uint8, uint8);
|
||||
static inline void StoreWindowRegions (uint8, struct ClipData *, int, int16 *, uint8 *, bool8, bool8 s = FALSE);
|
||||
|
||||
|
||||
static inline uint8 CalcWindowMask (int i, uint8 W1, uint8 W2)
|
||||
{
|
||||
if (!PPU.ClipWindow1Enable[i])
|
||||
{
|
||||
if (!PPU.ClipWindow2Enable[i])
|
||||
return (0);
|
||||
else
|
||||
{
|
||||
if (!PPU.ClipWindow2Inside[i])
|
||||
return (~W2);
|
||||
return (W2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PPU.ClipWindow2Enable[i])
|
||||
{
|
||||
if (!PPU.ClipWindow1Inside[i])
|
||||
return (~W1);
|
||||
return (W1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PPU.ClipWindow1Inside[i])
|
||||
W1 = ~W1;
|
||||
if (!PPU.ClipWindow2Inside[i])
|
||||
W2 = ~W2;
|
||||
|
||||
switch (PPU.ClipWindowOverlapLogic[i])
|
||||
{
|
||||
case 0: // OR
|
||||
return (W1 | W2);
|
||||
|
||||
case 1: // AND
|
||||
return (W1 & W2);
|
||||
|
||||
case 2: // XOR
|
||||
return (W1 ^ W2);
|
||||
|
||||
case 3: // XNOR
|
||||
return (~(W1 ^ W2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Never get here
|
||||
return (0);
|
||||
}
|
||||
|
||||
static inline void StoreWindowRegions (uint8 Mask, struct ClipData *Clip, int n_regions, int16 *windows, uint8 *drawing_modes, bool8 sub, bool8 StoreMode0)
|
||||
{
|
||||
int ct = 0;
|
||||
|
||||
for (int j = 0; j < n_regions; j++)
|
||||
{
|
||||
int DrawMode = drawing_modes[j];
|
||||
if (sub)
|
||||
DrawMode |= 1;
|
||||
if (Mask & (1 << j))
|
||||
DrawMode = 0;
|
||||
|
||||
if (!StoreMode0 && !DrawMode)
|
||||
continue;
|
||||
|
||||
if (ct > 0 && Clip->Right[ct - 1] == windows[j] && Clip->DrawMode[ct - 1] == DrawMode)
|
||||
Clip->Right[ct - 1] = windows[j + 1]; // This region borders with and has the same drawing mode as the previous region: merge them.
|
||||
else
|
||||
{
|
||||
// Add a new region to the BG
|
||||
Clip->Left[ct] = windows[j];
|
||||
Clip->Right[ct] = windows[j + 1];
|
||||
Clip->DrawMode[ct] = DrawMode;
|
||||
ct++;
|
||||
}
|
||||
}
|
||||
|
||||
Clip->Count = ct;
|
||||
}
|
||||
|
||||
void S9xComputeClipWindows (void)
|
||||
{
|
||||
int16 windows[6] = { 0, 256, 256, 256, 256, 256 };
|
||||
uint8 drawing_modes[5] = { 0, 0, 0, 0, 0 };
|
||||
int n_regions = 1;
|
||||
int i, j;
|
||||
|
||||
// Calculate window regions. We have at most 5 regions, because we have 6 control points
|
||||
// (screen edges, window 1 left & right, and window 2 left & right).
|
||||
|
||||
if (PPU.Window1Left <= PPU.Window1Right)
|
||||
{
|
||||
if (PPU.Window1Left > 0)
|
||||
{
|
||||
windows[2] = 256;
|
||||
windows[1] = PPU.Window1Left;
|
||||
n_regions = 2;
|
||||
}
|
||||
|
||||
if (PPU.Window1Right < 255)
|
||||
{
|
||||
windows[n_regions + 1] = 256;
|
||||
windows[n_regions] = PPU.Window1Right + 1;
|
||||
n_regions++;
|
||||
}
|
||||
}
|
||||
|
||||
if (PPU.Window2Left <= PPU.Window2Right)
|
||||
{
|
||||
for (i = 0; i <= n_regions; i++)
|
||||
{
|
||||
if (PPU.Window2Left == windows[i])
|
||||
break;
|
||||
|
||||
if (PPU.Window2Left < windows[i])
|
||||
{
|
||||
for (j = n_regions; j >= i; j--)
|
||||
windows[j + 1] = windows[j];
|
||||
|
||||
windows[i] = PPU.Window2Left;
|
||||
n_regions++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (; i <= n_regions; i++)
|
||||
{
|
||||
if (PPU.Window2Right + 1 == windows[i])
|
||||
break;
|
||||
|
||||
if (PPU.Window2Right + 1 < windows[i])
|
||||
{
|
||||
for (j = n_regions; j >= i; j--)
|
||||
windows[j + 1] = windows[j];
|
||||
|
||||
windows[i] = PPU.Window2Right + 1;
|
||||
n_regions++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get a bitmap of which regions correspond to each window.
|
||||
|
||||
uint8 W1, W2;
|
||||
|
||||
if (PPU.Window1Left <= PPU.Window1Right)
|
||||
{
|
||||
for (i = 0; windows[i] != PPU.Window1Left; i++) ;
|
||||
for (j = i; windows[j] != PPU.Window1Right + 1; j++) ;
|
||||
W1 = region_map[i][j];
|
||||
}
|
||||
else
|
||||
W1 = 0;
|
||||
|
||||
if (PPU.Window2Left <= PPU.Window2Right)
|
||||
{
|
||||
for (i = 0; windows[i] != PPU.Window2Left; i++) ;
|
||||
for (j = i; windows[j] != PPU.Window2Right + 1; j++) ;
|
||||
W2 = region_map[i][j];
|
||||
}
|
||||
else
|
||||
W2 = 0;
|
||||
|
||||
// Color Window affects the drawing mode for each region.
|
||||
// Modes are: 3=Draw as normal, 2=clip color (math only), 1=no math (draw only), 0=nothing.
|
||||
|
||||
uint8 CW_color = 0, CW_math = 0;
|
||||
uint8 CW = CalcWindowMask(5, W1, W2);
|
||||
|
||||
switch (Memory.FillRAM[0x2130] & 0xc0)
|
||||
{
|
||||
case 0x00: CW_color = 0; break;
|
||||
case 0x40: CW_color = ~CW; break;
|
||||
case 0x80: CW_color = CW; break;
|
||||
case 0xc0: CW_color = 0xff; break;
|
||||
}
|
||||
|
||||
switch (Memory.FillRAM[0x2130] & 0x30)
|
||||
{
|
||||
case 0x00: CW_math = 0; break;
|
||||
case 0x10: CW_math = ~CW; break;
|
||||
case 0x20: CW_math = CW; break;
|
||||
case 0x30: CW_math = 0xff; break;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_regions; i++)
|
||||
{
|
||||
if (!(CW_color & (1 << i)))
|
||||
drawing_modes[i] |= 1;
|
||||
if (!(CW_math & (1 << i)))
|
||||
drawing_modes[i] |= 2;
|
||||
}
|
||||
|
||||
// Store backdrop clip window (draw everywhere color window allows)
|
||||
|
||||
StoreWindowRegions(0, &IPPU.Clip[0][5], n_regions, windows, drawing_modes, FALSE, TRUE);
|
||||
StoreWindowRegions(0, &IPPU.Clip[1][5], n_regions, windows, drawing_modes, TRUE, TRUE);
|
||||
|
||||
// Store per-BG and OBJ clip windows
|
||||
|
||||
for (j = 0; j < 5; j++)
|
||||
{
|
||||
uint8 W = Settings.DisableGraphicWindows ? 0 : CalcWindowMask(j, W1, W2);
|
||||
for (int sub = 0; sub < 2; sub++)
|
||||
{
|
||||
if (Memory.FillRAM[sub + 0x212e] & (1 << j))
|
||||
StoreWindowRegions(W, &IPPU.Clip[sub][j], n_regions, windows, drawing_modes, sub);
|
||||
else
|
||||
StoreWindowRegions(0, &IPPU.Clip[sub][j], n_regions, windows, drawing_modes, sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,339 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
#include "dma.h"
|
||||
#include "apu/apu.h"
|
||||
#include "fxemu.h"
|
||||
#include "sdd1.h"
|
||||
#include "srtc.h"
|
||||
#include "snapshot.h"
|
||||
#include "cheats.h"
|
||||
#include "logger.h"
|
||||
#ifdef DEBUGGER
|
||||
#include "debug.h"
|
||||
#endif
|
||||
|
||||
static void S9xResetCPU (void);
|
||||
static void S9xSoftResetCPU (void);
|
||||
|
||||
|
||||
static void S9xResetCPU (void)
|
||||
{
|
||||
S9xSoftResetCPU();
|
||||
Registers.SL = 0xff;
|
||||
Registers.P.W = 0;
|
||||
Registers.A.W = 0;
|
||||
Registers.X.W = 0;
|
||||
Registers.Y.W = 0;
|
||||
SetFlags(MemoryFlag | IndexFlag | IRQ | Emulation);
|
||||
ClearFlags(Decimal);
|
||||
}
|
||||
|
||||
static void S9xSoftResetCPU (void)
|
||||
{
|
||||
CPU.Cycles = 182; // Or 188. This is the cycle count just after the jump to the Reset Vector.
|
||||
CPU.PrevCycles = CPU.Cycles;
|
||||
CPU.V_Counter = 0;
|
||||
CPU.Flags = CPU.Flags & (DEBUG_MODE_FLAG | TRACE_FLAG);
|
||||
CPU.PCBase = NULL;
|
||||
CPU.NMILine = FALSE;
|
||||
CPU.IRQLine = FALSE;
|
||||
CPU.IRQTransition = FALSE;
|
||||
CPU.IRQLastState = FALSE;
|
||||
CPU.IRQExternal = FALSE;
|
||||
CPU.IRQPending = Timings.IRQPendCount;
|
||||
CPU.MemSpeed = SLOW_ONE_CYCLE;
|
||||
CPU.MemSpeedx2 = SLOW_ONE_CYCLE * 2;
|
||||
CPU.FastROMSpeed = SLOW_ONE_CYCLE;
|
||||
CPU.InDMA = FALSE;
|
||||
CPU.InHDMA = FALSE;
|
||||
CPU.InDMAorHDMA = FALSE;
|
||||
CPU.InWRAMDMAorHDMA = FALSE;
|
||||
CPU.HDMARanInDMA = 0;
|
||||
CPU.CurrentDMAorHDMAChannel = -1;
|
||||
CPU.WhichEvent = HC_RENDER_EVENT;
|
||||
CPU.NextEvent = Timings.RenderPos;
|
||||
CPU.WaitingForInterrupt = FALSE;
|
||||
CPU.AutoSaveTimer = 0;
|
||||
CPU.SRAMModified = FALSE;
|
||||
|
||||
Registers.PBPC = 0;
|
||||
Registers.PB = 0;
|
||||
Registers.PCw = S9xGetWord(0xfffc);
|
||||
OpenBus = Registers.PCh;
|
||||
Registers.D.W = 0;
|
||||
Registers.DB = 0;
|
||||
Registers.SH = 1;
|
||||
Registers.SL -= 3;
|
||||
Registers.XH = 0;
|
||||
Registers.YH = 0;
|
||||
|
||||
ICPU.ShiftedPB = 0;
|
||||
ICPU.ShiftedDB = 0;
|
||||
SetFlags(MemoryFlag | IndexFlag | IRQ | Emulation);
|
||||
ClearFlags(Decimal);
|
||||
|
||||
Timings.InterlaceField = FALSE;
|
||||
Timings.H_Max = Timings.H_Max_Master;
|
||||
Timings.V_Max = Timings.V_Max_Master;
|
||||
Timings.NMITriggerPos = 0xffff;
|
||||
if (Model->_5A22 == 2)
|
||||
Timings.WRAMRefreshPos = SNES_WRAM_REFRESH_HC_v2;
|
||||
else
|
||||
Timings.WRAMRefreshPos = SNES_WRAM_REFRESH_HC_v1;
|
||||
|
||||
S9xSetPCBase(Registers.PBPC);
|
||||
|
||||
ICPU.S9xOpcodes = S9xOpcodesE1;
|
||||
ICPU.S9xOpLengths = S9xOpLengthsM1X1;
|
||||
|
||||
S9xUnpackStatus();
|
||||
}
|
||||
|
||||
void S9xReset (void)
|
||||
{
|
||||
S9xResetSaveTimer(FALSE);
|
||||
S9xResetLogger();
|
||||
|
||||
memset(Memory.RAM, 0x55, 0x20000);
|
||||
memset(Memory.VRAM, 0x00, 0x10000);
|
||||
ZeroMemory(Memory.FillRAM, 0x8000);
|
||||
|
||||
if (Settings.BS)
|
||||
S9xResetBSX();
|
||||
|
||||
S9xResetCPU();
|
||||
S9xResetPPU();
|
||||
S9xResetDMA();
|
||||
S9xResetAPU();
|
||||
|
||||
if (Settings.DSP)
|
||||
S9xResetDSP();
|
||||
if (Settings.SuperFX)
|
||||
S9xResetSuperFX();
|
||||
if (Settings.SA1)
|
||||
S9xSA1Init();
|
||||
if (Settings.SDD1)
|
||||
S9xResetSDD1();
|
||||
if (Settings.SPC7110)
|
||||
S9xResetSPC7110();
|
||||
if (Settings.C4)
|
||||
S9xInitC4();
|
||||
if (Settings.OBC1)
|
||||
S9xResetOBC1();
|
||||
if (Settings.SRTC)
|
||||
S9xResetSRTC();
|
||||
|
||||
S9xInitCheatData();
|
||||
}
|
||||
|
||||
void S9xSoftReset (void)
|
||||
{
|
||||
S9xResetSaveTimer(FALSE);
|
||||
|
||||
ZeroMemory(Memory.FillRAM, 0x8000);
|
||||
|
||||
if (Settings.BS)
|
||||
S9xResetBSX();
|
||||
|
||||
S9xSoftResetCPU();
|
||||
S9xSoftResetPPU();
|
||||
S9xResetDMA();
|
||||
S9xSoftResetAPU();
|
||||
|
||||
if (Settings.DSP)
|
||||
S9xResetDSP();
|
||||
if (Settings.SuperFX)
|
||||
S9xResetSuperFX();
|
||||
if (Settings.SA1)
|
||||
S9xSA1Init();
|
||||
if (Settings.SDD1)
|
||||
S9xResetSDD1();
|
||||
if (Settings.SPC7110)
|
||||
S9xResetSPC7110();
|
||||
if (Settings.C4)
|
||||
S9xInitC4();
|
||||
if (Settings.OBC1)
|
||||
S9xResetOBC1();
|
||||
if (Settings.SRTC)
|
||||
S9xResetSRTC();
|
||||
|
||||
S9xInitCheatData();
|
||||
}
|
||||
@@ -1,316 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _CPUEXEC_H_
|
||||
#define _CPUEXEC_H_
|
||||
|
||||
#include "ppu.h"
|
||||
#ifdef DEBUGGER
|
||||
#include "debug.h"
|
||||
#endif
|
||||
|
||||
struct SOpcodes
|
||||
{
|
||||
void (*S9xOpcode) (void);
|
||||
};
|
||||
|
||||
struct SICPU
|
||||
{
|
||||
struct SOpcodes *S9xOpcodes;
|
||||
uint8 *S9xOpLengths;
|
||||
uint8 _Carry;
|
||||
uint8 _Zero;
|
||||
uint8 _Negative;
|
||||
uint8 _Overflow;
|
||||
uint32 ShiftedPB;
|
||||
uint32 ShiftedDB;
|
||||
uint32 Frame;
|
||||
uint32 FrameAdvanceCount;
|
||||
};
|
||||
|
||||
extern struct SICPU ICPU;
|
||||
|
||||
extern struct SOpcodes S9xOpcodesE1[256];
|
||||
extern struct SOpcodes S9xOpcodesM1X1[256];
|
||||
extern struct SOpcodes S9xOpcodesM1X0[256];
|
||||
extern struct SOpcodes S9xOpcodesM0X1[256];
|
||||
extern struct SOpcodes S9xOpcodesM0X0[256];
|
||||
extern struct SOpcodes S9xOpcodesSlow[256];
|
||||
extern uint8 S9xOpLengthsM1X1[256];
|
||||
extern uint8 S9xOpLengthsM1X0[256];
|
||||
extern uint8 S9xOpLengthsM0X1[256];
|
||||
extern uint8 S9xOpLengthsM0X0[256];
|
||||
|
||||
void S9xMainLoop (void);
|
||||
void S9xReset (void);
|
||||
void S9xSoftReset (void);
|
||||
void S9xDoHEventProcessing (void);
|
||||
|
||||
static inline void S9xUnpackStatus (void)
|
||||
{
|
||||
ICPU._Zero = (Registers.PL & Zero) == 0;
|
||||
ICPU._Negative = (Registers.PL & Negative);
|
||||
ICPU._Carry = (Registers.PL & Carry);
|
||||
ICPU._Overflow = (Registers.PL & Overflow) >> 6;
|
||||
}
|
||||
|
||||
static inline void S9xPackStatus (void)
|
||||
{
|
||||
Registers.PL &= ~(Zero | Negative | Carry | Overflow);
|
||||
Registers.PL |= ICPU._Carry | ((ICPU._Zero == 0) << 1) | (ICPU._Negative & 0x80) | (ICPU._Overflow << 6);
|
||||
}
|
||||
|
||||
static inline void S9xFixCycles (void)
|
||||
{
|
||||
if (CheckEmulation())
|
||||
{
|
||||
ICPU.S9xOpcodes = S9xOpcodesE1;
|
||||
ICPU.S9xOpLengths = S9xOpLengthsM1X1;
|
||||
}
|
||||
else
|
||||
if (CheckMemory())
|
||||
{
|
||||
if (CheckIndex())
|
||||
{
|
||||
ICPU.S9xOpcodes = S9xOpcodesM1X1;
|
||||
ICPU.S9xOpLengths = S9xOpLengthsM1X1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ICPU.S9xOpcodes = S9xOpcodesM1X0;
|
||||
ICPU.S9xOpLengths = S9xOpLengthsM1X0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CheckIndex())
|
||||
{
|
||||
ICPU.S9xOpcodes = S9xOpcodesM0X1;
|
||||
ICPU.S9xOpLengths = S9xOpLengthsM0X1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ICPU.S9xOpcodes = S9xOpcodesM0X0;
|
||||
ICPU.S9xOpLengths = S9xOpLengthsM0X0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void S9xCheckInterrupts (void)
|
||||
{
|
||||
bool8 thisIRQ = PPU.HTimerEnabled || PPU.VTimerEnabled;
|
||||
|
||||
if (CPU.IRQLine && thisIRQ)
|
||||
CPU.IRQTransition = TRUE;
|
||||
|
||||
if (PPU.HTimerEnabled)
|
||||
{
|
||||
int32 htimepos = PPU.HTimerPosition;
|
||||
if (CPU.Cycles >= Timings.H_Max && htimepos < CPU.PrevCycles)
|
||||
htimepos += Timings.H_Max;
|
||||
|
||||
if (CPU.PrevCycles >= htimepos || CPU.Cycles < htimepos)
|
||||
thisIRQ = FALSE;
|
||||
}
|
||||
|
||||
if (PPU.VTimerEnabled)
|
||||
{
|
||||
int32 vcounter = CPU.V_Counter;
|
||||
if (CPU.Cycles >= Timings.H_Max && (!PPU.HTimerEnabled || PPU.HTimerPosition < CPU.PrevCycles)) {
|
||||
vcounter++;
|
||||
if(vcounter >= Timings.V_Max)
|
||||
vcounter = 0;
|
||||
}
|
||||
|
||||
if (vcounter != PPU.VTimerPosition)
|
||||
thisIRQ = FALSE;
|
||||
}
|
||||
|
||||
if (!CPU.IRQLastState && thisIRQ)
|
||||
{
|
||||
#ifdef DEBUGGER
|
||||
S9xTraceFormattedMessage("--- /IRQ High->Low prev HC:%04d curr HC:%04d HTimer:%d Pos:%04d VTimer:%d Pos:%03d",
|
||||
CPU.PrevCycles, CPU.Cycles, PPU.HTimerEnabled, PPU.HTimerPosition, PPU.VTimerEnabled, PPU.VTimerPosition);
|
||||
#endif
|
||||
CPU.IRQLine = TRUE;
|
||||
}
|
||||
|
||||
CPU.IRQLastState = thisIRQ;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,190 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _CPUOPS_H_
|
||||
#define _CPUOPS_H_
|
||||
|
||||
void S9xOpcode_NMI (void);
|
||||
void S9xOpcode_IRQ (void);
|
||||
|
||||
#ifndef SA1_OPCODES
|
||||
#define CHECK_FOR_IRQ() {} // if (CPU.IRQLine) S9xOpcode_IRQ(); }
|
||||
#else
|
||||
#define CHECK_FOR_IRQ() {}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,234 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _CROSSHAIRS_H_
|
||||
#define _CROSSHAIRS_H_
|
||||
|
||||
// Read in the specified crosshair file, replacing whatever data might be in that slot.
|
||||
// Available slots are 1-31.
|
||||
// The input file must be a PNG or a text file.
|
||||
// PNG: 15x15 pixels, palettized, with 3 colors (white, black, and transparent).
|
||||
// text: 15 lines of 16 characters (counting the \n), consisting of ' ', '#', or '.'.
|
||||
|
||||
bool S9xLoadCrosshairFile (int idx, const char *filename);
|
||||
|
||||
// Return the specified crosshair. Woo-hoo.
|
||||
// char * to a 225-byte string, with '#' marking foreground, '.' marking background,
|
||||
// and anything else transparent.
|
||||
|
||||
const char * S9xGetCrosshair (int idx);
|
||||
|
||||
// In controls.cpp. Sets the crosshair for the specified device. Defaults are:
|
||||
// cross fgcolor bgcolor
|
||||
// Mouse 1: 1 White Black
|
||||
// Mouse 2: 1 Purple White
|
||||
// Superscope: 2 White Black
|
||||
// Justifier 1: 4 Blue Black
|
||||
// Justifier 2: 4 MagicPink Black
|
||||
//
|
||||
// Available colors are: Trans, Black, 25Grey, 50Grey, 75Grey, White, Red, Orange,
|
||||
// Yellow, Green, Cyan, Sky, Blue, Violet, MagicPink, and Purple.
|
||||
// You may also prefix a 't' (e.g. tBlue) for a 50%-transparent version.
|
||||
// Use idx = -1 or fg/bg = NULL to keep the current setting.
|
||||
|
||||
enum crosscontrols
|
||||
{
|
||||
X_MOUSE1,
|
||||
X_MOUSE2,
|
||||
X_SUPERSCOPE,
|
||||
X_JUSTIFIER1,
|
||||
X_JUSTIFIER2
|
||||
};
|
||||
|
||||
void S9xSetControllerCrosshair (enum crosscontrols ctl, int8 idx, const char *fg, const char *bg);
|
||||
void S9xGetControllerCrosshair (enum crosscontrols ctl, int8 *idx, const char **fg, const char **bg);
|
||||
|
||||
// In gfx.cpp, much like S9xDisplayChar() except it takes the parameters
|
||||
// listed and looks up GFX.Screen.
|
||||
// The 'crosshair' arg is a 15x15 image, with '#' meaning fgcolor,
|
||||
// '.' meaning bgcolor, and anything else meaning transparent.
|
||||
// Color values should be (RGB):
|
||||
// 0 = transparent 4 = 23 23 23 8 = 31 31 0 12 = 0 0 31
|
||||
// 1 = 0 0 0 5 = 31 31 31 9 = 0 31 0 13 = 23 0 31
|
||||
// 2 = 8 8 8 6 = 31 0 0 10 = 0 31 31 14 = 31 0 31
|
||||
// 3 = 16 16 16 7 = 31 16 0 11 = 0 23 31 15 = 31 0 16
|
||||
// 16-31 are 50% transparent versions of 0-15.
|
||||
|
||||
void S9xDrawCrosshair (const char *crosshair, uint8 fgcolor, uint8 bgcolor, int16 x, int16 y);
|
||||
|
||||
#endif
|
||||
@@ -1,212 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifdef DEBUGGER
|
||||
|
||||
#ifndef _DEBUG_H_
|
||||
#define _DEBUG_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
struct SBreakPoint
|
||||
{
|
||||
bool8 Enabled;
|
||||
uint8 Bank;
|
||||
uint16 Address;
|
||||
};
|
||||
|
||||
#define ENSURE_TRACE_OPEN(fp, file, mode) \
|
||||
if (!fp) \
|
||||
{ \
|
||||
std::string fn = S9xGetDirectory(LOG_DIR); \
|
||||
fn += SLASH_STR file; \
|
||||
fp = fopen(fn.c_str(), mode); \
|
||||
}
|
||||
|
||||
extern struct SBreakPoint S9xBreakpoint[6];
|
||||
|
||||
void S9xDoDebug (void);
|
||||
void S9xTrace (void);
|
||||
void S9xSA1Trace (void);
|
||||
void S9xTraceMessage (const char *);
|
||||
void S9xTraceFormattedMessage (const char *, ...);
|
||||
void S9xPrintHVPosition (char *);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,236 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _DISPLAY_H_
|
||||
#define _DISPLAY_H_
|
||||
|
||||
enum s9x_getdirtype
|
||||
{
|
||||
DEFAULT_DIR = 0,
|
||||
HOME_DIR,
|
||||
ROMFILENAME_DIR,
|
||||
ROM_DIR,
|
||||
SRAM_DIR,
|
||||
SNAPSHOT_DIR,
|
||||
SCREENSHOT_DIR,
|
||||
SPC_DIR,
|
||||
CHEAT_DIR,
|
||||
IPS_DIR,
|
||||
BIOS_DIR,
|
||||
LOG_DIR,
|
||||
LAST_DIR
|
||||
};
|
||||
|
||||
void S9xUsage (void);
|
||||
char * S9xParseArgs (char **, int);
|
||||
void S9xLoadConfigFiles (char **, int);
|
||||
void S9xSetInfoString (const char *);
|
||||
|
||||
// Routines the port has to implement even if it doesn't use them
|
||||
|
||||
void S9xPutImage (int, int);
|
||||
void S9xInitDisplay (int, char **);
|
||||
void S9xDeinitDisplay (void);
|
||||
void S9xTextMode (void);
|
||||
void S9xGraphicsMode (void);
|
||||
void S9xSetPalette (void);
|
||||
void S9xToggleSoundChannel (int);
|
||||
bool8 S9xOpenSnapshotFile (const char *, bool8, STREAM *);
|
||||
void S9xCloseSnapshotFile (STREAM);
|
||||
const char * S9xStringInput (const char *);
|
||||
const char * S9xGetDirectory (enum s9x_getdirtype);
|
||||
const char * S9xGetFilename (const char *, enum s9x_getdirtype);
|
||||
const char * S9xGetFilenameInc (const char *, enum s9x_getdirtype);
|
||||
const char * S9xChooseFilename (bool8);
|
||||
const char * S9xBasename (const char *);
|
||||
|
||||
// Routines the port has to implement if it uses command-line
|
||||
|
||||
void S9xExtraUsage (void);
|
||||
void S9xParseArg (char **, int &, int);
|
||||
|
||||
// Routines the port may implement as needed
|
||||
|
||||
void S9xExtraDisplayUsage (void);
|
||||
void S9xParseDisplayArg (char **, int &, int);
|
||||
void S9xSetTitle (const char *);
|
||||
void S9xInitInputDevices (void);
|
||||
void S9xProcessEvents (bool8);
|
||||
const char * S9xSelectFilename (const char *, const char *, const char *, const char *);
|
||||
|
||||
#endif
|
||||
@@ -1,212 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _DMA_H_
|
||||
#define _DMA_H_
|
||||
|
||||
struct SDMA
|
||||
{
|
||||
bool8 ReverseTransfer;
|
||||
bool8 HDMAIndirectAddressing;
|
||||
bool8 UnusedBit43x0;
|
||||
bool8 AAddressFixed;
|
||||
bool8 AAddressDecrement;
|
||||
uint8 TransferMode;
|
||||
uint8 BAddress;
|
||||
uint16 AAddress;
|
||||
uint8 ABank;
|
||||
uint16 DMACount_Or_HDMAIndirectAddress;
|
||||
uint8 IndirectBank;
|
||||
uint16 Address;
|
||||
uint8 Repeat;
|
||||
uint8 LineCount;
|
||||
uint8 UnknownByte;
|
||||
uint8 DoTransfer;
|
||||
};
|
||||
|
||||
#define TransferBytes DMACount_Or_HDMAIndirectAddress
|
||||
#define IndirectAddress DMACount_Or_HDMAIndirectAddress
|
||||
|
||||
extern struct SDMA DMA[8];
|
||||
|
||||
bool8 S9xDoDMA (uint8);
|
||||
void S9xStartHDMA (void);
|
||||
uint8 S9xDoHDMA (uint8);
|
||||
void S9xResetDMA (void);
|
||||
|
||||
#endif
|
||||
@@ -1,230 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
#ifdef DEBUGGER
|
||||
#include "missing.h"
|
||||
#endif
|
||||
|
||||
uint8 (*GetDSP) (uint16) = NULL;
|
||||
void (*SetDSP) (uint8, uint16) = NULL;
|
||||
|
||||
|
||||
void S9xResetDSP (void)
|
||||
{
|
||||
memset(&DSP1, 0, sizeof(DSP1));
|
||||
DSP1.waiting4command = TRUE;
|
||||
DSP1.first_parameter = TRUE;
|
||||
|
||||
memset(&DSP2, 0, sizeof(DSP2));
|
||||
DSP2.waiting4command = TRUE;
|
||||
|
||||
memset(&DSP3, 0, sizeof(DSP3));
|
||||
DSP3_Reset();
|
||||
|
||||
memset(&DSP4, 0, sizeof(DSP4));
|
||||
DSP4.waiting4command = TRUE;
|
||||
}
|
||||
|
||||
uint8 S9xGetDSP (uint16 address)
|
||||
{
|
||||
#ifdef DEBUGGER
|
||||
if (Settings.TraceDSP)
|
||||
{
|
||||
sprintf(String, "DSP read: 0x%04X", address);
|
||||
S9xMessage(S9X_TRACE, S9X_TRACE_DSP1, String);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ((*GetDSP)(address));
|
||||
}
|
||||
|
||||
void S9xSetDSP (uint8 byte, uint16 address)
|
||||
{
|
||||
#ifdef DEBUGGER
|
||||
missing.unknowndsp_write = address;
|
||||
if (Settings.TraceDSP)
|
||||
{
|
||||
sprintf(String, "DSP write: 0x%04X=0x%02X", address, byte);
|
||||
S9xMessage(S9X_TRACE, S9X_TRACE_DSP1, String);
|
||||
}
|
||||
#endif
|
||||
|
||||
(*SetDSP)(byte, address);
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _FXEMU_H_
|
||||
#define _FXEMU_H_
|
||||
|
||||
#define FX_BREAKPOINT (-1)
|
||||
#define FX_ERROR_ILLEGAL_ADDRESS (-2)
|
||||
|
||||
// The FxInfo_s structure, the link between the FxEmulator and the Snes Emulator
|
||||
struct FxInfo_s
|
||||
{
|
||||
uint32 vFlags;
|
||||
uint8 *pvRegisters; // 768 bytes located in the memory at address 0x3000
|
||||
uint32 nRamBanks; // Number of 64kb-banks in GSU-RAM/BackupRAM (banks 0x70-0x73)
|
||||
uint8 *pvRam; // Pointer to GSU-RAM
|
||||
uint32 nRomBanks; // Number of 32kb-banks in Cart-ROM
|
||||
uint8 *pvRom; // Pointer to Cart-ROM
|
||||
uint32 speedPerLine;
|
||||
bool8 oneLineDone;
|
||||
};
|
||||
|
||||
extern struct FxInfo_s SuperFX;
|
||||
|
||||
void S9xInitSuperFX (void);
|
||||
void S9xResetSuperFX (void);
|
||||
void S9xSuperFXExec (void);
|
||||
void S9xSetSuperFX (uint8, uint16);
|
||||
uint8 S9xGetSuperFX (uint16);
|
||||
void fx_flushCache (void);
|
||||
void fx_computeScreenPointers (void);
|
||||
uint32 fx_run (uint32);
|
||||
|
||||
#endif
|
||||
@@ -1,367 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _GFX_H_
|
||||
#define _GFX_H_
|
||||
|
||||
struct SGFX
|
||||
{
|
||||
uint16 *Screen;
|
||||
uint16 *SubScreen;
|
||||
uint8 *ZBuffer;
|
||||
uint8 *SubZBuffer;
|
||||
uint32 Pitch;
|
||||
uint32 ScreenSize;
|
||||
uint16 *S;
|
||||
uint8 *DB;
|
||||
uint16 *X2;
|
||||
uint16 *ZERO;
|
||||
uint32 RealPPL; // true PPL of Screen buffer
|
||||
uint32 PPL; // number of pixels on each of Screen buffer
|
||||
uint32 LinesPerTile; // number of lines in 1 tile (4 or 8 due to interlace)
|
||||
uint16 *ScreenColors; // screen colors for rendering main
|
||||
uint16 *RealScreenColors; // screen colors, ignoring color window clipping
|
||||
uint8 Z1; // depth for comparison
|
||||
uint8 Z2; // depth to save
|
||||
uint32 FixedColour;
|
||||
uint8 DoInterlace;
|
||||
uint8 InterlaceFrame;
|
||||
uint32 StartY;
|
||||
uint32 EndY;
|
||||
bool8 ClipColors;
|
||||
uint8 OBJWidths[128];
|
||||
uint8 OBJVisibleTiles[128];
|
||||
|
||||
struct ClipData *Clip;
|
||||
|
||||
struct
|
||||
{
|
||||
uint8 RTOFlags;
|
||||
int16 Tiles;
|
||||
|
||||
struct
|
||||
{
|
||||
int8 Sprite;
|
||||
uint8 Line;
|
||||
} OBJ[32];
|
||||
} OBJLines[SNES_HEIGHT_EXTENDED];
|
||||
|
||||
#ifdef GFX_MULTI_FORMAT
|
||||
uint32 PixelFormat;
|
||||
uint32 (*BuildPixel) (uint32, uint32, uint32);
|
||||
uint32 (*BuildPixel2) (uint32, uint32, uint32);
|
||||
void (*DecomposePixel) (uint32, uint32 &, uint32 &, uint32 &);
|
||||
#endif
|
||||
|
||||
void (*DrawBackdropMath) (uint32, uint32, uint32);
|
||||
void (*DrawBackdropNomath) (uint32, uint32, uint32);
|
||||
void (*DrawTileMath) (uint32, uint32, uint32, uint32);
|
||||
void (*DrawTileNomath) (uint32, uint32, uint32, uint32);
|
||||
void (*DrawClippedTileMath) (uint32, uint32, uint32, uint32, uint32, uint32);
|
||||
void (*DrawClippedTileNomath) (uint32, uint32, uint32, uint32, uint32, uint32);
|
||||
void (*DrawMosaicPixelMath) (uint32, uint32, uint32, uint32, uint32, uint32);
|
||||
void (*DrawMosaicPixelNomath) (uint32, uint32, uint32, uint32, uint32, uint32);
|
||||
void (*DrawMode7BG1Math) (uint32, uint32, int);
|
||||
void (*DrawMode7BG1Nomath) (uint32, uint32, int);
|
||||
void (*DrawMode7BG2Math) (uint32, uint32, int);
|
||||
void (*DrawMode7BG2Nomath) (uint32, uint32, int);
|
||||
|
||||
const char *InfoString;
|
||||
uint32 InfoStringTimeout;
|
||||
char FrameDisplayString[256];
|
||||
};
|
||||
|
||||
struct SBG
|
||||
{
|
||||
uint8 (*ConvertTile) (uint8 *, uint32, uint32);
|
||||
uint8 (*ConvertTileFlip) (uint8 *, uint32, uint32);
|
||||
|
||||
uint32 TileSizeH;
|
||||
uint32 TileSizeV;
|
||||
uint32 OffsetSizeH;
|
||||
uint32 OffsetSizeV;
|
||||
uint32 TileShift;
|
||||
uint32 TileAddress;
|
||||
uint32 NameSelect;
|
||||
uint32 SCBase;
|
||||
|
||||
uint32 StartPalette;
|
||||
uint32 PaletteShift;
|
||||
uint32 PaletteMask;
|
||||
uint8 EnableMath;
|
||||
uint8 InterlaceLine;
|
||||
|
||||
uint8 *Buffer;
|
||||
uint8 *BufferFlip;
|
||||
uint8 *Buffered;
|
||||
uint8 *BufferedFlip;
|
||||
bool8 DirectColourMode;
|
||||
};
|
||||
|
||||
struct SLineData
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint16 VOffset;
|
||||
uint16 HOffset;
|
||||
} BG[4];
|
||||
};
|
||||
|
||||
struct SLineMatrixData
|
||||
{
|
||||
short MatrixA;
|
||||
short MatrixB;
|
||||
short MatrixC;
|
||||
short MatrixD;
|
||||
short CentreX;
|
||||
short CentreY;
|
||||
short M7HOFS;
|
||||
short M7VOFS;
|
||||
};
|
||||
|
||||
extern uint16 BlackColourMap[256];
|
||||
extern uint16 DirectColourMaps[8][256];
|
||||
extern uint8 mul_brightness[16][32];
|
||||
extern struct SBG BG;
|
||||
extern struct SGFX GFX;
|
||||
|
||||
#define H_FLIP 0x4000
|
||||
#define V_FLIP 0x8000
|
||||
#define BLANK_TILE 2
|
||||
|
||||
#define COLOR_ADD1_2(C1, C2) \
|
||||
((((((C1) & RGB_REMOVE_LOW_BITS_MASK) + \
|
||||
((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1) + \
|
||||
((C1) & (C2) & RGB_LOW_BITS_MASK)) | ALPHA_BITS_MASK)
|
||||
|
||||
#define COLOR_ADD(C1, C2) \
|
||||
(GFX.X2[((((C1) & RGB_REMOVE_LOW_BITS_MASK) + \
|
||||
((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1) + \
|
||||
((C1) & (C2) & RGB_LOW_BITS_MASK)] | \
|
||||
(((C1) ^ (C2)) & RGB_LOW_BITS_MASK))
|
||||
|
||||
#define COLOR_SUB1_2(C1, C2) \
|
||||
GFX.ZERO[(((C1) | RGB_HI_BITS_MASKx2) - \
|
||||
((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1]
|
||||
|
||||
inline uint16 COLOR_SUB (uint16 C1, uint16 C2)
|
||||
{
|
||||
uint16 mC1, mC2, v = ALPHA_BITS_MASK;
|
||||
|
||||
mC1 = C1 & FIRST_COLOR_MASK;
|
||||
mC2 = C2 & FIRST_COLOR_MASK;
|
||||
if (mC1 > mC2) v += (mC1 - mC2);
|
||||
|
||||
mC1 = C1 & SECOND_COLOR_MASK;
|
||||
mC2 = C2 & SECOND_COLOR_MASK;
|
||||
if (mC1 > mC2) v += (mC1 - mC2);
|
||||
|
||||
mC1 = C1 & THIRD_COLOR_MASK;
|
||||
mC2 = C2 & THIRD_COLOR_MASK;
|
||||
if (mC1 > mC2) v += (mC1 - mC2);
|
||||
|
||||
return (v);
|
||||
}
|
||||
|
||||
void S9xStartScreenRefresh (void);
|
||||
void S9xEndScreenRefresh (void);
|
||||
void S9xUpdateScreen (void);
|
||||
void S9xBuildDirectColourMaps (void);
|
||||
void RenderLine (uint8);
|
||||
void S9xComputeClipWindows (void);
|
||||
void S9xDisplayChar (uint16 *, uint8);
|
||||
// called automatically unless Settings.AutoDisplayMessages is false
|
||||
void S9xDisplayMessages (uint16 *, int, int, int, int);
|
||||
#ifdef GFX_MULTI_FORMAT
|
||||
bool8 S9xSetRenderPixelFormat (int);
|
||||
#endif
|
||||
|
||||
// external port interface which must be implemented or initialised for each port
|
||||
bool8 S9xGraphicsInit (void);
|
||||
void S9xGraphicsDeinit (void);
|
||||
bool8 S9xInitUpdate (void);
|
||||
bool8 S9xDeinitUpdate (int, int);
|
||||
bool8 S9xContinueUpdate (int, int);
|
||||
void S9xReRefresh (void);
|
||||
void S9xSetPalette (void);
|
||||
void S9xSyncSpeed (void);
|
||||
|
||||
// called instead of S9xDisplayString if set to non-NULL
|
||||
extern void (*S9xCustomDisplayString) (const char *, int, int, bool);
|
||||
|
||||
#endif
|
||||
@@ -1,203 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _LANGUAGE_H_
|
||||
#define _LANGUAGE_H_
|
||||
|
||||
// Movie Messages
|
||||
#define MOVIE_ERR_SNAPSHOT_WRONG_MOVIE "Snapshot not from this movie"
|
||||
#define MOVIE_ERR_SNAPSHOT_NOT_MOVIE "Not a movie snapshot"
|
||||
#define MOVIE_INFO_REPLAY "Movie replay"
|
||||
#define MOVIE_INFO_RECORD "Movie record"
|
||||
#define MOVIE_INFO_RERECORD "Movie re-record"
|
||||
#define MOVIE_INFO_REWIND "Movie rewind"
|
||||
#define MOVIE_INFO_STOP "Movie stop"
|
||||
#define MOVIE_INFO_END "Movie end"
|
||||
#define MOVIE_INFO_SNAPSHOT "Movie snapshot"
|
||||
#define MOVIE_ERR_SNAPSHOT_INCONSISTENT "Snapshot inconsistent with movie"
|
||||
|
||||
// Snapshot Messages
|
||||
#define SAVE_INFO_SNAPSHOT "Saved"
|
||||
#define SAVE_INFO_LOAD "Loaded"
|
||||
#define SAVE_INFO_OOPS "Auto-saving 'oops' snapshot"
|
||||
#define SAVE_ERR_WRONG_FORMAT "File not in Snes9x snapshot format"
|
||||
#define SAVE_ERR_WRONG_VERSION "Incompatable snapshot version"
|
||||
#define SAVE_ERR_ROM_NOT_FOUND "ROM image \"%s\" for snapshot not found"
|
||||
#define SAVE_ERR_SAVE_NOT_FOUND "Snapshot %s does not exist"
|
||||
|
||||
#endif
|
||||
@@ -1,320 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifdef UNZIP_SUPPORT
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include "unzip/unzip.h"
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
|
||||
|
||||
bool8 LoadZip (const char *zipname, uint32 *TotalFileSize, uint8 *buffer)
|
||||
{
|
||||
*TotalFileSize = 0;
|
||||
|
||||
unzFile file = unzOpen(zipname);
|
||||
if (file == NULL)
|
||||
return (FALSE);
|
||||
|
||||
// find largest file in zip file (under MAX_ROM_SIZE) or a file with extension .1
|
||||
char filename[132];
|
||||
uint32 filesize = 0;
|
||||
int port = unzGoToFirstFile(file);
|
||||
|
||||
unz_file_info info;
|
||||
|
||||
while (port == UNZ_OK)
|
||||
{
|
||||
char name[132];
|
||||
unzGetCurrentFileInfo(file, &info, name, 128, NULL, 0, NULL, 0);
|
||||
|
||||
if (info.uncompressed_size > CMemory::MAX_ROM_SIZE + 512)
|
||||
{
|
||||
port = unzGoToNextFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (info.uncompressed_size > filesize)
|
||||
{
|
||||
strcpy(filename, name);
|
||||
filesize = info.uncompressed_size;
|
||||
}
|
||||
|
||||
int len = strlen(name);
|
||||
if (len > 2 && name[len - 2] == '.' && name[len - 1] == '1')
|
||||
{
|
||||
strcpy(filename, name);
|
||||
filesize = info.uncompressed_size;
|
||||
break;
|
||||
}
|
||||
|
||||
port = unzGoToNextFile(file);
|
||||
}
|
||||
|
||||
if (!(port == UNZ_END_OF_LIST_OF_FILE || port == UNZ_OK) || filesize == 0)
|
||||
{
|
||||
assert(unzClose(file) == UNZ_OK);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
// find extension
|
||||
char tmp[2] = { 0, 0 };
|
||||
char *ext = strrchr(filename, '.');
|
||||
if (ext)
|
||||
ext++;
|
||||
else
|
||||
ext = tmp;
|
||||
|
||||
uint8 *ptr = buffer;
|
||||
bool8 more = FALSE;
|
||||
|
||||
unzLocateFile(file, filename, 1);
|
||||
unzGetCurrentFileInfo(file, &info, filename, 128, NULL, 0, NULL, 0);
|
||||
|
||||
if (unzOpenCurrentFile(file) != UNZ_OK)
|
||||
{
|
||||
unzClose(file);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
assert(info.uncompressed_size <= CMemory::MAX_ROM_SIZE + 512);
|
||||
|
||||
uint32 FileSize = info.uncompressed_size;
|
||||
int l = unzReadCurrentFile(file, ptr, FileSize);
|
||||
|
||||
if (unzCloseCurrentFile(file) == UNZ_CRCERROR)
|
||||
{
|
||||
unzClose(file);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (l <= 0 || l != FileSize)
|
||||
{
|
||||
unzClose(file);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
FileSize = Memory.HeaderRemove(FileSize, ptr);
|
||||
ptr += FileSize;
|
||||
*TotalFileSize += FileSize;
|
||||
|
||||
int len;
|
||||
|
||||
if (ptr - Memory.ROM < CMemory::MAX_ROM_SIZE + 512 && (isdigit(ext[0]) && ext[1] == 0 && ext[0] < '9'))
|
||||
{
|
||||
more = TRUE;
|
||||
ext[0]++;
|
||||
}
|
||||
else
|
||||
if (ptr - Memory.ROM < CMemory::MAX_ROM_SIZE + 512)
|
||||
{
|
||||
if (ext == tmp)
|
||||
len = strlen(filename);
|
||||
else
|
||||
len = ext - filename - 1;
|
||||
|
||||
if ((len == 7 || len == 8) && strncasecmp(filename, "sf", 2) == 0 &&
|
||||
isdigit(filename[2]) && isdigit(filename[3]) && isdigit(filename[4]) &&
|
||||
isdigit(filename[5]) && isalpha(filename[len - 1]))
|
||||
{
|
||||
more = TRUE;
|
||||
filename[len - 1]++;
|
||||
}
|
||||
}
|
||||
else
|
||||
more = FALSE;
|
||||
|
||||
if (more)
|
||||
{
|
||||
if (unzLocateFile(file, filename, 1) != UNZ_OK ||
|
||||
unzGetCurrentFileInfo(file, &info, filename, 128, NULL, 0, NULL, 0) != UNZ_OK ||
|
||||
unzOpenCurrentFile(file) != UNZ_OK)
|
||||
break;
|
||||
}
|
||||
} while (more);
|
||||
|
||||
unzClose(file);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,268 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "movie.h"
|
||||
#include "logger.h"
|
||||
|
||||
static int resetno = 0;
|
||||
static int framecounter = 0;
|
||||
static FILE *video = NULL;
|
||||
static FILE *audio = NULL;
|
||||
|
||||
|
||||
void S9xResetLogger (void)
|
||||
{
|
||||
if (!Settings.DumpStreams)
|
||||
return;
|
||||
|
||||
char buffer[128];
|
||||
|
||||
S9xCloseLogger();
|
||||
framecounter = 0;
|
||||
|
||||
sprintf(buffer, "videostream%d.dat", resetno);
|
||||
video = fopen(buffer, "wb");
|
||||
if (!video)
|
||||
{
|
||||
printf("Opening %s failed. Logging cancelled.\n", buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(buffer, "audiostream%d.dat", resetno);
|
||||
audio = fopen(buffer, "wb");
|
||||
if (!audio)
|
||||
{
|
||||
printf("Opening %s failed. Logging cancelled.\n", buffer);
|
||||
fclose(video);
|
||||
return;
|
||||
}
|
||||
|
||||
resetno++;
|
||||
}
|
||||
|
||||
void S9xCloseLogger (void)
|
||||
{
|
||||
if (video)
|
||||
{
|
||||
fclose(video);
|
||||
video = NULL;
|
||||
}
|
||||
|
||||
if (audio)
|
||||
{
|
||||
fclose(audio);
|
||||
audio = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void S9xVideoLogger (void *pixels, int width, int height, int depth, int bytes_per_line)
|
||||
{
|
||||
int fc = S9xMovieGetFrameCounter();
|
||||
if (fc > 0)
|
||||
framecounter = fc;
|
||||
else
|
||||
framecounter++;
|
||||
|
||||
if (video)
|
||||
{
|
||||
char *data = (char *) pixels;
|
||||
size_t ignore;
|
||||
|
||||
for (int i = 0; i < height; i++)
|
||||
ignore = fwrite(data + i * bytes_per_line, depth, width, video);
|
||||
fflush(video);
|
||||
fflush(audio);
|
||||
|
||||
if (Settings.DumpStreamsMaxFrames > 0 && framecounter >= Settings.DumpStreamsMaxFrames)
|
||||
{
|
||||
printf("Logging ended.\n");
|
||||
S9xCloseLogger();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void S9xAudioLogger (void *samples, int length)
|
||||
{
|
||||
if (audio)
|
||||
{
|
||||
size_t ignore;
|
||||
ignore = fwrite(samples, 1, length, audio);
|
||||
}
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _LOGGER_H_
|
||||
#define _LOGGER_H_
|
||||
|
||||
void S9xResetLogger(void);
|
||||
void S9xCloseLogger(void);
|
||||
void S9xVideoLogger(void *, int, int, int, int);
|
||||
void S9xAudioLogger(void *, int);
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
CFBundleName = "Snes9x";
|
||||
CFBundleShortVersionString = "1.53";
|
||||
CFBundleGetInfoString = "Snes9x 1.53, Copyright 1996-2011 Snes9x developers.";
|
||||
@@ -1,85 +0,0 @@
|
||||
"Address" = "Address";
|
||||
"Value" = "Value";
|
||||
"Description" = "Description";
|
||||
|
||||
// Mes: replace ROM name with @
|
||||
// Pos: position of @ (UniChar count)
|
||||
|
||||
"OpenROMMes" = "Choose a ROM image";
|
||||
"FreezeToMes" = "Save the @ freeze file";
|
||||
"FreezeToPos" = "10";
|
||||
"DefrostFromMes" = "Choose a @ freeze file";
|
||||
"DefrostFromPos" = "10";
|
||||
"NPROMNameMes" = "Server requests @.";
|
||||
"NPROMNamePos" = "17";
|
||||
"RecordToMes" = "Save the @ movie file";
|
||||
"RecordToPos" = "10";
|
||||
"PlayFromMes" = "Choose a @ movie file";
|
||||
"PlayFromPos" = "10";
|
||||
"QTRecordMes" = "Save the @ QuickTime movie";
|
||||
"QTRecordPos" = "10";
|
||||
|
||||
"MoviePrevMes" = "Date :\nTime :\nLength :\nFrames :"; // indexes of info area
|
||||
"MoviePrevWidth" = "120"; // width of info area
|
||||
"MoviePrevBorder" = "45"; // width of indexes column
|
||||
|
||||
"ClearMenu" = "Clear Menu";
|
||||
"NoneSelected" = "None Selected";
|
||||
|
||||
"NPReady" = "Ready";
|
||||
"NPConnecting" = "Connecting";
|
||||
"NPServerName" = "Server";
|
||||
|
||||
"AlertMes_01" = "The folder for saving files is not found.";
|
||||
"AlertMes_02" = "Application Support folder will be used instead.";
|
||||
"AlertMes_03" = "The folder for saving files is not writable.";
|
||||
"AlertMes_04" = "Application Support folder will be used instead.";
|
||||
"AlertMes_05" = "This ROM image has bad checksum, so might not work properly.";
|
||||
"AlertMes_06" = "Or failed to detect map / interleave.";
|
||||
"AlertMes_07" = "No enough space in Cheat Entry.";
|
||||
"AlertMes_08" = "Delete some cheats before.";
|
||||
"AlertMes_09" = "Snes9x cannot run on your system.";
|
||||
"AlertMes_10" = "System requirements: Mac OS X 10.3.9 or later, QuickTime 7 or later.";
|
||||
|
||||
"PresetNum" = "Preset #%ld";
|
||||
|
||||
"RunMenu" = "Run";
|
||||
"PauseMenu" = "Pause";
|
||||
|
||||
"ResetCIFilter" = "Reset All Parameters";
|
||||
|
||||
"SoundEffectDlg" = "Sound Effect";
|
||||
"CreateMetalDlg" = "NO"; // "YES" to metalize above dialogs
|
||||
|
||||
"RecordSMV1" = "1";
|
||||
"RecordSMV2" = "2";
|
||||
"RecordSMV3" = "3";
|
||||
"RecordSMV4" = "4";
|
||||
"RecordSMV5" = "5";
|
||||
"RecordSMV6" = "Players to Record :";
|
||||
"RecordSMV7" = "Comment :";
|
||||
"RecordSMV8" = "Reset";
|
||||
|
||||
"PlaySMV1" = "Read Only";
|
||||
"PlaySMV2" = "Export to QuickTime Movie at a Time";
|
||||
|
||||
"QTRecord1" = "Double Size";
|
||||
"QTRecord2" = "Overscan";
|
||||
"QTRecord3" = "Frame Skip :";
|
||||
"QTRecord4" = "Compression...";
|
||||
|
||||
"OpenROM1" = "Memory Type :";
|
||||
"OpenROM2" = "Video System :";
|
||||
"OpenROM3" = "Interleave Mode :";
|
||||
"OpenROM4" = "Header :";
|
||||
"OpenROM5" = "Auto Detect";
|
||||
"OpenROM6" = "Force LoROM";
|
||||
"OpenROM7" = "Force HiROM";
|
||||
"OpenROM8" = "Force PAL";
|
||||
"OpenROM9" = "Force NTSC";
|
||||
"OpenROMa" = "Force not Interleaved";
|
||||
"OpenROMb" = "Force Mode 1";
|
||||
"OpenROMc" = "Force Mode 2";
|
||||
"OpenROMd" = "Force GD24";
|
||||
"OpenROMe" = "Force no Header";
|
||||
"OpenROMf" = "Force Header";
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 679 B |
@@ -1,37 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Snes9x Help">
|
||||
<meta name="AppleTitle" content="Snes9x Help">
|
||||
<meta name="AppleIcon" content="Snes9x%20Help/gfx/s9xic16.png">
|
||||
<link href="sty/top.css" rel="stylesheet">
|
||||
<title>Snes9x Help</title>
|
||||
</head>
|
||||
<body style="background-color:#ffffff">
|
||||
<div id="frame">
|
||||
<div id="contentleft" style="text-align:center"><img src="gfx/s9xic128.png" alt="Snes9x icon" height="128" width="128">
|
||||
<h1>Snes9x Help</h1>
|
||||
<h2><a href="http://www.snes9x.com/">www.snes9x.com</a></h2>
|
||||
</div>
|
||||
<div id="contentright"><ul>
|
||||
<li><a href="pgs/01.html">Introduction</a></li>
|
||||
<li><a href="pgs/02.html">Getting Started</a></li>
|
||||
<li><a href="pgs/03.html">Requirements</a></li>
|
||||
<li><a href="pgs/04.html">Controllers Support</a></li>
|
||||
<li><a href="pgs/05.html">Peripherals Support</a></li>
|
||||
<li><a href="pgs/06.html">Game Saving</a></li>
|
||||
<li><a href="pgs/07.html">Cheat Support</a></li>
|
||||
<li><a href="pgs/08.html">Movie Support</a></li>
|
||||
<li><a href="pgs/09.html">Netplay Support</a></li>
|
||||
<li><a href="pgs/10.html">Miscellaneous</a></li>
|
||||
<li><a href="pgs/11.html">Compatibility</a></li>
|
||||
<li><a href="pgs/12.html">Problems</a></li>
|
||||
<li><a href="pgs/13.html">Technical Information</a></li>
|
||||
<li><a href="pgs/14.html">References</a></li>
|
||||
<li><a href="pgs/15.html">Credits</a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Introduction">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Introduction</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Introduction</h2>
|
||||
<h3>What is Snes9x?</h3>
|
||||
<p>
|
||||
Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you to play most games designed for the SNES and Super Famicom Nintendo game systems on your Mac, Linux, Windows and so on. The games include some real gems that were only ever released in Japan.
|
||||
</p>
|
||||
<p>
|
||||
The original Snes9x project was founded by Gary Henderson and Jerremy Koot as a collaboration of their earlier attempts at SNES emulation (Snes96 and Snes97.) Over the years the project has grown and has collected some of the greatest talent in the emulation community (at least of the SNES variety) some of which have been listed in the credits section, others have helped but have been loss in the course of time.
|
||||
</p>
|
||||
<h3>Why Emulate the SNES?</h3>
|
||||
<p>
|
||||
Well, there are many reasons for this. The main reason is for nostalgic purposes. In this day and age, it's hard to find an SNES and many good games. Plus, many of us over the course of time have lost our beloved consoles (may they R.I.P) but still have our original carts. With no other means to play them, we turn to emulators. Besides this there are many conveniences of doing this on the computer instead of dragging out your old system.
|
||||
</p>
|
||||
<h4>Advantages consist of :</h4>
|
||||
<ul>
|
||||
<li>ability to save in any location of the game, despite how the game was designed. It's amazingly useful when you don't want to redo the same level over and over.</li>
|
||||
<li>built-in peripherals. This is anything from multi-taps, to super scopes, to cheat devices.</li>
|
||||
<li>ability to rip sprites and music for your own personal use.</li>
|
||||
<li>easier to organize and no stacks of cartridges.</li>
|
||||
<li>filters can be used to enhance graphics and sounds on old games.</li>
|
||||
</ul>
|
||||
<h4>As with all things there are disadvantages though :</h4>
|
||||
<ul>
|
||||
<li>if you have an ancient computer, you aren't likely to get a playable experience.</li>
|
||||
<li>some games are still unemulated (though this a very tiny minority.)</li>
|
||||
<li>the emulator can be difficult for new users to configure.</li>
|
||||
</ul>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<Prev <a href="../index.html">Top</a> <a href="02.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,131 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Getting Started">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
<!-- ul { list-style-type:none } -->
|
||||
</style>
|
||||
<title>Getting Started</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Getting Started</h2>
|
||||
<p>
|
||||
Copy the Snes9x application from the disk image (.dmg) to your hard disk and double-click it.
|
||||
</p>
|
||||
<h3>Loading Games</h3>
|
||||
<p>
|
||||
Choose 'Open ROM Image...' in 'File' menu, select the game and start it. You can also drag and drop the ROM image onto the Snes9x icon. You may open a ROM image by double clicking on its icon in the Finder as well.
|
||||
</p>
|
||||
<p>
|
||||
SNES ROM images come in lots of different formats. Snes9x supports zipped ROMs as long as there is only 1 per zip file. Also Snes9x can open gzip and jma compressed files.
|
||||
</p>
|
||||
<h3>Game Color System</h3>
|
||||
<p>
|
||||
By default, Snes9x displays the ROM information when a ROM is first loaded. Depending on the colors used you can tell whether or not a ROM is a good working ROM, or if it's been altered or is corrupted.
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="text color">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">white</td>
|
||||
<td>the ROM should be a perfect working copy.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">green</td>
|
||||
<td>the ROM is mode 1 interleaved.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">orange</td>
|
||||
<td>the ROM is mode 2 interleaved.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">aqua</td>
|
||||
<td>the ROM is Game Doctor 24M interleaved.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">yellow</td>
|
||||
<td>the ROM has probably been altered. Either it's a translation, PD ROM, hacked, or possibly a bad ROM. It may also be an overdumped ROM.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">red</td>
|
||||
<td>the ROM is definitely hacked and that a proper version should be exist. Some ROM Tools such as NSRT can also fix these ROMs.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<p>
|
||||
When asking for help on the Snes9x forums, please list the color and CRC32 that is displayed. This will help to find out what the problem is.
|
||||
</p>
|
||||
<p>
|
||||
These colors do NOT signify whether a game will work or not. It is just a means for reference so we can understand what may or may not be a problem. Most often the problem with games that don't work it's because they are corrupt or are a bad dump and should be redumped.
|
||||
</p>
|
||||
<h3>SNES Joypad Emulation</h3>
|
||||
<p>
|
||||
The default key mapping for joypad 1 is as follows:
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="default key mapping">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">up arrow</td>
|
||||
<td>Up direction</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">down arrow</td>
|
||||
<td>Down direction</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">left arrow</td>
|
||||
<td>Left direction</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">right arrow</td>
|
||||
<td>Right direction</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">command</td>
|
||||
<td>A button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">option</td>
|
||||
<td>B button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">control</td>
|
||||
<td>X button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">shift</td>
|
||||
<td>Y button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Z</td>
|
||||
<td>L button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">X</td>
|
||||
<td>R button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">tab</td>
|
||||
<td>Select button</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">return</td>
|
||||
<td>Start button</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h3>Pausing and Resuming the Game</h3>
|
||||
<p>
|
||||
To pause the game, press pause key (esc key by default), choose 'Pause' in 'Emulation' menu, or click the game screen in case you aren't playing the game that uses a mouse. Double-click the game window or choose 'Resume' in 'Emulation' menu to resume the game.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="01.html">Prev</a> <a href="../index.html">Top</a> <a href="03.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,31 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Requirements">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Requirements</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Requirements</h2>
|
||||
<h3>System Requirements</h3>
|
||||
<p>
|
||||
Mac OS X 10.3.9 or later<br>
|
||||
QuickTime 7.0 or later<br>
|
||||
PowerPC G3 300MHz or later<br>
|
||||
G-Force/ATI Rage 128 or later
|
||||
</p>
|
||||
<p>
|
||||
Certain games use added hardware which will require a faster Mac. The specs listed above is the minimum to use Snes9x in any playable form. It is recommended that you get a semi-modern Mac with a 800MHz PowerPC processor if you want good results. A 1GHz PowerPC or Intel Mac is recommended for those that want a near perfect experience.
|
||||
</p>
|
||||
<h3>Software</h3>
|
||||
<p>
|
||||
You will need access to SNES ROM images otherwise you will have nothing to run! Some home-brewed ROM images can be downloaded from <a href="http://www.zophar.com/">http://www.zophar.com/</a>.<br>
|
||||
Please note, it is illegal in most countries to have commercial ROM images without also owning the actual SNES ROM cartridges, and even then you may be liable under various EULAs.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="02.html">Prev</a> <a href="../index.html">Top</a> <a href="04.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,204 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Controllers Support">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
<!-- ul { list-style-type:none } -->
|
||||
</style>
|
||||
<title>Controllers Support</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Controllers Support</h2>
|
||||
<p>
|
||||
The real SNES has two ports to connect input devices. Usually 1P and 2P SNES joypads are connected but various devices and adopters can be plugged.
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="input devices">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Multi Player 5</td>
|
||||
<td>known as Multi Tap; a five player adapter, allowing up to five people to play at once on games that supported it.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">SNES Mouse</td>
|
||||
<td>a 2-button mouse, originally supplied with a paint program.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Super Scope</td>
|
||||
<td>a light-gun; it used infrared to provide wireless communication between the gun and the console unit.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Justifier</td>
|
||||
<td>a gun similar to Super Scope, supported with one gun-shooting game.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<p>
|
||||
Snes9x can emulate those input devices with the keyboard, mouse and gamepad.
|
||||
</p>
|
||||
<h3>Configuring Keyboard</h3>
|
||||
<p>
|
||||
Choose 'Configure Keyboard...' in 'Config' menu. Drag and drop each icon onto the key which you want to assign. Blue icons are for 1P joypad, orange icons are for 2P joypad, and green icons are for other input devices and additional functions. To restore to the default key mapping, press 'Default' button.
|
||||
</p>
|
||||
<h3>Configuring Gamepad and Mouse</h3>
|
||||
<p>
|
||||
Choose 'Configure Controllers...' in 'Config' menu. Click the button in the dialog, and within 2.5 seconds press your gamepad or mouse (or keyboard) button that you want to assign. To remove the assignment, click the button and do nothing for 2.5 seconds. To clear all the settings, click 'Clear All' button. Additionally, you can switch controller settings quickly by selecting a preset by 'Controllers Preset' in 'Config' menu.
|
||||
</p>
|
||||
<h3>Automatic Fire</h3>
|
||||
<p>
|
||||
The 'Automatic Fire...' dialog in the 'Config' menu provides five configuration options for simulating autofire controllers:
|
||||
</p>
|
||||
<dl>
|
||||
<dt>Enable Automatic Fire</dt>
|
||||
<dd>If this option is enabled for a given controller button, holding down that button will produce a rapid-fire effect (barring the use of the 'Automatic Fire is Active Only While TC is Pressed' option - see below).</dd>
|
||||
<dt>Allow Alt to Toggle Enable/Disable Automatic Fire</dt>
|
||||
<dd>If this option is enabled for a given controller button, pressing Snes9x's Alt key in conjunction with that controller button in-game will toggle that button's 'Enable Automatic Fire' setting.</dd>
|
||||
<dt>Automatic Fire is Active Only While TC is Pressed</dt>
|
||||
<dd>If this option is enabled for a given controller button, you must hold down Snes9x's TC key in conjunction with that controller button in-game to produce a rapid-fire effect, provided that 'Enable Automatic Fire' is toggled on for that controller button. If TC is not depressed, that controller button will function as normal. Note that when 'Enable Automatic Fire' is toggled off for a controller button, its 'Automatic Fire is Active Only While TC is Pressed' setting has no effect.</dd>
|
||||
<dt>Button Input is Inverted</dt>
|
||||
<dd>If this option is enabled for a given controller button, Snes9x behaves as though you are pushing that controller button if and only if you are not pushing it. This option is most often used in conjunction with 'Enable Automatic Fire', producing a rapidly-firing controller button without any player intervention.</dd>
|
||||
<dt>Automatic Fire Speed</dt>
|
||||
<dd>This option controls the rate at which autofire controller buttons cycle their fire.</dd>
|
||||
</dl>
|
||||
<p>
|
||||
Snes9x's Alt and TC buttons can be mapped to both keyboard keys and joypad buttons, in the 'Configure Keyboard...' and 'Configure Controllers...' dialogs respectively.
|
||||
</p>
|
||||
<h3>Changing Input Devices</h3>
|
||||
<p>
|
||||
Select the device in 'Input Device' in 'Emulation' menu at any time.<br>
|
||||
If a ROM image has NSRT header, the most appropriate device is automatically chosen when you open the image.<br>
|
||||
Devices that Snes9x supports are: SNES Mouse, Super Scope, Justifier, SNES joypads and Multi Player 5.
|
||||
</p>
|
||||
<h3>SNES Mouse</h3>
|
||||
<p>
|
||||
Assign your Mac's mouse (or gamepad) buttons to SNES Mouse buttons in 'Configure Controllers' dialog. To move SNES Mouse cursor, move your Mac's mouse.
|
||||
</p>
|
||||
<h3>Super Scope</h3>
|
||||
<p>
|
||||
Assign your Mac's gamepad buttons or keyboard to Super Scope turbo/cursor/pause buttons in 'Configure Controllers' or 'Configure Keyboard' dialog. Note that the turbo button acts as a toggle button. To move the gunsight, move your mouse. Use SNES Mouse left button to fire.
|
||||
</p>
|
||||
<h3>Justifier</h3>
|
||||
<p>
|
||||
Similar to Super Scope. Assign your Mac's gamepad buttons or keyboard to 'offscreen' button in 'Configure Controllers' or 'Configure Keyboard' dialog. To shoot offscreen, shoot anywhere while pressing the 'offscreen' button.
|
||||
</p>
|
||||
<h3>Multi Player 5</h3>
|
||||
<p>
|
||||
Configure 3rd, 4th and 5th players in 'Configure Controllers' dialog. Note that 3rd, 4th and 5th players need gamepads.<br>
|
||||
Incidentally, there exist 6th, 7th and 8th players in that dialog, in case you have or make home-brewed games that can use two Multi Player 5 units.
|
||||
</p>
|
||||
<h3>Additional Keyboard Controls</h3>
|
||||
<p>
|
||||
You can remap the buttons for the functions listed below in 'Configure Keyboard' dialog. The default mapping is:
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="special keys">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">esc</td>
|
||||
<td>pauses the game and exits from the emulation loop.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">1</td>
|
||||
<td>saves a freeze file.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">0</td>
|
||||
<td>loads a freeze file, restoring a game to an exact position.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">`</td>
|
||||
<td>takes a screenshot.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">R</td>
|
||||
<td>dumps a SPC file.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">\</td>
|
||||
<td>turbo mode (fast forward) - for skipping long intros and so on.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Q</td>
|
||||
<td>decreases turbo mode speed.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">W</td>
|
||||
<td>increases turbo mode speed.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">,</td>
|
||||
<td>Snes9x's TC key - used for some options in the 'Automatic Fire...' dialog.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">.</td>
|
||||
<td>Snes9x's Alt key - used for some options in the 'Automatic Fire...' dialog.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">/</td>
|
||||
<td>Snes9x's Fn key - press this button with the keys below.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<p>
|
||||
These functions below work with 'Fn' button:
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="special keys with Fn button">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">F1-F4</td>
|
||||
<td>toggles background 1-4 on/off.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">F5</td>
|
||||
<td>toggles sprites on/off.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">F6</td>
|
||||
<td>swaps 1P and 2P controllers.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">1-8</td>
|
||||
<td>toggles sound channel on/off.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">9</td>
|
||||
<td>enables all sound channels.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">0</td>
|
||||
<td>toggles displaying pressed buttons.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">-</td>
|
||||
<td>toggles displaying frame counts in movies.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Q</td>
|
||||
<td>increases emulated frame time - slowing down the game.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">W</td>
|
||||
<td>decreases emulated frame time - speeding up the game.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">O</td>
|
||||
<td>just pauses and resumes - doesn't exit from the emulation loop.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">P</td>
|
||||
<td>advances a frame when paused.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="03.html">Prev</a> <a href="../index.html">Top</a> <a href="05.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,56 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Peripherals Support">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Peripherals Support</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Peripherals Support</h2>
|
||||
<h3>Satellaview</h3>
|
||||
<p>
|
||||
Snes9x partially emulates Satellaview system, so-called BS-X. To play BS games or read BS magazines with the BS-X base cartridge, do the following.
|
||||
</p>
|
||||
<ul>
|
||||
<li>If you have .srm files of BS games which were created by Snes9x 1.43 or earlier, trash them first.</li>
|
||||
<li>Prepare the BS-X ROM image. Make sure the file is uncompressed and doesn't have a header.</li>
|
||||
<li>Rename the BS-X ROM image to 'BS-X.bin'.</li>
|
||||
<li>Put BS-X.bin in the proper directory. 'BIOSes' folder by default.</li>
|
||||
<li>Launch BS-X.bin as you usually play SNES games.</li>
|
||||
<li>Set your name and gender.</li>
|
||||
<li>Launch a BS game. The game is launched for the first time and its .srm doesn't exist, so BS-X.srm is loaded instead.</li>
|
||||
<li>Once you launched the game, its .srm is created and loaded from the next time.</li>
|
||||
</ul>
|
||||
<p>
|
||||
If you launch a BS game for the first time without BS-X.srm, maybe the game doesn't work properly.<br>
|
||||
To boot up BS games from BS-X town, turn on 'Boot Up BS Games from BS-X' option in 'Preferences' dialog.
|
||||
</p>
|
||||
<h3>Sufami Turbo</h3>
|
||||
<p>
|
||||
To play Sufami Turbo games, do the following.
|
||||
</p>
|
||||
<ul>
|
||||
<li>Prepare the Sufami Turbo base cartridge ROM image. Make sure the file is uncompressed and doesn't have a header.</li>
|
||||
<li>Rename the base cartridge ROM image to 'STBIOS.bin'.</li>
|
||||
<li>Put STBIOS.bin in the proper directory. 'BIOSes' folder by default.</li>
|
||||
<li>Choose 'Open Multiple ROM Images...' from 'File' menu.</li>
|
||||
<li>Set game(s) into each slot with 'Choose...', 'Clear' and 'Swap' buttons. You can also drag and drop the ROM image onto each slot.</li>
|
||||
<li>Press 'OK' button and the Sufami Turbo system will run.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Note that the base cartridge can initialize SRAM for only the game in slot A, so you have to set every game in slot A and launch at least once.<br>
|
||||
If no games are set in the slots, only the base cartridge runs.<br>
|
||||
If you have a combined ROM image, split it to each games and the base cartridge. NSRT will help you.
|
||||
</p>
|
||||
<h3>Other Multiple Cartridge Games</h3>
|
||||
<p>
|
||||
In 'Open Multiple ROM Images' dialog, put the main cartridge in slot A and the add-on cartridge in slot B.<br>
|
||||
Currently supported: Same Game
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="04.html">Prev</a> <a href="../index.html">Top</a> <a href="06.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,43 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Game Saving">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Game Saving</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Game Saving</h2>
|
||||
<p>
|
||||
Many SNES games take a very long time to complete from start to finish, so they allowed your progress to be saved at the predefined places chosen by the game designers. The game cartridge contains a battery-backed RAM, known as SRAM, and your save data remain in this SRAM until the battery shutoff.
|
||||
</p>
|
||||
<p>
|
||||
Snes9x has two methods for saving games. One is the same as of the real SNES shown above; emulating SRAM. The SRAM contents are saved into a file (.srm) so you don't need to be worried about the battery shutoff. The other is more convenient way than the real SNES; 'freezing' or 'snapshotting' the game. It means saving the whole game state anywhere you want, beyond the game designers' intent - ideal for saving your game just before a tricky bit!
|
||||
</p>
|
||||
<h3>Using the SRAM File</h3>
|
||||
<p>
|
||||
It's easy enough, just save the game as you do with the real SNES. Snes9x outputs the contents of the emulated SRAM into a file (.srm) when you load a new game, pause the emulation loop or quit Snes9x. This file is automatically loaded the next time you play the game.
|
||||
</p>
|
||||
<p>
|
||||
To avoid losing your progress if Snes9x or your system crashes before the .srm file is saved, Snes9x provides auto-saving .srm option - the .srm file is always updated when the SRAM contents are modified. See into 'File' tab in 'Preferences' dialog to turn on this option. You can also update .srm file manually by choosing 'Save SRAM File Now' in 'Option' menu.
|
||||
</p>
|
||||
<h3>Freezing and Defrosting the Game State</h3>
|
||||
<p>
|
||||
Snes9x provides 12 slots for freezing the whole of your game state. During the game, press 'Freeze' key and you can see the slots numbered from 0 to C in the game screen. Press 0-C key (or move the yellow square cursor by the joypad and press start button) to save the game state to each slot. To load it, press 'Defrost' key and choose the slot in the same way. The most recent freeze file (.frz) is automatically pointed by the yellow cursor when you entered the freeze/defrost screen. Thumbnails and time stamps will be your help. If you mistakenly entered the freeze/defrost screen, press esc key and exit.<br>
|
||||
Additionally, you can manually save/load the freeze file by using 'Freeze State to...' and 'Defrost State from...' in 'Option' menu.
|
||||
</p>
|
||||
<h3>Real-Time Clock Emulation</h3>
|
||||
<p>
|
||||
Some games have a battery-backed real-time clock (RTC) in their cartridge to bring a real-time event in the game. Snes9x saves the state of RTC into a file (.rtc) and also into a freeze file.<br>
|
||||
Note that because it's a 'real-time' clock, when these files are loaded, the emulated clock is automatically advanced in reference to your Mac's time and date.
|
||||
</p>
|
||||
<h3>Fool-Proof System</h3>
|
||||
<p>
|
||||
If you quit the game by error without saving your long-time progress, try to find '.oops' file in the same folder as freeze files. If it exists, rename its extension to '.frz' and try to load it. It's a freeze file automatically generated if you don't save anything for a long time.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="05.html">Prev</a> <a href="../index.html">Top</a> <a href="07.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,59 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Cheat Support">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Cheat Support</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Cheat Support</h2>
|
||||
<p>
|
||||
Cheat codes allow you to cheat at games. They might give you more lives, infinite health, enable special powers normally only activated when a special item is found, and etc. Two major formats are well-known: Game Genie and Pro-Action Reply (PAR). Many existing Game Genie and PAR codes can be found via Internet.
|
||||
</p>
|
||||
<p>
|
||||
Snes9x supports both Game Genie and PAR by 'Cheat Entry' dialog. Also you can find your own cheat code with 'Cheat Finder' dialog. Cheats are saved in .cht files and are automatically loaded the next time a game with the same filename is loaded.
|
||||
</p>
|
||||
<p>
|
||||
Technically, a cheat code consists of two elements; an address in SNES memory map where you want to overwrite, and a value which is overwritten on the address.<br>
|
||||
Beware of cheat codes designed for a ROM from a different region compared to the one you are playing or for a different version of the ROM; the source of the cheats should tell you which region and for which version of the game they were designed for. If you use a code designed for a different region or version of your game, the game might crash or do other weird things because the cheat address might be different between regions and versions.
|
||||
</p>
|
||||
<h3>Cheat Entry</h3>
|
||||
<p>
|
||||
Open 'Cheat Entry' dialog from 'Cheat' menu to enter Game Genie or PAR cheat codes. To add a cheat code, press 'New' button. A new empty entry appears in the list. Click '000000' in the address column and the string will be highlighted and editable. Input Game Genie or PAR code directly; it's translated to general style (an address and a value pair) automatically. Of course you can also input an address and a value in hex format instead of a cheat code. You may add your comment in the description column.<br>
|
||||
To enable each cheat code, click each check box and turn on. To enable/disable the entire cheat function itself, choose 'Apply Cheats' in 'Cheat' menu.
|
||||
</p>
|
||||
<h3>Cheat Finder</h3>
|
||||
<p>
|
||||
Tutorial: let's give infinite lives on R-TYPE 3 (J).
|
||||
</p>
|
||||
<p>
|
||||
Load up the game and begin to play the first stage. You'll notice the game starts with 2 lives.
|
||||
</p>
|
||||
<p>
|
||||
Pause the game and open 'Cheat Finder' dialog from 'Cheat' menu for the first time. Press 'Restore List' button just in case you've used the dialog before. Leave any controls at their default values. Press 'Store Current Values' button and close the dialog.
|
||||
</p>
|
||||
<p>
|
||||
Play the game until you lose a life by just crashing into an enemy, then the game restarts and the life counter displays 1. Open 'Cheat Finder' dialog again.
|
||||
</p>
|
||||
<p>
|
||||
Choose 'not equal' in 'Comparison' menu, click 'Stored Value' radio box, and press 'Search' button. The number of items in the list will reduce. The current values shown in the list are different from the previous values which were stored when you pressed 'Store Current Values' button. What we're looking for is the memory location where the game stores its life counter. Choose 'equal' in 'Comparison' menu, click 'This Value' radio box, type '1' in the text box, and press 'Search' button. The number of items in the list will reduce again. One of the items might be the life counter.
|
||||
</p>
|
||||
<p>
|
||||
Again, crash into an enemy. The game restarts and the life counter displays 0. Open 'Cheat Finder' dialog. You'll find the value 0 in line 7E03B7. The previous value was 1 and the current value is 0. Is this address life counter? Select the line 7E03B7, press 'Watch' button, and close the dialog. Now you can see the value in the address 7E03B7 at the top left corner of the game screen.
|
||||
</p>
|
||||
<p>
|
||||
Play the game again, and crash into an enemy while watching the value. Yes, this value should be the life counter. Now you want to get infinite lives. Open 'Cheat Finder' dialog again, select the line 7E03B7 and press 'Add to Cheat Entry...' button. Enter the value 5 (don't care for now) into 'Cheat Value' text box, your comment into 'Description' text box and press 'Add' button. Your new cheat code will be sent to 'Cheat Entry' dialog. Close 'Cheat Finder' dialog.
|
||||
</p>
|
||||
<p>
|
||||
Open 'Cheat Entry' dialog and confirm your cheat codes are added. Make sure the cheat codes are turned on and close the dialog. Turn on 'Apply Cheats' in 'Cheat' menu.
|
||||
</p>
|
||||
<p>
|
||||
Now you'll find that the number of lives is 5 and the value doesn't decrease even you crash into an enemy. Snes9x keeps the value constant, so even if you do lose a life and life counter goes down by one, less than 20ms later, Snes9x resets the counter back to the value you chose!
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="06.html">Prev</a> <a href="../index.html">Top</a> <a href="08.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,40 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Movie Support">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Movie Support</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Movie Support</h2>
|
||||
<p>
|
||||
Movie support allows you to record your actions while playing a game. This can be used for your own personal playback or to show other people that you can do something without them having to be around when you did it.
|
||||
</p>
|
||||
<p>
|
||||
Snes9x also supports QuickTime export feature. Your realtime play or the recorded movie is exported to a QuickTime movie file.
|
||||
</p>
|
||||
<h3>Recording the Movie</h3>
|
||||
<p>
|
||||
To record a movie, choose 'Record Movie...' in 'Option' menu and choose the location where the movie file (.smv) will be saved. Here you can decide when to start recording. If you want to record from the very start of a game, turn on 'Reset' check box. If you want to start recording from where you are already in a game, turn it off. You can also choose which players to be recorded. If you are playing by yourself leave 1P as the only one selected. The more players you choose to be recorded the larger the file size will be. To stop recording, pause the game.
|
||||
</p>
|
||||
<h3>Playing Back the Movie</h3>
|
||||
<p>
|
||||
To play back the movie you recorded, choose 'Play Movie...' in 'Option' menu and choose the movie file. Make sure the movie was recorded with the same ROM that you have loaded.
|
||||
</p>
|
||||
<h3>Re-recording the Movie</h3>
|
||||
<p>
|
||||
If you make a mistake while recording a movie, there is a movie re-record function. Simply freeze/defrost a game state anytime while recording. To re-record the movie that has already finished recording, choose 'Play Movie...' in 'Option' menu, turn off 'Read Only' check box, defrost during playing the movie, and it changes to re-recording mode.
|
||||
</p>
|
||||
<h3>QuickTime Movie Export</h3>
|
||||
<p>
|
||||
Note that during the QuickTime recording there is no sound, but the exported QuickTime movie has sound.<br>
|
||||
Choose 'Export to QuickTime Movie...' in 'Option' menu and choose the location where the QuickTime movie file will be saved. Press 'Compression...' button and set the compression settings by the general QuickTime dialog. 'Double Size' check box makes the movie size from 256x224/239 to 512x448/478. 'Overscan' check box is for games that use 239 or 478 lines. 'Frame Skip' menu decides frame rate of the movie, for example when the value is 1, NTSC games which have 60 fps are exported as 30 fps movie.<br>
|
||||
To make a QuickTime movie from .smv, choose 'Play Movie...' in 'Option' menu and turn on 'Export to QuickTime movie at a Time' check box.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="07.html">Prev</a> <a href="../index.html">Top</a> <a href="09.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,104 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Netplay Support">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
<!-- ul { list-style-type:none } -->
|
||||
</style>
|
||||
<title>Netplay Support</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Netplay Support</h2>
|
||||
<p>
|
||||
Netplay support allows up to five players to sit in front of different computers and simultaneously play the same game, or just watch someone else play a game. All the computers have to be connected to a network that allows TCP/IP traffic to flow between them; this includes a local Ethernet-style network, a direct-cable connection, or, if you're lucky and have short ping times, the Internet.
|
||||
</p>
|
||||
<p>
|
||||
Snes9x netplay inevitably synchronizes all the computers at the sacrifice of the speed of input response. Note that netplay is not compatible between platforms - You can't play via network with Windows users.
|
||||
</p>
|
||||
<h3>How to Netplay</h3>
|
||||
<p>
|
||||
The player with the fastest Mac should act as the server. The others are clients. Server should open the port 6096/TCP.<br>
|
||||
Here is the workflow to netplay with up to five players.
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="netplay howto">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>If you guys want to play with Multi Player 5, choose 'Multi Tap' in 'Input Device' in 'Emulation' menu. (Clients don't need to select it.)</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>Open the ROM image. Pause the game and exit from the emulation loop.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>Choose 'Server...' in 'Netplay' menu. The clients list appears. The first client is yourself.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>Choose 'Client...' in 'Netplay' menu.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>Input server's IP address and your name. Press 'Connect' button.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>The clients appear in the clients list with 'Connecting' status.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>A ROM load dialog appears. Open the same ROM image as server's.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>Wait until all clients become 'Ready'. Press 'Play' button.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>The players list dialog appears. Press 'OK' button.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>Netplay starts.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>The game is reset and netplay starts.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>Adjust the timing by '2P-L' and '2P-R' button. If 'Show Onscreen Information' is active in 'Preferences' dialog, a value appears in both the server's and client's game screen. Increasing this value will smooth the frame rate, but also delay the input response.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server, Client</td>
|
||||
<td>All functions (screenshot, etc.) are unusable.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>Clients cannot stop netplay by themselves.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>Netplay stops when server pauses the game and exits from the emulation loop.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Server</td>
|
||||
<td>SRAM file may be overwritten by this play.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:9em">Client</td>
|
||||
<td>SRAM file won't be overwritten by this play.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="08.html">Prev</a> <a href="../index.html">Top</a> <a href="10.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,84 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Miscellaneous">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
<!-- ul { list-style-type:none } -->
|
||||
</style>
|
||||
<title>Miscellaneous</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Miscellaneous</h2>
|
||||
<h3>Where the Files are Stored</h3>
|
||||
<p>
|
||||
You can choose where Snes9x will look for BIOS images, patches (.ips), cheats (.cht), SRAM files (.srm), RTC files (.rtc) and freeze files (.frz) in 'File' tab in 'Preferences' dialog.
|
||||
</p>
|
||||
<dl>
|
||||
<dt>Snes9x Folder</dt>
|
||||
<dd>the subdirectories will be searched in the same folder as Snes9x.</dd>
|
||||
<dt>ROM Folder</dt>
|
||||
<dd>the files will all be in the same folder as the ROM image being used.</dd>
|
||||
<dt>Application Support Folder (default)</dt>
|
||||
<dd>the subdirectories will be created and searched in /Users/yourname/Library/Application Support/Snes9x.</dd>
|
||||
<dt>Other...</dt>
|
||||
<dd>the subdirectories will be created and searched in any folder you choose.</dd>
|
||||
</dl>
|
||||
<h3>Which Display is Used in Full Screen Mode</h3>
|
||||
<p>
|
||||
If you use two or more displays, in full screen mode Snes9x uses the display where the game window is shown.
|
||||
</p>
|
||||
<h3>Handling the Game Window</h3>
|
||||
<p>
|
||||
The zoom button changes the window size as follows: 1x, 1x(wide), 2x, 2x(wide), 3x, 3x(wide), 4x, 4x(wide). 'wide' is mainly for the NTSC filters.<br>
|
||||
Dragging the resize control changes the window size manually. Dragging with pressing shift key keeps the aspect ratio of the window.
|
||||
</p>
|
||||
<p>
|
||||
The toolbar control appears when 'Keep Overscanned Height' in 'Preferences' dialog is off. It toggles the behavior when the SNES screen resolution changes: keeping the aspect ratio of the pixels with two black bars on the top and bottom of the window / always filling the window with the SNES screen without considering the aspect ratio of the pixels.
|
||||
</p>
|
||||
<h3>Using IPS or UPS Patch</h3>
|
||||
<p>
|
||||
Snes9x automatically patches without overwriting the ROM image.
|
||||
</p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li>Put the IPS or UPS file into the proper directory. 'Patches' folder by default.</li>
|
||||
<li>Rename the name to the same as the ROM image (except extension, it is '.ips' or '.ups').</li>
|
||||
<li>(IPS only) If you want to use multiple IPS files at a time, set their extensions to '.000.ips', '.001.ips', ...</li>
|
||||
<li>Make sure 'Use IPS / UPS Patch' is checked in 'Others' tab in 'Preferences' dialog.</li>
|
||||
<li>Open and load the ROM image.</li>
|
||||
</ul>
|
||||
<h3>SPC File Dumping</h3>
|
||||
<p>
|
||||
SPC file (.spc) is the freeze state of only sound part, so it is known as SNES music data file. Dump the SPC file by Snes9x and play the file by SPC players like Audio Overload and PSFPlay.<br>
|
||||
Assign your gamepad button or keyboard to 'SPC' button in 'Configure Controllers' or 'Configure Keyboard' dialog. To dump a SPC file, press 'SPC' button while playing a game, or choose 'Save SPC File at Next Note-on' in 'Option' menu and resume the game.<br>
|
||||
Note that the actual dumping occurs at the next note-on event so that you can dump the BGM from just the beginning.
|
||||
</p>
|
||||
<h3>Music Box</h3>
|
||||
<p>
|
||||
Music Box is to play the game music without playing the game. Pause the game and enter Music Box by 'Music Box...' in 'Option' menu, and you can enjoy the music with doing other things like surfing Internet.<br>
|
||||
There are two modes for playing music. Select in 'Others' tab in 'Preferences' dialog.
|
||||
</p>
|
||||
<dl>
|
||||
<dt>Sound Emulation Only</dt>
|
||||
<dd>in a shooting game, you may listen BGM endlessly.</dd>
|
||||
<dt>Whole Emulation</dt>
|
||||
<dd>in a shooting game, you may hear explosion sound and game over music.</dd>
|
||||
</dl>
|
||||
<p>
|
||||
Each mode stores the emulated state before entering Music Box, and restores after closing Music Box. 'Whole Emulation' makes a temporal freeze file.
|
||||
</p>
|
||||
<h3>Sound Effect</h3>
|
||||
<p>
|
||||
You can use Apple's Matrix Reverb and/or Graphic Equalizer to enhance the game sounds. Call 'Sound Effect' dialog from 'Preferences' or 'Music Box' dialog.
|
||||
</p>
|
||||
<h3>Core Image Filters</h3>
|
||||
<p>
|
||||
In Mac OS X 10.4 or later, some of the Core Image filters can be applied to the game screen. Turn on 'Use Core Image' in 'Preferences' dialog and choose 'Core Image Filter...' menu while playing a game.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="09.html">Prev</a> <a href="../index.html">Top</a> <a href="11.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Compatibility">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Compatibility</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Compatibility</h2>
|
||||
<h3>Compatibility with Other Ports</h3>
|
||||
<p>
|
||||
All the files generated by Snes9x are compatible between platforms, except for the extension of the freeze files. The only one difference is that Mac port puts the thumbnail screenshot into the resource fork of freeze and movie files, but the resource fork is usually deleted or separated when you send the file to your friends who use a PC.
|
||||
</p>
|
||||
<h3>Compatibility with Other SNES Emulators</h3>
|
||||
<p>
|
||||
Cheat files (.cht) are common between Snes9x and ZSNES. RTC files (.rtc) are common between Snes9x and bsnes. SRAM files (.srm) should be common among all SNES emulators.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="10.html">Prev</a> <a href="../index.html">Top</a> <a href="12.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Problems">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
<!-- ul { list-style-type:none } -->
|
||||
</style>
|
||||
<title>Problems</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Problems</h2>
|
||||
<h3>Problems with ROMs</h3>
|
||||
<p>
|
||||
If Snes9x just displays a black screen for over 10 seconds after you've loaded a ROM image, then one of the following could be true:
|
||||
</p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li>You just loaded some random ROM image and it isn't even a SNES game or you only have part of the image. Snes9x only emulates games designed for the Super NES, not NES, or Master System, or Game Boy, or <insert your favorite old games system here>.</li>
|
||||
<li>Someone has edited the Nintendo ROM information area inside the ROM image and Snes9x can't work out what format the ROM image is in. Try playing around with the ROM format options on the ROM load dialog.</li>
|
||||
<li>The ROM image is corrupt. If you're loading from CD, I know it might sound silly, but is the CD dirty? Clean, unhacked ROM images will display [checksum ok] when first loaded, corrupt or hacked ROMs display [bad checksum].</li>
|
||||
<li>The original SNES ROM cartridge had additional hardware inside that is not emulated yet and might never be.</li>
|
||||
<li>You might be using a file that is compressed in a way Snes9x does not understand.</li>
|
||||
</ul>
|
||||
<p>
|
||||
The following ROMs are known to currently not to work with any version of Snes9x:
|
||||
</p>
|
||||
<ul>
|
||||
<li><table summary="not emulated chips">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td style="width:18em">SD Gundam GX</td>
|
||||
<td>DSP-3</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:18em">Hayazashi Nidan Morita Shougi</td>
|
||||
<td>Seta-11</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="width:18em">Hayazashi Nidan Morita Shougi 2</td>
|
||||
<td>Seta-18</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h3>Problems with Sounds</h3>
|
||||
<p>
|
||||
If you hear crackling noise during the game, try the following to eliminate the noise:
|
||||
</p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li>Set 'Frame Skip' to 'Auto'.</li>
|
||||
<li>Set 'Mix Buffer Length' to a larger value.</li>
|
||||
<li>Turn on 'Allow Lag'.</li>
|
||||
<li>Set 'Output Interval' to a larger value. Make sure it's smaller than 'Mix Buffer Length'.</li>
|
||||
<li>Slightly adjust 'Input Rate' to a smaller value.</li>
|
||||
</ul>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="11.html">Prev</a> <a href="../index.html">Top</a> <a href="13.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,87 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Technical Information">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Technical Information</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Technical Information</h2>
|
||||
<h3>What's Emulated?</h3>
|
||||
<ul>
|
||||
<li>65c816 main CPU.</li>
|
||||
<li>Variable length machine cycles.</li>
|
||||
<li>8 channel DMA and H-DMA.</li>
|
||||
<li>H-IRQ, V-IRQ and NMI.</li>
|
||||
<li>Sony SPC700 sound CPU.</li>
|
||||
<li>Sound DSP, with eight 16-bit, stereo channels, compressed samples, hardware envelope processing, echo, pitch modulation and digital FIR sound filter.</li>
|
||||
<li>SRAM, a battery-backed RAM.</li>
|
||||
<li>All background modes, 0 to 7.</li>
|
||||
<li>All screen resolutions including interlace mode.</li>
|
||||
<li>Pseudo hi-res mode.</li>
|
||||
<li>8x8, 16x8 and 16x16 tile sizes, flipped in either direction.</li>
|
||||
<li>32x32, 32x64, 64x32 and 64x64 screen tile sizes.</li>
|
||||
<li>Vertical and horizontal offset-per-tile.</li>
|
||||
<li>128 8x8, 16x16, 32x32 and 64x64 sprites, flipped in either direction.</li>
|
||||
<li>Sub-screen and fixed color blending effects.</li>
|
||||
<li>Mosaic effects.</li>
|
||||
<li>Mode 7 screen rotation, scaling and screen flipping.</li>
|
||||
<li>Single and dual graphic clip windows, with all four logic combination modes.</li>
|
||||
<li>Color blending effects only inside or outside a window.</li>
|
||||
<li>Palette changes during frame.</li>
|
||||
<li>Direct color mode - uses tile and palette-group data directly as RGB value.</li>
|
||||
<li>SNES Mouse.</li>
|
||||
<li>Super Scope, emulated using computer mouse.</li>
|
||||
<li>Justifier, by Konami, similar to the Super Scope and used only in Lethal Enforcers.</li>
|
||||
<li>Multi Player 5, allowing up to five people to play games simultaneously on games that support that many players.</li>
|
||||
<li>Super FX, a fast RISC CPU used in several games.</li>
|
||||
<li>SA-1, a faster version of main CPU with some functions, used in several games.</li>
|
||||
<li>DSP-1, a custom chip used in several games, mainly racing games.</li>
|
||||
<li>DSP-2, a custom chip used only in Dungeon Master.</li>
|
||||
<li>DSP-4, a custom chip used only in Top Gear 3000.</li>
|
||||
<li>C4, a sprite scaler/rotator/line drawer/simple maths co-processor chip used only in Megaman X2 and X3.</li>
|
||||
<li>Seta-10, a custom chip used only in F1 Race of Champions 2.</li>
|
||||
<li>OBC1, a sprite management chip used only in Metal Combat.</li>
|
||||
<li>S-DD1, a data decompression chip used only in Star Ocean and Street Fighter 2 Alpha.</li>
|
||||
<li>SPC7110, similar in use to S-DD1, used in a few Hadoson games.</li>
|
||||
<li>S-RTC, a real-time clock chip, used only in Dai Kaijyu Monogatari 2.</li>
|
||||
<li>Satellaview and BS-X, only partially.</li>
|
||||
</ul>
|
||||
<h3>What's Not?</h3>
|
||||
<ul>
|
||||
<li>Exact sub-cycle timings of communication among most of parts - main CPU, sound CPU, DMA, H-DMA, IRQ, NMI, and so on. Snes9x cannot run games that require severe timings!</li>
|
||||
<li>Any other odd chips that manufactures sometimes placed inside the cartridge to enhance games and as a nice side-effect, also act as an anti-piracy measure. (DSP-3, Seta-11 and Seta-18, as examples)</li>
|
||||
<li>The expansion slot found in many carts.</li>
|
||||
</ul>
|
||||
<h3>Custom Chips</h3>
|
||||
<h4>Super FX</h4>
|
||||
<p>
|
||||
The Super FX is a 10.5/21MHz RISC CPU developed by Argonaut Software used as a game enhancer by several game titles. Released SNES Super FX games included Yoshi's Island, Doom, Winter Gold, Dirt Trax FX, StarFox, Stunt Race FX and Vortex.
|
||||
</p>
|
||||
<h4>SA-1</h4>
|
||||
<p>
|
||||
The SA-1 is a fast, custom 65c816 8/16-bit processor, the same as inside the SNES itself, but clocked at 10MHz compared to a maximum of 3.58MHz for the CPU inside the SNES. The SA-1 isn't just a CPU; it also contains some extra circuits developed by Nintendo which includes some very fast RAM, a memory mapper, DMA and, several real-time timers.
|
||||
</p>
|
||||
<h4>C4</h4>
|
||||
<p>
|
||||
The C4 is custom Capcom chip used only in the Megaman X2 and Megaman X3 games. It can scale and rotate images, draw line-vector objects and do some simple maths to rotate them.
|
||||
</p>
|
||||
<h4>S-DD1</h4>
|
||||
<p>
|
||||
The S-DD1 is a custom data decompression chip that can decompress data in real-time as the SNES DMA's data from the ROM to RAM. Only two games use the chip: Star Ocean and Street Fighter Alpha 2.
|
||||
</p>
|
||||
<h4>SPC7110</h4>
|
||||
<p>
|
||||
The SPC7110 is a compression and memory mapping chip. It provides a few extra features as well. It functions as an RTC interface, and has a multiply/divide unit that has more precision than the SNES. The SPC7110 is found only in 4 games: Super Power League 4, Far East of Eden Zero, Far East of Eden Zero - Shounen Jump no Shou and Momotaro Dentetsu Happy.
|
||||
</p>
|
||||
<h4>Others</h4>
|
||||
<p>
|
||||
Other known custom chips: DSP-1, DSP-2, DSP-3, DSP-4, Seta-10, Seta-11, Seta-18, OBC1 and S-RTC.
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="12.html">Prev</a> <a href="../index.html">Top</a> <a href="14.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,118 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="References">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>References</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>References</h2>
|
||||
<h3>Preferences Dialog</h3>
|
||||
<h4>Graphics Tab</h4>
|
||||
<dl>
|
||||
<dt>Full Screen Mode</dt>
|
||||
<dd>Toggles full screen/windowed mode. Press esc key to hide full screen window and pause the game.</dd>
|
||||
<dt>Switch Monitor Resolution</dt>
|
||||
<dd>Toggles between scaling full screen graphics to the current screen resolution or changing the screen resolution to fit Snes9x's needs.</dd>
|
||||
<dt>Show Frame Rate</dt>
|
||||
<dd>Toggles display of the frame rate on/off.</dd>
|
||||
<dt>Transparency Effects</dt>
|
||||
<dd>Toggles transparency effects on/off. Transparency effect is used in almost all games so this option is just for hack.</dd>
|
||||
<dt>Video Mode</dt>
|
||||
<dd>Choose the image scaling filter which is applied to the raw SNES image.</dd>
|
||||
<dt>Multitask</dt>
|
||||
<dd>When this option is on, the rendering process is separated from the emulation thread (except blocky and smooth modes).</dd>
|
||||
<dt>Keep Overscanned Height</dt>
|
||||
<dd>Keeps the screen height always 239/478, for some games that change screen height frequently.</dd>
|
||||
<dt>Sync to Vertical Blank</dt>
|
||||
<dd>Synchronizes the render timing to the monitor's vertical refresh rate.</dd>
|
||||
<dt>Stretch Image in Full Screen Mode</dt>
|
||||
<dd>Stretches the image to fill the screen in full screen mode.</dd>
|
||||
<dt>Aspect Ratio</dt>
|
||||
<dd>The aspect ratio of above option: the left is proportional and the right is full width of the monitor.</dd>
|
||||
<dt>Use Core Image</dt>
|
||||
<dd>Applies additional Core Image effect after the image filter is applied.</dd>
|
||||
<dt>Filter...</dt>
|
||||
<dd>Choose the Core Image filter.</dd>
|
||||
<dt>Use 32 Bit Color</dt>
|
||||
<dd>Uses 16,777,216 colors.</dd>
|
||||
<dt>Use Screen Curvature</dt>
|
||||
<dd>Adds a warp effect like a CRT-based television.</dd>
|
||||
<dt>Warp</dt>
|
||||
<dd>The degree of curvature.</dd>
|
||||
</dl>
|
||||
<h4>Sound Tab</h4>
|
||||
<dl>
|
||||
<dt>Synchronize</dt>
|
||||
<dd>Tries and ensures all available samples are buffered so there are no overruns.</dd>
|
||||
<dt>16 Bit Playback</dt>
|
||||
<dd>Enables 16-bit playback instead of 8-bit.</dd>
|
||||
<dt>Stereo</dt>
|
||||
<dd>Enables stereo sound instead of mono.</dd>
|
||||
<dt>Reverse Stereo</dt>
|
||||
<dd>Swaps the left and right stereo channels.</dd>
|
||||
<dt>Effect...</dt>
|
||||
<dd>Opens 'Sound Effect' dialog.</dd>
|
||||
<dt>Playback Rate</dt>
|
||||
<dd>The real SNES is 32000 Hz. Any values other than 32000 Hz will cause resampling.</dd>
|
||||
<dt>Output Interval</dt>
|
||||
<dd>Make sure this value is smaller than the mix buffer length.</dd>
|
||||
<dt>Mix Buffer Length</dt>
|
||||
<dd>Too short length will cause crackling noise.</dd>
|
||||
<dt>Allow Lag</dt>
|
||||
<dd>Safer from crackling noise, but time-lag becomes more noticeable.</dd>
|
||||
<dt>Volume</dt>
|
||||
<dd>Volume of the whole Snes9x sounds.</dd>
|
||||
<dt>Input Rate</dt>
|
||||
<dd>Adjusts the sound rate through resampling. For every Input Rate samples generated by the SNES, Playback Rate samples will be produced.</dd>
|
||||
</dl>
|
||||
<h4>File Tab</h4>
|
||||
<dl>
|
||||
<dt>Save Data in</dt>
|
||||
<dd>Choose the folder where Snes9x will look for files.</dd>
|
||||
<dt>Auto Save SRAM</dt>
|
||||
<dd>Updates SRAM file when SRAM contents are modified. This may cause frequent disk access.</dd>
|
||||
</dl>
|
||||
<h4>Accuracy Tab</h4>
|
||||
<dl>
|
||||
<dt>HDMA Timing Hack</dt>
|
||||
<dd>Changes HDMA timing and will 'fix' some games' glitches, but breaks many other games. The default value is 100.</dd>
|
||||
<dt>Skip CPU Emulation Until the Next Event Comes</dt>
|
||||
<dd>Skips internal CPU emulation for speed-ups until the next event comes.</dd>
|
||||
<dt>Allow Invalid VRAM Access</dt>
|
||||
<dd>Allows to write to VRAM outside blank periods.</dd>
|
||||
<dt>Apply Specific Game Hacks</dt>
|
||||
<dd>Applies special hacks for games that can't be emulated correctly.</dd>
|
||||
<dt>Frame Skip</dt>
|
||||
<dd>Adjust this value if your Mac is slow.</dd>
|
||||
<dt>Speed in Turbo Mode</dt>
|
||||
<dd>The speed when turbo mode is on. Modify in-game with Fn+T, Fn+Y.</dd>
|
||||
</dl>
|
||||
<h4>Others Tab</h4>
|
||||
<dl>
|
||||
<dt>Toggle Turbo Button</dt>
|
||||
<dd>Sets 'Turbo' button as a toggle switch.</dd>
|
||||
<dt>Show Onscreen Information</dt>
|
||||
<dd>Shows messages from Snes9x on the game screen. When off, messages are put in the standard console.</dd>
|
||||
<dt>Open Choose ROM Image Dialog at Startup</dt>
|
||||
<dd>Choose whether open dialog should be shown when Snes9x is launched.</dd>
|
||||
<dt>Show Dates and Times in Freeze State Selection Screen</dt>
|
||||
<dd>Shows time stamps on thumbnails in freeze/defrost screen.</dd>
|
||||
<dt>Save Window Size and Position</dt>
|
||||
<dd>Saves the sizes and positions of the game window and dialogs so they come back to the same place.</dd>
|
||||
<dt>Use IPS / UPS Patch</dt>
|
||||
<dd>When this option is on, Snes9x automatically loads the .ips or .ups file and patch the ROM image.</dd>
|
||||
<dt>Boot Up BS Games from BS-X</dt>
|
||||
<dd>When this option is on, BS-X ROM is loaded first, then you launch BS games from the menu in BS-X.</dd>
|
||||
<dt>When in Background</dt>
|
||||
<dd>Choose the behavior of Snes9x when it is in back of other applications.</dd>
|
||||
<dt>Music Box</dt>
|
||||
<dd>Choose the behavior of Music Box: 'Sound Emulation Only' to only emulate the music system, and 'Whole Emulation' to also emulate the CPU. Music that depends on the CPU running will not sound right without 'Whole Emulation.'</dd>
|
||||
</dl>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="13.html">Prev</a> <a href="../index.html">Top</a> <a href="15.html">Next</a>>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,69 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<meta http-equiv="content-style-type" content="text/css">
|
||||
<meta name="description" content="Credits">
|
||||
<link href="../sty/style.css" rel="stylesheet">
|
||||
<title>Credits</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Credits</h2>
|
||||
<ul>
|
||||
<li>Jerremy Koot for all his hard work on previous versions of Snes96, Snes97 and Snes9x.</li>
|
||||
<li>Ivar for the original Super FX C emulation, DSP-1 emulation work and information on both chips.</li>
|
||||
<li>zsKnight and _Demo_ for the Intel Super FX assembler, DSP-1 and C4 emulation code.</li>
|
||||
<li>zsKnight and _Demo_ for all the other ideas and code I've nicked off them; they've nicked lots of my ideas and information too!</li>
|
||||
<li>John Weidman and Darkforce for the S-RTC emulation information and code.</li>
|
||||
<li>Kreed and Maxim Stepin for excellent image enhancer routines.</li>
|
||||
<li>Nose000 for code changes to support various Japanese SNES games.</li>
|
||||
<li>Neill Corlett for the IPS patching support code.</li>
|
||||
<li>DiskDude's SNES Kart v1.6 document for the Game Genie(TM) and Pro-Action Replay cheat system information.</li>
|
||||
<li>Lord ESNES for some nice chats and generally useful stuff.</li>
|
||||
<li>Lee Hyde (lee@jlp1.demon.co.uk) for his quest for sound information and the Windows 95 icon.</li>
|
||||
<li>Shawn Hargreaves for the rather good Allegro 3.0 DOS library.</li>
|
||||
<li>Robert Grubbs for the SideWinder information - although I didn't use his actual driver in the end.</li>
|
||||
<li>Steve Snake for his insights into SNES sound sample decompression.</li>
|
||||
<li>Vojtech Pavlik for the Linux joystick driver patches.</li>
|
||||
<li>Maciej Babinski for the basics of Linux's DGA X server extensions.</li>
|
||||
<li>Alexander Larsson for the GGI Linux port code.</li>
|
||||
<li>Harald Fielker for the original sound interpolation code (never used directly due to problems).</li>
|
||||
<li>Takehiro TOMINAGA for many speed up suggestions and bug fixes.</li>
|
||||
<li>Predicador for the Windows icon.</li>
|
||||
<li>Lindsey Dubb for the mode 7 bi-linear filter code and the improved color addition and subtraction code.</li>
|
||||
<li>Anti Resonance for his super-human efforts to help get his fast sound CPU core and sound DSP core working in Snes9x.</li>
|
||||
<li>Brad Martin and TRAC for better and refined sound emulation.</li>
|
||||
<li>ernstp and entonne for patches and testing on Linux PPC.</li>
|
||||
<li>byuu for the most exact timing information and tons of the newest technical findings.</li>
|
||||
<li>Blargg for the most accurate timings between sound CPU and DSP and exact sound emulation codes.</li>
|
||||
<li>pagefault, TRAC, Dark Force, byuu, and others who have donated ideas and/or code to the project.</li>
|
||||
</ul>
|
||||
<div style="margin-top:3em"><p>
|
||||
Nintendo is a trademark.<br>
|
||||
Super NES, Super Famicon, Super Scope and Super FX are trademarks of Nintendo.<br>
|
||||
Sufami Turbo is a trademark of Bandai Co., Ltd.<br>
|
||||
Game Genie is a trademark of Lewis Galoob Toys, Inc.<br>
|
||||
Pro Action Replay is a trademark of Datel Inc.<br>
|
||||
Macintosh, Mac and Mac OS X are trademarks of Apple Computer, Inc.<br>
|
||||
UNIX is a trademark of The Open Group.<br>
|
||||
Linux is a trademark of Linus Torvalds.<br>
|
||||
Windows is a trademark of Microsoft Corp.<br>
|
||||
Intel is a trademark of Intel Corp.<br>
|
||||
PowerPC is a trademark of International Business Machines Corp.<br>
|
||||
Sony is a trademark of Sony Corp.<br>
|
||||
Konami and Justifier are trademarks of Konami Corp.<br>
|
||||
Hudson is a trademark of Husdon Soft Co., Ltd.<br>
|
||||
Capcom is a trademark of Capcom Co., Ltd.
|
||||
</p></div>
|
||||
<div style="margin-top:3em"><p>
|
||||
Gary Henderson
|
||||
</p></div>
|
||||
<p>
|
||||
Edited for Mac port by: zones (kasumitokoduck@yahoo.com)<br>
|
||||
Updated most recently by: 2011/3/31 zones
|
||||
</p>
|
||||
<div style="text-align:center; margin-top:3em"><p>
|
||||
<<a href="14.html">Prev</a> <a href="../index.html">Top</a> Next>
|
||||
</p></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +0,0 @@
|
||||
/* <html><head><meta name="robots" content="noindex"></head></html> */
|
||||
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 14pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
}
|
||||
|
||||
h2
|
||||
{
|
||||
font-size: 12pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 10pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
font-size: 9pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
font-size: 9pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
font-size: 9pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
}
|
||||
|
||||
ul
|
||||
{
|
||||
font-size: 9pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
dl
|
||||
{
|
||||
font-size: 9pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
dd
|
||||
{
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/* <html><head><meta name="robots" content="noindex"></head></html> */
|
||||
|
||||
a
|
||||
{
|
||||
color: gray;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
color: gray;
|
||||
font-size: 20pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
margin: 0px 10px 10px 10px;
|
||||
letter-spacing: -1pt;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
h2
|
||||
{
|
||||
color: gray;
|
||||
font-weight: 300;
|
||||
font-size: 8pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
margin-bottom: -12px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
ul
|
||||
{
|
||||
color: gray;
|
||||
font-size: 12pt;
|
||||
font-family: "Lucida Grande", Helvetica, Arial;
|
||||
margin-left: -8px;
|
||||
padding-top: 18px;
|
||||
padding-bottom: 18px;
|
||||
border-left: 1px solid gray;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#contentleft
|
||||
{
|
||||
float: left;
|
||||
margin-top: 76px;
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
#contentright
|
||||
{
|
||||
float: left;
|
||||
margin-top: 14px;
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
#frame
|
||||
{
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
width: 460px;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,542 +0,0 @@
|
||||
/*
|
||||
* File: HID_Utilities_External.h
|
||||
*
|
||||
* Contains: Definition of the HID Utilities exported functions
|
||||
* External interface for HID Utilities, can be used with either library or source
|
||||
* Check notes below for usage. Some type casting is required so library is framework and carbon free
|
||||
*
|
||||
* Copyright: Copyright © 2005 Apple Computer, Inc., All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
|
||||
* ( "Apple" ) in consideration of your agreement to the following terms, and your
|
||||
* use, installation, modification or redistribution of this Apple software
|
||||
* constitutes acceptance of these terms. If you do not agree with these terms,
|
||||
* please do not use, install, modify or redistribute this Apple software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject
|
||||
* to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
|
||||
* copyrights in this original Apple software ( the "Apple Software" ), to use,
|
||||
* reproduce, modify and redistribute the Apple Software, with or without
|
||||
* modifications, in source and/or binary forms; provided that if you redistribute
|
||||
* the Apple Software in its entirety and without modifications, you must retain
|
||||
* this notice and the following text and disclaimers in all such redistributions of
|
||||
* the Apple Software. Neither the name, trademarks, service marks or logos of
|
||||
* Apple Computer, Inc. may be used to endorse or promote products derived from the
|
||||
* Apple Software without specific prior written permission from Apple. Except as
|
||||
* expressly stated in this notice, no other rights or licenses, express or implied,
|
||||
* are granted by Apple herein, including but not limited to any patent rights that
|
||||
* may be infringed by your derivative works or by other works in which the Apple
|
||||
* Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
||||
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
|
||||
* COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
|
||||
* CONSEQUENTIAL DAMAGES ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION )
|
||||
* ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
|
||||
* OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
|
||||
* ( INCLUDING NEGLIGENCE ), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _HID_Utilities_External_h_
|
||||
#define _HID_Utilities_External_h_
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark - includes & imports
|
||||
/*****************************************************/
|
||||
#if !TARGET_RT_MAC_CFM
|
||||
#include <IOKit/hid/IOHIDLib.h>
|
||||
#endif TARGET_RT_MAC_CFM
|
||||
|
||||
//#include <IOKit/hid/IOHIDUsageTables.h>
|
||||
#if 0 // NOTE: These are now in <IOKit/hid/IOHIDUsageTables.h>
|
||||
#include "PID.h"
|
||||
#include "IOHIDPowerUsage.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*****************************************************/
|
||||
#if PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if PRAGMA_IMPORT
|
||||
#pragma import on
|
||||
#endif
|
||||
|
||||
#if PRAGMA_STRUCT_ALIGN
|
||||
#pragma options align=mac68k
|
||||
#elif PRAGMA_STRUCT_PACKPUSH
|
||||
#pragma pack( push, 2 )
|
||||
#elif PRAGMA_STRUCT_PACK
|
||||
#pragma pack( 2 )
|
||||
#endif
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark - typedef's, struct's, enums, defines, etc.
|
||||
/*****************************************************/
|
||||
#if TARGET_RT_MAC_CFM
|
||||
// from IOHIDKeys.h( IOKit )
|
||||
// this can't be included since the original file has framework includes
|
||||
// developers may need to add definitions here
|
||||
typedef enum IOHIDElementType {
|
||||
kIOHIDElementTypeInput_Misc = 1,
|
||||
kIOHIDElementTypeInput_Button = 2,
|
||||
kIOHIDElementTypeInput_Axis = 3,
|
||||
kIOHIDElementTypeInput_ScanCodes = 4,
|
||||
kIOHIDElementTypeOutput = 129,
|
||||
kIOHIDElementTypeFeature = 257,
|
||||
kIOHIDElementTypeCollection = 513
|
||||
}IOHIDElementType;
|
||||
|
||||
typedef enum IOHIDReportType {
|
||||
kIOHIDReportTypeInput = 0,
|
||||
kIOHIDReportTypeOutput,
|
||||
kIOHIDReportTypeFeature,
|
||||
kIOHIDReportTypeCount
|
||||
}IOHIDReportType;
|
||||
|
||||
// Notes: This is a MachO function pointer. If you're using CFM you have to call MachOFunctionPointerForCFMFunctionPointer.
|
||||
typedef void( *IOHIDCallbackFunction ) ( void* target, unsigned long result, void* refcon, void* sender );
|
||||
typedef void* IOHIDEventStruct;
|
||||
#endif TARGET_RT_MAC_CFM
|
||||
|
||||
// Device and Element Interfaces
|
||||
|
||||
typedef enum HIDElementTypeMask
|
||||
{
|
||||
kHIDElementTypeInput = 1 << 1,
|
||||
kHIDElementTypeOutput = 1 << 2,
|
||||
kHIDElementTypeFeature = 1 << 3,
|
||||
kHIDElementTypeCollection = 1 << 4,
|
||||
kHIDElementTypeIO = kHIDElementTypeInput | kHIDElementTypeOutput | kHIDElementTypeFeature,
|
||||
kHIDElementTypeAll = kHIDElementTypeIO | kHIDElementTypeCollection
|
||||
}HIDElementTypeMask;
|
||||
|
||||
struct hu_element_t
|
||||
{
|
||||
unsigned long type; // the type defined by IOHIDElementType in IOHIDKeys.h
|
||||
long usage; // usage within above page from IOUSBHIDParser.h which defines specific usage
|
||||
long usagePage; // usage page from IOUSBHIDParser.h which defines general usage
|
||||
void* cookie; // unique value( within device of specific vendorID and productID ) which identifies element, will NOT change
|
||||
long min; // reported min value possible
|
||||
long max; // reported max value possible
|
||||
long scaledMin; // reported scaled min value possible
|
||||
long scaledMax; // reported scaled max value possible
|
||||
long size; // size in bits of data return from element
|
||||
unsigned char relative; // are reports relative to last report( deltas )
|
||||
unsigned char wrapping; // does element wrap around( one value higher than max is min )
|
||||
unsigned char nonLinear; // are the values reported non-linear relative to element movement
|
||||
unsigned char preferredState; // does element have a preferred state( such as a button )
|
||||
unsigned char nullState; // does element have null state
|
||||
long units; // units value is reported in( not used very often )
|
||||
long unitExp; // exponent for units( also not used very often )
|
||||
char name[256]; // name of element( c string )
|
||||
|
||||
// runtime variables
|
||||
long initialCenter; // center value at start up
|
||||
unsigned char hasCenter; // whether or not to use center for calibration
|
||||
long minReport; // min returned value
|
||||
long maxReport; // max returned value( calibrate call )
|
||||
long userMin; // user set value to scale to( scale call )
|
||||
long userMax;
|
||||
|
||||
struct hu_element_t* pPrevious; // previous element( NULL at list head )
|
||||
struct hu_element_t* pChild; // next child( only of collections )
|
||||
struct hu_element_t* pSibling; // next sibling( for elements and collections )
|
||||
|
||||
long depth;
|
||||
};
|
||||
typedef struct hu_element_t hu_element_t;
|
||||
|
||||
struct hu_device_t
|
||||
{
|
||||
void* interface; // interface to device, NULL = no interface
|
||||
void* queue; // device queue, NULL = no queue
|
||||
void* runLoopSource; // device run loop source, NULL == no source
|
||||
void* queueRunLoopSource; // device queue run loop source, NULL == no source
|
||||
void* transaction; // output transaction interface, NULL == no interface
|
||||
void* notification; // notifications
|
||||
char transport[256]; // device transport( c string )
|
||||
long vendorID; // id for device vendor, unique across all devices
|
||||
long productID; // id for particular product, unique across all of a vendors devices
|
||||
long version; // version of product
|
||||
char manufacturer[256]; // name of manufacturer
|
||||
char product[256]; // name of product
|
||||
char serial[256]; // serial number of specific product, can be assumed unique across specific product or specific vendor( not used often )
|
||||
long locID; // long representing location in USB( or other I/O ) chain which device is pluged into, can identify specific device on machine
|
||||
long usage; // usage page from IOUSBHID Parser.h which defines general usage
|
||||
long usagePage; // usage within above page from IOUSBHID Parser.h which defines specific usage
|
||||
long totalElements; // number of total elements( should be total of all elements on device including collections ) ( calculated, not reported by device )
|
||||
long features; // number of elements of type kIOHIDElementTypeFeature
|
||||
long inputs; // number of elements of type kIOHIDElementTypeInput_Misc or kIOHIDElementTypeInput_Button or kIOHIDElementTypeInput_Axis or kIOHIDElementTypeInput_ScanCodes
|
||||
long outputs; // number of elements of type kIOHIDElementTypeOutput
|
||||
long collections; // number of elements of type kIOHIDElementTypeCollection
|
||||
long axis; // number of axis( calculated, not reported by device )
|
||||
long buttons; // number of buttons( calculated, not reported by device )
|
||||
long hats; // number of hat switches( calculated, not reported by device )
|
||||
long sliders; // number of sliders( calculated, not reported by device )
|
||||
long dials; // number of dials( calculated, not reported by device )
|
||||
long wheels; // number of wheels( calculated, not reported by device )
|
||||
hu_element_t* pListElements; // head of linked list of elements
|
||||
struct hu_device_t* pNext; // next device
|
||||
};
|
||||
typedef struct hu_device_t hu_device_t;
|
||||
|
||||
// this is the procedure type for a client hot plug callback
|
||||
typedef OSStatus ( *HotPlugCallbackProcPtr )( io_iterator_t inIODeviceIterator );
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark - exported globals
|
||||
/*****************************************************/
|
||||
#pragma mark - exported function prototypes
|
||||
/*****************************************************/
|
||||
#pragma mark HID Utilities interface
|
||||
/*****************************************************/
|
||||
// Create and open an interface to device, required prior to extracting values or building queues
|
||||
// Notes: appliction now owns the device and must close and release it prior to exiting
|
||||
extern unsigned long HIDCreateOpenDeviceInterface( UInt32 inHIDDevice, hu_device_t* inDevice );
|
||||
|
||||
// builds list of device with elements( allocates memory and captures devices )
|
||||
// list is allocated internally within HID Utilites and can be accessed via accessor functions
|
||||
// structures within list are considered flat and user accessable, but not user modifiable
|
||||
// can be called again to rebuild list to account for new devices( will do the right thing in case of disposing existing list )
|
||||
// inUsagePage, usage are each a inNumDeviceTypes sized array of matching usage and usage pages
|
||||
// returns TRUE if successful
|
||||
|
||||
extern Boolean HIDBuildMultiDeviceList( UInt32 *inUsagePage, UInt32 *inUsage, UInt32 inNumDeviceTypes );
|
||||
|
||||
// same as above but this uses a single inUsagePage and usage
|
||||
|
||||
extern Boolean HIDBuildDeviceList( UInt32 inUsagePage, UInt32 inUsage );
|
||||
|
||||
// updates the current device list for any new/removed devices
|
||||
// if this is called before HIDBuildDeviceList the it functions like HIDBuildMultiDeviceList
|
||||
// inUsagePage, usage are each a inNumDeviceTypes sized array of matching usage and usage pages
|
||||
// returns TRUE if successful which means if any device were added or removed( the device config changed )
|
||||
|
||||
extern Boolean HIDUpdateDeviceList( UInt32 *inUsagePage, UInt32 *inUsage, UInt32 inNumDeviceTypes );
|
||||
|
||||
// release list built by above function
|
||||
// MUST be called prior to application exit to properly release devices
|
||||
// if not called( or app crashes ) devices can be recovered by pluging into different location in USB chain
|
||||
extern void HIDReleaseDeviceList( void );
|
||||
|
||||
// does a device list exist
|
||||
extern Boolean HIDHaveDeviceList( void );
|
||||
|
||||
// how many HID devices have been found
|
||||
// returns 0 if no device list exist
|
||||
extern UInt32 HIDCountDevices( void );
|
||||
|
||||
// how many elements does a specific device have
|
||||
// returns 0 if device is invalid or NULL
|
||||
// uses mask of HIDElementTypeMask to restrict element found
|
||||
// use kHIDElementTypeIO to get non-collection elements
|
||||
extern UInt32 HIDCountDeviceElements( const hu_device_t* inDevice, HIDElementTypeMask inTypeMask );
|
||||
|
||||
// get the first device in the device list
|
||||
// returns NULL if no list exists
|
||||
extern hu_device_t* HIDGetFirstDevice( void );
|
||||
|
||||
// get next device in list given current device as parameter
|
||||
// returns NULL if end of list
|
||||
extern hu_device_t* HIDGetNextDevice( const hu_device_t* inDevice );
|
||||
|
||||
// get the first element of device passed in as parameter
|
||||
// returns NULL if no list exists or device does not exists or is NULL
|
||||
// uses mask of HIDElementTypeMask to restrict element found
|
||||
// use kHIDElementTypeIO to get previous HIDGetFirstDeviceElement functionality
|
||||
extern hu_element_t* HIDGetFirstDeviceElement( const hu_device_t* inDevice, HIDElementTypeMask inTypeMask );
|
||||
|
||||
// get next element of given device in list given current element as parameter
|
||||
// will walk down each collection then to next element or collection( depthwise traverse )
|
||||
// returns NULL if end of list
|
||||
// uses mask of HIDElementTypeMask to restrict element found
|
||||
// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality
|
||||
extern hu_element_t* HIDGetNextDeviceElement( hu_element_t* inElement, HIDElementTypeMask inTypeMask );
|
||||
|
||||
// get previous element of given device in list given current element as parameter
|
||||
// this walks directly up the tree to the top element and does not search at each level
|
||||
// returns NULL if beginning of list
|
||||
// uses mask of HIDElementTypeMask to restrict element found
|
||||
// use kHIDElementTypeIO to get non-collection elements
|
||||
extern hu_element_t* HIDGetPreviousDeviceElement( const hu_element_t* inElement, HIDElementTypeMask inTypeMask );
|
||||
|
||||
// Sets the client hot plug callback routine
|
||||
extern OSStatus HIDSetHotPlugCallback( HotPlugCallbackProcPtr inHotPlugCallbackProcPtr );
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark Name Lookup Interfaces
|
||||
/*****************************************************/
|
||||
|
||||
// get vendor name from vendor ID
|
||||
extern Boolean HIDGetVendorNameFromVendorID( long inVendorID, char* outCStrName );
|
||||
|
||||
// get product name from vendor/product ID
|
||||
extern Boolean HIDGetProductNameFromVendorProductID( long inVendorID, long inProductID, char* outCStrName );
|
||||
|
||||
// set name from vendor id/product id look up( using cookies )
|
||||
extern Boolean HIDGetElementNameFromVendorProductCookie( long inVendorID, long inProductID, long inCookie, char* inCStrName );
|
||||
|
||||
// set name from vendor id/product id look up( using usage page & usage )
|
||||
extern Boolean HIDGetElementNameFromVendorProductUsage( long inVendorID, long inProductID, long inUsagePage, long inUsage, char* inCStrName );
|
||||
|
||||
// Add device to usage & cookie db's
|
||||
extern Boolean HIDAddDeviceToXML( const hu_device_t* inDevice );
|
||||
|
||||
// Add element to usage & cookie db's
|
||||
extern Boolean HIDAddDeviceElementToXML( const hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
// returns C string type name given a type enumeration passed in as parameter( see IOHIDKeys.h )
|
||||
// returns empty string for invalid types
|
||||
extern void HIDGetTypeName( IOHIDElementType inIOHIDElementType, char* inCStrName );
|
||||
|
||||
// returns C string usage given usage page and usage passed in as parameters( see IOUSBHIDParser.h )
|
||||
// returns usage page and usage values in string form for unknown values
|
||||
extern void HIDGetUsageName( long inUsagePage, long inUsage, char* inCStrName );
|
||||
|
||||
/*****************************************************/
|
||||
// convert an element type to a mask
|
||||
extern HIDElementTypeMask HIDConvertElementTypeToMask( IOHIDElementType inIOHIDElementType );
|
||||
|
||||
// find this device
|
||||
extern Boolean HIDFindDevice( const hu_device_t* inSearchDevice, hu_device_t **outFoundDevice );
|
||||
|
||||
// find the device and element for this action
|
||||
// Device: serial, vendorID, productID, location, inUsagePage, usage
|
||||
// Element: cookie, inUsagePage, usage,
|
||||
extern Boolean HIDFindActionDeviceAndElement( const hu_device_t* inSearchDevice, const hu_element_t* inSearchElement, hu_device_t **outFoundDevice, hu_element_t **outFoundElement );
|
||||
|
||||
// find the device and element for this action
|
||||
// Device: serial, vendorID, productID, location, inUsagePage, usage
|
||||
// Element: cookie, inUsagePage, usage,
|
||||
|
||||
extern Boolean HIDFindSubElement( const hu_element_t* inStartElement, const hu_element_t* inSearchElement, hu_element_t **outFoundElement );
|
||||
|
||||
// print out all of an elements information
|
||||
extern int HIDPrintElement( const hu_element_t* inElement );
|
||||
|
||||
// return TRUE if this is a valid device pointer
|
||||
extern Boolean HIDIsValidDevice( const hu_device_t* inDevice );
|
||||
|
||||
// return TRUE if this is a valid element pointer for this device
|
||||
extern Boolean HIDIsValidElement( const hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark Element Event Queue and Value Interfaces
|
||||
/*****************************************************/
|
||||
enum
|
||||
{
|
||||
kDefaultUserMin = 0, // default user min and max used for scaling
|
||||
kDefaultUserMax = 255
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kDeviceQueueSize = 50 // this is wired kernel memory so should be set to as small as possible
|
||||
// but should account for the maximum possible events in the queue
|
||||
// USB updates will likely occur at 100 Hz so one must account for this rate of
|
||||
// if states change quickly( updates are only posted on state changes )
|
||||
};
|
||||
|
||||
/*****************************************************/
|
||||
// queues specific element, performing any device queue set up required
|
||||
extern unsigned long HIDQueueElement( hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
// adds all elements to queue, performing any device queue set up required
|
||||
extern unsigned long HIDQueueDevice( hu_device_t* inDevice );
|
||||
|
||||
// removes element for queue, if last element in queue will release queue and device
|
||||
extern unsigned long HIDDequeueElement( hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
// completely removes all elements from queue and releases queue and device
|
||||
extern unsigned long HIDDequeueDevice( hu_device_t* inDevice );
|
||||
|
||||
// releases all device queues for quit or rebuild( must be called )
|
||||
extern unsigned long HIDReleaseAllDeviceQueues( void );
|
||||
|
||||
// releases interface to device, should be done prior to exiting application( called from HIDReleaseDeviceList )
|
||||
extern unsigned long HIDCloseReleaseInterface( hu_device_t* inDevice );
|
||||
|
||||
// returns TRUE if an event is avialable for the element and fills out *outHIDEvent structure, returns FALSE otherwise
|
||||
// outHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
|
||||
extern unsigned char HIDGetEvent( const hu_device_t* inDevice, void* outHIDEvent );
|
||||
|
||||
// returns current value for element, creating device interface as required, polling element
|
||||
extern long HIDGetElementEvent( const hu_device_t* inDevice, hu_element_t* inElement, IOHIDEventStruct* outIOHIDEvent );
|
||||
|
||||
// returns current value for element, creating device interface as required, polling element
|
||||
extern long HIDGetElementValue( const hu_device_t* inDevice, hu_element_t* inElement );
|
||||
|
||||
// Set an elements value
|
||||
// NOTE: This should only be used when a single element report needs to be sent.
|
||||
// If multiple elements reports are to be send then transactions should be used.
|
||||
// outIOHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
|
||||
extern long HIDSetElementValue( const hu_device_t* inDevice, const hu_element_t* inElement, void* outIOHIDEvent );
|
||||
|
||||
// Set a callback to be called when a queue goes from empty to non-empty
|
||||
// Notes: This is a MachO function pointer. If you're using CFM you have to call MachOFunctionPointerForCFMFunctionPointer.
|
||||
extern long HIDSetQueueCallback( hu_device_t* inDevice, IOHIDCallbackFunction inIOHIDCallback, void* inCallbackTarget, void* inCallbackRefcon );
|
||||
|
||||
#if defined( AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER )
|
||||
// Get a report from a device
|
||||
extern long HIDGetReport( const hu_device_t* inDevice, IOHIDReportType inIOHIDReportType, unsigned long inReportID, void* inReportBuffer, unsigned long* inReportBufferSize ) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER;
|
||||
|
||||
// Send a report to a device
|
||||
extern long HIDSetReport( const hu_device_t* inDevice, IOHIDReportType inIOHIDReportType, unsigned long inReportID, void* inReportBuffer, unsigned long inReportBufferSize ) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER;
|
||||
#endif // defined( AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER )
|
||||
|
||||
#if defined( AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER )
|
||||
// copy matching elements
|
||||
extern long HIDCopyMatchingElements( const hu_device_t* inDevice, CFDictionaryRef inMatchingDict, CFArrayRef* inElements ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
|
||||
// Set a callback to be called when a report comes in the interrupt pipe
|
||||
// Notes: This is a MachO function pointer. If you're using CFM you have to call MachOFunctionPointerForCFMFunctionPointer.
|
||||
extern long HIDSetInterruptReportHandlerCallback( const hu_device_t* inDevice, void* inReportBuffer, UInt32 inReportBufferSize, IOHIDReportCallbackFunction inIOHIDReportCallback, void* inCallbackTarget, void* inCallbackRefcon ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
|
||||
#endif // defined( AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER )
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark calibration & scale routines
|
||||
/*****************************************************/
|
||||
// returns calibrated value given raw value passed in
|
||||
// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values
|
||||
extern SInt32 HIDCalibrateValue( SInt32 inValue, hu_element_t* inElement );
|
||||
|
||||
// returns scaled value given raw value passed in
|
||||
// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values
|
||||
extern SInt32 HIDScaleValue( SInt32 inValue, const hu_element_t* inElement );
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark Conguration and Save Interfaces
|
||||
/*****************************************************/
|
||||
#define kPercentMove 10 // precent of overall range a element must move to register
|
||||
|
||||
typedef struct hu_SaveRec_t
|
||||
{
|
||||
long actionCookie;
|
||||
// device( need to add serial number when I have a test case )
|
||||
long vendorID;
|
||||
long productID;
|
||||
long locID;
|
||||
long usage;
|
||||
long usagePage;
|
||||
// elements
|
||||
long usagePageE;
|
||||
long usageE;
|
||||
void* cookie;
|
||||
}hu_SaveRec_t;
|
||||
|
||||
// polls all devices and elements for a change greater than kPercentMove. Times out after given time
|
||||
// returns TRUE and pointer to device and element if found
|
||||
// returns FALSE and NULL for both parameters if not found
|
||||
extern Boolean HIDConfigureAction( hu_device_t **outDevice, hu_element_t **outElement, float inTimeout );
|
||||
|
||||
// -- These are routines to use if the applcation wants HID Utilities to do the file handling --
|
||||
// Notes: the FILE* is a MachO posix FILE and will not work with the MWCW MSL FILE* type.
|
||||
|
||||
// take input records, save required info
|
||||
// assume file is open and at correct position.
|
||||
extern void HIDSaveElementConfig( FILE* inFILE, const hu_device_t* inDevice, const hu_element_t* inElement, long inActionCookie );
|
||||
|
||||
// take file, read one record( assume file position is correct and file is open )
|
||||
// search for matching device
|
||||
// return inDevice, inElement and cookie for action
|
||||
extern long HIDRestoreElementConfig( FILE* inFILE, hu_device_t **outDevice, hu_element_t **outElement );
|
||||
|
||||
// -- These routines use the CFPreferences API's.
|
||||
|
||||
// Save the device & element values into the specified key in the specified applications preferences
|
||||
extern Boolean HIDSaveElementPref( CFStringRef inKeyCFStringRef, CFStringRef inAppCFStringRef, const hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
// Find the specified preference in the specified application
|
||||
// search for matching device and element
|
||||
// return inDevice, inElement that matches
|
||||
|
||||
extern Boolean HIDRestoreElementPref( CFStringRef inKeyCFStringRef, CFStringRef inAppCFStringRef, hu_device_t **outDevice, hu_element_t **outElement );
|
||||
|
||||
// -- These are routines to use if the client wants to use their own file handling --
|
||||
|
||||
// Set up a config record for saving
|
||||
// takes an input records, returns record user can save as they want
|
||||
// Notes: the save rec must be pre-allocated by the calling app and will be filled out
|
||||
extern void HIDSetElementConfig( hu_SaveRec_t* inConfigRec, const hu_device_t* inDevice, const hu_element_t* inElement, long inActionCookie );
|
||||
|
||||
// Get matching element from config record
|
||||
// takes a pre-allocated and filled out config record
|
||||
// search for matching device
|
||||
// return inDevice, inElement and cookie for action
|
||||
extern long HIDGetElementConfig( hu_SaveRec_t* inConfigRec, hu_device_t **outDevice, hu_element_t **outElement );
|
||||
|
||||
/*****************************************************/
|
||||
#pragma mark Output Transaction interface
|
||||
/*****************************************************/
|
||||
// Create and open an transaction interface to device, required prior to extracting values or building Transactions
|
||||
extern unsigned long HIDTransactionAddElement( hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
// removes an element from a Transaction
|
||||
extern unsigned long HIDTransactionRemoveElement( hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
// return TRUE if this transaction contains this element
|
||||
extern Boolean HIDTransactionHasElement( hu_device_t* inDevice, const hu_element_t* inElement );
|
||||
|
||||
/* This changes the default value of an element, when the values of the */
|
||||
/* elements are cleared, on clear or commit, they are reset to the */
|
||||
/* default value */
|
||||
/* This call can be made on elements that are not in the transaction, but */
|
||||
/* has undefined behavior if made on elements not in the transaction */
|
||||
/* which are later added to the transaction. */
|
||||
/* In other words, an element should be added before its default is */
|
||||
/* set, for well defined behavior. */
|
||||
// outHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
|
||||
extern unsigned long HIDTransactionSetElementDefault( hu_device_t* inDevice, const hu_element_t* inElement, IOHIDEventStruct* inValueEvent );
|
||||
|
||||
/* Get the current setting of an element's default value */
|
||||
// outHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
|
||||
extern unsigned long HIDTransactionGetElementDefault( hu_device_t* inDevice, const hu_element_t* inElement, IOHIDEventStruct* inValueEvent );
|
||||
|
||||
/* Add a change to the transaction, by setting an element value */
|
||||
/* The change is not actually made until it is commited */
|
||||
/* The element must be part of the transaction or this call will fail */
|
||||
// outHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
|
||||
extern unsigned long HIDTransactionSetElementValue( hu_device_t* inDevice, const hu_element_t* inElement, IOHIDEventStruct* inValueEvent );
|
||||
|
||||
/* Get the current setting of an element value */
|
||||
// outHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
|
||||
extern unsigned long HIDTransactionGetElementValue( hu_device_t* inDevice, const hu_element_t* inElement, IOHIDEventStruct* inValueEvent );
|
||||
|
||||
/* Commit the transaction, or clear all the changes and start over */
|
||||
extern unsigned long HIDTransactionCommit( hu_device_t* inDevice );
|
||||
|
||||
/* Clear all the changes and start over */
|
||||
extern unsigned long HIDTransactionClear( hu_device_t* inDevice );
|
||||
|
||||
/*****************************************************/
|
||||
#if PRAGMA_STRUCT_ALIGN
|
||||
#pragma options align=reset
|
||||
#elif PRAGMA_STRUCT_PACKPUSH
|
||||
#pragma pack( pop )
|
||||
#elif PRAGMA_STRUCT_PACK
|
||||
#pragma pack( )
|
||||
#endif
|
||||
|
||||
#ifdef PRAGMA_IMPORT_OFF
|
||||
#pragma import off
|
||||
#elif PRAGMA_IMPORT
|
||||
#pragma import reset
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/*****************************************************/
|
||||
#endif // _HID_Utilities_External_h_
|
||||
@@ -1,191 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>jma</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>JMA archive</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>JMAf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>sfc</string>
|
||||
<string>smc</string>
|
||||
<string>swc</string>
|
||||
<string>fig</string>
|
||||
<string>gd3</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>CART.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x ROM Image</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>CART</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>srm</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>SRAM.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x SRAM Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SRAM</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>frz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>SAVE.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Freeze Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SAVE</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>smv</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Movie Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SMOV</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>spc</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x SPC Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SSPC</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>cht</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Cheat Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SCHT</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>rtc</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x RTC Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SRTC</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>*</string>
|
||||
</array>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Snes9x</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Snes9x 1.53, Copyright 1996-2011 Snes9x developers.</string>
|
||||
<key>CFBundleHelpBookFolder</key>
|
||||
<string>Snes9x Help</string>
|
||||
<key>CFBundleHelpBookName</key>
|
||||
<string>Snes9x Help</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>APPL.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.snes9x.macos.snes9x</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Snes9x</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.53</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>~9X~</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.53</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>Snes9x</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,189 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>jma</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>JMA archive</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>JMAf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>sfc</string>
|
||||
<string>smc</string>
|
||||
<string>swc</string>
|
||||
<string>fig</string>
|
||||
<string>gd3</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>CART.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x ROM Image</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>CART</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>srm</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>SRAM.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x SRAM Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SRAM</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>frz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>SAVE.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Freeze Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SAVE</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>smv</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Movie Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SMOV</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>spc</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x SPC Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SSPC</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>cht</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Cheat Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SCHT</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>rtc</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x RTC Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SRTC</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>*</string>
|
||||
</array>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Snes9x (i386)</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Snes9x 1.53, Copyright 1996-2011 Snes9x developers.</string>
|
||||
<key>CFBundleHelpBookFolder</key>
|
||||
<string>Snes9x Help</string>
|
||||
<key>CFBundleHelpBookName</key>
|
||||
<string>Snes9x Help</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>APPL.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.snes9x.macos.snes9x</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Snes9x</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.53</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>~9X~</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.53</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,189 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>jma</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>JMA archive</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>JMAf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>sfc</string>
|
||||
<string>smc</string>
|
||||
<string>swc</string>
|
||||
<string>fig</string>
|
||||
<string>gd3</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>CART.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x ROM Image</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>CART</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>srm</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>SRAM.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x SRAM Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SRAM</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>frz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>SAVE.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Freeze Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SAVE</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>smv</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Movie Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SMOV</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>spc</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x SPC Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SSPC</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>cht</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x Cheat Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SCHT</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>rtc</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Snes9x RTC Data</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>SRTC</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>*</string>
|
||||
</array>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Snes9x (ppc)</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Snes9x 1.53, Copyright 1996-2011 Snes9x developers.</string>
|
||||
<key>CFBundleHelpBookFolder</key>
|
||||
<string>Snes9x Help</string>
|
||||
<key>CFBundleHelpBookName</key>
|
||||
<string>Snes9x Help</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>APPL.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.snes9x.macos.snes9x</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Snes9x</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.53</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>~9X~</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.53</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,94 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg932\cocoartf1038\cocoasubrtf350
|
||||
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
|
||||
{\colortbl;\red255\green255\blue255;\red153\green102\blue51;\red0\green0\blue255;}
|
||||
\paperw11900\paperh16840\margl1440\margr1440\vieww11500\viewh12340\viewkind0
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
|
||||
\f0\fs24 \cf0 \
|
||||
|
||||
\b\fs28 FAQ for Mac port
|
||||
\b0\fs24 \
|
||||
\
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
|
||||
\b\fs26 \cf2 Differences and similarities among the Mac port and other ports
|
||||
\b0\fs24 \cf0 \
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
\cf3 Key mapping\cf0 \
|
||||
The default settings of key mapping are different. For example, the A-button is the command key on Mac, while it's the D key in Windows.\
|
||||
\
|
||||
\cf3 User interface\cf0 \
|
||||
All of the menus and dialogs are different.\
|
||||
\
|
||||
\cf3 AVI or QuickTime export\cf0 \
|
||||
Mac port supports QuickTime export instead of AVI export in Windows port.\
|
||||
\
|
||||
\cf3 Sound effect and Core Image filter\cf0 \
|
||||
These features are for Mac only because they use Mac OS X's own technologies.\
|
||||
\
|
||||
\cf3 Netplay\cf0 \
|
||||
Snes9x's netplay is incompatible between ports.\
|
||||
\
|
||||
\cf3 Command-line options\cf0 \
|
||||
Mac port doesn't support command-line options.\
|
||||
\
|
||||
\cf3 Preferences file\cf0 \
|
||||
Mac port doesn't support 'snes9x.conf' file.\
|
||||
\
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
|
||||
\b\fs26 \cf2 Emulator Specific Questions
|
||||
\b0\fs24 \cf0 \
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
\cf3 Everything is fine when I play the game, but the next time I play, my save data is not there. Why?\cf0 \
|
||||
Saving files into a locked volume and folders where you don't have permission to write will fail. Make sure where you are saving files in 'Preferences' dialog. The most common case for Mac beginners is launching Snes9x directly from the disk image with choosing 'Snes9x folder' for saving destination.\
|
||||
\
|
||||
\cf3 Why can't I press many buttons at once? Especially in Chrono Trigger.\cf0 \
|
||||
Some keyboards can only output two pressed keys at a time, except for modifier keys (shift, command, option and control). Set modifier keys to some of the necessary buttons.\
|
||||
\
|
||||
\cf3 How can I enter the Game Genie / PAR code in 'Cheat Entry' dialog?\cf0 \
|
||||
Simply enter the code directly into the address column. Snes9x automatically translates it to the general format.\
|
||||
\
|
||||
\cf3 I recently purchased a gamepad controller. Will it work on Snes9x?\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
\cf0 If your gamepad is conformable to USB Device Class Definition for Human Interface Devices, it may work. Note that most gamepads don't officially support Mac OS X even if they work without problems.\cf3 \
|
||||
\
|
||||
I connected my gamepad but it doesn't work.\cf0 \
|
||||
Gamepads cannot be used until you configure its settings in 'Configure Controllers' dialog.\
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
\cf3 I think my options in Snes9x got screwed up, how do I reset them?\cf0 \
|
||||
Quit Snes9x and trash the preferences file 'com.snes9x.macos.snes9x.plist' in ~/Library/Preferences.\
|
||||
\
|
||||
\cf3 I had a bad checksummed game that didn't work so I adjusted the header, but it still doesn't work :( Why?\cf0 \
|
||||
It should be noted that while it is possible to plop a ROM into Snestool, or several other programs, and adjust the header size to be the same as a proper 'good checksum' ROM, this merely mimics the appearance of a good ROM. Any problems still found within its evil will remain. One could compare it to covering up a circumorbital haematoma with a paper bag.\
|
||||
\
|
||||
\cf3 Why doesn't game X work?\cf0 \
|
||||
There are four possible answers to this question, depending on the scenario. Answer one is that it does work, but your ROM dump is incorrect (this MAY be fixed by reattaching your cartridge to your copier and redumping). Answer two is that we have found a solution or a hack to the problem, but have not yet implemented a fix. Answer three, a subsidiary of answer two, is that we do NOT know what is wrong with it, and as such have not yet implemented a fix. Answer four is that Snes9x CANNOT emulate the game correctly due to its poor implementation around timings between emulated units.\
|
||||
\
|
||||
\cf3 When is the next version of Snes9x coming out?\cf0 \
|
||||
Chances are it will be coming out when enough changes have been made to suitably make a release. You can generally guesstimate the release date by paying attention to the Developers forum at snes9x.com. But don't ask them when the next release will be.\
|
||||
\
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
|
||||
\b\fs26 \cf2 Miscellaneous Questions
|
||||
\b0\fs24 \cf0 \
|
||||
\
|
||||
\pard\tx285\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
|
||||
\cf3 Is it legal?\cf0 \
|
||||
This has been asked time and again, and the answer is yes. Developing, downloading, or using the emulator, Snes9x, is completely legal. Downloading games, called ROMS, however is not. If you own the original cartridge of a game, you are still not entitled to download the ROM image of that game. You may create a single backup image of your own cartridge via proper hardware, but it must be YOUR cartridge and is only usable in place of the original... so only one may be active at any time. Many sites claim that you may legally download ROMs for up to 24 hours before they must be deleted. This is also wrong; you can't legally download these for "trial" purposes. You can't download ROMs for educational purposes either. If you wish to use Super Nintendo Entertainment System games for educational purposes, contact your closest Nintendo Outlet and discuss educational programming with them. Finally, a small number of ROMs are labeled "(PD)". This means public domain, and these games are not under copyright. As such they are legal to download at your hearts content. These include programs created by internet users such as yourself for use in Super Nintendo emulators. As of this time there are no commercial videogames in the public domain.\
|
||||
\
|
||||
\cf3 My friend, Tibby, says that you are wrong and that game companies don't care if you download games!\cf0 \
|
||||
Whilst not actually a question, and more of a statement, I am afraid Tibby is incorrect. Feel free to peruse the various legal documentation sprawled throughout the World Wide Web or your local constituency. As for the blatant generalization that companies do not care; At least one does, and truthfully many more do as well, as such the statement is obviously a fallacy. For those who think it is not fair, or shouldn't be the way it is... perhaps not, though as holders of a copyright it is up to Nintendo to decide how and when their products are distributed. \
|
||||
\
|
||||
\cf3 I just purchased your fine program off eBay for $19.89, but my friend says I can download it for free. Can you guys give me my money back?\cf0 \
|
||||
Okay, this question hasn't actually been asked, however our free downloadable program does seem to get sold on eBay more often than it should, which is to say at all. We cannot reimburse anyone who was unlucky enough to be scammed into purchasing Snes9x, just as McDonalds cannot reimburse you if you purchased 100 Happy Meals from a random stranger and he gave you a frozen fish. If you find yourself in this situation... Purchasing Snes9x, not frozen fish... Please take the time to inform eBay via their heavily disguised investigations department, and leave any negative feedback that you wish. It would also be appreciated by the Snes9x team if you could mention where and when this happened so that we can take measures to stop it from happening again. While the fact we aren't making money from the program in no way bothers us (It is freeware after all), that some grubby bastards are does.\
|
||||
\
|
||||
\cf3 So err, where exactly do I contact y'all, eh?\cf0 \
|
||||
The most convenient way to contact us would be via www.snes9x.com. There is a forum that is checked at least 12 times a day by regulars, and at least a few of us can actually give some advice. E-mail is also a possibility, though it is much slower, and you'll hafta find the e-mail addresses on your own. Be sure to read the FAQ and Read me before posting, as things already answered many a time will probably result in random insults or heavy sarcasm.\
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
The manual is in 'Help' menu - 'Snes9x Help'.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
@@ -1,338 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "port.h"
|
||||
|
||||
#include "mac-prefix.h"
|
||||
#include "mac-os.h"
|
||||
#include "mac-snes9x.h"
|
||||
#include "mac-appleevent.h"
|
||||
|
||||
static AEEventHandlerUPP oappUPP, rappUPP, pdocUPP, quitUPP, odocUPP;
|
||||
|
||||
static pascal OSErr AEoapp (const AppleEvent *, AppleEvent *, long);
|
||||
static pascal OSErr AErapp (const AppleEvent *, AppleEvent *, long);
|
||||
static pascal OSErr AEpdoc (const AppleEvent *, AppleEvent *, long);
|
||||
static pascal OSErr AEquit (const AppleEvent *, AppleEvent *, long);
|
||||
static pascal OSErr AEodoc (const AppleEvent *, AppleEvent *, long);
|
||||
|
||||
|
||||
static pascal OSErr AEoapp (const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
|
||||
{
|
||||
if (running)
|
||||
return (noErr);
|
||||
|
||||
if (startopendlog)
|
||||
{
|
||||
if (SNES9X_OpenCart(NULL))
|
||||
{
|
||||
SNES9X_Go();
|
||||
QuitApplicationEventLoop();
|
||||
}
|
||||
else
|
||||
AdjustMenus();
|
||||
}
|
||||
|
||||
return (noErr);
|
||||
}
|
||||
|
||||
static pascal OSErr AErapp (const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
|
||||
{
|
||||
if (running)
|
||||
return (noErr);
|
||||
|
||||
if (!cartOpen)
|
||||
{
|
||||
if (startopendlog)
|
||||
{
|
||||
if (SNES9X_OpenCart(NULL))
|
||||
{
|
||||
SNES9X_Go();
|
||||
QuitApplicationEventLoop();
|
||||
}
|
||||
else
|
||||
AdjustMenus();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SNES9X_Go();
|
||||
QuitApplicationEventLoop();
|
||||
}
|
||||
|
||||
return (noErr);
|
||||
}
|
||||
|
||||
static pascal OSErr AEpdoc (const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
|
||||
{
|
||||
return (errAEEventNotHandled);
|
||||
}
|
||||
|
||||
static pascal OSErr AEquit (const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
|
||||
{
|
||||
if (running)
|
||||
return (noErr);
|
||||
|
||||
SNES9X_Quit();
|
||||
QuitApplicationEventLoop();
|
||||
|
||||
return (noErr);
|
||||
}
|
||||
|
||||
static pascal OSErr AEodoc (const AppleEvent *theEvent, AppleEvent *theReply, long refCon)
|
||||
{
|
||||
OSErr err;
|
||||
FSRef ref;
|
||||
AEDescList docList;
|
||||
AEKeyword keywd;
|
||||
DescType rtype;
|
||||
Size acsize;
|
||||
long count;
|
||||
|
||||
if (running)
|
||||
return (noErr);
|
||||
|
||||
err = AEGetParamDesc(theEvent, keyDirectObject, typeAEList, &docList);
|
||||
if (err)
|
||||
return (noErr);
|
||||
|
||||
err = AECountItems(&docList, &count);
|
||||
if (err || (count != 1))
|
||||
{
|
||||
err = AEDisposeDesc(&docList);
|
||||
return (noErr);
|
||||
}
|
||||
|
||||
err = AEGetNthPtr(&docList, 1, typeFSRef, &keywd, &rtype, &ref, sizeof(FSRef), &acsize);
|
||||
if (err == noErr)
|
||||
{
|
||||
if (SNES9X_OpenCart(&ref))
|
||||
{
|
||||
SNES9X_Go();
|
||||
QuitApplicationEventLoop();
|
||||
}
|
||||
else
|
||||
AdjustMenus();
|
||||
}
|
||||
|
||||
err = AEDisposeDesc(&docList);
|
||||
|
||||
return (noErr);
|
||||
}
|
||||
|
||||
void InitAppleEvents (void)
|
||||
{
|
||||
OSErr err;
|
||||
|
||||
oappUPP = NewAEEventHandlerUPP(AEoapp);
|
||||
err = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, oappUPP, 0L, false);
|
||||
|
||||
odocUPP = NewAEEventHandlerUPP(AEodoc);
|
||||
err = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, odocUPP, 0L, false);
|
||||
|
||||
pdocUPP = NewAEEventHandlerUPP(AEpdoc);
|
||||
err = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, pdocUPP, 0L, false);
|
||||
|
||||
quitUPP = NewAEEventHandlerUPP(AEquit);
|
||||
err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, quitUPP, 0L, false);
|
||||
|
||||
rappUPP = NewAEEventHandlerUPP(AErapp);
|
||||
err = AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, rappUPP, 0L, false);
|
||||
}
|
||||
|
||||
void DeinitAppleEvents (void)
|
||||
{
|
||||
DisposeAEEventHandlerUPP(oappUPP);
|
||||
DisposeAEEventHandlerUPP(odocUPP);
|
||||
DisposeAEEventHandlerUPP(pdocUPP);
|
||||
DisposeAEEventHandlerUPP(quitUPP);
|
||||
DisposeAEEventHandlerUPP(rappUPP);
|
||||
}
|
||||
@@ -1,198 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_appleevent_h_
|
||||
#define _mac_appleevent_h_
|
||||
|
||||
void InitAppleEvents (void);
|
||||
void DeinitAppleEvents (void);
|
||||
|
||||
#endif
|
||||
@@ -1,204 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_audio_h_
|
||||
#define _mac_audio_h_
|
||||
|
||||
extern int cureffect;
|
||||
|
||||
void InitMacSound (void);
|
||||
void DeinitMacSound (void);
|
||||
void MacStartSound (void);
|
||||
void MacStopSound (void);
|
||||
void ConfigureSoundEffects (void);
|
||||
void PlayAlertSound (void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,206 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_cart_h_
|
||||
#define _mac_cart_h_
|
||||
|
||||
bool8 NavOpenROMImage (FSRef *);
|
||||
bool8 NavBeginOpenROMImageSheet (WindowRef, CFStringRef);
|
||||
bool8 NavEndOpenROMImageSheet (FSRef *);
|
||||
bool8 NavBeginChooseFolderSheet (WindowRef);
|
||||
bool8 NavEndChooseFolderSheet (FSRef *);
|
||||
bool8 NavFreezeTo (char *);
|
||||
bool8 NavDefrostFrom (char *);
|
||||
bool8 NavRecordMovieTo (char *);
|
||||
bool8 NavPlayMovieFrom (char *);
|
||||
bool8 NavQTMovieRecordTo (char *);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,762 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "port.h"
|
||||
#include "cheats.h"
|
||||
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "mac-prefix.h"
|
||||
#include "mac-dialog.h"
|
||||
#include "mac-os.h"
|
||||
#include "mac-stringtools.h"
|
||||
#include "mac-cheat.h"
|
||||
|
||||
#define kDataBrowser 'BRSR'
|
||||
#define kCmCheckBox 'CHK_'
|
||||
#define kCmAddress 'ADDR'
|
||||
#define kCmValue 'VALU'
|
||||
#define kCmDescription 'DESC'
|
||||
#define kNewButton 'NEW_'
|
||||
#define kDelButton 'DEL_'
|
||||
#define kAllButton 'ALL_'
|
||||
|
||||
extern SCheatData Cheat;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 id;
|
||||
uint32 address;
|
||||
uint8 value;
|
||||
bool8 valid;
|
||||
bool8 enabled;
|
||||
char description[22];
|
||||
} CheatItem;
|
||||
|
||||
static WindowRef wRef;
|
||||
static HIViewRef dbRef;
|
||||
static CheatItem citem[MAX_CHEATS];
|
||||
static uint32 numofcheats;
|
||||
|
||||
static void InitCheatItems (void);
|
||||
static void ImportCheatItems (void);
|
||||
static void DetachCheatItems (void);
|
||||
static void AddCheatItem (void);
|
||||
static void DeleteCheatItem (void);
|
||||
static void EnableAllCheatItems (void);
|
||||
static pascal void DBItemNotificationCallBack (HIViewRef, DataBrowserItemID, DataBrowserItemNotification);
|
||||
static pascal Boolean DBCompareCallBack (HIViewRef, DataBrowserItemID, DataBrowserItemID, DataBrowserPropertyID);
|
||||
static pascal OSStatus DBClientDataCallback (HIViewRef, DataBrowserItemID, DataBrowserPropertyID, DataBrowserItemDataRef, Boolean);
|
||||
static pascal OSStatus CheatEventHandler (EventHandlerCallRef, EventRef, void *);
|
||||
|
||||
|
||||
static void InitCheatItems (void)
|
||||
{
|
||||
for (unsigned int i = 0; i < MAX_CHEATS; i++)
|
||||
{
|
||||
citem[i].id = i + 1;
|
||||
citem[i].valid = false;
|
||||
citem[i].enabled = false;
|
||||
citem[i].address = 0;
|
||||
citem[i].value = 0;
|
||||
sprintf(citem[i].description, "Cheat %03" PRIu32, citem[i].id);
|
||||
}
|
||||
}
|
||||
|
||||
static void ImportCheatItems (void)
|
||||
{
|
||||
for (unsigned int i = 0; i < Cheat.num_cheats; i++)
|
||||
{
|
||||
citem[i].valid = true;
|
||||
citem[i].enabled = Cheat.c[i].enabled;
|
||||
citem[i].address = Cheat.c[i].address;
|
||||
citem[i].value = Cheat.c[i].byte;
|
||||
strcpy(citem[i].description, Cheat.c[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
static void DetachCheatItems (void)
|
||||
{
|
||||
S9xDeleteCheats(); // Cheat.num_cheats = 0
|
||||
|
||||
for (unsigned int i = 0; i < MAX_CHEATS; i++)
|
||||
{
|
||||
if (citem[i].valid)
|
||||
{
|
||||
strcpy(Cheat.c[Cheat.num_cheats].name, citem[i].description);
|
||||
S9xAddCheat(citem[i].enabled, false, citem[i].address, citem[i].value); // Cheat.num_cheats++
|
||||
}
|
||||
}
|
||||
|
||||
S9xApplyCheats();
|
||||
}
|
||||
|
||||
void ConfigureCheat (void)
|
||||
{
|
||||
if (!cartOpen)
|
||||
return;
|
||||
|
||||
OSStatus err;
|
||||
IBNibRef nibRef;
|
||||
|
||||
err = CreateNibReference(kMacS9XCFString, &nibRef);
|
||||
if (err == noErr)
|
||||
{
|
||||
err = CreateWindowFromNib(nibRef, CFSTR("CheatEntry"), &wRef);
|
||||
if (err == noErr)
|
||||
{
|
||||
DataBrowserCallbacks callbacks;
|
||||
EventHandlerRef eref;
|
||||
EventHandlerUPP eUPP;
|
||||
EventTypeSpec events[] = { { kEventClassCommand, kEventCommandProcess },
|
||||
{ kEventClassCommand, kEventCommandUpdateStatus },
|
||||
{ kEventClassWindow, kEventWindowClose } };
|
||||
HIViewRef ctl, root;
|
||||
HIViewID cid;
|
||||
|
||||
root = HIViewGetRoot(wRef);
|
||||
cid.id = 0;
|
||||
cid.signature = kDataBrowser;
|
||||
HIViewFindByID(root, cid, &dbRef);
|
||||
|
||||
#ifdef MAC_PANTHER_SUPPORT
|
||||
if (systemVersion < 0x1040)
|
||||
{
|
||||
HISize minSize;
|
||||
Rect rct;
|
||||
|
||||
GetWindowBounds(wRef, kWindowContentRgn, &rct);
|
||||
minSize.width = (float) (rct.right - rct.left);
|
||||
minSize.height = (float) (rct.bottom - rct.top );
|
||||
err = SetWindowResizeLimits(wRef, &minSize, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
callbacks.version = kDataBrowserLatestCallbacks;
|
||||
err = InitDataBrowserCallbacks(&callbacks);
|
||||
callbacks.u.v1.itemDataCallback = NewDataBrowserItemDataUPP(DBClientDataCallback);
|
||||
callbacks.u.v1.itemCompareCallback = NewDataBrowserItemCompareUPP(DBCompareCallBack);
|
||||
callbacks.u.v1.itemNotificationCallback = NewDataBrowserItemNotificationUPP(DBItemNotificationCallBack);
|
||||
err = SetDataBrowserCallbacks(dbRef, &callbacks);
|
||||
|
||||
if (systemVersion >= 0x1040)
|
||||
err = DataBrowserChangeAttributes(dbRef, kDataBrowserAttributeListViewAlternatingRowColors, kDataBrowserAttributeNone);
|
||||
|
||||
InitCheatItems();
|
||||
ImportCheatItems();
|
||||
|
||||
DataBrowserItemID *id;
|
||||
|
||||
id = new DataBrowserItemID[MAX_CHEATS];
|
||||
if (!id)
|
||||
QuitWithFatalError(0, "cheat 01");
|
||||
|
||||
numofcheats = 0;
|
||||
|
||||
for (unsigned int i = 0; i < MAX_CHEATS; i++)
|
||||
{
|
||||
if (citem[i].valid)
|
||||
{
|
||||
id[numofcheats] = citem[i].id;
|
||||
numofcheats++;
|
||||
}
|
||||
}
|
||||
|
||||
if (numofcheats)
|
||||
err = AddDataBrowserItems(dbRef, kDataBrowserNoItem, numofcheats, id, kDataBrowserItemNoProperty);
|
||||
|
||||
delete [] id;
|
||||
|
||||
cid.signature = kNewButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
if (numofcheats == MAX_CHEATS)
|
||||
err = DeactivateControl(ctl);
|
||||
else
|
||||
err = ActivateControl(ctl);
|
||||
|
||||
cid.signature = kAllButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
if (numofcheats == 0)
|
||||
err = DeactivateControl(ctl);
|
||||
else
|
||||
err = ActivateControl(ctl);
|
||||
|
||||
cid.signature = kDelButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
err = DeactivateControl(ctl);
|
||||
|
||||
eUPP = NewEventHandlerUPP(CheatEventHandler);
|
||||
err = InstallWindowEventHandler(wRef, eUPP, GetEventTypeCount(events), events, (void *) wRef, &eref);
|
||||
|
||||
err = SetKeyboardFocus(wRef, dbRef, kControlFocusNextPart);
|
||||
|
||||
MoveWindowPosition(wRef, kWindowCheatEntry, true);
|
||||
ShowWindow(wRef);
|
||||
err = RunAppModalLoopForWindow(wRef);
|
||||
HideWindow(wRef);
|
||||
SaveWindowPosition(wRef, kWindowCheatEntry);
|
||||
|
||||
err = RemoveEventHandler(eref);
|
||||
DisposeEventHandlerUPP(eUPP);
|
||||
|
||||
DisposeDataBrowserItemNotificationUPP(callbacks.u.v1.itemNotificationCallback);
|
||||
DisposeDataBrowserItemCompareUPP(callbacks.u.v1.itemCompareCallback);
|
||||
DisposeDataBrowserItemDataUPP(callbacks.u.v1.itemDataCallback);
|
||||
|
||||
CFRelease(wRef);
|
||||
|
||||
DetachCheatItems();
|
||||
}
|
||||
|
||||
DisposeNibReference(nibRef);
|
||||
}
|
||||
}
|
||||
|
||||
static void AddCheatItem (void)
|
||||
{
|
||||
OSStatus err;
|
||||
HIViewRef ctl, root;
|
||||
HIViewID cid;
|
||||
DataBrowserItemID id[1];
|
||||
unsigned int i;
|
||||
|
||||
if (numofcheats == MAX_CHEATS)
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_CHEATS; i++)
|
||||
if (citem[i].valid == false)
|
||||
break;
|
||||
|
||||
if (i == MAX_CHEATS)
|
||||
return;
|
||||
|
||||
numofcheats++;
|
||||
citem[i].valid = true;
|
||||
citem[i].enabled = false;
|
||||
citem[i].address = 0;
|
||||
citem[i].value = 0;
|
||||
sprintf(citem[i].description, "Cheat %03" PRIu32, citem[i].id);
|
||||
|
||||
id[0] = citem[i].id;
|
||||
err = AddDataBrowserItems(dbRef, kDataBrowserNoItem, 1, id, kDataBrowserItemNoProperty);
|
||||
err = RevealDataBrowserItem(dbRef, id[0], kCmAddress, true);
|
||||
|
||||
root = HIViewGetRoot(wRef);
|
||||
cid.id = 0;
|
||||
|
||||
if (numofcheats == MAX_CHEATS)
|
||||
{
|
||||
cid.signature = kNewButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
err = DeactivateControl(ctl);
|
||||
}
|
||||
|
||||
if (numofcheats)
|
||||
{
|
||||
cid.signature = kAllButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
err = ActivateControl(ctl);
|
||||
}
|
||||
}
|
||||
|
||||
static void DeleteCheatItem (void)
|
||||
{
|
||||
OSStatus err;
|
||||
HIViewRef ctl, root;
|
||||
HIViewID cid;
|
||||
Handle selectedItems;
|
||||
ItemCount selectionCount;
|
||||
|
||||
selectedItems = NewHandle(0);
|
||||
if (!selectedItems)
|
||||
return;
|
||||
|
||||
err = GetDataBrowserItems(dbRef, kDataBrowserNoItem, true, kDataBrowserItemIsSelected, selectedItems);
|
||||
selectionCount = (GetHandleSize(selectedItems) / sizeof(DataBrowserItemID));
|
||||
|
||||
if (selectionCount == 0)
|
||||
{
|
||||
DisposeHandle(selectedItems);
|
||||
return;
|
||||
}
|
||||
|
||||
err = RemoveDataBrowserItems(dbRef, kDataBrowserNoItem, selectionCount, (DataBrowserItemID *) *selectedItems, kDataBrowserItemNoProperty);
|
||||
|
||||
for (unsigned int i = 0; i < selectionCount; i++)
|
||||
{
|
||||
citem[((DataBrowserItemID *) (*selectedItems))[i] - 1].valid = false;
|
||||
citem[((DataBrowserItemID *) (*selectedItems))[i] - 1].enabled = false;
|
||||
numofcheats--;
|
||||
}
|
||||
|
||||
DisposeHandle(selectedItems);
|
||||
|
||||
root = HIViewGetRoot(wRef);
|
||||
cid.id = 0;
|
||||
|
||||
if (numofcheats < MAX_CHEATS)
|
||||
{
|
||||
cid.signature = kNewButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
err = ActivateControl(ctl);
|
||||
}
|
||||
|
||||
if (numofcheats == 0)
|
||||
{
|
||||
cid.signature = kAllButton;
|
||||
HIViewFindByID(root, cid, &ctl);
|
||||
err = DeactivateControl(ctl);
|
||||
}
|
||||
}
|
||||
|
||||
static void EnableAllCheatItems (void)
|
||||
{
|
||||
OSStatus err;
|
||||
|
||||
for (unsigned int i = 0; i < MAX_CHEATS; i++)
|
||||
if (citem[i].valid)
|
||||
citem[i].enabled = true;
|
||||
|
||||
err = UpdateDataBrowserItems(dbRef, kDataBrowserNoItem, kDataBrowserNoItem, NULL, kDataBrowserItemNoProperty, kCmCheckBox);
|
||||
}
|
||||
|
||||
static pascal OSStatus DBClientDataCallback (HIViewRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean changeValue)
|
||||
{
|
||||
OSStatus err, result;
|
||||
CFStringRef str;
|
||||
Boolean r;
|
||||
uint32 address;
|
||||
uint8 value;
|
||||
char code[256];
|
||||
|
||||
result = noErr;
|
||||
|
||||
switch (property)
|
||||
{
|
||||
case kCmCheckBox:
|
||||
ThemeButtonValue buttonValue;
|
||||
|
||||
if (changeValue)
|
||||
{
|
||||
err = GetDataBrowserItemDataButtonValue(itemData, &buttonValue);
|
||||
citem[itemID - 1].enabled = (buttonValue == kThemeButtonOn) ? true : false;
|
||||
}
|
||||
else
|
||||
err = SetDataBrowserItemDataButtonValue(itemData, citem[itemID - 1].enabled ? kThemeButtonOn : kThemeButtonOff);
|
||||
|
||||
break;
|
||||
|
||||
case kCmAddress:
|
||||
if (changeValue)
|
||||
{
|
||||
err = GetDataBrowserItemDataText(itemData, &str);
|
||||
r = CFStringGetCString(str, code, 256, CFStringGetSystemEncoding());
|
||||
CFRelease(str);
|
||||
if (r)
|
||||
{
|
||||
Boolean translated;
|
||||
|
||||
if (S9xProActionReplayToRaw(code, address, value) == NULL)
|
||||
translated = true;
|
||||
else
|
||||
if (S9xGameGenieToRaw(code, address, value) == NULL)
|
||||
translated = true;
|
||||
else
|
||||
{
|
||||
translated = false;
|
||||
if (sscanf(code, "%" SCNx32, &address) != 1)
|
||||
address = 0;
|
||||
else
|
||||
address &= 0xFFFFFF;
|
||||
}
|
||||
|
||||
citem[itemID - 1].address = address;
|
||||
sprintf(code, "%06" PRIX32, address);
|
||||
str = CFStringCreateWithCString(kCFAllocatorDefault, code, CFStringGetSystemEncoding());
|
||||
err = SetDataBrowserItemDataText(itemData, str);
|
||||
CFRelease(str);
|
||||
|
||||
if (translated)
|
||||
{
|
||||
DataBrowserItemID id[1];
|
||||
|
||||
citem[itemID - 1].value = value;
|
||||
id[0] = itemID;
|
||||
err = UpdateDataBrowserItems(browser, kDataBrowserNoItem, 1, id, kDataBrowserItemNoProperty, kCmValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(code, "%06" PRIX32, citem[itemID - 1].address);
|
||||
str = CFStringCreateWithCString(kCFAllocatorDefault, code, CFStringGetSystemEncoding());
|
||||
err = SetDataBrowserItemDataText(itemData, str);
|
||||
CFRelease(str);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case kCmValue:
|
||||
if (changeValue)
|
||||
{
|
||||
err = GetDataBrowserItemDataText(itemData, &str);
|
||||
r = CFStringGetCString(str, code, 256, CFStringGetSystemEncoding());
|
||||
CFRelease(str);
|
||||
if (r)
|
||||
{
|
||||
uint32 byte;
|
||||
|
||||
if (sscanf(code, "%" SCNx32, &byte) == 1)
|
||||
citem[itemID - 1].value = (uint8) byte;
|
||||
else
|
||||
{
|
||||
citem[itemID - 1].value = 0;
|
||||
err = SetDataBrowserItemDataText(itemData, CFSTR("00"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(code, "%02" PRIX8, citem[itemID - 1].value);
|
||||
str = CFStringCreateWithCString(kCFAllocatorDefault, code, CFStringGetSystemEncoding());
|
||||
err = SetDataBrowserItemDataText(itemData, str);
|
||||
CFRelease(str);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case kCmDescription:
|
||||
if (changeValue)
|
||||
{
|
||||
code[0] = 0;
|
||||
err = GetDataBrowserItemDataText(itemData, &str);
|
||||
strcpy(code, GetMultiByteCharacters(str, 19));
|
||||
CFRelease(str);
|
||||
|
||||
if (code[0] == 0)
|
||||
{
|
||||
code[0] = ' ';
|
||||
code[1] = 0;
|
||||
}
|
||||
|
||||
strcpy(citem[itemID - 1].description, code);
|
||||
}
|
||||
else
|
||||
{
|
||||
str = CFStringCreateWithCString(kCFAllocatorDefault, citem[itemID - 1].description, CFStringGetSystemEncoding());
|
||||
err = SetDataBrowserItemDataText(itemData, str);
|
||||
CFRelease(str);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case kDataBrowserItemIsActiveProperty:
|
||||
err = SetDataBrowserItemDataBooleanValue(itemData, true);
|
||||
break;
|
||||
|
||||
case kDataBrowserItemIsEditableProperty:
|
||||
err = SetDataBrowserItemDataBooleanValue(itemData, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
result = errDataBrowserPropertyNotSupported;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static pascal Boolean DBCompareCallBack (HIViewRef browser, DataBrowserItemID itemOne, DataBrowserItemID itemTwo, DataBrowserPropertyID sortProperty)
|
||||
{
|
||||
Boolean result = false;
|
||||
|
||||
switch (sortProperty)
|
||||
{
|
||||
case kCmCheckBox:
|
||||
result = (citem[itemOne - 1].enabled && !(citem[itemTwo - 1].enabled)) ? true : false;
|
||||
break;
|
||||
|
||||
case kCmAddress:
|
||||
result = (citem[itemOne - 1].address < citem[itemTwo - 1].address) ? true : false;
|
||||
break;
|
||||
|
||||
case kCmValue:
|
||||
result = (citem[itemOne - 1].value < citem[itemTwo - 1].value) ? true : false;
|
||||
break;
|
||||
|
||||
case kCmDescription:
|
||||
result = (strcmp(citem[itemOne - 1].description, citem[itemTwo - 1].description) < 0) ? true : false;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static pascal void DBItemNotificationCallBack (HIViewRef browser, DataBrowserItemID itemID, DataBrowserItemNotification message)
|
||||
{
|
||||
OSStatus err;
|
||||
HIViewRef ctl;
|
||||
HIViewID cid = { kDelButton, 0 };
|
||||
ItemCount selectionCount;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case kDataBrowserSelectionSetChanged:
|
||||
HIViewFindByID(HIViewGetRoot(wRef), cid, &ctl);
|
||||
|
||||
err = GetDataBrowserItemCount(browser, kDataBrowserNoItem, true, kDataBrowserItemIsSelected, &selectionCount);
|
||||
if (selectionCount == 0)
|
||||
err = DeactivateControl(ctl);
|
||||
else
|
||||
err = ActivateControl(ctl);
|
||||
}
|
||||
}
|
||||
|
||||
static pascal OSStatus CheatEventHandler (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData)
|
||||
{
|
||||
OSStatus err, result = eventNotHandledErr;
|
||||
WindowRef tWindowRef;
|
||||
|
||||
tWindowRef = (WindowRef) inUserData;
|
||||
|
||||
switch (GetEventClass(inEvent))
|
||||
{
|
||||
case kEventClassWindow:
|
||||
switch (GetEventKind(inEvent))
|
||||
{
|
||||
case kEventWindowClose:
|
||||
QuitAppModalLoopForWindow(tWindowRef);
|
||||
result = noErr;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case kEventClassCommand:
|
||||
switch (GetEventKind(inEvent))
|
||||
{
|
||||
HICommand tHICommand;
|
||||
|
||||
case kEventCommandUpdateStatus:
|
||||
err = GetEventParameter(inEvent, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &tHICommand);
|
||||
if (err == noErr && tHICommand.commandID == 'clos')
|
||||
{
|
||||
UpdateMenuCommandStatus(true);
|
||||
result = noErr;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case kEventCommandProcess:
|
||||
err = GetEventParameter(inEvent, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &tHICommand);
|
||||
if (err == noErr)
|
||||
{
|
||||
switch (tHICommand.commandID)
|
||||
{
|
||||
case kNewButton:
|
||||
AddCheatItem();
|
||||
result = noErr;
|
||||
break;
|
||||
|
||||
case kDelButton:
|
||||
DeleteCheatItem();
|
||||
result = noErr;
|
||||
break;
|
||||
|
||||
case kAllButton:
|
||||
EnableAllCheatItems();
|
||||
result = noErr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -1,197 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_cheat_h_
|
||||
#define _mac_cheat_h_
|
||||
|
||||
void ConfigureCheat (void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,203 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_cheatfinder_h_
|
||||
#define _mac_cheatfinder_h_
|
||||
|
||||
extern Boolean cfIsWatching;
|
||||
|
||||
void CheatFinder (void);
|
||||
void InitCheatFinder (void);
|
||||
void ResetCheatFinder (void);
|
||||
void DeinitCheatFinder (void);
|
||||
void CheatFinderDrawWatchAddr (void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,205 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_client_h_
|
||||
#define _mac_client_h_
|
||||
|
||||
void NPClientInit (void);
|
||||
void NPClientDisconnect (void);
|
||||
void NPClientStoreConfig (void);
|
||||
void NPClientRestoreConfig (void);
|
||||
void NPClientDetachNetPlayThread (void);
|
||||
void NPClientStopNetPlayThread (void);
|
||||
void NPClientProcessInput (void);
|
||||
bool8 NPClientNetPlayWaitStart (void);
|
||||
bool8 NPClientDialog (void);
|
||||
|
||||
#endif
|
||||
@@ -1,202 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#ifndef _mac_cocoatools_h_
|
||||
#define _mac_cocoatools_h_
|
||||
|
||||
void CocoaPlayFreezeDefrostSound (void);
|
||||
void CocoaAddStatTextToView (NSView *, NSString *, float, float, float, float, NSTextField **);
|
||||
void CocoaAddEditTextToView (NSView *, NSString *, float, float, float, float, NSTextField **);
|
||||
void CocoaAddMPushBtnToView (NSView *, NSString *, float, float, float, float, NSButton **);
|
||||
void CocoaAddCheckBoxToView (NSView *, NSString *, float, float, float, float, NSButton **);
|
||||
void CocoaAddPopUpBtnToView (NSView *, NSArray *, float, float, float, float, NSPopUpButton **);
|
||||
|
||||
#endif
|
||||
@@ -1,331 +0,0 @@
|
||||
/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "mac-cocoatools.h"
|
||||
|
||||
|
||||
void CocoaPlayFreezeDefrostSound (void)
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
NSBundle *bundle;
|
||||
NSString *path;
|
||||
NSSound *sound;
|
||||
BOOL r;
|
||||
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
bundle = [NSBundle mainBundle];
|
||||
path = [bundle pathForSoundResource: @"freeze_defrost"];
|
||||
if (path)
|
||||
{
|
||||
sound = [[NSSound alloc] initWithContentsOfFile: path byReference: YES];
|
||||
if (sound)
|
||||
{
|
||||
r = [sound play];
|
||||
[sound release];
|
||||
}
|
||||
}
|
||||
|
||||
[pool release];
|
||||
}
|
||||
|
||||
void CocoaAddStatTextToView (NSView *view, NSString *label, float x, float y, float w, float h, NSTextField **out)
|
||||
{
|
||||
NSTextField *control;
|
||||
|
||||
control = [[[NSTextField alloc] init] autorelease];
|
||||
|
||||
[[control cell] setControlSize: NSSmallControlSize];
|
||||
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
|
||||
[control setStringValue: NSLocalizedString(label, @"")];
|
||||
[control setBezeled: NO];
|
||||
[control setDrawsBackground: NO];
|
||||
[control setEditable: NO];
|
||||
[control setSelectable: NO];
|
||||
|
||||
[view addSubview: control];
|
||||
[control setFrame: NSMakeRect(x, y, w, h)];
|
||||
|
||||
if (out != NULL)
|
||||
*out = control;
|
||||
}
|
||||
|
||||
void CocoaAddEditTextToView (NSView *view, NSString *label, float x, float y, float w, float h, NSTextField **out)
|
||||
{
|
||||
NSTextField *control;
|
||||
|
||||
control = [[[NSTextField alloc] init] autorelease];
|
||||
|
||||
[[control cell] setControlSize: NSSmallControlSize];
|
||||
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
|
||||
[control setStringValue: NSLocalizedString(label, @"")];
|
||||
[control setBezeled: YES];
|
||||
[control setDrawsBackground: YES];
|
||||
[control setEditable: YES];
|
||||
[control setSelectable: YES];
|
||||
|
||||
[view addSubview: control];
|
||||
[control setFrame: NSMakeRect(x, y, w, h)];
|
||||
|
||||
if (out != NULL)
|
||||
*out = control;
|
||||
}
|
||||
|
||||
void CocoaAddMPushBtnToView (NSView *view, NSString *label, float x, float y, float w, float h, NSButton **out)
|
||||
{
|
||||
NSButton *control;
|
||||
|
||||
control = [[[NSButton alloc] init] autorelease];
|
||||
|
||||
[[control cell] setControlSize: NSSmallControlSize];
|
||||
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
|
||||
[control setTitle: NSLocalizedString(label, @"")];
|
||||
[control setBezelStyle: NSRoundedBezelStyle];
|
||||
[control setButtonType: NSMomentaryPushInButton];
|
||||
|
||||
[view addSubview: control];
|
||||
[control setFrame: NSMakeRect(x, y, w, h)];
|
||||
|
||||
if (out != NULL)
|
||||
*out = control;
|
||||
}
|
||||
|
||||
void CocoaAddCheckBoxToView (NSView *view, NSString *label, float x, float y, float w, float h, NSButton **out)
|
||||
{
|
||||
NSButton *control;
|
||||
|
||||
control = [[[NSButton alloc] init] autorelease];
|
||||
|
||||
[[control cell] setControlSize: NSSmallControlSize];
|
||||
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
|
||||
[control setTitle: NSLocalizedString(label, @"")];
|
||||
[control setButtonType: NSSwitchButton];
|
||||
|
||||
[view addSubview: control];
|
||||
[control setFrame: NSMakeRect(x, y, w, h)];
|
||||
|
||||
if (out != NULL)
|
||||
*out = control;
|
||||
}
|
||||
|
||||
void CocoaAddPopUpBtnToView (NSView *view, NSArray *array, float x, float y, float w, float h, NSPopUpButton **out)
|
||||
{
|
||||
NSPopUpButton *control;
|
||||
NSMenu *menu;
|
||||
int n;
|
||||
|
||||
menu = [[[NSMenu alloc] init] autorelease];
|
||||
|
||||
n = [array count];
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
NSString *item = [array objectAtIndex: i];
|
||||
if ([item isEqualToString: @"---"])
|
||||
[menu addItem: [NSMenuItem separatorItem]];
|
||||
else
|
||||
[menu addItemWithTitle: item action: NULL keyEquivalent: @""];
|
||||
}
|
||||
|
||||
control = [[[NSPopUpButton alloc] init] autorelease];
|
||||
|
||||
[[control cell] setControlSize: NSSmallControlSize];
|
||||
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
|
||||
[control setPullsDown: NO];
|
||||
[control setMenu: menu];
|
||||
|
||||
[view addSubview: control];
|
||||
[control setFrame: NSMakeRect(x, y, w, h)];
|
||||
|
||||
if (out != NULL)
|
||||
*out = control;
|
||||
}
|
||||
@@ -1,483 +0,0 @@
|
||||
S9xHandlePortCommand/***********************************************************************************
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
|
||||
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||
Jerremy Koot (jkoot@snes9x.com)
|
||||
|
||||
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||
|
||||
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||
|
||||
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||
|
||||
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||
|
||||
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||
Kris Bleakley (codeviolation@hotmail.com)
|
||||
|
||||
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||
Nach (n-a-c-h@users.sourceforge.net),
|
||||
|
||||
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
|
||||
S9xHandlePortCommand
|
||||
(c) Copyright 2006 - 2007 nitsuja
|
||||
|
||||
(c) Copyright 2009 - 2011 BearOso,
|
||||
OV2
|
||||
|
||||
|
||||
BS-X C emulator code
|
||||
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||
zones
|
||||
|
||||
C4 x86 assembler and some C emulation code
|
||||
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||
Nach,
|
||||
zsKnight (zsknight@zsnes.com)
|
||||
|
||||
C4 C++ code
|
||||
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||
Nach
|
||||
|
||||
DSP-1 emulator code
|
||||
(c) Copyright 1998 - 2006 _Demo_,
|
||||
Andreas Naive (andreasnaive@gmail.com),
|
||||
Gary Henderson,
|
||||
Ivar (ivar@snes9x.com),
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
neviksti (neviksti@hotmail.com)
|
||||
|
||||
DSP-2 emulator code
|
||||
(c) Copyright 2003 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||
Matthew Kendora,
|
||||
neviksti
|
||||
|
||||
DSP-3 emulator code
|
||||
(c) Copyright 2003 - 2006 John Weidman,
|
||||
Kris Bleakley,
|
||||
Lancer,
|
||||
z80 gaiden
|
||||
|
||||
DSP-4 emulator code
|
||||
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Nach,
|
||||
z80 gaiden
|
||||
|
||||
OBC1 emulator code
|
||||
(c) Copyright 2001 - 2004 zsKnight,
|
||||
pagefault (pagefault@zsnes.com),
|
||||
Kris Bleakley
|
||||
Ported from x86 assembler to C by sanmaiwashi
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||
(c) Copyright 2002 Matthew Kendora with research by
|
||||
zsKnight,
|
||||
John Weidman,
|
||||
Dark Force
|
||||
|
||||
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||
(c) Copyright 2009 byuu,
|
||||
neviksti
|
||||
|
||||
S-DD1 C emulator code
|
||||
(c) Copyright 2003 Brad Jorsch with research by
|
||||
Andreas Naive,
|
||||
John Weidman
|
||||
|
||||
S-RTC C emulator code
|
||||
(c) Copyright 2001 - 2006 byuu,
|
||||
John Weidman
|
||||
|
||||
ST010 C++ emulator code
|
||||
(c) Copyright 2003 Feather,
|
||||
John Weidman,
|
||||
Kris Bleakley,
|
||||
Matthew Kendora
|
||||
|
||||
Super FX x86 assembler emulator code
|
||||
(c) Copyright 1998 - 2003 _Demo_,
|
||||
pagefault,
|
||||
zsKnight
|
||||
|
||||
Super FX C emulator code
|
||||
(c) Copyright 1997 - 1999 Ivar,
|
||||
Gary Henderson,
|
||||
John Weidman
|
||||
|
||||
Sound emulator code used in 1.5-1.51
|
||||
(c) Copyright 1998 - 2003 Brad Martin
|
||||
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||
|
||||
Sound emulator code used in 1.52+
|
||||
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||
|
||||
SH assembler code partly based on x86 assembler code
|
||||
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||
|
||||
2xSaI filter
|
||||
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||
|
||||
HQ2x, HQ3x, HQ4x filters
|
||||
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||
|
||||
NTSC filter
|
||||
(c) Copyright 2006 - 2007 Shay Green
|
||||
|
||||
GTK+ GUI code
|
||||
(c) Copyright 2004 - 2011 BearOso
|
||||
|
||||
Win32 GUI code
|
||||
(c) Copyright 2003 - 2006 blip,
|
||||
funkyass,
|
||||
Matthew Kendora,
|
||||
Nach,
|
||||
nitsuja
|
||||
(c) Copyright 2009 - 2011 OV2
|
||||
|
||||
Mac OS GUI code
|
||||
(c) Copyright 1998 - 2001 John Stiles
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
|
||||
|
||||
Specific ports contains the works of other authors. See headers in
|
||||
individual files.
|
||||
|
||||
|
||||
Snes9x homepage: http://www.snes9x.com/
|
||||
|
||||
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||
and source form, for non-commercial purposes, is hereby granted without
|
||||
fee, providing that this license information and copyright notice appear
|
||||
with all copies and any derived work.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event shall the authors be held liable for any damages
|
||||
arising from the use of this software or it's derivatives.
|
||||
|
||||
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||
seek permission of the copyright holders first. Commercial use includes,
|
||||
but is not limited to, charging money for Snes9x or software derived from
|
||||
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||
using Snes9x as a promotion for your commercial product.
|
||||
|
||||
The copyright holders request that bug fixes and improvements to the code
|
||||
should be forwarded to them so everyone can benefit from the modifications
|
||||
in future versions.
|
||||
|
||||
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||
Nintendo Co., Limited and its subsidiary companies.
|
||||
***********************************************************************************/
|
||||
|
||||
/***********************************************************************************
|
||||
SNES9X for Mac OS (c) Copyright John Stiles
|
||||
|
||||
Snes9x for Mac OS X
|
||||
|
||||
(c) Copyright 2001 - 2011 zones
|
||||
(c) Copyright 2002 - 2005 107
|
||||
(c) Copyright 2002 PB1400c
|
||||
(c) Copyright 2004 Alexander and Sander
|
||||
(c) Copyright 2004 - 2005 Steven Seeger
|
||||
(c) Copyright 2005 Ryan Vogt
|
||||
***********************************************************************************/
|
||||
|
||||
|
||||
#include "port.h"
|
||||
#include "controls.h"
|
||||
|
||||
#include "mac-prefix.h"
|
||||
#include "mac-joypad.h"
|
||||
#include "mac-keyboard.h"
|
||||
#include "mac-os.h"
|
||||
#include "mac-controls.h"
|
||||
|
||||
#define ASSIGN_BUTTONf(n, s) S9xMapButton (n, cmd = S9xGetCommandT(s), false)
|
||||
#define ASSIGN_BUTTONt(n, s) S9xMapButton (n, cmd = S9xGetCommandT(s), true)
|
||||
#define ASSIGN_POINTRf(n, s) S9xMapPointer(n, cmd = S9xGetCommandT(s), false)
|
||||
#define ASSIGN_POINTRt(n, s) S9xMapPointer(n, cmd = S9xGetCommandT(s), true)
|
||||
|
||||
#define KeyIsPressed(km, k) (1 & (((unsigned char *) km) [(k) >> 3] >> ((k) & 7)))
|
||||
|
||||
|
||||
void S9xSetupDefaultKeymap (void)
|
||||
{
|
||||
s9xcommand_t cmd;
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PX, "Joypad1 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PA, "Joypad1 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PB, "Joypad1 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PY, "Joypad1 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PL, "Joypad1 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PR, "Joypad1 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PSelect, "Joypad1 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PStart, "Joypad1 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PUp, "Joypad1 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PDown, "Joypad1 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PLeft, "Joypad1 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad1PRight, "Joypad1 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PX, "Joypad2 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PA, "Joypad2 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PB, "Joypad2 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PY, "Joypad2 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PL, "Joypad2 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PR, "Joypad2 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PSelect, "Joypad2 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PStart, "Joypad2 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PUp, "Joypad2 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PDown, "Joypad2 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PLeft, "Joypad2 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad2PRight, "Joypad2 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PX, "Joypad3 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PA, "Joypad3 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PB, "Joypad3 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PY, "Joypad3 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PL, "Joypad3 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PR, "Joypad3 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PSelect, "Joypad3 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PStart, "Joypad3 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PUp, "Joypad3 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PDown, "Joypad3 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PLeft, "Joypad3 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad3PRight, "Joypad3 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PX, "Joypad4 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PA, "Joypad4 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PB, "Joypad4 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PY, "Joypad4 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PL, "Joypad4 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PR, "Joypad4 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PSelect, "Joypad4 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PStart, "Joypad4 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PUp, "Joypad4 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PDown, "Joypad4 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PLeft, "Joypad4 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad4PRight, "Joypad4 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PX, "Joypad5 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PA, "Joypad5 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PB, "Joypad5 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PY, "Joypad5 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PL, "Joypad5 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PR, "Joypad5 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PSelect, "Joypad5 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PStart, "Joypad5 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PUp, "Joypad5 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PDown, "Joypad5 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PLeft, "Joypad5 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad5PRight, "Joypad5 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PX, "Joypad6 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PA, "Joypad6 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PB, "Joypad6 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PY, "Joypad6 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PL, "Joypad6 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PR, "Joypad6 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PSelect, "Joypad6 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PStart, "Joypad6 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PUp, "Joypad6 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PDown, "Joypad6 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PLeft, "Joypad6 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad6PRight, "Joypad6 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PX, "Joypad7 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PA, "Joypad7 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PB, "Joypad7 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PY, "Joypad7 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PL, "Joypad7 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PR, "Joypad7 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PSelect, "Joypad7 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PStart, "Joypad7 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PUp, "Joypad7 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PDown, "Joypad7 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PLeft, "Joypad7 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad7PRight, "Joypad7 Right");
|
||||
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PX, "Joypad8 X");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PA, "Joypad8 A");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PB, "Joypad8 B");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PY, "Joypad8 Y");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PL, "Joypad8 L");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PR, "Joypad8 R");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PSelect, "Joypad8 Select");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PStart, "Joypad8 Start");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PUp, "Joypad8 Up");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PDown, "Joypad8 Down");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PLeft, "Joypad8 Left");
|
||||
ASSIGN_BUTTONf(kMacCMapPad8PRight, "Joypad8 Right");
|
||||
|
||||
ASSIGN_BUTTONt(kMacCMapMouse1PL, "Mouse1 L");
|
||||
ASSIGN_BUTTONt(kMacCMapMouse1PR, "Mouse1 R");
|
||||
ASSIGN_BUTTONt(kMacCMapMouse2PL, "Mouse2 L");
|
||||
ASSIGN_BUTTONt(kMacCMapMouse2PR, "Mouse2 R");
|
||||
|
||||
ASSIGN_BUTTONt(kMacCMapScopeOffscreen, "Superscope AimOffscreen");
|
||||
ASSIGN_BUTTONt(kMacCMapScopeFire, "Superscope Fire");
|
||||
ASSIGN_BUTTONt(kMacCMapScopeCursor, "Superscope Cursor");
|
||||
ASSIGN_BUTTONt(kMacCMapScopeTurbo, "Superscope ToggleTurbo");
|
||||
ASSIGN_BUTTONt(kMacCMapScopePause, "Superscope Pause");
|
||||
|
||||
ASSIGN_BUTTONt(kMacCMapLGun1Offscreen, "Justifier1 AimOffscreen");
|
||||
ASSIGN_BUTTONt(kMacCMapLGun1Trigger, "Justifier1 Trigger");
|
||||
ASSIGN_BUTTONt(kMacCMapLGun1Start, "Justifier1 Start");
|
||||
ASSIGN_BUTTONt(kMacCMapLGun2Offscreen, "Justifier2 AimOffscreen");
|
||||
ASSIGN_BUTTONt(kMacCMapLGun2Trigger, "Justifier2 Trigger");
|
||||
ASSIGN_BUTTONt(kMacCMapLGun2Start, "Justifier2 Start");
|
||||
|
||||
ASSIGN_POINTRt(kMacCMapMouse1Pointer, "Pointer Mouse1");
|
||||
ASSIGN_POINTRt(kMacCMapMouse2Pointer, "Pointer Mouse2");
|
||||
ASSIGN_POINTRt(kMacCMapSuperscopePointer, "Pointer Superscope");
|
||||
ASSIGN_POINTRt(kMacCMapJustifier1Pointer, "Pointer Justifier1");
|
||||
|
||||
ASSIGN_POINTRf(PseudoPointerBase, "Pointer Justifier2");
|
||||
ASSIGN_BUTTONf(kMacCMapPseudoPtrBase + 0, "ButtonToPointer 1u Med");
|
||||
ASSIGN_BUTTONf(kMacCMapPseudoPtrBase + 1, "ButtonToPointer 1d Med");
|
||||
ASSIGN_BUTTONf(kMacCMapPseudoPtrBase + 2, "ButtonToPointer 1l Med");
|
||||
ASSIGN_BUTTONf(kMacCMapPseudoPtrBase + 3, "ButtonToPointer 1r Med");
|
||||
}
|
||||
|
||||
bool S9xPollButton (uint32 id, bool *pressed)
|
||||
{
|
||||
#define kmControlKey 0x3B
|
||||
|
||||
KeyMap keys;
|
||||
|
||||
GetKeys(keys);
|
||||
|
||||
*pressed = false;
|
||||
|
||||
if (id & k_MO) // mouse
|
||||
{
|
||||
switch (id & 0xFF)
|
||||
{
|
||||
case 0: *pressed = ISpKeyIsPressed(kISpMouseL); break;
|
||||
case 1: *pressed = ISpKeyIsPressed(kISpMouseR);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (id & k_SS) // superscope
|
||||
{
|
||||
switch (id & 0xFF)
|
||||
{
|
||||
case 0: *pressed = ISpKeyIsPressed(kISpOffScreen) | KeyIsPressed(keys, keyCode[kKeyOffScreen]); break;
|
||||
case 2: *pressed = ISpKeyIsPressed(kISpScopeC) | KeyIsPressed(keys, keyCode[kKeyScopeCursor]); break;
|
||||
case 3: *pressed = ISpKeyIsPressed(kISpScopeT) | KeyIsPressed(keys, keyCode[kKeyScopeTurbo]); break;
|
||||
case 4: *pressed = ISpKeyIsPressed(kISpScopeP) | KeyIsPressed(keys, keyCode[kKeyScopePause]); break;
|
||||
case 1: *pressed = ISpKeyIsPressed(kISpMouseL);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (id & k_LG) // justifier
|
||||
{
|
||||
if (id & k_C1)
|
||||
{
|
||||
switch (id & 0xFF)
|
||||
{
|
||||
case 0: *pressed = ISpKeyIsPressed(kISpOffScreen) | KeyIsPressed(keys, keyCode[kKeyOffScreen]); break;
|
||||
case 1: *pressed = ISpKeyIsPressed(kISpMouseL); break;
|
||||
case 2: *pressed = ISpKeyIsPressed(kISpMouseR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (id & 0xFF)
|
||||
{
|
||||
case 0: *pressed = ISpKeyIsPressed(kISp2PStart) | KeyIsPressed(keys, keyCode[k2PStart]); break;
|
||||
case 1: *pressed = ISpKeyIsPressed(kISp2PB) | KeyIsPressed(keys, keyCode[k2PB]); break;
|
||||
case 2: *pressed = ISpKeyIsPressed(kISp2PA) | KeyIsPressed(keys, keyCode[k2PA]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
bool S9xPollPointer (uint32 id, int16 *x, int16 *y)
|
||||
{
|
||||
if (id & k_PT)
|
||||
{
|
||||
if ((id & k_MO) && fullscreen)
|
||||
GetGameScreenPointer(x, y, true);
|
||||
else
|
||||
GetGameScreenPointer(x, y, false);
|
||||
}
|
||||
else
|
||||
*x = *y = 0;
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
bool S9xPollAxis (uint32 id, int16 *value)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
s9xcommand_t S9xGetPortCommandT (const char *name)
|
||||
{
|
||||
s9xcommand_t cmd;
|
||||
|
||||
ZeroMemory(&cmd, sizeof(cmd));
|
||||
cmd.type = S9xBadMapping;
|
||||
|
||||
return (cmd);
|
||||
}
|
||||
|
||||
char * S9xGetPortCommandName (s9xcommand_t command)
|
||||
{
|
||||
static char str[] = "PortCommand";
|
||||
|
||||
return (str);
|
||||
}
|
||||
|
||||
void S9xHandlePortCommand (s9xcommand_t cmd, int16 data1, int16 data2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool8 S9xMapInput (const char *name, s9xcommand_t *cmd)
|
||||
{
|
||||
return (true);
|
||||
}
|
||||
|
||||
void ControlPadFlagsToS9xReportButtons (int n, uint32 p)
|
||||
{
|
||||
uint32 base = k_HD | k_BT | k_JP | (0x100 << n);
|
||||
|
||||
S9xReportButton(base + 0, (p & 0x0040));
|
||||
S9xReportButton(base + 1, (p & 0x0080));
|
||||
S9xReportButton(base + 2, (p & 0x8000));
|
||||
S9xReportButton(base + 3, (p & 0x4000));
|
||||
S9xReportButton(base + 4, (p & 0x0020));
|
||||
S9xReportButton(base + 5, (p & 0x0010));
|
||||
S9xReportButton(base + 6, (p & 0x2000));
|
||||
S9xReportButton(base + 7, (p & 0x1000));
|
||||
S9xReportButton(base + 8, (p & 0x0800));
|
||||
S9xReportButton(base + 9, (p & 0x0400));
|
||||
S9xReportButton(base + 10, (p & 0x0200));
|
||||
S9xReportButton(base + 11, (p & 0x0100));
|
||||
}
|
||||
|
||||
void ControlPadFlagsToS9xPseudoPointer (uint32 p)
|
||||
{
|
||||
// prevent screwiness caused by trying to move the pointer left+right or up+down
|
||||
if ((p & 0x0c00) == 0x0c00) p &= ~0x0c00;
|
||||
if ((p & 0x0300) == 0x0300) p &= ~0x0300;
|
||||
|
||||
// checks added to prevent a lack of right/down movement from breaking left/up movement
|
||||
if (!(p & 0x0400))
|
||||
S9xReportButton(kMacCMapPseudoPtrBase + 0, (p & 0x0800));
|
||||
if (!(p & 0x0800))
|
||||
S9xReportButton(kMacCMapPseudoPtrBase + 1, (p & 0x0400));
|
||||
if (!(p & 0x0100))
|
||||
S9xReportButton(kMacCMapPseudoPtrBase + 2, (p & 0x0200));
|
||||
if (!(p & 0x0200))
|
||||
S9xReportButton(kMacCMapPseudoPtrBase + 3, (p & 0x0100));
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user