Header 1.0
- Added the flag -b0/-b1 to specify if the converted file should expose 00 (BASIC) or 80 (Binary) in the header
@@ -63,7 +63,17 @@ | ||
63 | 63 | <p>To enable this feature in your own programs, just modify your OSDK_CONFIG.BAT file, and add the following: |
64 | 64 | </p> |
65 | 65 | |
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> | |
66 | 69 | <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> | |
67 | 77 | SET OSDKHEAD=-S1 |
68 | 78 | </pre> |
69 | 79 |
@@ -74,6 +84,9 @@ | ||
74 | 84 | <p>Here is the list of all releases with a short description of things that changed: |
75 | 85 | </p> |
76 | 86 | |
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 | + | |
77 | 90 | <p id=dateentry>Version 0.2</p> |
78 | 91 | - The address can now be specified with either $ or 0x as an hexadecimal prefix<br /> |
79 | 92 |
@@ -100,6 +100,7 @@ | ||
100 | 100 | " -a[0/1] for autorun (1) or non autorun (0)\r\n" |
101 | 101 | " -h[0/1] for header (1) or no header (0)\r\n" |
102 | 102 | " -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" | |
103 | 104 | "\r\n" |
104 | 105 | "Exemple:\r\n" |
105 | 106 | " {ApplicationName} -a1 final.out osdk.tap $500\r\n" |
@@ -109,6 +110,7 @@ | ||
109 | 110 | bool flag_auto=true; |
110 | 111 | bool flag_header=true; |
111 | 112 | bool flag_display_size=true; |
113 | + bool flag_binary=true; | |
112 | 114 | |
113 | 115 | ArgumentParser cArgumentParser(argc,argv); |
114 | 116 |
@@ -137,6 +139,14 @@ | ||
137 | 139 | // 1 => show size of generated file (default) |
138 | 140 | flag_display_size=cArgumentParser.GetBooleanValue(true); |
139 | 141 | } |
142 | + else | |
143 | + if (cArgumentParser.IsSwitch("-b")) | |
144 | + { | |
145 | + //format: [-b] | |
146 | + // 0 => BASIC | |
147 | + // 1 => BINARY | |
148 | + flag_binary=cArgumentParser.GetBooleanValue(true); | |
149 | + } | |
140 | 150 | } |
141 | 151 | |
142 | 152 |
@@ -223,9 +233,12 @@ | ||
223 | 233 | int adress_end =adress_start+filesize-1; |
224 | 234 | //flag_auto=true; |
225 | 235 | |
226 | - if (flag_auto) Header[7]=0xC7; | |
227 | - else Header[7]=0; | |
236 | + if (flag_binary) Header[6]=0x80; | |
237 | + else Header[6]=0; | |
228 | 238 | |
239 | + if (flag_auto) Header[7]=0xC7; | |
240 | + else Header[7]=0; | |
241 | + | |
229 | 242 | Header[10]=(adress_start>>8); |
230 | 243 | Header[11]=(adress_start&255); |
231 | 244 |