Yet Another SEGA MASTER SYSTEM Emulator その1

とりあえずゲームギアから分離。キーボード、データレコーダ、ディスク関連を削除してFM音源を実装していきます。そう実機では、キーボードとFM音源は同時に使用出来ないんです。

その前に、Yet Another SEGA GAMEGEAR EmulatorにはCOLECOVISIONを実装してみました。DINA 2 IN 1というのを買ってたんですよね。

f:id:tanam:20131022003142p:image:w360

f:id:tanam:20131022003141p:image:w360

f:id:tanam:20131022003140p:image:w360

今まではsms_sdl-0.9.4a-r7.1をベースに移植していましたが、FM音源に対応していないため以下をベースに切り替えます。COLECOVISIONも対応しているようなので、ついでに取り込むことにとにしました。

https://code.google.com/p/smsplus-gx/source/checkout

以下のプロジェクトファイルを作成し、smsplus-gxがVC++でビルド出来ました。

sms_sdl.vcproj

<?xml version="1.0" encoding="shift_jis"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9.00"
	Name="sms_sdl"
	ProjectGUID="{34AF4514-C133-4CD9-A8E1-F820B8C805F8}"
	TargetFrameworkVersion="0"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory=".\Debug"
			IntermediateDirectory=".\Debug"
			ConfigurationType="1"
			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				TypeLibraryName=".\Debug/sms_sdl.tlb"
				HeaderFileName=""
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalOptions="/I../.. /I../../cpu /I../../sound "
				Optimization="0"
				AdditionalIncludeDirectories=""C:\home\smsplus-gx\source";"C:\home\smsplus-gx\source\unzip";"C:\home\smsplus-gx\source\ntsc";"C:\home\smsplus-gx\source\sdl";"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\SDL""
				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;LSB_FIRST;USE_ZLIB;_CRT_SECURE_NO_WARNINGS"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				PrecompiledHeaderFile=".\Debug/sms_sdl.pch"
				AssemblerListingLocation=".\Debug/"
				ObjectFile=".\Debug/"
				ProgramDataBaseFileName=".\Debug/"
				WarningLevel="3"
				SuppressStartupBanner="true"
				DebugInformationFormat="4"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG"
				Culture="1036"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib sdl.lib sdlmain.lib zdll.lib"
				OutputFile="sms_sdl.exe"
				LinkIncremental="2"
				SuppressStartupBanner="true"
				AdditionalLibraryDirectories=""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\SDL""
				IgnoreDefaultLibraryNames="msvcrt.lib"
				GenerateDebugInformation="true"
				ProgramDatabaseFile=".\Debug/sms_sdl.pdb"
				SubSystem="1"
				RandomizedBaseAddress="1"
				DataExecutionPrevention="0"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				SuppressStartupBanner="true"
				OutputFile=".\Debug/sms_sdl.bsc"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory=".\Release"
			IntermediateDirectory=".\Release"
			ConfigurationType="1"
			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				TypeLibraryName=".\Release/sms_sdl.tlb"
				HeaderFileName=""
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalOptions="/I../.. /I../../cpu /I../../sound "
				Optimization="2"
				InlineFunctionExpansion="1"
				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;LSB_FIRST;USE_ZLIB"
				RuntimeLibrary="2"
				PrecompiledHeaderFile=".\Release/sms_sdl.pch"
				AssemblerListingLocation=".\Release/"
				ObjectFile=".\Release/"
				ProgramDataBaseFileName=".\Release/"
				WarningLevel="3"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="NDEBUG"
				Culture="1036"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="sdlmain.lib odbc32.lib odbccp32.lib winmm.lib sdl.lib zlib.lib"
				OutputFile="sms_sdl.exe"
				LinkIncremental="1"
				SuppressStartupBanner="true"
				ProgramDatabaseFile=".\Release/sms_sdl.pdb"
				SubSystem="1"
				RandomizedBaseAddress="1"
				DataExecutionPrevention="0"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				SuppressStartupBanner="true"
				OutputFile=".\Release/sms_sdl.bsc"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="core"
			>
			<File
				RelativePath="..\..\error.c"
				>
			</File>
			<File
				RelativePath="..\..\fileio.c"
				>
			</File>
			<File
				RelativePath="..\..\loadrom.c"
				>
			</File>
			<File
				RelativePath="..\..\memz80.c"
				>
			</File>
			<File
				RelativePath="..\..\pio.c"
				>
			</File>
			<File
				RelativePath="..\..\render.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\..\sms.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\..\state.c"
				>
			</File>
			<File
				RelativePath="..\..\system.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\..\tms.c"
				>
			</File>
			<File
				RelativePath="..\..\vdp.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<Filter
				Name="cpu"
				>
				<File
					RelativePath="..\..\cpu\z80.c"
					>
					<FileConfiguration
						Name="Debug|Win32"
						>
						<Tool
							Name="VCCLCompilerTool"
							PreprocessorDefinitions=""
						/>
					</FileConfiguration>
					<FileConfiguration
						Name="Release|Win32"
						>
						<Tool
							Name="VCCLCompilerTool"
							Optimization="2"
							PreprocessorDefinitions=""
						/>
					</FileConfiguration>
				</File>
			</Filter>
			<Filter
				Name="sound"
				>
				<File
					RelativePath="..\..\sound\emu2413.c"
					>
					<FileConfiguration
						Name="Debug|Win32"
						>
						<Tool
							Name="VCCLCompilerTool"
							PreprocessorDefinitions=""
						/>
					</FileConfiguration>
					<FileConfiguration
						Name="Release|Win32"
						>
						<Tool
							Name="VCCLCompilerTool"
							Optimization="2"
							PreprocessorDefinitions=""
						/>
					</FileConfiguration>
				</File>
				<File
					RelativePath="..\..\sound\fmintf.c"
					>
				</File>
				<File
					RelativePath="..\..\sound\sn76489.c"
					>
				</File>
				<File
					RelativePath="..\..\sound\sound.c"
					>
				</File>
				<File
					RelativePath="..\..\sound\ym2413.c"
					>
				</File>
			</Filter>
			<Filter
				Name="unzip"
				>
				<File
					RelativePath="..\..\unzip\ioapi.c"
					>
				</File>
				<File
					RelativePath="..\..\unzip\unzip.c"
					>
				</File>
			</Filter>
			<Filter
				Name="ntsc"
				>
				<File
					RelativePath="..\..\ntsc\sms_ntsc.c"
					>
				</File>
			</Filter>
		</Filter>
		<Filter
			Name="sdl"
			>
			<File
				RelativePath="..\filters.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\filters.h"
				>
			</File>
			<File
				RelativePath="..\main.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\sdlsms.c"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						Optimization="2"
						PreprocessorDefinitions=""
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\sdlsms.h"
				>
			</File>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>