Browse Source

Merge branch 'develop'

Wilfried Klaas 3 years ago
parent
commit
436fc01338
10 changed files with 42 additions and 10 deletions
  1. 4 0
      README.md
  2. 2 2
      SPS_EMU.000
  3. 3 1
      SPS_EMU.001
  4. 2 1
      SPS_EMU.044
  5. 1 0
      SPS_EMU.049
  6. 1 1
      SPS_Emu.lpi
  7. BIN
      SPS_Emu.lsu
  8. 2 0
      git_push_all.cmd
  9. 18 3
      ugui.pas
  10. 9 2
      usps.pas

+ 4 - 0
README.md

@@ -1,4 +1,8 @@
 # **SPS_Emulator Version History**
+**02.06.2021 Version 0.2.1.90**
+
+-  Bug: just a small bug with the  eeprom size. Now you can't exceed the size, you will get an error  message. And i fixed a side effect with 256 bytes size.
+
 **15.05.2021 Version 0.2.1.88**
 
   * Bug: BBC micro:bit V2 wrong images will be displayed on image > 1 (only a little offset of 1)

+ 2 - 2
SPS_EMU.000

@@ -2,8 +2,8 @@
 LSUTextFile=1
 Copyrigth=MCS Media Computer Software
 [LSUInfo]
-CompileDate=15.05.2021
-CompileTime=11:32:02
+CompileDate=02.06.2021
+CompileTime=16:54:13
 Name=Wilfried Klaas
 LSUBinFile=C:\e-platte\daten\git-sourcen\SPS_Emulator\SPS_Emu.lsu
 LSUTextFile=C:\e-platte\daten\git-sourcen\SPS_Emulator\SPS_Emu.

+ 3 - 1
SPS_EMU.001

@@ -175,7 +175,9 @@ ID_MB_QUESTIONT=Question
 ID_MB_INFOT=Information
 SAVE_CHANGESM=The program has been changed. Do you want to save the changes?
 ID_UPLOAD_OKM=Pogram uploaded.
-ID_NOT_READYM=Arduino not responding. Maybe not connected, SEL not pressed oder wrong firmware version^?
+ID_NOT_READYM=Arduino not responding. Maybe not connected, SEL not pressed oder wrong firmware version?
+ID_PRG_TO_LONGM=The program is to long for the selected hardware.
+
 
 [frmSelectComCaptions]
 ID_COMPORT=Port

+ 2 - 1
SPS_EMU.044

@@ -175,7 +175,8 @@ ID_MB_QUESTIONT=Question
 ID_MB_INFOT=Information
 SAVE_CHANGESM=The program has been changed. Do you want to save the changes?
 ID_UPLOAD_OKM=Pogram uploaded.
-ID_NOT_READYM=Arduino not responding. Maybe not connected, SEL not pressed oder wrong firmware version^?
+ID_NOT_READYM=Arduino not responding. Maybe not connected, SEL not pressed oder wrong firmware version?
+ID_PRG_TO_LONGM=The program is to long for the selected hardware.
 
 [frmSelectComCaptions]
 ID_COMPORT=Port

+ 1 - 0
SPS_EMU.049

@@ -177,6 +177,7 @@ ID_MB_INFOT=Information
 SAVE_CHANGESM=Die Datei wurde geändert. Wollen Sie die Änderungen speichern?
 ID_UPLOAD_OKM=Pogramm übertragen.
 ID_NOT_READYM=Arduino antwortet nicht. Evtl. Arduino nicht angeschlossen, SEL nicht gedrückt oder falsche Firmware?
+ID_PRG_TO_LONGM=Das Program ist zu lang für die selektierte Hardware.
 
 [frmSelectComCaptions]
 ID_COMPORT=Schnittstelle

+ 1 - 1
SPS_Emu.lpi

@@ -22,7 +22,7 @@
       <AutoIncrementBuild Value="True"/>
       <MinorVersionNr Value="2"/>
       <RevisionNr Value="1"/>
-      <BuildNr Value="88"/>
+      <BuildNr Value="91"/>
       <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


+ 2 - 0
git_push_all.cmd

@@ -0,0 +1,2 @@
+git push --all
+git push origin --tags

+ 18 - 3
ugui.pas

@@ -716,6 +716,12 @@ var
   eot: boolean;
 begin
   eot := False;
+  i := StringGrid1.RowCount-1;
+  if (i >= (sps.getE2E())) then
+  begin
+    LSUAutoMsgBox('Messages', 'ID_PRG_TO_LONG', MB_OK + MB_ICONERROR);
+    exit;
+  end;
   myPos := StringGrid1.Row;
   if (myPos = StringGrid1.RowCount - 1) then
     eot := True;
@@ -740,7 +746,14 @@ end;
 procedure TForm1.acNextInsertExecute(Sender: TObject);
 var
   myPos: integer;
+  i : integer;
 begin
+  i := StringGrid1.RowCount-1;
+  if (i >= (sps.getE2E())) then
+  begin
+    LSUAutoMsgBox('Messages', 'ID_PRG_TO_LONG', MB_OK + MB_ICONERROR);
+    exit;
+  end;
   myPos := StringGrid1.Row;
   if (myPos = StringGrid1.RowCount - 1) then
     acNewRow.Execute;
@@ -1503,9 +1516,11 @@ begin
     Value := trim(Value);
     if (Value <> '') then
     begin
-      setDirty(True);
-      StringGrid1.RowCount := StringGrid1.RowCount + 1;
-      renumberGrid();
+      if StringGrid1.RowCount <= sps.getE2E() then begin
+        setDirty(True);
+        StringGrid1.RowCount := StringGrid1.RowCount + 1;
+        renumberGrid();
+      end;
     end;
   end
   else

+ 9 - 2
usps.pas

@@ -274,7 +274,8 @@ type
     procedure preFetch();
     function getLastError():string;
 
-    procedure writeEEProm(adr: byte; Data: byte);
+    procedure writeEEProm(adr: word; Data: byte);
+    function getE2E():word;
 
     function isActive(): boolean;
     function isDelayActive(): boolean;
@@ -632,11 +633,17 @@ begin
   result := errorMessage;
 end;
 
-procedure TSPS.writeEEProm(adr: byte; Data: byte);
+procedure TSPS.writeEEProm(adr: word; Data: byte);
 begin
+  if adr < e2e then
   eeprom[adr] := Data;
 end;
 
+function TSPS.getE2E(): word;
+begin
+   Result := e2e;
+end;
+
 function TSPS.isActive(): boolean;
 begin
   Result := active;