Browse Source

+ invoke the ihx2tzx utility after successful linking for the ZX Spectrum platform, in order to produce
a .tzx file (that's a ZX Spectrum tape file format, used and supported by emulators)

git-svn-id: branches/z80@44854 -

nickysn 5 years ago
parent
commit
b85f62a3e1
1 changed files with 8 additions and 3 deletions
  1. 8 3
      compiler/systems/t_zxspectrum.pas

+ 8 - 3
compiler/systems/t_zxspectrum.pas

@@ -47,7 +47,7 @@ implementation
 {          constructor Create; override;}
           procedure SetDefaultInfo; override;
           function  MakeExecutable:boolean; override;
-{          function postprocessexecutable(const fn : string;isdll:boolean):boolean;}
+          function postprocessexecutable(const fn : string;isdll:boolean):boolean;
        end;
 
 
@@ -284,11 +284,11 @@ function TLinkerZXSpectrum_SdccSdld.MakeExecutable: boolean;
     if success and not(cs_link_nolink in current_settings.globalswitches) then
      DeleteFile(outputexedir+Info.ResName);
 
-(*  { Post process }
+  { Post process }
     if success and not(cs_link_nolink in current_settings.globalswitches) then
       success:=PostProcessExecutable(FixedExeFileName,false);
 
-    if success and (target_info.system in [system_arm_embedded,system_avr_embedded,system_mipsel_embedded,system_xtensa_embedded]) then
+  (*  if success and (target_info.system in [system_arm_embedded,system_avr_embedded,system_mipsel_embedded,system_xtensa_embedded]) then
       begin
         success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O ihex '+
           FixedExeFileName+' '+
@@ -302,6 +302,11 @@ function TLinkerZXSpectrum_SdccSdld.MakeExecutable: boolean;
     MakeExecutable:=success;   { otherwise a recursive call to link method }
   end;
 
+function TLinkerZXSpectrum_SdccSdld.postprocessexecutable(const fn: string; isdll: boolean): boolean;
+  begin
+    result:=DoExec(FindUtil(utilsprefix+'ihx2tzx'),' '+fn,true,false);
+  end;
+
 
 {*****************************************************************************
                                      Initialize