Skip to content

Commit

Permalink
Version 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
morphx666 committed Sep 13, 2018
1 parent 2f23944 commit 51cebe6
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 14 deletions.
4 changes: 2 additions & 2 deletions GenOpCodes/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2018.9.8.248")>
<Assembly: AssemblyFileVersion("2018.9.8.248")>
<Assembly: AssemblyVersion("2018.9.13.253")>
<Assembly: AssemblyFileVersion("2018.9.13.253")>
28 changes: 24 additions & 4 deletions RunTests/ModuleMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Imports System.Threading
Module ModuleMain
Private cpu As X8086
Private validData() As Byte = Nothing
Private testsTotal As Integer = 0
Private failedTotal As Integer = 0
Private prefix As String

Sub Main()
Dim waiter As New AutoResetEvent(False)
Expand All @@ -27,7 +30,8 @@ Module ModuleMain
If Not IO.File.Exists(dataFileName) Then Continue For
validData = IO.File.ReadAllBytes(dataFileName)

Console.Write($"Running: {fileName}")
prefix = $"Running: {fileName}"
Console.Write(prefix)

If cpu.IsHalted Then cpu.HardReset()
cpu.LoadBIN(f.FullName, &HF000, &H0)
Expand All @@ -37,23 +41,37 @@ Module ModuleMain
Next
cpu.Close()

Dim passedTotal As Integer = testsTotal - failedTotal
Console.ForegroundColor = ConsoleColor.Magenta
Console.WriteLine($"Score: {passedTotal}/{testsTotal} [{passedTotal / testsTotal * 100:N2}%]")
Console.ForegroundColor = ConsoleColor.Gray
Console.WriteLine()

Console.WriteLine("Press any key to exit")
Console.ReadKey()
End Sub

Private Sub Compare()
Const p As Integer = 28

Dim txt As String = ""
Dim v1 As String
Dim v2 As String
Dim invalidData As New List(Of String)
For i As Integer = 0 To validData.Length / 2 - 1 Step 2
Dim dataLen As Integer = validData.Length / 2

testsTotal += dataLen

For i As Integer = 0 To dataLen - 1 Step 2
v1 = cpu.RAM16(0, i).ToString("X4")
v2 = BitConverter.ToInt16(validData, i).ToString("X4")
If v1 <> v2 Then
invalidData.Add($"0000:{i:X4} {v1} <> {v2}")
End If
Next
If invalidData.Any() Then
Console.WriteLine($" > FAILED [{invalidData.Count}]")
txt = $" > FAILED [{invalidData.Count}/{dataLen}]"
Console.WriteLine(txt.PadLeft(p - prefix.Length + txt.Length))
invalidData.ForEach(Sub(id)
Dim t() As String = id.Split(" "c)
Console.ForegroundColor = ConsoleColor.White
Expand All @@ -67,8 +85,10 @@ Module ModuleMain
Console.ForegroundColor = ConsoleColor.Gray
'Console.WriteLine($" {id}")
End Sub)
failedTotal += invalidData.Count
Else
Console.WriteLine(" > PASSED")
txt = $" > PASSED [{dataLen}]"
Console.WriteLine(txt.PadLeft(p - prefix.Length + txt.Length))
End If
End Sub
End Module
4 changes: 2 additions & 2 deletions RunTests/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2018.9.8.432")>
<Assembly: AssemblyFileVersion("2018.9.8.432")>
<Assembly: AssemblyVersion("2018.9.13.480")>
<Assembly: AssemblyFileVersion("2018.9.13.480")>
4 changes: 2 additions & 2 deletions x8086NetEmu/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2018.9.8.4964")>
<Assembly: AssemblyFileVersion("2018.9.8.4957")>
<Assembly: AssemblyVersion("2018.9.13.4969")>
<Assembly: AssemblyFileVersion("2018.9.13.4962")>
4 changes: 2 additions & 2 deletions x8086NetEmuConsole/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2018.9.8.560")>
<Assembly: AssemblyFileVersion("2018.9.8.555")>
<Assembly: AssemblyVersion("2018.9.13.565")>
<Assembly: AssemblyFileVersion("2018.9.13.560")>
4 changes: 2 additions & 2 deletions x8086NetEmuWinForms/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2018.9.8.4945")>
<Assembly: AssemblyFileVersion("2018.9.8.4943")>
<Assembly: AssemblyVersion("2018.9.13.4952")>
<Assembly: AssemblyFileVersion("2018.9.13.4950")>

0 comments on commit 51cebe6

Please sign in to comment.