• R/O
  • SSH
  • HTTPS

oricsdk: Commit


Commit MetaInfo

Revision1548 (tree)
Time2020-12-24 03:17:33
Authordbug

Log Message

Header 1.0
- Added the flag -b0/-b1 to specify if the converted file should expose 00 (BASIC) or 80 (Binary) in the header

Change Summary

Incremental Difference

--- public/pc/tools/osdk/main/Osdk/_final_/documentation/doc_header.htm (revision 1547)
+++ public/pc/tools/osdk/main/Osdk/_final_/documentation/doc_header.htm (revision 1548)
@@ -63,7 +63,17 @@
6363 <p>To enable this feature in your own programs, just modify your OSDK_CONFIG.BAT file, and add the following:
6464 </p>
6565
66+<p>The -b switch sets the value 00 (BASIC) or 80 (Binary) in the tape header
67+This switch is particularly important if you are planning to convert a BASIC tape program to a text file, in which case you need to pass -b0
68+</p>
6669 <pre>
70+-s0 => No size information is displayed
71+-s1 => Display size informations in the output
72+</pre>
73+<p>To enable this feature in your own programs, just modify your OSDK_CONFIG.BAT file, and add the following:
74+</p>
75+
76+<pre>
6777 SET OSDKHEAD=-S1
6878 </pre>
6979
@@ -74,6 +84,9 @@
7484 <p>Here is the list of all releases with a short description of things that changed:
7585 </p>
7686
87+<p id=dateentry>Version 1.0</p>
88+ - Added the flag -b to specify if the converted file should expose 00 (BASIC) or 80 (Binary) in the header<br />
89+
7790 <p id=dateentry>Version 0.2</p>
7891 - The address can now be specified with either $ or 0x as an hexadecimal prefix<br />
7992
--- public/pc/tools/osdk/main/header/sources/header.cpp (revision 1547)
+++ public/pc/tools/osdk/main/header/sources/header.cpp (revision 1548)
@@ -100,6 +100,7 @@
100100 " -a[0/1] for autorun (1) or non autorun (0)\r\n"
101101 " -h[0/1] for header (1) or no header (0)\r\n"
102102 " -s[0/1] for showing size of file (1) or not (0)\r\n"
103+ " -b[0/1] for setting as BASIC (0) or BINARY (1)\r\n"
103104 "\r\n"
104105 "Exemple:\r\n"
105106 " {ApplicationName} -a1 final.out osdk.tap $500\r\n"
@@ -109,6 +110,7 @@
109110 bool flag_auto=true;
110111 bool flag_header=true;
111112 bool flag_display_size=true;
113+ bool flag_binary=true;
112114
113115 ArgumentParser cArgumentParser(argc,argv);
114116
@@ -137,6 +139,14 @@
137139 // 1 => show size of generated file (default)
138140 flag_display_size=cArgumentParser.GetBooleanValue(true);
139141 }
142+ else
143+ if (cArgumentParser.IsSwitch("-b"))
144+ {
145+ //format: [-b]
146+ // 0 => BASIC
147+ // 1 => BINARY
148+ flag_binary=cArgumentParser.GetBooleanValue(true);
149+ }
140150 }
141151
142152
@@ -223,9 +233,12 @@
223233 int adress_end =adress_start+filesize-1;
224234 //flag_auto=true;
225235
226- if (flag_auto) Header[7]=0xC7;
227- else Header[7]=0;
236+ if (flag_binary) Header[6]=0x80;
237+ else Header[6]=0;
228238
239+ if (flag_auto) Header[7]=0xC7;
240+ else Header[7]=0;
241+
229242 Header[10]=(adress_start>>8);
230243 Header[11]=(adress_start&255);
231244
Show on old repository browser