add vcxproj and patch for libsnes vs2015 support, for later use
This commit is contained in:
parent
b2ead68c4d
commit
a06b7318c0
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.22823.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsnes", "libsnes.vcxproj", "{488B77AD-58DF-4E01-9329-67B20D486860}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{488B77AD-58DF-4E01-9329-67B20D486860}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{488B77AD-58DF-4E01-9329-67B20D486860}.Debug|x86.Build.0 = Debug|Win32
|
||||
{488B77AD-58DF-4E01-9329-67B20D486860}.Release|x86.ActiveCfg = Release|Win32
|
||||
{488B77AD-58DF-4E01-9329-67B20D486860}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project InitialTargets="UNDUPOBJ" DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{488B77AD-58DF-4E01-9329-67B20D486860}</ProjectGuid>
|
||||
<RootNamespace>libsnes</RootNamespace>
|
||||
<TargetPlatformVersion>8.1</TargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)../bsnes</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>HOOKS;PROFILE_PERFORMANCE;GAMEBOY;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\bsnes\base\base.hpp" />
|
||||
<ClInclude Include="..\bsnes\gameboy\apu\apu.hpp" />
|
||||
<ClInclude Include="..\bsnes\gameboy\cheat\cheat.hpp" />
|
||||
<ClInclude Include="..\bsnes\gameboy\gameboy.hpp" />
|
||||
<ClInclude Include="..\bsnes\snes\profile-accuracy.hpp" />
|
||||
<ClInclude Include="..\bsnes\snes\profile-compatibility.hpp" />
|
||||
<ClInclude Include="..\bsnes\snes\profile-performance.hpp" />
|
||||
<ClInclude Include="..\bsnes\snes\snes.hpp" />
|
||||
<ClInclude Include="..\bsnes\target-libsnes\libsnes.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\bsnes\gameboy\apu\apu.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\cartridge\cartridge.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\cheat\cheat.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\cpu\cpu.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\interface\interface.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\lcd\lcd.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\memory\memory.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\scheduler\scheduler.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\system\system.cpp" />
|
||||
<ClCompile Include="..\bsnes\gameboy\video\video.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\alt\cpu\cpu.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\alt\dsp\dsp.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\alt\ppu-performance\ppu.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\alt\smp\smp.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\cartridge\cartridge.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\cheat\cheat.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\armdsp\armdsp.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\bsx\bsx.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\hitachidsp\hitachidsp.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\icd2\icd2.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\link\link.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\msu1\msu1.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\necdsp\necdsp.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\nss\nss.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\obc1\obc1.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\sa1\sa1.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\sdd1\sdd1.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\spc7110\spc7110.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\srtc\srtc.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\sufamiturbo\sufamiturbo.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\chip\superfx\superfx.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\config\config.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\controller\controller.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\cpu\core\core.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\cpu\cpu.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\dsp\dsp.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\interface\interface.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\memory\memory.cpp" />
|
||||
<ClCompile Include="..\bsnes\snes\ppu\ppu.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\smp\smp.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\system\system.cpp" />
|
||||
<ClCompile Include="..\bsnes\target-libsnes\libsnes.cpp" />
|
||||
<ClCompile Include="..\bsnes\target-libsnes\libsnes_pwrap.cpp" />
|
||||
<ClCompile Include="..\libco_msvc_win32\libco_msvc_win32.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<!-- thanks to http://stackoverflow.com/questions/841913/modify-msbuild-itemgroup-metadata -->
|
||||
<!-- before building, let's modify all the ObjectFileNames according to a pattern which will eliminate the possibility of duplicate .obj names -->
|
||||
<Target Name="UNDUPOBJ">
|
||||
<Message Text="UNDUPOBJ 1: Adjusting ObjectFileName on all ClCompile targets" Importance="low" />
|
||||
<!-- For diagnostics, print each thing we're operating on -->
|
||||
<Message Text="UNDUPOBJ 2: ABOUT TO FIX: %(ClCompile.Identity) with obj path %(ClCompile.ObjectFileName)" Importance="low" />
|
||||
<!-- Now, patch the ClCompile objects with a better ObjectFileName -->
|
||||
<!-- A project which depended on a special and particular name for a handful of object files could add metadata to them in the vcxproj and we could exclude those items here -->
|
||||
<!-- Another idea which I have achieved (but may be less reliable for other users, so it isn't done here) is to leave the directory structure semi-intact and have the obj build in a hierarchy under the IntDir -->
|
||||
<!-- for example, myproj/src/a/x.cpp and myproj/src/b/x.cpp build to myproj/Debug/a/x.obj and myproj/Debug/b/xobj -->
|
||||
<!-- TODO - would something other than Identity be best here? FileName? Etc.? Probably. But Identity has the advantage of removing personal information (build path) from the obj path -->
|
||||
<ItemGroup>
|
||||
<ClCompile>
|
||||
<!-- selectively erase or replace characters in %(Identity) other than A-Za-z0-9 while converting backslashes to underscores -->
|
||||
<ObjectFileName>$(IntDir)$([System.Text.RegularExpressions.Regex]::Replace('%(Identity)','[^A-Za-z0-9\\]','').Replace("\","_") ).obj</ObjectFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<!-- For diagnostics, print the results -->
|
||||
<Message Text="UNDUPOBJ 3: %(ClCompile.Identity) obj path set to %(ClCompile.ObjectFileName)" Importance="low" />
|
||||
</Target>
|
||||
<!-- UNDUPOBJ -->
|
||||
</Project>
|
|
@ -0,0 +1,312 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="base">
|
||||
<UniqueIdentifier>{6321d017-eb1b-4c32-8ad6-2a444cd349f6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy">
|
||||
<UniqueIdentifier>{b524d91d-4f81-4c11-a85c-b3b4d12ae8cf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\apu">
|
||||
<UniqueIdentifier>{c08353ee-b185-43d3-bbcf-0b6ec3e90320}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\cartridge">
|
||||
<UniqueIdentifier>{408560e5-f6fb-4bb3-a9d5-d4142a1320f0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\cheat">
|
||||
<UniqueIdentifier>{a38518d2-1cce-44e8-a3a5-0f861d87493e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\cpu">
|
||||
<UniqueIdentifier>{9f9acb28-fdaa-49d0-90be-c1420ab16873}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\interface">
|
||||
<UniqueIdentifier>{289226f8-df84-498f-9ae4-aa56bd12b59c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\lcd">
|
||||
<UniqueIdentifier>{55ee4b4b-d81c-44a1-9aaa-acd145d22f7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\memory">
|
||||
<UniqueIdentifier>{2393d351-a00c-4786-ad11-445f1a1f41b1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\system">
|
||||
<UniqueIdentifier>{7c6789fc-4c2c-4d46-9f37-f0ca1d3b1040}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\video">
|
||||
<UniqueIdentifier>{7f99b945-63a1-4516-8b55-97e752e836f2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes">
|
||||
<UniqueIdentifier>{b2c7c754-bd74-4418-948b-2af3c799d015}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\alt">
|
||||
<UniqueIdentifier>{17456ecf-3890-4e53-ab34-0e2522355065}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\alt\dsp">
|
||||
<UniqueIdentifier>{ba2a4779-7d10-43e6-bfc9-132ea211483c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\alt\cpu">
|
||||
<UniqueIdentifier>{118fed9b-6135-4bb5-9e24-eea11c4af00c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\alt\ppu-performance">
|
||||
<UniqueIdentifier>{82b154b9-d01b-413a-8f8b-dd12999827dd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\alt\smp">
|
||||
<UniqueIdentifier>{a3e5a31b-5b10-40d1-8805-abd490396997}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\cartridge">
|
||||
<UniqueIdentifier>{72824eb5-fe38-4ef8-908a-58c890560e65}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\cheat">
|
||||
<UniqueIdentifier>{e219cd9c-1e92-4ab1-bf0a-ce3501000807}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip">
|
||||
<UniqueIdentifier>{613fc7f9-2c45-429f-b23d-6d49079d7891}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\armdsp">
|
||||
<UniqueIdentifier>{2b5e8fde-1d52-4681-a15c-f06b7926fe82}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\bsx">
|
||||
<UniqueIdentifier>{b4be7383-80a1-4237-8d43-01e15867afc2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\hitachidsp">
|
||||
<UniqueIdentifier>{11dfb660-4987-46c8-8972-7342e656c555}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\icd2">
|
||||
<UniqueIdentifier>{9dd57f5e-1002-48d7-81d3-529c022996bd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\link">
|
||||
<UniqueIdentifier>{944e3046-20a8-4271-9974-15718a3aa3cd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\msu1">
|
||||
<UniqueIdentifier>{b5eedfaf-3238-4e31-814b-f59d2ad6c617}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\necdsp">
|
||||
<UniqueIdentifier>{bb93bc7a-e90a-4e11-a0c0-84e26dc7f42a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\nss">
|
||||
<UniqueIdentifier>{7887aa9a-01a4-4152-a285-bb4ecaa0b716}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\obc1">
|
||||
<UniqueIdentifier>{009324b7-7605-4e55-b73d-68131f4a8845}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\sa1">
|
||||
<UniqueIdentifier>{a9b576a3-938b-4e09-86e7-4cda6e5deba5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\sdd1">
|
||||
<UniqueIdentifier>{4c4832de-b4f0-488d-980b-a77ebce05527}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\spc7110">
|
||||
<UniqueIdentifier>{fb725aa0-6ff3-4b25-bf45-ae28fc3aed4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\srtc">
|
||||
<UniqueIdentifier>{2a37b3c4-7b36-48e5-b201-25b1e81d8751}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\sufamiturbo">
|
||||
<UniqueIdentifier>{574e46b2-63b2-491a-8ae1-0942b01d6cd2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\chip\superfx">
|
||||
<UniqueIdentifier>{b4ec7434-0582-4463-8e08-c3e9eb99d005}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\config">
|
||||
<UniqueIdentifier>{34858db2-a967-43a1-ac48-4de7b5db5a6b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\controller">
|
||||
<UniqueIdentifier>{e7a4951f-47f4-44e1-a1ac-c29484c89c33}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\cpu">
|
||||
<UniqueIdentifier>{da1501bf-c0ce-4e34-a9b5-80b369db33dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\dsp">
|
||||
<UniqueIdentifier>{adbd7da4-de16-44d3-9ba4-15841768d4fe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\interface">
|
||||
<UniqueIdentifier>{9cabccb5-50ec-491e-b48f-ca8b88a546c8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\memory">
|
||||
<UniqueIdentifier>{f008c454-28d4-40c7-9289-b3f2dd19a762}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\ppu">
|
||||
<UniqueIdentifier>{434d7eb5-d533-4917-8b38-cca08d569ed5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\smp">
|
||||
<UniqueIdentifier>{a6600a1f-d587-4a88-966e-11f7a2ee2e3e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\system">
|
||||
<UniqueIdentifier>{000a6753-2b90-45fa-845d-c7b364a37c35}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="gameboy\scheduler">
|
||||
<UniqueIdentifier>{b8ea9101-3f2f-4631-8bfe-4011bebc8e0e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="target-libsnes">
|
||||
<UniqueIdentifier>{1d1cf6c9-9e1b-402c-b1cc-7ed8866092e7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="libco_msvc_win32">
|
||||
<UniqueIdentifier>{d2cbafd7-caaf-404c-9fdb-4adaaf5c1687}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="snes\cpu\core">
|
||||
<UniqueIdentifier>{be676f5c-dcb3-4a39-911c-4e102dfa25d8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\bsnes\base\base.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\gameboy\gameboy.hpp">
|
||||
<Filter>gameboy</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\gameboy\apu\apu.hpp">
|
||||
<Filter>gameboy\apu</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\gameboy\cheat\cheat.hpp">
|
||||
<Filter>gameboy\cheat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\snes\profile-accuracy.hpp">
|
||||
<Filter>snes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\snes\profile-compatibility.hpp">
|
||||
<Filter>snes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\snes\profile-performance.hpp">
|
||||
<Filter>snes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\snes\snes.hpp">
|
||||
<Filter>snes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bsnes\target-libsnes\libsnes.hpp">
|
||||
<Filter>target-libsnes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\bsnes\gameboy\apu\apu.cpp">
|
||||
<Filter>gameboy\apu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\cartridge\cartridge.cpp">
|
||||
<Filter>gameboy\cartridge</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\cheat\cheat.cpp">
|
||||
<Filter>gameboy\cheat</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\cpu\cpu.cpp">
|
||||
<Filter>gameboy\cpu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\interface\interface.cpp">
|
||||
<Filter>gameboy\interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\lcd\lcd.cpp">
|
||||
<Filter>gameboy\lcd</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\memory\memory.cpp">
|
||||
<Filter>gameboy\memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\scheduler\scheduler.cpp">
|
||||
<Filter>gameboy\scheduler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\system\system.cpp">
|
||||
<Filter>gameboy\system</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\gameboy\video\video.cpp">
|
||||
<Filter>gameboy\video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\alt\dsp\dsp.cpp">
|
||||
<Filter>snes\alt\dsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\alt\cpu\cpu.cpp">
|
||||
<Filter>snes\alt\cpu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\alt\ppu-performance\ppu.cpp">
|
||||
<Filter>snes\alt\ppu-performance</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\alt\smp\smp.cpp">
|
||||
<Filter>snes\alt\smp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\cartridge\cartridge.cpp">
|
||||
<Filter>snes\cartridge</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\cheat\cheat.cpp">
|
||||
<Filter>snes\cheat</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\armdsp\armdsp.cpp">
|
||||
<Filter>snes\chip\armdsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\bsx\bsx.cpp">
|
||||
<Filter>snes\chip\bsx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\hitachidsp\hitachidsp.cpp">
|
||||
<Filter>snes\chip\hitachidsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\icd2\icd2.cpp">
|
||||
<Filter>snes\chip\icd2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\link\link.cpp">
|
||||
<Filter>snes\chip\link</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\msu1\msu1.cpp">
|
||||
<Filter>snes\chip\msu1</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\necdsp\necdsp.cpp">
|
||||
<Filter>snes\necdsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\nss\nss.cpp">
|
||||
<Filter>snes\chip\nss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\obc1\obc1.cpp">
|
||||
<Filter>snes\chip\obc1</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\sa1\sa1.cpp">
|
||||
<Filter>snes\chip\sa1</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\sdd1\sdd1.cpp">
|
||||
<Filter>snes\chip\sdd1</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\spc7110\spc7110.cpp">
|
||||
<Filter>snes\chip\spc7110</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\srtc\srtc.cpp">
|
||||
<Filter>snes\chip\srtc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\sufamiturbo\sufamiturbo.cpp">
|
||||
<Filter>snes\chip\sufamiturbo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\chip\superfx\superfx.cpp">
|
||||
<Filter>snes\chip\superfx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\config\config.cpp">
|
||||
<Filter>snes\config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\controller\controller.cpp">
|
||||
<Filter>snes\controller</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\cpu\cpu.cpp">
|
||||
<Filter>snes\cpu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\dsp\dsp.cpp">
|
||||
<Filter>snes\dsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\interface\interface.cpp">
|
||||
<Filter>snes\interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\memory\memory.cpp">
|
||||
<Filter>snes\memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\ppu\ppu.cpp">
|
||||
<Filter>snes\ppu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\smp\smp.cpp">
|
||||
<Filter>snes\smp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\system\system.cpp">
|
||||
<Filter>snes\system</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\target-libsnes\libsnes.cpp">
|
||||
<Filter>target-libsnes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\target-libsnes\libsnes_pwrap.cpp">
|
||||
<Filter>target-libsnes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\libco_msvc_win32\libco_msvc_win32.c">
|
||||
<Filter>libco_msvc_win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bsnes\snes\cpu\core\core.cpp">
|
||||
<Filter>snes\cpu\core</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,402 @@
|
|||
Index: gameboy/system/system.hpp
|
||||
===================================================================
|
||||
--- gameboy/system/system.hpp (revision 9394)
|
||||
+++ gameboy/system/system.hpp (working copy)
|
||||
@@ -11,9 +11,9 @@
|
||||
GameBoyColor,
|
||||
};
|
||||
readonly<Revision> revision;
|
||||
- inline bool dmg() const { return revision == Revision::GameBoy; }
|
||||
- inline bool sgb() const { return revision == Revision::SuperGameBoy; }
|
||||
- inline bool cgb() const { return revision == Revision::GameBoyColor; }
|
||||
+ inline bool dmg() const { return (Revision)revision == Revision::GameBoy; }
|
||||
+ inline bool sgb() const { return (Revision)revision == Revision::SuperGameBoy; }
|
||||
+ inline bool cgb() const { return (Revision)revision == Revision::GameBoyColor; }
|
||||
|
||||
struct BootROM {
|
||||
static const uint8 dmg[ 256];
|
||||
Index: nall/bit.hpp
|
||||
===================================================================
|
||||
--- nall/bit.hpp (revision 9394)
|
||||
+++ nall/bit.hpp (working copy)
|
||||
@@ -10,20 +10,24 @@
|
||||
|
||||
template<unsigned bits>
|
||||
constexpr inline uintmax_t uclip(const uintmax_t x) {
|
||||
- enum : uintmax_t { b = 1ull << (bits - 1), m = b * 2 - 1 };
|
||||
- return (x & m);
|
||||
+ //enum : uintmax_t { b = 1ull << (bits - 1), m = b * 2 - 1 }; //test
|
||||
+ //return (x & m); //test
|
||||
+ return (x & ((uintmax_t)(((uintmax_t)(1ull << (bits - 1))) * 2 - 1)));
|
||||
}
|
||||
|
||||
template<unsigned bits>
|
||||
constexpr inline intmax_t sclamp(const intmax_t x) {
|
||||
- enum : intmax_t { b = 1ull << (bits - 1), m = b - 1 };
|
||||
- return (x > m) ? m : (x < -b) ? -b : x;
|
||||
+ //enum : intmax_t { b = 1ull << (bits - 1), m = b - 1 }; //test
|
||||
+ //(intmax_t)(1ull << (bits - 1)) //b
|
||||
+ //(((intmax_t)(1ull << (bits - 1))) - 1) //m
|
||||
+ //return (x > m) ? m : (x < -b) ? -b : x; //test
|
||||
+ return (x > (((intmax_t)(1ull << (bits - 1))) - 1)) ? (((intmax_t)(1ull << (bits - 1))) - 1) : (x < -((intmax_t)(1ull << (bits - 1)))) ? -((intmax_t)(1ull << (bits - 1))) : x; //test
|
||||
}
|
||||
|
||||
template<unsigned bits>
|
||||
constexpr inline intmax_t sclip(const intmax_t x) {
|
||||
- enum : uintmax_t { b = 1ull << (bits - 1), m = b * 2 - 1 };
|
||||
- return ((x & m) ^ b) - b;
|
||||
+ //enum : uintmax_t { b = 1ull << (bits - 1), m = b * 2 - 1 }; //test
|
||||
+ return ((x & ((uintmax_t)(((uintmax_t)(1ull << (bits - 1))) * 2 - 1))) ^ ((uintmax_t)(1ull << (bits - 1)))) - ((uintmax_t)(1ull << (bits - 1)));
|
||||
}
|
||||
|
||||
namespace bit {
|
||||
Index: nall/dsp/resample/average.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/average.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/average.hpp (working copy)
|
||||
@@ -50,7 +50,8 @@
|
||||
|
||||
void ResampleAverage::sampleLinear() {
|
||||
while(fraction <= 1.0) {
|
||||
- real channel[dsp.settings.channels];
|
||||
+ //real channel[dsp.settings.channels]; //test
|
||||
+ real channel[2];
|
||||
|
||||
for(unsigned n = 0; n < dsp.settings.channels; n++) {
|
||||
real a = dsp.buffer.read(n, -1);
|
||||
Index: nall/dsp/resample/cosine.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/cosine.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/cosine.hpp (working copy)
|
||||
@@ -21,8 +21,10 @@
|
||||
|
||||
void ResampleCosine::sample() {
|
||||
while(fraction <= 1.0) {
|
||||
- real channel[dsp.settings.channels];
|
||||
+ //real channel[dsp.settings.channels]; //test
|
||||
+ real channel[2];
|
||||
|
||||
+
|
||||
for(unsigned n = 0; n < dsp.settings.channels; n++) {
|
||||
real a = dsp.buffer.read(n, -1);
|
||||
real b = dsp.buffer.read(n, -0);
|
||||
Index: nall/dsp/resample/cubic.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/cubic.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/cubic.hpp (working copy)
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
void ResampleCubic::sample() {
|
||||
while(fraction <= 1.0) {
|
||||
- real channel[dsp.settings.channels];
|
||||
+ //real channel[dsp.settings.channels]; //test
|
||||
+ real channel[2]; //test
|
||||
|
||||
for(unsigned n = 0; n < dsp.settings.channels; n++) {
|
||||
real a = dsp.buffer.read(n, -3);
|
||||
Index: nall/dsp/resample/hermite.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/hermite.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/hermite.hpp (working copy)
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
void ResampleHermite::sample() {
|
||||
while(fraction <= 1.0) {
|
||||
- real channel[dsp.settings.channels];
|
||||
+ //real channel[dsp.settings.channels]; //test
|
||||
+ real channel[2];
|
||||
|
||||
for(unsigned n = 0; n < dsp.settings.channels; n++) {
|
||||
real a = dsp.buffer.read(n, -3);
|
||||
Index: nall/dsp/resample/lib/sinc.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/lib/sinc.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/lib/sinc.hpp (working copy)
|
||||
@@ -4,6 +4,8 @@
|
||||
typedef float resample_coeff_t; // note: sizeof(resample_coeff_t) must be == to a power of 2, and not larger than 16
|
||||
typedef float resample_samp_t;
|
||||
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
|
||||
// ...but don't comment this single RESAMPLE_SSEREGPARM define out when disabling SSE.
|
||||
#define RESAMPLE_SSEREGPARM
|
||||
Index: nall/dsp/resample/linear.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/linear.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/linear.hpp (working copy)
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
void ResampleLinear::sample() {
|
||||
while(fraction <= 1.0) {
|
||||
- real channel[dsp.settings.channels];
|
||||
+ //real channel[dsp.settings.channels]; //TEST
|
||||
+ real channel[2];
|
||||
|
||||
for(unsigned n = 0; n < dsp.settings.channels; n++) {
|
||||
real a = dsp.buffer.read(n, -1);
|
||||
Index: nall/dsp/resample/nearest.hpp
|
||||
===================================================================
|
||||
--- nall/dsp/resample/nearest.hpp (revision 9394)
|
||||
+++ nall/dsp/resample/nearest.hpp (working copy)
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
void ResampleNearest::sample() {
|
||||
while(fraction <= 1.0) {
|
||||
- real channel[dsp.settings.channels];
|
||||
+ //real channel[dsp.settings.channels]; //test
|
||||
+ real channel[2];
|
||||
|
||||
for(unsigned n = 0; n < dsp.settings.channels; n++) {
|
||||
real a = dsp.buffer.read(n, -1);
|
||||
Index: nall/file.hpp
|
||||
===================================================================
|
||||
--- nall/file.hpp (revision 9394)
|
||||
+++ nall/file.hpp (working copy)
|
||||
@@ -176,7 +176,8 @@
|
||||
struct __stat64 data;
|
||||
_wstat64(utf16_t(filename), &data);
|
||||
#endif
|
||||
- return S_ISREG(data.st_mode) ? data.st_size : 0u;
|
||||
+ //return S_ISREG(data.st_mode) ? data.st_size : 0u; //TEST
|
||||
+ return data.st_size;
|
||||
}
|
||||
|
||||
static time_t timestamp(const string &filename, file::time mode = file::time::create) {
|
||||
Index: nall/platform.hpp
|
||||
===================================================================
|
||||
--- nall/platform.hpp (revision 9394)
|
||||
+++ nall/platform.hpp (working copy)
|
||||
@@ -8,6 +8,10 @@
|
||||
#include <nall/windows/utf8.hpp>
|
||||
#endif
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#define _USE_MATH_DEFINES 1
|
||||
+#endif
|
||||
+
|
||||
//=========================
|
||||
//standard platform headers
|
||||
//=========================
|
||||
@@ -29,10 +33,13 @@
|
||||
#if defined(_WIN32)
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
- #include <shlobj.h>
|
||||
+ //#include <shlobj.h> //bizhawk chokes?
|
||||
#include <wchar.h>
|
||||
#undef interface
|
||||
#define dllexport __declspec(dllexport)
|
||||
+ //bad things happen without these here
|
||||
+ #include <string>
|
||||
+ #include <vector>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
@@ -100,23 +107,27 @@
|
||||
}
|
||||
|
||||
inline char* userpath(char *path) {
|
||||
- wchar_t fp[_MAX_PATH] = L"";
|
||||
- SHGetFolderPathW(0, CSIDL_APPDATA | CSIDL_FLAG_CREATE, 0, 0, fp);
|
||||
- strcpy(path, nall::utf8_t(fp));
|
||||
- for(unsigned n = 0; path[n]; n++) if(path[n] == '\\') path[n] = '/';
|
||||
- unsigned length = strlen(path);
|
||||
- if(path[length] != '/') strcpy(path + length, "/");
|
||||
- return path;
|
||||
+ //TODO BIZHAWK
|
||||
+ return nullptr;
|
||||
+ //wchar_t fp[_MAX_PATH] = L"";
|
||||
+ //SHGetFolderPathW(0, CSIDL_APPDATA | CSIDL_FLAG_CREATE, 0, 0, fp);
|
||||
+ //strcpy(path, nall::utf8_t(fp));
|
||||
+ //for(unsigned n = 0; path[n]; n++) if(path[n] == '\\') path[n] = '/';
|
||||
+ //unsigned length = strlen(path);
|
||||
+ //if(path[length] != '/') strcpy(path + length, "/");
|
||||
+ //return path;
|
||||
}
|
||||
|
||||
inline char* getcwd(char *path) {
|
||||
- wchar_t fp[_MAX_PATH] = L"";
|
||||
- _wgetcwd(fp, _MAX_PATH);
|
||||
- strcpy(path, nall::utf8_t(fp));
|
||||
- for(unsigned n = 0; path[n]; n++) if(path[n] == '\\') path[n] = '/';
|
||||
- unsigned length = strlen(path);
|
||||
- if(path[length] != '/') strcpy(path + length, "/");
|
||||
- return path;
|
||||
+ //TODO BIZHAWK
|
||||
+ return nullptr;
|
||||
+ //wchar_t fp[_MAX_PATH] = L"";
|
||||
+ //_wgetcwd(fp, _MAX_PATH);
|
||||
+ //strcpy(path, nall::utf8_t(fp));
|
||||
+ //for(unsigned n = 0; path[n]; n++) if(path[n] == '\\') path[n] = '/';
|
||||
+ //unsigned length = strlen(path);
|
||||
+ //if(path[length] != '/') strcpy(path + length, "/");
|
||||
+ //return path;
|
||||
}
|
||||
#else
|
||||
//realpath() already exists
|
||||
Index: nall/property.hpp
|
||||
===================================================================
|
||||
--- nall/property.hpp (revision 9394)
|
||||
+++ nall/property.hpp (working copy)
|
||||
@@ -56,17 +56,17 @@
|
||||
const T* operator->() const { return &value; }
|
||||
const T& operator()() const { return value; }
|
||||
operator const T&() const { return value; }
|
||||
- private:
|
||||
+ //private:
|
||||
T* operator->() { return &value; }
|
||||
operator T&() { return value; }
|
||||
const T& operator=(const T& value_) { return value = value_; }
|
||||
T value;
|
||||
- friend class traits<C>::type;
|
||||
+ //friend class traits<C>::type;
|
||||
};
|
||||
|
||||
template<typename T> struct writeonly {
|
||||
void operator=(const T& value_) { value = value_; }
|
||||
- private:
|
||||
+ //private:
|
||||
const T* operator->() const { return &value; }
|
||||
const T& operator()() const { return value; }
|
||||
operator const T&() const { return value; }
|
||||
@@ -73,7 +73,7 @@
|
||||
T* operator->() { return &value; }
|
||||
operator T&() { return value; }
|
||||
T value;
|
||||
- friend class traits<C>::type;
|
||||
+ //friend class traits<C>::type;
|
||||
};
|
||||
|
||||
template<typename T> struct readwrite {
|
||||
Index: nall/string/utility.hpp
|
||||
===================================================================
|
||||
--- nall/string/utility.hpp (revision 9394)
|
||||
+++ nall/string/utility.hpp (working copy)
|
||||
@@ -1,5 +1,7 @@
|
||||
#ifdef NALL_STRING_INTERNAL_HPP
|
||||
|
||||
+#include <malloc.h>
|
||||
+
|
||||
namespace nall {
|
||||
|
||||
template<bool Insensitive>
|
||||
@@ -164,7 +166,7 @@
|
||||
buffer[size] = 0;
|
||||
|
||||
unsigned length = (length_ == 0 ? size : length_);
|
||||
- char result[length + 1];
|
||||
+ char* result = (char*)alloca(length + 1);
|
||||
memset(result, padding, length);
|
||||
result[length] = 0;
|
||||
|
||||
@@ -209,7 +211,7 @@
|
||||
} while(value);
|
||||
|
||||
unsigned length = (length_ == 0 ? size : length_);
|
||||
- char result[length + 1];
|
||||
+ char *result = (char*)alloca(length + 1);
|
||||
memset(result, padding, length);
|
||||
result[length] = 0;
|
||||
|
||||
Index: snes/cartridge/markup.cpp
|
||||
===================================================================
|
||||
--- snes/cartridge/markup.cpp (revision 9394)
|
||||
+++ snes/cartridge/markup.cpp (working copy)
|
||||
@@ -108,7 +108,7 @@
|
||||
void Cartridge::parse_markup_icd2(XML::Node &root) {
|
||||
#if defined(GAMEBOY)
|
||||
if(root.exists() == false) return;
|
||||
- if(mode != Mode::SuperGameBoy) return;
|
||||
+ if(mode.value != Mode::SuperGameBoy) return;
|
||||
|
||||
icd2.revision = max(1, numeral(root["revision"].data));
|
||||
|
||||
@@ -241,7 +241,8 @@
|
||||
if(!sha256.empty()) {
|
||||
//XML file specified SHA256 sum for program. Verify file matches the hash.
|
||||
fp.seek(0);
|
||||
- uint8_t data[filesize];
|
||||
+ //uint8_t data[filesize]; //test
|
||||
+ uint8_t *data = (uint8_t*)alloca(filesize);
|
||||
fp.read(data, filesize);
|
||||
|
||||
if(sha256 != nall::sha256(data, filesize)) {
|
||||
@@ -367,7 +368,7 @@
|
||||
|
||||
void Cartridge::parse_markup_bsx(XML::Node &root) {
|
||||
if(root.exists() == false) return;
|
||||
- if(mode != Mode::BsxSlotted && mode != Mode::Bsx) return;
|
||||
+ if(mode.value != Mode::BsxSlotted && mode.value != Mode::Bsx) return;
|
||||
has_bsx_slot = true;
|
||||
|
||||
for(auto &node : root["slot"]) {
|
||||
@@ -394,7 +395,7 @@
|
||||
|
||||
void Cartridge::parse_markup_sufamiturbo(XML::Node &root) {
|
||||
if(root.exists() == false) return;
|
||||
- if(mode != Mode::SufamiTurbo) return;
|
||||
+ if(mode.value != Mode::SufamiTurbo) return;
|
||||
|
||||
for(auto &slot : root) {
|
||||
if(slot.name != "slot") continue;
|
||||
Index: snes/chip/armdsp/registers.hpp
|
||||
===================================================================
|
||||
--- snes/chip/armdsp/registers.hpp (revision 9394)
|
||||
+++ snes/chip/armdsp/registers.hpp (working copy)
|
||||
@@ -93,6 +93,7 @@
|
||||
Register& operator=(uint32 n) {
|
||||
data = n;
|
||||
if(write) write();
|
||||
+ return *this; //test - what?
|
||||
}
|
||||
|
||||
Register& operator+=(uint32 n) { return operator=(data + n); }
|
||||
Index: snes/chip/icd2/interface/interface.cpp
|
||||
===================================================================
|
||||
--- snes/chip/icd2/interface/interface.cpp (revision 9394)
|
||||
+++ snes/chip/icd2/interface/interface.cpp (working copy)
|
||||
@@ -112,7 +112,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void* ICD2::allocSharedMemory(const char* memtype, size_t amt, int initialByte) { SNES::interface()->allocSharedMemory(memtype, amt, initialByte); }
|
||||
+void* ICD2::allocSharedMemory(const char* memtype, size_t amt, int initialByte) { return SNES::interface()->allocSharedMemory(memtype, amt, initialByte); }
|
||||
void ICD2::freeSharedMemory(void* ptr) { SNES::interface()->freeSharedMemory(ptr); }
|
||||
|
||||
#endif
|
||||
Index: snes/system/system.cpp
|
||||
===================================================================
|
||||
--- snes/system/system.cpp (revision 9394)
|
||||
+++ snes/system/system.cpp (working copy)
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
region = config.region;
|
||||
expansion = config.expansion_port;
|
||||
- if(region == Region::Autodetect) {
|
||||
+ if(region.value == Region::Autodetect) {
|
||||
region = (cartridge.region() == Cartridge::Region::NTSC ? Region::NTSC : Region::PAL);
|
||||
}
|
||||
|
||||
Index: target-libsnes/libsnes_pwrap.cpp
|
||||
===================================================================
|
||||
--- target-libsnes/libsnes_pwrap.cpp (revision 9394)
|
||||
+++ target-libsnes/libsnes_pwrap.cpp (working copy)
|
||||
@@ -854,6 +854,7 @@
|
||||
case eMessage_QUERY_peek_cpu_regs:
|
||||
{
|
||||
//watch it! the size of this struct is important!
|
||||
+ #pragma pack(push,1)
|
||||
struct {
|
||||
u32 pc;
|
||||
u16 a,x,y,z,s,d,vector; //7x
|
||||
@@ -860,7 +861,8 @@
|
||||
u8 p, nothing;
|
||||
u32 aa,rd;
|
||||
u8 sp, dp, db, mdr;
|
||||
- } __attribute__((__packed__)) cpuregs;
|
||||
+ } cpuregs;
|
||||
+ #pragma pack(pop)
|
||||
|
||||
cpuregs.pc = (u32)SNES::cpu.regs.pc;
|
||||
cpuregs.a = SNES::cpu.regs.a;
|
Loading…
Reference in New Issue