Reorganize the tools folder, making new folders for Lua, Watch, and Hex Editor, start new Watch Editor dialog. Split new Watch objects into their own file, rename legacy watch object accordingly
This commit is contained in:
parent
8c1582ca74
commit
e49c00ac36
|
@ -325,7 +325,6 @@
|
|||
</Compile>
|
||||
<Compile Include="movie\InputAdapters.cs" />
|
||||
<Compile Include="Input\Keyboard.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="LuaImplementation.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -486,58 +485,73 @@
|
|||
<Compile Include="N64tools\N64VideoPluginconfig.Designer.cs">
|
||||
<DependentUpon>N64VideoPluginconfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexColor.cs">
|
||||
<Compile Include="tools\HexEditor\HexColor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexColor.Designer.cs">
|
||||
<Compile Include="tools\HexEditor\HexColor.Designer.cs">
|
||||
<DependentUpon>HexColor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexFind.cs">
|
||||
<Compile Include="tools\HexEditor\HexEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexFind.Designer.cs">
|
||||
<Compile Include="tools\HexEditor\HexEditor.Designer.cs">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexEditor\HexFind.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexEditor\HexFind.Designer.cs">
|
||||
<DependentUpon>HexFind.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaButton.cs">
|
||||
<Compile Include="tools\Lua\LuaButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaDocumentation.cs" />
|
||||
<Compile Include="tools\LuaRegisteredFunctionsList.cs">
|
||||
<Compile Include="tools\Lua\LuaConsole.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaRegisteredFunctionsList.Designer.cs">
|
||||
<Compile Include="tools\Lua\LuaConsole.Designer.cs">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaDocumentation.cs" />
|
||||
<Compile Include="tools\Lua\LuaFiles.cs" />
|
||||
<Compile Include="tools\Lua\LuaFunctionList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaFunctionList.Designer.cs">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaImplementation.cs" />
|
||||
<Compile Include="tools\Lua\LuaRegisteredFunctionsList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaRegisteredFunctionsList.Designer.cs">
|
||||
<DependentUpon>LuaRegisteredFunctionsList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaTextBox.cs">
|
||||
<Compile Include="tools\Lua\LuaText.cs" />
|
||||
<Compile Include="tools\Lua\LuaTextBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWinform.cs">
|
||||
<Compile Include="tools\Lua\LuaWinform.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWinform.Designer.cs">
|
||||
<Compile Include="tools\Lua\LuaWinform.Designer.cs">
|
||||
<DependentUpon>LuaWinform.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriter.cs">
|
||||
<Compile Include="tools\Lua\LuaWriter.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriter.designer.cs">
|
||||
<Compile Include="tools\Lua\LuaWriter.Designer.cs">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterBox.cs">
|
||||
<Compile Include="tools\Lua\LuaWriterBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterColorConfig.cs">
|
||||
<Compile Include="tools\Lua\LuaWriterColorConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterColorConfig.Designer.cs">
|
||||
<Compile Include="tools\Lua\LuaWriterColorConfig.Designer.cs">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\NewRamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\NewRamWatch.Designer.cs">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\StateVisualizer.cs" />
|
||||
<Compile Include="tools\ToolHelpers.cs" />
|
||||
<Compile Include="tools\TraceLogger.cs">
|
||||
|
@ -643,7 +657,45 @@
|
|||
<Compile Include="tools\VirtualPads\VirtualPadSNESControl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\WatchCommon.cs" />
|
||||
<Compile Include="tools\Watch\NewRamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\NewRamWatch.Designer.cs">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamPoke.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamPoke.Designer.cs">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamSearch.Designer.cs">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatch.Designer.cs">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.Designer.cs">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\Watch.cs" />
|
||||
<Compile Include="tools\Watch\WatchCommon.cs" />
|
||||
<Compile Include="tools\Watch\WatchEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\WatchEditor.Designer.cs">
|
||||
<DependentUpon>WatchEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\WatchLegacy.cs" />
|
||||
<Compile Include="XmlGame.cs" />
|
||||
<EmbeddedResource Include="AVOut\FFmpegWriterForm.resx">
|
||||
<DependentUpon>FFmpegWriterForm.cs</DependentUpon>
|
||||
|
@ -762,43 +814,38 @@
|
|||
<EmbeddedResource Include="N64tools\N64VideoPluginconfig.resx">
|
||||
<DependentUpon>N64VideoPluginconfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexColor.resx">
|
||||
<DependentUpon>HexColor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexFind.resx">
|
||||
<DependentUpon>HexFind.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaFunctionList.resx">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaRegisteredFunctionsList.resx">
|
||||
<DependentUpon>LuaRegisteredFunctionsList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaWinform.resx">
|
||||
<DependentUpon>LuaWinform.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaWriter.resx">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaWriterColorConfig.resx">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\NewRamWatch.resx">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamWatch.resx">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamWatchNewWatch.resx">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="tools\HexEditor\HexColor.resx">
|
||||
<DependentUpon>HexColor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexEditor\HexEditor.resx">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexEditor\HexFind.resx">
|
||||
<DependentUpon>HexFind.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaConsole.resx">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaFunctionList.resx">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaRegisteredFunctionsList.resx">
|
||||
<DependentUpon>LuaRegisteredFunctionsList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaWinform.resx">
|
||||
<DependentUpon>LuaWinform.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaWriter.resx">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaWriterColorConfig.resx">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\VirtualPads\VirtualPad.resx">
|
||||
<DependentUpon>VirtualPad.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -826,6 +873,24 @@
|
|||
<EmbeddedResource Include="tools\VirtualPads\VirtualPadSaturnControl.resx">
|
||||
<DependentUpon>VirtualPadSaturnControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\NewRamWatch.resx">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamPoke.resx">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamSearch.resx">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamWatch.resx">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamWatchNewWatch.resx">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\WatchEditor.resx">
|
||||
<DependentUpon>WatchEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
@ -858,60 +923,16 @@
|
|||
<Compile Include="tools\Cheats.Designer.cs">
|
||||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaFunctionList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaFunctionList.Designer.cs">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\MemoryPulse.cs" />
|
||||
<Compile Include="tools\HexEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexEditor.Designer.cs">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaConsole.cs" Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaConsole.Designer.cs" Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaFiles.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="tools\LuaText.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="tools\MemoryViewer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamPoke.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamPoke.Designer.cs">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\InputPrompt.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\InputPrompt.Designer.cs">
|
||||
<DependentUpon>InputPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamSearch.Designer.cs">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatch.Designer.cs">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatchNewWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatchNewWatch.Designer.cs">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RecentFiles.cs" />
|
||||
<Compile Include="RenderPanel.cs" />
|
||||
<Compile Include="RomGame.cs" />
|
||||
|
@ -929,7 +950,6 @@
|
|||
<Compile Include="tools\ToolBox.Designer.cs">
|
||||
<DependentUpon>ToolBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BizHawk.Emulation\BizHawk.Emulation.csproj">
|
||||
|
@ -1015,29 +1035,14 @@
|
|||
<EmbeddedResource Include="tools\TraceLogger.resx">
|
||||
<DependentUpon>TraceLogger.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexEditor.resx">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaConsole.resx">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\MemoryViewer.resx">
|
||||
<DependentUpon>MemoryViewer.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamPoke.resx">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\InputPrompt.resx">
|
||||
<DependentUpon>InputPrompt.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamSearch.resx">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\TAStudio.resx">
|
||||
<DependentUpon>TAStudio.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -339,7 +339,6 @@
|
|||
</Compile>
|
||||
<Compile Include="movie\InputAdapters.cs" />
|
||||
<Compile Include="Input\Keyboard.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="LuaImplementation.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -488,58 +487,73 @@
|
|||
<Compile Include="SNESTools\SNESOptions.Designer.cs">
|
||||
<DependentUpon>SNESOptions.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexColor.cs">
|
||||
<Compile Include="tools\HexEditor\HexColor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexColor.Designer.cs">
|
||||
<Compile Include="tools\HexEditor\HexColor.Designer.cs">
|
||||
<DependentUpon>HexColor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexFind.cs">
|
||||
<Compile Include="tools\HexEditor\HexEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexFind.Designer.cs">
|
||||
<Compile Include="tools\HexEditor\HexEditor.Designer.cs">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexEditor\HexFind.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexEditor\HexFind.Designer.cs">
|
||||
<DependentUpon>HexFind.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaButton.cs">
|
||||
<Compile Include="tools\Lua\LuaButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaDocumentation.cs" />
|
||||
<Compile Include="tools\LuaRegisteredFunctionsList.cs">
|
||||
<Compile Include="tools\Lua\LuaConsole.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaRegisteredFunctionsList.Designer.cs">
|
||||
<Compile Include="tools\Lua\LuaConsole.Designer.cs">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaDocumentation.cs" />
|
||||
<Compile Include="tools\Lua\LuaFiles.cs" />
|
||||
<Compile Include="tools\Lua\LuaFunctionList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaFunctionList.Designer.cs">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaImplementation.cs" />
|
||||
<Compile Include="tools\Lua\LuaRegisteredFunctionsList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Lua\LuaRegisteredFunctionsList.Designer.cs">
|
||||
<DependentUpon>LuaRegisteredFunctionsList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaTextBox.cs">
|
||||
<Compile Include="tools\Lua\LuaText.cs" />
|
||||
<Compile Include="tools\Lua\LuaTextBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWinform.cs">
|
||||
<Compile Include="tools\Lua\LuaWinform.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWinform.Designer.cs">
|
||||
<Compile Include="tools\Lua\LuaWinform.Designer.cs">
|
||||
<DependentUpon>LuaWinform.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriter.cs">
|
||||
<Compile Include="tools\Lua\LuaWriter.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriter.designer.cs">
|
||||
<Compile Include="tools\Lua\LuaWriter.Designer.cs">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterBox.cs">
|
||||
<Compile Include="tools\Lua\LuaWriterBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterColorConfig.cs">
|
||||
<Compile Include="tools\Lua\LuaWriterColorConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterColorConfig.Designer.cs">
|
||||
<Compile Include="tools\Lua\LuaWriterColorConfig.Designer.cs">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\NewRamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\NewRamWatch.Designer.cs">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\StateVisualizer.cs" />
|
||||
<Compile Include="tools\ToolHelpers.cs" />
|
||||
<Compile Include="tools\TraceLogger.cs">
|
||||
|
@ -645,7 +659,45 @@
|
|||
<Compile Include="tools\VirtualPads\VirtualPadSNESControl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\WatchCommon.cs" />
|
||||
<Compile Include="tools\Watch\NewRamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\NewRamWatch.Designer.cs">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamPoke.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamPoke.Designer.cs">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamSearch.Designer.cs">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatch.Designer.cs">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.Designer.cs">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\Watch.cs" />
|
||||
<Compile Include="tools\Watch\WatchCommon.cs" />
|
||||
<Compile Include="tools\Watch\WatchEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\WatchEditor.designer.cs">
|
||||
<DependentUpon>WatchEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\WatchLegacy.cs" />
|
||||
<Compile Include="XmlGame.cs" />
|
||||
<EmbeddedResource Include="AVOut\FFmpegWriterForm.resx">
|
||||
<DependentUpon>FFmpegWriterForm.cs</DependentUpon>
|
||||
|
@ -762,43 +814,38 @@
|
|||
<EmbeddedResource Include="SNESTools\SNESOptions.resx">
|
||||
<DependentUpon>SNESOptions.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexColor.resx">
|
||||
<DependentUpon>HexColor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexFind.resx">
|
||||
<DependentUpon>HexFind.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaFunctionList.resx">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaRegisteredFunctionsList.resx">
|
||||
<DependentUpon>LuaRegisteredFunctionsList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaWinform.resx">
|
||||
<DependentUpon>LuaWinform.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaWriter.resx">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaWriterColorConfig.resx">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\NewRamWatch.resx">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamWatch.resx">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamWatchNewWatch.resx">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="tools\HexEditor\HexColor.resx">
|
||||
<DependentUpon>HexColor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexEditor\HexEditor.resx">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexEditor\HexFind.resx">
|
||||
<DependentUpon>HexFind.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaConsole.resx">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaFunctionList.resx">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaRegisteredFunctionsList.resx">
|
||||
<DependentUpon>LuaRegisteredFunctionsList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaWinform.resx">
|
||||
<DependentUpon>LuaWinform.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaWriter.resx">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Lua\LuaWriterColorConfig.resx">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\VirtualPads\VirtualPad.resx">
|
||||
<DependentUpon>VirtualPad.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -826,6 +873,24 @@
|
|||
<EmbeddedResource Include="tools\VirtualPads\VirtualPadSaturnControl.resx">
|
||||
<DependentUpon>VirtualPadSaturnControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\NewRamWatch.resx">
|
||||
<DependentUpon>NewRamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamPoke.resx">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamSearch.resx">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamWatch.resx">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamWatchNewWatch.resx">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\WatchEditor.resx">
|
||||
<DependentUpon>WatchEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
@ -858,60 +923,16 @@
|
|||
<Compile Include="tools\Cheats.Designer.cs">
|
||||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaFunctionList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaFunctionList.Designer.cs">
|
||||
<DependentUpon>LuaFunctionList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\MemoryPulse.cs" />
|
||||
<Compile Include="tools\HexEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\HexEditor.Designer.cs">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaConsole.cs" Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaConsole.Designer.cs" Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaFiles.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="tools\LuaText.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="tools\MemoryViewer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamPoke.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamPoke.Designer.cs">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\InputPrompt.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\InputPrompt.Designer.cs">
|
||||
<DependentUpon>InputPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamSearch.Designer.cs">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatch.Designer.cs">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatchNewWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\RamWatchNewWatch.Designer.cs">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RecentFiles.cs" />
|
||||
<Compile Include="RenderPanel.cs" />
|
||||
<Compile Include="RomGame.cs" />
|
||||
|
@ -929,7 +950,6 @@
|
|||
<Compile Include="tools\ToolBox.Designer.cs">
|
||||
<DependentUpon>ToolBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BizHawk.Emulation\BizHawk.Emulation.csproj">
|
||||
|
@ -1015,29 +1035,14 @@
|
|||
<EmbeddedResource Include="tools\TraceLogger.resx">
|
||||
<DependentUpon>TraceLogger.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\HexEditor.resx">
|
||||
<DependentUpon>HexEditor.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\LuaConsole.resx">
|
||||
<DependentUpon>LuaConsole.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\MemoryViewer.resx">
|
||||
<DependentUpon>MemoryViewer.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamPoke.resx">
|
||||
<DependentUpon>RamPoke.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\InputPrompt.resx">
|
||||
<DependentUpon>InputPrompt.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\RamSearch.resx">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\TAStudio.resx">
|
||||
<DependentUpon>TAStudio.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -5,26 +5,26 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
public class HistoryCollection
|
||||
{
|
||||
public List<List<Watch>> History { get; private set; }
|
||||
public List<List<Watch_Legacy>> History { get; private set; }
|
||||
private int curPos; //1-based
|
||||
public bool Enabled { get; private set; }
|
||||
|
||||
public HistoryCollection(bool enabled)
|
||||
{
|
||||
History = new List<List<Watch>>();
|
||||
History = new List<List<Watch_Legacy>>();
|
||||
Enabled = enabled;
|
||||
}
|
||||
|
||||
public HistoryCollection(List<Watch> newState, bool enabled)
|
||||
public HistoryCollection(List<Watch_Legacy> newState, bool enabled)
|
||||
{
|
||||
History = new List<List<Watch>>();
|
||||
History = new List<List<Watch_Legacy>>();
|
||||
AddState(newState);
|
||||
Enabled = enabled;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
History = new List<List<Watch>>();
|
||||
History = new List<List<Watch_Legacy>>();
|
||||
}
|
||||
|
||||
public bool CanUndo
|
||||
|
@ -42,7 +42,7 @@ namespace BizHawk.MultiClient
|
|||
get { return Enabled && History.Any(); }
|
||||
}
|
||||
|
||||
public void AddState(List<Watch> newState)
|
||||
public void AddState(List<Watch_Legacy> newState)
|
||||
{
|
||||
if (Enabled)
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public List<Watch> Undo()
|
||||
public List<Watch_Legacy> Undo()
|
||||
{
|
||||
if (CanUndo && Enabled)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public List<Watch> Redo()
|
||||
public List<Watch_Legacy> Redo()
|
||||
{
|
||||
if (CanRedo && Enabled)
|
||||
{
|
||||
|
|
|
@ -665,20 +665,20 @@ namespace BizHawk.MultiClient
|
|||
UpdateValues();
|
||||
}
|
||||
|
||||
private Watch MakeWatch(int address)
|
||||
private Watch_Legacy MakeWatch(int address)
|
||||
{
|
||||
Watch w = new Watch {Address = address, BigEndian = BigEndian, Signed = Watch.DISPTYPE.HEX, Domain = Domain};
|
||||
Watch_Legacy w = new Watch_Legacy {Address = address, BigEndian = BigEndian, Signed = Watch_Legacy.DISPTYPE.HEX, Domain = Domain};
|
||||
switch (DataSize)
|
||||
{
|
||||
default:
|
||||
case 1:
|
||||
w.Type = Watch.TYPE.BYTE;
|
||||
w.Type = Watch_Legacy.TYPE.BYTE;
|
||||
break;
|
||||
case 2:
|
||||
w.Type = Watch.TYPE.WORD;
|
||||
w.Type = Watch_Legacy.TYPE.WORD;
|
||||
break;
|
||||
case 4:
|
||||
w.Type = Watch.TYPE.DWORD;
|
||||
w.Type = Watch_Legacy.TYPE.DWORD;
|
||||
break;
|
||||
}
|
||||
return w;
|
||||
|
@ -708,12 +708,12 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
int p = GetHighlightedAddress();
|
||||
if (p < 0) return;
|
||||
Watch w = new Watch
|
||||
Watch_Legacy w = new Watch_Legacy
|
||||
{
|
||||
Address = p,
|
||||
Value = MakeValue(p),
|
||||
BigEndian = BigEndian,
|
||||
Signed = Watch.DISPTYPE.HEX,
|
||||
Signed = Watch_Legacy.DISPTYPE.HEX,
|
||||
Domain = Domain
|
||||
};
|
||||
|
||||
|
@ -721,13 +721,13 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
default:
|
||||
case 1:
|
||||
w.Type = Watch.TYPE.BYTE;
|
||||
w.Type = Watch_Legacy.TYPE.BYTE;
|
||||
break;
|
||||
case 2:
|
||||
w.Type = Watch.TYPE.WORD;
|
||||
w.Type = Watch_Legacy.TYPE.WORD;
|
||||
break;
|
||||
case 4:
|
||||
w.Type = Watch.TYPE.DWORD;
|
||||
w.Type = Watch_Legacy.TYPE.DWORD;
|
||||
break;
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
public partial class RamPoke : Form
|
||||
{
|
||||
public Watch Watch = new Watch();
|
||||
public Watch_Legacy Watch = new Watch_Legacy();
|
||||
public MemoryDomain Domain = Global.Emulator.MainMemory;
|
||||
public Point NewLocation = new Point();
|
||||
|
||||
|
@ -16,10 +16,10 @@ namespace BizHawk.MultiClient
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetWatchObject(Watch w)
|
||||
public void SetWatchObject(Watch_Legacy w)
|
||||
{
|
||||
PopulateMemoryDomainComboBox();
|
||||
Watch = new Watch(w);
|
||||
Watch = new Watch_Legacy(w);
|
||||
Domain = w.Domain;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace BizHawk.MultiClient
|
|||
PopulateMemoryDomainComboBox();
|
||||
SetTypeRadio(Watch.Type);
|
||||
SetSignedRadio(Watch.Signed);
|
||||
if (Watch.Signed == Watch.DISPTYPE.HEX)
|
||||
if (Watch.Signed == Watch_Legacy.DISPTYPE.HEX)
|
||||
{
|
||||
ValueHexLabel.Text = "0x";
|
||||
}
|
||||
|
@ -68,15 +68,15 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Watch.Signed)
|
||||
{
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
SignedRadio.Checked = true;
|
||||
ValueHexLabel.Text = "";
|
||||
break;
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
UnsignedRadio.Checked = true;
|
||||
ValueHexLabel.Text = "";
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
ValueHexLabel.Text = "0x";
|
||||
HexRadio.Checked = true;
|
||||
break;
|
||||
|
@ -90,7 +90,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
ValueHexLabel.Text = "0x";
|
||||
ValueBox.MaxLength = GetValueNumDigits();
|
||||
Watch.Signed = Watch.DISPTYPE.HEX;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.HEX;
|
||||
FormatValue();
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
ValueHexLabel.Text = "";
|
||||
ValueBox.MaxLength = GetValueNumDigits();
|
||||
Watch.Signed = Watch.DISPTYPE.UNSIGNED;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
FormatValue();
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
ValueHexLabel.Text = "";
|
||||
ValueBox.MaxLength = GetValueNumDigits();
|
||||
Watch.Signed = Watch.DISPTYPE.SIGNED;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.SIGNED;
|
||||
FormatValue();
|
||||
}
|
||||
|
||||
|
@ -130,33 +130,33 @@ namespace BizHawk.MultiClient
|
|||
Text = "Ram Poke - " + Domain;
|
||||
}
|
||||
|
||||
private void SetTypeRadio(Watch.TYPE a)
|
||||
private void SetTypeRadio(Watch_Legacy.TYPE a)
|
||||
{
|
||||
switch (a)
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Byte1Radio.Checked = true;
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
Byte2Radio.Checked = true;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
Byte4Radio.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSignedRadio(Watch.DISPTYPE a)
|
||||
private void SetSignedRadio(Watch_Legacy.DISPTYPE a)
|
||||
{
|
||||
switch (a)
|
||||
{
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
SignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
UnsignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
HexRadio.Checked = true;
|
||||
break;
|
||||
}
|
||||
|
@ -183,28 +183,28 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (SignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch.DISPTYPE.SIGNED;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.SIGNED;
|
||||
}
|
||||
else if (UnsignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch.DISPTYPE.UNSIGNED;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
}
|
||||
else if (HexRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch.DISPTYPE.HEX;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.HEX;
|
||||
}
|
||||
|
||||
if (Byte1Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch.TYPE.BYTE;
|
||||
Watch.Type = Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
else if (Byte2Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch.TYPE.WORD;
|
||||
Watch.Type = Watch_Legacy.TYPE.WORD;
|
||||
}
|
||||
else if (Byte4Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch.TYPE.DWORD;
|
||||
Watch.Type = Watch_Legacy.TYPE.DWORD;
|
||||
}
|
||||
|
||||
if (BigEndianRadio.Checked)
|
||||
|
@ -261,7 +261,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
switch (Watch.Signed)
|
||||
{
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
if (!InputValidate.IsValidUnsignedNumber(ValueBox.Text))
|
||||
{
|
||||
ValueBox.Focus();
|
||||
|
@ -270,7 +270,7 @@ namespace BizHawk.MultiClient
|
|||
t.Show("Must be a valid unsigned decimal value", ValueBox, 5000);
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
if (!InputValidate.IsValidSignedNumber(ValueBox.Text))
|
||||
{
|
||||
ValueBox.Focus();
|
||||
|
@ -279,7 +279,7 @@ namespace BizHawk.MultiClient
|
|||
t.Show("Must be a valid signed decimal value", ValueBox, 5000);
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
if (!InputValidate.IsValidHexNumber(ValueBox.Text))
|
||||
{
|
||||
ValueBox.Focus();
|
||||
|
@ -292,23 +292,23 @@ namespace BizHawk.MultiClient
|
|||
|
||||
}
|
||||
|
||||
private Watch.DISPTYPE GetDataType()
|
||||
private Watch_Legacy.DISPTYPE GetDataType()
|
||||
{
|
||||
if (SignedRadio.Checked)
|
||||
{
|
||||
return Watch.DISPTYPE.SIGNED;
|
||||
return Watch_Legacy.DISPTYPE.SIGNED;
|
||||
}
|
||||
if (UnsignedRadio.Checked)
|
||||
{
|
||||
return Watch.DISPTYPE.UNSIGNED;
|
||||
return Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
}
|
||||
if (HexRadio.Checked)
|
||||
{
|
||||
return Watch.DISPTYPE.HEX;
|
||||
return Watch_Legacy.DISPTYPE.HEX;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Watch.DISPTYPE.UNSIGNED; //Just in case
|
||||
return Watch_Legacy.DISPTYPE.UNSIGNED; //Just in case
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -318,19 +318,19 @@ namespace BizHawk.MultiClient
|
|||
|
||||
switch (GetDataType())
|
||||
{
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
if (!InputValidate.IsValidUnsignedNumber(e.KeyChar))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
if (!InputValidate.IsValidSignedNumber(e.KeyChar))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
if (!InputValidate.IsValidHexNumber(e.KeyChar))
|
||||
{
|
||||
e.Handled = true;
|
||||
|
@ -339,23 +339,23 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
private Watch.TYPE GetDataSize()
|
||||
private Watch_Legacy.TYPE GetDataSize()
|
||||
{
|
||||
if (Byte1Radio.Checked)
|
||||
{
|
||||
return Watch.TYPE.BYTE;
|
||||
return Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
else if (Byte2Radio.Checked)
|
||||
{
|
||||
return Watch.TYPE.WORD;
|
||||
return Watch_Legacy.TYPE.WORD;
|
||||
}
|
||||
else if (Byte4Radio.Checked)
|
||||
{
|
||||
return Watch.TYPE.DWORD;
|
||||
return Watch_Legacy.TYPE.DWORD;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Watch.TYPE.BYTE;
|
||||
return Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ namespace BizHawk.MultiClient
|
|||
bool i;
|
||||
switch (GetDataType())
|
||||
{
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
i = InputValidate.IsValidUnsignedNumber(ValueBox.Text);
|
||||
if (!i)
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
return (int)Int64.Parse(ValueBox.Text); //Note: 64 to be safe
|
||||
}
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
i = InputValidate.IsValidSignedNumber(ValueBox.Text);
|
||||
if (!i)
|
||||
{
|
||||
|
@ -385,7 +385,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
return (int)Int64.Parse(ValueBox.Text);
|
||||
}
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
i = InputValidate.IsValidHexNumber(ValueBox.Text);
|
||||
if (!i)
|
||||
{
|
||||
|
@ -404,15 +404,15 @@ namespace BizHawk.MultiClient
|
|||
switch (GetDataSize())
|
||||
{
|
||||
default:
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
if (HexRadio.Checked) return 2;
|
||||
else if (UnsignedRadio.Checked) return 3;
|
||||
else return 4;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
if (HexRadio.Checked) return 4;
|
||||
else if (UnsignedRadio.Checked) return 5;
|
||||
else return 6;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
if (HexRadio.Checked) return 8;
|
||||
else if (UnsignedRadio.Checked) return 10;
|
||||
else return 11;
|
|
@ -20,7 +20,7 @@ namespace BizHawk.MultiClient
|
|||
//Multiple undo levels (List<List<string>> UndoLists)
|
||||
|
||||
private string systemID = "NULL";
|
||||
private List<Watch> Searches = new List<Watch>();
|
||||
private List<Watch_Legacy> Searches = new List<Watch_Legacy>();
|
||||
private HistoryCollection SearchHistory = new HistoryCollection(enabled:true);
|
||||
private bool IsAWeededList = false; //For deciding whether the weeded list is relevant (0 size could mean all were removed in a legit preview
|
||||
private readonly List<ToolStripMenuItem> domainMenuItems = new List<ToolStripMenuItem>();
|
||||
|
@ -337,43 +337,43 @@ namespace BizHawk.MultiClient
|
|||
StartNewSearch();
|
||||
}
|
||||
|
||||
private Watch.DISPTYPE GetDataType()
|
||||
private Watch_Legacy.DISPTYPE GetDataType()
|
||||
{
|
||||
if (unsignedToolStripMenuItem.Checked)
|
||||
{
|
||||
return Watch.DISPTYPE.UNSIGNED;
|
||||
return Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
}
|
||||
else if (signedToolStripMenuItem.Checked)
|
||||
{
|
||||
return Watch.DISPTYPE.SIGNED;
|
||||
return Watch_Legacy.DISPTYPE.SIGNED;
|
||||
}
|
||||
else if (hexadecimalToolStripMenuItem.Checked)
|
||||
{
|
||||
return Watch.DISPTYPE.HEX;
|
||||
return Watch_Legacy.DISPTYPE.HEX;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Watch.DISPTYPE.UNSIGNED; //Just in case
|
||||
return Watch_Legacy.DISPTYPE.UNSIGNED; //Just in case
|
||||
}
|
||||
}
|
||||
|
||||
private Watch.TYPE GetDataSize()
|
||||
private Watch_Legacy.TYPE GetDataSize()
|
||||
{
|
||||
if (byteToolStripMenuItem.Checked)
|
||||
{
|
||||
return Watch.TYPE.BYTE;
|
||||
return Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
else if (bytesToolStripMenuItem.Checked)
|
||||
{
|
||||
return Watch.TYPE.WORD;
|
||||
return Watch_Legacy.TYPE.WORD;
|
||||
}
|
||||
else if (dWordToolStripMenuItem1.Checked)
|
||||
{
|
||||
return Watch.TYPE.DWORD;
|
||||
return Watch_Legacy.TYPE.DWORD;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Watch.TYPE.BYTE;
|
||||
return Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,10 +408,10 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (GetDataSize())
|
||||
{
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
divisor = 2;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
divisor = 4;
|
||||
break;
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
for (int x = 0; x <= ((Domain.Size / divisor) - 1); x++)
|
||||
{
|
||||
Searches.Add(new Watch());
|
||||
Searches.Add(new Watch_Legacy());
|
||||
Searches[x].Address = count;
|
||||
Searches[x].Type = GetDataSize();
|
||||
Searches[x].BigEndian = GetBigEndian();
|
||||
|
@ -437,13 +437,13 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (GetDataSize())
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
count++;
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
count += 2;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
count += 4;
|
||||
break;
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void ClearChangeCounts()
|
||||
{
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
t.Changecount = 0;
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) < Searches[x].SignedVal(previous))
|
||||
{
|
||||
|
@ -847,7 +847,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) > Searches[x].SignedVal(previous))
|
||||
{
|
||||
|
@ -875,7 +875,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) <= Searches[x].SignedVal(previous))
|
||||
{
|
||||
|
@ -903,7 +903,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) >= Searches[x].SignedVal(previous))
|
||||
{
|
||||
|
@ -931,7 +931,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) == Searches[x].SignedVal(previous))
|
||||
{
|
||||
|
@ -959,7 +959,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) != Searches[x].SignedVal(previous))
|
||||
{
|
||||
|
@ -989,7 +989,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < Searches.Count; x++)
|
||||
{
|
||||
int previous = GetPreviousValue(x);
|
||||
if (Searches[x].Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (Searches[x].Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (Searches[x].SignedVal(Searches[x].Value) == Searches[x].SignedVal(previous) + diff || Searches[x].SignedVal(Searches[x].Value) == Searches[x].SignedVal(previous) - diff)
|
||||
{
|
||||
|
@ -1036,9 +1036,9 @@ namespace BizHawk.MultiClient
|
|||
switch (GetOperator())
|
||||
{
|
||||
case SOperator.LESS:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) < t.SignedVal((int)value))
|
||||
{
|
||||
|
@ -1063,9 +1063,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.GREATER:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) > t.SignedVal((int)value))
|
||||
{
|
||||
|
@ -1090,9 +1090,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.LESSEQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) <= t.SignedVal((int)value))
|
||||
{
|
||||
|
@ -1117,9 +1117,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.GREATEREQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) >= t.SignedVal((int)value))
|
||||
{
|
||||
|
@ -1144,9 +1144,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.EQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) == t.SignedVal((int)value))
|
||||
{
|
||||
|
@ -1172,9 +1172,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.NOTEQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) != t.SignedVal((int)value))
|
||||
{
|
||||
|
@ -1201,9 +1201,9 @@ namespace BizHawk.MultiClient
|
|||
case SOperator.DIFFBY:
|
||||
int diff = GetDifferentBy();
|
||||
if (diff < 0) return false;
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Signed == Watch.DISPTYPE.SIGNED)
|
||||
if (t.Signed == Watch_Legacy.DISPTYPE.SIGNED)
|
||||
{
|
||||
if (t.SignedVal(t.Value) == t.SignedVal((int)value) + diff || t.SignedVal(t.Value) == t.SignedVal((int)value) - diff)
|
||||
{
|
||||
|
@ -1237,27 +1237,27 @@ namespace BizHawk.MultiClient
|
|||
bool i;
|
||||
switch (GetDataType())
|
||||
{
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
i = InputValidate.IsValidUnsignedNumber(SpecificValueBox.Text);
|
||||
if (!i)
|
||||
return null;
|
||||
return (int)Int64.Parse(SpecificValueBox.Text); //Note: 64 to be safe since 4 byte values can be entered
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
i = InputValidate.IsValidSignedNumber(SpecificValueBox.Text);
|
||||
if (!i)
|
||||
return null;
|
||||
int value = (int)Int64.Parse(SpecificValueBox.Text);
|
||||
switch (GetDataSize())
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
return (byte)value;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
return (ushort)value;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
return (int)(uint)value;
|
||||
}
|
||||
return value;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
i = InputValidate.IsValidHexNumber(SpecificValueBox.Text);
|
||||
if (!i)
|
||||
return null;
|
||||
|
@ -1303,7 +1303,7 @@ namespace BizHawk.MultiClient
|
|||
switch (GetOperator())
|
||||
{
|
||||
case SOperator.LESS:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address < address)
|
||||
{
|
||||
|
@ -1316,7 +1316,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.GREATER:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address > address)
|
||||
{
|
||||
|
@ -1329,7 +1329,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.LESSEQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address <= address)
|
||||
{
|
||||
|
@ -1342,7 +1342,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.GREATEREQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address >= address)
|
||||
{
|
||||
|
@ -1355,7 +1355,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.EQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address == address)
|
||||
{
|
||||
|
@ -1368,7 +1368,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.NOTEQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address != address)
|
||||
{
|
||||
|
@ -1384,7 +1384,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
int diff = GetDifferentBy();
|
||||
if (diff < 0) return false;
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address == address + diff || t.Address == address - diff)
|
||||
{
|
||||
|
@ -1423,7 +1423,7 @@ namespace BizHawk.MultiClient
|
|||
switch (GetOperator())
|
||||
{
|
||||
case SOperator.LESS:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Changecount < changes)
|
||||
{
|
||||
|
@ -1436,7 +1436,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.GREATER:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Changecount > changes)
|
||||
{
|
||||
|
@ -1449,7 +1449,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.LESSEQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Changecount <= changes)
|
||||
{
|
||||
|
@ -1462,7 +1462,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.GREATEREQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Changecount >= changes)
|
||||
{
|
||||
|
@ -1475,7 +1475,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.EQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Changecount == changes)
|
||||
{
|
||||
|
@ -1488,7 +1488,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case SOperator.NOTEQUAL:
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Changecount != changes)
|
||||
{
|
||||
|
@ -1503,7 +1503,7 @@ namespace BizHawk.MultiClient
|
|||
case SOperator.DIFFBY:
|
||||
int diff = GetDifferentBy();
|
||||
if (diff < 0) return false;
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
if (t.Address == changes + diff || t.Address == changes - diff)
|
||||
{
|
||||
|
@ -1519,16 +1519,16 @@ namespace BizHawk.MultiClient
|
|||
return true;
|
||||
}
|
||||
|
||||
private void ConvertListsDataType(Watch.DISPTYPE s)
|
||||
private void ConvertListsDataType(Watch_Legacy.DISPTYPE s)
|
||||
{
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
t.Signed = s;
|
||||
}
|
||||
|
||||
foreach (List<Watch> state in SearchHistory.History)
|
||||
foreach (List<Watch_Legacy> state in SearchHistory.History)
|
||||
{
|
||||
foreach (Watch watch in state)
|
||||
foreach (Watch_Legacy watch in state)
|
||||
{
|
||||
watch.Signed = s;
|
||||
}
|
||||
|
@ -1540,7 +1540,7 @@ namespace BizHawk.MultiClient
|
|||
DisplaySearchList();
|
||||
}
|
||||
|
||||
private void ConvertListsDataSize(Watch.TYPE s, bool bigendian)
|
||||
private void ConvertListsDataSize(Watch_Legacy.TYPE s, bool bigendian)
|
||||
{
|
||||
ConvertDataSize(s, ref Searches);
|
||||
|
||||
|
@ -1556,23 +1556,23 @@ namespace BizHawk.MultiClient
|
|||
DisplaySearchList();
|
||||
}
|
||||
|
||||
private void ConvertDataSize(Watch.TYPE s, ref List<Watch> list)
|
||||
private void ConvertDataSize(Watch_Legacy.TYPE s, ref List<Watch_Legacy> list)
|
||||
{
|
||||
List<Watch> converted = new List<Watch>();
|
||||
List<Watch_Legacy> converted = new List<Watch_Legacy>();
|
||||
int divisor = 1;
|
||||
if (!includeMisalignedToolStripMenuItem.Checked)
|
||||
{
|
||||
switch (s)
|
||||
{
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
divisor = 2;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
divisor = 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (Watch t in list)
|
||||
foreach (Watch_Legacy t in list)
|
||||
if (t.Address % divisor == 0)
|
||||
{
|
||||
int changes = t.Changecount;
|
||||
|
@ -1591,50 +1591,50 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void unsignedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Watch specificValue = new Watch();
|
||||
Watch_Legacy specificValue = new Watch_Legacy();
|
||||
int? value = GetSpecificValue();
|
||||
ValidateSpecificValue(value);
|
||||
if (value != null) specificValue.Value = (int)value;
|
||||
specificValue.Signed = Watch.DISPTYPE.UNSIGNED;
|
||||
specificValue.Signed = Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
specificValue.Type = GetDataSize();
|
||||
string converted = specificValue.ValueString;
|
||||
unsignedToolStripMenuItem.Checked = true;
|
||||
signedToolStripMenuItem.Checked = false;
|
||||
hexadecimalToolStripMenuItem.Checked = false;
|
||||
SpecificValueBox.Text = converted;
|
||||
ConvertListsDataType(Watch.DISPTYPE.UNSIGNED);
|
||||
ConvertListsDataType(Watch_Legacy.DISPTYPE.UNSIGNED);
|
||||
}
|
||||
|
||||
private void signedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Watch specificValue = new Watch();
|
||||
Watch_Legacy specificValue = new Watch_Legacy();
|
||||
int? value = GetSpecificValue();
|
||||
ValidateSpecificValue(value);
|
||||
if (value != null) specificValue.Value = (int)value;
|
||||
specificValue.Signed = Watch.DISPTYPE.SIGNED;
|
||||
specificValue.Signed = Watch_Legacy.DISPTYPE.SIGNED;
|
||||
specificValue.Type = GetDataSize();
|
||||
string converted = specificValue.ValueString;
|
||||
unsignedToolStripMenuItem.Checked = false;
|
||||
signedToolStripMenuItem.Checked = true;
|
||||
hexadecimalToolStripMenuItem.Checked = false;
|
||||
SpecificValueBox.Text = converted;
|
||||
ConvertListsDataType(Watch.DISPTYPE.SIGNED);
|
||||
ConvertListsDataType(Watch_Legacy.DISPTYPE.SIGNED);
|
||||
}
|
||||
|
||||
private void hexadecimalToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Watch specificValue = new Watch();
|
||||
Watch_Legacy specificValue = new Watch_Legacy();
|
||||
int? value = GetSpecificValue();
|
||||
ValidateSpecificValue(value);
|
||||
if (value != null) specificValue.Value = (int)value;
|
||||
specificValue.Signed = Watch.DISPTYPE.HEX;
|
||||
specificValue.Signed = Watch_Legacy.DISPTYPE.HEX;
|
||||
specificValue.Type = GetDataSize();
|
||||
string converted = specificValue.ValueString;
|
||||
unsignedToolStripMenuItem.Checked = false;
|
||||
signedToolStripMenuItem.Checked = false;
|
||||
hexadecimalToolStripMenuItem.Checked = true;
|
||||
SpecificValueBox.Text = converted;
|
||||
ConvertListsDataType(Watch.DISPTYPE.HEX);
|
||||
ConvertListsDataType(Watch_Legacy.DISPTYPE.HEX);
|
||||
}
|
||||
|
||||
private void SearchListView_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
|
@ -1650,16 +1650,16 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (GetDataType())
|
||||
{
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
switch (GetDataSize())
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
SpecificValueBox.MaxLength = 3;
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
SpecificValueBox.MaxLength = 5;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
SpecificValueBox.MaxLength = 10;
|
||||
break;
|
||||
default:
|
||||
|
@ -1667,16 +1667,16 @@ namespace BizHawk.MultiClient
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
switch (GetDataSize())
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
SpecificValueBox.MaxLength = 4;
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
SpecificValueBox.MaxLength = 6;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
SpecificValueBox.MaxLength = 11;
|
||||
break;
|
||||
default:
|
||||
|
@ -1684,16 +1684,16 @@ namespace BizHawk.MultiClient
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
switch (GetDataSize())
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
SpecificValueBox.MaxLength = 2;
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
SpecificValueBox.MaxLength = 4;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
SpecificValueBox.MaxLength = 8;
|
||||
break;
|
||||
default:
|
||||
|
@ -1712,7 +1712,7 @@ namespace BizHawk.MultiClient
|
|||
byteToolStripMenuItem.Checked = true;
|
||||
bytesToolStripMenuItem.Checked = false;
|
||||
dWordToolStripMenuItem1.Checked = false;
|
||||
ConvertListsDataSize(Watch.TYPE.BYTE, GetBigEndian());
|
||||
ConvertListsDataSize(Watch_Legacy.TYPE.BYTE, GetBigEndian());
|
||||
}
|
||||
|
||||
private void bytesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1720,7 +1720,7 @@ namespace BizHawk.MultiClient
|
|||
byteToolStripMenuItem.Checked = false;
|
||||
bytesToolStripMenuItem.Checked = true;
|
||||
dWordToolStripMenuItem1.Checked = false;
|
||||
ConvertListsDataSize(Watch.TYPE.WORD, GetBigEndian());
|
||||
ConvertListsDataSize(Watch_Legacy.TYPE.WORD, GetBigEndian());
|
||||
}
|
||||
|
||||
private void dWordToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
|
@ -1728,7 +1728,7 @@ namespace BizHawk.MultiClient
|
|||
byteToolStripMenuItem.Checked = false;
|
||||
bytesToolStripMenuItem.Checked = false;
|
||||
dWordToolStripMenuItem1.Checked = true;
|
||||
ConvertListsDataSize(Watch.TYPE.DWORD, GetBigEndian());
|
||||
ConvertListsDataSize(Watch_Legacy.TYPE.DWORD, GetBigEndian());
|
||||
}
|
||||
|
||||
private void includeMisalignedToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
|
@ -1831,7 +1831,7 @@ namespace BizHawk.MultiClient
|
|||
DisplaySearchList();
|
||||
}
|
||||
|
||||
bool LoadSearchFile(string path, bool append, List<Watch> list)
|
||||
bool LoadSearchFile(string path, bool append, List<Watch_Legacy> list)
|
||||
{
|
||||
string domain;
|
||||
bool result = WatchCommon.LoadWatchFile(path, append, list, out domain);
|
||||
|
@ -2047,19 +2047,19 @@ namespace BizHawk.MultiClient
|
|||
|
||||
switch (GetDataType())
|
||||
{
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
if (!InputValidate.IsValidUnsignedNumber(e.KeyChar))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
if (!InputValidate.IsValidSignedNumber(e.KeyChar))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
if (!InputValidate.IsValidHexNumber(e.KeyChar))
|
||||
{
|
||||
e.Handled = true;
|
||||
|
@ -2120,7 +2120,7 @@ namespace BizHawk.MultiClient
|
|||
var file = GetFileFromUser();
|
||||
if (file != null)
|
||||
{
|
||||
List<Watch> temp = new List<Watch>();
|
||||
List<Watch_Legacy> temp = new List<Watch_Legacy>();
|
||||
LoadSearchFile(file.FullName, false, temp);
|
||||
TruncateList(temp);
|
||||
DoTruncate();
|
||||
|
@ -2130,17 +2130,17 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void ClearWeeded()
|
||||
{
|
||||
foreach (Watch watch in Searches)
|
||||
foreach (Watch_Legacy watch in Searches)
|
||||
{
|
||||
watch.Deleted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void TruncateList(IEnumerable<Watch> toRemove)
|
||||
private void TruncateList(IEnumerable<Watch_Legacy> toRemove)
|
||||
{
|
||||
ClearWeeded();
|
||||
foreach (Watch watch in toRemove)
|
||||
foreach (Watch_Legacy watch in toRemove)
|
||||
{
|
||||
var first_or_default = Searches.FirstOrDefault(x => x.Address == watch.Address);
|
||||
if (first_or_default != null)
|
||||
|
@ -2181,7 +2181,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void CopyValueToPrev()
|
||||
{
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
t.LastSearch = t.Value;
|
||||
t.Original = t.Value;
|
||||
|
@ -2194,7 +2194,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void UpdateLastSearch()
|
||||
{
|
||||
foreach (Watch t in Searches)
|
||||
foreach (Watch_Legacy t in Searches)
|
||||
{
|
||||
t.LastSearch = t.Value;
|
||||
}
|
||||
|
@ -2247,14 +2247,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Searches[indexes[i]].Type)
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Global.CheatList.Remove(Domain, Searches[indexes[i]].Address);
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
Global.CheatList.Remove(Domain, Searches[indexes[i]].Address);
|
||||
Global.CheatList.Remove(Domain, Searches[indexes[i]].Address + 1);
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
Global.CheatList.Remove(Domain, Searches[indexes[i]].Address);
|
||||
Global.CheatList.Remove(Domain, Searches[indexes[i]].Address + 1);
|
||||
Global.CheatList.Remove(Domain, Searches[indexes[i]].Address + 2);
|
||||
|
@ -2279,12 +2279,12 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Searches[indexes[i]].Type)
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Cheat c = new Cheat("", Searches[indexes[i]].Address, (byte)Searches[indexes[i]].Value,
|
||||
true, Domain);
|
||||
Global.MainForm.Cheats1.AddCheat(c);
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
{
|
||||
byte low = (byte)(Searches[indexes[i]].Value / 256);
|
||||
byte high = (byte)(Searches[indexes[i]].Value);
|
||||
|
@ -2306,7 +2306,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
{
|
||||
byte HIWORDhigh = (byte)(Searches[indexes[i]].Value / 0x1000000);
|
||||
byte HIWORDlow = (byte)(Searches[indexes[i]].Value / 0x10000);
|
||||
|
@ -2561,7 +2561,7 @@ namespace BizHawk.MultiClient
|
|||
string columnName = SearchListView.Columns[columnToOrder].Text;
|
||||
if (sortedCol.CompareTo(columnName) != 0)
|
||||
sortReverse = false;
|
||||
Searches.Sort((x, y) => x.CompareTo(y, columnName, (Watch.PREVDEF)Global.Config.RamSearchPreviousAs) * (sortReverse ? -1 : 1));
|
||||
Searches.Sort((x, y) => x.CompareTo(y, columnName, (Watch_Legacy.PREVDEF)Global.Config.RamSearchPreviousAs) * (sortReverse ? -1 : 1));
|
||||
sortedCol = columnName;
|
||||
sortReverse = !(sortReverse);
|
||||
SearchListView.Refresh();
|
|
@ -26,7 +26,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private string systemID = "NULL";
|
||||
private MemoryDomain Domain = new MemoryDomain("NULL", 1, Endian.Little, addr => 0, (a, v) => { });
|
||||
private readonly List<Watch> Watches = new List<Watch>();
|
||||
private readonly List<Watch_Legacy> Watches = new List<Watch_Legacy>();
|
||||
private string currentFile = "";
|
||||
private bool changes = false;
|
||||
private readonly List<ToolStripMenuItem> domainMenuItems = new List<ToolStripMenuItem>();
|
||||
|
@ -52,9 +52,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public List<Watch> GetRamWatchList()
|
||||
public List<Watch_Legacy> GetRamWatchList()
|
||||
{
|
||||
return Watches.Select(t => new Watch(t)).ToList();
|
||||
return Watches.Select(t => new Watch_Legacy(t)).ToList();
|
||||
}
|
||||
|
||||
public void DisplayWatchList()
|
||||
|
@ -69,7 +69,7 @@ namespace BizHawk.MultiClient
|
|||
return;
|
||||
}
|
||||
|
||||
foreach (Watch t in Watches)
|
||||
foreach (Watch_Legacy t in Watches)
|
||||
{
|
||||
t.PeekAddress();
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ namespace BizHawk.MultiClient
|
|||
WatchListView.BlazingFast = false;
|
||||
}
|
||||
|
||||
public void AddWatch(Watch w)
|
||||
public void AddWatch(Watch_Legacy w)
|
||||
{
|
||||
Watches.Add(w);
|
||||
Changes();
|
||||
|
@ -195,7 +195,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (column == 0)
|
||||
{
|
||||
if (Watches[index].Type == Watch.TYPE.SEPARATOR)
|
||||
if (Watches[index].Type == Watch_Legacy.TYPE.SEPARATOR)
|
||||
{
|
||||
color = BackColor;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
text = "";
|
||||
|
||||
if (Watches[index].Type == Watch.TYPE.SEPARATOR || index >= Watches.Count)
|
||||
if (Watches[index].Type == Watch_Legacy.TYPE.SEPARATOR || index >= Watches.Count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void UpdateWatchCount()
|
||||
{
|
||||
int count = Watches.Count(w => w.Type != Watch.TYPE.SEPARATOR);
|
||||
int count = Watches.Count(w => w.Type != Watch_Legacy.TYPE.SEPARATOR);
|
||||
|
||||
WatchCountLabel.Text = count.ToString() + (count == 1 ? " watch" : " watches");
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (result)
|
||||
{
|
||||
foreach (Watch w in Watches)
|
||||
foreach (Watch_Legacy w in Watches)
|
||||
{
|
||||
InitializeAddress(w);
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ namespace BizHawk.MultiClient
|
|||
private void AddNewWatch()
|
||||
{
|
||||
RamWatchNewWatch r = new RamWatchNewWatch {location = GetPromptPoint()};
|
||||
Watch w = new Watch {Domain = Domain};
|
||||
Watch_Legacy w = new Watch_Legacy {Domain = Domain};
|
||||
r.SetWatch(w);
|
||||
Global.Sound.StopSound();
|
||||
r.ShowDialog();
|
||||
|
@ -390,7 +390,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
private void InitializeAddress(Watch w)
|
||||
private void InitializeAddress(Watch_Legacy w)
|
||||
{
|
||||
w.PeekAddress();
|
||||
w.Prev = w.Value;
|
||||
|
@ -485,7 +485,7 @@ namespace BizHawk.MultiClient
|
|||
if (indexes.Count == 0) return;
|
||||
foreach (int index in indexes)
|
||||
{
|
||||
Watch temp = Watches[index];
|
||||
Watch_Legacy temp = Watches[index];
|
||||
Watches.Remove(Watches[index]);
|
||||
Watches.Insert(index - 1, temp);
|
||||
|
||||
|
@ -514,7 +514,7 @@ namespace BizHawk.MultiClient
|
|||
if (indexes.Count == 0) return;
|
||||
foreach (int index in indexes)
|
||||
{
|
||||
Watch temp = Watches[index];
|
||||
Watch_Legacy temp = Watches[index];
|
||||
|
||||
if (index < Watches.Count - 1)
|
||||
{
|
||||
|
@ -787,7 +787,7 @@ namespace BizHawk.MultiClient
|
|||
private void InsertSeparator()
|
||||
{
|
||||
Changes();
|
||||
Watch w = new Watch {Type = Watch.TYPE.SEPARATOR};
|
||||
Watch_Legacy w = new Watch_Legacy {Type = Watch_Legacy.TYPE.SEPARATOR};
|
||||
|
||||
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
|
||||
if (indexes.Count > 0)
|
||||
|
@ -1065,7 +1065,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void ClearChangeCounts()
|
||||
{
|
||||
foreach (Watch t in Watches)
|
||||
foreach (Watch_Legacy t in Watches)
|
||||
{
|
||||
t.Changecount = 0;
|
||||
}
|
||||
|
@ -1196,12 +1196,12 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Watches[indexes[i]].Type)
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Cheat c = new Cheat("", Watches[indexes[i]].Address, (byte)Watches[indexes[i]].Value,
|
||||
true, Domain);
|
||||
Global.MainForm.Cheats1.AddCheat(c);
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
{
|
||||
byte low = (byte)(Watches[indexes[i]].Value / 256);
|
||||
byte high = (byte)(Watches[indexes[i]].Value);
|
||||
|
@ -1223,7 +1223,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
{
|
||||
byte HIWORDhigh = (byte)(Watches[indexes[i]].Value >> 24);
|
||||
byte HIWORDlow = (byte)(Watches[indexes[i]].Value >> 16);
|
||||
|
@ -1275,14 +1275,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Watches[indexes[i]].Type)
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Global.CheatList.Remove(Domain, Watches[indexes[i]].Address);
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
Global.CheatList.Remove(Domain, Watches[indexes[i]].Address);
|
||||
Global.CheatList.Remove(Domain, Watches[indexes[i]].Address + 1);
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
Global.CheatList.Remove(Domain, Watches[indexes[i]].Address);
|
||||
Global.CheatList.Remove(Domain, Watches[indexes[i]].Address + 1);
|
||||
Global.CheatList.Remove(Domain, Watches[indexes[i]].Address + 2);
|
||||
|
@ -1494,7 +1494,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
sortReverse = false;
|
||||
}
|
||||
Watches.Sort((x, y) => x.CompareTo(y, columnName, Global.Config.RamWatchPrev_Type == 1 ? Watch.PREVDEF.LASTFRAME : Watch.PREVDEF.LASTCHANGE) * (sortReverse ? -1 : 1));
|
||||
Watches.Sort((x, y) => x.CompareTo(y, columnName, Global.Config.RamWatchPrev_Type == 1 ? Watch_Legacy.PREVDEF.LASTFRAME : Watch_Legacy.PREVDEF.LASTCHANGE) * (sortReverse ? -1 : 1));
|
||||
sortedCol = columnName;
|
||||
sortReverse = !(sortReverse);
|
||||
WatchListView.Refresh();
|
|
@ -7,7 +7,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
public partial class RamWatchNewWatch : Form
|
||||
{
|
||||
public Watch Watch = new Watch();
|
||||
public Watch_Legacy Watch = new Watch_Legacy();
|
||||
public bool SelectionWasMade = false;
|
||||
public Point location = new Point();
|
||||
|
||||
|
@ -18,10 +18,10 @@ namespace BizHawk.MultiClient
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetWatch(Watch watch, string message = "New Watch")
|
||||
public void SetWatch(Watch_Legacy watch, string message = "New Watch")
|
||||
{
|
||||
DoNotResetAddress = true; //Hack for the drop down event changing when initializing the drop down
|
||||
Watch = new Watch(watch);
|
||||
Watch = new Watch_Legacy(watch);
|
||||
Text = message;
|
||||
|
||||
NotesBox.Text = watch.Notes;
|
||||
|
@ -70,28 +70,28 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (SignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch.DISPTYPE.SIGNED;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.SIGNED;
|
||||
}
|
||||
else if (UnsignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch.DISPTYPE.UNSIGNED;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
}
|
||||
else if (HexRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch.DISPTYPE.HEX;
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.HEX;
|
||||
}
|
||||
|
||||
if (Byte1Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch.TYPE.BYTE;
|
||||
Watch.Type = Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
else if (Byte2Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch.TYPE.WORD;
|
||||
Watch.Type = Watch_Legacy.TYPE.WORD;
|
||||
}
|
||||
else if (Byte4Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch.TYPE.DWORD;
|
||||
Watch.Type = Watch_Legacy.TYPE.DWORD;
|
||||
}
|
||||
|
||||
if (BigEndianRadio.Checked)
|
||||
|
@ -153,13 +153,13 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Watch.Type)
|
||||
{
|
||||
case Watch.TYPE.BYTE:
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Byte1Radio.Checked = true;
|
||||
break;
|
||||
case Watch.TYPE.WORD:
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
Byte2Radio.Checked = true;
|
||||
break;
|
||||
case Watch.TYPE.DWORD:
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
Byte4Radio.Checked = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -223,13 +223,13 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (Watch.Signed)
|
||||
{
|
||||
case Watch.DISPTYPE.SIGNED:
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
SignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch.DISPTYPE.UNSIGNED:
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
UnsignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch.DISPTYPE.HEX:
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
HexRadio.Checked = true;
|
||||
break;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,7 @@ namespace BizHawk.MultiClient
|
|||
return file;
|
||||
}
|
||||
|
||||
public static bool SaveWchFile(string path, string domain_name, List<Watch> watchList)
|
||||
public static bool SaveWchFile(string path, string domain_name, List<Watch_Legacy> watchList)
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(path))
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ namespace BizHawk.MultiClient
|
|||
str.Append(Global.Emulator.SystemId);
|
||||
str.Append('\n');
|
||||
|
||||
foreach (Watch t in watchList)
|
||||
foreach (Watch_Legacy t in watchList)
|
||||
{
|
||||
str.Append(string.Format("{0:X4}", t.Address));
|
||||
str.Append('\t');
|
||||
|
@ -67,7 +67,7 @@ namespace BizHawk.MultiClient
|
|||
return true;
|
||||
}
|
||||
|
||||
public static bool LoadWatchFile(string path, bool append, List<Watch> watchList, out string domain)
|
||||
public static bool LoadWatchFile(string path, bool append, List<Watch_Legacy> watchList, out string domain)
|
||||
{
|
||||
domain = "";
|
||||
var file = new FileInfo(path);
|
||||
|
@ -125,7 +125,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
continue; //If not 4, something is wrong with this line, ignore it
|
||||
}
|
||||
Watch w = new Watch();
|
||||
Watch_Legacy w = new Watch_Legacy();
|
||||
|
||||
string temp = s.Substring(0, s.IndexOf('\t'));
|
||||
try
|
|
@ -0,0 +1,311 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class WatchEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.AddressBox = new BizHawk.HexTextBox();
|
||||
this.NotesBox = new System.Windows.Forms.TextBox();
|
||||
this.DataTypeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.HexRadio = new System.Windows.Forms.RadioButton();
|
||||
this.UnsignedRadio = new System.Windows.Forms.RadioButton();
|
||||
this.SignedRadio = new System.Windows.Forms.RadioButton();
|
||||
this.DataSizeBox = new System.Windows.Forms.GroupBox();
|
||||
this.Byte4Radio = new System.Windows.Forms.RadioButton();
|
||||
this.Byte2Radio = new System.Windows.Forms.RadioButton();
|
||||
this.Byte1Radio = new System.Windows.Forms.RadioButton();
|
||||
this.EndianBox = new System.Windows.Forms.GroupBox();
|
||||
this.LittleEndianRadio = new System.Windows.Forms.RadioButton();
|
||||
this.BigEndianRadio = new System.Windows.Forms.RadioButton();
|
||||
this.OK = new System.Windows.Forms.Button();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.DomainComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.DataTypeGroupBox.SuspendLayout();
|
||||
this.DataSizeBox.SuspendLayout();
|
||||
this.EndianBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Address: 0x";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 35);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(38, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Notes:";
|
||||
//
|
||||
// AddressBox
|
||||
//
|
||||
this.AddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.AddressBox.Location = new System.Drawing.Point(69, 6);
|
||||
this.AddressBox.MaxLength = 8;
|
||||
this.AddressBox.Name = "AddressBox";
|
||||
this.AddressBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.AddressBox.TabIndex = 2;
|
||||
this.AddressBox.Text = "00000000";
|
||||
this.AddressBox.Leave += new System.EventHandler(this.AddressBox_Leave);
|
||||
//
|
||||
// NotesBox
|
||||
//
|
||||
this.NotesBox.Location = new System.Drawing.Point(69, 32);
|
||||
this.NotesBox.MaxLength = 256;
|
||||
this.NotesBox.Name = "NotesBox";
|
||||
this.NotesBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.NotesBox.TabIndex = 3;
|
||||
//
|
||||
// DataTypeGroupBox
|
||||
//
|
||||
this.DataTypeGroupBox.Controls.Add(this.HexRadio);
|
||||
this.DataTypeGroupBox.Controls.Add(this.UnsignedRadio);
|
||||
this.DataTypeGroupBox.Controls.Add(this.SignedRadio);
|
||||
this.DataTypeGroupBox.Location = new System.Drawing.Point(12, 67);
|
||||
this.DataTypeGroupBox.Name = "DataTypeGroupBox";
|
||||
this.DataTypeGroupBox.Size = new System.Drawing.Size(95, 79);
|
||||
this.DataTypeGroupBox.TabIndex = 4;
|
||||
this.DataTypeGroupBox.TabStop = false;
|
||||
this.DataTypeGroupBox.Text = "Data Type";
|
||||
//
|
||||
// HexRadio
|
||||
//
|
||||
this.HexRadio.AutoSize = true;
|
||||
this.HexRadio.Location = new System.Drawing.Point(4, 51);
|
||||
this.HexRadio.Name = "HexRadio";
|
||||
this.HexRadio.Size = new System.Drawing.Size(86, 17);
|
||||
this.HexRadio.TabIndex = 2;
|
||||
this.HexRadio.Text = "Hexadecimal";
|
||||
this.HexRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// UnsignedRadio
|
||||
//
|
||||
this.UnsignedRadio.AutoSize = true;
|
||||
this.UnsignedRadio.Checked = true;
|
||||
this.UnsignedRadio.Location = new System.Drawing.Point(4, 34);
|
||||
this.UnsignedRadio.Name = "UnsignedRadio";
|
||||
this.UnsignedRadio.Size = new System.Drawing.Size(70, 17);
|
||||
this.UnsignedRadio.TabIndex = 1;
|
||||
this.UnsignedRadio.TabStop = true;
|
||||
this.UnsignedRadio.Text = "Unsigned";
|
||||
this.UnsignedRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// SignedRadio
|
||||
//
|
||||
this.SignedRadio.AutoSize = true;
|
||||
this.SignedRadio.Location = new System.Drawing.Point(4, 17);
|
||||
this.SignedRadio.Name = "SignedRadio";
|
||||
this.SignedRadio.Size = new System.Drawing.Size(58, 17);
|
||||
this.SignedRadio.TabIndex = 0;
|
||||
this.SignedRadio.Text = "Signed";
|
||||
this.SignedRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DataSizeBox
|
||||
//
|
||||
this.DataSizeBox.Controls.Add(this.Byte4Radio);
|
||||
this.DataSizeBox.Controls.Add(this.Byte2Radio);
|
||||
this.DataSizeBox.Controls.Add(this.Byte1Radio);
|
||||
this.DataSizeBox.Location = new System.Drawing.Point(115, 67);
|
||||
this.DataSizeBox.Name = "DataSizeBox";
|
||||
this.DataSizeBox.Size = new System.Drawing.Size(83, 79);
|
||||
this.DataSizeBox.TabIndex = 5;
|
||||
this.DataSizeBox.TabStop = false;
|
||||
this.DataSizeBox.Text = "Data Size:";
|
||||
//
|
||||
// Byte4Radio
|
||||
//
|
||||
this.Byte4Radio.AutoSize = true;
|
||||
this.Byte4Radio.Location = new System.Drawing.Point(5, 51);
|
||||
this.Byte4Radio.Name = "Byte4Radio";
|
||||
this.Byte4Radio.Size = new System.Drawing.Size(60, 17);
|
||||
this.Byte4Radio.TabIndex = 2;
|
||||
this.Byte4Radio.Text = "4 Bytes";
|
||||
this.Byte4Radio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Byte2Radio
|
||||
//
|
||||
this.Byte2Radio.AutoSize = true;
|
||||
this.Byte2Radio.Location = new System.Drawing.Point(5, 34);
|
||||
this.Byte2Radio.Name = "Byte2Radio";
|
||||
this.Byte2Radio.Size = new System.Drawing.Size(60, 17);
|
||||
this.Byte2Radio.TabIndex = 1;
|
||||
this.Byte2Radio.Text = "2 Bytes";
|
||||
this.Byte2Radio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Byte1Radio
|
||||
//
|
||||
this.Byte1Radio.AutoSize = true;
|
||||
this.Byte1Radio.Checked = true;
|
||||
this.Byte1Radio.Location = new System.Drawing.Point(5, 17);
|
||||
this.Byte1Radio.Name = "Byte1Radio";
|
||||
this.Byte1Radio.Size = new System.Drawing.Size(55, 17);
|
||||
this.Byte1Radio.TabIndex = 0;
|
||||
this.Byte1Radio.TabStop = true;
|
||||
this.Byte1Radio.Text = "1 Byte";
|
||||
this.Byte1Radio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EndianBox
|
||||
//
|
||||
this.EndianBox.Controls.Add(this.LittleEndianRadio);
|
||||
this.EndianBox.Controls.Add(this.BigEndianRadio);
|
||||
this.EndianBox.Location = new System.Drawing.Point(12, 152);
|
||||
this.EndianBox.Name = "EndianBox";
|
||||
this.EndianBox.Size = new System.Drawing.Size(117, 55);
|
||||
this.EndianBox.TabIndex = 6;
|
||||
this.EndianBox.TabStop = false;
|
||||
this.EndianBox.Text = "Endian";
|
||||
//
|
||||
// LittleEndianRadio
|
||||
//
|
||||
this.LittleEndianRadio.AutoSize = true;
|
||||
this.LittleEndianRadio.Location = new System.Drawing.Point(4, 35);
|
||||
this.LittleEndianRadio.Name = "LittleEndianRadio";
|
||||
this.LittleEndianRadio.Size = new System.Drawing.Size(83, 17);
|
||||
this.LittleEndianRadio.TabIndex = 1;
|
||||
this.LittleEndianRadio.Text = "Little Endian";
|
||||
this.LittleEndianRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BigEndianRadio
|
||||
//
|
||||
this.BigEndianRadio.AutoSize = true;
|
||||
this.BigEndianRadio.Checked = true;
|
||||
this.BigEndianRadio.Location = new System.Drawing.Point(4, 18);
|
||||
this.BigEndianRadio.Name = "BigEndianRadio";
|
||||
this.BigEndianRadio.Size = new System.Drawing.Size(76, 17);
|
||||
this.BigEndianRadio.TabIndex = 0;
|
||||
this.BigEndianRadio.TabStop = true;
|
||||
this.BigEndianRadio.Text = "Big Endian";
|
||||
this.BigEndianRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// OK
|
||||
//
|
||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.OK.Location = new System.Drawing.Point(12, 260);
|
||||
this.OK.Name = "OK";
|
||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||
this.OK.TabIndex = 7;
|
||||
this.OK.Text = "Ok";
|
||||
this.OK.UseVisualStyleBackColor = true;
|
||||
this.OK.Click += new System.EventHandler(this.OK_Click);
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Cancel.Location = new System.Drawing.Point(123, 260);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.Cancel.TabIndex = 8;
|
||||
this.Cancel.Text = "Cancel";
|
||||
this.Cancel.UseVisualStyleBackColor = true;
|
||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(11, 214);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(83, 13);
|
||||
this.label6.TabIndex = 15;
|
||||
this.label6.Text = "Memory Domain";
|
||||
//
|
||||
// DomainComboBox
|
||||
//
|
||||
this.DomainComboBox.FormattingEnabled = true;
|
||||
this.DomainComboBox.Location = new System.Drawing.Point(12, 230);
|
||||
this.DomainComboBox.Name = "DomainComboBox";
|
||||
this.DomainComboBox.Size = new System.Drawing.Size(141, 21);
|
||||
this.DomainComboBox.TabIndex = 14;
|
||||
this.DomainComboBox.SelectedIndexChanged += new System.EventHandler(this.DomainComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// WatchEditor
|
||||
//
|
||||
this.AcceptButton = this.OK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(213, 296);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.DomainComboBox);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Controls.Add(this.OK);
|
||||
this.Controls.Add(this.EndianBox);
|
||||
this.Controls.Add(this.DataSizeBox);
|
||||
this.Controls.Add(this.DataTypeGroupBox);
|
||||
this.Controls.Add(this.NotesBox);
|
||||
this.Controls.Add(this.AddressBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "WatchEditor";
|
||||
this.Text = "New Watch";
|
||||
this.Load += new System.EventHandler(this.RamWatchNewWatch_Load);
|
||||
this.DataTypeGroupBox.ResumeLayout(false);
|
||||
this.DataTypeGroupBox.PerformLayout();
|
||||
this.DataSizeBox.ResumeLayout(false);
|
||||
this.DataSizeBox.PerformLayout();
|
||||
this.EndianBox.ResumeLayout(false);
|
||||
this.EndianBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private HexTextBox AddressBox;
|
||||
private System.Windows.Forms.TextBox NotesBox;
|
||||
private System.Windows.Forms.GroupBox DataTypeGroupBox;
|
||||
private System.Windows.Forms.RadioButton SignedRadio;
|
||||
private System.Windows.Forms.RadioButton UnsignedRadio;
|
||||
private System.Windows.Forms.RadioButton HexRadio;
|
||||
private System.Windows.Forms.GroupBox DataSizeBox;
|
||||
private System.Windows.Forms.RadioButton Byte1Radio;
|
||||
private System.Windows.Forms.RadioButton Byte2Radio;
|
||||
private System.Windows.Forms.RadioButton Byte4Radio;
|
||||
private System.Windows.Forms.GroupBox EndianBox;
|
||||
private System.Windows.Forms.RadioButton BigEndianRadio;
|
||||
private System.Windows.Forms.RadioButton LittleEndianRadio;
|
||||
private System.Windows.Forms.Button OK;
|
||||
private System.Windows.Forms.Button Cancel;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.ComboBox DomainComboBox;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,248 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class WatchEditor : Form
|
||||
{
|
||||
public Watch_Legacy Watch = new Watch_Legacy();
|
||||
public bool SelectionWasMade = false;
|
||||
public Point location = new Point();
|
||||
|
||||
private bool DoNotResetAddress;
|
||||
|
||||
public WatchEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetWatch(Watch_Legacy watch, string message = "New Watch")
|
||||
{
|
||||
DoNotResetAddress = true; //Hack for the drop down event changing when initializing the drop down
|
||||
Watch = new Watch_Legacy(watch);
|
||||
Text = message;
|
||||
|
||||
NotesBox.Text = watch.Notes;
|
||||
setTypeRadio();
|
||||
setSignedRadio();
|
||||
setEndianBox();
|
||||
setDomainSelection();
|
||||
setAddressBox();
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
private void RamWatchNewWatch_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (location.X > 0 && location.Y > 0)
|
||||
{
|
||||
Location = location;
|
||||
}
|
||||
|
||||
populateMemoryDomainComboBox();
|
||||
DoNotResetAddress = false;
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectionWasMade = false;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Put user settings in the watch file
|
||||
SelectionWasMade = true;
|
||||
if (InputValidate.IsValidHexNumber(AddressBox.Text))
|
||||
{
|
||||
Watch.Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Not a valid address (enter a valid Hex number)", "Invalid Address", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
AddressBox.Focus();
|
||||
AddressBox.SelectAll();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (SignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.SIGNED;
|
||||
}
|
||||
else if (UnsignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
}
|
||||
else if (HexRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.HEX;
|
||||
}
|
||||
|
||||
if (Byte1Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
else if (Byte2Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch_Legacy.TYPE.WORD;
|
||||
}
|
||||
else if (Byte4Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch_Legacy.TYPE.DWORD;
|
||||
}
|
||||
|
||||
if (BigEndianRadio.Checked)
|
||||
{
|
||||
Watch.BigEndian = true;
|
||||
}
|
||||
else if (LittleEndianRadio.Checked)
|
||||
{
|
||||
Watch.BigEndian = false;
|
||||
}
|
||||
|
||||
Watch.Domain = Global.Emulator.MemoryDomains[DomainComboBox.SelectedIndex];
|
||||
Watch.Notes = NotesBox.Text;
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private void AddressBox_Leave(object sender, EventArgs e)
|
||||
{
|
||||
AddressBox.Text = AddressBox.Text.Replace(" ", "");
|
||||
if (!InputValidate.IsValidHexNumber(AddressBox.Text))
|
||||
{
|
||||
AddressBox.Focus();
|
||||
AddressBox.SelectAll();
|
||||
ToolTip t = new ToolTip();
|
||||
t.Show("Must be a valid hexadecimal vaue", AddressBox, 5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Watch.Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
AddressBox.Text = String.Format("{0:X" + getNumDigits(Watch.Domain.Size - 1) + "}", Watch.Address);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DomainComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!DoNotResetAddress)
|
||||
{
|
||||
Watch.Domain = Global.Emulator.MemoryDomains[DomainComboBox.SelectedIndex];
|
||||
Watch.Address = 0;
|
||||
Watch.Value = 0;
|
||||
setAddressBox();
|
||||
AddressBox.MaxLength = getNumDigits(Watch.Domain.Size);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
private void setTypeRadio()
|
||||
{
|
||||
switch (Watch.Type)
|
||||
{
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Byte1Radio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
Byte2Radio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
Byte4Radio.Checked = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void setEndianBox()
|
||||
{
|
||||
if (Watch.BigEndian == true)
|
||||
{
|
||||
BigEndianRadio.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LittleEndianRadio.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void setDomainSelection()
|
||||
{
|
||||
//Counts should always be the same, but just in case, let's check
|
||||
int max;
|
||||
if (Global.Emulator.MemoryDomains.Count < DomainComboBox.Items.Count)
|
||||
{
|
||||
max = Global.Emulator.MemoryDomains.Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
max = DomainComboBox.Items.Count;
|
||||
}
|
||||
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
if (Watch.Domain.ToString() == DomainComboBox.Items[i].ToString())
|
||||
{
|
||||
DomainComboBox.SelectedIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void populateMemoryDomainComboBox()
|
||||
{
|
||||
DomainComboBox.Items.Clear();
|
||||
if (Global.Emulator.MemoryDomains.Count > 0)
|
||||
{
|
||||
foreach (MemoryDomain t in Global.Emulator.MemoryDomains)
|
||||
{
|
||||
DomainComboBox.Items.Add(t.ToString());
|
||||
}
|
||||
}
|
||||
setDomainSelection();
|
||||
}
|
||||
|
||||
private void setAddressBox()
|
||||
{
|
||||
AddressBox.Text = String.Format("{0:X" + getNumDigits(Watch.Domain.Size - 1) + "}", Watch.Address);
|
||||
}
|
||||
|
||||
private void setSignedRadio()
|
||||
{
|
||||
switch (Watch.Signed)
|
||||
{
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
SignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
UnsignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
HexRadio.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private int getNumDigits(Int32 i)
|
||||
{
|
||||
if (i < 0x10000) return 4;
|
||||
if (i < 0x1000000) return 6;
|
||||
if (i < 0x10000000) return 7;
|
||||
else return 8;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -0,0 +1,895 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
/// An object that represent a ram address and related properties
|
||||
/// </summary>
|
||||
public class Watch_Legacy
|
||||
{
|
||||
public enum TYPE { BYTE, WORD, DWORD, SEPARATOR };
|
||||
public enum DISPTYPE { SIGNED, UNSIGNED, HEX };
|
||||
public enum PREVDEF { LASTSEARCH, ORIGINAL, LASTFRAME, LASTCHANGE };
|
||||
|
||||
#region Constructors
|
||||
|
||||
public Watch_Legacy()
|
||||
{
|
||||
Address = 0;
|
||||
Value = 0;
|
||||
Type = TYPE.BYTE;
|
||||
Signed = DISPTYPE.UNSIGNED;
|
||||
BigEndian = true;
|
||||
Notes = "";
|
||||
Changecount = 0;
|
||||
Prev = 0;
|
||||
Original = 0;
|
||||
LastChange = 0;
|
||||
LastSearch = 0;
|
||||
Deleted = false;
|
||||
Domain = Global.Emulator.MainMemory;
|
||||
}
|
||||
|
||||
public Watch_Legacy(Watch_Legacy w)
|
||||
{
|
||||
Address = w.Address;
|
||||
Value = w.Value;
|
||||
Type = w.Type;
|
||||
Signed = w.Signed;
|
||||
BigEndian = w.BigEndian;
|
||||
Notes = w.Notes;
|
||||
Changecount = w.Changecount;
|
||||
Prev = w.Prev;
|
||||
Original = w.Original;
|
||||
LastChange = w.LastChange;
|
||||
LastSearch = w.LastSearch;
|
||||
Domain = w.Domain;
|
||||
Deleted = w.Deleted;
|
||||
}
|
||||
|
||||
public Watch_Legacy(MemoryDomain _domain, int _address, int _value, TYPE _type, DISPTYPE _disptype, bool _bigendian, string _notes)
|
||||
{
|
||||
Domain = _domain;
|
||||
Address = _address;
|
||||
Value = _value;
|
||||
Type = _type;
|
||||
Signed = _disptype;
|
||||
BigEndian = _bigendian;
|
||||
Notes = _notes;
|
||||
Changecount = 0;
|
||||
Prev = _value;
|
||||
Original = _value;
|
||||
LastChange = _value;
|
||||
LastSearch = _value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Publics
|
||||
|
||||
public MemoryDomain Domain;
|
||||
public int Address;
|
||||
public int Value;
|
||||
public int Prev;
|
||||
public int Original;
|
||||
public int LastChange;
|
||||
public int LastSearch;
|
||||
public TYPE Type;
|
||||
public DISPTYPE Signed;
|
||||
public bool BigEndian;
|
||||
public string Notes;
|
||||
public int Changecount;
|
||||
public bool Deleted;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public int DiffPrev
|
||||
{
|
||||
get { return Value - Prev; }
|
||||
}
|
||||
|
||||
public int DiffOriginal
|
||||
{
|
||||
get { return Value - Original; }
|
||||
}
|
||||
|
||||
public int DiffLastChange
|
||||
{
|
||||
get { return Value - LastChange; }
|
||||
}
|
||||
|
||||
public int DiffLastSearch
|
||||
{
|
||||
get { return Value - LastSearch; }
|
||||
}
|
||||
|
||||
public string ValueString
|
||||
{
|
||||
get { return ValToString(Value); }
|
||||
}
|
||||
|
||||
public string PrevString
|
||||
{
|
||||
get { return ValToString(Prev); }
|
||||
}
|
||||
|
||||
public string OriginalString
|
||||
{
|
||||
get { return ValToString(Original); }
|
||||
}
|
||||
|
||||
public string LastChangeString
|
||||
{
|
||||
get { return ValToString(LastChange); }
|
||||
}
|
||||
|
||||
public string LastSearchString
|
||||
{
|
||||
get { return ValToString(LastSearch); }
|
||||
}
|
||||
|
||||
public string DiffOriginalString
|
||||
{
|
||||
get { return DiffToString(Original); }
|
||||
}
|
||||
|
||||
public string DiffLastSearchString
|
||||
{
|
||||
get { return DiffToString(LastSearch); }
|
||||
}
|
||||
|
||||
public uint UnsignedValue
|
||||
{
|
||||
get { return UnsignedVal(Value); }
|
||||
}
|
||||
|
||||
public int SignedValue
|
||||
{
|
||||
get { return SignedVal(Value); }
|
||||
}
|
||||
|
||||
public char TypeChar
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case TYPE.BYTE:
|
||||
return 'b';
|
||||
case TYPE.WORD:
|
||||
return 'w';
|
||||
case TYPE.DWORD:
|
||||
return 'd';
|
||||
case TYPE.SEPARATOR:
|
||||
return 'S';
|
||||
default:
|
||||
return 'b'; //Just in case
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public char SignedChar
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Signed)
|
||||
{
|
||||
case DISPTYPE.SIGNED:
|
||||
return 's';
|
||||
case DISPTYPE.UNSIGNED:
|
||||
return 'u';
|
||||
case DISPTYPE.HEX:
|
||||
return 'h';
|
||||
default:
|
||||
return 's'; //Just in case
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string DiffPrevString
|
||||
{
|
||||
get { return DiffToString(DiffPrev); }
|
||||
}
|
||||
|
||||
public string DiffLastChangeString
|
||||
{
|
||||
get { return DiffToString(DiffLastChange); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public bool SetTypeByChar(char c) //b = byte, w = word, d = dword
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'b':
|
||||
Type = TYPE.BYTE;
|
||||
return true;
|
||||
case 'w':
|
||||
Type = TYPE.WORD;
|
||||
return true;
|
||||
case 'd':
|
||||
Type = TYPE.DWORD;
|
||||
return true;
|
||||
case 'S':
|
||||
Type = TYPE.SEPARATOR;
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool SetSignedByChar(char c) //s = signed, u = unsigned, h = hex
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 's':
|
||||
Signed = DISPTYPE.SIGNED;
|
||||
return true;
|
||||
case 'u':
|
||||
Signed = DISPTYPE.UNSIGNED;
|
||||
return true;
|
||||
case 'h':
|
||||
Signed = DISPTYPE.HEX;
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void PeekAddress()
|
||||
{
|
||||
if (Type == TYPE.SEPARATOR)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Prev = Value;
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case TYPE.BYTE:
|
||||
Value = Domain.PeekByte(Address);
|
||||
break;
|
||||
case TYPE.WORD:
|
||||
if (BigEndian)
|
||||
{
|
||||
Value = 0;
|
||||
Value |= Domain.PeekByte(Address) << 8;
|
||||
Value |= Domain.PeekByte(Address + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Value = 0;
|
||||
Value |= Domain.PeekByte(Address);
|
||||
Value |= Domain.PeekByte(Address + 1) << 8;
|
||||
}
|
||||
break;
|
||||
case TYPE.DWORD:
|
||||
if (BigEndian)
|
||||
{
|
||||
Value = 0;
|
||||
Value |= Domain.PeekByte(Address) << 24;
|
||||
Value |= Domain.PeekByte(Address + 1) << 16;
|
||||
Value |= Domain.PeekByte(Address + 2) << 8;
|
||||
Value |= Domain.PeekByte(Address + 3) << 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Value = 0;
|
||||
Value |= Domain.PeekByte(Address) << 0;
|
||||
Value |= Domain.PeekByte(Address + 1) << 8;
|
||||
Value |= Domain.PeekByte(Address + 2) << 16;
|
||||
Value |= Domain.PeekByte(Address + 3) << 24;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (Value != Prev)
|
||||
{
|
||||
LastChange = Prev;
|
||||
Changecount++;
|
||||
}
|
||||
}
|
||||
|
||||
public void PokeAddress()
|
||||
{
|
||||
if (Type == TYPE.SEPARATOR)
|
||||
return;
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case TYPE.BYTE:
|
||||
PokeByte();
|
||||
break;
|
||||
case TYPE.WORD:
|
||||
PokeWord();
|
||||
break;
|
||||
case TYPE.DWORD:
|
||||
PokeDWord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public uint UnsignedVal(int val)
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case TYPE.BYTE:
|
||||
return (byte)val;
|
||||
case TYPE.WORD:
|
||||
return (ushort)val;
|
||||
}
|
||||
return (uint)val;
|
||||
}
|
||||
|
||||
public int SignedVal(int val)
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case TYPE.BYTE:
|
||||
return (sbyte)val;
|
||||
case TYPE.WORD:
|
||||
return (short)val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (Type == TYPE.SEPARATOR)
|
||||
{
|
||||
return "----";
|
||||
}
|
||||
|
||||
StringBuilder str = new StringBuilder(Notes);
|
||||
str.Append(": ");
|
||||
str.Append(ValToString(Value));
|
||||
return str.ToString();
|
||||
}
|
||||
|
||||
public void TrySetValue(string value)
|
||||
{
|
||||
switch (Signed)
|
||||
{
|
||||
case DISPTYPE.SIGNED:
|
||||
try
|
||||
{
|
||||
Value = int.Parse(value);
|
||||
}
|
||||
catch { }
|
||||
break;
|
||||
case DISPTYPE.UNSIGNED:
|
||||
try
|
||||
{
|
||||
Value = (int)uint.Parse(value);
|
||||
}
|
||||
catch { }
|
||||
break;
|
||||
case DISPTYPE.HEX:
|
||||
try
|
||||
{
|
||||
Value = int.Parse(value, NumberStyles.HexNumber);
|
||||
}
|
||||
catch { }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
private string ValToString(int val)
|
||||
{
|
||||
if (Type == TYPE.SEPARATOR)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Signed)
|
||||
{
|
||||
default:
|
||||
case DISPTYPE.UNSIGNED:
|
||||
return UnsignedVal(val).ToString();
|
||||
case DISPTYPE.SIGNED:
|
||||
return SignedVal(val).ToString();
|
||||
case DISPTYPE.HEX:
|
||||
switch (Type)
|
||||
{
|
||||
default:
|
||||
case TYPE.BYTE:
|
||||
return String.Format("{0:X2}", val);
|
||||
case TYPE.WORD:
|
||||
return String.Format("{0:X4}", val);
|
||||
case TYPE.DWORD:
|
||||
return String.Format("{0:X8}", val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private string DiffToString(int diff)
|
||||
{
|
||||
string converted = diff.ToString();
|
||||
if (diff >= 0)
|
||||
converted = "+" + converted;
|
||||
return converted;
|
||||
}
|
||||
|
||||
private void PokeByte()
|
||||
{
|
||||
Domain.PokeByte(Address, (byte)Value);
|
||||
}
|
||||
|
||||
private void PokeWord()
|
||||
{
|
||||
if (BigEndian)
|
||||
{
|
||||
Domain.PokeByte(Address + 0, (byte)(Value >> 8));
|
||||
Domain.PokeByte(Address + 1, (byte)(Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
Domain.PokeByte(Address + 0, (byte)(Value));
|
||||
Domain.PokeByte(Address + 1, (byte)(Value >> 8));
|
||||
}
|
||||
}
|
||||
|
||||
private void PokeDWord()
|
||||
{
|
||||
if (BigEndian)
|
||||
{
|
||||
Domain.PokeByte(Address + 0, (byte)(Value >> 24));
|
||||
Domain.PokeByte(Address + 1, (byte)(Value >> 16));
|
||||
Domain.PokeByte(Address + 2, (byte)(Value >> 8));
|
||||
Domain.PokeByte(Address + 3, (byte)(Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
Domain.PokeByte(Address + 0, (byte)(Value));
|
||||
Domain.PokeByte(Address + 1, (byte)(Value >> 8));
|
||||
Domain.PokeByte(Address + 2, (byte)(Value >> 16));
|
||||
Domain.PokeByte(Address + 3, (byte)(Value >> 24));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Compare Methods
|
||||
|
||||
private int ComparePrevious(Watch_Legacy Other, PREVDEF previous)
|
||||
{
|
||||
switch (previous)
|
||||
{
|
||||
case PREVDEF.LASTSEARCH:
|
||||
return CompareLastSearch(Other);
|
||||
case PREVDEF.ORIGINAL:
|
||||
return CompareOriginal(Other);
|
||||
default:
|
||||
case PREVDEF.LASTFRAME:
|
||||
return ComparePrev(Other);
|
||||
case PREVDEF.LASTCHANGE:
|
||||
return CompareLastChange(Other);
|
||||
}
|
||||
}
|
||||
|
||||
private int CompareDiff(Watch_Legacy Other, PREVDEF previous)
|
||||
{
|
||||
switch (previous)
|
||||
{
|
||||
case PREVDEF.LASTSEARCH:
|
||||
return CompareDiffLastSearch(Other);
|
||||
case PREVDEF.ORIGINAL:
|
||||
return CompareDiffOriginal(Other);
|
||||
default:
|
||||
case PREVDEF.LASTFRAME:
|
||||
return CompareDiffPrev(Other);
|
||||
case PREVDEF.LASTCHANGE:
|
||||
return CompareDiffLastChange(Other);
|
||||
}
|
||||
}
|
||||
|
||||
private int CompareAddress(Watch_Legacy Other)
|
||||
{
|
||||
if (Address < Other.Address)
|
||||
return -1;
|
||||
else if (Address > Other.Address)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareValue(Watch_Legacy Other)
|
||||
{
|
||||
if (Signed == DISPTYPE.SIGNED)
|
||||
{
|
||||
if (SignedVal(Value) < SignedVal(Other.Value))
|
||||
return -1;
|
||||
else if (SignedVal(Value) > SignedVal(Other.Value))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (UnsignedVal(Value) < UnsignedVal(Other.Value))
|
||||
return -1;
|
||||
else if (UnsignedVal(Value) > UnsignedVal(Other.Value))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int ComparePrev(Watch_Legacy Other)
|
||||
{
|
||||
if (Signed == DISPTYPE.SIGNED)
|
||||
{
|
||||
if (SignedVal(Prev) < SignedVal(Other.Prev))
|
||||
return -1;
|
||||
else if (SignedVal(Prev) > SignedVal(Other.Prev))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (UnsignedVal(Prev) < UnsignedVal(Other.Prev))
|
||||
return -1;
|
||||
else if (UnsignedVal(Prev) > UnsignedVal(Other.Prev))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareOriginal(Watch_Legacy Other)
|
||||
{
|
||||
if (Signed == DISPTYPE.SIGNED)
|
||||
{
|
||||
if (SignedVal(Original) < SignedVal(Other.Original))
|
||||
return -1;
|
||||
else if (SignedVal(Original) > SignedVal(Other.Original))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (UnsignedVal(Original) < UnsignedVal(Other.Original))
|
||||
return -1;
|
||||
else if (UnsignedVal(Original) > UnsignedVal(Other.Original))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareLastChange(Watch_Legacy Other)
|
||||
{
|
||||
if (Signed == DISPTYPE.SIGNED)
|
||||
{
|
||||
if (SignedVal(LastChange) < SignedVal(Other.LastChange))
|
||||
return -1;
|
||||
else if (SignedVal(LastChange) > SignedVal(Other.LastChange))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (UnsignedVal(LastChange) < UnsignedVal(Other.LastChange))
|
||||
return -1;
|
||||
else if (UnsignedVal(LastChange) > UnsignedVal(Other.LastChange))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareLastSearch(Watch_Legacy Other)
|
||||
{
|
||||
if (Signed == DISPTYPE.SIGNED)
|
||||
{
|
||||
if (SignedVal(LastSearch) < SignedVal(Other.LastSearch))
|
||||
return -1;
|
||||
else if (SignedVal(LastSearch) > SignedVal(Other.LastSearch))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (UnsignedVal(LastSearch) < UnsignedVal(Other.LastSearch))
|
||||
return -1;
|
||||
else if (UnsignedVal(LastSearch) > UnsignedVal(Other.LastSearch))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareDiffPrev(Watch_Legacy Other)
|
||||
{
|
||||
if (DiffPrev < Other.DiffPrev)
|
||||
return -1;
|
||||
else if (DiffPrev > Other.DiffPrev)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareDiffOriginal(Watch_Legacy Other)
|
||||
{
|
||||
if (DiffOriginal < Other.DiffOriginal)
|
||||
return -1;
|
||||
else if (DiffOriginal > Other.DiffOriginal)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareDiffLastChange(Watch_Legacy Other)
|
||||
{
|
||||
if (DiffLastChange < Other.DiffLastChange)
|
||||
return -1;
|
||||
else if (DiffLastChange > Other.DiffLastChange)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareDiffLastSearch(Watch_Legacy Other)
|
||||
{
|
||||
if (DiffLastSearch < Other.DiffLastSearch)
|
||||
return -1;
|
||||
else if (DiffLastSearch > Other.DiffLastSearch)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareChanges(Watch_Legacy Other)
|
||||
{
|
||||
if (Changecount < Other.Changecount)
|
||||
return -1;
|
||||
else if (Changecount > Other.Changecount)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int CompareNotes(Watch_Legacy Other)
|
||||
{
|
||||
if (Notes == null & Other.Notes == null)
|
||||
return 0;
|
||||
else if (Notes == null)
|
||||
return -1;
|
||||
else if (Other.Notes == null)
|
||||
return 1;
|
||||
else
|
||||
return Notes.CompareTo(Other.Notes);
|
||||
}
|
||||
|
||||
private int CompareDomain(Watch_Legacy Other)
|
||||
{
|
||||
if (Domain == null & Other.Domain == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (Domain == null)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (Other.Domain == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Domain.Name.CompareTo(Other.Domain.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public int CompareTo(Watch_Legacy Other, string parameter, PREVDEF previous)
|
||||
{
|
||||
int compare = 0;
|
||||
if (parameter == "Address")
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDomain(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDiff(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareNotes(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (parameter == "Value")
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDiff(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDomain(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareNotes(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (parameter == "Changes")
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDiff(Other, previous);
|
||||
if (compare == 0)
|
||||
compare = CompareNotes(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (parameter == "Prev")
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDiff(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDomain(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareNotes(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (parameter == "Diff")
|
||||
{
|
||||
compare = CompareDiff(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDomain(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareNotes(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (parameter == "Domain")
|
||||
{
|
||||
compare = CompareDomain(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareNotes(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (parameter == "Notes")
|
||||
{
|
||||
compare = CompareNotes(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareAddress(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareValue(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareChanges(Other);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = ComparePrevious(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDiff(Other, previous);
|
||||
if (compare == 0)
|
||||
{
|
||||
compare = CompareDomain(Other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return compare;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue