Browse Source

Other improvements and fixes for PPU debug code

Pierre Muller 2 months ago
parent
commit
f372eb8a33
3 changed files with 10 additions and 7 deletions
  1. 4 0
      compiler/fppu.pas
  2. 0 7
      compiler/ppu.pas
  3. 6 0
      compiler/symtype.pas

+ 4 - 0
compiler/fppu.pas

@@ -1854,6 +1854,10 @@ var
          if not ppufile.createfile then
          if not ppufile.createfile then
            Message(unit_f_ppu_cannot_write);
            Message(unit_f_ppu_cannot_write);
 
 
+{$ifdef DEBUG_GENERATE_INTERFACE_PPU}
+        if ppufile.writing_interface_ppu then
+          ppufile.crc_only:=false;
+{$endif DEBUG_GENERATE_INTERFACE_PPU}
 {$ifdef Test_Double_checksum_write}
 {$ifdef Test_Double_checksum_write}
          if FileExists(ppufilename+'.INT',false) then
          if FileExists(ppufilename+'.INT',false) then
            RenameFile(ppufilename+'.INT',ppufilename+'.INT-old');
            RenameFile(ppufilename+'.INT',ppufilename+'.INT-old');

+ 0 - 7
compiler/ppu.pas

@@ -391,13 +391,6 @@ begin
     end;
     end;
 {$endif}
 {$endif}
   result:=inherited createfile;
   result:=inherited createfile;
-{$ifdef DEBUG_GENERATE_INTERFACE_PPU}
-  if writing_interface_ppu then
-    begin
-      crc_only:=true;
-      writing_interface_ppu:=false;
-    end;
-{$endif DEBUG_GENERATE_INTERFACE_PPU}
 end;
 end;
 
 
 
 

+ 6 - 0
compiler/symtype.pas

@@ -1265,6 +1265,12 @@ implementation
       begin
       begin
         oldcrc:=do_crc;
         oldcrc:=do_crc;
         do_crc:=false;
         do_crc:=false;
+{$ifdef DEBUG_GENERATE_INTERFACE_PPU}
+	{ Accept invalid marker inside getppucrc }
+        if writing_interface_ppu then
+          putlongint(d.dataidx)
+        else
+{$endif}
         if d.dataidx=-1 then
         if d.dataidx=-1 then
           internalerror(2019022201)
           internalerror(2019022201)
         else
         else