Merge branch 'Superfranci99-IO-Register-Viewer-#33'

This commit is contained in:
Benito Palacios Sánchez 2015-03-15 17:06:47 +01:00
commit b0c13a8e74
6 changed files with 246 additions and 1 deletions

4
.gitignore vendored
View File

@ -5,3 +5,7 @@ NitroDebugger.UnitTests/obj/
.nuget/NuGet.exe
*.userprefs
packages/
*.dll
IO_RegisterViewer/bin/Debug/NitroDebugger.exe
*.txt
*.cache

View File

@ -0,0 +1,149 @@
using System;
using System.IO;
using NitroDebugger;
using NitroDebugger.RSP;
namespace IO_RegisterViewer
{
public class EngineA : DataStructure
{
public override void Write ()
{
throw new NotImplementedException ();
}
public override void Read ()
{
GdbStream stream = GdbSessionManager.GetDefaultClient().Stream;
if (stream == null)
return;
stream.Seek (0x4000000, SeekOrigin.Begin);
BinaryReader br = new BinaryReader (stream);
this.Dispcnt = br.ReadInt32 ();
this.Dispstat = br.ReadInt16 ();
this.Vcount = br.ReadInt16 ();
this.Engine2dA = new Engine2D ();
this.Engine2dA.Read (stream);
this.Disp3dcnt = br.ReadInt16 ();
this.Dispcapcnt = br.ReadInt32 ();
this.Disp_mmem_fifo = br.ReadInt32 ();
this.Master_bright = br.ReadInt16 ();
}
public int Dispcnt { get; set; }
public short Dispstat { get; set; }
public short Vcount { get; set; }
public Engine2D Engine2dA { get; set; }
public short Disp3dcnt { get; set; }
public int Dispcapcnt { get; set; }
public int Disp_mmem_fifo { get; set; }
public short Master_bright { get; set; }
#region bitter
#endregion
public class Engine2D : DataStructure
{
public override void Write ()
{
throw new NotImplementedException ();
}
public override void Read ()
{
GdbStream stream = GdbSessionManager.GetDefaultClient().Stream;
BinaryReader br = new BinaryReader (stream);
this.Bg0cnt = br.ReadInt16 ();
this.Bg1cnt = br.ReadInt16 ();
this.Bg2cnt = br.ReadInt16 ();
this.Bg3cnt = br.ReadInt16 ();
this.Bg0hofs = br.ReadInt16 ();
this.Bg0vofs = br.ReadInt16 ();
this.Bg1hofs = br.ReadInt16 ();
this.Bg1vofs = br.ReadInt16 ();
this.Bg2hofs = br.ReadInt16 ();
this.Bg2vofs = br.ReadInt16 ();
this.Bg3hofs = br.ReadInt16 ();
this.Bg3vofs = br.ReadInt16 ();
this.Bg2pa = br.ReadInt16 ();
this.Bg2pb = br.ReadInt16 ();
this.Bg2pc = br.ReadInt16 ();
this.Bg2pd = br.ReadInt16 ();
this.Bg2x = br.ReadInt32 ();
this.Bg2y = br.ReadInt32 ();
this.Bg3pa = br.ReadInt16 ();
this.Bg3pb = br.ReadInt16 ();
this.Bg3pc = br.ReadInt16 ();
this.Bg3pd = br.ReadInt16 ();
this.Bg3x = br.ReadInt32 ();
this.Bg3y = br.ReadInt32 ();
this.Win0h = br.ReadInt16 ();
this.Win1h = br.ReadInt16 ();
this.Win0v = br.ReadInt16 ();
this.Win1v = br.ReadInt16 ();
this.Winin = br.ReadInt16 ();
this.Winout = br.ReadInt16 ();
this.Mosaic = br.ReadInt16 ();
this.NotUsed1 = br.ReadInt16 ();
this.Bldcnt = br.ReadInt16 ();
this.Bldalpha = br.ReadInt16 ();
this.Bldy = br.ReadInt16 ();
this.NotUsed2 = br.ReadInt16 ();
}
#region Properties
public short Bg0cnt { get; set; }
public short Bg1cnt { get; set; }
public short Bg2cnt { get; set; }
public short Bg3cnt { get; set; }
public short Bg0hofs { get; set; }
public short Bg0vofs { get; set; }
public short Bg1hofs { get; set; }
public short Bg1vofs { get; set; }
public short Bg2hofs { get; set; }
public short Bg2vofs { get; set; }
public short Bg3hofs { get; set; }
public short Bg3vofs { get; set; }
public short Bg2pa { get; set; }
public short Bg2pb { get; set; }
public short Bg2pc { get; set; }
public short Bg2pd { get; set; }
public int Bg2x { get; set; }
public int Bg2y { get; set; }
public short Bg3pa { get; set; }
public short Bg3pb { get; set; }
public short Bg3pc { get; set; }
public short Bg3pd { get; set; }
public int Bg3x { get; set; }
public int Bg3y { get; set; }
public short Win0h { get; set; }
public short Win1h { get; set; }
public short Win0v { get; set; }
public short Win1v { get; set; }
public short Winin { get; set; }
public short Winout { get; set; }
public short Mosaic { get; set; }
public short NotUsed1 { get; set; }
public short Bldcnt { get; set; }
public short Bldalpha { get; set; }
public short Bldy { get; set; }
public short NotUsed2 { get; set; }
#endregion
}
}
}

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E93E7091-28C4-4474-9E62-9AF5F0633A63}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>IO_RegisterViewer</RootNamespace>
<AssemblyName>IO_RegisterViewer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="EngineA.cs" />
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="gtk-gui\IO_RegisterViewer.Window.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\NitroDebugger\NitroDebugger.csproj">
<Project>{FBAFCD9C-6B05-41C5-AEED-19784A9DC8C1}</Project>
<Name>NitroDebugger</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("IO_RegisterViewer")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("Francesco")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NitroDebugger", "NitroDebug
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NitroDebugger.UnitTests", "NitroDebugger.UnitTests\NitroDebugger.UnitTests.csproj", "{A114EA52-2DC2-4DD3-937B-CD9FB236BA74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO_RegisterViewer", "IO_RegisterViewer\IO_RegisterViewer.csproj", "{E93E7091-28C4-4474-9E62-9AF5F0633A63}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
@ -15,13 +17,16 @@ Global
{A114EA52-2DC2-4DD3-937B-CD9FB236BA74}.Debug|x86.Build.0 = Debug|Any CPU
{A114EA52-2DC2-4DD3-937B-CD9FB236BA74}.Release|x86.ActiveCfg = Release|Any CPU
{A114EA52-2DC2-4DD3-937B-CD9FB236BA74}.Release|x86.Build.0 = Release|Any CPU
{E93E7091-28C4-4474-9E62-9AF5F0633A63}.Debug|x86.ActiveCfg = Debug|Any CPU
{E93E7091-28C4-4474-9E62-9AF5F0633A63}.Debug|x86.Build.0 = Debug|Any CPU
{E93E7091-28C4-4474-9E62-9AF5F0633A63}.Release|x86.ActiveCfg = Release|Any CPU
{E93E7091-28C4-4474-9E62-9AF5F0633A63}.Release|x86.Build.0 = Release|Any CPU
{FBAFCD9C-6B05-41C5-AEED-19784A9DC8C1}.Debug|x86.ActiveCfg = Debug|x86
{FBAFCD9C-6B05-41C5-AEED-19784A9DC8C1}.Debug|x86.Build.0 = Debug|x86
{FBAFCD9C-6B05-41C5-AEED-19784A9DC8C1}.Release|x86.ActiveCfg = Release|x86
{FBAFCD9C-6B05-41C5-AEED-19784A9DC8C1}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = NitroDebugger\NitroDebugger.csproj
Policies = $0
$0.ChangeLogPolicy = $1
$1.UpdateMode = None

View File

@ -19,6 +19,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
<<<<<<< HEAD
=======
using NitroDebugger.RSP;
>>>>>>> b5ae7a8363aa0a20313b9282169aa29958270da8
namespace NitroDebugger
{