dsktool 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/dsktool.rb +177 -164
- data/doc/classes/RDoc.html +1 -1
- data/doc/classes/RDoc.src/M000038.html +1 -1
- data/doc/classes/SCAsmFile.src/M000025.html +1 -1
- data/doc/classes/SCAsmFile.src/M000026.html +1 -1
- data/doc/classes/SCAsmFile.src/M000027.html +1 -1
- data/doc/classes/SCAsmFile.src/M000028.html +1 -1
- data/doc/created.rid +1 -1
- data/doc/files/bin/dsktool_rb.html +18 -14
- data/doc/files/lib/D65_rb.html +2 -2
- data/doc/files/lib/DOSFile_rb.html +1 -1
- data/lib/D65.rb +1 -1
- data/lib/DOSFile.rb +8 -2
- metadata +2 -3
- data/lib/CHANGES.txt +0 -5
data/bin/dsktool.rb
CHANGED
@@ -1,164 +1,177 @@
|
|
1
|
-
|
2
|
-
# dsktool.rb
|
3
|
-
#
|
4
|
-
# == Synopsis
|
5
|
-
#
|
6
|
-
# Manipulate DSK format files (as used by Apple 2 emulators)
|
7
|
-
#
|
8
|
-
# == Usage
|
9
|
-
#
|
10
|
-
# dsktool.rb [switches] <filename.dsk>
|
11
|
-
# -c | --
|
12
|
-
# -e | --extract FILENAME extract file by name (either to stdout,
|
13
|
-
# or file specified by --output)
|
14
|
-
# -h | --help display this message
|
15
|
-
# -l | --list FILENAME monitor style listing (disassembles 65C02 opcodes)
|
16
|
-
# -o | --output FILENAME specify name to save extracted file as
|
17
|
-
# -
|
18
|
-
# -
|
19
|
-
#
|
20
|
-
#
|
21
|
-
# DSK images
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
# dsktool.rb
|
27
|
-
# dsktool.rb
|
28
|
-
# dsktool.rb
|
29
|
-
# dsktool.rb
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
#
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
opts.on("-
|
83
|
-
opts.on("-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
require
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
if (!
|
129
|
-
file=dsk.files[
|
130
|
-
if file.nil? then
|
131
|
-
puts "'#{
|
132
|
-
else
|
133
|
-
if
|
134
|
-
output_file<<file.
|
135
|
-
else
|
136
|
-
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
#
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
#
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# dsktool.rb
|
3
|
+
#
|
4
|
+
# == Synopsis
|
5
|
+
#
|
6
|
+
# Manipulate DSK format files (as used by Apple 2 emulators)
|
7
|
+
#
|
8
|
+
# == Usage
|
9
|
+
#
|
10
|
+
# dsktool.rb [switches] <filename.dsk>
|
11
|
+
# -c | --catalog display catalog
|
12
|
+
# -e | --extract FILENAME extract file by name (either to stdout,
|
13
|
+
# or file specified by --output)
|
14
|
+
# -h | --help display this message
|
15
|
+
# -l | --list FILENAME monitor style listing (disassembles 65C02 opcodes)
|
16
|
+
# -o | --output FILENAME specify name to save extracted file as
|
17
|
+
# -r | --raw don't convert basic files to ASCII
|
18
|
+
# -x | --explode extract all files
|
19
|
+
# -v | --version show version number
|
20
|
+
#
|
21
|
+
# Currently only works with DOS 3.3 format DSK images
|
22
|
+
# Will uncompress gzipped files (with extension .gz)
|
23
|
+
# input files can be URLs
|
24
|
+
#
|
25
|
+
# examples:
|
26
|
+
# dsktool.rb -c DOS3MASTR.dsk.gz
|
27
|
+
# dsktool.rb -l FID DOS3MASTR.dsk
|
28
|
+
# dsktool.rb --list fid -o fid.lst DOS3MASTR.dsk
|
29
|
+
# dsktool.rb --extract "COLOR DEMOSOFT" DOS3MASTR.dsk
|
30
|
+
# dsktool.rb -e HELLO -o HELLO.bas DOS3MASTR.dsk
|
31
|
+
# dsktool.rb -x DOS3MASTR.dsk.gz
|
32
|
+
# dsktool.rb -c http://jamtronix.com/dsks/apshai.dsk.gz
|
33
|
+
|
34
|
+
DSKTOOL_VERSION="0.1.4"
|
35
|
+
|
36
|
+
require 'optparse'
|
37
|
+
require 'rdoc/usage'
|
38
|
+
|
39
|
+
#due to a bug in rdoc, RDoc.usage won't work correctly when run from a gem executable
|
40
|
+
# see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/211297
|
41
|
+
# Display usage from the given file
|
42
|
+
def RDoc.usage_from_file(input_file, *args)
|
43
|
+
comment = File.open(input_file) do |file|
|
44
|
+
RDoc.find_comment(file)
|
45
|
+
end
|
46
|
+
comment = comment.gsub(/^\s*#/, '')
|
47
|
+
|
48
|
+
markup = SM::SimpleMarkup.new
|
49
|
+
flow_convertor = SM::ToFlow.new
|
50
|
+
|
51
|
+
flow = markup.convert(comment, flow_convertor)
|
52
|
+
|
53
|
+
format = "plain"
|
54
|
+
|
55
|
+
unless args.empty?
|
56
|
+
flow = extract_sections(flow, args)
|
57
|
+
end
|
58
|
+
|
59
|
+
options = RI::Options.instance
|
60
|
+
if args = ENV["RI"]
|
61
|
+
options.parse(args.split)
|
62
|
+
end
|
63
|
+
formatter = options.formatter.new(options, "")
|
64
|
+
formatter.display_flow(flow)
|
65
|
+
exit
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
catalog=false
|
70
|
+
explode=false
|
71
|
+
raw_mode=false
|
72
|
+
output_filename=nil
|
73
|
+
extract_filename=nil
|
74
|
+
list_filename=nil
|
75
|
+
explode_directory=nil
|
76
|
+
opts=OptionParser.new
|
77
|
+
opts.on("-h","--help") {RDoc::usage_from_file(__FILE__)}
|
78
|
+
opts.on("-v","--version") do
|
79
|
+
puts "dsktool.rb "+DSKTOOL_VERSION
|
80
|
+
exit
|
81
|
+
end
|
82
|
+
opts.on("-r","--raw") {raw_mode=true}
|
83
|
+
opts.on("-c","--catalog") {catalog=true}
|
84
|
+
opts.on("-x","--explode") {explode=true}
|
85
|
+
opts.on("-l","--list FILENAME",String) {|val| list_filename=val.upcase}
|
86
|
+
opts.on("-e","--extract FILENAME",String) {|val| extract_filename=val.upcase}
|
87
|
+
opts.on("-o","--output FILENAME",String) {|val| output_filename=val}
|
88
|
+
filename=opts.parse(ARGV)[0] rescue RDoc::usage_from_file(__FILE__,'Usage')
|
89
|
+
RDoc::usage_from_file(__FILE__,'Usage') if (filename.nil?)
|
90
|
+
|
91
|
+
#make sure the relevant folder with our libraries is in the require path
|
92
|
+
lib_path=File.expand_path(File.dirname(__FILE__)+"//..//lib")
|
93
|
+
$:.unshift(lib_path) unless $:.include?(lib_path)
|
94
|
+
|
95
|
+
require 'DSK'
|
96
|
+
dsk=DSK.read(filename)
|
97
|
+
output_file= case
|
98
|
+
when (output_filename.nil?) then STDOUT
|
99
|
+
else File.open(output_filename,"wb")
|
100
|
+
end
|
101
|
+
|
102
|
+
if(catalog) then
|
103
|
+
if (dsk.is_dos33?) then
|
104
|
+
dsk.dump_catalog
|
105
|
+
else
|
106
|
+
puts "#{filename} is not in DOS 3.3 format"
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
if(explode) then
|
111
|
+
output_dir=File.basename(filename,".*")
|
112
|
+
if !(File.exists?(output_dir)) then
|
113
|
+
Dir.mkdir(output_dir)
|
114
|
+
end
|
115
|
+
|
116
|
+
dsk.files.each_value do |f|
|
117
|
+
if (raw_mode) then
|
118
|
+
output_filename=output_dir+"/"+f.filename+".raw"
|
119
|
+
File.open(output_filename,"wb") <<f.contents
|
120
|
+
else
|
121
|
+
output_filename=output_dir+"/"+f.filename+f.file_extension
|
122
|
+
File.open(output_filename,"wb") <<f
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
if (!extract_filename.nil?) then
|
129
|
+
file=dsk.files[extract_filename]
|
130
|
+
if file.nil? then
|
131
|
+
puts "'#{extract_filename}' not found in #{filename}"
|
132
|
+
else
|
133
|
+
if (raw_mode) then
|
134
|
+
output_file<<file.contents
|
135
|
+
else
|
136
|
+
output_file<<file
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
if (!list_filename.nil?) then
|
142
|
+
file=dsk.files[list_filename]
|
143
|
+
if file.nil? then
|
144
|
+
puts "'#{list_filename}' not found in #{filename}"
|
145
|
+
else
|
146
|
+
if file.instance_of?(BinaryFile)
|
147
|
+
output_file<<file.disassembly
|
148
|
+
else
|
149
|
+
puts "'#{list_filename}' is not a binary file"
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
# == Author
|
155
|
+
# Jonno Downes (jonno@jamtronix.com)
|
156
|
+
#
|
157
|
+
# == Copyright
|
158
|
+
# Copyright (c) 2007 Jonno Downes (jonno@jamtronix.com)
|
159
|
+
#
|
160
|
+
#Permission is hereby granted, free of charge, to any person obtaining
|
161
|
+
#a copy of this software and associated documentation files (the
|
162
|
+
#"Software"), to deal in the Software without restriction, including
|
163
|
+
#without limitation the rights to use, copy, modify, merge, publish,
|
164
|
+
#distribute, sublicense, and/or sell copies of the Software, and to
|
165
|
+
#permit persons to whom the Software is furnished to do so, subject to
|
166
|
+
#the following conditions:
|
167
|
+
#
|
168
|
+
# The above copyright notice and this permission notice shall be
|
169
|
+
# included in all copies or substantial portions of the Software.
|
170
|
+
#
|
171
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
172
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
173
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
174
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
175
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
176
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
177
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/doc/classes/RDoc.html
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File bin/dsktool.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File bin/dsktool.rb, line 42</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">RDoc</span>.<span class="ruby-identifier">usage_from_file</span>(<span class="ruby-identifier">input_file</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
15
15
|
<span class="ruby-identifier">comment</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">input_file</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
16
16
|
<span class="ruby-constant">RDoc</span>.<span class="ruby-identifier">find_comment</span>(<span class="ruby-identifier">file</span>)
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 361</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_type</span>
|
15
15
|
<span class="ruby-value str">"I"</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 365</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
15
|
<span class="ruby-constant">SCAsmFile</span>.<span class="ruby-identifier">buffer_as_scasm_file</span>(<span class="ruby-ivar">@contents</span>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 369</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_extension</span>
|
15
15
|
<span class="ruby-value str">".asm"</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 373</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">SCAsmFile</span>.<span class="ruby-identifier">can_be_scasm_file</span>(<span class="ruby-identifier">buffer</span>)
|
15
15
|
<span class="ruby-identifier">length</span>=<span class="ruby-identifier">buffer</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">+</span><span class="ruby-identifier">buffer</span>[<span class="ruby-value">1</span>]<span class="ruby-operator">*</span><span class="ruby-value">256</span>
|
16
16
|
<span class="ruby-identifier">index</span>=<span class="ruby-value">2</span>
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sun Jun 17 11:26:44 AUS Eastern Standard Time 2007
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Sun Jun 17 11:22:55 AUS Eastern Standard Time 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -88,29 +88,31 @@ by Apple 2 emulators)
|
|
88
88
|
dsktool.rb [switches] <filename.dsk>
|
89
89
|
</p>
|
90
90
|
<pre>
|
91
|
-
-c | --
|
91
|
+
-c | --catalog display catalog
|
92
92
|
-e | --extract FILENAME extract file by name (either to stdout,
|
93
93
|
or file specified by --output)
|
94
94
|
-h | --help display this message
|
95
95
|
-l | --list FILENAME monitor style listing (disassembles 65C02 opcodes)
|
96
96
|
-o | --output FILENAME specify name to save extracted file as
|
97
|
+
-r | --raw don't convert basic files to ASCII
|
97
98
|
-x | --explode extract all files
|
98
99
|
-v | --version show version number
|
100
|
+
|
101
|
+
Currently only works with DOS 3.3 format DSK images
|
102
|
+
Will uncompress gzipped files (with extension .gz)
|
103
|
+
input files can be URLs
|
99
104
|
</pre>
|
100
105
|
<p>
|
101
|
-
Currently only works with DOS 3.3 format <a
|
102
|
-
href="../../classes/DSK.html">DSK</a> images can be
|
103
|
-
</p>
|
104
|
-
<p>
|
105
106
|
examples:
|
106
107
|
</p>
|
107
108
|
<pre>
|
108
109
|
dsktool.rb -c DOS3MASTR.dsk.gz
|
109
110
|
dsktool.rb -l FID DOS3MASTR.dsk
|
110
|
-
dsktool.rb --list fid -o fid.
|
111
|
+
dsktool.rb --list fid -o fid.lst DOS3MASTR.dsk
|
111
112
|
dsktool.rb --extract "COLOR DEMOSOFT" DOS3MASTR.dsk
|
112
113
|
dsktool.rb -e HELLO -o HELLO.bas DOS3MASTR.dsk
|
113
114
|
dsktool.rb -x DOS3MASTR.dsk.gz
|
115
|
+
dsktool.rb -c http://jamtronix.com/dsks/apshai.dsk.gz
|
114
116
|
</pre>
|
115
117
|
|
116
118
|
</div>
|
@@ -144,7 +146,7 @@ examples:
|
|
144
146
|
<tr class="top-aligned-row context-row">
|
145
147
|
<td class="context-item-name">DSKTOOL_VERSION</td>
|
146
148
|
<td>=</td>
|
147
|
-
<td class="context-item-value">"0.1.
|
149
|
+
<td class="context-item-value">"0.1.4"</td>
|
148
150
|
<td width="3em"> </td>
|
149
151
|
<td class="context-item-desc">
|
150
152
|
dsktool.rb
|
@@ -159,29 +161,31 @@ by Apple 2 emulators)
|
|
159
161
|
dsktool.rb [switches] <filename.dsk>
|
160
162
|
</p>
|
161
163
|
<pre>
|
162
|
-
-c | --
|
164
|
+
-c | --catalog display catalog
|
163
165
|
-e | --extract FILENAME extract file by name (either to stdout,
|
164
166
|
or file specified by --output)
|
165
167
|
-h | --help display this message
|
166
168
|
-l | --list FILENAME monitor style listing (disassembles 65C02 opcodes)
|
167
169
|
-o | --output FILENAME specify name to save extracted file as
|
170
|
+
-r | --raw don't convert basic files to ASCII
|
168
171
|
-x | --explode extract all files
|
169
172
|
-v | --version show version number
|
173
|
+
|
174
|
+
Currently only works with DOS 3.3 format DSK images
|
175
|
+
Will uncompress gzipped files (with extension .gz)
|
176
|
+
input files can be URLs
|
170
177
|
</pre>
|
171
178
|
<p>
|
172
|
-
Currently only works with DOS 3.3 format <a
|
173
|
-
href="../../classes/DSK.html">DSK</a> images can be
|
174
|
-
</p>
|
175
|
-
<p>
|
176
179
|
examples:
|
177
180
|
</p>
|
178
181
|
<pre>
|
179
182
|
dsktool.rb -c DOS3MASTR.dsk.gz
|
180
183
|
dsktool.rb -l FID DOS3MASTR.dsk
|
181
|
-
dsktool.rb --list fid -o fid.
|
184
|
+
dsktool.rb --list fid -o fid.lst DOS3MASTR.dsk
|
182
185
|
dsktool.rb --extract "COLOR DEMOSOFT" DOS3MASTR.dsk
|
183
186
|
dsktool.rb -e HELLO -o HELLO.bas DOS3MASTR.dsk
|
184
187
|
dsktool.rb -x DOS3MASTR.dsk.gz
|
188
|
+
dsktool.rb -c http://jamtronix.com/dsks/apshai.dsk.gz
|
185
189
|
</pre>
|
186
190
|
</td>
|
187
191
|
</tr>
|
data/doc/files/lib/D65_rb.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Sun Jun 17 10:42:36 AUS Eastern Standard Time 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -79,7 +79,7 @@
|
|
79
79
|
<h3 class="section-bar">Required files</h3>
|
80
80
|
|
81
81
|
<div class="name-list">
|
82
|
-
|
82
|
+
yaml
|
83
83
|
</div>
|
84
84
|
</div>
|
85
85
|
|
data/lib/D65.rb
CHANGED
data/lib/DOSFile.rb
CHANGED
@@ -311,14 +311,20 @@ private
|
|
311
311
|
index+=2 #skip over the "next address" field
|
312
312
|
line_no=buffer[index]+buffer[index+1]*256
|
313
313
|
index+=2 #skip over the "line number" field
|
314
|
-
s+=sprintf("%u
|
314
|
+
s+=sprintf("%u",line_no)
|
315
315
|
done_line=false
|
316
|
-
|
316
|
+
last_char_space=false
|
317
|
+
while (!done_line)
|
317
318
|
b=buffer[index]
|
318
319
|
if b>=0x80 then
|
320
|
+
if !last_char_space then
|
321
|
+
s+=" "
|
322
|
+
end
|
319
323
|
s+=APPLESOFT_TOKENS[b-0x80]+" "
|
324
|
+
last_char_space=true
|
320
325
|
else
|
321
326
|
s+=b.chr
|
327
|
+
last_char_space=false
|
322
328
|
end
|
323
329
|
index+=1
|
324
330
|
done_line=(index>=length)||(buffer[index]==0)
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: dsktool
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2007-06-
|
6
|
+
version: 0.1.4
|
7
|
+
date: 2007-06-17 00:00:00 +10:00
|
8
8
|
summary: a command line tool + libraries for manipulating DSK format images as used by Apple 2 emulators
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -199,7 +199,6 @@ files:
|
|
199
199
|
- doc/files/test/test_dos_disks_rb.html
|
200
200
|
- doc/files/test/ts_test_all_rb.html
|
201
201
|
- lib/a2_symbols.yaml
|
202
|
-
- lib/CHANGES.txt
|
203
202
|
- lib/D65.rb
|
204
203
|
- lib/DOSDisk.rb
|
205
204
|
- lib/DOSFile.rb
|