Skip to content

Commit

Permalink
Sync with GW 0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
M1kerochip committed Jul 3, 2021
1 parent dc4455c commit 320ec47
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 805 deletions.
29 changes: 24 additions & 5 deletions GreaseWeazle.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
''' Class to call the Greaseweazle hardware and action the results.
''' </summary>
Public Class GreaseWeazle
Public ReadOnly Property Version As String = "v0.4, for GW 0.27"
Public ReadOnly Property Version As String = "v0.5, for GW 0.28"

Public ReadOnly Property GWMinAction As Integer = 0
Public ReadOnly Property GWMaxAction As Integer = 11
Expand Down Expand Up @@ -65,6 +65,7 @@ Public Class GreaseWeazle
Private P_Step As Integer = 1
Private P_HeadOffsetEnable As Boolean = False
Private P_HeadOffsetTrackCount As Integer = -8 'For 5.25" FDD flippy drives only!! (C64/Atari XE .. ?)
Private P_HeadOffsetHead As Integer = 1
Private P_WritePreCompensate As Boolean = False
Private P_WPC_Type As String = "mfm"
Private P_WPC_TrackRange As String = ">="
Expand Down Expand Up @@ -460,6 +461,23 @@ Public Class GreaseWeazle
End Set
End Property

''' <summary>
''' Head to use to offset tracks by HeadOffsetTrackCount
''' </summary>
''' <returns>Integer, 1 by default, for 5.25" drives with flippy disks</returns>
Public Property HeadOffsetHead As Integer
Get
Return P_HeadOffsetHead
End Get
Set(value As Integer)
If (value = 0) Or (value = 1) Then
P_HeadOffsetHead = value
Else
P_ErrorString = "Invalid head. Values can only be 0 or 1"
End If
End Set
End Property

''' <summary>
''' Enable Write Precompensate. Prevent tracks from overlapping. Useful for later tracks, which are closer together. See Wiki: https://github.com/keirf/Greaseweazle/wiki/Write-Precompensation
''' </summary>
Expand Down Expand Up @@ -967,6 +985,11 @@ Public Class GreaseWeazle
str += "0-1" 'else use both heads (top and bottom)
End If

If HeadOffsetEnable Then
str += ":h" + CStr(HeadOffsetHead) 'Heads (sides of the disk) to use in this operation
str += ".off=" + CStr(HeadOffsetTrackCount) 'Offset head by a number of tracks
End If

str += ":step="
str += CStr(TrackStep) 'Step X tracks for every read: Useful for 40 track disks, in 80 track drives, etc.

Expand Down Expand Up @@ -997,10 +1020,6 @@ Public Class GreaseWeazle
End If

If (Action = GWRead) Or (Action = GWWrite) Then
If HeadOffsetEnable Then

End If

If Retries <> 0 Then
str += "--retries " + CStr(Retries) + " "
End If
Expand Down
4 changes: 2 additions & 2 deletions 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("2.0.6.27")>
<Assembly: AssemblyFileVersion("2.0.6.27")>
<Assembly: AssemblyVersion("2.0.7.28")>
<Assembly: AssemblyFileVersion("2.0.7.28")>
12 changes: 12 additions & 0 deletions My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,8 @@
<Setting Name="SeekWithMotorOn" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="HeadOffsetHead" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
</Settings>
</SettingsFile>
3 changes: 3 additions & 0 deletions app.config
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@
<setting name="SeekWithMotorOn" serializeAs="String">
<value>False</value>
</setting>
<setting name="HeadOffsetHead" serializeAs="String">
<value>1</value>
</setting>
</RunGreaseWeazel.My.MySettings>
</userSettings>
</configuration>
Binary file added bin/Release/Release.zip
Binary file not shown.
21 changes: 0 additions & 21 deletions bin/Release/RunGreaseWeazel.application

This file was deleted.

Binary file removed bin/Release/RunGreaseWeazel.exe
Binary file not shown.
205 changes: 0 additions & 205 deletions bin/Release/RunGreaseWeazel.exe.config

This file was deleted.

Loading

0 comments on commit 320ec47

Please sign in to comment.