فهرست منبع

new version with

Version 0.2.1.52
    - FEATURE: deactivating right panel if not in emulator mode
    - FEATURE: new internal "Jump to" will shox the absolute memory address, if a skip or jump command will be executed
Klaas, Wilfried 6 سال پیش
والد
کامیت
5584a5afd2
9فایلهای تغییر یافته به همراه337 افزوده شده و 209 حذف شده
  1. 3 3
      Beispiele/SimpleServo.tps
  2. 4 3
      README.md
  3. 4 4
      SPS_EMU.000
  4. 1 1
      SPS_Emu.lpi
  5. BIN
      SPS_Emu.lsu
  6. 1 1
      SPS_Emu.xml
  7. 193 171
      ugui.lfm
  8. 53 26
      ugui.pas
  9. 78 0
      usps.pas

+ 3 - 3
Beispiele/SimpleServo.tps

@@ -1,12 +1,12 @@
 #TPS:Willies SPS Arduino
 0x00,4,4,""
-0x01,5,1,""
+0x01,5,2,""
 0x02,4,F,""
 0x03,7,C,""
 0x04,F,8,""
 0x05,4,0,""
 0x06,F,8,""
 0x07,2,0,""
-0x08,3,6,""
+0x08,A,2,""
 0x09,F,F,""
-0x0A,0,,""
+0x0A,0,0,""

+ 4 - 3
README.md

@@ -1,7 +1,8 @@
-SPS_Emulator
+# **SPS_Emulator Version History**
 
-
-version history
+Version 0.2.1.52
+    - FEATURE: deactivating right panel if not in emulator mode
+    - FEATURE: new internal "Jump to" will shox the absolute memory address, if a skip or jump command will be executed
 
 Version 0.2.1.51
     - BUG: clicking "new row" with active row at the end of the table, two rows will be added

+ 4 - 4
SPS_EMU.000

@@ -2,9 +2,9 @@
 LSUTextFile=1
 Copyrigth=MCS Media Computer Software
 [LSUInfo]
-CompileDate=14.11.2018
-CompileTime=12:01:18
+CompileDate=15.11.2018
+CompileTime=14:52:21
 Name=Wilfried Klaas
-LSUBinFile=E:\daten\git-sourcen\SPS_Emulator\SPS_Emu.lsu
-LSUTextFile=E:\daten\git-sourcen\SPS_Emulator\SPS_Emu.
+LSUBinFile=H:\privat\git-sourcen\SPS_Emulator\SPS_Emu.lsu
+LSUTextFile=H:\privat\git-sourcen\SPS_Emulator\SPS_Emu.
 RegString=

+ 1 - 1
SPS_Emu.lpi

@@ -22,7 +22,7 @@
       <AutoIncrementBuild Value="True"/>
       <MinorVersionNr Value="2"/>
       <RevisionNr Value="1"/>
-      <BuildNr Value="51"/>
+      <BuildNr Value="52"/>
       <Language Value="0407"/>
       <StringTable CompanyName="MCS" FileDescription="TPS/SPS Emulator" InternalName="SPS_EMU" LegalCopyright="MCS (C) Wilfried Klaas" OriginalFilename="SPS_EMU.exe" ProductName="TPS/SPS Emulator" ProductVersion="0.2"/>
     </VersionInfo>

BIN
SPS_Emu.lsu


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
SPS_Emu.xml


+ 193 - 171
ugui.lfm

@@ -1,14 +1,15 @@
 object Form1: TForm1
-  Left = 232
-  Height = 549
-  Top = 109
-  Width = 665
+  Left = -1685
+  Height = 582
+  Top = 146
+  Width = 691
   AllowDropFiles = True
   Caption = 'SPS Emulator'
-  ClientHeight = 549
-  ClientWidth = 665
-  Constraints.MinHeight = 472
-  Constraints.MinWidth = 620
+  ClientHeight = 582
+  ClientWidth = 691
+  Constraints.MinHeight = 582
+  Constraints.MinWidth = 684
+  DesignTimePPI = 120
   OnCloseQuery = FormCloseQuery
   OnCreate = FormCreate
   OnDropFiles = FormDropFiles
@@ -16,27 +17,28 @@ object Form1: TForm1
   ShowHint = True
   LCLVersion = '1.8.4.0'
   object Panel1: TPanel
-    Left = 345
-    Height = 500
+    Left = 367
+    Height = 527
     Top = 26
-    Width = 320
+    Width = 324
     Align = alRight
     BevelOuter = bvNone
-    ClientHeight = 500
+    BorderStyle = bsSingle
+    ClientHeight = 523
     ClientWidth = 320
     TabOrder = 0
     object GroupBox1: TGroupBox
       Left = 182
-      Height = 291
+      Height = 294
       Top = 5
       Width = 134
       Caption = 'ID_OUTPUT'
-      ClientHeight = 271
+      ClientHeight = 269
       ClientWidth = 130
       TabOrder = 0
       object PWM1: TLabeledEdit
         Left = 57
-        Height = 23
+        Height = 28
         Top = 120
         Width = 40
         EditLabel.AnchorSideTop.Control = PWM1
@@ -44,10 +46,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = PWM1
         EditLabel.AnchorSideBottom.Control = PWM1
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 16
-        EditLabel.Height = 15
+        EditLabel.Left = 8
+        EditLabel.Height = 20
         EditLabel.Top = 124
-        EditLabel.Width = 38
+        EditLabel.Width = 46
         EditLabel.Caption = 'PWM.1'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -56,7 +58,7 @@ object Form1: TForm1
       end
       object PWM2: TLabeledEdit
         Left = 57
-        Height = 23
+        Height = 28
         Top = 148
         Width = 40
         EditLabel.AnchorSideTop.Control = PWM2
@@ -64,10 +66,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = PWM2
         EditLabel.AnchorSideBottom.Control = PWM2
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 16
-        EditLabel.Height = 15
+        EditLabel.Left = 8
+        EditLabel.Height = 20
         EditLabel.Top = 152
-        EditLabel.Width = 38
+        EditLabel.Width = 46
         EditLabel.Caption = 'PWM.2'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -76,33 +78,33 @@ object Form1: TForm1
       end
       object Label10: TLabel
         Left = 6
-        Height = 15
+        Height = 20
         Top = 25
-        Width = 73
+        Width = 90
         Caption = 'ID_OUTPUT_1'
         ParentColor = False
       end
       object Label11: TLabel
         Left = 6
-        Height = 15
+        Height = 20
         Top = 47
-        Width = 73
+        Width = 90
         Caption = 'ID_OUTPUT_2'
         ParentColor = False
       end
       object Label12: TLabel
         Left = 6
-        Height = 15
+        Height = 20
         Top = 71
-        Width = 73
+        Width = 90
         Caption = 'ID_OUTPUT_3'
         ParentColor = False
       end
       object Label13: TLabel
         Left = 6
-        Height = 15
+        Height = 20
         Top = 95
-        Width = 73
+        Width = 90
         Caption = 'ID_OUTPUT_4'
         ParentColor = False
       end
@@ -136,7 +138,7 @@ object Form1: TForm1
       end
       object Servo1: TLabeledEdit
         Left = 57
-        Height = 23
+        Height = 28
         Top = 178
         Width = 40
         EditLabel.AnchorSideTop.Control = Servo1
@@ -144,10 +146,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = Servo1
         EditLabel.AnchorSideBottom.Control = Servo1
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 16
-        EditLabel.Height = 15
+        EditLabel.Left = 6
+        EditLabel.Height = 20
         EditLabel.Top = 182
-        EditLabel.Width = 38
+        EditLabel.Width = 48
         EditLabel.Caption = 'Servo.1'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -156,7 +158,7 @@ object Form1: TForm1
       end
       object Servo2: TLabeledEdit
         Left = 57
-        Height = 23
+        Height = 28
         Top = 205
         Width = 40
         EditLabel.AnchorSideTop.Control = Servo2
@@ -164,10 +166,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = Servo2
         EditLabel.AnchorSideBottom.Control = Servo2
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 16
-        EditLabel.Height = 15
+        EditLabel.Left = 6
+        EditLabel.Height = 20
         EditLabel.Top = 209
-        EditLabel.Width = 38
+        EditLabel.Width = 48
         EditLabel.Caption = 'Servo.2'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -192,9 +194,9 @@ object Form1: TForm1
       end
       object Label5: TLabel
         Left = 16
-        Height = 15
+        Height = 20
         Top = 240
-        Width = 26
+        Width = 32
         Caption = 'Tone'
         ParentColor = False
       end
@@ -214,48 +216,48 @@ object Form1: TForm1
       Top = 5
       Width = 172
       Caption = 'ID_INPUT'
-      ClientHeight = 274
+      ClientHeight = 269
       ClientWidth = 168
       TabOrder = 1
       object Din4: TCheckBox
         Left = 14
-        Height = 19
+        Height = 24
         Top = 95
-        Width = 81
+        Width = 100
         Caption = 'ID_INPUT_4'
         ParentBidiMode = False
         TabOrder = 0
       end
       object Din3: TCheckBox
         Left = 14
-        Height = 19
+        Height = 24
         Top = 71
-        Width = 81
+        Width = 100
         Caption = 'ID_INPUT_3'
         ParentBidiMode = False
         TabOrder = 1
       end
       object Din2: TCheckBox
         Left = 14
-        Height = 19
+        Height = 24
         Top = 47
-        Width = 81
+        Width = 100
         Caption = 'ID_INPUT_2'
         ParentBidiMode = False
         TabOrder = 2
       end
       object Din1: TCheckBox
         Left = 14
-        Height = 19
+        Height = 24
         Top = 25
-        Width = 81
+        Width = 100
         Caption = 'ID_INPUT_1'
         ParentBidiMode = False
         TabOrder = 3
       end
       object ADC1: TSpinEdit
         Left = 62
-        Height = 23
+        Height = 28
         Top = 120
         Width = 54
         MaxValue = 255
@@ -263,7 +265,7 @@ object Form1: TForm1
       end
       object ADC2: TSpinEdit
         Left = 62
-        Height = 23
+        Height = 28
         Top = 148
         Width = 54
         MaxValue = 255
@@ -271,23 +273,23 @@ object Form1: TForm1
       end
       object Label1: TLabel
         Left = 14
-        Height = 15
+        Height = 20
         Top = 127
-        Width = 33
+        Width = 41
         Caption = 'ADC.1'
         ParentColor = False
       end
       object Label2: TLabel
         Left = 14
-        Height = 15
+        Height = 20
         Top = 154
-        Width = 33
+        Width = 41
         Caption = 'ADC.2'
         ParentColor = False
       end
       object RC1: TSpinEdit
         Left = 62
-        Height = 23
+        Height = 28
         Top = 177
         Width = 54
         MaxValue = 255
@@ -295,7 +297,7 @@ object Form1: TForm1
       end
       object RC2: TSpinEdit
         Left = 62
-        Height = 23
+        Height = 28
         Top = 205
         Width = 54
         MaxValue = 255
@@ -303,17 +305,17 @@ object Form1: TForm1
       end
       object Label16: TLabel
         Left = 14
-        Height = 15
+        Height = 20
         Top = 183
-        Width = 24
+        Width = 29
         Caption = 'RC.1'
         ParentColor = False
       end
       object Label17: TLabel
         Left = 14
-        Height = 15
+        Height = 20
         Top = 211
-        Width = 24
+        Width = 29
         Caption = 'RC.2'
         ParentColor = False
       end
@@ -335,7 +337,7 @@ object Form1: TForm1
       end
       object ToolBar2: TToolBar
         Left = 133
-        Height = 274
+        Height = 269
         Top = 0
         Width = 35
         Align = alRight
@@ -357,7 +359,7 @@ object Form1: TForm1
         object tbPreset2: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 25
+          Top = 30
           Caption = '2'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -365,7 +367,7 @@ object Form1: TForm1
         object tbPreset3: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 48
+          Top = 58
           Caption = '3'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -373,7 +375,7 @@ object Form1: TForm1
         object tbPreset4: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 71
+          Top = 86
           Caption = '4'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -381,7 +383,7 @@ object Form1: TForm1
         object tbPreset5: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 94
+          Top = 114
           Caption = '5'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -389,7 +391,7 @@ object Form1: TForm1
         object tbPreset6: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 117
+          Top = 142
           Caption = '6'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -397,7 +399,7 @@ object Form1: TForm1
         object tbPreset7: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 140
+          Top = 170
           Caption = '7'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -405,7 +407,7 @@ object Form1: TForm1
         object tbPreset8: TToolButton
           Left = 3
           Hint = 'Zum Speichern der Eingangsparameter bitte rechte Maustaste über den jeweiligen Button betätigen.'
-          Top = 163
+          Top = 198
           Caption = '8'
           OnClick = tbPreset1Click
           OnContextPopup = tbPreset1ContextPopup
@@ -413,34 +415,34 @@ object Form1: TForm1
         object tbReset: TToolButton
           Left = 3
           Hint = 'EInstellungen zurücksetzen'
-          Top = 186
+          Top = 226
           Caption = 'R'
           OnClick = tbResetClick
         end
         object tbPreLoad: TToolButton
-          Left = 3
-          Top = 209
+          Left = 33
+          Top = 2
           Action = acPresetLoad
         end
         object tbPreSave: TToolButton
-          Left = 3
-          Top = 232
+          Left = 33
+          Top = 30
           Action = acPresetSave
         end
       end
     end
     object GroupBox3: TGroupBox
-      Left = 8
-      Height = 134
+      Left = 4
+      Height = 142
       Top = 304
       Width = 312
       Caption = 'ID_INTERNAL_DATA'
-      ClientHeight = 114
+      ClientHeight = 117
       ClientWidth = 308
       TabOrder = 2
       object EditA: TLabeledEdit
         Left = 22
-        Height = 23
+        Height = 28
         Top = 4
         Width = 40
         EditLabel.AnchorSideTop.Control = EditA
@@ -448,10 +450,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = EditA
         EditLabel.AnchorSideBottom.Control = EditA
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 11
-        EditLabel.Height = 15
+        EditLabel.Left = 9
+        EditLabel.Height = 20
         EditLabel.Top = 8
-        EditLabel.Width = 8
+        EditLabel.Width = 10
         EditLabel.Caption = 'A'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -460,18 +462,18 @@ object Form1: TForm1
       end
       object EditC: TLabeledEdit
         Left = 22
-        Height = 23
-        Top = 28
+        Height = 28
+        Top = 32
         Width = 40
         EditLabel.AnchorSideTop.Control = EditC
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditC
         EditLabel.AnchorSideBottom.Control = EditC
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 11
-        EditLabel.Height = 15
-        EditLabel.Top = 32
-        EditLabel.Width = 8
+        EditLabel.Left = 10
+        EditLabel.Height = 20
+        EditLabel.Top = 36
+        EditLabel.Width = 9
         EditLabel.Caption = 'C'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -480,18 +482,18 @@ object Form1: TForm1
       end
       object EditE: TLabeledEdit
         Left = 22
-        Height = 23
-        Top = 52
+        Height = 28
+        Top = 60
         Width = 40
         EditLabel.AnchorSideTop.Control = EditE
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditE
         EditLabel.AnchorSideBottom.Control = EditE
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 13
-        EditLabel.Height = 15
-        EditLabel.Top = 56
-        EditLabel.Width = 6
+        EditLabel.Left = 11
+        EditLabel.Height = 20
+        EditLabel.Top = 64
+        EditLabel.Width = 8
         EditLabel.Caption = 'E'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -500,7 +502,7 @@ object Form1: TForm1
       end
       object EditB: TLabeledEdit
         Left = 86
-        Height = 23
+        Height = 28
         Top = 4
         Width = 40
         EditLabel.AnchorSideTop.Control = EditB
@@ -508,10 +510,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = EditB
         EditLabel.AnchorSideBottom.Control = EditB
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 76
-        EditLabel.Height = 15
+        EditLabel.Left = 74
+        EditLabel.Height = 20
         EditLabel.Top = 8
-        EditLabel.Width = 7
+        EditLabel.Width = 9
         EditLabel.Caption = 'B'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -520,18 +522,18 @@ object Form1: TForm1
       end
       object EditD: TLabeledEdit
         Left = 86
-        Height = 23
-        Top = 28
+        Height = 28
+        Top = 32
         Width = 40
         EditLabel.AnchorSideTop.Control = EditD
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditD
         EditLabel.AnchorSideBottom.Control = EditD
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 75
-        EditLabel.Height = 15
-        EditLabel.Top = 32
-        EditLabel.Width = 8
+        EditLabel.Left = 72
+        EditLabel.Height = 20
+        EditLabel.Top = 36
+        EditLabel.Width = 11
         EditLabel.Caption = 'D'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -540,18 +542,18 @@ object Form1: TForm1
       end
       object EditF: TLabeledEdit
         Left = 86
-        Height = 23
-        Top = 52
+        Height = 28
+        Top = 60
         Width = 40
         EditLabel.AnchorSideTop.Control = EditF
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditF
         EditLabel.AnchorSideBottom.Control = EditF
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 77
-        EditLabel.Height = 15
-        EditLabel.Top = 56
-        EditLabel.Width = 6
+        EditLabel.Left = 76
+        EditLabel.Height = 20
+        EditLabel.Top = 64
+        EditLabel.Width = 7
         EditLabel.Caption = 'F'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -560,7 +562,7 @@ object Form1: TForm1
       end
       object EditAddr: TLabeledEdit
         Left = 174
-        Height = 23
+        Height = 28
         Top = 4
         Width = 48
         EditLabel.AnchorSideTop.Control = EditAddr
@@ -568,10 +570,10 @@ object Form1: TForm1
         EditLabel.AnchorSideRight.Control = EditAddr
         EditLabel.AnchorSideBottom.Control = EditAddr
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 145
-        EditLabel.Height = 15
+        EditLabel.Left = 138
+        EditLabel.Height = 20
         EditLabel.Top = 8
-        EditLabel.Width = 26
+        EditLabel.Width = 33
         EditLabel.Caption = 'Addr'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -580,19 +582,19 @@ object Form1: TForm1
       end
       object EditRAdr: TLabeledEdit
         Left = 174
-        Height = 23
+        Height = 28
         Hint = 'Rücksprungadresse'
-        Top = 52
+        Top = 60
         Width = 48
         EditLabel.AnchorSideTop.Control = EditRAdr
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditRAdr
         EditLabel.AnchorSideBottom.Control = EditRAdr
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 145
-        EditLabel.Height = 15
-        EditLabel.Top = 56
-        EditLabel.Width = 26
+        EditLabel.Left = 138
+        EditLabel.Height = 20
+        EditLabel.Top = 64
+        EditLabel.Width = 33
         EditLabel.Caption = 'RAdr'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -601,34 +603,34 @@ object Form1: TForm1
       end
       object lbStack: TListBox
         Left = 232
-        Height = 64
-        Top = 10
+        Height = 84
+        Top = 32
         Width = 71
         ItemHeight = 0
         TabOrder = 8
       end
       object Label4: TLabel
-        Left = 235
-        Height = 15
-        Top = -6
-        Width = 28
+        Left = 232
+        Height = 20
+        Top = 8
+        Width = 35
         Caption = 'Stack'
         ParentColor = False
       end
       object EditDelay: TLabeledEdit
         Left = 174
-        Height = 23
-        Top = 76
+        Height = 28
+        Top = 88
         Width = 48
         EditLabel.AnchorSideTop.Control = EditDelay
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditDelay
         EditLabel.AnchorSideBottom.Control = EditDelay
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 142
-        EditLabel.Height = 15
-        EditLabel.Top = 80
-        EditLabel.Width = 29
+        EditLabel.Left = 133
+        EditLabel.Height = 20
+        EditLabel.Top = 92
+        EditLabel.Width = 38
         EditLabel.Caption = 'Delay'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
@@ -637,39 +639,59 @@ object Form1: TForm1
       end
       object EditPage: TLabeledEdit
         Left = 174
-        Height = 23
-        Top = 28
+        Height = 28
+        Top = 32
         Width = 48
         EditLabel.AnchorSideTop.Control = EditPage
         EditLabel.AnchorSideTop.Side = asrCenter
         EditLabel.AnchorSideRight.Control = EditPage
         EditLabel.AnchorSideBottom.Control = EditPage
         EditLabel.AnchorSideBottom.Side = asrBottom
-        EditLabel.Left = 145
-        EditLabel.Height = 15
-        EditLabel.Top = 32
-        EditLabel.Width = 26
+        EditLabel.Left = 139
+        EditLabel.Height = 20
+        EditLabel.Top = 36
+        EditLabel.Width = 32
         EditLabel.Caption = 'Page'
         EditLabel.ParentColor = False
         LabelPosition = lpLeft
         ReadOnly = True
         TabOrder = 10
       end
+      object EditJump: TLabeledEdit
+        Left = 86
+        Height = 28
+        Top = 88
+        Width = 40
+        EditLabel.AnchorSideTop.Control = EditJump
+        EditLabel.AnchorSideTop.Side = asrCenter
+        EditLabel.AnchorSideRight.Control = EditJump
+        EditLabel.AnchorSideBottom.Control = EditJump
+        EditLabel.AnchorSideBottom.Side = asrBottom
+        EditLabel.Left = 30
+        EditLabel.Height = 20
+        EditLabel.Top = 92
+        EditLabel.Width = 53
+        EditLabel.Caption = 'Jump to'
+        EditLabel.ParentColor = False
+        LabelPosition = lpLeft
+        ReadOnly = True
+        TabOrder = 11
+      end
     end
     object GroupBox4: TGroupBox
-      Left = 8
-      Height = 49
-      Top = 438
+      Left = 4
+      Height = 56
+      Top = 456
       Width = 312
       Caption = 'ID_CONTROL'
-      ClientHeight = 29
+      ClientHeight = 31
       ClientWidth = 308
       TabOrder = 3
       object cbAdrActual: TCheckBox
         Left = 5
-        Height = 19
+        Height = 24
         Top = 4
-        Width = 119
+        Width = 152
         Caption = 'ID_REFRESH_ADDR'
         TabOrder = 0
       end
@@ -679,7 +701,7 @@ object Form1: TForm1
     Left = 0
     Height = 26
     Top = 0
-    Width = 665
+    Width = 691
     ButtonHeight = 22
     ButtonWidth = 22
     Caption = 'ToolBar1'
@@ -732,11 +754,11 @@ object Form1: TForm1
       Caption = 'ID_EXEC_DEBUG'
     end
     object cbTPSVersion: TComboBox
-      Left = 433
-      Height = 23
+      Left = 456
+      Height = 28
       Top = 2
       Width = 125
-      ItemHeight = 15
+      ItemHeight = 20
       Items.Strings = (
         'TPS Holtek'
         'TPS ATMega8'
@@ -749,9 +771,9 @@ object Form1: TForm1
     end
     object Label3: TLabel
       Left = 345
-      Height = 15
+      Height = 20
       Top = 2
-      Width = 88
+      Width = 111
       Alignment = taCenter
       Caption = 'ID_TPS_VERSION'
       Layout = tlCenter
@@ -814,19 +836,19 @@ object Form1: TForm1
       Caption = 'ID_DELLINE'
     end
     object ToolButton17: TToolButton
-      Left = 558
+      Left = 581
       Height = 22
       Top = 2
       Caption = 'ToolButton17'
       Style = tbsDivider
     end
     object ToolButton18: TToolButton
-      Left = 563
+      Left = 586
       Top = 2
       Action = acHelpAbout
     end
     object MCSLabel: TLabel
-      Left = 587
+      Left = 610
       Height = 22
       Top = 2
       Width = 20
@@ -845,27 +867,27 @@ object Form1: TForm1
   end
   object StatusBar1: TStatusBar
     Left = 0
-    Height = 23
-    Top = 526
-    Width = 665
+    Height = 29
+    Top = 553
+    Width = 691
     Panels = <>
   end
   object Panel2: TPanel
     Left = 0
-    Height = 500
+    Height = 527
     Top = 26
-    Width = 345
+    Width = 367
     Align = alClient
     BevelOuter = bvNone
     Caption = 'Panel2'
-    ClientHeight = 500
-    ClientWidth = 345
+    ClientHeight = 527
+    ClientWidth = 367
     TabOrder = 3
     object StringGrid1: TStringGrid
       Left = 0
-      Height = 466
+      Height = 493
       Top = 0
-      Width = 345
+      Width = 367
       Align = alClient
       Columns = <      
         item
@@ -904,20 +926,20 @@ object Form1: TForm1
     object Panel3: TPanel
       Left = 0
       Height = 34
-      Top = 466
-      Width = 345
+      Top = 493
+      Width = 367
       Align = alBottom
       BevelInner = bvLowered
       BevelOuter = bvNone
       ClientHeight = 34
-      ClientWidth = 345
+      ClientWidth = 367
       TabOrder = 1
       object cbCommand: TComboBox
         Left = 64
-        Height = 23
+        Height = 28
         Top = 4
         Width = 100
-        ItemHeight = 15
+        ItemHeight = 20
         Items.Strings = (
           ''
           'Dout'
@@ -945,7 +967,7 @@ object Form1: TForm1
         AnchorSideRight.Control = cbCommand
         AnchorSideRight.Side = asrBottom
         Left = 8
-        Height = 15
+        Height = 20
         Top = 8
         Width = 156
         Anchors = [akTop, akLeft, akRight]
@@ -954,10 +976,10 @@ object Form1: TForm1
       end
       object cbData: TComboBox
         Left = 232
-        Height = 23
+        Height = 28
         Top = 4
         Width = 100
-        ItemHeight = 15
+        ItemHeight = 20
         ItemIndex = 0
         Items.Strings = (
           ''
@@ -982,9 +1004,9 @@ object Form1: TForm1
         AnchorSideTop.Control = cbData
         AnchorSideTop.Side = asrCenter
         Left = 184
-        Height = 15
+        Height = 20
         Top = 8
-        Width = 76
+        Width = 96
         Caption = 'ID_MNE_DATA'
         ParentColor = False
       end

+ 53 - 26
ugui.pas

@@ -36,6 +36,7 @@ type
     cbTPSVersion: TComboBox;
     cbAdrActual: TCheckBox;
     EditDelay: TLabeledEdit;
+    EditJump: TLabeledEdit;
     EditPage: TLabeledEdit;
     EditRAdr: TLabeledEdit;
     acPresetLoad: TFileOpen;
@@ -163,7 +164,8 @@ type
     procedure StringGrid1EditingDone(Sender: TObject);
     procedure StringGrid1Selection(Sender: TObject; aCol, aRow: integer);
     procedure tbPreset1Click(Sender: TObject);
-    procedure tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint; var Handled: boolean);
+    procedure tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint;
+      var Handled: boolean);
     procedure tbResetClick(Sender: TObject);
     procedure Timer1Timer(Sender: TObject);
   private
@@ -243,6 +245,7 @@ begin
     line := Application.Params[1];
     loadFile(line);
   end;
+  Panel1.Enabled := False;
   Timer1.Enabled := True;
   MCSLSU.MakeForm('form1', 'ID_', form1);
 end;
@@ -408,8 +411,8 @@ begin
     begin
       if (StringGrid1.Cells[1, x] <> '') then
       begin
-        line := StringGrid1.Cells[0, x] + ',' + StringGrid1.Cells[1, x] + ',' +
-          StringGrid1.Cells[2, x] + ',"' + StringGrid1.Cells[4, x] + '"';
+        line := StringGrid1.Cells[0, x] + ',' + StringGrid1.Cells[1, x] +
+          ',' + StringGrid1.Cells[2, x] + ',"' + StringGrid1.Cells[4, x] + '"';
         Writeln(f, line);
       end;
     end;
@@ -424,12 +427,11 @@ procedure TForm1.acDebugExecute(Sender: TObject);
 begin
   if (sps.isActive()) then
   begin
-    stopit := True;
-    acDebug.ImageIndex := 18;
-    sps.break();
+    acStopExecute(Sender);
   end
   else
   begin
+    Panel1.Enabled := True;
     acDebug.Enabled := True;
     acDebug.ImageIndex := 10;
     cbAdrActual.Enabled := True;
@@ -495,6 +497,7 @@ var
   i, x: integer;
   eot: boolean;
 begin
+  eot := False;
   myPos := StringGrid1.Row;
   if (myPos = StringGrid1.RowCount - 1) then
     eot := True;
@@ -569,6 +572,7 @@ procedure TForm1.nextStep;
 begin
   if (not sps.isActive()) then
   begin
+    Panel1.Enabled := True;
     programSps;
     sps.start();
     acStop.Enabled := True;
@@ -665,7 +669,8 @@ begin
         tmp := tmp + '0';
       line := line + tmp;
 
-      line := line + '      ' + StringGrid1.Cells[3, x] + '   ,"' + StringGrid1.Cells[4, x] + '"';
+      line := line + '      ' + StringGrid1.Cells[3, x] + '   ,"' +
+        StringGrid1.Cells[4, x] + '"';
       list.add(line);
     end;
   end;
@@ -676,10 +681,12 @@ end;
 
 procedure TForm1.acStopExecute(Sender: TObject);
 begin
+
   if (sps.isActive()) then
   begin
     stopit := True;
     sps.break();
+    acDebug.ImageIndex := 18;
     repeat
       Application.ProcessMessages;
     until (not sps.isDelayActive());
@@ -688,6 +695,7 @@ begin
     acDebug.Enabled := True;
     outputSps();
     selectAddress(0);
+    Panel1.Enabled := False;
   end;
 end;
 
@@ -757,7 +765,8 @@ begin
     begin
       KeyName := 'SOFTWARE\WOW6432Node\Arduino';
       StringValue := 'Install_Dir';
-      Res := RegistryReadString(HKEY_LOCAL_MACHINE, WideString(KeyName), WideString(StringValue));
+      Res := RegistryReadString(HKEY_LOCAL_MACHINE, WideString(KeyName),
+        WideString(StringValue));
       if Res <> '' then
       begin
         line := string(Res);
@@ -843,7 +852,8 @@ var
 begin
   if (dirty) then
   begin
-    i := MCSLSU.LSUAutoMsgBox('Messages', 'SAVE_CHANGES', MB_ICONQUESTION or MB_YESNOCANCEL);
+    i := MCSLSU.LSUAutoMsgBox('Messages', 'SAVE_CHANGES', MB_ICONQUESTION or
+      MB_YESNOCANCEL);
     if (i = mrYes) then
     begin
       saveFile(activeFile);
@@ -943,7 +953,8 @@ begin
   end
   else
   begin
-    Caption := MCSLSU.GetLSUText('form1Captions', 'ID_CAPTION', lsuCode) + ':' + ExtractFileName(activeFile);
+    Caption := MCSLSU.GetLSUText('form1Captions', 'ID_CAPTION', lsuCode) +
+      ':' + ExtractFileName(activeFile);
   end;
 
 end;
@@ -958,7 +969,8 @@ begin
     StringGrid1.Columns[i].Title.Caption :=
       MCSLSU.GetLSUText('form1Captions', StringGrid1.Columns[i].Title.Caption, lsuCode);
   end;
-  StringGrid1.Cells[0, 0] := MCSLSU.GetLSUText('form1Captions', 'ID_GRID_STORAGE', lsuCode);
+  StringGrid1.Cells[0, 0] := MCSLSU.GetLSUText('form1Captions',
+    'ID_GRID_STORAGE', lsuCode);
   StringGrid1.Repaint;
 end;
 
@@ -1098,7 +1110,8 @@ begin
   begin
     x := StringGrid1.Row;
     StringGrid1.Cells[3, x] :=
-      sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]), HexToInt(StringGrid1.Cells[2, x]));
+      sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]),
+      HexToInt(StringGrid1.Cells[2, x]));
     setDirty(True);
   end;
 end;
@@ -1113,7 +1126,7 @@ begin
   end;
 end;
 
-procedure TForm1.loadPreset(filename : string);
+procedure TForm1.loadPreset(filename: string);
 var
   x: integer;
   key: string;
@@ -1126,7 +1139,7 @@ begin
   checkPresets;
 end;
 
-procedure TForm1.savePreset(filename : string);
+procedure TForm1.savePreset(filename: string);
 var
   x: integer;
   key: string;
@@ -1143,10 +1156,14 @@ begin
   WriteIniBool(key, 'set', XMLPropStorage1.ReadBoolean(key + '.set', False), filename);
   WriteIniBool(key, 'prg', XMLPropStorage1.ReadBoolean(key + '.prg', False), filename);
   WriteIniBool(key, 'sel', XMLPropStorage1.ReadBoolean(key + '.sel', False), filename);
-  WriteIniBool(key, 'input1', XMLPropStorage1.ReadBoolean(key + '.input1', False), filename);
-  WriteIniBool(key, 'input2', XMLPropStorage1.ReadBoolean(key + '.input2', False), filename);
-  WriteIniBool(key, 'input3', XMLPropStorage1.ReadBoolean(key + '.input3', False), filename);
-  WriteIniBool(key, 'input4', XMLPropStorage1.ReadBoolean(key + '.input4', False), filename);
+  WriteIniBool(key, 'input1', XMLPropStorage1.ReadBoolean(key + '.input1', False),
+    filename);
+  WriteIniBool(key, 'input2', XMLPropStorage1.ReadBoolean(key + '.input2', False),
+    filename);
+  WriteIniBool(key, 'input3', XMLPropStorage1.ReadBoolean(key + '.input3', False),
+    filename);
+  WriteIniBool(key, 'input4', XMLPropStorage1.ReadBoolean(key + '.input4', False),
+    filename);
   WriteIniInteger(key, 'adc1', XMLPropStorage1.ReadInteger(key + '.adc1', 0), filename);
   WriteIniInteger(key, 'adc2', XMLPropStorage1.ReadInteger(key + '.adc2', 0), filename);
   WriteIniInteger(key, 'rc1', XMLPropStorage1.ReadInteger(key + '.rc1', 0), filename);
@@ -1158,10 +1175,14 @@ begin
   XMLPropStorage1.WriteBoolean(key + '.set', ReadIniBool(key, 'set', False, filename));
   XMLPropStorage1.WriteBoolean(key + '.prg', ReadIniBool(key, 'prg', False, filename));
   XMLPropStorage1.WriteBoolean(key + '.sel', ReadIniBool(key, 'sel', False, filename));
-  XMLPropStorage1.WriteBoolean(key + '.input1', ReadIniBool(key, 'input1', False, filename));
-  XMLPropStorage1.WriteBoolean(key + '.input2', ReadIniBool(key, 'input2', False, filename));
-  XMLPropStorage1.WriteBoolean(key + '.input3', ReadIniBool(key, 'input3', False, filename));
-  XMLPropStorage1.WriteBoolean(key + '.input4', ReadIniBool(key, 'input4', False, filename));
+  XMLPropStorage1.WriteBoolean(key + '.input1', ReadIniBool(key,
+    'input1', False, filename));
+  XMLPropStorage1.WriteBoolean(key + '.input2', ReadIniBool(key,
+    'input2', False, filename));
+  XMLPropStorage1.WriteBoolean(key + '.input3', ReadIniBool(key,
+    'input3', False, filename));
+  XMLPropStorage1.WriteBoolean(key + '.input4', ReadIniBool(key,
+    'input4', False, filename));
   XMLPropStorage1.WriteInteger(key + '.adc1', ReadIniInteger(key, 'adc1', 0, filename));
   XMLPropStorage1.WriteInteger(key + '.adc2', ReadIniInteger(key, 'adc2', 0, filename));
   XMLPropStorage1.WriteInteger(key + '.rc1', ReadIniInteger(key, 'rc1', 0, filename));
@@ -1208,7 +1229,8 @@ begin
   RC2.Value := XMLPropStorage1.ReadInteger(key + '.rc2', RC2.Value);
 end;
 
-procedure TForm1.tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint; var Handled: boolean);
+procedure TForm1.tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint;
+  var Handled: boolean);
 var
   key: string;
 begin
@@ -1278,8 +1300,8 @@ begin
   if (InfoBox.newVersion) then
   begin
     MCSLabel.Font.Color := clred;
-    MCSLabel.Hint := InfoBox.versionHint + chr($0a) + chr($0d) + MCSLSU.GetLSUText(
-      'form1Captions', 'ID_CLICK_HERE', lsuCode);
+    MCSLabel.Hint := InfoBox.versionHint + chr($0a) + chr($0d) +
+      MCSLSU.GetLSUText('form1Captions', 'ID_CLICK_HERE', lsuCode);
   end;
   MCSLabel.Caption := InfoBox.versionText;
 end;
@@ -1297,7 +1319,8 @@ begin
     if (StringGrid1.Cells[2, x] = '') then
       StringGrid1.Cells[2, x] := '0';
     StringGrid1.Cells[3, x] :=
-      sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]), HexToInt(StringGrid1.Cells[2, x]));
+      sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]),
+      HexToInt(StringGrid1.Cells[2, x]));
   end;
 end;
 
@@ -1358,6 +1381,10 @@ begin
   EditAddr.Text := '0x' + IntToHex(sps.getAddress(), 2);
   EditRAdr.Text := '0x' + IntToHex(sps.getRAdr(), 2);
   EditPage.Text := '0x' + IntToHex(sps.getPage(), 2);
+  if (sps.getJump() > 0) then
+    EditJump.Text := '0x' + IntToHex(sps.getJump(), 2)
+  else
+    EditJump.Text := '';
   if (sps.getTone() > 0) then
   begin
     ImageList2.GetBitmap(23, btnTone.Glyph);

+ 78 - 0
usps.pas

@@ -177,6 +177,7 @@ type
     eeprom: array[0..255] of byte;
     adrPage: byte;
     addr: word;
+    jumpAddr: word;
     a, b, c, d, e, f: byte;
 
     servo1, servo2: TServo;
@@ -242,6 +243,7 @@ type
     procedure start();
     procedure break();
     procedure doSingleCommand(command: byte);
+    procedure preFetch();
 
     procedure writeEEProm(adr: byte; Data: byte);
 
@@ -265,6 +267,9 @@ type
     procedure getDatas(cmd: byte; list: TStrings);
 
     function getCommandText(cmd, Data: byte): string;
+
+    function getJump(): byte;
+
   end;
 
 
@@ -411,6 +416,7 @@ begin
   begin
     doReset();
   end;
+  preFetch();
 end;
 
 procedure TSPS.doReset();
@@ -514,6 +520,73 @@ begin
   end;
 end;
 
+procedure TSPS.preFetch();
+var
+  cmd, Data: byte;
+  skip: boolean;
+begin
+  jumpAddr := 0;
+  skip := False;
+  cmd := eeprom[addr];
+  Data := (cmd and $0F);
+  cmd := (cmd and $F0);
+  case cmd of
+    C_COUNT:
+    begin
+      if (c > 0) then
+        jumpAddr := Data + 16 * Page;
+    end;
+    D_COUNT:
+    begin
+      if (d > 0) then
+        jumpAddr := Data + 16 * Page;
+    end;
+    JUMP_BACK: jumpAddr := addr - Data;
+    JUMP: jumpAddr := Data + 16 * Page;
+    SKIP_IF:
+    begin
+      case Data of
+        0: if (a = 0) then
+            case version of
+              ATTiny84, Arduino: skip := True;
+            end;
+        1: if (a > b) then
+            skip := True;
+        2: if (a < b) then
+            skip := True;
+        3: if (a = b) then
+            skip := True;
+        4: if (din1) then
+            skip := True;
+        5: if (din2) then
+            skip := True;
+        6: if (din3) then
+            skip := True;
+        7: if (din4) then
+            skip := True;
+        8: if (not din1) then
+            skip := True;
+        9: if (not din2) then
+            skip := True;
+        10: if (not din3) then
+            skip := True;
+        11: if (not din4) then
+            skip := True;
+        12: if (sw_sel) then
+            skip := True;
+        13: if (sw_prg) then
+            skip := True;
+        14: if (not sw_sel) then
+            skip := True;
+        15: if (not sw_prg) then
+            skip := True;
+      end;
+      if (skip = True) then
+        jumpAddr := addr + 2;
+    end;
+  end;
+end;
+
 procedure TSPS.writeEEProm(adr: byte; Data: byte);
 begin
   eeprom[adr] := Data;
@@ -695,6 +768,11 @@ begin
   Result := line;
 end;
 
+function TSPS.getJump(): byte;
+begin
+  Result := jumpAddr;
+end;
+
 procedure TSPS.doNull(Data: byte);
 begin
   // Do nothing

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است