[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[633] trunk
Brought to you by:
fredm
From: <fr...@us...> - 2010-03-17 11:02:59
|
Revision: 633 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=633&view=rev Author: fredm Date: 2010-03-17 11:02:52 +0000 (Wed, 17 Mar 2010) Log Message: ----------- Statically link libspectrum as there doesn't seem to be any benefit to using the framework. Modified Paths: -------------- trunk/README trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj trunk/fuse/fusepb/config.h Added Paths: ----------- trunk/fuse/fusepb/generate.pl trunk/fuse/fusepb/libspectrum trunk/fuse/fusepb/libspectrum.h Modified: trunk/README =================================================================== --- trunk/README 2010-01-16 09:34:06 UTC (rev 632) +++ trunk/README 2010-03-17 11:02:52 UTC (rev 633) @@ -6,23 +6,12 @@ Your Mac is expected to be running OS X 10.6 with the Xcode development environment. -The directory structure is expected to be: -fuse/ - FuseGenerator - FuseImporter - audiofile - fuse - libspectrum - Full build instructions: Uncompress the source package, and cd into the directory created. Then: cd audiofile xcodebuild -configuration Deployment cd .. -cd libspectrum -xcodebuild -configuration Deployment -cd .. cd FuseGenerator xcodebuild -configuration Release cd .. Modified: trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj =================================================================== --- trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj 2010-01-16 09:34:06 UTC (rev 632) +++ trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj 2010-03-17 11:02:52 UTC (rev 633) @@ -28,7 +28,6 @@ B61F459C09121DF100C8096C /* tape_plus3.szx in CopyFiles */ = {isa = PBXBuildFile; fileRef = B650C4080765986A00DE7E81 /* tape_plus3.szx */; }; B61F459D09121DF100C8096C /* tape_plus2a.szx in CopyFiles */ = {isa = PBXBuildFile; fileRef = B650C4060765984000DE7E81 /* tape_plus2a.szx */; }; B61F459F09121DF100C8096C /* tape_scorpion.szx in CopyFiles */ = {isa = PBXBuildFile; fileRef = B650C40A0765988200DE7E81 /* tape_scorpion.szx */; }; - B61F45A209121DF100C8096C /* spectrum.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F541C04303963A9F01C2A5B9 /* spectrum.framework */; }; B61F45FF09121DF100C8096C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; B61F460009121DF100C8096C /* Credits.html in Resources */ = {isa = PBXBuildFile; fileRef = F5F291060396932B01730B00 /* Credits.html */; }; B61F460C09121DF100C8096C /* 48.rom in Resources */ = {isa = PBXBuildFile; fileRef = F559854C0389212301A804BA /* 48.rom */; }; @@ -148,9 +147,9 @@ B61F469A09121DF100C8096C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; B61F469B09121DF100C8096C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; }; B61F469C09121DF100C8096C /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; }; - B61F469D09121DF100C8096C /* spectrum.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F541C04303963A9F01C2A5B9 /* spectrum.framework */; }; B61F46A409121DF100C8096C /* FuseImporter.mdimporter in CopyFiles */ = {isa = PBXBuildFile; fileRef = B64FEA96084F8EC300879389 /* FuseImporter.mdimporter */; }; B6251C3E0C2EB24500BD5543 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6251C3D0C2EB24500BD5543 /* QuartzCore.framework */; }; + B629532E114FB265007808E0 /* libspectrum.h.in in Resources */ = {isa = PBXBuildFile; fileRef = B6DCBB7A114FA0E700DC9A11 /* libspectrum.h.in */; }; B62B19E10DD31DF500D42AAF /* scalers16.c in Sources */ = {isa = PBXBuildFile; fileRef = B62B19E00DD31DF500D42AAF /* scalers16.c */; }; B62B1A280DD6655800D42AAF /* fuse.c in Sources */ = {isa = PBXBuildFile; fileRef = B62B1A270DD6655800D42AAF /* fuse.c */; }; B62B1A2A0DD667EC00D42AAF /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = B62B1A290DD667EC00D42AAF /* main.mm */; }; @@ -235,6 +234,42 @@ B6CE3A190CD218A6005ACDC8 /* gluck.rom in Resources */ = {isa = PBXBuildFile; fileRef = B6CE3A180CD218A6005ACDC8 /* gluck.rom */; }; B6CE7F420B2830A300EB65B3 /* cocoajoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = B6CE7F3C0B2830A300EB65B3 /* cocoajoystick.c */; }; B6CE7FCE0B28FBD600EB65B3 /* DisplayOpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6CE7FCC0B28FBD600EB65B3 /* DisplayOpenGLView.m */; }; + B6DCBBBF114FA0E700DC9A11 /* bzip2.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB62114FA0E700DC9A11 /* bzip2.c */; }; + B6DCBBC4114FA0E700DC9A11 /* creator.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB67114FA0E700DC9A11 /* creator.c */; }; + B6DCBBC5114FA0E700DC9A11 /* crypto.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB68114FA0E700DC9A11 /* crypto.c */; }; + B6DCBBC6114FA0E700DC9A11 /* csw.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB69114FA0E700DC9A11 /* csw.c */; }; + B6DCBBC7114FA0E700DC9A11 /* dck.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB6A114FA0E700DC9A11 /* dck.c */; }; + B6DCBBD2114FA0E700DC9A11 /* ide.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB77114FA0E700DC9A11 /* ide.c */; }; + B6DCBBD3114FA0E700DC9A11 /* internals.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DCBB78114FA0E700DC9A11 /* internals.h */; }; + B6DCBBD4114FA0E700DC9A11 /* libspectrum.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB79114FA0E700DC9A11 /* libspectrum.c */; }; + B6DCBBD9114FA0E700DC9A11 /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB7E114FA0E700DC9A11 /* memory.c */; }; + B6DCBBDA114FA0E700DC9A11 /* microdrive.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB7F114FA0E700DC9A11 /* microdrive.c */; }; + B6DCBBDC114FA0E700DC9A11 /* garray.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB82114FA0E700DC9A11 /* garray.c */; }; + B6DCBBDD114FA0E700DC9A11 /* ghash.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB83114FA0E700DC9A11 /* ghash.c */; }; + B6DCBBDE114FA0E700DC9A11 /* gslist.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB84114FA0E700DC9A11 /* gslist.c */; }; + B6DCBBE0114FA0E700DC9A11 /* plusd.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB86114FA0E700DC9A11 /* plusd.c */; }; + B6DCBBE2114FA0E700DC9A11 /* rzx.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB88114FA0E700DC9A11 /* rzx.c */; }; + B6DCBBE3114FA0E700DC9A11 /* sna.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB89114FA0E700DC9A11 /* sna.c */; }; + B6DCBBE5114FA0E700DC9A11 /* snapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB8B114FA0E700DC9A11 /* snapshot.c */; }; + B6DCBBE6114FA0E700DC9A11 /* snp.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB8C114FA0E700DC9A11 /* snp.c */; }; + B6DCBBE7114FA0E700DC9A11 /* sp.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB8D114FA0E700DC9A11 /* sp.c */; }; + B6DCBBE8114FA0E700DC9A11 /* symbol_table.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB8E114FA0E700DC9A11 /* symbol_table.c */; }; + B6DCBBE9114FA0E700DC9A11 /* szx.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB8F114FA0E700DC9A11 /* szx.c */; }; + B6DCBBEA114FA0E700DC9A11 /* tap.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB90114FA0E700DC9A11 /* tap.c */; }; + B6DCBBEB114FA0E700DC9A11 /* tape.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB91114FA0E700DC9A11 /* tape.c */; }; + B6DCBBEE114FA0E700DC9A11 /* tape_block.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBB94114FA0E700DC9A11 /* tape_block.c */; }; + B6DCBBEF114FA0E700DC9A11 /* tape_block.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DCBB95114FA0E700DC9A11 /* tape_block.h */; }; + B6DCBC0B114FA0E700DC9A11 /* timings.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB2114FA0E700DC9A11 /* timings.c */; }; + B6DCBC0C114FA0E700DC9A11 /* tzx_read.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB3114FA0E700DC9A11 /* tzx_read.c */; }; + B6DCBC0D114FA0E700DC9A11 /* tzx_write.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB4114FA0E700DC9A11 /* tzx_write.c */; }; + B6DCBC0E114FA0E700DC9A11 /* warajevo_read.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB5114FA0E700DC9A11 /* warajevo_read.c */; }; + B6DCBC0F114FA0E700DC9A11 /* wav.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB6114FA0E700DC9A11 /* wav.c */; }; + B6DCBC10114FA0E700DC9A11 /* z80.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB7114FA0E700DC9A11 /* z80.c */; }; + B6DCBC11114FA0E700DC9A11 /* z80em.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB8114FA0E700DC9A11 /* z80em.c */; }; + B6DCBC12114FA0E700DC9A11 /* zlib.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBB9114FA0E700DC9A11 /* zlib.c */; }; + B6DCBC13114FA0E700DC9A11 /* zxs.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBBBA114FA0E700DC9A11 /* zxs.c */; }; + B6DCBC96114FA67200DC9A11 /* tape_accessors.txt in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBC14114FA19F00DC9A11 /* tape_accessors.txt */; }; + B6DCBC97114FA67200DC9A11 /* snap_accessors.txt in Sources */ = {isa = PBXBuildFile; fileRef = B6DCBC16114FA1AF00DC9A11 /* snap_accessors.txt */; }; B6DDE53C0D67963600D6F905 /* ui.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DDE53B0D67963600D6F905 /* ui.c */; }; B6E0252C0B38AFE500E23A0F /* keysyms.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E0252B0B38AFE500E23A0F /* keysyms.m */; }; B6F047F60952A6D6006D8005 /* tape_se.szx in CopyFiles */ = {isa = PBXBuildFile; fileRef = B6F047F20952A6BA006D8005 /* tape_se.szx */; }; @@ -251,6 +286,43 @@ B6FA75C60C1D76A5007F5A10 /* audiofile.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B6FA759C0C1D7507007F5A10 /* audiofile.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXBuildRule section */ + B6DCBC42114FA33300DC9A11 /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*ibspectrum.h.in"; + fileType = pattern.proxy; + isEditable = 1; + outputFiles = ( + "${SRCROOT}/libspectrum.h", + ); + script = "perl -p ${SRCROOT}/generate.pl ${INPUT_FILE_PATH} > ${SRCROOT}/libspectrum.h"; + }; + B6DCBC47114FA3E100DC9A11 /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*ape_accessors.txt"; + fileType = pattern.proxy; + isEditable = 1; + outputFiles = ( + "$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).c", + "$(DERIVED_FILE_DIR)/tape_set.c", + ); + script = "perl ${SRCROOT}/libspectrum/tape_accessors.pl ${INPUT_FILE_PATH} > ${DERIVED_FILE_DIR}/${INPUT_FILE_BASE}.c\nperl ${SRCROOT}/libspectrum/tape_set.pl ${INPUT_FILE_PATH} > ${DERIVED_FILE_DIR}/tape_set.c"; + }; + B6DCBC48114FA3E100DC9A11 /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*nap_accessors.txt"; + fileType = pattern.proxy; + isEditable = 1; + outputFiles = ( + "$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).c", + ); + script = "perl ${SRCROOT}/libspectrum/accessor.pl ${INPUT_FILE_PATH} > ${DERIVED_FILE_DIR}/${INPUT_FILE_BASE}.c"; + }; +/* End PBXBuildRule section */ + /* Begin PBXCopyFilesBuildPhase section */ B604B2190DC1827200981CC7 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; @@ -293,7 +365,6 @@ dstSubfolderSpec = 10; files = ( B6FA75C60C1D76A5007F5A10 /* audiofile.framework in CopyFiles */, - B61F45A209121DF100C8096C /* spectrum.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -541,6 +612,43 @@ B6CE7FCC0B28FBD600EB65B3 /* DisplayOpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = DisplayOpenGLView.m; sourceTree = "<group>"; }; B6D2989105B061CB00C2AA14 /* MemoryBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryBrowserController.h; path = controllers/MemoryBrowserController.h; sourceTree = "<group>"; }; B6D2989205B061CB00C2AA14 /* MemoryBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MemoryBrowserController.m; path = controllers/MemoryBrowserController.m; sourceTree = "<group>"; }; + B6DCBB62114FA0E700DC9A11 /* bzip2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bzip2.c; sourceTree = "<group>"; }; + B6DCBB67114FA0E700DC9A11 /* creator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = creator.c; sourceTree = "<group>"; }; + B6DCBB68114FA0E700DC9A11 /* crypto.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crypto.c; sourceTree = "<group>"; }; + B6DCBB69114FA0E700DC9A11 /* csw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = csw.c; sourceTree = "<group>"; }; + B6DCBB6A114FA0E700DC9A11 /* dck.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dck.c; sourceTree = "<group>"; }; + B6DCBB77114FA0E700DC9A11 /* ide.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ide.c; sourceTree = "<group>"; }; + B6DCBB78114FA0E700DC9A11 /* internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internals.h; sourceTree = "<group>"; }; + B6DCBB79114FA0E700DC9A11 /* libspectrum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = libspectrum.c; sourceTree = "<group>"; }; + B6DCBB7A114FA0E700DC9A11 /* libspectrum.h.in */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = libspectrum.h.in; sourceTree = "<group>"; }; + B6DCBB7E114FA0E700DC9A11 /* memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memory.c; sourceTree = "<group>"; }; + B6DCBB7F114FA0E700DC9A11 /* microdrive.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = microdrive.c; sourceTree = "<group>"; }; + B6DCBB82114FA0E700DC9A11 /* garray.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = garray.c; sourceTree = "<group>"; }; + B6DCBB83114FA0E700DC9A11 /* ghash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ghash.c; sourceTree = "<group>"; }; + B6DCBB84114FA0E700DC9A11 /* gslist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gslist.c; sourceTree = "<group>"; }; + B6DCBB86114FA0E700DC9A11 /* plusd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = plusd.c; sourceTree = "<group>"; }; + B6DCBB88114FA0E700DC9A11 /* rzx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rzx.c; sourceTree = "<group>"; }; + B6DCBB89114FA0E700DC9A11 /* sna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sna.c; sourceTree = "<group>"; }; + B6DCBB8B114FA0E700DC9A11 /* snapshot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snapshot.c; sourceTree = "<group>"; }; + B6DCBB8C114FA0E700DC9A11 /* snp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snp.c; sourceTree = "<group>"; }; + B6DCBB8D114FA0E700DC9A11 /* sp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sp.c; sourceTree = "<group>"; }; + B6DCBB8E114FA0E700DC9A11 /* symbol_table.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = symbol_table.c; sourceTree = "<group>"; }; + B6DCBB8F114FA0E700DC9A11 /* szx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = szx.c; sourceTree = "<group>"; }; + B6DCBB90114FA0E700DC9A11 /* tap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tap.c; sourceTree = "<group>"; }; + B6DCBB91114FA0E700DC9A11 /* tape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tape.c; sourceTree = "<group>"; }; + B6DCBB94114FA0E700DC9A11 /* tape_block.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tape_block.c; sourceTree = "<group>"; }; + B6DCBB95114FA0E700DC9A11 /* tape_block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tape_block.h; sourceTree = "<group>"; }; + B6DCBBB2114FA0E700DC9A11 /* timings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timings.c; sourceTree = "<group>"; }; + B6DCBBB3114FA0E700DC9A11 /* tzx_read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tzx_read.c; sourceTree = "<group>"; }; + B6DCBBB4114FA0E700DC9A11 /* tzx_write.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tzx_write.c; sourceTree = "<group>"; }; + B6DCBBB5114FA0E700DC9A11 /* warajevo_read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = warajevo_read.c; sourceTree = "<group>"; }; + B6DCBBB6114FA0E700DC9A11 /* wav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wav.c; sourceTree = "<group>"; }; + B6DCBBB7114FA0E700DC9A11 /* z80.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = z80.c; sourceTree = "<group>"; }; + B6DCBBB8114FA0E700DC9A11 /* z80em.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = z80em.c; sourceTree = "<group>"; }; + B6DCBBB9114FA0E700DC9A11 /* zlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zlib.c; sourceTree = "<group>"; }; + B6DCBBBA114FA0E700DC9A11 /* zxs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zxs.c; sourceTree = "<group>"; }; + B6DCBC14114FA19F00DC9A11 /* tape_accessors.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = tape_accessors.txt; path = ../../libspectrum/libspectrum/tape_accessors.txt; sourceTree = SOURCE_ROOT; }; + B6DCBC16114FA1AF00DC9A11 /* snap_accessors.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = snap_accessors.txt; path = ../../libspectrum/libspectrum/snap_accessors.txt; sourceTree = SOURCE_ROOT; }; B6DDE5280D64D96E00D6F905 /* pentagon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pentagon.h; path = machines/pentagon.h; sourceTree = "<group>"; }; B6DDE53B0D67963600D6F905 /* ui.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ui.c; sourceTree = "<group>"; }; B6E0252B0B38AFE500E23A0F /* keysyms.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = keysyms.m; sourceTree = "<group>"; }; @@ -579,7 +687,6 @@ B6FEA44F0444C3370013916D /* tc2068.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = tc2068.c; path = ../machines/tc2068.c; sourceTree = SOURCE_ROOT; }; F520C8BC038D022E01A804BA /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; F536B56503A0C275011517A0 /* utils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = utils.c; path = ../utils.c; sourceTree = SOURCE_ROOT; }; - F541C04303963A9F01C2A5B9 /* spectrum.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = spectrum.framework; path = ../../libspectrum/build/Deployment/spectrum.framework; sourceTree = SOURCE_ROOT; }; F541FB5E03B0B33401FF8235 /* scaler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = scaler.h; path = ../ui/scaler/scaler.h; sourceTree = SOURCE_ROOT; }; F54670EB03A3F3E70143EC2C /* settings.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = settings.m; sourceTree = SOURCE_ROOT; }; F559854C0389212301A804BA /* 48.rom */ = {isa = PBXFileReference; lastKnownFileType = file; name = 48.rom; path = ../roms/48.rom; sourceTree = SOURCE_ROOT; }; @@ -657,7 +764,6 @@ B61F469A09121DF100C8096C /* Cocoa.framework in Frameworks */, B61F469B09121DF100C8096C /* Foundation.framework in Frameworks */, B61F469C09121DF100C8096C /* AppKit.framework in Frameworks */, - B61F469D09121DF100C8096C /* spectrum.framework in Frameworks */, B64E2A170A6534A3006863D9 /* Carbon.framework in Frameworks */, B6A6F0EE0B3D5F9E000B88E9 /* CoreAudio.framework in Frameworks */, B6A6F0F30B3D602F000B88E9 /* AudioUnit.framework in Frameworks */, @@ -691,7 +797,6 @@ isa = PBXGroup; children = ( B6FA759C0C1D7507007F5A10 /* audiofile.framework */, - F541C04303963A9F01C2A5B9 /* spectrum.framework */, ); name = "Linked Frameworks"; sourceTree = "<group>"; @@ -736,6 +841,7 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( + B6DCBB5D114FA0E700DC9A11 /* libspectrum */, B64BD1060FF6EB27000B82AE /* ide */, B63225E50C66B9D500BB081B /* compat */, B68CB2BC03DD91D800A804BA /* debugger */, @@ -1079,6 +1185,59 @@ path = views; sourceTree = "<group>"; }; + B6DCBB5D114FA0E700DC9A11 /* libspectrum */ = { + isa = PBXGroup; + children = ( + B6DCBB7A114FA0E700DC9A11 /* libspectrum.h.in */, + B6DCBC14114FA19F00DC9A11 /* tape_accessors.txt */, + B6DCBC16114FA1AF00DC9A11 /* snap_accessors.txt */, + B6DCBB80114FA0E700DC9A11 /* myglib */, + B6DCBB62114FA0E700DC9A11 /* bzip2.c */, + B6DCBB67114FA0E700DC9A11 /* creator.c */, + B6DCBB68114FA0E700DC9A11 /* crypto.c */, + B6DCBB69114FA0E700DC9A11 /* csw.c */, + B6DCBB6A114FA0E700DC9A11 /* dck.c */, + B6DCBB77114FA0E700DC9A11 /* ide.c */, + B6DCBB78114FA0E700DC9A11 /* internals.h */, + B6DCBB79114FA0E700DC9A11 /* libspectrum.c */, + B6DCBB7E114FA0E700DC9A11 /* memory.c */, + B6DCBB7F114FA0E700DC9A11 /* microdrive.c */, + B6DCBB86114FA0E700DC9A11 /* plusd.c */, + B6DCBB88114FA0E700DC9A11 /* rzx.c */, + B6DCBB89114FA0E700DC9A11 /* sna.c */, + B6DCBB8B114FA0E700DC9A11 /* snapshot.c */, + B6DCBB8C114FA0E700DC9A11 /* snp.c */, + B6DCBB8D114FA0E700DC9A11 /* sp.c */, + B6DCBB8E114FA0E700DC9A11 /* symbol_table.c */, + B6DCBB8F114FA0E700DC9A11 /* szx.c */, + B6DCBB90114FA0E700DC9A11 /* tap.c */, + B6DCBB91114FA0E700DC9A11 /* tape.c */, + B6DCBB94114FA0E700DC9A11 /* tape_block.c */, + B6DCBB95114FA0E700DC9A11 /* tape_block.h */, + B6DCBBB2114FA0E700DC9A11 /* timings.c */, + B6DCBBB3114FA0E700DC9A11 /* tzx_read.c */, + B6DCBBB4114FA0E700DC9A11 /* tzx_write.c */, + B6DCBBB5114FA0E700DC9A11 /* warajevo_read.c */, + B6DCBBB6114FA0E700DC9A11 /* wav.c */, + B6DCBBB7114FA0E700DC9A11 /* z80.c */, + B6DCBBB8114FA0E700DC9A11 /* z80em.c */, + B6DCBBB9114FA0E700DC9A11 /* zlib.c */, + B6DCBBBA114FA0E700DC9A11 /* zxs.c */, + ); + name = libspectrum; + path = fusepb/libspectrum; + sourceTree = "<group>"; + }; + B6DCBB80114FA0E700DC9A11 /* myglib */ = { + isa = PBXGroup; + children = ( + B6DCBB82114FA0E700DC9A11 /* garray.c */, + B6DCBB83114FA0E700DC9A11 /* ghash.c */, + B6DCBB84114FA0E700DC9A11 /* gslist.c */, + ); + path = myglib; + sourceTree = "<group>"; + }; B6DD457908134943008E9F7E /* Content Arrays */ = { isa = PBXGroup; children = ( @@ -1280,6 +1439,8 @@ B64BD1290FF701AA000B82AE /* options.h in Headers */, B64BD1790FF8E89B000B82AE /* options_cocoa.h in Headers */, B631BA0010257CA400BE1EE1 /* opus.h in Headers */, + B6DCBBD3114FA0E700DC9A11 /* internals.h in Headers */, + B6DCBBEF114FA0E700DC9A11 /* tape_block.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1301,6 +1462,9 @@ B604B2190DC1827200981CC7 /* CopyFiles */, ); buildRules = ( + B6DCBC47114FA3E100DC9A11 /* PBXBuildRule */, + B6DCBC48114FA3E100DC9A11 /* PBXBuildRule */, + B6DCBC42114FA33300DC9A11 /* PBXBuildRule */, ); dependencies = ( ); @@ -1346,6 +1510,7 @@ B6CE3A190CD218A6005ACDC8 /* gluck.rom in Resources */, B61F461509121DF100C8096C /* if1-1.rom in Resources */, B61F461609121DF100C8096C /* if1-2.rom in Resources */, + B631BA0F1025878600BE1EE1 /* opus.rom in Resources */, B61F461709121DF100C8096C /* plus2-0.rom in Resources */, B61F461809121DF100C8096C /* plus2-1.rom in Resources */, B61F461909121DF100C8096C /* plus3-0.rom in Resources */, @@ -1400,7 +1565,6 @@ B61159C70EEE9A080029FEA3 /* RZX.png in Resources */, B61159C90EEE9A140029FEA3 /* Select_ROMs.png in Resources */, B61159CB0EEE9A1E0029FEA3 /* Sound.png in Resources */, - B631BA0F1025878600BE1EE1 /* opus.rom in Resources */, B665EE031052A29F00FCFED8 /* Debugger.xib in Resources */, B665EE081052A34700FCFED8 /* JoystickConfiguration.xib in Resources */, B665EE0B1052A39000FCFED8 /* Keyboard.xib in Resources */, @@ -1413,6 +1577,7 @@ B665EE221052A4F200FCFED8 /* MainMenu.xib in Resources */, B665EE251052A51B00FCFED8 /* TapeBrowser.xib in Resources */, B665EE281052A53C00FCFED8 /* SavePanelAccessoryView.xib in Resources */, + B629532E114FB265007808E0 /* libspectrum.h.in in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1435,6 +1600,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B6DCBC96114FA67200DC9A11 /* tape_accessors.txt in Sources */, + B6DCBC97114FA67200DC9A11 /* snap_accessors.txt in Sources */, B61F463909121DF100C8096C /* z80_ops.c in Sources */, B61F463A09121DF100C8096C /* z80.c in Sources */, B61F463B09121DF100C8096C /* ay.c in Sources */, @@ -1557,6 +1724,38 @@ B64BD11E0FF6EF98000B82AE /* native.c in Sources */, B64BD1650FF8D284000B82AE /* options.m in Sources */, B631B9FF10257CA400BE1EE1 /* opus.c in Sources */, + B6DCBBBF114FA0E700DC9A11 /* bzip2.c in Sources */, + B6DCBBC4114FA0E700DC9A11 /* creator.c in Sources */, + B6DCBBC5114FA0E700DC9A11 /* crypto.c in Sources */, + B6DCBBC6114FA0E700DC9A11 /* csw.c in Sources */, + B6DCBBC7114FA0E700DC9A11 /* dck.c in Sources */, + B6DCBBD2114FA0E700DC9A11 /* ide.c in Sources */, + B6DCBBD4114FA0E700DC9A11 /* libspectrum.c in Sources */, + B6DCBBD9114FA0E700DC9A11 /* memory.c in Sources */, + B6DCBBDA114FA0E700DC9A11 /* microdrive.c in Sources */, + B6DCBBDC114FA0E700DC9A11 /* garray.c in Sources */, + B6DCBBDD114FA0E700DC9A11 /* ghash.c in Sources */, + B6DCBBDE114FA0E700DC9A11 /* gslist.c in Sources */, + B6DCBBE0114FA0E700DC9A11 /* plusd.c in Sources */, + B6DCBBE2114FA0E700DC9A11 /* rzx.c in Sources */, + B6DCBBE3114FA0E700DC9A11 /* sna.c in Sources */, + B6DCBBE5114FA0E700DC9A11 /* snapshot.c in Sources */, + B6DCBBE6114FA0E700DC9A11 /* snp.c in Sources */, + B6DCBBE7114FA0E700DC9A11 /* sp.c in Sources */, + B6DCBBE8114FA0E700DC9A11 /* symbol_table.c in Sources */, + B6DCBBE9114FA0E700DC9A11 /* szx.c in Sources */, + B6DCBBEA114FA0E700DC9A11 /* tap.c in Sources */, + B6DCBBEB114FA0E700DC9A11 /* tape.c in Sources */, + B6DCBBEE114FA0E700DC9A11 /* tape_block.c in Sources */, + B6DCBC0B114FA0E700DC9A11 /* timings.c in Sources */, + B6DCBC0C114FA0E700DC9A11 /* tzx_read.c in Sources */, + B6DCBC0D114FA0E700DC9A11 /* tzx_write.c in Sources */, + B6DCBC0E114FA0E700DC9A11 /* warajevo_read.c in Sources */, + B6DCBC0F114FA0E700DC9A11 /* wav.c in Sources */, + B6DCBC10114FA0E700DC9A11 /* z80.c in Sources */, + B6DCBC11114FA0E700DC9A11 /* z80em.c in Sources */, + B6DCBC12114FA0E700DC9A11 /* zlib.c in Sources */, + B6DCBC13114FA0E700DC9A11 /* zxs.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1580,8 +1779,6 @@ COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( "$(HOME)/Library/Frameworks", - ../../libspectrum/build/Deployment, - ../../libgcrypt/build/Deployment, ../../, "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", ); @@ -1595,14 +1792,17 @@ GCC_MODEL_CPU = G3; GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = ( - ../../libspectrum/build/Deployment/spectrum.framework/Headers, - ../../libgcrypt/build/Deployment/gcrypt.framework/Headers, + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)/audiofile.framework/Headers", .., ); INFOPLIST_FILE = "Info-Fuse.plist"; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = .; OTHER_CFLAGS_ppc = "-mmultiple -mpowerpc-gfxopt -falign-loops=16"; + OTHER_LDFLAGS = ( + "-lbz2", + "-lz", + ); PRODUCT_NAME = Fuse; SECTORDER_FLAGS = ""; USE_ALTIVEC = 1; @@ -1619,8 +1819,6 @@ COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ( "$(HOME)/Library/Frameworks", - ../../libspectrum/build/Deployment, - ../../libgcrypt/build/Deployment, ../../, "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", ); @@ -1633,14 +1831,17 @@ GCC_MODEL_CPU = G3; GCC_OPTIMIZATION_LEVEL = 2; HEADER_SEARCH_PATHS = ( - ../../libspectrum/build/Deployment/spectrum.framework/Headers, - ../../libgcrypt/build/Deployment/gcrypt.framework/Headers, + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)/audiofile.framework/Headers", .., ); INFOPLIST_FILE = "Info-Fuse.plist"; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = .; OTHER_CFLAGS_ppc = "-mmultiple -mpowerpc-gfxopt -falign-loops=16"; + OTHER_LDFLAGS = ( + "-lbz2", + "-lz", + ); PREBINDING = NO; PRODUCT_NAME = Fuse; SECTORDER_FLAGS = ""; @@ -1656,10 +1857,6 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(HOME)/Library/Frameworks", - ../../libspectrum/build/Deployment, - ../../lib765/build/Deployment, - ../../libgcrypt/build/Deployment, - ../../bzip2/build/Deployment, ../../, "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", ); @@ -1669,17 +1866,17 @@ GCC_ENABLE_OBJC_EXCEPTIONS = NO; GCC_OPTIMIZATION_LEVEL = 2; HEADER_SEARCH_PATHS = ( - ../../lib765/build/Deployment/765.framework/Headers, - ../../libspectrum/build/Deployment/spectrum.framework/Headers, - ../../libgcrypt/build/Deployment/gcrypt.framework/Headers, - ../../SDL.framework/Headers, - ../../bzip2/build/Deployment/libbz2.framework/Headers, + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)/audiofile.framework/Headers", .., ); INFOPLIST_FILE = "Info-Fuse.plist"; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = .; OTHER_CFLAGS_ppc = "-mmultiple -mpowerpc-gfxopt -falign-loops=16"; + OTHER_LDFLAGS = ( + "-lbz2", + "-lz", + ); PRODUCT_NAME = Fuse; SECTORDER_FLAGS = ""; WARNING_CFLAGS = "-Wall"; Modified: trunk/fuse/fusepb/config.h =================================================================== --- trunk/fuse/fusepb/config.h 2010-01-16 09:34:06 UTC (rev 632) +++ trunk/fuse/fusepb/config.h 2010-03-17 11:02:52 UTC (rev 633) @@ -175,3 +175,36 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <gcrypt.h> header file. */ +/* #undef HAVE_GCRYPT_H */ + +/* Define to 1 if you have the `bz2' library (-lbz2). */ +#define HAVE_LIBBZ2 1 + +/* Defined if we've got audiofile */ +#define HAVE_LIB_AUDIOFILE 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the <zlib.h> header file. */ +#define HAVE_ZLIB_H 1 + +/* Define to 1 if you have the `_snprintf' function. */ +/* #undef HAVE__SNPRINTF */ + +/* Define to 1 if you have the `_stricmp' function. */ +/* #undef HAVE__STRICMP */ + +/* Define to 1 if you have the `_strnicmp' function. */ +/* #undef HAVE__STRNICMP */ Copied: trunk/fuse/fusepb/generate.pl (from rev 623, trunk/FuseImporter/generate.pl) =================================================================== --- trunk/fuse/fusepb/generate.pl (rev 0) +++ trunk/fuse/fusepb/generate.pl 2010-03-17 11:02:52 UTC (rev 633) @@ -0,0 +1,256 @@ +if( /LIBSPECTRUM_DEFINE_TYPES/ ) { + + $_ = << "CODE"; +#include <stdint.h> + +typedef uint8_t libspectrum_byte; +typedef int8_t libspectrum_signed_byte; +typedef uint16_t libspectrum_word; +typedef int16_t libspectrum_signed_word; +typedef uint32_t libspectrum_dword; +typedef int32_t libspectrum_signed_dword; +typedef uint64_t libspectrum_qword; +typedef int64_t libspectrum_signed_qword; +CODE +} + +if( /LIBSPECTRUM_GLIB_REPLACEMENT/ ) { + + $_ = << "CODE"; +#ifndef FALSE +#define FALSE (0) +#endif + +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +typedef char gchar; +typedef int gint; +typedef long glong; +typedef gint gboolean; +typedef unsigned int guint; +typedef const void * gconstpointer; +typedef void * gpointer; + +typedef struct _GSList GSList; + +struct _GSList { + gpointer data; + GSList *next; +}; + +typedef void (*GFunc) (gpointer data, + gpointer user_data); + +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); + + +GSList WIN32_DLL *g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func); + +GSList WIN32_DLL *g_slist_insert (GSList *list, + gpointer data, + gint position); + +GSList WIN32_DLL *g_slist_append (GSList *list, + gpointer data); + +GSList WIN32_DLL *g_slist_prepend (GSList *list, + gpointer data); + +GSList WIN32_DLL *g_slist_remove (GSList *list, + gpointer data); + +GSList WIN32_DLL *g_slist_delete_link (GSList *list, + GSList *link); + +guint WIN32_DLL g_slist_length (GSList *list); + +void WIN32_DLL g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); + +void WIN32_DLL g_slist_free (GSList *list); + +GSList WIN32_DLL *g_slist_last (GSList *list); + +GSList WIN32_DLL *g_slist_reverse (GSList *list); + +GSList WIN32_DLL *g_slist_nth (GSList *list, + guint n); + +GSList WIN32_DLL * g_slist_find_custom (GSList *list, + gpointer data, + GCompareFunc func ); + +gint WIN32_DLL g_slist_position (GSList *list, + GSList *llink); + +typedef struct _GHashTable GHashTable; + +typedef guint (*GHashFunc) (gconstpointer key); + +typedef gboolean (*GHRFunc) (gpointer key, + gpointer value, + gpointer user_data); + +gint WIN32_DLL g_int_equal (gconstpointer v, + gconstpointer v2); +guint WIN32_DLL g_int_hash (gconstpointer v); +gint WIN32_DLL g_str_equal (gconstpointer v, + gconstpointer v2); +guint WIN32_DLL g_str_hash (gconstpointer v); + +GHashTable WIN32_DLL *g_hash_table_new (GHashFunc hash_func, + GCompareFunc key_compare_func); + +void WIN32_DLL g_hash_table_destroy (GHashTable *hash_table); + +void WIN32_DLL g_hash_table_insert (GHashTable *hash_table, + gpointer key, + gpointer value); + +gpointer WIN32_DLL g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key); + +guint WIN32_DLL g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); + +guint WIN32_DLL g_hash_table_size (GHashTable *hash_table); + +typedef struct _GArray GArray; + +struct _GArray { + /* Public */ + gchar *data; + size_t len; + + /* Private */ + guint element_size; + size_t allocated; +}; + +GArray* WIN32_DLL g_array_new( gboolean zero_terminated, gboolean clear, + guint element_size ); +#define g_array_append_val(a,v) g_array_append_vals( a, &(v), 1 ); +GArray* WIN32_DLL g_array_append_vals( GArray *array, gconstpointer data, guint len ); +#define g_array_index(a,t,i) (*(((t*)a->data)+i)) +GArray* WIN32_DLL g_array_set_size( GArray *array, guint length ); + +#include <TargetConditionals.h> + +#ifdef TARGET_RT_64_BIT +#define GINT_TO_POINTER(i) ((gpointer) (glong)(i)) +#define GPOINTER_TO_INT(p) ((gint) (glong)(p)) +#else +#define GINT_TO_POINTER(i) ((gpointer) (i)) +#define GPOINTER_TO_INT(p) ((gint) (p)) +#endif +CODE +} + +if( /LIBSPECTRUM_INCLUDE_GCRYPT/ ) { + + $_ = ''; + +} + +if( /LIBSPECTRUM_SIGNATURE_PARAMETERS/ ) { + + $_ = "/* Signature parameters not stored as libgcrypt is not present */ +"; + +} + +if( /LIBSPECTRUM_CAPABILITIES/ ) { + + $_ = << "CODE"; + +/* we support snapshots etc. requiring zlib (e.g. compressed szx) */ +#define LIBSPECTRUM_SUPPORTS_ZLIB_COMPRESSION (1) +CODE +} + +if( /LIBSPECTRUM_SNAP_ACCESSORS/ ) { + + open( DATAFILE, "< $ENV{SRCROOT}/libspectrum/snap_accessors.txt" ) or die "Couldn't open `$ENV{SRCROOT}/libspectrum/snap_accessors.txt': $!"; + + $_ = ''; + while( <DATAFILE> ) { + + next if /^\s*$/; next if /^\s*#/; + + my( $type, $name, $indexed ) = split; + + my $return_type; + if( $type =~ /^(.*)\*/ ) { + $return_type = "$1 WIN32_DLL *"; + } else { + $return_type = "$type WIN32_DLL"; + } + + if( $indexed ) { + + print << "CODE"; +$return_type libspectrum_snap_$name( libspectrum_snap *snap, int idx ); +void WIN32_DLL libspectrum_snap_set_$name( libspectrum_snap *snap, int idx, $type $name ); +CODE + + } else { + + print << "CODE"; +$return_type libspectrum_snap_$name( libspectrum_snap *snap ); +void WIN32_DLL libspectrum_snap_set_$name( libspectrum_snap *snap, $type $name ); +CODE + + } + } +} + +if( /LIBSPECTRUM_TAPE_ACCESSORS/ ) { + + open( DATAFILE, "< $ENV{SRCROOT}/libspectrum/tape_accessors.txt" ) + or die "Couldn't open `$ENV{SRCROOT}/libspectrum/tape_accessors.txt': $!"; + + $_ = ''; + while( <DATAFILE> ) { + + # Remove comments and blank lines + s/#.*//; + next if /^\s*$/; + + # Skip which block types each accessor applies to + next if /^\s/; + + my( $type, $name, $indexed, undef ) = split; + + my $return_type; + if( $type =~ /^(.*)\*/ ) { + $return_type = "$1 WIN32_DLL *"; + } else { + $return_type = "$type WIN32_DLL"; + } + + if( $indexed ) { + + print << "CODE"; +$return_type libspectrum_tape_block_$name( libspectrum_tape_block *block, size_t idx ); +libspectrum_error WIN32_DLL libspectrum_tape_block_set_$name( libspectrum_tape_block *block, $type \*$name ); +CODE + + } else { + + print << "CODE"; +$return_type libspectrum_tape_block_$name( libspectrum_tape_block *block ); +libspectrum_error WIN32_DLL libspectrum_tape_block_set_$name( libspectrum_tape_block *block, $type $name ); +CODE + + } + } + + close DATAFILE or die "Couldn't close `$ENV{SRCROOT}/libspectrum/tape_accessors.txt': $!"; +} Added: trunk/fuse/fusepb/libspectrum =================================================================== --- trunk/fuse/fusepb/libspectrum (rev 0) +++ trunk/fuse/fusepb/libspectrum 2010-03-17 11:02:52 UTC (rev 633) @@ -0,0 +1 @@ +link ../../libspectrum/libspectrum \ No newline at end of file Property changes on: trunk/fuse/fusepb/libspectrum ___________________________________________________________________ Added: svn:special + * Copied: trunk/fuse/fusepb/libspectrum.h (from rev 623, trunk/libspectrum/libspectrum.h) =================================================================== --- trunk/fuse/fusepb/libspectrum.h (rev 0) +++ trunk/fuse/fusepb/libspectrum.h 2010-03-17 11:02:52 UTC (rev 633) @@ -0,0 +1,1419 @@ +/* libspectrum.h: the library for dealing with ZX Spectrum emulator files + Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier + + $Id: libspectrum.h.in 4060 2009-07-30 13:21:38Z fredm $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +/* NB: This file is autogenerated from libspectrum.h.in. Do not edit + unless you know what you're doing */ + +#ifndef LIBSPECTRUM_LIBSPECTRUM_H +#define LIBSPECTRUM_LIBSPECTRUM_H + +#ifdef __cplusplus +extern "C" { +#endif /* #ifdef __cplusplus */ + +#include <stdarg.h> +#include <stddef.h> +#include <stdlib.h> +#include <stdio.h> + +#ifdef _WIN32 + +#define WIN32_LEAN_AND_MEAN /* Exclude rarely used stuff from Windows + headers */ +#include <windows.h> + +#ifdef LIBSPECTRUM_EXPORTS +#define WIN32_DLL __declspec( dllexport ) +#else /* #ifdef LIBSPECTRUM_EXPORTS */ +#define WIN32_DLL __declspec( dllimport ) +#endif /* #ifdef LIBSPECTRUM_EXPORTS */ + +#else /* #ifdef _WIN32 */ + +#define WIN32_DLL + +#endif /* #ifdef _WIN32 */ + +#ifdef __GNUC__ +#define DEPRECATED __attribute__((deprecated)) +#else /* #ifdef __GNUC__ */ +#define DEPRECATED +#endif /* #ifdef __GNUC__ */ + + +/* Standard typedefs */ +#include <stdint.h> + +typedef uint8_t libspectrum_byte; +typedef int8_t libspectrum_signed_byte; +typedef uint16_t libspectrum_word; +typedef int16_t libspectrum_signed_word; +typedef uint32_t libspectrum_dword; +typedef int32_t libspectrum_signed_dword; +typedef uint64_t libspectrum_qword; +typedef int64_t libspectrum_signed_qword; + +/* glib replacement (if necessary) */ +#ifndef FALSE +#define FALSE (0) +#endif + +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +typedef char gchar; +typedef int gint; +typedef long glong; +typedef gint gboolean; +typedef unsigned int guint; +typedef const void * gconstpointer; +typedef void * gpointer; + +typedef struct _GSList GSList; + +struct _GSList { + gpointer data; + GSList *next; +}; + +typedef void (*GFunc) (gpointer data, + gpointer user_data); + +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); + + +GSList WIN32_DLL *g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func); + +GSList WIN32_DLL *g_slist_insert (GSList *list, + gpointer data, + gint position); + +GSList WIN32_DLL *g_slist_append (GSList *list, + gpointer data); + +GSList WIN32_DLL *g_slist_prepend (GSList *list, + gpointer data); + +GSList WIN32_DLL *g_slist_remove (GSList *list, + gpointer data); + +GSList WIN32_DLL *g_slist_delete_link (GSList *list, + GSList *link); + +guint WIN32_DLL g_slist_length (GSList *list); + +void WIN32_DLL g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); + +void WIN32_DLL g_slist_free (GSList *list); + +GSList WIN32_DLL *g_slist_last (GSList *list); + +GSList WIN32_DLL *g_slist_reverse (GSList *list); + +GSList WIN32_DLL *g_slist_nth (GSList *list, + guint n); + +GSList WIN32_DLL * g_slist_find_custom (GSList *list, + gpointer data, + GCompareFunc func ); + +gint WIN32_DLL g_slist_position (GSList *list, + GSList *llink); + +typedef struct _GHashTable GHashTable; + +typedef guint (*GHashFunc) (gconstpointer key); + +typedef gboolean (*GHRFunc) (gpointer key, + gpointer value, + gpointer user_data); + +gint WIN32_DLL g_int_equal (gconstpointer v, + gconstpointer v2); +guint WIN32_DLL g_int_hash (gconstpointer v); +gint WIN32_DLL g_str_equal (gconstpointer v, + gconstpointer v2); +guint WIN32_DLL g_str_hash (gconstpointer v); + +GHashTable WIN32_DLL *g_hash_table_new (GHashFunc hash_func, + GCompareFunc key_compare_func); + +void WIN32_DLL g_hash_table_destroy (GHashTable *hash_table); + +void WIN32_DLL g_hash_table_insert (GHashTable *hash_table, + gpointer key, + gpointer value); + +gpointer WIN32_DLL g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key); + +guint WIN32_DLL g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); + +guint WIN32_DLL g_hash_table_size (GHashTable *hash_table); + +typedef struct _GArray GArray; + +struct _GArray { + /* Public */ + gchar *data; + size_t len; + + /* Private */ + guint element_size; + size_t allocated; +}; + +GArray* WIN32_DLL g_array_new( gboolean zero_terminated, gboolean clear, + guint element_size ); +#define g_array_append_val(a,v) g_array_append_vals( a, &(v), 1 ); +GArray* WIN32_DLL g_array_append_vals( GArray *array, gconstpointer data, guint len ); +#define g_array_index(a,t,i) (*(((t*)a->data)+i)) +GArray* WIN32_DLL g_array_set_size( GArray *array, guint length ); + +#include <TargetConditionals.h> + +#ifdef TARGET_RT_64_BIT +#define GINT_TO_POINTER(i) ((gpointer) (glong)(i)) +#define GPOINTER_TO_INT(p) ((gint) (glong)(p)) +#else +#define GINT_TO_POINTER(i) ((gpointer) (i)) +#define GPOINTER_TO_INT(p) ((gint) (p)) +#endif + +/* Library capabilities */ + +/* we support snapshots etc. requiring zlib (e.g. compressed szx) */ +#define LIBSPECTRUM_SUPPORTS_ZLIB_COMPRESSION (1) + +/* + * General libspectrum routines + */ + +/* Error handling */ + +/* The various errors which can occur */ +typedef enum libspectrum_error { + + LIBSPECTRUM_ERROR_NONE = 0, + + LIBSPECTRUM_ERROR_WARNING, + + LIBSPECTRUM_ERROR_MEMORY, + LIBSPECTRUM_ERROR_UNKNOWN, + LIBSPECTRUM_ERROR_CORRUPT, + LIBSPECTRUM_ERROR_SIGNATURE, + LIBSPECTRUM_ERROR_SLT, /* .slt data found at end of a .z80 file */ + LIBSPECTRUM_ERROR_INVALID, /* Invalid parameter supplied */ + + LIBSPECTRUM_ERROR_LOGIC = -1, + +} libspectrum_error; + +/* Initialisation */ + +libspectrum_error WIN32_DLL libspectrum_init( void ); + +/* Version checking */ + +int WIN32_DLL libspectrum_check_version( const char *version ); +const char WIN32_DLL *libspectrum_version( void ); +const char WIN32_DLL *libspectrum_gcrypt_version( void ); + +/* Error handling */ +typedef libspectrum_error +(*libspectrum_error_function_t)( libspectrum_error error, + const char *format, va_list ap ); + +extern libspectrum_error_function_t WIN32_DLL libspectrum_error_function; + +libspectrum_error WIN32_DLL +libspectrum_default_error_function( libspectrum_error error, + const char *format, va_list ap ); + +/* Memory allocators */ + +typedef void* (*libspectrum_malloc_fn_t)( size_t size ); +typedef void* (*libspectrum_calloc_fn_t)( size_t nmemb, size_t size ); +typedef void* (*libspectrum_realloc_fn_t)( void *ptr, size_t size ); +typedef void (*libspectrum_free_fn_t)( void *ptr ); + +typedef struct libspectrum_mem_vtable_t { + libspectrum_malloc_fn_t malloc; + libspectrum_calloc_fn_t calloc; + libspectrum_realloc_fn_t realloc; + libspectrum_free_fn_t free; +} libspectrum_mem_vtable_t; + +void* WIN32_DLL libspectrum_malloc( size_t size ); +void* WIN32_DLL libspectrum_calloc( size_t nmemb, size_t size ); +void* WIN32_DLL libspectrum_realloc( void *ptr, size_t size ); +void WIN32_DLL libspectrum_free( void *ptr ); + +void WIN32_DLL libspectrum_mem_set_vtable( libspectrum_mem_vtable_t *table ); + +/* Attempt to identify a given file */ + +/* Various types of file we might manage to identify */ +typedef enum libspectrum_id_t { + + /* These types present in all versions of libspectrum */ + + LIBSPECTRUM_ID_UNKNOWN = 0, /* Unidentified file */ + LIBSPECTRUM_ID_RECORDING_RZX, /* RZX input recording */ + LIBSPECTRUM_ID_SNAPSHOT_SNA, /* .sna snapshot */ + LIBSPECTRUM_ID_SNAPSHOT_Z80, /* .z80 snapshot */ + LIBSPECTRUM_ID_TAPE_TAP, /* Z80-style .tap tape image */ + LIBSPECTRUM_ID_TAPE_TZX, /* TZX tape image */ + + /* Below here, present only in 0.1.1 and later */ + + /* The next entry is deprecated in favour of the more specific + LIBSPECTRUM_ID_DISK_CPC and LIBSPECTRUM_ID_DISK_ECPC */ + LIBSPECTRUM_ID_DISK_DSK, /* .dsk +3 disk image */ + + LIBSPECTRUM_ID_DISK_SCL, /* .scl TR-DOS disk image */ + LIBSPECTRUM_ID_DISK_TRD, /* .trd TR-DOS disk image */ + LIBSPECTRUM_ID_CARTRIDGE_DCK, /* .dck Timex cartridge image */ + + /* Below here, present only in 0.2.0 and later */ + + LIBSPECTRUM_ID_TAPE_WARAJEVO, /* Warajevo-style .tap tape image */ + + LIBSPECTRUM_ID_SNAPSHOT_PLUSD, /* DISCiPLE/+D snapshot */ + LIBSPECTRUM_ID_SNAPSHOT_SP, /* .sp snapshot */ + LIBSPECTRUM_ID_SNAPSHOT_SNP, /* .snp snapshot */ + LIBSPECTRUM_ID_SNAPSHOT_ZXS, /* .zxs snapshot (zx32) */ + LIBSPECTRUM_ID_SNAPSHOT_SZX, /* .szx snapshot (Spectaculator) */ + + /* Below here, present only in 0.2.1 and later */ + + LIBSPECTRUM_ID_COMPRESSED_BZ2, /* bzip2 compressed file */ + LIBSPECTRUM_ID_COMPRESSED_GZ, /* gzip compressed file */ + + /* Below here, present only in 0.2.2 and later */ + + LIBSPECTRUM_ID_HARDDISK_HDF, /* .hdf hard disk image */ + LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface II cartridge image */ + + /* Below here, present only in 0.3.0 and later */ + + LIBSPECTRUM_ID_MICRODRIVE_MDR, /* .mdr microdrive cartridge */ + LIBSPECTRUM_ID_TAPE_CSW, /* .csw tape image */ + LIBSPECTRUM_ID_TAPE_Z80EM, /* Z80Em tape image */ + + /* Below here, present only in 0.4.0 and later */ + + LIBSPECTRUM_ID_TAPE_WAV, /* .wav tape image */ + LIBSPECTRUM_ID_TAPE_SPC, /* SP-style .spc tape image */ + LIBSPECTRUM_ID_TAPE_STA, /* Speculator-style .sta tape image */ + LIBSPECTRUM_ID_TAPE_LTP, /* Nuclear ZX-style .ltp tape image */ + LIBSPECTRUM_ID_COMPRESSED_XFD, /* xfdmaster (Amiga) compressed file */ + LIBSPECTRUM_ID_DISK_IMG, /* .img DISCiPLE/+D disk image */ + LIBSPECTRUM_ID_DISK_MGT, /* .mgt DISCiPLE/+D disk image */ + + /* Below here, present only in 0.5.0 and later */ + + LIBSPECTRUM_ID_DISK_UDI, /* .udi generic disk image */ + LIBSPECTRUM_ID_DISK_FDI, /* .fdi generic disk image */ + LIBSPECTRUM_ID_DISK_CPC, /* .dsk plain CPC +3 disk image */ + LIBSPECTRUM_ID_DISK_ECPC, /* .dsk extended CPC +3 disk image */ + LIBSPECTRUM_ID_DISK_SAD, /* .sad generic disk image */ + LIBSPECTRUM_ID_DISK_TD0, /* .td0 generic disk image */ + + LIBSPECTRUM_ID_DISK_OPD, /* .opu/.opd Opus Discovery disk image */ + + LIBSPECTRUM_ID_SCREEN_SCR, /* .scr screen file */ + +} libspectrum_id_t; + +/* And 'classes' of file */ +typedef enum libspectrum_class_t { + + LIBSPECTRUM_CLASS_UNKNOWN, + + LIBSPECTRUM_CLASS_CARTRIDGE_TIMEX, /* Timex cartridges */ + LIBSPECTRUM_CLASS_DISK_PLUS3, /* +3 disk */ + LIBSPECTRUM_CLASS_DISK_TRDOS, /* TR-DOS disk */ + LIBSPECTRUM_CLASS_DISK_OPUS, /* Opus Discovery disk*/ + LIBSPECTRUM_CLASS_RECORDING, /* Input recording */ + LIBSPECTRUM_CLASS_SNAPSHOT, /* Snapshot */ + LIBSPECTRUM_CLASS_TAPE, /* Tape */ + + /* Below here, present only in 0.2.1 and later */ + + LIBSPECTRUM_CLASS_COMPRESSED, /* A compressed file */ + + /* Below here, present only in 0.2.2 and later */ + + LIBSPECTRUM_CLASS_HARDDISK, /* A hard disk image */ + LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface II cartridges */ + + /* Below here, present only in 0.3.0 and later */ + + LIBSPECTRUM_CLASS_MICRODRIVE, /* Microdrive cartridges */ + + /* Below here, present only in 0.4.0 and later */ + + LIBSPECTRUM_CLASS_DISK_PLUSD, /* DISCiPLE/+D disk image */ + + /* Below here, present only in 0.5.0 and later */ + + LIBSPECTRUM_CLASS_DISK_GENERIC, /* generic disk image */ + + LIBSPECTRUM_CLASS_SCREENSHOT, /* Screenshot */ + +} libspectrum_class_t; + +libspectrum_error WIN32_DLL +libspectrum_identify_file( libspectrum_id_t *type, const char *filename, + const unsigned char *buffer, size_t length ); + +libspectrum_error WIN32_DLL +libspectrum_identify_file_with_class( + libspectrum_id_t *type, libspectrum_class_t *libspectrum_class, + const char *filename, const unsigned char *buffer, size_t length ); + +libspectrum_error WIN32_DLL +libspectrum_identify_file_raw( libspectrum_id_t *type, const char *filename, + const unsigned char *buffer, size_t length ); + +libspectrum_error WIN32_DLL +libspectrum_identify_class( libspectrum_class_t *libspectrum_class, + libspectrum_id_t type ); + +/* Different Spectrum variants and their capabilities */ + +/* The machine types we can handle */ +typedef enum libspectrum_machine { + + LIBSPECTRUM_MACHINE_48, + LIBSPECTRUM_MACHINE_TC2048, + LIBSPECTRUM_MACHINE_128, + LIBSPECTRUM_MACHINE_PLUS2, + LIBSPECTRUM_MACHINE_PENT, + LIBSPECTRUM_MACHINE_PLUS2A, + LIBSPECTRUM_MACHINE_PLUS3, + + /* Used by libspectrum_tape_guess_hardware if we can't work out what + hardware should be used */ + LIBSPECTRUM_MACHINE_UNKNOWN, + + LIBSPECTRUM_MACHINE_16, + LIBSPECTRUM_MACHINE_TC2068, + + LIBSPECTRUM_MACHINE_SCORP, + LIBSPECTRUM_MACHINE_PLUS3E, + LIBSPECTRUM_MACHINE_SE, + + LIBSPECTRUM_MACHINE_TS2068, + + LIBSPECTRUM_MACHINE_PENT512, + LIBSPECTRUM_MACHINE_PENT1024, + +} libspectrum_machine; + +const char* WIN32_DLL libspectrum_machine_name( libspectrum_machine type ); + +/* The various capabilities of the different machines */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_AY; /* AY-3-8192 */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_128_MEMORY; /* 128-style memory paging */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_PLUS3_MEMORY; /* +3-style memory paging */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_PLUS3_DISK; /* +3-style disk drive */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_TIMEX_MEMORY; /* Timex-style memory paging */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_TIMEX_VIDEO; /* Timex-style video modes */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_TRDOS_DISK; /* TRDOS-style disk drive */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_TIMEX_DOCK; /* T[SC]2068-style cartridge port */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_SINCLAIR_JOYSTICK; + /* Sinclair-style joystick ports */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_KEMPSTON_JOYSTICK; + /* Kempston-style joystick ports */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_SCORP_MEMORY; /* Scorpion-style memory paging */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_EVEN_M1; + /* M1 cycles always start on even tstate counts */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_SE_MEMORY; /* SE-style memory paging */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_NTSC; /* NTSC display */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_PENT512_MEMORY; /* Pentagon 512 memory paging */ +extern const int WIN32_DLL +LIBSPECTRUM_MACHINE_CAPABILITY_PENT1024_MEMORY; + /* Pentagon 1024 memory paging */ + +/* Get the capabilities of a machine */ +int WIN32_DLL libspectrum_machine_capabilities( libspectrum_machine type ); + +/* Get the timings of a machine */ +libspectrum_dword WIN32_DLL +libspectrum_timings_processor_speed( libspectrum_machine machine ); +libspectrum_dword WIN32_DLL +libspectrum_timings_ay_speed( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_left_border( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_horizontal_screen( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_right_border( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_horizontal_retrace( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_top_border( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_vertical_screen( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_bottom_border( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_vertical_retrace( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_interrupt_length( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_top_left_pixel( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_tstates_per_line( libspectrum_machine machine ); +libspectrum_word WIN32_DLL +libspectrum_timings_lines_per_frame( libspectrum_machine machine ); +libspectrum_dword WIN32_DLL +libspectrum_timings_tstates_per_frame( libspectrum_machine machine ); + +/* Creator information */ + +typedef struct libspectrum_creator libspectrum_creator; + +libspectrum_creator* WIN32_DLL +libspectrum_creator_alloc( void ); +libspectrum_error WIN32_DLL +libspectrum_creator_free( libspectrum_creator *creator ); + +libspectrum_error WIN32_DLL +libspectrum_creator_set_program( libspectrum_creator *creator, + const char *program ); +const char WIN32_DLL * +libspectrum_creator_program( libspectrum_creator *creator ); + +libspectrum_error WIN32_DLL +libspectrum_creator_set_major( libspectrum_creator *creator, + libspectrum_word major ); +libspectrum_word WIN32_DLL +libspectrum_creator_major( libspectrum_creator *creator ); + +libspectrum_error WIN32_DLL +libspectrum_creator_set_minor( libspectrum_creator *creator, + libspectrum_word minor ); +libspectrum_word WIN32_DLL +libspectrum_creator_minor( libspectrum_creator *creator ); + +libspectrum_error WIN32_DLL +libspectrum_creator_set_competition_code( libspectrum_creator *creator, + libspectrum_dword competition_code ); +libspectrum_dword WIN32_DLL +libspectrum_creator_competition_code( libspectrum_creator *creator ); + +libspectrum_error WIN32_DLL +libspectrum_creator_set_custom( libspectrum_creator *creator, + libspectrum_byte *data, size_t length ); + +libspectrum_byte WIN32_DLL * +libspectrum_creator_custom( libspectrum_creator *creator ); + +size_t WIN32_DLL +libspectrum_creator_custom_length( libspectrum_creator *creator ); + +/* + * Snap handling routines + */ + +typedef struct libspectrum_snap libspectrum_snap; + +libspectrum_snap* WIN32_DLL libspectrum_snap_alloc( void ); +libspectrum_error WIN32_DLL libspectrum_snap_free( libspectrum_snap *snap ); + +/* Read in a snapshot, optionally guessing what type it is */ +libspectrum_error WIN32_DLL +libspectrum_snap_read( libspectrum_snap *snap, const libspectrum_byte *buffer, + size_t length, libspectrum_id_t type, + const char *filename ); + +/* Write a snapshot */ +libspectrum_error WIN32_DLL +libspectrum_snap_write( libspectrum_byte **buffer, size_t *length, + int *out_flags, libspectrum_snap *snap, + libspectrum_id_t type, libspectrum_creator *creator, + int in_flags ); + +/* The flags that can be given to libspectrum_snap_write() */ +extern const int WIN32_DLL LIBSPECTRUM_FLAG_SNAPSHOT_NO_COMPRESSION; +extern const int WIN32_DLL LIBSPECTRUM_FLAG_SNAPSHOT_ALWAYS_COMPRESS; + +/* The flags that may be returned from libspectrum_snap_write() */ +extern const int WIN32_DLL LIBSPECTRUM_FLAG_SNAPSHOT_MINOR_INFO_LOSS; +extern const int WIN32_DLL LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + +/* The joystick types we can handle */ +typedef enum libspectrum_joystick { + + LIBSPECTRUM_JOYSTICK_NONE, + + LIBSPECTRUM_JOYSTICK_CURSOR, + LIBSPECTRUM_JOYSTICK_KEMPSTON, + LIBSPECTRUM_JOYSTICK_SINCLAIR_1, + LIBSPECTRUM_JOYSTICK_SINCLAIR_2, + LIBSPECTRUM_JOYSTICK_TIMEX_1, + LIBSPECTRUM_JOYSTICK_TIMEX_2, + LIBSPECTRUM_JOYSTICK_FULLER, + +} libspectrum_joystick; + +const char* WIN32_DLL libspectrum_joystick_name( libspectrum_joystick type ); + +extern const int WIN32_DLL... [truncated message content] |