summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wpspec/wpspec/DisassemblerPage.xaml25
-rw-r--r--wpspec/wpspec/Resources/Strings.Designer.cs24
-rw-r--r--wpspec/wpspec/Resources/Strings.resx12
-rw-r--r--wpspec/wpspec/Spectrum/Emulation.cs13
-rw-r--r--wpspec/wpspec/ViewModels/DisassemblerViewModel.cs2
5 files changed, 58 insertions, 18 deletions
diff --git a/wpspec/wpspec/DisassemblerPage.xaml b/wpspec/wpspec/DisassemblerPage.xaml
index 95b149c..1881966 100644
--- a/wpspec/wpspec/DisassemblerPage.xaml
+++ b/wpspec/wpspec/DisassemblerPage.xaml
@@ -71,13 +71,14 @@
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
- <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
+ <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"
+ Orientation="Horizontal">
<TextBlock x:Name="ApplicationTitle"
Text="{Binding AppTitle, Source={StaticResource Strings}}"
Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle"
Text="{Binding DisassemblerPageTitleText, Source={StaticResource Strings}}"
- Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
+ Style="{StaticResource PhoneTextNormalStyle}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
@@ -246,24 +247,28 @@
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
- <RowDefinition Height="3*" />
- <RowDefinition Height="1*" />
+ <RowDefinition Height="85" />
+ <RowDefinition Height="40" />
</Grid.RowDefinitions>
+
<!-- Step -->
- <Button Grid.Column="0" Grid.RowSpan="2" Click="StepClick">
+ <Button Grid.Column="0" Grid.Row="0" Click="StepClick">
<TextBlock Text="{Binding DisassemblerStepButtonText, Source={StaticResource Strings}}"
Style="{StaticResource ButtonText}" />
</Button>
- <Slider Minimum="1" Maximum="1000" Grid.Column="1" Grid.Row="0"
- Value="{Binding Steps, Mode=TwoWay}"/>
+ <!-- Step size -->
+ <Slider Minimum="1" Maximum="1000"
+ Grid.Column="1" Grid.Row="0"
+ Value="{Binding Steps, Mode=TwoWay}" />
- <TextBlock Grid.Column="1" Grid.Row="1"
+ <TextBlock Grid.Column="1" Grid.Row="2"
Text="{Binding Steps, Mode=OneWay}"
- HorizontalAlignment="Center"/>
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"/>
<!-- Run Frame -->
- <Button Grid.Column="3" Grid.RowSpan="2" Click="RunClick">
+ <Button Grid.Column="3" Grid.Row="0" Click="RunClick">
<TextBlock Text="{Binding DisassemblerRunFrameButtonText, Source={StaticResource Strings}}"
Style="{StaticResource ButtonText}" />
</Button>
diff --git a/wpspec/wpspec/Resources/Strings.Designer.cs b/wpspec/wpspec/Resources/Strings.Designer.cs
index dcee2cd..4a365f0 100644
--- a/wpspec/wpspec/Resources/Strings.Designer.cs
+++ b/wpspec/wpspec/Resources/Strings.Designer.cs
@@ -119,6 +119,24 @@ namespace wpspec.Resources {
}
/// <summary>
+ /// Looks up a localized string similar to Display Memory.
+ /// </summary>
+ public static string DisassemblerDisplayMemoryButtonText {
+ get {
+ return ResourceManager.GetString("DisassemblerDisplayMemoryButtonText", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Display Screen.
+ /// </summary>
+ public static string DisassemblerDisplayScreenButtonText {
+ get {
+ return ResourceManager.GetString("DisassemblerDisplayScreenButtonText", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Disassembler.
/// </summary>
public static string DisassemblerPageTitleText {
@@ -191,7 +209,7 @@ namespace wpspec.Resources {
}
/// <summary>
- /// Looks up a localized string similar to Open Spectrum State.
+ /// Looks up a localized string similar to Open State.
/// </summary>
public static string OpenLocalTapePageTitle {
get {
@@ -209,7 +227,7 @@ namespace wpspec.Resources {
}
/// <summary>
- /// Looks up a localized string similar to Open Remote Tape File.
+ /// Looks up a localized string similar to Open Tape.
/// </summary>
public static string OpenRemoteTapePageTitle {
get {
@@ -245,7 +263,7 @@ namespace wpspec.Resources {
}
/// <summary>
- /// Looks up a localized string similar to Save Spectrum State.
+ /// Looks up a localized string similar to Save State.
/// </summary>
public static string SaveLocalTapePageTitle {
get {
diff --git a/wpspec/wpspec/Resources/Strings.resx b/wpspec/wpspec/Resources/Strings.resx
index 2a0b059..46679e3 100644
--- a/wpspec/wpspec/Resources/Strings.resx
+++ b/wpspec/wpspec/Resources/Strings.resx
@@ -139,6 +139,12 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
<data name="DisassemblerButtonText" xml:space="preserve">
<value>Disassembler</value>
</data>
+ <data name="DisassemblerDisplayMemoryButtonText" xml:space="preserve">
+ <value>Display Memory</value>
+ </data>
+ <data name="DisassemblerDisplayScreenButtonText" xml:space="preserve">
+ <value>Display Screen</value>
+ </data>
<data name="DisassemblerPageTitleText" xml:space="preserve">
<value>Disassembler</value>
</data>
@@ -164,13 +170,13 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
<value>Open State</value>
</data>
<data name="OpenLocalTapePageTitle" xml:space="preserve">
- <value>Open Spectrum State</value>
+ <value>Open State</value>
</data>
<data name="OpenRemoteTapeButtonText" xml:space="preserve">
<value>Open Remote Tape</value>
</data>
<data name="OpenRemoteTapePageTitle" xml:space="preserve">
- <value>Open Remote Tape File</value>
+ <value>Open Tape</value>
</data>
<data name="ROMCopyrightText" xml:space="preserve">
<value>Copyright of the included Spectrum 48K ROM is held by Amstrad PLC, and the ROM image is included with their kind permission.</value>
@@ -182,7 +188,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
<value>Save State</value>
</data>
<data name="SaveLocalTapePageTitle" xml:space="preserve">
- <value>Save Spectrum State</value>
+ <value>Save State</value>
</data>
<data name="SelectLocalTapeText" xml:space="preserve">
<value>Select Game to open</value>
diff --git a/wpspec/wpspec/Spectrum/Emulation.cs b/wpspec/wpspec/Spectrum/Emulation.cs
index 1b86a93..9360462 100644
--- a/wpspec/wpspec/Spectrum/Emulation.cs
+++ b/wpspec/wpspec/Spectrum/Emulation.cs
@@ -28,6 +28,7 @@ namespace wpspec.Spectrum
private readonly byte[] matrix = new byte[9];
private readonly int[] screenAccel = new int[192];
+ private readonly int[] attrAccel = new int[192];
//private readonly uint[] colours = new uint[16]
//{
@@ -119,7 +120,7 @@ namespace wpspec.Spectrum
for(int x = 0; x < 32; x++)
{
- attr = mem[0x5800 + x + clock.RasterLine / 8 * 32];
+ attr = mem[attrAccel[clock.RasterLine - 64] + x];
ink = attr & 0x07;
paper = (attr & 0x38) >> 3;
@@ -322,8 +323,17 @@ namespace wpspec.Spectrum
matrix[f] = 0x1f;
}
+ matrix[1] ^= 1;
+
matrix[8] = 0;
+ Random rnd = new Random();
+
+ for(int f = 0x4000; f < 0x10000; f++)
+ {
+ mem[f] = (byte)rnd.Next(Byte.MaxValue);
+ }
+
// Initialise the Z80
//
Z80.Reset();
@@ -379,6 +389,7 @@ namespace wpspec.Spectrum
for(int f = 0; f < 192; f++)
{
+ attrAccel[f] = 0x5800 + f / 8 * 32;
screenAccel[f] = 0x4000 + (c * 8 * 32) + (r * 32);
c++;
diff --git a/wpspec/wpspec/ViewModels/DisassemblerViewModel.cs b/wpspec/wpspec/ViewModels/DisassemblerViewModel.cs
index 2b10f98..367778e 100644
--- a/wpspec/wpspec/ViewModels/DisassemblerViewModel.cs
+++ b/wpspec/wpspec/ViewModels/DisassemblerViewModel.cs
@@ -196,7 +196,7 @@ namespace wpspec.ViewModels
string opcode;
string hexdump;
- for(int f = 0 ; f < 15; f++)
+ for(int f = 0 ; f < 18; f++)
{
pc = Shared.Spectrum.Disassembler.Disassemble(pc, out address, out opcode, out hexdump);
list.Add(new DisassemblerLine() {Address = address, Opcode = opcode, Hexdump = hexdump});